try { (function() { 
/*
 RequireJS 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
 Available via the MIT or new BSD license.
 see: http://github.com/jrburke/requirejs for details
*/
var requirejs,require,define;
(function(){var version="0.25.0",commentRegExp=/(\/\*([\s\S]*?)\*\/|\/\/(.*)$)/mg,cjsRequireRegExp=/require\(["']([^'"\s]+)["']\)/g,currDirRegExp=/^\.\//,jsSuffixRegExp=/\.js$/,ostring=Object.prototype.toString,ap=Array.prototype,aps=ap.slice,apsp=ap.splice,isBrowser=!!(typeof window!=="undefined"&&navigator&&document),isWebWorker=!isBrowser&&typeof importScripts!=="undefined",readyRegExp=/^(complete|loaded)$/,defContextName="_",isOpera=typeof opera!=="undefined"&&opera.toString()==="[object Opera]",
reqWaitIdPrefix="_r@@",empty={},contexts={},globalDefQueue=[],interactiveScript=null,isDone=false,checkLoadedDepth=0,useInteractive=false,req,cfg={},currentlyAddingScript,s,head,scripts,script,src,subPath,mainScript,dataMain,i,scrollIntervalId,ctx,checkLoadedTimeoutId;function isFunction(it){return ostring.call(it)==="[object Function]"}function isArray(it){return ostring.call(it)==="[object Array]"}function mixin(target,source,force){for(var prop in source)if(!(prop in empty)&&(!(prop in target)||
force))target[prop]=source[prop];return req}function makeError(id,msg,err){var e=new Error(msg+"\nhttp://requirejs.org/docs/errors.html#"+id);if(err)e.originalError=err;return e}function configurePackageDir(pkgs,currentPackages,dir){var i,location,pkgObj;for(i=0;pkgObj=currentPackages[i];i++){pkgObj=typeof pkgObj==="string"?{name:pkgObj}:pkgObj;location=pkgObj.location;if(dir&&(!location||location.indexOf("/")!==0&&location.indexOf(":")===-1))location=dir+"/"+(location||pkgObj.name);pkgs[pkgObj.name]=
{name:pkgObj.name,location:location||pkgObj.name,main:(pkgObj.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}}}if(typeof define!=="undefined")return;if(typeof requirejs!=="undefined")if(isFunction(requirejs))return;else{cfg=requirejs;requirejs=undefined}if(typeof require!=="undefined"&&!isFunction(require)){cfg=require;require=undefined}function newContext(contextName){var context,resume,config={waitSeconds:7,baseUrl:s.baseUrl||"./",paths:{},pkgs:{}},defQueue=[],specified={"require":true,
"exports":true,"module":true},urlMap={},defined={},loaded={},waiting={},waitAry=[],waitIdCounter=0,managerCallbacks={},plugins={},pluginsQueue={},resumeDepth=0,normalizedWaiting={};function trimDots(ary){var i,part;for(i=0;part=ary[i];i++)if(part==="."){ary.splice(i,1);i-=1}else if(part==="..")if(i===1&&(ary[2]===".."||ary[0]===".."))break;else if(i>0){ary.splice(i-1,2);i-=2}}function normalize(name,baseName){var pkgName,pkgConfig;if(name.charAt(0)===".")if(baseName){if(config.pkgs[baseName])baseName=
[baseName];else{baseName=baseName.split("/");baseName=baseName.slice(0,baseName.length-1)}name=baseName.concat(name.split("/"));trimDots(name);pkgConfig=config.pkgs[pkgName=name[0]];name=name.join("/");if(pkgConfig&&name===pkgName+"/"+pkgConfig.main)name=pkgName}return name}function makeModuleMap(name,parentModuleMap){var index=name?name.indexOf("!"):-1,prefix=null,parentName=parentModuleMap?parentModuleMap.name:null,originalName=name,normalizedName,url,pluginModule;if(index!==-1){prefix=name.substring(0,
index);name=name.substring(index+1,name.length)}if(prefix)prefix=normalize(prefix,parentName);if(name){if(prefix){pluginModule=defined[prefix];if(pluginModule)if(pluginModule.normalize)normalizedName=pluginModule.normalize(name,function(name){return normalize(name,parentName)});else normalizedName=normalize(name,parentName);else normalizedName="__$p"+parentName+"@"+name}else normalizedName=normalize(name,parentName);url=urlMap[normalizedName];if(!url){if(req.toModuleUrl)url=req.toModuleUrl(context,
normalizedName,parentModuleMap);else url=context.nameToUrl(normalizedName,null,parentModuleMap);urlMap[normalizedName]=url}}return{prefix:prefix,name:normalizedName,parentMap:parentModuleMap,url:url,originalName:originalName,fullName:prefix?prefix+"!"+normalizedName:normalizedName}}function isPriorityDone(){var priorityDone=true,priorityWait=config.priorityWait,priorityName,i;if(priorityWait){for(i=0;priorityName=priorityWait[i];i++)if(!loaded[priorityName]){priorityDone=false;break}if(priorityDone)delete config.priorityWait}return priorityDone}
function makeSetExports(moduleObj){return function(exports){moduleObj.exports=exports}}function makeContextModuleFunc(func,relModuleMap,enableBuildCallback){return function(){var args=[].concat(aps.call(arguments,0)),lastArg;if(enableBuildCallback&&isFunction(lastArg=args[args.length-1]))lastArg.__requireJsBuild=true;args.push(relModuleMap);return func.apply(null,args)}}function makeRequire(relModuleMap,enableBuildCallback){var modRequire=makeContextModuleFunc(context.require,relModuleMap,enableBuildCallback);
mixin(modRequire,{nameToUrl:makeContextModuleFunc(context.nameToUrl,relModuleMap),toUrl:makeContextModuleFunc(context.toUrl,relModuleMap),defined:makeContextModuleFunc(context.requireDefined,relModuleMap),specified:makeContextModuleFunc(context.requireSpecified,relModuleMap),ready:req.ready,isBrowser:req.isBrowser});if(req.paths)modRequire.paths=req.paths;return modRequire}function updateNormalizedNames(pluginName){var oldFullName,oldModuleMap,moduleMap,fullName,callbacks,i,j,k,depArray,existingCallbacks,
maps=normalizedWaiting[pluginName];if(maps)for(i=0;oldModuleMap=maps[i];i++){oldFullName=oldModuleMap.fullName;moduleMap=makeModuleMap(oldModuleMap.originalName,oldModuleMap.parentMap);fullName=moduleMap.fullName;callbacks=managerCallbacks[oldFullName]||[];existingCallbacks=managerCallbacks[fullName];if(fullName!==oldFullName){if(oldFullName in specified){delete specified[oldFullName];specified[fullName]=true}if(existingCallbacks)managerCallbacks[fullName]=existingCallbacks.concat(callbacks);else managerCallbacks[fullName]=
callbacks;delete managerCallbacks[oldFullName];for(j=0;j<callbacks.length;j++){depArray=callbacks[j].depArray;for(k=0;k<depArray.length;k++)if(depArray[k]===oldFullName)depArray[k]=fullName}}}delete normalizedWaiting[pluginName]}function queueDependency(dep){var prefix=dep.prefix,fullName=dep.fullName;if(specified[fullName]||fullName in defined)return;if(prefix&&!plugins[prefix]){plugins[prefix]=undefined;(normalizedWaiting[prefix]||(normalizedWaiting[prefix]=[])).push(dep);(managerCallbacks[prefix]||
(managerCallbacks[prefix]=[])).push({onDep:function(name,value){if(name===prefix)updateNormalizedNames(prefix)}});queueDependency(makeModuleMap(prefix))}context.paused.push(dep)}function execManager(manager){var i,ret,waitingCallbacks,err,cb=manager.callback,fullName=manager.fullName,args=[],ary=manager.depArray;if(cb&&isFunction(cb)){if(ary)for(i=0;i<ary.length;i++)args.push(manager.deps[ary[i]]);try{ret=req.execCb(fullName,manager.callback,args,defined[fullName])}catch(e){err=e}if(fullName)if(manager.cjsModule&&
manager.cjsModule.exports!==undefined)ret=defined[fullName]=manager.cjsModule.exports;else if(ret===undefined&&manager.usingExports)ret=defined[fullName];else defined[fullName]=ret}else if(fullName)ret=defined[fullName]=cb;if(waiting[manager.waitId]){delete waiting[manager.waitId];manager.isDone=true;context.waitCount-=1;if(context.waitCount===0)waitAry=[]}if(err){err=makeError("defineerror","Error evaluating "+'module "'+fullName+'" at location "'+(fullName?makeModuleMap(fullName).url:"")+'":\n'+
err+"\nfileName:"+(err.fileName||err.sourceURL)+"\nlineNumber: "+(err.lineNumber||err.line),err);err.moduleName=fullName;return req.onError(err)}if(fullName){waitingCallbacks=managerCallbacks[fullName];if(waitingCallbacks){for(i=0;i<waitingCallbacks.length;i++)waitingCallbacks[i].onDep(fullName,ret);delete managerCallbacks[fullName]}}return undefined}function main(inName,depArray,callback,relModuleMap){var moduleMap=makeModuleMap(inName,relModuleMap),name=moduleMap.name,fullName=moduleMap.fullName,
uniques={},manager={waitId:name||reqWaitIdPrefix+waitIdCounter++,depCount:0,depMax:0,prefix:moduleMap.prefix,name:name,fullName:fullName,deps:{},depArray:depArray,callback:callback,onDep:function(depName,value){if(!(depName in manager.deps)){manager.deps[depName]=value;manager.depCount+=1;if(manager.depCount===manager.depMax)execManager(manager)}}},i,depArg,depName,cjsMod;if(fullName){if(fullName in defined||loaded[fullName]===true)return;specified[fullName]=true;loaded[fullName]=true}for(i=0;i<depArray.length;i++){depArg=
depArray[i];if(depArg){depArg=makeModuleMap(depArg,name?moduleMap:relModuleMap);depName=depArg.fullName;depArray[i]=depName;if(depName==="require")manager.deps[depName]=makeRequire(moduleMap);else if(depName==="exports"){manager.deps[depName]=defined[fullName]={};manager.usingExports=true}else if(depName==="module"){manager.cjsModule=cjsMod=manager.deps[depName]={id:name,uri:name?context.nameToUrl(name,null,relModuleMap):undefined,exports:defined[fullName]};cjsMod.setExports=makeSetExports(cjsMod)}else if(depName in
defined&&!(depName in waiting))manager.deps[depName]=defined[depName];else if(!uniques[depName]){manager.depMax+=1;queueDependency(depArg);(managerCallbacks[depName]||(managerCallbacks[depName]=[])).push(manager);uniques[depName]=true}}}if(manager.depCount===manager.depMax)execManager(manager);else{waiting[manager.waitId]=manager;waitAry.push(manager);context.waitCount+=1}}function callDefMain(args){main.apply(null,args);loaded[args[0]]=true}function forceExec(manager,traced){if(manager.isDone)return undefined;
var fullName=manager.fullName,depArray=manager.depArray,depName,i;if(fullName){if(traced[fullName])return defined[fullName];traced[fullName]=true}for(i=0;i<depArray.length;i++){depName=depArray[i];if(depName)if(!manager.deps[depName]&&waiting[depName])manager.onDep(depName,forceExec(waiting[depName],traced))}return fullName?defined[fullName]:undefined}function checkLoaded(){var waitInterval=config.waitSeconds*1E3,expired=waitInterval&&context.startTime+waitInterval<(new Date).getTime(),noLoads="",
hasLoadedProp=false,stillLoading=false,prop,err,manager;if(context.pausedCount>0)return undefined;if(config.priorityWait)if(isPriorityDone())resume();else return undefined;for(prop in loaded)if(!(prop in empty)){hasLoadedProp=true;if(!loaded[prop])if(expired)noLoads+=prop+" ";else{stillLoading=true;break}}if(!hasLoadedProp&&!context.waitCount)return undefined;if(expired&&noLoads){err=makeError("timeout","Load timeout for modules: "+noLoads);err.requireType="timeout";err.requireModules=noLoads;return req.onError(err)}if(stillLoading||
context.scriptCount){if((isBrowser||isWebWorker)&&!checkLoadedTimeoutId)checkLoadedTimeoutId=setTimeout(function(){checkLoadedTimeoutId=0;checkLoaded()},50);return undefined}if(context.waitCount){for(i=0;manager=waitAry[i];i++)forceExec(manager,{});if(checkLoadedDepth<5){checkLoadedDepth+=1;checkLoaded()}}checkLoadedDepth=0;req.checkReadyState();return undefined}function callPlugin(pluginName,dep){var name=dep.name,fullName=dep.fullName,load;if(fullName in defined||fullName in loaded)return;if(!plugins[pluginName])plugins[pluginName]=
defined[pluginName];if(!loaded[fullName])loaded[fullName]=false;load=function(ret){if(req.onPluginLoad)req.onPluginLoad(context,pluginName,name,ret);execManager({prefix:dep.prefix,name:dep.name,fullName:dep.fullName,callback:function(){return ret}});loaded[fullName]=true};load.fromText=function(moduleName,text){var hasInteractive=useInteractive;context.loaded[moduleName]=false;context.scriptCount+=1;if(hasInteractive)useInteractive=false;req.exec(text);if(hasInteractive)useInteractive=true;context.completeLoad(moduleName)};
plugins[pluginName].load(name,makeRequire(dep.parentMap,true),load,config)}function loadPaused(dep){if(dep.prefix&&dep.name.indexOf("__$p")===0&&defined[dep.prefix])dep=makeModuleMap(dep.originalName,dep.parentMap);var pluginName=dep.prefix,fullName=dep.fullName,urlFetched=context.urlFetched;if(specified[fullName]||loaded[fullName])return;else specified[fullName]=true;if(pluginName)if(defined[pluginName])callPlugin(pluginName,dep);else{if(!pluginsQueue[pluginName]){pluginsQueue[pluginName]=[];(managerCallbacks[pluginName]||
(managerCallbacks[pluginName]=[])).push({onDep:function(name,value){if(name===pluginName){var i,oldModuleMap,ary=pluginsQueue[pluginName];for(i=0;i<ary.length;i++){oldModuleMap=ary[i];callPlugin(pluginName,makeModuleMap(oldModuleMap.originalName,oldModuleMap.parentMap))}delete pluginsQueue[pluginName]}}})}pluginsQueue[pluginName].push(dep)}else if(!urlFetched[dep.url]){req.load(context,fullName,dep.url);urlFetched[dep.url]=true}}resume=function(){var args,i,p;resumeDepth+=1;if(context.scriptCount<=
0)context.scriptCount=0;while(defQueue.length){args=defQueue.shift();if(args[0]===null)return req.onError(makeError("mismatch","Mismatched anonymous define() module: "+args[args.length-1]));else callDefMain(args)}if(!config.priorityWait||isPriorityDone())while(context.paused.length){p=context.paused;context.pausedCount+=p.length;context.paused=[];for(i=0;args=p[i];i++)loadPaused(args);context.startTime=(new Date).getTime();context.pausedCount-=p.length}if(resumeDepth===1)checkLoaded();resumeDepth-=
1;return undefined};context={contextName:contextName,config:config,defQueue:defQueue,waiting:waiting,waitCount:0,specified:specified,loaded:loaded,urlMap:urlMap,scriptCount:0,urlFetched:{},defined:defined,paused:[],pausedCount:0,plugins:plugins,managerCallbacks:managerCallbacks,makeModuleMap:makeModuleMap,normalize:normalize,configure:function(cfg){var paths,prop,packages,pkgs,packagePaths,requireWait;if(cfg.baseUrl)if(cfg.baseUrl.charAt(cfg.baseUrl.length-1)!=="/")cfg.baseUrl+="/";paths=config.paths;
packages=config.packages;pkgs=config.pkgs;mixin(config,cfg,true);if(cfg.paths){for(prop in cfg.paths)if(!(prop in empty))paths[prop]=cfg.paths[prop];config.paths=paths}packagePaths=cfg.packagePaths;if(packagePaths||cfg.packages){if(packagePaths)for(prop in packagePaths)if(!(prop in empty))configurePackageDir(pkgs,packagePaths[prop],prop);if(cfg.packages)configurePackageDir(pkgs,cfg.packages);config.pkgs=pkgs}if(cfg.priority){requireWait=context.requireWait;context.requireWait=false;context.takeGlobalQueue();
resume();context.require(cfg.priority);resume();context.requireWait=requireWait;config.priorityWait=cfg.priority}if(cfg.deps||cfg.callback)context.require(cfg.deps||[],cfg.callback);if(cfg.ready)req.ready(cfg.ready)},requireDefined:function(moduleName,relModuleMap){return makeModuleMap(moduleName,relModuleMap).fullName in defined},requireSpecified:function(moduleName,relModuleMap){return makeModuleMap(moduleName,relModuleMap).fullName in specified},require:function(deps,callback,relModuleMap){var moduleName,
fullName,moduleMap;if(typeof deps==="string"){if(req.get)return req.get(context,deps,callback);moduleName=deps;relModuleMap=callback;moduleMap=makeModuleMap(moduleName,relModuleMap);fullName=moduleMap.fullName;if(!(fullName in defined))return req.onError(makeError("notloaded","Module name '"+moduleMap.fullName+"' has not been loaded yet for context: "+contextName));return defined[fullName]}main(null,deps,callback,relModuleMap);if(!context.requireWait)while(!context.scriptCount&&context.paused.length){context.takeGlobalQueue();
resume()}return undefined},takeGlobalQueue:function(){if(globalDefQueue.length){apsp.apply(context.defQueue,[context.defQueue.length-1,0].concat(globalDefQueue));globalDefQueue=[]}},completeLoad:function(moduleName){var args;context.takeGlobalQueue();while(defQueue.length){args=defQueue.shift();if(args[0]===null){args[0]=moduleName;break}else if(args[0]===moduleName)break;else{callDefMain(args);args=null}}if(args)callDefMain(args);else callDefMain([moduleName,[],null]);loaded[moduleName]=true;if(req.isAsync)context.scriptCount-=
1;resume();if(!req.isAsync)context.scriptCount-=1},toUrl:function(moduleNamePlusExt,relModuleMap){var index=moduleNamePlusExt.lastIndexOf("."),ext=null;if(index!==-1){ext=moduleNamePlusExt.substring(index,moduleNamePlusExt.length);moduleNamePlusExt=moduleNamePlusExt.substring(0,index)}return context.nameToUrl(moduleNamePlusExt,ext,relModuleMap)},nameToUrl:function(moduleName,ext,relModuleMap){var paths,pkgs,pkg,pkgPath,syms,i,parentModule,url,config=context.config;moduleName=normalize(moduleName,
relModuleMap&&relModuleMap.fullName);if(req.jsExtRegExp.test(moduleName))url=moduleName+(ext?ext:"");else{paths=config.paths;pkgs=config.pkgs;syms=moduleName.split("/");for(i=syms.length;i>0;i--){parentModule=syms.slice(0,i).join("/");if(paths[parentModule]){syms.splice(0,i,paths[parentModule]);break}else if(pkg=pkgs[parentModule]){if(moduleName===pkg.name)pkgPath=pkg.location+"/"+pkg.main;else pkgPath=pkg.location;syms.splice(0,i,pkgPath);break}}url=syms.join("/")+(ext||".js");url=(url.charAt(0)===
"/"||url.match(/^\w+:/)?"":config.baseUrl)+url}return config.urlArgs?url+((url.indexOf("?")===-1?"?":"&")+config.urlArgs):url}};context.resume=resume;return context}req=requirejs=function(deps,callback){var contextName=defContextName,context,config;if(!isArray(deps)&&typeof deps!=="string"){config=deps;if(isArray(callback)){deps=callback;callback=arguments[2]}else deps=[]}if(config&&config.context)contextName=config.context;context=contexts[contextName]||(contexts[contextName]=newContext(contextName));
if(config)context.configure(config);return context.require(deps,callback)};if(typeof require==="undefined")require=req;req.toUrl=function(moduleNamePlusExt){return contexts[defContextName].toUrl(moduleNamePlusExt)};req.version=version;req.isArray=isArray;req.isFunction=isFunction;req.mixin=mixin;req.jsExtRegExp=/^\/|:|\?|\.js$/;s=req.s={contexts:contexts,skipAsync:{},isPageLoaded:!isBrowser,readyCalls:[]};req.isAsync=req.isBrowser=isBrowser;if(isBrowser)head=s.head=document.getElementsByTagName("head")[0];
req.onError=function(err){throw err;};req.load=function(context,moduleName,url){var loaded=context.loaded;isDone=false;if(!loaded[moduleName])loaded[moduleName]=false;context.scriptCount+=1;req.attach(url,context,moduleName)};function getInteractiveScript(){var scripts,i,script;if(interactiveScript&&interactiveScript.readyState==="interactive")return interactiveScript;scripts=document.getElementsByTagName("script");for(i=scripts.length-1;i>-1&&(script=scripts[i]);i--)if(script.readyState==="interactive")return interactiveScript=
script;return null}define=req.def=function(name,deps,callback){var node,context;if(typeof name!=="string"){callback=deps;deps=name;name=null}if(!req.isArray(deps)){callback=deps;deps=[]}if(!name&&!deps.length&&req.isFunction(callback))if(callback.length){callback.toString().replace(commentRegExp,"").replace(cjsRequireRegExp,function(match,dep){deps.push(dep)});deps=(callback.length===1?["require"]:["require","exports","module"]).concat(deps)}if(useInteractive){node=currentlyAddingScript||getInteractiveScript();
if(!node)return req.onError(makeError("interactive","No matching script interactive for "+callback));if(!name)name=node.getAttribute("data-requiremodule");context=contexts[node.getAttribute("data-requirecontext")]}(context?context.defQueue:globalDefQueue).push([name,deps,callback]);return undefined};define.amd={multiversion:true,plugins:true};req.exec=function(text){return eval(text)};req.execCb=function(name,callback,args,exports){return callback.apply(exports,args)};req.onScriptLoad=function(evt){var node=
evt.currentTarget||evt.srcElement,contextName,moduleName,context;if(evt.type==="load"||readyRegExp.test(node.readyState)){interactiveScript=null;contextName=node.getAttribute("data-requirecontext");moduleName=node.getAttribute("data-requiremodule");context=contexts[contextName];contexts[contextName].completeLoad(moduleName);node.removeEventListener("load",req.onScriptLoad,false)}};req.attach=function(url,context,moduleName,callback,type){var node,loaded;if(isBrowser){callback=callback||req.onScriptLoad;
node=context&&context.config&&context.config.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");node.type=type||"text/javascript";node.charset="utf-8";node.async=!s.skipAsync[url];if(context)node.setAttribute("data-requirecontext",context.contextName);node.setAttribute("data-requiremodule",moduleName);node.addEventListener("load",callback,false);node.src=url;currentlyAddingScript=node;head.appendChild(node);currentlyAddingScript=null;return node}else if(isWebWorker){loaded=
context.loaded;loaded[moduleName]=false;importScripts(url);context.completeLoad(moduleName)}return null};if(isBrowser){scripts=document.getElementsByTagName("script");for(i=scripts.length-1;i>-1&&(script=scripts[i]);i--){if(!head)head=script.parentNode;if(dataMain=script.getAttribute("data-main")){if(!cfg.baseUrl){src=dataMain.split("/");mainScript=src.pop();subPath=src.length?src.join("/")+"/":"./";cfg.baseUrl=subPath;dataMain=mainScript.replace(jsSuffixRegExp,"")}cfg.deps=cfg.deps?cfg.deps.concat(dataMain):
[dataMain];break}}}s.baseUrl=cfg.baseUrl;req.pageLoaded=function(){if(!s.isPageLoaded){s.isPageLoaded=true;if(scrollIntervalId)clearInterval(scrollIntervalId);req.callReady()}};req.checkReadyState=function(){var contexts=s.contexts,prop;for(prop in contexts)if(!(prop in empty))if(contexts[prop].waitCount)return;s.isDone=true;req.callReady()};req.callReady=function(){var callbacks=s.readyCalls,i,callback,contexts,context,prop;if(s.isPageLoaded&&s.isDone)if(callbacks.length){s.readyCalls=[];for(i=0;callback=
callbacks[i];i++)callback()}};req.ready=function(callback){if(s.isPageLoaded&&s.isDone)callback();else s.readyCalls.push(callback);return req};if(isBrowser){if(document.addEventListener){document.addEventListener("DOMContentLoaded",req.pageLoaded,false);window.addEventListener("load",req.pageLoaded,false)}else if(window.attachEvent){window.attachEvent("onload",req.pageLoaded);if(self===self.top)scrollIntervalId=setInterval(function(){try{if(document.body){document.documentElement.doScroll("left");
req.pageLoaded()}}catch(e){}},30)}if(document.readyState==="complete")req.pageLoaded()}req(cfg);if(req.isAsync&&typeof setTimeout!=="undefined"){ctx=s.contexts[cfg.context||defContextName];ctx.requireWait=true;setTimeout(function(){ctx.requireWait=false;ctx.takeGlobalQueue();if(!ctx.scriptCount)ctx.resume();req.checkReadyState()},0)}})();var la=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,l,k){if(a==Array.prototype||a==Object.prototype)return a;a[l]=k.value;return a};function ma(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var l=0;l<a.length;++l){var k=a[l];if(k&&k.Math==Math)return k}throw Error("Cannot find global object");}var na=ma(this);
function oa(a,l){if(l)a:{var k=na;a=a.split(".");for(var n=0;n<a.length-1;n++){var g=a[n];if(!(g in k))break a;k=k[g]}a=a[a.length-1];n=k[a];l=l(n);l!=n&&l!=null&&la(k,a,{configurable:!0,writable:!0,value:l})}}oa("Set.prototype.union",function(a){return a?a:function(l){pa(this);Pb(l);var k=new Set(this);l=Qb(l.keys());for(var n=l.next();!n.done;)k.add(n.value),n=l.next();return k}});
oa("Set.prototype.difference",function(a){return a?a:function(l){pa(this);Pb(l);var k=Rb(this,l);l=new Set(this);var n=k.kqa;k=k.Hna;for(var g=n.next();!g.done;)k.has(g.value)&&l.delete(g.value),g=n.next();return l}});oa("Set.prototype.intersection",function(a){return a?a:function(l){pa(this);Pb(l);var k=new Set,n=Rb(this,l);l=n.kqa;n=n.Hna;for(var g=l.next();!g.done;)n.has(g.value)&&k.add(g.value),g=l.next();return k}});
function Pb(a){if(typeof a!=="object"||a===null||typeof a.size!=="number"||a.size<0||typeof a.keys!=="function"||typeof a.has!=="function")throw new TypeError("Argument must be set-like");}function Qb(a){if(typeof a!=="object"||a===null||typeof a.next!=="function")throw new TypeError("Invalid iterator.");return a}function Rb(a,l){return a.size<=l.size?{kqa:a.keys(),Hna:l}:{kqa:Qb(l.keys()),Hna:a}}
function pa(a){if(!(a instanceof Set))throw new TypeError("Method must be called on an instance of Set.");}
oa("String.prototype.matchAll",function(a){return a?a:function(l){if(l instanceof RegExp&&!l.global)throw new TypeError("RegExp passed into String.prototype.matchAll() must have global tag.");var k=new RegExp(l,l instanceof RegExp?void 0:"g"),n=this,g=!1,h={next:function(){if(g)return{value:void 0,done:!0};var e=k.exec(n);if(!e)return g=!0,{value:void 0,done:!0};e[0]===""&&(k.lastIndex+=1);return{value:e,done:!1}}};h[Symbol.iterator]=function(){return h};return h}});
oa("Object.fromEntries",function(a){return a?a:function(l){var k={};if(!(Symbol.iterator in l))throw new TypeError(""+l+" is not iterable");l=l[Symbol.iterator].call(l);for(var n=l.next();!n.done;n=l.next()){n=n.value;if(Object(n)!==n)throw new TypeError("iterable for fromEntries should yield objects");k[n[0]]=n[1]}return k}});
(function(){function a(d){this.kr=d;this.mv=null;this.cd={}}function l(){this.tj={};this.tj[l.SCRIPT_URL]=[];this.tj[l.THREE_JS_WEBGL_URL]="lib/ThreeWebGL.js";this.tj[l.WEBVR_POLYFILL_URL]="lib/WebVRPolyfill.js";this.tj[l.WEBXR_POLYFILL_URL]="lib/webxr-polyfill.js";this.tj[l.HLS_URL]="lib/Hls.js";this.tj[l.GS_URL]="lib/tdvgs.js";this.tj[l.e$]="lib/basis/";this.tj[l.v$]="lib/draco/";this.tj[l.CURSORS_DIR_URL]="lib/cursors";this.tj[l.SERVICE_WORKER_URL]="tdvplayersw.js";this.tj[l.JB]="lib/webxr-input-profiles/";
this.tj[l.BACKGROUND_PRELOAD_ENABLED]=void 0;this.tj[l.ZY]=void 0}function k(){this.wT=[];this.w3=[];this.e4a=[];this.FZ=null}function n(d){return Object.prototype.toString.call(d)=="[object Array]"}function g(d){return!!(window.location.hash&&window.location.hash.indexOf("device="+d)>=0)}function h(d){return b.search(d.toLowerCase())>=0}var e=window.TDV=window.TDV||{},b=navigator.userAgent.toLowerCase();k.prototype.getVersion=k.prototype.TJa=function(){return{MAJOR:"0",MINOR:"2268"}};
k.prototype.getClassByName=function(){};k.prototype.QBa=function(){if(this.FZ)for(;this.wT.length>0;){var d=this.wT[0];this.wT=this.wT.slice(1);this.w3.push(d);this.LYa(d)}};k.prototype.dza=function(d){var f=document.createElement("a");f.href=d;return f.href};k.prototype.h0a=function(){var d=document.currentScript;d||(d=document.getElementsByTagName("head")[0].getElementsByTagName("script"),d=d[d.length-1]);return this.dza(d.src)};k.prototype.LYa=function(d){var f=this,m=d.kr.get(l.SELECTED_SCRIPT_URL);
setTimeout(function(){var p=document.createElement("script");p.type="text/javascript";p.src=m;document.getElementsByTagName("head")[0].appendChild(p);f.FZ.qkb(d)},1)};k.prototype.defineScript=function(d){for(var f=[],m=this.h0a(),p=0;p<this.w3.length;p++){var q=this.w3[p],r=this.dza(q.kr.get(l.SELECTED_SCRIPT_URL));r==m?(q.kr.set(l.SCRIPT_DATA,d),q.Dib(new this.FZ(q,q.kr)),this.e4a.push(q)):f.push(r)}this.w3=f};k.prototype.create=k.prototype.create=function(d){var f=d.get(l.SCRIPT_URL);f=n(f)?this.$4a(f):
typeof f==="string"?f:"script.js";d.set(l.SELECTED_SCRIPT_URL,f);d=new e.Jsa(d);this.wT.push(d);this.QBa();return d};k.prototype.setPlayerClass=k.prototype.Cib=function(d){this.FZ=d;this.QBa();this.m({name:"classesReady",source:this})};k.prototype.bind=k.prototype.bind=function(d,f,m,p){this.cd=this.cd||{};this.cd[d]=this.cd[d]||[];this.cd[d].push({handler:f,context:m,immediate:p||!1})};k.prototype.unbind=k.prototype.h=function(d,f,m,p){this.cd&&d in this.cd&&(this.cd[d]=this.cd[d].filter(function(q){return q.handler!=
f||q.context!=m||q.immediate!=p}))};k.prototype.m=function(d){this.cd&&d.name in this.cd&&(this.WB(d,!0),setTimeout(function(){this.WB(d,!1)}.bind(this),0))};k.prototype.WB=function(d,f){d.unbindCurrentHandler=function(){}.bind(this);for(var m=this.cd[d.name],p=0;p<m.length;p++)if(m[p].immediate==f)try{m[p].handler.call(m[p].context||window,d)}catch(q){setTimeout(function(){throw q;},0)}};k.prototype.getOrientation=k.prototype.zt=function(){var d=screen.orientation&&screen.orientation.type||window.orientation;
return d=="portrait-primary"||d=="portrait-secondary"||d===0||d==180?e.qb.saa:d=="landscape-primary"||d=="landscape-secondary"||d==90||d==-90?e.qb.raa:window.innerWidth<window.innerHeight?e.qb.saa:e.qb.raa};k.prototype.$4a=function(d){if(d.length>0){for(var f=0;f<d.length;f++){var m=d[f];if(n(m)){if(this.dEa(m[0]))return m[1]}else if(typeof m==="string")return m}return d[0][1]}return"script.js"};k.prototype.dEa=function(d){if(typeof d==="string"){var f=d.match(/^\s*default\s*$/);if(f)return!0;if(f=
d.match(/^\s*os\s*=\s*(\w+)\s*$/))return this.Md==f[1].toLowerCase();if(f=d.match(/^\s*browser\s*=\s*(\w+)\s*$/))return this.Ub==f[1].toLowerCase();if(f=d.match(/^\s*device\s*=\s*(\w+)\s*$/))return this.yk==f[1].toLowerCase();if(f=d.match(/^\s*screen_size\s*(<|>|=|<=|>=)\s*(\d+)\s*x\s*(\d+)\s*$/)){d=parseInt(f[2]);var m=parseInt(f[3]);switch(f[1]){case "<":var p=function(q,r){return q<r};break;case ">":p=function(q,r){return q>r};break;case "=":p=function(q,r){return q==r};break;case "<=":p=function(q,
r){return q<=r};break;case ">=":p=function(q,r){return q>=r}}return p(screen.width,d)&&p(screen.height,m)||this.mobile&&p(screen.width,m)&&p(screen.height,d)}return!1}if(n(d)){for(f=0;f<d.length;f++)if(!this.dEa(d[f]))return!1;return!0}return!1};k.prototype.ORIENTATION_LANDSCAPE=k.prototype.raa="landscape";k.prototype.ORIENTATION_PORTRAIT=k.prototype.saa="portrait";k.prototype.OS_IOS=k.prototype.pZ="ios";k.prototype.OS_ANDROID=k.prototype.taa="android";k.prototype.OS_WINDOWS=k.prototype.Asa="windows";
k.prototype.OS_WINDOWS_PHONE=k.prototype.xaa="windows_phone";k.prototype.OS_MACOSX=k.prototype.uaa="osx";k.prototype.OS_LINUX=k.prototype.zsa="linux";k.prototype.OS_QNX=k.prototype.waa="qnx";k.prototype.OS_OTHER=k.prototype.vaa="other";k.prototype.BROWSER_TYPE_WEBKIT=k.prototype.WP="webkit";k.prototype.BROWSER_TYPE_OPERA=k.prototype.k$="opera";k.prototype.BROWSER_TYPE_MSIE=k.prototype.j$="msie";k.prototype.BROWSER_TYPE_MOZILLA=k.prototype.i$="mozilla";k.prototype.BROWSER_TYPE_OTHER=k.prototype.l$=
"other";k.prototype.BROWSER_SAFARI_IOS=k.prototype.Ii="safari_ios";k.prototype.BROWSER_OPERA=k.prototype.PY="opera";k.prototype.BROWSER_SAFARI=k.prototype.Ok="safari";k.prototype.BROWSER_CHROME=k.prototype.Hp="chrome";k.prototype.BROWSER_EDGE=k.prototype.tK="edge";k.prototype.BROWSER_MSIE=k.prototype.dF="msie";k.prototype.BROWSER_ANDROID=k.prototype.OY="android";k.prototype.BROWSER_MOZILLA=k.prototype.Xw="mozilla";k.prototype.BROWSER_OTHER=k.prototype.f$="other";k.prototype.BROWSER_SUBTYPE_SAMSUNG_INTERNET=
k.prototype.RY="samsunginternet";k.prototype.BROWSER_SUBTYPE_OCULUS_BROWSER=k.prototype.Yw="oculusbrowser";k.prototype.BROWSER_SUBTYPE_PICO_BROWSER=k.prototype.Zw="picobrowser";k.prototype.BROWSER_SUBTYPE_SAMSUNG_INTERNET_FOR_GEAR_VR=k.prototype.SY="samsunginternetgearvr";k.prototype.BROWSER_SUBTYPE_MI_BROWSER=k.prototype.g$="mibrowser";k.prototype.BROWSER_SUBTYPE_CHROME_IOS=k.prototype.uK="chromeios";k.prototype.BROWSER_SUBTYPE_SAFARI_IOS=k.prototype.UP="safari_ios";k.prototype.BROWSER_SUBTYPE_CHROME_WEBVIEW=
k.prototype.vK="chrome_webview";k.prototype.BROWSER_SUBTYPE_SAFARI_WEBVIEW=k.prototype.VP="safari_webview";k.prototype.BROWSER_SUBTYPE_TOUR_LAUNCHER=k.prototype.kB="tour_launcher";k.prototype.BROWSER_SUBTYPE_CHROMIUM_EDGE=k.prototype.vK="chromium_edge";k.prototype.BROWSER_SUBTYPE_FIREFOX_REALITY=k.prototype.jB="firefox_reality";k.prototype.BROWSER_SUBTYPE_VR_APP=k.prototype.mu="vrapp";k.prototype.BROWSER_SUBTYPE_XR_APP=k.prototype.nu="xrapp";k.prototype.BROWSER_SUBTYPE_FACEBOOK_IOS_WEBVIEW=k.prototype.QY=
"facebook_ios_webview";k.prototype.BROWSER_SUBTYPE_OTHER=k.prototype.h$="other";k.prototype.BROWSER_VERSION_UNKNOWN=k.prototype.m$=-1;k.prototype.DEVICE_IPHONE=k.prototype.UY="iphone";k.prototype.DEVICE_IPAD=k.prototype.ZP="ipad";k.prototype.DEVICE_IPOD=k.prototype.q$="ipod";k.prototype.DEVICE_OCULUS_QUEST_2=k.prototype.zK="oculusquest2";k.prototype.DEVICE_OCULUS_QUEST_3=k.prototype.$P="oculusquest3";k.prototype.DEVICE_PICO_G2=k.prototype.VY="picog2";k.prototype.DEVICE_PICO_G3=k.prototype.cQ="picog3";
k.prototype.DEVICE_PICO_NEO2=k.prototype.WY="piconeo2";k.prototype.DEVICE_PICO_NEO3=k.prototype.dQ="piconeo3";k.prototype.DEVICE_PICO_4=k.prototype.aQ="pico4";k.prototype.DEVICE_PICO_4_ULTRA=k.prototype.bQ="pico4ultra";k.prototype.DEVICE_VIVE_FOCUS=k.prototype.YY="vivefocus";k.prototype.DEVICE_OTHER=k.prototype.r$="other";k.prototype.os=k.prototype.Md=h("iphone")||h("ipad")||h("ipod")?k.prototype.pZ:h("qnx")?k.prototype.waa:h("android")||h("oculusbrowser")&&h("linux")?k.prototype.taa:h("windows phone")?
k.prototype.xaa:h("windows")?k.prototype.Asa:h("mac_powerpc")?k.prototype.uaa:h("macintosh")?navigator.maxTouchPoints>1?k.prototype.pZ:k.prototype.uaa:h("linux")||h("x11")?k.prototype.zsa:k.prototype.vaa;k.prototype.browser=k.prototype.Ub=h("ipad")||h("iphone")||h("ipod")||h("macintosh")&&navigator.maxTouchPoints>1?k.prototype.Ii:h("opera")?k.prototype.PY:h("edge")?k.prototype.tK:h("chrome")||h("crmo")?k.prototype.Hp:h("safari")?k.prototype.Ok:h("trident")||h("msie")?k.prototype.dF:!h("compatible")&&
h("mozilla")?k.prototype.Xw:h("android")?k.prototype.OY:k.prototype.f$;k.prototype.browserType=k.prototype.YN=k.prototype.Ub==k.prototype.Ii||k.prototype.Ub==k.prototype.Hp||k.prototype.Ub==k.prototype.OY||k.prototype.Ub==k.prototype.Ok||h("webkit")?k.prototype.WP:k.prototype.Ub==k.prototype.PY||h("opera")?k.prototype.k$:h("trident")||h("msie")?k.prototype.j$:!h("compatible")&&h("mozilla")?k.prototype.i$:k.prototype.l$;k.prototype.browserSubtype=k.prototype.Dc=window.location.hash&&window.location.hash.indexOf("xrapp")>=
0?k.prototype.nu:window.location.hash&&window.location.hash.indexOf("vrapp")>=0?k.prototype.mu:h("picobrowser")?k.prototype.Zw:h("oculusbrowser")?k.prototype.Yw:h("xiaomi")||h("miui")?k.prototype.g$:h("samsungbrowser")&&h("android")?h("mobile vr")?k.prototype.SY:k.prototype.RY:h("ipad")||h("iphone")||h("ipod")?h("crios")?k.prototype.uK:h("fban")||h("fbav")?k.prototype.QY:h("safari")&&h("version")&&!navigator.standalone?k.prototype.UP:k.prototype.VP:h("electron")?k.prototype.kB:h("chrome")&&h("wv")?
k.prototype.vK:h("edg/")?k.prototype.sra:!h("compatible")&&h("mozilla")&&h("mobile vr")?k.prototype.jB:k.prototype.h$;k.prototype.browserVersion=k.prototype.RGa=function(){if(k.prototype.Ub==k.prototype.dF){var d=b.match(RegExp("MSIE ([0-9]{1,}[.0-9]{0,})"));if(d!=null)return parseFloat(d[1]);d=b.match(RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})"));if(d!=null)return parseFloat(d[1])}return k.prototype.m$}();k.prototype.device=k.prototype.yk=h("ipad")||h("macintosh")&&navigator.maxTouchPoints>1?k.prototype.ZP:
h("iphone")?k.prototype.UY:h("ipod")?k.prototype.q$:g("picog2")?k.prototype.VY:g("piconeo2")?k.prototype.WY:g("piconeo3")?k.prototype.dQ:g("vivefocus")?k.prototype.YY:g("oculusquest3")?k.prototype.$P:g("oculusquest2")?k.prototype.zK:g("oculusquest")?k.prototype.zK:k.prototype.Dc==k.prototype.Zw&&h("pico 4 ultra")?k.prototype.bQ:k.prototype.Dc==k.prototype.nu&&h("picoa9210")?k.prototype.bQ:k.prototype.Dc==k.prototype.Zw&&h("pico 4")?k.prototype.aQ:k.prototype.Dc==k.prototype.nu&&h("picoa8110")?k.prototype.aQ:
k.prototype.Dc==k.prototype.Zw&&h("pico g3")?k.prototype.cQ:k.prototype.Dc==k.prototype.nu&&h("picoa7q10")?k.prototype.cQ:k.prototype.Dc==k.prototype.nu&&h("pico neo 3")?k.prototype.dQ:k.prototype.Dc==k.prototype.Yw&&(h("quest 3")||h("quest pro"))?k.prototype.$P:k.prototype.Dc==k.prototype.Yw&&h("quest 2")?k.prototype.zK:k.prototype.r$;a:{switch(k.prototype.Md){case k.prototype.taa:case k.prototype.pZ:case k.prototype.xaa:case k.prototype.waa:var c=!0;break a}c=!1}k.prototype.mobile=k.prototype.mobile=
c;e.PlayerAPI=e.qb=new k;l.prototype.append=l.prototype.append=function(d,f,m){d==l.SCRIPT_URL&&(typeof m=="undefined"&&(m=f,f="default"),f=[f,m]);n(this.tj[d])||(this.tj[d]=[]);this.tj[d].push(f)};l.prototype.set=l.prototype.set=function(d,f){this.tj[d]=f};l.prototype.get=l.prototype.get=function(d){return this.tj[d]};l.SCRIPT_URL=l.SCRIPT_URL="ScriptURL";l.SCRIPT_DATA=l.SCRIPT_DATA="ScriptData";l.FLASH_EXPRESS_INSTALLER_URL=l.FLASH_EXPRESS_INSTALLER_URL="FlashExpressInstallerURL";l.FLASH_AUDIO_PLAYER_URL=
l.FLASH_AUDIO_PLAYER_URL="FlashAudioPlayerURL";l.FLASH_VIDEO_PLAYER_URL=l.FLASH_VIDEO_PLAYER_URL="FlashVideoPlayerURL";l.FLASH_PANORAMA_PLAYER_URL=l.FLASH_PANORAMA_PLAYER_URL="FlashPanoramaPlayerURL";l.GS_URL=l.GS_URL="GSURL";l.THREE_JS_WEBGL_URL=l.THREE_JS_WEBGL_URL="ThreeJSWebGLURL";l.WEBVR_POLYFILL_URL=l.WEBVR_POLYFILL_URL="WebVRPolyfillURL";l.WEBXR_POLYFILL_URL=l.WEBXR_POLYFILL_URL="WebXRPolyfillURL";l.WEBXR_INPUT_PROFILES_DIR_URL=l.JB="WebXRInputProfilesDirURL";l.CAPTURA_VIEWER_URL=l.CAPTURA_VIEWER_URL=
"CapturaViewerURL";l.DASH_URL=l.DASH_URL="DashURL";l.HLS_URL=l.HLS_URL="HlsURL";l.BASIS_URL=l.e$="BasisURL";l.DRACO_URL=l.v$="DRACOURL";l.CONTAINER=l.CONTAINER="Container";l.SELECTED_SCRIPT_URL=l.SELECTED_SCRIPT_URL="SelectedScriptURL";l.BASE_DIR_URL=l.BASE_DIR_URL="BaseDirURL";l.QUERY_STRING_PARAMETERS=l.QUERY_STRING_PARAMETERS="QueryStringParameters";l.CURSORS_DIR_URL=l.CURSORS_DIR_URL="CursorsDirURL";l.BACKGROUND_PRELOAD_ENABLED=l.BACKGROUND_PRELOAD_ENABLED="BackgroundPreloadEnabled";l.ACTIVE_VIDEO_ELEMENT=
l.ACTIVE_VIDEO_ELEMENT="ActiveVideoElement";l.SERVICE_WORKER_URL=l.SERVICE_WORKER_URL="ServiceWorkerURL";l.PINCH_TO_ZOOM_ENABLED=l.zTa="PinchToZoomEnabled";l.DOWNLOAD_DISABLED=l.ZY="DownloadDisabled";e.PlayerSettings=e.PlayerSettings=l;e.PlayerEvent=e.tZ=function(d,f,m,p){this.name=d;this.data=this.originalEvent=f;this.sourceClassName=m[m.length-1];this.sourceClassPath=m;this.sourceId=p};a.prototype.Dib=function(d){this.mv=d};a.prototype["delete"]=function(){this.mv&&(this.mv.clear(),this.mv=null)};
a.prototype.getById=a.prototype.MD=function(d){return this.mv?this.mv.mdb(d):null};a.prototype.getByClassName=a.prototype.Bi=function(d){return this.mv?this.mv.Bi(d):[]};a.prototype.createInstance=a.prototype.yi=function(d){return this.mv.yi(d)};a.prototype.disposeInstance=a.prototype.Yv=function(d){return this.mv.Yv(d)};a.prototype.bind=a.prototype.bind=function(d,f,m,p){var q=d.split(":");d=q[0];q=q.length>1?q[1]:"*";this.cd[d]=this.cd[d]||{};this.cd[d][q]=this.cd[d][q]||[];this.cd[d][q].push({handler:f,
context:m,immediate:p});return this};a.prototype.unbind=a.prototype.h=function(d,f,m,p){var q=d.split(":");d=q[0];q=q.length>1?q[1]:"*";if(d in this.cd&&q in this.cd[d]){for(var r=[],t=this.cd[d][q],u=0;u<t.length;u++){var v=t[u];v.handler==f&&v.context==m&&v.immediate==p||r.push(v)}this.cd[d][q]=r}};a.prototype.bindOnObject=function(d,f,m,p,q){return this.bind(f+":"+this.mea(d),m,p,q)};a.prototype.unbindOnObject=function(d,f,m,p,q){return this.h(f+":"+this.mea(d),m,p,q)};a.prototype.bindOnObjectsOf=
function(d,f,m,p,q){return this.bind(f+":"+this.bea(d),m,p,q)};a.prototype.unbindOnObjectsOf=function(d,f,m,p,q){return this.h(f+":"+this.bea(d),m,p,q)};a.prototype.cookiesEnabled=a.prototype.Kab=!1;a.DEFAULT_PANORAMA_HFOV=a.gSa=k.prototype.mobile?90:110;a.prototype.m=function(d){if(d.name in this.cd){this.WB(d,!0);var f=this;setTimeout(function(){f.WB(d,!1)},0)}};a.prototype.WB=function(d,f){f=this.t_a(d,f);for(var m=0;m<f.length;m++)try{f[m].handler.call(f[m].context||window,d)}catch(p){console.log("Exception handling event "+
(d&&d.name),p.message,p.stack)}};a.prototype.t_a=function(d,f){var m=[];if(d.name in this.cd){for(var p=[],q=0;q<d.sourceClassPath.length;q++)p.push(this.bea(d.sourceClassPath[q]));d.sourceId&&p.push(this.mea(d.sourceId));p.push("*");d=this.cd[d.name];for(q=0;q<p.length;q++)for(var r=d[p[q]]||[],t=0;t<r.length;t++)!!r[t].immediate==!!f&&m.push(r[t])}return m};a.prototype.mea=function(d){return"instance("+d+")"};a.prototype.bea=function(d){return"className("+d+")"};e.Player=e.Jsa=a})();
var O=this&&this.Amb||function(){function a(l,k){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,g){n.__proto__=g}||function(n,g){for(var h in g)Object.prototype.hasOwnProperty.call(g,h)&&(n[h]=g[h])};return a(l,k)}return function(l,k){function n(){this.constructor=l}if(typeof k!=="function"&&k!==null)throw new TypeError("Class extends value "+String(k)+" is not a constructor or null");a(l,k);l.prototype=k===null?Object.create(k):(n.prototype=k.prototype,new n)}}();
define("tdv/utils",["require","exports"],function(){function a(p,q){function r(){}r.prototype=q.prototype;p.prototype=new r;p.prototype.constructor=p}function l(p,q){q.forEach(function(r){Object.getOwnPropertyNames(r).forEach(function(t){p.prototype[t]=r[t]})})}function k(p){setTimeout(function(){try{p()}catch(q){g("Deferred callback failed",q)}},1)}function n(p){if(p!=c){c=p;try{if(b){var q=document.createElement("div");q.innerText=p;b.insertBefore(q,b.childNodes[0]||null)}else console.log(p)}catch(r){}}}
function g(p,q){var r=[];r.push("Exception: "+p);q.message?(r.push(q.message),r.push(q.stack)):r.push(q);n(r.join("\n"))}function h(p){var q="[object "+p+"]";return function(r){return Object.prototype.toString.call(r)===q}}function e(p){var q=[];p.forEach(function(r){q.includes(r)||q.push(r)});return q}var b,c,d=h("String"),f=h("Function"),m=h("Number");return{f5:l,xbb:function(p){for(;;){var q=p.pop();if(!q)break;if(q==p.length)break;p.splice(q,1)}q=[];for(var r=0;r<256;r+=1)q[r]=String.fromCharCode(r);
var t=256,u=String.fromCharCode(p[0]),v=u;for(r=1;r<p.length;r+=1){var w=p[r];w=q[w]?q[w]:u+u.charAt(0);v+=w;q[t++]=u+w.charAt(0);u=w}return JSON.parse(v)},defer:k,cnb:function(p,q){return function(){var r=arguments;k(function(){p.apply(q||window,r)})}},extend:function(p){for(var q=[],r=1;r<arguments.length;r++)q[r-1]=arguments[r];r=q[q.length-1];q=q.slice(0,-1);a(r,p);l(r,q);return r},Qbb:function(p){b=document.createElement("div");b.style.overflow="auto";b.style.position="absolute";b.style.bottom=
"0";b.style.left="0";b.style.right="0";b.style.padding="20px";b.style.fontFamily="Verdana";b.style.backgroundColor="#FFFFFF";b.style.color="#000000";b.style.zIndex="100";p?b.style.top="0":(b.style.width="40%",b.style.right="0",b.style.left="auto",b.style.height="50%",b.style.filter="alpha(opacity=60)",b.style.opacity="0.6");document.body.appendChild(b);console.log=function(q){n(q)}},log:n,PW:g,ar:function(p,q){var r=!1;return function(){r||(r=!0,k(function(){r=!1;p.apply(q||window)}))}},Igb:function(p){for(var q=
[],r=0;r<p;r++)q.push(Math.floor(Math.random()*16).toString(16));return q.join("")},toArray:function(p){return p===void 0||p===null?[]:Array.isArray(p)?p:[p]},geb:function(p,q){if(p.length!=q.length)return!1;for(var r=0;r<p.length;r++)if(p[r]!=q[r])return!1;return!0},QKa:f,qA:d,TKa:m,Bna:function(p){return(p===null||p===void 0?void 0:p.constructor)===Object},tna:function(p,q){if(p.length!==q.length)return!1;for(var r=0;r<p.length;r++)if(p[r]!==q[r])return!1;return!0},difference:function(p,q){return p.filter(function(r){return!q.includes(r)})},
intersection:function(p,q){return p.filter(function(r){return q.includes(r)})},union:function(p,q){return p.concat(q.filter(function(r){return!p.includes(r)}))},unique:e,Bnb:e,Fqa:function(p,q,r){function t(){var A=Date.now();z||r.hfb!==!1||(z=A);var D=q-(A-z);w=this;y=arguments;D<=0||D>q?(v&&(clearTimeout(v),v=null),z=A,x=p.apply(w,y),v||(w=y=null)):v||r.Anb===!1||(v=setTimeout(u,D));return x}function u(){z=r.hfb===!1?0:Date.now();v=null;x=p.apply(w,y);v||(w=y=null)}var v,w,y,x,z=0;r||(r={});t.cancel=
function(){v&&clearTimeout(v);z=0;v=w=y=null};return t},Mma:function(p,q,r){var t=new XMLHttpRequest;t.responseType="json";t.open("GET",p,!0);t.onload=function(){q(t.response)};t.onerror=function(){r(t.statusText)};t.send(null)},Tbb:function(p,q,r){var t=new XMLHttpRequest;t.open("GET",p,!1);t.onreadystatechange=function(){if(t.readyState===4)if(t.status===200){var u=t.responseText,v=document.createElement("script");v.textContent=u;document.head.appendChild(v);document.head.removeChild(v);q(u)}else r(t.statusText)};
t.onerror=function(){r("Network Error")};t.send()},Ddb:function(p){var q=document.createElement("script");q.textContent=p;document.head.appendChild(q);document.head.removeChild(q)},offset:function(p){p=p.getBoundingClientRect();return{left:p.left+window.scrollX,top:p.top+window.scrollY}},Mbb:function(p){document.readyState==="complete"||document.readyState==="interactive"?setTimeout(p,1):document.addEventListener("DOMContentLoaded",p)}}});
define("tdv/constants/EventName",["require","exports"],function(){return{N:function(a){return a+"_change"},lf:"default",Ra:"mouseDown",fb:"mouseMove",ab:"mouseUp",Rk:"mouseWheel",la:"click",di:"doubleClick",tc:"rollOver",Eb:"rollOut",EF:"mouseEnter",Jr:"mouseLeave",Lm:"pointerOver",emb:"pointerOut",vu:"pointerDown",EB:"pointerUp",Uf:"pointerClick",BSa:"focusIn",CSa:"focusOut",sB:"gestureStart",iaa:"gestureChange",BK:"gestureEnd",MSa:"gestureRotate",CK:"gestureScale",xc:"progress",nB:"close",OPEN:"open",
Qr:"select",Zb:"resize",TY:"changing",V:"change",$e:"stateChange",zl:"cueChange",IF:"preloaded",ia:"loaded",ad:"loadingError",Np:"start",Dg:"stop",tx:"play",MK:"pause",NY:"beforeFrame",me:"frame",ud:"ready",TSa:"instanceCreation",vr:"begin",Sb:"end",Slb:"cancel",Sk:"press",Nm:"release",Or:"repeatEnd",Pr:"scroll",fsa:"movementChange",Rlb:"beforeShow",YRa:"beforeHide",INIT:"init",od:"show",jd:"hide",nQ:"showEnd",EK:"hideEnd",USa:"loadingScript",CTa:"processingScript",AK:"enableCookies",VRa:"applicationSet",
PF:"userInteraction",gta:"userInteractionStart",fta:"userInteractionEnd",Maa:"transitionEnd",VTa:"toolTipShow",Wsa:"toolTipHide",Mm:"positionSet",Qsa:"sizeSet",wra:"controllerConnected",xra:"controllerDisconnected"}});define("tdv/events/Event",["require","exports"],function(){return function(){return function(a,l){l===void 0&&(l=void 0);this.name=a;this.data=l;this.source=void 0}}()});
define("tdv/player/script/definitions",["require"],function(){return[123,34,70,97,100,101,73,110,69,102,102,101,99,116,34,58,32,256,112,114,111,112,101,114,116,105,101,115,270,272,125,44,32,34,112,97,114,101,110,269,271,34,264,266,268,34,286,288,77,111,260,108,51,68,68,105,115,112,108,97,121,298,267,295,272,289,291,293,319,34,66,97,115,101,79,98,106,318,301,287,34,80,104,111,116,111,65,108,98,117,109,80,314,121,76,311,116,73,116,101,109,284,273,275,277,279,281,283,271,256,109,101,100,105,97,357,34,
116,121,277,284,336,338,340,342,344,356,302,289,348,278,371,373,375,296,337,339,341,343,345,347,315,386,125,383,290,292,294,376,396,349,351,353,355,334,288,396,110,101,304,306,308,330,332,300,364,289,359,278,280,282,371,293,99,305,105,110,103,371,260,102,97,117,108,324,115,114,103,98,34,335,388,101,376,293,345,91,108,431,101,291,287,441,443,93,410,34,117,112,89,387,374,448,296,110,345,98,398,335,260,112,116,104,84,282,319,256,435,437,439,284,116,114,117,101,446,467,376,98,111,111,108,461,104,101,
105,103,104,481,372,492,469,471,473,288,119,105,100,477,466,389,288,470,109,472,114,461,463,90,515,468,517,508,521,383,463,88,525,376,518,520,461,99,327,116,83,104,259,111,119,533,296,494,496,461,97,116,116,97,99,478,111,80,322,403,421,483,438,319,436,108,328,491,516,34,548,497,383,110,111,114,109,97,108,532,421,447,534,528,461,574,576,578,465,581,506,527,519,509,34,586,577,108,524,590,569,535,594,115,512,526,482,101,436,563,376,102,275,403,568,526,34,450,109,91,100,111,117,98,108,490,32,612,111,
294,287,98,554,107,460,399,335,401,323,376,69,120,354,114,110,578,415,101,307,68,418,333,383,81,117,259,72,339,312,339,558,586,97,577,79,118,278,348,77,97,112,371,274,276,424,362,357,400,559,324,654,656,658,112,660,97,662,664,666,114,348,73,577,103,101,326,328,461,86,605,111,51,54,48,82,282,622,114,99,606,422,674,361,426,421,115,623,280,116,625,115,85,82,76,546,288,115,487,431,433,335,311,85,690,486,488,101,383,625,666,566,725,34,291,114,315,91,699,260,701,703,705,115,707,709,76,101,740,635,335,103,
97,431,434,608,484,319,49,615,583,593,529,335,542,115,65,117,368,111,764,609,485,271,487,489,769,547,495,572,678,402,324,748,101,750,704,706,117,708,101,756,740,461,405,632,99,107,326,521,421,673,360,425,363,320,632,114,326,806,103,275,117,110,100,67,496,575,310,292,268,105,629,742,618,91,338,114,105,122,629,553,108,287,689,280,538,108,759,726,354,112,541,543,545,600,616,571,461,328,625,268,367,83,850,852,621,854,320,582,787,549,400,348,499,259,818,107,820,622,823,825,108,575,82,551,831,814,256,869,
288,744,746,602,114,848,34,859,318,862,850,87,512,514,855,376,575,91,893,287,360,709,294,895,816,66,575,260,114,884,368,117,887,505,601,584,872,315,874,100,865,544,83,274,455,100,742,893,858,850,915,114,917,919,105,921,936,925,335,727,101,112,876,878,822,824,826,114,828,318,831,110,833,518,835,575,838,840,578,843,675,846,895,897,861,929,864,542,866,79,290,99,105,373,946,771,858,648,898,975,950,940,917,83,838,710,889,595,947,726,987,974,863,950,930,119,657,837,839,294,578,756,432,903,868,591,997,985,
383,973,354,989,951,633,953,880,956,884,280,111,922,996,891,121,907,528,895,100,798,885,832,904,507,1017,637,873,934,1004,979,554,982,121,984,536,1018,976,853,932,292,259,1052,603,1055,866,86,970,1010,293,103,1013,888,1015,937,1054,950,1048,981,983,1041,592,1053,1044,927,934,991,278,943,945,1078,1016,1080,288,313,1082,259,1004,881,575,742,429,882,772,999,860,1020,1002,851,977,544,66,108,798,1086,1030,1071,998,570,291,1084,114,1096,809,1014,569,1099,1097,926,121,928,1004,1064,361,846,1011,1068,104,
1060,1101,896,1E3,1104,939,916,278,1120,1098,956,938,1003,1107,1005,965,1008,841,1133,1069,923,616,1072,335,816,1075,1050,1136,461,1092,1127,1046,1149,1006,966,1009,108,1154,1135,1088,1158,849,950,901,513,1174,1122,616,906,908,32,910,323,895,1165,928,1118,1144,1088,1124,1137,1190,934,1179,1155,996,1184,528,909,278,911,116,913,1117,1142,114,993,122,995,1114,1043,288,914,1023,821,1025,1100,1027,886,742,1032,1034,771,1189,1045,875,1210,1212,1214,924,1216,1138,1103,899,950,1163,1073,1106,853,1193,1182,
376,1195,986,1238,1021,952,1220,955,1100,742,906,1226,1195,93,287,1259,461,1218,819,1253,1245,1070,569,1257,114,745,1033,1259,1261,956,972,939,1219,879,1254,1097,1088,1270,1272,91,1274,32,1262,1126,1128,1149,742,857,1290,934,72,500,502,504,1201,114,1227,520,1204,799,912,1147,1022,1265,1280,1120,1223,1029,1225,1271,892,1035,1308,1297,501,503,1256,1302,1185,1187,1307,1018,1139,1239,951,1210,1112,1241,948,1329,1251,1279,954,1120,958,830,1040,1246,296,834,836,1170,841,969,1131,578,1277,1148,853,1109,
1111,259,944,1113,1235,1090,896,1062,544,1161,1077,1344,1079,603,1336,1105,1004,1057,934,1334,1091,1230,100,1366,1051,1175,1115,1197,1094,1149,1356,918,1358,1087,1368,1089,1370,1250,1105,1320,1299,1323,1303,278,1305,1206,1229,1093,100,1252,1311,956,1341,1028,961,1088,1346,1151,967,842,32,844,105,971,1308,1192,1146,1194,1146,1242,1118,1233,1376,1237,988,1372,1149,1267,1156,1247,1425,1081,1166,875,1338,1221,1282,1391,1284,746,1287,1289,948,850,1360,1157,1115,1019,1330,1129,1065,1172,1067,1200,1215,
1362,684,604,1410,1429,1454,1021,1380,1241,790,639,296,85,73,825,109,684,413,403,383,793,795,752,754,800,757,648,672,423,713,887,1471,560,288,1482,1484,798,755,1487,572,335,405,350,727,408,356,421,1487,294,922,727,276,371,311,68,608,278,292,935,783,736,1054,291,504,1515,1517,1271,367,735,489,383,472,103,763,421,1526,266,1528,1520,32,784,737,335,293,1540,256,1537,1518,1529,1521,1531,1493,324,696,329,331,333,637,1490,813,371,366,368,370,1088,77,367,369,938,551,1234,616,834,1512,112,277,100,457,553,
361,432,909,348,729,1579,276,112,729,895,314,472,497,1088,727,837,432,301,636,288,932,499,292,647,649,651,420,320,811,675,714,320,1248,561,765,610,296,35,265,1619,102,445,288,996,1248,383,745,920,922,562,782,32,53,786,1369,1137,577,120,1333,1382,1236,475,477,479,727,63,780,766,1530,626,1435,870,1501,288,109,431,1639,1391,1072,1553,640,642,278,645,108,1604,417,1557,300,383,692,97,694,412,414,305,648,1666,419,504,1609,1491,1514,693,1572,376,1670,694,1497,799,461,428,430,1597,1614,781,440,442,444,1634,
617,963,453,413,456,32,458,98,635,1659,390,314,413,1665,650,1667,269,653,655,100,657,116,659,116,661,575,663,97,665,667,315,1489,712,1561,364,1709,288,1720,1722,1724,745,688,1729,1051,1717,682,1721,684,1723,686,1725,1741,690,315,1686,695,327,710,1509,1721,371,104,605,1514,115,1516,1538,1519,1648,1018,338,867,1547,1764,1527,1767,1551,737,1735,325,1756,1606,269,1559,1732,676,421,276,1049,1367,607,1695,284,768,1623,1461,594,368,727,686,709,1429,105,1683,742,1754,1688,1800,1126,805,107,80,1029,982,960,
1451,376,1226,681,100,1739,1726,1728,1752,121,804,633,1811,1464,960,895,1418,709,1815,296,1226,1820,577,1811,431,1207,1598,383,84,104,471,645,105,1172,351,427,666,1510,371,555,686,694,1763,1765,1549,1540,1542,1599,321,791,376,1474,1476,1478,639,1783,812,1785,320,275,108,108,1822,1506,558,100,368,432,84,1513,1640,1362,982,355,76,97,1592,70,840,87,1298,1322,1412,963,494,108,1578,32,1899,917,287,453,1299,1400,32,49,48,48,287,50,1911,287,51,1915,32,52,1918,53,1918,703,1912,32,55,1918,56,1918,57,1918,
596,1352,461,1887,346,259,1881,103,1883,671,1885,1393,988,1506,1406,1339,1026,1039,1833,890,1316,1033,893,895,1874,1876,689,1506,1889,1592,479,642,1047,980,1162,1943,1137,1936,1961,648,1963,540,1149,1130,845,1066,1012,1181,1268,1452,1236,1957,1877,354,109,1118,756,102,116,1656,1981,770,1362,1984,1959,1986,1118,915,552,111,109,82,1321,1991,1389,1951,1392,1137,348,622,1300,1015,834,1831,968,32,1347,1152,1934,383,1936,1118,2004,1299,1434,1624,1437,1102,1945,1998,1210,2E3,340,2003,2005,1992,1650,1635,
461,1996,278,1960,1890,1972,101,1964,1433,1423,1391,1625,1335,1250,1506,1843,1845,762,108,1965,1788,1381,1657,1453,1336,1946,1210,1941,2038,996,1176,1430,974,2066,941,1085,2005,2027,1015,2052,288,2042,114,2074,942,2005,1428,1968,1935,1986,1004,1293,788,2041,496,1958,2043,1998,1441,1281,1121,1993,296,1445,1273,1276,1275,1100,1956,2095,1985,355,1118,1941,2087,2063,1236,1970,2045,108,1973,2060,1076,2062,2102,2040,2022,1986,1879,1939,2025,1896,2116,1362,1467,2055,1844,519,1846,2059,1975,1457,1173,1429,
2082,2084,278,1941,1989,2006,1628,1466,2065,1986,1971,2120,2047,1974,853,1469,2088,1626,2110,1997,2112,1210,2149,2078,1123,2029,2072,1020,1878,1938,729,2149,1801,2032,2075,114,2114,994,2177,2112,2099,2168,1183,1302,1258,2106,1288,1276,2089,2165,2179,2034,2002,2186,1436,1255,1328,2054,2178,917,221,2068,2037,2007,2183,1987,2166,608,116,2198,296,2080,34,1936,2056,2138,2058,669,120,1396,2132,2125,2009,858,99,1957,808,2160,2133,603,2228,2095,808,1199,1980,2039,2226,2201,2031,355,2129,729,2196,1507,2232,
1969,2203,278,2246,2115,2225,2071,2135,2098,1310,1948,1100,1409,960,962,451,2019,1415,1350,1977,847,1164,348,1504,2013,569,1503,1849,2127,355,2218,98,2139,2223,2273,1982,1886,1986,2279,2139,1004,1169,2020,1458,1979,2144,2163,2097,2194,917,2149,2253,2239,2071,2023,1332,2086,2182,2161,2053,2242,2209,2179,2131,540,2306,2248,2193,1937,1880,2245,339,2035,2152,2202,2278,2137,2280,2058,1422,1255,1424,2200,731,2250,918,2206,2151,2307,2030,2073,2333,2213,288,2215,2118,1962,2157,2289,1414,1171,2143,2337,2171,
367,2136,2057,1847,1373,933,1059,2351,2145,2333,2300,2070,2064,2323,1987,2099,2231,2254,1115,2303,2195,2320,2002,2069,1795,2249,1888,2119,1827,1813,1343,2225,834,625,1990,287,340,112,287,837,1299,631,2374,109,972,2153,2324,2355,2140,853,2290,1415,2350,2315,2241,2339,355,2369,2301,2365,2309,1999,2395,2341,34,2343,2333,1941,2416,2215,2361,2399,2219,2356,1292,1088,1294,2332,355,1976,1419,578,342,501,1411,1391,834,494,2001,109,287,1654,1880,625,2388,276,2109,1875,2111,2310,917,2252,2314,2370,1236,115,
2234,1875,808,2403,1171,669,442,1535,2406,2430,109,2287,2058,2091,2428,2093,2277,2367,2258,823,2410,2364,2457,2398,109,2155,1892,294,2363,1015,1202,771,457,994,460,731,115,2115,1861,335,2423,2469,2325,2139,2479,2377,2094,2450,2164,2483,2119,2121,1168,2348,1153,1459,2238,2480,1362,1761,260,83,2459,108,66,117,2001,110,2008,2429,288,2372,2204,276,2149,2376,1361,594,2344,648,70,822,1342,2437,2225,42,2316,2470,1847,1427,2455,2411,2481,2366,2546,1876,1966,1789,2550,2285,2379,2345,2048,1244,2050,2225,2422,
2295,2083,2154,2119,2485,2212,2563,2239,2215,2016,108,2435,103,2542,2239,2439,2395,2443,512,100,2446,1541,2448,1249,2413,2067,2532,2211,2534,2284,2536,2340,2572,2028,2331,2529,2568,1592,2462,841,2577,2579,996,834,1206,1908,2386,116,2391,2005,895,2217,2501,2327,1332,2207,2351,2537,108,71,670,1466,2521,808,699,604,624,1684,1345,963,2082,287,578,119,315,115,2449,2096,2567,2297,1143,2598,2079,2170,2499,1947,1442,1388,1028,2008,1226,1955,2505,2643,2044,1891,1893,1895,2283,449,1898,496,1901,1903,2611,2005,
1908,1910,1925,1914,1925,1917,1925,1920,1925,1922,1925,1924,287,1927,1925,1929,1925,1931,1925,1933,2269,2162,2506,2296,2476,877,1266,1408,105,829,1465,1897,2264,2512,2017,2575,2616,2333,2246,2312,2594,1994,594,2499,2503,2535,2378,2508,2661,2486,373,625,2263,619,982,578,1419,287,2691,2708,2424,2326,2426,2159,2555,2124,2557,2714,2566,2173,2318,432,2246,2208,2553,2716,2595,2718,2553,2237,2322,2309,2553,1095,2647,2169,2600,34,2650,2620,2336,2467,2338,2172,2128,2174,1882,1884,2763,2352,100,2660,2538,840,
2421,2170,344,2525,2520,1957,85,1942,1444,2188,1953,91,906,1555,2523,2525,287,73,429,110,2790,340,110,93,1260,32,2788,1756,2796,629,2792,2794,2804,2798,2397,2366,2472,1391,2528,2216,2257,2697,1407,1222,1950,1315,1285,2657,2475,1988,2211,2487,2717,461,553,98,262,260,120,1429,2265,1171,2606,2724,1286,323,2611,2211,2614,1299,972,2628,291,2776,2758,2617,2400,2520,578,1674,260,2839,574,413,287,102,1847,1416,2861,116,95,431,604,260,2860,982,95,2012,2868,626,2864,95,340,95,511,1180,2870,2865,2878,499,2615,
2589,2408,2452,2251,2395,2827,2748,2887,2765,2645,114,2167,2756,616,2418,2896,2205,1299,2712,1042,1995,2740,2090,2427,2813,2474,2468,2024,2621,2770,2499,2754,1386,1110,1388,2762,2456,2134,2482,2414,2441,2533,2915,2923,2739,2694,2644,2889,817,2415,2899,2199,1125,2913,2591,112,2905,2126,2468,2155,1973,1516,429,745,2702,2438,963,954,667,454,287,111,689,1702,626,2960,45,477,821,502,2729,629,101,913,2524,2797,2780,2095,2312,1398,1226,2802,328,2808,2806,629,2808,2799,2957,1302,2789,2971,2805,32,2793,2982,
2988,2809,461,761,2783,2930,1137,2499,2244,432,2176,2360,2908,2559,2046,2561,1063,2142,2514,2752,2888,2553,2548,1213,2627,2229,291,2464,1534,2607,2504,2693,2659,2602,2774,2721,121,2723,2703,2725,841,2728,32,2730,2545,2618,2734,3009,1351,2292,1134,3012,2895,2719,3007,2158,866,1387,2943,2240,2468,647,1646,1616,517,575,597,1622,2580,963,2691,2388,3038,108,45,629,108,121,1905,2119,3067,110,3069,2731,2696,1024,2100,2261,2383,3061,2704,1007,2266,1417,1457,3076,2918,2562,2329,2051,2170,2256,3006,2156,3008,
544,2604,1978,3043,2351,3094,3077,2698,3091,2225,2104,1286,2190,1448,2601,2732,2139,2328,1443,2564,2649,3005,2934,2420,2937,2214,3118,2932,2146,2180,276,3051,2071,2760,2311,2335,1359,3017,2235,291,2432,846,3020,2466,2998,2658,2451,3001,103,2975,3102,2925,2210,1990,3129,1115,2917,3065,2357,1058,1546,2738,2999,3119,3014,1232,2549,2516,2931,3025,3095,2510,1355,2920,3152,2551,2590,2311,2929,3159,3143,2507,3089,978,2736,2208,2484,840,2892,905,1324,1203,1705,2492,3060,311,2496,1522,2498,3119,2926,2035,
3172,2558,109,2747,2713,3160,3125,2286,3065,3115,2101,2573,3093,3149,2179,2299,3164,3023,2468,2553,2221,2751,3148,2366,2024,3133,1390,3142,2824,3163,3016,2351,2794,354,294,1048,113,489,2092,871,2308,2888,3184,294,1894,2005,2839,1903,2394,1900,2670,1907,114,287,2673,1913,1918,2677,287,2679,287,2681,287,2683,1926,1928,1930,1932,3058,2021,2945,2569,840,258,1654,3069,742,1595,729,3178,2695,3224,2026,3122,2342,2170,2623,3169,3049,3171,3176,3165,1137,2778,2972,2521,3003,2784,91,2977,2986,2803,2993,2981,
2795,2993,2984,2801,3300,2979,3302,2990,2807,3305,2810,3174,2531,851,3216,2828,2407,3045,2113,276,2849,2939,2764,2353,3026,3096,3048,544,3324,3205,3167,2500,2852,2511,3084,2349,3011,3222,2309,3242,540,2722,2633,288,834,2726,453,99,2967,587,2692,3240,3045,2946,2157,2948,1725,2951,2384,2953,823,2955,2859,2801,2959,2956,32,2962,2964,622,2966,3035,2968,3314,2888,3145,3147,2770,3103,3180,544,3238,1652,2771,2354,2425,2401,3288,1357,2922,3177,2475,3343,3332,2316,3099,2576,1906,3022,569,2609,2841,3252,3370,
2843,32,2392,503,2642,2451,3357,642,3359,2950,2262,3031,214,91,2954,690,3369,2958,3365,2961,454,2963,104,2965,104,2967,413,3412,2507,3343,3186,2103,3188,2490,3190,1213,2493,2529,2495,2314,2497,1217,2993,2973,1875,68,544,3402,2187,3298,2786,2978,695,3310,2991,3304,2525,3306,3458,2980,3311,2992,3463,3076,3145,3296,3227,2940,2373,2927,2593,3290,3217,3326,2772,3328,3287,544,3138,3100,1460,3319,3196,3206,3113,2471,2141,3041,2405,3473,3112,3335,3389,3156,1375,2622,2333,2928,3393,3291,3279,2933,3383,119,
3397,3024,2451,2651,1379,3182,3341,2888,3198,2375,3478,3488,2081,3197,2033,2395,3504,3134,3502,3491,3039,1108,3289,3505,3479,2759,3524,2179,2903,503,3200,1944,3518,3229,3346,2240,1862,1836,97,67,663,278,1565,1608,1560,1872,123,1778,82,339,1039,1663,3550,366,745,803,378,557,2271,1849,810,3555,1611,1547,1986,2655,2786,391,340,2275,1505,1986,1708,637,679,404,3569,1645,383,825,111,107,362,1811,3350,2737,1680,1733,320,798,1593,1391,3277,1597,2494,733,3601,3447,34,694,111,820,670,1761,99,65,1058,2976,2786,
3603,103,2800,3620,3583,1091,3585,296,1555,1781,461,1737,1747,3548,1822,691,1803,3571,1784,3573,1778,3631,685,687,1727,2959,1753,1683,1555,803,1749,1740,97,1838,1494,358,3638,922,121,97,1771,3394,637,982,555,1470,3584,1864,3627,1780,1715,461,669,112,3580,352,1986,1731,1871,3573,34,1563,1569,1566,2626,1126,386,3683,3673,385,529,1778,3674,1506,698,700,67,3237,1508,1851,1759,421,1533,3141,2216,1773,1766,1550,1541,3195,3347,823,1857,1774,3707,1861,1778,3628,3670,1870,1610,922,1545,84,1802,3545,2255,1580,
116,3723,366,1470,1481,281,119,278,3616,455,3677,3720,371,716,98,718,720,3483,3510,3283,2417,2170,1165,1809,808,80,275,820,282,115,3203,2906,594,109,1675,2120,557,3650,1726,84,745,115,314,1410,68,1038,3361,34,1630,767,3261,1794,3522,384,315,3751,291,2282,1398,1325,1205,1188,858,717,982,720,2755,3106,3211,2758,487,686,1828,629,3054,3419,2632,823,1585,627,259,101,2872,2524,95,436,260,2866,2798,461,118,114,2625,1213,3653,643,72,605,3729,3725,1383,3754,292,115,115,3514,3758,2944,288,1797,496,666,3767,
3799,2382,110,3772,3417,3081,3506,400,3829,3756,3015,3827,1236,3293,629,752,3727,3618,1285,3465,3460,3312,3469,2985,91,2987,2791,3467,3462,2797,2799,1164,3849,3831,808,3514,2416,3108,1447,2192,1018,3791,719,282,2744,1283,3439,1304,1186,3788,1327,1438,3783,2897,105,666,68,745,103,3021,433,2473,3239,1377,3782,633,808,3559,2932,310,312,348,3385,3817,2180,2325,727,1419,107,3559,553,1410,1105,3055,1631,1925,3661,288,2861,114,727,3840,2526,3842,3844,3561,1429,3750,3906,1117,2185,3747,3878,3110,3880,335,
538,941,494,291,1819,111,1839,2646,3795,2599,3325,570,2993,405,558,921,3545,3108,3860,3867,3461,2983,2800,3965,2797,3303,3968,2270,3905,806,2461,1167,3170,3392,3528,2770,3938,3976,3784,1083,3941,3955,2488,2785,1285,3879,2108,3914,3822,278,83,1139,960,1434,3776,376,1618,102,54,1924,3060,3956,1196,348,3893,3472,2239,2489,3888,1326,1840,1808,3939,114,3753,3611,3830,3832,3987,827,2700,959,3846,2014,963,2836,1349,3086,3041,2970,2525,1883,3899,625,83,3882,720,3858,746,3970,2989,3967,3313,3864,3866,3971,
3868,3973,383,102,111,99,921,3736,97,2853,3030,320,4001,271,48,46,1633,3779,2893,3881,114,436,709,705,845,4040,3998,629,4E3,1615,1631,34,4003,1620,4007,2648,2758,3983,807,291,4021,3755,3874,3544,1466,4042,3884,4096,2351,120,918,2095,1429,3854,110,405,4044,1033,4046,110,3972,4049,3307,3865,3301,3966,3862,3870,972,798,4074,101,4076,1419,625,2410,4065,32,4067,54,1699,2255,4098,3832,1210,3511,948,4135,2947,267,3360,3418,2952,451,3421,2960,2957,3368,3366,3371,3429,3373,3431,3375,3433,3974,121,3893,3876,
2699,2701,4144,3362,3083,1348,2706,3087,1263,3449,2389,4109,2787,3308,3459,4118,3468,4120,4050,4117,4052,4048,3469,4158,3893,1297,1385,853,3913,4018,3984,114,4187,929,2049,3988,2757,3957,1797,1165,1883,496,280,112,262,4041,4073,554,101,3997,1103,4164,3775,4082,319,1542,1699,2814,4090,3875,2761,3981,3496,896,4135,3471,2211,4105,2993,65,82,699,101,3660,1301,3456,3859,4175,3466,4183,4179,4115,4051,4047,4119,629,3871,4191,4091,2334,1397,3886,1399,3406,4016,4121,3742,3792,282,2812,2225,2814,97,97,69,645,
2632,3158,4129,4217,4070,493,2912,1091,3873,115,3785,4253,3787,1306,4017,3892,4019,4093,4023,4161,2819,2654,2821,1317,1228,3790,4258,3883,115,4266,1890,625,4269,4215,1648,4218,4274,34,3818,3995,1119,2572,4129,4084,1620,265,4087,4198,1137,716,4208,4075,101,4077,4210,4079,110,4128,4301,271,1793,3927,711,4094,115,4012,4236,4280,1402,4185,4019,3885,3297,4335,3789,3848,4022,3850,3940,2477,2100,1313,3576,2822,1318,383,4306,3952,294,278,3910,553,110,1800,1694,1647,271,50,4133,1453,4226,2767,103,4339,4224,
2157,1662,578,1825,4192,742,4376,4250,4337,4192,4194,2914,3534,3780,4220,3985,259,3221,4340,3189,4256,4381,4250,4194,3834,3052,726,4140,2346,2919,3980,3226,4329,673,4331,3209,1145,2758,4354,3953,114,1822,4081,1791,1617,1911,55,554,99,4314,2900,3749,4276,4384,4223,4405,4010,4338,2368,3516,2770,4373,644,4375,4425,291,4378,4437,4009,3975,4395,3978,866,3399,3495,4329,4102,80,3663,2515,3535,3818,1892,666,3936,4362,3056,3926,3847,3946,3950,3949,941,4307,4358,1799,3852,1462,4440,4397,2071,4387,2935,2179,
3437,3835,4305,4020,4355,643,4211,4028,110,3826,3924,767,2675,4366,2457,4368,2742,1940,2769,4224,4406,4286,4025,2653,1224,1088,2656,4352,4283,4192,4285,3850,4222,4404,4461,3904,4159,4019,4390,3107,3887,1908,4393,4249,2230,4432,4224,3741,3743,4260,3337,4167,3042,3487,4071,4139,4294,720,2625,2997,4329,340,117,555,1822,4060,4062,710,4129,4328,4511,372,745,2526,3770,960,3932,3800,110,932,101,3707,4224,3947,100,4464,3951,4412,4483,2541,4138,4399,4533,282,3745,4446,3340,3982,4440,4426,4510,3535,4524,4259,
4024,4347,4472,3828,4344,3874,4499,3080,3454,2665,4166,2291,2267,2433,3354,4568,4525,115,2570,3273,1847,2737,996,3620,4293,4597,1004,3050,3521,4531,4596,4580,4287,3116,3796,3957,4474,4383,4137,3747,2215,3798,4550,3561,4553,3934,3773,4213,4547,290,3643,1883,1604,3840,3769,3561,3935,3774,4545,1911,4460,4578,4135,4583,1236,4617,3986,4347,1340,4027,2541,2839,4032,4168,4035,4394,3977,4188,3040,2268,4447,4629,4276,4644,1362,4106,86,4232,3733,4173,4111,4113,3863,4243,4181,4245,4178,4247,1403,4513,4506,4437,
4648,3942,3990,1446,3944,3993,383,1797,4359,4361,4064,4326,1909,4490,2134,4135,1456,3494,4573,4523,4135,3485,3400,2436,2839,2389,2583,2445,626,2440,2035,4121,4318,4124,4320,4126,101,100,4415,4363,288,4085,1619,4422,2938,1137,4200,348,4202,439,105,4205,4485,622,555,2780,4557,2526,4190,1783,4407,4346,2817,2259,4026,4163,4029,3403,4031,2705,1416,2707,3872,4585,115,3380,4516,4254,1401,4342,1159,3959,437,697,4253,3299,4116,3309,4177,3869,4678,4180,4769,4182,4246,2994,4520,4388,1719,2663,3786,4392,3890,
4282,1217,625,3805,1882,4549,4554,4637,4628,3535,4622,4791,4627,4748,4610,4225,4569,2495,1149,4664,603,4135,3399,2838,3419,2612,1261,3405,2844,3411,2829,4790,4551,629,4625,1410,4297,4268,4740,4611,4295,3745,4804,4441,4680,107,863,1571,2839,1575,1577,1583,315,3806,290,3962,100,1036,622,2632,67,3350,107,65,4651,4458,4083,340,4039,3809,102,438,566,2228,4738,4725,2634,451,4852,103,625,3812,4856,2458,292,293,3432,2969,4605,4580,3379,3245,3102,4135,2570,4477,34,4014,1908,604,3442,4754,4742,4683,4197,3455,
2189,2108,2107,575,1189,4575,4619,4889,4726,4656,4779,3500,2359,3381,4400,3097,119,4704,4661,3535,4497,4508,2441,4782,3440,4519,4462,3948,111,3950,4307,4565,1410,4486,2351,4911,4586,4475,992,3318,4799,4102,89,3659,4097,4801,2570,4567,3781,4829,4657,1405,4499,4349,4290,1954,4504,4512,4186,1083,4100,3982,4429,4382,4444,1365,4522,4428,4442,3752,4425,4897,4614,4008,4873,4825,4495,4013,4517,4255,4784,1830,3733,3802,4145,619,1704,1798,823,3950,843,894,4965,720,2570,3244,4252,4975,91,3247,1902,2667,3250,
503,2672,1918,4489,32,3257,1919,1921,1923,1918,2685,287,2687,287,2689,3352,597,4257,4597,4879,3345,2839,3349,3034,3036,4778,4928,3954,4963,4088,1125,383,1758,922,118,4973,1675,67,542,432,710,1548,1539,1768,1778,1866,2002,1868,614,1653,4320,338,100,922,1165,677,3584,3962,5049,849,4495,1626,480,1524,677,1862,3723,4299,1805,797,799,801,1488,3637,3678,922,275,3746,822,2664,3759,1137,1099,825,5072,3665,3625,3667,288,5062,753,1498,1486,802,383,83,453,260,79,2524,317,1607,3655,5068,387,779,4809,3408,4708,
3409,2005,2394,2441,3624,1863,1472,288,5094,1716,335,915,120,1713,3629,3698,323,5047,1812,3922,4320,3712,3706,1860,3709,896,994,3997,1525,3705,1859,5037,3666,5109,297,1661,4435,1664,3762,1677,1558,4275,3656,434,3898,761,2632,88,825,294,1874,115,4720,3056,4311,102,4640,48,4860,3284,2758,2960,4515,4214,4416,4695,4272,5074,461,4123,5155,4083,4723,4313,1699,2215,1654,110,5165,4547,2960,4325,5167,4546,3535,5179,4278,2770,100,5147,4298,101,89,5151,487,496,5154,4309,4694,4084,1911,265,1911,5161,3748,2758,
1642,478,480,4487,4302,5169,1217,4304,5191,1671,5148,625,90,5196,5153,5173,324,35,5159,5176,5214,5207,4199,5192,2632,3616,5070,4447,4129,1922,4696,594,2880,1155,4545,5239,4727,950,5242,4694,5186,3780,5179,1516,476,4452,3780,2960,5224,4002,4312,1621,5177,2170,5217,3899,5193,1601,278,4124,3176,5237,5244,498,4781,4850,767,5271,400,5121,960,3897,5218,5193,5212,271,565,567,5229,2814,4884,101,5280,5264,2632,5283,3807,566,1649,996,2814,4123,5184,4721,4641,3319,1862,3641,116,3672,3634,315,3672,3738,1681,
1734,5135,1494,34,5306,5308,3645,121,1754,3648,383,1713,1806,710,3597,3556,289,5278,629,599,4693,5167,5303,4799,1463,3842,580,5334,5302,5276,637,5331,110,589,5341,4459,5343,3523,3921,960,5333,1790,5342,5229,3130,3560,1410,5347,5355,5349,5357,3153,5359,960,79,2179,5294,34,88,89,524,1699,834,5372,90,287,88,90,89,287,89,5380,5383,90,88,287,5387,5382,32,5381,88,895,3600,3276,728,3604,3444,3606,1768,3196,5352,629,5340,5362,3925,5350,34,739,648,1629,4694,91,2800,2239,1226,5325,5063,1499,758,2227,2854,5294,
5249,4799,431,844,5354,5166,4721,5285,5297,1015,2814,5428,424,5361,5431,3056,5433,4303,3903,2216,110,844,5406,5440,1631,5442,5287,4304,4795,4817,110,5448,4129,5336,3204,4815,3799,5455,5439,5458,5409,5454,3561,5430,5465,5364,1017,1778,5419,5084,5064,1500,461,5089,605,262,5111,5312,3598,256,628,2247,4165,619,4810,2587,2390,5103,2393,4991,5106,1598,5315,324,5482,383,70,3770,3633,5320,4379,2381,3774,5328,3679,1787,2123,1429,280,366,1798,1477,1429,3658,4235,3535,1957,3937,4451,5079,5108,5316,3717,1678,
461,5502,551,5306,5504,1742,5322,1756,1850,5119,1760,1762,1536,5132,5036,1776,1769,3384,5542,1858,5544,3708,1552,5498,376,5528,5143,711,5097,1786,4957,5243,5471,1362,4690,4468,2627,5424,5274,1792,5409,4090,5507,1814,4945,91,5531,1748,3643,5309,1824,4953,1810,5345,2616,3636,1391,5083,1485,461,111,265,328,116,5448,4547,5590,102,5592,5439,4547,2885,4987,4224,4653,4705,2578,2839,2610,3406,5490,3410,4785,34,5241,5254,5337,5524,2351,2575,4808,4988,4712,2002,4709,2585,626,2389,2846,2854,4974,5488,91,2861,
1875,2882,3815,2874,5635,2873,605,5635,2878,5614,5641,111,95,5601,503,4871,895,5519,2294,1875,3731,5113,1756,901,823,5547,320,5026,1853,882,4765,320,5035,1775,5551,1543,1217,608,575,101,3824,2856,5548,3713,5126,5552,5080,5136,5196,762,413,521,3719,5313,1612,5663,4176,2797,3753,3756,367,4827,537,5689,2808,4613,4500,1314,4502,2786,2823,3946,5697,3959,4023,367,4408,2330,3957,928,2251,4499,4173,3992,4894,5696,1029,5690,629,3145,4371,4329,5713,817,4431,2061,2835,934,2890,3475,2035,4938,99,5706,2525,3908,
2643,5699,4588,4652,4751,4593,1420,383,4525,5397,1596,433,383,5736,5720,2808,5739,1822,5710,3092,3797,4259,4937,4620,2170,5726,5741,4650,3774,2608,4750,3338,4033,4753,5752,5737,2797,5189,5603,5731,5020,1211,4930,5460,383,5765,4962,3210,4964,5774,5754,2993,5756,689,5699,5716,4687,5718,1532,305,121,3281,503,4880,2071,494,100,5800,5728,5512,2351,5785,3538,3323,5763,2758,4056,339,5732,2085,3282,4898,3123,2758,5753,4774,5722,5708,4942,4888,5022,1269,4685,2105,4892,2191,4688,1159,5799,5723,2395,1429,5816,
643,3519,109,4938,5805,5800,3525,2441,5846,5799,5794,4766,2786,5717,4982,5784,5779,4875,5602,4329,5824,5721,4107,5827,5766,4747,4589,4861,619,5604,5745,3269,3928,495,5843,5715,5854,3991,5796,5857,5705,5790,2525,3461,5777,5725,5859,4369,5724,4547,5842,5818,278,3215,3230,2770,5847,5758,3117,2758,5899,2941,5803,1115,5847,3145,1941,5513,5761,3185,5782,3438,4759,3441,4872,2494,3194,1531,5883,5825,110,3461,5181,3535,5811,2298,2826,5913,4478,5893,5780,2181,5897,4559,5775,629,3461,5851,5806,5860,2224,5862,
5937,4107,4369,4333,3535,5899,4943,2820,5702,4351,4292,5798,5806,5844,5905,1236,4525,4826,4957,5600,5889,4493,5909,5810,5779,3322,3317,5935,4329,3761,100,578,4823,570,5852,3150,2571,5821,5162,3957,5863,5755,2566,5699,4944,5953,4291,520,895,4525,4985,5273,5621,2667,3248,1904,3370,2671,3406,3254,32,4997,4999,3259,1632,5002,1925,5004,32,5006,32,5008,3375,3353,895,5932,5801,2313,5972,4547,5985,5707,5693,1405,4951,4224,5903,4476,5930,4398,2417,5945,5792,5894,5781,6023,3535,6025,2525,5908,4967,5964,3808,
5780,2312,5959,1362,6020,2941,5735,5945,5692,3831,5709,5951,4289,5990,4946,5955,5921,5864,5900,4615,1137,5765,6059,4501,1391,4503,6063,1623,4259,4141,2949,4457,4988,4147,3423,4150,3426,413,3428,3430,5649,5272,6047,5887,4547,4525,4807,3401,2839,5490,5608,4813,5612,6042,5691,4369,4757,5944,5884,2797,5925,3780,5961,4401,3090,5830,4423,5902,5979,5812,112,5940,5848,3214,5929,6040,3780,6052,6121,1990,6119,4227,1990,4105,6116,5819,503,4938,4525,6129,5073,4478,5726,6137,1429,6101,5826,6027,3461,350,413,6108,
4799,6136,4369,5967,2770,6110,4906,4572,2293,3231,5945,4576,2008,2071,6155,3330,4907,3010,6158,2770,6143,2795,5878,3297,4891,4894,4893,5882,5875,5817,5727,4582,5963,4794,5911,3028,4063,5631,5016,3351,6017,5010,2829,6076,6111,3391,2921,4427,6092,4259,5839,4913,5968,6047,6021,4938,5726,4704,5620,5631,5622,2442,32,2444,5625,2447,112,895,6170,6056,328,2772,2794,6054,6106,3855,2740,2794,6147,101,6149,5783,6064,5986,2932,3833,6182,3780,5950,5829,957,5767,4793,4749,4591,3085,5773,6232,5791,6226,4080,5814,
5984,5945,6146,454,6230,5170,4055,5876,6038,4938,115,1770,3278,5568,5284,578,5286,2239,2814,6218,5866,5808,1967,6169,6160,4587,6241,4798,4590,5871,5744,4034,2268,6019,6259,5780,2454,6123,4799,5932,6091,6041,6036,2566,5695,5858,6203,5980,6223,5922,3851,5730,6298,5733,2002,6050,594,5994,3272,663,4601,5749,3278,6258,6179,5988,5952,6072,5703,4947,34,6020,6277,5868,5743,5771,4654,6284,5171,6286,6302,2351,6151,4493,6104,6024,5945,6296,6247,2525,6235,5729,2161,1862,1818,5534,1823,5506,5345,5483,5329,5511,
6274,4224,5514,5056,5517,5618,970,3679,1031,3577,3765,1837,4481,5107,638,5527,3669,5529,383,3548,3563,3552,3910,1165,5572,3081,5509,1492,5553,296,3920,3561,578,6374,745,6376,348,6378,961,383,5368,98,982,350,5861,5661,810,5345,5130,5124,5133,5545,1778,6397,1322,5686,5484,896,1149,1883,625,4549,4692,5407,319,4067,4069,5862,5200,5167,5157,4086,5261,2758,5651,6265,4130,5409,538,727,4261,5449,564,6267,5434,569,5288,1149,2038,4129,56,5409,3953,3933,2556,5561,4329,4728,315,1297,108,360,5294,5451,6269,4304,
5974,4544,5201,2861,120,367,2877,5645,1580,694,1782,5229,834,6463,6465,2878,538,3564,97,2870,6464,100,6466,2877,291,6469,2109,5404,3843,5232,6186,6435,284,6457,5298,4304,1588,116,3664,6429,5459,6257,948,1386,369,5413,5335,5409,6262,853,3672,2300,4129,1920,57,4132,5562,398,1862,4467,4360,101,6373,3551,745,304,666,366,3654,5557,3739,5314,5680,5316,6519,4075,5366,629,6386,6523,97,6525,355,639,383,1011,4598,314,292,6347,3912,5067,6530,320,6428,3982,5617,5898,625,554,1761,1693,5348,5408,6516,3292,6558,
555,729,6534,6461,5335,46,52,5276,3691,6364,3644,1742,3694,749,3548,5538,1852,1508,3711,5676,5125,5402,2342,489,5031,1855,5034,5543,5667,3715,6382,411,6576,3060,6380,1853,489,4350,746,1482,3696,4872,738,495,4536,4129,6493,5435,4304,437,2389,6550,6562,4216,736,5443,789,383,5318,670,5579,5536,5664,5096,6552,256,5619,6095,6429,3680,2584,2723,5375,2666,2441,5624,2586,5627,1935,5585,2225,5587,5085,5589,5591,4320,5457,4694,6500,4478,5596,5598,5294,6655,6034,5647,504,5470,5725,4751,6208,6491,2214,3405,5206,
3404,4356,5609,3408,5611,895,5614,6659,5409,2737,6664,4547,2834,6499,6507,846,2855,6570,4721,6322,2862,6671,3062,2968,2870,5634,627,2871,2867,5640,6698,2865,5639,2869,6702,6482,5643,6706,2884,2663,6367,3626,288,5555,1668,1502,276,463,6549,1730,6551,5687,482,291,107,293,3514,5294,4271,6458,5444,5571,5345,6604,1033,1811,112,6719,6576,5579,6349,4554,5584,1671,3545,6648,1689,4353,311,105,5293,6429,6613,6439,4304,5028,749,742,1496,5420,448,400,6556,4496,6718,112,6569,2294,6487,5430,4547,275,6487,5599,
5521,6536,5456,5518,4934,2351,882,3591,65,2639,121,1883,5674,101,4924,6619,284,2675,6660,3726,4832,6635,4834,1529,6639,451,6798,1901,1165,4838,4764,367,1189,6766,2221,6292,5831,4759,4916,288,2518,101,69,327,6264,6791,296,2960,4438,6800,5489,454,1704,3236,259,3815,287,6829,6481,2012,6832,1718,3815,3810,2613,1288,623,1419,6831,6841,6395,99,6839,1261,6842,6847,431,6848,32,6829,279,6844,6855,6703,2524,6836,1524,6838,6835,6854,117,1839,6857,6866,294,6853,3236,6867,6852,2012,1590,495,4847,6785,6787,5541,
6821,5668,6622,858,1770,6818,604,6561,6417,376,6823,5685,6471,1701,6827,3406,6833,6868,6830,6864,6898,6874,6860,6845,6843,431,6849,6846,6853,4058,6909,6903,6840,6858,6899,6856,6901,655,6856,6913,6836,6873,4112,6865,6867,6918,6923,6839,895,6816,4792,3081,4639,1918,4405,6809,97,120,6256,288,4882,3252,6814,6411,544,6932,2579,6934,6794,1115,104,4056,118,1429,6782,4536,6494,5444,6616,276,6618,4262,2474,5025,3699,922,6816,4266,3158,5666,3714,5127,1798,354,6591,5033,6403,5550,3608,1545,6978,6595,5127,5736,
3918,6982,3707,5433,5546,119,6969,6987,5678,1777,6597,336,6740,5320,3060,366,477,305,1511,4172,6531,4939,5052,321,5051,7006,6816,7008,6262,5659,3557,1862,5266,837,99,3548,70,1740,5327,3572,1511,112,1602,3963,1302,6747,709,287,1482,702,796,5475,709,1353,292,111,7018,7029,91,7031,626,7034,751,6761,6712,5081,6997,3643,7022,3551,3671,450,3693,5118,6583,1873,2110,2524,6993,6588,3536,2932,7064,5545,5705,6986,6586,6404,5295,328,1862,6368,1554,6370,5556,6601,421,6567,1900,402,5574,1567,470,1506,1590,2119,
6313,1597,399,5088,4122,4209,4125,5736,6688,1605,3670,6722,6410,5564,6520,6679,6564,498,4751,6456,6437,6884,4689,5246,5210,1645,6429,6730,6958,789,6996,641,643,1663,5116,3670,5088,1747,6407,504,6399,1608,6401,5123,7072,6979,1522,6406,3245,6409,5329,7105,6416,6668,6430,7108,5277,4791,6489,6689,5441,7112,5452,6959,432,6490,4129,703,5409,260,538,6681,4694,4365,7147,3946,6422,6690,5175,5260,5229,2215,6554,6890,4066,5570,6764,7145,6950,2457,6441,5269,5248,6507,6503,327,7107,4329,6446,1464,7163,5185,7160,
311,1165,6453,6455,6753,7153,6731,3386,6684,6882,7180,2907,6487,5291,5219,7151,5450,7200,7120,537,539,6434,6612,7212,6614,5444,7192,5356,4405,618,98,3565,6685,7166,288,122,7188,4547,6508,866,6510,2549,6512,48,6514,6574,6372,3567,776,778,6351,3639,6996,1567,1564,7243,831,3566,392,6387,3652,6350,7103,5329,4602,3535,7203,4224,839,2002,258,268,6113,5783,3716,7079,6716,1736,683,3642,1750,6577,1823,4060,6582,3700,320,3761,3962,756,97,666,7068,5668,383,7282,328,2782,7287,6989,335,7290,5290,3453,7293,6437,
3512,7063,7136,6983,5920,3523,7067,7303,6972,7305,6035,7071,5665,6594,6988,7300,7295,622,328,4266,643,7287,6596,6532,7078,328,3629,7141,3679,4058,3930,7267,5870,620,4215,287,3612,98,287,5032,1901,3761,666,1036,7195,4729,788,4204,262,1883,4539,104,4737,293,6505,4721,7119,7219,3386,577,6118,4684,3109,1100,44,3348,1683,44,4795,7077,44,686,121,4248,335,3962,72,686,824,798,753,5787,7358,2829,788,3723,6957,1015,4604,7094,335,1818,5533,6998,5535,6646,6529,6723,1778,7392,7273,5577,7275,6627,3647,5537,6393,
114,6395,5307,5141,68,7254,7245,922,431,1813,578,6768,6429,5426,6231,1653,6938,7419,2770,5251,351,5565,2351,621,623,625,4845,3918,4848,4638,5201,5608,6693,451,6098,4156,6608,5473,7411,7413,6544,7091,7257,3679,4056,6185,3545,3348,3033,6189,5018,335,6633,4706,3419,5102,6213,2586,6210,5993,3358,4142,3845,5869,3710,4146,3364,3422,3366,3424,7475,6084,101,6086,4154,6088,6258,294,4600,3275,1594,5398,5751,446,2157,7092,7490,1623,6194,3484,6167,3101,6154,7496,119,4608,4385,4799,5604,6667,5769,451,6097,4812,
5493,4814,7484,116,4986,5943,7508,619,4990,2669,5609,6002,3253,4996,3256,1918,6008,3778,3263,6012,6014,6016,7458,5875,2486,6033,6942,2491,4885,5918,3446,5127,354,4906,6135,7501,6339,7535,5981,7332,5983,1137,7544,6165,6157,7499,3227,5038,1475,5040,2968,1480,335,1781,308,7279,922,882,3808,6970,7314,6994,7076,6713,34,5039,1477,7562,6470,7397,6410,612,3551,6735,7044,1683,5326,5650,6780,2406,1862,5576,7393,5578,6999,7450,6381,7324,376,7594,7403,6999,1669,110,5684,7126,5529,7597,371,829,500,666,6434,7213,
383,111,1715,73,3158,4603,7489,7214,6433,2910,6963,871,7445,416,1714,6371,335,5319,6578,7609,7006,7077,5554,7270,5112,6714,4675,2579,7132,358,3756,7322,5127,292,6558,6629,3704,5549,7304,5669,7311,806,7299,5296,7574,7051,7577,5041,7580,7081,3554,6027,6037,6180,4744,2652,5742,3419,5872,6283,4594,4895,6027,3745,4908,4701,4405,5827,7668,6077,4143,6279,7333,6081,7476,6083,1905,3427,3372,117,3374,2858,6608,7491,7545,6251,1196,5827,2155,7493,461,1591,5066,3602,7622,3848,7667,2566,4879,7537,4969,7539,5917,
3444,5919,7655,2082,2122,6354,4329,2011,7302,4988,7674,6246,7495,3415,7469,6079,5631,7689,626,7477,4148,6001,6085,7694,7696,3376,3872,7712,2932,5995,4876,5997,1900,5999,4993,643,7524,2674,7526,2678,5001,2682,5003,3265,2688,3267,6018,3507,5762,5982,5230,7702,7746,2643,3745,7503,6197,4910,7683,5987,5849,5734,7701,7745,6057,100,4599,6311,7487,7709,5750,1935,2794,6940,4881,7716,3889,4281,7677,7783,7668,6021,6307,7770,7783,5886,5996,4758,4341,3891,4275,6027,7614,7383,7711,7798,7778,6117,7801,3507,5962,
6343,4574,6027,5970,7817,5747,7501,7556,4530,7422,422,7771,1877,7791,902,5615,3187,5915,6944,933,7814,7747,6310,3274,7259,569,7389,7699,6165,7774,4577,3780,2082,5013,3029,7454,963,6188,5009,5874,7830,7783,6332,2916,2566,3794,7551,7769,461,6460,2839,6738,6262,2447,4853,7797,6220,7668,4699,4660,7681,6772,7815,6133,7550,7382,4315,3507,7811,6755,6732,7777,2932,7679,7498,7828,6501,7809,7861,6299,7781,7825,4906,7548,6322,2775,7900,3489,2643,4607,3533,7775,4386,7891,7772,7547,6236,5337,7913,5757,6053,7906,
7897,6220,5924,7834,4914,4015,4971,3507,6317,6060,6319,5954,5992,7782,7876,6249,110,6811,3455,7807,5612,7839,7936,6234,2304,5820,7866,2215,7943,367,7748,5861,7518,4989,252,5998,4991,3249,7522,3251,7755,3255,2676,7527,7759,3262,7761,2686,3266,2690,3268,4595,7860,6220,5844,4938,7452,6022,7043,1185,5289,3443,3704,7720,5747,1890,2832,2047,3937,5827,4571,4751,4909,7912,7831,689,7853,6490,7954,7857,6190,7859,7950,4195,6112,7885,6114,4616,7918,5793,7779,6306,6033,5358,7945,6126,7978,5652,7914,4906,7680,
6168,4496,8009,6038,5896,4469,3166,1822,7714,6289,7836,7980,3191,7541,5897,3608,7977,863,7854,5015,7456,7858,7972,8003,7877,4196,7948,4424,7822,6273,2556,5892,2662,7749,6209,7956,7521,7692,7960,1909,7525,7963,7758,2680,6010,2684,7762,5007,7764,6191,7813,7974,5980,7824,1559,7995,2147,7826,7992,7880,7776,7678,7915,7820,8023,8077,7669,3078,1312,6318,2225,6073,7934,8072,5709,5786,4409,8008,7822,7946,6134,7921,7066,7908,4527,2291,7993,7917,6027,7767,8048,3797,7501,8021,7557,7682,8087,7909,4403,6162,3828,
8100,6305,109,8075,7306,8105,853,8115,7895,4478,2082,7975,8103,8045,7713,7905,7768,7949,8024,5780,2898,8139,3124,8019,7555,8080,8022,4329,8133,8011,8125,8013,6951,6666,6634,4988,7442,5610,2886,8095,6028,3132,1299,8126,3958,2525,71,821,7387,7845,7710,8076,7840,5740,6172,4758,6174,894,6176,7875,367,7685,7470,2839,7736,4149,3425,7692,7741,4153,7695,4155,7697,3434,5714,6181,8085,8117,7861,6070,5701,7932,5991,278,895,2996,7989,8087,7862,4224,8151,6117,4938,8003,7997,7855,451,8E3,7534,4305,1457,7507,4030,
451,6210,6642,5626,2588,3512,1959,2794,7939,8032,4783,7796,7935,862,3493,7879,8149,4662,8050,6239,7672,7728,6282,7730,2216,2807,5671,292,7704,3902,3386,8003,8119,6196,7850,8109,8175,1822,7888,856,4304,2082,3745,4938,8267,7468,6078,5768,8225,619,8187,3367,8189,7740,7480,7742,8194,7744,8162,5977,7722,1149,1374,4903,8212,7882,5895,2211,8215,8141,6066,5788,8174,7944,8146,7865,8006,4899,8231,6038,5934,8027,7802,6220,2347,6327,4529,7835,7896,7904,7485,7786,7844,616,7846,8127,7919,2179,8294,8083,7700,8144,
4089,8295,8051,8318,7829,8003,7773,7910,8260,7829,8133,8177,4968,4237,4686,5834,3111,8104,8322,4929,8031,8314,8270,4906,7849,8121,4645,5827,4902,7620,8082,8262,689,8356,8209,8359,278,7903,8003,8365,8141,8310,4528,8108,8332,6272,6239,5795,8343,3945,7922,8239,2735,8199,7881,6234,6324,4484,6326,4528,5873,8044,8368,4803,7916,8337,8291,4251,5802,8154,1983,7937,7792,7538,7795,4336,8162,8030,7979,3189,7981,3192,3445,8036,5127,8003,5970,8269,8137,8316,7843,7705,2022,8233,7805,8340,7941,8196,114,7952,7517,
8274,7955,7751,7957,6E3,1906,4994,6003,8062,1916,7964,8065,7760,6011,8068,6015,8070,2021,1862,699,2578,4320,354,1713,1827,116,673,1832,6888,3901,3554,5145,7082,7168,5156,5226,5159,5160,6426,3957,431,5684,6442,6654,46,55,5409,6353,6448,8472,51,8475,2524,1085,7183,7193,7147,7628,1676,68,8453,8455,3756,6314,335,3897,276,3452,119,7643,6966,1853,5032,1856,7308,7573,7559,1867,7579,6600,7025,7610,7864,7625,7201,4158,2272,4378,3587,7640,711,1477,6138,1363,7789,3320,367,6737,2782,5853,5759,4616,276,2782,6044,
8171,5337,8531,1243,3181,8381,4910,8536,4535,8362,6220,5234,3331,8103,7977,7486,8331,296,8320,372,7501,8215,8536,6342,5809,2770,744,1108,8252,800,7449,2911,5444,7977,8555,112,8527,4509,8353,1462,8536,8369,8107,8081,6109,7986,3364,7261,8150,5987,8339,4236,8179,2800,8344,7554,3416,7734,3082,8275,7474,7739,7738,3369,4152,6087,7443,6808,8569,8537,3532,8120,8018,5757,8202,7585,5704,7731,6165,8130,8313,4478,7707,3601,2225,8552,7506,8157,5631,7510,6673,6099,8601,8527,8584,5023,1137,8038,7715,5915,8408,8035,
526,3608,8136,2932,8545,3746,8327,3957,8560,119,7792,4473,8329,8374,242,5879,8342,6175,5835,5797,8298,6058,8649,6173,5855,5881,8626,8603,5520,7889,8256,8536,5942,8521,6163,8084,8558,8086,8201,6239,5989,8204,6062,8094,335,8644,8542,4925,8355,8512,7615,5344,8602,7878,4594,8371,8314,8208,2351,7977,7516,8521,2581,8431,8058,6001,8060,6004,6006,8439,3260,8066,3264,7968,7763,7970,7765,8524,3951,8602,8111,8302,5822,3957,2082,8526,1309,7670,2100,8098,1196,8574,8047,8716,7552,2829,8079,8311,8690,5931,3185,
5014,3419,8220,7971,8661,6141,4925,8536,8715,8724,8238,100,8046,4189,8255,1164,8726,1056,2358,8357,7851,2566,8640,7546,8351,8335,8572,594,8644,8234,8314,8644,8324,8363,8088,3105,883,8091,5417,6320,6074,5330,8602,6200,2321,3004,2932,8720,8744,5711,3690,6624,7401,7633,1823,1754,7414,7008,7637,296,6625,112,7404,6745,5323,335,72,84,77,724,7635,320,8038,8736,4988,8738,8711,7847,8590,8273,6243,8593,917,8595,7691,8279,7481,8193,7483,335,8548,8317,8419,7847,8688,1132,8577,6150,7501,8352,6142,840,5109,8618,
8173,7549,8695,3246,8057,4992,7959,8435,7961,6005,7757,3258,7965,32,7530,8443,7533,8739,6330,7536,8348,6941,7794,8634,7719,7542,7310,7554,8301,8745,7901,6165,7903,8567,8103,7554,8224,8816,2840,8624,32,106,921,280,102,3070,3407,2387,7512,5612,8867,8106,2404,8832,7268,6996,7662,8507,383,943,646,7411,6389,315,5482,8806,607,2526,6789,3724,1516,6962,7145,51,46,7205,603,401,328,258,260,7265,340,3210,5458,46,7421,8314,260,8907,8919,101,8921,4614,8924,8926,4478,5179,1802,395,4481,6511,7164,8914,6507,277,
7951,554,8922,6659,46,50,6420,3847,8486,649,8902,316,265,652,335,1894,98,7054,3730,421,7001,5045,5069,608,3830,1980,7660,5136,8896,1479,7664,8509,421,5396,7488,7789,3605,734,7069,726,2521,4821,4299,5977,578,882,119,1941,78,7285,501,8591,4270,6621,7154,3386,822,7569,100,87,499,7938,2584,293,5977,2867,4320,1118,4190,8447,700,7567,427,6585,7313,7653,7309,7655,4058,4719,8501,6593,9021,8504,7247,1568,370,7328,6967,8156,7461,6882,2417,6670,6825,8878,7754,8886,6840,6676,537,6603,5574,6606,489,6217,798,791,
6790,4224,109,8481,7111,5296,7113,3946,4153,577,1843,8970,2667,5730,8055,5862,9062,3549,8103,6678,3102,3921,8218,619,6804,1582,1186,6806,1901,6802,4972,6758,1088,6760,7037,6762,1159,4787,1939,7231,3535,1037,8185,6359,3041,6667,4310,7464,448,9040,8227,6212,6637,8229,6216,5423,625,5630,7145,6691,2865,6700,2856,9040,7697,5635,9115,2875,2871,6704,9121,2883,5645,6708,2876,6710,8161,8679,2524,6961,6721,6882,7357,8664,7706,6610,9058,6268,8685,2342,9070,83,3761,339,6560,8458,7558,383,65,519,281,3234,99,5736,
921,960,8452,1029,8454,275,8456,6820,6630,6723,896,6687,5425,6935,5595,2524,6738,6663,5201,4001,9040,3776,2637,111,2616,4356,6447,7221,3056,8935,6034,6395,7187,7227,4329,624,8605,6429,6573,7228,617,6819,432,6947,5294,3778,4329,6726,644,648,8471,5167,8951,5409,5179,1484,1110,7437,6506,8485,7247,7411,8489,9163,8491,7093,1502,6576,7254,3997,3236,428,7024,8460,285,6996,6384,1410,6538,6477,9227,489,7106,6372,6576,3692,3676,8905,3680,9031,4378,6599,5752,6539,9248,3643,7447,1438,3686,1391,3548,405,6517,
6996,9243,409,5088,574,119,6720,3596,8977,320,1798,279,9201,6429,6793,8915,4316,2389,9273,6882,9275,6507,9075,5370,9078,730,6894,451,9285,1586,1576,6807,1935,110,7417,2059,9283,6635,9285,7440,9077,1584,9079,9083,1570,279,4831,354,7870,9302,103,9290,1577,9182,3233,7191,8949,8952,4578,8945,4300,6571,9210,9217,7599,390,7394,1823,461,7130,8792,7636,7575,6715,8518,7593,7401,9267,7278,8905,3640,9337,9327,348,7278,383,6569,9234,960,9236,3552,6541,6527,1679,9269,256,6952,2958,8910,553,6779,119,9359,3553,
4496,4451,9363,5525,8794,288,9348,6537,108,7254,9352,6543,5113,2993,9331,7061,3125,2794,722,8805,7788,3278,8982,3607,5127,1419,629,9383,7705,9387,7065,8003,3461,9392,8980,9386,5400,8983,7288,8655,8747,7937,9398,9385,5399,3704,5401,6405,6996,4244,6392,9224,3643,7250,5099,8459,5558,9232,9325,303,9031,9418,461,4060,8796,5579,9379,3557,6996,9429,7603,335,3696,6846,7021,7023,9431,2417,623,6746,7587,6761,1263,5840,1088,7045,7384,8534,1685,9445,9088,1263,633,1804,9454,5588,1073,7040,9437,9444,6745,5326,
2041,9068,996,9450,4055,613,8521,9470,335,2612,9458,9465,9446,8972,5316,9439,7055,6372,3689,7087,117,7058,5660,8499,7082,4846,7658,7075,7269,7326,3718,5144,9421,256,8616,8419,6345,1718,8963,6521,9343,9134,256,7644,3680,7318,1486,7285,9027,5677,7065,7012,8503,7065,7014,3660,6971,7573,8825,4057,921,5092,5131,9028,7065,1984,7727,1772,9530,8984,7904,4058,115,262,7647,7310,2082,9541,9023,9492,9519,6266,7659,7317,3962,7320,9256,9534,9516,9412,9423,7052,7602,6578,9033,672,5581,6391,7585,6346,9507,5580,4442,
6391,5395,328,7377,880,7380,7866,2814,9073,2770,8979,9408,9286,9410,9402,3608,6451,6786,7347,4732,7349,4735,7352,4858,7354,5977,293,5193,9321,7356,8999,8513,4353,6360,7585,9258,6366,7384,496,7386,8828,6815,8422,4547,4412,8947,960,8987,4558,7145,9136,8265,5444,3232,323,262,643,9615,7286,7199,9059,9E3,6645,6745,9477,1687,9479,446,4790,9369,7175,7074,6438,9621,6623,1502,3567,9441,9578,4224,1802,9633,9449,9459,6649,5858,9468,3535,102,453,4205,1683,3399,7787,7626,3386,9095,8591,4547,437,778,9604,7242,
777,831,7050,5136,7248,1569,1669,7396,9510,6985,7657,9547,9641,9480,324,8974,1869,9498,6631,34,8620,9036,5631,8159,6675,9130,288,9580,8839,8981,9401,9388,7310,2458,5629,1675,2857,6695,6698,6697,2876,9120,5638,2524,5637,6709,9126,7834,5644,5646,6711,3817,8223,8621,8592,7955,6641,9105,4710,6215,1708,9151,9294,577,2172,9653,1689,9245,292,277,551,9093,6124,7023,9279,4224,2861,1663,9505,5370,314,1645,9040,3929,727,3071,727,2109,5071,6528,7232,9297,9037,6802,9300,91,6802,4836,121,6805,4840,6217,496,5077,
9762,4453,6750,2632,79,4555,7005,9135,9600,9142,6322,7023,9776,8668,1115,6960,5048,7118,9785,7812,6965,5539,715,3857,9684,6980,9019,9554,6587,9536,9741,455,116,6992,9801,7138,6996,9450,7295,5044,7003,9562,9508,678,7010,9422,1363,5054,5059,6484,4320,9371,3562,6539,8956,9375,6528,7665,888,9826,3344,5267,4022,3613,1419,8932,8728,6034,6468,4320,72,6953,5513,9836,4933,8663,5337,551,8614,1700,7509,9697,5494,7014,279,480,1905,629,694,9759,1147,7040,3612,7027,9841,8947,575,4556,9618,6092,9836,4450,6497,9855,
1658,9233,6777,9350,6524,3424,9353,803,4440,9441,1264,8722,4649,6325,7673,8248,4169,1532,4743,8089,7362,8586,8181,9456,6048,4609,8332,4784,4105,1209,8323,8103,1160,8392,8314,914,6029,9192,9899,8771,5700,8609,4352,8505,7561,8975,3630,8803,76,1973,9441,4868,3136,114,8646,1453,2847,4308,8642,4316,9937,3140,7471,6034,9932,2460,291,7903,9945,2522,3137,9779,7998,8429,2636,32,2638,2640,6930,116,109,8617,2239,8552,9949,2629,1457,9942,1429,7477,9658,7015,9727,9949,7339,9008,6924,5028,2631,625,2846,3018,4193,
4751,9968,6344,8895,7560,7578,9926,1744,100,1482,9267,9441,6733,4554,9565,1718,9267,6742,3842,895,9596,4268,262,4667,6729,9795,9137,5752,9070,9064,282,338,1900,1429,9586,4730,7348,4734,7351,7353,4739,8750,4055,3808,9528,9747,7145,4997,4329,1831,6361,1015,1835,9242,9606,5025,4267,5061,9782,7378,3950,10008,785,9631,6749,9085,1391,9087,9460,9090,1545,9165,7179,6431,9047,6061,747,3695,9050,3817,700,2630,6751,4127,9782,6045,7812,9061,275,577,6261,9764,9640,9823,9291,935,9040,9769,1186,9310,909,9081,6744,
8502,5586,9738,1807,335,8476,9185,1631,9187,6163,7385,4732,9610,5445,9626,2541,9617,9598,3056,9620,4273,5444,10004,10041,3550,4918,10044,9794,10046,9601,10071,2002,4061,9146,477,10055,4547,7143,8307,522,9572,7378,3696,7331,9843,2814,10109,9618,8998,10115,9786,3813,261,3843,4797,6948,7164,9171,3535,6956,8989,9132,9793,8565,7121,3347,9490,7281,9512,7284,9628,9020,9555,9403,849,1571,6976,10087,9804,7073,3608,9518,10158,9805,10160,6945,9522,7572,7065,4056,9538,9528,9544,1523,279,10179,3946,6590,9026,
10182,8321,9533,7652,10159,9802,7571,9535,10171,10176,921,9540,9811,9542,2566,10186,7656,107,9493,7655,7296,9552,3210,9523,5134,9557,9994,9815,7002,5046,9818,2124,9820,6629,1054,9824,6544,454,7607,333,9245,10092,5425,6431,8462,5174,5259,5206,2215,5209,1644,9175,5167,10106,1651,461,9648,7145,10095,1115,9845,116,5469,6654,5466,9836,6653,9216,4537,9850,9744,4071,1778,7123,4374,5140,7629,3629,1842,9836,1713,9374,9886,8838,7581,5329,10246,7425,6355,9850,7590,4224,5519,558,5247,6423,9860,354,9754,9287,
5489,9858,5648,1705,836,10283,6840,882,5033,9866,7985,442,4320,6771,4794,10251,9849,10297,116,6775,8578,10303,4455,10302,6469,9878,6498,7591,9218,7629,10267,6526,9376,303,339,960,1387,9160,727,8490,3831,10055,9834,10100,7354,7724,6449,7232,663,313,3679,4129,1914,6574,10314,8487,9220,4057,9222,7494,5317,8788,6626,5320,9339,9489,9798,9380,1876,10188,10209,9806,10200,10198,9545,7312,10165,5550,6989,9495,1556,5529,9561,8965,670,3877,1302,1195,7365,7856,7367,7369,679,7371,110,7373,9571,5673,10128,9575,
10131,5453,10097,9452,8551,7710,9015,749,5326,5065,9962,10328,9700,9963,7622,9394,9536,889,9701,8492,890,6454,542,3672,9407,10404,9409,732,9584,8412,9161,278,10410,10399,9702,9583,9704,7655,7583,6477,9308,3102,708,5117,1391,2544,9655,7953,3535,10242,6024,1675,4421,7673,50,54,4069,104,10440,52,913,982,2950,10125,9686,7638,9496,7631,10319,10315,6539,9238,9229,9441,9807,9743,7420,9211,10043,8922,10093,6436,9630,10116,2081,5056,279,9832,116,9781,85,328,2083,6673,9615,6933,4694,6754,9643,2041,10471,7410,
10317,294,8910,9508,5973,10268,294,7987,8581,4547,7342,6542,7060,8092,2786,10266,6539,10473,5107,9510,6974,9025,6592,10201,3702,2579,10356,10171,6981,10359,5055,9742,9809,9803,10189,10170,7323,5526,7325,10366,5556,8966,9817,810,6962,10218,606,10220,2997,7390,288,84,9877,9225,10504,10493,9354,9231,9432,9557,10539,10303,9828,9884,6540,10543,461,4241,3081,9510,7943,10201,7649,455,7651,10514,3608,9682,10203,9684,10364,9987,8506,9926,10368,10353,7832,9391,723,9393,9703,9395,5827,9397,10576,9399,10412,
721,10414,7310,7460,5606,3803,2582,9730,6214,5491,8182,9405,2932,8367,8087,10581,9384,10411,10345,9693,10589,4988,8623,9042,9045,8420,10575,10601,10419,9400,10421,7065,7869,3419,7871,4155,4863,9980,4170,8168,8170,10099,2830,10495,8606,689,7903,10377,402,99,121,7436,3895,3545,4219,5827,10598,7783,9014,5324,9425,9673,9419,9166,6410,9792,8911,7615,1778,9426,8898,9883,9373,10542,10488,7131,10153,9509,10521,10563,9812,9557,9334,8508,10545,3775,10141,1429,10561,10122,8429,6892,6861,6481,6907,6865,6900,
6904,6902,110,6910,6850,6844,6911,6843,6864,10688,6851,10684,6918,6862,10679,6915,10694,6920,10693,10682,6869,9114,6924,6872,6870,6927,6870,6913,7589,119,9874,8755,7505,6953,10712,5523,9879,10716,6344,9241,3643,9259,3210,10328,4106,4108,8650,4110,4239,3861,4677,2809,4773,5864,4672,4120,10623,2797,10111,4561,4919,941,4233,9852,7836,4767,9414,10736,4772,4674,5922,10749,4777,8679,1271,544,75,101,121,775,4849,9037,6773,4832,9040,10764,354,2388,4816,1571,8824,288,5028,4234,3735,3617,9086,3733,10776,3737,
4072,4123,4922,960,6207,7156,10449,4762,2525,90,495,109,10197,8658,4238,4768,10735,4053,4114,4671,10799,4184,1532,2993,6541,6336,3989,8341,10729,10797,4240,4776,3464,10730,4770,4054,474,7345,315,405,9430,9629,9141,10070,3448,2779,9783,8178,3457,10815,4775,10732,10814,10811,10731,4771,10754,6815,9848,2351,10726,6806,4670,10831,4676,10837,10834,10748,10802,10737,10048,794,6759,700,7035,2094,6487,10103,5977,6496,10312,6030,5791,10486,10844,10835,10816,10800,10845,6924,10555,10838,34,6726,4159,10742,
100,4553,3770,4322,4212,629,65,10787,5294,1931,10463,3688,397,9843,3108,3672,10723,2800,10893,3689,4972,4234,9111,7954,4978,5975,941,1261,4463,10877,4981,1590,10637,3548,8956,4379,808,1105,2527,4304,7263,109,10859,10025,8076,9003,10920,9784,10136,10825,9511,7629,10723,742,8452,3689,461,7174,10032,700,10911,10819,9568,4940,4438,10921,4399,4715,10784,629,4807,10885,2351,8947,655,108,72,70,79,86,1466,10075,9973,2389,4835,10082,4837,9079,4839,6220,6217,9251,1088,6522,6477,7384,7351,5222,496,10900,8429,
5263,95,4420,987,7470,287,10979,10767,1829,550,4265,10040,9875,10927,453,666,10938,3911,10820,5581,808,5977,761,1213,647,10924,9640,10483,10107,3386,10951,578,86,10955,10957,5810,5191,10995,6377,10998,10942,10150,461,7431,4844,4846,10636,10481,6423,431,1602,982,9767,10621,4854,4867,9593,6924,5467,10768,32,11028,278,982,8207,97,11002,1675,10758,121,825,5675,9581,2995,121,275,2458,674,4704,7208,729,11004,10469,8167,2797,4038,4864,101,71,11053,1029,429,516,10829,10796,10849,10872,10848,7642,10753,7374,
10826,5691,348,10807,6812,10747,11077,10850,10750,10801,11075,4036,11081,10820,10843,10728,4174,10867,10832,10847,3969,10870,11078,6019,120,4264,11060,9786,9586,10913,11019,9664,9305,3728,3724,6142,9052,323,9054,9192,3959,348,8496,9943,3964,11101,11087,10733,10751,10798,11090,10738,5722,348,7292,11095,11089,10813,11100,11097,10846,10817,11080,629,10023,7014,8521,11124,11139,10871,11137,10734,10812,10833,4714,10783,4323,11106,10927,7296,10975,10261,9076,620,3898,10980,9156,10982,3561,10984,11164,10986,
4247,11131,4107,2271,4228,11135,11125,11090,11151,10836,11141,11062,4818,3611,11065,5306,2008,11147,11074,11150,11128,11152,11099,11173,6541,5948,11084,10830,11148,11102,11180,10868,10803,10789,2797,4667,10744,10866,11190,11153,11202,11098,11182,378,1722,4296,10990,10104,1631,10239,5215,9622,11024,10762,10076,7697,9767,1165,95,10966,626,8195,11173,10791,2002,10178,11177,11200,11126,11076,10752,11240,2642,4229,2525,6541,11134,10795,4045,11178,11191,11136,11153,11173,11064,625,3820,6688,11209,11086,
11179,11192,11181,3313,11195,3424,11122,11260,11242,11262,11253,11194,678,3643,9252,7275,11255,11185,4040,7096,709,10946,11123,5832,11096,11210,11099,11212,11140,11265,7289,9708,3419,436,9757,10680,453,373,895,6726,950,1713,76,4919,260,9004,982,338,2524,11304,538,9215,5432,7218,10010,8679,100,106,4209,294,9605,9997,11157,11316,288,103,11068,11055,277,11324,10484,5784,11015,6576,10912,11018,1211,1450,9014,1544,10661,4305,5029,260,10163,9515,10523,5127,10498,9353,11346,10201,10508,11352,10517,9815,
1564,6788,10201,3681,4061,1770,10201,3962,10478,10101,4820,10663,10174,9536,933,9003,9677,11362,9972,10664,7310,6476,3552,6391,11355,10169,10166,5127,9003,729,4507,3831,11364,10477,9625,3552,2541,4831,10181,10517,10365,7327,5043,10214,922,10498,1883,672,291,3551,643,814,91,3142,335,645,8964,288,5651,302,11411,517,7055,296,10861,1135,11417,3177,11412,11420,8127,410,11418,595,11427,9692,9848,125,93,11292,3896,7298,7006,10918,11237,9822,10498,4757,1328,101,10566,1608,11406,7001,278,11409,11430,11413,
616,5338,1465,11435,10533,7008,10498,11248,10546,896,9514,11144,378,8793,6806,7413,7636,10532,1335,116,9505,10001,5508,11450,4320,11452,284,11410,11425,11419,11414,5330,4554,301,11436,1438,11445,1449,5054,1438,11463,1328,1723,7256,11449,7023,11408,11482,11454,11432,11416,287,11504,11486,11422,11429,11484,11431,11486,5522,11424,3506,11426,11486,9357,6954,11459,11474,9505,4819,960,6391,11405,11501,11481,271,11483,11517,11485,11456,6350,11522,10470,9271,481,11437,1486,6130,7006,6469,10023,11527,421,
292,116,798,10024,1623,115,58,123,120,271,1185,121,11558,528,125,47,11556,58,1925,11560,48,125,6600,11479,11502,11531,11508,616,11506,2315,11518,11456,5524,11537,4939,3472,383,10310,10037,11488,11548,4320,11551,814,372,11554,123,5519,11561,4915,4451,11597,520,11563,11595,3659,11566,909,11599,11569,11571,11529,3930,11503,11512,11455,376,2834,11516,2504,11579,376,1743,11490,11538,345,4719,10969,9822,1165,11268,11440,10792,10794,7016,9151,10646,9466,9245,4579,4295,10418,7621,10420,10413,10422,10026,
5091,2524,11118,6682,3535,761,3703,10332,3535,11185,9411,11051,10401,10171,1477,51,11656,10602,8409,11656,10524,9369,1779,10452,8959,6598,7595,1742,11477,4213,10328,10227,3004,6774,6769,3561,5594,6183,5515,553,6358,2770,10935,5600,10840,6555,9879,1429,118,11690,8290,5653,9986,10666,7639,803,8517,9017,7082,8501,10055,10514,7294,9143,10510,11397,9413,11700,10572,256,2135,8580,2208,9604,8517,7089,1841,9416,7275,10316,10499,10544,9499,3558,10656,11725,9887,3589,670,9994,7059,7280,365,10155,455,10157,
10362,7654,7301,9529,10190,7648,10358,11383,7137,11378,9546,11749,5667,11708,9511,9551,6673,10179,6575,11672,9328,11714,3775,7428,7106,11678,6796,6882,11006,10240,383,1855,7157,10249,9197,7376,10384,10130,9010,7396,9469,10089,9089,10839,2958,1801,5684,280,9364,7145,11770,11222,9644,10454,8487,10884,9650,5508,9355,5445,2833,1429,686,11798,5279,6278,10142,6423,2691,9767,3063,9956,439,4374,354,895,11614,10583,10345,7330,9053,11114,8693,431,578,9751,6635,9753,7580,7954,9756,10292,539,9051,1528,10489,
11807,2839,4056,114,2639,10904,1902,633,11842,4841,1570,10426,9765,10961,6799,10285,9768,11851,6803,10083,9080,9773,11021,10671,6781,9139,10823,9642,11007,550,10148,8911,7217,10468,10652,11341,10352,11715,9075,11382,11742,7315,9549,3710,10192,10159,11755,10460,10520,11882,10170,10568,11699,11669,300,10213,8967,10216,11469,9821,11464,1575,7008,292,689,10219,3547,10541,6477,11547,9420,6631,11729,6487,10551,11527,383,8904,11908,9167,9666,8815,4799,10673,6889,9727,10676,10680,10678,10704,6837,10694,11926,
10685,6912,6924,10691,11931,6906,10700,6914,6919,10703,6861,6917,10701,10695,11937,6922,10708,11927,6926,10701,6928,6875,550,9735,4636,11838,3419,11812,578,7124,1571,6876,10069,10010,9797,10500,1363,5057,10567,7316,3928,9440,11969,11880,2759,1487,3930,6817,11369,10193,11755,10516,11753,11879,7075,2498,11976,328,11395,11745,11888,7300,11398,9497,9246,11401,1853,4468,8617,1126,7013,10828,5055,11902,10534,760,4320,11907,256,11549,11591,7268,3732,749,7035,9262,5487,10270,3679,11361,10854,12014,703,7214,
10972,1088,10550,10657,10972,10180,11113,11414,4496,10933,10970,9242,10933,10450,1710,315,2272,3693,8787,1746,339,8789,8911,10328,7360,742,9434,1742,5311,8304,6240,10996,8550,11793,10126,10383,9574,11779,11864,9060,8321,1959,11781,1015,12051,8790,1803,12054,5311,1088,12069,668,3684,731,12067,569,12075,3646,9633,8712,9140,11865,11771,1544,11218,10045,12086,12058,8712,8791,12074,10347,8797,5320,8791,8712,12073,1391,12081,121,12053,10755,10561,5574,12103,4060,9675,5316,12046,1730,1842,837,684,824,11734,
9567,9431,1778,3550,3673,12120,10264,10549,11730,10658,11726,9995,9854,6096,10287,6840,10282,9862,3370,9864,480,5993,9877,7178,9876,10303,9847,11786,6333,10275,10745,6257,11910,6385,12028,9351,10553,10721,11277,9245,7360,11311,3561,7355,3056,5415,1699,10036,3643,3672,12161,1410,895,6460,1172,4057,12162,5294,12165,5229,12167,7275,11303,12175,12171,1164,1524,369,9962,9786,11520,77,3703,4334,1203,7838,7178,11649,3780,11520,6142,10906,3950,9486,10931,450,11867,9670,5574,3548,9418,1830,11695,4329,10424,
10034,569,12180,3651,9505,895,259,11319,1206,3548,7585,65,11318,11320,7402,3651,6930,6953,2221,10017,11765,709,1883,5502,495,8923,5248,8473,5409,9658,9589,9661,4751,9663,11061,3818,12203,1566,12205,7616,5320,9604,9567,12111,324,11374,6579,794,11735,11916,6410,9996,3842,12256,11761,6390,9563,5583,1690,11218,10006,82,12090,12064,2417,10012,3429,10014,9066,7430,10939,10019,9589,10021,4736,11035,10916,5444,3804,9092,9191,5892,10027,2524,10029,10337,10144,6124,3808,262,12299,10143,9276,12273,9597,4206,
4359,10903,11219,6620,10926,11325,11343,10049,2225,10051,9654,3662,11692,3102,6687,10977,8877,5633,2863,6699,3933,6705,2876,9123,9721,9127,2871,9129,5494,11233,4353,12212,6024,10058,8676,10060,749,6607,6486,3561,10305,4799,11171,6778,2622,12079,616,9474,10773,10064,9952,329,10068,10389,12092,10117,10073,8103,10508,5370,9766,10080,11855,9770,9772,10967,2658,9969,5560,7184,9197,340,9608,10098,11819,9293,11367,9616,12089,10114,12091,5978,10108,12274,110,10740,4562,12277,10047,12366,10119,5876,9148,12234,
4978,7144,4547,11777,12061,7381,9595,12389,10925,12391,2814,12199,2351,11688,10145,11863,11020,11772,11868,10491,11872,10152,11874,11756,328,10156,11347,11384,9705,11876,10185,11356,6815,6881,11878,9524,726,11363,12436,9537,9527,10355,11370,10171,11539,10201,9024,11877,10522,12432,7721,7062,11990,12454,10039,11887,12458,9525,9538,11632,12453,11750,12455,7307,11983,12440,10202,10204,11292,11757,7321,11711,10211,12120,11893,10530,1608,11473,3625,11897,10535,5058,12013,794,10856,9245,6757,10853,4253,
7047,7036,1485,2637,2786,12494,7588,9084,794,1002,7040,1398,12499,6761,12497,1285,12506,9088,4248,1778,9993,9249,7632,11734,12034,12264,5329,12049,3687,11173,9234,4719,882,806,511,7651,8585,11199,11287,3968,11289,11149,11254,11541,9353,12326,1573,963,2794,1595,5683,367,2860,4869,95,5263,12546,4557,12548,11164,7378,95,12353,457,121,4360,2879,11308,3812,281,1900,2872,102,95,10774,119,11091,6225,11876,879,643,4845,4057,107,12528,7043,11085,11270,11252,11251,12536,11205,5332,10792,11442,11072,11250,11239,
11271,12583,11273,12585,110,11235,10793,11284,10809,11286,11261,12582,12591,11137,10063,10775,114,10350,12319,10779,12608,3617,1862,9510,11350,323,12452,11377,6995,11890,10527,11892,11400,11894,421,11441,9533,383,10918,11632,12485,219,7006,10767,4719,12573,1143,12526,12577,311,12005,5351,10162,12638,12578,12486,7632,12205,11736,5069,12456,10559,11748,12439,7065,10565,12472,5473,7057,3676,11763,11677,5190,12235,7210,319,7165,8582,8383,8657,5901,8718,8416,7884,8869,9525,8417,6312,12385,8712,8528,12671,
3292,8628,7886,12054,9948,1336,8784,8529,8630,8138,8112,5024,1842,68,5060,282,5474,5588,9245,9003,993,624,729,12163,11220,10009,9643,455,9415,3347,10756,2180,9836,5294,6515,4405,291,328,2221,74,7617,12706,319,8479,9197,108,488,3550,555,414,431,8941,5167,3263,4329,1518,575,10013,7014,10016,6781,12729,6559,414,6938,12734,4721,6014,6450,3453,11373,6938,12722,98,12724,284,12717,10497,7424,7115,9368,7575,12699,12321,7272,12044,12229,1821,7596,10351,11966,10195,9539,10513,12447,8037,9526,3757,12446,10193,
11666,7575,10212,9690,9167,673,1678,10134,10482,11315,11332,7907,1822,8956,12411,12309,110,10007,12063,12399,7423,112,12757,11531,5416,6362,10796,9336,12768,9267,3672,287,7601,3651,5579,12813,32,7400,12811,9567,3672,11079,2815,355,12805,32,12178,8774,12809,3770,12815,12770,7395,6745,12814,9342,12269,12082,694,287,12820,1738,9567,1754,12824,10133,2772,4555,11281,10881,8385,12390,12278,292,6872,5667,11005,12792,11866,10039,9597,12398,11061,608,299,8521,5500,12794,689,11915,2225,12869,3928,12303,10140,
9096,9280,12301,11920,12394,4831,4979,941,12864,9786,9614,10102,12412,9640,11221,12392,3386,12848,12275,901,477,11258,4307,8285,3119,12827,12829,12808,12590,12810,12844,12839,5321,7367,32,12833,1751,3635,12836,12819,1718,12913,7276,12915,694,12824,12408,7379,12062,12421,3946,3405,12795,10939,12797,10005,12395,12201,12885,12801,11061,10138,10028,11861,12879,12307,12072,670,12903,12807,10035,11199,12907,3632,12822,670,12837,12821,12909,12818,12843,12951,12956,670,12824,322,9190,6882,12904,12948,12831,
5532,12838,9559,7277,1058,12954,12908,12971,9344,12973,12917,1745,12975,12816,10349,1058,12512,10655,11911,12154,745,10457,11766,12519,3679,11885,1429,577,4979,10465,8285,10486,10473,10475,11391,10479,11225,11061,3830,3727,10473,10490,12057,6034,12616,10494,11717,2351,13013,11737,12830,746,12027,11731,4342,11965,13018,11982,12654,9806,950,9808,9810,12469,10210,10525,10451,12622,7580,10529,10215,10531,9819,5050,11903,5501,12832,12970,12982,12052,2626,9340,6996,12950,7274,13047,12070,8799,7406,7632,
9219,4481,9553,617,11342,7296,6541,11360,9512,11629,13032,9536,12656,12443,11022,7433,11752,13027,11659,9512,11463,12465,11743,11993,10367,12786,6410,965,3021,12351,7829,13086,431,11682,3780,13090,12596,12234,5868,10299,3780,368,5868,13088,8927,11807,13092,10257,1842,3065,8169,512,11703,1612,12435,13069,7288,9924,9989,9689,12018,12650,3490,2317,1939,6153,9649,3328,8427,8696,2666,8698,8845,8059,8847,8061,7756,8063,8851,8440,7966,8442,8708,8069,8710,8071,2468,8533,3044,3327,2184,8674,8773,12905,8677,
8206,3507,2773,3329,7723,8052,3535,3286,8114,7894,9880,5365,13121,2825,3151,9906,8349,3537,2453,2395,2711,13169,4478,2530,2076,7947,9843,2215,3103,5844,13174,7504,8393,13121,3414,6165,6261,2482,3509,12687,3223,2941,3541,4316,3213,7883,8415,13166,8101,8017,3529,8125,8684,10927,2650,12684,4890,8659,8376,5836,12065,3280,5904,8397,3201,13188,13158,13011,2302,2766,6335,9656,3780,3382,3155,8240,8689,8893,13170,13201,6117,3527,8336,8314,3103,13219,8391,8539,8756,13233,5928,6127,12368,2482,8741,2770,13177,
3127,5971,10788,3497,12681,8340,9902,8653,6177,12825,2934,2246,13190,13194,6117,13184,7911,5427,3503,8293,8103,2851,3389,6810,9612,4578,9937,7903,3154,3336,8749,12927,8985,9982,9935,3173,3378,5890,9448,13249,2709,2891,13217,3542,3321,8384,13005,7954,7729,9897,1438,8515,10970,11702,2475,2553,8765,13176,3207,13280,4445,8148,8116,9613,1986,8400,7794,6944,13250,6049,13293,13197,13264,7883,8166,1936,8779,2002,13147,3481,3530,2522,8097,8785,2316,6021,13196,2894,13148,2934,4938,13161,6156,13312,8131,9944,
13191,13228,8753,3157,10629,13215,6032,8860,13346,3223,8330,2208,13183,13175,6034,2623,12008,11923,5101,276,6099,5105,4713,13338,13330,3498,2733,3390,3098,13344,13164,13286,3045,13193,3315,2890,5850,13271,2419,5813,9939,2316,12191,5180,7925,13204,6207,9726,7954,9104,9101,9732,13155,13291,2441,8166,9965,3784,9984,6484,12192,13160,13309,3499,13206,12316,2023,13357,3517,3356,3271,8859,8406,3440,8863,7983,8865,12467,3334,2746,9914,8132,3119,13239,2402,13376,2835,605,3450,2522,2993,12291,3386,13250,2148,
3477,13185,8314,13272,13373,8211,4329,13227,2400,7903,13342,13189,8103,2499,3396,8103,10588,9943,2581,9729,13397,10594,13370,3126,13441,13168,13443,13308,355,13307,7793,7837,7928,3228,9911,13387,3395,2119,6094,9694,9727,9696,8887,10609,3218,3208,8571,3183,2119,8681,3381,9937,10065,6752,4988,9955,9957,10760,8425,3126,13200,3334,7930,6071,10501,7933,13154,12054,13156,13127,8843,13130,7958,13132,9042,8702,8850,5E3,13138,8853,7967,5005,7969,8043,13500,2816,9900,2260,11956,8247,8311,8388,3076,13183,3225,
8762,3333,2451,13451,13126,8735,8040,8737,8042,8001,7972,13445,2288,13240,8671,12668,3334,13327,12017,13314,13331,13540,13331,13285,2924,2552,13348,866,13502,3513,13488,13415,13339,13146,13568,13371,13456,13477,12595,13435,13079,12530,11073,12602,11211,11263,11203,10851,3355,13339,8264,12861,2913,8608,5574,8610,13260,13167,13203,6154,8579,11802,5810,9035,10605,9695,7511,8160,2845,2227,9982,13341,3328,3220,13391,13290,13331,4543,12539,6280,907,9710,12328,9119,12331,9124,6839,9717,9128,9719,2881,9718,
9722,9698,3387,13400,2035,13402,13198,8292,13245,13574,13254,13195,13536,13351,2933,13587,12087,13639,3175,13468,6034,13279,13410,3979,8259,13537,13464,13632,2002,13235,13654,13509,13656,5845,13384,2902,3128,13360,13222,3168,8271,7686,13459,3363,8818,6082,8278,8598,7482,8600,13655,13613,4402,13653,1429,8692,7863,13121,13248,11696,3334,13430,4659,13230,8242,4578,13347,2400,13447,13556,109,13274,13225,12352,13429,13417,3344,13543,8810,13545,8221,9970,8991,4833,2521,9975,1880,4870,1417,12361,3088,13563,
7497,4700,13693,13226,2482,13690,8604,13682,13204,13615,7333,11812,477,2400,3073,3069,3071,1592,13735,7373,13335,13296,11919,13616,13299,4655,13305,13720,8641,12693,13322,3342,2509,8731,8370,13231,4478,13182,13209,10746,13211,8652,8344,13548,2619,13476,13750,13399,13664,7361,13638,8345,2507,13594,8166,3131,3316,13337,13660,2896,13266,13236,13469,13699,431,13471,2255,13493,9967,13406,9943,8014,13553,6103,13701,7829,1936,13610,1180,13329,3126,13658,13642,3388,13373,8361,8781,13425,13487,13353,13253,
13772,2695,13726,7502,8761,13800,2333,13778,12870,2695,13192,13427,13361,13541,13418,7926,4883,8034,8864,8411,10199,13243,13382,3199,13666,2371,1986,13278,3161,13809,917,13263,13381,2897,6122,13811,13764,1847,13798,13345,2255,13635,8395,2150,13267,13796,2362,13321,537,8837,3234,290,9228,5977,13238,13704,8842,10590,13513,8433,7523,13134,7962,8438,8064,8705,8441,8067,13141,8444,13143,7859,13403,114,9985,13612,3046,108,7785,8418,12679,13820,2933,6204,13663,13888,8334,9194,3381,13853,8306,13817,13769,
13843,3241,13753,8326,13767,13779,13372,13549,13431,8732,13756,13355,13752,2720,13705,9953,8877,8811,13144,3480,13156,8184,9667,8429,8276,8596,4151,7693,8192,7743,4157,12093,13223,2130,13795,13237,13695,13651,866,9010,13825,12674,13334,2475,13480,13601,13482,13603,12134,13526,13668,7732,8272,6242,12540,7473,13673,7690,13675,13932,8599,12340,13893,13510,5912,13354,8401,13421,3193,13423,10804,2779,2521,13068,12589,10810,12532,10869,12604,12584,3497,13687,7189,13661,13802,13571,13925,13162,13722,13313,
6776,13121,3509,8613,2745,13748,8288,10713,13857,2896,13989,13685,13808,13310,8546,13771,13208,8198,13551,7232,13853,2710,13836,8398,13833,2935,3476,13467,13856,13444,13409,13805,13681,13819,13214,13894,13640,2904,14017,13561,13844,7824,1862,350,10994,6599,12649,7610,13029,551,13031,13076,12783,7051,6581,11763,7416,11789,13889,7023,10628,8693,7023,11525,4818,11823,2770,12214,8956,11118,8953,9679,9478,9455,12701,1500,7585,7045,10395,12258,13035,10263,335,10539,98,661,7708,9509,11342,1854,6977,12476,
13034,296,5682,454,6893,13119,3740,1336,14078,8268,8874,1890,4598,12692,13180,3212,1250,14078,12689,12682,12185,1672,6152,11963,6150,14098,7684,8554,14097,12756,7668,8217,8041,2727,7457,8857,7985,14116,2566,13898,13728,13596,12756,13926,13743,7688,8594,13674,7478,8190,8280,13933,8282,13935,3584,14108,4493,5891,13694,14103,1890,8557,7724,9876,14124,7892,8670,14149,10300,14129,13754,8576,13723,14111,12756,8405,13827,3406,13972,8410,8636,7543,14112,12673,6135,14098,13363,7954,5490,5102,5611,13368,2002,
12141,12756,14148,13159,13724,14146,98,13255,4236,10373,9956,13761,894,14180,4756,14125,13992,8241,13994,8578,14161,7842,12678,11051,14123,14099,3243,13275,8877,7520,13131,8700,13133,13517,13136,13519,13877,13139,13879,13523,8709,13525,13370,14078,13504,8203,13506,8205,13259,2830,4581,9892,7362,14189,8586,3377,1020,14104,13969,13419,3888,14165,7984,446,14098,14224,9922,8776,1467,14095,13669,12878,7735,14133,13962,14135,8821,8281,10772,372,14098,8166,14229,7893,13993,13851,10245,14098,14126,14028,
14259,14151,8176,12670,8340,14233,14191,12824,14248,1890,7819,14013,14155,115,14280,14154,14184,988,14237,14206,13939,7472,7519,8844,13514,14211,13516,8437,4998,8704,6009,13878,8707,14219,13142,14221,14204,3145,9849,14271,1822,14130,13958,13616,13929,8820,13676,8823,13678,678,14142,1939,11197,14160,14194,7841,13826,4279,242,8407,13829,13422,13831,7655,11716,13598,14128,14205,13919,11162,13922,8002,6745,7585,14078,14080,108,558,12922,2829,14169,12669,8722,13380,974,14249,13343,13914,14159,7829,14278,
98,14263,14197,14265,5960,14267,14114,13771,14359,14268,14033,6308,14349,14272,14231,4288,13505,13019,13153,14228,14098,13491,10274,14309,7996,8054,10433,14208,14293,13871,8701,14297,6007,8852,8854,13880,8856,8812,3625,14320,729,11083,14323,14113,14355,13755,14357,13940,14185,14118,13544,14120,14305,14243,12756,8876,13959,619,11812,5437,11977,4811,6673,9733,14077,1890,14344,14346,9230,9499,5410,8564,11663,12038,288,14089,5684,461,3550,5446,327,1673,10224,5095,14092,7082,686,118,12964,2543,7214,14439,
14283,3724,5516,12364,6034,1691,12294,9765,1697,9767,11924,1706,14074,12039,1712,7411,14076,411,3567,12016,9441,12020,10970,9646,9250,12025,9257,3567,7447,3691,11720,3676,9346,12664,10503,6477,10473,9441,5519,9367,12284,12405,5290,648,9360,8693,9358,14495,11790,4629,9366,14499,1429,120,14491,2770,122,14506,10277,14509,3394,8954,308,13022,7563,288,13052,12769,12914,12840,14428,11909,13051,13045,12955,12976,14521,8800,9424,1564,9441,13733,3389,11662,10613,10584,11665,11385,14431,14536,5751,13082,11670,
34,1057,1887,14442,11727,9691,11037,960,6228,5257,1617,10232,8467,7553,10770,1410,6228,5301,9186,5570,5345,7208,5282,12937,9786,5289,65,552,450,8997,12791,11871,10927,14457,10055,4310,1706,14461,6896,457,1697,10086,9464,9635,9455,4689,7150,6228,5165,11653,13099,7115,10236,12886,10927,6662,10017,14591,454,14562,10094,7160,7150,5150,840,5223,10230,5225,5204,4640,10233,3093,9169,10462,12381,14559,5279,7150,12085,12278,10435,9094,7150,5221,14609,5198,14554,4722,5227,7171,6067,5461,4623,14560,454,13494,
11774,5167,11792,12893,11021,7150,7042,14631,6424,4724,14557,14645,5281,2632,14553,14611,5258,4312,14615,3797,14620,629,14592,13611,9640,10244,1641,7150,5195,14629,566,14648,8464,14613,14659,3957,14551,14662,13915,2071,5263,7209,7042,9208,4721,9318,6109,14661,13095,12295,4794,14688,5464,11775,4537,14688,10252,7222,9668,4360,836,14697,4459,4068,5409,1799,836,14693,6571,14686,4799,14681,5193,8640,5236,4694,5238,9197,5289,14566,13495,12859,14576,11964,11873,11966,11457,960,6402,12443,5289,14729,13114,
14047,5136,10259,5139,14548,7E3,9816,13039,320,10310,105,6464,2059,14617,1873,11590,644,11592,8401,2954,9749,9292,10537,336,6766,1E4,12271,11588,12992,12650,6770,11680,5360,14765,960,13105,7829,6356,14454,9361,2835,12342,4910,12143,3023,14543,7271,9558,13054,12047,9355,14779,9335,7023,12263,14082,12427,7296,12430,10201,10168,14046,6973,12442,14733,5127,12774,12588,13080,9022,11744,10201,12774,12464,12619,12054,12450,13075,14802,1540,11755,10206,11758,14086,11667,12785,14444,320,11694,12147,4952,9569,
6734,12208,9567,11674,11172,530,10127,12409,9576,8266,6777,13102,13428,6487,14769,8314,10398,11641,10614,11643,9531,4104,14492,4201,9588,4733,7350,12289,4869,11552,11111,12862,4822,12854,12802,11433,14823,6355,10388,10099,14600,2622,13004,11368,12863,14859,11061,14625,3780,12418,4386,14777,3780,9623,13014,12387,11741,11791,12860,13645,2216,12356,9453,14067,10052,1623,9638,6713,14722,10824,11964,12487,795,10930,13050,12477,10722,12037,335,9993,12518,10648,5329,10726,10651,10808,12580,11129,12603,13981,
11204,3836,10939,10821,12771,14894,12414,4304,14909,11093,11897,13256,12531,13580,11288,13582,11213,11291,10183,11836,12031,13811,10565,11025,11808,6690,11227,9040,11229,11231,14258,4106,863,14110,13760,13579,12581,13581,11272,11182,4102,11331,13588,11142,5946,14926,13578,12590,14915,4242,14954,14933,10161,11849,5631,10081,9289,11858,12376,10852,10647,2239,1482,11021,14918,11337,5977,3962,1482,9505,1027,12665,5213,11061,4106,3856,11968,11249,13980,14929,12533,14931,11290,14916,11764,12056,11109,10478,
88,12276,10943,11343,12607,12609,14977,12611,9345,13024,7004,10162,13113,14795,7310,11361,11359,12443,11361,541,11376,12777,10665,14087,7641,11891,13037,14740,7004,11494,4512,11896,10219,1335,11447,11528,11407,11530,12828,11575,376,14727,832,11582,13007,14992,11633,335,15004,5657,13943,8965,15031,5540,11050,11898,14797,273,11572,15041,11532,7383,11619,6669,6673,1529,11459,10365,15053,3384,11763,14712,14721,14883,14723,12793,890,9132,67,6670,14568,9796,12157,3651,12169,12183,11675,11800,13221,1115,
12521,1391,12105,890,10949,2770,10496,9778,9979,10638,6964,11712,15029,3649,3643,83,645,12804,11468,9245,15045,9943,10971,11380,11536,12078,9651,10088,14889,9654,14785,3671,7411,10394,5477,9245,14842,7388,10400,10578,10402,1671,12946,1699,3108,834,3761,6395,9980,2800,15139,7617,1847,2969,14464,15028,13036,10554,11783,10395,14532,15135,4173,834,11372,11305,44,15140,15146,44,4732,259,673,44,9526,1110,115,103,111,15160,15145,739,3252,15161,15175,50,694,4112,629,260,12996,4841,15143,963,15158,259,15173,
15141,490,15164,100,15166,15168,921,15171,15190,15146,3818,15199,15178,15180,15167,3364,15184,12923,9402,11663,11658,3608,3612,10760,14747,14856,773,14207,4799,14873,8109,9056,4731,313,281,100,342,7027,14500,9796,15105,15150,3589,500,1702,103,12123,14788,14820,11464,11667,15237,12125,8801,68,82,6581,12701,345,11825,6520,11346,14064,5187,6938,8938,2483,15249,645,12991,9055,6938,76,15258,4468,11346,10719,7426,7416,9056,15257,5179,7429,10313,14901,11277,12043,12981,12834,1823,12101,14907,7246,9557,12919,
8798,694,14529,34,10323,9162,10343,10326,11922,10328,1797,14870,11769,14884,12365,14917,115,5193,9005,15146,6525,14579,14575,14895,15079,1700,15297,12891,12708,14958,15E3,15303,1761,625,10476,2043,14868,15307,14642,15299,14644,14433,11668,15232,9436,5945,9441,9390,110,14663,13799,8682,6145,6227,6255,14664,8200,8299,10574,12395,8135,8141,6254,6148,15341,8382,2659,15339,15349,15336,13249,6222,15346,15338,6250,14010,7937,3511,10365,2808,14437,967,14090,1562,15056,715,2521,9625,111,11208,810,15062,11611,
11574,2239,9688,5042,11513,2900,15318,935,11582,9949,11404,15376,11610,11453,11613,11432,11616,11507,15393,11486,11621,15327,15381,8976,10669,13884,14640,11162,13497,108,6785,2641,13606,9933,3399,13886,4224,7726,13128,451,14098,496,8481,8388,7339,4751,9981,9933,5735,13861,10474,13863,3697,13282,12279,1847,5191,293,11392,745,12889,15312,11061,13884,13560,2233,9982,15414,13448,13277,13823,2071,13684,5603,13600,13671,7441,13952,13484,13630,13458,8843,13461,9106,13398,1018,13788,3041,15446,5595,689,9971,
12150,14291,9768,13713,2018,9976,843,13718,537,15385,7085,10059,15401,6217,1058,1410,3594,1419,13011,3348,110,12226,14447,6520,10984,648,397,11847,14756,15401,13111,11738,7283,11740,12431,12466,1699,304,9551,3699,9607,2120,4732,15023,10173,12782,5127,14794,14812,6492,11970,10172,12472,9550,7291,4536,12619,15507,9512,69,15510,5747,10388,15020,14798,7310,14051,13066,3962,13978,15519,1776,15528,15509,10318,3775,4843,13074,10361,15541,6883,5229,15508,7319,15531,12794,12781,11746,12315,616,15553,6817,
15555,14029,9544,15543,15554,15545,13071,15535,12391,15561,15530,15545,3830,2549,14808,15524,11978,12475,15570,15566,15562,6543,15124,11763,12382,15512,12124,13224,14386,4799,494,8124,13781,13659,446,10388,14369,13648,5804,13202,14269,15587,7386,13554,11803,268,10952,13786,5906,2099,1754,14535,14843,14537,10586,7655,15604,4732,14162,14327,13420,14329,13973,14331,15532,12383,112,13511,13869,2668,14210,8434,14296,13135,13875,13137,14216,13521,13140,14303,13881,14412,1653,431,15443,7553,10388,14063,
14060,4559,3405,14840,4478,5608,14837,9944,13411,15310,11009,108,15647,9447,8016,6135,10388,13890,14202,14432,1159,13742,14312,7333,13745,6329,5798,13810,6131,13265,14370,4316,6886,8958,14443,996,12874,372,15667,13542,13920,14416,91,14339,7972,5611,14163,4760,7808,5445,15375,15432,7233,931,8754,15679,13172,14021,13855,13782,9188,13216,13354,15601,8016,14269,6210,15697,8402,4761,1623,10388,13570,3982,14109,14455,15714,13777,13641,3102,8727,12675,1217,13759,5914,13257,8588,15598,14196,13692,14198,6150,
15533,15453,12133,8887,7442,13485,5215,8164,8396,15713,5906,8152,15603,14864,13892,15749,15707,13633,13859,15627,15588,6161,7989,1787,761,6975,14811,12887,4360,1110,260,262,1889,121,2012,10860,5947,11176,6154,10388,8868,13947,6502,8129,13163,5513,15738,14404,14158,15741,14770,15782,13229,8831,14406,13757,13550,14285,15592,13567,5898,13202,6205,15218,8235,4915,13474,7459,12361,5977,15619,15629,14100,15732,1116,14012,15800,15793,15628,8258,15716,13333,12690,12185,14143,13289,14863,14455,8401,6944,15220,
15807,7927,8237,15762,7386,14187,10808,14189,834,10632,1188,8425,7903,5188,15806,13444,15322,629,14957,14885,15703,1150,14356,15792,8314,15813,13697,6041,10385,2839,9179,2018,7378,5993,10388,8296,8629,15511,7386,14096,14367,14027,15681,15664,3316,14005,5603,605,12872,2239,15687,15813,8575,8892,15797,9844,15689,1875,544,15561,5977,1637,15663,9898,13150,7931,14226,14378,913,7920,13771,15859,13414,15781,15821,8287,15705,6333,10388,7903,12662,14863,15908,8380,14281,6109,15722,15779,11543,15803,8016,8166,
15593,15759,2197,8874,15789,8871,15449,15093,6938,15610,4645,13794,15591,7829,9476,15622,15835,8403,6518,11807,4375,6576,9426,9245,14875,4799,1637,15256,10884,11065,10717,10862,14512,9261,15947,10646,15125,7629,9995,14565,14622,15084,12316,14578,11922,14580,14460,9040,14462,14585,3790,4715,7098,9110,1655,15876,15897,8722,3548,11640,15131,11642,10585,11644,2494,11304,7570,14623,14860,632,6726,10878,2157,798,10336,15308,14922,7155,14052,6504,2175,15128,7204,7160,12941,6765,4412,10931,13059,16012,15464,
2854,14720,14641,11314,15078,15315,312,11029,846,7377,576,629,1419,115,2221,1516,3755,14987,7176,12381,15756,14203,9475,2005,7585,7130,1277,11768,10076,12371,11853,14972,11231,9082,11855,10968,14477,2225,14486,3552,12273,5028,613,9353,11392,9184,10228,9197,6432,6165,5977,4056,103,1516,16062,14690,13226,12851,11283,11060,11870,15309,16022,16074,4323,825,608,5294,12726,13448,12851,15978,12746,1638,15981,15671,14273,14188,956,287,15842,14892,791,12824,9971,8772,3393,4639,5409,14447,837,686,8521,8552,
7611,10637,13644,15300,743,9294,753,5197,1588,99,70,1847,643,16006,802,16072,6290,11825,14053,11427,10076,11829,9767,11832,9758,5612,7617,1678,15136,12179,10502,14467,1715,6285,15236,14656,14555,14658,14651,2162,7207,15966,15298,16021,14885,11804,9736,5573,10059,1713,11797,16157,14830,8825,6782,4193,8422,12197,14711,10939,15882,996,1713,8956,15687,1588,14745,1313,13389,4543,16063,9918,4347,15613,10582,11657,15133,10171,4102,12251,15095,12253,14934,11822,12032,12213,16165,14604,5275,9197,1637,78,455,
13007,1781,115,15405,10256,7829,119,575,1900,85,9294,3728,111,1567,11573,3982,9161,10325,8457,12177,12947,12216,16141,10929,16220,9221,15293,3621,15976,4123,16088,14684,14563,9197,293,16058,629,9353,15985,8172,15987,14538,7310,16101,9938,7866,906,15841,963,15843,912,12172,3762,16013,7629,9466,5277,4412,16139,14377,91,9160,4412,11962,14455,4263,12423,10466,15520,16154,12092,15013,5662,15549,15527,15552,9512,1713,15573,14516,15546,7432,12525,16277,15025,15559,376,15561,16281,15531,12658,14531,12479,
14741,256,16210,690,100,4588,1883,12161,9962,12010,14750,376,1064,7266,114,51,11609,15040,15378,15042,14977,318,575,16312,234,15066,14917,6325,11617,569,669,728,120,52,3060,11818,7423,16327,87,16211,15386,11622,7007,9332,12484,335,16299,1900,6391,16303,12175,16305,14749,11552,34,16309,8922,16320,5080,16314,15392,996,16351,16319,16330,11432,15114,11511,16172,551,837,16328,16360,11486,9736,16366,16334,16300,11489,11585,4320,16217,259,551,11790,16306,16349,1257,10380,287,14753,454,15498,11493,10536,
12006,540,11035,13363,16381,11592,1721,11555,11557,3035,3189,11560,16400,3440,9978,10066,101,271,571,12710,125,124,470,5653,3666,16355,11612,16357,16318,16311,16368,11535,11488,16324,3455,3620,16385,3364,14754,11847,16321,4881,7127,16337,6469,6569,12237,16165,14042,11550,16307,5914,1185,16386,413,16430,16354,11451,16315,15064,569,16358,16420,16431,16362,11582,16119,11448,12009,16348,14751,1302,1713,15561,15437,328,2541,16427,435,16387,7982,401,16416,15379,11533,15383,11615,16363,11618,11534,11620,
16374,7491,1505,6673,16466,3774,16395,7836,571,16468,608,16470,16313,16448,16356,1015,16452,16353,16476,11421,5345,49,16478,16451,16419,16499,16331,11487,3842,50,16482,11326,16376,16365,14744,16372,12742,14748,16440,16382,16462,16515,16328,16491,16429,16471,15377,16496,6812,16426,32,16444,9292,16431,13110,15070,3589,15385,14738,14041,6400,4554,14732,15017,12620,15027,5137,11960,11161,7101,13083,15239,16509,3771,16152,14921,12278,5179,16517,10878,557,14744,648,16180,11824,9750,11972,9037,16132,9755,
2700,11296,11829,2616,4332,11305,12790,15324,16273,15326,15671,15996,1973,15999,12827,14643,2814,11918,15673,13757,15215,10243,5409,12353,10248,10253,7881,11679,16126,8393,14839,16208,13237,10959,14580,11855,11228,11857,16049,9312,14755,16164,12239,16235,10094,12943,5344,4554,16596,14698,8540,4554,14702,6563,6936,4554,14708,16621,13226,6687,16018,16034,9641,12855,6777,5368,917,5370,5384,5374,11853,5377,5379,5381,5383,5385,32,5373,5388,5392,5372,5389,5384,10968,7624,13281,15216,10773,291,369,9777,
16243,10405,16432,16138,16223,12166,16226,8487,1781,12349,16555,14653,16019,7152,16580,4263,11954,1410,7585,16160,16679,10987,11772,552,6559,1883,558,5081,16557,14860,16247,5887,16168,14770,14688,16620,5363,14695,5462,12350,16603,15655,11116,294,15253,6124,16197,12379,16597,14691,16701,1410,16624,6418,5409,10146,15006,15895,16335,16688,16563,14746,5567,7426,16256,1566,15126,9636,10470,709,16112,15659,15315,10650,10491,16077,16002,11794,34,71,495,11065,3672,115,308,12697,16030,16729,14068,14762,11528,
12720,12754,12723,9170,14705,1588,11047,10099,12738,12714,10303,5294,10338,12727,9864,982,777,13811,16762,12740,10015,12313,1792,16617,288,12728,117,12730,499,2221,12748,3056,2681,16777,14430,718,16770,10017,12752,11305,12721,16756,6429,1917,16717,12744,12731,16179,7236,4694,2677,12943,1778,84,12696,15146,16749,16258,16730,16741,837,955,1009,15368,9245,13797,15646,15350,13276,9982,15413,13790,11693,9725,13481,13395,10591,13462,6644,15464,13607,8103,14879,15429,97,13864,15006,7083,15435,5923,15850,
263,12890,15441,9937,15896,2468,13471,15831,15809,13283,9933,15467,16822,9933,7903,15451,6665,8311,14415,13616,13483,9044,13630,1936,13316,13473,15836,3053,15934,15848,13783,13389,15935,2134,13493,15811,3419,15407,15409,15425,9946,114,4704,16856,13093,15469,13711,3419,9974,15475,13715,9977,15478,2475,13850,13377,1362,16841,15481,12345,15483,537,15485,11526,496,15488,5015,15491,100,15493,7032,32,306,15497,15148,7576,9988,7663,461,15072,3660,13038,6967,12438,6990,15039,16495,16417,1015,14435,386,16454,
3585,16424,11866,16431,5608,15069,11436,15071,431,13943,11763,666,2426,544,16171,1015,15687,16948,9373,9901,14276,9903,9602,1847,6788,16951,569,16953,15234,7903,16954,8090,15899,16263,13592,16967,4162,12853,13531,8387,7675,5746,1862,15004,14344,9441,1844,16775,9548,16078,14885,10124,16181,4547,10935,16695,8314,16836,742,15500,12422,340,15082,14816,16153,16986,16114,15075,16675,7211,16677,6459,305,5976,15967,15310,11510,16600,8314,16176,16564,16592,8924,1911,14666,1053,15124,5324,16142,7608,12772,
13018,15518,15577,12441,15024,15516,15018,13078,15526,16288,10205,13067,11439,15570,14804,12443,9543,12443,15569,16545,15327,10667,12661,16710,4721,17021,594,12895,15491,15005,12413,12278,6816,1555,1379,3843,12664,15993,12865,12394,12800,17058,14860,16253,116,4060,10636,14882,16738,12278,12924,10129,12410,14871,9786,12848,14598,15968,15684,12868,17086,3507,16962,616,15687,17055,12883,12312,17084,15310,17055,4667,12897,104,12899,13060,10386,9622,2095,512,14567,17069,11061,6816,15304,15319,13003,12387,
15970,16001,12278,15813,14865,605,17112,1674,5028,17116,16579,17002,16581,14029,16076,4694,12892,10639,648,11305,17065,9786,10565,17130,10238,15314,11771,1862,10667,9245,5975,14496,10430,1935,14002,296,605,294,105,2861,6517,7241,392,380,345,15501,1700,12460,12466,15327,12260,11763,1165,13302,14478,392,3674,9138,14949,16155,10646,9671,17158,394,109,12210,11722,5110,5138,7125,17025,10225,16752,421,16271,16035,4448,16703,6034,7230,17014,4478,7077,7619,9502,10340,16551,14544,10473,3578,111,11471,17188,
4064,16010,12737,9199,9149,11923,14583,11925,6899,6834,11943,11930,10690,10686,10679,11934,17221,11932,6871,11939,6916,6859,11938,11944,17227,6923,11946,17230,17235,6863,2524,9182,9295,14173,1015,17205,7254,11913,14243,10303,17242,2274,14479,6539,11913,3691,17251,12029,8801,2348,13109,100,16540,17208,256,15914,16593,9197,368,16405,629,12827,1910,7160,14596,5211,17081,10927,820,512,14672,14556,7172,2170,5608,6228,5199,3795,4310,7170,14675,4316,16802,5185,16805,7122,17184,8900,10262,7127,335,9152,6395,
323,9330,9245,1613,9037,17288,16149,731,9183,9316,14618,15958,9557,9330,13044,121,1822,16055,7226,17262,10874,4557,112,16694,17131,17141,17003,17064,17196,13012,13785,16874,6034,13073,16286,806,14939,5370,10918,9767,10918,7483,14513,7412,9251,15086,1726,11827,17321,14533,13373,15614,15986,14844,15988,7065,7738,2640,14827,12909,972,15110,11145,12268,7275,15109,12945,378,16919,10667,383,12597,12094,17027,922,11365,15437,10480,16845,17163,11743,9475,16577,17381,14803,16092,9892,14811,17030,462,17114,
11393,3922,9800,17041,948,6687,12618,17037,15400,16921,8507,14050,1683,14322,14358,16592,9613,1683,17079,7866,834,15864,7340,14586,9634,4716,14589,10183,1512,109,16851,7716,6944,9538,2035,16869,908,13318,9661,17333,2302,1683,16849,2529,1683,13124,15447,9707,15058,9727,9713,13621,9715,1721,6701,13625,12560,13627,17448,6662,6849,17421,14423,1495,700,11636,17321,3734,98,109,17353,16663,15616,15989,4824,720,16242,8319,15132,10615,9536,1477,52,17463,17470,16244,15617,5784,327,15948,17109,12189,17432,1115,
15833,8314,11655,15209,14541,11664,17479,9475,14070,9048,17457,6761,14073,2995,5683,16989,14778,15231,14468,34,884,431,15238,11676,17051,14703,9323,13448,3727,12305,9209,5159,9282,8495,17210,12300,4640,10229,17286,5201,17307,17281,2758,12369,9298,9310,16608,10964,9311,1705,16051,9293,9295,9307,16633,4939,10614,7954,14972,9304,12030,17540,9309,17534,16611,16388,2529,17310,10331,8472,14710,14358,9320,9317,10339,15275,14782,12114,13058,10455,16053,16553,1637,13098,15951,6938,15654,13012,6938,15657,2302,
5625,12990,12406,1015,17319,4061,101,9228,9240,1335,17585,1832,16667,16140,1285,17582,17579,7698,15645,110,10308,6333,3724,1883,7619,15691,8332,14877,17571,120,10311,16900,594,14956,16846,17076,16692,14862,4329,15950,13796,16214,12187,17594,16257,8487,9226,17584,9239,10090,14968,17541,16046,9727,16048,9081,17551,12220,9132,16202,291,258,12240,17126,16739,7868,13091,12995,431,17576,15093,431,17570,7829,3818,17139,16020,17127,2814,14677,4555,17559,17312,10497,17508,17605,7829,5179,9851,12995,6938,17598,
13249,17619,11826,17615,4129,55,17557,8314,436,17640,17052,12880,7829,6960,17637,8426,291,6413,3552,15260,10056,9197,12353,15267,14665,6445,17671,579,17193,2302,17696,16628,16699,9613,17696,16698,16625,4547,10875,4562,17653,10105,17327,17128,5445,9295,17666,17330,14680,17329,17670,17241,12196,14694,10497,15529,17612,17326,16289,14885,1637,17716,2770,1703,17679,14703,48,17053,1137,15092,1236,15100,3780,17195,15274,13062,12427,15114,16544,15550,3608,17377,16844,14045,17749,5127,17751,12387,11143,17395,
17047,15585,12624,12480,11715,12007,11499,15061,15391,16932,569,2544,16454,11536,16337,10149,15240,11094,9822,11899,7006,5592,14948,1519,13363,16472,16931,16474,1015,17771,16480,16501,16423,16943,1669,8233,12096,10822,17262,9341,12768,12113,1743,17565,17623,12129,9887,16541,8807,16568,17047,12088,17385,9029,12621,11399,16553,121,17693,4448,17818,14501,10718,17659,14061,3808,7022,2002,10029,12296,260,1883,17828,3535,122,17820,9657,2958,17835,12302,17830,17206,8135,17766,17690,6450,17210,4547,11921,
17213,14174,17215,10683,10677,17227,6830,6921,6905,10692,6908,10689,6904,11934,17856,6915,10696,17228,10698,10703,17233,11947,17237,10707,17868,11952,11645,8931,10072,4938,5519,17838,16169,14493,17880,12012,17803,649,14471,12159,9247,16728,15963,3685,9843,10932,10890,5497,10211,14482,9263,14904,10937,17898,12017,12048,17889,10050,9016,12030,16707,5337,14906,15010,6580,12037,14481,12040,407,14483,7391,12918,13046,15279,12977,3737,14900,16547,15285,12983,10781,335,13021,17252,17843,10328,949,9868,745,
9870,16120,9872,9843,2071,17617,8314,12416,11691,15957,8953,17504,17298,9424,327,15999,17261,14789,11966,10124,17399,17033,17038,11345,15016,17754,5679,16547,14736,17185,17297,16552,10328,12963,3436,8632,8033,4885,738,2119,16198,5569,17266,12664,13573,13909,10818,14493,2155,7903,10235,17274,17001,17642,11772,1058,17978,17191,4629,4481,2221,14269,17971,2119,15839,12685,5344,1839,17279,16148,17528,8643,1058,3343,8549,10099,401,14052,6569,2155,18002,8007,1137,12963,17698,1383,12186,7418,17981,17977,
15932,1236,5183,17511,14605,9197,684,1839,5291,8215,18024,108,18016,13704,18012,15757,462,16214,12827,11995,7019,9767,7001,7019,287,1802,360,12187,6808,1839,4414,8874,591,16045,729,6638,11853,8457,2586,15222,4204,10622,4689,18026,13918,18042,16038,15301,6377,18038,18040,1592,17096,16735,18010,18027,13241,4799,8616,15621,6882,49,12667,12193,15623,7540,13830,14167,7310,18086,14201,12248,15615,10345,18E3,13918,8555,1839,13389,14269,10124,18017,15734,8729,16260,294,14269,18014,12187,18078,3027,13946,
15825,18070,14493,18022,18029,13704,18006,6425,18008,2010,18001,8339,17287,8465,8466,18128,14979,12056,18117,9962,10135,17991,12106,9071,17525,6423,17527,14635,18121,1165,4060,8254,17990,12278,18115,18025,17985,13704,4880,13971,3191,18112,13018,4129,12966,16225,17592,10561,17953,17186,268,3822,16255,17441,7954,4858,10771,32,1568,6840,12568,10909,413,18126,14650,18135,18121,4691,8563,13918,18158,8862,18160,16039,15354,10280,17052,7240,17257,14526,17563,12910,13056,7651,9510,17029,17400,6502,17032,
15558,16546,11667,17049,13084,6352,18031,16199,6450,17719,4523,17018,12380,4958,4829,9564,17360,14527,10940,1809,9570,10857,16702,11767,16714,1801,14887,296,12358,14861,6954,12417,10276,16861,4528,16863,7333,16865,8625,1164,17663,8314,15459,10590,15461,9731,13463,16016,9110,11293,4988,13619,6706,9714,6706,12334,13628,12336,9125,13629,12339,8283,7459,14775,13242,12188,14778,5324,13049,17321,8937,15270,12597,9842,9969,12255,7086,10348,1742,6019,12563,1379,102,10744,6627,13621,7903,17487,13176,17704,
10792,18282,12355,15120,6647,11783,5272,14290,6034,17155,1900,79,18291,3733,5579,1112,16565,14061,18289,18310,18292,12098,13621,7976,9659,1754,9662,13011,5299,18317,18311,4234,5579,9528,2874,6261,12325,18258,5631,9118,18261,17444,18263,9716,17447,12337,13626,477,9721,6662,12172,15255,18280,18299,17940,5841,18328,18319,1742,18332,605,6296,16294,9678,9645,17178,381,17482,15282,7598,16547,11374,10654,17299,12227,12223,14040,17375,14093,1103,12657,17949,17969,11800,16988,4925,18375,2225,6581,14857,10041,
4207,11155,10882,14940,17711,17728,16114,17083,17275,12316,17943,4478,1809,11846,17731,9150,17930,12128,6477,10912,17933,11800,17935,794,9869,3614,18300,17744,11667,17931,11906,15118,14469,18364,395,17911,10725,11120,12424,14911,14928,14952,14930,14966,14999,7296,14058,15454,7519,9091,3806,9949,12570,110,16202,642,11269,14913,14953,12593,11182,14924,1824,17777,13979,12601,18431,14996,18433,13584,12359,15008,10777,17906,18461,17929,15721,7351,18436,3246,18439,9303,2521,18442,14948,15830,11285,18458,
11088,18449,14967,34,17611,15440,9786,10842,14961,18429,14951,18447,18432,18479,14999,17530,4988,14971,16609,10085,7868,9512,18436,17832,6237,10864,12449,11238,14964,18478,13983,12594,1091,7242,17179,4378,18511,381,11173,5692,5028,7318,18446,11193,18457,18491,18459,15688,18467,4790,4626,14251,17313,17745,11966,11354,17962,17390,15019,12438,17963,10205,9031,15514,11759,18380,10528,15370,12481,13041,12483,15036,5053,16390,517,7492,12633,10865,7636,11901,831,3226,14756,17244,11626,18367,3740,18335,18173,
8429,18338,17443,13624,9122,18342,12332,18344,17449,18346,13628,18348,17896,16547,17371,17299,15961,11637,16605,5201,17630,10901,12373,10963,9771,10965,18497,12422,7244,1088,9418,16259,4532,4597,10744,10780,15229,16451,15011,12613,17383,4967,17613,9601,16275,9799,15049,18538,1523,6975,18534,18206,11881,18542,17814,11994,16926,11895,16339,18549,10077,12646,14517,12297,9809,17088,17925,11667,15687,14905,686,7100,5142,14443,9510,13026,18614,10183,10509,14085,17041,17915,14466,17968,7080,11800,9024,7585,
9049,17595,9442,14935,17909,17664,9057,17011,15315,9650,10164,2239,18237,15969,17213,15971,443,14582,17733,14584,459,15479,10072,97,16773,12283,6169,9070,10074,16044,17631,18496,4840,17634,10063,12318,17912,794,18598,4786,10054,17125,16629,14711,17846,3535,16736,17190,16634,14860,16718,18152,14860,555,18677,9145,12402,10674,5304,12986,12153,17207,18563,421,6960,16157,99,9828,17818,16104,9197,512,4078,17588,3545,18419,3552,17621,2022,17696,17249,616,18730,745,17246,17553,17539,17625,10458,12026,18407,
18731,18742,17586,3836,5147,729,18416,17694,17980,12056,10473,14342,9836,18737,248,97,9831,10543,17635,2035,885,99,12597,18723,5248,16787,9586,5368,501,17508,17843,996,18759,18409,16423,12088,643,3822,729,6787,2348,17136,11158,686,10952,18722,17823,14665,12750,17707,17323,262,17241,5345,9781,10879,14574,17641,12278,328,18728,7585,18759,17594,18349,470,578,18767,18791,17265,6665,7996,18353,17717,10245,17600,111,17602,10449,17023,12647,17952,1603,18169,11498,1839,14489,14504,1429,17743,7558,18543,14780,
3548,12182,11312,15090,10669,18400,18307,575,709,1604,15991,14458,16691,11061,17013,11687,18832,13016,16727,15095,7411,461,18834,18530,18211,11700,5501,16572,1723,11452,3801,7446,18562,16553,11301,17324,16167,17727,18141,7423,120,1395,17485,1236,1099,453,604,629,1516,354,13005,18140,12278,17335,7434,17337,18888,5201,11037,9102,11853,18896,14258,12638,15893,18662,17142,17201,14514,17346,1502,17911,311,86,2727,9405,339,14988,10328,4354,3069,12328,18315,4224,554,3808,1654,99,87,1571,587,114,807,15828,
8423,8236,8403,15597,7351,1516,5028,17580,12316,965,323,13927,8877,684,279,745,982,3071,823,9706,277,18442,16213,9056,14969,14927,18488,18521,13982,18506,10873,18955,15103,6959,538,15183,1419,18926,643,577,18929,17438,18091,15942,15720,743,18966,355,18968,18927,18971,107,17406,16442,18933,18976,4560,4562,65,14447,1847,17108,16658,6322,11034,14854,15852,16114,4317,18391,4484,18990,2058,18993,14989,10805,18661,14993,18455,18489,18522,18508,11182,429,3591,3593,16909,10634,4173,3590,3592,282,15487,10634,
2800,19021,19017,3595,15867,7351,18998,17713,3818,11160,6414,19003,18992,15076,9786,6527,117,12208,9485,12659,355,18442,11256,414,19008,18454,18477,11127,19052,12824,866,3074,11305,17710,17006,17655,14923,2099,5692,10923,17726,17140,18395,17713,4106,10207,2539,1875,4868,4859,18505,14995,18960,19077,14999,11327,11054,11070,101,19037,1591,17603,14885,311,304,15191,5977,3776,4667,12900,11828,1756,14091,7954,11001,2961,19097,895,4449,18637,741,10059,16980,19105,6930,327,9855,8552,2639,18970,6725,18080,
17729,15174,12732,112,7360,1588,432,19032,4263,18978,18924,18969,278,18982,14401,15834,4518,16853,5410,12576,5694,837,18942,14131,15472,18945,3798,18948,3370,7378,18951,18656,19070,120,982,19072,4857,14854,18520,11264,4673,19054,19047,11279,8931,18996,19075,19009,19159,12534,11102,550,19127,18980,19115,18929,18786,12316,291,19085,19005,10137,19163,293,258,1875,1809,5370,2012,12565,3812,9440,9040,19186,5590,19188,3551,14258,19104,413,566,19059,10467,19061,5444,3818,19177,19039,11158,9425,830,14447,
1410,9111,4310,511,5658,545,9040,19213,866,631,3305,5171,19180,15491,18991,19086,18964,9665,16492,17619,17269,5574,9334,7982,1210,284,11569,474,282,107,2389,12191,19121,670,19123,103,19125,17008,3962,9005,4557,108,19199,14988,11107,4215,16190,15900,91,6472,19222,2443,15421,3409,6777,12512,14725,13018,18504,13114,11755,18941,1009,1410,17958,11883,15521,17756,17393,4213,11707,15521,2867,18187,67,16907,3081,14808,12122,15367,14436,16296,922,6469,65,12756,15420,354,14535,16488,10390,10420,17785,11480,
16449,15210,17790,9699,734,11582,9627,1571,18366,1863,16473,16316,996,16397,40,41,32,61,62,1417,3952,10079,19306,2417,8990,19184,11582,18175,354,262,18122,11589,16520,11592,18212,19313,17786,19315,17354,9409,16508,5736,327,115,8994,3730,11582,311,19333,18187,18310,4845,19346,16439,12011,10240,16415,19340,16450,17477,10614,19344,9753,19347,9483,15396,996,19338,16508,19282,5565,11582,4200,5720,19352,15273,17767,19314,19362,14075,11994,19372,2526,18187,16512,3609,9012,11048,19366,19348,710,19299,1952,
1285,19232,16494,19303,16529,19363,19343,11432,19345,3831,19393,16374,6518,8882,17509,11800,17264,8934,7194,19334,7204,14704,14718,9278,17521,12306,17681,16604,1524,17516,4721,9281,16064,16146,4722,17280,18147,1449,18684,4310,9299,14943,11857,17546,17309,17539,18585,6423,19437,16047,19439,17537,17547,10959,17544,19447,1587,16612,17553,9315,17555,6571,17737,858,18813,8924,18090,17503,17562,17922,17564,411,275,12789,17260,18927,12187,17954,16553,9088,18404,13448,1485,15227,542,18123,1362,10246,9463,
16584,292,742,10431,11412,16203,1673,19174,12709,686,858,1485,17650,15858,12149,10309,4320,19480,11790,16992,13757,1485,19485,15998,19487,1088,19489,1623,9836,19498,4478,10246,17573,6163,10255,3102,107,5848,8581,18609,7120,12710,19496,5085,19518,1453,1485,17647,5472,17294,16549,14738,17024,10929,18425,11800,18451,19156,13583,18507,18961,12824,18451,3961,12529,18487,14963,19079,14965,18523,4678,11278,4853,14546,10283,19543,14932,19158,19555,10873,11821,11117,15651,11119,10827,17174,8861,12600,19166,
14997,12535,18509,11183,14960,19550,11198,18958,19157,19554,19013,18480,18493,14970,18589,17632,11859,18148,12270,4959,11110,15441,274,1887,11217,15440,18889,15994,18503,17759,18957,19552,18456,19078,19607,18434,18856,16054,18858,6749,18464,18603,616,18601,12612,10781,18611,17808,16130,15550,11755,15188,17260,18540,15060,18643,17628,19274,11348,15018,9031,15534,17810,5043,1564,18541,14817,9333,11713,17762,16297,16338,11627,18453,16375,7410,306,4450,14745,18920,11975,19336,14358,12002,4462,476,15999,
17831,16379,10418,19395,8522,16664,15302,7613,12290,15112,9822,15048,11396,285,1862,10884,16004,327,15290,16221,10327,18411,15302,4061,10334,625,15153,9274,9211,18336,9112,3831,4264,9767,19693,6478,102,11104,97,16919,19680,16229,16222,399,19450,3164,12378,14074,4465,18508,8396,16070,1949,1390,7704]});
define("tdv/events/async",["require","exports","tdv/utils"],function(a,l,k){function n(){var d=e.length,f=e.splice(0,d);h+=d;for(var m=0;m<d;m++){var p=f[m];if(p)try{p()}catch(q){k.PW("Error in async task",q)}}}var g=0,h=0,e=[],b,c=new Promise(function(d){d()});setInterval(function(){e.length>0&&(new Date).getTime()-b>100&&n()},100);return{yE:function(d,f){f===void 0&&(f=void 0);if(f!==void 0&&f>0)return-1-setTimeout(d,f||1);e.length==0&&(c.then(n),b=(new Date).getTime());g++;e.push(d);return g-1},
cancel:function(d){if(d<0)clearTimeout(-1-d);else{var f=d-h;if(f>=0){if(!e[f])throw"invalid async handle: "+d;e[f]=null}}}}});
define("tdv/events/EventDispatcher",["require","exports","tdv/events/Event","tdv/events/async","tdv/utils"],function(a,l,k,n,g){var h=function(){return function(){}}();return function(){function e(){this.cd={}}e.prototype.Q$a=function(b,c,d){this.sua(b,c,d,!0,c,!0,!1)};e.prototype.bind=function(b,c,d,f,m,p){p===void 0&&(p=!1);return this.sua(b,c,d,f,m||c,!1,p)};e.prototype.sua=function(b,c,d,f,m,p,q){if(b===void 0)throw"Event name undefined";if(c===void 0)throw"Event handler undefined";d=d||this;
f=f?!0:!1;b in this.cd||(this.cd[b]=[]);var r=new h;r.yW=c;r.Ldb=m||c;r.context=d;r.AKa=f;r.PKa=q;b=this.cd[b];p?b.unshift(r):b.push(r);return this};e.prototype.h=function(b,c,d){b in this.cd&&(d=d||this,this.cd[b]=this.cd[b].filter(function(f){return f.yW!=c||f.context!=d}),this.cd[b].length==0&&delete this.cd[b]);return this};e.prototype.xkb=function(b){b in this.cd&&delete this.cd[b]};e.prototype.Nqa=function(){this.cd={}};e.prototype.m=function(b,c){c===void 0&&(c=void 0);typeof b=="string"&&
(b=new k(b,c));b.name in this.cd&&(b.source=this,this.WB(b,!0),b.name in this.cd&&this.uYa(b));return this};e.prototype.uYa=function(b){e.B_.push({caller:this,event:b});e.Xca||(e.Xca=!0,n.yE(e.Hva))};e.Hva=function(){for(var b=(new Date).getTime()+1E3;e.B_.length;){var c=e.B_.shift();e.prototype.WB.call(c.caller,c.event,!1);if((new Date).getTime()>b)break}e.B_.length>0?n.yE(e.Hva,1):e.Xca=!1};e.prototype.H6=function(b){return b in this.cd};e.prototype.zW=function(b){if(b in this.cd){b=this.cd[b];
for(var c=0;c<b.length;c++)if(b[c].PKa)return!0}return!1};e.prototype.AO=function(b,c,d){var f=[];b=this.cd[b]||[];for(var m=0;m<b.length;m++){var p=b[m];c!==void 0&&p.AKa!=c||d!==void 0&&p.PKa!=d||f.push(p.Ldb)}return f};e.prototype.WB=function(b,c){var d=this;b.unbindCurrentHandler=function(){p&&d.h(b.name,p.yW,p.context)};if(b.name in this.cd)for(var f=this.cd[b.name],m=0;m<f.length;m++){var p=f[m];if(p.AKa==c)try{p.yW.call(p.context,b)}catch(q){g.PW("Exception handling event "+b.name,q)}}};e.B_=
[];e.Xca=!1;return e}()});
define("tdv/player/view/util/URL",["require","exports"],function(){return function(){function a(){}a.una=function(l){if(this.Rg("crossorigin",!1))return!0;if(this.W6(l)){var k=window.location.protocol+"//"+window.location.hostname;window.location.port&&(k+=":"+window.location.port);return l.substring(0,k.length)!=k}return!1};a.YA=function(l,k){if(this.Zeb(l))l=window.location.protocol+l;else if(!this.W6(l)&&!this.WD(l)){if(k)if(l.indexOf("/")==0){var n=k.indexOf("//"),g="";n>=0&&(g=k.substr(0,n+2),
k=k.substr(n+2));n=k.indexOf("/");n>0&&(k=k.substr(0,n));l=g+k+l}else l=k+l;this.Uo.href=l;l=this.Uo.href}return l};a.Jeb=function(){switch(window.location.protocol){case "http:":case "https:":return!0;default:return!1}};a.Zeb=function(l){return l.indexOf("//")===0};a.W6=function(l){if(!l)return!1;var k=l.indexOf("://");return k>=3&&k<=5?!0:l.indexOf("filesystem:")==0};a.Teb=function(l){return l&&l.indexOf("/pdfjs/")>=0};a.getDirectory=function(l){l=this.YA(l);l=l.split("?")[0];l=l.split("/");l.length>
1&&l.splice(l.length-1,1);return l.join("/")+"/"};a.Ck=function(l){this.IM||(this.IM=this.qxa());return this.IM[l]!==void 0};a.getQueryParameter=function(l){this.IM||(this.IM=this.qxa());return this.IM[l]};a.WPa=function(l,k){var n=l.split(k);l=n[0];(n=n.slice(1).join(k))&&(n=k+n);return[l,n]};a.zD=function(l,k){if(!k)return l;var n=this.WPa(l,"#"),g=n[1];n=this.WPa(n[0],"?");var h=n[1];return h.indexOf(k)>=0?l:n[0]+(h+(h?"&":"?")+k)+g};a.parse=function(l){this.Uo.href=l;l={};l.protocol=this.Uo.protocol;
l.hostname=this.Uo.hostname;l.port=this.Uo.port;l.pathname=this.Uo.pathname;l.search=this.Uo.search;l.hash=this.Uo.hash;l.host=this.Uo.host;var k=l.pathname?l.pathname.lastIndexOf("."):-1;l.Ubb=k>=0?l.pathname.substr(k).toLowerCase():"";return l};a.getExtension=function(l){l=this.parse(l).pathname;var k=l.lastIndexOf(".");return k>=0?l.substr(k,l.length):""};a.Rg=function(l,k){l=(this.getQueryParameter(l)||"").toLowerCase();return this.qgb(l,k)};a.qgb=function(l,k){switch(l){case "false":case "0":case "no":case "n":return!1;
case "true":case "1":case "yes":case "y":return!0;default:return k}};a.mJa=function(l,k){l=parseInt(this.getQueryParameter(l));return isNaN(l)?k:l};a.n6=function(l){l=parseFloat(this.getQueryParameter(l));return isNaN(l)?void 0:l};a.qxa=function(){for(var l={},k=window.location.hash.substring(1).split("&").concat(window.location.search.substring(1).split("&")),n=0;n<k.length;n++){var g=k[n].split("="),h=decodeURIComponent(g[0]);g=g.length>1?decodeURIComponent(g[1]):null;l[h]=g}return l};a.Uo=document.createElement("a");
a.IM=null;a.WD=function(l){return l&&l.indexOf("data:")==0};return a}()});
define("tdv/player/view/util/Device",["require","exports","tdv/utils","tdv/player/view/util/URL"],function(a,l,k,n){var g={};g.pj=TDV.qb.pZ;g.gB=TDV.qb.taa;g.kta=TDV.qb.Asa;g.ymb=TDV.qb.xaa;g.lZ=TDV.qb.uaa;g.Vra=TDV.qb.zsa;g.hmb=TDV.qb.waa;g.vaa=TDV.qb.vaa;g.WP=TDV.qb.WP;g.k$=TDV.qb.k$;g.j$=TDV.qb.j$;g.i$=TDV.qb.i$;g.l$=TDV.qb.l$;g.Ii=TDV.qb.Ii;g.PY=TDV.qb.PY;g.Ok=TDV.qb.Ok;g.Hp=TDV.qb.Hp;g.tK=TDV.qb.tK;g.dF=TDV.qb.dF;g.OY=TDV.qb.OY;g.Xw=TDV.qb.Xw;g.f$=TDV.qb.f$;g.RY=TDV.qb.RY;g.Yw=TDV.qb.Yw;g.Zw=
TDV.qb.Zw;g.SY=TDV.qb.SY;g.g$=TDV.qb.g$;g.UP=TDV.qb.UP;g.uK=TDV.qb.uK;g.vK=TDV.qb.vK;g.VP=TDV.qb.VP;g.kB=TDV.qb.kB;g.sra=TDV.qb.sra;g.jB=TDV.qb.jB;g.mu=TDV.qb.mu;g.nu=TDV.qb.nu;g.QY=TDV.qb.QY;g.h$=TDV.qb.h$;g.m$=TDV.qb.m$;g.UY=TDV.qb.UY;g.ZP=TDV.qb.ZP;g.q$=TDV.qb.q$;g.zK=TDV.qb.zK;g.$P=TDV.qb.$P;g.VY=TDV.qb.VY;g.cQ=TDV.qb.cQ;g.WY=TDV.qb.WY;g.dQ=TDV.qb.dQ;g.aQ=TDV.qb.aQ;g.bQ=TDV.qb.bQ;g.YY=TDV.qb.YY;g.r$=TDV.qb.r$;g.NG=function(e){e="force_"+e;if(n.Ck("debug")&&n.Ck(e))return n.getQueryParameter(e)};
g.GZa=g.NG("os");g.Md=function(){return g.GZa||TDV.qb.Md};g.BZa=g.NG("browser");g.Ub=function(){return g.BZa||TDV.qb.Ub};g.CZa=g.NG("browser_type");g.YN=function(){return g.CZa||TDV.qb.YN};g.vwa=g.NG("browser_subtype");g.Dc=function(){return g.vwa?g.vwa:TDV.qb.Dc};g.DZa=g.NG("browser_version");g.RGa=function(){return g.DZa||TDV.qb.RGa};g.FZa=g.NG("device");g.yk=function(){return g.FZa||TDV.qb.yk};g.ub=function(){return TDV.qb.mobile};g.kZa=function(){for(var e=navigator.userAgent.toLowerCase(),b=
["SM-G960","SM-G965"],c=0;c<b.length;c++)if(e.indexOf(b[c].toLowerCase())>=0)return!0;return!1}();g.QWa=g.Ub()!=g.Hp||navigator.userAgent.indexOf("; wv")<0?!1:!0;g.EZa=!!g.NG("chromewebview");g.hHa=function(){return g.EZa||g.QWa};g.gf=function(){return g.Dc()==g.Yw||g.Dc()==g.Zw||g.Dc()==g.SY||g.Dc()==g.mu||g.Dc()==g.nu||g.Dc()==g.jB};g.e7=function(){return g.qJ()};g.d7=function(){return g.OO()||g.SKa()||g.cLa()||g.XKa()};g.vna=function(){return g.Dc()==g.mu};g.Ska=void 0;g.Hlb=function(){if(g.Ska===
void 0){var e=void 0;g.XD()&&(window.location.hash.split("&").forEach(function(b){b.split("=")[0]=="app-version"&&(e=b.split("=")[1])}),e&&(e=parseInt(e)));e=e||0;g.Ska=e}return g.Ska};g.XD=function(){return g.NW()||g.vna()};g.NW=function(){return g.Dc()==g.nu};g.Web=function(){return g.yk()==g.VY};g.Neb=function(){return g.yk()==g.WY};g.SKa=function(){return g.yk()==g.dQ};g.Ueb=function(){return g.yk()==g.aQ};g.Veb=function(){return g.yk()==g.bQ};g.WKa=function(){return g.yk()==g.cQ};g.XKa=function(){return!!(window.location.hash&&
window.location.hash.indexOf("device=picoxr")>=0)};g.cLa=function(){return g.yk()==g.YY};g.qJ=function(){return g.yk()==g.$P};g.OO=function(){return g.yk()==g.zK};g.OH=void 0;g.Egb=function(){g.OH===void 0&&(g.OH=parseInt(n.getQueryParameter("sts")),isNaN(g.OH)&&(g.gf()&&!g.kZa?g.OH=512:g.ub()&&g.Md()==g.pj?g.OH=512:g.OH=g.ub()?256:1024));return g.OH};g.V4a=function(){if(g.Ub()==g.Ok||g.Ub()==g.Ii)try{var e=/Version\/([0-9]+\.[0-9]+)/i.exec(navigator.userAgent);if(e)return parseFloat(e[1])}catch(b){}}();
g.opa=function(){return g.V4a};g.J0a=function(){try{var e=parseFloat((""+(/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))||!1}catch(b){}e||(e=g.opa());return e}();g.ina=function(){return g.J0a};g.oVa=function(){if(g.Md()==g.gB)try{var e=/Android ([0-9]+\.?[0-9]*)/i.exec(navigator.userAgent);if(e)return parseFloat(e[1])}catch(b){}}();g.B$a=function(){return g.oVa};g.Gxa=function(){var e={WJa:"unknown",
mfb:1},b=document.createElement("canvas");if(b&&(b=b.getContext("webgl")||b.getContext("experimental-webgl"))){var c=b.getExtension("WEBGL_debug_renderer_info");c&&(e.WJa=b.getParameter(c.UNMASKED_RENDERER_WEBGL));e.maxTextureSize=b.getParameter(b.MAX_TEXTURE_SIZE);if(c=b.getExtension("EXT_texture_filter_anisotropic")||b.getExtension("MOZ_EXT_texture_filter_anisotropic")||b.getExtension("WEBKIT_EXT_texture_filter_anisotropic"))e.mfb=b.getParameter(c.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}return e}();g.Edb=
function(){return g.Gxa};g.qVa=function(){var e=g.Gxa.WJa.match(/Apple\s+(.+)\s+GPU/);return e?e[1].toUpperCase():"unknown"}();g.Xmb=function(){return g.qVa};g.w1a=g.yk()==g.ZP?!0:!1;g.pA=function(){return g.w1a};g.YGa=function(){return g.Ub()==g.Ok&&g.opa()>=14};var h=!1;try{h=window.localStorage.getItem("tdvp_video_drift_2")=="true"}catch(e){}g.aeb=function(){return h};g.Qib=function(){h=!0;try{window.localStorage.setItem("tdvp_video_drift_2","true")}catch(e){}};g.TR="ontouchstart"in window||typeof window.PointerEvent!==
"undefined"&&typeof navigator.maxTouchPoints!=="undefined"&&navigator.maxTouchPoints>0?!0:!1;g.H9=function(){return g.TR};g.D1a=n.Ck("touchenabled")?n.Rg("touchenabled"):"ontouchstart"in window?g.Md()==g.kta?!1:!0:!1;g.nr=function(){return g.D1a};g.summary=function(){return["browser: "+g.Ub(),"browserType: "+g.YN(),"browserSubtype: "+g.Dc(),"device: "+g.yk(),"isMobile: "+g.ub(),"chromeWebView: "+g.hHa(),"touchDevice"+g.H9(),"touchEnabled"+g.nr()].join(", ")};g.log=function(){k.log("browser: "+g.Ub());
k.log("browserType: "+g.YN());k.log("browserSubtype: "+g.Dc());k.log("device: "+g.yk());k.log("isMobile: "+g.ub());k.log("chromeWebView: "+g.hHa());k.log("touchDevice: "+g.H9());k.log("touchEnabled: "+g.nr())};return g});
define("tdv/player/view/util/Flags",["require","exports","tdv/player/view/util/URL"],function(a,l,k){a={};a.bx=k.Rg("debug",!1);a.PSa=k.Ck("hqhls");a.qra=k.Rg("audiocontext",!0);a.rmb=k.Rg("testhash",!1);a.ASa=k.Rg("exitvronblur",!1);a.jSa=k.Rg("download",!0);a.$Ta=k.Rg("updatewhilehidden",!1);a.GSa=k.Rg("webgl2",!1);a.FSa=k.Rg("webgl1",!1);a.DSa=k.Rg("lowp",!1);a.Nra=k.Rg("antialias");a.dUa=k.Rg("unlimited-video-resolution",!1);return a});
define("tdv/player/texts",["require"],function(){return{"bg-bg":{mute:"\u0417\u0430\u0433\u043b\u0443\u0448\u0430\u0432\u0430\u043d\u0435","cardboard-v1":"\u0410\u043a\u043e \u043d\u0435 \u0441\u0442\u0435 \u0441\u0438\u0433\u0443\u0440\u043d\u0438 \u043a\u043e\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043d\u0430 Cardboard \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0442\u0435, \u0438\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b \u043d\u0430 \u0445\u043e\u0442\u0441\u043f\u043e\u0442 \u043f\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043d\u0435. \u0421\u043b\u0435\u0434 \u0442\u043e\u0432\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0449\u0435 \u043f\u043e\u0433\u043b\u0435\u0434\u043d\u0435\u0442\u0435 \u0445\u043e\u0442\u0441\u043f\u043e\u0442\u0430 \u0438 \u0449\u0435 \u0438\u0437\u0447\u0430\u043a\u0430\u0442\u0435, \u0434\u043e\u043a\u0430\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435\u0442\u043e \u0441\u0435 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u0430.",
"download-tour":"\u0418\u0437\u0442\u0435\u0433\u043b\u044f\u043d\u0435 \u043d\u0430 \u0442\u0443\u0440\u0430 \u0437\u0430 \u0432\u044a\u0437\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0436\u0434\u0430\u043d\u0435 \u043e\u0444\u043b\u0430\u0439\u043d","change-to-drag-and-release":"\u041f\u0440\u043e\u043c\u0435\u043d\u0435\u0442\u0435 \u0440\u0435\u0436\u0438\u043c\u0430 \u043d\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u041f\u043b\u044a\u0437\u0433\u0430\u043d\u0435 \u0438 \u041f\u0443\u0441\u043a\u0430\u043d\u0435",
accept:"\u041f\u0440\u0438\u0435\u043c\u0435\u0442\u0435",cancel:"\u041e\u0442\u043a\u0430\u0437","storage-not-provided-bookmark":"\u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0442\u043e \u0441\u044a\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0435 \u043e\u0442\u043a\u0430\u0437\u0430\u043d\u043e. \u041e\u043f\u0438\u0442\u0430\u0439\u0442\u0435 \u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0435 \u0442\u0430\u0437\u0438 \u0443\u0435\u0431 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0432 \u043e\u0442\u043c\u0435\u0442\u043a\u0438 \u0438 \u0434\u0430 \u044f \u043f\u0440\u0435\u0437\u0430\u0440\u0435\u0434\u0438\u0442\u0435.",
"dont-display-again":"\u041d\u0435 \u043f\u043e\u043a\u0430\u0437\u0432\u0430\u0439 \u0442\u0430\u0437\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e\u0442\u043d\u043e\u0432\u043e","web-server-required":"\u0422\u043e\u0437\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u0435\u043b\u0435\u043d \u0442\u0443\u0440 \u043d\u0435 \u043c\u043e\u0436\u0435 \u0434\u0430 \u0431\u044a\u0434\u0435 \u043f\u0443\u0441\u043d\u0430\u0442 \u043e\u0442 \u043b\u043e\u043a\u0430\u043b\u043d\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e. \u041c\u043e\u043b\u044f, \u043a\u0430\u0447\u0435\u0442\u0435 \u0433\u043e \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0438 \u043e\u043f\u0438\u0442\u0430\u0439\u0442\u0435 \u043e\u0442\u043d\u043e\u0432\u043e.\n\u0410\u043a\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u0442\u0435, \u0438\u0437\u0442\u0435\u0433\u043b\u0435\u0442\u0435 htm \u0444\u0430\u0439\u043b\u0430 (\u0438\u043b\u0438 \u0446\u044f\u043b\u0430\u0442\u0430 \u043f\u0430\u043f\u043a\u0430 \u043d\u0430 \u0442\u0443\u0440\u0430) \u0432\u044a\u0440\u0445\u0443 \u0438\u043a\u043e\u043d\u0430\u0442\u0430 \u043d\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u0442\u043e TourViewer.",
download:"\u0418\u0437\u0442\u0435\u0433\u043b\u044f\u043d\u0435","change-to-click-and-move":"\u041f\u0440\u043e\u043c\u0435\u043d\u0435\u0442\u0435 \u0440\u0435\u0436\u0438\u043c\u0430 \u043d\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u041a\u043b\u0438\u043a\u0432\u0430\u043d\u0435 \u0438 \u041f\u0440\u0435\u043c\u0435\u0441\u0442\u0432\u0430\u043d\u0435",yes:"\u0434\u0430","delete-downloaded":"\u0418\u0437\u0442\u0440\u0438\u0432\u0430\u043d\u0435","use-safari-for-vr":"\u041f\u0440\u0435\u043f\u043e\u0440\u044a\u0447\u0432\u0430\u043c\u0435 Safari, \u0437\u0430 \u0434\u0430 \u0440\u0430\u0437\u0433\u043b\u0435\u0434\u0430\u0442\u0435 \u0442\u043e\u0437\u0438 \u0442\u0443\u0440 \u0432 \u0440\u0435\u0436\u0438\u043c VR",
"exit-fullscreen":"\u0418\u0437\u043b\u0435\u0437\u0442\u0435 \u043e\u0442 \u0446\u044f\u043b \u0435\u043a\u0440\u0430\u043d",no:"\u043d\u0435","download-failed":"\u0418\u0437\u0442\u0435\u0433\u043b\u044f\u043d\u0435\u0442\u043e \u0441\u0435 \u043f\u0440\u043e\u0432\u0430\u043b\u0438","giroscope-disabled-http":"\u0418\u043c\u0430\u0442\u0435 \u0434\u043e\u0441\u0442\u044a\u043f \u0434\u043e \u0442\u0430\u0437\u0438 \u0443\u0435\u0431 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0447\u0440\u0435\u0437 http, \u0442\u0430\u043a\u0430 \u0447\u0435 \u0434\u043e\u0441\u0442\u044a\u043f\u044a\u0442 \u0434\u043e \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435\u0442\u043e \u0438 \u043e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u044f\u0442\u0430 \u043d\u0430 \u0432\u0430\u0448\u0435\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0438 \u0440\u0435\u0436\u0438\u043c\u044a\u0442 VR \u0441\u0430 \u0434\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0430\u043d\u0438, \u043c\u043e\u043b\u044f, \u043e\u0442\u0432\u043e\u0440\u0435\u0442\u0435 \u0433\u043e \u0447\u0440\u0435\u0437 https, \u0437\u0430 \u0434\u0430 \u0433\u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0430\u0442\u0435.",
"cookies-notice":"\u0422\u0430\u0437\u0438 \u0443\u0435\u0431 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430 \u0431\u0438\u0441\u043a\u0432\u0438\u0442\u043a\u0438 \u0437\u0430 \u0441\u044a\u0431\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u0430\u043d\u043d\u0438 \u0437\u0430 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u043d\u0435\u0442\u043e. \u0417\u0430 \u043f\u043e\u0432\u0435\u0447\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f, \u043c\u043e\u043b\u044f, \u043f\u043e\u0441\u0435\u0442\u0435\u0442\u0435 <a> \u041f\u0440\u0430\u0432\u0438\u043b\u0430\u0442\u0430 \u0437\u0430 \u0431\u0438\u0441\u043a\u0432\u0438\u0442\u043a\u0438\u0442\u0435 </a>.",
"use-cardboard":"\u0418\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0439 Cardboard","launch-default-browser":"\u0421\u0442\u0430\u0440\u0442\u0438\u0440\u0430\u043d\u0435 \u0432 \u0431\u0440\u0430\u0443\u0437\u044a\u0440\u0430 \u043f\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043d\u0435","refresh-downloaded":"\u041e\u0431\u043d\u043e\u0432\u044f\u0432\u0430\u043d\u0435","rotate-device":"\u041c\u043e\u043b\u044f \u0437\u0430\u0432\u044a\u0440\u0442\u0435\u0442\u0435 \u0432\u0430\u0448\u0435\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e",
"exit-vr":"\u0418\u0437\u043b\u0438\u0437\u0430\u043d\u0435 \u043e\u0442 \u0440\u0435\u0436\u0438\u043c VR",reject:"\u041e\u0442\u0445\u0432\u044a\u0440\u043b\u0435\u0442\u0435","disable-measure":"Stop measuring",downloading:"\u0418\u0437\u0442\u0435\u0433\u043b\u044f\u043d\u0435","cardboard-v2":"\u0410\u043a\u043e \u0438\u043c\u0430\u0442\u0435 \u043e\u0447\u0438\u043b\u0430 Cardboard v2, \u043a\u043e\u0438\u0442\u043e \u0440\u0430\u0437\u043f\u043e\u043b\u0430\u0433\u0430\u0442 \u0441 \u0431\u0443\u0442\u043e\u043d, \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0430 \u043f\u043e\u0433\u043b\u0435\u0434\u043d\u0435\u0442\u0435 \u0445\u043e\u0442\u0441\u043f\u043e\u0442\u0430 \u0438 \u0434\u0430 \u043d\u0430\u0442\u0438\u0441\u043d\u0435\u0442\u0435 \u0431\u0443\u0442\u043e\u043d\u0430, \u0437\u0430 \u0434\u0430 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0430\u0442\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435\u0442\u043e \u043c\u0443.",
"enable-video-audio-prompt":"\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u0432\u0438\u0434\u0435\u043e \u0438 \u0430\u0443\u0434\u0438\u043e?","storage-not-provided-launch-from-desktop":"\u041c\u043e\u043b\u044f, \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u0438\u0440\u0430\u0439\u0442\u0435 \u043e\u0431\u0438\u043a\u043e\u043b\u043a\u0430\u0442\u0430 \u043e\u0442 \u0438\u043a\u043e\u043d\u0430\u0442\u0430 \u043d\u0430 \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u0430, \u0437\u0430 \u0434\u0430 \u044f \u0438\u0437\u0442\u0435\u0433\u043b\u0438\u0442\u0435.",
downloaded:"\u0422\u043e\u0437\u0438 \u0442\u0443\u0440 \u0435 \u0438\u0437\u0442\u0435\u0433\u043b\u0435\u043d \u0437\u0430 \u0432\u044a\u0437\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0436\u0434\u0430\u043d\u0435 \u043e\u0444\u043b\u0430\u0439\u043d.","samsung-internet-vr-app-info":"\u0410\u043a\u043e \u0438\u043c\u0430\u0442\u0435 \u043e\u0447\u0438\u043b\u0430 Gear VR, \u0441\u044a\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0438 \u0441 \u0442\u043e\u0432\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u0438 \u0441\u0442\u0435 \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u043b\u0438 Samsung Internet for VR, \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0430 \u0433\u0438 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0442\u0435 \u0438 \u0437\u0430 \u043f\u0440\u0435\u0433\u043b\u0435\u0434 \u043d\u0430 \u0442\u043e\u0432\u0430 \u0441\u044a\u0434\u044a\u0440\u0436\u0430\u043d\u0438\u0435 \u0432\u044a\u0432 VR. \u0422\u0440\u044f\u0431\u0432\u0430 \u0434\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u0435 Samsung Internet \u0431\u0440\u0430\u0443\u0437\u044a\u0440 \u043f\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043d\u0435.",
"samsung-internet-vr-info":"\u0410\u043a\u043e \u0438\u043c\u0430\u0442\u0435 \u043e\u0447\u0438\u043b\u0430 Gear VR, \u0441\u044a\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0438 \u0441 \u0442\u043e\u0432\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u0438 \u0441\u0442\u0435 \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u043b\u0438 Samsung Internet for VR, \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0430 \u0433\u0438 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0442\u0435 \u0438 \u0437\u0430 \u043f\u0440\u0435\u0433\u043b\u0435\u0434 \u043d\u0430 \u0442\u043e\u0432\u0430 \u0441\u044a\u0434\u044a\u0440\u0436\u0430\u043d\u0438\u0435 \u0432\u044a\u0432 VR. \u0421\u0435\u0433\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0440\u044f\u0431\u0432\u0430 \u0434\u0430 \u0441\u043b\u043e\u0436\u0438\u0442\u0435 \u043c\u043e\u0431\u0438\u043b\u043d\u0438\u044f \u0441\u0438 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u0432 \u043e\u0447\u0438\u043b\u0430\u0442\u0430 \u0437\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043d\u0430 \u0440\u0435\u0430\u043b\u043d\u043e\u0441\u0442.",
"enable-video-prompt":"\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u0432\u0438\u0434\u0435\u043e?","giroscope-disabled-safari-request-permission":["\u0414\u043e\u0441\u0442\u044a\u043f\u044a\u0442 \u0437\u0430 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u0438 \u043e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043d\u0430 \u0432\u0430\u0448\u0435\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0438 \u0440\u0435\u0436\u0438\u043c\u044a\u0442 VR \u0441\u0430 \u0434\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0430\u043d\u0438 \u0437\u0430 \u0442\u043e\u0437\u0438 \u0441\u0430\u0439\u0442.",
"\u0417\u0430 \u0434\u0430 \u0432\u0438\u0434\u0438\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043d\u043e \u0442\u0430\u0437\u0438 \u0443\u0435\u0431 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430, \u043c\u043e\u043b\u044f, \u043a\u043b\u0438\u043a\u043d\u0435\u0442\u0435 \u0432\u044a\u0440\u0445\u0443 \u043f\u0440\u043e\u0434\u044a\u043b\u0436\u0438 \u0438 \u043f\u0440\u0438\u0435\u043c\u0435\u0442\u0435 \u0438\u0441\u043a\u0430\u043d\u0435\u0442\u043e \u0437\u0430 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435."],
"storage-not-provided-launch-from-homescreen":"\u041c\u043e\u043b\u044f, \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u0438\u0440\u0430\u0439\u0442\u0435 \u043e\u0431\u0438\u043a\u043e\u043b\u043a\u0430\u0442\u0430 \u043e\u0442 \u0438\u043a\u043e\u043d\u0430\u0442\u0430 \u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u043d\u0438\u044f \u0435\u043a\u0440\u0430\u043d, \u0437\u0430 \u0434\u0430 \u044f \u0438\u0437\u0442\u0435\u0433\u043b\u0438\u0442\u0435.","enter-fullscreen":"\u0412\u043b\u0435\u0437\u0442\u0435 \u0432 \u0446\u044f\u043b \u0435\u043a\u0440\u0430\u043d",
"use-cardboard-v2":"\u0418\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0439 Cardboard v2",unmute:"\u041f\u0443\u0441\u043a\u0430\u043d\u0435 \u0437\u0432\u0443\u043a","enter-vr":"\u0412\u043b\u0435\u0437 \u0432\u044a\u0432 VR \u0441\u044a\u0434\u044a\u0440\u0436\u0430\u043d\u0438\u0435","enable-measure":"Start measuring","use-cardboard-info":"\u041c\u043e\u0436\u0435\u0442\u0435 \u0434\u0430 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0442\u0435 \u0432\u0441\u044f\u043a\u0430\u043a\u0432\u0438 \u0441\u044a\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0438 Google Cardboard \u043e\u0447\u0438\u043b\u0430, \u0437\u0430 \u0434\u0430 \u0432\u0438\u0434\u0438\u0442\u0435 \u0442\u043e\u0432\u0430 \u0441\u044a\u0434\u044a\u0440\u0436\u0430\u043d\u0438\u0435 \u0432\u044a\u0432 VR.",
"ar-mobile-info":"\u041c\u0435\u0434\u043b\u0435\u043d\u043e \u043f\u0440\u0435\u043c\u0435\u0441\u0442\u0432\u0430\u0439\u0442\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u0442\u043e \u0441\u0438, \u0437\u0430 \u0434\u0430 \u0441\u043a\u0430\u043d\u0438\u0440\u0430\u0442\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e\u0442\u043e \u0441\u0438.\n\u0429\u0435 \u0441\u0435 \u043f\u043e\u044f\u0432\u0438 \u043a\u0440\u044a\u0433, \u043a\u043e\u0433\u0430\u0442\u043e \u0431\u044a\u0434\u0435 \u043d\u0430\u043c\u0435\u0440\u0435\u043d \u043f\u043e\u0432\u044a\u0440\u0445\u043d\u043e\u0441\u0442\u0442\u0430.\n\u041d\u0430\u0442\u0438\u0441\u043d\u0435\u0442\u0435 \u043d\u0430 \u0435\u043a\u0440\u0430\u043d\u0430, \u0437\u0430 \u0434\u0430 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u0435 \u043e\u0431\u0435\u043a\u0442\u0430 \u0442\u0430\u043c.",
"use-default-cardboard":"\u0418\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043d\u0435","enable-audio-prompt":"\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u0430\u0443\u0434\u0438\u043e?"},"fi-fi":{mute:"Poista \u00e4\u00e4ni k\u00e4yt\u00f6st\u00e4","cardboard-v1":"Mik\u00e4li et ole varma, mit\u00e4 Cardboard-versiota k\u00e4yt\u00e4t, valitse oletusarvoinen hotspot-hallinta. T\u00e4m\u00e4n j\u00e4lkeen katsomalla hotspotia, toiminto k\u00e4ynnistyy.",
"download-tour":"Lataa t\u00e4m\u00e4 sis\u00e4lt\u00f6 offline-toistoa varten","change-to-drag-and-release":"Muuta ohjaustilaa vet\u00e4m\u00e4ll\u00e4 ja vapauttamalla",accept:"Hyv\u00e4ksy",download:"Lataa","storage-not-provided-bookmark":"Tallennus ep\u00e4onnistui. Kokeile lis\u00e4t\u00e4 t\u00e4m\u00e4 verkkosivu kirjanmerkkeihin ja suorita lataus uudelleen.","dont-display-again":"\u00c4l\u00e4 n\u00e4yt\u00e4 t\u00e4t\u00e4 ilmoitusta uudelleen","web-server-required":"T\u00e4t\u00e4 sis\u00e4lt\u00f6\u00e4 ei voi toistaa paikalliselta asemalta. Lataa sis\u00e4lt\u00f6 internet-palvelimelle ja yrit\u00e4 uudelleen.\nVoit my\u00f6s vet\u00e4\u00e4 htm-tiedoston (tai koko kansion) TourViewer-sovelluskuvakkeen p\u00e4\u00e4lle.",
cancel:"Sulje","change-to-click-and-move":"Muuta ohjaustilaa klikkaamalla ja siirt\u00e4m\u00e4ll\u00e4",yes:"Kyll\u00e4","delete-downloaded":"Poista","use-safari-for-vr":"Suosittelemme Safari-selainta t\u00e4m\u00e4n sis\u00e4ll\u00f6n katseluun VR-tilassa.","exit-fullscreen":"Sulje koko n\u00e4yt\u00f6n n\u00e4kym\u00e4",no:"Ei","download-failed":"Lataus ep\u00e4onnistui","giroscope-disabled-http":"K\u00e4yt\u00e4t t\u00e4t\u00e4 verkkosivua http:n kautta, joten laitteesi liiketunnistimet sek\u00e4 VR-tila on poistettu k\u00e4yt\u00f6st\u00e4. Ota ne k\u00e4ytt\u00f6\u00f6n siirtym\u00e4ll\u00e4 sivulle https:n kautta.",
"cookies-notice":"T\u00e4m\u00e4 verkkosivu k\u00e4ytt\u00e4\u00e4 ev\u00e4steit\u00e4 k\u00e4ytt\u00f6tilastojen ker\u00e4\u00e4miseen. Lis\u00e4tietoja <a>ev\u00e4stek\u00e4yt\u00e4nn\u00f6st\u00e4</a>.","use-cardboard":"K\u00e4yt\u00e4 Cardboardia","launch-default-browser":"K\u00e4ynnist\u00e4 oletusselaimessa","refresh-downloaded":"P\u00e4ivit\u00e4","rotate-device":"K\u00e4\u00e4nn\u00e4 laitettasi","exit-vr":"Poistu VR-tilasta",reject:"Hylk\u00e4\u00e4","disable-measure":"Lopeta mittaaminen",
downloading:"Ladataan","cardboard-v2":"Mik\u00e4li sinulla on Cardboard v2 -virtuaalilasit, joissa on painike, voit katsoa hotspotia ja aktivoida sen painamalla painiketta.","enable-video-audio-prompt":"Otetaanko \u00e4\u00e4ni ja video k\u00e4ytt\u00f6\u00f6n?","storage-not-provided-launch-from-desktop":"Uudelleenk\u00e4ynnist\u00e4 t\u00e4m\u00e4 sis\u00e4lt\u00f6 ty\u00f6p\u00f6yd\u00e4n kuvakkeesta aloittaaksesi lataamisen.",downloaded:"T\u00e4m\u00e4 sis\u00e4lt\u00f6 on ladattu offline-toistoa varten",
"samsung-internet-vr-app-info":"Mik\u00e4li sinulla on t\u00e4m\u00e4n laitteen kanssa yhteensopivat Gear VR -virtuaalilasit ja olet asentanut Samsung Internet for VR:n, voit k\u00e4ytt\u00e4\u00e4 virtuaalilaseja t\u00e4m\u00e4n sis\u00e4ll\u00f6n katseluun VR-tilassa. Sinun on lis\u00e4ksi m\u00e4\u00e4ritett\u00e4v\u00e4 Samsung Internet oletusselaimeksi.","samsung-internet-vr-info":"Mik\u00e4li sinulla on t\u00e4m\u00e4n laitteen kanssa yhteensopivat Gear VR -virtuaalilasit ja olet asentanut Samsung Internet for VR:n, voit k\u00e4ytt\u00e4\u00e4 virtuaalilaseja t\u00e4m\u00e4n sis\u00e4ll\u00f6n katseluun VR-tilassa. Aseta \u00e4lypuhelin virtuaalilaseihin aloittaaksesi.",
"enable-video-prompt":"Otetaanko video k\u00e4ytt\u00f6\u00f6n?","giroscope-disabled-safari-request-permission":["Laitteesi liiketunnistimen k\u00e4ytt\u00f6oikeus ja VR-tila on poistettu k\u00e4yt\u00f6st\u00e4 t\u00e4ll\u00e4 sivustolla.","N\u00e4hd\u00e4ksesi t\u00e4m\u00e4n verkkosivun oikein, valitse jatka ja hyv\u00e4ksy lupapyynt\u00f6 pyydett\u00e4ess\u00e4."],"storage-not-provided-launch-from-homescreen":"Uudelleenk\u00e4ynnist\u00e4 t\u00e4m\u00e4 sis\u00e4lt\u00f6 kotin\u00e4yt\u00f6n kuvakkeesta aloittaaksesi lataamisen",
"enter-fullscreen":"Avaa koko n\u00e4yt\u00f6n n\u00e4kym\u00e4","use-cardboard-v2":"K\u00e4yt\u00e4 Cardboard v2:sta",unmute:"Ota \u00e4\u00e4ni k\u00e4ytt\u00f6\u00f6n","enter-vr":"Siirry VR-tilaan","enable-measure":"Aloita mittaaminen","use-cardboard-info":"Voit k\u00e4ytt\u00e4\u00e4 mit\u00e4 tahansa yhteensopivia Google Cardboard -virtuaalilaseja katsellaksesi t\u00e4t\u00e4 sis\u00e4lt\u00f6\u00e4 VR-tilassa.","ar-mobile-info":"Liikuta laitteesi hitaasti avaruuteesi skannataksesi.\nYmpyr\u00e4 ilmestyy, kun pinta l\u00f6ytyy.\nPit\u00e4k\u00f6nt\u00e4n\u00e4 n\u00e4pp\u00e4in paikkaa objektia siell\u00e4.",
"use-default-cardboard":"K\u00e4yt\u00e4 oletuksena","enable-audio-prompt":"Otetaanko \u00e4\u00e4ni k\u00e4ytt\u00f6\u00f6n?"},"sk-sk":{mute:"St\u00ed\u0161i\u0165","cardboard-v1":"Ak ste si nie ist\u00ed, ktor\u00fa verziu Cardboardu pou\u017e\u00edvate, vyberte si predvolen\u00e9 ovl\u00e1danie hotspotu. Potom sa jednoducho pozriete na hotspot a po\u010dkajte, k\u00fdm sa akcia nespust\u00ed.","download-tour":"Stiahnu\u0165 prehliadku na hranie v offline re\u017eime","change-to-drag-and-release":"Zmeni\u0165 re\u017eim ovl\u00e1dania na Presun\u00fa\u0165 a Uvo\u013eni\u0165",
accept:"s\u00fahlasi\u0165",cancel:"Zru\u0161i\u0165","storage-not-provided-bookmark":"Trval\u00e9 \u00falo\u017eisko odmietnut\u00e9. Sk\u00faste si t\u00fato webov\u00fa str\u00e1nku ulo\u017ei\u0165 a na\u010d\u00edta\u0165 ju znova.","dont-display-again":"Tieto inform\u00e1cie u\u017e nezobrazova\u0165","web-server-required":"T\u00e1to virtu\u00e1lna prehliadka sa ned\u00e1 prehra\u0165 z lok\u00e1lneho disku. Nahrajte ju na internet a sk\u00faste to znova.\nAk chcete, potiahnite s\u00fabor htm (alebo cel\u00fd prie\u010dinok prehliadky) na ikonu aplik\u00e1cie TourViewer.",
download:"Stiahnu\u0165","change-to-click-and-move":"Zmeni\u0165 re\u017eim ovl\u00e1dania na Klikn\u00fa\u0165 a Presun\u00fa\u0165",yes:"\u00e1no","delete-downloaded":"Zmaza\u0165","use-safari-for-vr":"Odpor\u00fa\u010dame pou\u017e\u00edva\u0165 Safari prehliada\u010d pre t\u00fato prehliadku v re\u017eime VR","exit-fullscreen":"Ukon\u010di\u0165 cel\u00fa obrazovku",no:"nie","download-failed":"S\u0165ahovanie zlyhalo","giroscope-disabled-http":"Na t\u00fato webov\u00fa str\u00e1nku pristupujete cez http protokol, preto pr\u00edstup k pohybu a orient\u00e1cii v\u00e1\u0161ho zariadenia a re\u017eim VR s\u00fa deaktivovan\u00e9. Ak ich chcete povoli\u0165, nav\u0161t\u00edvte str\u00e1nku cez https.",
"cookies-notice":"T\u00e1to webov\u00e1 str\u00e1nka pou\u017e\u00edva s\u00fabory cookie na zhroma\u017e\u010fovanie \u0161tatist\u00edk pou\u017e\u00edvania. \u010eal\u0161ie inform\u00e1cie n\u00e1jdete v <a> pravidl\u00e1ch pou\u017e\u00edvania s\u00faborov cookie </a>.","use-cardboard":"Pou\u017eite Cardboard okuliare.","launch-default-browser":"Spusti\u0165 v predvolenom prehliada\u010di","refresh-downloaded":"Obnovi\u0165","rotate-device":"Oto\u010dte svoje zariadenie","exit-vr":"Ukon\u010denie VR",
reject:"Odmietnu\u0165","disable-measure":"Ukon\u010di\u0165 meranie",downloading:"S\u0165ahovanie","cardboard-v2":"Ak m\u00e1te n\u00e1hlavn\u00fa s\u00fapravu Cardboard v2, ktor\u00e1 je dod\u00e1van\u00e1 s tla\u010didlom, m\u00f4\u017eete sa pozrie\u0165 na hotspot a stla\u010den\u00edm tla\u010didla spusti\u0165 akciu.","enable-video-audio-prompt":"Povoli\u0165 video a zvuk?","storage-not-provided-launch-from-desktop":"Znovu na\u010d\u00edtajte prehliadku pomocou desktop ikony pre jej stiahnite.",
downloaded:"T\u00e1to prehliadka je stiahnut\u00e1 na hranie v offline re\u017eime.","samsung-internet-vr-app-info":"Ak m\u00e1te Gear VR sl\u00fachadl\u00e1\u00e1 kompatibiln\u00e9 s t\u00fdmto zariaden\u00edm a m\u00e1te nain\u0161talovan\u00fd program Samsung Internet pre VR, m\u00f4\u017eete ho tie\u017e pou\u017ei\u0165 na prezeranie tohto obsahu vo VR. Mus\u00edte si nastavi\u0165 Samsung Internet ako predvolen\u00fd prehliada\u010d.","samsung-internet-vr-info":"Ak m\u00e1te Gear VR sl\u00fachadl\u00e1 kompatibiln\u00e9 s t\u00fdmto zariaden\u00edm a m\u00e1te nain\u0161talovan\u00fd program Samsung Internet pre VR, m\u00f4\u017eete ho tie\u017e pou\u017ei\u0165 na prezeranie tohto obsahu vo VR. Sta\u010d\u00ed teraz vlo\u017ei\u0165 mobiln\u00fd telef\u00f3n do n\u00e1hlavnej s\u00fapravy.",
"enable-video-prompt":"Povoli\u0165 video?","giroscope-disabled-safari-request-permission":["Pre t\u00fato str\u00e1nku s\u00fa pr\u00edstup k pohybu a orient\u00e1cii v\u00e1\u0161ho zariadenia a re\u017eim VR deaktivovan\u00e9.","Aby ste korektne videli t\u00fato webov\u00fa str\u00e1nku, pros\u00edm kliknite pokra\u010dova\u0165 a akceptujte po\u017eadovan\u00e9 povolenie."],"storage-not-provided-launch-from-homescreen":"Znovu na\u010d\u00edtajte prehliadku pomocou ikony na ploche pre jej stiahnite.",
"enter-fullscreen":"Prejs\u0165 na cel\u00fa obrazovku","use-cardboard-v2":"Pou\u017eite Cardboard v2",unmute:"Zapn\u00fa\u0165 zvuk","enter-vr":"Vlo\u017ei\u0165 VR obsah","enable-measure":"Za\u010da\u0165 meranie","use-cardboard-info":"Na zobrazenie tohto obsahu vo VR m\u00f4\u017eete pou\u017ei\u0165 \u013eubovo\u013en\u00fa kompatibiln\u00fa n\u00e1hlavn\u00fa s\u00fapravu Google Cardboard.","ar-mobile-info":"Pomaly pohybujte svojim zariaden\u00edm, aby ste skanovali svoj priestor.\nKruh sa zobraz\u00ed, ke\u010f sa n\u00e1jde povrch.\nDotknite sa obrazovky, aby ste umiestnili objekt tam.",
"use-default-cardboard":"Pou\u017ei\u0165 predvolen\u00e9","enable-audio-prompt":"Povoli\u0165 zvuk?"},"uk-ua":{mute:"\u0412\u0438\u043c\u043a\u043d\u0443\u0442\u0438 \u0437\u0432\u0443\u043a","cardboard-v1":"\u042f\u043a\u0449\u043e \u0432\u0438 \u043d\u0435 \u0432\u043f\u0435\u0432\u043d\u0435\u043d\u0456, \u044f\u043a\u0443 \u0432\u0435\u0440\u0441\u0456\u044e Cardboard \u0432\u0438 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0454\u0442\u0435, \u0432\u0438\u0431\u0435\u0440\u0456\u0442\u044c \u0442\u043e\u0447\u043a\u0443 \u0434\u043e\u0441\u0442\u0443\u043f\u0443 \u0437\u0430 \u0437\u0430\u043c\u043e\u0432\u0447\u0443\u0432\u0430\u043d\u043d\u044f\u043c. \u041f\u043e\u0442\u0456\u043c \u0432\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0434\u0438\u0432\u0438\u0442\u0435\u0441\u044f \u043d\u0430 \u0442\u043e\u0447\u043a\u0443 \u0442\u0430 \u043f\u043e\u0447\u0435\u043a\u0430\u0439\u0442\u0435, \u0434\u043e\u043a\u0438 \u0434\u0456\u044f \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c\u0441\u044f.",
"download-tour":"\u0417\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0442\u0435 \u0442\u0443\u0440 \u0434\u043b\u044f \u0432\u0456\u0434\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u0432 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u043c\u0443 \u0440\u0435\u0436\u0438\u043c\u0456","change-to-drag-and-release":"\u0417\u043c\u0456\u043d\u0456\u0442\u044c \u0440\u0435\u0436\u0438\u043c \u043a\u0435\u0440\u0443\u0432\u0430\u043d\u043d\u044f \u043d\u0430 \u041f\u0435\u0440\u0435\u0442\u044f\u0433\u043d\u0456\u0442\u044c \u0456 \u0432\u0456\u0434\u043f\u0443\u0441\u0442\u0456\u0442\u044c",
accept:"\u041f\u0440\u0438\u0439\u043c\u0456\u0442\u044c",cancel:"\u0412\u0456\u0434\u043c\u0456\u043d\u0438\u0442\u0438","storage-not-provided-bookmark":"\u041f\u043e\u0441\u0442\u0456\u0439\u043d\u0435 \u0437\u0431\u0435\u0440\u0456\u0433\u0430\u043d\u043d\u044f \u0437\u0430\u0431\u043e\u0440\u043e\u043d\u0435\u043d\u043e. \u0421\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0434\u043e\u0434\u0430\u0442\u0438 \u0446\u044e \u0432\u0435\u0431-\u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0443 \u0432 \u0437\u0430\u043a\u043b\u0430\u0434\u043a\u0438 \u0442\u0430 \u043f\u0435\u0440\u0435\u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0438\u0442\u0438 \u0457\u0457.",
"dont-display-again":"\u041d\u0435 \u043f\u043e\u043a\u0430\u0437\u0443\u0439\u0442\u0435 \u0446\u044e \u0456\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0456\u044e \u0437\u043d\u043e\u0432\u0443","web-server-required":"\u0426\u0435\u0439 \u0432\u0456\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0438\u0439 \u0442\u0443\u0440 \u043d\u0435 \u043c\u043e\u0436\u043d\u0430 \u0432\u0456\u0434\u0442\u0432\u043e\u0440\u0438\u0442\u0438 \u0437 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430. \u0417\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0442\u0435 \u0439\u043e\u0433\u043e \u0432 \u0406\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0456 \u043f\u043e\u0432\u0442\u043e\u0440\u0456\u0442\u044c \u0441\u043f\u0440\u043e\u0431\u0443.\n\u042f\u043a\u0449\u043e \u0431\u0430\u0436\u0430\u0454\u0442\u0435, \u043f\u0435\u0440\u0435\u0442\u044f\u0433\u043d\u0456\u0442\u044c \u0444\u0430\u0439\u043b htm (\u0430\u0431\u043e \u0432\u0441\u044e \u043f\u0430\u043f\u043a\u0443 \u0442\u0443\u0440\u0443) \u043d\u0430 \u043f\u0456\u043a\u0442\u043e\u0433\u0440\u0430\u043c\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u0438 TourViewer.",
download:"\u0417\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0438\u0442\u0438","change-to-click-and-move":"\u0417\u043c\u0456\u043d\u0456\u0442\u044c \u0440\u0435\u0436\u0438\u043c \u043a\u0435\u0440\u0443\u0432\u0430\u043d\u043d\u044f \u043d\u0430 \u041a\u043b\u0430\u0446\u043d\u0456\u0442\u044c \u0456 \u043f\u0435\u0440\u0435\u043c\u0456\u0441\u0442\u0456\u0442\u044c",yes:"\u0442\u0430\u043a","delete-downloaded":"\u0412\u0438\u0434\u0430\u043b\u0438\u0442\u0438","use-safari-for-vr":"\u041c\u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0454\u043c\u043e Safari \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0433\u043b\u044f\u0434\u0443 \u0446\u044c\u043e\u0433\u043e \u0442\u0443\u0440\u0443 \u0432 \u0440\u0435\u0436\u0438\u043c\u0456 VR",
"exit-fullscreen":"\u0412\u0438\u0439\u0442\u0438 \u0437 \u043f\u043e\u0432\u043d\u043e\u0435\u043a\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0443",no:"\u043d\u0456","download-failed":"\u041d\u0435 \u0432\u0434\u0430\u043b\u043e\u0441\u044f \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0438\u0442\u0438","giroscope-disabled-http":"\u0412\u0438 \u043e\u0442\u0440\u0438\u043c\u0443\u0454\u0442\u0435 \u0434\u043e\u0441\u0442\u0443\u043f \u0434\u043e \u0446\u0456\u0454\u0457 \u0432\u0435\u0431-\u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 http, \u0442\u043e\u043c\u0443 \u0434\u043e\u0441\u0442\u0443\u043f \u0434\u043e \u0440\u0443\u0445\u0443 \u0442\u0430 \u043e\u0440\u0456\u0454\u043d\u0442\u0430\u0446\u0456\u0457 \u0432\u0430\u0448\u043e\u0433\u043e \u043f\u0440\u0438\u0441\u0442\u0440\u043e\u044e \u0442\u0430 \u0440\u0435\u0436\u0438\u043c VR \u0432\u0438\u043c\u043a\u043d\u0435\u043d\u043e. \u0429\u043e\u0431 \u0443\u0432\u0456\u043c\u043a\u043d\u0443\u0442\u0438 \u0457\u0445, \u043f\u0435\u0440\u0435\u0439\u0434\u0456\u0442\u044c \u0434\u043e \u043d\u0438\u0445 \u0447\u0435\u0440\u0435\u0437 https.",
"cookies-notice":"\u0426\u044f \u0432\u0435\u0431-\u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0430 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0454 \u0444\u0430\u0439\u043b\u0438 cookie \u0434\u043b\u044f \u0437\u0431\u043e\u0440\u0443 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f. \u0414\u043b\u044f \u043e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f \u0434\u043e\u0434\u0430\u0442\u043a\u043e\u0432\u043e\u0457 \u0456\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0456\u0457 \u0432\u0456\u0434\u0432\u0456\u0434\u0430\u0439\u0442\u0435 <a> \u041f\u043e\u043b\u0456\u0442\u0438\u043a\u0443 \u0449\u043e\u0434\u043e \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f \u0444\u0430\u0439\u043b\u0456\u0432 cookie</a>.",
"use-cardboard":"\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0439\u0442\u0435 Cardboard","launch-default-browser":"\u0417\u0430\u043f\u0443\u0441\u0442\u0456\u0442\u044c \u0443 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0456 \u0437\u0430 \u0437\u0430\u043c\u043e\u0432\u0447\u0443\u0432\u0430\u043d\u043d\u044f\u043c","refresh-downloaded":"\u041e\u043d\u043e\u0432\u0438\u0442\u0438","rotate-device":"\u0411\u0443\u0434\u044c \u043b\u0430\u0441\u043a\u0430, \u043f\u043e\u0432\u0435\u0440\u043d\u0456\u0442\u044c \u0441\u0432\u0456\u0439 \u043f\u0440\u0438\u0441\u0442\u0440\u0456\u0439",
"exit-vr":"\u0412\u0438\u0439\u0434\u0456\u0442\u044c \u0456\u0437 VR",reject:"\u0412\u0456\u0434\u0445\u0438\u043b\u0438\u0442\u0438","disable-measure":"\u041f\u0440\u0438\u043f\u0438\u043d\u0456\u0442\u044c \u0432\u0438\u043c\u0456\u0440\u044e\u0432\u0430\u043d\u043d\u044f",downloading:"\u0417\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u043d\u044f","cardboard-v2":"\u042f\u043a\u0449\u043e \u0443 \u0432\u0430\u0441 \u0454 \u0433\u0430\u0440\u043d\u0456\u0442\u0443\u0440\u0430 Cardboard v2, \u044f\u043a\u0430 \u043f\u043e\u0441\u0442\u0430\u0447\u0430\u0454\u0442\u044c\u0441\u044f \u0437 \u043a\u043d\u043e\u043f\u043a\u043e\u044e, \u0432\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0434\u0438\u0432\u0438\u0442\u0438\u0441\u044f \u043d\u0430 \u0442\u043e\u0447\u043a\u0443 \u0442\u0430 \u043d\u0430\u0442\u0438\u0441\u043d\u0443\u0442\u0438 \u043a\u043d\u043e\u043f\u043a\u0443, \u0449\u043e\u0431 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0438 \u0457\u0457.",
"enable-video-audio-prompt":"\u0423\u0432\u0456\u043c\u043a\u043d\u0443\u0442\u0438 \u0432\u0456\u0434\u0435\u043e \u0442\u0430 \u0430\u0443\u0434\u0456\u043e?","storage-not-provided-launch-from-desktop":"\u0429\u043e\u0431 \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0438\u0442\u0438, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0456\u0442\u044c \u043e\u0433\u043b\u044f\u0434 \u0456\u0437 \u0437\u043d\u0430\u0447\u043a\u0430 \u043d\u0430 \u0440\u043e\u0431\u043e\u0447\u043e\u043c\u0443 \u0441\u0442\u043e\u043b\u0456.",
downloaded:"\u0426\u0435\u0439 \u0442\u0443\u0440 \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u043e \u0434\u043b\u044f \u0432\u0456\u0434\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u0432 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u043c\u0443 \u0440\u0435\u0436\u0438\u043c\u0456.","samsung-internet-vr-app-info":"\u042f\u043a\u0449\u043e \u0443 \u0432\u0430\u0441 \u0454 \u0433\u0430\u0440\u043d\u0456\u0442\u0443\u0440\u0430 Gear VR, \u0441\u0443\u043c\u0456\u0441\u043d\u0430 \u0437 \u0446\u0438\u043c \u043f\u0440\u0438\u0441\u0442\u0440\u043e\u0454\u043c, \u0456 \u0432\u0438 \u0432\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 Samsung Internet \u0434\u043b\u044f VR, \u0432\u0438 \u0442\u0430\u043a\u043e\u0436 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0457\u0457 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0433\u043b\u044f\u0434\u0443 \u0446\u044c\u043e\u0433\u043e \u0432\u043c\u0456\u0441\u0442\u0443 \u0443 VR, \u0432\u0430\u043c \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u0437\u0440\u043e\u0431\u0438\u0442\u0438 Samsung Internet \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u043c \u0437\u0430 \u0437\u0430\u043c\u043e\u0432\u0447\u0443\u0432\u0430\u043d\u043d\u044f\u043c.",
"samsung-internet-vr-info":"\u042f\u043a\u0449\u043e \u0443 \u0432\u0430\u0441 \u0454 \u0433\u0430\u0440\u043d\u0456\u0442\u0443\u0440\u0430 Gear VR, \u0441\u0443\u043c\u0456\u0441\u043d\u0430 \u0437 \u0446\u0438\u043c \u043f\u0440\u0438\u0441\u0442\u0440\u043e\u0454\u043c, \u0456 \u0432\u0438 \u0432\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 Samsung Internet \u0434\u043b\u044f \u0432\u0456\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0457 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0456, \u0432\u0438 \u0442\u0430\u043a\u043e\u0436 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0457\u0457 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0433\u043b\u044f\u0434\u0443 \u0446\u044c\u043e\u0433\u043e \u0432\u043c\u0456\u0441\u0442\u0443 \u0443 VR, \u0432\u0430\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0440\u0430\u0437 \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u043f\u0456\u0434\u2019\u0454\u0434\u043d\u0430\u0442\u0438 \u043c\u043e\u0431\u0456\u043b\u044c\u043d\u0438\u0439 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u0434\u043e \u0433\u0430\u0440\u043d\u0456\u0442\u0443\u0440\u0438.",
"enable-video-prompt":"\u0423\u0432\u0456\u043c\u043a\u043d\u0443\u0442\u0438 \u0432\u0456\u0434\u0435\u043e?","giroscope-disabled-safari-request-permission":["\u0414\u043e\u0441\u0442\u0443\u043f \u0434\u043e \u0440\u0443\u0445\u0443 \u0442\u0430 \u043e\u0440\u0456\u0454\u043d\u0442\u0430\u0446\u0456\u0457 \u0432\u0430\u0448\u043e\u0433\u043e \u043f\u0440\u0438\u0441\u0442\u0440\u043e\u044e, \u0430 \u0442\u0430\u043a\u043e\u0436 \u0440\u0435\u0436\u0438\u043c VR \u0432\u0438\u043c\u043a\u043d\u0435\u043d\u043e \u0434\u043b\u044f \u0446\u044c\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0443.",
"\u0429\u043e\u0431 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0433\u043b\u044f\u043d\u0443\u0442\u0438 \u0446\u044e \u0432\u0435\u0431-\u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0443, \u043d\u0430\u0442\u0438\u0441\u043d\u0456\u0442\u044c \u00ab\u041f\u0440\u043e\u0434\u043e\u0432\u0436\u0438\u0442\u0438\u00bb \u0442\u0430 \u043f\u0440\u0438\u0439\u043c\u0456\u0442\u044c \u0437\u0430\u043f\u0438\u0442 \u043d\u0430 \u0434\u043e\u0437\u0432\u0456\u043b, \u044f\u043a\u0449\u043e \u0437\u2019\u044f\u0432\u0438\u0442\u044c\u0441\u044f \u0437\u0430\u043f\u0438\u0442."],
"storage-not-provided-launch-from-homescreen":"\u0411\u0443\u0434\u044c \u043b\u0430\u0441\u043a\u0430, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0456\u0442\u044c \u0442\u0443\u0440 \u0437\u0456 \u0437\u043d\u0430\u0447\u043a\u0430 \u0433\u043e\u043b\u043e\u0432\u043d\u043e\u0433\u043e \u0435\u043a\u0440\u0430\u043d\u0430, \u0449\u043e\u0431 \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0438\u0442\u0438.","enter-fullscreen":"\u041f\u0435\u0440\u0435\u0439\u0434\u0456\u0442\u044c \u0443 \u043f\u043e\u0432\u043d\u043e\u0435\u043a\u0440\u0430\u043d\u043d\u0438\u0439 \u0440\u0435\u0436\u0438\u043c",
"use-cardboard-v2":"\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0439\u0442\u0435 Cardboard v2",unmute:"\u0423\u0432\u0456\u043c\u043a\u043d\u0443\u0442\u0438 \u0437\u0432\u0443\u043a","enter-vr":"\u041e\u0431\u0435\u0440\u0456\u0442\u044c \u0432\u043c\u0456\u0441\u0442 VR","enable-measure":"\u041f\u043e\u0447\u043d\u0456\u0442\u044c \u0432\u0438\u043c\u0456\u0440\u044e\u0432\u0430\u0442\u0438","use-cardboard-info":"\u0412\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0431\u0443\u0434\u044c-\u044f\u043a\u0443 \u0441\u0443\u043c\u0456\u0441\u043d\u0443 \u0433\u0430\u0440\u043d\u0456\u0442\u0443\u0440\u0443 Google Cardboard \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0433\u043b\u044f\u0434\u0443 \u0446\u044c\u043e\u0433\u043e \u0432\u043c\u0456\u0441\u0442\u0443 \u0443 VR.",
"ar-mobile-info":"\u041f\u043e\u0432\u0456\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u043c\u0456\u0449\u0443\u0439\u0442\u0435 \u043f\u0440\u0438\u0441\u0442\u0440\u0456\u0439, \u0449\u043e\u0431 \u043f\u0440\u043e\u0441\u043a\u0430\u043d\u0443\u0432\u0430\u0442\u0438 \u043f\u0440\u043e\u0441\u0442\u0456\u0440.\n\u041a\u043e\u043b\u0438 \u0431\u0443\u0434\u0435 \u0437\u043d\u0430\u0439\u0434\u0435\u043d\u043e \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u044e, \u0437\u2019\u044f\u0432\u0438\u0442\u044c\u0441\u044f \u043a\u0456\u043b\u044c\u0446\u0435.\n\u0422\u043e\u0440\u043a\u043d\u0456\u0442\u044c\u0441\u044f \u0435\u043a\u0440\u0430\u043d\u0430, \u0449\u043e\u0431 \u0440\u043e\u0437\u043c\u0456\u0441\u0442\u0438\u0442\u0438 \u0442\u0430\u043c \u043e\u0431\u2019\u0454\u043a\u0442.",
"use-default-cardboard":"\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0437\u0430 \u0437\u0430\u043c\u043e\u0432\u0447\u0443\u0432\u0430\u043d\u043d\u044f\u043c","enable-audio-prompt":"\u0423\u0432\u0456\u043c\u043a\u043d\u0443\u0442\u0438 \u0430\u0443\u0434\u0456\u043e?"},"en-us":{mute:"Mute","cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.",
"download-tour":"Download Tour for offline playing","change-to-drag-and-release":"Change control mode to Drag and Release",accept:"Accept",cancel:"Cancel","storage-not-provided-bookmark":"Persistent storage denied. Try bookmarking this webpage and reloading it.","dont-display-again":"Don't display this info again","web-server-required":"This virtual tour cannot be played from a local drive. Please upload it to the internet and try again.\nIf you prefer, drag the htm file (or the entire folder of the tour) onto the icon of the TourViewer app.",
download:"Download","change-to-click-and-move":"Change control mode to Click and Move",yes:"yes","delete-downloaded":"Delete","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"Exit fullscreen",no:"no","download-failed":"Download failed","giroscope-disabled-http":"You are accessing this webpage through http so your device's motion and orientation access and VR mode are disabled, please access it through https to enable them.","cookies-notice":"This web page uses cookies to collect usage statistics. For more information, please visit the <a>Cookie Policy</a>.",
"use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","refresh-downloaded":"Refresh","rotate-device":"Please rotate your device","exit-vr":"Exit VR",reject:"Reject","disable-measure":"Stop measuring",downloading:"Downloading","cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"Enable video and audio?","storage-not-provided-launch-from-desktop":"Please relaunch the tour from the desktop icon to download.",
downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.",
"enable-video-prompt":"Enable video?","giroscope-disabled-safari-request-permission":["Your device's motion and orientation access and VR mode are disabled for this site.","To properly see this webpage, please click continue and accept the permission request if prompted."],"storage-not-provided-launch-from-homescreen":"Please relaunch the tour from the home screen icon to download.","enter-fullscreen":"Enter fullscreen","use-cardboard-v2":"Use Cardboard v2",unmute:"Unmute","enter-vr":"Enter VR content",
"enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","ar-mobile-info":"Slowly move your device to scan your space.\nA ring will appear when a surface is found.\nTap the screen to place the object there.","use-default-cardboard":"Use Default","enable-audio-prompt":"Enable audio?"},"sv-se":{mute:"Inaktivera ljud","cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.",
"download-tour":"Download Tour for offline playing","change-to-drag-and-release":"\u00c4ndra kontrolll\u00e4ge f\u00f6r att dra och sl\u00e4ppa",accept:"Acceptera",download:"Download","storage-not-provided-bookmark":"Persistent storage denied. Try bookmarking this webpage and reloading it.","dont-display-again":"Don't display this info again","web-server-required":"This virtual tour cannot be played from a local drive. Please upload it to the internet and try again.\nIf you prefer, drag the htm file (or the entire folder of the tour) onto the icon of the TourViewer app.",
cancel:"Cancel","change-to-click-and-move":"\u00c4ndra kontrolll\u00e4ge f\u00f6r att klicka och flytta",yes:"ja","delete-downloaded":"Delete","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"Avsluta fullsk\u00e4rmen",no:"Nej","download-failed":"Download failed","giroscope-disabled-http":"You are accessing this webpage through http so your device's motion and orientation access and VR mode are disabled, please access it through https to enable them.","cookies-notice":"Denna webbsida anv\u00e4nder cookies f\u00f6r att samla in anv\u00e4ndningsstatistik. F\u00f6r mer information, bes\u00f6k <a>Cookie Policy</a>.",
"use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","refresh-downloaded":"Refresh","rotate-device":"Please rotate your device","exit-vr":"Exit VR",reject:"Avvisa","disable-measure":"Stop measuring",downloading:"Downloading","cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"Aktivera ljud och video?","storage-not-provided-launch-from-desktop":"Please relaunch the tour from the desktop icon to download.",
downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.",
"enable-video-prompt":"Aktivera video?","giroscope-disabled-safari-request-permission":["Your device's motion and orientation access and VR mode are disabled for this site.","To properly see this webpage, please click continue and accept the permission request if prompted."],"storage-not-provided-launch-from-homescreen":"Please relaunch the tour from the home screen icon to download.","enter-fullscreen":"Ange fullsk\u00e4rm","use-cardboard-v2":"Use Cardboard v2",unmute:"Aktivera ljud","enter-vr":"Enter VR content",
"enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","ar-mobile-info":"Flytta enheten sakta f\u00f6r att skanna rummet.\nEn ring kommer att visas n\u00e4r en yta hittas.\nTryck p\u00e5 sk\u00e4rmen f\u00f6r att placera objektet d\u00e4r.","use-default-cardboard":"Use Default","enable-audio-prompt":"Aktivera ljud?"},"id-id":{mute:"Mute","cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.",
"download-tour":"Download Tour for offline playing","change-to-drag-and-release":"Change control mode to Drag and Release",accept:"Menerima",cancel:"Cancel","storage-not-provided-bookmark":"Persistent storage denied. Try bookmarking this webpage and reloading it.","dont-display-again":"Don't display this info again","web-server-required":"This virtual tour cannot be played from a local drive. Please upload it to the internet and try again.\nIf you prefer, drag the htm file (or the entire folder of the tour) onto the icon of the TourViewer app.",
download:"Download","change-to-click-and-move":"Change control mode to Click and Move",yes:"yes","delete-downloaded":"Delete","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"Exit fullscreen",no:"no","download-failed":"Download failed","giroscope-disabled-http":"You are accessing this webpage through http so your device's motion and orientation access and VR mode are disabled, please access it through https to enable them.","cookies-notice":"Halaman web ini menggunakan cookie untuk mengumpulkan statistik penggunaan. Untuk informasi lebih lanjut, silakan kunjungi <a>Kebijakan Cookie</a>.",
"use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","refresh-downloaded":"Refresh","rotate-device":"Please rotate your device","exit-vr":"Exit VR",reject:"Menolak","disable-measure":"Stop measuring",downloading:"Downloading","cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"Enable video and audio?","storage-not-provided-launch-from-desktop":"Please relaunch the tour from the desktop icon to download.",
downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.",
"enable-video-prompt":"Enable video?","giroscope-disabled-safari-request-permission":["Your device's motion and orientation access and VR mode are disabled for this site.","To properly see this webpage, please click continue and accept the permission request if prompted."],"storage-not-provided-launch-from-homescreen":"Please relaunch the tour from the home screen icon to download.","enter-fullscreen":"Enter fullscreen","use-cardboard-v2":"Use Cardboard v2",unmute:"Unmute","enter-vr":"Enter VR content",
"enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","ar-mobile-info":"Gerakkan perangkat Anda perlahan untuk memindai ruang Anda.\nLingkaran akan muncul ketika permukaan ditemukan.\nSentuh layar untuk meletakkan objek di sana.","use-default-cardboard":"Use Default","enable-audio-prompt":"Enable audio?"},"pt-br":{mute:"Desativar som","cardboard-v1":"Se voc\u00ea n\u00e3o tiver certeza de qual vers\u00e3o do Cardboard est\u00e1 usando, selecione o controle de ponto de acesso padr\u00e3o. Voc\u00ea simplesmente olha para um ponto de acesso e espera at\u00e9 que a a\u00e7\u00e3o seja acionada.",
"download-tour":"Download do Tour para reprodu\u00e7\u00e3o offline","change-to-drag-and-release":"Alterar controle para arrastar e soltar",accept:"Aceitar",cancel:"Cancelar","storage-not-provided-bookmark":"Armazenamento persistente negado. Tente marcar esta p\u00e1gina da Web e recarreg\u00e1-la.","dont-display-again":"N\u00e3o exibir essas informa\u00e7\u00f5es novamente","web-server-required":"Este passeio virtual n\u00e3o pode ser reproduzido a partir de uma unidade local. Envie-o para a Internet e tente novamente.\nSe preferir, arraste o arquivo htm (ou toda a pasta do tour) para o \u00edcone do aplicativo TourViewer.",
download:"Download","change-to-click-and-move":"Alterar controle para clicar e mover",yes:"sim","delete-downloaded":"Apagar","use-safari-for-vr":"Recomendamos o Safari para ver este passeio no modo VR","exit-fullscreen":"Sair da tela cheia",no:"n\u00e3o","download-failed":"Falha no Download","giroscope-disabled-http":"Voc\u00ea est\u00e1 acessando esta p\u00e1gina da Web por meio do http, para que o acesso \u00e0 orienta\u00e7\u00e3o e movimento do dispositivo e o modo VR sejam desativados, acesse-o atrav\u00e9s de https para ativ\u00e1-los.",
"cookies-notice":"Esta p\u00e1gina da web usa cookies para coletar estat\u00edsticas de uso. Para obter mais informa\u00e7\u00f5es, visite a <a>Pol\u00edtica de cookies</a>.","use-cardboard":"Use Cardboard","launch-default-browser":"Iniciar no navegador padr\u00e3o","refresh-downloaded":"Atualizar","rotate-device":"Por favor, gire seu dispositivo","exit-vr":"Sair do VR",reject:"Rejeitar","disable-measure":"Stop measuring",downloading:"Baixando","cardboard-v2":"Se voc\u00ea tiver um fone de ouvido Cardboard v2, que vem com um bot\u00e3o, poder\u00e1 observar um ponto de acesso e pressionar o bot\u00e3o para acionar sua a\u00e7\u00e3o.",
"enable-video-audio-prompt":"Ativar \u00e1udio e v\u00eddeo?","storage-not-provided-launch-from-desktop":"Por favor, reinicie o tour no \u00edcone da \u00e1rea de trabalho para fazer o download.",downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"Se voc\u00ea possui um fone de ouvido Gear VR compat\u00edvel com este dispositivo e instalou o Samsung Internet for VR, tamb\u00e9m pode us\u00e1-lo para visualizar esse conte\u00fado em VR. Voc\u00ea precisa tornar o Samsung Internet o seu padr\u00e3o. browser.",
"samsung-internet-vr-info":"Se voc\u00ea possui um fone de ouvido Gear VR compat\u00edvel com este dispositivo e instalou o Samsung Internet for VR, tamb\u00e9m pode us\u00e1-lo para visualizar esse conte\u00fado em VR. Basta colocar o celular no fone de ouvido agora.","enable-video-prompt":"Ativar v\u00eddeo?","giroscope-disabled-safari-request-permission":["O acesso a movimento e orienta\u00e7\u00e3o do dispositivo e o modo VR est\u00e3o desativados para este site.","Para ver corretamente esta p\u00e1gina da web, clique em continuar e aceite a solicita\u00e7\u00e3o de permiss\u00e3o, se solicitado."],
"storage-not-provided-launch-from-homescreen":"Reinicie o tour no \u00edcone da tela inicial para fazer o download.","enter-fullscreen":"Entrar em tela cheia","use-cardboard-v2":"Use Cardboard v2",unmute:"Ativar som","enter-vr":"Inserir conte\u00fado VR","enable-measure":"Start measuring","use-cardboard-info":"Voc\u00ea pode usar qualquer fone de ouvido compat\u00edvel do Google Cardboard para visualizar este conte\u00fado em VR","ar-mobile-info":"Mova lentamente o dispositivo para escanear o espa\u00e7o.\nUm anel aparecer\u00e1 quando uma superf\u00edcie for encontrada.\nToque na tela para colocar o objeto ali.",
"use-default-cardboard":"Use o padr\u00e3o","enable-audio-prompt":"Ativar \u00e1udio?"},"it-it":{mute:"Disattiva audio","cardboard-v1":"Se non sei sicuro della versione di Cardboard, seleziona il controllo hotspot predefinito. Baster\u00e0 guardare un hotspot e attendere che l'azione venga attivata.","download-tour":"Scarica il tour per la riproduzione offline","change-to-drag-and-release":"Cambia modalit\u00e0 di controllo in Trascina e Rilascia",accept:"Accetta",cancel:"Annulla","storage-not-provided-bookmark":"Archiviazione persistente negata. Prova ad aggiungere questa pagina ai segnalibri e ricaricala.",
"dont-display-again":"Non mostrare pi\u00f9 queste informazioni","web-server-required":"Questo tour virtuale non pu\u00f2 essere riprodotto da un'unit\u00e0 locale. Caricalo su internet e riprova.\nIn alternativa, trascina il file html (o l'intera cartella del tour) sull'icona dell'app TourViewer.",download:"Scarica","change-to-click-and-move":"Cambia modalit\u00e0 di controllo in Clicca e Sposta",yes:"s\u00ec","delete-downloaded":"Elimina","use-safari-for-vr":"Consigliamo l'uso di Safari per visualizzare questo tour in modalit\u00e0 VR",
"exit-fullscreen":"Esci da schermo intero",no:"no","download-failed":"Download fallito","giroscope-disabled-http":"Stai accedendo a questa pagina tramite http, quindi l'accesso al movimento, all'orientamento e alla modalit\u00e0 VR del dispositivo \u00e8 disabilitato. Accedi tramite https per abilitarli.","cookies-notice":"Questo sito web utilizza i cookie per raccogliere statistiche di utilizzo. Per ulteriori informazioni, visita la <a>Politica sui Cookie</a>.","use-cardboard":"Usa Cardboard","launch-default-browser":"Apri nel browser predefinito",
"refresh-downloaded":"Aggiorna","rotate-device":"Ruota il dispositivo","exit-vr":"Esci dalla VR",reject:"Rifiuta","disable-measure":"Interrompi misurazione",downloading:"Download in corso","cardboard-v2":"Se hai un visore Cardboard v2, con un pulsante, guarda l'hotspot e premi il pulsante per attivare l'azione.","enable-video-audio-prompt":"Abilitare video e audio?","storage-not-provided-launch-from-desktop":"Avvia il tour dall'icona sul desktop per scaricarlo.",downloaded:"Questo tour \u00e8 stato scaricato per la riproduzione offline.",
"samsung-internet-vr-app-info":"Se hai un visore Gear VR compatibile con questo dispositivo e hai installato Samsung Internet for VR, puoi usarlo per visualizzare questo contenuto in VR. \u00c8 necessario impostare Samsung Internet come browser predefinito.","samsung-internet-vr-info":"Se hai un visore Gear VR compatibile con questo dispositivo e hai installato Samsung Internet for VR, puoi usarlo per visualizzare questo contenuto in VR. Basta inserire il telefono nel visore ora.","enable-video-prompt":"Abilitare il video?",
"giroscope-disabled-safari-request-permission":["L'accesso al movimento e all'orientamento del dispositivo e la modalit\u00e0 VR sono disabilitati per questo sito.","Per visualizzare correttamente questa pagina, fai clic su continua e accetta la richiesta di autorizzazione se viene mostrata."],"storage-not-provided-launch-from-homescreen":"Avvia il tour dall'icona nella schermata iniziale per scaricarlo.","enter-fullscreen":"Vai a schermo intero","use-cardboard-v2":"Usa Cardboard v2",unmute:"Attiva audio",
"enter-vr":"Accedi ai contenuti VR","enable-measure":"Inizia misurazione","use-cardboard-info":"Puoi usare un visore compatibile con Google Cardboard per visualizzare questo contenuto in VR.","ar-mobile-info":"Muovi lentamente il dispositivo per scansionare lo spazio.\nUn anello apparir\u00e0 quando viene trovata una superficie.\nTocca lo schermo per posizionare l'oggetto l\u00ec.","use-default-cardboard":"Usa Predefinito","enable-audio-prompt":"Abilitare l'audio?"},"zh-tw":{mute:"\u975c\u97f3","cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.",
"download-tour":"\u4e0b\u8f09\u865b\u64ec\u5c0e\u89bd\uff0c\u4ee5\u9032\u884c\u96e2\u7dda\u64ad\u653e","change-to-drag-and-release":"\u5c07\u63a7\u5236\u6a21\u5f0f\u66f4\u6539\u70ba\u201c\u62d6\u653e\u6a21\u5f0f\u201c",accept:"\u63a5\u53d7",cancel:"\u53d6\u6d88","storage-not-provided-bookmark":"\u88dd\u7f6e\u5167\u6c38\u4e45\u5b58\u5132\u88ab\u62d2\u7d55\u3002\u8acb\u5617\u8a66\u5c07\u6b64\u7db2\u9801\u65b0\u589e\u70ba\u66f8\u7c64\uff0c\u4e26\u91cd\u65b0\u8f09\u5165\u3002","dont-display-again":"\u4e0d\u518d\u986f\u793a\u672c\u8a0a\u606f",
"web-server-required":"\u672c\u865b\u64ec\u5c0e\u89bd\u7121\u6cd5\u5728\u672c\u5730\u96fb\u8166\u4e0a\u64ad\u653e\u3002 \u8acb\u5c07\u5176\u4e0a\u50b3\u5230\u7db2\u969b\u7db2\u8def\u4f3a\u670d\u5668\uff0c\u7136\u5f8c\u91cd\u8a66\u3002\n\u5982\u679c\u9700\u8981\u672c\u5730\u9810\u89bd\uff0c\u8acb\u5c07htm\u6a94\u6848\uff08\u6216\u865b\u64ec\u5c0e\u89bd\u7684\u6574\u500b\u8cc7\u6599\u593e\uff09\u62d6\u653e\u5230TourViewer\u61c9\u7528\u7a0b\u793a\u7684\u5716\u793a\u4e0a\u3002",download:"\u4e0b\u8f09",
"change-to-click-and-move":"\u5c07\u63a7\u5236\u6a21\u5f0f\u66f4\u6539\u70ba\u201c\u9ede\u64ca\u4e26\u79fb\u52d5\u201d",yes:"\u662f","delete-downloaded":"\u522a\u9664","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"\u9000\u51fa\u5168\u87a2\u5e55",no:"\u5426","download-failed":"\u4e0b\u8f09\u5931\u6557","giroscope-disabled-http":"\u60a8\u6b63\u5728\u901a\u904ehttp(\u672a\u52a0\u5bc6)\u700f\u89bd\u672c\u7db2\u9801\uff0c\u56e0\u6b64\u8a2d\u5099\u7684\u904b\u52d5\u548c\u65b9\u5411\u53d6\u7528\u6b0a\u9650\uff0c\u4ee5\u53caVR\u6a21\u5f0f\u5747\u5df2\u7981\u7528\uff0c\u8acb\u53e6\u901a\u904ehttps(\u52a0\u5bc6)\u7db2\u5740\u5c0d\u5176\u9032\u884c\u555f\u7528\u3002",
"cookies-notice":"\u8a72\u7db2\u9801\u4f7f\u7528cookie\u4f86\u6536\u96c6\u4f7f\u7528\u60c5\u6cc1\u7d71\u8a08\u4fe1\u606f\u3002 \u6709\u95dc\u66f4\u591a\u4fe1\u606f\uff0c\u8acb\u8a2a\u554f<a> Cookie\u653f\u7b56</a>\u3002","use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","refresh-downloaded":"\u91cd\u65b0\u6574\u7406","rotate-device":"Please rotate your device","exit-vr":"Exit VR",reject:"\u62d2\u7d55","disable-measure":"Stop measuring",downloading:"\u6b63\u5728\u4e0b\u8f09",
"cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"\u5141\u8a31\u5f71\u7247\u53ca\u8072\u97f3\u64ad\u653e?","storage-not-provided-launch-from-desktop":"\u8acb\u5f9e\u684c\u9762\u9ede\u64ca\u5716\u793a\uff0c\u91cd\u65b0\u555f\u52d5\u865b\u64ec\u5c0e\u89bd\uff0c\u4ee5\u9032\u884c\u4e0b\u8f09\u3002",downloaded:"\u865b\u64ec\u5c0e\u89bd\u5df2\u4e0b\u8f09\uff0c\u53ef\u9032\u884c\u96e2\u7dda\u64ad\u653e\u3002",
"samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.","enable-video-prompt":"\u5141\u8a31\u5f71\u7247\u64ad\u653e?",
"giroscope-disabled-safari-request-permission":["\u8a72\u7db2\u7ad9\u5df2\u7981\u7528\u60a8\u8a2d\u5099\u7684\u904b\u52d5\u548c\u65b9\u5411\u53d6\u7528\u6b0a\u9650\uff0cVR\u6a21\u5f0f\u4e5f\u88ab\u7981\u7528\u3002","\u8981\u6b63\u78ba\u67e5\u770b\u672c\u7db2\u9801\uff0c\u8acb\u55ae\u64ca\u7e7c\u7e8c\uff0c\u4e26\u5728\u51fa\u73fe\u63d0\u793a\u6642\u63a5\u53d7\u8a31\u53ef\u8acb\u6c42\u3002"],"storage-not-provided-launch-from-homescreen":"\u8acb\u4e3b\u9801\u9762\u87a2\u5e55\u9ede\u64ca\u5716\u793a\uff0c\u91cd\u65b0\u555f\u52d5\u865b\u64ec\u5c0e\u89bd\uff0c\u4ee5\u9032\u884c\u4e0b\u8f09\u3002",
"enter-fullscreen":"\u9032\u5165\u5168\u87a2\u5e55","use-cardboard-v2":"Use Cardboard v2",unmute:"\u53d6\u6d88\u975c\u97f3","enter-vr":"Enter VR content","enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","ar-mobile-info":"\u7de9\u6162\u79fb\u52d5\u8a2d\u5099\uff0c\u4ee5\u6383\u63cf\u7a7a\u9593\u3002\n\u7576\u627e\u5230\u8868\u9762\u6642\uff0c\u6703\u51fa\u73fe\u4e00\u500b\u5713\u5708\u3002\n\u9ede\u64ca\u5c4f\u5e55\uff0c\u5c07\u7269\u9ad4\u653e\u5728\u90a3\u88e1\u3002",
"use-default-cardboard":"Use Default","enable-audio-prompt":"\u5141\u8a31\u8072\u97f3\u64ad\u653e?"},"nb-no":{mute:"Skru av lyd","cardboard-v1":"Hvis du ikke er sikker, hvilken Cardboard versjon du bruker, velger du standard hotspot-kontrollen. Du vil da bare se p\u00e5 et hotspot og vente til handlingen utl\u00f8ses.","download-tour":"Last ned visningen, s\u00e5 den kan bli sett uten internett","change-to-drag-and-release":"Endre kontrollmodus til Trekk og Slipp",accept:"Aksepterer",cancel:"Avbryt",
"storage-not-provided-bookmark":"Vedvarende lagring nektet. Pr\u00f8v \u00e5 bokmerke denne nettsiden og laste den inn p\u00e5 nytt.","dont-display-again":"Ikke vis denne informasjonen igjen","web-server-required":"Denne virtuelle visningen kan ikke spilles av lokalt. Vennligst last den opp til internett, og fors\u00f8k igjen.\ndersom du prefererer det, kan du dra htm filen (eller hele mappen som inneholder visningen) over 'TourViewer' appen.",download:"Last ned","change-to-click-and-move":"Endre kontrollmodus til Klikk og Flytt",
yes:"Ja","delete-downloaded":"Slett","use-safari-for-vr":"Vi anbefaler Safari for \u00e5 se p\u00e5 venne visningen i VR modus","exit-fullscreen":"G\u00e5 ut av full skjerm",no:"Nei","download-failed":"Nedlastning feilet","giroscope-disabled-http":"Du er koblet til denne nettsiden via http. Dermed er enhetens bevegelses- og orienteringstilgang og VR-modus deaktivert. Koble til via https for \u00e5 aktivere denne.","cookies-notice":"Denne websiden bruker informasjonskapsler for \u00e5 samle inn bruksstatistikk. For mer informasjon, bes\u00f8k <a>retningslinjer for informasjonskapsler</a>.",
"use-cardboard":"Bruk Cardboard","launch-default-browser":"\u00c5pne i standard nettleser","refresh-downloaded":"Last inn p\u00e5 nytt","rotate-device":"Vennligst roter enheten","exit-vr":"G\u00e5 ut av VR",reject:"Avvis","disable-measure":"Stop measuring",downloading:"Laster ned","cardboard-v2":"Dersom du har Cardboard versjon 2, hvilket kommer med en knapp, kan du kikke p\u00e5 en klikkbar ting i visningen, og bruke knappen for \u00e5 bruke disse tingene, p\u00e5 samme m\u00e5te som p\u00e5 en laptop eller telefon.",
"enable-video-audio-prompt":"Aktivere video og lyd?","storage-not-provided-launch-from-desktop":"Start turen p\u00e5 nytt fra skrivebordsikonet for \u00e5 laste ned.",downloaded:"Denne visningen er lastet ned, s\u00e5 den kan bli sett uten internett.","samsung-internet-vr-app-info":"Hvis du har et Gear VR-headset som er kompatibelt med denne enheten og har installert Samsung Internet for VR, kan du ogs\u00e5 bruke det til \u00e5 se dette innholdet i VR, du m\u00e5 ogs\u00e5 gj\u00f8re Samsung Internet til standard nettleser.",
"samsung-internet-vr-info":"Hvis du har et Gear VR-headset som er kompatibelt med denne enheten, og du har installert Samsung Internet for VR, kan du ogs\u00e5 bruke det til \u00e5 se dette innholdet i VR, du trenger bare \u00e5 sette mobiltelefonen p\u00e5 headsettet n\u00e5.","enable-video-prompt":"Aktivere video?","giroscope-disabled-safari-request-permission":["Din enhet sin bevegelses- og orienterings tilgang, samt VR modus er deaktivert for denne nettsiden.","For \u00e5 se denne siden korrekt, vennligst klikk p\u00e5 fortsett og godta tillatelsesforesp\u00f8rselen hvis du blir bedt om dette."],
"storage-not-provided-launch-from-homescreen":"Start turen p\u00e5 nytt fra startskjermikonet for \u00e5 laste ned.","enter-fullscreen":"G\u00e5 til full skjerm","use-cardboard-v2":"Bruk Cardboard Versjon 2",unmute:"Skru p\u00e5 lyd","enter-vr":"\u00c5pne VR Modus","enable-measure":"Start measuring","use-cardboard-info":"Du kan bruke hvilke some helst Google Cardboard kompatible headsett for \u00e5 se denne visningen i VR.","ar-mobile-info":"Flytt enheten din sakte for \u00e5 skanne rommet ditt.\nEn ring vil vises n\u00e5r en overflate blir funnet.\nTrykk p\u00e5 skjermen for \u00e5 plassere objektet der.",
"use-default-cardboard":"Bruk Standard","enable-audio-prompt":"Aktivere audio?"},"pt-pt":{mute:"Desativar som","cardboard-v1":"Se voc\u00ea n\u00e3o tiver certeza de qual vers\u00e3o do Cardboard est\u00e1 usando, selecione o controle de ponto de acesso padr\u00e3o. Voc\u00ea simplesmente olha para um ponto de acesso e espera at\u00e9 que a a\u00e7\u00e3o seja acionada.","download-tour":"Download do Tour para reprodu\u00e7\u00e3o offline","change-to-drag-and-release":"Alterar controle para arrastar e soltar",
accept:"Aceitar",cancel:"Cancelar","storage-not-provided-bookmark":"Armazenamento persistente negado. Tente marcar esta p\u00e1gina da Web e recarreg\u00e1-la.","dont-display-again":"N\u00e3o exibir essas informa\u00e7\u00f5es novamente","web-server-required":"Este passeio virtual n\u00e3o pode ser reproduzido a partir de uma unidade local. Envie-o para a Internet e tente novamente.\nSe preferir, arraste o arquivo htm (ou toda a pasta do tour) para o \u00edcone do aplicativo TourViewer.",download:"Download",
"change-to-click-and-move":"Alterar controle para clicar e mover",yes:"sim","delete-downloaded":"Apagar","use-safari-for-vr":"Recomendamos o Safari para ver este passeio no modo VR","exit-fullscreen":"Sair da tela cheia",no:"n\u00e3o","download-failed":"Falha no Download","giroscope-disabled-http":"Voc\u00ea est\u00e1 acessando esta p\u00e1gina da Web por meio do http, para que o acesso \u00e0 orienta\u00e7\u00e3o e movimento do dispositivo e o modo VR sejam desativados, acesse-o atrav\u00e9s de https para ativ\u00e1-los.",
"cookies-notice":"Esta p\u00e1gina da web usa cookies para coletar estat\u00edsticas de uso. Para obter mais informa\u00e7\u00f5es, visite a <a>Pol\u00edtica de cookies</a>.","use-cardboard":"Use Cardboard","launch-default-browser":"Iniciar no navegador padr\u00e3o","refresh-downloaded":"Atualizar","rotate-device":"Por favor, gire seu dispositivo","exit-vr":"Sair do VR",reject:"Rejeitar","disable-measure":"Stop measuring",downloading:"Baixando","cardboard-v2":"Se voc\u00ea tiver um fone de ouvido Cardboard v2, que vem com um bot\u00e3o, poder\u00e1 observar um ponto de acesso e pressionar o bot\u00e3o para acionar sua a\u00e7\u00e3o.",
"enable-video-audio-prompt":"Ativar \u00e1udio e v\u00eddeo?","storage-not-provided-launch-from-desktop":"Por favor, reinicie o tour no \u00edcone da \u00e1rea de trabalho para fazer o download.",downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"Se voc\u00ea possui um fone de ouvido Gear VR compat\u00edvel com este dispositivo e instalou o Samsung Internet for VR, tamb\u00e9m pode us\u00e1-lo para visualizar esse conte\u00fado em VR. Voc\u00ea precisa tornar o Samsung Internet o seu padr\u00e3o. browser.",
"samsung-internet-vr-info":"Se voc\u00ea possui um fone de ouvido Gear VR compat\u00edvel com este dispositivo e instalou o Samsung Internet for VR, tamb\u00e9m pode us\u00e1-lo para visualizar esse conte\u00fado em VR. Basta colocar o celular no fone de ouvido agora.","enable-video-prompt":"Ativar v\u00eddeo?","giroscope-disabled-safari-request-permission":["O acesso a movimento e orienta\u00e7\u00e3o do dispositivo e o modo VR est\u00e3o desativados para este site.","Para ver corretamente esta p\u00e1gina da web, clique em continuar e aceite a solicita\u00e7\u00e3o de permiss\u00e3o, se solicitado."],
"storage-not-provided-launch-from-homescreen":"Reinicie o tour no \u00edcone da tela inicial para fazer o download.","enter-fullscreen":"Entrar em tela cheia","use-cardboard-v2":"Use Cardboard v2",unmute:"Ativar som","enter-vr":"Inserir conte\u00fado VR","enable-measure":"Start measuring","use-cardboard-info":"Voc\u00ea pode usar qualquer fone de ouvido compat\u00edvel do Google Cardboard para visualizar este conte\u00fado em VR","ar-mobile-info":"Mova lentamente o dispositivo para escanear o espa\u00e7o.\nUm anel aparecer\u00e1 quando uma superf\u00edcie for encontrada.\nToque na tela para colocar o objeto ali.",
"use-default-cardboard":"Use o padr\u00e3o","enable-audio-prompt":"Ativar \u00e1udio?"},"hr-hr":{mute:"nijem","cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.","download-tour":"Download Tour for offline playing","change-to-drag-and-release":"Promijenite na\u010din upravljanja u povla\u010denje i otpu\u0161tanje",accept:"Prihvatiti",download:"Download","storage-not-provided-bookmark":"Persistent storage denied. Try bookmarking this webpage and reloading it.",
"dont-display-again":"Don't display this info again","web-server-required":"This virtual tour cannot be played from a local drive. Please upload it to the internet and try again.\nIf you prefer, drag the htm file (or the entire folder of the tour) onto the icon of the TourViewer app.",cancel:"Cancel","change-to-click-and-move":"Promijenite na\u010din upravljanja na Klik i Premjesti",yes:"Da","delete-downloaded":"Delete","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"Iza\u0111ite s punog zaslona",
no:"Ne","download-failed":"Download failed","giroscope-disabled-http":"You are accessing this webpage through http so your device's motion and orientation access and VR mode are disabled, please access it through https to enable them.","cookies-notice":"Ova web stranica koristi kola\u010di\u0107e za prikupljanje statistike upotrebe. Za vi\u0161e informacija posjetite <a>Pravila o kola\u010di\u0107ima</a>.","use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","refresh-downloaded":"Refresh",
"rotate-device":"Please rotate your device","exit-vr":"Exit VR",reject:"Odbiti","disable-measure":"Stop measuring",downloading:"Downloading","cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"Omogu\u0107iti videozapis i zvuk?","storage-not-provided-launch-from-desktop":"Please relaunch the tour from the desktop icon to download.",downloaded:"This tour is downloaded for offline playing.",
"samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.","enable-video-prompt":"Omogu\u0107ite videozapis?",
"giroscope-disabled-safari-request-permission":["Your device's motion and orientation access and VR mode are disabled for this site.","To properly see this webpage, please click continue and accept the permission request if prompted."],"storage-not-provided-launch-from-homescreen":"Please relaunch the tour from the home screen icon to download.","enter-fullscreen":"Unesite cijeli zaslon","use-cardboard-v2":"Use Cardboard v2",unmute:"Uklju\u010di mikrofon","enter-vr":"Enter VR content","enable-measure":"Start measuring",
"use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","ar-mobile-info":"Pomaknite ure\u0111aj sporo kako biste skenirali svoj prostor.\nKrug \u0107e se pojaviti kada se prona\u0111e povr\u0161ina.\nTapnite ekran kako biste postavili objekt tamo.","use-default-cardboard":"Use Default","enable-audio-prompt":"\u017delite li omogu\u0107iti zvuk?"},"ja-jp":{mute:"\u30df\u30e5\u30fc\u30c8","cardboard-v1":"\u4f7f\u7528\u3057\u3066\u3044\u308bCardboard\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u308f\u304b\u3089\u306a\u3044\u5834\u5408\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30db\u30c3\u30c8\u30b9\u30dd\u30c3\u30c8\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3092\u9078\u629e\u3057\u307e\u3059\u3002\u6b21\u306b\u3001\u30db\u30c3\u30c8\u30b9\u30dd\u30c3\u30c8\u3092\u6ce8\u8996\u3057\u3001\u30a2\u30af\u30b7\u30e7\u30f3\u304c\u52d5\u4f5c\u3059\u308b\u307e\u3067\u5f85\u6a5f\u3057\u307e\u3059\u3002\uff08\u4e00\u90e8\u52d5\u4f5c\u3057\u306a\u3044\u30a2\u30af\u30b7\u30e7\u30f3\u6709\u308a\uff09",
"download-tour":"\u30aa\u30d5\u30e9\u30a4\u30f3\u518d\u751f\u7528\u30c4\u30a2\u30fc\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b","change-to-drag-and-release":"\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30e2\u30fc\u30c9\u3092\u30c9\u30e9\u30c3\u30b0\uff06\u30ea\u30ea\u30fc\u30b9\u306b\u5909\u66f4",accept:"\u53d7\u3051\u5165\u308c\u308b",cancel:"\u30ad\u30e3\u30f3\u30bb\u30eb","storage-not-provided-bookmark":"\u6c38\u7d9a\u7684\u306a\u4fdd\u5b58\u304c\u62d2\u5426\u3055\u308c\u305f\u3002\u3053\u306eWeb\u30da\u30fc\u30b8\u3092\u30d6\u30c3\u30af\u30de\u30fc\u30af\u3057\u3001\u66f4\u65b0\u3057\u3066\u304f\u3060\u3055\u3044",
"dont-display-again":"\u4eca\u5f8c\u3053\u306e\u60c5\u5831\u3092\u8868\u793a\u3057\u306a\u3044","web-server-required":"\u3053\u306e\u30d0\u30fc\u30c1\u30e3\u30eb\u30c4\u30a2\u30fc\u306f\u3001\u30ed\u30fc\u30ab\u30eb\u30c9\u30e9\u30a4\u30d6\u304b\u3089\u518d\u751f\u3067\u304d\u307e\u305b\u3093\u3002\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u306b\u63a5\u7d9a\u3057\u3001\u3082\u3046\u4e00\u5ea6\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3092\u304a\u8a66\u3057\u304f\u3060\u3055\u3044\n\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u3001htm\u30d5\u30a1\u30a4\u30eb\uff08\u307e\u305f\u306f\u30c4\u30a2\u30fc\u306e\u30d5\u30a9\u30eb\u30c0\u30fc\u5168\u4f53\uff09\u3092\u300eTourViewer\u300f\u30a2\u30d7\u30ea\u306e\u30a2\u30a4\u30b3\u30f3\u306b\u30c9\u30e9\u30c3\u30b0\u3057\u307e\u3059",
download:"\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9","change-to-click-and-move":"\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30e2\u30fc\u30c9\u3092\u30af\u30ea\u30c3\u30af\uff06\u30e0\u30fc\u30d6\u306b\u5909\u66f4",yes:"\u306f\u3044","delete-downloaded":"\u524a\u9664","use-safari-for-vr":"\u3053\u306e\u30c4\u30a2\u30fc\u3092VR\u30d3\u30e5\u30fc\u3067\u8868\u793a\u3059\u308b\u306b\u306f\u3001Safari\u30d6\u30e9\u30a6\u30b6\u306e\u5229\u7528\u3092\u304a\u52e7\u3081\u3057\u307e\u3059","exit-fullscreen":"\u30d5\u30eb\u30b9\u30af\u30ea\u30fc\u30f3\u3092\u7d42\u4e86\u3059\u308b",
no:"\u3044\u3044\u3048","download-failed":"\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u5931\u6557\u3057\u307e\u3057\u305f","giroscope-disabled-http":"\u3053\u306eWeb\u30da\u30fc\u30b8\u306b\u300ehttp\u300f\u7d4c\u7531\u3067\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3044\u308b\u305f\u3081\u3001\u3054\u5229\u7528\u7aef\u672b\u306e\u30e2\u30fc\u30b7\u30e7\u30f3\u3068\u753b\u9762\u306e\u5411\u304d\u3078\u30a2\u30af\u30bb\u30b9\u304c\u3067\u304d\u305a\u3001VR\u30e2\u30fc\u30c9\u304c\u7121\u52b9\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u300ehttps\u300f\u7d4c\u7531\u3067\u30a2\u30af\u30bb\u30b9\u3057\u6709\u52b9\u306b\u3057\u3066\u304f\u3060\u3055\u3044",
"cookies-notice":"\u3053\u306e\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u306fCookie\u3092\u4f7f\u7528\u3057\u3066\u4f7f\u7528\u7d71\u8a08\u3092\u53ce\u96c6\u3057\u307e\u3059\u3002 \u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001<a>Cookie\u30dd\u30ea\u30b7\u30fc</a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002","use-cardboard":"Cardboard\u5229\u7528","launch-default-browser":"\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30d6\u30e9\u30a6\u30b6\u3067\u8d77\u52d5","refresh-downloaded":"\u66f4\u65b0","rotate-device":"\u7aef\u672b\u3092\u56de\u8ee2\u3055\u305b\u3066\u304f\u3060\u3055\u3044",
"exit-vr":"VR\u30d3\u30e5\u30fc \u7d42\u4e86",reject:"\u62d2\u5426\u3059\u308b","disable-measure":"Stop measuring",downloading:"\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u4e2d","cardboard-v2":"\u30dc\u30bf\u30f3\u304c\u4ed8\u5c5e\u3057\u3066\u3044\u308bCardboard v2\u30d8\u30c3\u30c9\u30bb\u30c3\u30c8\u3092\u304a\u6301\u3061\u306e\u5834\u5408\u306f\u3053\u3061\u3089\u3002","enable-video-audio-prompt":"\u30d3\u30c7\u30aa\u3068\u97f3\u58f0\u3092\u6709\u52b9\u306b\u3057\u307e\u3059\u304b\uff1f","storage-not-provided-launch-from-desktop":"\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u306e\u30a2\u30a4\u30b3\u30f3\u304b\u3089\u30c4\u30a2\u30fc\u3092\u518d\u8d77\u52d5\u3057\u3001\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u304f\u3060\u3055\u3044",
downloaded:"\u3053\u306e\u30c4\u30a2\u30fc\u306f\u3001\u30aa\u30d5\u30e9\u30a4\u30f3\u3067\u518d\u751f\u3059\u308b\u305f\u3081\u306b\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3092\u3059\u308b","samsung-internet-vr-app-info":"\u3053\u306e\u7aef\u672b\u3068\u4e92\u63db\u6027\u306e\u3042\u308bVR\u30d8\u30c3\u30c9\u30bb\u30c3\u30c8\u6a5f\u5668\u3092\u304a\u6301\u3061\u3067\u3001VR\u7528\u306e\u300eSamsung Internet\u300f\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u308b\u5834\u5408\u3002VR\u30d3\u30e5\u30fc\u3067\u3053\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u8868\u793a\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\u305d\u306e\u969b\u3001\u300eSamsung Internet\u300f\u3092\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30d6\u30e9\u30a6\u30b6\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059",
"samsung-internet-vr-info":"\u3053\u306e\u7aef\u672b\u3068\u4e92\u63db\u6027\u306e\u3042\u308bVR\u30d8\u30c3\u30c9\u30bb\u30c3\u30c8\u6a5f\u5668\u3092\u304a\u6301\u3061\u3067\u3001VR\u7528\u306e\u300eSamsung Internet\u300f\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u308b\u5834\u5408\u3002VR\u30d3\u30e5\u30fc\u3067\u3053\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u8868\u793a\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\u305d\u306e\u969b\u3001\u30b9\u30de\u30fc\u30c8\u30d5\u30a9\u30f3\u3092\u30d8\u30c3\u30c9\u30bb\u30c3\u30c8\u306b\u88c5\u7740\u3059\u308b\u3060\u3051\u3067\u3059",
"enable-video-prompt":"\u30d3\u30c7\u30aa\u3092\u6709\u52b9\u306b\u3057\u307e\u3059\u304b\uff1f","giroscope-disabled-safari-request-permission":["\u3054\u5229\u7528\u7aef\u672b\u306e\u30e2\u30fc\u30b7\u30e7\u30f3\u3068\u753b\u9762\u306e\u5411\u304d\u3078\u30a2\u30af\u30bb\u30b9\u304c\u3067\u304d\u305a\u3001VR\u30e2\u30fc\u30c9\u304c\u7121\u52b9\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002","\u3053\u306eWeb\u30da\u30fc\u30b8\u3092\u6b63\u3057\u304f\u8868\u793a\u3059\u308b\u306b\u306f\u3001\u300eOK\u300f\u3092\u30af\u30ea\u30c3\u30af\u3057\u300e\u8a31\u53ef\u300f\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u53d7\u3051\u5165\u308c\u3066\u304f\u3060\u3055\u3044"],
"storage-not-provided-launch-from-homescreen":"\u30db\u30fc\u30e0\u753b\u9762\u306e\u30a2\u30a4\u30b3\u30f3\u304b\u3089\u30c4\u30a2\u30fc\u3092\u518d\u8d77\u52d5\u3057\u3001\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u304f\u3060\u3055\u3044","enter-fullscreen":"\u30d5\u30eb\u30b9\u30af\u30ea\u30fc\u30f3\u3067\u5165\u529b\u3059\u308b","use-cardboard-v2":"Cardboard v2\u5229\u7528",unmute:"\u30df\u30e5\u30fc\u30c8\u89e3\u9664","enter-vr":"VR\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u5165\u529b","enable-measure":"Start measuring",
"use-cardboard-info":"\u3053\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u3092VR\u30d3\u30e5\u30fc\u3067\u8868\u793a\u3059\u308b\u306b\u306f\u3001\u4e92\u63db\u6027\u306e\u3042\u308b\u4efb\u610f\u306eGoogle Cardboard\u30d8\u30c3\u30c9\u30bb\u30c3\u30c8\u3092\u5229\u7528\u3067\u304d\u307e\u3059","ar-mobile-info":"\u30b9\u30da\u30fc\u30b9\u3092\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u305f\u3081\u306b\u3001\u30c7\u30d0\u30a4\u30b9\u3092\u3086\u3063\u304f\u308a\u3068\u52d5\u304b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n\u8868\u9762\u304c\u898b\u3064\u304b\u308b\u3068\u3001\u5186\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\n\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u305d\u3053\u306b\u914d\u7f6e\u3059\u308b\u306b\u306f\u3001\u753b\u9762\u3092\u30bf\u30c3\u30d7\u3057\u3066\u304f\u3060\u3055\u3044\u3002",
"use-default-cardboard":"\u30c7\u30d5\u30a9\u30eb\u30c8\u5229\u7528","enable-audio-prompt":"\u97f3\u58f0\u3092\u6709\u52b9\u306b\u3057\u307e\u3059\u304b\uff1f"},"zh-cn":{mute:"\u9759\u97f3","cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.","download-tour":"\u4e0b\u8f7d\u5168\u666f\u6f2b\u6e38\uff0c\u4ee5\u8fdb\u884c\u79bb\u7ebf\u64ad\u653e","change-to-drag-and-release":"\u5c06\u63a7\u5236\u6a21\u5f0f\u66f4\u6539\u4e3a\u201c\u62d6\u653e\u201d",
accept:"\u63a5\u53d7",cancel:"\u53d6\u6d88","storage-not-provided-bookmark":"\u88c5\u7f6e\u5185\u6c38\u4e45\u5b58\u50a8\u88ab\u62d2\u7edd\u3002\u5c1d\u8bd5\u5c06\u6b64\u7f51\u9875\u6dfb\u52a0\u4e3a\u4e66\u7b7e\uff0c \u5e76\u91cd\u65b0\u52a0\u8f7d\u3002","dont-display-again":"\u4e0d\u518d\u663e\u793a\u6b64\u4fe1\u606f","web-server-required":"\u6b64\u5168\u666f\u6f2b\u6e38\u65e0\u6cd5\u4ece\u672c\u5730\u9a71\u52a8\u5668\u4e0a\u64ad\u653e\u3002 \u8bf7\u5c06\u5176\u4e0a\u4f20\u5230\u4e92\u8054\u7f51\u670d\u52a1\u5668\uff0c\u7136\u540e\u91cd\u8bd5\u3002\n\u5982\u679c\u9700\u8981\u672c\u5730\u9884\u89c8\uff0c\u53ef\u4ee5\u5c06htm\u6587\u4ef6\uff08\u6216\u5168\u666f\u6f2b\u6e38\u7684\u6574\u4e2a\u6587\u4ef6\u5939\uff09\u62d6\u5230TourViewer\u5e94\u7528\u7a0b\u5e8f\u7684\u56fe\u6807\u4e0a\u3002",
download:"\u4e0b\u8f7d","change-to-click-and-move":"\u5c06\u63a7\u5236\u6a21\u5f0f\u66f4\u6539\u4e3a\u201c\u5355\u51fb\u5e76\u79fb\u52a8\u201d",yes:"\u662f","delete-downloaded":"\u5220\u9664","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"\u9000\u51fa\u5168\u5c4f",no:"\u5426","download-failed":"\u4e0b\u8f7d\u5931\u8d25","giroscope-disabled-http":"\u60a8\u6b63\u5728\u901a\u8fc7http(\u672a\u52a0\u5bc6)\u8bbf\u95ee\u6b64\u7f51\u9875\uff0c\u56e0\u6b64\u8bbe\u5907\u7684\u8fd0\u52a8\u548c\u65b9\u5411\u8bbf\u95ee\u6743\u9650\u4ee5\u53caVR\u6a21\u5f0f\u5747\u5df2\u7981\u7528\uff0c\u8bf7\u901a\u8fc7https(\u52a0\u5bc6)\u5bf9\u5176\u8fdb\u884c\u542f\u7528\u3002",
"cookies-notice":"\u8be5\u7f51\u9875\u4f7f\u7528cookie\u6765\u6536\u96c6\u4f7f\u7528\u60c5\u51b5\u7edf\u8ba1\u4fe1\u606f\u3002 \u6709\u5173\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u8bbf\u95ee<a>Cookie\u653f\u7b56</a>\u3002","use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","refresh-downloaded":"\u5237\u65b0","rotate-device":"Please rotate your device","exit-vr":"Exit VR",reject:"\u62d2\u7edd","disable-measure":"Stop measuring",downloading:"\u6b63\u5728\u4e0b\u8f7d",
"cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"\u542f\u7528\u89c6\u9891\u548c\u97f3\u9891\uff1f","storage-not-provided-launch-from-desktop":"\u8bf7\u4ece\u684c\u9762\u70b9\u51fb\u56fe\u6807\uff0c\u91cd\u65b0\u542f\u52a8\u5168\u666f\u6f2b\u6e38\uff0c\u4ee5\u8fdb\u884c\u4e0b\u8f7d\u3002",downloaded:"\u6b64\u5168\u666f\u6f2b\u6e38\u5df2\u4e0b\u8f7d\uff0c\u53ef\u8fdb\u884c\u79bb\u7ebf\u64ad\u653e\u3002",
"samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.","enable-video-prompt":"\u542f\u7528\u89c6\u9891\uff1f",
"giroscope-disabled-safari-request-permission":["\u8be5\u7ad9\u70b9\u5df2\u7981\u7528\u8bbe\u5907\u7684\u8fd0\u52a8\u548c\u65b9\u5411\u8bbf\u95ee\u6743\u9650\uff0cVR\u6a21\u5f0f\u4e5f\u88ab\u7981\u7528\u3002","\u8981\u6b63\u786e\u67e5\u770b\u6b64\u7f51\u9875\uff0c\u8bf7\u5355\u51fb\u7ee7\u7eed\uff0c\u5e76\u5728\u51fa\u73b0\u63d0\u793a\u65f6\u63a5\u53d7\u8bb8\u53ef\u8bf7\u6c42"],"storage-not-provided-launch-from-homescreen":"\u8bf7\u4ece\u4e3b\u5c4f\u5e55\u70b9\u51fb\u56fe\u6807\uff0c\u91cd\u65b0\u542f\u52a8\u5168\u666f\u6f2b\u6e38\uff0c\u4ee5\u8fdb\u884c\u4e0b\u8f7d\u3002",
"enter-fullscreen":"\u8fdb\u5165\u5168\u5c4f","use-cardboard-v2":"Use Cardboard v2",unmute:"\u53d6\u6d88\u9759\u97f3","enter-vr":"Enter VR content","enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","ar-mobile-info":"\u7f13\u6162\u79fb\u52a8\u8bbe\u5907\uff0c\u4ee5\u626b\u63cf\u7a7a\u95f4\u3002\n\u5f53\u627e\u5230\u8868\u9762\u65f6\uff0c\u4f1a\u51fa\u73b0\u4e00\u4e2a\u5706\u5708\u3002\n\u70b9\u51fb\u5c4f\u5e55\uff0c\u5c06\u5bf9\u8c61\u653e\u5728\u90a3\u91cc\u3002",
"use-default-cardboard":"Use Default","enable-audio-prompt":"\u542f\u7528\u97f3\u9891\uff1f"},"nl-nl":{mute:"Schakel audio uit","cardboard-v1":"Als u niet weet wat voor versie van Cardboard u gebruikt, selecteer dan de default hotspot control. Dan zult u moeten wachten op een hotspot tot er een bepaald actie is gestart.","download-tour":"Download Tour voor offline afspelen","change-to-drag-and-release":"Verander de besturingsmodus om te slepen en los te laten",accept:"Aanvaarden",download:"Download",
"storage-not-provided-bookmark":"Aanhoudende inhoud geweigerd. Probeer deze pagina als bookmark op te slaan en te verversen.","dont-display-again":"Niet meer laten zien","web-server-required":"Deze virtuele tour kan niet worden afgespeeld vanaf een lokale schijf. Upload dit alstublieft op het internet. Je kan ook de htm bestand slepen naar het icoon van de TourViewer app.",cancel:"Annuleren","change-to-click-and-move":"Verander de bedieningsmodus om te klikken en te verplaatsen",yes:"Ja","delete-downloaded":"Verwijderen",
"use-safari-for-vr":"We raden aan om in Safari deze tour te bekijken in VR mode","exit-fullscreen":"Volledig scherm verlaten",no:"Nee","download-failed":"Download mislukt","giroscope-disabled-http":"Jij betreedt deze pagina door http, dus uw toestel's motion en orientation access en VR modus zijn uitgeschakeld. Betreed deze pagina door https om ze weer aan te schakelen.","cookies-notice":"Deze webpagina maakt gebruik van cookies om gebruiksstatistieken te verzamelen. Raadpleeg het <a>Cookiebeleid</a> voor meer informatie.",
"use-cardboard":"Gebruik Cardboard","launch-default-browser":"Start op in standaard browser","refresh-downloaded":"Verversen","rotate-device":"Draai uw toestel om, alstublieft","exit-vr":"VR verlaten",reject:"Weigeren","disable-measure":"Stop meten",downloading:"Downloaden","cardboard-v2":"Als u een Cardboard v2 headset heeft, wat met een knop komt, kunt u wachten op een hotspot en een op een knop drukken om een actie te starten.","enable-video-audio-prompt":"Audio en video inschakelen?","storage-not-provided-launch-from-desktop":"Start de tour alstublieft opnieuw up vanaf het bureaublad om te kunnen downloaden.",
downloaded:"Deze tour is gedownload voor offline afspelen.","samsung-internet-vr-app-info":"Als u een Gear VR headset heeft dat werkt met dit toestel en u Samsung Internet voor VR heeft ge\u00efnstalleerd, kunt u dit ook bekijken in VR. U moet alleen Samsung Internet instellen als uw standaard browser.","samsung-internet-vr-info":"Als u een Gear VR headset heeft dat werkt met dit toestel en u Samsung Internet voor VR heeft ge\u00efnstalleerd, kunt u dit ook bekijken in VR, u moet alleen uw mobiele toestel op uw headset zetten.",
"enable-video-prompt":"Video inschakelen?","giroscope-disabled-safari-request-permission":["Uw toestel's motion en orientation access en VR modus zijn uitgeschakeld voor deze site..","Om deze pagina goed te kunnen zien, druk op doorgaan en geef toestemming als dat gevraagd wordt."],"storage-not-provided-launch-from-homescreen":"Start de tour alstublieft opnieuw up vanaf het homescherm om te kunnen downloaden.","enter-fullscreen":"Volledig scherm inschakelen","use-cardboard-v2":"Gebruik Cardboard v2",
unmute:"Schakel audio in","enter-vr":"Voer VR inhoud in","enable-measure":"Begin meten","use-cardboard-info":"U kunt elk werkend Google Cardboard headset gebruiken om dit te bekijken.","ar-mobile-info":"Verplaats uw apparaat langzaam om uw ruimte te scannen.\nEen ring verschijnt wanneer een oppervlak wordt gevonden.\nTik op het scherm om het object daar te plaatsen.","use-default-cardboard":"Standaard gebruiken","enable-audio-prompt":"Audio inschakelen?"},"hu-hu":{mute:"N\u00e9m\u00edt\u00e1s","cardboard-v1":"Ha nem vagy biztos benne, hogy milyen VR eszk\u00f6zt haszn\u00e1lsz, akkor v\u00e1laszd az alap\u00e9rtelmezettet \u00e9s az egyes hotspot-ok megtekint\u00e9s\u00e9hez csak tartsd ott a jel\u00f6l\u0151t.",
"download-tour":"T\u00fara let\u00f6lt\u00e9se offline megtekint\u00e9shez","change-to-drag-and-release":"Ir\u00e1ny\u00edt\u00e1s \u00e1t\u00e1ll\u00edt\u00e1sa: megfog \u00e9s mozgat m\u00f3dra",accept:"Elfogad",cancel:"M\u00e9gsem","storage-not-provided-bookmark":"Pr\u00f3b\u00e1lja meg az oldalt megjel\u00f6lni \u00e9s \u00fajrat\u00f6lteni!","dont-display-again":"Ne mutasd \u00fajra","web-server-required":"Ez a t\u00fara nem j\u00e1tszat\u00f3 le helyi futtat\u00e1ssal, k\u00e9rlek t\u00f6lsd fel az internetre \u00e9s pr\u00f3b\u00e1ld meg \u00fajra\nM\u00e1sik megold\u00e1s, ha a Tourviewer applik\u00e1ci\u00f3ra h\u00fazod a t\u00fara f\u00e1jlt, vagy az azt tartalmaz\u00f3 t\u00fara mapp\u00e1t.",
download:"Let\u00f6lt\u00e9s","change-to-click-and-move":"Ir\u00e1ny\u00edt\u00e1s \u00e1t\u00e1ll\u00edt\u00e1sa kattint \u00e9s k\u00f6rben\u00e9z m\u00f3dra",yes:"igen","delete-downloaded":"T\u00f6rl\u00e9s","use-safari-for-vr":"Azt javasoljuk, hogy haszn\u00e1lj Safari b\u00f6ng\u00e9sz\u0151t a VR n\u00e9zet megtekint\u00e9s\u00e9hez","exit-fullscreen":"Kil\u00e9p\u00e9s a teljesk\u00e9perny\u0151 m\u00f3db\u00f3l",no:"nem","download-failed":"Let\u00f6lt\u00e9s sikertelen","giroscope-disabled-http":"Az oldalt https el\u0151taggal sz\u00fcks\u00e9ges megnyitnod ahhoz, hogy a k\u00e9sz\u00fcl\u00e9ked mozg\u00e1s\u00e1t \u00e9rz\u00e9kelni tudja.",
"cookies-notice":"Ez a weboldal s\u00fctiket haszn\u00e1l a haszn\u00e1lati statisztik\u00e1k gy\u0171jt\u00e9s\u00e9hez. Tov\u00e1bbi inform\u00e1ci\u00f3\u00e9rt l\u00e1togasson el a <a>s\u00fctikre vonatkoz\u00f3 ir\u00e1nyelvekbe</a>.","use-cardboard":"Cardboard haszn\u00e1lata","launch-default-browser":"Futtat\u00e1s az alap\u00e9rtelmezett b\u00f6ng\u00e9sz\u0151ben","refresh-downloaded":"Friss\u00edt\u00e9s","rotate-device":"Forgasd el a telefont!","exit-vr":"Kil\u00e9p\u00e9s a VR m\u00f3db\u00f3l",
reject:"Elutas\u00edt","disable-measure":"Stop measuring",downloading:"Let\u00f6lt\u00e9s","cardboard-v2":"Ha Cardboard 2.0 t\u00edpus\u00fa eszk\u00f6zt haszn\u00e1lsz, akkor a kapcsol\u00f3kkal ir\u00e1ny\u00edthatod a t\u00far\u00e1t, kattinthatsz az egyes hotspotokra","enable-video-audio-prompt":"Hang \u00e9s vide\u00f3 enged\u00e9lyez\u00e9se","storage-not-provided-launch-from-desktop":"K\u00e9rlek ind\u00edtsd \u00fajra az oldalt az asztalon tal\u00e1lhat\u00f3 iconra kattintva.",downloaded:"Let\u00f6ltve offline megtekint\u00e9shez",
"samsung-internet-vr-app-info":"Ha Samsung Gear VR szem\u00fcveget szeretn\u00e9l haszn\u00e1lni, akkor nyisd meg a Samsung internetb\u00f6ng\u00e9sz\u0151ben a t\u00far\u00e1t.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.","enable-video-prompt":"Vide\u00f3 enged\u00e9lyez\u00e9se","giroscope-disabled-safari-request-permission":["A megjelen\u00edt\u0151 eszk\u00f6z\u00f6d nem adott hozz\u00e1f\u00e9r\u00e9st a mozg\u00e1s \u00e9rz\u00e9kel\u00e9s\u00e9hez ezen az oldalon.",
"Ahhoz hogy megfelel\u0151en l\u00e1sd az oldalt k\u00e9rlek enged\u00e9lyezd a hozz\u00e1f\u00e9r\u00e9st."],"storage-not-provided-launch-from-homescreen":"Ind\u00edtsd \u00fajra a t\u00far\u00e1t a home ikonra kattintva.","enter-fullscreen":"Teljesk\u00e9perny\u0151","use-cardboard-v2":"Cardboard 2.0 haszn\u00e1lata",unmute:"N\u00e9m\u00edt\u00e1s kikapcsol\u00e1sa","enter-vr":"VR tartalom megtekint\u00e9se","enable-measure":"Start measuring","use-cardboard-info":"Haszn\u00e1lhatsz b\u00e1rmilyen google cardboard-ot ahhoz, hogy VR m\u00f3dban l\u00e1sd a t\u00far\u00e1t.",
"ar-mobile-info":"Mozgasson lassan a k\u00e9sz\u00fcl\u00e9k\u00e9t, hogy a teret skann\u00e1lja.\nEgy k\u00f6r jelenik meg, amikor egy fel\u00fcletet tal\u00e1l.\n\u00c9rintse meg a k\u00e9perny\u0151t, hogy oda helyezzen el egy objektumot.","use-default-cardboard":"Alap\u00e9rtelmezett haszn\u00e1lata","enable-audio-prompt":"Hang enged\u00e9lyez\u00e9se"},"ar-ar":{mute:"\u062a\u0639\u0637\u064a\u0644 \u0627\u0644\u0635\u0648\u062a","cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.",
"download-tour":"Download Tour for offline playing","change-to-drag-and-release":"\u062a\u063a\u064a\u064a\u0631 \u0648\u0636\u0639 \u0627\u0644\u062a\u062d\u0643\u0645 \u0644\u0644\u0633\u062d\u0628 \u0648\u0627\u0644\u0625\u0641\u0631\u0627\u062c",accept:"\u0642\u0628\u0648\u0644",download:"Download","storage-not-provided-bookmark":"Persistent storage denied. Try bookmarking this webpage and reloading it.","dont-display-again":"Don't display this info again","web-server-required":"This virtual tour cannot be played from a local drive. Please upload it to the internet and try again.\nIf you prefer, drag the htm file (or the entire folder of the tour) onto the icon of the TourViewer app.",
cancel:"Cancel","change-to-click-and-move":"\u062a\u063a\u064a\u064a\u0631 \u0648\u0636\u0639 \u0627\u0644\u062a\u062d\u0643\u0645 \u0644\u0644\u0646\u0642\u0631 \u0648\u0627\u0644\u062a\u062d\u0631\u0643",yes:"\u0646\u0639\u0645 \u0641\u0639\u0644\u0627","delete-downloaded":"Delete","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"\u0627\u0644\u062e\u0631\u0648\u062c \u0645\u0646 \u0648\u0636\u0639 \u0645\u0644\u0626 \u0644\u0644\u0634\u0627\u0634\u0629",
no:"\u0644\u0627","download-failed":"Download failed","giroscope-disabled-http":"You are accessing this webpage through http so your device's motion and orientation access and VR mode are disabled, please access it through https to enable them.","cookies-notice":"\u062a\u0633\u062a\u062e\u062f\u0645 \u0635\u0641\u062d\u0629 \u0627\u0644\u0648\u064a\u0628 \u0647\u0630\u0647 \u0645\u0644\u0641\u0627\u062a \u062a\u0639\u0631\u064a\u0641 \u0627\u0644\u0627\u0631\u062a\u0628\u0627\u0637 \u0644\u062c\u0645\u0639 \u0625\u062d\u0635\u0627\u0626\u064a\u0627\u062a \u0627\u0644\u0627\u0633\u062a\u062e\u062f\u0627\u0645. \u0644\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0645\u0639\u0644\u0648\u0645\u0627\u062a \u060c \u064a\u0631\u062c\u0649 \u0632\u064a\u0627\u0631\u0629 <a> \u0633\u064a\u0627\u0633\u0629 \u0645\u0644\u0641\u0627\u062a \u062a\u0639\u0631\u064a\u0641 \u0627\u0644\u0627\u0631\u062a\u0628\u0627\u0637 </a>.",
"use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","refresh-downloaded":"Refresh","rotate-device":"Please rotate your device","exit-vr":"Exit VR",reject:"\u064a\u0631\u0641\u0636","disable-measure":"Stop measuring",downloading:"Downloading","cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"\u062a\u0645\u0643\u064a\u0646 \u0627\u0644\u0635\u0648\u062a \u0648\u0627\u0644\u0641\u064a\u062f\u064a\u0648\u061f",
"storage-not-provided-launch-from-desktop":"Please relaunch the tour from the desktop icon to download.",downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.",
"enable-video-prompt":"\u062a\u0645\u0643\u064a\u0646 \u0627\u0644\u0641\u064a\u062f\u064a\u0648\u061f","giroscope-disabled-safari-request-permission":["Your device's motion and orientation access and VR mode are disabled for this site.","To properly see this webpage, please click continue and accept the permission request if prompted."],"storage-not-provided-launch-from-homescreen":"Please relaunch the tour from the home screen icon to download.","enter-fullscreen":"\u0623\u062f\u062e\u0644 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629",
"use-cardboard-v2":"Use Cardboard v2",unmute:"\u062a\u0645\u0643\u064a\u0646 \u0627\u0644\u0635\u0648\u062a","enter-vr":"Enter VR content","enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","ar-mobile-info":"\u062a\u0642\u0631\u064a\u0628\u0627\u064b \u062d\u0631\u0643 \u062c\u0647\u0627\u0632\u0643 \u0628\u0628\u0637\u0621 \u0644\u062a\u0645\u0631\u064a\u0631 \u0627\u0644\u0645\u0633\u0627\u062d\u0629.\n\u0633\u064a\u0638\u0647\u0631 \u062d\u0644\u0642\u0629 \u0639\u0646\u062f \u0627\u0644\u0639\u062b\u0648\u0631 \u0639\u0644\u0649 \u0633\u0637\u062d.\n\u0627\u0636\u063a\u0637 \u0639\u0644\u0649 \u0627\u0644\u0634\u0627\u0634\u0629 \u0644\u0648\u0636\u0639 \u0627\u0644\u0643\u0627\u0626\u0646 \u0647\u0646\u0627\u0643.",
"use-default-cardboard":"Use Default","enable-audio-prompt":"\u062a\u0645\u0643\u064a\u0646 \u0627\u0644\u0635\u0648\u062a\u061f"},"ca-es":{mute:"Silenciar","cardboard-v1":"Si no esteu segurs de quina versi\u00f3 de cartr\u00f3 utilitzeu, seleccioneu el control de punt d'acc\u00e9s per defecte. Despr\u00e9s, simplement veureu un punt d'acc\u00e9s i espereu fins que s'activi l'acci\u00f3.","download-tour":"Descarregueu la visita virtual per a jugar fora de l\u00ednia","change-to-drag-and-release":"Canvieu el mode de control a Arrossegar i deixeu anar",
accept:"Accepta",cancel:"Cancel\u00b7lar","storage-not-provided-bookmark":"S'ha denegat l'emmagatzematge persistent. Proveu de marcar aquesta p\u00e0gina web i torneu-la a carregar.","dont-display-again":"No tornis a mostrar aquesta informaci\u00f3","web-server-required":"Aquesta visita virtual no es pot reproduir des d'una unitat local. Carregueu-lo a Internet i torneu-ho a provar.\nSi ho preferiu, arrossegueu el fitxer htm (o tota la carpeta de la visita virtual) a la icona de l'aplicaci\u00f3 TourViewer.",
download:"Descarregar","change-to-click-and-move":"Canvieu el mode de control a Fer clic i desplaceu",yes:"s\u00ed","delete-downloaded":"Suprimeix","use-safari-for-vr":"Recomanem Safari per a visualitzar aquesta visita virtual en mode VR","exit-fullscreen":"Surt de pantalla completa",no:"no","download-failed":"Error de desc\u00e0rrega","giroscope-disabled-http":"Accediu a aquesta p\u00e0gina web a trav\u00e9s de http de manera que el moviment i l\u2019orientaci\u00f3 del dispositiu i el mode VR estan desactivats, accediu-hi mitjan\u00e7ant https per habilitar-les.",
"cookies-notice":"Aquesta p\u00e0gina web utilitza cookies per recopilar estad\u00edstiques d\u2019\u00fas. Per obtenir m\u00e9s informaci\u00f3, visiteu la <a>Pol\u00edtica de cookies</a>.","use-cardboard":"Utilitzeu Cardboard","launch-default-browser":"Inicieu el navegador per defecte","refresh-downloaded":"Actualitzaci\u00f3","rotate-device":"Gireu el dispositiu","exit-vr":"Surt de VR",reject:"Rebutjar","disable-measure":"Stop measuring",downloading:"Baixant","cardboard-v2":"Si teniu unes Cardboard v2, que venen amb un bot\u00f3, podeu mirar cap a un punt de vista i pr\u00e9mer el bot\u00f3 per activar-lo.",
"enable-video-audio-prompt":"Habilitar v\u00eddeo i \u00e0udio?","storage-not-provided-launch-from-desktop":"Torneu a iniciar la visita virtual des de la icona de l'escriptori per a descarregar-la.",downloaded:"Aquesta visita virtual es descarrega per a reproduir-la fora de l\u00ednia.","samsung-internet-vr-app-info":"Si teniu un auricular Gear VR compatible amb aquest dispositiu i heu instal\u00b7lat Samsung Internet per a VR, tamb\u00e9 podeu utilitzar-lo per visualitzar aquest contingut en VR, heu de fer que Samsung Internet sigui el vostre navegador predeterminat.",
"samsung-internet-vr-info":"Si teniu un auricular Gear VR compatible amb aquest dispositiu i heu instal\u00b7lat Samsung Internet per a VR, tamb\u00e9 podeu utilitzar-lo per visualitzar aquest contingut en VR, nom\u00e9s heu de posar el tel\u00e8fon m\u00f2bil als auriculars.","enable-video-prompt":"Activar v\u00eddeo?","giroscope-disabled-safari-request-permission":["Aquest lloc web est\u00e0 desactivat en el moviment i en la direcci\u00f3 o en mode VR del dispositiu.","Per veure correctament aquesta p\u00e0gina web, feu clic a Continuar i accepteu la sol\u00b7licitud de perm\u00eds si se us demana."],
"storage-not-provided-launch-from-homescreen":"Torneu a iniciar la visita virtual des de la icona de la pantalla inicial.","enter-fullscreen":"Entra a pantalla completa","use-cardboard-v2":"Utilitzeu Cardboard v2",unmute:"No activa","enter-vr":"Introdu\u00efu contingut de VR","enable-measure":"Start measuring","use-cardboard-info":"Podeu utilitzar qualsevol auricular de Google Cardboard compatible per a visualitzar aquest contingut en VR.","ar-mobile-info":"Mou lentament el dispositiu per a escanejar l'espai.\nUn anell apareixer\u00e0 quan es trobi una superf\u00edcie.\nToca la pantalla per a situar l'objecte all\u00e0.",
"use-default-cardboard":"\u00das per defecte","enable-audio-prompt":"Activar \u00e0udio?"},"ru-ru":{mute:"\u0411\u0435\u0437 \u0437\u0432\u0443\u043a\u0430","cardboard-v1":"\u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u043a\u0430\u043a\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e Cardboard \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435, \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0445\u043e\u0442\u0441\u043f\u043e\u0442 \u043a\u0430\u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u0417\u0430\u0442\u0435\u043c \u0432\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430 \u0445\u043e\u0442\u0441\u043f\u043e\u0442 \u0438 \u0434\u043e\u0436\u0434\u0438\u0442\u0435\u0441\u044c, \u043f\u043e\u043a\u0430 \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435.",
"download-tour":"\u0421\u043a\u0430\u0447\u0430\u0442\u044c \u0442\u0443\u0440  \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u0433\u043e \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f","change-to-drag-and-release":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u0440\u0435\u0436\u0438\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u043d\u0438\u0435",
accept:"\u041f\u0440\u0438\u043d\u044f\u0442\u044c",download:"\u0421\u043a\u0430\u0447\u0430\u0442\u044c","storage-not-provided-bookmark":"\u0412 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u043c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043e\u0442\u043a\u0430\u0437\u0430\u043d\u043e. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u0443 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0432 \u0437\u0430\u043a\u043b\u0430\u0434\u043a\u0438 \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0435\u0435.",
"dont-display-again":"\u0411\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u044d\u0442\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e","web-server-required":"\u042d\u0442\u043e\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u0443\u0440 \u043d\u0435\u043b\u044c\u0437\u044f \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u0441 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430. \u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0435\u0433\u043e \u0432 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0435 \u0440\u0430\u0437.\n\u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435, \u043f\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 htm-\u0444\u0430\u0439\u043b (\u0438\u043b\u0438 \u0432\u0441\u044e \u043f\u0430\u043f\u043a\u0443 \u0442\u0443\u0440\u0430) \u043d\u0430 \u0437\u043d\u0430\u0447\u043e\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f TourViewer.",
cancel:"\u041e\u0442\u043c\u0435\u043d\u0430","change-to-click-and-move":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u0440\u0435\u0436\u0438\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u043d\u0430\u0436\u0430\u043d\u0438\u0435 \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435",yes:"\u0434\u0430","delete-downloaded":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c","use-safari-for-vr":"\u041c\u044b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c Safari \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u044d\u0442\u043e\u0433\u043e \u0442\u0443\u0440\u0430 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 VR.",
"exit-fullscreen":"\u0412\u044b\u0439\u0442\u0438 \u0438\u0437 \u043f\u043e\u043b\u043d\u043e\u044d\u043a\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0430",no:"\u043d\u0435\u0442","download-failed":"\u041e\u0448\u0438\u0431\u043a\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438","giroscope-disabled-http":"\u0412\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044d\u0442\u043e\u0439 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0447\u0435\u0440\u0435\u0437 http, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044e \u0438 \u043e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u0440\u0435\u0436\u0438\u043c VR \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u044b, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0432\u043e\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 \u043d\u0435\u0433\u043e \u0447\u0435\u0440\u0435\u0437 https, \u0447\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438\u0445.",
"cookies-notice":"\u042d\u0442\u0430 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0444\u0430\u0439\u043b\u044b cookie \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0441\u043c. <a>\u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u0432 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438 \u0444\u0430\u0439\u043b\u043e\u0432 cookie</a>.",
"use-cardboard":"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Cardboard","launch-default-browser":"\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e","refresh-downloaded":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c","rotate-device":"\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u0432\u0435\u0440\u043d\u0438\u0442\u0435 \u0432\u0430\u0448\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e",
"exit-vr":"\u0412\u044b\u0439\u0442\u0438 \u0438\u0437 VR",reject:"\u041e\u0442\u043a\u043b\u043e\u043d\u0438\u0442\u044c","disable-measure":"\u041f\u0440\u0435\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f",downloading:"\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435","cardboard-v2":"\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0433\u0430\u0440\u043d\u0438\u0442\u0443\u0440\u0430 Cardboard v2 \u0441 \u043a\u043d\u043e\u043f\u043a\u043e\u0439, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043d\u0430 \u0445\u043e\u0442\u0441\u043f\u043e\u0442 \u0438 \u043d\u0430\u0436\u0430\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0443, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0435\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435.",
"enable-video-audio-prompt":"\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432\u0438\u0434\u0435\u043e \u0438 \u0430\u0443\u0434\u0438\u043e?","storage-not-provided-launch-from-desktop":"\u0427\u0442\u043e\u0431\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0442\u0443\u0440 \u0441\u043e \u0437\u043d\u0430\u0447\u043a\u0430 \u043d\u0430 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u0441\u0442\u043e\u043b\u0435..",
downloaded:"\u042d\u0442\u043e\u0442 \u0442\u0443\u0440 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u0433\u043e \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f.","samsung-internet-vr-app-info":"\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0433\u0430\u0440\u043d\u0438\u0442\u0443\u0440\u0430 Gear VR, \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0430\u044f \u0441 \u044d\u0442\u0438\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c, \u0438 \u0432\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 Samsung Internet \u0434\u043b\u044f VR, \u0432\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0432 VR, \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c Samsung Internet \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u043c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.",
"samsung-internet-vr-info":"\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0433\u0430\u0440\u043d\u0438\u0442\u0443\u0440\u0430 Gear VR, \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0430\u044f \u0441 \u044d\u0442\u0438\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c, \u0438 \u0432\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 Samsung Internet \u0434\u043b\u044f VR, \u0432\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0432 VR, \u0432\u0430\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0434\u0435\u0442\u044c \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0439 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u043d\u0430 \u0433\u0430\u0440\u043d\u0438\u0442\u0443\u0440\u0443 \u0441\u0435\u0439\u0447\u0430\u0441.",
"enable-video-prompt":"\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432\u0438\u0434\u0435\u043e?","giroscope-disabled-safari-request-permission":["\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044e \u0438 \u043e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0435\u0436\u0438\u043c VR \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430.",
"\u0427\u0442\u043e\u0431\u044b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u044d\u0442\u0443 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443, \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u00ab\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c\u00bb \u0438 \u043f\u0440\u0438\u043c\u0438\u0442\u0435 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043e."],
"storage-not-provided-launch-from-homescreen":"\u0427\u0442\u043e\u0431\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0442\u0443\u0440 \u0441\u043e \u0437\u043d\u0430\u0447\u043a\u0430 \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u043c \u044d\u043a\u0440\u0430\u043d\u0435.","enter-fullscreen":"\u0412\u043e\u0439\u0442\u0438 \u0432 \u043f\u043e\u043b\u043d\u043e\u044d\u043a\u0440\u0430\u043d\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c",
"use-cardboard-v2":"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Cardboard v2",unmute:"\u0421\u043e \u0437\u0432\u0443\u043a\u043e\u043c","enter-vr":"\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c VR \u043a\u043e\u043d\u0442\u0435\u043d\u0442","enable-measure":"\u041d\u0430\u0447\u0430\u0442\u044c \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f","use-cardboard-info":"\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0443\u044e \u0433\u0430\u0440\u043d\u0438\u0442\u0443\u0440\u0443 Google Cardboard \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0432 VR.",
"ar-mobile-info":"\u041c\u0435\u0434\u043b\u0435\u043d\u043d\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0439\u0442\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e.\n\u0411\u0443\u0434\u0435\u0442 \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043a\u043e\u043b\u044c\u0446\u043e, \u043a\u043e\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0439\u0434\u0435\u043d\u0430 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u044c.\n\u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u0442\u0430\u043c.",
"use-default-cardboard":"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e","enable-audio-prompt":"\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0430\u0443\u0434\u0438\u043e?"},"nn-no":{mute:"Skru av lyd","cardboard-v1":"Hvis du ikke er sikker, hvilken Cardboard versjon du bruker, velger du standard hotspot-kontrollen. Du vil da bare se p\u00e5 et hotspot og vente til handlingen utl\u00f8ses.","download-tour":"Last ned visningen, s\u00e5 den kan bli sett uten internett",
"change-to-drag-and-release":"Endre kontrollmodus til Trekk og Slipp",accept:"Aksepterer",cancel:"Avbryt","storage-not-provided-bookmark":"Vedvarende lagring nektet. Pr\u00f8v \u00e5 bokmerke denne nettsiden og laste den inn p\u00e5 nytt.","dont-display-again":"Ikke vis denne informasjonen igjen","web-server-required":"Denne virtuelle visningen kan ikke spilles av lokalt. Vennligst last den opp til internett, og fors\u00f8k igjen.\ndersom du prefererer det, kan du dra htm filen (eller hele mappen som inneholder visningen) over 'TourViewer' appen.",
download:"Last ned","change-to-click-and-move":"Endre kontrollmodus til Klikk og Flytt",yes:"Ja","delete-downloaded":"Slett","use-safari-for-vr":"Vi anbefaler Safari for \u00e5 se p\u00e5 venne visningen i VR modus","exit-fullscreen":"G\u00e5 ut av full skjerm",no:"Nei","download-failed":"Nedlastning feilet","giroscope-disabled-http":"Du er koblet til denne nettsiden via http. Dermed er enhetens bevegelses- og orienteringstilgang og VR-modus deaktivert. Koble til via https for \u00e5 aktivere denne.",
"cookies-notice":"Denne websiden bruker informasjonskapsler for \u00e5 samle inn bruksstatistikk. For mer informasjon, bes\u00f8k <a>retningslinjer for informasjonskapsler</a>.","use-cardboard":"Bruk Cardboard","launch-default-browser":"\u00c5pne i standard nettleser","refresh-downloaded":"Last inn p\u00e5 nytt","rotate-device":"Vennligst roter enheten","exit-vr":"G\u00e5 ut av VR",reject:"Avvis","disable-measure":"Stop measuring",downloading:"Laster ned","cardboard-v2":"Dersom du har Cardboard versjon 2, hvilket kommer med en knapp, kan du kikke p\u00e5 en klikkbar ting i visningen, og bruke knappen for \u00e5 bruke disse tingene, p\u00e5 samme m\u00e5te som p\u00e5 en laptop eller telefon.",
"enable-video-audio-prompt":"Aktivere video og lyd?","storage-not-provided-launch-from-desktop":"Start turen p\u00e5 nytt fra skrivebordsikonet for \u00e5 laste ned.",downloaded:"Denne visningen er lastet ned, s\u00e5 den kan bli sett uten internett.","samsung-internet-vr-app-info":"Hvis du har et Gear VR-headset som er kompatibelt med denne enheten og har installert Samsung Internet for VR, kan du ogs\u00e5 bruke det til \u00e5 se dette innholdet i VR, du m\u00e5 ogs\u00e5 gj\u00f8re Samsung Internet til standard nettleser.",
"samsung-internet-vr-info":"Hvis du har et Gear VR-headset som er kompatibelt med denne enheten, og du har installert Samsung Internet for VR, kan du ogs\u00e5 bruke det til \u00e5 se dette innholdet i VR, du trenger bare \u00e5 sette mobiltelefonen p\u00e5 headsettet n\u00e5.","enable-video-prompt":"Aktivere video?","giroscope-disabled-safari-request-permission":["Din enhet sin bevegelses- og orienterings tilgang, samt VR modus er deaktivert for denne nettsiden.","For \u00e5 se denne siden korrekt, vennligst klikk p\u00e5 fortsett og godta tillatelsesforesp\u00f8rselen hvis du blir bedt om dette."],
"storage-not-provided-launch-from-homescreen":"Start turen p\u00e5 nytt fra startskjermikonet for \u00e5 laste ned.","enter-fullscreen":"G\u00e5 til full skjerm","use-cardboard-v2":"Bruk Cardboard Versjon 2",unmute:"Skru p\u00e5 lyd","enter-vr":"\u00c5pne VR Modus","enable-measure":"Start measuring","use-cardboard-info":"Du kan bruke hvilke some helst Google Cardboard kompatible headsett for \u00e5 se denne visningen i VR.","ar-mobile-info":"Flytt enheten din sakte for \u00e5 skanne rommet ditt.\nEn ring vil vises n\u00e5r en overflate blir funnet.\nTrykk p\u00e5 skjermen for \u00e5 plassere objektet der.",
"use-default-cardboard":"Bruk Standard","enable-audio-prompt":"Aktivere audio?"},"es-es":{mute:"Silenciar","cardboard-v1":"Si no esta seguro de que versi\u00f3n de Cardboard debe usar escoja la selecci\u00f3n de hotspot por defecto. Solo tendr\u00e1 que apuntar al hotspot y esperar para que se ejecute la acci\u00f3n.","download-tour":"Descargar el tour para reproducirlo sin conexi\u00f3n","change-to-drag-and-release":"Cambiar el modo de control a arrastrar y soltar",accept:"Aceptar","use-cardboard-v2":"Usar Cardboard v2",
"storage-not-provided-bookmark":"Almacenamiento persistente denagado. Intente a\u00f1adir la p\u00e1gina a los marcadores y recargarla.","dont-display-again":"No volver a mostrar esta informaci\u00f3n","web-server-required":"Este tour virtual no puede reproducirse desde una unidad local. Por favor s\u00fabalo a internet y pruebe de nuevo.\nSi lo prefiere puede arrastrar el archivo html o la carpeta con el tour sobre el icono de la aplicaci\u00f3n Tour Viewer de su escritorio.",download:"Descargar",
"change-to-click-and-move":"Cambiar el modo de control a pulsar y mover",yes:"s\u00ed","delete-downloaded":"Borrar","use-safari-for-vr":"Recomendamos Safari para ver este tour en modo VR","exit-fullscreen":"Salir de pantalla completa",no:"no","download-failed":"La descarga ha fallado","giroscope-disabled-http":"Est\u00e1 accediendo a esta p\u00e1gina web por http por lo que el acceso al movimiento y la orientaci\u00f3n del dispositivo est\u00e1 deshabilitado, por favor acceda por https.","cookies-notice":"Esta p\u00e1gina usa cookies para recolectar estad\u00edsticas de uso. Para m\u00e1s informaci\u00f3n, visite la <a>Pol\u00edtica de Cookies</a>.",
"use-cardboard":"Usar Cardboard","launch-default-browser":"Lanzar en el navegador por defecto","refresh-downloaded":"Actualizar","rotate-device":"Por favor, gire el dispositivo","exit-vr":"Salir de VR","storage-not-provided-launch-from-desktop":"Por favor lance el tour desde el escritorio para descargarlo.","disable-measure":"Stop measuring",cancel:"Cancel",downloading:"Descargando","cardboard-v2":"Si tiene unas gafas Cardboard v2, que vienen con un bot\u00f3n, puede apuntar al hotspot y pulsar el bot\u00f3n para que se ejecute su acci\u00f3n.",
"enable-video-audio-prompt":"\u00bfActivar v\u00eddeo y audio?",reject:"Rechazar",downloaded:"Este tour esta descargado para reproducirlo sin conexi\u00f3n.","samsung-internet-vr-app-info":"Si tiene unas gafas Gear VR compatibles con este dispositivo y tiene instalado Samsung Internet for VR puede usarlo para ver este contenido en VR, necesita hacer Samsung Internet su navegador por defecto.","samsung-internet-vr-info":"Si tiene unas gafas Gear VR compatibles con este dispositivo y tiene instalado Samsung Internet for VR puede usarlo para ver este contenido en VR, solo tiene que poner ahora el dispositivo en las gafas.",
"enable-video-prompt":"\u00bfActivar v\u00eddeo?","giroscope-disabled-safari-request-permission":["El acceso al movimiento y la orientaci\u00f3n del dispositivo est\u00e1 deshabiltado para este sitio.","Para ver correctamente la p\u00e1gina por favor pulse Continuar y acepte la petici\u00f3n de permiso si se muestra."],"storage-not-provided-launch-from-homescreen":"Por favor lance el tour desde el icono de la pantalla de inicio para descargarlo.","enter-fullscreen":"Mostrar en pantalla completa",
unmute:"Habilitar sonido","enter-vr":"Entrar al contenido VR","enable-measure":"Start measuring","use-cardboard-info":"Puede usar unas gafas compatibles con Google Cardboard para ver este contenido en VR.","ar-mobile-info":"Mueve lentamente el dispositivo para escanear el espacio.\nAparecer\u00e1 un anillo cuando se encuentre una superficie.\nToca la pantalla para colocar el objeto all\u00ed.","use-default-cardboard":"Usar versi\u00f3n por defecto","enable-audio-prompt":"\u00bfActivar audio?"},"el-gr":{mute:"\u0391\u03c0\u03b5\u03bd\u03b5\u03c1\u03b3\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03c4\u03b5 \u03c4\u03bf\u03bd \u03ae\u03c7\u03bf",
"cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.","download-tour":"Download Tour for offline playing","change-to-drag-and-release":"\u0391\u03bb\u03bb\u03ac\u03be\u03c4\u03b5 \u03c4\u03b7 \u03bb\u03b5\u03b9\u03c4\u03bf\u03c5\u03c1\u03b3\u03af\u03b1 \u03b5\u03bb\u03ad\u03b3\u03c7\u03bf\u03c5 \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03c3\u03cd\u03c1\u03b5\u03c4\u03b5 \u03ba\u03b1\u03b9 \u03bd\u03b1 \u03b1\u03c0\u03b5\u03bb\u03b5\u03c5\u03b8\u03b5\u03c1\u03ce\u03c3\u03b5\u03c4\u03b5",
accept:"\u0391\u03c0\u03bf\u03b4\u03ad\u03c7\u03bf\u03bc\u03b1\u03b9",download:"Download","storage-not-provided-bookmark":"Persistent storage denied. Try bookmarking this webpage and reloading it.","dont-display-again":"Don't display this info again","web-server-required":"This virtual tour cannot be played from a local drive. Please upload it to the internet and try again.\nIf you prefer, drag the htm file (or the entire folder of the tour) onto the icon of the TourViewer app.",cancel:"Cancel","change-to-click-and-move":"\u0391\u03bb\u03bb\u03ac\u03be\u03c4\u03b5 \u03c4\u03b7 \u03bb\u03b5\u03b9\u03c4\u03bf\u03c5\u03c1\u03b3\u03af\u03b1 \u03b5\u03bb\u03ad\u03b3\u03c7\u03bf\u03c5 \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03ba\u03ac\u03bd\u03b5\u03c4\u03b5 \u03ba\u03bb\u03b9\u03ba \u03ba\u03b1\u03b9 \u03bd\u03b1 \u03bc\u03b5\u03c4\u03b1\u03ba\u03b9\u03bd\u03b7\u03b8\u03b5\u03af\u03c4\u03b5",
yes:"\u039d\u03b1\u03af","delete-downloaded":"Delete","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"\u0388\u03be\u03bf\u03b4\u03bf\u03c2 \u03b1\u03c0\u03cc \u03c4\u03b7\u03bd \u03c0\u03bb\u03ae\u03c1\u03b7 \u03bf\u03b8\u03cc\u03bd\u03b7",no:"\u03cc\u03c7\u03b9","download-failed":"Download failed","giroscope-disabled-http":"You are accessing this webpage through http so your device's motion and orientation access and VR mode are disabled, please access it through https to enable them.",
"cookies-notice":"\u0391\u03c5\u03c4\u03ae \u03b7 \u03b9\u03c3\u03c4\u03bf\u03c3\u03b5\u03bb\u03af\u03b4\u03b1 \u03c7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03b5\u03af cookie \u03b3\u03b9\u03b1 \u03c4\u03b7 \u03c3\u03c5\u03bb\u03bb\u03bf\u03b3\u03ae \u03c3\u03c4\u03b1\u03c4\u03b9\u03c3\u03c4\u03b9\u03ba\u03ce\u03bd \u03c3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03c9\u03bd \u03c7\u03c1\u03ae\u03c3\u03b7\u03c2. \u0393\u03b9\u03b1 \u03c0\u03b5\u03c1\u03b9\u03c3\u03c3\u03cc\u03c4\u03b5\u03c1\u03b5\u03c2 \u03c0\u03bb\u03b7\u03c1\u03bf\u03c6\u03bf\u03c1\u03af\u03b5\u03c2, \u03b5\u03c0\u03b9\u03c3\u03ba\u03b5\u03c6\u03b8\u03b5\u03af\u03c4\u03b5 \u03c4\u03b7\u03bd <a> \u03a0\u03bf\u03bb\u03b9\u03c4\u03b9\u03ba\u03ae cookie </a>.",
"use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","refresh-downloaded":"Refresh","rotate-device":"Please rotate your device","exit-vr":"Exit VR",reject:"\u0391\u03c0\u03bf\u03c1\u03c1\u03af\u03c0\u03c4\u03c9","disable-measure":"Stop measuring",downloading:"Downloading","cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"\u0395\u03bd\u03b5\u03c1\u03b3\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7 \u03ae\u03c7\u03bf\u03c5 \u03ba\u03b1\u03b9 \u03b2\u03af\u03bd\u03c4\u03b5\u03bf;",
"storage-not-provided-launch-from-desktop":"Please relaunch the tour from the desktop icon to download.",downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.",
"enable-video-prompt":"\u0395\u03bd\u03b5\u03c1\u03b3\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7 \u03b2\u03af\u03bd\u03c4\u03b5\u03bf;","giroscope-disabled-safari-request-permission":["Your device's motion and orientation access and VR mode are disabled for this site.","To properly see this webpage, please click continue and accept the permission request if prompted."],"storage-not-provided-launch-from-homescreen":"Please relaunch the tour from the home screen icon to download.","enter-fullscreen":"\u0395\u03b9\u03c3\u03ac\u03b3\u03b5\u03c4\u03b5 \u03c4\u03b7\u03bd \u03c0\u03bb\u03ae\u03c1\u03b7 \u03bf\u03b8\u03cc\u03bd\u03b7",
"use-cardboard-v2":"Use Cardboard v2",unmute:"\u0395\u03bd\u03b5\u03c1\u03b3\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7 \u03ae\u03c7\u03bf\u03c5","enter-vr":"Enter VR content","enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","ar-mobile-info":"\u039c\u03b5\u03c4\u03b1\u03ba\u03b9\u03bd\u03ae\u03c3\u03c4\u03b5 \u03c4\u03b7 \u03c3\u03c5\u03c3\u03ba\u03b5\u03c5\u03ae \u03c3\u03b1\u03c2 \u03b1\u03c1\u03b3\u03ac \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03c3\u03b1\u03c1\u03ce\u03c3\u03b5\u03c4\u03b5 \u03c4\u03bf \u03c7\u03ce\u03c1\u03bf \u03c3\u03b1\u03c2.\n\u0398\u03b1 \u03b5\u03bc\u03c6\u03b1\u03bd\u03b9\u03c3\u03c4\u03b5\u03af \u03ad\u03bd\u03b1\u03c2 \u03b4\u03b1\u03ba\u03c4\u03cd\u03bb\u03b9\u03bf\u03c2 \u03cc\u03c4\u03b1\u03bd \u03b5\u03bd\u03c4\u03bf\u03c0\u03b9\u03c3\u03c4\u03b5\u03af \u03bc\u03b9\u03b1 \u03b5\u03c0\u03b9\u03c6\u03ac\u03bd\u03b5\u03b9\u03b1.\n\u039a\u03ac\u03bd\u03c4\u03b5 \u03ba\u03bb\u03b9\u03ba \u03c3\u03c4\u03b7\u03bd \u03bf\u03b8\u03cc\u03bd\u03b7 \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03c4\u03bf\u03c0\u03bf\u03b8\u03b5\u03c4\u03ae\u03c3\u03b5\u03c4\u03b5 \u03c4\u03bf \u03b1\u03bd\u03c4\u03b9\u03ba\u03b5\u03af\u03bc\u03b5\u03bd\u03bf \u03b5\u03ba\u03b5\u03af.",
"use-default-cardboard":"Use Default","enable-audio-prompt":"\u0395\u03bd\u03b5\u03c1\u03b3\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7 \u03ae\u03c7\u03bf\u03c5;"},"da-dk":{mute:"Deaktiver lyd","cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.","download-tour":"Download Tour for offline playing","change-to-drag-and-release":"Skift kontroltilstand for at tr\u00e6kke og slippe",
accept:"Acceptere",download:"Download","storage-not-provided-bookmark":"Persistent storage denied. Try bookmarking this webpage and reloading it.","dont-display-again":"Don't display this info again","web-server-required":"This virtual tour cannot be played from a local drive. Please upload it to the internet and try again.\nIf you prefer, drag the htm file (or the entire folder of the tour) onto the icon of the TourViewer app.",cancel:"Cancel","change-to-click-and-move":"Skift kontroltilstand for at klikke og flytte",
yes:"Ja","delete-downloaded":"Delete","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"Afslut fuldsk\u00e6rm",no:"ingen","download-failed":"Download failed","giroscope-disabled-http":"You are accessing this webpage through http so your device's motion and orientation access and VR mode are disabled, please access it through https to enable them.","cookies-notice":"Denne webside bruger cookies til at indsamle brugsstatistikker. For mere information, se venligst <a> Cookiepolitik </a>.",
"use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","refresh-downloaded":"Refresh","rotate-device":"Please rotate your device","exit-vr":"Exit VR",reject:"Afvise","disable-measure":"Stop measuring",downloading:"Downloading","cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"Aktiv\u00e9r lyd og video?","storage-not-provided-launch-from-desktop":"Please relaunch the tour from the desktop icon to download.",
downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.",
"enable-video-prompt":"Aktiv\u00e9r video?","giroscope-disabled-safari-request-permission":["Your device's motion and orientation access and VR mode are disabled for this site.","To properly see this webpage, please click continue and accept the permission request if prompted."],"storage-not-provided-launch-from-homescreen":"Please relaunch the tour from the home screen icon to download.","enter-fullscreen":"Indtast fuldsk\u00e6rm","use-cardboard-v2":"Use Cardboard v2",unmute:"Aktiv\u00e9r lyd","enter-vr":"Enter VR content",
"enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","ar-mobile-info":"Flyt dit enhed langsomt for at skanne dit rum.\nEn ring vil vises, n\u00e5r en overflade findes.\nTryk p\u00e5 sk\u00e6rmen for at placere objektet der.","use-default-cardboard":"Use Default","enable-audio-prompt":"Aktiv\u00e9r lyd?"},"pl-pl":{mute:"Wycisz","cardboard-v1":"Je\u015bli nie masz pewno\u015bci, kt\u00f3rej wersji Cardboard u\u017cywasz, wybierz domy\u015blne sterowanie hotspotem. Nast\u0119pnie skieruj wzrok na hotspot i poczekaj na uruchomienie ich dzia\u0142ania.",
"download-tour":"Pobierz spacer do odtwarzania w trybie offline","change-to-drag-and-release":"Zmie\u0144 tryb na Przeci\u0105gnij i Upu\u015b\u0107",accept:"Zaakceptowa\u0107",cancel:"Anuluj","storage-not-provided-bookmark":"Odmowa zapisu w pami\u0119ci sta\u0142ej. Spr\u00f3buj doda\u0107 stron\u0119 do zak\u0142adek i za\u0142aduj j\u0105 ponownie.","dont-display-again":"Nie wy\u015bwietlaj tego ponownie","web-server-required":"Nie mo\u017cna odtworzy\u0107 tego spaceru z dysku lokalnego. Prze\u015blij go do internetu i spr\u00f3buj ponownie.\nMo\u017cesz te\u017c przeci\u0105gn\u0105\u0107 plik htm (lub ca\u0142y folder spaceru) na ikon\u0119 aplikacji TourViewer.",
download:"Pobierz","change-to-click-and-move":"Zmie\u0144 tryb na to Kliknij i Przenie\u015b",yes:"tak","delete-downloaded":"Usu\u0144","use-safari-for-vr":"Zalecamy Safari, jako przegl\u0105dark\u0119 spacer\u00f3w w trybie VR","exit-fullscreen":"Wyjd\u017a z trybu pe\u0142nego ekranu",no:"nie","download-failed":"Pobieranie nie powiod\u0142o si\u0119","giroscope-disabled-http":"To jest dost\u0119p za po\u015brednictwem protoko\u0142u http, wi\u0119c dost\u0119p do ruchu i orientacji oraz tryb VR s\u0105 wy\u0142\u0105czone. Prze\u0142\u0105cz si\u0119\u00a0na protok\u00f3\u0142 https, aby je w\u0142\u0105czy\u0107.",
"cookies-notice":"Ta strona u\u017cywa plik\u00f3w cookie do zbierania statystyk u\u017cytkowania. Aby uzyska\u0107 wi\u0119cej informacji, odwied\u017a <a>Zasady dotycz\u0105ce plik\u00f3w cookie</a>.","use-cardboard":"U\u017cyj Cardboard","launch-default-browser":"Uruchom w domy\u015blnej przegl\u0105darce","refresh-downloaded":"Od\u015bwie\u017c","rotate-device":"Obr\u00f3\u0107 urz\u0105dzenie","exit-vr":"Wyjd\u017a z VR",reject:"Odrzuca\u0107","disable-measure":"Stop measuring",downloading:"Pobieranie",
"cardboard-v2":"Je\u015bli masz okulary Cardboard v2, kt\u00f3re maj\u0105 przycisk, mo\u017cesz spojrze\u0107 na hotspot i nacisn\u0105\u0107 przycisk, aby uruchomi\u0107 ich dzia\u0142anie.","enable-video-audio-prompt":"W\u0142\u0105czy\u0107 video i d\u017awi\u0119k?","storage-not-provided-launch-from-desktop":"Aby pobra\u0107, uruchom ponownie spacer klikaj\u0105c ikon\u0119 pulpitu.",downloaded:"Spacer jest pobierany do odtwarzania w trybie offline.","samsung-internet-vr-app-info":"Je\u015bli masz okulary zgodne z Gear VR i zainstalowa\u0142e\u015b Samsung Internet for VR, mo\u017cesz je u\u017cy\u0107 do przegl\u0105dania zawarto\u015bci w VR. Musisz w tym przypadku ustawi\u0107 Samsung Internet jako domy\u015bln\u0105 przegl\u0105dark\u0119.",
"samsung-internet-vr-info":"Je\u015bli masz okulary Gear VR i zainstalowa\u0142e\u015b Samsung Internet for VR, to mo\u017cesz u\u017cy\u0107 ich do przegl\u0105dania zawarto\u015bci w VR. Umie\u015b\u0107 teraz telefon w okularach Gear VR.","enable-video-prompt":"W\u0142\u0105czy\u0107 video?","giroscope-disabled-safari-request-permission":["Dost\u0119p do funkcji ruchu i orientacji oraz tryb VR s\u0105 wy\u0142\u0105czone dla tej strony.","Aby poprawnie wy\u015bwietli\u0107 stron\u0119, kliknij kontynuuj i zaakceptuj wszystkie zgody."],
"storage-not-provided-launch-from-homescreen":"Aby pobra\u0107, uruchom ponownie spacer klikaj\u0105c ikon\u0119 strony g\u0142\u00f3wnej.","enter-fullscreen":"Uruchom pe\u0142ny ekran","use-cardboard-v2":"U\u017cyj Cardboard v2",unmute:"Wy\u0142\u0105cz Wycisz","enter-vr":"Wejd\u017a do VR","enable-measure":"Start measuring","use-cardboard-info":"Do wy\u015bwietlania w VR mo\u017cesz u\u017cy\u0107 oklular\u00f3w zgodnych z Google Cardboard.","ar-mobile-info":"Poruszaj urz\u0105dzeniem powoli, aby zeskanowa\u0107 sw\u00f3j obszar.\nPojawi si\u0119 okr\u0105g, gdy zostanie znaleziona powierzchnia.\nDotknij ekranu, aby umie\u015bci\u0107 obiekt tam.",
"use-default-cardboard":"U\u017cyj Domy\u015blnych","enable-audio-prompt":"W\u0142\u0105czy\u0107 d\u017awi\u0119k?"},"fr-fr":{mute:"Couper le son","cardboard-v1":"Si vous n'\u00eates pas s\u00fbr de la version de votre Cardboard, s\u00e9lectionnez le contr\u00f4le de hotspot par d\u00e9faut. Ensuite, vous n'aurez qu'\u00e0 fixer un hotspot du regard et attendre que l'action se d\u00e9clenche.","download-tour":"T\u00e9l\u00e9charger la visite pour jouer hors ligne","change-to-drag-and-release":"Changer le mode de contr\u00f4le en glisser-d\u00e9poser",
accept:"Accepter",cancel:"Annuler","storage-not-provided-bookmark":"Stockage persistant refus\u00e9. Essayez de mettre cette page Web en signet et de la recharger.","dont-display-again":"Ne plus afficher ces informations","web-server-required":"Cette visite virtuelle ne peut pas \u00eatre lue \u00e0 partir d'un lecteur local. Veuillez la t\u00e9l\u00e9charger sur Internet et r\u00e9essayer.\nSi vous pr\u00e9f\u00e9rez, faites glisser le fichier htm (ou l'int\u00e9gralit\u00e9 du dossier de la visite) sur l'ic\u00f4ne de l'application TourViewer.",
download:"T\u00e9l\u00e9charger","change-to-click-and-move":"Changer le mode de contr\u00f4le pour cliquer et d\u00e9placer",yes:"Oui","delete-downloaded":"Supprimer","use-safari-for-vr":"Nous recommandons Safari pour visionner cette visite en mode VR","exit-fullscreen":"Quitter le mode plein \u00e9cran",no:"Non","download-failed":"\u00c9chec du t\u00e9l\u00e9chargement","giroscope-disabled-http":"Vous acc\u00e9dez \u00e0 cette page Web via http, donc l'acc\u00e8s au mouvement et \u00e0 l'orientation de votre appareil et le mode VR sont d\u00e9sactiv\u00e9s, veuillez y acc\u00e9der via https pour les activer.",
"cookies-notice":"Cette page Web utilise des cookies pour collecter des statistiques d'utilisation. Pour plus d'informations, veuillez consulter la <a>Politique en mati\u00e8re de cookies</a>.","use-cardboard":"Utiliser le Cardboard","launch-default-browser":"Lancer dans le navigateur par d\u00e9faut","refresh-downloaded":"Rafra\u00eechir","rotate-device":"Veuillez faire pivoter votre appareil","exit-vr":"Quitter la r\u00e9alit\u00e9 virtuelle",reject:"Rejeter","disable-measure":"Arr\u00eatez de mesurer",
downloading:"T\u00e9l\u00e9chargement","cardboard-v2":"Si vous disposez d'un casque Cardboard v2, qui est \u00e9quip\u00e9 d'un bouton, vous pouvez fixer un hotspot du regard et appuyer sur le bouton pour d\u00e9clencher son action.","enable-video-audio-prompt":"Activer la vid\u00e9o et l'audio?","storage-not-provided-launch-from-desktop":"Veuillez relancer la visite \u00e0 partir de l'ic\u00f4ne du bureau pour t\u00e9l\u00e9charger.",downloaded:"Cette visite est t\u00e9l\u00e9charg\u00e9e pour jouer hors ligne.",
"samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"Si vous disposez d'un casque Gear VR compatible avec cet appareil et que vous avez install\u00e9 Samsung Internet pour VR, vous pouvez \u00e9galement l'utiliser pour visualiser ce contenu en r\u00e9alit\u00e9 virtuelle. Il vous suffit de placer maintenant le t\u00e9l\u00e9phone mobile sur le casque.",
"enable-video-prompt":"Activer la vid\u00e9o?","giroscope-disabled-safari-request-permission":["L'acc\u00e8s au mouvement et \u00e0 l'orientation de votre appareil et le mode VR sont d\u00e9sactiv\u00e9s pour ce site.","Pour voir correctement cette page Web, veuillez cliquer sur Continuer et accepter la demande d'autorisation si vous y \u00eates invit\u00e9."],"storage-not-provided-launch-from-homescreen":"Veuillez relancer la visite \u00e0 partir de l'ic\u00f4ne de l'\u00e9cran d'accueil pour t\u00e9l\u00e9charger.",
"enter-fullscreen":"Passer en mode plein \u00e9cran","use-cardboard-v2":"Utiliser le Cardboard v2",unmute:"R\u00e9tablir le son","enter-vr":"Entrez le contenu VR","enable-measure":"Commencer \u00e0 mesurer","use-cardboard-info":"Vous pouvez utiliser n'importe quel casque Google Cardboard compatible pour visualiser ce contenu en r\u00e9alit\u00e9 virtuelle.","ar-mobile-info":"D\u00e9placez lentement votre appareil pour scanner votre espace.\nUn anneau appara\u00eetra lorsqu'une surface sera trouv\u00e9e.\nAppuyez sur l'\u00e9cran pour placer l'objet l\u00e0.",
"use-default-cardboard":"Utiliser par d\u00e9faut","enable-audio-prompt":"Activer le son?"},"de-de":{mute:"Deaktiviere Audio","cardboard-v1":"Wenn Sie sich nicht sicher sind, welche Cardboard-Version Sie verwenden, w\u00e4hlen Sie die Standard-Hotspot-Steuerung. Sie schauen dann einfach auf einen Hotspot und warten, bis die jeweilige Aktion ausgel\u00f6st wird.","download-tour":"Tour zum Offline-Abspielen herunterladen","giroscope-disabled-safari-request-permission":["Der Bewegungs- und Orientierungszugriff, sowie VR Modus Ihres Ger\u00e4ts ist f\u00fcr diese Seite deaktiviert.",
"Um diese Webseite korrekt anzuzeigen, klicken Sie auf Weiter und akzeptieren Sie die Erlaubnisanfrage, wenn Sie dazu aufgefordert werden."],accept:"Akzeptieren",download:"Download",downloading:"Downloading","dont-display-again":"Diese Info nicht mehr anzeigen","web-server-required":"Diese Virtual Tour kann nicht von einem lokalen Laufwerk abgespielt werden. Laden Sie Ihre Tour ins Internet und versuchen Sie es erneut.\nAlternativ, ziehen Sie die htm Datei (oder den ganzen Tour Ordner) auf das Icon der Tour Viewer App, um die Tour direkt lokal abzuspielen.",
cancel:"Abbrechen","change-to-click-and-move":"\u00c4ndern Sie den Steuerungsmodus, um zu klicken und zu drehen",yes:"ja","delete-downloaded":"L\u00f6schen","use-safari-for-vr":"Wir empfehlen Safari, um diese Tour im VR-Modus zu sehen","exit-fullscreen":"Vollbild verlassen",no:"nein","storage-not-provided-bookmark":"Dauerhafte Speicherung verweigert. Versuchen Sie, diese Seite als Lesezeichen zu speichern und erneut zu laden.","download-failed":"Download fehlgeschlagen","giroscope-disabled-http":"Der Bewegungs- und Ausrichtungsszugriff Ihres Ger\u00e4ts ist f\u00fcr diese Webseite deaktiviert. Greifen Sie bitte \u00fcber https darauf zu.",
"cookies-notice":"Diese Webseite verwendet Cookies, um Nutzungsstatistiken zu sammeln. Weitere Informationen finden Sie in der <a>Cookie-Richtlinie</a>.","use-cardboard":"Cardboard verwenden","launch-default-browser":"Im Standardbrowser starten","refresh-downloaded":"Aktualisieren","rotate-device":"Bitte drehen Sie Ihr Ger\u00e4t","exit-vr":"VR verlassen",reject:"Ablehnen","disable-measure":"Messung beenden","change-to-drag-and-release":"\u00c4ndern Sie den Steuerungsmodus zu Ziehen und Loslassen",
"cardboard-v2":"Wenn Sie ein Cardboard v2-Headset haben, das mit einer Taste ausgestattet ist, k\u00f6nnen Sie auf einen Hotspot blicken und die Taste dr\u00fccken, um dessen Aktion auszul\u00f6sen.","enable-video-audio-prompt":"Video und Audio aktivieren?","storage-not-provided-launch-from-desktop":"Bitte starten Sie die Tour erneut \u00fcber das Desktop-Symbol, um sie herunterzuladen.",downloaded:"Diese Tour ist zum Offline-Abspielen heruntergeladen.","samsung-internet-vr-app-info":"Wenn Sie ein Gear VR-Headset haben, das mit diesem Ger\u00e4t kompatibel ist, und Sie Samsung Internet f\u00fcr VR installiert haben, k\u00f6nnen Sie es auch verwenden, um diese Inhalte in VR anzusehen. Machen Sie dazu Samsung Internet zu Ihrem Standardbrowser.",
"samsung-internet-vr-info":"Wenn Sie ein Gear VR-Headset haben, das mit diesem Ger\u00e4t kompatibel ist, und Sie Samsung Internet f\u00fcr VR installiert haben, k\u00f6nnen Sie es auch verwenden, um diese Inhalte in VR zu sehen. Setzen Sie dazu nun das Mobiltelefon auf das Headset.","enable-video-prompt":"Video aktivieren?","storage-not-provided-launch-from-homescreen":"Bitte starten Sie die Tour erneut \u00fcber das Symbol auf dem Startbildschirm, um sie herunterzuladen.","enter-fullscreen":"Vollbildmodus aktivieren",
"use-cardboard-v2":"Cardboard v2 verwenden",unmute:"Audio aktivieren","enter-vr":"VR Inhalt eingeben","enable-measure":"Messung beginnen","use-cardboard-info":"Sie k\u00f6nnen jedes kompatible Google Cardboard-Headset verwenden, um diese Inhalte in VR zu sehen.","ar-mobile-info":"Bewegen Sie Ihr Ger\u00e4t langsam, um Ihr Raum zu scannen.\nEin Ring wird angezeigt, wenn eine Oberfl\u00e4che gefunden wird.\nTippen Sie auf den Bildschirm, um das Objekt dort zu platzieren.","use-default-cardboard":"Standard verwenden",
"enable-audio-prompt":"Audio aktivieren?"},"tr-tr":{mute:"Sesi devre d\u0131s\u0131 b\u0131rakmak","cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.","download-tour":"Download Tour for offline playing","change-to-drag-and-release":"S\u00fcr\u00fckleyip b\u0131rakmak i\u00e7in kontrol modunu de\u011fi\u015ftirin",accept:"Kabul etmek",download:"Download","storage-not-provided-bookmark":"Persistent storage denied. Try bookmarking this webpage and reloading it.",
"dont-display-again":"Don't display this info again","web-server-required":"This virtual tour cannot be played from a local drive. Please upload it to the internet and try again.\nIf you prefer, drag the htm file (or the entire folder of the tour) onto the icon of the TourViewer app.",cancel:"Cancel","change-to-click-and-move":"T\u0131klamak ve ta\u015f\u0131mak i\u00e7in kontrol modunu de\u011fi\u015ftirin",yes:"evet","delete-downloaded":"Delete","use-safari-for-vr":"We recommend Safari to view this tour in VR mode",
"exit-fullscreen":"Tam ekrandan \u00e7\u0131k",no:"hay\u0131r","download-failed":"Download failed","giroscope-disabled-http":"You are accessing this webpage through http so your device's motion and orientation access and VR mode are disabled, please access it through https to enable them.","cookies-notice":"Bu web sayfas\u0131, kullan\u0131m istatistiklerini toplamak i\u00e7in tan\u0131mlama bilgileri kullan\u0131r. Daha fazla bilgi i\u00e7in l\u00fctfen <a>\u00c7erez Politikas\u0131n\u0131</a> ziyaret edin.",
"use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","refresh-downloaded":"Refresh","rotate-device":"Please rotate your device","exit-vr":"Exit VR",reject:"Reddet","disable-measure":"Stop measuring",downloading:"Downloading","cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"Ses ve video etkinle\u015ftirilsin mi?","storage-not-provided-launch-from-desktop":"Please relaunch the tour from the desktop icon to download.",
downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.",
"enable-video-prompt":"Video aktif edilsin mi?","giroscope-disabled-safari-request-permission":["Your device's motion and orientation access and VR mode are disabled for this site.","To properly see this webpage, please click continue and accept the permission request if prompted."],"storage-not-provided-launch-from-homescreen":"Please relaunch the tour from the home screen icon to download.","enter-fullscreen":"Tam ekran yap","use-cardboard-v2":"Use Cardboard v2",unmute:"Sesi etkinle\u015ftir","enter-vr":"Enter VR content",
"enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","ar-mobile-info":"Cihaz\u0131n\u0131z\u0131 yava\u015f\u00e7a hareket ettirerek alan\u0131n\u0131z\u0131 taray\u0131n.\nBir daire g\u00f6r\u00fcnecektir kullan\u0131c\u0131 aray\u00fcz\u00fcnde bir y\u00fczey bulundu\u011funda.\nEkran\u0131na dokunun ve objeyi oraya yerle\u015ftirin.","use-default-cardboard":"Use Default","enable-audio-prompt":"Ses aktif edilsin mi?"}}});
define("tdv/player/l10n",["require","exports","tdv/player/texts","tdv/utils","tdv/player/view/util/URL"],function(a,l,k,n,g){function h(f){return k[d][f]||k.en[f]||f}for(var e in k)k[e.substring(0,2)]=k[e];k["zh-hk"]=k["zh-mo"]=k["zh-tw"];k.no=k.nn;var b=function(){var f=window.navigator,m=["language","browserLanguage","systemLanguage","userLanguage"],p,q,r=[];(p=g.getQueryParameter("language"))&&r.push(p.toLowerCase());var t=f.languages;if(Array.isArray(t))for(p=0;p<t.length;p++)(q=t[p])&&q.length&&
(q=q.toLowerCase(),r.indexOf(q)==-1&&r.push(q));for(p=0;p<m.length;p++)(q=f[m[p]])&&q.length&&(q=q.toLowerCase(),r.indexOf(q)==-1&&r.push(q));return r}(),c=Object.keys(k),d=function(){for(var f=0;f<b.length;f++){var m=b[f];if(c.indexOf(m)>=0)return m;m=m.substr(0,2);if(c.indexOf(m)>=0)return m}return"en"}();h.log=function(){n.log("translation lang: "+d);n.log("browser lang: "+b.join(", "))};return h});
define("tdv/view/util/UserInitiatedAction",["require","exports","tdv/player/view/util/Device"],function(a,l,k){function n(){for(;m.length;)m.shift()();document.body.removeEventListener("click",n,!0);document.body.removeEventListener("touchstart",e,!0);document.body.removeEventListener("touchmove",h,!0);document.body.removeEventListener("touchend",g,!0);d=!1}function g(){f&&n()}function h(){f=!1}function e(){f=!0;k.Md()==k.pj&&n()}function b(){document.body.addEventListener("click",n,!0);document.body.addEventListener("touchstart",
e,!0);document.body.addEventListener("touchmove",h,!0);document.body.addEventListener("touchend",g,!0)}function c(q,r){var t=this;return function(){r&&n();p+=1;var u=q.apply(t,arguments);--p;return u}}var d=!1,f=!1,m=[];a={wait:function(q){m.push(q);d||(d=!0,document.body?b():document.addEventListener("DOMContentLoaded",b))},ynb:function(q){q=m.indexOf(q);q>=0&&m.splice(q,1)}};var p=0;a.sr=c;a.ora=c;a.b7=function(){return p>0};return a});
define("tdv/view/av/DummyVideoData",["require"],function(){var a={};a.src=a.tnb="data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAAAC721kYXQhEAUgpBv/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcCEQBSCkG//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADengAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAAsJtb292AAAAbG12aGQAAAAAAAAAAAAAAAAAAAPoAAAALwABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAB7HRyYWsAAABcdGtoZAAAAAMAAAAAAAAAAAAAAAIAAAAAAAAALwAAAAAAAAAAAAAAAQEAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAAC8AAAAAAAEAAAAAAWRtZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAAKxEAAAIAFXEAAAAAAAtaGRscgAAAAAAAAAAc291bgAAAAAAAAAAAAAAAFNvdW5kSGFuZGxlcgAAAAEPbWluZgAAABBzbWhkAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAADTc3RibAAAAGdzdHNkAAAAAAAAAAEAAABXbXA0YQAAAAAAAAABAAAAAAAAAAAAAgAQAAAAAKxEAAAAAAAzZXNkcwAAAAADgICAIgACAASAgIAUQBUAAAAAAfQAAAHz+QWAgIACEhAGgICAAQIAAAAYc3R0cwAAAAAAAAABAAAAAgAABAAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAIAAAABAAAAHHN0c3oAAAAAAAAAAAAAAAIAAAFzAAABdAAAABRzdGNvAAAAAAAAAAEAAAAsAAAAYnVkdGEAAABabWV0YQAAAAAAAAAhaGRscgAAAAAAAAAAbWRpcmFwcGwAAAAAAAAAAAAAAAAtaWxzdAAAACWpdG9vAAAAHWRhdGEAAAABAAAAAExhdmY1Ni40MC4xMDE=";
return a});
define("tdv/view/av/PlaybackRequiresUserAction",["require","tdv/view/av/DummyVideoData","tdv/player/view/util/Device"],function(a){function l(p){var q=document.createElement("video");q.setAttribute("webkit-playsinline","true");q.setAttribute("playsinline","true");q.src=e.src;var r=q.play();if(r){var t=!1;r.then(function(){t=!0;q.pause();p(!1)})["catch"](function(){t||p(!0)})}else q.pause(),p(!1)}function k(p){var q=!1,r=document.createElement("video");r.setAttribute("webkit-playsinline","true");r.setAttribute("playsinline",
"true");r.src="";(r=r.play())?r["catch"](function(t){q=t.name!=="NotAllowedError"}).then(function(){p(!q)}):p(!0)}function n(p){m=p;d=!0;g()}function g(){for(;f.length;)f.shift().call(window,m)}function h(){c||(c=!0,b.Ub()==b.Ok&&b.opa()>=11?n(!0):b.Ub()==b.Ii?l(n):k(function(p){p?l(n):n(!1)}))}var e=a("tdv/view/av/DummyVideoData"),b=a("tdv/player/view/util/Device"),c=!1,d=!1,f=[],m;return{test:function(p){d||c||h();f.push(p);d&&g()}}});
define("tdv/view/util/AudioActivation",["require","tdv/player/l10n","tdv/view/util/UserInitiatedAction","tdv/view/av/PlaybackRequiresUserAction"],function(a){function l(e,b){this.ag=e;this.Rq=b;this.Qs=this.Qs.bind(this);this.Rs=!1}function k(){this.Qs=this.Qs.bind(this);this.Hka=this.Hka.bind(this);this.H="not tested";this.Ota=[];this.Ix=[];this.C2=!1;g.wait(this.Hka)}var n=a("tdv/player/l10n"),g=a("tdv/view/util/UserInitiatedAction"),h=a("tdv/view/av/PlaybackRequiresUserAction");k.prototype.hkb=
function(){this.H=="not tested"&&(this.H="testing",h.test(function(e){this.H=e?"requires action":"allowed";this.q2a()}.bind(this)))};k.prototype.q2a=function(){this.H=="allowed"?this.Qs(!0):this.C2&&(this.C2=!1,this.Ix.forEach(function(e){e.request()}))};k.prototype.lra=function(e){this.H=="allowed"?e.call(this,!0):this.Ota.push(e)};k.prototype.request=function(e){this.eD(e)};k.prototype.cancel=function(e){this.NQ(e)};k.prototype.active=function(){return this.H=="allowed"};k.prototype.Kib=function(){this.H==
"allowed"&&(this.H="requires action")};k.prototype.Hka=function(){setTimeout(this.LWa.bind(this),300);this.Gu(!0)};k.prototype.LWa=function(){for(;this.Ix.length;)this.Ix.pop().cancel()};k.prototype.eD=function(e){this.H=="testing"||this.H=="not tested"?(this.lba(e),this.C2=!0):this.H=="requires action"&&this.lba(e).request()};k.prototype.NQ=function(e){this.H=="testing"||this.H=="not tested"?this.C2=!1:this.H=="requires action"&&this.lba(e).cancel()};k.prototype.Qs=function(e){var b=this.Ix;this.Ix=
[];b.forEach(function(c){e||c.ag.set("mute",!0);c.cancel()});this.Gu(e)};k.prototype.Gu=function(e){this.H="allowed";this.Ota.forEach(function(b){b.call(window,e)})};k.prototype.lba=function(e){for(var b=null,c=0;c<this.Ix.length&&!b;c++)this.Ix[c].ag==e&&(b=this.Ix[c]);b||(b=new l(e,this.Qs),this.Ix.push(b));return b};l.prototype.request=function(){this.Rs||(this.Rs=!0,this.ag.get("mediaActivationMode")=="button"?this.ag.FN.ghb(this.Qs):this.ag.kM.show(n("enable-audio-prompt"),this.Qs))};l.prototype.cancel=
function(){this.ag.FN.eab(this.Qs);this.ag.kM.Qe(this.Qs)};l.prototype.Qs=function(e){this.Rq(e!==!1);this.Rs=!1};return new k});
define("tdv/view/util/Visibility","require exports tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/URL".split(" "),function(a,l,k,n,g,h){return new (function(e){function b(){var c=e.call(this)||this;c.visible=!0;c.ob=!1;c.V9=!1;c.visible=!0;c.ob=!1;c.V9=!1;c.YNa=h.getQueryParameter("redirect-when-hidden")||"";c.Lgb=h.Rg("reload-when-hidden",!1);document.addEventListener("visibilitychange",c.onChange.bind(c),!1);c.onChange();return c}O(b,e);b.prototype.OA=function(c){if(this.ob=
c)this.V9=!1;this.onChange()};b.prototype.eqa=function(c){this.V9=c;this.onChange()};b.prototype.onChange=function(){var c=this.ob?!this.V9:!document.hidden;this.visible!=c&&((this.visible=c)?this.igb():this.N7(),this.m(new n(k.V)))};b.prototype.igb=function(){this.YNa?window.location.href=this.YNa:this.Lgb&&window.location.reload()};b.prototype.N7=function(){};return b}(g))});
define("tdv/view/av/SharedAudioContext",["require","tdv/constants/EventName","tdv/player/view/util/Flags","tdv/view/util/AudioActivation","tdv/view/util/Visibility"],function(a){var l=a("tdv/constants/EventName"),k=a("tdv/player/view/util/Flags"),n=a("tdv/view/util/AudioActivation"),g=a("tdv/view/util/Visibility");if(!k.qra||"AudioContext"in window===!1)return null;var h=new AudioContext;n.lra(function(){h.state!=="running"&&h.resume()});g.bind(l.V,function(){g.visible&&h.state=="interrupted"&&h.resume()});
return h});
define("tdv/player/view/util/Capabilities","require tdv/utils tdv/view/av/SharedAudioContext tdv/player/view/util/Device tdv/player/view/util/Flags tdv/player/view/util/URL".split(" "),function(a){function l(){}var k=a("tdv/utils"),n=a("tdv/view/av/SharedAudioContext"),g=a("tdv/player/view/util/Device"),h=a("tdv/player/view/util/Flags");a=a("tdv/player/view/util/URL");l.Tka=!1;l.ljb=function(){l.Tka=!0};l.A0a=function(){window.MediaSource=window.MediaSource||window.zmb;return window.MediaSource&&typeof window.MediaSource.isTypeSupported===
"function"&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')};l.K0a=function(){if(g.Ub()==g.Ii){var c=g.ina();if(c>=10&&c<11||c>=11.3)return!0}return!1};l.B0a=function(){return g.Ub()==g.Ok||g.Ub()==g.Ii?!0:!1};var e;l.aHa=function(c){try{return e||(e=document.createElement("audio")),!!e.canPlayType(c).replace(/^no$/,"")}catch(d){}return!1};var b;l.cO=function(c){try{return b||(b=document.createElement("video"),b.setAttribute("webkit-playsinline","true"),b.setAttribute("playsinline",
"true")),!!b.canPlayType(c).replace(/^no$/,"")}catch(d){}return!1};l.W$a=function(){return g.Ub()==g.Ii?g.ina()>=15||n?!0:!1:!0};l.D0a=function(){try{if(document.createElement("canvas").getContext("webgl"))return!0}catch(c){}try{if(document.createElement("canvas").getContext("experimental-webgl"))return!0}catch(c){}return!1};l.tQa=function(c,d,f,m){if(h.dUa)return!0;if(g.Md()==g.pj)if(!f||f>30){if(c<=3168&&d<=1584)return!0}else{if(c<=4096&&d<=2048)return!0}else if((g.OO()||g.qJ())&&!g.XD()){if(c<=
4320&&d<=4320||c<=8192&&d<=4096)return!0}else if((g.OO()||g.qJ())&&g.vna()){if(m=="h264"&&(c<=5760&&d<=5760||c<=7680&&d<=3840)||c<=3840&&d<=2160)return!0}else if(g.NW())if(m=="h264"){if(c<=5760&&d<=5760||c<=7680&&d<=3840)return!0}else{if(c<=4400&&d<=2200)return!0}else if(g.ub()){if(c<=3840&&d<=2160)return!0}else if(c<=4096&&d<=2048)return!0;return!1};l.Y$a=function(){return g.NW()||(g.OO()||g.qJ())&&g.Dc()==g.Yw||!g.ub()&&l.Tka&&g.Ub()==g.Hp?!0:!1};l.sQa=function(c){return l.tQa(c.get("width"),c.get("height"),
c.get("framerate"),c.get("codec"))};l.X$a=function(){return l.Tka?!0:!1};l.GNa=!h.GSa&&h.FSa?1:2;l.Z$a=function(){return h.Nra!==void 0?h.Nra:g.qJ()||g.NW()||g.Ueb()||g.Veb()||g.WKa()||g.OO()&&!g.XD()||!g.gf()&&g.Md()!=g.gB&&g.Md()!=g.pj?!0:!1};l.ckb=function(c,d){return l.tQa(c,d,30)};l.log=function(){k.log("webgl: "+l.$h);k.log("html5 audio: "+l.wKa);k.log("html5 video: "+l.zKa)};l.C7a=function(){return["webgl:"+l.$h,"html5audio:"+l.wKa,"html5video:"+l.zKa].join(" ")};l.yKa=l.aHa('audio/ogg; codecs="vorbis"');
l.xKa=l.aHa("audio/mpeg");l.wKa=l.yKa||l.xKa;l.dna=l.cO('video/ogg; codecs="theora"');l.cO('video/mp4; codecs="avc1.42E01E"');l.ena=l.cO('video/webm; codecs="vp8, vorbis"');l.leb=l.cO('video/mp4; codecs="hev1"');l.L6=l.cO("video/mp4");l.meb=l.cO("video/quicktime");l.neb=l.K0a();l.jKa=l.B0a();l.Tdb=l.jKa||l.L6&&l.A0a();l.zKa=l.dna||l.L6||l.ena;l.$h=l.D0a();a.Ck("debug")&&a.Ck("capabilities")&&l.log();l.summary=l.C7a();return l});
define("tdv/player/view/util/geo/Quaternion",["require"],function(){var a=Math.PI/180,l=180/Math.PI,k=new THREE.Euler(0,0,0,"YXZ"),n=new THREE.Quaternion;return{create:function(){return{x:0,y:0,z:0,w:0}},PIa:function(g,h,e){n.setFromEuler(k.set(h*a,-g*a,e*a,"YXZ"));g={};g.x=n.x;g.y=n.y;g.z=n.z;g.w=n.w;return g},G9:function(g,h){k.setFromQuaternion(n.set(g.x,g.y,g.z,g.w),"YXZ");g={};g.$a=-k.y*l;g.pitch=k.x*l;g.kh=k.z*l;h||(g.pitch=Math.min(90,Math.max(-90,g.pitch)));return g},$a:function(g){k.setFromQuaternion(n.set(g.x,
g.y,g.z,g.w),"YXZ");return-k.y*l}}});
define("tdv/player/view/util/MathUtil",["require"],function(){var a={};a.degToRad=Math.PI/180;a.radToDeg=180/Math.PI;a.Vector2=function(l,k){this.x=l||0;this.y=k||0};a.Vector2.prototype={constructor:a.Vector2,set:function(l,k){this.x=l;this.y=k;return this},copy:function(l){this.x=l.x;this.y=l.y;return this},subVectors:function(l,k){this.x=l.x-k.x;this.y=l.y-k.y;return this}};a.Vector3=function(l,k,n){this.x=l||0;this.y=k||0;this.z=n||0};a.Vector3.prototype={constructor:a.Vector3,set:function(l,k,
n){this.x=l;this.y=k;this.z=n;return this},copy:function(l){this.x=l.x;this.y=l.y;this.z=l.z;return this},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},normalize:function(){var l=this.length();l!==0?this.multiplyScalar(1/l):this.z=this.y=this.x=0;return this},multiplyScalar:function(l){this.x*=l;this.y*=l;this.z*=l},applyQuaternion:function(l){var k=this.x,n=this.y,g=this.z,h=l.x,e=l.y,b=l.z;l=l.w;var c=l*k+e*g-b*n,d=l*n+b*k-h*g,f=l*g+h*n-e*k;k=-h*k-e*n-b*g;this.x=
c*l+k*-h+d*-b-f*-e;this.y=d*l+k*-e+f*-h-c*-b;this.z=f*l+k*-b+c*-e-d*-h;return this},dot:function(l){return this.x*l.x+this.y*l.y+this.z*l.z},crossVectors:function(l,k){var n=l.x,g=l.y;l=l.z;var h=k.x,e=k.y;k=k.z;this.x=g*k-l*e;this.y=l*h-n*k;this.z=n*e-g*h;return this}};a.Quaternion=function(l,k,n,g){this.x=l||0;this.y=k||0;this.z=n||0;this.w=g!==void 0?g:1};a.Quaternion.prototype={constructor:a.Quaternion,set:function(l,k,n,g){this.x=l;this.y=k;this.z=n;this.w=g;return this},copy:function(l){this.x=
l.x;this.y=l.y;this.z=l.z;this.w=l.w;return this},WOa:function(l,k,n){var g=Math.cos(l/2),h=Math.cos(k/2),e=Math.cos(n/2);l=Math.sin(l/2);k=Math.sin(k/2);n=Math.sin(n/2);this.x=l*h*e+g*k*n;this.y=g*k*e-l*h*n;this.z=g*h*n-l*k*e;this.w=g*h*e+l*k*n;return this},setFromAxisAngle:function(l,k){k/=2;var n=Math.sin(k);this.x=l.x*n;this.y=l.y*n;this.z=l.z*n;this.w=Math.cos(k);return this},multiply:function(l){return this.multiplyQuaternions(this,l)},multiplyQuaternions:function(l,k){var n=l.x,g=l.y,h=l.z;
l=l.w;var e=k.x,b=k.y,c=k.z;k=k.w;this.x=n*k+l*e+g*c-h*b;this.y=g*k+l*b+h*e-n*c;this.z=h*k+l*c+n*b-g*e;this.w=l*k-n*e-g*b-h*c;return this},inverse:function(){this.x*=-1;this.y*=-1;this.z*=-1;this.normalize();return this},normalize:function(){var l=Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);l===0?(this.z=this.y=this.x=0,this.w=1):(l=1/l,this.x*=l,this.y*=l,this.z*=l,this.w*=l);return this},slerp:function(l,k){if(k===0)return this;if(k===1)return this.copy(l);var n=this.x,g=
this.y,h=this.z,e=this.w,b=e*l.w+n*l.x+g*l.y+h*l.z;b<0?(this.w=-l.w,this.x=-l.x,this.y=-l.y,this.z=-l.z,b=-b):this.copy(l);if(b>=1)return this.w=e,this.x=n,this.y=g,this.z=h,this;l=Math.acos(b);var c=Math.sqrt(1-b*b);if(Math.abs(c)<.001)return this.w=.5*(e+this.w),this.x=.5*(n+this.x),this.y=.5*(g+this.y),this.z=.5*(h+this.z),this;b=Math.sin((1-k)*l)/c;k=Math.sin(k*l)/c;this.w=e*b+this.w*k;this.x=n*b+this.x*k;this.y=g*b+this.y*k;this.z=h*b+this.z*k;return this},setFromUnitVectors:function(){var l,
k;return function(n,g){l===void 0&&(l=new a.Vector3);k=n.dot(g)+1;k<1E-6?(k=0,Math.abs(n.x)>Math.abs(n.z)?l.set(-n.y,n.x,0):l.set(0,-n.z,n.y)):l.crossVectors(n,g);this.x=l.x;this.y=l.y;this.z=l.z;this.w=k;this.normalize();return this}}()};return a});
define("tdv/player/view/util/DeviceOrientationSensor",["require","tdv/constants/EventName","tdv/events/Event","tdv/events/EventDispatcher","tdv/player/view/util/MathUtil"],function(a){function l(){d||(d=!0,q=new c.Vector3(0,0,1),r=new c.Quaternion,t=new c.Quaternion(-Math.sqrt(.5),0,0,Math.sqrt(.5)),u=new c.Quaternion,n(),window.addEventListener("orientationchange",n,!1),window.addEventListener("deviceorientation",g,!1),k())}function k(){if(v&&m!==void 0&&p!==void 0){v=!1;var x=c.degToRad*p;u.WOa(c.degToRad*
m.beta,c.degToRad*m.alpha,-(c.degToRad*m.gamma));u.multiply(t);u.multiply(r.setFromAxisAngle(q,-x));w||(y++,y>=5&&(w=!0,f.m(new e(h.ud))));f.m(new e(h.V))}}function n(){p=window.orientation||0;v=!0;k()}function g(x){m=x;v=!0;k()}var h=a("tdv/constants/EventName"),e=a("tdv/events/Event"),b=a("tdv/events/EventDispatcher"),c=a("tdv/player/view/util/MathUtil"),d=!1,f=new b,m,p,q,r,t,u,v,w=!1,y=0;l.prototype.zt=function(){k();return u};l.prototype.bind=function(){f.bind.apply(f,arguments)};l.prototype.h=
function(){f.h.apply(f,arguments)};l.prototype.stop=function(){window.removeEventListener("orientationchange",n,!1);window.removeEventListener("deviceorientation",g,!1)};return l});
define("tdv/player/view/util/FusionPoseSensor","require tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Device tdv/player/view/util/MathUtil".split(" "),function(a){function l(m){this.ffb=m;this.Ola=new g;this.F5=new g;this.Toa=new g;this.YI=new c.Quaternion;this.Soa=new c.Quaternion;this.UFa=new c.Quaternion;this.UKa=!1;this.P5=new c.Vector3;this.Una=new c.Vector3;this.Fdb=new c.Quaternion}function k(){this.deviceId="webvr-polyfill:fused";this.NLa=!1;this.MLa=
0;this.qV=new c.Vector3;this.F6=new c.Vector3;this.filter=new l(.98);this.Bgb=new n(.04);this.KO=f.KO();this.Wq=f.Wq();f.Ama();this.Fna=f.Geb();this.U5=new c.Quaternion;f.Wq()?this.U5.setFromAxisAngle(new c.Vector3(1,0,0),Math.PI/2):this.U5.setFromAxisAngle(new c.Vector3(1,0,0),-Math.PI/2);this.V6=new c.Quaternion;this.RP=new c.Quaternion;this.bNa=new c.Quaternion;this.bNa.setFromAxisAngle(new c.Vector3(0,0,1),-window.orientation*Math.PI/180);this.vPa();f.RKa()&&this.U5.multiply(this.V6);this.Gw=
new c.Quaternion;this.KO=f.KO();this.Wq=f.Wq();this.Feb=f.Ama()>=66;this.zJ=this.zJ.bind(this);this.fX=this.fX.bind(this);this.eX=this.eX.bind(this);screen&&screen.orientation&&screen.orientation.addEventListener?screen.orientation.addEventListener("change",this.zJ):window.addEventListener("orientationchange",this.zJ);this.Fna?window.addEventListener("deviceorientation",this.fX):window.addEventListener("devicemotion",this.eX)}function n(m){this.Dgb=m;this.t8=new c.Quaternion;this.pP=null;this.UHa=
new c.Quaternion;this.nX=new c.Quaternion}function g(m,p){this.set(m,p)}var h=a("tdv/constants/EventName"),e=a("tdv/events/Event"),b=a("tdv/events/EventDispatcher");a("tdv/player/view/util/Device");var c=a("tdv/player/view/util/MathUtil"),d=new b;l.prototype.c$a=function(m,p){this.Ola.set(m,p)};l.prototype.k$a=function(m,p){this.F5.set(m,p);f.afb(p-this.Toa.E9)&&this.rhb();this.Toa.copy(this.F5)};l.prototype.rhb=function(){if(this.UKa){var m=this.Gdb(this.F5.sample,this.F5.E9-this.Toa.E9);this.Fdb.multiply(m);
this.YI.copy(this.Soa);this.YI.multiply(m);m=new c.Quaternion;m.copy(this.YI);m.inverse();this.P5.set(0,0,-1);this.P5.applyQuaternion(m);this.P5.normalize();this.Una.copy(this.Ola.sample);this.Una.normalize();m=new c.Quaternion;m.setFromUnitVectors(this.P5,this.Una);m.inverse();var p=new c.Quaternion;p.copy(this.YI);p.multiply(m);this.YI.slerp(p,1-this.ffb);this.Soa.copy(this.YI)}else this.UFa=this.b$a(this.Ola.sample),this.Soa.copy(this.UFa),this.UKa=!0};l.prototype.zt=function(){return this.YI};
l.prototype.b$a=function(m){var p=new c.Vector3;p.copy(m);p.normalize();m=new c.Quaternion;m.setFromUnitVectors(new c.Vector3(0,0,-1),p);m.inverse();return m};l.prototype.Gdb=function(m,p){var q=new c.Quaternion,r=new c.Vector3;r.copy(m);r.normalize();q.setFromAxisAngle(r,m.length()*p);return q};k.prototype.stop=function(){screen&&screen.orientation&&screen.orientation.addEventListener&&screen.orientation.removeEventListener("change",this.zJ);window.removeEventListener("orientationchange",this.zJ);
window.removeEventListener("deviceorientation",this.fX);window.removeEventListener("devicemotion",this.eX)};k.prototype.wm=function(){return null};k.prototype.zt=function(){var m=void 0;if(this.Fna&&this.C_){this.WHa=this.WHa||function(){var q=(new c.Quaternion).setFromAxisAngle(new c.Vector3(0,0,-1),0),r=new c.Quaternion;this.v3=="landscape-secondary"?r.setFromAxisAngle(new c.Vector3(0,1,0),Math.PI/-2):r.setFromAxisAngle(new c.Vector3(0,1,0),Math.PI/2);return q.multiply(r)}();this.VHa=this.VHa||
function(){var q=new c.Quaternion;q.setFromAxisAngle(new c.Vector3(1,0,0),-Math.PI/2);return q}();m=this.C_;var p=new c.Quaternion;p.copy(m);p.multiply(this.VHa);p.multiply(this.Gw);p.multiply(this.RP);p.multiplyQuaternions(this.WHa,p);this.Enb&&(p.x=0,p.z=0,p.normalize());this.g8[0]=p.x;this.g8[1]=p.y;this.g8[2]=p.z;this.g8[3]=p.w;return this.g8}m=this.filter.zt();m=this.Bgb.idb(m,this.F6,this.pP);p=new c.Quaternion;p.copy(this.U5);p.multiply(this.Gw);p.multiply(m);p.multiply(this.RP);return p};
k.prototype.resetPose=function(){this.Gw.copy(this.filter.zt());this.Gw.x=0;this.Gw.y=0;this.Gw.z*=-1;this.Gw.normalize();f.RKa()&&this.Gw.multiply(this.V6);this.Gw.multiply(this.bNa)};k.prototype.fX=function(m){this.C_=this.C_||new c.Quaternion;var p=m.alpha,q=m.beta;m=m.gamma;p=(p||0)*Math.PI/180;q=(q||0)*Math.PI/180;m=(m||0)*Math.PI/180;this.C_.WOa(q,p,-m)};k.prototype.eX=function(m){var p=m.rotationRate;if(p){var q=m.accelerationIncludingGravity;m=m.timeStamp/1E3;this.KO&&(m/=1E3);var r=m-this.pP;
r<=f.bsa||r>f.Yra?this.pP=m:(this.qV.set(-q.x,-q.y,-q.z),this.F6.set(p.alpha,p.beta,p.gamma),(this.Wq||this.KO||this.Feb)&&this.F6.multiplyScalar(Math.PI/180),this.filter.c$a(this.qV,m),this.filter.k$a(this.F6,m),this.pP=m,this.NLa||(this.MLa++,this.MLa>=5&&(this.NLa=!0,d.m(new e(h.ud)))),this.v3!=this.XIa()&&this.zJ(),d.m(new e(h.V)))}else this.Fna=!0,window.addEventListener("deviceorientation",this.fX),window.removeEventListener("devicemotion",this.eX)};k.prototype.bind=function(){d.bind.apply(d,
arguments)};k.prototype.h=function(){d.h.apply(d,arguments)};k.prototype.zJ=function(){this.vPa();d.m(new e(h.V))};k.prototype.vPa=function(){this.RP.set(0,0,0,1);this.v3=this.XIa();switch(this.v3){case "landscape-primary":this.RP.setFromAxisAngle(new c.Vector3(0,0,1),-Math.PI/2);break;case "landscape-secondary":this.RP.setFromAxisAngle(new c.Vector3(0,0,1),Math.PI/2)}this.V6.copy(this.RP);this.V6.inverse()};k.prototype.XIa=function(){var m=screen.orientation&&screen.orientation.type;if(!m)switch(window.orientation){case 0:m=
"portrait-primary";break;case 90:m="landscape-primary";break;case -90:m="landscape-secondary";break;case 180:m="portrait-secondary"}m=="landscape-primary"&&(this.qV.z>4.9||this.qV.z<-4.9?m=this.v3||m:this.qV.x>0&&(m="landscape-secondary"));return m};n.prototype.idb=function(m,p,q){if(!this.pP)return this.t8.copy(m),this.pP=q,m;q=new c.Vector3;q.copy(p);q.normalize();p=p.length();if(p<c.degToRad*20)return this.nX.copy(m),this.t8.copy(m),this.nX;this.UHa.setFromAxisAngle(q,p*this.Dgb);this.nX.copy(this.t8);
this.nX.multiply(this.UHa);this.t8.copy(m);return this.nX};g.prototype.set=function(m,p){this.sample=m;this.E9=p};g.prototype.copy=function(m){this.set(m.sample,m.E9)};var f={bsa:.001,Yra:1,afb:function(m){return isNaN(m)||m<=f.bsa||m>f.Yra?!1:!0}};f.Wq=function(){var m=/iPad|iPhone|iPod/.test(navigator.platform);return function(){return m}}();f.mnb=function(){var m=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);return function(){return m}}();f.KO=function(){var m=navigator.userAgent.indexOf("Firefox")!==
-1&&navigator.userAgent.indexOf("Android")!==-1;return function(){return m}}();f.Ama=function(){var m=navigator.userAgent.match(/.*Chrome\/([0-9]+)/),p=m?parseInt(m[1],10):null;return function(){return p}}();f.Geb=function(){var m=!1;if(f.Ama()===65){var p=navigator.userAgent.match(/.*Chrome\/([0-9\.]*)/);if(p){p=p[1].split(".");var q=p[3];m=parseInt(p[2],10)===3325&&parseInt(q,10)<148}}return function(){return m}}();f.RKa=function(){return window.orientation==90||window.orientation==-90};return k});
define("tdv/player/view/util/Gyroscope","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/geo/Quaternion tdv/player/view/util/Device tdv/player/view/util/DeviceOrientationSensor tdv/player/view/util/FusionPoseSensor tdv/player/view/util/URL".split(" "),function(a){function l(){function w(){p=!0;f.m(new n(k.V))}function y(){var B;!E||!x&&A?A&&(B=z):B=D;q!=B&&(q&&(q.h(k.V,w),q.stop()),q=B)&&(q.bind(k.V,w,this,!0),w())}var x=e.Md()==e.pj||d.Ck("debug")&&
d.getQueryParameter("sensor")=="deviceorientation",z=new c,A=!1;z.bind(k.ud,function(){A=!0;y()},this,!0);var D=new b,E=!1;D.bind(k.ud,function(){E=!0;y()},this,!0)}a("tdv/utils");var k=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),h=a("tdv/player/view/util/geo/Quaternion"),e=a("tdv/player/view/util/Device"),b=a("tdv/player/view/util/DeviceOrientationSensor"),c=a("tdv/player/view/util/FusionPoseSensor"),d=a("tdv/player/view/util/URL"),f=new g,m={},p=!1,q,r=
[],t=!1,u=!1;m.ipa=function(w){w&&r.push(w);if(!m.disabled)for(;r.length;)r.pop()();else if(e.Md()==e.pj&&window.DeviceMotionEvent&&DeviceMotionEvent.requestPermission){DeviceOrientationEvent.requestPermission().then(function(x){x==="granted"&&(u=!0,y())})["catch"](function(){});DeviceMotionEvent.requestPermission().then(function(x){x==="granted"&&(t=!0,y())})["catch"](function(){});var y=function(){if(m.disabled&&t&&u)for(m.disabled=!1,l();r.length;)r.pop()()};y()}};m.bind=function(w,y){f.bind(k.V,
w,y)};m.h=function(w,y){f.h(k.V,w,y)};m.jgb=function(){return p};m.zt=function(){p=!1;if(q){var w=q.zt();w=h.G9(w);return{yaw:w.$a,pitch:w.pitch,roll:w.kh}}return{yaw:0,pitch:0,roll:0}};if(e.Md()==e.kta||e.Md()==e.lZ||e.Md()==e.Vra||e.gf())m.nl=!1,m.disabled=!1;else if(e.Md()==e.gB&&e.Ub()==e.Hp&&window.location.protocol!="https:"&&window.location.hostname!="localhost")m.nl=!0,m.disabled=!0;else if(e.Md()==e.pj)if(m.nl=!0,m.disabled=!0,window.DeviceMotionEvent&&DeviceMotionEvent.requestPermission)m.ipa();
else{var v=function(){window.removeEventListener("deviceorientation",v,!1);m.disabled=!1;l()};window.addEventListener("deviceorientation",v,!1)}else m.nl=window.DeviceMotionEvent!=void 0,m.disabled=!1;m.nl&&!m.disabled&&l();return m});
define("tdv/player/view/util/LibsLoader",["require","exports","tdv/player/view/util/URL"],function(a,l,k){l=function(){function g(){this.o7=null;this.q5=[]}g.prototype.initialize=function(h){this.o7=k.YA(h);this.HY=this.HY.bind(this);this.update()};g.prototype.load=function(h,e){this.q5.push({call:h,context:e||window});this.VO||(this.VO=this.V5());this.update()};g.prototype.kj=function(){return this.VO!==void 0};g.prototype.update=function(){this.q5.length>0&&(this.VO!==void 0?this.Abb():this.o7&&
this.Nna())};g.prototype.HY=function(){var h=this.V5();h===void 0?setTimeout(this.HY,250):(this.VO=h,this.update())};g.prototype.Nna=function(){throw Error("Method not implemented.");};g.prototype.V5=function(){throw Error("Method not implemented.");};g.prototype.Abb=function(){for(;this.q5.length>0;){var h=this.q5.pop();h.call.call(h.context,this.VO)}};return g}();a=function(g){function h(e){var b=g.call(this)||this;b.lLa=e;return b}O(h,g);h.prototype.Nna=function(){this.script||(this.script=document.createElement("script"),
this.script.type="text/javascript",this.script.src=this.o7,document.getElementsByTagName("head")[0].appendChild(this.script),this.HY())};h.prototype.V5=function(){for(var e=window,b=0;b<this.lLa.length&&e!==void 0;b++)e=e[this.lLa[b]];return e};return h}(l);l=function(g){function h(e){var b=g.call(this)||this;b.goa=e;return b}O(h,g);h.prototype.Nna=function(){this.module||(h.zeb(),this.module=document.createElement("script"),this.module.type="module",this.module.textContent=['import * as all from "'+
this.o7+'";',"window."+this.goa.join(".")+" = all;"].join("\n"),document.getElementsByTagName("head")[0].appendChild(this.module),this.HY())};h.prototype.V5=function(){for(var e=window,b=0;b<this.goa.length&&e!==void 0;b++)e=e[this.goa[b]];return e};h.zeb=function(){this.O6||(this.O6=document.createElement("script"),this.O6.type="importmap",this.O6.textContent=['{\n"imports":\n{','"three": "'+this.kbb()+'"',"}\n}"].join("\n"),document.getElementsByTagName("head")[0].appendChild(this.O6))};h.kbb=function(){var e=
[];e.push("const three = window.THREE;");for(var b in window.THREE)e.push("export const "+b+" = three."+b+";");return window.URL.createObjectURL(new Blob([e.join("\n")],{type:"application/javascript"}))};return h}(l);var n={};n.GS=new l(["TDV","GS"]);n.iUa=new a(["WebVRConfig","FORCE_ENABLE_VR"]);n.ita=new a(["WebXRPolyfill"]);n.HLS=new a(["Hls"]);n.initialize=function(g){this.HLS.initialize(g.get(TDV.PlayerSettings.HLS_URL));this.iUa.initialize(g.get(TDV.PlayerSettings.WEBVR_POLYFILL_URL));this.ita.initialize(g.get(TDV.PlayerSettings.WEBXR_POLYFILL_URL));
this.GS.initialize(g.get(TDV.PlayerSettings.GS_URL))};return n});
define("tdv/player/view/util/xr/APIAvailabilityChecker","require exports tdv/player/view/util/Device tdv/player/view/util/Capabilities tdv/player/view/util/Gyroscope tdv/player/view/util/LibsLoader tdv/player/view/util/URL".split(" "),function(a,l,k,n,g,h,e){return function(){function b(){}b.initialize=function(c){this.XR.G8?(this.fqa(!0),this.FW||(this.FW=this.Aqa("immersive-ar").then(function(d){this.H8(d)}.bind(this)).catch(function(){this.H8(!1)}.bind(this))),c()):(this.FW||(this.FW=Promise.all([this.Aqa("immersive-vr").then(function(d){this.fqa(d)}.bind(this)).catch(function(){this.fqa(!1)}.bind(this)),
this.Aqa("immersive-ar").then(function(d){this.H8(d)}.bind(this)).catch(function(){this.H8(!1)}.bind(this))])),this.FW.then(function(){c()}))};b.fqa=function(c){this.XR.QP=c;this.XR.Nlb=c&&(k.gf()||!k.ub());c&&n.ljb()};b.H8=function(c){this.XR.rGa=c};b.Aqa=function(c){return this.dkb(c).then(function(d){return d?Promise.resolve(!0):this.ekb(c)}.bind(this))};b.dkb=function(c){return!navigator.xr||c=="immersive-vr"&&e.getQueryParameter("vr_mode")=="cardboard"?Promise.resolve(!1):this.fkb(c)};b.ekb=
function(c){return this.U$a(c)?this.E$a():Promise.resolve(!1)};b.fkb=function(c){return navigator.xr&&navigator.xr.isSessionSupported?navigator.xr.isSessionSupported(c):navigator.xr&&navigator.xr.supportsSession?navigator.xr.supportsSession(c):Promise.reject()};b.U$a=function(c){return c=="immersive-ar"?!1:g.nl&&k.ub()&&k.yk()!=k.ZP&&this.V$a()};b.V$a=function(){return k.yk()==k.UY?this.bfb():!0};b.bfb=function(){try{return window.self===window.top}catch(c){return!1}};b.E$a=function(){var c=this;
return new Promise(function(d){h.ita.load(function(){var f;c.zgb=new window.WebXRPolyfill({overwriteNativeXR:!0,cardboardConfig:{DPDB_URL:"https://raw.githubusercontent.com/immersive-web/webvr-polyfill-dpdb/refs/heads/main/dpdb.json",BUFFER_SCALE:(f=c.XR)===null||f===void 0?void 0:f.s8,CARDBOARD_UI_DISABLED:!1,ROTATE_INSTRUCTIONS_DISABLED:!0,MOBILE_WAKE_LOCK:!1}});c.XR.NO=!0;d(!0)})})};b.FW=null;b.zgb=null;return b}()});
define("three.mod",["require","exports"],function(){var a=window.THREE,l=new TDV.PlayerSettings;a.rra=l.get(TDV.PlayerSettings.e$);a.Ara=l.get(TDV.PlayerSettings.v$);a.JB=l.get(TDV.PlayerSettings.JB);return a});
define("tdv/player/view/util/xr/CameraPosition",["require","exports","tdv/constants/EventName","three.mod"],function(a,l,k,n){var g=function(){function r(){}r.initialize=function(){this.XR.Sh=new n.Group;this.XR.Sh.matrixAutoUpdate=!1;this.XR.pm=new n.Group;this.XR.pm.matrixAutoUpdate=!1;this.XR.Sh.add(this.XR.pm);this.XR.M.bind(k.NY,this.lE,this,!0);this.XR.M.bind(k.V,this.Ya,this,!0)};r.setScale=function(t){this.kf!==t&&(this.kf=t,this.XR.xi=1/t,this.setPosition({x:this.XR.Ic.x,y:this.XR.Ic.y,z:this.XR.Ic.z,
yaw:-c.setFromQuaternion(this.XR.ug,"YXZ").y*q}))};r.vP=function(t){var u,v;this.s7(this.XE,e);this.s7(m.copy(this.XE).premultiply(this.XR.Sh.matrixWorld),h);var w=this.XR.Sh.matrix;w.identity();w.multiply(m.makeRotationY(t===void 0?h.yaw:-t*p));w.multiply(m.makeRotationY(-e.yaw));w.multiply(m.makeScale(this.XR.xi,this.XR.xi,this.XR.xi));w.multiply(m.makeTranslation(-e.x,-e.y,-e.z));t!==void 0&&(w=this.XR.pm.matrix,w.identity(),w.multiply(m.makeTranslation(e.x,e.y,e.z)),w.multiply(m.makeRotationY(-e.yaw*
p)));this.XR.Sh.updateMatrixWorld(!0);(u=this.camera)===null||u===void 0||u.updateMatrixWorld(!0);(v=this.yl)===null||v===void 0||v.updateMatrixWorld(!0);this.hra()};r.C8=function(){this.kf=1;this.XR.xi=1;c.setFromQuaternion(this.XR.xl,"YXZ");this.setPosition({x:this.XR.U9.x,y:this.XR.U9.y,z:this.XR.U9.z,yaw:-c.y*q,pitch:c.x*q,roll:c.z*q})};r.setPosition=function(t){var u,v;this.s7(this.XE,e);this.s7(m.copy(this.XE).premultiply(this.XR.Sh.matrixWorld),h);var w=this.XR.Sh.matrix;w.identity();w.multiply(m.makeTranslation(t.x===
void 0?h.x:t.x,t.y===void 0?h.y:t.y,t.z===void 0?h.z:t.z));w.multiply(m.makeRotationY(t.yaw===void 0?h.yaw:-t.yaw*p));w.multiply(m.makeRotationX(t.pitch===void 0?h.pitch:t.pitch*p));w.multiply(m.makeRotationZ(t.roll===void 0?h.roll:t.roll*p));w.multiply(m.makeRotationZ(-e.roll));w.multiply(m.makeRotationX(-e.pitch));w.multiply(m.makeRotationY(-e.yaw));w.multiply(m.makeScale(this.XR.xi,this.XR.xi,this.XR.xi));w.multiply(m.makeTranslation(-e.x,-e.y,-e.z));if(t.yaw!==void 0||t.pitch!==void 0||t.roll!==
void 0)w=this.XR.pm.matrix,w.identity(),w.multiply(m.makeTranslation(e.x,e.y,e.z)),w.multiply(m.makeRotationY(-e.yaw*p)),w.multiply(m.makeRotationX(e.pitch*p)),w.multiply(m.makeRotationX(e.roll*p));this.XR.Sh.updateMatrixWorld(!0);(u=this.camera)===null||u===void 0||u.updateMatrixWorld(!0);(v=this.yl)===null||v===void 0||v.updateMatrixWorld(!0);this.hra()};r.lE=function(){var t,u,v,w;this.Mw(this.XR.IA);this.GPa(((t=this.XR.zg)===null||t===void 0?void 0:t.xr.getCamera())||null);this.setCamera(this.XR.Cw);
if(u=(u=(t=(u=this.XR.zg)===null||u===void 0?void 0:u.xr.getFrame())&&this.XR.referenceSpace&&t.getViewerPose(this.XR.referenceSpace))&&u.transform)this.XR.bO=u.position.y,this.XE.fromArray(u.matrix),this.XE.decompose(this.XR.U9,this.XR.xl,f),(v=this.camera)===null||v===void 0||v.updateMatrixWorld(!0),(w=this.yl)===null||w===void 0||w.updateMatrixWorld(!0),this.hra()};r.Ya=function(){this.XR.isPresenting?this.scene&&this.camera&&(this.XR.IA!=this.scene||this.XR.Cw!=this.camera)&&(this.Mw(this.XR.IA),
this.setCamera(this.XR.Cw),this.XR.zg.xr.updateCamera(this.XR.Cw),this.setPosition({x:this.XR.Ic.x,y:this.XR.Ic.y,z:this.XR.Ic.z,$a:-c.setFromQuaternion(this.XR.ug,"YXZ").y*q})):(this.Mw(null),this.GPa(null),this.setCamera(null))};r.hra=function(){m.copy(this.XE).premultiply(this.XR.Sh.matrixWorld).decompose(this.XR.Ic,this.XR.ug,f);c.setFromRotationMatrix(this.XR.pm.matrix,"YXZ");d.setFromMatrixPosition(this.XE);this.XR.pm.matrix.identity();this.XR.pm.matrix.multiply(m.makeTranslation(d.x,d.y,d.z));
this.XR.pm.matrix.multiply(m.makeRotationFromEuler(c));this.XR.pm.updateMatrixWorld(!0)};r.Mw=function(t){this.scene!==t&&(this.scene&&this.scene.remove(this.XR.Sh),t==null&&(this.jOa(),this.lOa()),(this.scene=t)&&this.scene.add(this.XR.Sh))};r.setCamera=function(t){this.camera!==t&&(this.jOa(),(this.camera=t)&&this.XR.Sh.add(this.camera))};r.GPa=function(t){this.yl!==t&&(this.lOa(),(this.yl=t)&&this.XR.Sh.add(this.yl))};r.jOa=function(){this.scene&&this.camera&&this.camera.parent===this.XR.Sh&&(this.scene.add(this.camera),
this.camera=null)};r.lOa=function(){this.yl&&this.yl.parent===this.XR.Sh&&(this.yl.parent.remove(this.yl),this.yl=null)};r.s7=function(t,u){t.decompose(d,b,f);c.setFromQuaternion(b,"YXZ");u.yaw=c.y;u.pitch=c.x;u.roll=c.z;u.x=d.x;u.y=d.y;u.z=d.z};r.XE=new n.Matrix4;r.kf=1;r.scene=null;r.camera=null;r.yl=null;return r}(),h={x:void 0,y:void 0,z:void 0,$a:void 0},e={x:void 0,y:void 0,z:void 0,$a:void 0},b=new n.Quaternion,c=new n.Euler,d=new n.Vector3,f=new n.Vector3,m=new n.Matrix4,p=Math.PI/180,q=180/
Math.PI;window.mj=function(r){g.setPosition({x:void 0,y:void 0,z:void 0,$a:r})};return g});define("tdv/player/view/util/xr/pointer/PointerType",["require","exports"],function(){return{BF:"gaze",CF:"laser"}});
define("tdv/player/view/util/xr/RendererList",["require","exports","tdv/constants/EventName"],function(a,l,k){return function(){function n(){}n.cib=function(g,h,e){var b=this.XR.Un.indexOf(g);b>-1&&b!==this.XR.Un.length-1&&(this.XR.Un.splice(b,1),this.XR.Un.splice(this.XR.Un.length,0,g));this.XR.gpa.set(g,h);this.XR.fpa.set(g,e);g!==this.XR.zg||this.XR.IA===h&&this.XR.Cw===e||(this.XR.IA=h,this.XR.Cw=e,this.XR.M.m(k.V))};n.add=function(g){this.remove(g);this.XR.Un.push(g)};n.remove=function(g){var h=
this.XR.Un.indexOf(g);h!=-1&&(this.XR.Un.splice(h,1),this.XR.gpa.delete(g),this.XR.fpa.delete(g))};return n}()});define("tdv/player/view/util/xr/RendererType",["require","exports"],function(){return{yaa:"Panorama",paa:"Model3D"}});define("tdv/player/view/util/xr/pointer/SelectionMode",["require","exports"],function(){return{BF:"gaze",JSa:"gaze_click"}});define("tdv/player/view/util/xr/SessionMode",["require","exports"],function(){return{Sr:"immersive-vr",tr:"immersive-ar"}});
define("tdv/player/view/util/xr/Type",["require","exports"],function(){return{ko:"Cardboard",xmb:"WebVR",jUa:"WebXR"}});define("tdv/constants/RenderOrder",["require","exports"],function(){return{eTa:-1,oTa:0,fTa:0,NSa:0,Wlb:1,kSa:2,lSa:101,MTa:0,NTa:2,TTa:2,aTa:2,STa:2,KSa:2,ZTa:100,nta:900,DTa:10,XRa:-1E3,Kra:1E3,mUa:999,lUa:999,kUa:1E3,JTa:1E3,nUa:1001,oUa:1E3,uTa:1E3,mta:1E4}});
define("tdv/player/view/util/xr/ui/DraggingPointerState",["require","exports"],function(){var a=function(){return function(){}}();a;return a});define("tdv/player/view/util/xr/ui/UIPointerState",["require","exports"],function(){return function(){return function(){}}()});define("tdv/view/util/EaseDimension",["require","exports"],function(){return function(){return function(a,l,k,n){n===void 0&&(n=void 0);this.name=a;this.from=l;this.to=k;this.nfb=n}}()});
define("tdv/view/util/Ease",["require","exports","tdv/view/util/EaseDimension"],function(a,l,k){function n(c){return function(d,f,m){d=Math.abs(f-d);return d/m<1?0:1/(1-Math.pow((d-m)/d,1/c))}}function g(c){var d=new b;d.uma=function(f,m,p,q){return f+(m-f)*Math.pow(p<=0?0:p>=q?1:p/q,c)};d.Xna=n(c);return d}function h(c){var d=new b;d.uma=function(f,m,p,q){return f+(m-f)*(1-Math.pow(1-(p<=0?0:p>=q?1:p/q),c))};d.Xna=n(c);return d}function e(c){var d=new b;d.uma=function(f,m,p,q){p=p<=0?0:p>=q?1:p/
q;p<.5?p=Math.pow(p*2,c):(p=1-Math.pow(1-(p*2-1),c),p+=1);return f+p*.5*(m-f)};d.Xna=n(c);return d}a=function(){function c(d,f,m){m===void 0&&(m=void 0);switch(d){case "quad_in":this.curve=g(2);break;case "quad_out":this.curve=h(2);break;case "quad_in_out":this.curve=e(2);break;case "cubic_in":this.curve=g(3);break;case "cubic_out":this.curve=h(3);break;case "cubic_in_out":this.curve=e(3);break;case "quart_in":this.curve=g(4);break;case "quart_out":this.curve=h(4);break;case "quart_in_out":this.curve=
e(4);break;case "quint_in":this.curve=g(5);break;case "quint_out":this.curve=h(5);break;case "quint_in_out":this.curve=e(5);break;default:this.curve=g(1)}this.Xz=f.slice();this.time=0;this.duration=this.UGa(f,m);this.Tla={};for(d=0;d<this.Xz.length;d++)this.Tla[this.Xz[d].name]=f[d].from}c.prototype.jW=function(d){for(var f=0;f<this.Xz.length;f++)if(this.Xz[f].name==d)return this.Xz[f];return null};c.prototype.nb=function(d){return this.Tla[d]};c.prototype.Ena=function(){return this.time>0};c.prototype.Re=
function(){return this.time>=this.duration};c.prototype.hj=function(){return this.duration};c.prototype.wm=function(){return this.time/this.duration};c.prototype.getTime=function(){return this.time};c.prototype.setTime=function(d){this.time=Math.min(Math.max(0,d),this.duration);for(d=0;d<this.Xz.length;d++){var f=this.Xz[d];this.Tla[f.name]=this.curve.uma(f.from,f.to,this.time,this.duration)}};c.prototype.Lb=function(d){this.setTime(this.time+d)};c.prototype.UGa=function(d,f,m){m===void 0&&(m=void 0);
for(var p=[],q=0;q<this.Xz.length;q++){var r=this.Xz[q],t=m?m:r.nfb;t!==void 0&&t>0&&p.push(this.curve.Xna(r.from,r.to,t/1E3))}if(p.length>0){d=p[0];for(q=1;q<p.length;q++)d=Math.max(d,p[q]);return f!==void 0&&f>0?Math.max(f,d):d}return f!==void 0?Math.max(f,.001):this.UGa(d,f,1E3)};c.hj=function(){return(new c(void 0,[new k("",void 0,void 0,void 0)])).hj()};return c}();var b=function(){return function(){}}();return a});
define("tdv/view/util/Animation",["require","exports","tdv/utils","tdv/view/util/Visibility","tdv/player/view/util/Flags"],function(a,l,k,n,g){var h=window.requestAnimationFrame.bind(window),e=window.cancelAnimationFrame.bind(window),b=function(){function d(){}d.requestFrame=function(f,m,p){for(var q=0;q<d.Lt.length;q++)if(d.Lt[q].is(f,m))return;q=d.l7;p!==void 0&&(q+=p);d.Lt.push(new c(f,m,q));d.paused||d.Fw!==void 0||(d.Fw=d.CX(d.c6))};d.cHa=function(f,m){for(var p=0;p<d.Lt.length;p++)if(d.Lt[p].is(f,
m)){d.Lt.splice(p,1);break}};d.eY=function(f){d.paused!=f&&(d.paused=f,d.paused?d.Fw!==void 0&&(d.wla(d.Fw),d.Fw=void 0):d.Lt.length>0&&(d.Fw=d.CX(d.c6)))};d.uPa=function(f,m){d.CX!=f&&(d.Fw!==void 0&&(d.wla(d.Fw),d.Fw=f(d.c6)),d.CX=f,d.wla=m)};d.khb=function(){d.uPa(h,e)};d.c6=function(f){d.sIa(f);d.Fw=d.Lt.length>0?d.CX(d.c6):void 0};d.sIa=function(f){f<d.xf&&(d.startTime=f-d.l7*d.gaa,d.xf=f);var m=0;d.startTime===void 0?d.startTime=f:m=Math.round((f-d.startTime)/d.gaa);var p=(m-d.l7)*d.gaa,q=d.Lt;
d.Lt=[];d.P6=!0;d.l7=m;p=p>1?p<100?p:100:1;d.xf=f;d.bW=p;for(f=0;f<q.length;f++){var r=q[f];m<r.GLa?d.Lt.push(r):r.call(p)}d.P6=!1};d.xf=(new Date).getTime();d.bW=0;d.P6=!1;d.CX=h;d.wla=e;d.Lt=[];d.Fw=void 0;d.paused=!1;d.gaa=1E3/60;d.l7=0;d.startTime=void 0;return d}();g.$Ta&&setInterval(function(){n.visible||b.sIa(b.xf+100)},100);var c=function(){function d(f,m,p){this.GLa=0;this.Rq=f;this.context=m;this.GLa=p}d.prototype.is=function(f,m){return this.Rq==f&&this.context==m};d.prototype.call=function(f){try{this.Rq.call(this.context,
f)}catch(m){k.PW("Error in animation frame",m)}};return d}();return b});
define("tdv/player/view/util/xr/ui/UIPanel","require exports three.mod tdv/constants/EventName tdv/constants/RenderOrder tdv/player/view/util/xr/ui/DraggingPointerState tdv/player/view/util/xr/ui/UIPointerState tdv/view/util/Ease tdv/view/util/EaseDimension tdv/view/util/Animation".split(" "),function(a,l,k,n,g,h,e,b,c,d){var f=document.createElement("canvas");f.width=f.height=64;a=function(){function E(){this.zi=this.Bg=null;this.o8=this.Rj=this.Sj=0;this.draggable=this.l5=this.M6=this.YW=!1;this.gIa=
this.fIa=0;this.bma=1;this.canvas=f;this.Sj=this.canvas.width;this.Rj=this.canvas.height;this.Te=this.Yab();this.TV=this.Qab();this.TV.scale.set(100,100,1);this.Te.add(this.TV);this.group=new k.Group;this.ul=new k.Group;this.ul.rotation.order="YXZ";this.group.add(this.ul);this.ul.add(this.Te);this.Zz=this.Oab();this.draggable=!1;this.XN=null;this.M$a=new k.Quaternion;this.M6=this.l5=!1;this.Ap(1);this.fY(.001);this.QX(!0);E.XR.M.bind(n.me,this.Kg,this,!0);this.M5=new k.Sphere;this.Zv=new k.Group;
this.K5=new k.Object3D;this.Zv.add(this.K5)}E.prototype.dispose=function(){E.XR.M.h(n.me,this.Kg,this);this.Hbb();this.H5()};E.prototype.xib=function(B){this.Zz.renderOrder=this.Te.renderOrder=g.nta+B/100};E.prototype.Yab=function(){var B=this.kO(),C=this.rm(this.canvas);B=new k.Mesh(B,C);B.rotation.order="YXZ";B.userData.$W=!0;return B};E.prototype.Qab=function(){var B=this.kO(),C=new k.MeshBasicMaterial({color:65280,side:k.DoubleSide,depthTest:!1,transparent:!0});B=new k.Mesh(B,C);B.visible=!1;
return B};E.prototype.Oab=function(){var B=this.kO(),C=document.createElement("canvas");C.width=256;C.height=64;var F=C.getContext("2d");F.shadowColor="rgba(0, 0, 0, 0.5)";F.shadowBlur=16;F.shadowOffsetX=0;F.shadowOffsetY=0;F.fillStyle="#ffffff";F.beginPath();F.roundRect(16,16,224,32,16);F.closePath();F.fill();C=this.rm(C);C.depthTest=!1;C.transparent=!0;C.opacity=0;B=new k.Mesh(B,C);B.renderOrder=g.nta;return B};E.prototype.kO=function(){return new k.PlaneGeometry(1,1)};E.prototype.rm=function(B){return new k.MeshBasicMaterial({map:this.createTexture(B),
side:k.DoubleSide,depthTest:!1,transparent:!0})};E.prototype.createTexture=function(B){B=new k.CanvasTexture(B);B.colorSpace=k.SRGBColorSpace;return B};E.prototype.Hbb=function(){this.Te.geometry.dispose()};E.prototype.H5=function(){this.I5();this.Te.material.dispose()};E.prototype.I5=function(){this.Te.material.map.dispose()};E.prototype.Lpa=function(B){this.YW=B};E.prototype.JO=function(){var B;return((B=this.zi)===null||B===void 0?void 0:B.pressed)||!1};E.prototype.KE=function(B,C){this.Bg&&(this.Bg.Ue=
B,this.Bg.br=C)};E.prototype.OP=function(B){this.Pkb(B);this.Okb();this.ulb(B)};E.prototype.ulb=function(B){var C;if(B&&this.deb()){y.ray.copy(B.ray).applyMatrix4(B.matrixWorld);var F=this.zi?[]:y.intersectObjects([this.Te],!1);if((F=F.length>0?F[0]:null)&&F.uv.x>=0&&F.uv.x<=1&&F.uv.y>=0&&F.uv.y<=1){var G=F.uv.x;var I=F.uv.y;var N=F.distance}else if((C=this.Bg)===null||C===void 0?0:C.pressed)F=y.intersectObjects([this.TV],!1),(F=F.length>0?F[0]:null)&&F.uv.x>=0&&F.uv.x<=1&&F.uv.y>=0&&F.uv.y<=1&&(G=
(F.uv.x-.5)*this.TV.scale.x+.5,I=(F.uv.y-.5)*this.TV.scale.y+.5,N=F.distance);F?(C=G*this.canvas.width,I=(1-I)*this.canvas.height,this.Bg||(this.Bg=new e),this.Bg.kNa=C,this.Bg.lNa=I,this.Bg.distance=N,this.Bg.pressed=B.pressed,this.Bg.jkb=B.Qb.x,this.Bg.kkb=B.Qb.y):this.Bg=null}else this.Bg=null};E.prototype.Pkb=function(B){var C;if(B&&this.draggable){y.ray.copy(B.ray).applyMatrix4(B.matrixWorld);if(B.pressed){if(!this.zi)return;this.zi.pressed||(this.zi.pressed=!0,this.Bjb(y))}else this.qqa(),B=
y.intersectObjects([this.Zz],!1),B.length>0?(this.zi||(this.zi=new h),this.zi.Ue=!0,this.zi.br=!0,this.zi.pressed=!1,this.zi.distance=B[0].distance):this.zi=null;if((C=this.zi)===null||C===void 0?0:C.pressed)this.Nkb(y),y.ray.intersectSphere(this.M5,r)&&(this.zi.distance=r.distanceTo(y.ray.origin))}else this.zi=null};E.prototype.Okb=function(){var B,C,F;(B=this.zi)===null||B===void 0||!B.Ue||(C=this.zi)!==null&&C!==void 0&&C.pressed?this.SOa(.75):this.SOa(1);this.Ohb(((F=this.zi)===null||F===void 0?
0:F.pressed)?1:.75)};E.prototype.Bjb=function(B){B=B.intersectObjects([this.Zz],!1);B.length===0?this.qqa():(r.copy(B[0].point).applyMatrix4(q.copy(this.group.matrixWorld).invert()),this.M5.radius=r.length(),r.normalize(),this.group.add(this.Zv),this.Zv.rotation.set(r.y==0&&r.z==0?0:-Math.atan2(r.y,Math.sqrt(r.z*r.z+r.x*r.x)),r.x==0&&r.z==0?0:Math.atan2(r.x,r.z),0,"YXZ"),this.Zv.updateMatrixWorld(!0),this.Te.updateMatrixWorld(!0),r.setFromMatrixPosition(this.Te.matrixWorld).applyMatrix4(q.copy(this.Zv.matrixWorld).invert()),
this.K5.position.set(r.x,r.y,r.z))};E.prototype.qqa=function(){var B;(B=this.Zv.parent)===null||B===void 0||B.remove(this.Zv)};E.prototype.Nkb=function(B){this.Zv.updateMatrixWorld(!0);this.M5.center.setFromMatrixPosition(this.Zv.matrixWorld);if(B.ray.intersectSphere(this.M5,r)){this.group.updateMatrixWorld(!0);r.applyMatrix4(q.copy(this.group.matrixWorld).invert()).normalize();this.Zv.rotation.set(r.y==0&&r.z==0?0:-Math.atan2(r.y,Math.sqrt(r.z*r.z+r.x*r.x)),r.x==0&&r.z==0?0:Math.atan2(r.x,r.z),0,
"YXZ");this.group.updateMatrixWorld(!0);this.K5.updateMatrixWorld(!0);B=v;var C=w;C.setFromUnitVectors(t,r.setFromMatrixPosition(this.K5.matrixWorld).applyMatrix4(q.copy(this.group.matrixWorld).invert()).normalize());B.setFromEuler(u.set(this.ul.rotation.x,this.ul.rotation.y,0,"YXZ"));B.slerp(C,.2);B.angleTo(C)<.001&&B.copy(C);u.setFromQuaternion(B,"YXZ");this.ul.rotation.x=u.x;this.ul.rotation.y=u.y}else this.qqa()};E.prototype.Sc=function(){return this.group};E.prototype.Xn=function(B){this.Te.material.opacity=
B;this.Te.material.needsUpdate=!0};E.prototype.Ap=function(B){this.Te.position.set(0,0,-B)};E.prototype.mj=function(B){this.ul.rotation.y=-B*m};E.prototype.Lc=function(){return-this.ul.rotation.y*p};E.prototype.Yn=function(B){this.ul.rotation.x=B*m};E.prototype.Jc=function(){return this.ul.rotation.x*p};E.prototype.rab=function(){this.qRa(f)};E.prototype.qRa=function(B){B.width!==this.Sj||B.height!==this.Rj?(this.H5(),this.Te.material=this.rm(B)):this.canvas!==B&&(this.I5(),this.Te.material.map=this.createTexture(B));
this.Te.material.map.needsUpdate=!0;this.Te.material.needsUpdate=!0;this.canvas=B;this.Sj=this.canvas.width;this.Rj=this.canvas.height;this.mRa();this.cRa();this.Oqa()};E.prototype.deb=function(){return this.canvas!==f};E.prototype.fY=function(B){this.o8!==B&&(this.o8=B,this.mRa())};E.prototype.mRa=function(){this.Te.scale.set(this.Sj*this.o8,this.Rj*this.o8,1);this.Oqa()};E.prototype.Kg=function(){this.M6?this.eRa():this.l5&&this.Ckb()};E.prototype.P8=function(B){this.M6!=B&&((this.M6=B)?this.eRa():
this.group.rotation.set(0,0,0,"YXZ"))};E.prototype.eRa=function(){this.group.rotation.setFromQuaternion(E.XR.xl)};E.prototype.J8=function(B){this.l5!=B&&(this.l5=B)&&(u.setFromQuaternion(E.XR.xl,"YXZ"),this.ul.rotation.x=u.x,this.ul.rotation.y=u.y)};E.prototype.Ckb=function(){u.setFromQuaternion(E.XR.xl,"YXZ");u.z=0;x.setFromEuler(u);z.setFromEuler(this.ul.rotation);if(this.XN){if(this.XN.Lb(d.bW),z.slerp(x,this.XN.nb("centering")),u.setFromQuaternion(z,"YXZ"),this.ul.rotation.x=u.x,this.ul.rotation.y=
u.y,x.angleTo(z)<D||this.XN.Re())this.XN=null}else x.angleTo(z)>A&&(this.M$a.copy(x),this.XN=new b("linear",[new c("centering",0,1)],2E3))};E.prototype.QX=function(B){this.draggable!=B&&((this.draggable=B)?this.Te.add(this.Zz):this.Te.remove(this.Zz))};E.prototype.Nhb=function(B,C){this.fIa=B;this.gIa=C;this.Oqa()};E.prototype.SOa=function(B){this.bma=B;this.cRa()};E.prototype.cRa=function(){this.Zz.scale.set(128/this.Sj*this.bma,32/this.Rj*this.bma,1)};E.prototype.Ohb=function(B){this.Zz.material.opacity=
B;this.Zz.material.needsUpdate=!0};E.prototype.Oqa=function(){this.Zz.position.set(-.5+this.fIa/this.Sj,.5-this.gIa/this.Rj,0)};return E}();var m=Math.PI/180,p=180/Math.PI,q=new k.Matrix4,r=new k.Vector3,t=new k.Vector3(0,0,-1),u=new k.Euler,v=new k.Quaternion,w=new k.Quaternion,y=new k.Raycaster,x=new k.Quaternion,z=new k.Quaternion,A=35*m,D=2*m;return a});
define("tdv/player/view/util/xr/ui/UI",["require","exports","tdv/player/view/util/xr/ui/UIPanel","tdv/constants/EventName"],function(a,l,k,n){return function(){function g(){}g.Zab=function(){var h=new k;this.sl.push(h);this.XR.pm.add(h.Sc());return h};g.ybb=function(h){var e=this.sl.indexOf(h);e!==-1&&(this.XR.pm.remove(h.Sc()),this.sl.splice(e,1),h.dispose())};g.initialize=function(){this.XR.M.bind(n.V,this.Ya,this,!0);this.Ya()};g.Ya=function(){this.XR.isPresenting?this.XR.M.bind(n.me,this.Kg,this,
!0):this.XR.M.h(n.me,this.Kg,this)};g.alb=function(){this.sl=[].concat(this.sl.filter(function(h){return!h.YW&&!h.JO()}),this.sl.filter(function(h){return!h.YW&&h.JO()}),this.sl.filter(function(h){return h.YW}));this.sl.forEach(function(h,e){return h.xib(e)})};g.Kg=function(){this.alb();this.AY()};g.AY=function(){for(var h,e,b=this.XR.nd.reduce(function(r,t){return r===null||r.oP<t.oP||r.oP===t.oP&&t.handedness==="right"?t:r},null),c=!1,d=!1,f=Number.POSITIVE_INFINITY,m=!1,p=this.sl.length-1;p>=0;p--)if(c)this.sl[p].OP(null);
else{m=m||((h=this.sl[p].zi)===null||h===void 0?void 0:h.pressed)||((e=this.sl[p].Bg)===null||e===void 0?void 0:e.pressed)||!1;this.sl[p].OP(b);var q=this.sl[p].zi;q&&q.Ue&&q.distance<f&&(c=!0,d=q.br,f=q.distance);(q=this.sl[p].Bg)&&q.Ue&&q.distance<f&&(c=!0,d=q.br,f=q.distance)}m&&b&&!b.pressed&&this.XR.NX(b,50);h=this.sl.some(function(r){return r.YW});if(c||this.Ue||h)for(p=0;p<this.XR.nd.length;p++)this.XR.nd[p]===b?this.FGa(this.XR.nd[p],h,c,d,f):this.FGa(this.XR.nd[p],h,!1,!1);this.Ue=c};g.FGa=
function(h,e,b,c,d){b||e?(h.pressed||h.br===c||this.XR.NX(h,5),h.Pz||(this.XR.qPa(h,!0),this.XR.a9(h,!1)),this.XR.KE(h,b,c,d)):h.Pz&&(!h.pressed&&h.br&&this.XR.NX(h,5),this.XR.qPa(h,!1),h.Ue&&this.XR.KE(h,!1,!1))};g.sl=[];g.Ue=!1;return g}()});
define("tdv/player/view/util/xr/VisibilityListener",["require","exports","tdv/constants/EventName","tdv/player/view/util/Flags","tdv/view/util/Visibility"],function(a,l,k,n,g){return function(){function h(){}h.initialize=function(){this.Ya=this.Ya.bind(this);this.e8=this.e8.bind(this);this.XR.M.bind(k.V,this.Ya,this,!0);window.addEventListener("vrdisplayblur",function(){g.eqa(!0)},!0);window.addEventListener("vrdisplayfocus",function(){g.eqa(!1)},!0)};h.Ya=function(){this.XR.session?(this.ZE=this.XR.session,
this.ZE.addEventListener("visibilitychange",this.e8)):(this.ZE&&this.ZE.removeEventListener("visibilitychange",this.e8),this.ZE=null);g.OA(this.XR.isPresenting)};h.e8=function(){g.eqa(!this.ZE||this.ZE.visibilityState!="visible");n.ASa&&this.ZE.visibilityState!="visible"&&this.XR.tm()};h.ZE=null;return h}()});
define("tdv/player/view/util/xr/VRAutoStart",["require","exports","tdv/player/view/util/Device","tdv/player/view/util/URL","tdv/player/view/util/xr/SessionMode"],function(a,l,k,n,g){return function(){function h(){}h.initialize=function(){this.XD=[k.mu,k.nu].indexOf(k.Dc())>-1;this.tRa=n.Ck("vr");if(this.XD||this.tRa)this.TQa(),document.addEventListener("visibilitychange",function(){document.hidden||this.TQa()}.bind(this),!1)};h.TQa=function(){this.sab();this.kla=0;this.eQa()};h.eQa=function(){this.kla++;
this.D9=setTimeout(this.ggb.bind(this),this.tRa?500:this.kla*1E3)};h.sab=function(){this.D9&&(clearTimeout(this.D9),this.D9=null)};h.ggb=function(){this.D9=null;this.XD&&this.kla>5?window.location.reload():document.hidden||h.XR.isPresenting||(!this.rt(g.Sr)||this.XD)&&this.eQa()};h.rt=function(e){if(!this.XR.FJ)return!1;for(var b=this.XR.FJ.Bi("Model3DPlayer"),c=0;c<b.length;c++){var d=b[c];if(d.get("model")&&d.get("model").get("isLoaded"))return d.get("viewerArea").set("viewMode","vr"),!0}if(e==
g.Sr){e=this.XR.FJ.Bi("PanoramaPlayer");for(c=0;c<e.length;c++)if(b=e[c],b.get("panorama"))return b.get("viewerArea").set("viewMode","vr"),!0;e=this.XR.FJ.Bi("VideoPlayer");for(c=0;c<e.length;c++)if(b=e[c],b.get("video"))return b.get("viewerArea").set("viewMode","vr"),!0;e=this.XR.FJ.Bi("PhotoAlbumPlayer");for(c=0;c<e.length;c++)if(b=e[c],b.get("photoAlbum"))return b.get("viewerArea").set("viewMode","vr"),!0}return!1};return h}()});
define("tdv/player/view/util/Color",["require","exports","three.mod"],function(a,l,k){return function(){function n(){}n.uhb=function(g,h){if(n.YKa(g)){var e=n.xp(g),b,c=256;h.forEach(function(d){if(n.YKa(d)){var f=n.mOa(e,n.xp(d));f<c&&(b=d,c=f)}});if(b&&c<=5)return b}return g};n.k6=function(g,h){return n.mOa(n.xp(g),n.xp(h))};n.YKa=function(g){return!!g&&g.indexOf("#")===0};n.xp=function(g){return[parseInt(g.substr(1,2),16),parseInt(g.substr(3,2),16),parseInt(g.substr(5,2),16)]};n.mOa=function(g,
h){return Math.max(Math.abs(g[0]-h[0]),Math.abs(g[1]-h[1]),Math.abs(g[2]-h[2]))};n.F9=function(g,h){g=n.xp(g);return"rgba(".concat(g[0],", ").concat(g[1],", ").concat(g[2],", ").concat(h,")")};n.lkb=function(g){g=n.xp(g);return g[0]<<16|g[1]<<8|g[2]<<0};n.mr=function(g){return new k.Color(n.lkb(g))};return n}()});
define("tdv/player/view/util/xr/pointer/VRControllerLaser",["require","exports","tdv/constants/RenderOrder","tdv/player/view/util/Color","three.mod"],function(a,l,k,n,g){a=function(){function c(d,f){this.dot=this.ray=this.ra=null;this.ra=new g.Group;this.ray=new h(d,f);this.ra.add(this.ray.ra);this.dot=new e(d,f);this.ra.add(this.dot.ra)}c.prototype.update=function(){this.ray.update();this.dot.update()};c.prototype.dispose=function(){var d;this.ra&&(this.ray.dispose(),this.ray=null,this.dot.dispose(),
this.dot=null,(d=this.ra.parent)===null||d===void 0||d.remove(this.ra),this.ra=null)};return c}();var h=function(){function c(d,f){this.Zq=this.material=this.ra=null;this.color="#ffffff";this.hb=d;this.Im=f;this.$pa();this.ra=new g.Mesh(new g.CylinderGeometry(5E-4,5E-4,.35,8),this.material);this.ra.renderOrder=k.mUa;this.ra.position.z=-.175;this.ra.position.y=-.001;this.ra.rotation.copy(new g.Euler(-Math.PI/2,0,0,"YXZ"));this.ra.updateMatrix()}c.prototype.update=function(){this.zY();this.gra()};c.prototype.dispose=
function(){var d;this.ra&&(this.ra.geometry.dispose(),this.vqa(),(d=this.ra.parent)===null||d===void 0||d.remove(this.ra),this.ra=null)};c.prototype.$pa=function(){if(!this.material){var d=document.createElement("canvas");d.width=d.height=256;this.Zq=d.getContext("2d");this.material=new g.MeshBasicMaterial;this.material.map=new g.Texture(d);this.material.map.colorSpace=g.SRGBColorSpace;this.material.transparent=!0;this.zY()}};c.prototype.vqa=function(){var d,f;if(this.material){var m=(d=this.material.map)===
null||d===void 0?void 0:d.image;m.width=m.height=1;(f=this.material.map)===null||f===void 0||f.dispose();this.material.map=null;this.material.dispose();this.Zq=this.material=null}};c.prototype.zY=function(){var d=this.Bma();if(this.color!==d){this.color=d;d=n.xp(this.color).join(", ");var f=this.material.map.image,m=this.Zq.createLinearGradient(0,0,0,f.height);m.addColorStop(0,"rgba("+d+", 0)");m.addColorStop(.5,"rgba("+d+", 1)");m.addColorStop(1,"rgba("+d+", 1)");this.Zq.fillStyle=m;this.Zq.clearRect(0,
0,f.width,f.height);this.Zq.fillRect(0,0,f.width,f.height);this.material.map.needsUpdate=!0;this.material.needsUpdate=!0}};c.prototype.gra=function(){this.ra.visible=!this.hb.disabled&&!this.hb.hidden};c.prototype.Bma=function(){return this.hb.pressed?this.Im.r8:this.hb.br?this.Im.Loa:this.Im.p8};return c}(),e=function(){function c(d,f){this.Zq=this.Qv=this.material=this.border=this.dot=this.ra=null;this.color="#ffffff";this.hb=d;this.Im=f;this.Yib();this.$pa();this.ra=new g.Group;this.ra.renderOrder=
k.lUa;this.border=new g.Mesh(new g.SphereGeometry(.0046,32,32),this.Qv);this.dot=new g.Mesh(new g.SphereGeometry(.004,32,32),this.material);this.ra.add(this.dot);this.ra.add(this.border);this.bRa()}c.prototype.update=function(){this.zY();this.bRa();this.gra()};c.prototype.dispose=function(){var d;this.ra&&(this.ra.remove(this.dot),this.dot.geometry.dispose(),this.vqa(),this.ra.remove(this.border),this.border.geometry.dispose(),this.Xjb(),(d=this.ra.parent)===null||d===void 0||d.remove(this.ra),this.ra=
null)};c.prototype.Yib=function(){if(!this.Qv){var d=document.createElement("canvas");d.width=d.height=256;var f=d.getContext("2d");f.fillStyle="rgba(0, 0, 0, 0.75)";f.clearRect(0,0,d.width,d.height);f.fillRect(0,0,d.width,d.height);f=new g.MeshBasicMaterial;f.map=new g.Texture(d);f.map.colorSpace=g.SRGBColorSpace;f.map.needsUpdate=!0;f.transparent=!0;f.depthTest=!1;f.side=g.BackSide;this.Qv=f;this.Qv.needsUpdate=!0}};c.prototype.Xjb=function(){var d,f;if(this.Qv){var m=(d=this.Qv.map)===null||d===
void 0?void 0:d.image;m.width=m.height=1;(f=this.Qv.map)===null||f===void 0||f.dispose();this.Qv.map=null;this.Qv.dispose();this.Qv=null}};c.prototype.$pa=function(){if(!this.material){var d=document.createElement("canvas");d.width=d.height=256;this.Zq=d.getContext("2d");var f=new g.MeshBasicMaterial;f.map=new g.Texture(d);f.map.colorSpace=g.SRGBColorSpace;f.transparent=!0;f.depthTest=!1;this.material=f;this.zY()}};c.prototype.vqa=function(){var d,f;if(this.material){var m=(d=this.material.map)===
null||d===void 0?void 0:d.image;m.width=m.height=1;(f=this.material.map)===null||f===void 0||f.dispose();this.material.map=null;this.material.dispose();this.Zq=this.material=null}};c.prototype.gra=function(){this.ra.visible=!this.hb.hidden&&!this.hb.disabled&&this.hb.nw!==void 0};c.prototype.bRa=function(){var d,f=this.ra.parent?b.setFromMatrixScale((d=this.ra)===null||d===void 0?void 0:d.parent.matrixWorld).x:1;d=(this.hb.nw||500)/f;this.ra.position.z=-d;this.ra.scale.set(d,d,d);this.ra.updateMatrix()};
c.prototype.zY=function(){var d=this.Bma();this.color!==d&&(this.color=d,d=this.material.map.image,this.Zq.fillStyle=this.color,this.Zq.clearRect(0,0,d.width,d.height),this.Zq.fillRect(0,0,d.width,d.height),this.material.map.needsUpdate=!0,this.material.needsUpdate=!0)};c.prototype.Bma=function(){return this.hb.pressed?this.Im.r8:this.hb.br?this.Im.Loa:this.Im.p8};return c}();new g.Matrix4;var b=new g.Vector3;return a});
define("tdv/player/view/util/xr/pointer/PointerState",["require","exports","three.mod"],function(a,l,k){return function(){function n(){this.id=0;this.ray=new k.Ray;this.matrixWorld=new k.Matrix4;this.disabled=!1;this.handedness="";this.Ue=this.br=!1;this.jNa=0;this.nw=void 0;this.pressed=!1;this.oP=0;this.hidden=this.Gn=!1;this.Qb=new k.Vector2;this.K6=this.Pz=this.XA=!1;this.Bt=null;this.id=n.ZW++}n.ZW=0;n.HB="gaze";n.BZ="laser";return n}()});
define("tdv/player/view/util/xr/pointer/XRControllers","require exports tdv/constants/EventName tdv/constants/RenderOrder tdv/player/view/util/Device tdv/player/view/util/xr/pointer/VRControllerLaser tdv/player/view/util/xr/pointer/PointerState tdv/player/view/util/URL three.mod".split(" "),function(a,l,k,n,g,h,e,b,c){var d=[0,1],f="trigger grip unknown0 thumbstick buttonA buttonB pico".split(" "),m=new c.Vector3,p=new c.Vector3,q=new c.Quaternion,r=new c.Vector3;return function(){function t(){}t.initialize=
function(){this.XR.M.bind(k.V,this.Ya.bind(this),this,!0);this.XR.M.bind(k.me,this.Kg.bind(this),this,!0);this.uw=this.uw.bind(this);this.AA=this.AA.bind(this);this.H7=this.H7.bind(this);this.K7=this.K7.bind(this);this.I7=this.I7.bind(this);this.mla=b.getQueryParameter("backURL")};t.Ua=function(u){this.enabled=u};t.isConnected=function(){return this.jO.some(function(u){return u})};t.mPa=function(u){var v;if(this.Di.length>0!==u)if(u){var w=new c.DirectionalLight(16777215,Math.PI);w.position.set(10,
20,0);(v=this.Tn)===null||v===void 0||v.add(w);this.Di.push(w)}else for(;this.Di.length;)v=this.Di.pop(),(w=this.Tn)===null||w===void 0||w.remove(v)};t.zPa=function(u){this.J9!==u&&((this.J9=u)?this.Wv.forEach(this.LLa.bind(this)):this.Wv.forEach(this.kOa.bind(this)))};t.yhb=function(u,v){u=this.fdb(u);u!=-1&&(u=this.B5[u])&&u.hapticActuators&&u.hapticActuators.length&&(u=u.hapticActuators[0],u.pulse&&u.pulse(.6,v))};t.Ya=function(){this.XR.isPresenting?this.Va():this.xa()};t.Va=function(){d.forEach(function(u){this.$ib(u);
this.ajb(u)}.bind(this))};t.xa=function(){d.forEach(function(u){this.akb(u);this.$jb(u);this.Zjb(u)}.bind(this))};t.Kg=function(){this.Aib(this.enabled&&this.XR.Sh||null);this.AY();this.Kkb()};t.AY=function(){var u=this;if(this.enabled){for(;this.XR.nd.length;)this.XR.nd.pop();d.forEach(function(v){var w=u.controllers[v];if(w&&u.jO[v]){var y=u.Uz[v];y&&(u.Lkb(v),y.matrixWorld.copy(w.matrixWorld),y.ray.origin.set(0,0,0),y.ray.direction.set(0,0,-1),w=(w=(w=u.Wv[v].motionController)&&w.components["xr-standard-thumbstick"])&&
w.values,y.XA=w&&w.state=="pressed"||!1,y.Qb.set(w&&w.xAxis||0,w&&w.yAxis||0),u.flb(v),u.XR.nd.push(y))}})}};t.flb=function(u){var v=this,w,y=this.Uz[u];if(y)if(y.K6){var x=!1;if(!this.Tz[u])this.Tz[u]=this.XR.session.requestHitTestSource({space:this.Hla[u].targetRaySpace,offsetRay:new XRRay({x:0,y:0,z:0,w:1},{x:0,y:0,z:-1,w:0})}).then(function(A){v.Tz[u]=A}).catch(function(A){console.error(A);v.Tz[u]=null});else if(this.Tz[u]instanceof XRHitTestSource){var z=(w=this.XR.zg)===null||w===void 0?void 0:
w.xr.getFrame();(w=z&&z.getHitTestResults(this.Tz[u]))&&w.length&&(w=w[0],z=w.getPose(this.XR.referenceSpace))&&(this.IV[u]=w,y.Bt||(y.Bt=new c.Matrix4),y.Bt.fromArray(z.transform.matrix).premultiply(this.XR.Sh.matrixWorld).decompose(m,q,r).compose(m,q,r.set(1,1,1)),x=m.setFromMatrixPosition(y.matrixWorld).distanceTo(p.setFromMatrixPosition(y.Bt))/this.XR.xi>.2)}x||(y.Bt=null,this.IV[u]=null)}else this.Tz[u]instanceof XRHitTestSource&&(this.Tz[u].cancel(),this.Tz[u]=null,this.IV[u]=null)};t.Kkb=function(){this.enabled&&
d.forEach(function(u){u=this.JV[u];u===null||u===void 0||u.update()}.bind(this))};t.gjb=function(){if(!this.nma){var u=this.XR.zg,v=u.xr.enabled;u.Fn=!0;u.xr.enabled=!1;var w=new c.RoomEnvironment(u);this.nma=(new c.PMREMGenerator(u)).fromScene(w).texture;u.Fn=!1;u.xr.enabled=v}};t.$ib=function(u){var v=this.XR.zg.xr.getController(u);this.controllers[u]!=v&&(v.addEventListener("selectstart",this.uw),v.addEventListener("selectend",this.AA),v.addEventListener("connected",this.H7),v.addEventListener("disconnected",
this.K7),v.userData.$W=!0,this.controllers[u]=v,this.Uz[u]=new e,this.Ila[u]=0,this.Uz[u].type=e.BZ)};t.Zjb=function(u){var v=this.controllers[u];v&&(v.removeEventListener("selectstart",this.uw),v.removeEventListener("selectend",this.AA),v.removeEventListener("connected",this.H7),v.removeEventListener("disconnected",this.K7),this.controllers[u]=null)};t.ajb=function(u){if(!this.OI[u]){var v=this.XR.zg.xr.getControllerGrip(u);v.userData.$W=!0;this.C5||(this.C5=new c.XRControllerModelFactory);this.C5.path=
c.JB.endsWith("/")?c.JB.slice(0,-1):c.JB;var w=this.C5.createControllerModel(v,this.Olb);w.addEventListener("loaded",this.I7);this.Wv[u]=w;v.add(w);this.OI[u]=v}};t.Olb=function(u){u=Array.from(u.profiles);if(g.qJ())u=["meta-quest-touch-plus"].concat(u);else if(g.OO())u=["oculus-touch-v3"].concat(u);else if(g.WKa())u=["generic-trigger"].concat(u);else if(g.XKa()||u.indexOf("pico-phoenix")>=0||u.indexOf("pico-4")>=0)u=["pico-4"].concat(u);else if(g.cLa()||u.indexOf("htc-vive-focus-3")>=0||u.indexOf("htc-vive-focus-3-plus")>=
0)u=["htc-vive-focus-3"].concat(u);else if(g.Web()||g.Neb()||g.SKa()||u.indexOf("pico-g2")>=0||u.indexOf("pico-neo2")>=0||u.indexOf("pico-neo3")>=0)u=["generic-trigger"].concat(u);return u};t.$jb=function(u){var v,w=this.OI[u];if(w){var y=this.Wv[u];this.Wv[u]=null;y.removeEventListener("loaded",this.I7);w.remove(y);this.OI[u]=null;(v=w.parent)===null||v===void 0||v.remove(w)}};t.bjb=function(u){if(!this.JV[u]){var v=new h(this.Uz[u],this.XR.Im);this.JV[u]=v;this.controllers[u].add(v.ra)}};t.akb=
function(u){var v=this.JV[u];v&&(v.dispose(),this.JV[u]=null)};t.Aib=function(u){this.Tn!==u&&(this.Tn=u,this.clb())};t.clb=function(){this.controllers.forEach(function(u){var v,w;u&&u.parent!=this.Tn&&((v=u.parent)===null||v===void 0||v.remove(u),(w=this.Tn)===null||w===void 0||w.add(u))}.bind(this));this.OI.forEach(function(u){var v,w;u&&u.parent!=this.Tn&&((v=u.parent)===null||v===void 0||v.remove(u),(w=this.Tn)===null||w===void 0||w.add(u))}.bind(this));this.Di.forEach(function(u){var v,w;u.parent!==
this.Tn&&((v=u.parent)===null||v===void 0||v.remove(u),(w=this.Tn)===null||w===void 0||w.add(u))}.bind(this))};t.uw=function(u){var v=this.i6(u.target);if(this.jO[v]){var w=Date.now()-this.FHa[v];if(w<60){var y={target:u.target};setTimeout(function(){t.uw(y)},60-w)}else u=this.Uz[v],u.pressed=!0,u.oP=Date.now(),this.XR.M.m(k.vu,{pointerState:u}),this.Ila[v]=Date.now()}};t.AA=function(u){var v=this;u=this.i6(u.target);if(this.jO[u]){var w=this.Uz[u];w.pressed=!1;this.mla&&(this.MKa(u,"buttonB")||this.MKa(u,
"pico"))?window.location.href=this.mla:(this.XR.M.m(k.EB,{pointerState:w}),this.Ila[u]+300>Date.now()&&(this.XR.Oq&&this.IV[u]&&this.IV[u].createAnchor().then(function(y){v.XR.Oq(y)}).catch(function(y){v.XR.RN(y)}),this.XR.M.m(k.Uf,{pointerState:w})))}};t.H7=function(u){var v,w;if(u.data.targetRayMode!="gaze"){var y=this.i6(u.target);this.bjb(y);(v=this.Tn)===null||v===void 0||v.add(this.controllers[y]);(w=this.Tn)===null||w===void 0||w.add(this.OI[y]);this.jO[y]=!0;this.FHa[y]=Date.now();this.B5[y]=
u.data.gamepad;this.Hla[y]=u.data;this.Uz[y].handedness=u.data.handedness;this.XR.M.m(k.wra)}};t.xna=function(u){return u.profiles.some(function(v){return v.indexOf("hand")>=0})};t.K7=function(u){var v,w;u=this.i6(u.target);(v=this.Tn)===null||v===void 0||v.remove(this.controllers[u]);(w=this.Tn)===null||w===void 0||w.remove(this.OI[u]);this.jO[u]=!1;this.B5[u]=null;this.Hla[u]=null;this.XR.M.m(k.xra)};t.I7=function(u){var v=this.Wv[this.ycb(u.target)];v.userData.xna=this.xna(u.target.motionController.xrInputSource);
v.userData.kj=!0;v.userData.$Ka=!1};t.cjb=function(u){u=this.Wv[u];this.gjb();u.setEnvironmentMap(this.nma);this.J9?this.LLa(u):this.kOa(u);u.userData.$Ka=!0};t.Lkb=function(u){var v=this.Wv[u];v.userData.kj&&(v.userData.$Ka||this.cjb(u),u=this.Uz[u],v.visible=v.userData.xna||u.hidden?!1:!0)};t.MKa=function(u,v){v=f.indexOf(v);u=this.B5[u];if(!u)return!1;u=u.buttons.length>v?u.buttons[v]:null;return!!u&&u.pressed};t.LLa=function(u){u&&u.traverse(function(v){if("isMesh"in v&&v.material){var w=v.material;
if(!w.userData.Kt){var y=w.userData.sfb;y||(y=w.clone(),w.userData.sfb=y,y.userData.Kt=w,y.transparent||(y.transparent=!0,y.opacity=1,"map"in y&&y.map&&(y.map=this.Jab(y.map)),y.needsUpdate=!0));v.material=y}v.userData.Doa===void 0&&(v.userData.Doa=v.renderOrder);v.renderOrder=n.kUa}}.bind(this))};t.kOa=function(u){u&&u.traverse(function(v){if("isMesh"in v&&v.material){var w=v.material;w.userData.Kt&&(v.material=w.userData.Kt);v.userData.Doa==void 0&&(v.renderOrder=v.userData.Doa)}}.bind(this))};
t.Jab=function(u){if(!u)return null;var v=document.createElement("canvas");v.width=u.image.width;v.height=u.image.height;var w=v.getContext("2d");w.drawImage(u.image,0,0);for(var y=w.getImageData(0,0,v.width,v.height),x=y.data,z=0;z<x.length;z+=4)x[z+3]=255;w.putImageData(y,0,0);u=(new c.Texture).copy(u);u.image=v;u.needsUpdate=!0;return u};t.i6=function(u){return this.controllers.indexOf(u)};t.ycb=function(u){return this.Wv.indexOf(u)};t.fdb=function(u){return this.XR.nd.indexOf(u)};t.enabled=!0;
t.controllers=[null,null];t.jO=[!1,!1];t.FHa=[0,0];t.OI=[null,null];t.Wv=[null,null];t.C5=null;t.JV=[null,null];t.B5=[null,null];t.Hla=[null,null];t.Tz=[null,null];t.IV=[null,null];t.Di=[];t.J9=!1;t.Uz=[];t.Ila=[];t.Tn=null;t.nma=null;t.mla=null;return t}()});
define("tdv/player/canvas/ReticleCanvas",["require","exports"],function(){return function(){function a(l){this.Ie=this.Xu(l.p8);this.mz=this.Xu(l.r8);this.zz=this.fm([0,0,0],0);this.L3=this.fm([0,0,0],.125);this.IYa=this.fm(this.Ie,1);this.JYa=this.fm(this.mz,1);this.UWa=this.fm(this.mz,1);this.TWa=this.fm(this.Ie,.5);this.RWa=this.fm(this.Ie,1);this.SWa=this.fm(this.mz,1);this.Rm=this.Gh=128;this.uba=4E3;this.Tva=.1;this.Sm=.16;this.Aq=.04;this.Vua=this.g_=.68-this.Aq;this.f_=1-this.Aq;this.fa=document.createElement("canvas");
this.fa.width=this.Gh;this.fa.height=this.Rm;this.Fa=this.fa.getContext("2d");this.Ad=this.Px=!1;this.dM=this.p2=void 0;this.aG=0}a.prototype.Xu=function(l){return(l=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(l))?[parseInt(l[1],16),parseInt(l[2],16),parseInt(l[3],16)]:[0,0,0]};a.prototype.fm=function(l,k){return"rgba("+l.join(",")+", "+k+")"};a.prototype.VJ=function(l,k){this.Ad=l;this.p2=k};a.prototype.NA=function(l){this.Px=l};a.prototype.dg=function(){return this.Gh};a.prototype.wg=function(){return this.Rm};
a.prototype.Ig=function(){return this.fa};a.prototype.update=function(l){return this.Px?this.MYa(l):this.Ad?this.RYa():this.QYa()};a.prototype.dispose=function(){this.Fa=null;this.fa.width=this.fa.height=1};a.prototype.oL=function(){var l;(l=this.Fa)===null||l===void 0||l.clearRect(0,0,this.Gh,this.Rm)};a.prototype.QYa=function(){if(this.dM==a.Ura)return!1;this.oL();this.Zva(this.IYa,1);this.dM=a.Ura;return!0};a.prototype.RYa=function(){if(this.p2===void 0){if(this.dM==a.ga)return!1;this.oL();this.Zva(this.JYa,
2)}else this.F3a(this.p2);this.dM=a.ga;return!0};a.prototype.MYa=function(l){for(this.aG+=l;this.aG>this.uba;)this.aG-=this.uba;this.OWa(this.aG/this.uba);this.dM=a.TY;return!0};a.prototype.Zva=function(l,k){this.Yk(this.Tva*k+this.Aq,0,this.zz,this.L3,0,2*Math.PI);this.Yk(this.Tva*k,0,this.zz,l,0,2*Math.PI)};a.prototype.SYa=function(l){this.Yk(this.g_-(this.Sm+this.Aq)*.5,this.Sm+this.Aq,this.L3,this.zz,0,2*Math.PI);this.Yk(this.g_-this.Sm*.5,this.Sm,this.TWa,this.zz,0,2*Math.PI);this.Yk(this.g_-
this.Sm*.5,this.Sm,this.UWa,this.zz,.5*Math.PI,(.5+l*2)*Math.PI)};a.prototype.NYa=function(l,k){this.Yk(this.Vua-(this.Sm+this.Aq)*.5,this.Sm+this.Aq,this.L3,this.zz,0,2*Math.PI);this.Yk(this.Vua-this.Sm*.5,this.Sm,this.RWa,this.zz,0,2*Math.PI);l=(.5+l*2)*Math.PI;for(k=(.5+k*2)*Math.PI;k<l;)k+=2*Math.PI;var n=l-this.Aq/(this.f_*2*Math.PI),g=k+this.Aq/(this.f_*2*Math.PI);Math.abs(g-n+2*Math.PI)<this.Aq*2&&(n=0,g=k);this.Yk(this.f_-(this.Sm+this.Aq)*.5,this.Sm+this.Aq,this.L3,this.zz,n,g);this.Yk(this.f_-
this.Sm*.5,this.Sm,this.SWa,this.zz,l,k)};a.prototype.Yk=function(l,k,n,g,h,e){var b=Math.round(this.Gh*.5),c=Math.round(this.Rm*.5),d=Math.min(b,c);l=Math.round(l*d);var f=this.Fa;f&&(f.imageSmoothingEnabled=!0,f.lineWidth=k*d,f.strokeStyle=n,f.fillStyle=g,f.beginPath(),f.arc(b,c,l,h,e,!1),f.stroke(),f.fill())};a.prototype.OWa=function(l){this.oL();if(l<.25){var k=l/.25;l=.5*k}else l<.5?(k=(l-.25)/.25,l=.5+k,k=1+k*.5):l<.75?(k=(l-.5)/.25,l=.5+.5*k,k=.5+k):(l=k=(l-.75)/.25,k=.5+k*.5);this.NYa(l,k)};
a.prototype.F3a=function(l){this.oL();this.SYa(l)};a.Ura="initial";a.TY="changing";a.ga="over";return a}()});define("tdv/player/view/panorama/renderer/constants/Face",["require"],function(){return{qmb:"single",FRONT:"front",eb:"left",BACK:"back",Db:"right",Tc:"top",Fc:"bottom"}});
define("tdv/player/view/panorama/renderer/3d/util/GeometryUtil",["require","tdv/player/view/panorama/renderer/constants/Face"],function(a){a=a("tdv/player/view/panorama/renderer/constants/Face");var l={},k=Math.PI/180,n=new THREE.Matrix4;new THREE.Matrix4;var g=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3];l.ph=500;l.o$=l.ph*.5;l.LTa=l.ph;l.Vsa=[a.FRONT,a.Db,a.BACK,a.eb,a.Tc,a.Fc];l.NHa=function(h,e){for(var b=l.ph,c=l.o$,d=h*e,f=this.Ux(),
m=[],p=0,q=6*d;p<q;p++)m.push(p);p=[];var r=d;p.push(this.YK(f,h,e,-c,+c,-c,+b,0,-b,0,m.slice(0,r)));q=r;r+=d;p.push(this.YK(f,h,e,+c,+c,-c,0,+b,-b,0,m.slice(q,r)));q=r;r+=d;p.push(this.YK(f,h,e,+c,+c,+c,-b,0,-b,0,m.slice(q,r)));q=r;r+=d;p.push(this.YK(f,h,e,-c,+c,+c,0,-b,-b,0,m.slice(q,r)));q=r;r+=d;p.push(this.YK(f,h,e,-c,+c,+c,+b,0,0,-b,m.slice(q,r)));p.push(this.YK(f,h,e,-c,-c,-c,+b,0,0,+b,m.slice(r,r+d)));f.mergeVertices();f.computeFaceNormals();f.userData.type="cube";f.userData.vKa=h;f.userData.yRa=
e;f.userData.ugb=p;return l.HU(f)};l.lO=function(){var h=this.Ux();this.Wta(h,-.5,.5,0,1,0,0,0,-1,0,0);h.mergeVertices();h.computeFaceNormals();h.userData.type="plane";return l.HU(h)};l.MHa=function(h,e,b,c,d,f,m,p,q,r,t,u){var v=this.Ux();v.vertices.push(new THREE.Vector3(h,e,b));v.vertices.push(new THREE.Vector3(c,d,f));v.vertices.push(new THREE.Vector3(m,p,q));v.vertices.push(new THREE.Vector3(r,t,u));v.faces.push(new THREE.Face3(0,2,1,null,null,0));v.faceVertexUvs[0].push([new THREE.Vector2(0,
1),new THREE.Vector2(1,0),new THREE.Vector2(1,1)]);v.faces.push(new THREE.Face3(0,3,2,null,null,0));v.faceVertexUvs[0].push([new THREE.Vector2(0,1),new THREE.Vector2(0,0),new THREE.Vector2(1,0)]);v.mergeVertices();v.computeFaceNormals();v.userData.type="quad";return l.HU(v)};l.pPa=function(h,e,b,c,d){h=l.Cja(h);var f=h.faceVertexUvs[0][0];f[0].x=e;f[0].y=b+d;f[1].x=e;f[1].y=b;f[2].x=e+c;f[2].y=b;f=h.faceVertexUvs[0][1];f[0].x=e;f[0].y=b+d;f[1].x=e+c;f[1].y=b;f[2].x=e+c;f[2].y=b+d;h.uvsNeedUpdate=
!0;return l.HU(h,!0)};l.xt=function(){return l.o$};l.Uma=function(h,e){return 2*h*Math.tan(e*.5*k)};l.Vma=function(h,e){return 2*h*Math.tan(e*.5*k)};l.fw=function(h){return Math.max(Math.min(3.539647*h-6.669366*h*h+4.7454*h*h*h,l.o$),.1)};l.Ux=function(){var h=new THREE.Geometry;h.userData={};return h};l.dispose=function(h){h&&(h.isBufferGeometry&&h.userData&&h.userData.geometry&&h.userData.geometry.dispose(),h.isGeometry&&h.userData&&h.userData.ZN&&h.userData.ZN.dispose(),h.dispose())};l.HU=function(h,
e){if(h.isBufferGeometry)return h;if(h.isGeometry){if(!h.userData.ZN||e)h.userData.ZN&&h.userData.ZN.dispose(),e=h.toBufferGeometry(),(e.userData={}).geometry=h,h.userData.ZN=e;return h.userData.ZN}return null};l.Cja=function(h){return h.isGeometry?h:h.isBufferGeometry&&h.userData&&h.userData.geometry?h.userData.geometry:null};l.YK=function(h,e,b,c,d,f,m,p,q,r,t){for(var u={},v=0,w=0;w<b;w++){u[w]={};for(var y=0;y<e;y++)this.Wta(h,c+m*y/e+0*w/b,d+0*y/e+q*w/b,f+p*y/e+r*w/b,m/e,0/e,p/e,0/b,q/b,r/b,
t[v]),u[w][y]=h.faces.slice(h.faces.length-2,h.faces.length),v+=1}return u};l.enb=function(h,e,b){e=e*.5/Math.tan(b*.5);n.copy(h);h=g[0];h.x=0;h.y=0;h.z=0;h.applyMatrix4(n);b=Math.sqrt(h.x*h.x+h.y*h.y+h.z*h.z);var c=e/h.z,d=g[1];d.x=h.x*c;d.y=h.y*c;d.z=e;return b/Math.sqrt(d.x*d.x+d.y*d.y+d.z*d.z)};l.Wcb=function(h,e,b){h=l.Cja(h);n.copy(e.matrixWorldInverse).multiply(b);switch(h.userData.type){case "cube":return l.m0a(h,n,e.projectionMatrix);default:return l.n0a(h)}};l.Pcb=function(h,e,b){h=l.Cja(h);
switch(h.userData.type){case "plane":return l.R_a(h,e,b);case "quad":return l.Zwa(h,1,e,b)||l.Zwa(h,0,e,b);default:return null}};l.Wta=function(h,e,b,c,d,f,m,p,q,r,t){var u=h.vertices.length;h.vertices.push(new THREE.Vector3(e,b,c));h.vertices.push(new THREE.Vector3(e+p,b+q,c+r));h.vertices.push(new THREE.Vector3(e+d+p,b+f+q,c+m+r));h.vertices.push(new THREE.Vector3(e+d,b+f,c+m));h.faces.push(new THREE.Face3(u,u+1,u+2,null,null,t));h.faceVertexUvs[0].push([new THREE.Vector2(0,1),new THREE.Vector2(0,
0),new THREE.Vector2(1,0)]);h.faces.push(new THREE.Face3(u,u+2,u+3,null,null,t));h.faceVertexUvs[0].push([new THREE.Vector2(0,1),new THREE.Vector2(1,0),new THREE.Vector2(1,1)])};l.R_a=function(h,e,b){var c=h.faces[0],d=h.faces[1],f=g[0],m=g[1],p=g[2];f.copy(h.vertices[c.a]).applyMatrix4(e);m.copy(h.vertices[d.c]).applyMatrix4(e);p.copy(h.vertices[c.b]).applyMatrix4(e);e=m.x-f.x;d=m.y-f.y;var q=m.z-f.z;m=p.x-f.x;var r=p.y-f.y;p=p.z-f.z;var t=d*p-q*r,u=q*m-e*p,v=e*r-d*m,w=b.direction.x*t+b.direction.y*
u+b.direction.z*v;if(w!=0&&(v=-(t*(b.origin.x-f.x)+u*(b.origin.y-f.y)+v*(b.origin.z-f.z))/w,!(v<=0||(t=b.origin.x+b.direction.x*v-f.x,u=b.origin.y+b.direction.y*v-f.y,f=b.origin.z+b.direction.z*v-f.z,b=(e*t+d*u+q*f)/(e*e+d*d+q*q),f=(m*t+r*u+p*f)/(m*m+r*r+p*p),e=h.faceVertexUvs[0][0][0],d=h.faceVertexUvs[0][1][2],h=h.faceVertexUvs[0][0][1],b<0||b>1||f<0||f>1))))return{UQa:e.x+(d.x-e.x)*b+(h.x-e.x)*f,vRa:e.y+(d.y-e.y)*b+(h.y-e.y)*f,materialIndex:c.materialIndex}};l.Zwa=function(h,e,b,c){var d=h.faces[e],
f=g[0],m=g[1],p=g[2];f.copy(h.vertices[d.a]).applyMatrix4(b);m.copy(h.vertices[d.b]).applyMatrix4(b);p.copy(h.vertices[d.c]).applyMatrix4(b);b=m.x-f.x;var q=m.y-f.y,r=m.z-f.z;m=p.x-f.x;var t=p.y-f.y;p=p.z-f.z;var u=q*p-r*t,v=r*m-b*p,w=b*t-q*m,y=c.direction.x*u+c.direction.y*v+c.direction.z*w;if(y!=0&&(w=-(u*(c.origin.x-f.x)+v*(c.origin.y-f.y)+w*(c.origin.z-f.z))/y,!(w<=0))){u=c.origin.x+c.direction.x*w-f.x;v=c.origin.y+c.direction.y*w-f.y;c=c.origin.z+c.direction.z*w-f.z;if((f=t*b-m*q)!=0)b=(v*b-
u*q)/f,q=(v*m-u*t)/-f;else if((f=p*b-m*r)!=0)b=(v*b-u*q)/f,q=(v*m-u*t)/-f;else if((f=p*q-t*r)!=0)b=(c*q-v*r)/f,q=(c*t-v*p)/-f;else return;if(!(q<0||q>1||b<0||b>1||q+b>1))return m=h.faceVertexUvs[0][e][0],t=h.faceVertexUvs[0][e][1],h=h.faceVertexUvs[0][e][2],{UQa:m.x+(t.x-m.x)*q+(h.x-m.x)*b,vRa:m.y+(t.y-m.y)*q+(h.y-m.y)*b,materialIndex:d.materialIndex}}};l.m0a=function(h,e,b){var c=Array.prototype.concat.apply([],h.userData.ugb.map(function(d){return l.sxa(e,b,d,h.vertices,0,0,h.userData.vKa,h.userData.yRa).map(function(f){return f.materialIndex})}));
return l.Exa(c)};l.n0a=function(h){h=h.faces.map(function(e){return e.materialIndex});return l.Exa(h)};l.Exa=function(h){var e={};h.forEach(function(c){e[c]=!0});h=[];for(var b in e)h.push(b);return h};l.sxa=function(h,e,b,c,d,f,m,p){var q=[];if(l.M7a(h,e,c[b[f][d][0].a],c[b[f+p-1][d][0].b],c[b[f+p-1][d+m-1][0].c],c[b[f][d+m-1][1].c]))if(m==1&&p==1)q.push(b[f][d][0]);else for(f=p>1?[f,f+Math.ceil(p*.5),f+p]:[f,f+p],d=m>1?[d,d+Math.ceil(m*.5),d+m]:[d,d+m],m=1;m<f.length;m++){p=f[m-1];for(var r=f[m]-
p,t=1;t<d.length;t++){var u=d[t-1];q=q.concat(l.sxa(h,e,b,c,u,p,d[t]-u,r))}}return q};l.M7a=function(h,e,b,c,d,f){var m=[null,null,null,null,null];g[0].copy(b).applyMatrix4(h);g[1].copy(c).applyMatrix4(h);g[2].copy(d).applyMatrix4(h);g[3].copy(f).applyMatrix4(h);b=0;c=4;for(h=0;h<4;h++){d=g[(h+3)%4];f=g[h];var p=g[(h+1)%4];if(f.z<=0)m[b++]=f;else{if(d.z<=0){var q=g[c++],r=d.z/(d.z-f.z);q.x=d.x+(f.x-d.x)*r;q.y=d.y+(f.y-d.y)*r;q.z=-1E-5;m[b++]=q}p.z<=0&&(q=g[c++],r=f.z/(f.z-p.z),q.x=f.x+(p.x-f.x)*r,
q.y=f.y+(p.y-f.y)*r,q.z=-1E-5,m[b++]=q)}}if(b>2){for(h=0;h<b;h++)m[h].applyMatrix4(e);h=0;for(e=b-2;h<e;h++)if(b=m[h],c=m[h+1],d=m[h+2],!(b.x>1&&c.x>1&&d.x>1||b.x<-1&&c.x<-1&&d.x<-1||b.y>1&&c.y>1&&d.y>1||b.y<-1&&c.y<-1&&d.y<-1))return!0}return!1};l.OHa=function(h,e,b,c,d,f,m,p,q){var r=h*k,t=-r*.5+Math.PI*.5,u=e*k,v=(Math.PI-u)*.5-b*k,w=l.LTa*.5,y=64/Math.PI,x=Math.max(2,Math.ceil(r/c*y));y=Math.max(2,Math.ceil(u/d*y));for(var z=c*x,A=d*y,D=this.Ux(),E=0,B=[],C=0;C<=A;C++){for(var F=[],G=v+C*u/A,
I=0;I<=z;I++){var N=-(t+I*r/z);D.vertices.push(new THREE.Vector3(-w*Math.cos(N)*Math.sin(G),+w*Math.cos(G),+w*Math.sin(N)*Math.sin(G)));F.push(E++)}B.push(F)}for(t=r=0;t<d;t++)for(u=t*y,v=0;v<c;v++){w=v*x;for(C=0;C<y;C++)for(z=m+(1-C/y)*q,A=m+(1-(C+1)/y)*q,I=0;I<x;I++){E=f+I/x*p;F=f+(I+1)/x*p;G=B[u+C][w+I];N=B[u+C+1][w+I+1];var P=B[u+C][w+I+1];D.faces.push(new THREE.Face3(G,B[u+C+1][w+I],N,null,null,r));D.faceVertexUvs[0].push([new THREE.Vector2(E,z),new THREE.Vector2(E,A),new THREE.Vector2(F,A)]);
D.faces.push(new THREE.Face3(G,N,P,null,null,r));D.faceVertexUvs[0].push([new THREE.Vector2(E,z),new THREE.Vector2(F,A),new THREE.Vector2(F,z)])}r++}D.mergeVertices();D.computeFaceNormals();D.userData.type="sphere";D.userData.Ud=h;D.userData.Nk=e;D.userData.pitch=b;D.userData.vKa=c;D.userData.yRa=d;return l.HU(D)};return l});
define("tdv/player/view/util/xr/pointer/Reticle","require exports tdv/constants/RenderOrder tdv/player/canvas/ReticleCanvas tdv/view/util/Animation three.mod tdv/player/view/panorama/renderer/3d/util/GeometryUtil".split(" "),function(a,l,k,n,g,h,e){a=function(){function c(d,f){this.bA=this.er=null;this.hb=d;this.Im=f;this.canvas=new n(f);this.cbb();this.Pab();this.ra=new h.Group;this.ra.add(this.er);this.ra.add(this.bA)}c.prototype.update=function(){this.canvas.update(g.bW)&&(this.er.material.map.needsUpdate=
!0);var d=e.fw(this.Im.xNa||2),f=2*d*Math.tan(c.qu/2);this.ra.matrixAutoUpdate=!1;this.ra.matrixWorldNeedsUpdate=!1;this.ra.matrix.identity();this.ra.matrix.multiply(b.makeTranslation(0,0,-d));this.ra.matrix.multiply(b.makeScale(f,f,f));this.ra.updateMatrixWorld(!0)};c.prototype.Bf=function(d){this.er.material.opacity=d};c.prototype.VJ=function(d,f){f===void 0&&(f=void 0);this.canvas.VJ(d,f)};c.prototype.NA=function(d){this.canvas.NA(d)};c.prototype.dispose=function(){var d;this.Jbb();this.Fbb();
this.canvas.dispose();(d=this.ra.parent)===null||d===void 0||d.remove(this.ra);this.ra=null};c.prototype.Fbb=function(){var d;if(this.bA){this.bA.geometry.dispose();var f=this.bA.material.map.source;f.width=f.height=1;this.bA.material.map.dispose();(d=this.bA.parent)===null||d===void 0||d.remove(this.bA);this.bA=null}};c.prototype.Pab=function(){var d=document.createElement("canvas");d.width=d.height=256;var f=d.getContext("2d");f.fillStyle="rgba(0, 0, 0, 0)";f.fillRect(0,0,256,256);f=new h.Texture;
f.image=d;f.generateMipmaps=!0;f.minFilter=h.LinearMipMapLinearFilter;f.needsUpdate=!0;d=new h.MeshBasicMaterial({map:f,transparent:!0});d.map.needsUpdate=!0;d.needsUpdate=!0;d=new h.Mesh(new h.PlaneGeometry,d);d.renderOrder=k.mta;this.bA=d};c.prototype.Jbb=function(){var d;this.er&&(this.er.geometry.dispose(),this.er.material.map.dispose(),this.er.material.dispose(),(d=this.er.parent)===null||d===void 0||d.remove(this.er),this.er=null)};c.prototype.cbb=function(){var d=new h.PlaneGeometry,f=new h.Texture;
this.canvas.update(10);f.colorSpace=h.SRGBColorSpace;f.image=this.canvas.Ig();f.generateMipmaps=!0;f.minFilter=h.LinearMipMapLinearFilter;f.needsUpdate=!0;f=new h.MeshBasicMaterial({map:f,transparent:!0});this.er=new h.Mesh(d,f);this.er.renderOrder=k.mta};c.qu=6*Math.PI/180;return c}();var b=new h.Matrix4;return a});
define("tdv/player/view/util/xr/pointer/XRGazePointer","require exports tdv/constants/EventName tdv/player/view/util/xr/pointer/PointerState tdv/player/view/util/xr/pointer/Reticle tdv/player/view/util/xr/pointer/SelectionMode three.mod".split(" "),function(a,l,k,n,g,h,e){a=function(){function p(){}p.initialize=function(){this.uw=this.uw.bind(this);this.AA=this.AA.bind(this);this.XR.M.bind(k.V,this.Ya.bind(this),this,!0);this.XR.M.bind(k.me,this.Kg.bind(this),this,!0);this.XR.M.bind(k.Qr,this.Yfb.bind(this),
this,!0);this.hb.type=n.HB};p.Ua=function(q){this.enabled=q;this.Rw()};p.Ya=function(){this.Rw()};p.Kg=function(){this.setCamera(this.enabled&&this.XR.Cw||null);this.AY();this.ilb()};p.Yfb=function(){var q=this;this.enabled&&(this.XR.Oq&&this.DW&&this.DW.createAnchor().then(function(r){q.XR.Oq(r)}).catch(function(r){q.XR.RN(r)}),this.XR.spa==h.AZ&&this.XR.M.m(k.Uf,{pointerState:this.hb}))};p.Rw=function(){this.XR.isPresenting&&this.enabled?this.dqa():this.zqa()};p.setCamera=function(q){this.camera!==
q&&(this.camera=q,this.klb())};p.AY=function(){var q=this,r;this.XR.wO.origin.copy(this.XR.Ic);this.XR.wO.direction.set(0,0,-1).applyQuaternion(this.XR.ug);if(this.enabled){if(this.XR.nd.length!=1&&this.XR.nd[0]!==this.hb){for(;this.XR.nd.length;)this.XR.nd.pop();this.XR.nd.push(this.hb)}this.hb.matrixWorld.copy(f.compose(this.XR.Ic,this.XR.ug,m));this.hb.ray.origin.set(0,0,0);this.hb.ray.direction.set(0,0,-1);if(this.hb.K6){var t=!1;if(!this.nA){var u=this.XR.session;this.nA=u.requestReferenceSpace("viewer").then(function(w){return u.requestHitTestSource({space:w}).then(function(y){q.nA=
y})}).catch(function(w){console.error(w);q.nA=null})}else if(this.nA instanceof XRHitTestSource){var v=(r=this.XR.zg)===null||r===void 0?void 0:r.xr.getFrame();(r=v&&v.getHitTestResults(this.nA))&&r.length&&(r=r[0],v=r.getPose(this.XR.referenceSpace))&&(this.DW=r,this.hb.Bt||(this.hb.Bt=new e.Matrix4),this.XR.Sh.matrixWorld.decompose(b,c,d),this.hb.Bt.fromArray(v.transform.matrix).premultiply(this.XR.Sh.matrixWorld).decompose(b,c,d).compose(b,c,d.set(1,1,1)),t=!0)}t||(this.DW=this.hb.Bt=null)}else this.nA instanceof
XRHitTestSource&&(this.nA.cancel(),this.DW=this.nA=null)}};p.klb=function(){this.Af&&this.Af.ra.parent!==this.camera&&(this.Af.ra.parent&&this.Af.ra.parent.remove(this.Af.ra),this.camera.add(this.Af.ra))};p.dqa=function(){var q;this.Af||(this.Af=new g(this.hb,this.XR.Im),(q=this.camera)===null||q===void 0||q.add(this.Af.ra),this.controller=this.XR.zg.xr.getController(0),this.controller.addEventListener("selectstart",this.uw),this.controller.addEventListener("selectend",this.AA))};p.zqa=function(){this.Af&&
(this.Af.dispose(),this.Af=null,this.controller.removeEventListener("selectstart",this.uw),this.controller.removeEventListener("selectend",this.AA),this.controller=null)};p.ilb=function(){var q,r,t,u;if(this.enabled){if(this.Ue=this.hb.Ue)this.dQa=this.hb.jNa;var v=Date.now();if(this.XR.spa==h.BF){var w=this.Ue?v-this.dQa:0;var y=this.XR.Im.BNa;this.iNa<y&&w>=y&&this.XR.M.m(k.Uf,{pointerState:this.hb});this.iNa=w;(q=this.Af)===null||q===void 0||q.VJ(this.Ue&&this.hb.br,Math.min(1,w/y))}else(w=this.Af)===
null||w===void 0||w.VJ(this.hb.br);this.hb.Ue||this.hb.Gn?this.BW=void 0:this.BW==void 0&&(q=this.XR.Im.SIa,q!==void 0&&(this.BW=v+q));v=(this.BW!==void 0?this.BW:Infinity)-v;(r=this.Af)===null||r===void 0||r.Bf(this.hb.hidden?0:Math.max(.01,Math.min(1,v/500)));(t=this.Af)===null||t===void 0||t.NA(this.hb.Gn);(u=this.Af)===null||u===void 0||u.update()}};p.uw=function(){this.hb.pressed=!0;this.hb.oP=Date.now();this.XR.M.m(k.vu,{pointerState:this.hb})};p.AA=function(){this.hb.pressed=!1;this.XR.M.m(k.vu,
{pointerState:this.hb});this.XR.M.m(k.Uf,{pointerState:this.hb})};p.hb=new n;p.enabled=!1;p.camera=null;p.Af=null;p.Ue=!1;p.dQa=0;p.iNa=0;p.BW=void 0;p.controller=null;p.nA=null;p.DW=null;return p}();var b=new e.Vector3,c=new e.Quaternion,d=new e.Vector3,f=new e.Matrix4,m=new e.Vector3(1,1,1);return a});
define("tdv/player/view/util/xr/pointer/XRPointer","require exports tdv/constants/EventName tdv/player/view/util/Device tdv/player/view/util/xr/pointer/PointerType tdv/player/view/util/xr/SessionMode tdv/player/view/util/xr/pointer/XRControllers tdv/player/view/util/xr/pointer/XRGazePointer".split(" "),function(a,l,k,n,g,h,e,b){return function(){function c(){}c.Jib=function(d){this.Poa=d};c.initialize=function(){this.XR.M.bind(k.V,this.Ya.bind(this),this,!0);this.XR.M.bind(k.me,this.Kg.bind(this),
this,!0);this.XR.M.bind(k.wra,this.Efb.bind(this),this,!0);this.XR.M.bind(k.xra,this.Ffb.bind(this),this,!0)};c.Ya=function(){this.R9()};c.Kg=function(){this.Oq!==this.XR.Oq&&(this.Oq=this.XR.Oq,this.R9())};c.Efb=function(){this.R9()};c.Ffb=function(){this.R9()};c.R9=function(){var d=this.XR.isPresenting?this.XR.Oq&&n.ub()&&!n.gf()?g.BF:this.Poa===g.CF&&e.isConnected()?g.CF:this.Poa!==g.CF||this.XR.zp!==h.tr||n.gf()?g.BF:g.CF:null;this.pointerType!==d&&(this.pointerType=d,e.Ua(d===g.CF),b.Ua(d===
g.BF))};c.Poa=g.CF;c.pointerType=null;c.Oq=null;return c}()});define("tdv/player/view/util/xr/XRSettings",["require","exports"],function(){return function(){return function(){this.SIa=1E3;this.p8="#ffffff";this.xNa=2;this.Loa="#007acc";this.r8="#ff6600";this.BNa=1200;this.NIa=0}}()});define("tdv/view/core/ZIndex",["require","exports"],function(){return{eta:"1",cUa:"auto",KTa:"1",Bsa:"2",qTa:"auto",d$:"2",vra:"3",$Ra:"auto",Psa:"5",WTa:"100",Ulb:"101",ESa:999998,wmb:999999,SSa:1E6}});
define("tdv/view/util/Assets",["require","exports"],function(){return{ko:"data:image/png;base64, ",
LSa:"data:image/png;base64, ",
oaa:"data:image/jpeg;base64, ",
HTa:"data:image/png;base64, ",
vZ:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAE4CAMAAADW5D7KAAAAM1BMVEUAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIBprCkqAAAAEHRSTlMAQIC/758wECDPYK/fcFCPt8VnWAAABehJREFUeNrt3N2WmzAMRWHABmx+/f5P20672kwSIBYI8MA+110T+sUWQnGSZeQyqZu2C1+xxpiiaPIak7kUNrzFjH2FzPuy8mEupsjxibT6szHbhj35PyZ8jMfrb/oQlXaAKstsiExX3H55DUGQ0t0bqwwBLsXyDpe4ZH3jqsGKj+3ZhoL4ezb2bViX8Y57sVmJFbobLq7artUKxQ3HM6uxgr9dF1F367Xs7bZitX4jhtCjJelQb7cT2w1a/nY9RFV2lHnJ8sq/MhRFa4Tb0t77g406L1qLlmRr9i1akhXWtGhJvPoOLUEGQwchSG7Q0uVqUXpsxo+1awTpUeo/DnMakL51Xp5boiAjRV5S6C0Dm/i45a3IWZvnOr94OsKyEQWFi27rJQ0bUUmrYyMKtGjkJVoOnpcsPPsYdF6z0EHwRYO3eJaWoDu1jB8EQ4j59gGct/R0poIYqpZgBGG5ISpsRAZbkv6BNv49OadzFRp5uoepGk+JV3iipsQLnnosNIKqRRcvqFrsw6m03A+391qcfJhKx1dVNncPjB4kJV7vBZrSh6Pj236XB1y/axPfHA+154/wFDsWraYLZ8aqTwSq3Q6JVD6cHfUvg08/8vjtyyqkEOXF1e5T4cuQRnQfRvpdKnwqVsqnzvI9PmwdQzpRXVs7bPYmpBTNuuXVV6+zSWFpTn5L9Qcek5aV5hCl0H6BIaQWvbnAoN07dMlh2b1vh+ozsjOjdpDKKX8uXSaI5XfuHVbfQmyCWHpHEnSxUtyFivtQF6tIEmt1G18Vz5n588//qI8dpbVJYplj33obue1NklhBddepreQOrPiVHC6Ftfat709pRGZuufPpVbFW/vRdmSWEddwDySqtMrsn1hqtMrsrllyrzO6LJdWS9L/Xw5JpiZ4VLogl0ZI9V10RK15L+Ax6SaxYLenz+jWx4rTEs42LYsVoyedAV8X6rLViZnZZrE9aa+aL18Va1lo1i70w1pLWurn1lbHmtVbO+C+NNae19vOQa2NNa63+7OjiWFNa64/LXR3rXWvD0cLLY71qbTmGeX2sZ61NR1ZvgPVda9vx3jtgPbQ2HoW+BdY/ra3Hxu+B9Vdr8xH7m2BlrjTbz/XeBUslYIEFFlhggQUWWGCBBRZYYIEFFlhggQUWWGCBBRZYYIEFFlhggQUWWGCBBRZYYIEFFlhggQUWWGCBBRZYYIEFFlhgCbAqc1DGYnA/HevQ367vRgeWICYHS8LlwIqPbcBa+auvYAm0wBJogfU5I1iCDGAJ7ok1WOKNCFZUHFjSOyJYgqoFVlwasIT7EKzI8RZYgtRgxScHS/bIA1Zkih+G5YpD0l0C66AYsMACCyywwAILLLDAAgsssMACCyywwAILLLDAAgsssMACCyywwAILLLDAAgsssMACCyywwAILLLDAAgsssMACCyywwAILLLDAAgsssMACCyywwAILLLDAAgsssMACCyywwAILLLDAAgsssMACCyywwAILLLDAAgsssJIIWGCBBRZYYIEFFlhggbUnli/yOqvz3oP1kerxLJkbsBYzPr1WD9ZCmpcXa8CKXFdKa+uiWD765cCanBM6sCbTTb5eC9bc33hPA1b8tN6BNRU3/YJgCf5XYE2lPhArP/PR/gvL/qCadSpWr9A/Hnk3HM7EyhWw/C59lpn8q8WZWJXGBezSwZfpYaksbbNHA9/v81ywdQfVQf8/tn1G4wT39GMyKr1dr/Osyqq8jfr9yNaSpXKLeV5bjQ377MLq7F34O932P2Ue28YpFBZb79OPKOwelWtom6916hqVGjzdu2XleVaPQZQPaWVmYWlsgbUZkqgFy1eWSslqU2n2IhvSLBsTWeplQlZ+bnJy2i601fOFpFO2fC071nxCWajb1K1OW/12SKkiPNWrWSt30hV11eSwyJ5OZZv5We9JN6F25t2ri2SX1e+LO+Wt9AvfNKmL8/o+O7qlDxHOqBLtpy/l5OMZcxA/DsuXdXjF6trGRX0U5PJj45K7pMmi/gv70+gtsjuKIwAAAABJRU5ErkJggg==",
UTa:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAADcCAMAAADA8VqlAAAAM1BMVEUAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIBprCkqAAAAEHRSTlMAQL8QgO/fn89gMHAgUI+vkrzZGQAAB8pJREFUeNrtXduW2yAM5H63zf9/bdukjdYBjI0t4KHz1Obsnp0INJKQjMl//MeM4I7MDaM4mRk6xo1MDB9/Q5BpYeMLlEwKJ98E5aTbMMj4F4bMCG7iByuZEFv8gYVMBx1/Qk6n1zbuYSZzFBq/oclMcDIm8GQecBUzmGgbmpjDPGmDjnkwMgdElt08aYPNcpsnbXDxADKQ0Qgyy2yatIHnHXietIHFGixpALLAzJM2OPZBBMyZNnzb7SUw9IUpCa5kNsybKGQJSjIb6JxpAoDOmCUcEKT5sLgIT8kApASzP8Le23OMdWktReB6rHLTSkXHzeDYQisF3fZmtrJRMk6PfWT5hL/wMmUgvRF2BJMlVFDkcTmmqt/VmxkDglkt/ERPHMYR/dNoHGzcE4epjNodyJkh5d6RE/O9dushsVAdODHda7cY4CVQPYGIFBnRIekOO4jEsKYgSaQ39IHKsK9lH+LGoqQy4LZD3RgIQrOuaDE24vyVHqTT33tONOhMV4J2hBtzIGiPCIIu9gYQpDWCfIjOmDJBCZV88kE/MCBY00HCRnTzBASSKsF1hBv7CwQ9qGU/0DLB7du16YikmmcJgjCPd+M6QYAaEY3ZBYLbCC9ZswQhtA33Ep8czJRTaNr/kBPcmJUJAj6VgVvZq1clmUCPLUWCLlUV9laeRe0KfkvwAIWdylNPN6zmW9JTQbQiDM4cE4TDEGU6d878IcFQkHVmX1ZznqF3WCgQrARjyM7Uj48Dw55nuUJwzZ21euR5FlYiuKWba8mWLxZ38EskBMtlHIcKNWEoN+EpRqhe4Hy1SpCYUlgEmKfFmycp/0HoXWE1088Bag2Pb0JajXVgbn1ijEnz5zbhBYK8FHZCOlVgn1VCm/+beUu5oq/JQP329KyfLLQ6cwRFSfS4gpNkLuSjzSl9QDBkzc3Kw1bqTXd9kqEFcTsOJRB4eCEvgr1C5XOrzMEodYKsGDbsPrMM5rkmOUs8s9x5EOXsRe5HM7iE/92Er8Y6gIOdlucOy+rk26CO0ps0Q5mgLtgpHPQmA3xxgNKUtMNUlDpNwe1Bdi4KU2ys3Y6+SNAUUnB9kHfI4qC2vbPGPu/dheFNVpL8PQ/21PAVOw4lqd7Jo9xSJSYU3N4rDSwQ/KLiCu0pkoWQ0WhP03alg73RBC6PQ0kqyPRa0cg+v+hb4zHLe6UvqMly+pvDvqSy3VMoEKw2l9SVbM/+HK2zN8ZPFasoNcCLJVyoef6YzXgOdNseFxDgek83sSkNez/f2qQQ/o15bL41O0ruayEcm3PVOoyfc0uMgSgKi3wfDONcXzz2xAUI4fOLbEgz8Lvsy63Epkfjgd1UB/RpHnrThPjTPOzeF8ef5qE3HRl/msc8VdQzpB6DfS3NtDrzt3oR8+oMIeKG0mBP84A+2Hl1hhDdrDT4+QwoTZg0n3lB3anjewz/+nv9e/zhXy4fcZNlt5cndBOHN0jhXm4ya7rwLyCv06YLjW5C/eKQyxIAvxxN3PvoTwcCEMk6POsm20XHf4OFshsPjCY+AgSyG0M08dfCmmHQqiy58ZCkC+IutwoY4rkxJEvuemLgX5vRF914gBQCQWhiSY7pxlCbyIsEIQwJVDcGKVxacj/xMiGmG8MG0i1hF5Kh1I0HrDEQ3Km8QnVjqD+XiwRBASimG4Mh9PnAo/Y7csN0YwilsumsbXntPVQ3hjVuKD8gUKZuPGiNoYCDgTGTbUaMWGPw1r2bBPwZ/rpWp08QA2OPcQaXavV60tQqyQ8Z4hlc/eHvdIo7rQs5+kMGvJpzgdPazEf4T+6aeiQAc6W1P7bOwFaqq6DJkbbIOgO2qedaPveh5LgE4XH/uhq5bF1ocBMuCCZ1V8q7dtQIp5ipwrWdlnODfKUeWCe0tQ2dxCUIQmPbCBKHQLAeJK4MeNjqLbf4m/A4p/K4V0rBJmzWIo1KEDZhe4FqotSOYGKtp1z24M7s4AgylnpPkN9skOL3BPW4a8fPlRWhcWSp3wjR2i53fVpuXLUOH/bqnNPO95Ndf4BeD7wJWJ7501y2jTr0G4BZWoJa10E71vUSuobrbILsc+1N+0CvH3ZV8dm1M2MiHmRc04rhenZz6QY/6TrCwEf5iTp7FuwHxRN/ever7hdYwdL59iFdfKynDcPG5F3htHvSQa8qMadXTo9Z5PW0XbhsYdhzko02HHfgF5/pkRHr7ClA8CxDeahLQwkSK6s3Bo0lSJyJL5hi2BtKEO4iwLdi++VtjjVQ7Dv3Tj8UBbJHg1C3UpQ6EERAqGunGNlCMphgLNjp5KobBOg7eWhY4dWFNtmNUzzBwb2Ci4P3HKd52o7q+AHzgbww1/OK3BvgqPTynCHDYydrblURoLR1jwQRA7XkUxwBRt/ek/rpAw0nTNxhs/f4IZS6fFl3JNVygx/WkRVfBJNgRX6HnyNYCFarGy9Z4Qz44WFhrQydAX6ooKrpXU9eAj9k8IZ7rALDvIc0ZXjVF4XsW92GayZcVPc3bK0X4illsX158Z8PsSo2mw9/VhGyXxZIX4i60nALJQ4lveEqSRO3WxxBD6AOVNd5Fj/QjgzBkv/rYZdUROU5GQX9bwGZ+AvN9qmjXMcYDxgeQenxL4u3ssSO+TlevAmuCmDaz/DeZoCji/gLP8t7Xv/jP87hF6zG3Qlg7TIVAAAAAElFTkSuQmCC",
n$:"data:image/png;base64, ",
tx:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHMAAAB0CAMAAACBmP1sAAAAmVBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACRkZHz8/M8PDzLy8ufn5/u7u4UFBT8/PxmZmbz8/NNTU07Ozuvr6/i4uJwcHDm5uZfX1/o6Oi8vLy9vb2AgIAoKCj29vbT09OsrKzZ2dkoKCiGhoagoKDb29vJycnQ0NDHx8f4+Pj///9ot3XMAAAAMnRSTlOyALYLBLrAvRUiGsMxKS004vxC8WfNyPNP2tLP6rXa+NbBgu3eyeibdvTMWuWojp2P5xSTSb8AAAbBSURBVGje5NfrUuJAEAVg1l0SNTEJAUK4KRdRvLu8/8NtTyeHw5CKEwzln21rt7RK+ep09wyh8+vn62TzT7Ucf9HKpPIb5YBbmrAqRfu85oF3ab5Q+sOhex6TILDr60v5ksL/aoNtZ1IEqMTVcRFG2HZmCZqA4G6OC7CyTdSOSwRYcFEUSr0MUHloKipgYRH22yZEyaCe0d7fhqPdYf0dvq3yWN2mascRsoxowPx9Sc6u0XyVxsJqWHT4dJOigun7GECvv05Q/f7eXZYs1cYmSYrxYF5y62SSBYHHCoLNIukjbV6oQJubDFmK26G+5N3rdM/5RcENFrNeEXYgKqICdZkkNaTJqGJvZkBqfrfbxbclu1Z1KFkdUWHaJEKGca7i3W1mQLUqtWefEw37lsbRjUQF6jRJasiPkYoaEeCFVXvXqJmqoy2iAnWZIG+iOB+briYiAqRlu1RfdaxpGBF1mhil9HVlQq4ziAA7VlmsUadmix9epL9Aa02mBDk3IRcmJEVaVXev3puoqzgk+oVJMgpTszz9IiTB2rLU6ZP87ZzoVybJODWj1ElqRogutkSzmUHTGrRTT/ZkXRESYkM1CBJBx4rqkak3i40FOUVfm4ryj+gtUY6Upr2ysj4kbbF5VM9TdBlHV0Atk51tR1IlOheUI62aIOPlEXnRAn3kSGmSxP58yK9OQLoAJ7qtjBQmOxsP5BdvSX5LBSpHZpRLdxWtmvthyoU3I/ktkahcDsOYQWlax0SG+RQErVIyabDpcaQVE53d6v4wZZukvqALmVSuuytBaZK8CtOH3e5eSL9NSiySdnct3WXQqqk7+6TDxLlsjWbS3a1ZIwbtYGk1Zq7HpG1n7ZHey7spgtJkzLns7JlIjvRO3kytiXYQU0yNufE8DvMs3Z3IBwwEhcmlrYnZtrt9K6hlRumIMVntg8p5GTOoMbFBN+GnienY2Qutk4LqRAeRbWKDxrK0jpjFA15ztQgqqzuXoDguNMMXeXrGNOtfYuHz2cEplkEzuepjBu2wtW9yBTlj+rv+ptmaMaheRtuwakbxg2yQ49XkBeQ4vWZUnUGxRWyumBhnrtceYtaZnn5Iuw+wa46ymlsxw5U8z3ou01dTBj/Brdy4uS8YqJgY59Jsrd91mMGurPUzGtxwcz/DqinjdLZWTVSSuVVculN57sRAxcQlJJ9OvJNMedDHWN3NxZuLZQ5kHz2/kcnqO8aKzdU7N42OzXc5nWiV02TNMFbHQGe8/tTU97FHs0KI6TbZ4CRjg+vNpHxvoSkrNNQbobnJultwrLUndGKe/2BibcX0TjQ5Vjwp1qE0Lw/NcQtTxlo2uNbcFI9/tomjcqLJsQKtGaiYOCznMHEdej9ncqyb7n9g/uvVDloTBoIwDBcPkWI0l0K1pZdSELzU///rOpnk6+u6LmucmL0UCuVh1nTdzHzRvZ3/Gdok5lL/K5iLnglm8v8ZPfua+84+PxM4b597xq/9jG+vv1eW/C7TFezR72zEsqnvbEzuJpvJd5Nmwt2ky+4m3YN3sLLII5Tewbj3dc+/a9pjm5rtedqdGvHeO7Ue24t7/BLvDph8oKcJ70iI9TL7dyQ9Qm7qA+3fBTfPexf0jxPTTyJ/58UMv/NCJlu70Lv95kdbK5PNpYfxMlMPg67UW7sdmzWYhnrr9kSh8cUTdGBrzcxab5jzkENPSoeQTG2u994oNE4OZX7YWasyE3PuHiNleo9RT1DS16RQHt0ZyLGX2tHuw0x7xmvQ8M56z5gyZVKoeuPsbsCkN86niUmhwwwg3hxPZwA3+/EMAYZZB2iwdXuynf1VmZl5NdNZx1D7W2Y6hfkKu6vZVQB1ktmVyKL52vqM7jOEOrkeZ3TpzsoEZRYZQP/H2j6L7MmSCeqTZdBVhPzKB725aegO9MmzZQrt0fdk1LuaXuQ4Q4fMzAzdH3RNp9SpWQHIsglKJkIo6pRMREqWTaF59uMe0YtU9iMjMQuoMi6ViIvALOOSk5gllCwPKm7iIZLlKZOYoASIlFlqXIVlAY4BLTJLkLlZRq3U45DNyqNZrFI2C7Jsgt7MoDVpBs2xYgatnZRBA1WpZO0auYJLWTuyYEbWTVAyhd9kCuVq3cwUWpGQBbOe1kyzk8092UnIukmpqMYGMqKBLGy3P1eysCYGsrCgZH53xna3Mr9Hz/w6iAgZyjb7Hveru8g2d87ttg66SJE1s64qUm2yLddNM848gYjBrDqsu/mqZNWjmXxl5N3uf+IhhkxUZwUny34BiBgwYXF9YeEBxk1YX0BwgLOauKyqFzdZWA+sP5AziIxB81g8AAAAAElFTkSuQmCC",
NK:115,qZ:115,MK:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHMAAAB0CAMAAACBmP1sAAAAllBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACRkZEAAAAAAAAAAAAAAAAAAAAAAABOTk48PDzz8/Pu7u78/PygoKBmZmbLy8soKCjz8/M7OzsUFBSvr69wcHDo6Oi8vLz4+Pi9vb1fX1/h4eHm5uasrKzZ2dnT09OGhobi4uKAgICBgYHb29vQ0NDKysqampqgoKDIyMj///9mvEG6AAAAMXRSTlO0AMC6Bw4XI+EpHjIsLzTRQvvO82ZP8Mjaz8fp2sGC5+3Wtfh29Jtatd7dqJ2NauWP5Mh4/QAABn9JREFUaN681ulW4zAMBWBPU5hQN2na0J2u7Dt6/5cb20py6+iQnOAp4g+Y5eNKilv15/frR2b/5KOhAk1gsmAHmO3eRVkeHGpKENjlBeqSvwIbagKE52pQfbi6EGygiYBOGwz++mVOSpfVEBMRC4+5K1tDLvc5yydsmNmHaD1rJYnWj9dlTbXWSWJwsO2qasvIoPOs9v46yem0dpPX7TTV7A5YRYc75zwRLTh93zAnK3/aZqku1EtWu5v9SmQwe1+UwHi2j8uazSp3s810YtgBo6a6mkwWYnr9VHD7eLTq+TU/xAWcH02TobaYMiWLAyPq9G5Ctm4/l73v6rAec9gPo5oOM9rF5N2xczTihxPH6xoYRVGN3Tt1Mk2TKmqTKUfJIZN06sTbmxWseqHLsQv7mnGDEbXdLEgX8i13ogC/cVdOze+KqECbTIzShVzYrsY1UEWqqkjV1U831sxOFWiL6Uju69aG3BddhSfLY5d2i3ePNiqG2mT2K1KnRxvyANHjJAv12Ubdcn8FKs2SHOrMLs9s1SqioC7vieiYaofK9io/JUg7yliI7SpPdW3RTLv2SrO+sSDHvK4Qu6ixQRdAhYmYHrkE2aFK9MahZqZypMqP6R4SkN1EPD0lukkT7BHM2v4EkGCBHvVQ7pESZJJuAkiOCvTBoBipMHmYSfpGRCMmIXYMCvROjlTVhjnUH0R0I1L+rL1ronxqRypMr7NZTrRGykD0nmgiuqv8zrph3oemxEznYzNSdBcmYg71XbE/EMOCHohoyrsL04+Z7Yie0dmgYnRvu+sHVd4CpW9FZyGGoqux3V0vqPJiTovHBCnD2/tCtEPQU5OneeSdFWRQd2+Jtl5QVY85/5+msugIQWGeJya6O0PQ0sTS5iJmeFB+XhYICtO+nnxxTCGGBeWJXp9cRgqtTRdtSxvZajqVVa7uk7mMKhOtfSS69Un56/L78lQGXRHlelg1V6G1r0QvTb89H3HNo6j5VP6ne+9eUNjandmgBjKKiSuOouZTaR5Mc+0WwbT3nns475ti9qq/3osaTkWVzU2r5qpqnFt+PwuywYzKQ3kqyaK5j4nZXJhunBu7tTJm81//3kQVm/vFA/VMM86mmD/JiYEuiTbVQFW5QhnRrOlJ+VFOoO7OhckvnddEn2fJqco7NxvC5BV6J3rhmGfJuXbXHy+uKtf2oVghdZac9se2bnFhXiUT3AjhOSU6InowiyvM3ply+mafTfteegHzHDnnRJPkqmYSzc6QEwPtZIbvrarMv7+eU9dM/a94M+hpGIbB6GFFYyvNhQPiAEhIoCEQ4v//Ouic7C39WrI2LviCVAk9HKVpbD/Wz1OZ/5Bn96d58q6smeedMjkTNmvkaWdCy7vC2bf2OTRg2hm/znnLGc95K98y1zz5lsXvCt9PvtmOeeo325jxqhnvJv55cjfhnpCqlSc2rlOebCG9gzVHJndN/3uf3TV3+8ikEuRO7Zsnd2rutxT2LzCraweQWjtQfq5TI6VK+5kaiVowvFs7aoo5WvVtLq8F08kHc79rnWte0rSltRMhr+07avspZozCU/1D3/rJh72dkz0Mfl+xvz7VSF2pT5Z2olfj1zdJvRp2bd6TCs9+zRrStJ4Uu/bIZHHpvXkhU+8t0MGAabtotR6j9PtIlF6qH/KNNJXZJ+rRMyZOPeNTmjBJ1HrjrK5Pb5w0hdlvXWYA1UhmAGzabG1HZh21yDTr+Aj0NEdnOi0znVpomukEjqDB2p5Wl9lVDfRsdhU7mk1pRndfCT2b0TG6Eiarez6LXEpkFhkYgAqTvZvNXCuRh58sWVmYMkEP2aC3BvkAUpgkGqG3Al02Qxek5GnQ7dZME1yBBcjriJxyBQigOBFzoJkTcUjI35i8pf3ymvsxh5q7H4dWkMIUdwjH5aKh79BxUSTMUei+h+LylKUTdXkEKUwiumDiLG2msPXOEpbdTtysTQraExNulukXZTdL1b6bhQ5a6IoOmgZ2X6euHeAJ187WFaQwyxZj+zjTKRS9r8hE8YM6y50kyQJTYokjGokgS0xNFaq5sF8FF7aDCLLAVO7AwG3DmPP72ju/BhTibGaTqFemNpvZ3JNxm8Oo3FzpjedG9Tbq212Ko8i9HdrUTQWTXFHHNXJZ3cfJz5V8Q8dQKb/OjwcJ9sg1cqLBg1bJJOQfLMBFYOPNbBJXA5YjE679SGweEJ5MwlDQ5sY3+a5XYx8CGgsAAAAASUVORK5CYII=",
wTa:115,vTa:115,Sr:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHMAAAB1CAMAAABKxC7JAAAAh1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQkJBMTEwAAADz8/M8PDzLy8ugoKDu7u5wcHA6Ojr8/PxmZmYUFBTz8/Pi4uKvr6+AgIAnJyfo6Oi8vLzm5ua9vb1fX1/S0tL4+PjZ2dmPj4/JycmsrKyGhoafn58UFBTb29v///9i05URAAAALHRSTlO0AL0KwyYRGDMuHuPUyfxC8WbN29DzT8jaterfzMGC+e3XnOf15Y52W+fOqAzih28AAAcuSURBVGje1JWJcqpAEEUJkrxBZHHfUNEY1/n/73s9wzQ31ACiUq/qXVKpklKPp7uncT7+ff4TZs/6s9IJEzT9j5O/ArlrZk9ddQG1OybkvnT+mEsHzt0xWTCn2dFoYN9lAmhw/X7/sxy6Y7igvsYEEUDg7PQZi86+xASx4Pm+L4S4DDkzQfH9HEtcyD7JBJEV+zmPaKf7aCp/53t03yqy5oL6KlMhWZF4s9MGuHKmy21MWFCh+gyTq9rPDePTggFRkgWcJJGcDWF9H9QXmKaPueJwaXBZMJh75aT7IGFbKrKhQrUlE2XVxPNIquyuE0K4VhR4v4py2aGhKtXWnqirIQ41MVoBWIPNNHVErlBtwcS8fhnkTBN343kJ6HBK2DTQsvfYqPYorT11XbXkYaqJUDSo4lIBda6p07MQqG8rJuo6W6iqBgWxoHH4JbDzq26rVtX1bcEEUoitksx0VQGsir7L1EmiNsWlqG8DE71k5FJJ7kGs5sHX4QqvJWUrBKDNTIOkJaCGJzGSUGwIqJMjfXYJaDOzVyBVKwOWBK8Nlbq6UtC4BurUI6MxSyKtqQFBFwqKc1rDLCEnjHyOaqBjQGuY0KTxARLEZwLoRvhcXZuJkS0jQXyuvgxdAlrJZKTYAPlaXEAPQu2Gcksdu5kHeusAli8F0LPdUsdq5pDeOIblW6YrWr4zVNdicjNp4a3etIQpLYeROqVVTFSWmnmE5bumaWRaylAwoXlW8wPLt0331ClTXTBLmiL+lnJtbZ93WppRdSFqMfOZPaKZXYjOI5pdFgUTmjN9TGDZhelaym8WBROaS5rZjiwxuzsptyzKTAyt0kyh2ZHoAKLMxNB2qwnTBKIlptKMp9DsiMjnZcGizOx95Jqnek233VUjSh0dKtGCiQla8NBavLaxqa4Z3aUWNUyU9iLljjXtz7WIxlaJzmnVC78oroMJupsVZFuug7YZu5U/ODN7wTC5nb6gtZdWaLpuItsncCu3LooLz/xwHqu66U7kE4lct7a4YHI7t1IGlcyBfCae1RtT3IvPj1GnaOeGplYj3S6YCC/dk+CGOnw6VTsrJ8h7mQlRj/qzMQ2Fpx9LmVSclPeYEOWdCya1cyjl1SNk9568c2OfmTxCJzqd0Ozcc0Xrj7cCMfPn2IFHqEtPNDTIny1l5ggbodbzOE5v+0SWkw1uk3VUzYQofcmBN5HTA9N74JmFYeiF4aqEHIcqt2OjJ5hf7KmOysIw6z2jW+hRwnD32zLMb04eeKZSjgomH08pkwee19DTCztcS2SgbxI0afb0iCkKzx6YzZ57Zg4kEvLNn3pPMD9RWzCdBs8f/vq9RNK/tJnbTsMwDEDFijTESlXYG1TqyxBi4v+/D9eLdZTaklct9QtlgbnHcRxf7MPPlBOdNSeYnnOUnVvMWDnRV7HtddjA2eWcuKi6i/yODNPtw9+/LZxP+X4CJXJWosv01uvD3C9HRVRu5eSshJxQjeOsD/NVNJXzcRlH0Z5wTtF+fiTn0wQzq68ieRzSs0LsU51TwonMonJpd8GXcMY6LcbnnFa7aeS+i5MYfyTG212WcXJq5C9LcZnfn9xl3CvdkTs74QTTXj/nrO/sjjyB3MS9ZO8xy7sBmnL63ERT6tBx0ekwAU046xyMvI9ccy0upyZeybetQYcovyXXhNMqwdNzwOlqh76adaxAT+6tXU5NHv9C7VCL1Ujfi8hPM4YxnFkMayT1b6sd0EmNBGj9T8jqrXQRoQ6IayTqsrgWRHxhy5JfjMuVH9tOOMW4Yc3rxzcbFzFt2U5q+1dq+/greUgWHSa1faXT9TDaSelKvWNa+iZiXO3VANq0V4PXis69Wm9gak8Kr1WdeO6OvTc6GHCKF+3ZY3T9PryofS9VpoSKiQehU+MfPeMWoAd6xmC6PjW98Rag9MbZTXQSFxrNALCszgDCfjwB8NFZB8Ksg7DndDaZ6UDJTEdDkNdJd7PMrh4edxxEdHaFZcN5GTO6/1btXbVhIIqiKKhNm5RJ4f//yIixLgtxjY9Ho3GVNMtHeWCY/f1Et5WV23FH5xco3EWuociHC9DXd66ueQu9PnKrO1dPltmvs6HXpiJ/kWcTCf1xh35hpDt0pMOEjtJEKzA3tcgvpHypm/5KWxMxM1ITUWRoIqDaD1Mn2w9kaFwKbY1LUHvj4sEG0/+G1vLsryxqeazMXY2AqJolkVS57aNtb5asjCb03GZt2PPrXZuVezBqBWH71FODBg4NGhLazY5eb+20YMRger5HxfinKeTyFptCaGgnab2dHCOFuNHs6shgP2pEpanK1GB21NaPWtgsMnNlXEHs6+b38Wx+d5CIzGafSj3c1jaLm2fa5qxih+wM7gBLRE6aVGNbOn5ww8tgNqkS+R0esqPJJ66bxpZb9NDK20HiomlssWxf1hu70bS2Bjve0v2mn234zs0miTV//gHyyprZmiIc9wAAAABJRU5ErkJggg==",
eUa:115,vmb:117,mSa:"data:image/png;base64, ",
gUa:"data:image/png;base64, ",
NF:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"}});
define("tdv/view/util/Fullscreen","require exports tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Device".split(" "),function(a,l,k,n,g,h){if(h.Dc()!=h.VP){var e=document.createElement("div"),b=function(p){return!(!(p||e).requestFullscreen&&!document.exitFullscreen)&&h.Dc()!=h.uK};if(!(a=b()))try{a=window.self===window.top}catch(p){a=!1}if(a)a=function(p){function q(r){var t=p.call(this)||this;t.oa=r;t.ha=t.fea();document.addEventListener("fullscreenchange",
function(){t.tja()});window.addEventListener("resize",function(){t.tja()});return t}O(q,p);q.Apa=function(){};q.prototype.nl=function(){return b(this.oa)};q.prototype.rt=function(){this.enabled()||this.toggle()};q.prototype.tm=function(){this.enabled()&&this.toggle()};q.prototype.toggle=function(){this.enabled()?document.exitFullscreen():this.oa.requestFullscreen();this.tja()};q.prototype.enabled=function(){return this.ha&&this.fea()};q.prototype.fea=function(){return this.oa===document.fullscreenElement};
q.prototype.tja=function(){var r=this.fea();this.ha!=r&&(this.ha=r,this.m(new n(k.V)),q.M.m(k.V))};q.enabled=function(){return!!document.fullscreenElement};q.fullscreenElement=function(){return document.fullscreenElement};q.tm=function(){q.enabled()&&document.exitFullscreen()};q.M=new g;return q}(g);else{var c=!0;a=function(p){function q(r){var t=p.call(this)||this;t.oa=r;return t}O(q,p);q.Apa=function(r){c=r=="out_of_frame"};q.prototype.nl=function(){return c};q.prototype.rt=function(){this.toggle()};
q.prototype.tm=function(){};q.prototype.toggle=function(){c&&window.open(window.self.location.href,"_blank")};q.prototype.enabled=function(){return q.enabled()};q.enabled=function(){return!1};q.fullscreenElement=function(){return null};q.tm=function(){};q.M=new g;return q}(g)}}else{a=function(p){function q(r){var t=p.call(this)||this;t.oa=r;return t}O(q,p);q.prototype.nl=function(){return!0};q.prototype.rt=function(){this.enabled()||this.toggle()};q.prototype.tm=function(){this.enabled()&&this.toggle()};
q.prototype.toggle=function(){if(this.enabled())d("fullscreen"),q.ly=null;else{q.ly&&q.ly.tm();d("fullscreen");var r=f();r.push("fullscreen");m(r);q.ly=this}this.m(new n(k.V));q.M.m(k.V)};q.prototype.enabled=function(){return this==q.ly};q.enabled=function(){return!!q.fullscreenElement()};q.fullscreenElement=function(){return q.ly&&q.ly.oa};q.tm=function(){q.enabled()&&q.ly&&q.ly.tm()};q.Apa=function(){};q.M=new g;q.ly=null;return q}(g);var d=function(p){for(var q=f(),r=[],t=0;t<q.length;t++)q[t]!=
p&&r.push(q[t]);m(r)},f=function(){var p=window.location.hash.substring(1);return p.length?p.split("&"):[]},m=function(p){window.location.hash="#"+(p.length?p.join("&"):"")}}return a});
define("tdv/util/Storage",["require"],function(){var a={};a:{try{if("localStorage"in window&&(window.localStorage.setItem("test","test"),window.localStorage.getItem("test")=="test")){window.localStorage.removeItem("test");var l=!0;break a}}catch(n){}l=!1}if(l)a.setItem=function(n,g){window.localStorage.setItem(n,g)},a.getItem=function(n){return window.localStorage.getItem(n)},a.removeItem=function(n){return window.localStorage.removeItem(n)},a.clear=function(){try{window.localStorage.clear()}catch(n){}};
else{var k={};a.setItem=function(n,g){k[n]=g};a.getItem=function(n){return k[n]};a.removeItem=function(n){delete k[n]};a.clear=function(){k={}}}return a});
define("tdv/player/view/util/InfoWindow","require tdv/utils tdv/player/l10n tdv/player/view/util/Device tdv/player/view/util/URL tdv/view/core/ZIndex tdv/view/util/Assets tdv/view/util/Fullscreen tdv/util/Storage".split(" "),function(a){function l(Q,R){this.S9a=Q;this.uXa=R;this.pja=[];this.Oc=null;this.rz=!1}var k=a("tdv/utils"),n=a("tdv/player/l10n"),g=a("tdv/player/view/util/Device"),h=a("tdv/player/view/util/URL"),e=a("tdv/view/core/ZIndex"),b=a("tdv/view/util/Assets"),c=a("tdv/view/util/Fullscreen"),
d=a("tdv/util/Storage"),f="color:#000; font-family:Arial, Helvetica, sans-serif;",m="",p="border-color:#b2b2b2;",q=p,r="background-color:#009adb; border:none; box-sizing:border-box; color:#fff; cursor:pointer; font-family:Arial, Helvetica, sans-serif; text-align:center;",t="vertical-align:middle; padding:0;",u='<img style="width:33vmin;" src="'+b.ko+'"/>',v='<img style="width:24vmin;" src="'+b.ko+'"/>',w='<img style="width:34vmin;" src="'+b.n$+'"/>',y='<img style="width:34vmin;" src="'+b.LSa+'"/>',
x='<img style="width:24vmin;" src="'+b.HTa+'"/>';g.ub()?(r+=" margin:0 1vmin; min-width:20vmin; padding:2.2vmin 4vmin; font-size:3.6vmin; font-weight:bold; min-width:30vmin;",f+=" font-size:3.6vmin; line-height:4.3vmin;",m+=" margin:5vmin 0;",p+="  margin:5vmin 0;",q+="  margin:3vmin 0;",t+=" height:4vmin; margin:0 1vmin 0 0; width:4vmin;"):r+=" font-size:19px; padding:17px 34px;";m+=f;l.prototype.Cca=function(){this.Oc||(this.Oc=document.createElement("div"),this.Oc.style.position="fixed",this.Oc.style.zIndex=
e.SSa,this.Oc.style.left="0",this.Oc.style.top="0",this.Oc.style.margin="0",this.Oc.style.padding="0",this.Oc.style.height="100%",this.Oc.style.width="100%",this.Oc.style.backgroundColor="rgba(255, 255, 255, 0.99)",this.Oc.innerHTML=this.uXa,this.Oc.querySelectorAll("button").forEach(Q=>Q.addEventListener("click",R=>this.s2a(R.currentTarget.id))))};l.prototype.Gia=function(Q,R){var K={},M;for(M in R)K[M]=Q.style[M];this.pja.push({el:Q,css:K});for(M in R)Q.style[M]=R[M]};l.prototype.S4a=function(){for(;this.pja.length;){var Q=
this.pja.pop(),R;for(R in Q.css)Q.el.style[R]=Q.css[R]}};l.prototype.show=function(Q,R,K){Q||(Q=function(){});R||(R=function(){});if(this.rz){var M=this.o_;this.o_=function(){M();Q()};var T=this.d_;this.d_=function(){T();R()}}else{this.Cca();this.o_=Q;this.d_=R;var S=this.j_a();if(S===void 0){this.rz=!0;S=c.fullscreenElement()||document.body;if(K!==!0)for(K=0;K<S.children.length;K++)this.Gia(S.children[K],{visibility:"hidden"});else for(this.Gia(S,{overflow:"hidden"}),K=0;K<S.children.length;K++)this.Gia(S.children[K],
{position:"absolute","z-index":0});S.appendChild(this.Oc)}else this.rz=!1,S?this.o_():this.d_()}};l.prototype.Qe=function(){this.rz&&(this.rz=!1,this.Oc.parentElement.removeChild(this.Oc),this.S4a())};l.prototype.j_a=function(){var Q=d.getItem(this.Twa());if(Q=="true")return!0;if(Q=="false")return!1};l.prototype.XCa=function(Q){d.setItem(this.Twa(),Q?"true":"false")};l.prototype.Twa=function(){return this.S9a+"DontDisplay:"+window.location.pathname};l.prototype.s2a=function(Q){var R=this.Oc.querySelector("#tdvvriw_dontdisplay");
R=R&&R.checked;this.Qe();Q=="tdvvriw_continue"?(this.o_(),R&&this.XCa(!0)):Q=="tdvvriw_cancel"&&(this.d_(),R&&this.XCa(!1))};a=k.extend(l,function(){var Q=['<div style="box-sizing:border-box; margin:0; padding:0 12vmin; display:table; height:100%; width:100%;"><div style="vertical-align:middle; text-align:center; display:table-cell;">\n<div>',u,'<div style="'+m+'">'+n("use-cardboard-info")+"</div>",'<div><button style="'+r+'" id="tdvvriw_continue">'+n("use-cardboard")+"</button></div>","</div>",'<hr style="'+
p+'">',"<div>",'<div style="'+m+'">','<div style="margin-bottom:2vmin;">'+n("samsung-internet-vr-app-info")+"</div>",'<div><button style="'+r+'" id="tdvvriw_cancel">'+n("launch-default-browser")+"</button></div>","</div>",y,"</div>\n</div></div>",'<div style="position:absolute; left:12vmin; right:12vmin; bottom:6vmin; '+m+'">','<input type="checkbox" id="tdvvriw_dontdisplay" name="tdvvriw_dontdisplay" value="true" style="'+t+'"><label for="tdvvriw_dontdisplay">'+n("dont-display-again")+"</label>",
"</div>"].join("\n");l.call(this,"ChromeAppInfoWindow",Q)});var z=k.extend(l,function(){var Q=['<div style="box-sizing:border-box; margin:0; padding:0 12vmin; display:table; height:100%; width:100%;"><div style="vertical-align:middle; text-align:center; display:table-cell;">\n<div>',u,'<div style="'+m+'">'+n("use-cardboard-info")+"</div>",'<div><button style="'+r+'" id="tdvvriw_continue">OK</button></div>',"</div>",'<hr style="'+p+'">',"<div>",'<div style="'+m+'">','<div style="margin-bottom:2vmin;">'+
n("samsung-internet-vr-info")+"</div>","</div>",y,"</div>\n</div></div>",'<div style="position:absolute; left:12vmin; right:12vmin; bottom:6vmin; '+m+'">','<input type="checkbox" id="tdvvriw_dontdisplay" name="tdvvriw_dontdisplay" value="true" style="'+t+'"><label for="tdvvriw_dontdisplay">'+n("dont-display-again")+"</label>","</div>"].join("\n");l.call(this,"SamsungInternetInfoWindow",Q)}),A=k.extend(l,function(){l.call(this,"SamsungInternetForGearVRInfoWindow",['<div style="box-sizing:border-box; margin:0; padding:0 12vmin; display:table; height:100%; width:100%;"><div style="vertical-align:middle; text-align:center; display:table-cell;">\n<div>',
y,'<div style="'+m+'">This content requires access to the WebVR API.<br>To enable WebVR open the "More" menu you\'ll find above this window and then click on the "Labs" item.</div>','<div><button style="'+r+'" id="tdvvriw_cancel">OK</button></div>',"</div>\n</div></div>"].join("\n"))}),D=k.extend(l,function(){var Q=['<div style="box-sizing:border-box; margin:0; padding:0 12vmin; display:table; height:100%; width:100%;"><div style="vertical-align:middle; text-align:center; display:table-cell;">','<div style="'+
m+'"></div>','<div style="text-align:center;"><button style="'+r+' box-shadow:0 0 4px rgba(0, 0, 0, 0.5);" id="tdvvriw_continue">'+n("exit-vr")+"</button></div>","</div></div>"].join("\n");l.call(this,"ExternalVRDisplayVRInfoWindow",Q)});D.prototype.Cca=function(){l.prototype.Cca.call(this);h.Rg("vrv")===!0&&(this.Oc.style.backgroundColor="")};var E=k.extend(l,function(){var Q=g.Ub()==g.Ii?window.location.protocol!="https:"&&window.location.hostname!="localhost"?"<div>"+n("giroscope-disabled-http")+
"</div>":n("giroscope-disabled-safari-request-permission").map(function(R){return"<div>"+R+"</div>"}).join("\n"):"<div>"+n("giroscope-disabled-http")+"</div>";Q=['<div style="box-sizing:border-box; margin:0; padding:0 12vmin; display:table; height:100%; width:100%;"><div style="vertical-align:middle; text-align:center; display:table-cell;">\n<div>','<div style="'+m+'">',Q,"</div>",'<div><button style="'+r+'" id="tdvvriw_continue">OK</button></div>',"</div>\n</div></div>",'<div style="position:absolute; left:12vmin; right:12vmin; bottom:6vmin; '+
m+'">','<input type="checkbox" id="tdvvriw_dontdisplay" name="tdvvriw_dontdisplay" value="true" style="'+t+'"><label for="tdvvriw_dontdisplay">'+n("dont-display-again")+"</label>","</div>"].join("\n");l.call(this,"GiroscopeDisabledInfoWindow",Q)}),B=k.extend(l,function(){var Q=['<div style="box-sizing:border-box; margin:0; padding:0 12vmin; display:table; height:100%; width:100%;"><div style="vertical-align:middle; text-align:center; display:table-cell;">\n<div>',u,'<div style="'+m+'">'+n("use-cardboard-info")+
'</div><div><button style="'+r+'" id="tdvvriw_continue">'+n("use-cardboard")+"</button></div>","</div>",'<hr style="'+p+'">',"<div>",y,'<div style="'+m+'">It looks like this device is compatible with Gear VR. If you have a Gear VR headset you can view this content using the Carmel Web Browser (by Oculus).</div>','<div><button style="'+r+'" id="tdvvriw_cancel">Use Carmel web browser</button></div>',"</div>\n</div></div>"].join("\n");l.call(this,"CarmelInstallationPromptVRInfoWindow",Q)}),C=k.extend(l,
function(){var Q=['<div style="box-sizing:border-box; margin:0; padding:0 12vmin; display:table; height:100%; width:100%;"><div style="vertical-align:middle; text-align:center; display:table-cell;">\n<div>',u,'<div style="'+f+' margin:2vmin 0;">'+n("cardboard-v1")+"</div>",'<div><button style="'+r+'" id="tdvvriw_cancel">'+n("use-default-cardboard")+"</button></div>","</div>",'<hr style="'+q+'">',"<div>",'<div style="'+f+' margin-bottom:2vmin;">'+n("cardboard-v2")+"</div>",'<div><button style="'+r+
'" id="tdvvriw_continue">'+n("use-cardboard-v2")+"</button></div>",w,"</div>\n</div></div>",'<div style="position:absolute; left:12vmin; right:12vmin; bottom:6vmin; '+m+'">','<input type="checkbox" id="tdvvriw_dontdisplay" name="tdvvriw_dontdisplay" value="true" style="'+t+'"><label for="tdvvriw_dontdisplay">'+n("dont-display-again")+"</label>","</div>"].join("\n");l.call(this,"CardboardV2InfoWindow",Q)}),F=k.extend(l,function(){var Q=['<div style="box-sizing:border-box; margin:0; padding:0 12vmin; display:table; height:100%; width:100%;"><div style="vertical-align:middle; text-align:center; display:table-cell;">',
'<div style="'+m+'"></div>','<div style="text-align:center;"><button style="'+r+'" id="tdvvriw_continue">'+n("enter-vr")+"</button></div>","</div></div>"].join("\n");l.call(this,"EnterVRInfoWindow",Q)}),G=k.extend(l,function(){l.call(this,"PreparingVRInfoWindow",['<div style="box-sizing:border-box; margin:0; padding:0 12vmin; display:table; height:100%; width:100%;"><div style="vertical-align:middle; text-align:center; display:table-cell;">','<div style="'+m+'">Preparing VR...</div>',"</div></div>"].join("\n"))}),
I=k.extend(l,function(){var Q=['<div style="position: absolute; top: 7vmin; right:5vmin; ">',v,'</div>\n<div style="box-sizing:border-box; margin:0; padding:0 12vmin; display:table; height:100%; width:100%;"><div style="vertical-align:middle; text-align:center; display:table-cell;">',x,'<div style="'+m+'">'+n("use-safari-for-vr")+"</div>",'<div style="text-align:center;"><button style="'+r+'" id="tdvvriw_continue">OK</button></div>',"</div></div>",'<div style="position:absolute; left:12vmin; right:12vmin; bottom:6vmin; '+
m+'">','<input type="checkbox" id="tdvvriw_dontdisplay" name="tdvvriw_dontdisplay" value="true" style="'+t+'"><label for="tdvvriw_dontdisplay">'+n("dont-display-again")+"</label>","</div>"].join("\n");l.call(this,"UseSafariVRInfoWindow",Q)}),N=k.extend(l,function(){var Q=['<div style="position: absolute; top: 5vmin; right:5vmin;">','<img style="width:24vmin" src="'+b.ko+'"/>','</div>\n<div style="box-sizing:border-box; padding:0 10vmin; display:table; height:100%; width:100vw;">\n<div style="vertical-align:middle; text-align:center; display:table-cell;">',
'<img style="width:22vmin" src="'+b.vZ+'"/>','<div style="color:#000; font-family:Arial, Helvetica, sans-serif; font-size:3.6vmin; line-height:4.3vmin; margin:5vmin 0; text-align:center;">'+n("rotate-device")+"</div>","</div>\n</div>"].join("\n");l.call(this,"RotateVRInfoWindow",Q)});k=k.extend(l,function(){var Q=['<div style="box-sizing:border-box; margin:0; padding:0 12vmin; display:table; height:100%; width:100%;"><div style="vertical-align:middle; text-align:center; display:table-cell;">','<div style="'+
m+'; text-wrap:balance;">'+n("ar-mobile-info").split("\n").map(R=>'<div style="margin-bottom:3vmin;">'+R+"</div>").join("")+"</div>",'<img style="width:24vmin; margin-bottom:4vmin;" src="'+b.oaa+'"/>','<div style="text-align:center;"><button style="'+r+'" id="tdvvriw_continue">OK</button></div>',"</div></div>",'<div style="position:absolute; left:12vmin; right:12vmin; bottom:6vmin; '+m+'">','<input type="checkbox" id="tdvvriw_dontdisplay" name="tdvvriw_dontdisplay" value="true" style="'+t+'"><label for="tdvvriw_dontdisplay">'+
n("dont-display-again")+"</label>","</div>"].join("\n");l.call(this,"MobileARInfoWindow",Q)});var P={};P.mmb=new z;P.nmb=new A;P.Jra=new D;P.Tlb=new B;P.Xlb=new F;P.gmb=new G;P.hta=new I;P.vZ=new N;P.Pra=new E;P.ZRa=new a;P.n$=new C;P.oaa=new k;return P});define("tdv/view/constants/State",["require","exports"],function(){return{lf:void 0,ga:"over",Nb:"pressed",wc:"pressedOver",pa:"selected"}});
define("tdv/binding/Bindable",["require","exports","tdv/constants/EventName","tdv/events/Event","tdv/events/EventDispatcher"],function(a,l,k,n,g){return function(h){function e(){var b=h.call(this)||this;b.Yr={};return b}O(e,h);e.prototype.set=function(b,c){var d=this;if(typeof b==="object"){c=[];var f=0;for(b=Object.entries(b);f<b.length;f++){var m=b[f],p=m[0];m=m[1];this.Yr[p]!==m&&(this.Yr[p]=m,c.push(p))}c.forEach(function(q){return d.Nja(q)})}else this.Yr[b]!==c&&(this.Yr[b]=c,this.Nja(b))};e.prototype.Nja=
function(b){b=new n(k.N(b));this.m(b)};e.prototype.copy=function(b){this.Yr={};for(var c in b.Yr)this.Yr[c]=b.Yr[c];return this};e.prototype.get=function(b,c){c===void 0&&(c=void 0);b=this.Yr[b];return b!==void 0?b:c};return e}(g)});define("tdv/constants/Priority",["require","exports"],function(){return{bTa:7,d$:6,Zra:5,Mp:4,Rsa:3,kQ:2,zaa:1,bmb:0,csa:3,DF:2,yTa:1,xTa:2,tTa:2,Pp:2,XTa:3,umb:4}});
define("tdv/view/constants/Cursor",["require","exports"],function(){return function(){function a(){}a.tB="grab";a.Li="grabbing";a.gsa="move";a.qsa="move-n";a.rsa="move-ne";a.hsa="move-e";a.usa="move-se";a.tsa="move-s";a.vsa="move-sw";a.wsa="move-w";a.ssa="move-nw";a.hTa="move-ew";a.jTa="move-ns";a.iTa="move-nesw";a.kTa="move-nwse";a.jsa="move-fast-n";a.ksa="move-fast-ne";a.isa="move-fast-e";a.nsa="move-fast-se";a.msa="move-fast-s";a.osa="move-fast-sw";a.psa="move-fast-w";a.lsa="move-fast-nw";a.mf=
"hand";a.NF="transparent";a.lf="default";a.wB="inherit";return a}()});define("tdv/view/constants/GradientDirection",["require","exports"],function(){return{kZ:"horizontal",Laa:"vertical"}});
define("tdv/view/core/visualprops/UIBaseVisualProperties",["require","exports","tdv/view/constants/GradientDirection"],function(a,l,k){return function(){return function(){this.backgroundColor=this.VN=this.ariaLabel=void 0;this.wk=[];this.m5=void 0;this.BD=k.Laa;this.Pv=null;this.om=1;this.uf=this.vf=this.Pe=this.Oe=this.borderBottomRightRadius=this.borderBottomLeftRadius=this.borderTopRightRadius=this.borderTopLeftRadius=0;this.borderBottomColor=this.borderRightColor=this.borderTopColor=this.borderLeftColor=
"";this.className=void 0;this.cursor="inherit";this.id=this.Mc=this.height=0;this.rJ=!0;this.offsetY=this.offsetX=0;this.opacity=1;this.oX=this.yw=!0;this.paddingTop=this.paddingRight=this.paddingLeft=this.paddingBottom=0;this.VA=!1;this.bu=0;this.cu=4;this.bo=6;this.$J=0;this.shadowColor="#000000";this.Ow=1;this.tabIndex=void 0;this.ee=this.ze=this.Bd=this.Cf=this.Nc=0;this.visible=!1;this.width=0;this.y=this.x=void 0}}()});
define("tdv/view/images/fliputil",["require","exports"],function(){return{Sdb:function(a){return!!a&&a.indexOf("&tdvflipx")>=0},cGa:function(a){a&&(a.indexOf("#")<0&&(a+="#"),a+="&tdvflipx");return a},ccb:function(a,l,k){var n=document.createElement("canvas");n.width=l;n.height=k;k=n.getContext("2d");k.translate(l,0);k.scale(-1,1);k.drawImage(a,0,0);a.src=n.toDataURL()}}});
define("tdv/util/LoadRequest",["require","exports"],function(){return function(){function a(l,k,n,g,h,e){this.Xoa=l;this.url=k;this.priority=n;this.time=g;this.Ajb=h;this.bab=e}a.prototype.loaded=function(){this.Xoa.ZX(this.url);this.Xoa.remove(this)};a.prototype.cancel=function(){this.Xoa.remove(this)};return a}()});
define("tdv/util/LoadQueue","require exports tdv/player/view/util/Device tdv/player/view/util/URL tdv/events/async tdv/util/LoadRequest".split(" "),function(a,l,k,n,g,h){var e=k.Dc()===k.kB,b=!(n.Ck("debug")&&n.Rg("disable-cache"));return function(){function c(){}c.add=function(d,f,m,p){d=new h(this,d,f,(new Date).getTime(),m,p);this.gz.push(d);this.ya();return d};c.Pjb=function(d){this.tN.push(d);this.ya()};c.Ojb=function(d){d=this.tN.indexOf(d);d>=0&&this.tN.splice(d,1);this.ya()};c.Jlb=function(d){var f;
return e?!0:b?(f=this.zya[d])!==null&&f!==void 0?f:!1:!1};c.ZX=function(d){e||b&&(this.zya[d]=!0)};c.ya=function(){this.Bka||(this.Bka=g.yE(c.K8a.bind(this)))};c.K8a=function(){this.Bka=null;for(var d=this.b5a(),f=0,m=this.hM;f<m.length;f++){var p=m[f];d.includes(p)||p.bab()}f=this.hM;this.hM=d;d=0;for(m=this.hM;d<m.length;d++)p=m[d],f.includes(p)||p.Ajb()};c.X6a=function(){this.gz.sort(function(d,f){return d.priority-f.priority||f.time-d.time});this.tN.sort(function(d,f){return d-f})};c.b5a=function(){this.X6a();
var d=[];if(this.gz.length)for(var f=this.tN.length?this.tN[0]:this.gz[0].priority,m=0;m<10&&m<this.gz.length&&this.gz[m].priority<=f;m++)d.push(this.gz[m]);return d};c.remove=function(d){var f=this.gz.indexOf(d);f>=0&&this.gz.splice(f,1);f=this.hM.indexOf(d);f>=0&&this.hM.splice(f,1);this.ya()};c.gz=[];c.hM=[];c.tN=[];c.Bka=null;c.zya={};return c}()});
define("tdv/view/images/ImageLoader","require exports tdv/events/Event tdv/events/EventDispatcher tdv/constants/EventName tdv/constants/Priority tdv/player/view/util/URL tdv/view/images/fliputil tdv/util/LoadQueue".split(" "),function(a,l,k,n,g,h,e,b,c){var d=0;return function(f){function m(p){var q=f.call(this)||this;q.ke=null;q.Gd=null;q.Pa=null;q.Ha=null;q.EC=!1;q.fq=null;q.$M=null;q.i3=0;q.Zea=[];q.YG=d++;q.t0=q.t0.bind(q);q.u0=q.u0.bind(q);q.ov=p||h.bTa;return q}O(m,f);m.prototype.load=function(p){this.cancel();
this.ke=p;this.i3=0;this.qCa()};m.prototype.qCa=function(){this.fq=c.add(this.ke,this.ov,this.f7a.bind(this),this.KWa.bind(this))};m.prototype.cancel=function(){this.fq&&(this.fq.cancel(),this.fq=null);this.Wua();this.ke=null};m.prototype.Leb=function(){return!!this.Gd&&!this.EC||!!this.$M};m.prototype.kj=function(){return this.EC};m.prototype.xg=function(p){return p?(p=this.Gd.cloneNode(!0),this.Zea.push(p),p):this.Gd};m.prototype.dg=function(){return this.Pa};m.prototype.wg=function(){return this.Ha};
m.prototype.ql=function(){return this.ke};m.prototype.f7a=function(){this.Gd=this.XXa(this.ke)};m.prototype.KWa=function(){this.Leb()&&this.Wua()};m.prototype.Wua=function(){if(this.Gd){this.$M&&(clearTimeout(this.$M),this.$M=null);for(this.EC=!1;this.Zea.length;)this.Qva(this.Zea.shift());this.Qva(this.Gd);this.Gd=null}};m.prototype.SUa=function(p){p.addEventListener("load",this.t0);p.addEventListener("error",this.u0)};m.prototype.jCa=function(p){p.removeEventListener("load",this.t0);p.removeEventListener("error",
this.u0)};m.prototype.t0=function(){this.Gd.width&&this.Gd.height||!(this.ke.indexOf(".svg")>-1)||this.oZa();this.fq.loaded();this.fq=null;this.jCa(this.Gd);this.EC=!0;this.Pa=this.Gd.width;this.Ha=this.Gd.height;b.Sdb(this.ke)&&b.ccb(this.Gd,this.Pa,this.Ha);this.m(new k(g.ia))};m.prototype.u0=function(){var p=this;if(this.ke){var q=this.ke;this.cancel();this.ke=q;this.i3<5?(this.i3++,this.$M=setTimeout(function(){p.$M=null;p.qCa()},Math.pow(2,this.i3)*1E3)):this.m(new k(g.ad))}};m.prototype.oZa=
function(){var p=new XMLHttpRequest;p.open("GET",this.ke,!1);p.send();var q=document.createElement("div");q.innerHTML=p.responseText;p=q.children[0];this.Gd.width=p.width.baseVal.value;this.Gd.height=p.height.baseVal.value};m.prototype.XXa=function(p){var q=document.createElement("img");e.una(p)?q.setAttribute("crossOrigin","Anonymous"):q.removeAttribute("crossOrigin");q.setAttribute("draggable","false");q.style.position="static";q.style.border="none";q.style.display="none";this.SUa(q);q.src=p;return q};
m.prototype.Qva=function(p){this.jCa(p);p.parentNode&&p.parentNode.removeChild(p);p.src=""};m.C9=function(p){return c.Jlb(p)};return m}(n)});
define("tdv/view/core/UIBase","require exports tdv/binding/Bindable tdv/constants/EventName tdv/constants/Priority tdv/events/Event tdv/view/constants/Cursor tdv/view/core/visualprops/UIBaseVisualProperties tdv/view/images/ImageLoader".split(" "),function(a,l,k,n,g,h,e,b,c){function d(p){if(p!==void 0)return typeof p==="string"&&(p=parseInt(p)),p%1!==0&&(p=Math.round(p)),p}function f(p){typeof p==="string"&&(p=parseInt(p));p%1!==0&&(p=Math.round(p));return p}function m(p){if(p!==void 0)return typeof p===
"string"?parseFloat(p):p}return function(p){function q(){var r=p.call(this)||this;r.YG=q.YG++;r.u=r.uL();r.u.id=r.YG;r.pfa=!1;r.Fb=null;r.Ia=null;r.QB=null;r.QZ=void 0;r.Si=e.lf;r.zy=!1;r.Mo=!0;r.fn=0;r.dn=0;r.oS=0;r.nS=0;r.TJ(!0);r.Oia(!0);return r}O(q,p);q.prototype.uL=function(){return new b};q.prototype.df=function(r){this.nL=r};q.prototype.gA=function(){return this.nL};q.prototype.Vb=function(){return this.Fb};q.prototype.va=function(){if(!this.S4)throw Error("Visuals not initialized");return this.S4};
q.prototype.lJa=function(){if(!this.XL)throw Error("Input event manager not initialized");return this.XL};q.prototype.Z6=function(r,t){return this.BI||this.OR?this.BI===r&&this.OR===t:!0};q.prototype.ao=function(r,t,u,v){this.Fb&&this.FD();this.Fb=r;if(!this.Z6(t,u))throw Error("Component visuals already created for a different rendering type");this.S4||(this.BI=t,this.S4=t.create(this));this.XL||(this.OR=u,this.XL=u.create(this,v));this.NR();this.Iz();this.VU();this.m(n.VRa)};q.prototype.FD=function(){this.pfa=
!1;this.Fb=null;this.Iz()};q.prototype.Xpa=function(r){r=r||this.nL;this.u.className!==r&&(this.u.className=r,this.tb())};q.prototype.lhb=function(){this.Xpa()};q.prototype.getParent=function(){return this.Ia};q.prototype.cw=function(){return this.u.x||0};q.prototype.fA=function(){return this.u.y||0};q.prototype.gb=function(){return this.u.width};q.prototype.Kb=function(){return this.u.height};q.prototype.Odb=function(){return this.u.width!==void 0&&this.u.height!==void 0};q.prototype.Uh=function(){return this.u.width-
this.u.Bd-this.u.ze};q.prototype.Th=function(){return this.u.height-this.u.ee-this.u.Cf};q.prototype.gg=function(r){this.u.visible!=r&&(this.u.visible=r,this.Hf(),this.Ia&&(this.Ia.kc(),this.Ia.yf()),this.Iz())};q.prototype.Iz=function(){var r=!1;this.Fb&&this.u.visible&&this.ew()>0&&(r=!this.Ia||this.Ia.zy);this.zy!=r&&this.Dba(r)};q.prototype.Dba=function(r){this.zy=r;this.set("inView",r);this.zy?this.m(new h(n.od)):this.m(new h(n.jd))};q.prototype.f6a=function(r){this.Mo!=r&&(this.Mo=r,this.Ia&&
this.Ia.yf())};q.prototype.Q5a=function(r){r=d(r);this.JL!=r&&(this.JL=r,this.kc())};q.prototype.P5a=function(r){r=d(r);this.IL!=r&&(this.IL=r,this.kc())};q.prototype.O5a=function(r){r=d(r);this.HL!=r&&(this.HL=r,this.kc())};q.prototype.N5a=function(r){r=d(r);this.GL!=r&&(this.GL=r,this.kc())};q.prototype.R5a=function(r){r=d(r);this.Io!=r&&(this.Io=r,this.Io!==void 0&&(this.fp=void 0),this.kc())};q.prototype.M5a=function(r){r=d(r);this.GG!=r&&(this.GG=r,this.GG!==void 0&&(this.ep=void 0),this.kc())};
q.prototype.s6a=function(r){r=m(r);this.fp!=r&&(this.fp=r,this.fp!==void 0&&(this.Io=void 0),this.kc())};q.prototype.o6a=function(r){r=m(r);this.ep!=r&&(this.ep=r,this.ep!==void 0&&(this.GG=void 0),this.kc())};q.prototype.i6a=function(r){r=d(r);this.Ey!=r&&(r!==void 0&&(this.G2=void 0),this.Ey=r,this.Ia&&this.Ia.yf(),this.kc())};q.prototype.J6a=function(r){r=d(r);this.Zs!=r&&(r!==void 0&&(this.I2=void 0),this.Zs=r,this.Ia&&this.Ia.yf(),this.kc())};q.prototype.u6a=function(r){r=d(r);this.WT!=r&&(r!==
void 0&&(this.H2=void 0),this.WT=r,this.Ia&&this.Ia.yf(),this.kc())};q.prototype.B5a=function(r){r=d(r);this.FQ!=r&&(r!==void 0&&(this.F2=void 0),this.FQ=r,this.Ia&&this.Ia.yf(),this.kc())};q.prototype.p6a=function(r){r=m(r);this.G2!=r&&(r!==void 0&&(this.Ey=void 0),this.G2=r,this.Ia&&this.Ia.yf(),this.kc())};q.prototype.r6a=function(r){r=m(r);this.I2!=r&&(r!==void 0&&(this.Zs=void 0),this.I2=r,this.Ia&&this.Ia.yf(),this.kc())};q.prototype.q6a=function(r){r=m(r);this.H2!=r&&(r!==void 0&&(this.WT=
void 0),this.H2=r,this.Ia&&this.Ia.yf(),this.kc())};q.prototype.n6a=function(r){r=m(r);this.F2!=r&&(r!==void 0&&(this.FQ=void 0),this.F2=r,this.Ia&&this.Ia.yf(),this.kc())};q.prototype.F5a=function(r){r=d(r);this.YB!=r&&(this.YB=r,this.Ia&&this.Ia.yf())};q.prototype.G5a=function(r){r=d(r);this.ZB!=r&&(this.ZB=r,this.Ia&&this.Ia.yf())};q.prototype.hw=function(){return isNaN(this.Io)?this.fn:this.Io};q.prototype.gw=function(){return isNaN(this.GG)?this.dn:this.GG};q.prototype.V_a=function(){return isNaN(this.hZa)?
this.Iya:this.hZa};q.prototype.dw=function(){return isNaN(this.JL)?this.oS:this.JL};q.prototype.iA=function(){return isNaN(this.IL)?this.nS:this.IL};q.prototype.w6=function(){return isNaN(this.HL)?1E4:this.HL};q.prototype.v6=function(){return isNaN(this.GL)?1E4:this.GL};q.prototype.lDa=function(r){r=f(r);this.u.paddingLeft!=r&&(this.u.paddingLeft=r,this.u.Bd=this.u.paddingLeft+this.u.Oe,this.kc(),this.tb())};q.prototype.mxa=function(){return this.u.paddingLeft};q.prototype.nDa=function(r){r=f(r);
this.u.paddingTop!=r&&(this.u.paddingTop=r,this.u.ee=this.u.paddingTop+this.u.Pe,this.kc(),this.tb())};q.prototype.oxa=function(){return this.u.paddingTop};q.prototype.mDa=function(r){r=f(r);this.u.paddingRight!=r&&(this.u.paddingRight=r,this.u.ze=this.u.paddingRight+this.u.vf,this.kc(),this.tb())};q.prototype.nxa=function(){return this.u.paddingRight};q.prototype.kDa=function(r){r=f(r);this.u.paddingBottom!=r&&(this.u.paddingBottom=r,this.u.Cf=this.u.paddingBottom+this.u.uf,this.kc(),this.tb())};
q.prototype.lxa=function(){return this.u.paddingBottom};q.prototype.hN=function(r){this.u.yw!=r&&(this.u.yw=r,this.tb())};q.prototype.d6a=function(r){this.u.Mc!=r&&(this.u.Mc=r,this.tb())};q.prototype.P6a=function(r){this.u.Nc!=r&&(this.u.Nc=r,this.tb())};q.prototype.cY=function(r){if(this.u.offsetX!=r){var t=this.u.offsetX==0!=(r==0);this.u.offsetX=r;this.tb();t&&this.Ia&&this.Ia.yf()}};q.prototype.yJa=function(){return this.u.offsetX};q.prototype.dY=function(r){if(this.u.offsetY!=r){var t=this.u.offsetY==
0!=(r==0);this.u.offsetY=r;this.tb();t&&this.Ia&&this.Ia.yf()}};q.prototype.zJa=function(){return this.u.offsetY};q.prototype.Xdb=function(){return this.u.offsetX!=0||this.u.offsetY!=0};q.prototype.Xn=function(r){this.u.opacity!=r&&(this.u.opacity=r,this.Iz(),this.tb())};q.prototype.ew=function(){return this.u.opacity};q.prototype.y5a=function(r){this.u.borderTopLeftRadius!=r&&(this.u.borderTopLeftRadius=r,this.tb())};q.prototype.z5a=function(r){this.u.borderTopRightRadius!=r&&(this.u.borderTopRightRadius=
r,this.tb())};q.prototype.q5a=function(r){this.u.borderBottomLeftRadius!=r&&(this.u.borderBottomLeftRadius=r,this.tb())};q.prototype.r5a=function(r){this.u.borderBottomRightRadius!=r&&(this.u.borderBottomRightRadius=r,this.tb())};q.prototype.u5a=function(r){this.u.Oe!=r&&(this.u.Oe=r,this.u.Bd=this.u.paddingLeft+this.u.Oe,this.kc(),this.tb())};q.prototype.A5a=function(r){this.u.Pe!=r&&(this.u.Pe=r,this.u.ee=this.u.paddingTop+this.u.Pe,this.kc(),this.tb())};q.prototype.w5a=function(r){this.u.vf!=r&&
(this.u.vf=r,this.u.ze=this.u.paddingRight+this.u.vf,this.kc(),this.tb())};q.prototype.s5a=function(r){this.u.uf!=r&&(this.u.uf=r,this.u.Cf=this.u.paddingBottom+this.u.uf,this.kc(),this.tb())};q.prototype.t5a=function(r){this.u.borderLeftColor!=r&&(this.u.borderLeftColor=r,this.tb())};q.prototype.x5a=function(r){this.u.borderTopColor!=r&&(this.u.borderTopColor=r,this.tb())};q.prototype.v5a=function(r){this.u.borderRightColor!=r&&(this.u.borderRightColor=r,this.tb())};q.prototype.p5a=function(r){this.u.borderBottomColor!=
r&&(this.u.borderBottomColor=r,this.tb())};q.prototype.I3=function(r){this.u.VA!=r&&(this.u.VA=r,this.tb())};q.prototype.A6a=function(r){this.u.bu!=r&&(this.u.bu=r,this.tb())};q.prototype.D6a=function(r){this.u.cu!=r&&(this.u.cu=r,this.tb())};q.prototype.y6a=function(r){this.u.bo!=r&&(this.u.bo=r,this.tb())};q.prototype.C6a=function(r){this.u.$J!=r&&(this.u.$J=r,this.tb())};q.prototype.B6a=function(r){this.u.Ow!=r&&(this.u.Ow=r,this.tb())};q.prototype.z6a=function(r){this.u.shadowColor!=r&&(this.u.shadowColor=
r,this.tb())};q.prototype.SCa=function(r){this.u.om!=r&&(this.u.om=r,this.tb())};q.prototype.RCa=function(r){this.u.backgroundColor!==r&&(this.u.backgroundColor=r,r===void 0?r=[]:Array.isArray(r)||(r=[r]),this.k5a(r))};q.prototype.k5a=function(r){this.u.wk!==r&&(this.u.wk=r,this.tb())};q.prototype.j5a=function(r){this.u.m5!==r&&(this.u.m5=r,this.tb())};q.prototype.i5a=function(r){this.u.BD!=r&&(this.u.BD=r,this.tb())};q.prototype.l5a=function(r){if(this.QZ!=r){this.QB&&(this.QB.h(n.ia,this.rua,this),
this.QB.cancel(),this.QB=null,this.u.Pv=null);if(this.QZ=r)this.QB=new c(g.Rsa),this.QB.bind(n.ia,this.rua,this,!1),this.QB.load(this.QZ);this.tb()}};q.prototype.rua=function(){this.u.Pv=this.QB.xg();this.tb()};q.prototype.jD=function(r){this.Si!=r&&(this.Si=r,this.VU())};q.prototype.VU=function(){var r=this.Fb&&this.Fb.Tca.VIa(this.Si)||"inherit";this.u.cursor!=r&&(this.u.cursor=r,this.tb())};q.prototype.G6a=function(r){this.u.tabIndex!==r&&(this.u.tabIndex=r,this.tb())};q.prototype.g5a=function(r){this.u.ariaLabel!=
r&&(this.u.ariaLabel=r,this.tb())};q.prototype.h5a=function(r){this.u.VN!=r&&(this.u.VN=r,this.tb())};q.prototype.TJ=function(r){this.u.rJ!=r&&(this.u.rJ=r,this.tb())};q.prototype.Oia=function(r){this.u.oX!=r&&(this.u.oX=r,this.tb())};q.prototype.Vr=function(){this.Iz();this.HW()};q.prototype.hp=function(){this.Iz()};q.prototype.lia=function(){};q.prototype.NR=function(){this.HW();this.Hf();this.kc();this.yf();this.tb()};q.prototype.Jy=function(){this.nS=this.oS=this.dn=this.fn=0;this.Iya=void 0};
q.prototype.HW=function(){var r=this.Vb();r&&r.eM.HW(this)};q.prototype.Hf=function(){var r=this.Vb();r&&r.eM.Hf(this)};q.prototype.kc=function(){var r=this.Vb();r&&r.eM.kc(this)};q.prototype.yf=function(){var r=this.Vb();r&&r.eM.yf(this)};q.prototype.tb=function(){var r=this.Vb();r&&r.eM.tb(this)};q.prototype.Eea=function(){var r=isNaN(this.G2)&&isNaN(this.Ey),t=isNaN(this.H2)&&isNaN(this.WT);return isNaN(this.Io)&&isNaN(this.fp)&&(r||t)?!0:!1};q.prototype.Hxa=function(){var r=isNaN(this.I2)&&isNaN(this.Zs),
t=isNaN(this.F2)&&isNaN(this.FQ);return isNaN(this.GG)&&isNaN(this.ep)&&(r||t)?!0:!1};q.prototype.l9a=function(){this.Jy();var r=this.V_a();if(r){var t=this.Eea(),u=this.Hxa();t&&!u?(t=this.Th(),t!=0&&(this.fn=t*r+this.u.Bd+this.u.ze,this.dn=t+this.u.ee+this.u.Cf)):!t&&u&&(t=this.Uh(),t!=0&&(this.dn=t/r+this.u.Bd+this.u.ze,this.fn=t+this.u.Bd+this.u.ze))}!isNaN(this.JL)&&this.fn<this.JL&&(this.fn=this.JL);!isNaN(this.HL)&&this.fn>this.HL&&(this.fn=this.HL);!isNaN(this.IL)&&this.dn<this.IL&&(this.dn=
this.IL);!isNaN(this.GL)&&this.dn>this.GL&&(this.dn=this.GL)};q.prototype.Ib=function(){};q.prototype.Zkb=function(){this.l9a();var r=this.hw(),t=this.gw(),u=this.dw(),v=this.iA();return r!=this.l2a||t!=this.k2a||u!=this.h2a||v!=this.g2a||this.fp!=this.j2a||this.ep!=this.i2a?(this.l2a=r,this.k2a=t,this.h2a=u,this.g2a=v,this.j2a=this.fp,this.i2a=this.ep,!0):!1};q.prototype.jb=function(){this.tb()};q.prototype.Lk=function(){};q.prototype.KOa=function(r,t,u,v){if(this.u.x!=r||this.u.y!=t||this.u.width!=
u||this.u.height!=v)this.u.x=r,this.u.y=t,this.u.width=u,this.u.height=v,this.yf(),this.tb(),this.m(new h(n.Zb))};q.prototype.ju=function(){!this.pfa&&this.Fb&&(this.pfa=!0,this.Fb.Ena()?this.WL():this.Fb.bind(n.Np,this.WL,this,!0))};q.prototype.WL=function(){this.m(n.INIT)};q.YG=0;return q}(k)});
define("tdv/view/core/UICustomizable","require exports tdv/constants/EventName tdv/events/Event tdv/view/constants/State tdv/view/core/UIBase".split(" "),function(a,l,k,n,g,h){return function(e){function b(){var c=e.call(this)||this;c.H0=!1;c.Ay=!1;c.G0=!1;c.B={};c.wwa=void 0;c.fz=void 0;c.aD={};c.twa=!0;c.NDa={};c.vYa();c.Ob();c.df("UICustomizable");c.Hf();c.set("inView",!1);c.set("toolTip",void 0);return c}O(b,e);b.prototype.vYa=function(){this.NDa[g.wc]=g.Nb};b.prototype.Ob=function(){this.Gl(b.bd)};
b.prototype.Gl=function(c){for(var d in c){var f=c[d],m=f&&f.length;m&&typeof f!="string"?m==1?this.j(d,f[0]):m==2?this.D(d,f[0],f[1]):m==3&&this.D(d,f[0],f[1],f[2]):this.j(d,f)}};b.prototype.j=function(c,d){this.B[c]={i:!0,d}};b.prototype.$_a=function(){var c=[],d;for(d in this.B)c.push(d);return c};b.prototype.hU=function(c){this.Ay!=c&&(this.Ay=c,this.gh())};b.prototype.iN=function(c){this.G0!=c&&(this.G0=c,this.gh())};b.prototype.rDa=function(c){this.H0!=c&&(this.H0=c,this.gh())};b.prototype.gh=
function(){this.Ay?this.jN(g.pa):this.G0&&this.H0?this.jN(g.wc):this.G0?this.jN(g.Nb):this.H0?this.jN(g.ga):this.jN(g.lf)};b.prototype.D=function(c,d,f,m){this.aD[d]||(this.aD[d]={});this.j(c,m);this.aD[d][f]=c};b.prototype.jN=function(c,d){d===void 0&&(d=!1);if(d)this.wwa=c;else if(this.wwa!=void 0)return;if(this.fz!=c){if(d=this.aD[this.fz])for(var f in d)(this.B[f]||(this.B[f]={})).i=!0;this.fz=c;if(d=this.aD[this.fz])for(f in d)(this.B[f]||(this.B[f]={})).i=!0;this.Hf()}};b.prototype.wa=function(c){if(typeof c===
"string")this.set(c,void 0);else{var d=c;for(c in d)this.set(c,d[c])}};b.prototype.set=function(c,d){var f=this.B[c];f?(d==void 0&&(d=f.d),this.get(c)!==d&&(c=="state"&&this.jN(d,!0),e.prototype.set.call(this,c,d),f.i=!0,this.Hf())):e.prototype.set.call(this,c,d)};b.prototype.get=function(c,d){switch(c){case "actualWidth":return this.gb();case "actualHeight":return this.Kb();default:var f=e.prototype.get.call(this,c);f===void 0&&((c=this.B[c])&&(f=c.d),f===void 0&&(f=d));return f}};b.prototype.xba=
function(c){for(var d=0;d<c.length;d++)if(this.S(c[d]))return!0;return!1};b.prototype.S=function(c){return(this.B[c]||{}).i?!0:this.fz!==void 0?(c=this.aD[this.fz][c],!!(this.B[c]||{}).i):!1};b.prototype.lD=function(c){(this.B[c]||(this.B[c]={})).i=!0;this.Hf()};b.prototype.$=function(c){(this.B[c]||(this.B[c]={})).i=!1;this.fz!=void 0&&(c=this.aD[this.fz][c])&&((this.B[c]||(this.B[c]={})).i=!1)};b.prototype.G=function(){for(var c=0;c<arguments.length;c++);var d;for(c=0;c<arguments.length;c++){for(var f=
arguments[c],m=this.fz;m;){if(d=this.aD[m][f])if(d=this.get(d),d!=void 0&&d!=null)return d;m=this.NDa[m]}d=this.get(f);if(d!=void 0&&d!=null)return d}};b.prototype.Zia=function(c){c.source.h(k.Sb,this.Zia,this);this.m(new n(k.nQ))};b.prototype.Qea=function(c){c.source.h(k.Sb,this.Qea,this);this.m(new n(k.EK))};b.prototype.Kx=function(){return this.get("ariaLabel")||this.get("toolTip")};b.prototype.jb=function(){if(this.twa)this.twa=!1;else if(this.S("visible")){var c=this.G("visible"),d=this.get(c?
"hideEffect":"showEffect");d&&d.MO(this)&&(d.h(k.Sb,c?this.Qea:this.Zia,this),d.end());(d=this.get(c?"showEffect":"hideEffect"))?d.MO(this)||(this.$("visible"),d.bind(k.Sb,c?this.Zia:this.Qea,this),d.play(this)):this.m(new n(c?k.nQ:k.EK))}this.S("visible")&&(this.gg(this.G("visible")),this.$("visible"));this.S("includeInLayout")&&(this.f6a(this.G("includeInLayout")),this.$("includeInLayout"));this.S("left")&&(d=this.G("left"),c=b.wp(d),d=c===void 0?d:void 0,this.p6a(c),this.i6a(d),this.$("left"));
this.S("top")&&(d=this.G("top"),c=b.wp(d),d=c===void 0?d:void 0,this.r6a(c),this.J6a(d),this.$("top"));this.S("right")&&(d=this.G("right"),c=b.wp(d),d=c===void 0?d:void 0,this.q6a(c),this.u6a(d),this.$("right"));this.S("bottom")&&(d=this.G("bottom"),c=b.wp(d),d=c===void 0?d:void 0,this.n6a(c),this.B5a(d),this.$("bottom"));this.S("centerX")&&(this.F5a(this.G("centerX")),this.$("centerX"));this.S("centerY")&&(this.G5a(this.G("centerY")),this.$("centerY"));this.S("width")&&(d=this.G("width"),c=b.wp(d),
d=c===void 0?d:void 0,this.s6a(c),this.R5a(d),this.$("width"));this.S("height")&&(d=this.G("height"),c=b.wp(d),d=c===void 0?d:void 0,this.o6a(c),this.M5a(d),this.$("height"));this.S("minWidth")&&(d=this.G("minWidth"),this.Q5a(d),this.$("minWidth"));this.S("minHeight")&&(d=this.G("minHeight"),this.P5a(d),this.$("minHeight"));this.S("maxWidth")&&(d=this.G("maxWidth"),this.O5a(d),this.$("maxWidth"));this.S("maxHeight")&&(d=this.G("maxHeight"),this.N5a(d),this.$("maxHeight"));this.S("paddingLeft")&&(this.lDa(this.G("paddingLeft")),
this.$("paddingLeft"));this.S("paddingTop")&&(this.nDa(this.G("paddingTop")),this.$("paddingTop"));this.S("paddingRight")&&(this.mDa(this.G("paddingRight")),this.$("paddingRight"));this.S("paddingBottom")&&(this.kDa(this.G("paddingBottom")),this.$("paddingBottom"));c=!1;this.S("borderRadius")&&(this.$("borderRadius"),c=!0);d=!1;this.S("borderLeftRadius")&&(this.$("borderLeftRadius"),d=!0);var f=!1;this.S("borderTopRadius")&&(this.$("borderTopRadius"),f=!0);var m=!1;this.S("borderRightRadius")&&(this.$("borderRightRadius"),
m=!0);var p=!1;this.S("borderBottomRadius")&&(this.$("borderBottomRadius"),p=!0);if(this.S("borderTopLeftRadius")||f||d||c)this.y5a(this.G("borderTopLeftRadius","borderLeftRadius","borderTopRadius","borderRadius")),this.$("borderTopLeftRadius");if(this.S("borderTopRightRadius")||f||m||c)this.z5a(this.G("borderTopRightRadius","borderRightRadius","borderTopRadius","borderRadius")),this.$("borderTopRightRadius");if(this.S("borderBottomLeftRadius")||p||d||c)this.q5a(this.G("borderBottomLeftRadius","borderLeftRadius",
"borderBottomRadius","borderRadius")),this.$("borderBottomLeftRadius");if(this.S("borderBottomRightRadius")||p||m||c)this.r5a(this.G("borderBottomRightRadius","borderRightRadius","borderBottomRadius","borderRadius")),this.$("borderBottomRightRadius");c=!1;this.S("borderSize")&&(this.$("borderSize"),c=!0);if(this.S("borderLeftSize")||c)this.u5a(this.G("borderLeftSize","borderSize")),this.$("borderLeftSize");if(this.S("borderTopSize")||c)this.A5a(this.G("borderTopSize","borderSize")),this.$("borderTopSize");
if(this.S("borderRightSize")||c)this.w5a(this.G("borderRightSize","borderSize")),this.$("borderRightSize");if(this.S("borderBottomSize")||c)this.s5a(this.G("borderBottomSize","borderSize")),this.$("borderBottomSize");c=!1;this.S("borderColor")&&(this.$("borderColor"),c=!0);if(this.S("borderLeftColor")||c)this.t5a(this.G("borderLeftColor","borderColor")),this.$("borderLeftColor");if(this.S("borderTopColor")||c)this.x5a(this.G("borderTopColor","borderColor")),this.$("borderTopColor");if(this.S("borderRightColor")||
c)this.v5a(this.G("borderRightColor","borderColor")),this.$("borderRightColor");if(this.S("borderBottomColor")||c)this.p5a(this.G("borderBottomColor","borderColor")),this.$("borderBottomColor");this.S("shadow")&&(this.I3(this.G("shadow")),this.$("shadow"));this.S("shadowHorizontalLength")&&(this.A6a(this.G("shadowHorizontalLength")),this.$("shadowHorizontalLength"));this.S("shadowVerticalLength")&&(this.D6a(this.G("shadowVerticalLength")),this.$("shadowVerticalLength"));this.S("shadowBlurRadius")&&
(this.y6a(this.G("shadowBlurRadius")),this.$("shadowBlurRadius"));this.S("shadowSpread")&&(this.C6a(this.G("shadowSpread")),this.$("shadowSpread"));this.S("shadowColor")&&(this.z6a(this.G("shadowColor")),this.$("shadowColor"));this.S("tabIndex")&&(this.G6a(this.G("tabIndex")),this.$("tabIndex"));c=!1;this.S("opacity")&&(this.Xn(this.G("opacity")),this.$("opacity"),c=!0);if(this.S("shadowOpacity")||c)this.B6a(this.G("shadowOpacity","opacity")),this.$("shadowOpacity");this.S("backgroundOpacity")&&(this.SCa(this.G("backgroundOpacity")),
this.$("backgroundOpacity"));this.S("backgroundColor")&&(this.RCa(this.G("backgroundColor")),this.$("backgroundColor"));this.S("backgroundColorRatios")&&(this.j5a(this.G("backgroundColorRatios")),this.$("backgroundColorRatios"));this.S("backgroundColorDirection")&&(this.i5a(this.G("backgroundColorDirection")),this.$("backgroundColorDirection"));this.S("backgroundImageUrl")&&(this.l5a(this.G("backgroundImageUrl")),this.$("backgroundImageUrl"));this.S("ariaRole")&&(this.h5a(this.G("ariaRole")),this.$("ariaRole"));
this.g5a(this.Kx());e.prototype.jb.call(this)};b.wp=function(c){if(typeof c==="string"&&(c=c.match(/^\s*([+-]?\d+\.?\d*)\s*%\s*$/))&&c.length>=2)return parseFloat(c[1])};b.bd={ariaLabel:void 0,ariaRole:void 0,visible:!0,includeInLayout:!0,state:void 0,left:void 0,right:void 0,top:void 0,bottom:void 0,centerX:void 0,centerY:void 0,width:void 0,height:void 0,minWidth:void 0,minHeight:void 0,maxWidth:void 0,maxHeight:void 0,actualWidth:void 0,actualHeight:void 0,paddingLeft:0,paddingTop:0,paddingRight:0,
paddingBottom:0,opacity:1,borderRadius:0,borderTopRadius:void 0,borderBottomRadius:void 0,borderLeftRadius:void 0,borderRightRadius:void 0,borderTopLeftRadius:void 0,borderTopRightRadius:void 0,borderBottomLeftRadius:void 0,borderBottomRightRadius:void 0,borderSize:0,borderLeftSize:void 0,borderTopSize:void 0,borderRightSize:void 0,borderBottomSize:void 0,borderColor:void 0,borderLeftColor:void 0,borderTopColor:void 0,borderRightColor:void 0,borderBottomColor:void 0,shadow:!1,shadowHorizontalLength:0,
shadowVerticalLength:3,shadowBlurRadius:6,shadowSpread:0,shadowColor:"#000000",shadowOpacity:void 0,tabIndex:void 0,backgroundOpacity:1,backgroundColor:void 0,backgroundColorRatios:void 0,backgroundColorDirection:void 0,backgroundImageUrl:void 0,hideEffect:void 0,showEffect:void 0};return b}(h)});
define("tdv/view/core/UIComponent",["require","exports","tdv/constants/EventName","tdv/view/constants/State","tdv/view/core/UICustomizable"],function(a,l,k,n,g){return function(h){function e(){var b=h.call(this)||this;b.df("UIComponent");b.set("propagateClick",!0);return b}O(e,h);e.prototype.Ob=function(){this.Gl(e.bd)};e.prototype.qua=function(){this.rDa(!0)};e.prototype.pua=function(){this.rDa(!1)};e.prototype.nua=function(){this.iN(!0)};e.prototype.oua=function(){this.iN(!1)};e.prototype.NR=function(){this.lD("interactionEnabled");
h.prototype.NR.call(this)};e.prototype.jb=function(){this.S("autoRolledOver")&&(this.h(k.tc,this.qua,this),this.h(k.Eb,this.pua,this),this.G("autoRolledOver")&&(this.bind(k.tc,this.qua,this,!1),this.bind(k.Eb,this.pua,this,!1)),this.$("autoRolledOver"));this.S("autoPressed")&&(this.h(k.Ra,this.nua,this),this.h(k.ab,this.oua,this),this.G("autoPressed")&&(this.bind(k.Ra,this.nua,this,!1),this.bind(k.ab,this.oua,this,!1)),this.$("autoPressed"));var b=!1;this.S("contentOpaque")&&(b=!0,this.$("contentOpaque"));
this.S("inheritedInteractionEnabled")&&(b=!0,this.$("inheritedInteractionEnabled"));this.S("interactionEnabled")&&(b=!0,this.$("interactionEnabled"));if(this.S("backgroundOpacity")||this.S("backgroundColor")||this.S("inView"))b=!0;this.S("inView")&&(b=!0);g.prototype.jb.call(this);if(b){var c=!!(this.u.om>0&&this.u.wk.length>0),d=this.G("contentOpaque"),f=this.G("inheritedInteractionEnabled"),m=this.G("interactionEnabled"),p=this.G("inView");this.bI(f&&m&&(d||c)&&p)}if(b||this.S("cursor")||this.S("inheritedCursor"))this.$("cursor"),
this.$("inheritedCursor"),this.XL.nJa()?this.jD(this.G("cursor")):this.jD(this.G("inheritedCursor"))};e.prototype.ju=function(){this.S4.update(this.u);h.prototype.ju.call(this)};e.prototype.bI=function(b){this.XL.aPa(b)};e.prototype.log=function(b){if(b){b=[];for(var c=this;c;)b.push(c),c=c.getParent();console.log(b.map(function(d){return d.Yr}))}else console.log(this.Yr)};e.bd=Object.assign({},g.bd,{autoRolledOver:!1,autoPressed:!1,contentOpaque:!0,cursor:void 0,inView:void 0,inheritedCursor:void 0,
inheritedInteractionEnabled:!0,interactionEnabled:!0,rollOverOpacity:[n.ga,"opacity"],rollOverShadow:[n.ga,"shadow"],toolTipFollowMouse:!1});return e}(g)});
define("tdv/view/effects/Effect","require tdv/utils tdv/binding/Bindable tdv/constants/EventName tdv/events/Event tdv/view/util/Animation tdv/view/util/Ease tdv/view/util/EaseDimension".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/binding/Bindable");a("tdv/constants/EventName");var n=a("tdv/events/Event"),g=a("tdv/view/util/Animation"),h=a("tdv/view/util/Ease"),e=a("tdv/view/util/EaseDimension"),b={},c=l.extend(k,function(){k.call(this);this.H="stopped";this.$b=void 0;this.Gq=[];this.set("easing",
"linear");this.set("duration",1E3);this.set("loop",!1);this.set("animationDirection","normal")});c.prototype.play=function(d){d||(d=b);this.MO(d)||(this.H=="stopped"||this.Gq.indexOf(d)<0?(this.H="playing",this.Gq.push(d),this.$g=0,this.$b=Math.max(this.get("duration",1E3),1),this.Zg=new h(this.get("easing","linear"),[new e("pos",0,1)],this.$b),this.Zg.setTime(this.$g),this.mN(),this.qz(),this.GT()):this.H="playing")};c.prototype.reverse=function(d){d||(d=b);this.Xeb(d)||(this.H=="stopped"||this.Gq.indexOf(d)<
0?(this.H="playingReverse",this.Gq.push(d),this.$g=this.$b=Math.max(this.get("duration",1E3),0),this.Zg=new h(this.get("easing","linear"),[new e("pos",0,1)],this.$b),this.Zg.setTime(this.$g),this.mN(),this.qz(),this.GT()):this.H="playingReverse")};c.prototype.stop=function(){this.H!="stopped"&&(this.H="stopped",this.$g!==0&&(this.$g=0,this.Zg.setTime(this.$g),this.qz(),this.GT()))};c.prototype.end=function(){this.H!="stopped"&&(this.$g=this.$b,this.Zg.setTime(this.$g),this.qz(),this.GT())};c.prototype.cancel=
function(){this.H="stopped";this.$g=0;this.Gq=[]};c.prototype.MO=function(d){return this.H=="playing"&&this.Gq.indexOf(d)>=0};c.prototype.Xeb=function(d){return this.H=="playingReverse"&&this.Gq.indexOf(d)>=0};c.prototype.iq=function(d){this.H!="stopped"&&(this.$g=this.H=="playing"?Math.min(this.$b,this.$g+d):Math.max(0,this.$g-d),this.Zg.setTime(this.$g),this.qz(),this.GT())};c.prototype.wm=function(){return this.Zg&&this.Zg.nb("pos")||0};c.prototype.mC=function(d){if(this.Gq)for(var f=0;f<this.Gq.length;f++)d.call(this,
this.Gq[f],f)};c.prototype.mN=function(){this.m(new n(this.H=="playingReverse"?c.wSa:c.ySa))};c.prototype.qz=function(){this.m(new n(c.D$))};c.prototype.kN=function(){this.m(new n(c.Al))};c.prototype.lN=function(){this.m(new n(c.jx))};c.prototype.GT=function(){this.H=="playingReverse"&&this.$g<=0?(this.$g=0,this.lN(),this.Gq=[],this.H!="stopped"&&(this.H="stopped",this.get("loop")&&this.play())):this.H=="playing"&&this.$g>=this.$b?(this.$g=this.$b,this.kN(),this.Gq=[],this.H!="stopped"&&(this.H="stopped",
this.get("animationDirection")=="alternate"?this.reverse():this.get("loop")&&this.play())):this.H!="stopped"&&g.requestFrame(this.iq,this)};c.ySa="start";c.D$="frame";c.Al="end";c.wSa="reverseStart";c.jx="reverseEnd";return c});
define("tdv/view/effects/FadeEffect",["require","tdv/utils","tdv/view/effects/Effect"],function(a){var l=a("tdv/utils"),k=a("tdv/view/effects/Effect");a=l.extend(k,function(){k.call(this);this.qba=this.oba=null});a.prototype.mN=function(){k.prototype.mN.call(this);this.oba=[];this.qba=[];this.mC(function(n){this.oba.push(this.get("alphaFrom",n.ew()));this.qba.push(this.get("alphaTo",n.ew()))});this.d3()};a.prototype.qz=function(){k.prototype.qz.call(this);this.d3()};a.prototype.d3=function(){this.mC(function(n,
g){var h=this.oba[g];g=h+(this.qba[g]-h)*this.wm();!(n.ew()>0&&n.u.visible)&&g>0?(n.Xn(0),n.gg(!0),n.Xn(g)):g==0?(n.gg(!1),n.Xn(1)):n.Xn(g)})};a.prototype.kN=function(){this.d3();k.prototype.kN.call(this)};a.prototype.lN=function(){this.d3();k.prototype.lN.call(this)};return a});
define("tdv/view/effects/FadeInEffect",["require","tdv/utils","tdv/view/effects/FadeEffect"],function(a){var l=a("tdv/utils"),k=a("tdv/view/effects/FadeEffect");return l.extend(k,function(){k.call(this);this.set("alphaFrom",0);this.set("alphaTo",1)})});define("tdv/view/effects/FadeOutEffect",["require","tdv/utils","tdv/view/effects/FadeEffect"],function(a){var l=a("tdv/utils"),k=a("tdv/view/effects/FadeEffect");return l.extend(k,function(){k.call(this);this.set("alphaFrom",1);this.set("alphaTo",0)})});
define("tdv/player/view/UserInteractionWindow","require exports tdv/view/util/Assets tdv/constants/EventName tdv/player/view/util/Device tdv/view/core/UIComponent tdv/view/effects/FadeInEffect tdv/view/effects/FadeOutEffect".split(" "),function(a,l,k,n,g,h,e,b){a=function(q){function r(){var t=q.call(this)||this;t.df("UserInteractionWindow");t.Cc=null;t.rv=[];var u=new e;u.set("duration",500);u.set("easing","cubic_in");var v=new b;v.set("duration",500);v.set("easing","cubic_out");t.wa({contentOpaque:!0,
left:0,top:0,right:0,bottom:0,hideEffect:v,showEffect:u,visible:!1});t.bind(n.Zb,t.Jka,t,!0);t.bind(n.la,t.H9a,t,!0);return t}O(r,q);r.prototype.Jka=function(){this.Cc&&this.Cc.setSize(this.Uh(),this.Th())};r.prototype.H9a=function(){var t=this.rv.slice();this.rv=[];this.H4();t.forEach(function(u){u.Rq.call(u.context)})};r.prototype.Ib=function(){q.prototype.Ib.call(this);if(!this.Cc){this.Cc=new p;this.Cc.setSize(this.Uh(),this.Th());this.Cc.gg(!0);var t=this.Cc.bc();t.style.position="absolute";
t.style.left="0";t.style.top="0";t.style.right="0";t.style.bottom="0";t.style.overflow="hidden";this.va().vk(t);this.H4()}};r.prototype.Vr=function(){q.prototype.Vr.call(this);this.getParent().bind(n.Zb,this.Jka,this,!0);r.WUa(this)};r.prototype.hp=function(){this.getParent().h(n.Zb,this.Jka,this,!0);q.prototype.hp.call(this);r.x4a(this)};r.prototype.ghb=function(t){this.eD(f,t)};r.prototype.BX=function(t){this.eD(d,t)};r.prototype.eD=function(t,u){this.rv.push(new c(t,u));this.rv.sort(function(v,
w){return m[v.reason]-m[w.reason]});this.H4()};r.prototype.eab=function(t){this.cancel(f,t)};r.prototype.cab=function(){var t;t===void 0&&(t=void 0);this.cancel(d,t)};r.prototype.cancel=function(t,u){t=this.c0a(t,u);t>=0&&this.I4a(t)};r.prototype.c0a=function(t,u){for(var v=0;v<this.rv.length;v++){var w=this.rv[v];if(w.reason==t&&w.Rq==u)return v}return-1};r.prototype.H4=function(){if(this.Cc){var t=this.o0a();if(t){switch(t.reason){case d:this.Cc.Fpa(p.Rra);break;case f:this.Cc.Fpa(p.jaa)}this.set("visible",
!0)}else this.set("visible",!1)}};r.prototype.I4a=function(t){this.rv.splice(t,1);t==this.rv.length&&this.H4()};r.prototype.o0a=function(){return this.rv.length>0?this.rv[0]:null};r.WUa=function(t){r.xd.push(t);r.oha.forEach(function(u){r.Xxa(t,u)});r.oha=[]};r.x4a=function(t){r.xd.splice(r.xd.indexOf(t),1)};r.ready=function(){return r.xd.length>0};r.BX=function(t){r.xd.length?r.xd.forEach(function(u){r.Xxa(u,t)}):r.oha.push(t)};r.Xxa=function(t,u){t.BX(function(){r.xd.forEach(function(v){v!=t&&v.cab()});
u()})};r.xd=[];r.oha=[];return r}(h);var c=function(){return function(q,r){this.reason=q;this.Rq=r;this.context=this}}(),d="vr",f="play",m={};m[d]=0;m[f]=1;var p=function(){function q(){this.Kd=!1;this.EU=null;this.Ha=this.Pa=100;this.Vea=this.Aj=void 0;this.Wea=100;this.oa=document.createElement("div");this.oa.style.opacity="0";this.oa.style.display="none";this.oa.style.transition="opacity 0.3s";this.oa.addEventListener("transitionend",this.Gja.bind(this,!1));this.Yd=document.createElement("div");
this.IOa(!0);this.Yd.style.position="absolute";this.Yd.style.left="0";this.Yd.style.top="0";this.Yd.style.right="0";this.Yd.style.bottom="0";this.oa.appendChild(this.Yd);this.Gd=document.createElement("img");this.Gd.style.cursor="pointer";this.Gd.style.position="absolute";this.Gd.style.left="50%";this.Gd.style.top="50%";this.Gd.style.transform="translate(-50%, -50%)";this.oa.appendChild(this.Gd)}q.prototype.bc=function(){return this.oa};q.prototype.setSize=function(r,t){if(this.Pa!==r||this.Ha!==
t)this.Pa=r,this.Ha=t,this.qFa()};q.prototype.IOa=function(r){this.Yd.style.backdropFilter=r?"blur(8px)":"none"};q.prototype.gg=function(r){this.Kd!=r&&(this.Kd=r,this.EU&&(clearTimeout(this.EU),this.EU=null),this.Kd?(this.oa.style.display="block",this.oa.style.opacity="0",this.EU=setTimeout(function(){this.EU=null;this.oa.style.opacity="1"}.bind(this),30)):this.oa.style.opacity="0")};q.prototype.Fpa=function(r){this.Aj!=r&&(this.Aj=r,this.S8a())};q.prototype.Gja=function(){this.Kd||(this.oa.style.display=
"none")};q.prototype.S8a=function(){switch(this.Aj){case q.jaa:this.Vea=k.tx;this.Wea=k.NK;break;case q.Rra:this.Vea=k.Sr,this.Wea=k.eUa}this.Gd.src=this.Vea||"";this.qFa()};q.prototype.qFa=function(){g.ub()?(this.Gd.style.maxWidth=Math.round(this.Pa*.5)+"px",this.Gd.style.width="20vmin"):(this.Gd.style.maxWidth=Math.round(this.Pa*.33)+"px",this.Gd.style.width=this.Wea+"px")};q.jaa="play";q.Rra="vr";return q}();a.Csa=p;return a});
define("tdv/player/view/util/xr/Hash",["require","exports"],function(){return function(){function a(){}a.addParameter=function(l){this.removeParameter(l);var k=this.toArray();k.push(l);this.CQa(k)};a.removeParameter=function(l){var k=this.toArray().filter(function(n){return n!=l});this.CQa(k)};a.toArray=function(){var l=window.location.hash.substring(1);return l.length?l.split("&"):[]};a.CQa=function(l){window.location.hash="#"+(l.length?l.join("&"):"")};return a}()});
define("tdv/player/view/util/xr/VRPreconditionsChecker","require exports tdv/player/view/util/Device tdv/player/view/util/Gyroscope tdv/player/view/util/InfoWindow tdv/view/util/Fullscreen tdv/view/util/UserInitiatedAction tdv/player/view/UserInteractionWindow tdv/player/view/util/xr/Hash tdv/player/view/util/xr/pointer/SelectionMode tdv/player/view/util/xr/SessionMode tdv/player/view/util/URL".split(" "),function(a,l,k,n,g,h,e,b,c,d,f,m){var p=!1;e.wait(function(){setTimeout(function(){p=!0},10)});
return function(){function q(){}q.UA=function(r,t){this.mIa(r,t)};q.mIa=function(r,t){function u(){w.mIa(r,t)}function v(){w.sjb(r,t)}var w=this;this.XR.NO?n.disabled?g.Pra.show(function(){n.ipa(u)}):h.enabled()||!e.b7()?(h.tm(),b.BX(u)):v():this.XR.G8?v():k.XD()?v():k.Dc()==k.Yw||k.Dc()==k.Zw?p?v():e.b7()?setTimeout(v,10):b.BX(function(){setTimeout(v,10)}):e.b7()?v():b.BX(v)};q.sjb=function(r,t){function u(){v.vhb(r,t)}var v=this;k.Dc()==k.vK?(c.removeParameter("vr"),g.ZRa.show(u,function(){c.addParameter("vr")}.bind(this))):
k.Dc()==k.uK?g.hta.show(u):k.Dc()==k.QY?g.hta.show():r==f.tr&&k.ub()&&!k.gf()?g.oaa.show(u):u()};q.vhb=function(r,t){function u(){w.XR.spa=d.JSa;t()}function v(){w.XR.spa=d.BF;t()}var w=this;r==f.tr?u():!k.ub()||k.gf()?v():m.getQueryParameter("cardboard_version")=="1"?v():m.getQueryParameter("cardboard_version")=="2"?u():g.n$.show(u,v)};return q}()});
define("tdv/view/util/FullWindow",["require","exports","tdv/view/util/Fullscreen"],function(a,l,k){function n(){d==document.body&&(h.style.height=window.innerHeight+"px")}function g(p,q){var r={},t=p.style,u;for(u in q)r[u]=t[u];f.push({el:p,css:r});for(u in q)t[u]=q[u]}var h=document.createElement("div");h.style.position="fixed";h.style.bottom="0";h.style.left="0";h.style.height="100vh";h.style.width="100vw";var e=document.createElement("div"),b=null,c=null,d=null,f=[],m=null;return function(){function p(q){this.oa=
q}p.prototype.rt=function(){this.enabled()||this.toggle()};p.prototype.tm=function(){this.enabled()&&this.toggle()};p.prototype.toggle=function(){this.enabled()?p.cancel():p.request(this.oa)};p.prototype.enabled=function(){return p.enabled(this.oa)};p.request=function(q){if(q!==b){p.cancel();b=q;d=k.fullscreenElement()||document.body;c=q;c.parentElement.insertBefore(e,c);h.appendChild(c);for(q=0;q<d.children.length;q++)g(d.children[q],{visibility:"hidden"});g(c,{position:"absolute",left:0,top:0,width:"100%",
height:"100%"});d==document.body?g(h,{position:"fixed",left:0,top:"",right:"",bottom:0,height:"100vh",width:"100vw",margin:0,padding:0}):g(h,{position:"absolute",left:0,top:0,right:"",bottom:"",width:"100%",height:"100%",margin:0,padding:0});d.appendChild(h);n();m=setInterval(n,300)}};p.cancel=function(){if(b){h.parentElement.removeChild(h);e.parentElement.insertBefore(c,e);for(e.parentElement.removeChild(e);f.length;){var q=f.pop(),r=q.el.style;q=q.css;for(var t in q)r[t]=q[t]}d=c=b=null;f=[];clearInterval(m)}};
p.enabled=function(q){return b==q};return p}()});
define("tdv/view/util/IOSFullscreen","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/l10n tdv/view/util/Assets".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),h=a("tdv/player/l10n");a=a("tdv/view/util/Assets");var e=['<div style="position: absolute; top: 5vmin; right:5vmin;">','<img style="width:24vmin" src="'+a.ko+'"/>','</div>\n<div style="box-sizing:border-box; padding:0 10vmin; display:table; height:100%; width:100vw;">\n<div style="vertical-align:middle; text-align:center; display:table-cell;">'].join("\n"),
b=e+['<img style="width:22vmin" src="'+a.vZ+'"/>','<div style="color:#000; font-family:Arial, Helvetica, sans-serif; font-size:3.6vmin; line-height:4.3vmin; margin:5vmin 0; text-align:center;">'+h("rotate-device")+"</div>"].join("\n")+"</div>\n</div>",c=e+['<img style="width:13vmin; vertical-align:middle;" src="'+a.UTa+'"/>','<div style="color:#000; font-family:Arial, Helvetica, sans-serif; font-size:3.6vmin; line-height:4.3vmin; text-align:left; display:inline-block; vertical-align:middle; margin:5vmin 0 0 2vmin;">Please, swipe up to<br>enter Fullscreen Mode</div>'].join("\n")+
"</div>\n</div>";l=l.extend(g,function(){g.call(this);this.Gs=this.eC=this.gC=this.eS=this.fS=this.Kfa=this.Lfa=void 0;this.w0=!1;this.gD=this.Dha=this.Jfa=this.Oc=null;this.zwa=[];this.WL=this.Rs=!1;this.kd=this.kd.bind(this)});l.prototype.request=function(){this.Rs||(this.Rs=!0,this.NXa(),window.addEventListener("resize",this.kd),document.body.appendChild(this.Oc),document.body.appendChild(this.gD),this.A7a=document.documentElement.style.overflow,this.z7a=document.body.style.overflow,document.documentElement.style.overflow=
"auto",document.body.style.overflow="auto",this.mT())};l.prototype.cancel=function(){this.Rs&&(this.Rs=!1,window.removeEventListener("resize",this.kd),document.body.style.overflow=this.z7a,document.documentElement.style.overflow=this.A7a,document.body.removeChild(this.Oc),document.body.removeChild(this.gD),this.bDa(!1))};l.prototype.enabled=function(){return this.w0};l.prototype.NXa=function(){this.Oc||(this.Oc=this.s_({position:"fixed",top:0,left:0,zIndex:9999998},!0),this.Oc.id="tdvminuictr",this.Dha=
this.s_({position:"fixed",backgroundColor:"#fff",top:0,left:0,textAlign:"center"},!0,b),this.Oc.appendChild(this.Dha),this.Jfa=this.s_({position:"fixed",backgroundColor:"#fff",top:0,left:0,textAlign:"center"},!0,c),this.Oc.appendChild(this.Jfa),this.gD=this.s_({position:"absolute",top:0,left:0,right:0,height:"999999999vmax",zIndex:9999999},!1),this.gD.id="tdvminuiscrl",this.gD.addEventListener("touchend",this.kd))};l.prototype.s_=function(d,f,m){var p=document.createElement("div");this.bU(p,d);m!==
void 0&&this.b6a(p,m);f&&this.zwa.push(p);return p};l.prototype.kd=function(){[0,250,1E3,2E3].forEach(function(d){setTimeout(this.lT.bind(this),d)}.bind(this))};l.prototype.lT=function(){this.gC==window.innerWidth&&this.eC==window.innerHeight||this.mT()};l.prototype.mT=function(){this.gC=window.innerWidth;this.eC=window.innerHeight;this.Gs=this.gC>this.eC?"landscape":"portrait";if(this.Gs=="landscape"){this.Lfa&&this.Kfa&&this.A1a(this.Lfa,this.Kfa)&&(!this.fS&&!this.eS||this.B1a(this.fS,this.eS))&&
(this.fS=this.gC,this.eS=this.eC);this.u1a()&&(this.fS=this.gC,this.eS=this.eC);this.Lfa=this.gC;this.Kfa=this.eC;var d=this.fS==this.gC&&this.eS==this.eC}else d=!1;this.zwa.forEach(function(q){q.style.height=this.eC+"px";q.style.width=this.gC+"px"}.bind(this));var f=this.Rs&&this.Gs=="portrait",m=this.Rs&&this.Gs=="landscape"&&!d,p=this.Rs&&this.Gs=="landscape";this.bU(this.Oc,{display:f||m?"block":"none"});this.bU(this.Dha,{display:f?"block":"none"});this.bU(this.Jfa,{display:m?"block":"none"});
this.bU(this.gD,{display:p?"block":"none",right:m?0:"99.9%"});this.bDa(d)};l.prototype.bDa=function(d){this.B3!=null&&(clearTimeout(this.B3),this.B3=null);this.w0!=d&&(this.B3=setTimeout(function(){this.B3=null;(this.w0=d)?this.m(new n(k.vr)):this.m(new n(k.Sb));this.m(new n(k.V))}.bind(this),d?1E3:0))};l.prototype.u1a=function(){var d=window.innerWidth,f=window.innerHeight,m=Infinity;[[480,320],[960,640],[1136,640],[1334,750],[1920,1080],[2001,1125],[2048,1536],[2172,1125],[2208,1242],[2732,2048],
[2436,1125]].forEach(function(p){m=Math.min(m,Math.abs(100-d*p[1]*100/(f*p[0])))});return m<=1?!0:!1};l.prototype.A1a=function(d,f){return d*window.innerHeight>f*window.innerWidth};l.prototype.B1a=function(d,f){return d*window.innerHeight>=f*window.innerWidth};l.prototype.bU=function(d,f){for(var m in f)d.style[m]=f[m]};l.prototype.b6a=function(d,f){d.innerHTML=f};return new l});
define("tdv/view/util/KeepAwake",["require","exports"],function(){return function(){function a(){}a.enable=function(){this.wakeLock===null&&navigator.wakeLock&&navigator.wakeLock.request("screen").then(function(l){this.wakeLock=l}.bind(this))};a.disable=function(){this.wakeLock!==null&&(this.wakeLock.release(),this.wakeLock=null)};a.wakeLock=null;return a}()});
define("tdv/view/util/LandscapeAnimation",["require","exports","tdv/player/l10n","tdv/view/util/Assets"],function(a,l,k,n){return new (function(){function g(){this.container=null;this.enabled=!1;this.kd=this.kd.bind(this);this.lT=this.lT.bind(this)}g.prototype.Ux=function(){this.container||(this.container=document.createElement("div"),this.container.style.position="fixed",this.container.style.zIndex="1000000",this.container.style.left="0",this.container.style.top="0",this.container.style.margin="0",
this.container.style.padding="0",this.container.style.height="100%",this.container.style.width="100%",this.container.style.backgroundColor="rgba(255, 255, 255, 0.99)",this.container.innerHTML=['<div style="position: absolute; top: 5vmin; right:5vmin;">','<img style="width:24vmin" src="'+n.CARDBOARD+'"/>','</div>\n<div style="box-sizing:border-box; padding:0 10vmin; display:table; height:100%; width:100vw;">\n<div style="vertical-align:middle; text-align:center; display:table-cell;">','<img style="width:22vmin" src="'+
n.ROTATE+'"/>','<div style="color:#000; font-family:Arial, Helvetica, sans-serif; font-size:3.6vmin; line-height:4.3vmin; margin:5vmin 0; text-align:center;">'+k("rotate-device")+"</div>","</div>\n</div>"].join("\n"))};g.prototype.show=function(h){this.enabled||(this.enabled=!0,this.Ux(),h.appendChild(this.container),window.addEventListener("resize",this.kd),this.mT())};g.prototype.Qe=function(){this.enabled&&(this.enabled=!1,window.removeEventListener("resize",this.kd),this.container.parentElement.removeChild(this.container))};
g.prototype.kd=function(){[0,250,1E3,2E3].forEach(function(h){setTimeout(this.lT,h)}.bind(this))};g.prototype.lT=function(){this.SHa==window.innerWidth&&this.RHa==window.innerHeight||this.mT()};g.prototype.mT=function(){this.SHa=window.innerWidth;this.RHa=window.innerHeight;this.orientation=this.SHa>this.RHa?"landscape":"portrait";this.container.style.display=this.orientation!="landscape"?"block":"none"};return g}())});
define("tdv/player/view/util/xr/XRSessionManager","require exports tdv/constants/EventName tdv/player/view/util/Device tdv/player/view/util/InfoWindow tdv/player/view/util/xr/Hash tdv/player/view/util/xr/SessionMode tdv/view/util/Fullscreen tdv/view/util/FullWindow tdv/view/util/IOSFullscreen tdv/view/util/KeepAwake tdv/view/util/LandscapeAnimation tdv/view/util/Animation three.mod".split(" "),function(a,l,k,n,g,h,e,b,c,d,f,m,p,q){function r(w,y){w?setTimeout(y,200):y()}var t=new q.Vector3,u=new q.Quaternion,
v=new q.Vector3;return function(){function w(){}w.request=function(y,x,z){this.XR.isPresenting||this.XR.MW||(this.Em=y,this.EX=x,this.B8=z,this.Em&&(this.XR.MW=!0,this.yfb(),this.requestSession().then(function(A){this.bgb(A);this.Em.xr.setReferenceSpaceType("local-floor");this.Em.xr.setFoveation(this.B8.NIa);return this.Em.xr.setSession(A)}.bind(this)).then(function(){this.XR.referenceSpace=this.Em.xr.getReferenceSpace();this.XR.MW=!1;this.cgb()}.bind(this)).catch(function(A){console.error(A);this.XR.MW=
!1;this.agb()}.bind(this))))};w.end=function(){this.XR.session&&this.XR.session.end()};w.requestSession=function(){return navigator.xr.requestSession(this.EX,this.odb())};w.odb=function(){var y,x=["local-floor","bounded-floor"];((y=this.Em)===null||y===void 0?0:y.capabilities.isWebGL2)&&x.push("layers");this.EX==e.tr&&(x=x.concat(["anchors","hit-test"]));return{optionalFeatures:x}};w.yfb=function(){p.eY(!0);this.Whb(this.Em);this.qjb()};w.bgb=function(y){this.Aoa||(this.Aoa=this.$fb.bind(this));this.Boa||
(this.Boa=this.dgb.bind(this));y.addEventListener("end",w.Aoa);y.addEventListener("select",w.Boa)};w.agb=function(){p.eY(!1);this.pQa()};w.cgb=function(){var y;(y=this.Em)===null||y===void 0||y.xr.setAnimationLoop(this.vp.bind(this));p.uPa(this.requestFrame.bind(this),this.fab.bind(this));p.eY(!1);this.sPa(this.Em,this.EX,this.B8);this.B8=this.EX=this.Em=null;this.XR.zp==e.Sr&&(n.ub()?b.enabled()&&n.Dc()!=n.UP&&m.show(b.fullscreenElement()):g.Jra.show(this.XR.tm.bind(this.XR)))};w.$fb=function(){var y;
this.XR.session&&(this.XR.session.removeEventListener("end",w.Aoa),this.XR.session.removeEventListener("select",w.Boa),this.XR.anchors=[],this.XR.EI.clear(),(y=this.Em)===null||y===void 0||y.xr.setAnimationLoop(null),p.khb(),this.pQa(),this.sPa(null,null,null))};w.dgb=function(){this.XR.M.m(k.Qr)};w.sPa=function(y,x,z){this.XR.zg!==y&&(window.XR=this.XR,this.XR.zg=y,this.XR.zp=x,this.XR.Im=z,this.XR.session=y?y.xr.getSession():null,this.XR.isPresenting=!!y,this.XR.IA=y?this.XR.gpa.get(y)||null:null,
this.XR.Cw=y?this.XR.fpa.get(y)||null:null,this.dRa(),r(!this.XR.isPresenting,function(){this.XR.M.m(k.V)}.bind(this)))};w.Whb=function(y){var x=void 0;n.qJ()?x=1.2545454545454546:n.gf()?x=1.4222222222:n.ub()&&this.XR.NO&&(x=this.XR.s8);x&&y.xr.setFramebufferScaleFactor(x)};w.qjb=function(){var y;c.request((y=this.Em)===null||y===void 0?void 0:y.domElement);this.XR.NO&&(this.Em.domElement.width=this.Em.domElement.height=100,n.Dc()==n.VP?h.addParameter("vr"):f.enable(),n.Dc()==n.UP&&d.request())};
w.pQa=function(){c.cancel();m.Qe();n.ub()||g.Jra.Qe();this.XR.NO&&(h.removeParameter("vr"),d.cancel(),f.disable())};w.vp=function(y){var x,z=(x=this.XR.zg)===null||x===void 0?void 0:x.xr.getFrame();z&&(this.dRa(),x=this.d6,this.d6=null,this.Akb(z),this.XR.M.m(k.NY),x&&x(y),this.XR.M.m(k.me))};w.Akb=function(y){var x=this;this.XR.anchors.forEach(function(z){if(y.trackedAnchors&&y.trackedAnchors.has(z)&&x.XR.referenceSpace){var A=y.getPose(z.anchorSpace,x.XR.referenceSpace);A&&(x.XR.EI.has(z)||x.XR.EI.set(z,
new q.Matrix4),x.XR.EI.get(z).fromArray(A.transform.matrix).premultiply(x.XR.Sh.matrixWorld).decompose(t,u,v).compose(t,u,v.set(1,1,1)))}})};w.dRa=function(){if(this.XR.session&&this.XR.session.renderState)if(this.XR.session.renderState.baseLayer)this.XR.framebufferWidth=this.XR.session.renderState.baseLayer.framebufferWidth,this.XR.framebufferHeight=this.XR.session.renderState.baseLayer.framebufferHeight;else{var y=this.XR.session.renderState.layers;y&&y.length>0&&y[0].textureWidth&&(this.XR.framebufferWidth=
y[0].textureWidth,this.XR.framebufferHeight=y[0].textureHeight)}};w.requestFrame=function(y){this.d6=y;return 0};w.fab=function(){this.d6=null};w.Em=null;w.B8=null;w.EX=null;w.d6=null;return w}()});
define("tdv/player/view/util/XR","require exports tdv/utils tdv/events/EventDispatcher tdv/player/view/util/xr/APIAvailabilityChecker tdv/player/view/util/xr/CameraPosition tdv/player/view/util/xr/pointer/PointerType tdv/player/view/util/xr/RendererList tdv/player/view/util/xr/RendererType tdv/player/view/util/xr/pointer/SelectionMode ./xr/SessionMode tdv/player/view/util/xr/Type tdv/player/view/util/xr/ui/UI tdv/player/view/util/xr/ui/UIPanel tdv/player/view/util/xr/VisibilityListener tdv/player/view/util/xr/VRAutoStart tdv/player/view/util/xr/pointer/XRControllers tdv/player/view/util/xr/pointer/XRGazePointer tdv/player/view/util/xr/pointer/XRPointer tdv/player/view/util/xr/XRSettings tdv/player/view/util/xr/VRPreconditionsChecker tdv/player/view/util/xr/XRSessionManager three.mod".split(" "),function(a,
l,k,n,g,h,e,b,c,d,f,m,p,q,r,t,u,v,w,y,x,z,A){a=function(){function D(){}D.initialize=function(E){g.initialize(function(){this.Un.forEach(function(B){B.xr.enabled=this.QP}.bind(this));r.initialize();t.initialize();u.initialize();v.initialize();w.initialize();h.initialize();p.initialize();this.DKa=!0;E()}.bind(this))};D.getType=function(){return this.NO?this.zx.ko:this.zx.jUa};D.rt=function(E,B,C){this.DKa?!this.QP||this.isPresenting||this.MW||this.UA(B,function(){z.request(E,B,C)}.bind(z)):this.initialize(function(){D.rt(E,
B,C)}.bind(D))};D.tm=function(){z.end()};D.DPa=function(E){w.Jib(E)};D.setScale=function(E){h.setScale(E)};D.setPosition=function(E){h.setPosition(E)};D.vP=function(E){h.vP(E)};D.C8=function(){h.C8()};D.Qpa=function(E,B,C,F){b.cib(E,B,C);switch(F){case c.yaa:u.zPa(!0);u.mPa(!0);break;default:u.zPa(!1),u.mPa(!1)}};D.v$a=function(E){E.xr.enabled=this.QP;b.add(E)};D.$gb=function(E){b.remove(E)};D.KE=function(E,B,C,F){F===void 0&&(F=void 0);E.Ue=B;E.br=C;E.nw=F;B&&(E.jNa=Date.now())};D.qPa=function(E,
B){E.Pz=B};D.a9=function(E,B){B!=E.disabled&&(E.disabled=B)};D.NX=function(E,B){u.yhb(E,B)};D.Fib=function(E,B){E.Gn=B};D.Ppa=function(E,B){E.hidden=B};D.rPa=function(E,B){E.K6=B};D.fhb=function(){var E=this;return(new Promise(function(B,C){E.Oq=B;E.RN=C})).then(function(B){E.anchors.push(B);return B}).finally(function(){E.Oq=E.RN=null})};D.aab=function(){this.RN&&this.RN("cancelled")};D.Dbb=function(E){var B=this.anchors.indexOf(E);B!=-1&&(this.anchors.splice(B,1),this.EI.delete(E),E.delete&&E.delete())};
D.log=function(){k.log("VR: "+(this.QP?"available":"not available"))};D.UA=function(E,B){x.UA(E,B)};D.Ksa=e;D.zx=m;D.mQ=c;D.po=f;D.lta=y;D.QP=!0;D.rGa=!0;D.NO=!1;D.zg=null;D.IA=null;D.Cw=null;D.isPresenting=!1;D.MW=!1;D.session=null;D.zp=null;D.framebufferWidth=void 0;D.framebufferHeight=void 0;D.ug=new A.Quaternion;D.bO=1.7;D.Ic=new A.Vector3;D.xi=1;D.xl=new A.Quaternion;D.U9=new A.Vector3;D.s8=Math.min(1,1280/(Math.max(screen.width,screen.height)*window.devicePixelRatio));D.Un=[];D.Im=null;D.gpa=
new Map;D.fpa=new Map;D.M=new n;D.referenceSpace=null;D.DKa=!1;D.nd=[];D.wO=new A.Ray;D.G8=null;D.anchors=[];D.EI=new Map;D.Oq=null;D.RN=null;return D}();g.XR=a;h.XR=a;b.XR=a;p.XR=a;q.XR=a;r.XR=a;t.XR=a;u.XR=a;v.XR=a;w.XR=a;x.XR=a;return z.XR=a});
define("tdv/player/parser/helper/AppResizeUpdater",["require","exports","tdv/constants/EventName","tdv/player/view/util/XR"],function(a,l,k,n){var g=/^\s*((\+|\-)?(\d*\.)?\d+)\s*(vmin|vmax|vw|vh|px|%)?\s*$/i;return function(){function h(e){this.Fb=e;this.aO=this.aO.bind(this);this.Fb.bind(k.Zb,this.kd,this,!0);n.M.bind(k.V,this.kd,this,!0);this.Wia=new Map;this.b_=[];this.kd()}h.prototype.kd=function(){var e=this;this.C9a();this.Wia.forEach(function(b){for(var c in b)e.aO(b[c])});this.b_.forEach(this.aO)};
h.prototype.C9a=function(){var e;if(n.isPresenting)var b=e=1024;else e=this.Fb.gb(),b=this.Fb.Kb();this.T4=e*.01;this.M4=b*.01;this.NFa=Math.min(this.T4,this.M4);this.MFa=Math.max(this.T4,this.M4)};h.prototype.aO=function(e){e(this.T4,this.M4,this.NFa,this.MFa)};h.prototype.d$a=function(e){this.b_.push(e)};h.prototype.Pgb=function(e){e=this.b_.indexOf(e);e>=0&&this.b_.splice(e,1)};h.prototype.b5=function(e,b,c,d){function f(p,q,r,t){b.call(e,c,m(p,q,r,t))}var m=h.UZa(d);(d=this.Wia.get(e))||this.Wia.set(e,
d={});d[c]=f;f(this.T4,this.M4,this.NFa,this.MFa)};h.get=function(e){var b=h.xd.get(e);b||(b=new h(e),h.xd.set(e,b));return b};h.b5=function(e,b,c,d){var f=e.get&&e.get("application")||e.Vb&&e.Vb();f?(h.RBa(),h.get(f).b5(e,b,c,d)):h.eVa(e,b,c,d)};h.eVa=function(e,b,c,d){h.pha.push({instance:e,pjb:b,name:c,value:d});h.LM||(h.LM=setTimeout(function(){h.LM=null;h.RBa()},100))};h.RBa=function(){h.LM&&(clearTimeout(h.LM),h.LM=null);var e=h.pha;h.pha=[];e.forEach(function(b){h.b5(b.instance,b.pjb,b.name,
b.value)})};h.UZa=function(e){var b=h.nG[e];if(b)return b;if(typeof e!="string")return h.nG[e]=function(){return e};var c=(b=g.exec(e))&&parseFloat(b[1]);switch(b&&b[4]&&b[4].toLowerCase()){case "vw":return h.nG[e]=function(d){return d*c};case "vh":return h.nG[e]=function(d,f){return f*c};case "vmin":return h.nG[e]=function(d,f,m){return m*c};case "vmax":return h.nG[e]=function(d,f,m,p){return p*c};default:return h.nG[e]=function(){return e}}};h.xd=new Map;h.pha=[];h.LM=null;h.nG={};return h}()});
define("tdv/player/parser/ClassInfo","require exports tdv/player/script/definitions tdv/player/parser/helper/AppResizeUpdater tdv/player/view/util/URL tdv/utils".split(" "),function(a,l,k,n,g,h){k=h.xbb(k);var e=function(){function b(c,d,f){this.nL=c;this.QQ=f;this.w2=d.parent;this.E1a=d.isValidRoot||!1;this.hha={};this.dha=[];this.yBa=[];this.xBa=[];this.A_={};c=d.properties||{};for(var m in c)f=c[m],this.hha[m]=f.type,f.isUrl&&this.yBa.push(m),f.isSize&&this.xBa.push(m),f.order!==void 0&&(this.dha[f.order]=
m),f["default"]!==void 0&&(this.A_[m]=f["default"]);this.vBa=[];this.wBa=[];d=d.events||{};for(var p in d)d[p].isDeferred?this.vBa.push(p):this.wBa.push(p);this.yC=this.jC=this.mR=this.M3=this.dI=this.I4=this.vI=this.DL=this.bL=this.BQ=void 0;this.lya=!1}b.prototype.cdb=function(){if(this.w2)return b.Bi(this.w2)};b.prototype.gA=function(){return this.nL};b.prototype.hW=function(){return this.tC()?this.qy().hW().concat(this.nL):[this.nL]};b.prototype.hasAttributes=function(){return this.getAttributeNames().length>
0};b.prototype.hasAttribute=function(c){return this.xma(c)?!0:!1};b.prototype.getAttributeNames=function(){this.BQ==void 0&&this.tva();return this.BQ};b.prototype.AJa=function(){return this.dha?this.dha:this.tC()?this.qy().AJa():[]};b.prototype.ZIa=function(){if(this.DL)return this.DL;this.DL={};if(this.tC()){var c=this.qy().ZIa(),d;for(d in c)this.DL[d]=c[d]}if(this.A_)for(d in this.A_)this.DL[d]=this.A_[d];return this.DL};b.prototype.xma=function(c){this.bL==void 0&&this.tva();return this.bL[c]};
b.prototype.eeb=function(){return this.RJa().length>0};b.prototype.RJa=function(){this.vI==void 0&&this.Ava();return this.vI};b.prototype.tdb=function(){this.I4==void 0&&this.Ava();return this.I4};b.prototype.beb=function(){return this.MJa().length>0};b.prototype.MJa=function(){this.dI==void 0&&this.zva();return this.dI};b.prototype.qdb=function(){this.M3==void 0&&this.zva();return this.M3};b.prototype.Pdb=function(){return this.Cma().length>0};b.prototype.hKa=function(c){this.jC==void 0&&this.tL();
return this.jC.indexOf(c)!=-1};b.prototype.Cma=function(){this.jC==void 0&&this.tL();return this.jC};b.prototype.Udb=function(){return this.Kma().length>0};b.prototype.iKa=function(c){this.yC==void 0&&this.tL();return this.yC.indexOf(c)!=-1};b.prototype.Kma=function(){this.yC==void 0&&this.tL();return this.yC};b.prototype.Rdb=function(c){this.mR==void 0&&this.tL();return this.mR.indexOf(c)!=-1};b.prototype.Ecb=function(){this.mR==void 0&&this.tL();return this.mR};b.prototype.oJa=function(){return this.E1a||
this.tC()&&this.qy().oJa()};b.prototype.yi=function(c,d,f,m){this.a4a(d,f);var p=this.QQ;var q=m&&m.length>0?new (h.extend(p,function(){p.apply(this,m)})):new p;q.set("application",c);q.set("baseDirectoy",d);q.set("queryStringParameters",f);q.set("class",this.gA());return q};b.prototype.jla=function(c){var d=this.ZIa(),f;for(f in d)c.set(f,d[f])};b.prototype.a4a=function(c,d){this.lya||(this.lya=!0,this.sYa(c,d),this.iZa(),this.NUa())};b.prototype.sYa=function(c,d){if(this.eeb()||this.beb()){var f=
this.QQ.prototype,m=this.tdb(),p=this.qdb(),q=f.set;f.set=function(r,t){m[r]?(!t||g.WD(t)||g.W6(t)||g.Teb(t)||(t=g.zD(g.YA(t,c),d)),q.call(this,r,t)):p[r]?n.b5(this,q,r,t):q.call(this,r,t)}}};b.prototype.NUa=function(){var c=this.QQ.prototype;this.getAttributeNames().forEach(function(d){Object.defineProperty(c,d,{get:function(){return this.get(d)},set:function(f){this.set(d,f)},enumerable:!0,configurable:!0})})};b.prototype.iZa=function(){var c=this.QQ.prototype,d=this;this.hasAttributes()&&(c.set=
c.set,c.get=c.get);if(this.Pdb()||this.Udb())c.bind=c.bind,c.getBindings=c.AO,c.hasBindings=c.H6,c.trigger=c.m,c.unbind=c.h;c.getClassName=function(){return d.gA()};c.getClassPath=function(){return d.hW()};c.getAttributeNames=function(){return d.getAttributeNames()};c.getEventNames=function(){return d.Ecb()};c.hasEvent=function(f){return d.Rdb(f)}};b.prototype.tva=function(){this.BQ=[];this.bL={};for(var c in this.hha)this.BQ.push(c),this.bL[c]=b.hea(this.hha[c]);if(this.tC())for(var d=this.qy(),
f=d.getAttributeNames(),m=0;m<f.length;m++)c=f[m],this.bL[c]||(this.BQ.push(c),this.bL[c]=d.xma(c))};b.prototype.Ava=function(){this.vI=this.yBa.slice();this.tC()&&(this.vI=h.union(this.vI,this.qy().RJa()));this.I4={};for(var c=0;c<this.vI.length;c++)this.I4[this.vI[c]]=!0};b.prototype.zva=function(){this.dI=this.xBa.slice();this.tC()&&(this.dI=h.union(this.dI,this.qy().MJa()));this.M3={};for(var c=0;c<this.dI.length;c++)this.M3[this.dI[c]]=!0};b.prototype.tL=function(){this.jC=this.vBa.slice();this.yC=
this.wBa.slice();this.tC()&&(this.jC=h.union(this.jC,this.qy().Cma()),this.yC=h.union(this.yC,this.qy().Kma()));this.mR=h.union(this.jC,this.yC)};b.prototype.tC=function(){return this.w2?!0:!1};b.prototype.qy=function(){return b.Bi(this.w2)};b.define=function(c,d,f){d=h.extend(d,function(){f.apply(this,arguments);m.jla(this)});var m=new b(c,k[c],d);b.h_.set(c,m);b.eca.set(d,m);return d};b.create=function(c,d){var f=new b(c,k[c],d);b.h_.set(c,f);b.eca.set(d,f);return f};b.getAll=function(){var c=[];
b.h_.forEach(function(d){c.push(d)});return c};b.Bi=function(c){return b.h_.get(c)};b.pcb=function(c){return b.eca.get(c)};b.Qa=function(c,d){c=b.Bi(c);if(d===null)return!0;if(d&&d.constructor)for(d=b.pcb(d.constructor);d;){if(d==c)return!0;d=d.cdb()}return!1};b.hea=function(c){switch(c){case "string":case "code":return b.B7a;case "number":return b.e2a;case "bool":return b.oWa;case "color":return b.oXa;case "percent":return b.L3a;case "size":return b.W6a;case "identifier":return b.M0a;case "array":return b.$ta;
case "canvas":return b.MWa;case "img":return b.P0a;case "dict":return b.M3a;case "*":return b.TYa;default:if(b.k1a(c))switch(b.ZZa(c)){case "array":var d=b.hea(b.Fwa(c));return function(p,q){p=b.$ta(p,q);for(var r=0;r<p.length;r++)p[r]=d(p[r],q);return p};case "enum":var f=b.Gwa(c);return b.a_a(f);case "or":f=b.Gwa(c);var m=f.map(function(p){return b.hea(p)});return function(p,q){for(var r=0;r<m.length;r++)try{return m[r](p,q)}catch(t){}throw"Invalid value";};default:throw"Invalid type validator definition: "+
c;}else return b.Go(function(p){return b.Qa(c,p)})}};b.k1a=function(c){return c.indexOf("[")>=0&&c.lastIndexOf("]")==c.length-1};b.ZZa=function(c){return c.substring(0,c.indexOf("["))};b.Fwa=function(c){return c.substring(c.indexOf("[")+1,c.lastIndexOf("]"))};b.Gwa=function(c){c=b.Fwa(c);for(var d=[],f="",m=0,p=0;p<c.length;p++){var q=c.charAt(p);f+=q;switch(q){case "[":m++;break;case "]":m--;break;case ",":m==0&&(d.push(f.substr(0,f.length-1)),f="")}}f!=""&&d.push(f);return d.map(function(r){return b.p8a(r)})};
b.p8a=function(c){return c.replace(/^\s+|\s+$/g,"")};b.Go=function(c){return function(d,f){if(!c(d)){if(typeof d!="string")throw"Invalid value";d=b.gZa(d,f);if(!c(d))throw"Invalid value";}return d}};b.gZa=function(c,d){return function(){return eval(c)}.call(d)};b.TYa=function(c){return c};b.a_a=function(c){return b.Go(function(d){return c.indexOf(d)!=-1})};b.U_=function(c,d){return h.qA(c)&&d.test(c)};b.h_=new Map;b.eca=new Map;b.e2a=b.Go(function(c){return Object.prototype.toString.call(c)=="[object Number]"});
b.B7a=b.Go(function(c){return typeof c=="string"||c===null});b.oWa=b.Go(function(c){return c===!0||c===!1});b.$ta=b.Go(function(c){return Object.prototype.toString.call(c)=="[object Array]"});b.MWa=b.Go(function(c){return c&&c.tagName=="CANVAS"});b.P0a=b.Go(function(c){return c&&c.tagName=="IMG"});b.M0a=b.Go(function(c){return b.U_(c,RegExp("^[a-z][a-z0-9_]*$","i"))});b.L3a=b.Go(function(c){return b.U_(c,RegExp("^\\s*([+-]?\\d+\\.?\\d*)%\\s*$","i"))});b.W6a=b.Go(function(c){return b.U_(c,RegExp("^\\s*([+-]?\\d+\\.?\\d*)\\s*((vw)|(vh)|(vmin)|(vmax)|(px))\\s*$",
"i"))});b.oXa=b.Go(function(c){return b.U_(c,RegExp("^#[0-9a-f]{6}$","i"))});b.M3a=b.Go(function(c){try{return h.Bna(c)}catch(d){return!1}});return b}();window.TDV.PlayerAPI.getClassByName=function(b){return e.Bi(b).QQ};return e});
define("tdv/util/Sha256",["require"],function(){function a(){h[0]=h[1]=h[2]=h[3]=h[4]=h[5]=h[6]=h[7]=h[8]=h[9]=h[10]=h[11]=h[12]=h[13]=h[14]=h[15]=h[16]=0;this.sla=h;this.qW=1779033703;this.rW=3144134277;this.sW=1013904242;this.tW=2773480762;this.uW=1359893119;this.vW=2600822924;this.wW=528734635;this.xW=1541459225;this.block=this.start=this.bytes=this.ana=0;this.sma=this.J6=!1;this.first=!0}var l="0123456789abcdef".split(""),k=[-2147483648,8388608,32768,128],n=[24,16,8,0],g=[1116352408,1899447441,
3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,
506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],h=[];a.prototype.update=function(e){if(!this.sma){for(var b,c=0,d,f=e.length,m=this.sla;c<f;){this.J6&&(this.J6=!1,m[0]=this.block,m[16]=m[1]=m[2]=m[3]=m[4]=m[5]=m[6]=m[7]=m[8]=m[9]=m[10]=m[11]=m[12]=m[13]=m[14]=m[15]=0);for(d=this.start;c<f&&d<64;++c)b=e.charCodeAt(c),b<128?m[d>>2]|=b<<n[d++&3]:(b<2048?m[d>>2]|=(192|b>>6)<<n[d++&3]:(b<55296||
b>=57344?m[d>>2]|=(224|b>>12)<<n[d++&3]:(b=65536+((b&1023)<<10|e.charCodeAt(++c)&1023),m[d>>2]|=(240|b>>18)<<n[d++&3],m[d>>2]|=(128|b>>12&63)<<n[d++&3]),m[d>>2]|=(128|b>>6&63)<<n[d++&3]),m[d>>2]|=(128|b&63)<<n[d++&3]);this.gfb=d;this.bytes+=d-this.start;d>=64?(this.block=m[16],this.start=d-64,this.hash(),this.J6=!0):this.start=d}this.bytes>4294967295&&(this.ana+=this.bytes/4294967296<<0,this.bytes%=4294967296);return this}};a.prototype.vIa=function(){if(!this.sma){this.sma=!0;var e=this.sla,b=this.gfb;
e[16]=this.block;e[b>>2]|=k[b&3];this.block=e[16];b>=56&&(this.J6||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0);e[14]=this.ana<<3|this.bytes>>>29;e[15]=this.bytes<<3;this.hash()}};a.prototype.hash=function(){var e=this.qW,b=this.rW,c=this.sW,d=this.tW,f=this.uW,m=this.vW,p=this.wW,q=this.xW,r=this.sla,t;for(t=16;t<64;++t){var u=r[t-15];var v=(u>>>7|u<<25)^(u>>>18|u<<14)^u>>>3;u=r[t-2];u=(u>>>17|u<<15)^(u>>>19|u<<13)^u>>>10;r[t]=
r[t-16]+v+r[t-7]+u<<0}var w=b&c;for(t=0;t<64;t+=4){if(this.first){var y=704751109;u=r[0]-210244248;q=u-1521486534<<0;d=u+143694565<<0;this.first=!1}else{v=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10);u=(f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7);y=e&b;var x=y^e&c^w;var z=f&m^~f&p;u=q+u+z+g[t]+r[t];v+=x;q=d+u<<0;d=u+v<<0}v=(d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10);u=(q>>>6|q<<26)^(q>>>11|q<<21)^(q>>>25|q<<7);w=d&e;x=w^d&b^y;z=q&f^~q&m;u=p+u+z+g[t+1]+r[t+1];v+=x;p=c+u<<0;c=u+v<<0;v=(c>>>2|c<<30)^(c>>>
13|c<<19)^(c>>>22|c<<10);u=(p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7);y=c&d;x=y^c&e^w;z=p&q^~p&f;u=m+u+z+g[t+2]+r[t+2];v+=x;m=b+u<<0;b=u+v<<0;v=(b>>>2|b<<30)^(b>>>13|b<<19)^(b>>>22|b<<10);u=(m>>>6|m<<26)^(m>>>11|m<<21)^(m>>>25|m<<7);w=b&c;x=w^b&d^y;z=m&p^~m&q;u=f+u+z+g[t+3]+r[t+3];v+=x;f=e+u<<0;e=u+v<<0}this.qW=this.qW+e<<0;this.rW=this.rW+b<<0;this.sW=this.sW+c<<0;this.tW=this.tW+d<<0;this.uW=this.uW+f<<0;this.vW=this.vW+m<<0;this.wW=this.wW+p<<0;this.xW=this.xW+q<<0};a.prototype.heb=function(){this.vIa();
var e=this.qW,b=this.rW,c=this.sW,d=this.tW,f=this.uW,m=this.vW,p=this.wW,q=this.xW;return l[e>>28&15]+l[e>>24&15]+l[e>>20&15]+l[e>>16&15]+l[e>>12&15]+l[e>>8&15]+l[e>>4&15]+l[e&15]+l[b>>28&15]+l[b>>24&15]+l[b>>20&15]+l[b>>16&15]+l[b>>12&15]+l[b>>8&15]+l[b>>4&15]+l[b&15]+l[c>>28&15]+l[c>>24&15]+l[c>>20&15]+l[c>>16&15]+l[c>>12&15]+l[c>>8&15]+l[c>>4&15]+l[c&15]+l[d>>28&15]+l[d>>24&15]+l[d>>20&15]+l[d>>16&15]+l[d>>12&15]+l[d>>8&15]+l[d>>4&15]+l[d&15]+l[f>>28&15]+l[f>>24&15]+l[f>>20&15]+l[f>>16&15]+l[f>>
12&15]+l[f>>8&15]+l[f>>4&15]+l[f&15]+l[m>>28&15]+l[m>>24&15]+l[m>>20&15]+l[m>>16&15]+l[m>>12&15]+l[m>>8&15]+l[m>>4&15]+l[m&15]+l[p>>28&15]+l[p>>24&15]+l[p>>20&15]+l[p>>16&15]+l[p>>12&15]+l[p>>8&15]+l[p>>4&15]+l[p&15]+l[q>>28&15]+l[q>>24&15]+l[q>>20&15]+l[q>>16&15]+l[q>>12&15]+l[q>>8&15]+l[q>>4&15]+l[q&15]};a.prototype.digest=function(){this.vIa();var e=this.qW,b=this.rW,c=this.sW,d=this.tW,f=this.uW,m=this.vW,p=this.wW,q=this.xW;return[e>>24&255,e>>16&255,e>>8&255,e&255,b>>24&255,b>>16&255,b>>8&255,
b&255,c>>24&255,c>>16&255,c>>8&255,c&255,d>>24&255,d>>16&255,d>>8&255,d&255,f>>24&255,f>>16&255,f>>8&255,f&255,m>>24&255,m>>16&255,m>>8&255,m&255,p>>24&255,p>>16&255,p>>8&255,p&255,q>>24&255,q>>16&255,q>>8&255,q&255]};return function(e){return(new a(!0)).update(e).heb()}});
define("tdv/player/parser/Sign",["require","tdv/util/Sha256"],function(a){function l(){for(var h=[[256,"9799e3eb6096a48f515a94324200b7af24251a4131eccf9a2cd65d012a1f5c71"],[1024,"cbab1f6d618e723188cfdb1c7c3f47146e46da4da56030386d85055016afd5d9"],[1E4,"d9c4539649520e3f4a35e5a3331b0fbdc67958dd64ef65a83a75d545413643dd"]],e=0;e<h.length;e++){var b=Array.apply(null,Array(h[e][0])).map((c,d)=>String.fromCharCode(d%256)).join("");if(g(b)!=h[e][1])return!1}return!0}function k(h){var e=Array.isArray(h)?"array":
h===null?"null":typeof h;switch(e){case "array":return"["+h.map(k).join(",")+"]";case "object":return"{"+Object.keys(h).sort().map(function(b){return k(b)+":"+k(h[b])}).join(",")+"}";case "boolean":return h?"true":"false";case "number":return h.toFixed(3);case "string":return'"'+h.split('"').join('\\"')+'"';case "null":case "undefined":return e;case "function":return"<"+e+">"}return""}function n(h){return h.map(function(e){return String.fromCharCode(e)}).join("")}var g=a("tdv/util/Sha256");return{validate:function(h){var e=
[104,97,115,104],b=[116,100,118],c=window.location[n([111,114,105,103,105,110])],d=h[n(e)];delete h[n(e)];h=n(b)+k(h);h=g(h);b=n(b)+c;b=g(b);return h==d||b==d||!l()}}});
define("tdv/player/view/util/geo/Point",["require"],function(){function a(l,k,n){this.set(typeof l!="undefined"?l:0,typeof k!="undefined"?k:0,typeof n!="undefined"?n:0)}a.prototype.set=function(l,k,n){this.x=l;this.y=k;this.z=n;return this};a.prototype.clone=function(){return new a(this.x,this.y,this.z)};a.prototype.apply=function(l){l.UN(this)};a.prototype.project=function(l){l.project(this)};return a});
define("tdv/player/view/util/geo/Vector",["require","tdv/utils","tdv/player/view/util/geo/Point"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/util/geo/Point"),n=l.extend(k,function(g,h,e){k.call(this,g,h,e)});n.prototype.clone=function(){return new n(this.x,this.y,this.z)};n.prototype.Lc=function(){return this.x==0&&this.z==0?0:-Math.atan2(this.x,this.z)};n.prototype.Jc=function(){return this.y==0&&this.z==0?0:Math.atan2(this.y,Math.sqrt(this.z*this.z+this.x*this.x))};n.prototype.Pma=function(){return Math.sqrt(this.x*
this.x+this.y*this.y+this.z*this.z)};n.prototype.$X=function(g){g/=this.Pma();this.x*=g;this.y*=g;this.z*=g;return this};n.prototype.normalize=function(){return this.$X(1)};n.prototype.TI=function(g){return this.x*g.x+this.y*g.y+this.z*g.z};n.prototype.E5=function(g){var h=this.z*g.x-this.x*g.z,e=this.x*g.y-this.y*g.x;this.x=this.y*g.z-this.z*g.y;this.y=h;this.z=e;return this};n.LD=function(g,h){return new n(h.x-g.x,h.y-g.y,h.z-g.z)};n.k6=function(g,h){g=NaN-g;h=NaN-h;return Math.sqrt(g*g+h*h+NaN)};
n.eA=function(g,h){return new n(Math.cos(h)*Math.sin(g),Math.sin(h),Math.cos(h)*Math.cos(g))};return n});
define("tdv/player/script/AdjacentPanorama",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo","tdv/player/view/util/geo/Vector"],function(a){var l=a("tdv/binding/Bindable"),k=a("tdv/player/parser/ClassInfo"),n=a("tdv/player/view/util/geo/Vector");a=k.define("AdjacentPanorama",l,function(){l.call(this);this.Mka=this.Zx=void 0});a.prototype.aJa=function(){if(this.Zx===void 0){for(this.Zx=this.Wwa()-this.get("yaw");this.Zx>180;)this.Zx-=360;for(;this.Zx<-180;)this.Zx+=360}return this.Zx};
a.prototype.Dcb=function(){this.Mka===void 0&&(this.Mka=n.eA(this.Wwa()*Math.PI/180,0));return this.Mka};a.prototype.$$a=function(){return this.get("yaw")!==void 0&&this.get("backwardYaw")!==void 0};a.prototype.Wwa=function(){return this.get("backwardYaw")-180};return a});define("tdv/player/script/AmbientLight",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("AmbientLight",l,function(){l.call(this)})});
define("tdv/player/script/Model3DPostprocessing",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");a=a("tdv/player/parser/ClassInfo").define("Model3DPostprocessing",l,function(){l.call(this)});a.prototype.NE=function(k){this.Lq!==k&&(this.Lq=k,this.PEa())};a.prototype.Bp=function(k){this.pM!==k&&(this.pM=k,this.PEa())};a.prototype.PEa=function(){this.set("disabled",this.pM&&this.get("disableWhileMoving")||this.Lq&&this.get("disableWhileUserInteracting"))};
return a});define("tdv/player/script/AmbientOcclusionModel3DPostprocessing",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DPostprocessing"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/Model3DPostprocessing");return l.define("AmbientOcclusionModel3DPostprocessing",k,function(){k.call(this)})});define("tdv/constants/PlaybackState",["require","exports"],function(){return{ca:"stopped",PLAYING:"playing",Yb:"paused"}});
define("tdv/player/script/ImageResource",["require","exports","tdv/player/parser/ClassInfo","tdv/binding/Bindable"],function(a,l,k,n){a=function(g){function h(){return g.call(this)||this}O(h,g);return h}(n);k.create("ImageResource",a);return a});
define("tdv/player/script/AnimatedImageResource","require tdv/utils tdv/constants/EventName tdv/constants/PlaybackState tdv/player/parser/ClassInfo tdv/player/script/ImageResource".split(" "),function(a){a("tdv/utils");var l=a("tdv/constants/EventName"),k=a("tdv/constants/PlaybackState"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/player/script/ImageResource");a=n.define("AnimatedImageResource",g,function(){g.call(this)});a.prototype.play=a.prototype.play=function(){this.set("state",k.PLAYING)};a.prototype.pause=
a.prototype.pause=function(){this.set("state",k.Yb)};a.prototype.stop=a.prototype.stop=function(){this.set("state",k.ca)};a.prototype.set=function(h,e){switch(h){case "state":(this.get("state")||k.ca)==k.ca&&e==k.PLAYING&&this.m(l.Np)}g.prototype.set.call(this,h,e)};a.prototype.Ak=function(h,e,b){e||(e=1);b||(b=1);return g.prototype.Ak.call(this,h,e*this.get("colCount",1),b*this.get("rowCount",1))};return a});
define("tdv/player/script/AntialiasModel3DPostprocessing",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DPostprocessing"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/Model3DPostprocessing");return l.define("AntialiasModel3DPostprocessing",k,function(){k.call(this)})});
define("tdv/player/script/HotspotMapOverlay",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");a=a("tdv/player/parser/ClassInfo").define("HotspotMapOverlay",l,function(k){l.call(this);this.aN=k===void 0?!0:k;this.fM=this.Us=this.Ss=this.Ja=void 0});a.prototype.getItem=function(){if(this.Ja===void 0){var k=this.get("image");this.Ja=k?k.D5(this.aN):null}return this.Ja};a.prototype.GJa=function(){if(this.Ss===void 0){var k=this.get("rollOverImage");
this.Ss=k?k.D5(this.aN):null}return this.Ss};a.prototype.LJa=function(){if(this.Us===void 0){var k=this.get("selectedImage");this.Us=k?k.D5(this.aN):null}return this.Us};a.prototype.Tcb=function(){if(this.fM===void 0){this.fM=[];var k=this.getItem();k&&this.fM.push(k);(k=this.GJa())&&this.fM.push(k);(k=this.LJa())&&this.fM.push(k)}return this.fM};return a});
define("tdv/player/script/AreaHotspotMapOverlay",["require","tdv/player/parser/ClassInfo","tdv/player/script/HotspotMapOverlay"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/HotspotMapOverlay");return l.define("AreaHotspotMapOverlay",k,function(){k.call(this,!0)})});
define("tdv/player/script/AudioResource",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("AudioResource",l,function(){l.call(this)})});define("tdv/view/constants/CreationPolicy",["require","exports"],function(){return{GK:"inAdvance",yra:"delayed"}});
define("tdv/view/buttons/ButtonGroup",["require","exports","tdv/constants/EventName"],function(a,l,k){return function(){function n(){var g=this;this.fk=[];this.Bza=function(h){g.TCa(h.source)}}n.prototype.register=function(g){this.OUa(g);this.fk.push(g);g.get("pressed")&&this.TCa(g)};n.prototype.unregister=function(g){this.q4a(g)};n.prototype.OUa=function(g){g.bind(k.Sk,this.Bza,this,!0)};n.prototype.q4a=function(g){g.unbind(k.Sk,this.Bza,this)};n.prototype.TCa=function(g){this.fk.forEach(function(h){h.set("pressed",
h==g)})};n.register=function(g,h){this.unregister(g);h=this.zj(h);g.set("__button_group",h);h.register(g)};n.unregister=function(g){var h=g.get("__button_group");h&&(h.unregister(g),g.set("__button_group",void 0))};n.zj=function(g){return this.Yxa[g]||(this.Yxa[g]=new n)};n.Yxa={};return n}()});define("tdv/view/constants/ButtonMode",["require","exports"],function(){return{Ze:"push",Vk:"toggle"}});
define("tdv/view/constants/OverflowPolicy",["require","exports"],function(){return{QK:"visible",Qra:"hidden",Pr:"scroll"}});define("tdv/view/constants/Alignment",["require","exports"],function(){return{eb:"left",Db:"right",Ye:"center",Tc:"top",Fc:"bottom",Xd:"middle"}});define("tdv/view/constants/ScrollBarVisiblePolicy",["require","exports"],function(){return{tc:"rollOver",ALWAYS:"always"}});
define("tdv/view/constants/LayoutMode",["require","exports"],function(){return{MY:"absolute",bi:"horizontal",uB:"grid",ck:"vertical"}});define("tdv/view/containers/layout/ChildBounds",["require","exports"],function(){return function(){return function(a){this.ce=a;this.height=this.width=this.y=this.x=0}}()});define("tdv/view/containers/layout/MeasureResult",["require","exports"],function(){return function(){return function(){this.minHeight=this.minWidth=this.height=this.width=0}}()});
define("tdv/view/containers/layout/Layout",["require","exports","tdv/view/constants/Alignment","tdv/view/containers/layout/ChildBounds","tdv/view/containers/layout/MeasureResult"],function(a,l,k,n,g){return function(){function h(){this.cc=null;this.wD=k.Tc;this.uC=k.eb;this.wI=this.uy=0}h.prototype.ZOa=function(e){this.uy!=e&&(this.uy=e,this.rh())};h.prototype.h9=function(e){this.wI!=e&&(this.wI=e,this.rh())};h.prototype.wPa=function(e){this.cc=e;this.rh()};h.prototype.wP=function(e){this.uC!=e&&
(this.uC=e,this.rh())};h.prototype.BO=function(){return this.uC};h.prototype.CP=function(e){this.wD!=e&&(this.wD=e,this.rh())};h.prototype.DO=function(){return this.wD};h.prototype.measure=function(){return new g};h.prototype.update=function(){var e=this.HXa();this.UU(e);this.I5a(e)};h.prototype.UU=function(){};h.prototype.f0=function(){for(var e=this.Fxa(),b=[],c=0;c<e.length;c++){var d=e[c];d.Mo&&b.push(d)}return b};h.prototype.Fxa=function(){if(!this.cc)return[];for(var e=this.cc.Cb(),b=[],c=0;c<
e.length;c++){var d=e[c];d.u.visible&&b.push(d)}return b};h.prototype.HXa=function(){for(var e=this.Fxa(),b=[],c=0;c<e.length;c++)b.push(new n(e[c]));return b};h.prototype.I5a=function(e){for(var b=0;b<e.length;b++){var c=e[b];c.ce.KOa(c.x,c.y,c.width,c.height)}};h.prototype.rh=function(){this.cc&&(this.cc.kc(),this.cc.yf())};return h}()});
define("tdv/view/containers/layout/AbsoluteLayout",["require","exports","tdv/view/containers/layout/Layout","tdv/view/containers/layout/MeasureResult"],function(a,l,k,n){return function(g){function h(){return g.call(this)||this}O(h,g);h.prototype.measure=function(){for(var e=new n,b=this.f0(),c=0;c<b.length;c++){var d=b[c],f=d.Ey,m=d.WT,p=0;f!==void 0&&(p+=f);m!==void 0&&(p+=m);e.width=Math.max(p+d.hw(),e.width);e.minWidth=Math.max(p+d.dw(),e.minWidth);f=d.Zs;m=d.FQ;p=0;f!==void 0&&(p+=f);m!==void 0&&
(p+=m);e.height=Math.max(p+d.gw(),e.height);e.minHeight=Math.max(p+d.iA(),e.minHeight)}this.cc&&(b=this.cc.u.Bd+this.cc.u.ze,e.width+=b,e.minWidth+=b,b=this.cc.u.ee+this.cc.u.Cf,e.height+=b,e.minHeight+=b);return e};h.prototype.UU=function(e){if(this.cc)for(var b=this.cc.Uh(),c=this.cc.Th(),d=0;d<e.length;d++){var f=e[d],m=f.ce,p=m.Ey;if(p===void 0){var q=m.G2;q!==void 0&&(p=Math.round(q*b*.01))}q=m.WT;if(q===void 0){var r=m.H2;r!==void 0&&(q=Math.round(r*b*.01))}r=m.YB;var t=m.Io;if(t===void 0){var u=
m.fp;u!==void 0?t=Math.round(u*b*.01):p!==void 0&&q!==void 0&&(t=b-p-q)}u=m.Zs;if(u===void 0){var v=m.I2;v!==void 0&&(u=Math.round(v*c*.01))}v=m.FQ;if(v===void 0){var w=m.F2;w!==void 0&&(v=Math.round(w*c*.01))}w=m.ZB;var y=m.GG;if(y===void 0){var x=m.ep;x!==void 0?y=Math.round(x*c*.01):u!==void 0&&v!==void 0&&(y=c-u-v)}f.width=t===void 0?m.hw():Math.max(m.dw(),Math.min(m.w6(),t));f.height=y===void 0?m.gw():Math.max(m.iA(),Math.min(m.v6(),y));f.x=p!==void 0&&q!==void 0?Math.round(p+(b-q-p-f.width)*
.5):p!==void 0?p:q!==void 0?b-q-f.width:r!==void 0?Math.round(b*.5+r-f.width*.5):0;f.y=u!==void 0&&v!==void 0?Math.round(u+(c-v-u-f.height)*.5):u!==void 0?u:v!==void 0?c-v-f.height:w!==void 0?Math.round(c*.5+w-f.height*.5):0}};return h}(k)});
define("tdv/view/containers/layout/GridLayout",["require","exports","tdv/view/constants/Alignment","tdv/view/containers/layout/Layout","tdv/view/containers/layout/MeasureResult"],function(a,l,k,n,g){return function(h){function e(){var b=h.call(this)||this;b.Io=void 0;b.AC=void 0;b.ZR=void 0;b.Cy=void 0;b.By=void 0;b.jH=void 0;b.WR=void 0;b.VR=void 0;b.UR=void 0;b.fva=void 0;b.ACa=void 0;return b}O(e,h);e.prototype.Rhb=function(b){this.Io!=b&&(this.Io=b,this.rh())};e.prototype.hib=function(b){this.Cy!=
b&&(this.Cy=b,this.Cy!=void 0&&(this.AC=void 0),this.rh())};e.prototype.gib=function(b){this.By!=b&&(this.By=b,this.By!=void 0&&(this.ZR=void 0),this.rh())};e.prototype.oib=function(b){this.AC!=b&&(this.AC=b,this.Cy!=void 0&&(this.Cy=void 0),this.rh())};e.prototype.nib=function(b){this.ZR!=b&&(this.ZR=b,this.By!=void 0&&(this.By=void 0),this.rh())};e.prototype.mib=function(b){this.jH!=b&&(this.jH=b,this.rh())};e.prototype.lib=function(b){this.WR!=b&&(this.WR=b,this.rh())};e.prototype.kib=function(b){this.VR!=
b&&(this.VR=b,this.rh())};e.prototype.jib=function(b){this.UR!=b&&(this.UR=b,this.rh())};e.prototype.measure=function(){for(var b=new g,c=this.f0(),d=0,f=0;f<c.length;f++)c[f].Mo&&d++;if(!isNaN(this.AC))for(isNaN(this.jH)||(b.minWidth=this.jH),f=0;f<c.length;f++){var m=c[f].dw();isNaN(m)||(b.minWidth=Math.max(m,b.minWidth))}if(isNaN(this.Cy))for(f=0;f<c.length;f++)m=c[f].hw(),isNaN(m)||(b.width=Math.max(m,b.width));else b.width=this.Cy;if(isNaN(this.By))for(f=0;f<c.length;f++)m=c[f].gw(),isNaN(m)||
(b.height=Math.max(m,b.height));else b.height=this.By;c=isNaN(this.AC)?!isNaN(this.Io)&&this.cc?Math.max(1,Math.floor((this.Io-this.cc.u.Bd-this.cc.u.ze+this.uy)/(b.width+this.uy))):Math.ceil(Math.sqrt(d)):Math.max(1,Math.floor(100/this.AC));d=Math.ceil(d/c);this.cc&&(b.width=b.width*c+Math.max(0,c-1)*this.uy+this.cc.u.Bd+this.cc.u.ze,b.minWidth=b.minWidth+this.cc.u.Bd+this.cc.u.ze,b.height=b.height*d+Math.max(0,d-1)*this.wI+this.cc.u.ee+this.cc.u.Cf);b.minHeight=0;return b};e.prototype.UU=function(b){if(this.cc){for(var c,
d,f=[],m=[],p=0;p<b.length;p++)d=b[p].ce,d.Mo?f.push(b[p]):m.push(b[p]);var q=f.length,r=this.cc.Uh();c=this.uy;if(isNaN(this.Cy))if(isNaN(this.AC)){for(p=b=0;p<f.length;p++)d=f[p].ce,b=Math.max(d.dw(),d.hw(),b);b=Math.min(r,b)}else b=Math.max(1,Math.floor(100/this.AC)),b=(r-(b-1)*c)/b,p=!1,!isNaN(this.VR)&&this.VR<b&&(b=this.VR,p=!0),!isNaN(this.jH)&&this.jH>b&&(b=this.jH,p=!0),p&&(b=Math.max(1,Math.floor((r+c)/(b+c))),b=(r-(b-1)*c)/b);else b=this.Cy;b=Math.max(1,b);var t=Math.max(1,Math.floor(.001+
(r+c)/(b+c)));var u=t*b,v=t*(b+c)-c;p=0;if(r>=v)switch(this.BO()){case k.Db:p=r-v;break;case k.Ye:p=Math.round((r-v)*.5);break;default:p=0}r=[];v=[];for(var w=0;w<t;w++)d=Math.round(u/(t-w)),u-=d,v.push(p),p+=d+c,r.push(d);w=this.cc.Th();c=this.wI;if(isNaN(this.By))if(isNaN(this.ZR))for(u=1,p=0;p<f.length;p++)d=f[p].ce,u=Math.max(d.iA(),d.gw(),u);else u=Math.max(1,100/this.ZR),u=(w-(u-1)*c)/u,p=!1,!isNaN(this.UR)&&this.UR<u&&(u=this.UR,p=!0),!isNaN(this.WR)&&this.WR>u&&(u=this.WR,p=!0),p&&(u=Math.max(1,
Math.floor((w+c)/(u+c))),u=(w-(u-1)*c)/u);else u=this.By;q=Math.max(1,Math.ceil(q/t));p=q*u;d=q*(u+c)-c;var y=0;if(w>=d)switch(this.DO()){case k.Fc:y=w-d;break;case k.Xd:y=Math.round((w-d)*.5);break;default:y=0}d=[];for(var x=[],z=0;z<q;z++)w=Math.round(p/(q-z)),p-=w,x.push(y),y+=w+c,d.push(w);for(p=0;p<f.length;p++)c=f[p],w=p%t,z=Math.floor(p/t),c.x=v[w],c.width=r[w],c.y=x[z],c.height=d[z];for(p=0;p<m.length;p++)c=m[p],c.x=0,c.width=Math.round(b),c.y=0,c.height=Math.round(u);this.fva=t;this.ACa=
q}};return e}(n)});
define("tdv/view/containers/layout/HorizontalLayout",["require","exports","tdv/view/constants/Alignment","tdv/view/containers/layout/Layout","tdv/view/containers/layout/MeasureResult"],function(a,l,k,n,g){return function(h){function e(){return h.call(this)||this}O(e,h);e.prototype.measure=function(){for(var b=new g,c=this.f0(),d=0;d<c.length;d++){var f=c[d];b.height=Math.max(f.gw(),b.height);b.minHeight=Math.max(f.iA(),b.minHeight);b.width+=f.hw();b.minWidth+=f.dw()}this.cc&&(c=Math.max(0,c.length-
1)*this.uy+this.cc.u.Bd+this.cc.u.ze,b.width+=c,b.minWidth+=c,c=this.cc.u.ee+this.cc.u.Cf,b.height+=c,b.minHeight+=c);return b};e.prototype.UU=function(b){this.Yja(b);this.Xja(b)};e.prototype.Yja=function(b){if(this.cc){for(var c=0,d=0;d<b.length;d++)b[d].ce.Mo&&c++;var f=this.cc.Uh()-Math.max(0,c-1)*this.uy,m=this.cc.Th();c=f;var p=0,q=[];for(d=0;d<b.length;d++){var r=b[d],t=r.ce,u=t.ep;r.height=u!==void 0?Math.max(t.iA(),Math.min(t.v6(),Math.round(m*u*.01))):t.gw();u=t.fp;u!==void 0?t.Mo?(p+=u,
q.push(r)):r.width=Math.max(t.dw(),Math.min(t.w6(),Math.round(f*u*.01))):(r.width=t.hw(),c-=r.width)}c-=Math.max(0,c-Math.round(f*p*.01));do{b=!1;f=Math.max(0,p>0?c/p:0);m=[];for(d=p=0;d<q.length;d++){r=q[d];t=r.ce;u=Math.round(t.fp*f);var v=t.dw(),w=t.w6();u<v?(r.width=v,c-=r.width,b=!0):u>w?(r.width=w,c-=r.width,b=!0):(p+=t.fp,m.push(r))}q.length=0;q.push.apply(q,m)}while(b);for(d=0;d<q.length;d++)r=q[d],t=r.ce,f=Math.max(0,p>0?c/p:0),r.width=Math.round(t.fp*f),c-=r.width,p-=t.fp}};e.prototype.Xja=
function(b){if(this.cc){for(var c=this.uy,d=this.cc.Uh(),f=this.cc.Th(),m=0,p=0,q=0;q<b.length;q++){var r=b[q];r.ce.Mo&&(m+=b[q].width,p++)}m+=c*(p-1);if(d>=m)switch(this.BO()){case k.Db:d-=m;break;case k.Ye:d=Math.round((d-m)*.5);break;default:d=0}else d=0;for(q=0;q<b.length;q++)if(r=b[q],r.ce.Mo){if(f>=r.height)switch(this.DO()){case k.Fc:r.y=f-r.height;break;case k.Xd:r.y=Math.round((f-r.height)*.5);break;default:r.y=0}else r.y=0;r.x=d;d+=r.width+c}else r.x=0,r.y=0}};return e}(n)});
define("tdv/view/containers/layout/VerticalLayout",["require","exports","tdv/view/constants/Alignment","tdv/view/containers/layout/Layout","tdv/view/containers/layout/MeasureResult"],function(a,l,k,n,g){return function(h){function e(){return h.call(this)||this}O(e,h);e.prototype.measure=function(){for(var b=new g,c=this.f0(),d=0;d<c.length;d++){var f=c[d];b.width=Math.max(f.hw(),b.width);b.minWidth=Math.max(f.dw(),b.minWidth);b.height+=f.gw();b.minHeight+=f.iA()}this.cc&&(c=Math.max(0,c.length-1)*
this.wI+this.cc.u.ee+this.cc.u.Cf,b.height+=c,b.minHeight+=c,c=this.cc.u.Bd+this.cc.u.ze,b.width+=c,b.minWidth+=c);return b};e.prototype.UU=function(b){this.Yja(b);this.Xja(b)};e.prototype.Yja=function(b){if(this.cc){for(var c=0,d=0;d<b.length;d++)b[d].ce.Mo&&c++;var f=this.cc.Uh(),m=this.cc.Th()-Math.max(0,c-1)*this.wI;c=m;var p=0,q=[];for(d=0;d<b.length;d++){var r=b[d],t=r.ce,u=t.fp;r.width=u!==void 0?Math.max(t.dw(),Math.min(t.w6(),Math.round(f*u*.01))):t.hw();u=t.ep;u!==void 0?t.Mo?(p+=u,q.push(r)):
r.height=Math.max(t.iA(),Math.min(t.v6(),Math.round(m*u*.01))):(r.height=t.gw(),c-=r.height)}c-=Math.max(0,c-Math.round(m*p*.01));do{b=!1;f=Math.max(0,p>0?c/p:0);m=[];for(d=p=0;d<q.length;d++){r=q[d];t=r.ce;u=Math.round(t.ep*f);var v=t.iA(),w=t.v6();u<v?(r.height=v,c-=r.height,b=!0):u>w?(r.height=w,c-=r.height,b=!0):(p+=t.ep,m.push(r))}q.length=0;q.push.apply(q,m)}while(b);for(d=0;d<q.length;d++)r=q[d],t=r.ce,f=Math.max(0,p>0?c/p:0),r.height=Math.round(t.ep*f),c-=r.height,p-=t.ep}};e.prototype.Xja=
function(b){if(this.cc){for(var c=this.wI,d=this.cc.Th(),f=this.cc.Uh(),m=0,p=0,q=0;q<b.length;q++){var r=b[q];r.ce.Mo&&(m+=r.height,r.width>f&&(f=r.width),p++)}m+=c*(p-1);if(d>=m)switch(this.DO()){case k.Fc:d-=m;break;case k.Xd:d=Math.round((d-m)*.5);break;default:d=0}else d=0;for(q=0;q<b.length;q++)if(r=b[q],r.ce.Mo){switch(this.BO()){case k.Db:r.x=f-r.width;break;case k.Ye:r.x=Math.round((f-r.width)*.5);break;default:r.x=0}r.y=d;d+=r.height+c}else r.x=0,r.y=0}};return e}(n)});
define("tdv/view/containers/BaseContainer","require exports tdv/utils tdv/view/core/UIComponent tdv/view/constants/Alignment tdv/view/constants/CreationPolicy tdv/view/constants/LayoutMode tdv/view/containers/layout/AbsoluteLayout tdv/view/containers/layout/GridLayout tdv/view/containers/layout/HorizontalLayout tdv/view/containers/layout/VerticalLayout".split(" "),function(a,l,k,n,g,h,e,b,c,d,f){return function(m){function p(){var q=m.call(this)||this;q.df("BaseContainer");q.an=null;q.oe=[];q.$p=
[];q.v_=h.yra;q.mwa=[];q.set("contentOpaque",!1);return q}O(p,m);p.prototype.Ob=function(){this.Gl(p.bd)};p.prototype.set=function(q,r){q=="children"?this.Zh(r):q=="creationPolicy"?this.Hhb(r):n.prototype.set.call(this,q,r)};p.prototype.get=function(q,r){return q=="children"?this.Cb():q=="creationPolicy"?this.v_:n.prototype.get.call(this,q,r)};p.prototype.Hhb=function(q){this.v_!=q&&(this.v_=q,this.w4())};p.prototype.Zh=function(q){var r=this.Cb(),t=q||[],u=r.filter(function(v){return!t.includes(v)});
for(q=0;q<u.length;q++)this.removeChild(u[q]);u=t.filter(function(v){return!r.includes(v)});for(q=0;q<u.length;q++)this.mb(u[q]);for(q=0;q<t.length;q++)this.gr(t[q],q)};p.prototype.Cb=function(){return this.oe};p.prototype.mb=function(q){q.getParent()&&q.getParent().removeChild(q);this.oe.push(q);q.Ia=this;this.eua(q);q.Oia(this.u.rJ);this.$p.push(q);this.w4();q.Vr()};p.prototype.removeChild=function(q){q.getParent()==this&&(q.hp(),q.Ia=null,this.$p.includes(q)?this.$p=this.$p.filter(function(r){return r!==
q}):(this.va().removeChild(q.va()),q.FD(),this.kc(),this.yf()),this.oe=this.oe.filter(function(r){return r!==q}),q.lia())};p.prototype.ZNa=function(){var q=this;this.Cb().forEach(function(r){q.removeChild(r)})};p.prototype.zma=function(q){return this.oe.indexOf(q)};p.prototype.gr=function(q,r){var t=this.zma(q);if(t<0)throw"Can't set index. This is not a child of this container";var u=this.oe.slice();u.splice(t,1);u.splice(r,0,q);if(!k.tna(this.oe,u)&&(this.oe=u,!this.$p.includes(q))){r=this.zma(q);
this.va().removeChild(q.va());u=t=null;for(var v=r-1;v>=0&&!t;v--)this.$p.includes(this.oe[v])||(t=this.oe[v]);for(v=r+1;v<this.oe.length&&!u&&!t;v++)this.$p.includes(this.oe[v])||(u=this.oe[v]);t?this.va().GKa(q.va(),t.va()):u?this.va().HKa(q.va(),u.va()):this.va().appendChild(q.va());this.yf()}};p.prototype.bI=function(q){m.prototype.bI.call(this,q);this.KEa()};p.prototype.KEa=function(){this.oe.forEach(function(q){this.eua(q)}.bind(this))};p.prototype.eua=function(q){q.set("inheritedInteractionEnabled",
this.G("interactionEnabled")&&this.G("inheritedInteractionEnabled")&&this.G("childrenInteractionEnabled"))};p.prototype.TJ=function(q){var r=this;m.prototype.TJ.call(this,q);this.oe&&this.oe.forEach(function(t){t.Oia(r.u.rJ)})};p.prototype.Dba=function(q){m.prototype.Dba.call(this,q);this.Cb().forEach(function(r){r.Iz()});this.w4()};p.prototype.C0a=function(){return!!(this.BI&&this.OR&&this.Vb())};p.prototype.ao=function(q,r,t,u){m.prototype.ao.call(this,q,r,t,u);this.mwa=u;this.w4()};p.prototype.FD=
function(){var q=this;m.prototype.FD.call(this);this.Cb().forEach(function(r){q.$p.includes(r)||(q.va().removeChild(r.va()),r.FD())});this.$p=this.Cb()};p.prototype.w4=function(){var q=this;this.C0a()&&(this.v_!=h.yra||this.zy)&&this.$p.length!=0&&(this.$p.forEach(function(r){var t;r.Z6(q.BI,q.OR)?(r.ao(q.Vb(),q.BI,q.OR,q.mwa),q.va().appendChild(r.va())):console.error("Child of class "+r.gA()+" is not compatible with visuals type: "+((t=q.BI)===null||t===void 0?void 0:t.getType()))}),this.$p=[],this.kc(),
this.yf())};p.prototype.XX=function(q){this.an!=q&&(this.an&&this.an.wPa(null),(this.an=q)&&this.an.wPa(this))};p.prototype.jb=function(){var q=!1,r=this.G("layout");if(this.S("layout")){switch(r){case e.uB:this.XX(new c);break;case e.bi:this.XX(new d);break;case e.ck:this.XX(new f);break;default:this.XX(new b)}this.$("layout");q=!0}var t=this.an;if(this.S("horizontalAlign")||q)t.wP(this.G("horizontalAlign")),this.$("horizontalAlign");if(this.S("verticalAlign")||q)t.CP(this.G("verticalAlign")),this.$("verticalAlign");
if(this.S("gap")||q)r==e.uB?(t.ZOa(this.G("gap")),t.h9(this.G("gap"))):r==e.bi?t.ZOa(this.G("gap")):r==e.ck&&t.h9(this.G("gap")),this.$("gap");if(r==e.uB){if(this.S("itemWidth")||q){var u=this.G("itemWidth"),v=n.wp(u);v!==void 0?t.oib(v):t.hib(u);this.$("itemWidth")}if(this.S("itemHeight")||q)u=this.G("itemHeight"),v=n.wp(u),v!==void 0?t.nib(v):t.gib(u),this.$("itemHeight");this.S("itemMinWidth")&&(t.mib(this.G("itemMinWidth")),this.$("itemMinWidth"));this.S("itemMinHeight")&&(t.lib(this.G("itemMinHeight")),
this.$("itemMinHeight"));this.S("itemMaxWidth")&&(t.kib(this.G("itemMaxWidth")),this.$("itemMaxWidth"));this.S("itemMaxHeight")&&(t.jib(this.G("itemMaxHeight")),this.$("itemMaxHeight"))}this.S("childrenInteractionEnabled")&&(this.$("childrenInteractionEnabled"),this.KEa());this.Qc(["cursor"],{cursor:"inheritedCursor"},this.oe,!0,!1);n.prototype.jb.call(this);r==e.uB&&t.Rhb(this.Io)};p.prototype.Qc=function(q,r,t,u,v){for(var w=0;w<q.length;w++){var y=q[w];if(!u||this.S(y)){for(var x=0;x<t.length;x++)t[x].set(r[y]?
r[y]:y,this.G(y));v&&this.$(y)}}};p.prototype.Jy=function(){if(this.an){var q=this.an.measure();this.fn=q.width;this.dn=q.height;this.oS=q.minWidth;this.nS=q.minHeight}else m.prototype.Jy.call(this)};p.prototype.Lk=function(){this.an&&this.an.update();n.prototype.Lk.call(this)};p.bd=Object.assign({},n.bd,{children:[[]],childrenInteractionEnabled:!0,gap:0,horizontalAlign:g.eb,itemHeight:void 0,itemMaxHeight:void 0,itemMaxWidth:void 0,itemMinHeight:void 0,itemMinWidth:void 0,itemWidth:void 0,layout:e.MY,
verticalAlign:g.Tc});return p}(n)});define("tdv/view/core/visuals/Visuals",["require","exports","tdv/events/EventDispatcher"],function(a,l,k){return function(n){function g(){var h=n.call(this)||this;h.L=h.np();return h}O(g,n);g.prototype.np=function(){throw Error("Not implemented");};g.prototype.iQa=function(h){var e=this;Object.keys(h).forEach(function(b){e.L[b]=h[b]})};return g}(k)});
define("tdv/view/core/visuals/util",["require","exports"],function(){var a={TGa:function(l){var k=[];if(l.wk&&l.wk.length>0){var n=l.wk.slice();n=[].concat([n[0]],n,[n[n.length-1]]);l=a.S$a(l);l=[].concat([0],l,[1]);for(var g=0;g<n.length;g++){var h=l[g];h>=0&&k.push({color:n[g],ratio:h})}for(g=0;g<k.length-1;)k[g].ratio==k[g+1].ratio&&k[g].color==k[g+1].color?k.splice(g,1):g++;for(g=1;g<k.length-1;)k[g-1].ratio==k[g+1].ratio?k.splice(g,1):g++}return k},S$a:function(l){var k=l.wk.length;for(l=l.m5&&
l.wk.length>0?l.m5.map(function(n){return Math.min(1,Math.max(0,n))}):k==1?[.5]:Array.from({length:k}).map(function(n,g){return 1*g/(k-1)});l.length<k;)l.push(1);l.length>k&&l.splice(k,l.length-k);return l}};return a});
define("tdv/view/core/visuals/dom/DOMUIBaseVisuals","require exports tdv/view/constants/GradientDirection tdv/view/core/visualprops/UIBaseVisualProperties tdv/view/core/ZIndex tdv/view/core/visuals/Visuals tdv/view/core/visuals/util tdv/utils".split(" "),function(a,l,k,n,g,h,e,b){return function(c){function d(){var f=c.call(this)||this;f.element=null;f.Ik=null;f.Fe=null;f.Bh=null;f.vl=null;f.Vv=null;f.kIa=!1;return f}O(d,c);d.prototype.np=function(){return new n};d.prototype.vk=function(f){this.ND().appendChild(f)};
d.prototype.z8=function(f){this.ND().removeChild(f)};d.prototype.appendChild=function(f){this.ND().appendChild(f.bc())};d.prototype.GKa=function(f,m){this.ND().insertBefore(f.bc(),m.bc().nextSibling)};d.prototype.HKa=function(f,m){this.ND().insertBefore(f.bc(),m.bc())};d.prototype.removeChild=function(f){f=f.bc();f.parentElement==this.ND()&&this.ND().removeChild(f)};d.prototype.bc=function(){this.element||(this.element=document.createElement("div"),this.element.style.height="0",this.element.style.margin=
"0",this.element.style.padding="0",this.element.style.position="absolute",this.element.style.overflow="hidden",this.element.style.display="block",this.element.style.visibility="hidden",this.element.style.width="0",this.element.style.zIndex=g.eta);return this.element};d.prototype.EJa=function(f){var m=b.offset(this.element);f=b.offset(f.bc());return{left:m.left-f.left,top:m.top-f.top}};d.prototype.pdb=function(){this.Ik||(this.Ik=document.createElement("div"),this.Ik.setAttribute("tdvlayer","shadow"),
this.Ik.style.position="absolute",this.Ik.style.left="0",this.Ik.style.top="0",this.Ik.style.right="0",this.Ik.style.bottom="0",this.Ik.style.zIndex=g.KTa);return this.Ik};d.prototype.Rma=function(){this.Bh||(this.Bh=document.createElement("div"),this.Bh.setAttribute("tdvlayer","overShadow"),this.Bh.style.cursor="inherit",this.Bh.style.height="0",this.Bh.style.left="0",this.Bh.style.position="absolute",this.Bh.style.top="0",this.Bh.style.width="0",this.Bh.style.zIndex=g.Bsa);return this.Bh};d.prototype.ncb=
function(){this.Fe||(this.Fe=document.createElement("canvas"),this.Fe.setAttribute("tdvlayer","background"),this.Fe.style.cursor="inherit",this.Fe.style.display="none",this.Fe.style.left="0",this.Fe.style.position="absolute",this.Fe.style.top="0",this.Fe.style.userSelect="none",this.Fe.style["-webkit-user-select"]="none",this.Fe.style.zIndex=g.d$);return this.Fe};d.prototype.IJa=function(){this.vl||(this.vl=document.createElement("div"),this.vl.setAttribute("tdvlayer","content"),this.vl.style.position=
"absolute",this.vl.style.cursor="inherit",this.vl.style.inset="0",this.vl.style.overflow="visible",this.vl.style.zIndex=g.vra);return this.vl};d.prototype.ND=function(){this.Vv||(this.Vv=document.createElement("div"),this.Vv.style.cursor="inherit",this.Vv.style.inset="0",this.Vv.style.position="absolute");return this.Vv};d.prototype.Rkb=function(){this.kIa||(this.kIa=!0,this.Vz())};d.prototype.Vz=function(){this.bc().appendChild(this.pdb());this.bc().appendChild(this.Rma());this.Rma().appendChild(this.ncb());
this.Rma().appendChild(this.IJa());this.IJa().appendChild(this.ND())};d.prototype.update=function(f){this.Rkb();this.nh(f);this.iQa(f)};d.prototype.nh=function(f){this.$kb(f);this.mK(f);this.mlb(f);this.Dkb(f);this.fra(f)};d.prototype.$kb=function(f){this.L.id!==f.id&&(f.id?this.element.setAttribute("id",f.id.toString()):this.element.removeAttribute("id"));this.L.className!==f.className&&(f.className?this.element.setAttribute("tdvclass",f.className):this.element.removeAttribute("tdvclass"));this.L.tabIndex!==
f.tabIndex&&(f.tabIndex!==void 0?this.element.setAttribute("tabIndex",f.tabIndex.toString()):this.element.removeAttribute("tabIndex"));this.L.ariaLabel!==f.ariaLabel&&(f.ariaLabel?this.element.setAttribute("aria-label",f.ariaLabel):this.element.removeAttribute("aria-label"));this.L.VN!==f.VN&&(f.VN?this.element.setAttribute("aria-role",f.VN):this.element.removeAttribute("aria-role"));this.L.rJ!==f.rJ&&(f.rJ?(this.Bh.style.zIndex=g.Bsa,this.vl.style.zIndex=g.vra):(this.Bh.style.zIndex=g.qTa,this.vl.style.zIndex=
g.$Ra));this.L.oX!==f.oX&&(this.element.style.zIndex=f.oX?g.eta:g.cUa);this.L.cursor!==f.cursor&&(this.element.style.cursor=f.cursor)};d.prototype.mK=function(f){this.L.opacity!==f.opacity&&(this.element.style.opacity=f.opacity.toString());if(this.L.x!==f.x||this.L.y!==f.y||this.L.width!==f.width||this.L.height!==f.height||this.L.offsetX!==f.offsetX||this.L.offsetY!==f.offsetY||this.L.visible!==f.visible)f.visible?(this.Bh.style.width=f.width+"px",this.Bh.style.height=f.height+"px",this.element.style.left=
(f.x||0)+f.offsetX+"px",this.element.style.top=(f.y||0)+f.offsetY+"px",this.element.style.width=f.width+"px",this.element.style.height=f.height+"px",this.element.style.visibility="inherit",this.element.style.overflow="visible",f.visible&&this.Bh.clientWidth===0&&f.width!=0&&(this.element.style.width="0",this.element.style.width=f.width+"px")):(this.element.style.visibility="hidden",this.element.style.width="0",this.element.style.height="0",this.element.style.overflow="hidden",this.Bh.style.width=
"0",this.Bh.style.height="0")};d.prototype.fra=function(f){this.L.yw!==f.yw&&(this.vl.style.overflow=f.yw?"visible":"hidden",this.Vv.style.right=f.yw?"0":"initial",this.Vv.style.bottom=f.yw?"0":"initial");this.L.Bd!==f.Bd&&(this.vl.style.left=f.Bd+"px");this.L.ee!==f.ee&&(this.vl.style.top=f.ee+"px");this.L.ze!==f.ze&&(this.vl.style.right=f.ze+"px");this.L.Cf!==f.Cf&&(this.vl.style.bottom=f.Cf+"px");this.L.Mc!==f.Mc&&(this.Vv.style.left=-f.Mc+"px");this.L.Nc!==f.Nc&&(this.Vv.style.top=-f.Nc+"px")};
d.prototype.mlb=function(f){if(this.L.borderTopLeftRadius!==f.borderTopLeftRadius||this.L.borderTopRightRadius!==f.borderTopRightRadius||this.L.borderBottomLeftRadius!==f.borderBottomLeftRadius||this.L.borderBottomRightRadius!==f.borderBottomRightRadius||this.L.VA!==f.VA||this.L.bu!==f.bu||this.L.cu!==f.cu||this.L.bo!==f.bo||this.L.$J!==f.$J||this.L.shadowColor!==f.shadowColor||this.L.Ow!==f.Ow){var m=f.bu+"px "+f.cu+"px "+f.bo+"px "+f.$J+"px "+f.shadowColor;this.Ik.style.display=f.VA?"block":"none";
this.Ik.style.boxShadow=m;this.Ik.style.borderTopLeftRadius=f.borderTopLeftRadius+"px";this.Ik.style.borderTopRightRadius=f.borderTopRightRadius+"px";this.Ik.style.borderBottomLeftRadius=f.borderBottomLeftRadius+"px";this.Ik.style.borderBottomRightRadius=f.borderBottomRightRadius+"px";this.Ik.style.opacity=f.Ow.toString()}};d.prototype.Dkb=function(f){if(this.L.width!==f.width||this.L.height!==f.height||this.L.wk!==f.wk||this.L.BD!==f.BD||this.L.om!==f.om||this.L.Oe!==f.Oe||this.L.borderLeftColor!==
f.borderLeftColor||this.L.Pe!==f.Pe||this.L.borderTopColor!==f.borderTopColor||this.L.vf!==f.vf||this.L.borderRightColor!==f.borderRightColor||this.L.uf!==f.uf||this.L.borderBottomColor!==f.borderBottomColor||this.L.Pv!==f.Pv||this.L.visible!==f.visible){var m=f.wk&&f.wk.length>0,p=!!f.Pv,q=f.Oe>0&&f.borderLeftColor||f.Pe>0&&f.borderTopColor||f.vf>0&&f.borderRightColor||f.uf>0&&f.borderBottomColor;if(f.visible&&(m||p||q)){q=Math.max(0,f.width-(f.Oe+f.vf));var r=Math.max(0,f.height-(f.Pe+f.uf));this.Fe.width=
q;this.Fe.height=r;var t=this.Fe.getContext("2d");if(m){m=e.TGa(f);var u=f.BD==k.kZ?t.createLinearGradient(0,0,q,0):t.createLinearGradient(0,0,0,r);m.forEach(function(v){u.addColorStop(v.ratio,v.color)});t.fillStyle=u;t.fillRect(0,0,q,r)}else t.clearRect(0,0,q,r);p&&t.drawImage(f.Pv,0,0,q,r);this.Fe.style.opacity=f.om.toString();this.Fe.style.borderTopLeftRadius=f.borderTopLeftRadius+"px";this.Fe.style.borderTopRightRadius=f.borderTopRightRadius+"px";this.Fe.style.borderBottomLeftRadius=f.borderBottomLeftRadius+
"px";this.Fe.style.borderBottomRightRadius=f.borderBottomRightRadius+"px";this.Fe.style.borderLeft=this.h6(f.Oe,f.borderLeftColor);this.Fe.style.borderTop=this.h6(f.Pe,f.borderTopColor);this.Fe.style.borderRight=this.h6(f.vf,f.borderRightColor);this.Fe.style.borderBottom=this.h6(f.uf,f.borderBottomColor);this.Fe.style.width=q+"px";this.Fe.style.height=r+"px";this.Fe.style.display="block";this.Fe.clientWidth===0&&this.Fe.width!==0&&(this.Fe.style.width="0",this.Fe.style.width=this.Fe.width+"px")}else this.Fe.style.display=
"none"}};d.prototype.h6=function(f,m){return f>0?m?f+"px solid "+m:f+"px solid transparent":"none"};return d}(h)});define("tdv/view/core/visualprops/ContainerVisualProperties",["require","exports","tdv/view/core/visualprops/UIBaseVisualProperties"],function(a,l,k){return function(n){function g(){var h=n!==null&&n.apply(this,arguments)||this;h.contentHeight=0;h.contentWidth=0;h.Dk=!1;h.Ug=0;h.zf=0;h.Vt="#000000";h.Wt=.5;h.mh=10;h.Vn=5;h.Wn=5;h.Mk=!1;return h}O(g,n);return g}(k)});
define("tdv/constants/Key",["require","exports"],function(){var a={bk:38,Ji:40,Db:39,eb:37,OK:32,Fp:65,pUa:90,so:87,oo:83,Kp:68,Q:81,E:69,rZ:187,nZ:189,aZ:27,ta:{}};a.ta.bk="ArrowUp";a.ta.Ji="ArrowDown";a.ta.Db="ArrowRight";a.ta.eb="ArrowLeft";a.ta.Fp="KeyA";a.ta.pUa="KeyZ";a.ta.so="KeyW";a.ta.oo="KeyS";a.ta.Kp="KeyD";a.ta.Q="KeyQ";a.ta.E="KeyE";a.ta.rZ="BracketRight";a.ta.nZ="Slash";a.ta.aZ="Escape";a.ta.OK="Space";a.ta.$Y="Enter";return a});
define("tdv/view/util/KeyboardControl",["require","exports","tdv/constants/EventName","tdv/constants/Key","tdv/events/EventDispatcher"],function(a,l,k,n,g){a=function(){function e(){}e.rp=function(){return document.activeElement&&document.activeElement!==document.body};e.Hcb=function(){return document.activeElement};e.Heb=function(b){return Array.isArray(b)?b.includes(document.activeElement):b==document.activeElement};e.kpa=function(b,c){b===void 0&&(b=void 0);c===void 0&&(c=void 0);this.Uj||(this.Uj=
document.createElement("div"));document.querySelectorAll("*[tabindex]").forEach(function(d){d.tabIndex>this.Uj.tabIndex&&(this.Uj.tabIndex=d.tabIndex+1)}.bind(this));document.body.appendChild(this.Uj);b!=void 0&&c!=void 0?(this.Uj.style.position="absolute",this.Uj.style.top=c+"px",this.Uj.style.left=b+"px",this.Uj.style.width="1px",this.Uj.style.height="1px"):(this.Uj.style.position="fixed",this.Uj.style.top="0",this.Uj.style.left="0",this.Uj.style.width="100%",this.Uj.style.height="100%");this.Uj.focus();
this.Uj.blur();document.body.removeChild(this.Uj);this.aW.m(k.V)};e.blur=function(){document.activeElement.blur()};e.ela=function(b){this.OV.push(b)};e.apa=function(b){b=this.OV.indexOf(b);b!=-1&&this.OV.splice(b,1)};e.w$a=function(b){this.MX.push(b)};e.bhb=function(b){b=this.MX.indexOf(b);b!=-1&&this.MX.splice(b,1)};e.jGa=function(b,c){this.ypa(b,c.map(function(d){return[d]}))};e.m$a=function(b,c){this.ypa(b,[c])};e.j$a=function(b,c,d,f){for(var m=[],p=0;p<d;p++)m.push(c.slice(p*f,(p+1)*f));this.ypa(b,
m)};e.ypa=function(b,c){this.Pla.set(b,new h(c))};e.$oa=function(b){this.Pla.delete(b)};e.uoa=function(b){if(b.code==n.ta.OK||b.code==n.ta.$Y){var c=this.JJa();c&&this.Bbb(c)}else b.code!=n.ta.aZ&&[n.ta.bk,n.ta.Ji,n.ta.Db,n.ta.eb].includes(b.code)&&this.Pla.forEach(function(d){d.Qdb()&&d.ecb(b.code)})};e.voa=function(b){b.code==n.ta.OK||b.code==n.ta.$Y?(b=this.JJa())?b.dispatchEvent(this.HHa("mouseup",b)):this.MX.length&&this.MX.pop()():b.code==n.ta.aZ&&(this.OV.length?this.OV.pop()():this.rp()&&
this.kpa())};e.hf=function(b){!b.isTrusted||b.target&&["BUTTON","INPUT","SELECT","TEXTAREA"].includes(b.target.tagName)||setTimeout(function(){this.kpa(b.pageX,b.pageY)}.bind(this),0)};e.Ifb=function(){this.aW.m(k.V)};e.Bbb=function(b){b.dispatchEvent(this.HHa("mousedown",b))};e.JJa=function(){return this.rp()?document.activeElement:null};e.HHa=function(b,c){c=c.getBoundingClientRect();return new window.MouseEvent(b,{clientX:c.left+c.width/2,clientY:c.top+c.height/2})};e.Va=function(){document.addEventListener("mouseup",
this.hf.bind(this),!0);document.addEventListener("keydown",this.uoa.bind(this),!0);document.addEventListener("keyup",this.voa.bind(this),!0);document.addEventListener("focusin",this.Ifb.bind(this),!0)};e.aW=new g;e.Uj=null;e.OV=[];e.MX=[];e.Pla=new Map;return e}();var h=function(){function e(b){b===void 0&&(b=[]);this.qO=b}e.prototype.Qdb=function(){return this.dJa()!=null};e.prototype.dJa=function(){for(var b=document.activeElement,c=0;c<this.qO.length;c++)for(var d=0;d<this.qO[c].length;d++)if(this.qO[c][d]==
b)return{qhb:c,Cab:d};return null};e.prototype.ecb=function(b){var c=this.dJa();if(c!=null){var d=0,f=0;switch(b){case n.ta.Db:d=1;break;case n.ta.eb:d=-1;break;case n.ta.bk:f=-1;break;case n.ta.Ji:f=1}b=c.qhb+f;b<0||b>=this.qO.length||(c=c.Cab+d,c<0||c>=this.qO[b].length||this.qO[b][c].focus())}};return e}();return a});
define("tdv/view/containers/ScrollableContainer","require exports tdv/constants/EventName tdv/events/Event tdv/view/constants/Alignment tdv/view/constants/OverflowPolicy tdv/view/constants/ScrollBarVisiblePolicy tdv/view/containers/BaseContainer tdv/view/core/visuals/dom/DOMUIBaseVisuals tdv/view/core/visualprops/ContainerVisualProperties tdv/view/util/Animation tdv/view/util/Ease tdv/view/util/EaseDimension tdv/view/util/KeyboardControl".split(" "),function(a,l,k,n,g,h,e,b,c,d,f,m,p,q){return function(r){function t(){var u=
r.call(this)||this;u.df("ScrollableContainer");u.pva=0;u.qva=0;u.hn=!1;u.jn=!1;u.Mmb=!1;u.Hmb=!1;u.Aia=!1;u.Ts=null;u.gha=h.Qra;u.CR=!1;u.gV=!1;u.Kha=void 0;u.Lha=void 0;return u}O(t,r);t.prototype.uL=function(){return new d};t.prototype.Iz=function(){r.prototype.Iz.call(this);this.zy?(q.aW.bind(k.V,this.Mga,this,!1),this.Mga()):q.aW.h(k.V,this.Mga,this)};t.prototype.Mga=function(){if(q.rp()){var u=this.va();u&&u instanceof c&&(u=this.Cb().map(function(v){return v.va().bc()}).indexOf(q.Hcb()),u!==
-1&&this.scrollIntoView(this.Cb()[u]))}};t.prototype.scrollIntoView=function(u){var v=u.cw(),w=u.fA();this.scrollTo(Math.min(v,Math.max(v+u.gb()-this.u.zf,this.u.Mc)),Math.min(w,Math.max(w+u.Kb()-this.u.Ug,this.u.Nc)))};t.prototype.scrollTo=function(u,v){var w=this.u.Mc;u>this.u.Mc?this.v5()&&(w=Math.min(u,this.u.contentWidth-this.u.zf)):u<this.u.Mc&&this.u5()&&(w=Math.max(u,0));u=this.u.Nc;v>this.u.Nc?this.dO()&&(u=Math.min(v,this.u.contentHeight-this.u.Ug)):v<this.u.Nc&&this.fO()&&(u=Math.max(v,
0));this.wU(w,u)};t.prototype.uOa=function(){if(this.dO()){for(var u=Math.max(0,this.u.contentHeight-this.u.Ug),v=Math.min(u,this.u.Nc+this.u.Ug*.5),w=u=Math.min(u,this.u.Nc+this.u.Ug),y=this.Cb().slice(),x=y.shift();y.length;x=y.shift())if(x.get("visible")){var z=x.fA();z+x.Kb()>this.u.Nc+this.u.Ug&&z>=v&&z<u&&z<w&&(w=z)}this.wU(this.u.Mc,w)}};t.prototype.dO=function(){return this.gO()&&this.u.Nc+this.u.Ug<this.u.contentHeight};t.prototype.yOa=function(){if(this.fO()){for(var u=Math.max(0,this.u.Nc-
this.u.Ug),v=Math.max(0,this.u.Nc-this.u.Ug*.5),w=u,y=this.Cb().slice(),x=y.shift();y.length;x=y.shift())if(x.get("visible")){var z=x.fA();x=z+x.Kb();z<this.u.Nc&&x>=u+this.u.Ug&&x<v+this.u.Ug&&x>w+this.u.Ug&&(w=x-this.u.Ug)}this.wU(this.u.Mc,w)}};t.prototype.fO=function(){return this.gO()&&this.u.Nc>0};t.prototype.xOa=function(){if(this.v5()){for(var u=Math.max(0,this.u.contentWidth-this.u.zf),v=Math.min(u,this.u.Mc+this.u.zf*.5),w=u=Math.min(u,this.u.Mc+this.u.zf),y=this.Cb().slice(),x=y.shift();y.length;x=
y.shift())if(x.get("visible")){var z=x.cw();z+x.gb()>this.u.Mc+this.u.zf&&z>=v&&z<u&&z<w&&(w=z)}this.wU(w,this.u.Nc)}};t.prototype.v5=function(){return this.eO()&&this.u.Mc+this.u.zf<this.u.contentWidth};t.prototype.scrollLeft=function(){if(this.u5()){for(var u=Math.max(0,this.u.Mc-this.u.zf),v=Math.max(0,this.u.Mc-this.u.zf*.5),w=u,y=this.Cb().slice(),x=y.shift();y.length;x=y.shift())if(x.get("visible")){var z=x.cw();x=z+x.gb();z<this.u.Mc&&x>=u+this.u.zf&&x<v+this.u.zf&&x>w+this.u.zf&&(w=x-this.u.zf)}this.wU(w,
this.u.Nc)}};t.prototype.u5=function(){return this.eO()&&this.u.Mc>0};t.prototype.wU=function(u,v){this.Kw(this.u.Mc!=u);this.Lw(this.u.Nc!=v);this.aV();this.C$a(u,v)};t.prototype.gO=function(){return this.gV&&this.u.Ug<this.u.contentHeight};t.prototype.eO=function(){return this.CR&&this.u.zf<this.u.contentWidth};t.prototype.Ob=function(){this.Gl(t.bd)};t.prototype.$O=function(u,v,w){var y=1,x=1;w=="content"?(y=this.u.contentWidth,x=this.u.contentHeight):w=="page"&&(y=this.u.zf,x=this.u.Ug);this.u.Mc+=
u*y;this.u.Nc+=v*x;this.sI()};t.prototype.C$a=function(u,v){var w=[];this.u.Mc!=u&&w.push(new p("hScrollPosition",this.u.Mc,u));this.u.Nc!=v&&w.push(new p("vScrollPosition",this.u.Nc,v));w.length!=0&&(this.Ts=new m("cubic_in_out",w,500),f.requestFrame(this.Uga,this))};t.prototype.mGa=function(u,v,w){var y=[];u&&y.push(new p("hScrollPosition",this.u.Mc,this.u.Mc+u));v&&y.push(new p("vScrollPosition",this.u.Nc,this.u.Nc+v));y.length==0?this.Ts||(this.Kw(!1),this.Lw(!1)):(this.Ts=new m("linear",y,w),
f.requestFrame(this.Uga,this))};t.prototype.Uga=function(u){if(this.Ts&&!this.Ts.Re()){this.Ts.Lb(u);var v=u=!1;this.Ts.jW("hScrollPosition")&&(this.u.Mc=this.Ts.nb("hScrollPosition"),u=this.u.Mc<0||this.u.Mc>this.u.contentWidth-this.u.zf?!1:!0);this.Ts.jW("vScrollPosition")&&(this.u.Nc=this.Ts.nb("vScrollPosition"),v=this.u.Nc<0||this.u.Nc>this.u.contentHeight-this.u.Ug?!1:!0);this.Kw(u);this.Lw(v);this.sI();f.requestFrame(this.Uga,this)}else this.Kw(!1),this.Lw(!1),this.Ts=null};t.prototype.sI=
function(u){if(u){if(!this.CR)switch(this.G("horizontalAlign")){case g.Db:this.u.Mc=this.u.contentWidth-this.u.zf;break;case g.Ye:this.u.Mc=(this.u.contentWidth-this.u.zf)/2;break;default:this.u.Mc=0}if(!this.gV)switch(this.G("verticalAlign")){case g.Fc:this.u.Nc=this.u.contentHeight-this.u.Ug;break;case g.Xd:this.u.Nc=(this.u.contentHeight-this.u.Ug)/2;break;default:this.u.Nc=0}}this.u.Mc=Math.max(0,Math.min(this.u.contentWidth-this.u.zf,this.u.Mc));this.u.Nc=Math.max(0,Math.min(this.u.contentHeight-
this.u.Ug,this.u.Nc));this.d6a(this.u.Mc);this.P6a(this.u.Nc);this.tb();if(this.Kha!=this.u.Mc||this.Lha!=this.u.Nc)this.Kha!==void 0&&this.Lha!==void 0&&this.m(new n(k.Pr)),this.Kha=this.u.Mc,this.Lha=this.u.Nc};t.prototype.ME=function(u){this.Aia!==u&&(this.Aia=u,this.aV())};t.prototype.Kw=function(u){this.hn!==u&&(this.hn=u,this.aV())};t.prototype.Lw=function(u){this.jn!==u&&(this.jn=u,this.aV())};t.prototype.aV=function(){var u=this.get("scrollBarVisible")==e.ALWAYS||this.hn||this.jn||this.Aia;
this.u.Dk=this.CR&&u;this.u.Mk=this.gV&&u;this.tb()};t.prototype.jb=function(){this.S("overflow")&&(this.gha=this.G("overflow"),this.$("overflow"),this.yf());this.S("scrollBarColor")&&(this.u.Vt=this.G("scrollBarColor"),this.$("scrollBarColor"));this.S("scrollBarWidth")&&(this.u.mh=this.G("scrollBarWidth"),this.$("scrollBarWidth"));if(this.S("scrollBarMargin")||this.S("scrollBarVerticalMargin")||this.S("scrollBarHorizontalMargin"))this.u.Vn=this.G("scrollBarHorizontalMargin","scrollBarMargin"),this.u.Wn=
this.G("scrollBarVerticalMargin","scrollBarMargin"),this.$("scrollBarMargin"),this.$("scrollBarVerticalMargin"),this.$("scrollBarHorizontalMargin");this.S("scrollBarOpacity")&&(this.u.Wt=this.G("scrollBarOpacity"),this.$("scrollBarOpacity"));r.prototype.jb.call(this)};t.prototype.Lk=function(){r.prototype.Lk.call(this);this.J8a();this.f9a();this.d9a();this.aV();this.tb()};t.prototype.J8a=function(){for(var u=0,v=0,w=0,y=0,x=this.Cb(),z=0;z<x.length;z++){var A=x[z];A.get("visible")&&(y=Math.min(y,
A.cw()),w=Math.min(w,A.fA()),u=Math.max(u,A.cw()+A.gb()),v=Math.max(v,A.fA()+A.Kb()))}this.pva=y;this.qva=w;this.u.contentWidth=u;this.u.contentHeight=v};t.prototype.f9a=function(){this.u.zf=Math.min(this.Uh(),this.u.contentWidth);this.u.Ug=Math.min(this.Th(),this.u.contentHeight)};t.prototype.d9a=function(){var u=this.oe.some(function(w){return w.Xdb()}),v=this.pva<0||this.qva<0||this.u.contentWidth>this.u.zf||this.u.contentHeight>this.u.Ug;this.gha==h.Pr?(this.CR=this.u.zf<this.u.contentWidth,this.gV=
this.u.Ug<this.u.contentHeight,this.hN(!v&&!u)):(this.gV=this.CR=!1,this.gha==h.QK?this.hN(!0):this.hN(!v&&!u));this.sI(!0)};t.bd=Object.assign({},b.bd,{overflow:h.QK,scrollBarColor:"#000000",scrollBarWidth:10,scrollBarMargin:5,scrollBarHorizontalMargin:void 0,scrollBarVerticalMargin:void 0,scrollBarOpacity:.5,scrollBarVisible:e.tc});return t}(b)});
define("tdv/view/containers/Container",["require","exports","tdv/view/containers/ScrollableContainer"],function(a,l,k){return function(n){function g(){var h=n.call(this)||this;h.df("Container");return h}O(g,n);return g}(k)});define("tdv/view/constants/Direction",["require","exports"],function(){return{ck:"vertical",bi:"horizontal"}});
define("tdv/view/core/visualprops/LabelVisualProperties",["require","exports","tdv/view/core/visualprops/UIBaseVisualProperties","tdv/view/constants/Alignment","tdv/view/constants/Direction"],function(a,l,k,n,g){return function(h){function e(){var b=h!==null&&h.apply(this,arguments)||this;b.direction=g.bi;b.tt=void 0;b.fontFamily=void 0;b.Z5=!1;b.fontSize=void 0;b.fontStyle="normal";b.fontWeight="normal";b.Vh=n.eb;b.verticalAlign=n.Xd;b.textDecoration="none";b.fu=0;b.gu=0;b.co=3;b.Qw=0;b.Pw="#000000";
b.text="";return b}O(e,h);return e}(k)});
define("tdv/view/util/Font",["require","exports"],function(){return function(){function a(){}a.cA=function(l){return l?l.split(",").map(function(k){return k.trim()}).filter(function(k){return k!=""}).map(function(k){k[0]!="'"&&k[0]!='"'&&(k="'"+k+"'");return k}).join(", "):""};a.A6=function(l){var k=[];l.fontStyle?k.push(l.fontStyle):k.push("normal");l.fontWeight?k.push(l.fontWeight):k.push("normal");l.fontSize?typeof l.fontSize==="number"?k.push(l.fontSize+"px"):k.push(l.fontSize):k.push("12px");
l.fontFamily?k.push(a.cA(l.fontFamily)):k.push("Arial");return k.join(" ")};return a}()});
define("tdv/view/text/Label","require exports tdv/utils tdv/view/constants/Alignment tdv/view/constants/Direction tdv/view/core/UIComponent tdv/view/core/visualprops/LabelVisualProperties tdv/view/util/Font".split(" "),function(a,l,k,n,g,h,e,b){a=function(d){function f(){var m=d.call(this)||this;m.Wfa=null;m.df("Label");m.hN(!1);return m}O(f,d);f.prototype.va=function(){return d.prototype.va.call(this)};f.prototype.uL=function(){return new e};f.prototype.Ob=function(){this.Gl(f.bd)};f.prototype.Jy=
function(){this.ju();d.prototype.Jy.call(this);this.fn=this.fJ()+this.u.Bd+this.u.ze;this.dn=this.eJ()+this.u.ee+this.u.Cf;c(this)};f.prototype.J3=function(m){this.u.text!==m&&(this.u.text=m,setTimeout(function(){this.kc();this.tb()}.bind(this),0))};f.prototype.L5a=function(m){this.u.direction!==m&&(this.u.direction=m,setTimeout(function(){this.kc();this.tb()}.bind(this),0))};f.prototype.T5a=function(m){this.u.fontFamily!==m&&(this.u.fontFamily=m,this.S6(),this.kc(),this.tb())};f.prototype.U5a=function(m){this.u.fontSize!==
m&&(k.TKa(m)?this.u.fontSize=m:k.qA(m)&&m.match(/^\d+(\.\d+)?px$/)?this.u.fontSize=parseFloat(m):this.u.fontSize=void 0,this.S6(),this.kc(),this.yf(),this.tb())};f.prototype.S5a=function(m){this.u.tt!==m&&(this.u.tt=m,this.tb())};f.prototype.W5a=function(m){if(this.u.fontWeight!==m){switch(m){case "bold":case "bolder":case "lighter":case "100":case "200":case "300":case "400":case "500":case "600":case "700":case "800":case "900":case "normal":break;default:m="normal"}this.u.fontWeight=m;this.S6();
this.kc();this.tb()}};f.prototype.V5a=function(m){if(this.u.fontStyle!==m){switch(m){case "italic":case "normal":break;default:m="normal"}this.u.fontStyle=m;this.S6();this.kc();this.tb()}};f.prototype.H6a=function(m){if(this.u.textDecoration!==m){switch(m){case "underline":case "overline":case "line-through":case "none":break;default:m="none"}this.u.textDecoration=m;this.kc();this.tb()}};f.prototype.c6a=function(m){this.u.Vh!==m&&(this.u.Vh=m,this.tb())};f.prototype.O6a=function(m){this.u.verticalAlign!==
m&&(this.u.verticalAlign=m,this.tb())};f.prototype.$Ca=function(m){this.u.Z5!==m&&(this.u.Z5=m,this.kc(),this.tb())};f.prototype.I6a=function(m,p,q,r,t){if(this.u.fu!==m||this.u.gu!==p||this.u.co!==q||this.u.Qw!==r||this.u.Pw!==t)this.u.fu=m,this.u.gu=p,this.u.co=q,this.u.Qw=r,this.u.Pw=t,this.tb()};f.prototype.jb=function(){var m=this;this.S("direction")&&(this.L5a(this.G("direction")),this.$("direction"));if(this.S("text")){var p=this.G("text");this.J3(p===void 0?"":p.toString());this.$("text")}this.S("fontFamily")&&
(this.T5a(this.G("fontFamily")),this.$("fontFamily"));this.S("fontSize")&&(this.U5a(this.G("fontSize")),this.$("fontSize"));this.S("fontColor")&&(this.S5a(this.G("fontColor")),this.$("fontColor"));this.S("fontWeight")&&(this.W5a(this.G("fontWeight")),this.$("fontWeight"));this.S("fontStyle")&&(this.V5a(this.G("fontStyle")),this.$("fontStyle"));this.S("textDecoration")&&(this.H6a(this.G("textDecoration")),this.$("textDecoration"));this.S("horizontalAlign")&&(this.c6a(this.G("horizontalAlign")),this.yf(),
this.$("horizontalAlign"));this.S("verticalAlign")&&(this.O6a(this.G("verticalAlign")),this.yf(),this.$("verticalAlign"));p=["textShadowColor","textShadowHorizontalLength","textShadowVerticalLength","textShadowBlurRadius","textShadowOpacity"];if(p.some(function(r){return m.S(r)})){var q={};p.forEach(function(r){q[r]=m.G(r);m.$(r)});this.I6a(q.textShadowHorizontalLength,q.textShadowVerticalLength,q.textShadowBlurRadius,q.textShadowOpacity,q.textShadowColor);this.hN((q.textShadowHorizontalLength>0||
q.textShadowVerticalLength>0||q.textShadowBlurRadius>0)&&q.textShadowOpacity>0)}d.prototype.jb.call(this)};f.prototype.S6=function(){var m=this,p=b.A6({fontSize:this.u.fontSize,fontFamily:this.u.fontFamily,fontWeight:this.u.fontWeight,fontStyle:this.u.fontStyle});this.Wfa!==p&&(this.$Ca(!1),this.Wfa=p,document.fonts.load(p).then(function(){m.Wfa===p&&m.$Ca(!0)}))};f.prototype.fJ=function(){return this.va().fJ()};f.prototype.eJ=function(){return this.va().eJ()};f.bd=Object.assign({},h.bd,{fontFamily:void 0,
fontSize:void 0,fontColor:void 0,fontWeight:void 0,fontStyle:void 0,horizontalAlign:n.eb,verticalAlign:n.Xd,direction:g.bi,text:"",textDecoration:void 0,textShadowBlurRadius:3,textShadowColor:"#000000",textShadowHorizontalLength:0,textShadowOpacity:0,textShadowVerticalLength:0});return f}(h);var c=function(){function d(){p||f()&&(p=setTimeout(function(){p=null;var q=(new Date).getTime()-5E3,r;for(r in m){var t=m[r];t.timestamp<q&&delete m[r];var u=t.label;if(t.width!=u.fJ()||t.height!=u.eJ())u.kc(),
u.yf()}d()},500))}function f(){for(var q in m)return!0;return!1}var m={},p=null;return function(q){m[q.YG]={label:q,timestamp:(new Date).getTime(),width:q.fJ(),height:q.eJ()};d()}}();return a});
define("tdv/view/buttons/BaseButton","require exports tdv/view/constants/CreationPolicy tdv/view/constants/Cursor tdv/constants/EventName tdv/events/Event tdv/view/buttons/ButtonGroup tdv/view/constants/ButtonMode tdv/view/constants/OverflowPolicy tdv/view/constants/State tdv/view/containers/Container tdv/view/text/Label".split(" "),function(a,l,k,n,g,h,e,b,c,d,f,m){var p="fontFamily fontSize fontColor fontWeight fontStyle textDecoration textShadowColor textShadowHorizontalLength textShadowVerticalLength textShadowBlurRadius textShadowOpacity".split(" "),
q={};p.forEach(function(r){q[r]=r});return function(r){function t(){var u=r.call(this)||this;u.df("Button");u.Xpa("Button");u.Xa=null;u.Aj=null;u.set("childrenInteractionEnabled",!1);u.set("contentOpaque",!0);u.set("creationPolicy",k.GK);u.set("overflow",c.Qra);u.set("autoRolledOver",!0);u.set("autoPressed",!0);u.set("cursor",n.mf);u.set("ariaRole","button");return u}O(t,r);t.prototype.Ob=function(){r.prototype.Ob.call(this);this.j("label");this.j("fontFamily");this.j("fontSize");this.j("fontColor");
this.j("fontWeight");this.j("fontStyle");this.j("textDecoration");this.j("textShadowBlurRadius");this.j("textShadowColor");this.j("textShadowHorizontalLength");this.j("textShadowOpacity");this.j("textShadowVerticalLength");this.j("layout","horizontal");this.j("iconWidth");this.j("iconHeight");this.j("iconBeforeLabel");this.j("gap",5);this.j("mode",b.Ze);this.j("buttonGroup");this.j("paddingLeft",5);this.j("paddingTop",5);this.j("paddingRight",5);this.j("paddingBottom",5);this.j("pressed");this.D("rollOverOpacity",
d.ga,"opacity");this.D("rollOverIconWidth",d.ga,"iconWidth");this.D("rollOverIconHeight",d.ga,"iconHeight");this.D("rollOverFontSize",d.ga,"fontSize");this.D("rollOverFontColor",d.ga,"fontColor");this.D("rollOverFontWeight",d.ga,"fontWeight");this.D("rollOverFontStyle",d.ga,"fontStyle");this.D("rollOverTextDecoration",d.ga,"textDecoration");this.D("rollOverTextShadowBlurRadius",d.ga,"textShadowBlurRadius");this.D("rollOverTextShadowColor",d.ga,"textShadowColor");this.D("rollOverTextShadowHorizontalLength",
d.ga,"textShadowHorizontalLength");this.D("rollOverTextShadowOpacity",d.ga,"textShadowOpacity");this.D("rollOverTextShadowVerticalLength",d.ga,"textShadowVerticalLength");this.D("rollOverBorderSize",d.ga,"borderSize");this.D("rollOverBorderLeftSize",d.ga,"borderLeftSize");this.D("rollOverBorderTopSize",d.ga,"borderTopSize");this.D("rollOverBorderRightSize",d.ga,"borderRightSize");this.D("rollOverBorderBottomSize",d.ga,"borderBottomSize");this.D("rollOverBorderColor",d.ga,"borderColor");this.D("rollOverBorderLeftColor",
d.ga,"borderLeftColor");this.D("rollOverBorderTopColor",d.ga,"borderTopColor");this.D("rollOverBorderRightColor",d.ga,"borderRightColor");this.D("rollOverBorderBottomColor",d.ga,"borderBottomColor");this.D("rollOverShadow",d.ga,"shadow");this.D("rollOverShadowHorizontalLength",d.ga,"shadowHorizontalLength");this.D("rollOverShadowVerticalLength",d.ga,"shadowVerticalLength");this.D("rollOverShadowBlurRadius",d.ga,"shadowBlurRadius");this.D("rollOverShadowSpread",d.ga,"shadowSpread");this.D("rollOverShadowOpacity",
d.ga,"shadowOpacity");this.D("rollOverShadowColor",d.ga,"shadowColor");this.D("rollOverBackgroundOpacity",d.ga,"backgroundOpacity");this.D("rollOverBackgroundColor",d.ga,"backgroundColor");this.D("rollOverBackgroundColorRatios",d.ga,"backgroundColorRatios");this.D("rollOverBackgroundColorDirection",d.ga,"backgroundColorDirection");this.D("pressedLabel",d.Nb,"label");this.D("pressedOpacity",d.Nb,"opacity");this.D("pressedIconWidth",d.Nb,"iconWidth");this.D("pressedIconHeight",d.Nb,"iconHeight");this.D("pressedFontSize",
d.Nb,"fontSize");this.D("pressedFontColor",d.Nb,"fontColor");this.D("pressedFontWeight",d.Nb,"fontWeight");this.D("pressedFontStyle",d.Nb,"fontStyle");this.D("pressedTextDecoration",d.Nb,"textDecoration");this.D("pressedTextShadowBlurRadius",d.Nb,"textShadowBlurRadius");this.D("pressedTextShadowColor",d.Nb,"textShadowColor");this.D("pressedTextShadowHorizontalLength",d.Nb,"textShadowHorizontalLength");this.D("pressedTextShadowOpacity",d.Nb,"textShadowOpacity");this.D("pressedTextShadowVerticalLength",
d.Nb,"textShadowVerticalLength");this.D("pressedBorderSize",d.Nb,"borderSize");this.D("pressedBorderLeftSize",d.Nb,"borderLeftSize");this.D("pressedBorderTopSize",d.Nb,"borderTopSize");this.D("pressedBorderRightSize",d.Nb,"borderRightSize");this.D("pressedBorderBottomSize",d.Nb,"borderBottomSize");this.D("pressedBorderColor",d.Nb,"borderColor");this.D("pressedBorderLeftColor",d.Nb,"borderLeftColor");this.D("pressedBorderTopColor",d.Nb,"borderTopColor");this.D("pressedBorderRightColor",d.Nb,"borderRightColor");
this.D("pressedBorderBottomColor",d.Nb,"borderBottomColor");this.D("pressedShadow",d.Nb,"shadow");this.D("pressedShadowHorizontalLength",d.Nb,"shadowHorizontalLength");this.D("pressedShadowVerticalLength",d.Nb,"shadowVerticalLength");this.D("pressedShadowBlurRadius",d.Nb,"shadowBlurRadius");this.D("pressedShadowSpread",d.Nb,"shadowSpread");this.D("pressedShadowOpacity",d.Nb,"shadowOpacity");this.D("pressedShadowColor",d.Nb,"shadowColor");this.D("pressedBackgroundOpacity",d.Nb,"backgroundOpacity");
this.D("pressedBackgroundColor",d.Nb,"backgroundColor");this.D("pressedBackgroundColorRatios",d.Nb,"backgroundColorRatios");this.D("pressedBackgroundColorDirection",d.Nb,"backgroundColorDirection");this.D("pressedLabel",d.wc,"label");this.D("pressedRollOverOpacity",d.wc,"opacity");this.D("pressedRollOverIconWidth",d.wc,"iconWidth");this.D("pressedRollOverIconHeight",d.wc,"iconHeight");this.D("pressedRollOverFontSize",d.wc,"fontSize");this.D("pressedRollOverFontColor",d.wc,"fontColor");this.D("pressedRollOverFontWeight",
d.wc,"fontWeight");this.D("pressedRollOverFontStyle",d.wc,"fontStyle");this.D("pressedRollOverTextDecoration",d.wc,"textDecoration");this.D("pressedRollOverTextShadowBlurRadius",d.wc,"textShadowBlurRadius");this.D("pressedRollOverTextShadowColor",d.wc,"textShadowColor");this.D("pressedRollOverTextShadowHorizontalLength",d.wc,"textShadowHorizontalLength");this.D("pressedRollOverTextShadowOpacity",d.wc,"textShadowOpacity");this.D("pressedRollOverTextShadowVerticalLength",d.wc,"textShadowVerticalLength");
this.D("pressedRollOverBorderSize",d.wc,"borderSize");this.D("pressedRollOverBorderLeftSize",d.wc,"borderLeftSize");this.D("pressedRollOverBorderTopSize",d.wc,"borderTopSize");this.D("pressedRollOverBorderRightSize",d.wc,"borderRightSize");this.D("pressedRollOverBorderBottomSize",d.wc,"borderBottomSize");this.D("pressedRollOverBorderColor",d.wc,"borderColor");this.D("pressedRollOverBorderLeftColor",d.wc,"borderLeftColor");this.D("pressedRollOverBorderTopColor",d.wc,"borderTopColor");this.D("pressedRollOverBorderRightColor",
d.wc,"borderRightColor");this.D("pressedRollOverBorderBottomColor",d.wc,"borderBottomColor");this.D("pressedRollOverShadow",d.wc,"shadow");this.D("pressedRollOverShadowHorizontalLength",d.wc,"shadowHorizontalLength");this.D("pressedRollOverShadowVerticalLength",d.wc,"shadowVerticalLength");this.D("pressedRollOverShadowBlurRadius",d.wc,"shadowBlurRadius");this.D("pressedRollOverShadowSpread",d.wc,"shadowSpread");this.D("pressedRollOverShadowOpacity",d.wc,"shadowOpacity");this.D("pressedRollOverShadowColor",
d.wc,"shadowColor");this.D("pressedRollOverBackgroundOpacity",d.wc,"backgroundOpacity");this.D("pressedRollOverBackgroundColor",d.wc,"backgroundColor");this.D("pressedRollOverBackgroundColorRatios",d.wc,"backgroundColorRatios");this.D("pressedRollOverBackgroundColorDirection",d.wc,"backgroundColorDirection")};t.prototype.Dca=function(){};t.prototype.Ib=function(){r.prototype.Ib.call(this);this.Aj||(this.Aj=this.Dca(),this.mb(this.Aj));this.Xa||(this.Xa=new m,this.mb(this.Xa))};t.prototype.HQ=function(){this.get("pressed")?
(this.set("pressed",!1),this.m(new h(g.Nm))):(this.set("pressed",!0),this.m(new h(g.Sk)))};t.prototype.Kx=function(){return this.get("label")||r.prototype.Kx.call(this)};t.prototype.jb=function(){var u=!1;this.S("mode")&&(this.G("mode")==b.Ze?(this.h(g.la,this.HQ,this),this.set("autoPressed",!0)):(this.bind(g.la,this.HQ,this,!0),this.set("autoPressed",!1)),this.$("mode"),u=!0);if(u||this.S("pressed"))this.G("mode")==b.Vk?this.iN(this.G("pressed")==1):u&&this.iN(!1);this.S("label")&&(u=this.G("label"),
this.Xa.set("text",u),this.Xa.set("visible",u?!0:!1),this.$("label"));this.Qc(t.yUa,t.zUa,[this.Xa],!0,!0);this.S("iconBeforeLabel")&&(this.G("iconBeforeLabel")==0?this.gr(this.Xa,0):this.gr(this.Aj,0),this.$("iconBeforeLabel"));this.S("iconWidth")&&(this.Aj.set("width",this.G("iconWidth")),this.$("iconWidth"));this.S("iconHeight")&&(this.Aj.set("height",this.G("iconHeight")),this.$("iconHeight"));this.S("buttonGroup")&&((u=this.G("buttonGroup"))?e.register(this,u):e.unregister(this),this.$("buttonGroup"));
this.Qc(["horizontalAlign","verticalAlign"],{},[this.Aj],!0,!1);r.prototype.jb.call(this)};t.yUa=p;t.zUa=q;return t}(f)});define("tdv/player/script/BaseButton",["require","tdv/player/parser/ClassInfo","tdv/view/buttons/BaseButton"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/view/buttons/BaseButton");return l.define("BaseButton",k,function(){k.call(this)})});
define("tdv/player/script/BaseObject",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("BaseObject",l,function(){l.call(this)})});
define("tdv/view/containers/HorizontalContainer",["require","exports","tdv/view/containers/Container","tdv/view/constants/LayoutMode"],function(a,l,k,n){return function(g){function h(){return g.call(this)||this}O(h,g);h.prototype.Ob=function(){this.Gl(h.bd)};h.bd=Object.assign({},k.bd,{layout:n.bi});return h}(k)});
define("tdv/view/containers/VerticalContainer",["require","exports","tdv/view/containers/Container","tdv/view/constants/LayoutMode"],function(a,l,k,n){return function(g){function h(){return g.call(this)||this}O(h,g);h.prototype.Ob=function(){this.Gl(h.bd)};h.bd=Object.assign({},k.bd,{layout:n.ck});return h}(k)});
define("tdv/view/core/visualprops/CanvasVisualProperties",["require","exports","tdv/view/core/visualprops/UIBaseVisualProperties"],function(a,l,k){return function(n){function g(){var h=n!==null&&n.apply(this,arguments)||this;h.canvas=null;h.w5=0;return h}O(g,n);return g}(k)});
define("tdv/view/canvas/Canvas","require exports tdv/constants/EventName tdv/events/Event tdv/view/core/UIComponent tdv/view/core/visualprops/CanvasVisualProperties".split(" "),function(a,l,k,n,g,h){return function(e){function b(){var c=e.call(this)||this;c.NWa=function(){c.IW()};c.df("Canvas");c.rda=!0;c.u.canvas=null;c.bind(k.Zb,c.NWa,c,!1);return c}O(b,e);b.prototype.uL=function(){return new h};b.prototype.IW=function(){this.rda=!0;this.tb()};b.prototype.Ib=function(){e.prototype.Ib.call(this);
this.u.canvas||(this.u.canvas=document.createElement("canvas"))};b.prototype.jb=function(){this.xba("paddingLeft paddingTop paddingRight paddingBottom borderRadius borderTopRadius borderBottomRadius borderLeftRadius borderRightRadius borderTopLeftRadius borderTopRightRadius borderBottomLeftRadius borderBottomRightRadius borderSize borderLeftSize borderTopSize borderRightSize borderBottomSize".split(" "))&&this.IW();e.prototype.jb.call(this)};b.prototype.ju=function(){this.rda&&(this.rda=!1,this.u.canvas.width=
this.Uh(),this.u.canvas.height=this.Th(),this.u.w5+=1,this.Pqa());e.prototype.ju.call(this)};b.prototype.bJa=function(){return this.u.canvas.getContext("2d")};b.prototype.Pqa=function(){this.m(new n(k.V))};return b}(g)});
define("tdv/view/buttons/CanvasButton","require exports tdv/constants/EventName tdv/view/constants/State tdv/view/buttons/BaseButton tdv/view/canvas/Canvas".split(" "),function(a,l,k,n,g,h){return function(e){function b(){return e.call(this)||this}O(b,e);b.prototype.Lk=function(){e.prototype.Lk.call(this)};b.prototype.Ob=function(){e.prototype.Ob.call(this);this.j("iconColor");this.D("rollOverIconColor",n.ga,"iconColor");this.D("pressedIconColor",n.Nb,"iconColor");this.D("pressedRollOverIconColor",
n.wc,"iconColor")};b.prototype.Dca=function(){var c=new h;c.bind(k.V,this.fRa,this,!0);return c};b.prototype.jb=function(){this.S("iconColor")&&(this.Aj.IW(),this.$("iconColor"));e.prototype.jb.call(this)};b.prototype.v_a=function(){return this.G("iconColor")};b.prototype.w_a=function(){return this.Aj.bJa()};b.prototype.fRa=function(){};return b}(g)});
define("tdv/view/buttons/CloseButton",["require","exports","tdv/view/buttons/CanvasButton","tdv/view/constants/Alignment","tdv/view/constants/State"],function(a,l,k,n,g){return function(h){function e(){var b=h.call(this)||this;b.wa({horizontalAlign:n.Ye,verticalAlign:n.Xd});return b}O(e,h);e.prototype.Ob=function(){h.prototype.Ob.call(this);this.j("iconLineWidth");this.D("rollOverIconLineWidth",g.ga,"iconLineWidth");this.D("pressedIconLineWidth",g.Nb,"iconLineWidth");this.D("pressedRollOverIconLineWidth",
g.wc,"iconLineWidth")};e.prototype.F_a=function(){return this.G("iconLineWidth")};e.prototype.jb=function(){this.S("iconLineWidth")&&(this.Aj.IW(),this.$("iconLineWidth"));h.prototype.jb.call(this)};e.prototype.fRa=function(){var b=this.w_a(),c=this.v_a(),d=this.Aj.u.canvas.width,f=this.Aj.u.canvas.height,m=this.F_a();b.clearRect(0,0,d,f);b.lineWidth=m||1;b.strokeStyle=c||"#000000";b.beginPath();b.moveTo(0,0);b.lineTo(d,f);b.moveTo(0,f);b.lineTo(d,0);b.closePath();b.stroke()};return e}(k)});
define("tdv/view/containers/windows/BaseWindow","require exports tdv/constants/EventName tdv/view/constants/Alignment tdv/view/constants/LayoutMode tdv/view/containers/Container tdv/view/containers/HorizontalContainer tdv/view/containers/VerticalContainer tdv/view/buttons/CloseButton tdv/view/text/Label".split(" "),function(a,l,k,n,g,h,e,b,c,d){return function(f){function m(){var p=f.call(this)||this;p.Ym=null;p.GU=null;p.qL=null;p.SB=null;p.Qba=new h;p.ML=null;p.Xka=void 0;p.Wka=void 0;p.rz=!1;return p}
O(m,f);m.prototype.set=function(p,q){switch(p){case "children":this.Qba.set(p,q);break;default:f.prototype.set.call(this,p,q)}};m.prototype.p5=function(){this.rz=!0;this.set("visible",!1)};m.prototype.o5=function(){this.get("visible")&&this.get("visible")&&this.m(k.YRa);this.rz=!1};m.prototype.get=function(p,q){return p=="children"?this.Qba.get(p,q):p=="showing"?this.rz:f.prototype.get.call(this,p,q)};m.prototype.Ob=function(){this.Gl(m.bd)};m.prototype.Ib=function(){f.prototype.Ib.call(this);this.Ym==
null&&(this.Ym=new e,this.Ym.set("width","100%"),this.Ym.bind(k.Ra,this.Ixa,this,!1),this.mb(this.Ym));this.GU==null&&(this.GU=new d,this.GU.set("width","100%"),this.Ym.mb(this.GU));this.qL==null&&(this.qL=new c,this.qL.wa({horizontalAlign:n.Ye,verticalAlign:n.Xd}),this.qL.bind(k.la,this.nXa,this,!1),this.Ym.mb(this.qL));this.SB==null&&(this.SB=this.Qba,this.SB.wa({width:"100%",height:"100%"}),this.mb(this.SB));this.ML==null&&(this.ML=new h,this.ML.set("width","100%"),this.mb(this.ML))};m.prototype.Qe=
function(){throw Error("Not implemented");};m.prototype.nXa=function(){this.Qe()};m.prototype.Ixa=function(){};m.prototype.jb=function(){this.Qc(m.yta,m.zta,[this.Ym],!0,!0);this.Qc(m.Saa,m.Taa,[this.Ym],!0,!1);this.get("headerHeight")===0?this.Qc(m.Saa,m.Taa,[this.SB],!0,!1):this.Qc(m.Saa,m.Taa,[this.Ym],!0,!1);this.Qc(m.Mta,m.Nta,[this.GU],!0,!0);this.Qc(m.sta,m.tta,[this.qL],!0,!0);this.Qc(m.pta,m.qta,[this.SB],!0,!0);this.Qc(m.rUa,m.rta,[this.SB],!0,!1);this.Qc(m.uta,m.vta,[this.ML],!0,!0);this.get("footerHeight")===
0?this.Qc(m.wta,m.xta,[this.SB],!0,!1):this.Qc(m.wta,m.xta,[this.ML],!0,!1);this.wa({layout:g.ck,horizontalAlign:n.Ye,verticalAlign:n.Xd});f.prototype.jb.call(this);this.an.h9(0)};m.zta={headerBackgroundOpacity:"backgroundOpacity",headerBackgroundColor:"backgroundColor",headerBackgroundColorRatios:"backgroundColorRatios",headerBackgroundColorDirection:"backgroundColorDirection",headerBorderSize:"borderSize",headerBorderLeftSize:"borderLeftSize",headerBorderTopSize:"borderTopSize",headerBorderRightSize:"borderRightSize",
headerBorderBottomSize:"borderBottomSize",headerBorderColor:"borderColor",headerBorderLeftColor:"borderLeftColor",headerBorderTopColor:"borderTopColor",headerBorderRightColor:"borderRightColor",headerBorderBottomColor:"borderBottomColor",headerHeight:"height",headerPaddingLeft:"paddingLeft",headerPaddingTop:"paddingTop",headerPaddingRight:"paddingRight",headerPaddingBottom:"paddingBottom",headerVerticalAlign:"verticalAlign"};m.yta=Object.keys(m.zta);m.Taa={borderRadius:"borderTopRadius",borderTopRadius:"borderTopRadius",
borderLeftRadius:"borderTopLeftRadius",borderRightRadius:"borderTopRightRadius",borderTopLeftRadius:"borderTopLeftRadius",borderTopRightRadius:"borderTopRightRadius"};m.Saa="borderLeftRadius borderRightRadius borderTopLeftRadius borderTopRightRadius borderTopRadius borderRadius".split(" ");m.Nta={title:"text",titleFontFamily:"fontFamily",titleFontSize:"fontSize",titleFontColor:"fontColor",titleFontWeight:"fontWeight",titleFontStyle:"fontStyle",titleHorizontalAlign:"horizontalAlign",titlePaddingLeft:"paddingLeft",
titlePaddingTop:"paddingTop",titlePaddingRight:"paddingRight",titlePaddingBottom:"paddingBottom",titleTextDecoration:"textDecoration",titleTextShadowColor:"textShadowColor",titleTextShadowHorizontalLength:"textShadowHorizontalLength",titleTextShadowVerticalLength:"textShadowVerticalLength",titleTextShadowBlurRadius:"textShadowBlurRadius",titleTextShadowOpacity:"textShadowOpacity"};m.Mta=Object.keys(m.Nta);m.tta={closeButtonBackgroundColor:"backgroundColor",closeButtonBackgroundColorDirection:"backgroundColorDirection",
closeButtonBackgroundColorRatios:"backgroundColorRatios",closeButtonBackgroundOpacity:"backgroundOpacity",closeButtonBorderColor:"borderColor",closeButtonBorderRadius:"borderRadius",closeButtonBorderSize:"borderSize",closeButtonHeight:"height",closeButtonIconColor:"iconColor",closeButtonIconHeight:"iconHeight",closeButtonIconLineWidth:"iconLineWidth",closeButtonIconWidth:"iconWidth",closeButtonOpacity:"opacity",closeButtonWidth:"width",closeButtonPaddingBottom:"paddingBottom",closeButtonPaddingLeft:"paddingLeft",
closeButtonPaddingRight:"paddingRight",closeButtonPaddingTop:"paddingTop",closeButtonRollOverBackgroundColor:"rollOverBackgroundColor",closeButtonRollOverBackgroundColorDirection:"rollOverBackgroundColorDirection",closeButtonRollOverBackgroundColorRatios:"rollOverBackgroundColorRatios",closeButtonRollOverBackgroundOpacity:"rollOverBackgroundOpacity",closeButtonRollOverBorderColor:"rollOverBorderColor",closeButtonRollOverBorderSize:"rollOverBorderSize",closeButtonRollOverIconColor:"rollOverIconColor",
closeButtonRollOverIconLineWidth:"rollOverIconLineWidth",closeButtonRollOverOpacity:"rollOverOpacity",closeButtonPressedBackgroundColor:"pressedBackgroundColor",closeButtonPressedBackgroundColorDirection:"pressedBackgroundColorDirection",closeButtonPressedBackgroundColorRatios:"pressedBackgroundColorRatios",closeButtonPressedBackgroundOpacity:"pressedBackgroundOpacity",closeButtonPressedBorderColor:"pressedBorderColor",closeButtonPressedBorderSize:"pressedBorderSize",closeButtonPressedIconColor:"pressedIconColor",
closeButtonPressedIconLineWidth:"pressedIconLineWidth",closeButtonPressedOpacity:"pressedOpacity"};m.sta=Object.keys(m.tta);m.vta={footerBackgroundOpacity:"backgroundOpacity",footerBackgroundColor:"backgroundColor",footerBackgroundColorRatios:"backgroundColorRatios",footerBackgroundColorDirection:"backgroundColorDirection",footerBorderSize:"borderSize",footerBorderLeftSize:"borderLeftSize",footerBorderTopSize:"borderTopSize",footerBorderRightSize:"borderRightSize",footerBorderBottomSize:"borderBottomSize",
footerBorderColor:"borderColor",footerBorderLeftColor:"borderLeftColor",footerBorderTopColor:"borderTopColor",footerBorderRightColor:"borderRightColor",footerBorderBottomColor:"borderBottomColor",footerHeight:"height"};m.uta=Object.keys(m.vta);m.xta={borderRadius:"borderBottomRadius",borderBottomRadius:"borderBottomRadius",borderLeftRadius:"borderBottomLeftRadius",borderRightRadius:"borderBottomRightRadius",borderBottomLeftRadius:"borderBottomLeftRadius",borderBottomRightRadius:"borderBottomRightRadius"};
m.wta="borderLeftRadius borderRightRadius borderBottomLeftRadius borderBottomRightRadius borderBottomRadius borderRadius".split(" ");m.qta={bodyBackgroundOpacity:"backgroundOpacity",bodyBackgroundColor:"backgroundColor",bodyBackgroundColorRatios:"backgroundColorRatios",bodyBackgroundColorDirection:"backgroundColorDirection",bodyBorderSize:"borderSize",bodyBorderLeftSize:"borderLeftSize",bodyBorderTopSize:"borderTopSize",bodyBorderRightSize:"borderRightSize",bodyBorderBottomSize:"borderBottomSize",
bodyBorderColor:"borderColor",bodyBorderLeftColor:"borderLeftColor",bodyBorderTopColor:"borderTopColor",bodyBorderRightColor:"borderRightColor",bodyBorderBottomColor:"borderBottomColor",bodyPaddingLeft:"paddingLeft",bodyPaddingTop:"paddingTop",bodyPaddingRight:"paddingRight",bodyPaddingBottom:"paddingBottom",overflow:"overflow",scrollBarColor:"scrollBarColor",scrollBarWidth:"scrollBarWidth",scrollBarMargin:"scrollBarMargin",scrollBarHorizontalMargin:"scrollBarHorizontalMargin",scrollBarVerticalMargin:"scrollBarVerticalMargin",
scrollBarOpacity:"scrollBarOpacity",gap:"gap"};m.pta=Object.keys(m.qta);m.rta={layout:"layout",horizontalAlign:"horizontalAlign",verticalAlign:"verticalAlign"};m.rUa=Object.keys(m.rta);m.GZ={veilOpacity:"backgroundOpacity",veilColor:"backgroundColor",veilColorRatios:"backgroundColorRatios",veilColorDirection:"backgroundColorDirection"};m.fba=Object.keys(m.GZ);m.bd=Object.assign({},b.bd,function(){for(var p={modal:!1,visible:!1},q=[].concat(m.yta,m.Mta,m.sta,m.pta,m.uta),r=0;r<q.length;r++)p[q[r]]=
void 0;return p}());return m}(b)});define("tdv/player/script/BaseWindow",["require","tdv/view/containers/windows/BaseWindow","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/view/containers/windows/BaseWindow");return a("tdv/player/parser/ClassInfo").define("BaseWindow",l,function(){l.call(this)})});
define("tdv/player/script/mixin/EffectsMixin",["require","tdv/constants/EventName","tdv/view/effects/Effect"],function(a){var l=a("tdv/constants/EventName"),k=a("tdv/view/effects/Effect");return{WYa:function(){this.Hl=this.Df=null;this.bind(l.od,this.hwa,this,!0);this.bind(l.jd,this.cwa,this,!0);this.bind(l.tc,this.ewa,this,!0);this.bind(l.Eb,this.dwa,this,!0);this.bind(l.N("effect"),this.awa,this,!0);this.bind(l.N("rollOverEffect"),this.fwa,this,!0);this.CG=!1},Gmb:function(){this.h(l.od,this.hwa,
this,!0);this.h(l.jd,this.cwa,this,!0);this.h(l.tc,this.ewa,this,!0);this.h(l.Eb,this.dwa,this,!0);this.h(l.N("effect"),this.awa,this,!0);this.h(l.N("rollOverEffect"),this.fwa,this,!0)},hwa:function(){this.Df&&this.Df.play()},cwa:function(){this.Df&&this.Df.stop();this.Hl&&this.Hl.stop();this.CG=!1},ewa:function(){this.CG||(this.CG=!0,this.Hl&&(this.Df&&this.Df.get("loop")&&this.Df.wm()>0?this.Df.reverse():this.Df&&this.Df.wm()!=0&&this.Df.wm()!=1||(this.Df&&this.Df.stop(),this.Hl.play())))},dwa:function(){this.CG&&
(this.CG=!1,this.Hl&&(this.Hl.wm()>0?this.Hl.reverse():this.Df&&this.Df.get("loop")&&this.Df.play()))},bwa:function(){this.vda()},vda:function(){this.CG&&this.Hl&&(this.Df.stop(),this.Hl.play())},gwa:function(){this.CG||(this.Hl.stop(),this.Df&&this.Df.get("loop")&&this.Df.play())},awa:function(){this.Df&&this.Df.h(k.Al,this.bwa,this,!0);this.Df&&this.Df.h(k.jx,this.vda,this,!0);(this.Df=this.get("effect"))&&this.Df.bind(k.Al,this.bwa,this,!0);this.Df&&this.Df.bind(k.jx,this.vda,this,!0)},fwa:function(){this.Hl&&
this.Hl.h(k.jx,this.gwa,this,!0);(this.Hl=this.get("rollOverEffect"))&&this.Hl.bind(k.jx,this.gwa,this,!0)}}});
define("tdv/player/script/Model3DObject",["require","tdv/utils","tdv/binding/Bindable","tdv/player/parser/ClassInfo","tdv/player/script/mixin/EffectsMixin"],function(a){var l=a("tdv/utils"),k=a("tdv/binding/Bindable"),n=a("tdv/player/parser/ClassInfo");a=a("tdv/player/script/mixin/EffectsMixin");n=n.define("Model3DObject",k,function(){k.call(this);this.set("hidden",!1);this.WYa();this.Lq=this.pM=this.Nea=this.Mea=!1;this.cfa=!0;this.dfa=this.afa=this.aH=!1});l.f5(n,[a]);var g="enabledInStandard enabledInVR enabledInVRWithGazePointer enabledInAR hideBasedOnDistance hideWhileUserInteracting hideWhileMoving".split(" ");
n.prototype.set=function(h,e){k.prototype.set.call(this,h,e);g.indexOf(h)!=-1&&this.Gz()};n.prototype.Epa=function(h){this.Nea!==h&&(this.Nea=h,this.Gz())};n.prototype.NE=function(h){this.Lq!==h&&(this.Lq=h,this.Gz())};n.prototype.Bp=function(h){this.pM!==h&&(this.pM=h,this.Gz())};n.prototype.S8=function(h){this.cfa!==h&&(this.cfa=h,this.Gz())};n.prototype.OA=function(h){this.aH!==h&&(this.aH=h,this.Gz())};n.prototype.T8=function(h){this.dfa!==h&&(this.dfa=h,this.Gz())};n.prototype.$Oa=function(h){this.afa!==
h&&(this.afa=h,this.Gz())};n.prototype.Dpa=function(h){this.Mea!==h&&(this.Mea=h,this.Gz())};n.prototype.Gz=function(){this.set("hidden",this.Nea||this.Mea||this.aH&&this.get("enabledInVR")===!1||this.afa&&this.get("enabledInAR")===!1||this.dfa&&this.get("enabledInVRWithGazePointer",this.get("enabledInVR"))===!1||this.cfa&&this.get("enabledInStandard")===!1||this.pM&&this.get("hideWhileMoving")||this.Lq&&this.get("hideWhileUserInteracting"))};return n});
define("tdv/player/script/BoxModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DObject"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/Model3DObject");return l.define("BoxModel3DObject",k,function(){k.call(this)})});define("tdv/view/constants/ScaleMode",["require","exports"],function(){return{NONE:"none",rB:"fill",oj:"fit_inside",Dr:"fit_outside",Lp:"fit_to_width",Qk:"fit_to_height",bSa:"custom"}});
define("tdv/view/core/visualprops/ImageVisualProperties",["require","exports","tdv/view/core/visualprops/UIBaseVisualProperties","tdv/view/constants/Alignment"],function(a,l,k,n){return function(g){function h(){var e=g!==null&&g.apply(this,arguments)||this;e.image=null;e.Vh=n.eb;e.verticalAlign=n.Xd;e.contentWidth=0;e.contentHeight=0;return e}O(h,g);return h}(k)});
define("tdv/view/images/Image","require exports tdv/constants/EventName tdv/constants/Priority tdv/view/constants/Alignment tdv/view/constants/ScaleMode tdv/view/core/UIComponent tdv/view/images/ImageLoader tdv/view/core/visualprops/ImageVisualProperties".split(" "),function(a,l,k,n,g,h,e,b,c){a=function(f){function m(p){var q=f.call(this)||this;q.N0a=function(){q.m_=!0;q.Hf()};q.O0a=function(){q.vFa()};q.df("Image");q.Wba=p||1;q.Fka=!1;q.xia=!1;q.EM=0;q.DM=0;q.eha=!1;q.m_=!1;q.pd=null;q.bind(k.Zb,
q.N0a,q,!1);q.bind(k.od,q.O0a,q,!1);return q}O(m,f);m.prototype.uL=function(){return new c};m.prototype.sea=function(){var p=this;this.pd=new d(this.Wba);this.sea=function(){return p.pd};return this.pd};m.prototype.Ob=function(){f.prototype.Ob.call(this);this.j("horizontalAlign",g.eb);this.j("verticalAlign",g.Tc);this.j("scaleMode",h.NONE)};m.prototype.set=function(p,q){p=="url"&&this.get("url")!=q&&(this.Fka=!0,this.Hf());f.prototype.set.call(this,p,q)};m.prototype.wP=function(p){this.u.Vh!=p&&(this.u.Vh=
p,this.tb())};m.prototype.BO=function(){return this.u.Vh};m.prototype.CP=function(p){this.u.verticalAlign!=p&&(this.u.verticalAlign=p,this.tb())};m.prototype.DO=function(){return this.u.verticalAlign};m.prototype.yP=function(p){this.ri!=p&&(this.ri=p,this.xia=!0,this.Hf(),this.kc())};m.prototype.J5a=function(p,q){if(this.u.contentWidth!=p||this.u.contentHeight!=q)this.u.contentWidth=p,this.u.contentHeight=q,this.tb()};m.prototype.fua=function(p,q,r){this.EM=q?q:0;this.DM=r?r:0;this.u.image=p;this.eha=
!0;this.Hf();this.kc();this.tb();this.u.image&&this.m(k.ia)};m.prototype.Jy=function(){this.fn=this.EM+this.u.Bd+this.u.ze;this.dn=this.DM+this.u.ee+this.u.Cf;this.Iya=this.EM==0&&this.DM==0?0:this.EM/this.DM;this.nS=this.oS=0};m.prototype.jb=function(){this.S("scaleMode")&&(this.yP(this.G("scaleMode")),this.$("scaleMode"));this.S("horizontalAlign")&&(this.wP(this.G("horizontalAlign")),this.$("horizontalAlign"));this.S("verticalAlign")&&(this.CP(this.G("verticalAlign")),this.$("verticalAlign"));this.xba("paddingLeft paddingTop paddingRight paddingBottom borderRadius borderTopRadius borderBottomRadius borderLeftRadius borderRightRadius borderTopLeftRadius borderTopRightRadius borderBottomLeftRadius borderBottomRightRadius borderSize borderLeftSize borderTopSize borderRightSize borderBottomSize".split(" "))&&
(this.m_=!0);f.prototype.jb.call(this);this.vFa();if(this.Odb()||this.xia||this.eha||this.m_){var p=this.Uh(),q=this.Th(),r=this.EM,t=this.DM,u=0,v=0;if(r==0||t==0)v=u=0;else switch(this.ri){case h.NONE:u=r;v=t;break;case h.rB:u=p;v=q;break;case h.oj:r*q>t*p?(u=p,v=t*p/r):(u=r*q/t,v=q);break;case h.Dr:r*q>t*p?(u=r*q/t,v=q):(u=p,v=t*p/r);break;case h.Lp:u=p;v=t*p/r;break;case h.Qk:u=r*q/t,v=q}this.J5a(u,v);this.m_=this.eha=this.xia=!1;this.kc();this.tb()}};m.prototype.vFa=function(){if(this.Fka){var p=
this.get("url");p?this.sea().load(p,this.fua,this):(this.sea().clear(),this.fua(null,0,0));this.Fka=!1}};return m}(e);var d=function(){function f(m){this.Wba=m;this.Qd=[];this.Tm=null}f.prototype.qXa=function(m){f.Uo.href=m;return f.Uo.href};f.prototype.load=function(m,p,q){var r=this;m=this.qXa(m);this.Tm&&!this.Tm.kj()&&(this.Tm.cancel(),this.Qd=this.Qd.filter(function(v){return v!==r.Tm}));(this.Tm=this.Qd.find(function(v){return v.ql()==m})||null)?this.Qd=this.Qd.filter(function(v){return v!==
r.Tm}):(this.Tm=new b(n.Rsa),this.Tm.load(m));for(this.Qd.splice(0,0,this.Tm);this.Qd.length>this.Wba;)this.Qd.pop().cancel();if(p){var t=this.Tm,u=function(){p.call(q||window,t.xg(),t.dg(),t.wg())};this.Tm.kj()?u():this.Tm.bind(k.ia,u,void 0,!1)}};f.prototype.clear=function(){this.Qd.forEach(function(m){m.cancel()});this.Tm=null};f.Uo=document.createElement("a");return f}();return a});
define("tdv/view/buttons/Button","require exports tdv/view/constants/ScaleMode tdv/view/constants/State tdv/view/buttons/BaseButton tdv/view/images/Image".split(" "),function(a,l,k,n,g,h){return function(e){function b(){return e.call(this)||this}O(b,e);b.prototype.Ob=function(){e.prototype.Ob.call(this);this.j("iconURL");this.D("rollOverIconURL",n.ga,"iconURL");this.D("pressedIconURL",n.Nb,"iconURL");this.D("pressedRollOverIconURL",n.wc,"iconURL")};b.prototype.Dca=function(){var c=new h(3);c.set("scaleMode",
k.oj);return c};b.prototype.jb=function(){if(this.S("iconURL")){var c=this.G("iconURL");this.Aj.set("url",c);this.Aj.set("visible",c?!0:!1);this.$("iconURL")}e.prototype.jb.call(this)};return b}(g)});define("tdv/player/script/Button",["require","tdv/player/parser/ClassInfo","tdv/view/buttons/Button"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/view/buttons/Button");return l.define("Button",k,function(){k.call(this)})});
define("tdv/player/script/ExternalModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DObject"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/Model3DObject");return l.define("ExternalModel3DObject",k,function(){k.call(this)})});
define("tdv/player/script/PlaneModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/ExternalModel3DObject"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/ExternalModel3DObject");return l.define("PlaneModel3DObject",k,function(){k.call(this)})});
define("tdv/player/script/CanvasPlaneModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/PlaneModel3DObject"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/PlaneModel3DObject");return l.define("CanvasPlaneModel3DObject",k,function(){k.call(this)})});
define("tdv/player/script/CapPanoramaOverlay",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("CapPanoramaOverlay",l,function(){l.call(this)})});
define("tdv/player/script/CeilingCapPanoramaOverlay",["require","tdv/player/parser/ClassInfo","tdv/player/script/CapPanoramaOverlay"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/CapPanoramaOverlay");return l.define("CeilingCapPanoramaOverlay",k,function(){k.call(this)})});
define("tdv/player/script/ChildModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DObject"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/Model3DObject");return l.define("ChildModel3DObject",k,function(){k.call(this);this.set("floorColor","transparent")})});
define("tdv/player/script/CloseButton",["require","tdv/player/parser/ClassInfo","tdv/view/buttons/CloseButton"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/view/buttons/CloseButton");return l.define("CloseButton",k,function(){k.call(this)})});define("tdv/player/script/CookiesPolicy",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("CookiesPolicy",l,function(){l.call(this)})});
define("tdv/player/script/Container",["require","tdv/events/async","tdv/player/parser/ClassInfo","tdv/view/containers/Container"],function(a){var l=a("tdv/events/async"),k=a("tdv/player/parser/ClassInfo"),n=a("tdv/view/containers/Container");a=k.define("Container",n,function(){n.call(this)});a.prototype.scrollTo=function(g,h){n.prototype.scrollTo.call(this,g,h)};a.prototype.scrollIntoView=function(g){l.yE(function(){n.prototype.scrollIntoView.call(this,g)}.bind(this))};return a});
define("tdv/player/script/PanoramaFrame",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable"),k=a("tdv/player/parser/ClassInfo");a=k.define("PanoramaFrame",l,function(){l.call(this);this.Aa=null});a.prototype.get=function(n,g){switch(n){case "overlays":return this.uea();case "hfov":case "vfov":case "pitch":case "flipImageHorizontally":case "minFaceSize":if(this.Aa)return this.Aa.get(n,g)}return l.prototype.get.call(this,n,g)};a.prototype.uea=
function(){var n=l.prototype.get.call(this,"overlays");n||(n=[]);return this.cja(n)};a.prototype.cja=function(n){if(this.nN===void 0||this.T0!=n){var g=function(e){return k.Qa("PopupPanoramaOverlay",e)},h=function(e){return k.Qa("LensFlarePanoramaOverlay",e)};this.T0=n;this.nN=[].concat(n.filter(function(e){return!(g(e)||h(e))}),n.filter(h),n.filter(g))}return this.nN};a.prototype.H$a=function(n){this.Aa=n};a.prototype.QD=function(){return this.Aa};a.prototype.Ln=function(){return!1};return a});
define("tdv/player/script/CubicPanoramaFrame",["require","tdv/player/parser/ClassInfo","tdv/player/script/PanoramaFrame"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/PanoramaFrame");return l.define("CubicPanoramaFrame",k,function(){k.call(this)})});
define("tdv/view/av/AudioController","require tdv/view/av/SharedAudioContext tdv/constants/EventName tdv/player/view/util/Device tdv/player/view/util/URL tdv/player/view/util/Flags tdv/view/util/Visibility".split(" "),function(a){function l(b){this.mq=this.mq.bind(this);this.fv=this.fv.bind(this);this.Ef=!1;this.it=this.a0=1;this.l0=!0;this.oC=this.dL=null;this.ea=b;this.ea.addEventListener("play",this.mq,!0);this.ea.addEventListener("playing",this.fv,!0);this.xDa();this.tI()}var k=a("tdv/view/av/SharedAudioContext");
a("tdv/constants/EventName");var n=a("tdv/player/view/util/Device"),g=a("tdv/player/view/util/URL"),h=a("tdv/player/view/util/Flags");a("tdv/view/util/Visibility");var e;l.prototype.clear=function(){this.ea&&(this.H7a(),this.ea.removeEventListener("play",this.mq,!0),this.ea.removeEventListener("playing",this.fv,!0),this.ea=null)};l.prototype.xDa=function(){h.qra&&n.Ub()==n.Ii&&n.Dc()!=n.uK&&k&&!this.dL&&this.pC()&&(e||(e=k.createDelay(),e.delayTime.value=.3,e.connect(k.destination)),this.dL=k.createMediaElementSource(this.ea),
this.oC=k.createGain(),this.dL.connect(this.oC),this.oC.connect(e))};l.prototype.H7a=function(){this.dL&&(this.dL.disconnect(),this.dL=null);this.oC&&(this.oC.disconnect(),this.oC=null)};l.prototype.Yhb=function(b){this.l0!=b&&(this.ea.log("AudioController","set hasAudio: "+b),this.l0=b,this.tI())};l.prototype.Ag=function(b){this.Ef!=b&&(this.ea.log("AudioController","set muted: "+b),this.Ef=b,this.tI())};l.prototype.TA=function(b){this.it!=b&&(this.ea.log("AudioController","set volume: "+b),this.it=
b,this.tI())};l.prototype.SX=function(b){this.a0!=b&&(this.ea.log("AudioController","set gain: "+b),this.a0=Math.max(0,Math.min(1,b)),this.tI())};l.prototype.mq=function(){this.tI()};l.prototype.fv=function(){this.tI()};l.prototype.tI=function(){this.ea.log("AudioController","updateVolume paused: "+this.ea.paused+" outputVolume: "+(!this.l0||this.Ef?0:this.it*this.a0));var b=!this.l0||this.Ef?0:this.it*this.a0;b>0&&b<1&&this.xDa();this.oC?(this.oC.gain.value=b,this.ea.volume=1):this.ea.volume=b;this.ea.muted=
b==0};l.prototype.pC=function(){var b=this.ea.currentSrc||this.ea.children.length&&this.ea.children[0].src||"";g.WD(b)&&(b=void 0);return b};return l});define("tdv/view/av/MediaType",["require"],function(){return{Pp:"video",WRa:"audio"}});
define("tdv/view/av/PlaybackController","require tdv/utils tdv/constants/EventName tdv/constants/PlaybackState tdv/constants/Priority tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Device tdv/player/view/util/URL tdv/util/LoadQueue tdv/view/util/Visibility".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/constants/Priority"),h=a("tdv/events/Event"),e=a("tdv/events/EventDispatcher"),b=a("tdv/player/view/util/Device"),
c=a("tdv/player/view/util/URL"),d=a("tdv/util/LoadQueue"),f=a("tdv/view/util/Visibility"),m=l.extend(e,function(p){e.call(this);this.ea=p;this.vH=this.vH.bind(this);this.Ky=this.Ky.bind(this);this.kn=this.kn.bind(this);this.tM=this.tM.bind(this);this.hl=this.hl.bind(this);this.mn=this.mn.bind(this);this.fv=this.fv.bind(this);this.ZU=this.ZU.bind(this);this.ea.addEventListener("ended",this.kn,!0);this.ea.addEventListener("pause",this.mn,!1);this.ea.addEventListener("stalled",this.mn,!1);this.ea.addEventListener("waiting",
this.mn,!1);this.ea.addEventListener("canplay",this.vH,!0);this.ea.addEventListener("canplaythrough",this.Ky,!1);this.ea.addEventListener("loadedmetadata",this.hl,!0);this.ea.addEventListener("playing",this.fv,!1);this.ea.addEventListener("error",this.tM,!1);this.mda=!1;this.H=n.ca;this.KM=this.fj=null;f.bind(k.V,this.M9a,this)});m.prototype.clear=function(){this.ea&&(this.ea.removeEventListener("ended",this.kn,!0),this.ea.removeEventListener("pause",this.mn,!1),this.ea.removeEventListener("stalled",
this.mn,!1),this.ea.removeEventListener("waiting",this.mn,!1),this.ea.removeEventListener("canplay",this.vH,!0),this.ea.removeEventListener("canplaythrough",this.Ky,!1),this.ea.removeEventListener("loadedmetadata",this.hl,!0),this.ea.removeEventListener("error",this.tM,!1),this.ea=null)};m.prototype.play=function(){this.ea.log("PlaybackController","play");this.KM=n.PLAYING;this.LT()};m.prototype.stop=function(){this.ea.log("PlaybackController","stop");this.KM=n.ca;this.LT()};m.prototype.getState=
function(){return this.fj||this.H};m.prototype.iJ=function(){return this.ea.readyState==this.ea.HAVE_NOTHING||this.ea.readyState==this.ea.HAVE_METADATA||this.ea.currentTime===0?!1:!0};m.prototype.LT=function(){!this.fj&&this.KM&&(this.fj=this.KM,this.KM=null,this.fj==n.PLAYING?this.hja():this.gja())};m.prototype.M9a=function(){if(f.visible)this.ea.log("PlaybackController","visibile changed to true, setting state to "+this.H),this.fj=this.H,this.fj==n.PLAYING?this.hja():this.gja();else if(!this.ea.paused){this.ea.log("PlaybackController",
"paused by visibile changed to false");var p=this.ea.pause();p&&p["catch"](this.tM)}};m.prototype.pC=function(){return this.ea.currentSrc||this.ea.children.length&&this.ea.children[0].src||""};m.prototype.hja=function(){var p=this.pC();this.A3(p&&!c.WD(p));this.NZ=b.Ub()==b.Ii;this.ea.paused?(this.ea.log("PlaybackController","startPlaying calling play"),this.ea.muted=!0,this.ea.log("PlaybackController","this._media.play()"),this.ea.play()["catch"](q=>{this.tM(q)}).then(()=>{this.EAa()}).finally(()=>
{})):(this.ea.log("PlaybackController","startPlaying already playing"),this.EAa())};m.prototype.fv=function(){this.ea.log("PlaybackController","onPlaying event received. Visible: "+f.visible)};m.prototype.EAa=function(){this.fj==n.PLAYING?(this.ea.log("PlaybackController","onPlay promise fullfilled received when waiting to play"),this.fj=null,this.H=n.PLAYING,this.m(new h(m.Y$)),this.LT()):this.ea.log("PlaybackController","onPlay promise fullfilled received. Visible: "+f.visible)};m.prototype.gja=
function(){this.A3(!1);this.NZ=!1;this.ea.paused?(this.ea.log("PlaybackController","startPausing already paused"),this.mn()):(this.ea.log("PlaybackController","startPausing calling pause"),this.ea.pause())};m.prototype.mn=function(){this.fj==n.ca?(this.ea.log("PlaybackController","onPause event received when waiting to stop"),this.fj=null,this.H=n.ca,this.LT()):f.visible?(this.ea.log("PlaybackController","onPause event received without calling to pause"),(this.H==n.PLAYING&&!this.fj||this.fj==n.PLAYING)&&
!this.ea.hasAttribute("loop")&&!isNaN(this.ea.duration)&&this.ea.currentTime==this.ea.duration&&this.ea.duration>0&&this.kn(),this.ZU()):this.ea.log("PlaybackController","onPause event received when not visible")};m.prototype.vH=function(){this.ea.log("PlaybackController","on can play");this.ZU()};m.prototype.Ky=function(){this.ea.log("PlaybackController","can play through");this.ZU();this.A3(!1)};m.prototype.ZU=function(){if(this.ADa()){if(this.NZ&&this.ea.currentTime==0){this.ea.log("PlaybackController",
"updatePlaying applying ios hack");this.NZ=!1;try{this.ea.currentTime=.3}catch(p){}}b.Ub()!=b.tK&&this.wCa()}};m.prototype.ADa=function(){return this.H==n.PLAYING&&f.visible&&this.ea.paused&&this.ea.readyState>=3};m.prototype.wCa=function(p){this.xCa||(p?this.ADa()&&(this.ea.log("PlaybackController","updatePlaying retrying play"),this.fj=n.PLAYING,this.hja()):this.xCa=setTimeout(function(){this.xCa=null;this.wCa(!0)}.bind(this),500))};m.prototype.tM=function(){this.fj==n.PLAYING&&(this.ea.log("PlaybackController",
"onError waiting to play"),this.fj=null,this.KM?this.LT():b.Ub()==b.Ii?this.m(new h(m.C$)):this.fj=n.PLAYING)};m.prototype.hl=function(){this.ea.log("PlaybackController","on loaded metadata");!isNaN(this.ea.duration)&&this.ea.currentTime==this.ea.duration&&this.ea.duration>0&&this.kn()};m.prototype.kn=function(){this.ea.log("PlaybackController","onEnded");this.NZ=!1;if(this.H==n.PLAYING&&!this.fj||this.fj==n.ca)this.ea.log("PlaybackController","onEnded finalizing video"),this.A3(!1),this.fj=n.ca,
this.gja(),this.m(new h(m.Al))};m.prototype.A3=function(p){this.mda!=p&&(this.ea.log("PlaybackController","downloading changed to: "+p),(this.mda=p)?d.Pjb(g.Zra):d.Ojb(g.Zra))};m.C$="deactivated";m.Al="end";m.Y$="play";return m});
define("tdv/view/av/TextTracksController",["require","tdv/utils","tdv/constants/EventName","tdv/events/Event","tdv/events/EventDispatcher"],function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName");a("tdv/events/Event");var n=a("tdv/events/EventDispatcher");a=l.extend(n,function(g){n.call(this);this.hl=this.hl.bind(this);this.wga=this.wga.bind(this);this.Dj=this.Dj.bind(this);this.ea=g;this.jm=null;this.nf=[];this.ea.addEventListener("loadedmetadata",this.hl,!0);this.ea.textTracks.addEventListener("addtrack",
this.wga,!1)});a.prototype.set=function(g){g&&this.iVa(g)};a.prototype.clear=function(){this.K4a()};a.prototype.dW=function(){var g=this.jm&&this.jm.track.activeCues;g&&(g=Array.prototype.slice.call(g,0));return g||[]};a.prototype.hl=function(){this.tFa()};a.prototype.wga=function(){this.tFa()};a.prototype.Dj=function(){this.NCa(this.jm.track.activeCues)};a.prototype.NCa=function(g){g||(g=[]);if(this.nf.length!=0||g.length!=0)this.nf=Array.prototype.slice.call(g),this.m(k.zl,this.nf)};a.prototype.iVa=
function(g){this.ea.log("TextTracksController","add text track src: "+g);this.jm=document.createElement("track");this.jm.kind="subtitles";this.jm.src=g;this.ea.appendChild(this.jm)};a.prototype.K4a=function(){this.jm&&(this.ea.log("TextTracksController","remove text track"),this.jm.track.removeEventListener("cuechange",this.Dj),this.jm.track.mode="disabled",this.jm.src="",this.ea.removeChild(this.jm),this.jm=null,this.NCa([]))};a.prototype.tFa=function(){for(var g=0;g<this.ea.textTracks.length;g++){var h=
this.ea.textTracks[g];h.removeEventListener("cuechange",this.Dj);h.mode=this.jm&&h==this.jm.track?"hidden":"disabled";h.mode=="hidden"&&h.addEventListener("cuechange",this.Dj)}};return a});
define("tdv/player/view/util/FileType",["require","exports","tdv/player/view/util/URL"],function(a,l,k){return function(){function n(){}n.is=function(g,h){g=k.parse(g).Ubb;return h.indexOf(g)!=-1};n.WD=function(g,h){return!!g&&h.some(function(e){return g.indexOf(e)===0})};n.ysa=[".mp4",".m4v",".m4p"];n.OSa=[".hevc"];n.esa=[".mov"];n.hUa=[".webm"];n.pTa=[".ogv",".ogg"];n.HLS=[".m3u8"];n.Ora=".ply .bin .splat .spz .sog .zip".split(" ");n.qUa=[".json"];n.QSa=".jpg .jpeg .png .webp .gif .avif .apng .bmp".split(" ");
n.Pp=".m3u8 .mpd .mp4 .m4v .m4p .webm .ogv .ogg .mpg .mpeg .m3u8 .mpd".split(" ");n.RSa=["data:image/"];return n}()});
define("tdv/view/av/TimeController","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Device tdv/player/view/util/FileType".split(" "),function(a){var l=a("tdv/utils");a("tdv/constants/EventName");var k=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=a("tdv/player/view/util/Device"),h=a("tdv/player/view/util/FileType"),e=l.extend(n,function(b){n.call(this);this.ea=b;this.Ky=this.Ky.bind(this);this.mn=this.mn.bind(this);this.mq=this.mq.bind(this);
this.hl=this.hl.bind(this);this.kn=this.kn.bind(this);this.j2=this.j2.bind(this);this.Lf=this.Lf.bind(this);this.Nfa=this.qM=this.jI=void 0;this.zja=0;this.ea.addEventListener("ended",this.kn,!0);this.ea.addEventListener("pause",this.mn,!1);this.ea.addEventListener("canplaythrough",this.Ky,!1);this.ea.addEventListener("timeupdate",this.j2,!1);this.ea.addEventListener("play",this.mq,!1);this.ea.addEventListener("playing",this.fv,!1)});e.prototype.clear=function(){this.ea&&(this.ea.removeEventListener("ended",
this.kn,!0),this.ea.removeEventListener("pause",this.mn,!1),this.ea.removeEventListener("canplaythrough",this.Ky,!1),this.ea.removeEventListener("timeupdate",this.j2,!1),this.ea.removeEventListener("play",this.mq,!1),this.ea.removeEventListener("playing",this.fv,!1),this.ea=null,this.jI&&clearInterval(this.jI))};e.prototype.setTime=function(b){if(!this.ea.srcObject){this.zja=0;this.U0=void 0;this.ea.log("TimeController","setTime: "+b);g.YGa()&&!h.is(this.pC(),h.HLS)?this.AQ=b||0:this.AQ=void 0;try{this.ea.currentTime=
b}catch(c){}g.Ub()==g.dF||g.Ub()==g.tK||g.Dc()==g.RY&&b==0||(this.qM=b,this.OEa())}};e.prototype.getTime=function(){return this.qM||this.ea.currentTime||0};e.prototype.hj=function(){return this.ea.duration||0};e.prototype.mq=function(){this.Sia(!0)};e.prototype.mn=function(){this.Sia(!1);this.U0=void 0};e.prototype.Ky=function(){this.ea.log("TimeController","on can play through");this.OEa()};e.prototype.kn=function(){this.AQ=void 0;this.Sia(!1)};e.prototype.hl=function(){this.m(new k(e.Zj))};e.prototype.OEa=
function(){if(this.ea.readyState>=this.ea.HAVE_ENOUGH_DATA&&this.qM!==void 0){this.ea.log("TimeController","updateCurrentTime when can play through set time to: "+this.qM);try{this.ea.currentTime=this.qM}catch(b){}this.qM=void 0}};e.prototype.Lf=function(){this.m(new k(e.Cg))};e.prototype.j2=function(){if(g.YGa()&&!g.aeb()&&!this.ea.paused&&this.ea.readyState>=this.ea.HAVE_ENOUGH_DATA){var b=(new Date).getTime();this.U0||(this.U0=b);this.Nfa&&b-this.Nfa>500&&(this.zja++,this.zja/((b-this.U0)*.001)>
.4&&g.Qib());this.Nfa=b}if(this.AQ!==void 0&&this.ea.currentTime>this.AQ){this.AQ=void 0;try{this.ea.currentTime-=.01}catch(c){}}this.Lf()};e.prototype.Sia=function(b){!!this.jI!=b&&(this.jI?(clearInterval(this.jI),this.jI=null):this.jI=setInterval(this.Lf,16))};e.prototype.pC=function(){return this.ea.currentSrc||this.ea.children.length&&this.ea.children[0].src||""};e.Cg="time update";e.Zj="duration update";return e});
define("tdv/view/av/DummyAudioData",["require"],function(){var a={WLa:"data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU2LjM2LjEwMAAAAAAAAAAAAAAA//OEAAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAAEAAABIADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV6urq6urq6urq6urq6urq6urq6urq6urq6v////////////////////////////////8AAAAATGF2YzU2LjQxAAAAAAAAAAAAAAAAJAAAAAAAAAAAASDs90hvAAAAAAAAAAAAAAAAAAAA//MUZAAAAAGkAAAAAAAAA0gAAAAATEFN//MUZAMAAAGkAAAAAAAAA0gAAAAARTMu//MUZAYAAAGkAAAAAAAAA0gAAAAAOTku//MUZAkAAAGkAAAAAAAAA0gAAAAANVVV"};a.src=
a.WLa;return a});
define("tdv/view/av/SrcSetter","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Capabilities tdv/player/view/util/URL tdv/player/view/util/Flags tdv/player/view/util/FileType tdv/player/view/util/LibsLoader tdv/view/av/DummyAudioData".split(" "),function(a){function l(p,q,r){this.src=p||"";this.Gm=q||"";this.startTime=r||0}var k=a("tdv/utils"),n=a("tdv/constants/EventName"),g=a("tdv/events/Event"),h=a("tdv/events/EventDispatcher"),e=a("tdv/player/view/util/Capabilities"),
b=a("tdv/player/view/util/URL"),c=a("tdv/player/view/util/Flags"),d=a("tdv/player/view/util/FileType"),f=a("tdv/player/view/util/LibsLoader"),m=a("tdv/view/av/DummyAudioData");a=k.extend(h,function(p,q){h.call(this);this.ea=p;this.lp=q;this.Xfa=!1;this.P3=[];this.Xf=this.bf=this.CL=null});a.prototype.set=function(p,q,r){this.ea.log("SrcSetter","set: "+p+" subtitles: "+q+" startTime: "+r);p=new l(p,q,r);this.bf&&this.bf.isEqual(p)||(!this.bf&&this.CL&&this.CL.isEqual(p)?this.u4():(this.bf=p,this.M1a()))};
a.prototype.clear=function(){this.Xf&&(this.Xf.destroy(),this.Xf=null);this.CL=null;this.J4a();this.lp.clear()};a.prototype.Ydb=function(){return!!this.bf};a.prototype.M1a=function(){this.Xfa=!0;this.sCa(this.bf.src)&&!f.HLS.kj()?(this.ea.log("SrcSetter","hls lib required"),f.HLS.load(this.vya,this)):this.vya()};a.prototype.vya=function(){this.Xfa&&(this.Xfa=!1,this.OVa())};a.prototype.OVa=function(){this.clear();this.K5a(this.N4a(this.bf.src));this.sCa(this.bf.src)?this.CVa():this.rfa(this.bf.src)?
this.PVa():this.QVa()};a.prototype.CVa=function(){var p=f.HLS.VO,q=(navigator.connection?Math.max(navigator.connection.downlink,2):2)*1024*1024,r=q*.66;this.Xf=new p({debug:c.bx,startPosition:this.bf.startTime===0?-1:this.bf.startTime,playlistLoadPolicy:{"default":{maxTimeToFirstByteMs:6E4,maxLoadTimeMs:6E4}},startLevel:-1,maxMaxBufferLength:12,autoStartLoad:!1,abrEwmaDefaultEstimate:q});this.Xf.loadSource(this.bf.src);this.Xf.attachMedia(this.ea);var t=function(){this.Xf.off(p.Events.MANIFEST_PARSED,
t);var u=this.Xf.levels.filter(function(w){return w.bitrate<=q});if(u.length){u.sort(function(w,y){return y.width-w.width});var v=this.Xf.levels.indexOf(u[0]);this.Xf.startLevel=v}u=this.Xf.levels.filter(function(w){return w.bitrate<=r});u.length&&(u.sort(function(w,y){return y.width-w.width}),this.Xf.config.minAutoBitrate=u[0].bitrate-1);u=this.Xf.levels.filter(function(w){return e.ckb(w.width,w.height)});c.PSa&&(u.sort(function(w,y){return y.width-w.width}),v=this.Xf.levels.indexOf(u[0]),this.Xf.startLevel=
v);u.length&&u.length<this.Xf.levels.length&&(u.sort(function(w,y){return y.width-w.width}),this.Xf.autoLevelCapping=this.Xf.levels.indexOf(u[0]));this.ea.log("SrcSetter","bandwidth: "+q+" lowBandwidth: "+r);this.ea.log("SrcSetter","levels: "+this.Xf.levels);this.ea.log("SrcSetter","startLevel: "+this.Xf.levels[this.Xf.startLevel]);this.ea.log("SrcSetter","minLevel: "+this.Xf.levels[this.Xf.minAutoLevel]);this.Xf.startLoad(this.bf.startTime===0?-1:this.bf.startTime);this.bf.startTime!=0&&this.wv(this.bf.startTime);
this.bf.Gm&&this.lp.set(this.bf.Gm);this.CL=this.bf;this.bf=null;this.u4()}.bind(this);this.Xf.on(p.Events.MANIFEST_PARSED,t);this.Xf.on(p.Events.Ylb,function(u,v){v.fatal&&v.type==p.ErrorTypes.cmb&&this.Xf.recoverMediaError()}.bind(this))};a.prototype.QVa=function(){this.bf.src?this.Xta(this.bf.src):this.Xta(m.WLa,"audio/mpeg");this.bf.Gm&&this.lp.set(this.bf.Gm);this.ea.load();this.bf.startTime!=0&&this.wv(this.bf.startTime);this.CL=this.bf;this.bf=null;this.u4()};a.prototype.PVa=function(){this.ea.srcObject=
this.bf.src;this.CL=this.bf;this.bf=null;this.u4()};a.prototype.u4=function(){this.ea.log("SrcSetter","src ready");this.m(new g(n.ud))};a.prototype.sCa=function(p){return!!p&&!this.rfa(p)&&d.is(p,d.HLS)&&!e.jKa};a.prototype.N4a=function(p){return!!p&&!this.rfa(p)&&b.una(p)};a.prototype.K5a=function(p){p&&!this.ea.hasAttribute("crossorigin")?this.ea.setAttribute("crossorigin","anonymous"):!p&&this.ea.hasAttribute("crossorigin")&&this.ea.removeAttribute("crossorigin")};a.prototype.rfa=function(p){return p instanceof
MediaStream};a.prototype.wv=function(p){try{this.ea.currentTime=p}catch(q){}};a.prototype.Xta=function(p,q){var r=document.createElement("source");q||(q=this.v0a(p));q&&(r.type=q);b.WD(p)||(p=b.zD(p,"swbypass=true"));r.src=p;this.ea.appendChild(r);this.P3.push(r)};a.prototype.J4a=function(){for(;this.P3&&this.P3.length;){var p=this.P3.shift();p.src="";this.ea.removeChild(p)}this.ea.srcObject=null};a.prototype.v0a=function(p){switch(b.getExtension(p).toLowerCase()){case ".mp3":return"audio/mpeg";case ".ogg":return"audio/ogg";
case ".m4v":case ".mp4":return"video/mp4";case ".webm":return"video/webm";case ".ogv":return"video/ogg";case ".m3u8":return"application/x-mpegURL";case ".mov":return"video/quicktime"}};l.prototype.isEqual=function(p){return this.src==p.src&&this.Gm==p.Gm};return a});
define("tdv/view/av/HTMLMediaPlayer","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Device tdv/player/view/util/Flags tdv/view/core/UIComponent tdv/view/util/AudioActivation tdv/view/util/UserInitiatedAction tdv/view/av/AudioController tdv/view/av/MediaType tdv/view/av/PlaybackController tdv/view/av/TextTracksController tdv/view/av/TimeController tdv/view/av/SrcSetter".split(" "),function(a){function l(w){setTimeout(w,0)}var k=a("tdv/utils"),
n=a("tdv/constants/EventName"),g=a("tdv/events/Event"),h=a("tdv/events/EventDispatcher"),e=a("tdv/player/view/util/Device"),b=a("tdv/player/view/util/Flags");a("tdv/view/core/UIComponent");var c=a("tdv/view/util/AudioActivation"),d=a("tdv/view/util/UserInitiatedAction"),f=a("tdv/view/av/AudioController"),m=a("tdv/view/av/MediaType"),p=a("tdv/view/av/PlaybackController"),q=a("tdv/view/av/TextTracksController"),r=a("tdv/view/av/TimeController"),t=a("tdv/view/av/SrcSetter"),u=0,v=k.extend(h,function(w,
y){h.call(this);this.Of=w;this.P9a=y;this.hl=this.hl.bind(this);this.Gu=this.Gu.bind(this);this.Tga=this.Tga.bind(this);this.pq=this.AL=null;this.D2=void 0;this.Hc=this.Fb=null;this.uo="inactive";this.Iq=this.Ta=this.ne=this.uz=this.lp=null;this.Ef=!1;this.yDa(document.createElement(this.Of));y&&d.wait(this.Gu)});v.prototype.yDa=function(w){this.bEa();this.Hc=w;for(this.Hc.parentNode&&this.Hc.parentNode.removeChild(this.Hc);this.Hc.children.length;)this.Hc.removeChild(this.Hc.children[0]);this.S6a();
this.Hc.autoplay=!1;this.Hc.autobuffer="autobuffer";this.Hc.preload=e.Ub()==e.Ii?"metadata":"none";this.Hc.setAttribute("preload",e.Ub()==e.Ii?"metadata":"none");this.Hc.setAttribute("webkit-playsinline","true");this.Hc.setAttribute("playsinline","true");this.Hc.addEventListener("loadedmetadata",this.hl,!0);this.lp=new q(this.Hc);this.lp.bind(n.zl,this.Dj,this,!0);this.uz=new t(this.Hc,this.lp);this.uz.bind(n.ud,this.hBa,this,!0);this.ne=new f(this.Hc);this.Ta=new p(this.Hc);this.Ta.bind(p.C$,this.Hza,
this,!0);this.Ta.bind(p.Al,this.kn,this,!0);this.Ta.bind(p.Y$,this.mq,this,!0);this.Iq=new r(this.Hc);this.Iq.bind(r.Cg,this.Lf,this,!0);this.Iq.bind(r.Zj,this.Wo,this,!0)};v.prototype.S6a=function(){if(b.bx){var w="["+this.Of+" "+u++ +"]";this.Hc.log=function(y,x){console.log(w+"["+(new Date).toISOString().split("T")[1]+"] "+y+" "+x)}}else this.Hc.log=function(){}};v.prototype.bEa=function(){this.Hc&&(this.Hc.removeEventListener("loadedmetadata",this.hl,!0),this.uz&&(this.uz.h(n.ud,this.hBa,this,
!0),this.uz.clear(),this.uz=null),this.lp&&(this.lp.h(n.zl,this.Dj,this,!0),this.lp.clear(),this.lp=null),this.ne&&(this.ne.clear(),this.ne=null),this.Ta&&(this.Ta.h(p.C$,this.Hza,this,!0),this.Ta.h(p.Al,this.kn,this,!0),this.Ta.h(p.Y$,this.mq,this,!0),this.Ta.clear(),this.Ta=null),this.Iq&&(this.Iq.h(r.Cg,this.Lf,this,!0),this.Iq.h(r.Zj,this.Wo,this,!0),this.Iq.clear(),this.Iq=null),this.Hc=null)};v.prototype.clear=function(){this.bEa()};v.prototype.oO=function(w,y,x){if(this.Ln()&&this.iJ())try{return w.drawImage(this.Hc,
0,0,y,x),!0}catch(z){}w.fillRect(0,0,y,x);return!1};v.prototype.play=function(w,y,x){this.Hc.log("HTMLMediaPlayer","play src: "+y.src+" subtitlesSrc: "+y.Gm+" hasAudio: "+y.UD+" gain: "+y.gain);this.Fb=w;this.AL=null;this.pq=y.clone();this.D2=x||0;this.vVa()};v.prototype.X6=function(){return this.uo=="activated"};v.prototype.W9=function(){return this.P9a};v.prototype.stop=function(){this.Hc.log("HTMLMediaPlayer","stop");this.Ta.stop();this.pq=null};v.prototype.getState=function(){return this.Ta.getState()};
v.prototype.iJ=function(){return this.uz.Ydb()?!1:this.Ta.iJ()};v.prototype.Ag=function(w){this.ne.Ag(w);this.Ef=w;this.Fb&&this.uo=="requested"&&(this.Ef?c.cancel(this.Fb):c.request(this.Fb))};v.prototype.TA=function(w){this.ne.TA(w)};v.prototype.SX=function(w){this.ne.SX(w)};v.prototype.setLoop=function(w){this.KVa(w)};v.prototype.getCurrentTime=function(){return this.Iq.getTime()};v.prototype.setCurrentTime=function(w){return this.Iq.setTime(w)};v.prototype.hj=function(){return this.Iq.hj()};v.prototype.Ln=
function(){return this.Of==m.Pp};v.prototype.getType=function(){return this.Of};v.prototype.dg=function(){return this.Hc&&this.Ln()&&this.Hc.videoWidth||0};v.prototype.wg=function(){return this.Hc&&this.Ln()&&this.Hc.videoHeight||0};v.prototype.dW=function(){return this.lp.dW()};v.prototype.vVa=function(){this.Hc.log("HTMLMediaPlayer","assert can play");this.uo=="activated"||!this.pq.UD||this.pq.gain==0||this.Ef?(this.Hc.log("HTMLMediaPlayer","can play activationState: "+this.uo+" pending media has audio: "+
this.pq.UD+" muted: "+this.Ef),this.vH()):this.uo=="inactive"&&(this.Hc.log("HTMLMediaPlayer","needs activation"),this.Fb&&this.Of==m.Pp&&this.z0a()?this.MUa():this.Fb&&d.b7()?this.Gu():this.Fb&&this.uVa())};v.prototype.z0a=function(){var w=this.Dwa();return!w||w.currentSrc&&!w.paused||w.muted?!1:!0};v.prototype.Dwa=function(){return this.Fb.get("settings").get(TDV.PlayerSettings.ACTIVE_VIDEO_ELEMENT)};v.prototype.MUa=function(){this.Hc.log("HTMLMediaPlayer","activate with application parameter");
this.yDa(this.Dwa());this.Gu()};v.prototype.uVa=function(){this.Hc.log("HTMLMediaPlayer","ask for activation");this.uo="requested";c.lra(this.Gu);this.Fb&&!this.Ef&&c.request(this.Fb)};v.prototype.Gu=function(){if(this.uo=="inactive"||this.uo=="requested")this.Hc.log("HTMLMediaPlayer","activate received when state: "+this.uo+" and has media: "+!!this.AL),this.AL?l(function(){d.wait(this.Gu)}.bind(this)):(this.uo="activating",this.uz.set("","",0))};v.prototype.vH=function(){this.Hc.log("HTMLMediaPlayer",
"media can play. Has pending properties: "+!!this.pq);this.pq&&this.uz.set(this.pq.src,this.pq.Gm,this.D2)};v.prototype.hBa=function(){this.uo=="activating"?this.n3a():this.pq&&this.W2a()};v.prototype.n3a=function(){this.Hc.log("HTMLMediaPlayer","on src ready activating");this.Ta.play()};v.prototype.mq=function(){this.uo=="activating"&&(this.Hc.log("HTMLMediaPlayer","on play activating"),this.Ta.stop(),this.uo="activated",this.vH())};v.prototype.W2a=function(){this.Hc.log("HTMLMediaPlayer","on pending src ready");
this.AL=this.pq;this.pq=null;this.DVa(this.AL.UD);this.BVa(this.AL.gain);this.Iq.setTime(this.D2);this.D2=void 0;this.Ta.play()};v.prototype.DVa=function(w){this.ne.Yhb(w)};v.prototype.BVa=function(w){this.ne.SX(w)};v.prototype.KVa=function(w){w&&!this.Hc.hasAttribute("loop")?this.Hc.setAttribute("loop",""):!w&&this.Hc.hasAttribute("loop")&&this.Hc.removeAttribute("loop")};v.prototype.Hza=function(){this.Hc.log("HTMLMediaPlayer","on deactivated");c.Kib();d.wait(this.Tga);this.Fb&&l(function(){c.request(this.Fb)}.bind(this))};
v.prototype.Tga=function(){this.Hc.log("HTMLMediaPlayer","on reactivated");this.Ta.play()};v.prototype.Dj=function(){this.m(n.zl,this.lp.dW())};v.prototype.hl=function(){this.m(new g(v.xSa))};v.prototype.Lf=function(){this.m(new g(v.Cg))};v.prototype.Wo=function(){this.m(new g(v.Zj))};v.prototype.kn=function(){this.m(new g(v.Al))};v.Cg="time update";v.Zj="duration update";v.xSa="size update";v.Al="end";return v});
define("tdv/view/av/Subtitle",["require"],function(){return function(a){this.cue=a;this.text=a.text}});define("tdv/view/av/AVProperties",["require"],function(){function a(){this.Gm=this.src=void 0;this.UD=!1;this.gain=1}a.prototype.clone=function(){var l=new a;l.src=this.src;l.Gm=this.Gm;l.UD=this.UD;l.gain=this.gain;return l};return a});
define("tdv/view/av/SharedPlayerOrchestrator","require tdv/utils tdv/constants/EventName tdv/constants/PlaybackState tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Capabilities tdv/player/view/util/Device tdv/player/view/util/URL tdv/view/av/HTMLMediaPlayer tdv/view/av/MediaType".split(" "),function(a){function l(t){this.Lx=t;this.Ja=null;this.Ofa=(new Date).getTime()}var k=a("tdv/utils"),n=a("tdv/constants/EventName"),g=a("tdv/constants/PlaybackState"),h=a("tdv/events/Event"),e=
a("tdv/events/EventDispatcher"),b=a("tdv/player/view/util/Capabilities"),c=a("tdv/player/view/util/Device"),d=a("tdv/player/view/util/URL"),f=a("tdv/view/av/HTMLMediaPlayer"),m=a("tdv/view/av/MediaType");l.prototype.wna=function(){return this.Ja==null};l.prototype.X6=function(){return this.Lx.X6()};l.prototype.W9=function(){return this.Lx.W9()};l.prototype.item=function(){return this.Ja};l.prototype.hcb=function(){this.Ja.kLa();this.Ja=null};l.prototype.use=function(t){this.Ja=t;this.Ja.oIa(this.Lx);
this.Ofa=(new Date).getTime()};var p=k.extend(e,function(){e.call(this);this.zv=[];var t=d.mJa("avs",10);var u=c.Dc()==c.kB?10:b.W$a()?4:1;u=d.mJa("avpas",u);for(var v=0;v<t;v++)this.zv.push(new l(new f(m.Pp,v<u)));this.Ff=[];this.H=g.ca});p.prototype.MO=function(){return this.zxa().length>0};p.prototype.y8=function(t){this.Ff=[t].concat(this.Ff.filter(u=>u!==t));this.tha();r()};p.prototype.appendItem=function(t){this.Ff.push(t);this.tha();r()};p.prototype.sX=function(t){this.Ff=this.Ff.filter(u=>
u!==t);this.tha()};p.prototype.tha=function(){var t=this.Z_a();if(p.rKa())for(;this.zv.length<t.length;)this.zv.push(new l(new f(m.Pp,!1)));this.zxa().forEach(function(u){t.indexOf(u.item())<0&&u.hcb()});this.Id(t.length>0?g.PLAYING:g.ca);t.forEach(function(u){if(!this.x_a(u)){var v=this.o_a(u.getType(),u.jpa());v||u.jpa()||this.zv.push(v=new l(new f(m.Pp,!1)));v&&v.use(u)}}.bind(this));this.p_a().forEach(function(u){u.Lx.stop()})};p.prototype.Z_a=function(){return this.Ff.map(function(t,u){var v=
{};v.index=u;v.priority=t.DJa();v.item=t;return v}).sort(function(t,u){return t.priority-u.priority||t.index-u.index}).map(function(t){return t.item})};p.prototype.Id=function(t){this.H!=t&&(this.H=t,this.m(new h(this.H==g.ca?n.Dg:n.Np)))};p.prototype.o_a=function(t,u){t=this.zv.filter(function(v){return v.wna()});return t.length?(u?(u=t.filter(function(v){return v.X6()}),u.length||(u=t.filter(function(v){return v.W9()}))):(u=t.filter(function(v){return!v.W9()}),u.length||(u=t.filter(function(v){return!v.X6()}))),
u.length&&(t=u),c.Ub()==c.Ok?(t.sort(function(v,w){return w.Ofa-v.Ofa}),t[Math.min(2,t.length-1)]):t[0]):null};p.prototype.p_a=function(){return this.zv.filter(function(t){return t.wna()})};p.prototype.zxa=function(){return this.zv.filter(function(t){return!t.wna()})};p.prototype.x_a=function(t){for(var u=0;u<this.zv.length;u++)if(this.zv[u].item()==t)return this.zv[u];return null};p.Ll=null;p.bind=function(){var t=p.zj();t.bind.apply(t,arguments)};p.h=function(){var t=p.zj();t.h.apply(t,arguments)};
var q=[c.jB,c.mu].indexOf(c.Dc())>=0;p.rKa=function(){return q};p.MO=function(){return p.zj().MO()};p.appendItem=function(t){p.zj().appendItem(t)};p.y8=function(t){p.zj().y8(t)};p.sX=function(t){p.zj().sX(t)};p.Ux=function(){p.Ll===null&&(p.Ll=new p);return p.Ll};p.zj=p.Ux;p.Ux();var r=function(){if([c.jB,c.mu].indexOf(c.Dc())>=0){var t=document.createElement("video");t.muted=!1;t.setAttribute("loop","");t.src="data:video/mp4;base64, ";
return function(){try{t.pause(),setTimeout(function(){t.play()["catch"](function(){})},0)}catch(u){}}}return function(){}}();return p});
define("tdv/view/av/AudioPlayer","require tdv/utils tdv/events/Event tdv/events/EventDispatcher tdv/constants/EventName tdv/constants/PlaybackState tdv/view/av/HTMLMediaPlayer tdv/view/av/Subtitle tdv/view/av/AVProperties tdv/view/av/MediaType tdv/view/av/SharedPlayerOrchestrator tdv/view/util/Animation tdv/player/view/util/Capabilities".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=a("tdv/constants/EventName"),h=a("tdv/constants/PlaybackState"),
e=a("tdv/view/av/HTMLMediaPlayer"),b=a("tdv/view/av/Subtitle"),c=a("tdv/view/av/AVProperties"),d=a("tdv/view/av/MediaType"),f=a("tdv/view/av/SharedPlayerOrchestrator"),m=a("tdv/view/util/Animation"),p=a("tdv/player/view/util/Capabilities"),q=l.extend(n,function(r,t,u){n.call(this);this.Fb=r;this.C=t;this.ov=u;this.B=null;this.mU();this.H1=this.H1.bind(this);this.C.bind(g.N("gain"),this.vM,this,!0);this.C.bind(g.N("mp3Url"),this.Rl,this,!0);this.C.bind(g.N("oggUrl"),this.Rl,this,!0);this.C.bind(g.N("subtitlesURL"),
this.Rl,this,!0);this.H=h.ca;this.Ol=!1;this.cC=this.$b=0;this.Ef=!1;this.it=1;this.oR=!1;this.KL=1;this.Sd=null;this.Up=[]});q.prototype.Vb=function(){return this.Fb};q.prototype.Zc=function(r){this.H==r||r==h.Yb&&this.H!=h.PLAYING||(this.H=r,this.H==h.PLAYING?(this.JWa(),f.y8(this)):this.c7a(),this.Oja())};q.prototype.c7a=function(){this.oR||(this.oR=!0,this.qwa=this.C.get("fadeOutTime"),this.qwa==0?this.VDa():this.H1(0))};q.prototype.H1=function(r){this.Sd&&this.KL!=0&&this.oR&&!this.i1a()?(this.KL=
Math.max(0,this.KL-r/this.qwa),this.OZ(),m.requestFrame(this.H1)):this.VDa()};q.prototype.JWa=function(){this.oR=!1;this.KL=1;this.OZ()};q.prototype.VDa=function(){this.oR=!1;this.KL=1;this.Sd&&(f.sX(this),this.H==h.ca&&this.Ria())};q.prototype.getState=function(){return this.H};q.prototype.hj=function(){return this.$b};q.prototype.setCurrentTime=function(r){this.cC=r;this.Sd&&this.Sd.play(this.Fb,this.B,this.cC)};q.prototype.getCurrentTime=function(){return this.cC};q.prototype.TA=function(r){this.it=
r;this.OZ()};q.prototype.OZ=function(){this.Sd&&this.Sd.TA(this.it*this.KL)};q.prototype.Ag=function(r){this.Ef=r;this.Sd&&this.Sd.Ag(r)};q.prototype.setLoop=function(r){this.Ol=r;this.Sd&&this.Sd.setLoop(r)};q.prototype.jpa=function(){return!this.Ef};q.prototype.getType=function(){return d.WRa};q.prototype.DJa=function(){return this.ov};q.prototype.oIa=function(r){this.Sd=r;setTimeout(function(){this.Sd&&this.Sd.bind(e.Al,this.LS,this,!0)}.bind(this),0);this.mU();this.Sd.bind(e.Cg,this.Lf,this,!0);
this.Sd.bind(e.Zj,this.Wo,this,!0);this.Sd.bind(g.zl,this.Dj,this,!0);this.Sd.Ag(this.Ef);this.OZ();this.Sd.setLoop(this.Ol);this.Sd.play(this.Fb,this.B,this.cC)};q.prototype.kLa=function(){this.cC=this.Sd.getCurrentTime();this.Sd.h(e.Al,this.LS,this,!0);this.Sd.h(e.Cg,this.Lf,this,!0);this.Sd.h(e.Zj,this.Wo,this,!0);this.Sd.h(g.zl,this.Dj,this,!0);this.Sd=null};q.prototype.clear=function(){this.Zc(h.ca);this.C&&(this.C.h(g.N("gain"),this.vM,this,!0),this.C.h(g.N("mp3Url"),this.Rl,this,!0),this.C.h(g.N("oggUrl"),
this.Rl,this,!0),this.C.h(g.N("subtitlesURL"),this.Rl,this,!0),this.C=null)};q.prototype.Rl=function(){this.RH&&clearTimeout(this.RH);this.RH=setTimeout(function(){this.RH=null;this.Sd&&(this.B.src=this.pC(this.C),this.B.Gm=this.C.get("subtitlesURL"),this.Sd.play(this.Fb,this.B,this.cC))}.bind(this),10)};q.prototype.vM=function(){if(this.Sd){var r=this.C.get("gain");this.B.gain!=r&&(this.B.gain=r,this.Sd.SX(this.B.gain))}};q.prototype.mU=function(){this.B=new c;this.B.src=this.pC(this.C);this.B.Gm=
this.C.get("subtitlesURL");this.B.UD=!0;this.B.gain=this.C.get("gain")};q.prototype.pC=function(r){var t=r.get("mp3Url");return t&&p.xKa?t:(r=r.get("oggUrl"))&&p.yKa?r:t||r};q.prototype.Wo=function(){this.$b=this.Sd.hj();this.Jja()};q.prototype.Lf=function(){this.$b!=this.Sd.hj()&&this.Wo();this.cC=this.Sd.getCurrentTime();this.SU()};q.prototype.Dj=function(){this.Up=this.Sd.dW().map(function(r){for(var t=null,u=0;u<this.Up.length&&!t;u++)this.Up[u].cue==r&&(t=this.Up[u]);t||(t=new b(r));return t}.bind(this));
this.m(new k(g.zl))};q.prototype.LS=function(){this.Zc(h.ca);this.Kja()};q.prototype.i1a=function(){return this.Sd&&this.Sd.getCurrentTime()&&this.Sd.getCurrentTime()==this.Sd.hj()};q.prototype.Ria=function(){this.cC=0;this.SU()};q.prototype.SU=function(){this.m(new k(q.Cg))};q.prototype.Jja=function(){this.m(new k(q.Zj))};q.prototype.Kja=function(){this.m(new k(g.Sb))};q.prototype.Oja=function(){this.m(new k(g.$e))};q.Cg="time update";q.Zj="duration update";return q});
define("tdv/view/av/VideoFrame",["require"],function(){function a(k,n,g){this.ke=k;this.iEa=n;this.Ru=g||l}var l=function(){var k=document.createElement("canvas");k.width=k.height=256;k.getContext("2d").clearRect(0,0,k.width,k.height);return k}();a.prototype.isEmpty=function(){return this.Ru==l||this.Ru.tagName=="CANVAS"&&(this.Ru.width==0||this.Ru.height==0)};a.prototype.isEqual=function(k,n){return this.ke==k.ke&&Math.abs(this.iEa-k.iEa)<=(n||0)&&this.Ru==k.Ru};return a});
define("tdv/view/av/VideoLevelUtil",["require","tdv/player/view/util/Capabilities","tdv/player/view/util/Device","tdv/player/view/util/FileType"],function(a){function l(b){return g.sQa(b)}function k(b,c){if(!c)return!0;var d=b.get("url"),f=b.get("srcObject");b=b.get("type")||"";switch(c){case "srcObj":return!!f;case "webm":return h.is(d,h.hUa)||n(b,"webm");case "h265":return h.is(d,h.OSa)||(h.is(d,h.ysa)||h.is(d,h.esa)||!d)&&(n(b,"hev1")||n(b,"h265")||n(b,"heic"))?!0:!1;case "mp4":return h.is(d,h.ysa)||
n(b,"mp4");case "hls":return h.is(d,h.HLS)||n(b,"x-mpegurl");case "ogv":return h.is(d,h.pTa)||n(b,"ogg");case "mov":return h.is(d,h.esa)||n(b,"quicktime");default:return!1}}function n(b,c){return(b||"").toLowerCase().indexOf(c)>=0}var g=a("tdv/player/view/util/Capabilities");a("tdv/player/view/util/Device");var h=a("tdv/player/view/util/FileType"),e={zdb:function(b){return e.select(b.get("levels"))},wdb:function(b){return e.select(b.get("levels"))},select:function(b){b||(b=[]);b=b.slice();var c=[];
c.push({type:"srcObj",du:!0});g.Tdb&&c.push({type:"hls",du:!1});g.leb&&c.push({type:"h265",du:!0});g.ena&&c.push({type:"webm",du:!0});g.L6&&c.push({type:"mp4",du:!0});g.meb&&c.push({type:"mov",du:!0});g.dna&&c.push({type:"ogv",du:!0});c.push({type:"mp4",du:!0});c.push({type:"webm",du:!0});c.push({type:"mp4",du:!1});c.push({type:"webm",du:!1});for(var d=0;d<c.length;d++){var f=b;c[d].du&&(f=f.filter(l));f=f.filter(function(m){if(k(m,c[d].type))return!0});c[d].type!="hls"&&f.sort(function(m,p){return p.get("width")-
m.get("width")});if(f.length)return f[0]}return null}};return e});
define("tdv/view/av/VideoPlayer","require tdv/utils tdv/events/Event tdv/events/EventDispatcher tdv/constants/EventName tdv/constants/PlaybackState tdv/constants/Priority tdv/player/parser/ClassInfo tdv/player/view/util/Device tdv/player/view/util/URL tdv/view/av/HTMLMediaPlayer tdv/view/av/Subtitle tdv/view/av/VideoFrame tdv/view/av/AVProperties tdv/view/av/MediaType tdv/view/av/SharedPlayerOrchestrator tdv/view/av/VideoLevelUtil".split(" "),function(a){function l(y){d.Ub()==d.Ok&&(y=f.zD(y,"playbacksession="+
(new Date).getTime()));return y}var k=a("tdv/utils"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),h=a("tdv/constants/EventName"),e=a("tdv/constants/PlaybackState"),b=a("tdv/constants/Priority"),c=a("tdv/player/parser/ClassInfo"),d=a("tdv/player/view/util/Device"),f=a("tdv/player/view/util/URL"),m=a("tdv/view/av/HTMLMediaPlayer"),p=a("tdv/view/av/Subtitle"),q=a("tdv/view/av/VideoFrame"),r=a("tdv/view/av/AVProperties"),t=a("tdv/view/av/MediaType"),u=a("tdv/view/av/SharedPlayerOrchestrator"),
v=a("tdv/view/av/VideoLevelUtil"),w=k.extend(g,function(y,x){g.call(this);this.Fb=y;this.C=x;this.rb=w.Ak(this.C);this.B=null;this.mU();this.C.bind(h.N("subtitlesURL"),this.Rl,this,!0);this.C.bind(h.N("gain"),this.vM,this,!0);this.rb.bind(h.N("srcObject"),this.Rl,this,!0);this.rb.bind(h.N("subtitlesURL"),this.Rl,this,!0);this.rb.bind(h.N("url"),this.Rl,this,!0);this.rb.bind(h.N("gain"),this.vM,this,!0);this.H=e.ca;this.mg=this.$b=0;this.Ef=!1;this.it=1;this.Ol=!1;this.fa=this.mc=null;this.lL=!1;this.e_=
void 0;this.$ua=!1;this.Up=[]});w.prototype.Vb=function(){return this.Fb};w.prototype.Zc=function(y){this.H==y||y==e.Yb&&this.H!=e.PLAYING||(this.$ua&&y==e.PLAYING&&this.H==e.ca&&this.fca(),this.H=y,this.H==e.PLAYING?(this.mc&&this.mc.play(this.Fb,this.B,this.mg),u.y8(this)):(u.rKa()?this.mc&&this.mc.stop():u.sX(this),this.H==e.ca&&this.Ria()),this.Oja())};w.prototype.getState=function(){return this.H};w.prototype.hj=function(){return this.$b};w.prototype.setCurrentTime=function(y){this.mg=y;this.mc&&
(this.mc.iJ()&&this.iR(),this.mc.play(this.Fb,this.B,this.mg))};w.prototype.getCurrentTime=function(){return this.mg};w.prototype.TA=function(y){this.it=y;this.mc&&this.mc.TA(y)};w.prototype.Ag=function(y){this.Ef=y;this.mc&&this.mc.Ag(y)};w.prototype.setLoop=function(y){this.Ol=y;this.mc&&this.mc.setLoop(y)};w.prototype.Fhb=function(){this.$ua=!0};w.prototype.oO=function(y,x,z){this.mc&&this.mc.iJ()?this.mc.oO(y,x,z):this.lL?y.drawImage(this.fa,0,0,x,z):y.fillRect(0,0,x,z)};w.prototype.j6=function(){if(this.mc&&
this.mc.iJ()){var y=this.mc.getCurrentTime(),x=this.mc.Hc;if(this.RR())return new q(this.B.src,this.e_,this.fa);this.fca();return new q(this.B.src,y,x)}return this.lL?new q(this.B.src,this.mg,this.fa):new q(this.B.src,this.mg,null)};w.prototype.jpa=function(){return!this.Ef&&this.C.get("hasAudio")};w.prototype.getType=function(){return t.Pp};w.prototype.DJa=function(){return b.Pp};w.prototype.oIa=function(y){this.mc=y;setTimeout(function(){this.mc&&this.mc.bind(m.Al,this.LS,this,!0)}.bind(this),0);
this.mU();this.mc.bind(m.Cg,this.Lf,this,!0);this.mc.bind(m.Zj,this.Wo,this,!0);this.mc.bind(h.zl,this.Dj,this,!0);this.mc.Ag(this.Ef);this.mc.TA(this.it);this.mc.setLoop(this.Ol);this.mc.play(this.Fb,this.B,this.mg)};w.prototype.kLa=function(){this.mc.iJ()&&this.iR();this.mg=this.mc.getCurrentTime();this.mc.h(m.Al,this.LS,this,!0);this.mc.h(m.Cg,this.Lf,this,!0);this.mc.h(m.Zj,this.Wo,this,!0);this.mc.h(h.zl,this.Dj,this,!0);this.H==e.ca&&(this.mc.stop(),this.mc.setCurrentTime(0),this.eXa());this.mc=
null};w.prototype.clear=function(){u.sX(this);this.fca();this.C&&(this.C.h(h.N("subtitlesURL"),this.Rl,this,!0),this.C.h(h.N("gain"),this.vM,this,!0),this.C=null);this.rb&&(this.rb.h(h.N("subtitlesURL"),this.Rl,this,!0),this.rb.h(h.N("url"),this.Rl,this,!0),this.rb.h(h.N("srcObject"),this.Rl,this,!0),this.rb=null)};w.prototype.Rl=function(){this.RH&&clearTimeout(this.RH);this.RH=setTimeout(function(){this.RH=null;this.mc&&(this.B.Gm=this.C.get("subtitlesURL")||this.rb.get("subtitlesURL"),this.B.src=
this.rb.get("srcObject")||l(this.rb.get("url")),this.mc.play(this.Fb,this.B,this.mg))}.bind(this),10)};w.prototype.vM=function(){this.mc&&(this.B.gain=this.C.get("gain",1)*this.rb.get("gain",1),this.mc.SX(this.B.gain))};w.prototype.mU=function(){this.B=new r;this.B.src=this.rb.get("srcObject")||l(this.rb.get("url"));this.B.Gm=this.C.get("subtitlesURL")||this.rb.get("subtitlesURL");this.B.UD=this.C.get("hasAudio",!0)&&this.rb.get("hasAudio",!0);this.B.gain=this.C.get("gain",1)*this.rb.get("gain",1)};
w.prototype.iR=function(){this.fa||(this.fa=document.createElement("canvas"));if(!this.RR()){this.fa.width=this.mc.dg();this.fa.height=this.mc.wg();this.e_=this.mc.getCurrentTime();var y=this.fa.getContext("2d");y.clearRect(0,0,this.fa.width,this.fa.height);this.lL=this.mc.oO(y,this.fa.width,this.fa.height)}};w.prototype.RR=function(){var y=this.mc.getCurrentTime();this.$b&&(y=Math.min(y,this.$b));return this.lL&&Math.abs(y-this.e_)<=.15};w.prototype.fca=function(){this.lL&&(this.e_=void 0,this.lL=
!1,d.Ub()!=d.Ok&&(this.fa.width=0,this.fa.height=0,this.fa=null))};w.prototype.Wo=function(){this.$b=this.mc.hj();this.Jja()};w.prototype.Lf=function(){var y=this.mc.hj();y!==0&&(this.$b!=y&&this.Wo(),this.mg=this.mc.getCurrentTime(),d.Md()==d.pj&&this.mg>0&&this.mg>this.$b-.15&&!this.RR()&&!this.Ol?this.iR():d.Ub()==d.Ok&&this.mg>0&&this.mg>this.$b-.05&&!this.RR()&&!this.Ol?this.iR():d.Ub()==d.Hp&&this.mg>0&&this.mg>this.$b-.05&&!this.RR()&&this.Ol&&this.iR(),this.SU())};w.prototype.Dj=function(){this.Up=
this.mc.dW().map(function(y){for(var x=null,z=0;z<this.Up.length&&!x;z++)this.Up[z].cue==y&&(x=this.Up[z]);x||(x=new p(y));return x}.bind(this));this.m(new n(h.zl))};w.prototype.eXa=function(){this.Up.length!=0&&(this.Up=[],this.m(new n(h.zl)))};w.prototype.LS=function(){this.Zc(e.ca);this.Kja()};w.prototype.Ria=function(){this.mg=0;this.SU()};w.prototype.SU=function(){this.m(new n(w.Cg))};w.prototype.Jja=function(){this.m(new n(w.Zj))};w.prototype.Kja=function(){this.m(new n(h.Sb))};w.prototype.Oja=
function(){this.m(new n(h.$e))};w.Cg="time update";w.Zj="duration update";w.Ak=function(y){if(c.Qa("Video360Resource",y))return v.wdb(y);if(c.Qa("VideoResource",y))return v.zdb(y);throw"invalid video resource object: "+y;};return w});
define("tdv/view/av/SubtitleController",["require","tdv/view/av/VideoPlayer","tdv/constants/EventName"],function(a){function l(n,g){this.PZ=n;this.Lx=g;this.jba=[];this.bWa();this.Dj()}a("tdv/view/av/VideoPlayer");var k=a("tdv/constants/EventName");l.prototype.clear=function(){this.YWa();this.q8a();this.Lx=this.PZ=null};l.prototype.bWa=function(){this.Lx.bind(k.zl,this.Dj,this,!0)};l.prototype.q8a=function(){this.Lx.h(k.zl,this.Dj,this,!0)};l.prototype.Dj=function(){this.PZ.set("activeSubtitles",
this.jba=this.Lx.Up)};l.prototype.YWa=function(){this.PZ.get("activeSubtitles")==this.jba&&this.PZ.set("activeSubtitles",this.jba=[])};return l});
define("tdv/player/script/Audio","require tdv/constants/EventName tdv/constants/Priority tdv/constants/PlaybackState tdv/binding/Bindable tdv/events/Event tdv/player/parser/ClassInfo tdv/view/av/AudioPlayer tdv/view/av/SubtitleController".split(" "),function(a){var l=a("tdv/constants/EventName"),k=a("tdv/constants/Priority"),n=a("tdv/constants/PlaybackState"),g=a("tdv/binding/Bindable"),h=a("tdv/events/Event"),e=a("tdv/player/parser/ClassInfo"),b=a("tdv/view/av/AudioPlayer"),c=a("tdv/view/av/SubtitleController");
a=e.define("Audio",g,function(d){g.call(this);this.ov=d||k.XTa;this.Xp=void 0;this.wn=null});a.prototype.ZI=function(){if(this.Xp==void 0){this.wn&&(this.wn.clear(),this.wn=null);var d=this.get("audio");d?(this.Xp=new b(this.get("application"),d,this.ov),d=function(){this.Xp.setLoop(this.get("loop",!1))},d.call(this),this.bind(l.N("loop"),d,this),d=function(){this.Xp.Ag(this.get("application").get("mute",!1))},d.call(this),this.get("application").bind(l.N("mute"),d,this,!0),d=function(){this.set("state",
this.Xp.getState())},d.call(this),this.Xp.bind(l.$e,d,this,!0),this.Xp.bind(l.Sb,this.p2a,this,!0),this.wn=new c(this,this.Xp)):this.Xp=null}return this.Xp};a.prototype.set=function(d,f){switch(d){case "state":var m=this.get("state")||n.ca,p=this.Xp&&this.Xp.getState()||n.ca;p!=m&&(m==n.ca&&p==n.PLAYING&&this.m(l.Np),this.m(new h(l.$e,{oldState:m,state:p})));break;case "subtitlesViewerArea":(m=g.prototype.get.call(this,d))&&m.e4.remove(this),f&&f.e4.add(this)}g.prototype.set.call(this,d,f)};a.prototype.iw=
function(){return[]};a.prototype.p2a=function(){this.m(new h(l.Sb))};a.prototype.play=a.prototype.Xl=function(){var d=this.ZI();d&&d.Zc(n.PLAYING)};a.prototype.stop=a.prototype.Dq=function(){var d=this.ZI();d&&d.Zc(n.ca)};a.prototype.pause=a.prototype.Is=function(){var d=this.ZI();d&&d.Zc(n.Yb)};return a});
define("tdv/player/script/MediaAudio",["require","tdv/player/parser/ClassInfo","tdv/player/script/Audio"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/Audio");return l.define("MediaAudio",k,function(n){k.call(this,n)})});
define("tdv/player/script/PanoramaAudio",["require","tdv/constants/Priority","tdv/player/parser/ClassInfo","tdv/player/script/MediaAudio"],function(a){var l=a("tdv/constants/Priority"),k=a("tdv/player/parser/ClassInfo"),n=a("tdv/player/script/MediaAudio");return k.define("PanoramaAudio",n,function(){n.call(this,l.tTa)})});
define("tdv/player/script/DirectionalPanoramaAudio",["require","tdv/player/parser/ClassInfo","tdv/player/script/PanoramaAudio"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/PanoramaAudio");return l.define("DirectionalPanoramaAudio",k,function(){k.call(this)})});
define("tdv/player/script/Model3DCameraMovement",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("Model3DCameraMovement",l,function(){l.call(this)})});
define("tdv/player/script/DistanceModel3DCameraMovement",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DCameraMovement"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/Model3DCameraMovement");return l.define("DistanceModel3DCameraMovement",k,function(){k.call(this)})});
define("tdv/player/script/DistancePanoramaCameraMovement",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("DistancePanoramaCameraMovement",l,function(){l.call(this)})});
define("tdv/player/script/DistanceRotationalCameraMovement",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("DistanceRotationalCameraMovement",l,function(){l.call(this)})});
define("tdv/binding/ChangeWatcher",["require","exports","tdv/constants/EventName","tdv/utils"],function(a,l,k,n){return function(){function g(h,e,b,c,d){this.ks=null;this.sga=h;this.Wf=k.N(this.sga);this.zea=e;this.Fa=b||window;this.$ea=c;this.cza=d;this.mfa=!1}g.prototype.UE=function(){this.qia(null)};g.prototype.qia=function(h){var e=this;n.toArray(this.ks).forEach(function(b){b&&b.h(this.Wf,e.Rua,e)}.bind(this));this.ks=h;n.toArray(this.ks).forEach(function(b){b&&b.bind(this.Wf,this.Rua,e,e.$ea)}.bind(this));
this.tCa()};g.prototype.tCa=function(){this.cza&&this.cza.qia(this.u_a())};g.prototype.u_a=function(){return this.ks==null?null:Array.isArray(this.ks)?this.ks.map(function(h){return h?h.get(this.sga):null}.bind(this)):this.ks.get(this.sga)};g.prototype.Rua=function(h){if(!this.mfa){try{this.mfa=!0,this.tCa(),this.zea.call(this.Fa,h)}catch(e){n.PW("ChangeWatcher._changeHandler",e)}this.mfa=!1}};g.Sw=function(h,e,b,c,d){d===void 0&&(d=!1);n.qA(e)&&(e=e.split("."));return e.length>0?(e=new g(e[0],b,
c,d,g.Sw(null,e.slice(1),b,c,d)),e.qia(h),e):null};return g}()});
define("tdv/view/list/dropdown/DropDownArrow",["require","exports","tdv/view/canvas/Canvas"],function(a,l,k){return function(n){function g(){var h=n.call(this)||this;h.df("DropDownArrow");return h}O(g,n);g.prototype.Ob=function(){n.prototype.Ob.call(this);this.j("color","#000000");this.j("direction",g.s$)};g.prototype.jb=function(){this.xba(["color","direction"])&&(this.$("color"),this.$("direction"),this.IW());n.prototype.jb.call(this)};g.prototype.Pqa=function(){var h=this.u.canvas.width,e=this.u.canvas.height,
b=this.G("color"),c=this.G("direction"),d=[h*.5,0,h];c=c==g.s$?[e,0,0]:[0,e,e];var f=this.bJa();f.clearRect(0,0,h,e);f.beginPath();f.moveTo(d[0],c[0]);f.lineTo(d[1],c[1]);f.lineTo(d[2],c[2]);f.fillStyle=b;f.fill();n.prototype.Pqa.call(this)};g.s$="down";return g}(k)});
define("tdv/view/list/dropdown/DropDownButton","require exports tdv/events/Event tdv/view/constants/Alignment tdv/view/constants/Cursor tdv/constants/EventName tdv/view/constants/LayoutMode tdv/view/constants/State tdv/view/containers/Container tdv/view/list/dropdown/DropDownArrow tdv/view/text/Label".split(" "),function(a,l,k,n,g,h,e,b,c,d,f){return function(m){function p(){var q=m.call(this)||this;q.df("DropDownButton");q.Xa=null;q.LB=null;q.Ifa=!0;q.set("ariaRole","dropdown");q.set("autoRolledOver",
!0);q.set("autoPressed",!0);q.set("childrenInteractionEnabled",!1);q.set("contentOpaque",!0);q.set("cursor",g.mf);q.bind(h.la,q.sda,q,!1);return q}O(p,m);p.prototype.Ob=function(){m.prototype.Ob.call(this);this.j("arrowColor","#000000");this.j("arrowBeforeLabel");this.j("arrowWidth",9);this.j("arrowHeight",5);this.j("arrowGap",5);this.j("shadow",!1);this.j("layout",e.bi);this.j("verticalAlign",n.Xd);this.j("borderRadius",5);this.j("borderColor","#AAAAAA");this.j("borderSize",1);this.j("backgroundColor",
["#FAFAFA","#E5E5E5"]);this.j("backgroundColorRatios",[0,1]);this.j("backgroundColorDirection","vertical");this.j("paddingLeft",5);this.j("paddingTop",5);this.j("paddingRight",5);this.j("paddingBottom",5);this.j("fontFamily");this.j("fontSize");this.j("fontColor","#555555");this.j("fontWeight");this.j("fontStyle");this.j("textDecoration");this.j("textShadowColor");this.j("textShadowHorizontalLength");this.j("textShadowVerticalLength");this.j("textShadowBlurRadius");this.j("textShadowOpacity");this.D("rollOverBorderColor",
b.ga,"borderColor");this.D("rollOverArrowColor",b.ga,"arrowColor");this.D("rollOverBackgroundColor",b.ga,"backgroundColor");this.D("rollOverBackgroundColorRatios",b.ga,"backgroundColorRatios");this.D("rollOverShadow",b.ga,"shadow");this.D("pressedBorderColor",b.Nb,"borderColor");this.D("pressedArrowColor",b.Nb,"arrowColor");this.D("pressedBackgroundColor",b.Nb,"backgroundColor");this.D("pressedBackgroundColorRatios",b.Nb,"backgroundColorRatios");this.D("pressedShadow",b.Nb,"shadow");this.D("pressedRollOverBorderColor",
b.wc,"borderColor");this.D("pressedRollOverArrowColor",b.wc,"arrowColor");this.D("pressedRollOverBackgroundColor",b.wc,"backgroundColor");this.D("pressedRollOverBackgroundColorRatios",b.wc,"backgroundColorRatios");this.D("pressedRollOverShadow",b.wc,"shadow");this.D("pressedBorderColor",b.pa,"borderColor");this.D("pressedArrowColor",b.pa,"arrowColor");this.D("pressedBackgroundColor",b.pa,"backgroundColor");this.D("pressedBackgroundColorRatios",b.pa,"backgroundColorRatios");this.D("pressedShadow",
b.pa,"shadow")};p.prototype.set=function(q,r){q=="label"&&this.get("label")!=r&&(this.Ifa=!0,this.Hf());m.prototype.set.call(this,q,r)};p.prototype.Ib=function(){m.prototype.Ib.call(this);this.Xa||(this.Xa=new f,this.Xa.set("width","100%"),this.mb(this.Xa));this.LB||(this.LB=new d,this.LB.set("direction",d.s$),this.mb(this.LB))};p.prototype.sda=function(){this.open();this.m(new k(h.OPEN))};p.prototype.open=function(){this.h(h.la,this.sda,this);this.hU(!0)};p.prototype.close=function(){this.bind(h.la,
this.sda,this,!1);this.hU(!1)};p.prototype.Kx=function(){return this.Xa&&this.Xa.get("text")||m.prototype.Kx.call(this)};p.prototype.jb=function(){if(this.Ifa){var q=this.get("label");this.Xa.set("text",q);this.Ifa=!1}this.Qc("horizontalAlign fontFamily fontSize fontColor fontWeight fontStyle textDecoration textShadowColor textShadowHorizontalLength textShadowVerticalLength textShadowBlurRadius textShadowOpacity".split(" "),{},[this.Xa],!0,!0);this.S("arrowGap")&&(this.set("gap",this.G("arrowGap")),
this.$("arrowGap"));this.S("arrowColor")&&(this.LB.set("color",this.G("arrowColor")),this.$("arrowColor"));this.S("arrowBeforeLabel")&&(this.G("arrowBeforeLabel")==1?this.gr(this.LB,0):this.gr(this.Xa,0),this.$("arrowBeforeLabel"));this.S("arrowWidth")&&(this.LB.set("width",this.G("arrowWidth")),this.$("arrowWidth"));this.S("arrowHeight")&&(this.LB.set("height",this.G("arrowHeight")),this.$("arrowHeight"));m.prototype.jb.call(this)};return p}(c)});
define("tdv/view/list/dropdown/DropDownPopup","require exports tdv/player/view/util/Device tdv/events/Event tdv/view/constants/Alignment tdv/view/constants/Cursor tdv/view/constants/OverflowPolicy tdv/constants/EventName tdv/view/containers/Container tdv/view/containers/VerticalContainer tdv/view/text/Label".split(" "),function(a,l,k,n,g,h,e,b,c,d,f){return function(m){function p(q){var r=m.call(this)||this;r.Rba=!1;r.Wb=null;r.dS=[];r.pD=!0;r.x3=!1;r.fe=q;r.df("DropDownPopup");r.set("ariaRole","listbox");
return r}O(p,m);p.prototype.uJa=function(){return this.Wb.Cb()};p.prototype.open=function(){this.lG=this.UIa();this.Rba=!0;this.lG.mb(this);this.set("overIndex",-1);this.set("visible",!0);this.bind(b.Ra,this.re,this,!1);this.lG.bind(b.ab,this.cv,this,!1);this.lG.bind(b.Zb,this.kd,this,!1)};p.prototype.close=function(){this.set("visible",!1);this.Wb.set("overflow",e.QK);this.Wb.set("contentOpaque",!0);this.h(b.Ra,this.re,this);this.lG.h(b.ab,this.cv,this);this.lG.bind(b.Zb,this.kd,this,!1);this.lG.removeChild(this);
this.lG=null};p.prototype.Ib=function(){c.prototype.Ib.call(this);this.Wb||(this.Wb=new d,this.Wb.set("overflow",e.QK),this.Wb.bind(b.Zb,this.kd,this,!1),this.Wb.bind(b.Pr,this.gD,this,!1),this.mb(this.Wb))};p.prototype.UIa=function(){for(var q=this.fe.getParent();q.getParent();)q=q.getParent();return q};p.prototype.kd=function(){this.hFa()};p.prototype.re=function(){this.x3=!1};p.prototype.gD=function(){this.x3=!0};p.prototype.cv=function(){this.get("overIndex")!=-1||this.x3&&k.nr()||this.m(new n(b.nB));
this.x3=!1};p.prototype.F2a=function(q){this.set("overIndex",this.rea(q.source))};p.prototype.G2a=function(q){q=this.rea(q.source);this.get("overIndex")==q&&this.set("overIndex",-1)};p.prototype.E2a=function(q){q=this.rea(q.source);this.set("overIndex",q);this.set("selectedIndex",q);this.m(new n(b.Qr))};p.prototype.rea=function(q){for(var r=0;r<this.dS.length;r++)if(this.dS[r]==q)return r;return-1};p.prototype.Ob=function(){this.Gl(p.bd)};p.prototype.b0a=function(q){var r;for(r=q;r.getParent();r=
r.getParent());q=q.va().EJa(r.va());if(r=this.fe.Vb())q.left/=r.TC,q.top/=r.TC;return q};p.prototype.jb=function(){var q=!1,r=!1;if(this.S("items")){q=this.G("items")||[];for(var t=this.dS.length;t<q.length;t++){var u=new f;u.wa({width:"100%",paddingLeft:5,paddingRight:5,paddingBottom:2,paddingTop:2,cursor:h.mf});u.bind(b.EF,this.F2a,this,!1);u.bind(b.Jr,this.G2a,this,!1);u.bind(b.la,this.E2a,this,!1);this.dS.push(u)}u=this.Wb.Cb();for(t=q.length;t<u.length;t++)this.Wb.removeChild(u[t]);for(t=u.length;t<
q.length;t++)this.Wb.mb(this.dS[t]);for(t=0;t<q.length;t++)u[t].wa({text:q[t],ariaLabel:q[t],ariaRole:"option"});this.$("items");r=q=!0}this.S("selectedIndex")&&(this.$("selectedIndex"),q=!0);var v="horizontalAlign popUpBackgroundOpacity popUpPaddingBottom popUpPaddingLeft popUpPaddingRight popUpPaddingTop fontFamily fontSize fontWeight fontStyle tabIndex textDecoration textShadowColor textShadowHorizontalLength textShadowVerticalLength textShadowBlurRadius textShadowOpacity".split(" ");for(t=0;t<
v.length;t++)u=v[t],this.S(u)&&(this.$(u),r=!0);if(r)for(r={fontFamily:this.G("fontFamily"),fontSize:this.G("fontSize"),fontWeight:this.G("fontWeight"),fontStyle:this.G("fontStyle"),horizontalAlign:this.G("horizontalAlign"),tabIndex:this.G("tabIndex"),textDecoration:this.G("textDecoration"),textShadowColor:this.G("textShadowColor"),textShadowHorizontalLength:this.G("textShadowHorizontalLength"),textShadowVerticalLength:this.G("textShadowVerticalLength"),textShadowBlurRadius:this.G("textShadowBlurRadius"),
textShadowOpacity:this.G("textShadowOpacity"),paddingBottom:this.G("popUpPaddingBottom"),paddingLeft:this.G("popUpPaddingLeft"),paddingRight:this.G("popUpPaddingRight"),paddingTop:this.G("popUpPaddingTop"),backgroundOpacity:this.G("popUpBackgroundOpacity")},u=this.Wb.Cb(),t=0;t<u.length;t++)u[t].wa(r);r="selectedIndex overIndex popUpBackgroundColor rollOverPopUpBackgroundColor selectedPopUpBackgroundColor popUpFontColor rollOverPopUpFontColor selectedPopUpFontColor".split(" ");for(t=0;t<r.length;t++)u=
r[t],this.S(u)&&(this.$(u),q=!0);if(q){q=this.G("popUpBackgroundColor");r=this.G("rollOverPopUpBackgroundColor")||q;v=this.G("selectedPopUpBackgroundColor")||q;var w=this.G("popUpFontColor"),y=this.G("rollOverPopUpFontColor")||w,x=this.G("selectedPopUpFontColor")||w,z=this.G("selectedIndex"),A=this.G("overIndex");u=this.Wb.Cb();for(t=0;t<u.length;t++)t==z?u[t].wa({fontColor:x,backgroundColor:v}):t==A?u[t].wa({fontColor:y,backgroundColor:r}):u[t].wa({fontColor:w,backgroundColor:q})}if(this.Rba||this.S("popUpGap")||
this.S("buttonWidth"))this.fe&&this.Wb.set("minWidth",this.fe.gb()),this.$("popUpGap"),this.hFa(),this.Rba=!1;this.Qc("popUpShadow popUpShadowBlurRadius popUpShadowColor popUpShadowHorizontalLength popUpShadowOpacity popUpShadowSpread popUpShadowVerticalLength".split(" "),{popUpShadow:"shadow",popUpShadowBlurRadius:"shadowBlurRadius",popUpShadowColor:"shadowColor",popUpShadowHorizontalLength:"shadowHorizontalLength",popUpShadowOpacity:"shadowOpacity",popUpShadowSpread:"shadowSpread",popUpShadowVerticalLength:"shadowVerticalLength"},
[this.Wb],!0,!0);this.JEa();c.prototype.jb.call(this)};p.prototype.hFa=function(){var q=this.UIa(),r=this.b0a(this.fe),t=this.fe.gb(),u=this.fe.Kb(),v=this.G("popUpGap"),w=this.Wb.u.contentWidth,y=this.Wb.u.contentHeight,x=q.Kb()-(r.top+u+v)-5,z=r.top-5-v,A=this.G("horizontalAlign");y<=x?(this.pD=!0,this.Wb.set("top",r.top+u+v),this.Wb.set("maxHeight",void 0),this.Wb.set("overflow",e.QK)):y<=z?(this.pD=!1,this.Wb.set("top",r.top-y-v),this.Wb.set("maxHeight",void 0),this.Wb.set("overflow",e.QK)):(x>=
z?(this.pD=!0,this.Wb.set("top",r.top+u+v),this.Wb.set("maxHeight",x)):(this.pD=!1,this.Wb.set("top",r.top-z+v),this.Wb.set("maxHeight",z)),this.Wb.set("overflow",e.Pr));u=A==g.Ye?r.left+Math.round((t-w)*.5):A==g.Db?r.left+t-w:r.left;u<0?u=r.left:r.left+w>q.gb()&&(u=r.left+t-w);this.Wb.set("left",u);this.JEa()};p.prototype.JEa=function(){var q=this.G("popUpBorderRadius");this.Wb.wa({borderTopRadius:this.pD?0:q,borderBottomRadius:this.pD?q:0});for(var r=this.Wb.Cb(),t=0;t<r.length;t++){var u=t==0,
v=t==r.length-1;r[t].wa({borderTopRadius:!this.pD&&u?q:0,borderBottomRadius:this.pD&&v?q:0})}};p.bd=Object.assign({},c.bd,{visible:!1,width:"100%",height:"100%",includeInLayout:!1,items:[],selectedIndex:-1,overIndex:-1,popUpGap:0,popUpBackgroundColor:void 0,popUpBackgroundOpacity:void 0,rollOverPopUpBackgroundColor:void 0,selectedPopUpBackgroundColor:void 0,popUpFontColor:void 0,rollOverPopUpFontColor:void 0,selectedPopUpFontColor:void 0,popUpShadow:!0,popUpShadowBlurRadius:void 0,popUpShadowColor:void 0,
popUpShadowHorizontalLength:void 0,popUpShadowOpacity:void 0,popUpShadowSpread:void 0,popUpShadowVerticalLength:void 0,fontFamily:void 0,fontSize:void 0,fontWeight:void 0,fontStyle:void 0,textDecoration:void 0,textShadowColor:void 0,textShadowHorizontalLength:void 0,textShadowVerticalLength:void 0,textShadowBlurRadius:void 0,textShadowOpacity:void 0,buttonWidth:void 0});return p}(c)});
define("tdv/view/list/dropdown/DropDown","require exports tdv/events/Event tdv/constants/EventName tdv/view/containers/Container tdv/view/list/dropdown/DropDownButton tdv/view/list/dropdown/DropDownPopup".split(" "),function(a,l,k,n,g,h,e){return function(b){function c(){var d=b.call(this)||this;d.df("DropDown");d.fe=new h;d.fe.bind(n.Zb,d.u2a,d,!1);d.fe.bind(n.OPEN,d.U2a,d,!1);d.fe.bind(n.nB,d.rM,d,!1);d.fe.bind(n.jd,d.t2a,d,!1);d.fe.set("width","100%");d.fe.set("height","100%");d.fe.set("toolTipDisabled",
!0);d.pk=new e(d.fe);d.pk.bind(n.nB,d.rM,d,!1);d.pk.bind(n.Qr,d.j3a,d,!1);d.EDa=!0;d.An=!1;return d}O(c,b);c.prototype.Ob=function(){b.prototype.Ob.call(this);this.j("prompt","");this.j("label","");this.j("items",[]);this.j("selectedIndex",-1);this.j("arrowBeforeLabel");this.j("arrowWidth",9);this.j("arrowHeight",5);this.j("arrowGap",5);this.j("borderRadius",5);this.j("borderSize",1);this.j("backgroundColorDirection","vertical");this.j("horizontalAlign","left");this.j("paddingLeft",5);this.j("paddingTop",
5);this.j("paddingRight",5);this.j("paddingBottom",5);this.j("fontFamily");this.j("fontSize");this.j("fontColor","#555555");this.j("fontWeight");this.j("fontStyle");this.j("textDecoration");this.j("textShadowColor");this.j("textShadowHorizontalLength");this.j("textShadowVerticalLength");this.j("textShadowBlurRadius");this.j("textShadowOpacity");this.j("popUpGap",0);this.j("popUpBorderRadius");this.j("popUpPaddingBottom",2);this.j("popUpPaddingLeft",5);this.j("popUpPaddingRight",5);this.j("popUpPaddingTop",
2);this.j("popUpShadow",!0);this.j("popUpShadowBlurRadius");this.j("popUpShadowColor");this.j("popUpShadowHorizontalLength");this.j("popUpShadowOpacity");this.j("popUpShadowSpread");this.j("popUpShadowVerticalLength");this.j("popUpBackgroundColor","#FFFFFF");this.j("popUpBackgroundOpacity");this.j("rollOverPopUpBackgroundColor");this.j("selectedPopUpBackgroundColor");this.j("popUpFontColor","#555555");this.j("rollOverPopUpFontColor");this.j("selectedPopUpFontColor");this.j("borderColor","#AAAAAA");
this.j("arrowColor","#000000");this.j("backgroundColor",["#FAFAFA","#E5E5E5"]);this.j("backgroundColorRatios",[0,1]);this.j("shadow",!1);this.j("rollOverBorderColor");this.j("rollOverArrowColor");this.j("rollOverBackgroundColor");this.j("rollOverBackgroundColorRatios");this.j("rollOverShadow");this.j("pressedBorderColor");this.j("pressedArrowColor");this.j("pressedBackgroundColor");this.j("pressedBackgroundColorRatios");this.j("pressedShadow");this.j("pressedRollOverBorderColor");this.j("pressedRollOverArrowColor");
this.j("pressedRollOverBackgroundColor");this.j("pressedRollOverBackgroundColorRatios");this.j("pressedRollOverShadow")};c.prototype.Ib=function(){b.prototype.Ib.call(this);this.fe.getParent()||this.mb(this.fe)};c.prototype.close=function(){this.rM()};c.prototype.u2a=function(){this.EDa=!0;this.Hf()};c.prototype.U2a=function(){this.fe.open();this.pk.set("selectedIndex",this.get("selectedIndex"));this.pk.open()};c.prototype.rM=function(){this.m(new k(n.nB));this.fe.close();this.pk.close()};c.prototype.t2a=
function(){this.fe.close();this.pk.close()};c.prototype.j3a=function(){this.set("selectedIndex",this.pk.get("selectedIndex"));this.rM();this.An=!0};c.prototype.jb=function(){var d=!1;if(this.S("prompt")||this.S("label"))d=!0,this.$("label"),this.$("prompt");if(this.S("selectedIndex")||this.S("items")){d=!0;var f=this.G("selectedIndex"),m=this.G("items");f>=0&&f>=m.length&&(f=-1);this.set("selectedIndex",f);this.pk.set("items",this.G("items"));this.pk.set("selectedIndex",this.G("selectedIndex"));this.$("items");
this.$("selectedIndex");this.An&&(this.An=!1,this.m(new k(n.V)))}d&&(d=this.G("label"),d||(f=this.G("selectedIndex"),d=f<0?this.G("prompt"):this.G("items")[f]),this.fe.set("label",d));this.EDa&&(this.pk.set("minWidth",this.fe.gb()),this.pk.set("buttonWidth",this.fe.gb()));this.Qc("fontFamily fontSize fontColor fontWeight fontStyle tabIndex textDecoration horizontalAlign textShadowColor textShadowHorizontalLength textShadowVerticalLength textShadowBlurRadius textShadowOpacity".split(" "),{},[this.fe,
this.pk],!0,!0);this.Qc("popUpBorderRadius popUpGap popUpPaddingBottom popUpPaddingLeft popUpPaddingRight popUpPaddingTop popUpBackgroundColor popUpBackgroundOpacity rollOverPopUpBackgroundColor selectedPopUpBackgroundColor popUpFontColor rollOverPopUpFontColor selectedPopUpFontColor popUpShadow popUpShadowBlurRadius popUpShadowColor popUpShadowHorizontalLength popUpShadowOpacity popUpShadowSpread popUpShadowVerticalLength".split(" "),{},[this.pk],!0,!0);this.Qc("arrowBeforeLabel arrowWidth arrowHeight arrowColor rollOverArrowColor pressedArrowColor pressedRollOverArrowColor arrowGap shadow shadowBlurRadius shadowColor shadowHorizontalLength shadowOpacity shadowSpread shadowVerticalLength borderRadius borderTopRadius borderBottomRadius borderLeftRadius borderRightRadius borderTopLeftRadius borderTopRightRadius borderBottomLeftRadius borderBottomRightRadius borderSize borderLeftSize borderTopSize borderRightSize borderBottomSize borderColor borderLeftColor borderTopColor borderRightColor borderBottomColor rollOverBorderColor pressedBorderColor pressedRollOverBorderColor backgroundColor backgroundColorRatios backgroundColorDirection backgroundOpacity rollOverBackgroundColor rollOverBackgroundColorRatios rollOverShadow pressedBackgroundColor pressedBackgroundColorRatios pressedShadow pressedRollOverBackgroundColor pressedRollOverBackgroundColorRatios pressedRollOverShadow paddingLeft paddingTop paddingRight paddingBottom".split(" "),
{},[this.fe],!0,!0);b.prototype.jb.call(this)};return c}(g)});
define("tdv/player/script/DropDown",["require","tdv/binding/ChangeWatcher","tdv/constants/EventName","tdv/player/parser/ClassInfo","tdv/view/list/dropdown/DropDown"],function(a){var l=a("tdv/binding/ChangeWatcher"),k=a("tdv/constants/EventName"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/view/list/dropdown/DropDown");a=n.define("DropDown",g,function(){g.call(this);this.Rd=null;this.nya=[];this.bind(k.V,this.x2a,this)});a.prototype.set=function(h,e){if(h=="playList"){if(this.Rd)for(this.Rd.h("change",
this.Vy,this);this.nya.length;)this.nya.shift().UE();(this.Rd=e)?(l.Sw(this.Rd,"items.label",this.z4,this),l.Sw(this.Rd,"items.media.label",this.z4,this),this.z4(),this.Rd.bind("change",this.Vy,this),this.Vy()):this.z4()}g.prototype.set.call(this,h,e)};a.prototype.z4=function(){this.Rd?this.set("items",this.Rd.get("items").map(function(h){return h.get("label")||h.get("media")&&h.get("media").get("label")})):this.set("items",[])};a.prototype.Vy=function(){this.set("selectedIndex",this.Rd.get("selectedIndex"))};
a.prototype.x2a=function(){this.Rd&&this.Rd.set("selectedIndex",this.get("selectedIndex"))};return a});define("tdv/player/script/DustPanoramaOverlay",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");a=a("tdv/player/parser/ClassInfo").define("DustPanoramaOverlay",l,function(){l.call(this)});a.prototype.get=function(k,n){k=="startState"&&n===void 0&&(n=this.get("initialState"));return l.prototype.get.call(this,k,n)};return a});
define("tdv/player/script/Effect",["require","tdv/player/parser/ClassInfo","tdv/view/effects/Effect"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/view/effects/Effect");a=l.define("Effect",k,function(){k.call(this)});a.prototype.cancel=function(){return k.prototype.cancel.apply(this,arguments)};a.prototype.getPosition=function(){return k.prototype.wm.apply(this,arguments)};a.prototype.play=function(){return k.prototype.play.apply(this,arguments)};a.prototype.reverse=function(){return k.prototype.reverse.apply(this,
arguments)};a.prototype.stop=function(){return k.prototype.stop.apply(this,arguments)};return a});define("tdv/player/script/FadeInEffect",["require","tdv/player/parser/ClassInfo","tdv/view/effects/FadeInEffect"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/view/effects/FadeInEffect");return l.define("FadeInEffect",k,function(){k.call(this)})});
define("tdv/player/script/FadeOutEffect",["require","tdv/player/parser/ClassInfo","tdv/view/effects/FadeOutEffect"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/view/effects/FadeOutEffect");return l.define("FadeOutEffect",k,function(){k.call(this)})});
define("tdv/player/script/Model3DCamera","require tdv/binding/Bindable tdv/constants/EventName tdv/constants/PlaybackState tdv/player/parser/ClassInfo tdv/events/async".split(" "),function(a){var l=a("tdv/binding/Bindable"),k=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/player/parser/ClassInfo"),h=a("tdv/events/async");a=g.define("Model3DCamera",l,function(){l.call(this);this.set("userInteracting",!1);this.set("moving",!1);this.set("mouseDisabled",!1);this.set("clickTranslationDisabled",
!1);this.set("doubleClickDisabled",!1);this.jda=this.Z1a=this.mca=this.lca=!1;"distance fov yaw pitch x y z".split(" ").forEach(function(e){this.bind(k.N(e),this.d3a,this,!0)}.bind(this))});a.prototype.Njb=function(){this.sN={x:this.get("x"),y:this.get("y"),z:this.get("z"),yaw:this.get("yaw"),pitch:this.get("pitch"),distance:this.get("distance"),fov:this.get("fov")}};a.prototype.setPosition=function(e){e.x!==void 0&&this.set("x",e.x);e.y!==void 0&&this.set("y",e.y);e.z!==void 0&&this.set("z",e.z);
e.distance!==void 0&&this.set("distance",e.distance);e.yaw!==void 0&&this.set("yaw",e.yaw);e.pitch!==void 0&&this.set("pitch",e.pitch);e.fov!==void 0&&this.set("fov",e.fov);e.easing!==void 0?this.set("easing",e.easing):this.set("easing",0)};a.prototype.E6a=function(e){this.sN||(this.sN={});for(var b in e)this.sN[b]=e[b]};a.prototype.nhb=function(){this.sN&&this.setPosition(this.sN)};a.prototype.jPa=function(e){this.Lya!==e&&(this.Lya=e,this.a9a())};a.prototype.a9a=function(){this.set("mouseDisabled",
this.Z1a||this.Lya)};a.prototype.LOa=function(e){this.lca!==e&&(this.lca=e,this.LEa())};a.prototype.MOa=function(e){this.mca!==e&&(this.mca=e,this.LEa())};a.prototype.LEa=function(){this.set("clickTranslationDisabled",this.lca||this.mca)};a.prototype.Mhb=function(e){this.jda!==e&&(this.jda=e,this.L8a())};a.prototype.L8a=function(){this.set("doubleClickDisabled",this.jda)};a.prototype.d3a=function(){this.FBa||(this.FBa=!0,h.yE(function(){this.FBa=!1;this.l8a()}.bind(this)))};a.prototype.l8a=function(){this.m(k.Mm)};
a.fmb=100;a.prototype.setStoredPosition=function(e){this.E6a(e)};a.prototype.play=function(){this.set("state",n.PLAYING)};a.prototype.pause=function(){this.set("state",n.Yb)};a.prototype.stop=function(){this.set("state",n.ca)};return a});
define("tdv/player/script/FirstPersonModel3DCamera",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DCamera"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/Model3DCamera");return l.define("FirstPersonModel3DCamera",k,function(){k.call(this);this.set("distance",0)})});
define("tdv/player/script/HotspotPanoramaOverlay",["require","tdv/binding/Bindable","tdv/constants/EventName","tdv/player/parser/ClassInfo","tdv/view/effects/Effect"],function(a){var l=a("tdv/binding/Bindable"),k=a("tdv/constants/EventName"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/view/effects/Effect");a=n.define("HotspotPanoramaOverlay",l,function(){l.call(this);this.bind(k.od,this.Zo,this,!0);this.bind(k.jd,this.Xo,this,!0);this.sj=[];this.Kd=!1});a.prototype.set=function(h,e){switch(h){case "enabledInCardboard":this.set("enabledInVR",
e);break;case "effect":case "rollOverEffect":case "areas":this.u4a(),this.sj=[]}l.prototype.set.call(this,h,e);switch(h){case "enabledInCardboard":this.set("enabledInVR",e);break;case "effect":case "rollOverEffect":case "areas":this.RUa()}};a.prototype.RUa=function(){this.get("effect")&&this.get("effect").bind(g.jx,this.Jza,this,!0);this.get("rollOverEffect")&&this.get("rollOverEffect").bind(g.jx,this.WAa,this,!0);this.get("areas",[]).forEach(function(h){h.bind(k.tc,this.yza,this,!0);h.bind(k.Eb,
this.xza,this,!0)}.bind(this))};a.prototype.u4a=function(){this.get("effect")&&this.get("effect").h(g.jx,this.Jza,this,!0);this.get("rollOverEffect")&&this.get("rollOverEffect").h(g.jx,this.WAa,this,!0);this.get("areas",[]).forEach(function(h){h.h(k.tc,this.yza,this,!0);h.h(k.Eb,this.xza,this,!0)}.bind(this))};a.prototype.yza=function(h){this.sj.indexOf(h.source)<0&&(this.sj.push(h.source),this.sj.length==1&&this.d2())};a.prototype.xza=function(h){h=this.sj.indexOf(h.source);h>=0&&(this.sj.splice(h,
1),this.sj.length==0&&this.Bs())};a.prototype.d2=function(){var h=this.get("effect"),e=this.get("rollOverEffect");e&&(h&&h.wm()>0?h.reverse():e.play())};a.prototype.Bs=function(){var h=this.get("rollOverEffect");if(h){var e=this.get("effect");h.wm()>0?h.reverse():e&&e.get("loop")&&e.play()}};a.prototype.Jza=function(){if(this.sj.length>0){var h=this.get("rollOverEffect");h&&(this.get("effect").stop(),h.play())}};a.prototype.WAa=function(){if(this.sj.length==0){this.get("rollOverEffect").stop();var h=
this.get("effect");h&&h.get("loop")&&h.play()}};a.prototype.Zo=function(){var h=this.get("effect");h&&h.play()};a.prototype.Xo=function(){var h=this.get("effect");h&&h.stop();(h=this.get("rollOverEffect"))&&h.stop()};return a});
define("tdv/player/script/FlatHotspotPanoramaOverlay",["require","tdv/player/parser/ClassInfo","tdv/player/script/HotspotPanoramaOverlay"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/HotspotPanoramaOverlay");return l.define("FlatHotspotPanoramaOverlay",k,function(){k.call(this)})});
define("tdv/player/script/HotspotPanoramaOverlayArea",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("HotspotPanoramaOverlayArea",l,function(){l.call(this);this.set("displayTooltipInTouchScreens",!0)})});
define("tdv/player/script/FlatHotspotPanoramaOverlayArea",["require","tdv/player/parser/ClassInfo","tdv/player/script/HotspotPanoramaOverlayArea"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/HotspotPanoramaOverlayArea");return l.define("FlatHotspotPanoramaOverlayArea",k,function(){k.call(this)})});
define("tdv/player/script/QuadPanoramaOverlayPlaybackPosition",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("QuadPanoramaOverlayPlaybackPosition",l,function(k,n,g){l.call(this);k!==void 0&&this.set("vertices",k);this.set("opacity",n!==void 0?n:1);g!==void 0&&this.set("timestamp",g)})});
define("tdv/player/script/FlatPanoramaOverlayPlaybackPosition",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("FlatPanoramaOverlayPlaybackPosition",l,function(k,n,g,h,e){l.call(this);k!==void 0&&this.set("yaw",k);n!==void 0&&this.set("pitch",n);g!==void 0&&this.set("roll",g);this.set("opacity",h!==void 0?h:1);e!==void 0&&this.set("timestamp",e)})});
define("tdv/player/script/PanoramaOverlayPlaybackPosition",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("PanoramaOverlayPlaybackPosition",l,function(k,n,g,h,e,b,c,d,f){l.call(this);k!==void 0&&this.set("yaw",k);n!==void 0&&this.set("pitch",n);g!==void 0&&this.set("rotationX",g);h!==void 0&&this.set("rotationY",h);e!==void 0&&this.set("roll",e);b!==void 0&&this.set("hfov",b);c!==void 0&&this.set("vfov",
c);this.set("opacity",d!==void 0?d:1);f!==void 0&&this.set("timestamp",f)})});define("tdv/player/script/PanoramaPoint",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("PanoramaPoint",l,function(k,n){l.call(this);this.set("yaw",k);this.set("pitch",n)})});
define("tdv/player/script/PopupPanoramaOverlayPlaybackPosition",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("PopupPanoramaOverlayPlaybackPosition",l,function(k,n,g,h,e,b,c){l.call(this);k!==void 0&&this.set("yaw",k);n!==void 0&&this.set("pitch",n);g!==void 0&&this.set("rotationX",g);h!==void 0&&this.set("rotationY",h);e!==void 0&&this.set("rotationZ",e);b!==void 0&&this.set("hfov",b);c!==
void 0&&this.set("timestamp",c)})});
define("tdv/player/script/helper/PlaybackPositionHelper","require tdv/binding/Bindable tdv/player/script/QuadPanoramaOverlayPlaybackPosition tdv/player/script/FlatPanoramaOverlayPlaybackPosition tdv/player/script/PanoramaOverlayPlaybackPosition tdv/player/script/PanoramaPoint tdv/player/script/PopupPanoramaOverlayPlaybackPosition".split(" "),function(a){var l=a("tdv/binding/Bindable"),k=a("tdv/player/script/QuadPanoramaOverlayPlaybackPosition"),n=a("tdv/player/script/FlatPanoramaOverlayPlaybackPosition"),g=
a("tdv/player/script/PanoramaOverlayPlaybackPosition"),h=a("tdv/player/script/PanoramaPoint"),e=a("tdv/player/script/PopupPanoramaOverlayPlaybackPosition");return{Gcb:function(b){return this.g0(b,this.wZa)},Wma:function(b){return this.g0(b,this.S3a)},hdb:function(b){return this.g0(b,this.Z3a)},Xma:function(b){return this.g0(b,this.h4a)},wZa:function(b){return new n(l.prototype.get.call(b,"yaw",0),l.prototype.get.call(b,"pitch",0),l.prototype.get.call(b,"roll",0),l.prototype.get.call(b,"opacity",1),
0)},h4a:function(b){var c=l.prototype.get.call(b,"vertices",[null,null,null,null]);return new k([c[0]||new h(0,0),c[1]||new h(0,0),c[2]||new h(0,0),c[3]||new h(0,0)],l.prototype.get.call(b,"opacity",1),0)},S3a:function(b){function c(d,f){return l.prototype.get.call(b,d,f)}return new g(c("yaw",0),c("pitch",0),c("rotationX",0),c("rotationY",0),c("roll",0),c("hfov",c("vfov")===void 0?45:void 0),c("vfov"),c("opacity",1),0)},Z3a:function(b){function c(d,f){return l.prototype.get.call(b,d,f)}return new e(c("yaw",
0),c("pitch",0),c("rotationX",0),c("rotationY",0),c("rotationZ",0),c("hfov",45),0)},g0:function(b,c){var d=l.prototype.get.call(b,"playbackPositions")||[];return d.length>0?d.slice().sort(function(f,m){return f.get("timestamp")-m.get("timestamp")||d.indexOf(f)-d.indexOf(m)}):[c(b)]}}});
define("tdv/player/script/FlatHotspotPanoramaOverlayImageBase",["require","tdv/binding/Bindable","tdv/constants/EventName","tdv/player/parser/ClassInfo","tdv/player/script/helper/PlaybackPositionHelper"],function(a){var l=a("tdv/binding/Bindable"),k=a("tdv/constants/EventName"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/player/script/helper/PlaybackPositionHelper");a=n.define("FlatHotspotPanoramaOverlayImageBase",l,function(){l.call(this);this.Ed=void 0});a.prototype.get=function(h,e){switch(h){case "playbackPositions":return this.Ed===
void 0&&(this.Ed=g.Gcb(this)),this.Ed}return l.prototype.get.call(this,h,e)};a.prototype.set=function(h,e){var b=!1;switch(h){case "opacity":case "distance":case "pitch":case "roll":case "yaw":case "playbackPositions":this.Ed=void 0,b=!0}l.prototype.set.call(this,h,e);b&&h!="playbackPositions"&&this.m(k.N("playbackPositions"))};return a});
define("tdv/player/script/FlatHotspotPanoramaOverlayImage",["require","tdv/player/parser/ClassInfo","tdv/player/script/FlatHotspotPanoramaOverlayImageBase"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/FlatHotspotPanoramaOverlayImageBase");return l.define("FlatHotspotPanoramaOverlayImage",k,function(){k.call(this)})});
define("tdv/player/script/FlatHotspotPanoramaOverlayMap",["require","tdv/player/parser/ClassInfo","tdv/player/script/FlatHotspotPanoramaOverlayImageBase"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/FlatHotspotPanoramaOverlayImageBase");return l.define("FlatHotspotPanoramaOverlayMap",k,function(){k.call(this)})});
define("tdv/player/script/FlyOverModel3DCamera",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DCamera"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/Model3DCamera");return l.define("FlyOverModel3DCamera",k,function(){k.call(this)})});
define("tdv/player/script/FramePanoramaOverlay",["require","tdv/binding/Bindable","tdv/constants/EventName","tdv/player/parser/ClassInfo","tdv/player/script/helper/PlaybackPositionHelper"],function(a){var l=a("tdv/binding/Bindable"),k=a("tdv/constants/EventName"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/player/script/helper/PlaybackPositionHelper");a=n.define("FramePanoramaOverlay",l,function(){l.call(this);this.Ed=void 0});a.prototype.set=function(h,e){var b=!1;switch(h){case "hfov":case "pitch":case "rotationX":case "rotationY":case "roll":case "vfov":case "yaw":case "playbackPositions":this.Ed=
void 0,b=!0}l.prototype.set.call(this,h,e);b&&h!="playbackPositions"&&this.m(k.N("playbackPositions"))};a.prototype.get=function(h,e){switch(h){case "playbackPositions":return this.Ed===void 0&&(this.Ed=g.Wma(this)),this.Ed}return l.prototype.get.call(this,h,e)};return a});
define("tdv/player/script/Model3DResource",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");a=a("tdv/player/parser/ClassInfo").define("Model3DResource",l,function(){l.call(this)});a.prototype.get=function(k,n){switch(k){case "levels":n=[this];break;case "url":for(var g=l.prototype.get.call(this,k),h=this.get("levels"),e=0;h&&e<h.length&&g===void 0;e++){var b=h[e];b!=this&&(g=b.get(k))}return g!==void 0?g:n}return l.prototype.get.call(this,
k,n)};return a});define("tdv/player/script/TDTilesModel3DResource",["require","tdv/player/script/Model3DResource","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/player/script/Model3DResource");return a("tdv/player/parser/ClassInfo").define("TDTilesModel3DResource",l,function(){l.call(this)})});
define("tdv/player/script/Model3DResourceLevel",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");a=a("tdv/player/parser/ClassInfo").define("Model3DResourceLevel",l,function(){l.call(this)});a.yZ="mobile";a.prototype.get=function(k,n){switch(k){case "levels":n=[this];break;case "url":for(var g=l.prototype.get.call(this,k),h=this.get("levels"),e=0;h&&e<h.length&&g===void 0;e++){var b=h[e];b!=this&&(g=b.get(k))}return g!==void 0?g:n}return l.prototype.get.call(this,
k,n)};return a});
define("tdv/player/script/GoogleMaps3DTilesModel3DResource",["require","tdv/player/script/TDTilesModel3DResource","tdv/player/script/Model3DResourceLevel","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/player/script/TDTilesModel3DResource"),k=a("tdv/player/script/Model3DResourceLevel");a=a("tdv/player/parser/ClassInfo").define("GoogleMaps3DTilesModel3DResource",l,function(){l.call(this)});a.prototype.set=function(h,e){l.prototype.set.call(this,h,e);switch(h){case "latitude":case "longitude":this.$f();break;
case "apiKey":this.W8a()}};a.prototype.$f=function(){var h=this.get("latitude"),e=this.get("longitude");if(h!==void 0&&e!==void 0){h=this.Owa(h,e);e=(new THREE.Vector3).crossVectors(h,(new THREE.Vector3).crossVectors(this.Owa(90,0),h));var b=new THREE.Vector3(0,0,0);e=(new THREE.Matrix4).lookAt(h,b,e).invert();e=(new THREE.Matrix4).makeRotationX(-Math.PI/2).multiply(e);e=(new THREE.Euler).setFromRotationMatrix(e,"XYZ");this.set("rotationOrder",e.order);this.set("rotationX",e.x*g);this.set("rotationY",
e.y*g);this.set("rotationZ",e.z*g);this.set("positionX",-h.x);this.set("positionY",-h.y);this.set("positionZ",-h.z)}};a.prototype.Owa=function(h,e){h*=n;e*=n;var b=1/298.257223563;const c=Math.sin(h);h=Math.cos(h);b=2*b-b*b;const d=6378137/Math.sqrt(1-b*c*c);return new THREE.Vector3((d+0)*h*Math.cos(e),(d+0)*h*Math.sin(e),d*(1-b)*c)};a.prototype.W8a=function(){var h=this.get("apiKey");if(h!==void 0){var e=new k;e.set("url","https://tile.googleapis.com/v1/3dtiles/root.json?key="+h);this.set("levels",
[e])}};var n=Math.PI/180,g=180/Math.PI;return a});define("tdv/view/containers/GridContainer",["require","exports","tdv/view/containers/Container","tdv/view/constants/LayoutMode"],function(a,l,k,n){return function(g){function h(){return g.call(this)||this}O(h,g);h.prototype.Ob=function(){this.Gl(h.bd)};h.bd=Object.assign({},k.bd,{layout:n.uB});return h}(k)});
define("tdv/player/script/GridContainer",["require","tdv/player/parser/ClassInfo","tdv/view/containers/GridContainer"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/view/containers/GridContainer");return l.define("GridContainer",k,function(){k.call(this)})});
define("tdv/player/view/util/Preloader","require tdv/events/Event tdv/events/EventDispatcher tdv/constants/EventName tdv/constants/Priority tdv/player/view/util/URL tdv/view/images/ImageLoader tdv/util/LoadQueue tdv/utils".split(" "),function(a){function l(){}function k(p){this.Kgb=p;this.items=[];this.priority=0}var n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),h=a("tdv/constants/EventName"),e=a("tdv/constants/Priority"),b=a("tdv/player/view/util/URL"),c=a("tdv/view/images/ImageLoader"),
d=a("tdv/util/LoadQueue"),f=a("tdv/utils"),m=f.extend(g,function(p){g.call(this);this.url=p;this.Yoa=this.priority=0;this.status=m.Eaa;this.eB=null});m.prototype.$na=function(p){this.Yoa+=p};m.prototype.ZO=function(p){this.priority+=p};m.prototype.start=function(){this.status=m.xZ;c.C9(this.url)?this.EC():this.fq=d.add(this.url,e.d$,this.e5a.bind(this),this.Jua.bind(this))};m.prototype.e5a=function(){this.eB=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");this.eB.open("GET",
this.url);this.eB.onreadystatechange=function(){this.eB.readyState>3&&this.EC()}.bind(this);this.eB.send()};m.prototype.Jua=function(){this.eB&&(this.eB.abort(),this.eB=null)};m.prototype.stop=function(){this.status==m.xZ&&(this.status=m.Eaa,this.Jua(),this.fq&&this.fq.cancel())};m.prototype.EC=function(){this.eB=null;this.fq&&(this.fq.loaded(),this.fq=null);this.status=m.OTa;this.m(new n(h.ia))};m.Eaa="not loaded";m.xZ="loading";m.OTa="loaded";k.prototype.p$a=function(p){p.forEach(function(q){this.items.indexOf(q)<
0&&(this.items.push(q),q.ZO(this.priority),q.$na(1))}.bind(this))};k.prototype.Ugb=function(p){var q=this.items;this.items=[];q.forEach(function(r){p.indexOf(r)<0?this.items.push(r):(r.ZO(-this.priority),r.$na(-1))}.bind(this))};k.prototype.Mgb=function(){this.items.forEach(function(p){p.ZO(-this.priority);p.$na(-1)}.bind(this));this.items=[];this.priority=0};k.prototype.ZO=function(p){this.priority+=p;this.items.forEach(function(q){q.ZO(p)})};l.li=[];l.hCa=[];l.HZa=0;l.iGa=function(p,q){this.Y2(p).p$a(q.map(function(r){return this.Ja(r)}.bind(this)));
this.O3();this.ya()};l.chb=function(p,q){this.Y2(p).Ugb(q.map(function(r){return this.Ja(r)}.bind(this)));this.O3();this.ya()};l.Ngb=function(p){this.Y2(p).Mgb();this.O3();this.ya()};l.w7=function(p,q){this.Y2(p).ZO(q);this.O3();this.ya()};l.O3=function(){this.li.sort(function(p,q){return q.priority-p.priority})};l.ya=function(p){if(this.enabled()&&(p||!this.Jv))if(p){this.Jv&&clearTimeout(this.Jv);this.Jv=null;p=this.z_a();var q=this.A_a();f.difference(p,q).forEach(function(r){r.stop()});f.difference(q,
p).forEach(function(r){r.start()})}else this.Jv=setTimeout(function(){this.Jv=null;this.ya(!0)}.bind(this),1E3)};l.Jv=null;l.z_a=function(){return this.li.filter(function(p){return p.status==m.xZ})};l.A_a=function(){for(var p=this.B_a(),q=[],r=0;r<this.li.length&&q.length<p;r++){var t=this.li[r];t.Yoa>0&&(t.status==m.Eaa||t.status==m.xZ)&&q.push(t)}return q};l.B_a=function(){return this.HZa>0?0:5};l.Y2=function(p){var q=this.hCa.find(function(r){return r.Kgb==p});q||(q=new k(p),this.hCa.push(q));
return q};l.Ja=function(p){var q=this.li.find(function(r){return r.url==p});q||(q=new m(p),q.bind(h.ia,this.ya,this),this.li.push(q));return q};l.enabled=function(p){if(p===void 0)return l.zYa||l.AYa?!1:l.yda!==void 0?l.yda:l.ha;l.ha=p};l.ha=!0;l.Wpa=function(p){l.yda=p.get(TDV.PlayerSettings.BACKGROUND_PRELOAD_ENABLED)};l.yda=void 0;l.AYa=b.Rg("disable-background-preload",!1);l.zYa=!1;return l});
define("tdv/player/script/Media","require exports tdv/utils tdv/binding/Bindable tdv/player/parser/ClassInfo tdv/player/view/util/Preloader".split(" "),function(a,l,k,n,g,h){a=function(e){function b(){var c=e.call(this)||this;c.qka=k.ar(c.qka,c);return c}O(b,e);b.prototype.qka=function(){h.iGa(this,this.iw())};b.prototype.iw=function(){return[]};b.prototype.Zgb=function(){h.Ngb(this)};b.prototype.set=function(c,d){e.prototype.set.call(this,c,d);this.qka()};return b}(n);g.create("Media",a);return a});
define("tdv/player/script/Panorama",["require","tdv/player/parser/ClassInfo","tdv/player/script/Media"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/Media");a=l.define("Panorama",k,function(){k.call(this);this.T0=this.nN=void 0;this.set("minFaceSize",void 0)});a.prototype.get=function(n,g){switch(n){case "overlays":return this.uea();case "frames":return this.bxa();case "partial":if(this.get("hfov")<359.9)return!0}return k.prototype.get.call(this,n,g)};a.prototype.set=
function(n,g){switch(n){case "cardboardMenu":this.set("vrMenu",g)}k.prototype.set.call(this,n,g)};a.prototype.uea=function(){var n=k.prototype.get.call(this,"overlays");n||(n=[]);return this.cja(n)};a.prototype.cja=function(n){if(this.nN===void 0||this.T0!=n){var g=function(e){return l.Qa("PopupPanoramaOverlay",e)},h=function(e){return l.Qa("LensFlarePanoramaOverlay",e)};this.T0=n;this.nN=[].concat(n.filter(function(e){return!(g(e)||h(e))}),n.filter(h),n.filter(g))}return this.nN};a.prototype.qKa=
function(){return this.get("overlays").filter(function(n){return l.Qa("TripodCapPanoramaOverlay",n)}).length>0};a.prototype.gKa=function(){return this.get("overlays").filter(function(n){return l.Qa("CeilingCapPanoramaOverlay",n)}).length>0};a.prototype.LKa=function(){if(!this.sna())return!1;var n=this.get("pitch",0),g=this.get("vfov",180);if(g>=179.9)return!0;var h=this.gKa()?90:n+g*.5;n=this.qKa()?-90:n-g*.5;return h-n>=179.9?!0:!1};a.prototype.sna=function(){return this.get("hfov")>=359.9&&!this.get("partial")};
a.prototype.Ln=function(){var n=this.bxa();return n.length>0&&n[0].Ln()};a.prototype.kW=function(){return 0};a.prototype.bxa=function(){var n=k.prototype.get.call(this,"frames",[]);n.forEach(function(g){g.H$a(this)}.bind(this));return n};return a});
define("tdv/player/script/HDRPanorama",["require","tdv/player/parser/ClassInfo","tdv/player/script/Panorama"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/Panorama");a=l.define("HDRPanorama",k,function(){k.call(this)});a.prototype.kW=function(){var n=this.get("frames")||[];return Math.floor((n.length-1)/2)};return a});
define("tdv/player/script/HorizonGridModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DObject"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/Model3DObject");return l.define("HorizonGridModel3DObject",k,function(){k.call(this)})});
define("tdv/player/script/HotspotMapOverlayArea",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("HotspotMapOverlayArea",l,function(){l.call(this)})});
define("tdv/player/script/ImageResourceLevel",["require","exports","tdv/player/parser/ClassInfo","tdv/binding/Bindable"],function(a,l,k,n){a=function(g){function h(){return g.call(this)||this}O(h,g);h.prototype.get=function(e,b){switch(e){case "tags":return(e=n.prototype.get.call(this,e))||(e=[]),Array.isArray(e)||(e=[e]),e.indexOf(h.Cu)<0&&n.prototype.get.call(this,"grayscale")&&(e=e.concat([h.Cu])),e}return n.prototype.get.call(this,e,b)};h.prototype.pKa=function(e){return this.get("tags").indexOf(e)>=
0};h.Cu="preload";h.yZ="mobile";h.Usa="ipadpro";h.zZ="mobilevr";h.Jaa="mobilevr2gen";h.Kaa="ondemand";return h}(n);k.create("ImageResourceLevel",a);return a});
define("tdv/player/script/helper/LevelUtil",["require","tdv/player/script/ImageResourceLevel","tdv/player/view/util/Device","tdv/player/view/util/URL"],function(a){var l=a("tdv/player/script/ImageResourceLevel"),k=a("tdv/player/view/util/Device"),n=a("tdv/player/view/util/URL");return{yt:function(g){return this.Ak(g,"load")},dJ:function(g){return this.Ak(g,"preload")},GO:function(g){return this.yt(g)!=this.dJ(g)},Ak:function(g,h){g=g.get("levels")||[];var e=this.QZa(g);e=this.X_a(h,e);g=this.qZa(g,
h);(h=this.kxa(g,e[0],e[1],this.W_a(h)))||(h=this.kxa(g,e[0],e[1],void 0));return h},qZa:function(g,h){h=="preload"?g=this.pR(g,l.Cu):h=="load"&&(g=this.pZa(g,l.Cu));k.pA()&&(g=this.pR(g,l.Usa));if(k.d7()||k.e7())g=this.pR(g,l.Jaa);k.gf()&&(g=this.pR(g,l.zZ));k.ub()&&(g=this.pR(g,l.yZ));return g},QZa:function(g){if(g.length==0)return 1;g.sort(function(h,e){return e.get("width")-h.get("width")});return g[0].get("width")/g[0].get("height")},X_a:function(g,h){if(g=="preload")return[0,0];g=1E4;this.AZa()||
(k.gf()?g=2048:k.pA()?g=2048:k.ub()&&(g=2048));return h<1?[g*h,g]:[g,g/h]},W_a:function(g){if(g=="load")return!1},AZa:function(){return k.pA()&&n.Rg("recent_ipad_use_max_res",!1)},pR:function(g,h){var e=g.filter(function(b){return b.pKa(h)});e.length==0&&(e=g);return e},pZa:function(g,h){var e=g.filter(function(b){return!b.pKa(h)});e.length==0&&(e=g);return e},kxa:function(g,h,e,b){function c(d){return Math.abs(d.get("width")*d.get("height")-h*e)}g=g.filter(function(d){return b!==void 0&&b!=d.get("grayscale",
!1)?!1:!0});if(g.length==0)return null;g.sort(function(d,f){return c(d)-c(f)});return g[0]}}});
define("tdv/player/script/HotspotMapOverlayImageBase",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo","tdv/player/script/helper/LevelUtil"],function(a){var l=a("tdv/binding/Bindable"),k=a("tdv/player/parser/ClassInfo"),n=a("tdv/player/script/helper/LevelUtil");a=k.define("HotspotMapOverlayImageBase",l,function(){l.call(this)});a.prototype.yt=function(){return this.get("image")?n.yt(this.get("image")):null};a.prototype.dJ=function(){return this.get("image")?n.dJ(this.get("image")):
null};return a});define("tdv/view/events/ProgressEvent",["require","tdv/utils","tdv/events/Event"],function(a){var l=a("tdv/utils"),k=a("tdv/events/Event");return l.extend(k,function(n,g){k.call(this,n);this.percent=g})});
define("tdv/player/view/image/Item",["require","tdv/utils","tdv/binding/Bindable","tdv/constants/EventName","tdv/view/events/ProgressEvent"],function(a){var l=a("tdv/utils"),k=a("tdv/binding/Bindable"),n=a("tdv/constants/EventName"),g=a("tdv/view/events/ProgressEvent");a=l.extend(k,function(){k.call(this);this.dV=[];this.Qg=void 0;this.H="initial"});a.prototype.SD=function(){return this.dV};a.prototype.AP=function(h){this.dV!=h&&(this.dV=h,this.EC=this.Qg=void 0)};a.prototype.qib=function(h){this.Qg!==
h&&(this.H="loading",this.Qg=h,this.m(new g(n.xc,this.Qg)))};a.prototype.ZX=function(){this.H!=="loaded"&&(this.H="loaded",this.m(n.ia))};a.prototype.Phb=function(){this.H!=="loaded"&&(this.H="error",this.m(n.ad))};return a});
define("tdv/player/view/map/renderer/item/Item",["require","tdv/utils","tdv/player/view/image/Item"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/image/Item");a=l.extend(k,function(n){k.call(this);this.Of=n;this.C=void 0});a.prototype.getType=function(){return this.Of};a.prototype.$db=function(n){return this.C!==void 0&&this.C===n.C};a.cta="map";a.dta="overlay";return a});
define("tdv/player/view/map/renderer/item/Overlay",["require","tdv/utils","tdv/player/view/map/renderer/item/Item"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/map/renderer/item/Item");a=l.extend(k,function(n,g,h){k.call(this,k.dta);this.G3a=n;this.dc=g;this.ec=h});a.prototype.getX=function(){return this.dc};a.prototype.getY=function(){return this.ec};a.bta="image";a.ata="fov";return a});
define("tdv/player/view/map/renderer/item/ImageOverlay",["require","tdv/utils","tdv/player/view/map/renderer/item/Overlay"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/map/renderer/item/Overlay");a=l.extend(k,function(n,g,h,e,b,c,d,f,m,p,q,r){k.call(this,k.bta,h,e);this.C=n;this.ke=g;this.DCa=b;this.tga=c;this.uga=d;this.Pa=f;this.Ha=m;this.ri=p;this.uC=q;this.wD=r;this.dV=[g]});a.prototype.ql=function(){return this.ke};a.prototype.yJa=function(){return this.tga};a.prototype.zJa=function(){return this.uga};
a.prototype.dg=function(){return this.Pa};a.prototype.wg=function(){return this.Ha};a.prototype.BO=function(){return this.uC};a.prototype.DO=function(){return this.wD};return a});
define("tdv/player/script/HotspotMapOverlayImage",["require","tdv/player/parser/ClassInfo","tdv/player/script/HotspotMapOverlayImageBase","tdv/player/script/helper/LevelUtil","tdv/player/view/map/renderer/item/ImageOverlay"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/HotspotMapOverlayImageBase"),n=a("tdv/player/script/helper/LevelUtil"),g=a("tdv/player/view/map/renderer/item/ImageOverlay");a=l.define("HotspotMapOverlayImage",k,function(){k.call(this);this.Gy=void 0});
a.prototype.getItem=function(){return this.Tq()};a.prototype.Tq=function(){this.Gy===void 0&&(this.Gy=this.D5());return this.Gy};a.prototype.D5=function(h){var e=this.get("image");return e?(e=n.yt(e),new g(this,e.get("url"),this.get("x"),this.get("y"),h,this.get("offsetX"),this.get("offsetY"),this.get("width"),this.get("height"),this.get("scaleMode"),this.get("horizontalAlign"),this.get("verticalAlign"))):null};return a});
define("tdv/player/script/HotspotMapOverlayMap",["require","tdv/player/parser/ClassInfo","tdv/player/script/HotspotMapOverlayImageBase"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/HotspotMapOverlayImageBase");return l.define("HotspotMapOverlayMap",k,function(){k.call(this)})});
define("tdv/player/script/HotspotPanoramaOverlayImageBase",["require","tdv/binding/Bindable","tdv/constants/EventName","tdv/player/parser/ClassInfo","tdv/player/script/helper/PlaybackPositionHelper"],function(a){var l=a("tdv/binding/Bindable"),k=a("tdv/constants/EventName"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/player/script/helper/PlaybackPositionHelper");a=n.define("HotspotPanoramaOverlayImageBase",l,function(){l.call(this);this.Ed=void 0});a.prototype.get=function(h,e){switch(h){case "playbackPositions":return this.Ed===
void 0&&(this.Ed=g.Wma(this)),this.Ed}return l.prototype.get.call(this,h,e)};a.prototype.set=function(h,e){var b=!1;switch(h){case "distance":case "hfov":case "vfov":case "pitch":case "rotationX":case "rotationY":case "roll":case "yaw":case "opacity":case "playbackPositions":this.Ed=void 0,b=!0}l.prototype.set.call(this,h,e);b&&h!="playbackPositions"&&this.m(k.N("playbackPositions"))};return a});
define("tdv/player/script/HotspotPanoramaOverlayImage",["require","tdv/player/parser/ClassInfo","tdv/player/script/HotspotPanoramaOverlayImageBase"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/HotspotPanoramaOverlayImageBase");return l.define("HotspotPanoramaOverlayImage",k,function(){k.call(this)})});
define("tdv/player/script/HotspotPanoramaOverlayMap",["require","tdv/player/parser/ClassInfo","tdv/player/script/HotspotPanoramaOverlayImageBase"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/HotspotPanoramaOverlayImageBase");return l.define("HotspotPanoramaOverlayMap",k,function(){k.call(this)})});
define("tdv/view/html/HTMLParser",["require"],function(){function a(f){var m={};f=f.split(",");for(var p=0;p<f.length;p++)m[f[p]]=!0;return m}var l=/^<([-A-Za-z0-9_]+:?[-A-Za-z0-9_]*)((?:\s+[-A-Za-z0-9_]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,k=/^<\/([-A-Za-z0-9_]+:?[-A-Za-z0-9_]*)[^>]*>/,n=/([-A-Za-z0-9_]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,g=a("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed"),h=a("address,applet,blockquote,button,center,dd,del,dir,div,dl,dt,fieldset,form,frameset,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,p,pre,script,table,tbody,td,tfoot,th,thead,tr,ul"),
e=a("a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"),b=a("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"),c=a("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"),d=a("script,style");return function(f,m){function p(w,y,x,z){y=y.toLowerCase();if(h[y])for(;r.ZD()&&e[r.ZD()];)q("",r.ZD());b[y]&&r.ZD()==
y&&q("",y);(z=g[y]||!!z)||r.push(y);if(m.start){var A=[];x.replace(n,function(D,E){var B=arguments[2]?arguments[2]:arguments[3]?arguments[3]:arguments[4]?arguments[4]:c[E]?E:"";A.push({name:E,value:B,oma:B.replace(/(^|[^\\])"/g,'$1\\"')})});m.start&&m.start(y,A,z)}}function q(w,y){if(y)for(y=y.toLowerCase(),w=r.length-1;w>=0&&r[w]!=y;w--);else w=0;if(w>=0){for(y=r.length-1;y>=w;y--)m.end&&m.end(r[y]);r.length=w}}var r=[],t=f;for(r.ZD=function(){return this[this.length-1]};f;){var u=!0;if(r.ZD()&&
d[r.ZD()])f=f.replace(new RegExp("(.*?)</"+r.ZD()+"[^>]*>"),function(w,y){y=y.replace(/\x3c!--(.*?)--\x3e/g,"$1").replace(/<!\[CDATA\[(.*?)]]\x3e/g,"$1");m.DV&&m.DV(y);return""}),q("",r.ZD());else{if(f.indexOf("\x3c!--")==0){var v=f.indexOf("--\x3e");v>=0&&(m.Dab&&m.Dab(f.substring(4,v)),f=f.substring(v+3),u=!1)}else if(f.indexOf("</")==0){if(v=f.match(k))f=f.substring(v[0].length),v[0].replace(k,q),u=!1}else f.indexOf("<")==0&&(v=f.match(l))&&(f=f.substring(v[0].length),v[0].replace(l,p),u=!1);u&&
(v=f.indexOf("<"),u=v<0?f:f.substring(0,v),f=v<0?"":f.substring(v),m.DV&&m.DV(u))}if(f==t)throw"Parse Error: "+f;t=f}q()}});
define("tdv/view/html/HTMLFragment","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Device tdv/view/html/HTMLParser".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),h=a("tdv/player/view/util/Device"),e=a("tdv/view/html/HTMLParser"),b=l.extend(g,function(c){g.call(this);this.Oc=c;this.YT=[];this.fC=null});b.prototype.Aeb=function(c){c&&c.toLowerCase().indexOf("<script")>=
0?h.YN()==h.WP?this.U0a(c):this.T0a(c):this.S0a(c)};b.prototype.S0a=function(c){this.Oc.innerHTML=c;this.uEa()};b.prototype.U0a=function(c){this.Oc.empty();var d=this.Oc,f=null,m=[],p=null;new e(c,{start:function(q,r,t){if(q=="script"){t=void 0;for(var u=0;u<r.length&&t===void 0;u++){var v=r[u];v.name=="src"&&(t=v.value)}p={parent:d,previousSibling:f,src:t,content:""}}else{var w={};for(u=0;u<r.length;u++)v=r[u],w[v.name]=v.value;r=document.createElement(q);for(var y in w)r.setAttribute(y,w[y]);d.appendChild(r);
t?f=r:(d=r,f=null)}},DV:function(q){p?p.content+=q:d.append(q)},end:function(q){q=="script"?(m.push(p),p=null):(f=d,d=d.parent())}});this.YT=m;this.X0()};b.prototype.T0a=function(c){function d(){m++;return f+m}this.Oc.empty();var f="fragment_"+l.Igb(6)+"_",m=0,p=d(),q=[p],r=void 0,t=[],u=null,v="";new e(c,{start:function(x,z,A){if(x=="script"){A=void 0;for(x=0;x<z.length&&A===void 0;x++){var D=z[x];D.name=="src"&&(A=D.value)}u={parentClsName:q[q.length-1],previousSiblingClsName:r,src:A,content:""}}else{v+=
"<"+x;var E=d(),B=!1;for(x=0;x<z.length;x++)D=z[x],D.name=="class"&&(D.oma+=" "+E,B=!0),v+=" "+D.name+'="'+D.oma+'"';B||(v+=' class="'+E+'"');A?(v+="/>",r=E):(v+=">",q.push(E),r=void 0)}},DV:function(x){u?u.content+=x:v+=x},end:function(x){x=="script"?(t.push(u),u=null):(r=q[q.length-1],q.pop())}});this.Oc.innerHTML=v;this.Oc.Wmb(p);for(c=0;c<t.length;c++){var w=t[c],y=w.parentClsName;delete w.parentClsName;r=w.previousSiblingClsName;delete w.previousSiblingClsName;w.parent=this.Oc.querySelector("."+
y);w.previousSibling=r?this.Oc.querySelector("."+r):null}this.Oc.vnb(p);this.YT=t;this.X0()};b.prototype.X0=function(){if(!this.fC)if(this.YT.length>0){this.fC=this.YT[0];this.YT.splice(0,1);var c=this.fC.src;if(c){var d=this;b.J1a(c,function(){d.Aya()},function(){d.Q1a()})}else{var f=this.fC.parent;c=this.fC.previousSibling;var m=c?c.nextSibling:f.firstChild;c=document.write;document.write=m?function(p){f.insertBefore(document.createTextNode(p),m)}:function(p){f.append(p)};l.Ddb(this.fC.content);
document.write=c;this.Aya()}}else this.uEa()};b.prototype.Q1a=function(){this.fC=null;this.X0()};b.prototype.Aya=function(){this.fC=null;this.X0()};b.prototype.uEa=function(){this.m(new n(k.Sb))};b.yya={};b.J1a=function(c,d,f){b.yya[c]?d.call(window):l.Tbb(c,()=>{b.yya[c]=!0;d.call(window)},f)};return b});
define("tdv/view/timer/Timer",["require","exports","tdv/constants/EventName","tdv/events/Event","tdv/events/EventDispatcher"],function(a,l,k,n,g){return function(h){function e(b,c){var d=h.call(this)||this;d.c1a=b;d.ha=c;d.tk=null;return d}O(e,h);e.prototype.bind=function(b,c,d,f){b=h.prototype.bind.call(this,b,c,d,f);this.$U();return b};e.prototype.h=function(b,c,d){b=h.prototype.h.call(this,b,c,d);this.$U();return b};e.prototype.start=function(){this.ha=!0;this.$U()};e.prototype.stop=function(){this.ha=
!1;this.$U()};e.prototype.nT=function(){this.m(new n(k.lf))};e.prototype.$U=function(){if(this.ha&&this.H6(k.lf)){if(this.tk==null){var b=this;this.tk=window.setTimeout(function(){b.tk=null;b.nT();b.$U()},this.c1a)}}else this.tk!=null&&(clearTimeout(this.tk),this.tk=null)};return e}(g)});
define("tdv/view/core/visualprops/HTMLVisualProperties",["require","exports","tdv/view/core/visualprops/UIBaseVisualProperties"],function(a,l,k){return function(n){function g(){var h=n!==null&&n.apply(this,arguments)||this;h.td=null;return h}O(g,n);return g}(k)});
define("tdv/view/html/HTML","require exports tdv/utils tdv/constants/EventName tdv/player/parser/helper/AppResizeUpdater tdv/view/constants/Alignment tdv/view/core/UIComponent tdv/view/html/HTMLFragment tdv/view/util/Font tdv/view/timer/Timer tdv/view/core/visualprops/HTMLVisualProperties".split(" "),function(a,l,k,n,g,h,e,b,c,d,f){var m=/[^\d]((\d*\.)?\d+)\s*(vmin|vmax|vw|vh)/i;return function(p){function q(){var r=p.call(this)||this;r.df("HTML");r.qG=q.EZ;r.f1=0;r.e1=0;r.FDa=(new Date).getTime();
r.u.td=null;r.ZK=r.ZK.bind(r);r.vba=[];return r}O(q,p);q.prototype.va=function(){return p.prototype.va.call(this)};q.prototype.Ob=function(){p.prototype.Ob.call(this);this.j("content");this.j("horizontalAlign",h.eb);this.j("verticalAlign",h.Xd);this.j("fontFamily");this.j("fontSize");this.j("fontColor");this.j("fontWeight");this.j("fontStyle");this.j("textAlign");this.j("textDecoration");this.j("textShadowBlurRadius",3);this.j("textShadowColor","#000000");this.j("textShadowHorizontalLength",0);this.j("textShadowOpacity",
0);this.j("textShadowVerticalLength",0)};q.prototype.uL=function(){return new f};q.prototype.ao=function(r,t,u,v){this.Fb&&g.get(this.Fb).Pgb(this.ZK);p.prototype.ao.call(this,r,t,u,v);this.Fb&&(g.get(this.Fb).d$a(this.ZK),g.get(this.Fb).aO(this.ZK))};q.prototype.Ib=function(){p.prototype.Ib.call(this);this.u.td||(this.u.td=document.createElement("div"),this.u.td.style.display="inline",this.u.td.style.boxSizing="border-box",this.hN(!1),this.Nxa=new b(this.u.td),this.ju(),this.Nxa.bind(n.Sb,this.H0a,
this,!0),this.bind(n.Zb,this.Oxa,this,!0))};q.prototype.jb=function(){var r=this,t=!1;this.S("visible")&&(t=!0);this.S("content")&&(t=this.G("content"),this.Nxa.Aeb(t),this.$("content"),t=!0);if(this.S("width")||this.S("height"))t=!0;this.S("fontFamily")&&(t=this.G("fontFamily"),k.qA(t)||(t=""),this.u.td.style.fontFamily=c.cA(t),this.$("fontFamily"),t=!0);this.S("fontSize")&&(t=this.G("fontSize"),k.TKa(t)?t+="px":k.qA(t)||(t=""),this.u.td.style.fontSize=t,this.$("fontSize"),t=!0);this.S("fontColor")&&
(t=this.G("fontColor"),k.qA(t)||(t=""),this.u.td.style.color=t,this.$("fontColor"),t=!0);if(this.S("fontWeight")){t=this.G("fontWeight");switch(t){case "bold":case "bolder":case "lighter":case "100":case "200":case "300":case "400":case "500":case "600":case "700":case "800":case "900":case "normal":break;default:t="normal"}this.u.td.style.fontWeight=t;this.$("fontWeight");t=!0}if(this.S("fontStyle")){t=this.G("fontStyle");switch(t){case "italic":case "normal":break;default:t="normal"}this.u.td.style.fontStyle=
t;this.$("fontStyle");t=!0}if(this.S("textDecoration")){t=this.G("textDecoration");switch(t){case "underline":case "overline":case "line-through":case "none":break;default:t="none"}this.u.td.style.textDecoration=t;this.$("textDecoration");t=!0}if(this.S("textAlign")){t=this.G("textAlign");switch(t){case "left":case "right":case "center":case "justify":break;default:t=""}this.u.td.style.textAlign=t;this.$("textAlign");t=!0}var u=["textShadowColor","textShadowHorizontalLength","textShadowVerticalLength",
"textShadowBlurRadius","textShadowOpacity"];if(u.some(function(w){return r.S(w)})){var v={};u.forEach(function(w){v[w]=r.G(w);r.$(w)});this.u.td.style.textShadow=[v.textShadowHorizontalLength+"px",v.textShadowVerticalLength+"px",v.textShadowBlurRadius+"px","rgba("+parseInt("0x"+v.textShadowColor.substr(1,2))+", "+parseInt("0x"+v.textShadowColor.substr(3,2))+", "+parseInt("0x"+v.textShadowColor.substr(5,2))+", "+v.textShadowOpacity+")"].join(" ")}["paddingTop","paddingRight","paddingBottom","paddingLeft"].some(function(w){return r.S(w)})&&
(t=!0);p.prototype.jb.call(this);t&&this.bza()};q.prototype.bza=function(){this.Oxa();this.kc();this.G("visible")&&this.G("content")?this.aU(q.Raa):this.aU(q.EZ)};q.prototype.Jy=function(){p.prototype.Jy.call(this);this.f1=this.va().Hma();this.e1=this.va().Gma();this.fn=this.f1+this.u.Bd+this.u.ze;this.dn=this.e1+this.u.ee+this.u.Cf};q.prototype.lDa=function(r){this.mxa()!=r&&(this.u.td.style.paddingLeft=r+"px",this.kc())};q.prototype.mxa=function(){return parseInt(this.u.td.style.paddingLeft)||0};
q.prototype.nDa=function(r){this.oxa()!=r&&(this.u.td.style.paddingTop=r+"px",this.kc())};q.prototype.oxa=function(){return parseInt(this.u.td.style.paddingTop)||0};q.prototype.mDa=function(r){this.nxa()!=r&&(this.u.td.style.paddingRight=r+"px",this.kc())};q.prototype.nxa=function(){return parseInt(this.u.td.style.paddingRight)||0};q.prototype.kDa=function(r){this.lxa()!=r&&(this.u.td.style.paddingBottom=r+"px",this.kc())};q.prototype.lxa=function(){return parseInt(this.u.td.style.paddingBottom)||
0};q.prototype.H0a=function(){this.vba=Array.prototype.slice.call(this.u.td.querySelectorAll("*[style]")).map(function(r){var t={};t.qt=r;t.style=r.getAttribute("style");return t}).filter(function(r){return m.test(r.style)}).map(function(r){for(var t=r.style,u=[];;){var v=m.exec(t);if(v)u.push(function(w){return function(){return w}}(t.substr(0,v.index+1))),u.push(function(w,y){switch(y){case "vw":return function(x){return Math.round(x*w)+"px"};case "vh":return function(x,z){return Math.round(z*w)+
"px"};case "vmin":return function(x,z,A){return Math.round(A*w)+"px"};case "vmax":return function(x,z,A){return Math.round(A*w)+"px"}}}(parseFloat(v[1]),v[3].toLowerCase())),t=t.substr(v.index+v[0].length);else return u.push(function(w){return function(){return w}}(t)),r.jcb=u,r}});this.Fb&&g.get(this.Fb).aO(this.ZK)};q.prototype.ZK=function(r,t,u,v){this.vba.length!=0&&(this.vba.forEach(function(w){var y=w.jcb.map(function(x){return x(r,t,u,v)}).join("");w.qt.setAttribute("style",y)}),this.bza())};
q.prototype.Oxa=function(){var r="auto",t="auto";if(!this.Eea()){this.fn!=this.gb()&&this.kc();var u=this.gb()-(this.u.Bd+this.u.ze);u>0&&(r=u+"px")}this.Hxa()||(this.dn!=this.Kb()&&this.kc(),u=this.Kb()-(this.u.ee+this.u.Cf),u>0&&(t=u+"px"));this.u.td.style.width=r;this.u.td.style.height=t};q.prototype.Dza=function(){var r=this.va().Hma(),t=this.va().Gma();this.f1!=r||this.e1!=t?(this.f1=r,this.e1=t,this.kc(),this.aU(q.Raa)):(r=(new Date).getTime()-this.FDa,r>q.IUa?this.aU(q.tUa):r>q.HUa&&this.aU(q.sUa))};
q.prototype.R4a=function(){this.FDa=(new Date).getTime()};q.prototype.aU=function(r){this.qG==q.Raa&&this.R4a();this.qG!=r&&(this.qG!=q.EZ&&q.Uua[this.qG].h(n.lf,this.Dza,this),this.qG=r,this.qG!=q.EZ&&q.Uua[this.qG].bind(n.lf,this.Dza,this,!0))};q.EZ="stopped";q.tUa="slow";q.sUa="normal";q.Raa="fast";q.IUa=3E4;q.HUa=5E3;q.Uua={slow:new d(2E3,!0),normal:new d(500,!0),fast:new d(100,!0)};return q}(e)});
define("tdv/player/script/HTML",["require","tdv/view/html/HTML","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/view/html/HTML");return a("tdv/player/parser/ClassInfo").define("HTML",l,function(){l.call(this)})});
define("tdv/view/containers/AbsoluteContainer",["require","exports","tdv/view/containers/Container","tdv/view/constants/LayoutMode"],function(a,l,k,n){return function(g){function h(){return g.call(this)||this}O(h,g);h.prototype.Ob=function(){this.Gl(h.bd)};h.bd=Object.assign({},k.bd,{layout:n.MY});return h}(k)});
define("tdv/view/text/HTMLText",["require","exports","tdv/view/constants/OverflowPolicy","tdv/view/containers/AbsoluteContainer","tdv/view/html/HTML"],function(a,l,k,n,g){return function(h){function e(){var b=h.call(this)||this;b.vC=null;b.Fmb=!0;return b}O(e,h);e.prototype.Ob=function(){h.prototype.Ob.call(this);this.j("overflow",k.Pr);this.j("html")};e.prototype.Ib=function(){h.prototype.Ib.call(this);this.vC==null&&(this.vC=new g,this.vC.wa({left:0,toolTipDisabled:!0}),this.mb(this.vC))};e.prototype.jb=
function(){this.S("html")&&(this.vC.set("content",this.G("html")),this.$("html"));this.Qc(["paddingLeft","paddingTop","paddingRight","paddingBottom"],{},[this.vC],!0,!0);this.Qc(["cursor"],{},[this.vC],!0,!1);h.prototype.jb.call(this);this.vC.set("width",this.Eea()?void 0:"100%")};return e}(n)});
define("tdv/player/script/HTMLText",["require","tdv/view/text/HTMLText","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/view/text/HTMLText");return a("tdv/player/parser/ClassInfo").define("HTMLText",l,function(){l.call(this)})});
define("tdv/view/buttons/IconButton","require exports tdv/utils tdv/constants/EventName tdv/events/Event tdv/player/view/util/URL tdv/view/buttons/ButtonGroup tdv/view/constants/Cursor tdv/view/constants/ScaleMode tdv/view/constants/State tdv/view/constants/ButtonMode tdv/view/images/Image".split(" "),function(a,l,k,n,g,h,e,b,c,d,f,m){var p=h.Ck("debug");return function(q){function r(){var t=q.call(this,3)||this;t.L0a=function(){t.j8()};t.HQ=function(){t.get("pressed")?(t.set("pressed",!1),t.m(new g(n.Nm))):
(t.set("pressed",!0),t.m(new g(n.Sk)))};t.df("Button");t.set("ariaRole","button");t.set("autoRolledOver",!0);t.set("autoPressed",!0);t.set("cursor",b.mf);t.set("scaleMode",c.oj);t.nca=document.createElement("canvas");t.nca.width=1;t.nca.height=1;t.oca=t.nca.getContext("2d");t.oca.globalCompositeOperation="copy";t.bind(n.Eb,t.L0a,t,!1);return t}O(r,q);r.prototype.Ob=function(){q.prototype.Ob.call(this);this.j("buttonGroup");this.j("mode",f.Ze);this.j("pressed");this.j("iconURL");this.j("transparencyActive");
this.D("rollOverOpacity",d.ga,"opacity");this.D("rollOverIconURL",d.ga,"iconURL");this.D("pressedOpacity",d.Nb,"opacity");this.D("pressedIconURL",d.Nb,"iconURL");this.D("pressedRollOverOpacity",d.wc,"opacity");this.D("pressedRollOverIconURL",d.wc,"iconURL")};r.prototype.j8=function(t){t?q.prototype.set.call(this,"cursor",t):q.prototype.set.call(this,"cursor",this.tYa)};r.prototype.Oeb=function(t){if(!this.u.image)return!1;var u=this.Fb?this.Fb.TC:1,v=k.offset(this.u.image),w=(t.nE-v.left)/u,y=this.u.image.clientWidth;
t=(t.oE-v.top)/u;u=this.u.image.clientHeight;if(w>=0&&t>=0&&w<y&&t<u){if(p)return!0;this.oca.drawImage(this.u.image,w*this.EM/y,t*this.DM/u,1,1,0,0,1,1);if(this.oca.getImageData(0,0,1,1).data[3]>0)return!0}return!1};r.prototype.set=function(t,u){t==="cursor"&&(this.tYa=u);return q.prototype.set.call(this,t,u)};r.prototype.jb=function(){this.S("transparencyActive")&&(this.g6a(this.G("transparencyActive")),this.$("transparencyActive"));var t=!1;if(this.S("backgroundOpacity")||this.S("backgroundColor"))t=
!0;if(this.S("iconURL")){var u=this.G("iconURL");this.set("url",u);this.$("iconURL")}u=!1;this.S("mode")&&(this.G("mode")==f.Ze?(this.h(n.la,this.HQ,this),this.set("autoPressed",!0)):(this.bind(n.la,this.HQ,this,!0),this.set("autoPressed",!1)),this.$("mode"),u=!0);if(u||this.S("pressed"))this.G("mode")==f.Vk?this.iN(this.G("pressed")==1):u&&this.iN(!1);this.S("buttonGroup")&&((u=this.G("buttonGroup"))?e.register(this,u):e.unregister(this),this.$("buttonGroup"));q.prototype.jb.call(this);!t||this.u.om!=
0&&this.u.wk.length!=0||(this.SCa(.001),this.RCa(["#000000"]))};r.prototype.g6a=function(t){this.XL.bPa(t)};return r}(m)});define("tdv/player/script/IconButton",["require","tdv/view/buttons/IconButton","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/view/buttons/IconButton");return a("tdv/player/parser/ClassInfo").define("IconButton",l,function(){l.call(this)})});
define("tdv/player/script/IconHotspotMapOverlay",["require","tdv/player/parser/ClassInfo","tdv/player/script/HotspotMapOverlay"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/HotspotMapOverlay");return l.define("IconHotspotMapOverlay",k,function(){k.call(this,!1)})});
define("tdv/player/script/Image",["require","tdv/view/images/Image","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/view/images/Image");a=a("tdv/player/parser/ClassInfo").define("Image",l,function(){l.call(this)});a.prototype.set=function(k,n){l.prototype.set.call(this,k,n)};return a});
define("tdv/player/script/ImagePlaneModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/PlaneModel3DObject"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/PlaneModel3DObject");return l.define("ImagePlaneModel3DObject",k,function(){k.call(this)})});
define("tdv/player/script/InnerModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DObject"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/Model3DObject");return l.define("InnerModel3DObject",k,function(){k.call(this)})});define("tdv/player/script/Label",["require","tdv/view/text/Label","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/view/text/Label");return a("tdv/player/parser/ClassInfo").define("Label",l,function(){l.call(this)})});
define("tdv/player/script/LensFlarePanoramaOverlay",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("LensFlarePanoramaOverlay",l,function(){l.call(this)})});
define("tdv/player/script/LineModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DObject"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/Model3DObject");return l.define("LineModel3DObject",k,function(){k.call(this)})});
define("tdv/player/script/LivePanorama",["require","tdv/player/parser/ClassInfo","tdv/player/script/Panorama"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/Panorama");a=l.define("LivePanorama",k,function(){k.call(this)});a.prototype.kW=function(){return this.get("initialFrameIndex",0)};return a});
define("tdv/player/script/Light",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("Light",l,function(){l.call(this)})});
define("tdv/player/view/map/renderer/item/Map",["require","tdv/utils","tdv/player/view/map/renderer/item/Item"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/map/renderer/item/Item");a=l.extend(k,function(n,g,h,e,b,c,d){k.call(this,k.cta);this.C=n;this.ke=g;this.Pa=h;this.Ha=e;this.ri=b;this.xZa=c;this.oq=d.slice()});a.prototype.SD=function(){for(var n=[this.ke],g=0;g<this.oq.length;g++)n=n.concat(this.oq[g].SD());return n};a.prototype.ql=function(){return this.ke};a.prototype.dg=function(){return this.Pa};
a.prototype.wg=function(){return this.Ha};return a});
define("tdv/player/script/Map","require tdv/player/parser/ClassInfo tdv/view/constants/ScaleMode tdv/player/script/Media tdv/player/script/helper/LevelUtil tdv/player/view/map/renderer/item/Map".split(" "),function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/view/constants/ScaleMode"),n=a("tdv/player/script/Media"),g=a("tdv/player/script/helper/LevelUtil"),h=a("tdv/player/view/map/renderer/item/Map");a=l.define("Map",n,function(){n.call(this);this.Gy=this.HT=void 0});a.prototype.jhb=function(){this.Gy=
this.HT=void 0};a.prototype.GO=function(){return!(!this.get("image")||!g.GO(this.get("image")))};a.prototype.dJ=function(){return this.get("image")&&g.dJ(this.get("image"))};a.prototype.yt=function(){return this.get("image")&&g.yt(this.get("image"))};a.prototype.CJa=function(){this.HT==void 0&&(this.GO()?this.HT=new h(this,this.dJ().get("url"),this.get("width"),this.get("height"),this.get("scaleMode",k.eF),this.get("flipImageHorizontally",!1),[]):this.HT=null);return this.HT};a.prototype.Tq=function(){if(this.Gy==
void 0)if(this.get("image")){var e=Array.prototype.concat.apply([],this.get("overlays",[]).map(function(b){return b.Tcb()}));this.Gy=new h(this,this.yt().get("url"),this.get("width"),this.get("height"),this.get("scaleMode",k.eF),this.get("flipImageHorizontally",!1),e)}else this.Gy=null;return this.Gy};a.prototype.iw=function(){return[].concat(this.exa(this.CJa()),this.exa(this.Tq()))};a.prototype.exa=function(e){return e?e.SD():[]};return a});
define("tdv/player/script/MapOverlay",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("MapOverlay",l,function(){l.call(this)})});
define("tdv/player/script/helper/ButtonProperty","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/view/constants/ButtonMode tdv/view/constants/State".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),h=a("tdv/view/constants/ButtonMode"),e=a("tdv/view/constants/State");a=l.extend(g,function(b,c,d){g.call(this);this.hva=b;this.f4a=c;this.yua=d||h.Ze;this.fk=[];this.mG=[];this.UB=
{};this.UB.mode=this.yua;this.yua==h.Vk&&(this.UB.pressed=!1);this.hva.bind(k.N(c),this.cCa,this);this.cCa()});a.prototype.cCa=function(){var b=this.hva.get(this.f4a);b||(b=[]);Array.isArray(b)||(b=[b]);this.C5a(b)};a.prototype.C5a=function(b){l.difference(this.fk,b).forEach(c=>{c.h(k.Sk,this.Bua,this,!0);c.h(k.Nm,this.Cua,this,!0);c.h(k.la,this.xua,this,!0);c.h(k.Ra,this.zua,this,!0);c.h(k.ab,this.Aua,this,!0);c.h(k.tc,this.Eua,this,!0);c.h(k.Eb,this.Dua,this,!0)});l.difference(b,this.fk).forEach(c=>
{c.wa(this.UB);c.bind(k.Sk,this.Bua,this,!0);c.bind(k.Nm,this.Cua,this,!0);c.bind(k.la,this.xua,this,!0);c.bind(k.Ra,this.zua,this,!0);c.bind(k.ab,this.Aua,this,!0);c.bind(k.tc,this.Eua,this,!0);c.bind(k.Eb,this.Dua,this,!0)},this);this.fk=b;this.mG=this.mG.filter(function(c){return this.fk.indexOf(c)>=0}.bind(this))};a.prototype.Bua=function(){this.m(new n(k.Sk))};a.prototype.Cua=function(){this.m(new n(k.Nm))};a.prototype.xua=function(){this.m(new n(k.la))};a.prototype.zua=function(){this.m(new n(k.Ra))};
a.prototype.Aua=function(){this.m(new n(k.ab))};a.prototype.Eua=function(b){this.mG.push(b.source);this.km()};a.prototype.Dua=function(b){this.mG=this.mG.filter(function(c){return c!=b.source});this.km()};a.prototype.set=function(b,c){this.UB[b]=c;this.fk.forEach(function(d){d.wa(this.UB)}.bind(this));this.km()};a.prototype.km=function(){this.fk.forEach(function(b){b.get("state")==e.Nb&&this.mG.indexOf(b)>=0?b.set("state",e.wc):b.get("state")==e.wc&&this.mG.indexOf(b)<0&&b.set("state",e.Nb)}.bind(this))};
return a});
define("tdv/binding/BindingsHandler",["require","exports","tdv/utils","tdv/binding/ChangeWatcher"],function(a,l,k,n){var g=function(){return function(){}}();return function(){function h(){}h.ba=function(e,b,c,d){this.Qta(e,b,c,d,!1)};h.xD=function(e,b,c,d){this.Qta(e,b,c,d,!0)};h.Qta=function(e,b,c,d,f){function m(){for(var r=[],t=0;t<b.length;t++)try{r.push(e.get(b[t]))}catch(u){r.push(void 0),k.PW("BindingsHandler._addBinding",u)}c.apply(this,r)}b=k.toArray(b);f&&(m=k.ar(m));var p=[];b.forEach(function(r){(r=
n.Sw(e,r,m,this,!f))&&p.push(r)},this);var q=new g;q.Klb=p;q.host=e;q.properties=b;q.yW=c;this.qla.push(q);d&&m()};h.da=function(e,b,c){var d=[];this.qla.forEach(function(f){f.yW==c&&f.host==e&&k.geb(f.properties,k.toArray(b))?f.Klb.forEach(function(m){m.UE()}):d.push(f)});this.qla=d};h.qla=[];return h}()});
define("tdv/player/view/PlaybackBar","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/view/constants/State tdv/view/constants/Cursor tdv/view/containers/AbsoluteContainer tdv/view/core/UIComponent tdv/view/effects/FadeInEffect tdv/view/effects/FadeOutEffect".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/view/constants/State"),h=a("tdv/view/constants/Cursor"),e=a("tdv/view/containers/AbsoluteContainer"),b=a("tdv/view/core/UIComponent");
a("tdv/view/effects/FadeInEffect");a("tdv/view/effects/FadeOutEffect");var c=l.extend(e,function(){e.call(this);this.df("PlaybackBar");this.sn=this.Qg=null;this.Ph=[];this.N2=!1;this.Cha=this.MH=void 0;this.kja=!1});c.bd=Object.assign({},e.bd,{cursor:h.mf,overflow:"visible",height:20,position:0,duration:100,steps:void 0,selectedStep:void 0,backgroundColor:"#000000",barBackgroundColor:"#FFFFFF",barBackgroundColorDirection:void 0,barBackgroundColorRatios:void 0,barBorderColor:void 0,barBorderRadius:void 0,
barBorderSize:void 0,barOpacity:void 0,liveDragging:void 0,playheadBackgroundColor:"#FFFFFF",playheadBackgroundColorDirection:void 0,playheadBackgroundColorRatios:void 0,playheadBorderColor:void 0,playheadBorderRadius:void 0,playheadBorderSize:void 0,playheadOpacity:void 0,playheadWidth:5,playheadHeight:30,playheadShadow:!0,playheadShadowBlurRadius:3,playheadShadowColor:"#000000",playheadShadowHorizontalLength:0,playheadShadowOpacity:void 0,playheadShadowSpread:0,playheadShadowVerticalLength:3,stepBackgroundColor:"#FFFFFF",
stepBackgroundColorDirection:void 0,stepBackgroundColorRatios:void 0,stepBorderColor:void 0,stepBorderRadius:6,stepBorderSize:0,stepOpacity:1,stepWidth:12,stepHeight:12,stepShadow:!0,stepShadowBlurRadius:6,stepShadowColor:"#000000",stepShadowHorizontalLength:0,stepShadowOpacity:void 0,stepShadowSpread:0,stepShadowVerticalLength:0,selectedStepBackgroundColor:"#3399FF",selectedStepBackgroundColorDirection:void 0,selectedStepBackgroundColorRatios:void 0,selectedStepBorderColor:"#ffffff",selectedStepBorderRadius:10,
selectedStepBorderSize:2,selectedStepOpacity:1,selectedStepWidth:20,selectedStepHeight:20,selectedStepShadow:!0,selectedStepShadowBlurRadius:3,selectedStepShadowColor:"#000000",selectedStepShadowHorizontalLength:0,selectedStepShadowOpacity:void 0,selectedStepShadowSpread:0,selectedStepShadowVerticalLength:0});c.prototype.Ob=function(){this.Gl(c.bd)};c.prototype.Ib=function(){e.prototype.Ib.call(this);this.Qg&&this.sn||this.bind(k.Zb,this.T3a,this,!0);this.Qg==null&&(this.Qg=new b,this.Qg.wa({left:"0",
height:"100%",cursor:h.mf}),this.mb(this.Qg));this.sn==null&&(this.sn=new b,this.sn.wa({left:"0",cursor:h.mf}),this.sn.bind(k.Zb,this.W3a,this,!0),this.sn.bind(k.Ra,this.U3a,this,!0),this.bind(k.la,this.R3a,this,!0),this.sn.bind(k.ab,this.V3a,this,!0),this.mb(this.sn));var f=this.get("steps")||0;if(this.Ph.length!=f){for(;this.Ph.length>f;)this.xYa(this.Ph.pop());for(;this.Ph.length<f;)this.Ph.push(this.nYa());this.Qc(c.Lta,c.cba,this.Ph,!1,!0);this.pFa();this.vka();this.gr(this.sn,this.Cb().length-
1)}};c.prototype.nYa=function(){var f=new d;f.wa({cursor:h.mf});f.bind(k.la,this.ODa,this,!0);f.bind(k.Zb,this.PDa,this,!0);this.mb(f);return f};c.prototype.xYa=function(f){f.h(k.la,this.ODa,this,!0);f.h(k.Zb,this.PDa,this,!0);this.removeChild(f)};c.prototype.jb=function(){var f=!1;if(this.S("position")||this.S("duration"))this.$("position"),this.$("duration"),f=!0;this.S("selectedStep")&&(this.$("selectedStep"),this.pFa());this.S("steps")&&(this.$("steps"),this.HW());this.Qc(c.Qaa,c.tQ,[this.Qg],
!0,!0);this.Qc(c.EUa,c.Ita,[this.sn],!0,!0);this.Qc(c.Lta,c.cba,this.Ph,!0,!0);e.prototype.jb.call(this);f&&this.G4()};c.prototype.pFa=function(){var f=this.get("selectedStep");this.Ph.forEach(function(m,p){m.kY(p===f)});this.sn.set("visible",f===void 0)};c.prototype.G4=function(){var f=this.gb(),m=this.sn.gb(),p=this.sn.Kb(),q=this.rR(),r=this.hs(),t=r*f/q;f=Math.round((this.N2?this.MH:r)*f/q-m*.5);f=Math.max(0,Math.min(f,this.Uh()-m));this.sn.wa({left:f,top:Math.round(this.Th()*.5-p*.5)});this.Qg.set("width",
Math.round(t))};c.prototype.W3a=function(){this.G4()};c.prototype.U3a=function(f){this.N2=!0;this.Cha=f.pageX;this.MH=this.G("position");this.uia=this.f0a();this.uia.bind(k.fb,this.Bha,this,!0)};c.prototype.f0a=function(){for(var f=this.getParent();f.getParent();)f=f.getParent();return f};c.prototype.Bha=function(f){if(this.N2){var m=f.pageX-this.Cha;this.Cha=f.pageX;f=this.gb();var p=this.rR();this.MH=Math.max(0,Math.min(p,this.MH+p*m/f));this.get("liveDragging")&&(this.set("position",this.MH),this.m(new n(k.V)));
this.G4()}};c.prototype.V3a=function(f){this.uia.h(k.fb,this.Bha,this);this.uia=null;this.Bha(f);this.N2=!1;this.get("liveDragging")||(this.set("position",this.MH),this.m(new n(k.V)));this.MH=void 0};c.prototype.R3a=function(f){if(!this.kja){var m=this.gb(),p=this.rR();this.set("position",p*f.x/m);this.m(new n(k.V))}};c.prototype.PDa=function(){this.vka()};c.prototype.T3a=function(){this.vka();this.G4()};c.prototype.vka=function(){for(var f=this.gb(),m=this.Kb(),p=this.cw(),q=this.getParent().gb()-
(p+f),r=0,t=this.Ph.length;r<t;r++){var u=this.Ph[r],v=u.gb();u.wa({left:r==0&&p==0?0:r==t-1&&q==0?f-v:Math.round(f*r/(t-1)-v*.5),top:Math.round(m*.5-u.Kb()*.5)})}};c.prototype.ODa=function(f){f=this.Ph.indexOf(f.source);var m=this.rR();this.set("position",m*f/(this.Ph.length-1));this.kja=!0;this.m(new n(k.V));setTimeout(function(){this.kja=!1}.bind(this),0)};c.prototype.rR=function(){var f=this.G("duration");return f?f:1};c.prototype.hs=function(){return Math.max(0,Math.min(this.rR(),this.G("position")))};
c.tQ={barBackgroundColor:"backgroundColor",barBackgroundColorDirection:"backgroundColorDirection",barBackgroundColorRatios:"backgroundColorRatios",barBorderColor:"borderColor",barBorderRadius:"borderRadius",barBorderSize:"borderSize",barOpacity:"opacity"};c.Qaa=Object.keys(c.tQ);c.Ita={playheadBackgroundColor:"backgroundColor",playheadBackgroundColorDirection:"backgroundColorDirection",playheadBackgroundColorRatios:"backgroundColorRatios",playheadBorderColor:"borderColor",playheadBorderRadius:"borderRadius",
playheadBorderSize:"borderSize",playheadOpacity:"opacity",playheadWidth:"width",playheadHeight:"height",playheadShadow:"shadow",playheadShadowBlurRadius:"shadowBlurRadius",playheadShadowColor:"shadowColor",playheadShadowHorizontalLength:"shadowHorizontalLength",playheadShadowOpacity:"shadowOpacity",playheadShadowSpread:"shadowSpread",playheadShadowVerticalLength:"shadowVerticalLength"};c.EUa=Object.keys(c.Ita);c.cba={stepBackgroundColor:"backgroundColor",stepBackgroundColorDirection:"backgroundColorDirection",
stepBackgroundColorRatios:"backgroundColorRatios",stepBorderColor:"borderColor",stepBorderRadius:"borderRadius",stepBorderSize:"borderSize",stepOpacity:"opacity",stepWidth:"width",stepHeight:"height",stepShadow:"shadow",stepShadowBlurRadius:"shadowBlurRadius",stepShadowColor:"shadowColor",stepShadowHorizontalLength:"shadowHorizontalLength",stepShadowOpacity:"shadowOpacity",stepShadowSpread:"shadowSpread",stepShadowVerticalLength:"shadowVerticalLength",selectedStepBackgroundColor:"selectedBackgroundColor",
selectedStepBackgroundColorDirection:"selectedBackgroundColorDirection",selectedStepBackgroundColorRatios:"selectedBackgroundColorRatios",selectedStepBorderColor:"selectedBorderColor",selectedStepBorderRadius:"selectedBorderRadius",selectedStepBorderSize:"selectedBorderSize",selectedStepOpacity:"selectedOpacity",selectedStepWidth:"selectedWidth",selectedStepHeight:"selectedHeight",selectedStepShadow:"selectedShadow",selectedStepShadowBlurRadius:"selectedShadowBlurRadius",selectedStepShadowColor:"selectedShadowColor",
selectedStepShadowHorizontalLength:"selectedShadowHorizontalLength",selectedStepShadowOpacity:"selectedShadowOpacity",selectedStepShadowSpread:"selectedShadowSpread",selectedStepShadowVerticalLength:"selectedShadowVerticalLength"};c.Lta=Object.keys(c.cba);var d=l.extend(b,function(){b.call(this)});d.prototype.kY=function(f){this.hU(f)};d.prototype.Ob=function(){b.prototype.Ob.call(this);this.j("backgroundColor");this.j("backgroundColorDirection");this.j("backgroundColorRatios");this.j("borderColor");
this.j("borderRadius");this.j("borderSize");this.j("opacity");this.j("width");this.j("height");this.j("shadow");this.j("shadowBlurRadius");this.j("shadowColor");this.j("shadowHorizontalLength");this.j("shadowOpacity");this.j("shadowSpread");this.j("shadowVerticalLength");this.D("selectedBackgroundColor",g.pa,"backgroundColor");this.D("selectedBackgroundColorDirection",g.pa,"backgroundColorDirection");this.D("selectedBackgroundColorRatios",g.pa,"backgroundColorRatios");this.D("selectedBorderColor",
g.pa,"borderColor");this.D("selectedBorderRadius",g.pa,"borderRadius");this.D("selectedBorderSize",g.pa,"borderSize");this.D("selectedOpacity",g.pa,"opacity");this.D("selectedWidth",g.pa,"width");this.D("selectedHeight",g.pa,"height");this.D("selectedShadow",g.pa,"shadow");this.D("selectedShadowBlurRadius",g.pa,"shadowBlurRadius");this.D("selectedShadowColor",g.pa,"shadowColor");this.D("selectedShadowHorizontalLength",g.pa,"shadowHorizontalLength");this.D("selectedShadowOpacity",g.pa,"shadowOpacity");
this.D("selectedShadowSpread",g.pa,"shadowSpread");this.D("selectedShadowVerticalLength",g.pa,"shadowVerticalLength")};d.prototype.jb=function(){b.prototype.jb.call(this)};return c});
define("tdv/player/view/ProgressBar",["require","tdv/utils","tdv/view/containers/AbsoluteContainer","tdv/view/core/UIComponent"],function(a){var l=a("tdv/utils"),k=a("tdv/view/containers/AbsoluteContainer"),n=a("tdv/view/core/UIComponent"),g=l.extend(k,function(){k.call(this);this.df("ProgressBar")});g.bd=Object.assign({},k.bd,{percent:0,backgroundColor:"#000000",barBackgroundColor:"#FFFFFF",barBackgroundColorDirection:void 0,barBackgroundColorRatios:void 0,barBorderColor:void 0,barBorderRadius:void 0,
barBorderSize:void 0,barOpacity:void 0});g.prototype.Ob=function(){this.Gl(g.bd)};g.prototype.Ib=function(){k.prototype.Ib.call(this);this.Qg==null&&(this.Qg=new n,this.Qg.wa({left:"0",width:"0%",height:"100%"}),this.mb(this.Qg))};g.prototype.jb=function(){this.S("percent")&&(this.Qg.set("width",Math.round(this.G("percent"))+"%"),this.$("percent"));this.Qc(g.Qaa,g.tQ,[this.Qg],!0,!0);k.prototype.jb.call(this)};g.tQ={barBackgroundColor:"backgroundColor",barBackgroundColorDirection:"backgroundColorDirection",
barBackgroundColorRatios:"backgroundColorRatios",barBorderColor:"borderColor",barBorderRadius:"borderRadius",barBorderSize:"borderSize",barOpacity:"opacity"};g.Qaa=Object.keys(g.tQ);return g});
define("tdv/player/view/webgl/system/util/Util","require tdv/player/view/util/Capabilities tdv/player/view/util/Device tdv/player/view/util/FileType tdv/player/view/util/URL tdv/view/util/Fullscreen".split(" "),function(a){var l=a("tdv/player/view/util/Capabilities"),k=a("tdv/player/view/util/Device"),n=a("tdv/player/view/util/FileType"),g=a("tdv/player/view/util/URL"),h=a("tdv/view/util/Fullscreen"),e={nnb:function(q){return this.QO(q)||this.bLa(q)?!0:!1},xx:function(){var q=k.Egb();e.xx=function(){return q};
return q},bLa:function(q){return typeof q=="string"&&n.is(q,n.Pp)?!0:!1},inb:function(q){return this.yna(q)||this.zna(q)?!0:!1},zna:function(q){return typeof q=="string"&&(n.is(q,n.QSa)||n.WD(q,n.RSa))?!0:!1},QO:function(q){return!!q&&!!q.tagName&&q.tagName=="VIDEO"},LO:function(q){return typeof q=="string"&&n.is(q,n.HLS)||this.QO(q)&&n.is(q.currentSrc,n.HLS)?!0:!1},Ln:function(q){return typeof q=="string"&&n.is(q,n.Pp)||this.QO(q)&&n.is(q.currentSrc,n.Pp)?!0:!1},yna:function(q){return!!q&&!!q.tagName&&
q.tagName=="IMG"},Deb:function(q){return!!q&&!!q.tagName&&q.tagName=="CANVAS"},dnb:function(q){return Math.pow(2,Math.round(Math.log(q)/Math.LN2))},knb:function(q){return q!==0&&(q&q-1)===0},OKa:function(){return k.Ub()==k.Ok},jnb:function(){return k.Ub()==k.dF},Wq:function(){return k.Md()==k.pj}},b=k.Md()==k.gB&&!k.gf()&&k.B$a()<11;e.zRa=function(q){return d||b&&q&&q.currentTime<.2?!0:!1};e.uKa=function(){return e.OKa()||e.Wq()};e.tKa=function(){return e.Wq()&&l.neb&&k.ina()<11};var c=!1;e.KKa=function(){c=
!1};e.Eeb=function(){return c};e.Ehb=function(){c=!0};var d=g.Ck("vic");e.wgb=function(){e.Wq()&&(d=!0)};e.FJa=function(){return{alpha:!0,depth:!0,stencil:!1,antialias:l.Z$a()?!0:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"high-performance",xrCompatible:!e.OKa()}};e.sbb=function(q){if(l.GNa==2){var r=e.FJa();r=q.getContext("webgl2",r)}r||(r=e.FJa(),r=q.getContext("webgl",r)||q.getContext("experimental-webgl",r));return r};e.Nla=function(q,r){r||(r=q.getSize(new THREE.Vector2));
q=new THREE.WebGLRenderTarget(r.width,r.height,{minFilter:THREE.LinearFilter,magFilter:THREE.LinearFilter,format:THREE.RGBAFormat,type:THREE.HalfFloatType,samples:q.capabilities.isWebGL2?k.ub()?2:8:0});q.depthTexture=new THREE.DepthTexture;return q};e.rbb=function(q){return new THREE.WebGLCubeRenderTarget(q,{minFilter:THREE.LinearFilter,magFilter:THREE.LinearFilter,format:THREE.RGBAFormat,type:THREE.HalfFloatType})};e.getPixelRatio=function(){if(k.ub()){var q=0,r=0;try{q=window.top.innerWidth,r=window.top.innerHeight}catch(t){if(k.Md()==
k.gB&&window.devicePixelRatio>1)return window.devicePixelRatio}q=[Math.max(document.documentElement.clientWidth,q),Math.max(document.documentElement.clientHeight,r)].sort(function(t,u){return u-t});q=[p[0]/q[0],p[1]/q[1]].sort()[0];if(q!==Infinity)return q}else if(k.Md()==k.Vra&&k.Ub()==k.Hp)return 1;return window.devicePixelRatio};e.TIa=function(q){if(!k.ub()||k.Md()!=k.gB||!h.enabled()||!q)return e.getPixelRatio();q=[q.clientWidth,q.clientHeight].sort(function(r,t){return t-r});return[p[0]/q[0],
p[1]/q[1]].sort()[0]};var f=!1,m=[];e.e9=function(q){f=q;m.forEach(function(r){r(q)})};e.x$a=function(q){m.push(q)};e.$eb=function(){return f};var p=[screen.width*window.devicePixelRatio,screen.height*window.devicePixelRatio].sort(function(q,r){return r-q});return e});define("tdv/player/view/panorama/renderer/3d/util/Util",["require","tdv/player/view/webgl/system/util/Util"],function(a){return a("tdv/player/view/webgl/system/util/Util")});
define("tdv/player/view/common/SceneFaderState",["require","exports"],function(){return function(){return function(){this.KD=this.tO=void 0}}()});
define("tdv/player/view/common/SceneFader",["require","exports","tdv/player/view/panorama/renderer/3d/util/Util","three.mod","tdv/constants/RenderOrder"],function(a,l,k,n,g){a=function(){function e(b,c,d,f){this.state=b;this.renderer=c;this.scene=d;this.camera=f;this.Lla()}e.prototype.dispose=function(){this.Bla()};e.prototype.update=function(b,c){if(this.state.KD!==void 0)if(this.Ai.material.opacity=1-this.state.KD,b=c.parent!=null?c:b,this.Ai.parent!==b&&b.add(this.Ai),c.isPerspectiveCamera){this.Ai.position.z=
-c.near*1.01;var d=this.renderer.getSize(new n.Vector2),f=d.height;b=this.R5.width;var m=this.R5.height;c=f/(2*Math.tan(c.fov*h/2));c=Math.max(f/c,d.width/(c*b/m));this.Ai.scale.y=c;this.Ai.scale.x=c*b/m}else c.isOrthographicCamera&&(this.Ai.position.z=-(c.near+.1),this.renderer.getSize(new n.Vector2),this.Ai.scale.y=c.top-c.bottom,this.Ai.scale.x=c.right-c.left)};e.prototype.Qf=function(){return this.scene};e.prototype.Lla=function(){this.R5=this.iab();this.Ai=this.ibb(this.R5)};e.prototype.iab=
function(){this.renderer.Fn=!0;var b=k.Nla(this.renderer),c=this.renderer.getRenderTarget();this.renderer.setRenderTarget(b);this.renderer.render(this.scene,this.camera);this.renderer.setRenderTarget(c);this.renderer.Fn=!1;return b};e.prototype.ibb=function(b){b=new n.SpriteMaterial({map:b.texture});b.sizeAttenuation=!1;b.transparent=!0;b.visible=!0;b.opacity=1;b.depthTest=!1;b.needsUpdate=!0;b=new n.Sprite(b);b.renderOrder=g.JTa;return b};e.prototype.Bla=function(){var b,c,d,f=this.Ai.material;(b=
f.map)===null||b===void 0||b.dispose();(c=f.envMap)===null||c===void 0||c.dispose();f.dispose();this.Ai.geometry.dispose();this.R5.dispose();(d=this.Ai.parent)===null||d===void 0||d.remove(this.Ai)};return e}();var h=Math.PI/180;return a});
define("tdv/player/view/common/XRSceneFader","require exports tdv/player/view/panorama/renderer/3d/util/Util tdv/player/view/util/XR three.mod tdv/constants/RenderOrder".split(" "),function(a,l,k,n,g,h){a=function(){function c(d,f,m,p){this.state=d;this.renderer=f;this.scene=m;this.camera=p;this.Lla();this.nbb()}c.prototype.dispose=function(){this.Bla();this.uab()};c.prototype.update=function(){var d=this.state.KD===void 0?0:1-this.state.KD,f=this.state.tO===void 0?1:1-this.state.tO;d*=f;this.uO.material.opacity=
1*f;this.Ai.children.forEach(function(m){m.material.opacity=d})};c.prototype.Qf=function(){return this.scene};c.prototype.Lla=function(){this.Ai||(this.tIa=this.jab(),this.Ai=this.Nab(this.tIa),n.pm.add(this.Ai))};c.prototype.jab=function(){var d=new g.Vector2(1024,1024),f=this.camera,m=this.renderer,p=this.scene,q=m.getRenderTarget(),r=m.getActiveCubeFace(),t=m.getActiveMipmapLevel(),u=m.xr.enabled,v=new g.PerspectiveCamera(90,1,f.near,f.far);v.matrixAutoUpdate=!1;v.layers=f.layers;this.renderer.Fn=
!0;m.xr.enabled=!1;n.pm.add(v);f=e.map(function(w){var y=k.Nla(m,d);v.matrix.identity();v.matrix.multiply(b.makeRotationFromEuler(w));v.updateMatrixWorld();m.setRenderTarget(y,0,0);m.render(p,v);return y});m.setRenderTarget(q,r,t);m.xr.enabled=u;this.renderer.Fn=!1;n.pm.remove(v);return f};c.prototype.Nab=function(d){var f=new g.Group;e.forEach(function(m,p){var q=new g.PlaneGeometry(2,2);p=new g.MeshBasicMaterial({side:g.DoubleSide,depthTest:!1,transparent:!0,map:d[p].texture});q=new g.Mesh(q,p);
q.matrixAutoUpdate=!1;q.renderOrder=h.nUa;q.userData.$W=!0;q.matrix.identity();q.matrix.multiply(b.makeRotationFromEuler(m));q.matrix.multiply(b.makeTranslation(0,0,-1));f.add(q)});return f};c.prototype.Bla=function(){var d;this.Ai.children.forEach(function(f){var m,p;f.material.dispose();(m=f.geometry)===null||m===void 0||m.dispose();(p=f.parent)===null||p===void 0||p.remove(f)});this.tIa.forEach(function(f){f.texture.dispose();f.dispose()});(d=this.Ai.parent)===null||d===void 0||d.remove(this.Ai)};
c.prototype.nbb=function(){var d=new g.SphereGeometry(1,32,16,0,Math.PI*2,0,Math.PI),f=new g.MeshBasicMaterial({color:0,side:g.DoubleSide,depthTest:!1,transparent:!0});d=new g.Mesh(d,f);d.renderOrder=h.oUa;d.userData.$W=!0;this.uO=d;n.pm.add(this.uO)};c.prototype.uab=function(){var d;this.uO.material.dispose();this.uO.geometry.dispose();(d=this.uO.parent)===null||d===void 0||d.remove(this.uO)};return c}();var e=[new g.Euler(0,0,0,"YXZ"),new g.Euler(0,-.5*Math.PI,0,"YXZ"),new g.Euler(0,-Math.PI,0,
"YXZ"),new g.Euler(0,.5*Math.PI,0,"YXZ"),new g.Euler(.5*Math.PI,0,0,"YXZ"),new g.Euler(-.5*Math.PI,0,0,"YXZ")],b=new g.Matrix4;new g.Euler;return a});
define("tdv/player/view/common/WebGLRendererAugmenter","require exports tdv/constants/EventName tdv/player/view/common/SceneFaderState tdv/player/view/common/SceneFader tdv/player/view/common/XRSceneFader tdv/player/view/util/XR tdv/player/view/util/Device tdv/player/view/util/Flags".split(" "),function(a,l,k,n,g,h,e,b,c){return function(){function d(f){this.t9=this.s9=this.v9=this.w9=this.u9=this.x9=void 0;this.Ut=null;this.Dna=!1;this.WV=void 0;this.renderer=f;this.Iw=new n;this.cNa=this.renderer.render.bind(f);
this.renderer.render=this.render.bind(this);this.eNa=this.renderer.setSize.bind(f);this.renderer.setSize=this.setSize.bind(this);this.kgb=this.renderer.clear.bind(f);this.renderer.clear=this.clear.bind(this);this.dNa=this.renderer.setRenderTarget.bind(f);this.renderer.setRenderTarget=this.setRenderTarget.bind(this);e.M.bind(k.V,this.Ya,this,!0);window.startFadeOut=this.PE.bind(this);window.setFadeOutPosition=this.CE.bind(this);window.endFadeOut=this.ID.bind(this)}d.prototype.dispose=function(){var f;
e.M.h(k.V,this.Ya,this);(f=this.Ut)===null||f===void 0||f.dispose()};d.prototype.setSize=function(f,m,p){p===void 0&&(p=!0);!this.renderer.Fn&&this.jj()?(this.x9=f,this.u9=m,this.w9=p):this.eNa(f,m,p)};d.prototype.setRenderTarget=function(f,m,p){m===void 0&&(m=0);p===void 0&&(p=0);this.jj()&&!this.dfb(f)?(this.v9=f,this.s9=m,this.t9=p):this.dNa(f,m,p)};d.prototype.dfb=function(f){return this.Dna||this.renderer.Fn||f.isXRRenderTarget||f.textures&&f.textures.length>0&&f.textures[0].name&&f.textures[0].name.includes("PMREM")?
!0:!1};d.prototype.render=function(f,m){var p;if(f.isScene){if(!this.renderer.Fn){if(this.Ut&&this.Ut.Qf()===f&&f!==this.m7)return;e.Qpa(this.renderer,f,m,this.pra);if(this.jj()||this.renderer.getRenderTarget()===null||(m===null||m===void 0?0:m.isPerspectiveCamera)&&((p=this.renderer.getRenderTarget())===null||p===void 0?0:p.ZKa))this.m7=f,this.eLa=m,this.Ut&&this.Ut.update(f,m)}if(this.$bb(f,m))return}this.Dna=!0;try{this.cNa(f,m)}catch(q){c.bx&&console.error("render error:",q)}this.Dna=!1};d.prototype.clear=
function(f,m,p){this.kgb(f,m,p)};d.prototype.Ya=function(){this.jj()||(this.x9!==void 0&&this.u9!==void 0&&this.w9!==void 0&&(this.eNa(this.x9,this.u9,this.w9),this.w9=this.u9=this.x9=void 0),this.v9!==void 0&&this.s9!==void 0&&this.t9!==void 0&&(this.dNa(this.v9,this.s9,this.t9),this.t9=this.s9=this.v9=void 0))};d.prototype.jj=function(){return e.isPresenting&&e.zg===this.renderer};d.prototype.PE=function(){this.Iw.KD=0;this.CY()};d.prototype.CE=function(f){this.Iw.KD=f};d.prototype.ID=function(){this.Iw.KD=
void 0;this.CY()};d.prototype.cK=function(){this.Iw.tO=0;this.CY()};d.prototype.RJ=function(f){this.Iw.tO=f;this.CY()};d.prototype.WI=function(){this.Iw.tO=void 0;this.CY()};d.prototype.$bb=function(f,m){if(!e.isPresenting||this.WV===0)return!1;if(this.WV===void 0){if(b.Dc()!=b.mu&&b.Dc()!=b.jB)return this.WV=0,!1;this.WV=20}this.WV--;var p=m.near,q=m.far;m.near=Math.min(p,.1);m.far=Math.max(q,1E3);this.cNa(f,m);m.near=p;m.far=q;return!0};d.prototype.CY=function(){var f=this.m7&&(e.isPresenting&&
this.Iw.tO!==void 0||this.Iw.KD!==void 0);f!==!!this.Ut&&(f?this.jj()?this.Ut=new h(this.Iw,this.renderer,this.m7,this.eLa):this.Ut=new g(this.Iw,this.renderer,this.m7,this.eLa):this.Ut&&(this.Ut.dispose(),this.Ut=null))};return d}()});
define("tdv/player/view/common/RenderersContainer","require exports tdv/constants/EventName tdv/player/view/panorama/renderer/3d/util/Util tdv/player/view/util/Flags tdv/player/view/util/XR tdv/player/view/common/WebGLRendererAugmenter three.mod tdv/view/util/Fullscreen".split(" "),function(a,l,k,n,g,h,e,b,c){return function(){function d(f){this.pV=!0;this.dr=this.renderer=null;this.epa=void 0;this.Hk=0;this.pV=f;this.container=document.createElement("div")}d.prototype.dispose=function(){this.xa()};
d.prototype.a5=function(){this.Hk++};d.prototype.Zdb=function(){return this.Hk>0};d.prototype.A8=function(){this.Hk--;this.Hk===0&&this.xa()};d.prototype.bc=function(){return this.container};d.prototype.sKa=function(){return!!this.renderer};d.prototype.Jn=function(){this.CPa();return this.renderer};d.prototype.qcb=function(){this.djb();return this.GD};d.prototype.rcb=function(){this.ejb();return this.ot};d.prototype.Djb=function(){this.c9(d.Msa)};d.prototype.Cjb=function(){this.c9(d.FTa)};d.prototype.Ijb=
function(){this.c9(d.GTa)};d.prototype.Fjb=function(){this.c9(d.Nsa)};d.prototype.PE=function(){var f;(f=this.dr)===null||f===void 0||f.PE()};d.prototype.CE=function(f){var m;(m=this.dr)===null||m===void 0||m.CE(f)};d.prototype.ID=function(){var f;(f=this.dr)===null||f===void 0||f.ID()};d.prototype.cK=function(){this.CPa();this.dr.cK()};d.prototype.RJ=function(f){this.dr.RJ(f)};d.prototype.WI=function(){this.dr.WI()};d.prototype.djb=function(){this.GD||(this.GD=new b.CSS3DRenderer,this.GD.domElement.style.position=
"absolute",this.GD.domElement.style.zIndex="0",this.container.prepend(this.GD.domElement))};d.prototype.CPa=function(){if(!this.renderer){var f={alpha:!0};g.DSa&&(f.precision="lowp");d.Fla.length>0?(f.context=d.Fla.pop(),f.canvas=f.context.canvas):(f.canvas=document.createElement("canvas"),f.context=n.sbb(f.canvas));this.renderer=new b.WebGLRenderer(f);this.dr=new e(this.renderer);this.renderer.setAnimationLoop(null);this.renderer.setPixelRatio(n.getPixelRatio());this.renderer.debug.checkShaderErrors=
g.bx;this.renderer.domElement.style.position="absolute";this.renderer.domElement.style.zIndex="1";this.renderer.domElement.style.pointerEvents="none";this.renderer.outputColorSpace=b.SRGBColorSpace;this.renderer.shadowMap.type=b.PCFShadowMap;this.ot?this.container.insertBefore(this.renderer.domElement,this.ot.domElement):this.container.appendChild(this.renderer.domElement);this.nRa();h.v$a(this.renderer);c.M.bind(k.V,this.nMa,this,!0)}};d.prototype.nMa=function(){setTimeout(function(){this.renderer&&
this.renderer.setPixelRatio(n.TIa(this.renderer.domElement))}.bind(this),100)};d.prototype.c9=function(f){this.epa!==f&&(this.epa=f,this.nRa())};d.prototype.nRa=function(){if(this.renderer)switch(this.epa){case d.Msa:this.renderer.autoClear=!0;this.renderer.setClearColor(0,1);this.renderer.shadowMap.enabled=!1;this.renderer.localClippingEnabled=!1;this.dr.pra=h.mQ.yaa;break;case d.Nsa:this.renderer.setClearColor(0,0);this.renderer.autoClear=!1;this.renderer.shadowMap.enabled=!0;this.renderer.localClippingEnabled=
!0;this.dr.pra=h.mQ.paa;break;default:this.renderer.setClearColor(0,0),this.renderer.autoClear=!1,this.renderer.shadowMap.enabled=!0,this.renderer.localClippingEnabled=!1,this.dr.pra=h.mQ.paa}};d.prototype.ejb=function(){this.ot||(this.ot=new b.CSS3DRenderer,this.ot.domElement.style.position="absolute",this.ot.domElement.style.zIndex="2",this.ot.domElement.style.pointerEvents="none",this.container.appendChild(this.ot.domElement))};d.prototype.xa=function(){var f;this.ot&&(this.container.removeChild(this.ot.domElement),
this.ot=null);this.renderer&&(c.M.h(k.V,this.nMa,this),h.$gb(this.renderer),this.container.removeChild(this.renderer.domElement),d.Fla.push(this.renderer.getContext()),this.renderer.dispose(),this.renderer=null,(f=this.dr)===null||f===void 0||f.dispose(),this.dr=null);this.GD&&(this.container.removeChild(this.GD.domElement),this.GD=null)};d.Msa=0;d.FTa=1;d.GTa=2;d.Nsa=3;d.Fla=[];return d}()});
define("tdv/player/view/ScreenJoystick",["require","exports","tdv/constants/EventName","tdv/events/EventDispatcher","tdv/player/view/util/Device"],function(a,l,k,n,g){return function(h){function e(b,c){var d=h.call(this)||this;d.enabled=!1;d.z7=0;d.A7=0;d.Eoa=null;d.Tj=null;d.Dm=null;d.GP=null;d.Hk=0;d.cb=b;d.Eoa=c;return d}O(e,h);e.prototype.dispose=function(){this.Ua(!1);this.Eoa=this.cb=null};e.prototype.a5=function(){this.Hk++;this.Hk>=1&&this.Ua(!0)};e.prototype.A8=function(){this.Hk--;this.Hk<=
0&&this.Ua(!1)};e.prototype.Ua=function(b){this.enabled!=b&&((this.enabled=b)?(this.cb.Xpa("Button"),this.z$a()):(this.cb.lhb(),this.Dla(),this.stop(),this.dhb()))};e.prototype.getX=function(){return this.z7};e.prototype.getY=function(){return this.A7};e.prototype.Xh=function(b){this.hf(b);this.enabled&&(this.eoa=this.coa=b.x,this.foa=this.doa=b.y,this.Rib())};e.prototype.Wj=function(b){this.eoa=b.x;this.foa=b.y;this.GP?this.gkb():this.Tj&&this.mK()};e.prototype.hf=function(){this.Dla();this.stop()};
e.prototype.oMa=function(){this.hf()};e.prototype.rl=function(){this.vmin=Math.min(this.cb.gb(),this.cb.Kb())/100};e.prototype.start=function(){this.Vz();this.m(k.Np);this.mK()};e.prototype.stop=function(){this.Tj&&(this.Gbb(),this.m(k.Dg))};e.prototype.gkb=function(){var b=this.eoa-this.coa,c=this.foa-this.doa;Math.sqrt(b*b+c*c)>this.vmin*e.hSa&&this.Dla()};e.prototype.Rib=function(){this.GP=window.setTimeout(this.Hjb.bind(this),e.iSa)};e.prototype.Dla=function(){this.GP&&(clearTimeout(this.GP),
this.GP=null)};e.prototype.Vz=function(){this.Tj=document.createElement("div");this.Tj.setAttribute("tdvclass","Button");this.Tj.style.position="absolute";this.Tj.style.width=this.Tj.style.height=Math.round(e.ura*2*this.vmin)+"px";this.Tj.style.borderRadius="50%";this.Tj.style.backgroundColor="rgba(255, 255, 255, 0.5)";this.Tj.style.transform="translate(-50%, -50%)";this.Tj.style.zIndex="1000";this.Tj.style.left=this.coa+"px";this.Tj.style.top=this.doa+"px";this.Eoa.va().vk(this.Tj);this.Dm=document.createElement("div");
this.Dm.setAttribute("tdvclass","Button");this.Dm.style.position="absolute";this.Dm.style.width=this.Dm.style.height=Math.round(e.BTa*2*this.vmin)+"px";this.Dm.style.borderRadius="50%";this.Dm.style.backgroundColor="rgba(255, 255, 255, 0.5)";this.Dm.style.transform="translate(-50%, -50%)";this.Dm.style.zIndex="1000";this.Tj.appendChild(this.Dm)};e.prototype.mK=function(){var b=this.eoa-this.coa,c=this.foa-this.doa;if(b==0&&c==0)this.A7=this.z7=0;else{var d=Math.atan2(-c,b);b=Math.min(Math.sqrt(b*
b+c*c)/(this.vmin*e.ura),e.YSa);this.z7=Math.cos(d)*b;this.A7=Math.sin(d)*b}this.Dm.style.left=(50+this.z7*50).toFixed(2)+"%";this.Dm.style.top=(50-this.A7*50).toFixed(2)+"%";this.m(k.V)};e.prototype.Gbb=function(){var b,c;(b=this.Dm.parentNode)===null||b===void 0||b.removeChild(this.Dm);this.Dm=null;(c=this.Tj.parentNode)===null||c===void 0||c.removeChild(this.Tj);this.Tj=null};e.prototype.Hjb=function(){this.GP=null;this.start()};e.prototype.z$a=function(){this.cb.bind(k.Ra,this.Xh,this,!0);this.cb.bind(k.fb,
this.Wj,this,!0);this.cb.bind(k.ab,this.hf,this,!0);this.cb.bind(k.Zb,this.rl,this,!0);this.cb.bind(k.sB,this.oMa,this,!0);this.rl()};e.prototype.dhb=function(){this.cb.h(k.Ra,this.Xh,this);this.cb.h(k.fb,this.Wj,this);this.cb.h(k.ab,this.hf,this);this.cb.h(k.Zb,this.rl,this);this.cb.h(k.sB,this.oMa,this)};e.hSa=g.ub()?5:.5;e.iSa=g.ub()?300:600;e.ura=g.ub()?10:6.6;e.BTa=g.ub()?5:3.3;e.YSa=6;return e}(n)});
define("tdv/player/view/Subtitles","require tdv/utils tdv/constants/EventName tdv/view/constants/Alignment tdv/view/util/Animation tdv/view/util/Font".split(" "),function(a){function l(f){this.rqa=f;this.element=document.createElement("div");this.Dqa=document.createElement("span");this.element.appendChild(this.Dqa);this.Dqa.innerHTML=f.text.split("<br>").join("\n").split("\n").map(n).join("<br>");this.A5=!1}function k(f){this.R=f;this.WU=g.Fqa(this.WU.bind(this),100);this.XU=g.Fqa(this.XU.bind(this),
100);this.oa=document.createElement("div");this.oa.style.position="absolute";this.oa.style.left=0;this.oa.style.top=0;this.oa.style.right=0;this.oa.style.bottom=0;this.oa.style.zIndex=1;this.oa.style.cursor="inherit";this.oa.style.display="none";this.pn=document.createElement("div");this.pn.style.position="absolute";this.pn.style.left=0;this.pn.style.right=0;this.pn.style.zIndex=1;this.pn.style.cursor="inherit";this.oa.appendChild(this.pn);this.qU=[];this.zU=[];this.Zi=[];this.kha={};this.HN=e.Fc;
this.R.bind(h.N("subtitlesEnabled"),this.Ez,this);k.Dsa.forEach(function(m){this.R.bind(h.N(m),this.WU,this)}.bind(this));k.Esa.forEach(function(m){this.R.bind(h.N(m),this.XU,this)}.bind(this));this.Ez();this.WU();this.XU()}function n(f){d.innerHTML=f;return d.innerText}var g=a("tdv/utils"),h=a("tdv/constants/EventName"),e=a("tdv/view/constants/Alignment"),b=a("tdv/view/util/Animation"),c=a("tdv/view/util/Font");k.prototype.clear=function(){this.xnb(null);this.R&&(this.R.h(h.N("subtitlesEnabled"),
this.Ez,this),k.Dsa.forEach(function(f){this.R.h(h.N(f),this.WU,this)}.bind(this)),k.Esa.forEach(function(f){this.R.h(h.N(f),this.XU,this)}.bind(this)),this.R=null)};k.prototype.bc=function(){return this.oa};k.prototype.gla=function(f){this.qU.indexOf(f)<0&&(this.qU.push(f),f.bind(h.N("activeSubtitles"),this.C1,this,!0),this.C1())};k.prototype.dpa=function(f){var m=this.qU.indexOf(f);m>=0&&(this.qU.splice(m,1),f.h(h.N("activeSubtitles"),this.C1,this,!0),this.C1())};k.prototype.C1=function(){var f=
[];this.qU.forEach(function(m){f=f.concat(m.get("activeSubtitles")||[])});this.F6a(f)};k.prototype.Ez=function(){this.ha=this.R.get("subtitlesEnabled");this.wka()};k.prototype.WU=function(){this.HN=this.tR("subtitlesVerticalAlign",[e.Tc,e.Xd,e.Fc],e.Fc);this.pn.style["text-align"]=this.tR("subtitlesHorizontalAlign",[e.eb,e.Db,e.Ye],e.Ye);this.pn.style.bottom=this.HN==e.Fc?this.Kl("subtitlesBottom",0):"";this.pn.style.top=this.HN==e.Tc?this.Kl("subtitlesTop",0):this.HN==e.Xd?"50%":"";this.pn.style.transform=
this.HN==e.Xd?"translate(0, -50%)":"";this.wka()};k.prototype.XU=function(){var f={};f["background-color"]=this.xea("subtitlesBackgroundColor","subtitlesBackgroundOpacity");f.border=[this.Kl("subtitlesBorderSize"),"solid",this.zj("subtitlesBorderColor")].join(" ");f["box-shadow"]=this.zj("subtitlesShadow",!1)?[this.Kl("subtitlesShadowHorizontalLength"),this.Kl("subtitlesShadowVerticalLength"),this.Kl("subtitlesShadowBlurRadius"),this.xea("subtitlesShadowColor","subtitlesShadowOpacity","#000000",0)].join(" "):
"";f.display="inline-block";f["font-family"]=c.cA(this.zj("subtitlesFontFamily"));f["font-size"]=this.Kl("subtitlesFontSize");f.color=this.zj("subtitlesFontColor");f["font-weight"]=this.tR("subtitlesFontWeight","bold bolder lighter 100 200 300 400 500 600 700 800 900 normal".split(" "),"normal");f["font-style"]=this.tR("subtitlesFontStyle",["italic","normal"],"normal");f["margin-bottom"]=this.Kl("subtitlesGap");f.opacity=this.zj("subtitlesOpacity");f["padding-top"]=this.Kl("subtitlesPaddingTop");
f["padding-bottom"]=this.Kl("subtitlesPaddingBottom");f["padding-left"]=this.Kl("subtitlesPaddingLeft");f["padding-right"]=this.Kl("subtitlesPaddingRight");f.position="relative";f["text-align"]=this.tR("subtitlesHorizontalAlign",["left","right","center"],"center");f["text-decoration"]=this.zj("subtitlesTextDecoration",["underline","overline","line-through","none"],"none");f["text-shadow"]=[this.Kl("subtitlesTextShadowHorizontalLength"),this.Kl("subtitlesTextShadowVerticalLength"),this.Kl("subtitlesTextShadowBlurRadius"),
this.xea("subtitlesTextShadowColor","subtitlesTextShadowOpacity","#000000",0)].join(" ");this.kha=f;this.MVa()};k.prototype.F6a=function(f){this.zU=f;this.wka()};k.prototype.wka=function(){for(var f=this.ha?this.zU:[],m=this.Zi.length-1;m>=0;m--){var p=this.Zi[m];if(f.indexOf(p.rqa)>=0)break;this.pn.removeChild(p.element)}for(var q=[],r=!1;m>=0;m--)p=this.Zi[m],!p.A5&&f.indexOf(p.rqa)<0&&(p.A5=!0,p.element.style.visibility="hidden",r=!0),q.splice(0,0,p);r&&b.requestFrame(this.gva,this);this.Zi=q;
var t=this.Zi.filter(function(u){return!u.A5}).map(function(u){return u.rqa});f.filter(function(u){return t.indexOf(u)<0}).forEach(function(u){u=new l(u);this.hua(u);this.HN==e.Fc&&this.Zi.length>0?this.pn.insertBefore(u.element,this.Zi[this.Zi.length-1].element):this.pn.appendChild(u.element);this.Zi.push(u)}.bind(this));this.oa.style.display=this.Zi.length>0?"block":"none"};k.prototype.gva=function(f){var m=!1;f=Math.round(200*f/1E3);for(var p=0;p<this.Zi.length;p++){var q=this.Zi[p];if(q.A5)if(m=
!0,f>=q.element.clientHeight)f-=q.element.clientHeight,this.pn.removeChild(q.element),this.Zi.splice(p,1),p--;else{q.element.style.height=q.element.clientHeight-f+"px";break}}m&&b.requestFrame(this.gva,this)};k.prototype.MVa=function(){this.Zi.forEach(this.hua.bind(this))};k.prototype.hua=function(f){for(var m in this.kha)f.Dqa.style[m]=this.kha[m]};k.prototype.zj=function(f,m){return this.R.get(f,m)};k.prototype.Kl=function(f,m){f=this.R.get(f,m);isNaN(f)||(f=Math.round(f)+"px");return f};k.prototype.tR=
function(f,m,p){f=this.R.get(f);return m.indexOf(f)<0?p:f};k.prototype.xea=function(f,m,p,q){f=this.R.get(f,p);m=this.R.get(m,q);return"rgba("+parseInt("0x"+f.substr(1,2))+", "+parseInt("0x"+f.substr(3,2))+", "+parseInt("0x"+f.substr(5,2))+", "+m+")"};k.Dsa=["subtitlesHorizontalAlign","subtitlesVerticalAlign","subtitlesTop","subtitlesBottom"];k.Esa="subtitlesBackgroundColor subtitlesBackgroundOpacity subtitlesBorderColor subtitlesBorderSize subtitlesFontFamily subtitlesFontColor subtitlesFontSize subtitlesFontStyle subtitlesFontWeight subtitlesGap subtitlesOpacity subtitlesPaddingTop subtitlesPaddingBottom subtitlesPaddingLeft subtitlesPaddingRight subtitlesShadow subtitlesShadowBlurRadius subtitlesShadowHorizontalLength subtitlesShadowVerticalLength subtitlesShadowColor subtitlesTextDecoration subtitlesTextShadowBlurRadius subtitlesTextShadowColor subtitlesTextShadowHorizontalLength subtitlesTextShadowOpacity subtitlesTextShadowVerticalLength".split(" ");
var d=document.createElement("div");return k});
define("tdv/player/view/SubtitlesListener","require exports tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/PlaybackState tdv/player/parser/ClassInfo".split(" "),function(a,l,k,n,g,h){a=function(){function m(p){this.FP=new Map;this.Fm=p}m.prototype.add=function(p){h.Qa("PanoramaPlayer",p)?this.FP.set(p,new e(this.Fm,p)):h.Qa("VideoPlayer",p)?this.FP.set(p,new b(this.Fm,p)):h.Qa("PhotoAlbumPlayer",p)?this.FP.set(p,new c(this.Fm,p)):h.Qa("Audio",p)&&this.FP.set(p,new f(this.Fm,p))};
m.prototype.remove=function(p){var q=this.FP.get(p);q&&(q.clear(),this.FP.delete(p))};return m}();l=function(){function m(p,q){this.Fm=p;this.source=q}m.prototype.clear=function(){};return m}();var e=function(m){function p(q,r){q=m.call(this,q,r)||this;q.II=new d(q.Fm);q.eg=null;q.source.bind(n.N("panorama"),q.xoa,q,!0);q.xoa();return q}O(p,m);p.prototype.clear=function(){this.source&&(this.source.h(n.N("panorama"),this.xoa,this),this.source=null,this.Sf(null),this.II.clear(),this.II=null)};p.prototype.xoa=
function(){this.Sf(this.source.get("panorama"))};p.prototype.Sf=function(q){if(this.eg!=q){this.eg&&(this.eg.h(n.N("audios"),this.wJ,this),this.Fm.dpa(this.eg));if(this.eg=q)this.Fm.gla(this.eg),this.eg.bind(n.N("audios"),this.wJ,this,!0);this.wJ()}};p.prototype.wJ=function(){this.II.wpa(this.eg&&this.eg.get("audios")||[])};return p}(l),b=function(m){function p(q,r){q=m.call(this,q,r)||this;q.video=null;q.source.bind(n.N("video"),q.BJ,q,!0);q.source.bind(n.$e,q.BJ,q,!0);q.BJ();return q}O(p,m);p.prototype.clear=
function(){this.source&&(this.source.h(n.N("video"),this.BJ,this),this.source.h(n.$e,this.BJ,this),this.source=null,this.i9(null))};p.prototype.BJ=function(){var q;this.i9(((q=this.source)===null||q===void 0?void 0:q.get("state"))!=g.ca?this.source.get("video"):null)};p.prototype.i9=function(q){this.video!=q&&(this.video&&this.Fm.dpa(this.video),(this.video=q)&&this.Fm.gla(this.video))};return p}(l),c=function(m){function p(q,r){q=m.call(this,q,r)||this;q.yJ=q.yJ.bind(q);q.II=new d(q.Fm);q.sc=null;
k.ba(q.source,"photoAlbum.playList.items",q.yJ,!1);k.ba(q.source,"photoAlbum.playList.selectedIndex",q.yJ,!1);q.yJ();return q}O(p,m);p.prototype.clear=function(){this.source&&(k.da(this.source,"photoAlbum.playList.items",this.yJ),k.da(this.source,"photoAlbum.playList.selectedIndex",this.yJ),this.source=null,this.oPa(null),this.II.clear(),this.II=null)};p.prototype.yJ=function(){var q=this.source.get("photoAlbum");q=(q=q?q.get("playList"):null)&&q.get("selectedIndex")>=0?q.get("items")[q.get("selectedIndex")]:
null;this.oPa(q?q.get("media"):null)};p.prototype.oPa=function(q){this.sc!=q&&(this.sc&&this.sc.h(n.N("audios"),this.wJ,this),(this.sc=q)&&this.sc.bind(n.N("audios"),this.wJ,this,!0),this.wJ())};p.prototype.wJ=function(){this.II.wpa(this.sc&&this.sc.get("audios")||[])};return p}(l),d=function(){function m(p){this.k5=[];this.j5=new Map;this.Fm=p}m.prototype.clear=function(){this.wpa([])};m.prototype.wpa=function(p){this.k5!=p&&(this.k5.forEach(function(q){p.indexOf(q)>=0||(this.j5.get(q).clear(),this.j5.delete(q))}.bind(this)),
this.k5=p,this.k5.forEach(function(q){this.j5.has(q)||this.j5.set(q,new f(this.Fm,q))}.bind(this)))};return m}(),f=function(m){function p(q,r){q=m.call(this,q,r)||this;q.vE=!1;q.source.bind(n.N("state"),q.noa,q,!0);q.noa();return q}O(p,m);p.prototype.clear=function(){this.source&&(this.HOa(!1),this.source.h(n.N("state"),this.noa,this),this.source=null)};p.prototype.noa=function(){this.HOa(this.source.get("state")!=g.ca)};p.prototype.HOa=function(q){this.vE!=q&&(this.vE&&this.Fm.dpa(this.source),(this.vE=
q)&&this.Fm.gla(this.source))};return p}(l);return a});
define("tdv/player/script/ViewerArea","require three.mod tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/PlaybackState tdv/events/Event tdv/player/parser/ClassInfo tdv/player/script/helper/ButtonProperty tdv/player/view/PlaybackBar tdv/player/view/ProgressBar tdv/player/view/common/RenderersContainer tdv/player/view/ScreenJoystick tdv/player/view/Subtitles tdv/player/view/SubtitlesListener tdv/player/view/util/Device tdv/player/view/util/XR tdv/view/constants/ButtonMode tdv/view/constants/Cursor tdv/view/constants/CreationPolicy tdv/view/constants/State tdv/view/containers/Container tdv/view/core/UIComponent".split(" "),function(a){function l(){function I(){v.IA==
Q&&v.Cw==R?P.Jn().render(Q,R):v.M.h(h.me,I,this)}v.G8=new b(h.pmb);var N=F=new v.lta,P=G=new p,Q=new k.Scene,R=new k.PerspectiveCamera;v.Qpa(P.Jn(),Q,R,v.mQ.yaa);v.rt(P.Jn(),v.po.Sr,N);v.M.bind(h.me,I,this,!0);v.G8=null}var k=a("three.mod"),n=a("tdv/utils"),g=a("tdv/binding/BindingsHandler"),h=a("tdv/constants/EventName"),e=a("tdv/constants/PlaybackState"),b=a("tdv/events/Event"),c=a("tdv/player/parser/ClassInfo"),d=a("tdv/player/script/helper/ButtonProperty"),f=a("tdv/player/view/PlaybackBar"),m=
a("tdv/player/view/ProgressBar"),p=a("tdv/player/view/common/RenderersContainer"),q=a("tdv/player/view/ScreenJoystick"),r=a("tdv/player/view/Subtitles"),t=a("tdv/player/view/SubtitlesListener"),u=a("tdv/player/view/util/Device"),v=a("tdv/player/view/util/XR"),w=a("tdv/view/constants/ButtonMode"),y=a("tdv/view/constants/Cursor"),x=a("tdv/view/constants/CreationPolicy"),z=a("tdv/view/constants/State"),A=a("tdv/view/containers/Container"),D=a("tdv/view/core/UIComponent"),E=180/Math.PI,B=new k.Euler,
C=c.define("ViewerArea",A,function(){A.call(this);this.set("childrenInteractionEnabled",!0);this.set("contentOpaque",!0);this.set("creationPolicy",x.GK);this.set("subtitlesEnabled",!0);this.set("checkToolTipOcclusion",!0);this.set("isKeyboardTarget",!1);this.Ev=this.aS=this.ns=this.Kj=this.dD=this.Tu=this.te=this.R_=this.bj=null;this.zU=new r(this);this.e4=new t(this.zU);this.yha=this.lv=!1;this.Hj=e.ca;this.vo=this.Dl=null;this.Oo=!1;this.ST=[];this.bind(C.Gsa,this.a3a,this,!0);this.bind(C.Fsa,this.$2a,
this,!0);this.bind(h.Ra,this.GAa,this);this.bind(h.Ra,this.GAa,this);this.bind(h.tc,this.w3a,this);this.bind(h.Eb,this.v3a,this);this.bind(h.od,this.m2,this,!0);this.bind(h.jd,this.t3a,this,!0);this.gL=new d(this,"buttonPause",w.Vk);this.gL.bind(h.la,this.EH,this);this.gL.set("state",z.lf);this.hL=new d(this,"buttonPlay",w.Vk);this.hL.bind(h.la,this.FH,this);this.hL.set("state",z.lf);this.jG=new d(this,"buttonPlayPause",w.Vk);this.jG.bind(h.la,this.X2a,this);this.jG.set("state",z.lf);this.jL=new d(this,
"buttonStop",w.Vk);this.jL.bind(h.la,this.QC,this);this.jL.set("state",z.Nb);this.CWa=new d(this,"buttonRestart",w.Ze);this.CWa.bind(h.la,this.PC,this);this.WZ=new d(this,"buttonToggleSubtitles",w.Vk);this.WZ.bind(h.Sk,function(){this.set("subtitlesEnabled",!0)},this,!0);this.WZ.bind(h.Nm,function(){this.set("subtitlesEnabled",!1)},this,!0);this.bind(h.N("subtitlesEnabled"),function(){this.WZ.set("pressed",this.get("subtitlesEnabled"))},this);this.WZ.set("pressed",this.get("subtitlesEnabled"));(new d(this,
"buttonVRView",w.Ze)).bind(h.la,function(){this.set("viewMode","vr")},this,!0);(new d(this,"buttonARView",w.Ze)).bind(h.la,function(){this.set("viewMode","ar")},this,!0);this.f1a=n.ar(this.F9a,this);this.bind(h.di,this.s3a,this,!0);this.bind(C.uZ,this.u3a,this,!0);v.M.bind(h.V,function(){this.set("viewMode",this.Pwa())},this,!0)});C.prototype.play=function(){this.FH()};C.prototype.pause=function(){this.EH()};C.prototype.stop=function(){this.QC()};C.prototype.restart=function(){this.PC()};C.bd=Object.assign({},
A.bd,{progressBackgroundColor:void 0,progressBackgroundColorDirection:void 0,progressBackgroundColorRatios:void 0,progressBackgroundOpacity:void 0,progressBarBackgroundColor:void 0,progressBarBackgroundColorDirection:void 0,progressBarBackgroundColorRatios:void 0,progressBarBorderColor:void 0,progressBarBorderRadius:void 0,progressBarBorderSize:void 0,progressBarOpacity:void 0,progressBorderColor:void 0,progressBorderRadius:void 0,progressBorderSize:void 0,progressBottom:0,progressHeight:20,progressLeft:0,
progressOpacity:void 0,progressPercent:0,progressRight:0,progressVisible:!1,externalPlaybackBar:void 0,externalProgressBar:void 0,playbackBarBackgroundColor:void 0,playbackBarBackgroundColorDirection:void 0,playbackBarBackgroundOpacity:void 0,playbackBarBorderColor:void 0,playbackBarBorderRadius:void 0,playbackBarBorderSize:void 0,playbackBarBottom:10,playbackBarHeight:void 0,playbackBarWidth:void 0,playbackBarLeft:void 0,playbackBarOpacity:void 0,playbackBarRight:void 0,playbackBarLiveDragging:void 0,
playbackBarDuration:100,playbackBarPosition:0,playbackBarRollOverDisplay:!1,plabackBarSteps:void 0,plabackBarSelectedStep:void 0,playbackBarVisible:!1,playbackBarProgressBackgroundColor:void 0,playbackBarProgressBackgroundColorDirection:void 0,playbackBarProgressBackgroundColorRatios:void 0,playbackBarProgressBorderColor:void 0,playbackBarProgressBorderRadius:void 0,playbackBarProgressBorderSize:void 0,playbackBarProgressOpacity:void 0,playbackBarHeadBackgroundColor:void 0,playbackBarHeadBackgroundColorDirection:void 0,
playbackBarHeadBackgroundColorRatios:void 0,playbackBarHeadBorderColor:void 0,playbackBarHeadBorderRadius:void 0,playbackBarHeadBorderSize:void 0,playbackBarHeadOpacity:void 0,playbackBarHeadWidth:void 0,playbackBarHeadHeight:void 0,playbackBarHeadShadow:void 0,playbackBarHeadShadowBlurRadius:void 0,playbackBarHeadShadowColor:void 0,playbackBarHeadShadowHorizontalLength:void 0,playbackBarHeadShadowOpacity:void 0,playbackBarHeadShadowSpread:void 0,playbackBarHeadShadowVerticalLength:void 0,playbackBarStepBackgroundColor:void 0,
playbackBarStepBackgroundColorDirection:void 0,playbackBarStepBackgroundColorRatios:void 0,playbackBarStepBorderColor:void 0,playbackBarStepBorderRadius:void 0,playbackBarStepBorderSize:void 0,playbackBarStepOpacity:void 0,playbackBarStepWidth:void 0,playbackBarStepHeight:void 0,playbackBarStepShadow:void 0,playbackBarStepShadowBlurRadius:void 0,playbackBarStepShadowColor:void 0,playbackBarStepShadowHorizontalLength:void 0,playbackBarStepShadowOpacity:void 0,playbackBarStepShadowSpread:void 0,playbackBarStepShadowVerticalLength:void 0,
playbackBarStepSelectedBackgroundColor:void 0,playbackBarStepSelectedBackgroundColorDirection:void 0,playbackBarStepSelectedBackgroundColorRatios:void 0,playbackBarStepSelectedBorderColor:void 0,playbackBarStepSelectedBorderRadius:void 0,playbackBarStepSelectedBorderSize:void 0,playbackBarStepSelectedOpacity:void 0,playbackBarStepSelectedWidth:void 0,playbackBarStepSelectedHeight:void 0,playbackBarStepSelectedShadow:void 0,playbackBarStepSelectedShadowBlurRadius:void 0,playbackBarStepSelectedShadowColor:void 0,
playbackBarStepSelectedShadowHorizontalLength:void 0,playbackBarStepSelectedShadowOpacity:void 0,playbackBarStepSelectedShadowSpread:void 0,playbackBarStepSelectedShadowVerticalLength:void 0,subtitlesBackgroundColor:"#000000",subtitlesBackgroundOpacity:1,subtitlesBorderColor:void 0,subtitlesBorderSize:0,subtitlesBottom:"10%",subtitlesFontFamily:void 0,subtitlesFontColor:"#ffffff",subtitlesFontSize:"12px",subtitlesFontStyle:void 0,subtitlesFontWeight:void 0,subtitlesGap:10,subtitlesHorizontalAlign:"center",
subtitlesOpacity:1,subtitlesPaddingTop:5,subtitlesPaddingBottom:5,subtitlesPaddingLeft:5,subtitlesPaddingRight:5,subtitlesShadow:!1,subtitlesShadowBlurRadius:void 0,subtitlesShadowHorizontalLength:0,subtitlesShadowVerticalLength:0,subtitlesShadowColor:"#000000",subtitlesShadowOpacity:0,subtitlesTextDecoration:void 0,subtitlesTextShadowBlurRadius:void 0,subtitlesTextShadowColor:"#000000",subtitlesTextShadowHorizontalLength:0,subtitlesTextShadowOpacity:0,subtitlesTextShadowVerticalLength:0,subtitlesTop:void 0,
subtitlesVerticalAlign:"bottom",transitionDuration:500,blendingTransitionDuration:void 0,disolveTransitionDuration:void 0,translationTransitionDuration:void 0,translationTransitionEnabled:!0,toolTipEnabled:!0});C.prototype.get=function(I,N){switch(I){case "viewMode":return v.isPresenting&&this.Kc().sKa()&&v.zg==this.Kc().Jn()?"vr":"standard";case "xrYaw":return v.isPresenting?-B.setFromQuaternion(v.xl,"YXZ").y*E:0;case "xrPitch":return v.isPresenting?B.setFromQuaternion(v.xl,"YXZ").x*E:0;case "xrRoll":return v.isPresenting?
-B.setFromQuaternion(v.xl,"YXZ").z*E:0}return A.prototype.get.call(this,I,N)};C.prototype.set=function(I,N){I=="playbackState"&&(N=this.Hj,this.get(I)!=N&&(this.yha=!0,this.f1a()));switch(I){case "toolTipEnabled":this.set("toolTipDisabled",N===!1);break;case "cardboardPointerDistance":this.set("vrPointerDistance",N);break;case "cardboardPointerColor":this.set("vrPointerColor",N);break;case "cardboardPointerSelectionColor":this.set("vrPointerSelectionColor",N);break;case "cardboardPointerSelectionTime":this.set("vrPointerSelectionTime",
N);break;case "playbackBarVisible":case "playbackBarRollOverDisplay":this.YU();break;case "viewMode":var P=A.prototype.get.call(this,I);this.Kc().Zdb()&&(N!="vr"||v.isPresenting?N!="ar"||v.isPresenting?N!="vr"&&N!="ar"&&v.isPresenting&&v.tm():v.rt(this.Kc().Jn(),v.po.tr,this.D6()):v.rt(this.Kc().Jn(),v.po.Sr,this.D6()));N=this.Pwa();P!=N&&this.m(C.faa)}A.prototype.set.call(this,I,N)};C.prototype.Pwa=function(){if(v.isPresenting&&this.Kc().sKa()&&v.zg==this.Kc().Jn()){if(v.zp==v.po.Sr)return"vr";if(v.zp==
v.po.tr)return"ar"}return"standard"};C.prototype.Ob=function(){this.Gl(C.bd)};C.prototype.Ib=function(){A.prototype.Ib.call(this);this.dD==null&&(this.dD=new D,this.dD.set("width","100%"),this.dD.set("height","100%"),this.dD.set("interactionEnabled",!1),this.dD.set("toolTipDisabled",!0),this.mb(this.dD),this.dD.va().vk(this.Kc().bc()));this.ns==null&&(this.ns=new D,this.ns.set("width","100%"),this.ns.set("height","100%"),this.ns.set("toolTipDisabled",!0),this.ns.set("interactionEnabled",!1),this.mb(this.ns),
n.defer(function(){this.ns.set("cursor",y.wB)}.bind(this)),this.aS=new q(this,this.ns),this.aS.Ua(!1));this.Ev==null&&(this.Ev=new D,this.Ev.set("width","100%"),this.Ev.set("height","100%"),this.Ev.set("toolTipDisabled",!0),this.Ev.set("interactionEnabled",!1),this.mb(this.Ev),this.Ev.va().vk(this.zU.bc()));this.bj==null&&(this.bj=new m,this.mb(this.bj));this.te==null&&(this.te=new f,this.te.bind(h.V,this.vha,this,!0),this.mb(this.te),this.YU())};C.prototype.D6=function(){if(this.TFa)return this.TFa;
if(F){var I=F;F=null}else I=new v.lta;g.ba(this,"vrGazePointerHideTime vrFoveation vrPointerColor vrPointerDistance vrPointerOverColor vrPointerSelectionColor vrPointerSelectionTime".split(" "),function(){I.SIa=this.get("vrGazePointerHideTime");I.NIa=this.get("vrFoveation");I.p8=this.get("vrPointerColor");I.xNa=this.get("vrPointerDistance");I.Loa=this.get("vrPointerOverColor");I.r8=this.get("vrPointerSelectionColor");I.BNa=this.get("vrPointerSelectionTime")}.bind(this),!0);return this.TFa=I};C.prototype.Ocb=
function(){return this.te};C.prototype.Kc=function(){this.Kj||(G?(this.Kj=G,G=null):this.Kj=new p(this.get("aaEnabled")));return this.Kj};C.prototype.Lk=function(){A.prototype.Lk.call(this);for(var I=[],N=this.ST.length-1;N>=0;N--)I.push(this.ST[N].o);this.Ev&&I.push(this.Ev);this.ns&&I.push(this.ns);this.te&&I.push(this.te);this.bj&&I.push(this.bj);var P=this.Cb();I=I.filter(function(Q){return P.indexOf(Q)>=0});P=P.filter(function(Q){return I.indexOf(Q)==-1}).concat(I);P.forEach(function(Q,R){Q&&
this.zma(Q)!=R&&this.gr(Q,R)}.bind(this))};C.prototype.jb=function(){this.S("externalProgressBar")&&((this.R_=this.G("externalProgressBar"))?this.removeChild(this.bj):this.mb(this.bj),this.$("externalProgressBar"),C.Jta.forEach(N=>{this.lD(N)}));this.Qc(C.xUa,C.Bta,[this.bj],!0,!0);var I=[this.bj];this.R_&&I.push(this.R_);this.Qc(C.Jta,C.Kta,I,!0,!0);this.S("externalPlaybackBar")&&(this.Tu&&this.Tu.h(h.V,this.vha,this,!0),(this.Tu=this.G("externalPlaybackBar"))?this.removeChild(this.te):this.mb(this.te),
this.YU(),this.Tu&&this.Tu.bind(h.V,this.vha,this,!0),this.$("externalPlaybackBar"),C.Gta.forEach(N=>{this.lD(N)}));this.Qc(C.wUa,C.Ata,[this.te],!0,!0);I=[this.te];this.Tu&&I.push(this.Tu);this.Qc(C.Gta,C.Hta,I,!0,!0);A.prototype.jb.call(this)};C.prototype.F9a=function(){this.yha&&(this.yha=!1,this.gL.set("state",this.Hj==e.Yb?z.Nb:z.lf),this.hL.set("state",this.Hj==e.PLAYING||this.Hj==e.Yb?z.Nb:z.lf),this.jG.set("state",this.Hj==e.PLAYING?z.Nb:z.lf),this.jL.set("state",this.Hj==e.ca?z.Nb:z.lf))};
C.prototype.Id=function(I){this.Hj=I;this.set("playbackState",I)};C.prototype.m2=function(){C.Zo(this)};C.prototype.t3a=function(){C.Xo(this)};C.prototype.EH=function(){this.Hj==e.Yb?this.Xl():this.Is()};C.prototype.FH=function(){this.Xl()};C.prototype.X2a=function(){this.Hj==e.PLAYING?this.Is():this.Xl()};C.prototype.QC=function(){this.Dq()};C.prototype.PC=function(){this.Dq();this.Xl()};C.prototype.s3a=function(){if(!this.Dl||!this.Dl.Ala())switch(this.get("doubleClickAction")){case "toggle_fullscreen":var I=
this.Vb().mk;I&&I.nl()&&I.toggle()}};C.prototype.u3a=function(I){this.ST.forEach(function(N){this.e4.remove(N)}.bind(this));this.ST=I.data.players;this.ST.forEach(function(N){this.e4.add(N)}.bind(this));this.yf()};C.prototype.Xl=function(){this.vo&&this.vo.play()};C.prototype.Is=function(){this.vo&&this.vo.pause()};C.prototype.Dq=function(){this.vo&&this.vo.stop()};C.prototype.a3a=function(I){this.OCa(I.data.player)};C.prototype.$2a=function(I){this.Dl==I.data.player&&this.OCa(null)};C.prototype.GAa=
function(){C.ir(this)};C.prototype.w3a=function(){this.Oo=!0;this.YU()};C.prototype.v3a=function(){this.Oo=!1;this.YU()};C.prototype.YU=function(){this.te&&this.te.set("visible",this.get("playbackBarVisible")&&(this.Oo||!this.get("playbackBarRollOverDisplay")||u.nr()))};C.prototype.OCa=function(I){this.Dl!=I&&(this.set("playbackBarVisible",!1),this.Dl&&this.Dl.ir(!1),this.vo&&this.vo.h(h.N("state"),this.iba,this),this.b4a=this.Dl,(this.Dl=I)&&this.Dl.ir(!!this.No),(this.vo=this.Dl&&this.Dl.IWa?this.Dl:
null)&&this.vo.bind(h.N("state"),this.iba,this,!0),this.iba())};C.prototype.ir=function(I){this.No=I;this.set("isKeyboardTarget",I);this.Dl&&this.Dl.ir(!!this.No)};C.prototype.Ilb=function(){return!this.b4a};C.prototype.iba=function(){this.vo?this.Id(this.vo.get("state")):this.Id(e.ca)};C.prototype.vha=function(){var I=(this.Tu?this.Tu:this.te).get("position");this.m(new b(C.Z$,{position:I}))};C.Bta={progressBackgroundColor:"backgroundColor",progressBackgroundColorDirection:"backgroundColorDirection",
progressBackgroundColorRatios:"backgroundColorRatios",progressBackgroundOpacity:"backgroundOpacity",progressBarBackgroundColor:"barBackgroundColor",progressBarBackgroundColorDirection:"barBackgroundColorDirection",progressBarBackgroundColorRatios:"barBackgroundColorRatios",progressBarBorderColor:"barBorderColor",progressBarBorderRadius:"barBorderRadius",progressBarBorderSize:"barBorderSize",progressBarOpacity:"barOpacity",progressBorderColor:"borderColor",progressBorderRadius:"borderRadius",progressBorderSize:"borderSize",
progressHeight:"height",progressOpacity:"opacity",progressBottom:"bottom",progressLeft:"left",progressRight:"right"};C.xUa=Object.keys(C.Bta);C.Kta={progressPercent:"percent",progressVisible:"visible"};C.Jta=Object.keys(C.Kta);C.Ata={playbackBarBackgroundColor:"backgroundColor",playbackBarBackgroundColorDirection:"backgroundColorDirection",playbackBarBackgroundOpacity:"backgroundOpacity",playbackBarBorderColor:"borderColor",playbackBarBorderRadius:"borderRadius",playbackBarBorderSize:"borderSize",
playbackBarBottom:"bottom",playbackBarHeight:"height",playbackBarWidth:"width",playbackBarLeft:"left",playbackBarOpacity:"opacity",playbackBarRight:"right",playbackBarLiveDragging:"liveDragging",playbackBarProgressBackgroundColor:"barBackgroundColor",playbackBarProgressBackgroundColorDirection:"barBackgroundColorDirection",playbackBarProgressBackgroundColorRatios:"barBackgroundColorRatios",playbackBarProgressBorderColor:"barBorderColor",playbackBarProgressBorderRadius:"barBorderRadius",playbackBarProgressBorderSize:"barBorderSize",
playbackBarProgressOpacity:"barOpacity",playbackBarHeadBackgroundColor:"playheadBackgroundColor",playbackBarHeadBackgroundColorDirection:"playheadBackgroundColorDirection",playbackBarHeadBackgroundColorRatios:"playheadBackgroundColorRatios",playbackBarHeadBorderColor:"playheadBorderColor",playbackBarHeadBorderRadius:"playheadBorderRadius",playbackBarHeadBorderSize:"playheadBorderSize",playbackBarHeadOpacity:"playheadOpacity",playbackBarHeadWidth:"playheadWidth",playbackBarHeadHeight:"playheadHeight",
playbackBarHeadShadow:"playheadShadow",playbackBarHeadShadowBlurRadius:"playheadShadowBlurRadius",playbackBarHeadShadowColor:"playheadShadowColor",playbackBarHeadShadowHorizontalLength:"playheadShadowHorizontalLength",playbackBarHeadShadowOpacity:"playheadShadowOpacity",playbackBarHeadShadowSpread:"playheadShadowSpread",playbackBarHeadShadowVerticalLength:"playheadShadowVerticalLength",playbackBarStepBackgroundColor:"stepBackgroundColor",playbackBarStepBackgroundColorDirection:"stepBackgroundColorDirection",
playbackBarStepBackgroundColorRatios:"stepBackgroundColorRatios",playbackBarStepBorderColor:"stepBorderColor",playbackBarStepBorderRadius:"stepBorderRadius",playbackBarStepBorderSize:"stepBorderSize",playbackBarStepOpacity:"stepOpacity",playbackBarStepWidth:"stepWidth",playbackBarStepHeight:"stepHeight",playbackBarStepShadow:"stepShadow",playbackBarStepShadowBlurRadius:"stepShadowBlurRadius",playbackBarStepShadowColor:"stepShadowColor",playbackBarStepShadowHorizontalLength:"stepShadowHorizontalLength",
playbackBarStepShadowOpacity:"stepShadowOpacity",playbackBarStepShadowSpread:"stepShadowSpread",playbackBarStepShadowVerticalLength:"stepShadowVerticalLength",playbackBarSelectedStepBackgroundColor:"selectedStepBackgroundColor",playbackBarSelectedStepBackgroundColorDirection:"selectedStepBackgroundColorDirection",playbackBarSelectedStepBackgroundColorRatios:"selectedStepBackgroundColorRatios",playbackBarSelectedStepBorderColor:"selectedStepBorderColor",playbackBarSelectedStepBorderRadius:"selectedStepBorderRadius",
playbackBarSelectedStepBorderSize:"selectedStepBorderSize",playbackBarSelectedStepOpacity:"selectedStepOpacity",playbackBarSelectedStepWidth:"selectedStepWidth",playbackBarSelectedStepHeight:"selectedStepHeight",playbackBarSelectedStepShadow:"selectedStepShadow",playbackBarSelectedStepShadowBlurRadius:"selectedStepShadowBlurRadius",playbackBarSelectedStepShadowColor:"selectedStepShadowColor",playbackBarSelectedStepShadowHorizontalLength:"selectedStepShadowHorizontalLength",playbackBarSelectedStepShadowOpacity:"selectedStepShadowOpacity",
playbackBarSelectedStepShadowSpread:"selectedStepShadowSpread",playbackBarSelectedStepShadowVerticalLength:"selectedStepShadowVerticalLength"};C.wUa=Object.keys(C.Ata);C.Hta={playbackBarDuration:"duration",playbackBarPosition:"position",playbackBarSteps:"steps",playbackBarSelectedStep:"selectedStep",playbackBarVisible:"visible"};C.Gta=Object.keys(C.Hta);C.uZ="requestByPlayer";C.Gsa="playerShow";C.Fsa="playerHide";C.Z$="playbackBarPositionChange";C.faa="viewModeChange";C.mH=null;C.ir=function(I){C.mH!=
I&&(C.mH&&C.mH.ir(!1),C.mH=I,C.mH&&C.mH.ir(!0))};C.AI=[];C.Zo=function(I){var N=C.AI.indexOf(I);N>-1&&C.AI.splice(N,1);C.AI.push(I);this.ir(this.vxa())};C.Xo=function(I){var N=C.AI.indexOf(I);N>-1&&C.AI.splice(N,1);C.mH==I&&C.ir(C.AI.length?this.vxa():null)};C.vxa=function(){var I=C.AI.slice();I.sort(function(N,P){var Q=N.get("actualWidth")*N.get("actualHeight"),R=P.get("actualWidth")*P.get("actualHeight");N=I.indexOf(N)-I.indexOf(P);return Q-R||N});return I[I.length-1]};var F=null,G=null;navigator.xr&&
navigator.xr.addEventListener("sessiongranted",function(){l()});return C});
define("tdv/player/script/MediaPlayer",["require","tdv/utils","tdv/binding/Bindable","tdv/events/Event","tdv/player/script/ViewerArea"],function(a){var l=a("tdv/utils"),k=a("tdv/binding/Bindable"),n=a("tdv/events/Event"),g=a("tdv/player/script/ViewerArea"),h=l.extend(k,function(e){k.call(this);this.IWa=e;this.oU=this.IC=null});h.ai="mediaShow";h.lo="mediaHide";h.prototype.ir=function(){};h.prototype.Ala=function(){return!1};h.prototype.lU=function(e){this.IC!=e&&(this.IC&&this.Uja(this.IC),(this.IC=
e)&&this.Oba(this.IC))};h.prototype.Oba=function(e){e.bind(g.uZ,this.KFa,this,!0);e.bind(g.Z$,this.BT,this)};h.prototype.Uja=function(e){e.h(g.uZ,this.KFa,this);e.h(g.Z$,this.BT,this)};h.prototype.MJ=function(e){this.IC.m(new n(g.uZ,{players:e||[this]}))};h.prototype.KFa=function(e){e.data.players.indexOf(this)<0&&this.rN()};h.prototype.BT=function(){};h.prototype.rN=function(){};h.prototype.qS=function(e){this.m(new n(h.ai,{media:e}));this.oU=this.IC;this.oU.m(new n(g.Gsa,{player:this}))};h.prototype.pS=
function(e){this.m(new n(h.lo,{media:e}));this.oU&&(this.oU.m(new n(g.Fsa,{player:this})),this.oU=null)};return h});define("tdv/player/view/map/constants/MovementMode",["require"],function(){return{eF:"constrained",ISa:"free_drag",$lb:"free_drag_and_rotation",Gaa:"sync_with_field_of_view"}});
define("tdv/player/view/map/control/camera/LimitsManager",["require","tdv/utils","tdv/player/view/map/constants/MovementMode","tdv/view/constants/ScaleMode"],function(a){function l(){this.Pd=!0;this.ec=this.dc=.5;this.Cd=0;this.jc=1;this.ri=n.oj;this.Vo=k.eF;this.cga=this.fga=1;this.rf=this.sf=this.wo=this.xo=100;this.ip=l.TF}a("tdv/utils");var k=a("tdv/player/view/map/constants/MovementMode"),n=a("tdv/view/constants/ScaleMode");l.prototype.mKa=function(){return this.ip!==l.TF};l.prototype.lKa=function(){return this.ip&
l.VK?!0:!1};l.prototype.nKa=function(){return this.ip&l.WK?!0:!1};l.prototype.oKa=function(){return this.ip&l.WF?!0:!1};l.prototype.kKa=function(){return this.ip&l.SF?!0:!1};l.prototype.getX=function(){this.mp();return this.dc};l.prototype.getY=function(){this.mp();return this.ec};l.prototype.lA=function(){this.mp();return this.jc};l.prototype.zO=function(){this.mp();return this.Cd};l.prototype.setConfiguration=function(g,h,e,b,c){this.sf=g;this.rf=h;this.ri=e;this.fga=b;this.cga=c;this.ec=this.dc=
.5;this.Cd=0;this.jc=b;this.Pd=!0};l.prototype.setPosition=function(g,h,e,b){this.dc=g;this.ec=h;this.Cd=e;this.jc=b;this.Pd=!0};l.prototype.Zt=function(g){this.Vo=g;this.Pd=!0};l.prototype.setSize=function(g,h){this.xo=g;this.wo=h;this.Pd=!0};l.prototype.mp=function(){if(this.Pd){this.Pd=!1;var g=l.TF;this.jc>this.cga?(this.jc=this.cga,g|=l.AUa):this.jc<this.fga&&(this.jc=this.fga,g|=l.BUa);if(this.Vo==k.eF){switch(this.ri){case n.NONE:var h=this.sf;var e=this.rf;break;case n.Lp:h=this.xo;e=this.rf*
this.xo/this.sf;break;case n.Qk:h=this.sf*this.wo/this.rf;e=this.wo;break;case n.Dr:this.sf*this.wo>this.rf*this.xo?(h=this.sf*this.wo/this.rf,e=this.wo):(h=this.xo,e=this.rf*this.xo/this.sf);break;default:case n.oj:this.sf*this.wo>this.rf*this.xo?(h=this.xo,e=this.rf*this.xo/this.sf):(h=this.sf*this.wo/this.rf,e=this.wo)}h*=this.jc;e*=this.jc;var b=Math.min(.5*this.xo/h,.5);h=Math.max(1-.5*this.xo/h,.5);var c=Math.min(.5*this.wo/e,.5);e=Math.max(1-.5*this.wo/e,.5)}else b=0,h=1,c=0,e=1;this.dc<b?
(this.dc=b,g|=l.VK):this.dc>h&&(this.dc=h,g|=l.WK);this.ec<c?(this.ec=c,g|=l.WF):this.ec>e&&(this.ec=e,g|=l.SF);this.Vo!=k.eF&&this.Vo!=k.ISa||this.Cd==0||(this.Cd=0,g|=l.GUa);this.ip=g}};l.TF=0;l.VK=1;l.WK=2;l.WF=4;l.SF=8;l.BUa=16;l.AUa=32;l.GUa=64;return l});
define("tdv/player/view/map/control/camera/MovementManager",["require"],function(){function a(){this.jR=.1;this.z_=this.Hca=this.Kca=this.Jca=this.Rca=this.Gca=this.Pca=this.Oca=this.oV=this.cla=this.ZF=this.tba=this.mV=this.$ka=this.lV=this.Yka=0}a.prototype.M8=function(l){this.jR=l};a.prototype.kPa=function(l,k,n,g,h,e,b,c){this.Yka=l;this.$ka=k;this.tba=n;this.cla=g;this.lV+=h;this.mV+=e;this.ZF+=b;this.oV+=c};a.prototype.Rf=function(){return this.Oca!=0||this.Pca!=0||this.Gca!=0||this.Rca!=0||
this.Yka!=0||this.$ka!=0||this.tba!=0||this.cla!=0||this.lV!=0||this.mV!=0||this.ZF!=0||this.oV!=0};a.prototype.Lb=function(l){l=1E3/l;this.Jca=this.M_(this.Oca/l,this.Yka/l+this.lV,this.jR);this.Kca=this.M_(this.Pca/l,this.$ka/l+this.mV,this.jR);this.Hca=this.M_(this.Gca/l,this.tba/l+this.ZF,this.jR);this.z_=this.M_(this.Rca/l,this.cla/l+this.oV,this.jR);this.Oca=this.Jca*l;this.Pca=this.Kca*l;this.Gca=this.Hca*l;this.Rca=this.z_*l;this.oV=this.ZF=this.mV=this.lV=0};a.prototype.M_=function(l,k,n){return k==
0?this.Zg(l,k,n):k};a.prototype.Zg=function(l,k,n){l=(k-l)*(1-n);Math.abs(l)<.01&&(l=0);return k-l};return a});
define("tdv/player/view/map/control/camera/MouseManager","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/view/constants/ScaleMode".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher");a("tdv/view/constants/ScaleMode");var h=l.extend(g,function(){g.call(this);this.hR=7;this.u1=this.tfa=!1;this.w1=void 0;this.Cd=0;this.jc=1;this.rf=this.sf=100;this.R0=1;this.Eha=!0;this.Fha=!1;
this.a$a=!0;this.bla=!1;this.Ab=null});h.prototype.RX=function(e){this.hR=e};h.prototype.Zc=function(e,b,c,d){this.Cd=e;this.jc=b;this.sf=c;this.rf=d};h.prototype.Iib=function(e){this.Eha=e;this.F3(this.Eha&&!!this.Ab)};h.prototype.Xt=function(e){this.Ab!=e&&(this.F3(!1),this.Via(!1),this.Hn(),this.Ab=e,this.F3(this.Eha&&!!this.Ab),this.Via(this.a$a&&!!this.Ab))};h.prototype.Hn=function(){this.F3(!1);this.Via(!1);this.Ab=null};h.prototype.F3=function(e){this.Fha!=e&&((this.Fha=e)?this.jWa():this.t8a())};
h.prototype.Via=function(e){this.bla!=e&&((this.bla=e)?this.mWa():this.v8a())};h.prototype.jWa=function(){this.Ab.bind(k.Ra,this.re,this,!0);this.Ab.bind(k.fb,this.cl,this,!0);this.Ab.bind(k.ab,this.dl,this,!0)};h.prototype.t8a=function(){this.Ab.h(k.Ra,this.re,this);this.Ab.h(k.fb,this.cl,this);this.Ab.h(k.ab,this.dl,this)};h.prototype.mWa=function(){this.Ab.bind(k.Rk,this.tH,this,!0);this.Ab.bind(k.CK,this.MG,this,!0)};h.prototype.v8a=function(){this.Ab.h(k.Rk,this.tH,this);this.Ab.h(k.CK,this.MG,
this)};h.prototype.re=function(e){this.h7a(e)};h.prototype.cl=function(e){this.gFa(e)};h.prototype.dl=function(){this.Bda()};h.prototype.tH=function(e){this.Dka(e)};h.prototype.MG=function(e){this.Eka(e)};h.prototype.h7a=function(e){this.tfa=!0;this.u1=!1;this.w1=e;this.gFa(e)};h.prototype.gFa=function(e){if(this.tfa){var b=e.pageX-this.w1.pageX,c=e.pageY-this.w1.pageY;this.u1||(Math.sqrt(b*b+c*c)>this.hR?this.u1=!0:b=c=0);this.u1&&(this.w1=e);e=this.Cd*Math.PI/180;this.m(new n(h.Ar,{xDelta:-((b*
Math.cos(e)+c*Math.sin(e))/this.sf),yDelta:-((c*Math.cos(e)-b*Math.sin(e))/this.rf)}))}};h.prototype.Bda=function(){this.tfa=!1};h.prototype.Eka=function(e){if(this.R0!=e.scale){this.Bda();var b=this.R0;this.R0=e.scale;this.m(new n(h.Cr,{zoomDelta:this.jc*this.R0/b-this.jc}))}};h.prototype.Dka=function(e){e.delta!=0&&(this.Bda(),this.m(new n(h.Cr,{zoomDelta:this.jc*e.Wz*.1})))};h.Ar="position change";h.Cr="zoom change";h.lmb="vieport navigation";h.kmb="relative navigation";h.jmb="relative exponential navigation";
h.imb="dragging";return h});define("tdv/player/view/map/control/constants/Movement",["require"],function(){return{Aaa:"rotateClockwise",Baa:"rotateCounterClockwise",Bx:"zoomIn",Cx:"zoomOut",Dg:"stop"}});
define("tdv/player/view/map/control/camera/ManualCameraController","require tdv/utils tdv/events/Event tdv/events/EventDispatcher tdv/view/constants/ScaleMode tdv/player/view/util/Device tdv/player/view/map/control/camera/MovementManager tdv/player/view/map/control/camera/MouseManager tdv/player/view/map/control/constants/Movement tdv/constants/EventName".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=a("tdv/view/constants/ScaleMode"),h=a("tdv/player/view/util/Device"),
e=a("tdv/player/view/map/control/camera/MovementManager"),b=a("tdv/player/view/map/control/camera/MouseManager"),c=a("tdv/player/view/map/control/constants/Movement");a("tdv/constants/EventName");var d=l.extend(n,function(f,m){n.call(this);this.o=f;this.ua=m;this.Zu=this.X2=this.ha=!1;this.ec=this.dc=.5;this.Cd=0;this.jc=1;this.rf=this.sf=100;this.ri=g.eF;this.Ac=new e;this.Gb=new b;h.nr()?(this.Gb.RX(d.dba),this.Ac.M8(d.eba)):(this.Gb.RX(0),this.Ac.M8(1));this.Gb.bind(b.Ar,this.N2a,this,!0);this.Gb.bind(b.Cr,
this.NC,this,!0)});d.prototype.clear=function(){this.Gb.h(b.Ar,this.unb,this,!0);this.Gb.h(b.Cr,this.NC,this,!0);this.Gb.Hn();this.o=this.ua=this.Ac=this.Gb=null};d.prototype.wl=function(f){switch(f){case c.Aaa:this.md(0,0,+d.Uaa,0,0,0,0,0);break;case c.Baa:this.md(0,0,-d.Uaa,0,0,0,0,0);break;case c.Bx:this.md(0,0,0,+d.uQ,0,0,0,0);break;case c.Cx:this.md(0,0,0,-d.uQ,0,0,0,0);break;case c.Dg:this.md(0,0,0,0,0,0,0,0)}};d.prototype.setPosition=function(f,m,p,q,r,t){this.dc=f;this.ec=m;this.Cd=p;this.jc=
q;this.sf=r;this.rf=t;this.Gb.Zc(this.Cd,this.jc,this.sf,this.rf)};d.prototype.Rf=function(){return this.ha&&this.Ac.Rf()};d.prototype.Lb=function(f){this.Ac.Lb(f);this.ua.setPosition(this.dc+this.Ac.Jca,this.ec+this.Ac.Kca,this.Cd+this.Ac.Hca,this.jc+this.Ac.z_);this.dc=this.ua.getX();this.ec=this.ua.getY();this.Cd=this.ua.zO();this.jc=this.ua.lA()};d.prototype.VX=function(f){this.Zu=f;this.Gb.Iib(!this.Zu)};d.prototype.Ua=function(f){(this.ha=f)?this.Gb.Xt(this.o.getParent()):this.Gb.Hn()};d.prototype.N2a=
function(f){this.md(0,0,0,0,f.data.xDelta,f.data.yDelta,0,0)};d.prototype.NC=function(f){this.md(0,0,0,0,0,0,0,f.data.zoomDelta)};d.prototype.md=function(f,m,p,q,r,t,u,v){this.Ac.kPa(f,m,p,q,r,t,u,v);this.dj()};d.prototype.dj=function(){this.m(new k(d.Ki))};d.Ki="position change request";d.dba=7;d.eba=.2;d.uQ=.5;d.Uaa=30;return d});
define("tdv/player/view/map/control/camera/SyncFovCameraController","require tdv/utils tdv/events/Event tdv/events/EventDispatcher tdv/view/util/Ease tdv/view/util/EaseDimension tdv/player/view/util/Device tdv/player/view/map/control/camera/MovementManager tdv/player/view/map/control/camera/MouseManager tdv/player/view/map/control/constants/Movement tdv/constants/EventName".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=a("tdv/view/util/Ease"),
h=a("tdv/view/util/EaseDimension"),e=a("tdv/player/view/util/Device"),b=a("tdv/player/view/map/control/camera/MovementManager"),c=a("tdv/player/view/map/control/camera/MouseManager"),d=a("tdv/player/view/map/control/constants/Movement");a("tdv/constants/EventName");var f=l.extend(n,function(m,p){n.call(this);this.o=m;this.ua=p;this.ha=!1;this.ec=this.dc=.5;this.Cd=0;this.jc=1;this.rf=this.sf=100;this.ka=null;this.uda=!0;this.rd=null;this.u2=0;this.Gv=this.im=this.wz=void 0;this.Ac=new b;this.Gb=new c;
e.nr()?(this.Gb.RX(f.dba),this.Ac.M8(f.eba)):(this.Gb.RX(0),this.Ac.M8(1));this.Gb.bind(c.Cr,this.NC,this,!0)});f.prototype.rib=function(m,p){this.sf=m;this.rf=p;this.DN()};f.prototype.SA=function(m){this.rd!=m&&(this.rd=m,this.u2=void 0,this.DN())};f.prototype.jr=function(m,p){this.rd==m&&(this.u2=p,this.DN())};f.prototype.DN=function(){if(this.rd&&this.u2!=void 0){var m=this.rd.get("x",0)/this.sf;var p=this.rd.get("y",0)/this.rf;var q=-(this.u2+this.rd.get("angle",0))}else q=p=m=void 0;this.Gv!=
q&&(this.Gv=q,this.dj());if(this.wz!=m||this.im!=p)this.wz=m,this.im=p,this.e1a(),this.dj()};f.prototype.e1a=function(){this.uda=!0;this.dj()};f.prototype.oI=function(){if(this.uda||this.ka&&this.ka.Re())if(this.uda=!1,this.ka=null,this.wz!=void 0&&this.im!=void 0&&this.Gv!=void 0){for(var m=this.Gv-this.Cd;m>180;)m-=360;for(;m<-180;)m+=360;this.dc!=this.wz||this.ec!=this.im?this.ka=new g("quad_in_out",[new h("x",this.dc,this.wz,1),new h("y",this.ec,this.im,1),new h("angleDif",m,m,360)],500):this.Gv!=
this.Cd&&(this.ka=new g("quad_in_out",[new h("x",this.dc,this.dc,1),new h("y",this.ec,this.ec,1),new h("angleDif",m,0,360)],500))}};f.prototype.clear=function(){this.Gb.h(c.Cr,this.NC,this,!0);this.Gb.Hn();this.o=this.ua=this.ka=this.Ac=this.Gb=null};f.prototype.wl=function(m){switch(m){case d.Bx:this.md(+f.uQ,0);break;case d.Cx:this.md(-f.uQ,0);break;case d.Dg:this.md(0,0)}};f.prototype.setPosition=function(m,p,q,r,t,u){this.dc=m;this.ec=p;this.Cd=q;this.jc=r;this.Gb.Zc(this.Cd,this.jc,t,u)};f.prototype.Rf=
function(){return this.ha&&(this.ka||this.Ac.Rf()||this.wz!=void 0&&this.dc!=this.wz||this.im!=void 0&&this.ec!=this.im||this.Gv!=void 0&&this.Cd!=this.Gv)?!0:!1};f.prototype.Lb=function(m){this.oI();this.ka?(this.ka.Lb(m),this.dc=this.ka.nb("x"),this.ec=this.ka.nb("y"),this.Cd=this.Gv-this.ka.nb("angleDif")):(this.wz!=void 0&&(this.dc=this.wz),this.im!=void 0&&(this.ec=this.im),this.Gv!=void 0&&(this.Cd=this.Gv));this.Ac.Lb(m);this.ua.setPosition(this.dc,this.ec,this.Cd,this.jc+this.Ac.z_);this.dc=
this.ua.getX();this.ec=this.ua.getY();this.Cd=this.ua.zO();this.jc=this.ua.lA()};f.prototype.Ua=function(m){(this.ha=m)?(this.Gb.Xt(this.o.getParent()),this.DN()):this.Gb.Hn()};f.prototype.NC=function(m){this.md(0,m.data.zoomDelta)};f.prototype.md=function(m,p){this.Ac.kPa(0,0,0,m,0,0,0,p);this.dj()};f.prototype.dj=function(){this.m(new k(f.Ki))};f.Ki="position change request";f.dba=7;f.eba=.2;f.uQ=.5;f.Uaa=30;return f});
define("tdv/player/view/map/control/CameraController","require tdv/utils tdv/events/Event tdv/events/EventDispatcher tdv/player/view/map/constants/MovementMode tdv/view/constants/ScaleMode tdv/player/view/map/control/camera/LimitsManager tdv/player/view/map/control/camera/ManualCameraController tdv/player/view/map/control/camera/SyncFovCameraController tdv/constants/EventName".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=a("tdv/player/view/map/constants/MovementMode"),
h=a("tdv/view/constants/ScaleMode"),e=a("tdv/player/view/map/control/camera/LimitsManager"),b=a("tdv/player/view/map/control/camera/ManualCameraController"),c=a("tdv/player/view/map/control/camera/SyncFovCameraController"),d=a("tdv/constants/EventName"),f=l.extend(n,function(m){n.call(this);this.o=m;this.o.bind(d.Zb,this.kd,this);this.Vo=g.eF;this.rd=null;this.ec=this.dc=.5;this.Cd=0;this.jc=1;this.bb=null;this.o3=this.n3=this.Nv=this.Mv=!1;this.jp=!0;this.ha=!1;this.ua=new e;this.ua.Zt(this.Vo);
this.qc=new b(this.o,this.ua);this.qc.bind(b.Ki,this.As,this,!0);this.Oj=new c(this.o,this.ua);this.Oj.bind(c.Ki,this.As,this,!0);this.Z2()});f.prototype.clear=function(){this.qc.h(b.Ki,this.As,this);this.qc.clear();this.qc=null;this.Oj.h(c.Ki,this.As,this);this.Oj.clear();this.bb=this.ua=this.Oj=null;this.o.h(d.Zb,this.kd,this);this.o=null};f.prototype.stop=function(){this.Ce=this.bb=null;this.ha=!1;this.qc.Ua(!1);this.Oj.Ua(!1);this.nz(0,0,0)};f.prototype.start=function(m){var p=m.bb,q=p.get("width",
100),r=p.get("height",100),t=p.get("scaleMode",h.oj),u=p.get("minimumZoomFactor",1),v=p.get("maximumZoomFactor",1),w=p.get("initialZoomFactor",1);this.bb=p;this.ha=!0;this.Ce=m.getItem();this.nz(0,0,0);this.Oj.rib(q,r);this.ua.setConfiguration(q,r,t,u,v);this.ua.setPosition(.5,.5,0,w);this.o.Ipa(this.Ce,this.ua.getX(),this.ua.getY(),this.ua.zO(),this.ua.lA());this.Z2()};f.prototype.wl=function(m){this.qc.wl(m);this.Oj.wl(m)};f.prototype.Zt=function(m){this.Vo!=m&&(this.Vo=m,this.ua.Zt(m),this.Z2())};
f.prototype.SA=function(m){this.rd!=m&&(this.rd=m,this.Oj.SA(m),this.Z2())};f.prototype.VX=function(m){this.qc&&this.qc.VX(m)};f.prototype.jr=function(m,p,q,r){this.Oj.jr(m,p,q,r)};f.prototype.JA=function(m){this.ha&&(this.Oj.Rf()?(this.Oj.Lb(m),this.un(this.Oj.dc,this.Oj.ec,this.Oj.Cd,this.Oj.jc),this.Sa()):this.qc.Rf()?(this.qc.Lb(m),this.un(this.qc.dc,this.qc.ec,this.qc.Cd,this.qc.jc),this.Sa()):this.nz(0,0,0))};f.prototype.xe=function(){if(this.Ce){var m=this.o.s6(this.Ce),p=this.o.t6(this.Ce),
q=this.o.r6(this.Ce),r=this.o.Rcb(this.Ce),t=this.o.q6(this.Ce),u=this.o.p6(this.Ce),v=m-this.dc,w=p-this.ec,y=r-this.jc;this.dc=m;this.ec=p;this.Cd=q;this.jc=r;this.nz(v,w,y);this.Oj.setPosition(m,p,q,r,t,u);this.qc.setPosition(m,p,q,r,t,u)}};f.prototype.Z2=function(){this.Vo==g.Gaa&&this.rd!=null&&this.rd.get("map")==this.bb?(this.qc.Ua(!1),this.Oj.Ua(!0)):(this.qc.Ua(!0),this.Oj.Ua(!1))};f.prototype.As=function(){this.Sa()};f.prototype.kd=function(){this.ua.setSize(this.o.gb(),this.o.Kb());this.Sa()};
f.prototype.Sa=function(){this.m(new k(f.oc))};f.prototype.un=function(m,p,q,r){this.o.Ipa(this.Ce,m,p,q,r)};f.prototype.nz=function(m,p,q){m=!1;this.Nv!=q<0&&(this.Nv=!this.Nv,m=!0);this.Mv!=q>0&&(this.Mv=!this.Mv,m=!0);this.n3!=this.ZF>0&&(this.n3=!this.n3,m=!0);this.o3!=this.ZF<0&&(this.o3=!this.o3,m=!0);this.jp!=(q==0)&&(this.jp=!this.jp,m=!0);m&&this.m(new k(f.Bl,{rotatingClockwise:this.n3,rotatingCounterClockwise:this.o3,zoomingIn:this.Mv,zoomingOut:this.Nv,stopped:this.jp}))};f.oc="request frame";
f.Bl="movement change";return f});
define("tdv/player/view/map/control/DisplayController","require tdv/utils tdv/events/Event tdv/events/EventDispatcher tdv/view/constants/ScaleMode tdv/player/view/map/control/camera/LimitsManager".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=a("tdv/view/constants/ScaleMode"),h=a("tdv/player/view/map/control/camera/LimitsManager"),e=l.extend(n,function(b,c){n.call(this);this.R=b;this.o=c;this.ua=new h;this.wh=[];this.Oa=e.Oi;this.es=this.Wk=
this.Um=null;this.Zf=this.R.get("transitionDuration");this.zn=void 0});e.prototype.Zt=function(b){this.ua.Zt(b)};e.prototype.QV=function(b){b.KW()&&this.ica();this.wh.push(b);this.Z1()};e.prototype.Qe=function(){this.ica();this.wh.push(null);this.Z1()};e.prototype.clear=function(){this.Oa=e.Oi;this.ica();this.r4a();this.dia();this.o=null};e.prototype.xe=function(b){this.Oa==e.Oi||this.Oa!=e.rj&&this.Oa!=e.Eu||(this.zn+=b,b=Math.min(1,this.zn/this.Zf),this.Oa==e.rj?this.o.PA(this.es,b):this.o.PA(this.E_,
1-b),this.zn<this.Zf?this.Sa():this.Oa==e.rj?this.Ada():this.YYa())};e.prototype.Z1=function(){if(this.Oa==e.Oi){for(;this.wh.length>0&&this.tVa(this.wh[0],this.Wk);)this.wh.shift();this.wh.length>0&&this.Xr()}};e.prototype.tVa=function(b,c){return b==c||!!b&&!!c&&b.isEqual(c)};e.prototype.Xr=function(){!this.Wk||this.wh[0]&&!this.wh[0].KW()||this.Wk.bb==(this.wh[0]&&this.wh[0].bb)||this.m(new k(e.iF,{map:this.Wk.bb}));this.R.get("transitionMode","blending")!="fade_out_fade_in"||!this.Wk||this.wh[0]&&
!this.wh[0].KW()?(this.es=(this.Um=this.wh.shift())&&this.Um.getItem(),this.Um?this.dG():this.Wk&&this.RB()):this.RB()};e.prototype.dG=function(){this.QUa();this.Um.KW()&&this.o5a();this.zn=0;this.Oa=e.rj;this.Sa()};e.prototype.Ada=function(){this.dia();this.Wk=this.Um;this.E_=this.es;this.es=this.Um=null;this.nC()};e.prototype.RB=function(){this.zn=0;this.Oa=e.Eu;this.Sa()};e.prototype.YYa=function(){this.dia();this.Wk=null;this.nC()};e.prototype.nC=function(){this.Oa=e.Oi;this.Wk&&this.Wk.KW()&&
this.m(new k(e.jF,{map:this.Wk.bb}));this.wh.length==0?this.Wk?this.m(new k(e.M$,{level:this.Wk})):this.m(new k(e.x$)):this.Xr()};e.prototype.o5a=function(){var b=this.Um.bb;this.Um.Ak();this.ua.setConfiguration(b.get("width",100),b.get("height",100),b.get("scaleMode",g.oj),b.get("minimumZoomFactor",1),b.get("maximumZoomFactor",1));this.ua.setPosition(.5,.5,0,b.get("initialZoomFactor",1));this.o.Ipa(this.es,this.ua.getX(),this.ua.getY(),this.ua.zO(),this.ua.lA())};e.prototype.Sa=function(){this.m(new k(e.oc))};
e.prototype.ica=function(){for(;this.wh.length>0;){var b=this.wh.shift();b&&this.o.eo(b.getItem())}};e.prototype.QUa=function(){this.Um&&(this.o.o$a(this.es),this.o.R$a(this.es),this.o.PA(this.es,0),this.m(new k(e.L$,{level:this.Um})))};e.prototype.dia=function(){this.Wk&&(this.o.removeItem(this.E_),this.m(new k(e.cZ,{level:this.Wk})),this.o.eo(this.E_),this.E_=this.Wk=null)};e.prototype.r4a=function(){this.Um&&(this.o.removeItem(this.es),this.m(new k(e.cZ,{level:this.Um})),this.o.eo(this.es),this.es=
this.Um=null)};e.Oi="stopped";e.rj="blending";e.Eu="disolving";e.oc="request frame";e.L$="level added";e.cZ="level removed";e.M$="level fully displayed";e.x$="all pending maps hidden";e.jF="map show";e.iF="map hide";return e});
define("tdv/player/view/map/control/Level",["require"],function(){function a(l,k){this.bb=l;this.lb=l.get("image");this.Of=k;this.nfa=void 0}a.prototype.getItem=function(){switch(this.Of){case a.sZ:return this.bb.CJa();default:return this.bb.Tq()}};a.prototype.Ak=function(){switch(this.Of){case a.sZ:return this.bb.dJ();default:return this.bb.yt()}};a.prototype.KW=function(){return this.nfa===void 0?this.getIndex()==0:this.nfa};a.prototype.eib=function(l){this.nfa=l};a.prototype.LW=function(){return this.Of==
a.Wra};a.prototype.isEqual=function(l){return l&&this.bb==l.map&&this.Of==l.type};a.prototype.getIndex=function(){return this.Of==a.sZ||this.bb.GO()?0:1};a.prototype.YIa=function(){return this.bb.GO()?2:1};a.sZ="preload";a.Wra="load";return a});
define("tdv/player/view/map/control/LoadController","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/map/control/Level tdv/player/view/util/Device".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/events/Event"),h=a("tdv/events/EventDispatcher"),e=a("tdv/player/view/map/control/Level"),b=a("tdv/player/view/util/Device"),c=l.extend(h,function(d){h.call(this);
this.o=d;this.wh=[];this.bR=this.oH=this.Ih=null;this.hH=!1;this.S0=null;this.P1=l.ar(this.P1,this)});c.prototype.clear=function(){this.stop();this.o=null};c.prototype.vLa=function(d,f){if(this.S0!=d||f)this.stop(),this.bb=d,this.bb.jhb(),k.xD(this.bb,"image.levels.url",this.P1),f=[],d.GO()&&b.ub()&&f.push(new e(d,e.sZ)),f.push(new e(d,e.Wra)),f=f.filter(function(m){return m.getItem().ql()}),f.length&&(this.wh=this.wh.concat(f),this.Z1())};c.prototype.P1=function(){this.reload()};c.prototype.reload=
function(){this.vLa(this.bb,!0)};c.prototype.stop=function(){k.da(this.bb,"image.levels.url",this.P1);this.S0=this.bb=null;this.wh=[];this.TDa();this.hH&&(this.hH=!1,this.Rja(),this.o.eo(this.Ih.getItem()),this.Ih=null,this.m(new g(c.dZ)))};c.prototype.Z1=function(){this.hH||this.Vfa()};c.prototype.Vfa=function(){this.wh.length>0?(this.Ih=this.wh.shift(),this.hH||(this.hH=!0,this.m(new g(c.bZ,{level:this.Ih,percent:0}))),this.dWa(),this.o.rA(this.Ih.getItem()),this.o.Bqa(this.Ih.getItem())&&this.Aga()):
this.hH&&(this.hH=!1,this.m(new g(c.dZ)))};c.prototype.Aga=function(){this.Rja();this.Z6a();this.Ih=null;this.Vfa()};c.prototype.Z6a=function(){this.TDa();this.oH=this.Ih;var d=this;this.bR=setTimeout(function(){d.bR=null;d.w2a()},500)};c.prototype.w2a=function(){var d=this.oH.bb;this.oH.eib(d!=this.S0);this.S0=d;this.m(new g(c.N$,{level:this.oH}));this.oH=null};c.prototype.TDa=function(){this.bR!=null&&(clearTimeout(this.bR),this.bR=null,this.o.eo(this.oH.getItem()),this.oH=null)};c.prototype.Fza=
function(){this.Rja();this.Ih=null;this.Vfa()};c.prototype.Gza=function(d){this.m(new g(c.bZ,{level:this.Ih,percent:d.percent}))};c.prototype.dWa=function(){var d=this.Ih.getItem();d.bind(n.ia,this.Aga,this);d.bind(n.ad,this.Fza,this);d.bind(n.xc,this.Gza,this)};c.prototype.Rja=function(){var d=this.Ih.getItem();d.h(n.ia,this.Aga,this);d.h(n.ad,this.Fza,this);d.h(n.xc,this.Gza,this)};c.bZ="level loading progress";c.N$="level loaded";c.dZ="load stopped";return c});
define("tdv/player/view/map/control/overlays/Point",["require"],function(){function a(l,k){this.x=l;this.y=k}a.prototype.rotate=function(l){var k=Math.cos(l);l=Math.sin(l);var n=this.x*l+this.y*k;this.x=this.x*k-this.y*l;this.y=n;return this};a.prototype.translate=function(l,k){this.x+=l;this.y+=k;return this};a.prototype.scale=function(l,k){this.x*=l;this.y*=k;return this};return a});
define("tdv/view/images/ScalableImage",["require","tdv/view/constants/ScaleMode","tdv/view/constants/Alignment"],function(a){function l(g,h,e){this.dh=g;this.IDa=h;this.GDa=e;this.ri=k.rB;this.uC=n.Ye;this.wD=n.Xd}var k=a("tdv/view/constants/ScaleMode"),n=a("tdv/view/constants/Alignment");l.prototype.yP=function(g){this.ri=g};l.prototype.wP=function(g){this.uC=g};l.prototype.CP=function(g){this.wD=g};l.prototype.oO=function(g,h,e){var b=this.IDa,c=this.GDa,d;switch(this.ri){case k.NONE:var f=d=1;
break;case k.oj:d=f=Math.min(h/b,e/c);break;case k.Dr:d=f=Math.max(h/b,e/c);break;case k.Lp:d=f=h/b;break;case k.Qk:d=f=e/c;break;default:d=h/b,f=e/c}var m=Math.min(this.IDa*d,h);d=Math.min(h/d,b);switch(this.uC){case n.eb:b=h=0;break;case n.Db:h-=m;b-=d;break;default:h=(h-m)*.5,b=(b-d)*.5}var p=Math.min(this.GDa*f,e);f=Math.min(e/f,c);switch(this.wD){case n.Tc:c=e=0;break;case n.Fc:e-=p;c-=f;break;default:e=(e-p)*.5,c=(c-f)*.5}g.drawImage(this.dh,Math.round(b),Math.round(c),Math.round(d+b-Math.round(b)),
Math.round(f+c-Math.round(c)),Math.round(h),Math.round(e),Math.round(m+h-Math.round(h)),Math.round(p+e-Math.round(e)))};return l});
define("tdv/player/view/map/control/overlays/HotspotMapOverlayMapController","require tdv/constants/EventName tdv/constants/Priority tdv/player/view/map/control/overlays/Point tdv/view/images/ImageLoader tdv/view/images/ScalableImage".split(" "),function(a){function l(b,c,d,f){this.o=b;this.bb=c;this.sf=this.bb.get("width");this.rf=this.bb.get("height");this.Ce=this.bb.Tq();this.Lxa=d;this.cq=f;this.WG=null;if(this.cq){if(this.aN=this.Lxa.aN,this.Pa=this.cq.get("width"),this.Ha=this.cq.get("height"),
this.dc=this.cq.get("x",0),this.ec=this.cq.get("y",0),this.tga=this.cq.get("offsetX",0),this.uga=this.cq.get("offsetY",0),this.rb=this.cq.yt())this.wC=new h(n.Mp),this.wC.load(this.rb.get("url")),this.wC.bind(k.ia,this.lAa,this)}else this.wC=null}var k=a("tdv/constants/EventName"),n=a("tdv/constants/Priority"),g=a("tdv/player/view/map/control/overlays/Point"),h=a("tdv/view/images/ImageLoader"),e=a("tdv/view/images/ScalableImage");l.prototype.clear=function(){this.cq=this.Lxa=this.Ce=this.bb=this.o=
null;this.wC&&(this.wC.h(k.ia,this.lAa,this),this.wC.cancel(),this.wC=null);this.WG=null};l.prototype.qJa=function(b,c){this.Mxa=void 0;if(this.WG&&b!=void 0&&c!=void 0){var d=this.o.gb()*.5,f=this.o.Kb()*.5,m=this.o.r6(this.Ce)*Math.PI/180,p=this.o.q6(this.Ce),q=this.o.p6(this.Ce),r=this.o.s6(this.Ce),t=this.o.t6(this.Ce);b=new g(b,c);b.translate(-d,-f);b.rotate(-m);b.scale(1/p,1/q);b.translate(r,t);b.scale(this.sf,this.rf);b.translate(-this.dc,-this.ec);this.aN||(b.rotate(m),b.scale(p/this.sf,q/
this.rf));b.translate(this.tga,this.uga);d=Math.round(b.x);f=Math.round(b.y);d>=0&&d<this.WG.width&&f>=0&&f<this.WG.height&&(d=(this.WG.width*f+d)*4,f=this.WG.data,this.Mxa=f[d+3]>0?"#"+this.Vba(f[d+0])+this.Vba(f[d+1])+this.Vba(f[d+2]):"transparent")}return this.Mxa};l.prototype.lAa=function(){var b=new e(this.wC.xg(),this.rb.get("width"),this.rb.get("height"));b.yP(this.cq.get("scaleMode"));b.wP(this.cq.get("horizontalAlign"));b.CP(this.cq.get("verticalAlign"));var c=document.createElement("canvas");
c.width=Math.round(this.Pa);c.height=Math.round(this.Ha);var d=c.getContext("2d");b.oO(d,c.width,c.height);this.WG=d.getImageData(0,0,c.width,c.height);c.width=c.height=0};l.prototype.Vba=function(b){for(b=b.toString(16);b.length<2;)b="0"+b;return b};return l});
define("tdv/player/view/map/control/overlays/HotspotMapOverlayController","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Color tdv/player/view/util/Device tdv/player/view/map/control/overlays/HotspotMapOverlayMapController tdv/view/constants/Cursor tdv/view/util/Ease tdv/view/util/EaseDimension".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),h=a("tdv/player/view/util/Color"),
e=a("tdv/player/view/util/Device"),b=a("tdv/player/view/map/control/overlays/HotspotMapOverlayMapController"),c=a("tdv/view/constants/Cursor"),d=a("tdv/view/util/Ease"),f=a("tdv/view/util/EaseDimension"),m=l.extend(g,function(p,q,r){g.call(this);this.o=p;this.bb=q;this.Cc=r;this.Ja=this.Cc.getItem();this.Ss=this.Cc.GJa();this.Us=this.Cc.LJa();this.Ay=this.Oo=void 0;this.R=this.o.getParent();this.R.bind(k.fb,this.rg,this);this.R.bind(k.Eb,this.XS,this);this.R.bind(k.Ra,this.kq,this);this.R.bind(k.ab,
this.Qy,this);this.R.bind(k.la,this.Py,this);r.bind(k.N("selected"),this.aBa,this);r.bind(k.N("enabled"),this.xs,this);this.Z0=new b(this.o,this.bb,this.Cc,this.Cc.get("map",null));this.a1=new b(this.o,this.bb,this.Cc,this.Cc.get("rollOverMap",this.Cc.get("map",null)));this.b1=new b(this.o,this.bb,this.Cc,this.Cc.get("selectedMap",this.Cc.get("rollOverMap",this.Cc.get("map",null))));this.q0=new b(this.o,this.bb,this.Cc,this.Cc.get("image",null));this.r0=new b(this.o,this.bb,this.Cc,this.Cc.get("rollOverImage",
this.Cc.get("image",null)));this.s0=new b(this.o,this.bb,this.Cc,this.Cc.get("selectedImage",this.Cc.get("rollOverImage",this.Cc.get("image",null))));this.zd=this.yd=void 0;this.AN=null;this.Jx=[];this.Hu=[];this.PQ=[];this.Pi={};this.Eya=[];this.ty=!1;this.Gka=this.Cc.get("useHandCursor");this.ka=null;this.qN=void 0;this.y3=this.l3=this.J0=0;p=this.Cc.get("areas",[]);for(q=0;q<p.length;q++){r=p[q];var t=r.get("mapColor");t&&(t=t.toLowerCase(),this.Pi[t]===void 0&&(this.Pi[t]=[],this.Eya.push(t)),
this.Pi[t].push(r))}this.Ja&&(this.o.Z4(this.bb.Tq(),this.Ja),this.o.PA(this.Ja,this.J0));this.Ss&&(this.o.Z4(this.bb.Tq(),this.Ss),this.o.PA(this.Ss,this.l3));this.Us&&(this.o.Z4(this.bb.Tq(),this.Us),this.o.PA(this.Us,this.y3));this.kU("none");this.dka();this.cDa(!1);this.dDa(this.Cc.get("selected"))});m.prototype.clear=function(){this.R.h(k.fb,this.rg,this);this.R.h(k.Eb,this.XS,this);this.R.h(k.Ra,this.kq,this);this.R.h(k.ab,this.Qy,this);this.R.h(k.la,this.Py,this);this.R=null;this.Z0&&this.Z0.clear();
this.Z0=null;this.a1&&this.a1.clear();this.a1=null;this.b1&&this.b1.clear();this.b1=null;this.q0&&this.q0.clear();this.q0=null;this.r0&&this.r0.clear();this.r0=null;this.s0&&this.s0.clear();this.s0=null;this.Jx=[];this.Oo=!1;this.dka();this.Hu=[];this.PQ=[];this.Pi={};this.YDa();this.bV();this.bb=this.o=null;this.Cc.h(k.N("selected"),this.aBa,this);this.Us=this.Ss=this.Ja=this.Cc=null};m.prototype.match=function(p){return this.Cc==p};m.prototype.xe=function(p){this.YL(!1);this.ka&&(this.ka.Lb(p),
this.J0=this.ka.nb("itemAlpha"),this.l3=this.ka.nb("rollOverItemAlpha"),this.y3=this.ka.nb("selectedItemAlpha"),this.Ja&&this.o.PA(this.Ja,this.J0),this.Ss&&this.o.PA(this.Ss,this.l3),this.Us&&this.o.PA(this.Us,this.y3),this.ka.Re()?this.ka=null:this.Sa())};m.prototype.kq=function(p){this.yd=p.x-this.R.u.Bd;this.zd=p.y-this.R.u.ee;this.YL(!0);this.Hu=this.Jx.slice()};m.prototype.rg=function(p){this.yd=p.x-this.R.u.Bd;this.zd=p.y-this.R.u.ee;this.YL(!0)};m.prototype.Qy=function(p){this.yd=p.x-this.R.u.Bd;
this.zd=p.y-this.R.u.ee;this.YL(!0);this.PQ=l.intersection(this.Hu,this.Jx);this.Hu=[]};m.prototype.Py=function(){this.PQ&&(this.Ija(this.PQ,"click"),this.PQ=[])};m.prototype.XS=function(){this.zd=this.yd=void 0;this.YL(!0);this.Hu=this.Jx.slice()};m.prototype.aBa=function(){this.dDa(this.Cc.get("selected"))};m.prototype.xs=function(){this.YL(!0);this.gh();this.Sa()};m.prototype.YL=function(p){this.$xa=!0;p?this.zN():this.x1a()||this.t7a()};m.prototype.t7a=function(){this.YDa();var p=this;this.AN=
setTimeout(function(){p.AN=null;p.zN()},200)};m.prototype.x1a=function(){return this.AN?!0:!1};m.prototype.YDa=function(){this.AN&&(clearTimeout(this.AN),this.AN=null)};m.prototype.zN=function(){if(this.$xa){this.$xa=!1;var p=this.Jx,q=this.PZa();this.Jx=q;e.nr()||(this.Ija(l.difference(q,p),"rollOver"),this.cDa(q.length>0),this.Ija(l.difference(p,q),"rollOut"),this.bV())}};m.prototype.bV=function(){for(var p="",q=0;q<this.Jx.length&&!p;q++){var r=this.Jx[q];r.get("toolTip")&&(p=r.get("toolTip"))}this.hc!=
p&&(this.hc&&this.o.Agb(this.hc),(this.hc=p)&&this.o.Hgb(this.hc))};m.prototype.dka=function(){var p=this.Oo&&(this.Gka!==!1||this.Jx.some(q=>q.get("useHandCursor")===!0));this.ty!=p&&((this.ty=p)?this.o.x8(c.mf):this.o.mP(c.mf))};m.prototype.PZa=function(){if(this.Cc.get("enabled")===!1)return[];var p=[],q=this.Ay?this.b1:this.Oo?this.a1:this.Z0;q&&(q=q.qJa(this.yd,this.zd))&&(this.Pi.any&&(p=p.concat(this.Pi.any)),q=="transparent"&&this.Pi.transparent&&(p=p.concat(this.Pi.transparent)),q!="transparent"&&
(p=this.Pi[q]?p.concat(this.Pi[q]):p.concat(this.Pi[h.uhb(q,this.Eya)]||[]),this.Pi.image&&(p=p.concat(this.Pi.image))));if(q=this.Ay?this.s0:this.Oo?this.r0:this.q0)if(q=q.qJa(this.yd,this.zd))this.Pi.any&&(p=p.concat(this.Pi.any)),q=="transparent"&&this.Pi.transparent&&(p=p.concat(this.Pi.transparent)),q!="transparent"&&this.Pi.image&&(p=p.concat(this.Pi.image));q=[];for(var r=0;r<p.length;r++){var t=p[r];q.indexOf(t)<0&&q.push(t)}return q};m.prototype.Ija=function(p,q){if(p)for(var r=0;r<p.length;r++)p[r].m(new n(q))};
m.prototype.Yq=function(){return this.Oo};m.prototype.cDa=function(p){this.Oo!=p&&(this.Oo=p,this.m(new n(m.H$)),this.gh(),this.dka(),this.Sa())};m.prototype.dDa=function(p){this.Ay!=p&&(this.Ay=p,this.gh(),this.Sa())};m.prototype.gh=function(){!this.Oo&&this.Cc.get("rollOverDisplay")==1||this.Cc.get("enabled")===!1?this.kU("none"):this.Ay?this.kU("selected"):this.Oo?this.kU("roll over"):this.kU("visible")};m.prototype.kU=function(p){if(this.qN!=p){this.qN=p;var q;if(["selected"].includes(this.qN)&&
this.Us){var r=1;p=q=0}else["selected","roll over"].includes(this.qN)&&this.Ss?(q=1,p=r=0):["selected","roll over","visible"].includes(this.qN)?(p=1,r=q=0):p=r=q=0;var t=this.J0,u=this.l3,v=this.y3,w=Math.max(200*Math.abs(p-t),200*Math.abs(q-u),200*Math.abs(r-v));this.ka=new d(this.qN=="none"?"quad_out":"quad_in",[new f("itemAlpha",t,p),new f("rollOverItemAlpha",u,q),new f("selectedItemAlpha",v,r)],w)}};m.prototype.Sa=function(){this.m(new n(m.oc))};m.oc="request frame";m.H$="is over update";return m});
define("tdv/player/view/map/renderer/item/FovOverlay",["require","tdv/utils","tdv/player/view/map/renderer/item/Overlay"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/map/renderer/item/Overlay");a=l.extend(k,function(n,g,h,e,b,c,d){k.call(this,k.ata,n,g);this.V0a=h;this.W0a=e;this.D3a=b;this.E3a=c;this.Vc=d;this.dV=[]});a.prototype.kA=function(){return this.Vc};return a});
define("tdv/player/view/map/control/overlays/FovOverlayController","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/map/control/overlays/Point tdv/player/view/map/renderer/item/FovOverlay".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),h=a("tdv/player/view/map/control/overlays/Point"),e=a("tdv/player/view/map/renderer/item/FovOverlay"),b=l.extend(g,function(c,
d,f){g.call(this);this.o=c;this.R=this.o.getParent();this.R.bind(k.Ra,this.kq,this,!0);this.R.bind(k.fb,this.rg,this,!0);this.R.bind(k.Jr,this.XS,this,!0);this.bb=d;this.sf=this.bb.get("width");this.rf=this.bb.get("height");this.i4a=Math.sqrt(this.sf*this.sf+this.rf*this.rf)*this.bb.get("fieldOfViewOverlayRadiusScale",1);this.Ce=this.bb.Tq();this.rd=f;this.GM=this.rd.get("x",0);this.HM=this.rd.get("y",0);this.s2=this.rd.get("angle",0);this.Ja=this.ZXa();this.Zu=!1;this.Ga=0;this.kb=Math.PI*.5;this.re=
!1;this.zd=this.yd=void 0;this.o.Z4(this.bb.Tq(),this.Ja)});b.prototype.nPa=function(c,d){this.Ga=c+this.s2-90;this.kb=d;this.Sa()};b.prototype.clear=function(){this.R.h(k.Ra,this.kq,this);this.R.h(k.fb,this.rg,this);this.R.h(k.Jr,this.XS,this);this.R=null;this.o.Qgb(this.bb.Tq(),this.Ja);this.Ja=this.rd=this.Ce=this.bb=this.o=null};b.prototype.xe=function(){this.o.iib(this.Ja,this.Ga,this.kb)};b.prototype.ZXa=function(){return new e(this.GM,this.HM,this.bb.get("fieldOfViewOverlayInsideColor","#FFFFFF"),
this.bb.get("fieldOfViewOverlayInsideOpacity",0),this.bb.get("fieldOfViewOverlayOutsideColor","#000000"),this.bb.get("fieldOfViewOverlayOutsideOpacity",0),this.bb.get("fieldOfViewOverlayRadiusScale",1))};b.prototype.Sa=function(){this.m(new n(b.oc))};b.prototype.hka=function(){var c=!1;if(this.yd!=void 0&&this.zd!=void 0){var d=this.o.gb()*.5,f=this.o.Kb()*.5,m=this.o.r6(this.Ce)*Math.PI/180,p=this.o.q6(this.Ce),q=this.o.p6(this.Ce),r=this.o.s6(this.Ce),t=this.o.t6(this.Ce);c=new h(this.yd,this.zd);
c.translate(-d,-f);c.rotate(-m);c.scale(1/p,1/q);c.translate(r,t);c.scale(this.sf,this.rf);c.translate(-this.GM,-this.HM);c.rotate(-this.Ga*Math.PI/180);d=Math.round(Math.atan2(c.y,c.x)*180/Math.PI);c=Math.round(Math.sqrt(c.x*c.x+c.y*c.y))<=this.i4a&&Math.abs(d)<this.kb*.5}this.Zu!=c&&(this.Zu=c,this.m(new n(b.qaa,{inFOV:this.Zu})))};b.prototype.seb=function(){return this.Zu};b.prototype.kq=function(c){this.yd=c.x;this.zd=c.y;this.re=!0;this.hka()};b.prototype.rg=function(c){this.re||(this.yd=c.x,
this.zd=c.y,this.hka())};b.prototype.XS=function(){this.zd=this.yd=void 0;this.re=!1;this.hka()};b.oc="request frame";b.qaa="mouse in fov change";return b});
define("tdv/player/view/map/control/OverlaysController","require tdv/utils tdv/events/Event tdv/events/EventDispatcher tdv/player/script/HotspotMapOverlay tdv/player/view/map/control/overlays/HotspotMapOverlayController tdv/player/view/map/control/overlays/FovOverlayController".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=a("tdv/player/script/HotspotMapOverlay"),h=a("tdv/player/view/map/control/overlays/HotspotMapOverlayController"),e=a("tdv/player/view/map/control/overlays/FovOverlayController"),
b=l.extend(n,function(c){n.call(this);this.o=c;this.lS=[];this.wy=[];this.Jo=[];this.bp=this.rd=null});b.prototype.clear=function(){for(var c=0;c<this.wy.length;c++)this.wy[c].clear();for(c=0;c<this.Jo.length;c++)this.Jo[c].clear();this.o=this.lS=this.rd=this.Jo=this.wy=null};b.prototype.QV=function(c){c.LW()&&this.bVa(c.bb)};b.prototype.cna=function(c){c.LW()&&this.B4a(c.bb)};b.prototype.SA=function(c){this.rd!=c&&(this.rd&&this.gia(this.rd.get("map")),this.rd=c,this.bp=null,this.rd&&(c=this.rd.get("map"),
this.qfa(c)&&this.Tta(c)))};b.prototype.jr=function(c,d,f,m){this.bp={yaw:d,pitch:f,hfov:m};for(f=0;f<this.Jo.length;f++){var p=this.Jo[f];if(p.rd==c){p.nPa(d,m);break}}};b.prototype.bVa=function(c){this.qfa(c)&&(this.kCa(c),this.gia(c));this.lS.push(c);this.UUa(c);this.Tta(c)};b.prototype.B4a=function(c){var d=this.lS.indexOf(c);d>=0&&this.lS.splice(d,1);this.qfa(c)||(this.kCa(c),this.gia(c))};b.prototype.qfa=function(c){return this.lS.includes(c)};b.prototype.xe=function(c){for(var d=0;d<this.wy.length;d++)this.wy[d].xe(c);
for(d=0;d<this.Jo.length;d++)this.Jo[d].xe(c)};b.prototype.UUa=function(c){for(var d=c.get("overlays",[]),f=0;f<d.length;f++){var m=d[f];m instanceof g&&(m=new h(this.o,c,m),m.bind(h.oc,this.Sa,this,!0),m.bind(h.H$,this.iya,this,!0),this.wy.push(m))}};b.prototype.Tta=function(c){this.rd&&this.rd.get("map")==c&&this.rd.get("visible")!==!1&&(c=new e(this.o,c,this.rd),c.bind(e.oc,this.Sa,this,!0),c.bind(e.qaa,this.K1,this,!0),this.Jo.push(c),this.bp&&c.nPa(this.bp.yaw,this.bp.hfov));this.K1()};b.prototype.kCa=
function(c){c=c.get("overlays",[]);for(var d=0;d<c.length;d++)for(var f=c[d],m=0;m<this.wy.length;m++){var p=this.wy[m];if(p.match(f)){p.h(h.oc,this.Sa,this);p.h(h.H$,this.iya,this);p.clear();this.wy.splice(m,1);break}}};b.prototype.gia=function(c){for(var d=0;d<this.Jo.length;d++){var f=this.Jo[d];if(f.bb==c){f.h(e.oc,this.Sa,this);f.h(e.qaa,this.K1,this);f.clear();this.Jo.splice(d,1);break}}this.K1()};b.prototype.iya=function(){};b.prototype.Sa=function(){this.m(new k(b.oc))};b.prototype.K1=function(){for(var c=
!1,d=0;d<this.Jo.length;d++)this.Jo[d].seb()&&(c=!0);this.m(new k(b.G$,{inFOV:c}))};b.oc="request frame";b.G$="in fov change";return b});
define("tdv/player/view/map/control/PanoramaRotationController","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/map/constants/MovementMode tdv/player/view/map/control/overlays/Point".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),h=a("tdv/player/view/map/constants/MovementMode"),e=a("tdv/player/view/map/control/overlays/Point"),b=l.extend(g,function(c){g.call(this);
this.o=c;this.R=this.o.getParent();this.R.bind(k.fb,this.rg,this,!0);this.R.bind(k.Ra,this.kq,this,!0);this.R.bind(k.ab,this.Qy,this,!0);this.bb=null;this.Ce=this.rf=this.sf=void 0;this.rd=null;this.s2=this.HM=this.GM=void 0;this.Zu=!1;this.zd=this.yd=this.Vo=void 0;this.re=!1;this.Ga=0});b.prototype.clear=function(){this.R.h(k.fb,this.rg,this);this.R.h(k.Ra,this.kq,this);this.R.h(k.ab,this.Qy,this);this.o=this.rd=this.Ce=this.bb=this.R=null};b.prototype.VX=function(c){this.Zu=c;this.$ja()};b.prototype.QV=
function(c){c.LW()&&this.gDa(c.bb)};b.prototype.cna=function(c){c.LW()&&this.bb==c.bb&&this.gDa(null)};b.prototype.gDa=function(c){this.bb!=c&&((this.bb=c)?(this.sf=this.bb.get("width"),this.rf=this.bb.get("height"),this.Ce=this.bb.Tq()):(this.rf=this.sf=void 0,this.Ce=null))};b.prototype.SA=function(c){this.rd!=c&&((this.rd=c)?(this.GM=this.rd.get("x",0),this.HM=this.rd.get("y",0),this.s2=this.rd.get("angle",0)):this.s2=this.HM=this.GM=void 0)};b.prototype.jr=function(c,d){this.rd==c&&(this.Ga=d)};
b.prototype.Zt=function(c){this.Vo=c};b.prototype.kq=function(c){this.yd=c.x;this.zd=c.y;this.re=!0;this.$ja()};b.prototype.rg=function(c){this.yd=c.x;this.zd=c.y;this.xj&&(c=this.jxa(),this.m(new n(b.nj,{yawDelta:c-this.Cd})),this.Cd=c)};b.prototype.Qy=function(c){this.yd=c.x;this.zd=c.y;this.re=!1;this.$ja()};b.prototype.$ja=function(){var c=this.re&&this.rd&&this.bb&&(this.Vo==h.Gaa||this.Zu);this.xj!=c&&(this.xj=c)&&(this.Cd=this.jxa())};b.prototype.jxa=function(){var c=this.o.gb()*.5,d=this.o.Kb()*
.5,f=new e(this.yd,this.zd);f.translate(-c,-d);if(this.Vo==h.Gaa)return-Math.atan2(f.y,f.x)*180/Math.PI;c=this.o.r6(this.Ce)*Math.PI/180;d=this.o.q6(this.Ce);var m=this.o.p6(this.Ce),p=this.o.s6(this.Ce),q=this.o.t6(this.Ce);f.rotate(-c);f.scale(1/d,1/m);f.translate(p,q);f.scale(this.sf,this.rf);f.translate(-this.GM,-this.HM);return Math.atan2(f.y,f.x)*180/Math.PI};b.nj="request yaw change";return b});
define("tdv/player/view/map/control/RenderingController",["require","tdv/utils","tdv/events/Event","tdv/events/EventDispatcher","tdv/view/util/Animation"],function(a){var l=a("tdv/utils"),k=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=a("tdv/view/util/Animation"),h=l.extend(n,function(e){n.call(this);this.ha=!0;this.Tda=!1;this.o=e});h.prototype.clear=function(){this.ha=!1;this.o=null};h.prototype.requestFrame=function(){this.Tda||(this.Tda=!0,g.requestFrame(this.iq,this))};h.prototype.iq=
function(e){this.ha&&(this.Tda=!1,this.m(new k(h.uF,{frameTime:e})),this.m(new k(h.vF,{frameTime:e})),this.o.render())};h.uF="frameStart";h.vF="positionSet";return h});
define("tdv/player/view/map/control/Controller","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/map/control/CameraController tdv/player/view/map/control/DisplayController tdv/player/view/map/control/LoadController tdv/player/view/map/control/OverlaysController tdv/player/view/map/control/PanoramaRotationController tdv/player/view/map/control/RenderingController".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/events/Event"),
g=a("tdv/events/EventDispatcher"),h=a("tdv/player/view/map/control/CameraController"),e=a("tdv/player/view/map/control/DisplayController"),b=a("tdv/player/view/map/control/LoadController"),c=a("tdv/player/view/map/control/OverlaysController"),d=a("tdv/player/view/map/control/PanoramaRotationController"),f=a("tdv/player/view/map/control/RenderingController"),m=l.extend(g,function(p,q){g.call(this);this.R=p;this.o=q;this.o.set("visible",!1);this.B2=null;this.dm=new f(this.o);this.Be=new b(this.o);this.Wa=
new e(this.R,this.o);this.yb=new h(this.o);this.Hs=new c(this.o);this.jv=new d(this.o);this.R.bind(k.od,this.m2,this,!0);this.dm.bind(f.uF,this.iT,this,!0);this.dm.bind(f.vF,this.jT,this,!0);this.Be.bind(b.dZ,this.TS,this);this.Be.bind(b.N$,this.aAa,this);this.Be.bind(b.bZ,this.bAa,this);this.Wa.bind(e.oc,this.Yf,this,!0);this.Wa.bind(e.L$,this.Zza,this,!0);this.Wa.bind(e.cZ,this.cAa,this,!0);this.Wa.bind(e.M$,this.$za,this,!0);this.Wa.bind(e.iF,this.My,this,!0);this.Wa.bind(e.jF,this.LC,this,!0);
this.Wa.bind(e.x$,this.mza,this,!0);this.yb.bind(h.oc,this.Yf,this,!0);this.yb.bind(h.Bl,this.ys,this);this.Hs.bind(c.oc,this.Yf,this,!0);this.Hs.bind(c.G$,this.Pza,this,!0);this.jv.bind(d.nj,this.kT,this,!0);this.iwa=!1});m.prototype.Zt=function(p){this.yb.Zt(p);this.Wa.Zt(p);this.jv.Zt(p)};m.prototype.clear=function(){this.iwa=!0;this.Be.clear();this.dm.clear();this.yb.clear();this.Wa.clear();this.Hs.clear();this.jv.clear();this.R.h(k.od,this.m2,this);this.Be.h(b.dZ,this.TS,this);this.Be.h(b.N$,
this.aAa,this);this.Be.h(b.bZ,this.bAa,this);this.dm.h(f.uF,this.iT,this);this.dm.h(f.vF,this.jT,this);this.Wa.h(e.oc,this.Yf,this);this.Wa.h(e.L$,this.Zza,this);this.Wa.h(e.cZ,this.cAa,this);this.Wa.h(e.M$,this.$za,this);this.Wa.h(e.iF,this.My,this);this.Wa.h(e.jF,this.LC,this);this.Wa.h(e.x$,this.mza,this);this.yb.h(h.zSa,this.Yf,this);this.yb.h(h.Bl,this.ys,this);this.Hs.h(c.oc,this.Yf,this);this.Hs.h(c.G$,this.Pza,this);this.jv.h(d.nj,this.kT,this);this.R=this.o=this.jv=this.Hs=this.Wa=this.yb=
this.dm=this.Be=null};m.prototype.m2=function(){this.B2&&(this.gPa(this.B2),this.B2=null)};m.prototype.gPa=function(p){this.o.set("visible",!0);this.R.zy?this.Be.vLa(p):(this.Be.stop(),this.yb.stop(),this.Wa.Qe(),this.B2=p)};m.prototype.MA=function(){this.Be.stop();this.yb.stop();this.Wa.Qe()};m.prototype.wl=function(p){this.yb.wl(p)};m.prototype.SA=function(p){this.iwa||(this.yb.SA(p),this.Hs.SA(p),this.jv.SA(p))};m.prototype.jr=function(p,q,r,t){this.yb.jr(p,q,r,t);this.Hs.jr(p,q,r,t);this.jv.jr(p,
q,r,t)};m.prototype.bAa=function(p){var q=p.data.level;p=(p.data.percent+100*q.getIndex())/q.YIa();this.m(new n(m.ix,{percent:p}))};m.prototype.aAa=function(p){this.o.set("visible",!0);p=p.data.level;this.yb.stop();this.Wa.QV(p)};m.prototype.TS=function(){this.m(new n(m.hF))};m.prototype.Yf=function(){this.dm.requestFrame()};m.prototype.iT=function(p){this.yb.JA(p.data.frameTime)};m.prototype.jT=function(p){p=p.data.frameTime;this.Wa.xe(p);this.yb.xe(p);this.Hs.xe(p)};m.prototype.Zza=function(p){p=
p.data.level;this.Hs.QV(p);this.jv.QV(p)};m.prototype.cAa=function(p){p=p.data.level;this.Hs.cna(p);this.jv.cna(p)};m.prototype.$za=function(p){p=p.data.level;p.LW()&&this.yb.start(p)};m.prototype.mza=function(){this.o.set("visible",!1)};m.prototype.Pza=function(p){p=p.data.inFOV;this.yb.VX(p);this.jv.VX(p)};m.prototype.LC=function(p){this.m(new n(m.jF,{map:p.data.map}))};m.prototype.My=function(p){this.m(new n(m.iF,{map:p.data.map}))};m.prototype.ys=function(p){this.m(new n(m.Bl,p.data))};m.prototype.kT=
function(p){this.m(new n(m.nj,{yawDelta:p.data.yawDelta}))};m.Bl="movementChange";m.hF="loadingEnd";m.ix="loadingProgress";m.jF="mapShow";m.iF="mapHide";m.nj="requestYawChange";return m});define("tdv/player/view/image/RepositoryEntry",["require","tdv/constants/Priority"],function(a){function l(){this.status=l.oZ;this.progress=this.Hk=0;this.Uoa=[]}a("tdv/constants/Priority");l.LOADING="loading";l.ia="loaded";l.oZ="not loaded";return l});
define("tdv/player/view/image/Repository",["require","tdv/utils","tdv/constants/EventName","tdv/view/images/ImageLoader","tdv/player/view/image/RepositoryEntry"],function(a){function l(){this.kwa={};this.li=[];this.GC=[];this.Qd={}}function k(b,c){c=b.indexOf(c);c>=0&&b.splice(c,1)}var n=a("tdv/utils"),g=a("tdv/constants/EventName"),h=a("tdv/view/images/ImageLoader"),e=a("tdv/player/view/image/RepositoryEntry");l.prototype.Bqa=function(b){b=b.SD();for(var c=0,d=b.length;c<d;c++)if(this.sR(b[c]).status!=
e.ia)return!1;return!0};l.prototype.rA=function(b,c){this.li.push(b);this.XUa(b,c)};l.prototype.eo=function(b,c){var d=this.li.indexOf(b);d<0&&n.log("Unloading item not loaded");this.li.splice(d,1);this.y4a(b,c)};l.prototype.xg=function(b,c){return this.Qd[b].xg(c)};l.prototype.XUa=function(b,c){this.GC.push(b);b=b.SD();for(var d=0,f=b.length;d<f;d++){var m=b[d],p=this.sR(m);p.Hk++;p.Uoa.push(c);p.status==e.oZ&&(p.status=e.LOADING,this.O1a(m,Math.min.apply(Math,p.Uoa)))}this.bFa()};l.prototype.y4a=
function(b,c){this.GC=this.GC.filter(r=>r!==b);for(var d=b.SD(),f=0,m=d.length;f<m;f++){var p=d[f],q=this.sR(p);q.Hk--;k(q.Uoa,c);q.Hk==0&&q.status!=e.oZ&&(q.status=e.oZ,q.progress=0,this.z8a(p))}};l.prototype.bFa=function(b){b=(b==void 0?this.GC:this.hxa(b)).slice();for(var c=0;c<b.length;c++){for(var d=b[c],f=d.SD(),m=0,p=0,q=f.length,r=0;r<f.length;r++){var t=this.sR(f[r]);m+=t.progress;t.status==e.ia&&p++}d.qib(m/q);p==q&&(d.ZX(),this.GC=this.GC.filter(u=>u!==d))}};l.prototype.sR=function(b){var c=
this.kwa[b];c||(this.kwa[b]=c=new e);return c};l.prototype.hxa=function(b){for(var c=[],d=0;d<this.GC.length;d++){var f=this.GC[d];f.SD().includes(b)&&c.push(f)}return c};l.prototype.O1a=function(b,c){c=new h(c);this.Qd[b]=c;c.bind(g.ia,this.US,this,!0);c.bind(g.ad,this.VS,this,!0);c.load(b)};l.prototype.z8a=function(b){var c=this.Qd[b];delete this.Qd[b];c.h(g.ia,this.US,this);c.h(g.ad,this.VS,this);c.cancel()};l.prototype.US=function(b){b=b.source.ql();var c=this.sR(b);c.progress=100;c.status=e.ia;
this.bFa(b)};l.prototype.VS=function(b){b=b.source.ql();for(var c=this.hxa(b),d=0;d<c.length;d++){var f=c[d];this.eo(f);f.Phb()}n.log("Error loading: "+b)};return l.instance=new l});
define("tdv/player/view/map/renderer/renderers/ItemRenderer",["require","tdv/player/view/util/Device"],function(a){function l(k,n){this.Ja=k;this.Ia=n;this.Qfa=0;this.vv=this.tv=.5;this.kl=0;this.Mf=1;this.Zs=this.Ey=this.Ha=this.Pa=0;this.Vc=1;this.A0=this.C0=!0;this.fa=document.createElement("canvas");this.Fa=this.fa.getContext("2d")}a=a("tdv/player/view/util/Device");l.prototype.getItem=function(){return this.Ja};l.prototype.XV=function(k){return this.Ja==k?this:null};l.prototype.W5=function(k){return this.Ja==
k?[this]:[]};l.prototype.wi=function(){this.Ia&&this.Ia.vla(this)};l.prototype.Bf=function(k){this.k6a(k)};l.prototype.eDa=function(k){this.Qfa!=k&&(this.Qfa=k,this.Ia&&this.Ia.U6())};l.prototype.k6a=function(k){this.Mf!=k&&(this.Mf=k,this.T6())};l.prototype.G3=function(k){this.kl!=k&&(this.kl=k,this.T6())};l.prototype.jU=function(k,n){if(this.Pa!=k||this.Ha!=n)this.Pa=k,this.Ha=n,this.Q6()};l.prototype.un=function(k,n){if(this.Ey!=k||this.Zs!=n)this.Ey=k,this.Zs=n,this.T6()};l.prototype.T6=function(){this.Ia&&
this.Ia.R6()};l.prototype.Hf=function(){this.C0=!0};l.prototype.jb=function(){this.C0&&(this.C0=!1,this.Qh())};l.prototype.Qh=function(){};l.prototype.Q6=function(){this.A0=!0;this.T6()};l.prototype.Ep=function(){if(this.A0){this.A0=!1;if(this.fa.width!=this.Pa||this.fa.height!=this.Ha)this.fa.width=Math.round(this.Pa),this.fa.height=Math.round(this.Ha);this.Fa.clearRect(0,0,this.fa.width,this.fa.height);this.eh()}};l.prototype.eh=function(){};l.prototype.Pbb=function(k){if(this.Mf>0&&this.Pa>=1&&
this.Ha>=1){k.save();var n=Math.round(this.Ey),g=Math.round(this.Zs),h=Math.round(this.Pa*this.tv),e=Math.round(this.Ha*this.vv);k.scale(this.Vc,this.Vc);k.translate(n+h,g+e);k.rotate(this.kl*Math.PI/180);k.globalAlpha=this.Mf;k.drawImage(this.fa,-h,-e);k.restore()}};l.prototype.e6=function(){this.fa.width=this.fa.height=1;this.C0=this.A0=!0};l.Xra=Math.min(window.devicePixelRatio||1,a.Md()==a.gB?2:Infinity);l.tl=l.Xra;l.WSa=a.Md()==a.pj?16E6:256E6;return l});
define("tdv/player/view/map/renderer/renderers/ItemContainerRenderer",["require","tdv/utils","tdv/player/view/map/renderer/renderers/ItemRenderer"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/map/renderer/renderers/ItemRenderer");a=l.extend(k,function(n,g){k.call(this,n,g);this.pf=[];this.X4=null;this.ala=!0});a.prototype.bGa=function(n){n=this.zca(n);if(!n)throw"Container renderer can't create child renderer for an item";this.pf.push(n);this.U6();this.R6()};a.prototype.zca=function(){};
a.prototype.bOa=function(n){var g=this.$v(n);g&&(this.pf=this.pf.filter(h=>h!==g),this.U6(),this.R6())};a.prototype.XV=function(n){for(var g=k.prototype.XV.call(this,n),h=0;h<this.pf.length&&!g;h++)g=this.pf[h].XV(n);return g};a.prototype.W5=function(n){for(var g=k.prototype.W5.call(this,n),h=0;h<this.pf.length;h++)g=g.concat(this.pf[h].W5(n));return g};a.prototype.$v=function(n){for(var g=null,h=0;h<this.pf.length&&!g;h++)this.pf[h].getItem()==n&&(g=this.pf[h]);for(h=0;h<this.pf.length&&!g;h++)this.pf[h].getItem().$db(n)&&
(g=this.pf[h]);return g};a.prototype.vla=function(n){this.pf=this.pf.filter(g=>g!==n);this.pf.push(n);this.U6();this.R6()};a.prototype.U6=function(){this.ala=!0;this.Hf()};a.prototype.R6=function(){this.Q6()};a.prototype.jb=function(){k.prototype.jb.call(this);for(var n=0;n<this.pf.length;n++)this.pf[n].jb()};a.prototype.Qh=function(){if(this.ala){this.ala=!1;for(var n=[],g=0;g<this.pf.length;g++){var h=this.pf[g];n.push({l:h.Qfa,z:g,r:h})}n.sort(function(e,b){return e.l==b.l?e.z-b.z:e.l-b.l});this.X4=
[];for(g=0;g<n.length;g++)this.X4.push(n[g].r);this.Q6()}k.prototype.Qh.call(this)};a.prototype.Ep=function(){for(var n=0;n<this.pf.length;n++)this.pf[n].Ep();k.prototype.Ep.call(this)};a.prototype.eh=function(){for(var n=0;n<this.X4.length;n++)this.X4[n].Pbb(this.Fa);k.prototype.eh.call(this)};a.prototype.e6=function(){for(var n=0;n<this.pf.length;n++)this.pf[n].e6();k.prototype.e6.call(this)};return a});
define("tdv/player/view/map/renderer/renderers/OverlayRenderer",["require","tdv/utils","tdv/player/view/map/renderer/renderers/ItemRenderer"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/map/renderer/renderers/ItemRenderer");a=l.extend(k,function(n,g){k.call(this,n,g)});a.prototype.U8=function(){};return a});
define("tdv/player/view/map/renderer/renderers/FovOverlayRenderer",["require","tdv/utils","tdv/player/view/map/renderer/renderers/OverlayRenderer","tdv/player/view/util/Device"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/map/renderer/renderers/OverlayRenderer"),n=a("tdv/player/view/util/Device");a=l.extend(k,function(g,h){k.call(this,g,h);this.A2=this.Ia.getItem().dg();this.z2=this.Ia.getItem().wg();this.Vc=2;this.D_=0;this.kb=Math.PI*.5;this.kfa=this.lfa=!0;this.cn=1;this.B0=!0;this.eDa(1)});
a.prototype.U8=function(g,h){this.cn!=h&&(this.cn=h,this.B0=!0,this.Hf())};a.prototype.UOa=function(g,h){this.kb!=h&&(this.kb=h,this.lfa=!0,this.Hf());this.D_!=g&&(this.D_=g,this.kfa=!0,this.Hf())};a.prototype.Qh=function(){this.lfa&&(this.lfa=!1,this.Q6());if(this.B0||this.kfa){this.kfa=this.B0=!1;this.Vc=Math.max(1,Math.ceil(Math.sqrt(this.A2*this.A2+this.z2*this.z2))/(n.Md()==n.pj?1024:4096));var g=this.cn/this.Vc,h=this.Ja.getX()*g,e=this.Ja.getY()*g,b=Math.max(h,g*this.A2-h);g=Math.max(e,g*this.z2-
e);b=Math.ceil(Math.sqrt(b*b+g*g))*2;var c=this.D_*Math.PI/180;g=Math.cos(c);c=Math.sin(c);h=h-this.tv*b-(.5-this.tv)*b*g+(.5-this.vv)*b*c;e=e-this.vv*b-(.5-this.vv)*b*g-(.5-this.tv)*b*c;this.B0=!1;this.un(h,e);this.jU(b,b);this.G3(this.D_)}k.prototype.Qh.call(this)};a.prototype.eh=function(){var g=this.Ja.W0a,h=this.Ja.E3a;if(h>0||g>0){var e=this.cn*this.A2,b=this.cn*this.z2;e=Math.ceil(Math.sqrt(e*e+b*b))*this.Ja.kA()/this.Vc;b=Math.round(this.Pa*.5);var c=Math.round(this.Ha*.5),d=this.kb*Math.PI/
180,f=-d*.5;d=f+d;h>0&&(this.Fa.fillStyle=this.Ja.D3a,this.Fa.globalAlpha=h,this.Fa.rect(0,0,this.Pa,this.Ha),this.Fa.fill(),this.Fa.globalCompositeOperation="destination-out",this.Fa.fillStyle="#FFFFFF",this.Fa.globalAlpha=1,this.Fa.beginPath(),this.Fa.moveTo(b,c),this.Fa.arc(b,c,e,f,d,!1),this.Fa.lineTo(b,c),this.Fa.closePath(),this.Fa.fill(),this.Fa.globalCompositeOperation="source-over");g>0&&(this.Fa.fillStyle=this.Ja.V0a,this.Fa.globalAlpha=g,this.Fa.beginPath(),this.Fa.moveTo(b,c),this.Fa.arc(b,
c,e,f,d,!1),this.Fa.lineTo(b,c),this.Fa.closePath(),this.Fa.fill())}k.prototype.eh.call(this)};return a});
define("tdv/player/view/map/renderer/renderers/ImageOverlayRenderer","require tdv/utils tdv/player/view/map/renderer/renderers/ItemRenderer tdv/player/view/map/renderer/renderers/OverlayRenderer tdv/player/view/image/Repository tdv/view/images/ScalableImage".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/player/view/map/renderer/renderers/ItemRenderer"),n=a("tdv/player/view/map/renderer/renderers/OverlayRenderer"),g=a("tdv/player/view/image/Repository"),h=a("tdv/view/images/ScalableImage");
a=l.extend(n,function(e,b){n.call(this,e,b);this.eDa(this.Ja.DCa?0:2);this.Gd=g.xg(this.Ja.ql());this.r3=new h(this.Gd,this.Gd.width,this.Gd.height);this.r3.yP(this.Ja.ri);this.r3.CP(this.Ja.DO());this.r3.wP(this.Ja.BO());this.jS=0;this.cn=1;this.$fa=!0});a.prototype.U8=function(e,b){if(this.jS!=e||this.cn!=b)this.jS=e,this.cn=b,this.$fa=!0,this.Hf()};a.prototype.Qh=function(){if(this.$fa){this.$fa=!1;var e=this.Ja.getX(),b=this.Ja.getY(),c=this.Ja.dg(),d=this.Ja.wg(),f=this.Ja.yJa(),m=this.Ja.zJa();
if(this.Ja.DCa)this.G3(0),this.un((e-f)*this.cn,(b-m)*this.cn),this.jU(c*this.cn,d*this.cn);else{c*=k.tl;d*=k.tl;f*=k.tl;m*=k.tl;var p=Math.cos(-this.jS*Math.PI/180),q=Math.sin(-this.jS*Math.PI/180);e=e*this.cn-this.tv*c-(f-this.tv*c)*p+(m-this.vv*d)*q;b=b*this.cn-this.vv*d-(m-this.vv*d)*p-(f-this.tv*c)*q;this.G3(-this.jS);this.un(e,b);this.jU(c,d)}}n.prototype.Qh.call(this)};a.prototype.eh=function(){this.r3.oO(this.Fa,this.fa.width,this.fa.height);n.prototype.eh.call(this)};return a});
define("tdv/player/view/map/renderer/renderers/MapRenderer","require tdv/utils tdv/view/constants/ScaleMode tdv/player/view/image/Repository tdv/player/view/map/renderer/item/Item tdv/player/view/map/renderer/item/Overlay tdv/player/view/map/renderer/renderers/FovOverlayRenderer tdv/player/view/map/renderer/renderers/ImageOverlayRenderer tdv/player/view/map/renderer/renderers/ItemContainerRenderer".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/view/constants/ScaleMode"),n=a("tdv/player/view/image/Repository"),
g=a("tdv/player/view/map/renderer/item/Item"),h=a("tdv/player/view/map/renderer/item/Overlay"),e=a("tdv/player/view/map/renderer/renderers/FovOverlayRenderer"),b=a("tdv/player/view/map/renderer/renderers/ImageOverlayRenderer"),c=a("tdv/player/view/map/renderer/renderers/ItemContainerRenderer");a=l.extend(c,function(d,f){c.call(this,d,f,d.oq);this.ii=this.Ja.dg();this.gk=this.Ja.wg();this.ri=this.Ja.ri;this.yZa=this.Ja.xZa;this.Mg=this.Ng=100;this.rca=!0;this.ec=this.dc=.5;this.Cd=0;this.jc=1;this.Q2=
!0;this.Lj=1;this.Gd=n.xg(this.Ja.ql())});a.prototype.zca=function(d){if(d.getType()!=g.dta)throw"Invalid item type";switch(d.G3a){case h.ata:d=new e(d,this);break;case h.bta:d=new b(d,this);break;default:d=null}d&&d.U8(this.Cd,this.Lj*this.jc);return d};a.prototype.getX=function(){return this.dc};a.prototype.getY=function(){return this.ec};a.prototype.zO=function(){return this.Cd};a.prototype.lA=function(){return this.jc};a.prototype.gb=function(){return Math.round(this.ii*this.jc*this.Lj)};a.prototype.Kb=
function(){return Math.round(this.gk*this.jc*this.Lj)};a.prototype.K8=function(d,f){if(this.Ng!=d||this.Mg!=f)this.Ng=d,this.Mg=f,this.rca=!0,this.Hf()};a.prototype.setPosition=function(d,f,m,p){if(this.dc!=d||this.ec!=f||this.Cd!=m||this.jc!=p)this.dc=d,this.ec=f,this.Cd=m,this.jc=p,this.Q2=!0,this.Hf()};a.prototype.Qh=function(){if(this.rca){this.rca=!1;switch(this.ri){case k.NONE:this.Lj=1;break;case k.Lp:this.Lj=this.Ng/this.ii;break;case k.Qk:this.Lj=this.Mg/this.gk;break;case k.Dr:this.Lj=this.ii*
this.Mg>this.gk*this.Ng?this.Mg/this.gk:this.Ng/this.ii;break;default:this.Lj=this.ii*this.Mg>this.gk*this.Ng?this.Ng/this.ii:this.Mg/this.gk}this.Q2=!0}if(this.Q2){this.Q2=!1;var d=this.gb(),f=this.Kb(),m=Math.cos(this.Cd*Math.PI/180),p=Math.sin(this.Cd*Math.PI/180);this.un(this.Ng*.5-this.tv*d+(this.tv-this.dc)*m*d-(this.vv-this.ec)*p*f,this.Mg*.5-this.vv*f+(this.vv-this.ec)*m*f+(this.tv-this.dc)*p*d);this.G3(this.Cd);this.jU(d,f);for(d=0;d<this.pf.length;d++)this.pf[d].U8(this.Cd,this.Lj*this.jc)}c.prototype.Qh.call(this)};
a.prototype.eh=function(){var d=Math.round(this.Pa),f=Math.round(this.Ha);this.yZa?(this.Fa.save(),this.Fa.translate(d,0),this.Fa.scale(-1,1),this.Fa.drawImage(this.Gd,0,0,d,f),this.Fa.restore()):this.Fa.drawImage(this.Gd,0,0,d,f);c.prototype.eh.call(this)};return a});
define("tdv/player/view/map/renderer/renderers/MapsRenderer",["require","tdv/utils","tdv/player/view/map/renderer/item/Item","tdv/player/view/map/renderer/renderers/ItemContainerRenderer","tdv/player/view/map/renderer/renderers/MapRenderer"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/map/renderer/item/Item"),n=a("tdv/player/view/map/renderer/renderers/ItemContainerRenderer"),g=a("tdv/player/view/map/renderer/renderers/MapRenderer");a=l.extend(n,function(){n.call(this,null,null);this.dca=
!0});a.prototype.bc=function(){return this.fa};a.prototype.render=function(){this.jb();this.Ep()};a.prototype.Zcb=function(){for(var h=1,e=0;e<this.pf.length;e++){var b=this.pf[e];b=b.gb()*b.Kb();h<b&&(h=b)}return h};a.prototype.zca=function(h){if(h.getType()!=k.cta)throw"Invalid item type";h=new g(h,this);h.K8(this.Pa,this.Ha);h.setPosition(.5,.5,0,1);return h};a.prototype.setSize=function(h,e){this.jU(h,e);this.dca=!0;this.Hf()};a.prototype.Qh=function(){if(this.dca){this.dca=!1;for(var h=0;h<this.pf.length;h++)this.pf[h].K8(this.Pa,
this.Ha)}n.prototype.Qh.call(this)};return a});
define("tdv/player/view/map/renderer/Renderer","require tdv/utils tdv/constants/EventName tdv/constants/Priority tdv/player/view/image/Repository tdv/player/view/map/renderer/renderers/ItemRenderer tdv/player/view/map/renderer/renderers/MapsRenderer tdv/player/view/util/XR tdv/view/constants/Cursor tdv/view/core/UIComponent".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/constants/Priority"),g=a("tdv/player/view/image/Repository"),h=a("tdv/player/view/map/renderer/renderers/ItemRenderer"),
e=a("tdv/player/view/map/renderer/renderers/MapsRenderer"),b=a("tdv/player/view/util/XR"),c=a("tdv/view/constants/Cursor"),d=a("tdv/view/core/UIComponent");a=l.extend(d,function(){d.call(this);this.df("Renderer");this.set("toolTipDisabled",!0);this.set("cursor",c.wB);this.iC=[];this.kI=[];this.hc="";this.mi=new e;this.bind(k.Zb,this.kd,this,!0);this.bind(k.od,this.Zo,this,!0);this.bind(k.jd,this.Xo,this,!0);b.M.bind(k.V,this.rka,this,!0);this.nia=this.mia=!1});a.prototype.Ib=function(){d.prototype.Ib.call(this);
var f=this.mi.bc();f.parentElement||this.va().vk(f)};a.prototype.rA=function(f){g.rA(f,n.Mp)};a.prototype.Bqa=function(f){return g.Bqa(f)};a.prototype.eo=function(f){g.eo(f,n.Mp)};a.prototype.o$a=function(f){this.mi.bGa(f)};a.prototype.removeItem=function(f){this.mi.bOa(f)};a.prototype.Z4=function(f,m){this.mi.$v(f).bGa(m);this.oka()};a.prototype.Qgb=function(f,m){(f=this.mi.$v(f))&&f.bOa(m)};a.prototype.R$a=function(f){this.mi.XV(f).wi()};a.prototype.PA=function(f,m){this.mi.W5(f).forEach(function(p){p.Bf(m)})};
a.prototype.Ipa=function(f,m,p,q,r){this.mi.$v(f).setPosition(m,p,q,r);this.oka()};a.prototype.oka=function(){var f=this.mi.Zcb();f&&(h.tl=Math.min(h.Xra,h.tl*Math.sqrt(h.WSa/f)),this.cFa())};a.prototype.iib=function(f,m,p){this.mi.XV(f).UOa(m,p)};a.prototype.s6=function(f){return this.mi.$v(f).getX()};a.prototype.t6=function(f){return this.mi.$v(f).getY()};a.prototype.r6=function(f){return this.mi.$v(f).zO()};a.prototype.Rcb=function(f){return this.mi.$v(f).lA()};a.prototype.q6=function(f){return this.mi.$v(f).gb()/
h.tl};a.prototype.p6=function(f){return this.mi.$v(f).Kb()/h.tl};a.prototype.render=function(){this.nia&&this.mi.render()};a.prototype.x8=function(f){this.iC.push(f);this.VU()};a.prototype.mP=function(f){f=this.iC.lastIndexOf(f);f>=0&&this.iC.splice(f,1);this.VU()};a.prototype.VU=function(){var f=this.iC.length>0?this.iC[this.iC.length-1]:c.lf;this.getParent().set("cursor",f)};a.prototype.j_=function(){this.iC.length>0&&(this.getParent().set("cursor",c.lf),this.iC=[])};a.prototype.Hgb=function(f){this.kI.push(f);
this.bV()};a.prototype.Agb=function(f){f=this.kI.lastIndexOf(f);f>=0&&this.kI.splice(f,1);this.bV()};a.prototype.bV=function(){var f=this.kI.length==0?"":this.kI[this.kI.length-1]||"";this.hc!=f&&(this.hc=f,this.getParent().set("toolTip",this.hc))};a.prototype.fXa=function(){this.hc&&this.getParent().set("toolTip","");this.hc="";this.kI=[]};a.prototype.hp=function(){this.fXa();this.j_();d.prototype.hp.call(this)};a.prototype.kd=function(){this.cFa();this.oka()};a.prototype.cFa=function(){var f=this.mi.bc();
f.style.transform=h.tl!=1?"scale("+(1/h.tl).toFixed(3)+")":"none";f.style.transformOrigin="0% 0%";this.mi.setSize(this.gb()*h.tl,this.Kb()*h.tl);this.render()};a.prototype.Zo=function(){this.mia=!0;this.rka()};a.prototype.Xo=function(){this.mia=!1;this.rka()};a.prototype.rka=function(){var f=this.mia&&!b.isPresenting;this.nia!=f&&((this.nia=f)?(this.kd(),this.render()):this.mi.e6())};return a});
define("tdv/player/script/MapPlayer","require tdv/utils tdv/events/Event tdv/player/parser/ClassInfo tdv/player/script/helper/ButtonProperty tdv/player/script/MediaPlayer tdv/player/view/map/control/Controller tdv/player/view/map/control/constants/Movement tdv/player/view/map/renderer/Renderer tdv/constants/EventName tdv/view/constants/ButtonMode tdv/view/constants/State".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/events/Event"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/player/script/helper/ButtonProperty"),
h=a("tdv/player/script/MediaPlayer"),e=a("tdv/player/view/map/control/Controller"),b=a("tdv/player/view/map/control/constants/Movement"),c=a("tdv/player/view/map/renderer/Renderer"),d=a("tdv/constants/EventName"),f=a("tdv/view/constants/ButtonMode"),m=a("tdv/view/constants/State"),p=n.define("MapPlayer",h,function(){h.call(this,"map");this.v1=this.Zfa=this.ej=!1;this.bp=this.rd=this.U=this.o=null;this.UB={};for(var q in p.Dx)this.UB[q]=this.EXa(q);this.Zd=l.ar(this.Qh,this)});p.prototype.stop=function(){this.md(b.Dg)};
p.prototype.rotateClockwise=function(){this.md(b.Aaa)};p.prototype.rotateCounterClockwise=function(){this.md(b.Baa)};p.prototype.zoomIn=function(){this.md(b.Bx)};p.prototype.zoomOut=function(){this.md(b.Cx)};p.prototype.set=function(q,r){if(this.get(q)!=r){switch(q){case "map":this.Zfa=!0;this.Zd();break;case "viewerArea":this.ej=!0;this.Zd();break;case "panoramaMapLocation":this.nha=!0;this.Zd();break;case "movementMode":this.v1=!0,this.Zd()}h.prototype.set.call(this,q,r)}};p.prototype.EXa=function(q){var r=
p.Dx[q];q=new g(this,q,f.Ze);q.bind(d.Ra,function(){this.md(r.movement)},this);r.stopOnRelease&&q.bind(d.ab,function(){this.md(b.Dg)},this);return q};p.prototype.u$a=function(q){this.bp=null;this.set("map",q.get("map"));this.set("panoramaMapLocation",q)};p.prototype.Xgb=function(q){this.get("panoramaMapLocation")==q&&(this.set("panoramaMapLocation",null),this.bp=null)};p.prototype.jr=function(q,r,t,u){this.U&&this.U.jr(q,r,t,u);this.bp={yaw:r,pitch:t,hfov:u}};p.prototype.Qh=function(){this.ej&&(this.ej=
!1,this.Yx(),this.get("viewerArea")&&this.Xx(),this.lU(this.get("viewerArea")));if(this.U){if(this.Zfa){this.Zfa=!1;var q=this.get("map");q?(this.MJ(),this.U.gPa(q)):this.U.MA();this.nha=this.v1=!0}this.nha&&(this.nha=!1,q=this.get("panoramaMapLocation"),this.U.SA(q),q&&this.bp&&this.U.jr(q,this.bp.yaw,this.bp.pitch,this.bp.hfov));this.v1&&(this.v1=!1,this.U.Zt(this.get("movementMode")))}};p.prototype.rN=function(){this.set("map",null)};p.prototype.Xx=function(){var q=this.get("viewerArea");this.o=
new c;this.o.wa({left:0,top:0,bottom:0,right:0});q.mb(this.o);this.U=new e(q,this.o);this.U.bind(e.Bl,this.ys,this);this.U.bind(e.ix,this.Ej,this);this.U.bind(e.hF,this.yM,this);this.U.bind(e.jF,this.LC,this);this.U.bind(e.iF,this.My,this);this.U.bind(e.nj,this.kT,this,!0)};p.prototype.Yx=function(){this.o&&(this.U.h(e.Bl,this.ys,this),this.U.h(e.ix,this.Ej,this),this.U.h(e.hF,this.yM,this),this.U.h(e.jF,this.LC,this),this.U.h(e.iF,this.My,this),this.U.h(e.nj,this.kT,this),this.U.clear(),this.o.getParent().removeChild(this.o),
this.o=null)};p.prototype.LC=function(q){this.qS(q.data.map)};p.prototype.My=function(q){this.pS(q.data.map)};p.prototype.ys=function(q){for(var r in p.Dx)this.UB[r].set("state",q.data[p.Dx[r].pressedOn]?m.Nb:m.lf);this.m(new k(d.fsa,q.data))};p.prototype.kT=function(q){this.m(new k(p.nj,{yawDelta:q.data.yawDelta}))};p.prototype.Ej=function(q){this.o.getParent().wa({progressPercent:q.data.percent,progressVisible:!0})};p.prototype.yM=function(){this.o.getParent().set("progressVisible",!1)};p.prototype.md=
function(q){this.U&&this.U.wl(q)};p.Dx={buttonRotateClockwise:{movement:b.Aaa,pressedOn:"rotatingClockwise",stopOnRelease:!0},buttonRotateCounterClockwise:{movement:b.Baa,pressedOn:"rotatingCounterClockwise",stopOnRelease:!0},buttonZoomIn:{movement:b.Bx,pressedOn:"zoomingIn",stopOnRelease:!0},buttonZoomOut:{movement:b.Cx,pressedOn:"zoomingOut",stopOnRelease:!0}};p.nj="requestYawChange";return p});
define("tdv/player/script/PlayListItem","require exports tdv/player/parser/ClassInfo tdv/constants/EventName tdv/events/Event tdv/binding/Bindable".split(" "),function(a,l,k,n,g,h){a=function(e){function b(){var c=e.call(this)||this;c.H="stopped";return c}O(b,e);b.prototype.get=function(c,d){d===void 0&&(d=void 0);return c=="state"?this.H:h.prototype.get.call(this,c,d)};b.prototype.start=function(){this.wkb()};b.prototype.wkb=function(){if(this.H=="stopped"||this.H=="stopping")this.H="startin",this.m(new g(n.Np))};
b.prototype.CD=function(){this.OQa()};b.prototype.OQa=function(){if(this.H=="startin"||this.H=="stopping")this.H="playing",this.m(new g(n.vr))};b.prototype.stop=function(){this.LP()};b.prototype.LP=function(){if(this.H=="playing"||this.H=="startin")this.H="stopping",this.m(new g(n.Dg))};b.prototype.end=function(){this.PQa()};b.prototype.PQa=function(){if(this.H=="stopping"||this.H=="startin")this.H="stopped",this.m(new g(n.Sb))};return b}(h);k.create("PlayListItem",a);return a});
define("tdv/player/script/MapPlayListItem",["require","tdv/player/parser/ClassInfo","tdv/player/script/MediaPlayer","tdv/player/script/PlayListItem"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/MediaPlayer"),n=a("tdv/player/script/PlayListItem");a=l.define("MapPlayListItem",n,function(){n.call(this)});a.prototype.start=function(){n.prototype.start.call(this);var g=this.get("player");g&&(g.bind(k.ai,this.LC,this),g.set("map",this.get("media")))};a.prototype.stop=function(){var g=
this.get("player");g&&g.get("map")==this.get("media")&&g.set("map",null);n.prototype.stop.call(this)};a.prototype.LC=function(){this.get("player").h(k.ai,this.LC,this);this.get("player").bind(k.lo,this.My,this);this.CD();this.get("player").get("map")!=this.get("media")&&this.My()};a.prototype.My=function(){this.get("player").h(k.lo,this.My,this);this.stop();this.end()};return a});
define("tdv/player/script/MeasureModel3DObject",["require","tdv/constants/EventName","tdv/player/parser/ClassInfo","tdv/player/script/ExternalModel3DObject"],function(a){var l=a("tdv/constants/EventName"),k=a("tdv/player/parser/ClassInfo"),n=a("tdv/player/script/ExternalModel3DObject"),g=k.define("MeasureModel3DObject",n,function(){n.call(this);this.bind(l.N("mode"),function(){this.m(g.tSa)},this,!0);this.bind(l.N("distance"),function(){this.m(g.pSa)},this,!0)});g.tSa="modeChange";g.pSa="distanceChange";
return g});define("tdv/player/script/MeasureModel3DObjectPoint",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("MeasureModel3DObjectPoint",l,function(){l.call(this)})});
define("tdv/player/script/OrbitModel3DCamera",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DCamera"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/Model3DCamera");return l.define("OrbitModel3DCamera",k,function(){k.call(this)})});
define("tdv/player/view/util/LoadingGroup",["require","exports","tdv/constants/EventName","tdv/events/EventDispatcher"],function(a,l,k,n){var g=function(){return function(h){this.tHa=h;this.percent=0;this.finished=!1}}();return function(h){function e(b){var c=h.call(this)||this;c.Po=new Map;c.FL=b||c;return c}O(e,h);e.prototype.Qhb=function(b){if(this.FL=b)this.uk(),this.B4()};e.prototype.update=function(){this.uk();this.B4()};e.prototype.kHa=function(){this.Po.forEach(function(b,c){this.a3(c)}.bind(this));
this.Po=new Map};e.prototype.kj=function(){var b=0;this.Po.forEach(function(c){c.finished&&b++});return b==this.Po.size};e.prototype.dispose=function(){this.kHa();this.Po.clear();this.FL=void 0};e.prototype.QN=function(b,c){c===void 0&&(c=1);if(this.Po.has(b))return b;this.Po.set(b,new g(c));this.ZUa(b);return b};e.prototype.qP=function(b){this.Po.has(b)&&(this.Po["delete"](b),this.a3(b))};e.prototype.Xv=function(b){b===void 0&&(b=1);var c=new n;return this.QN(c,b)};e.prototype.Ke=function(b){b=b.source;
var c=this.Po.get(b);c&&(this.a3(b),c.percent=100,c.finished=!0,this.uk(),this.B4())};e.prototype.Ej=function(b){this.Po.get(b.source).percent=b.data.percent;this.uk()};e.prototype.th=function(b){b=b.source;this.a3(b);b=this.Po.get(b);b.finished=!0;b.percent=100;this.FL.m(k.ad);this.uk();this.B4()};e.prototype.uk=function(){var b=0,c=0;this.Po.forEach(function(d){c+=d.tHa;b+=d.percent*d.tHa});this.FL.m(k.xc,{percent:c?b/c:100})};e.prototype.B4=function(){this.kj()&&this.FL.m(k.ia)};e.prototype.ZUa=
function(b){b.bind(k.ia,this.Ke,this,!0);b.bind(k.xc,this.Ej,this,!0);b.bind(k.ad,this.th,this,!0)};e.prototype.a3=function(b){b.h(k.ia,this.Ke,this);b.h(k.xc,this.Ej,this);b.h(k.ad,this.th,this)};return e}(n)});
define("tdv/player/script/Model3D","require tdv/constants/EventName tdv/constants/PlaybackState tdv/player/parser/ClassInfo tdv/player/script/Media tdv/player/script/OrbitModel3DCamera tdv/player/view/util/LoadingGroup".split(" "),function(a){function l(r,t){Array.isArray(t)?r.fromArray(t):r.copy(t);return r}function k(r,t){Array.isArray(t)?r.fromArray(t):r.copy(t);return r}function n(r,t){if(Array.isArray(t))return r.toArray(t);t.x=r.x;t.y=r.y;t.z=r.z;return t}var g=a("tdv/constants/EventName"),
h=a("tdv/constants/PlaybackState"),e=a("tdv/player/parser/ClassInfo"),b=a("tdv/player/script/Media"),c=a("tdv/player/script/OrbitModel3DCamera"),d=a("tdv/player/view/util/LoadingGroup");a=e.define("Model3D",b,function(){b.call(this);this.set("camera",new c);this.set("geometryQuery",void 0);this.set("objectQuery",void 0);this.set("metadataQuery",void 0);this.set("preload",!0)});a.prototype.lpa=function(){this.Jj&&(this.Jj.h(g.ia,this.CM,this),this.Jj.dispose());this.Jj=new d;this.Jj.bind(g.ia,this.CM,
this,!0);this.qf&&this.qf.dispose();this.qf=new d(this)};a.prototype.CM=function(){this.m(g.IF)};a.prototype.u6=function(){this.qf||this.lpa();return this.qf};a.prototype.x6=function(){this.Jj||this.lpa();return this.Jj};a.prototype.pause=function(){this.get("state")==h.PLAYING&&this.set("state",h.Yb)};a.prototype.play=function(){this.set("state",h.PLAYING)};a.prototype.stop=function(){this.set("state",h.ca)};a.prototype.worldPositionToLocal=function(r,t){k(f,r);l(p,t);p.invert();f.applyMatrix4(p);
return n(f,r)};a.prototype.getMatrixWorld=function(r){var t=this.get("objectQuery");return t&&t.sJa(r)};a.prototype.worldDirectionToLocal=function(r,t){k(f,r);l(q,t);p.extractRotation(q);p.invert();f.applyMatrix4(p);return n(f,r)};a.prototype.testIntersection=function(r,t){var u=this.get("geometryQuery");if(u)return k(f,r),k(m,t),u.fK(f,m)};a.prototype.getDistanceToFloor=function(r){var t=this.get("geometryQuery");if(t)return k(f,r),t.Ccb(f)};a.prototype.getMetadata=function(){var r=this.get("metadataQuery");
if(r)return r.getMetadata()};a.prototype.pick=function(r,t){var u=this.get("picker");if(u)return u.Koa(r,t)};a.prototype.getScreenPosition=function(r,t){var u=this.get("projectionQuery");if(u)return u.Yma(k(f,r),t)};var f=new THREE.Vector3,m=new THREE.Vector3,p=new THREE.Matrix4,q=new THREE.Matrix4;a.prototype.iw=function(){return[]};return a});
define("tdv/player/script/Model3DAnimation",["require","tdv/binding/Bindable","tdv/constants/PlaybackState","tdv/constants/EventName","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable"),k=a("tdv/constants/PlaybackState"),n=a("tdv/constants/EventName");a=a("tdv/player/parser/ClassInfo").define("Model3DAnimation",l,function(){l.call(this);this.bind(n.N("state"),function(){this.m(n.$e)},this,!0)});a.prototype.pause=function(){this.get("state")==k.PLAYING&&this.set("state",k.Yb)};
a.prototype.play=function(){this.set("currentDirection","forward");this.set("state",k.PLAYING)};a.prototype.reverse=function(){this.set("currentDirection","backward");this.set("state",k.PLAYING)};a.prototype.stop=function(){this.set("currentTime",0);this.set("state",k.ca)};return a});
define("tdv/player/script/Model3DCameraSequence",["require","tdv/binding/Bindable","tdv/constants/PlaybackState","tdv/player/parser/ClassInfo","tdv/constants/EventName"],function(a){var l=a("tdv/binding/Bindable"),k=a("tdv/constants/PlaybackState"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/constants/EventName");a=n.define("Model3DCameraSequence",l,function(){l.call(this);this.set("state",k.ca);this.bind(g.N("state"),function(){this.m(g.$e)},this,!0)});a.prototype.play=a.prototype.play=function(){this.set("state",
k.PLAYING)};a.prototype.pause=a.prototype.pause=function(){this.get("state")==k.PLAYING&&this.set("state",k.Yb)};a.prototype.stop=a.prototype.stop=function(){this.set("state",k.ca)};return a});define("tdv/player/script/Model3DDisplayEffect",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("Model3DDisplayEffect",l,function(){l.call(this)})});
define("tdv/player/script/PlaybackMediaPlayer","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/player/script/helper/ButtonProperty tdv/player/script/MediaPlayer tdv/constants/PlaybackState tdv/view/constants/ButtonMode tdv/view/constants/State".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/player/script/helper/ButtonProperty"),h=a("tdv/player/script/MediaPlayer"),e=a("tdv/constants/PlaybackState"),b=a("tdv/view/constants/ButtonMode"),
c=a("tdv/view/constants/State");a=l.extend(h,function(){h.call(this,!0);this.lv=!1;this.pN=!0;this.H=e.ca;this.jG=new g(this,"buttonPlayPause",b.Vk);this.jG.bind(k.Sk,this.Y2a,this,!0);this.jG.bind(k.Nm,this.Z2a,this,!0);this.gL=new g(this,"buttonPause",b.Ze);this.gL.bind(k.la,this.EH,this,!0);this.hL=new g(this,"buttonPlay",b.Ze);this.hL.bind(k.la,this.FH,this,!0);this.jL=new g(this,"buttonStop",b.Ze);this.jL.bind(k.la,this.QC,this,!0);this.DWa=new g(this,"buttonRestart",b.Ze);this.DWa.bind(k.la,
this.PC,this,!0);this.aya=l.ar(this.j9a,this);this.aya()});a.prototype.set=function(d,f){d!="state"&&h.prototype.set.call(this,d,f)};a.prototype.get=function(d,f){switch(d){case "state":return this.H}return h.prototype.get.call(this,d,f)};a.prototype.j9a=function(){this.pN&&(this.pN=!1,this.gL.set("state",this.H==e.Yb?c.Nb:c.lf),this.hL.set("state",this.H==e.PLAYING||this.H==e.Yb?c.Nb:c.lf),this.jG.set("pressed",this.H==e.PLAYING),this.jL.set("state",this.H==e.ca?c.Nb:c.lf))};a.prototype.kD=function(d){this.lv!=
d&&((this.lv=d)||this.Id(e.ca))};a.prototype.Id=function(d){var f=this.H;this.H=d;h.prototype.set.call(this,"state",d);f!=this.H&&(this.pN=!0,this.aya(),this.m(new n(k.$e,{oldState:f,state:this.H})))};a.prototype.EH=function(){this.lv&&(this.H==e.Yb?this.Xl():this.Is())};a.prototype.FH=function(){this.lv&&this.Xl()};a.prototype.Y2a=function(){this.lv&&this.Xl()};a.prototype.Z2a=function(){this.lv&&this.Is()};a.prototype.QC=function(){this.lv&&this.Dq()};a.prototype.PC=function(){this.lv&&(this.Dq(),
this.Xl())};a.prototype.Xl=function(){};a.prototype.Is=function(){};a.prototype.Dq=function(){};return a});
define("tdv/player/view/model3d/controller/DisplayController",["require","tdv/utils","tdv/view/util/Animation","tdv/events/Event","tdv/events/EventDispatcher"],function(a){var l=a("tdv/utils"),k=a("tdv/view/util/Animation"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),h=l.extend(g,function(e,b){g.call(this);this.R=e;this.o=b;this.Js=null;this.Oa=h.Oi;this.uj=this.vj=null;this.Pj=this.Zf=void 0;this.Hga=[]});h.prototype.display=function(e){this.Js=null;if(this.uj!=e||this.Oa!=h.Oi)this.Js=
e,this.zAa()};h.prototype.Qe=function(){this.Js="none";this.zAa()};h.prototype.clear=function(){this.Oa=h.Oi;this.Js=null;this.s4a();this.eia();this.o=null};h.prototype.Ch=function(e){for(;this.Hga.length;)this.Hga.shift()();this.Oa==h.Oi||this.Oa!=h.rj&&this.Oa!=h.Eu&&this.Oa!=h.Ex||(this.Pj+=e,e=Math.min(1,this.Pj/this.Zf),this.Oa==h.rj?(this.vj.set("opacity",e),this.R.Kc().RJ(e)):this.Oa==h.Ex?(this.R.Kc().RJ(e),this.R.Kc().CE(e)):(this.R.Kc().CE(e),this.uj.set("opacity",1-e)),this.o.Za(),this.Pj<
this.Zf?this.Sa():this.nC())};h.prototype.lW=function(){return this.uj&&this.o.lW(this.uj)||void 0};h.prototype.zAa=function(){this.Js&&this.Oa==h.Oi&&this.Xr()};h.prototype.Xr=function(){this.uj&&this.m(new n(h.kF,{model:this.uj}));this.R.get("transitionMode","blending")=="fade_out_fade_in"&&this.uj?this.RB():(this.vj=this.Js=="none"?null:this.Js,this.Js=null,this.vj?this.uj?this.Mba():this.dG():this.uj&&this.RB())};h.prototype.dG=function(){this.Oa=h.rj;this.Rta();this.o.Npa(this.vj,!1);this.R.Kc().cK();
this.Pj=0;this.Zf=this.R.get("transitionDuration");this.Sa()};h.prototype.Mba=function(){this.Oa=h.Ex;this.R.Kc().PE();this.eia();this.Rta();this.o.Npa(this.vj,!1);this.R.Kc().cK();this.Pj=0;this.Zf=this.R.get("transitionDuration")*2;this.Sa()};h.prototype.RB=function(){this.Oa=h.Eu;this.vj=null;this.Pj=0;this.Zf=this.R.get("transitionDuration");this.R.Kc().PE();this.o.Npa(this.uj,!0);this.Sa()};h.prototype.nC=function(){this.Js!=this.uj&&this.eia();this.uj=this.vj;this.vj=null;this.Oa==h.Eu?this.R.Kc().ID():
this.Oa==h.rj?this.R.Kc().WI():this.Oa==h.Ex&&(this.R.Kc().WI(),this.R.Kc().ID());this.Oa=h.Oi;this.uj?this.m(new n(h.lF,{model:this.uj})):this.Js||this.m(new n(h.y$));this.Js&&this.Xr()};h.prototype.Sa=function(){k.requestFrame(this.Ch,this)};h.prototype.Rta=function(){if(this.vj){this.vj.set("opacity",this.Oa==h.Ex?1:.01);this.vj.set("currentTime",0);this.o.eGa(this.vj);this.m(new n(h.O$,{model:this.vj}));var e=this.vj;this.Hga.push(function(){this.m(new n(h.mF,{model:e}))}.bind(this))}};h.prototype.eia=
function(){this.uj&&(this.o.cpa(this.uj),this.m(new n(h.eZ,{model:this.uj})),this.uj=null)};h.prototype.s4a=function(){this.vj&&(this.o.cpa(this.vj),this.m(new n(h.eZ,{model:this.vj})),this.vj=null)};h.Oi="stopped";h.rj="blending";h.Ex="double blending";h.Eu="disolving";h.oc="request frame";h.O$="model added";h.eZ="model removed";h.mF="model start";h.lF="model show";h.kF="model hide";h.y$="all pending models hidden";return h});
define("tdv/player/view/model3d/controller/LoadController",["require","tdv/utils","tdv/events/EventDispatcher","tdv/constants/EventName"],function(a){var l=a("tdv/utils"),k=a("tdv/events/EventDispatcher"),n=a("tdv/constants/EventName");a=l.extend(k,function(g,h){k.call(this);this.R=g;this.o=h;this.sh=null});a.prototype.clear=function(){this.stop();this.o=null};a.prototype.load=function(g){g!=this.sh&&(this.stop(),this.o.Wdb(g)?(this.zEa(g),this.r4(g)):(this.sh=g,this.sh.set("opacity",0),this.hWa(),
this.o.eGa(this.sh)))};a.prototype.stop=function(){this.sh&&(this.Tja(),this.o.cpa(this.sh),this.sh=null)};a.prototype.CM=function(){this.CEa();this.zEa(this.sh)};a.prototype.Ke=function(){this.sh.H6(n.IF)&&this.CM();this.Tja();var g=this.sh;this.sh=null;this.R.set("progressVisible",!1);this.r4(g)};a.prototype.th=function(){this.Tja();this.sh=null;this.R.set("progressVisible",!1)};a.prototype.Ej=function(g){this.R.wa({progressPercent:g.data.percent,progressVisible:!0})};a.prototype.kWa=function(){this.sh.bind(n.IF,
this.CM,this,!0)};a.prototype.CEa=function(){this.sh.h(n.IF,this.CM,this,!0)};a.prototype.hWa=function(){this.kWa();this.sh.bind(n.ia,this.Ke,this,!0);this.sh.bind(n.xc,this.Ej,this,!0);this.sh.bind(n.ad,this.th,this,!0)};a.prototype.Tja=function(){this.CEa();this.sh.h(n.ia,this.Ke,this,!0);this.sh.h(n.xc,this.Ej,this,!0);this.sh.h(n.ad,this.th,this,!0)};a.prototype.zEa=function(g){this.m(n.IF,{model:g})};a.prototype.r4=function(g){this.m(n.ia,{model:g})};a.prototype.Yeb=function(){return this.sh&&
this.sh.H6(n.IF)};a.Ira=n.IF;a.Fra=n.ia;return a});
define("tdv/player/view/model3d/controller/PlaybackController","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/constants/PlaybackState".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),h=a("tdv/constants/PlaybackState"),e=l.extend(g,function(){g.call(this);this.Ea=null;this.H=h.ca});e.prototype.start=function(b){this.Ea=b;this.Ea.bind(k.N("camera"),this.yga,this,!0);this.Ea.bind(k.N("state"),
this.Zga,this,!0);this.Ea.bind(k.N("currentTime"),this.i2,this,!0);this.Ea.bind(k.N("duration"),this.i2,this,!0);this.Zga();this.yga()};e.prototype.end=function(){this.stop();this.zc&&(this.zc.h(k.N("state"),this.JS,this,!0),this.zc=null);this.Ea&&(this.Ea.h(k.N("camera"),this.yga,this,!0),this.Ea.h(k.N("state"),this.Zga,this,!0),this.Ea.h(k.N("currentTime"),this.i2,this,!0),this.Ea.h(k.N("duration"),this.i2,this,!0),this.Ea=null)};e.prototype.clear=function(){this.end()};e.prototype.play=function(){this.Ea&&
this.Ea.set("state",h.PLAYING)};e.prototype.pause=function(){this.Ea&&this.Ea.set("state",h.Yb)};e.prototype.stop=function(){this.Ea&&this.Ea.set("state",h.ca)};e.prototype.setTime=function(b){this.Ea&&this.Ea.set("currentTime",b)};e.prototype.getTime=function(){return this.Ea&&this.Ea.get("currentTime")||void 0};e.prototype.Zga=function(){var b=this.Ea.get("state");this.H!=b&&(this.H=b,this.zc&&this.zc.set("state",b),this.m(new n(e.gd,{state:this.H})))};e.prototype.i2=function(){this.m(new n(e.Pk,
{model:this.Ea,time:this.Ea.get("currentTime"),duration:this.Ea.get("duration")}));this.JS()};e.prototype.yga=function(){this.zc&&this.zc.h(k.N("state"),this.JS,this,!0);(this.zc=this.Ea.get("camera"))&&this.zc.bind(k.N("state"),this.JS,this,!0);this.JS()};e.prototype.JS=function(){this.Ea.get("duration")===0&&this.Ea.set("state",this.zc?this.zc.get("state"):h.ca)};e.gd="playback state change";e.Pk="time change";return e});
define("tdv/player/view/model3d/controller/Controller","require tdv/utils tdv/constants/PlaybackState tdv/events/Event tdv/events/EventDispatcher tdv/player/view/model3d/controller/DisplayController tdv/player/view/model3d/controller/LoadController tdv/player/view/model3d/controller/PlaybackController".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/PlaybackState"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),h=a("tdv/player/view/model3d/controller/DisplayController"),
e=a("tdv/player/view/model3d/controller/LoadController"),b=a("tdv/player/view/model3d/controller/PlaybackController"),c=l.extend(g,function(d,f){g.call(this);this.R=d;this.o=f;this.o.set("visible",!1);this.Be=new e(this.R,this.o);this.Wa=new h(this.R,this.o);this.Ta=new b(this.o);this.Be.bind(e.Ira,this.qAa,this,!0);this.Be.bind(e.Fra,this.Oy,this,!0);this.Wa.bind(h.kF,this.MC,this,!0);this.Wa.bind(h.lF,this.ln,this,!0);this.Wa.bind(h.mF,this.WS,this,!0);this.Wa.bind(h.O$,this.nAa,this,!0);this.Wa.bind(h.eZ,
this.rAa,this,!0);this.Wa.bind(h.y$,this.nza,this,!0);this.Ta.bind(b.gd,this.Kf,this,!0);this.Ta.bind(b.Pk,this.Cs,this,!0)});c.prototype.clear=function(){this.Be.clear();this.Wa.clear();this.Ta.clear();this.Be.h(e.Ira,this.qAa,this);this.Be.h(e.Fra,this.Oy,this);this.Wa.h(h.kF,this.MC,this);this.Wa.h(h.lF,this.ln,this);this.Wa.h(h.mF,this.WS,this);this.Wa.h(h.O$,this.nAa,this);this.Wa.h(h.eZ,this.rAa,this);this.Wa.h(h.y$,this.nza,this);this.Ta.h(b.gd,this.Kf,this);this.Ta.h(b.Pk,this.Cs,this);this.R=
this.o=this.Ta=this.Wa=this.Be=null};c.prototype.uib=function(d){this.o.set("visible",!0);this.Be.load(d)};c.prototype.MA=function(){this.Be.Yeb()&&this.Be.stop();this.Wa.Qe();this.Ta.end()};c.prototype.play=function(){this.Ta.play()};c.prototype.stop=function(){this.Ta.stop()};c.prototype.pause=function(){this.Ta.pause()};c.prototype.setTime=function(d){this.Ta.setTime(d)};c.prototype.getTime=function(){return this.Ta.getTime()};c.prototype.lW=function(){return this.Wa.lW()};c.prototype.qAa=function(d){this.Wa.display(d.data.model)};
c.prototype.Oy=function(){};c.prototype.nAa=function(d){this.Ta.start(d.data.model)};c.prototype.WS=function(d){d=d.data.model;this.o.set("visible",!0);this.m(new n(c.mF,{model:d}))};c.prototype.rAa=function(){};c.prototype.ln=function(d){d=d.data.model;d.get("autoplay")&&d.get("state")!=k.PLAYING&&d.set("state",k.PLAYING);this.m(new n(c.lF,{model:d}))};c.prototype.MC=function(d){this.m(new n(c.kF,{model:d.data.model}))};c.prototype.nza=function(){this.o.set("visible",!1)};c.prototype.Cs=function(d){this.m(new n(c.P$,
d.data))};c.prototype.Kf=function(d){this.m(new n(c.gd,{state:d.data.state}))};c.lF="modelShow";c.kF="modelHide";c.Zlb="modelEnd";c.mF="modelStart";c.P$="videoTimeChange";c.gd="playbackStateChange";return c});define("tdv/player/view/webgl/ecs/Component",["require","exports"],function(){return function(){function a(){}a.prototype.clear=function(){};a.zb=function(l){this.id=l+"Component";this.aa="!"+this.id};a.Mb=function(l){this.zb(l+"SystemState");this.g7=!0};a.g7=!1;return a}()});
define("tdv/player/view/webgl/components",["require","exports","tdv/player/view/webgl/ecs/Component","three.mod"],function(a,l,k,n){var g;(function(h){var e=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.Pf=null;H.sOa=null;H.YD=!0;H.enabled=!0;H.locked=!1;H.mO=!0;H.kf=void 0;H.Kk=0;return H}O(L,J);return L}(k);h.Vlb=e;var b=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.bias=0;H.iIa=500;H.intensity=1;H.scale=100;H.dLa=25;H.FLa=0;H.tla=4;H.output=
null;return H}O(L,J);return L}(k);h.rK=b;b.zb("AmbientOcclusionEffect");var c=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.color="#ffffff";H.intensity=1;return H}O(L,J);return L}(k);h.AmbientLight=c;c.zb("AmbientLight");var d=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.light=null;return H}O(L,J);return L}(k);h.hB=d;d.Mb("AmbientLight");var f=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.properties=null;return H}O(L,
J);return L}(k);h.Animation=f;f.zb("Animation");var m=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}O(L,J);return L}(k);h.Vw=m;m.Mb("Animation");var p=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.QIa=!1;H.$Pa=!1;H.oY=2;return H}O(L,J);return L}(k);h.bF=p;p.zb("AntialiasEffect");var q=function(J){function L(){return J!==null&&J.apply(this,arguments)||this}O(L,J);return L}(k);h.$E=q;q.zb("ARAnchor");var r=function(J){function L(){var H=
J!==null&&J.apply(this,arguments)||this;H.anchor=null;H.fd=null;H.kJ=[];return H}O(L,J);return L}(k);h.Tw=r;r.Mb("ARAnchorSystemState");var t=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.locked=!0;H.wb=null;return H}O(L,J);return L}(e);h.Uw=t;t.zb("ARControls");var u=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}O(L,J);return L}(k);h.ur=u;u.Mb("ARControlsSystemState");var v=function(J){function L(){return J!==null&&J.apply(this,
arguments)||this}O(L,J);return L}(k);h.Tf=v;v.Mb("ARPerspectiveCamera");var w=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.v=[];H.renderOrder=null;H.M=null;return H}O(L,J);return L}(k);h.jo=w;w.zb("Area");var y=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.v=[];return H}O(L,J);return L}(k);h.iB=y;y.Mb("Area");var x=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.h5=[];return H}O(L,J);return L}(k);h.cF=x;x.Mb("AreaPoint");
var z=function(J){function L(){return J!==null&&J.apply(this,arguments)||this}O(L,J);return L}(k);h.lB=z;z.zb("Beacon");var A=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.position=null;return H}O(L,J);return L}(k);h.mB=A;A.Mb("Beacon");var D=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.M=null;return H}O(L,J);return L}(k);h.Ip=D;D.zb("BeaconTracker");var E=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.position=null;
return H}O(L,J);return L}(k);h.$w=E;E.Mb("BeaconTracker");var B=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.Ba=null;H.rotate=!1;return H}O(L,J);return L}(k);h.wK=B;B.zb("CameraOffsetTransform");var C=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.Ba=null;return H}O(L,J);return L}(k);h.dSa=C;C.Mb("CameraOffsetTransform");var F=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.properties=null;return H}O(L,J);return L}(k);
h.xK=F;F.zb("CameraSequence");var G=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}O(L,J);return L}(k);h.ax=G;G.Mb("CameraSequence");var I=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.source=null;H.aK=null;H.opacity=1;H.isSprite=!1;H.hidden=!1;H.depthTest=!0;return H}O(L,J);return L}(k);h.If=I;I.zb("CanvasMaterial");var N=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}O(L,J);
return L}(k);h.oB=N;N.Mb("CanvasMaterial");var P=function(J){function L(){return J!==null&&J.apply(this,arguments)||this}O(L,J);return L}(k);h.fF=P;P.zb("ClippingRect");var Q=function(J){function L(){return J!==null&&J.apply(this,arguments)||this}O(L,J);return L}(k);h.pB=Q;Q.Mb("ClippingRect");var R=function(J){function L(){return J!==null&&J.apply(this,arguments)||this}O(L,J);return L}(k);h.fQ=R;R.zb("Data");var K=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.target=null;
return H}O(L,J);return L}(k);h.DirectionalLight=K;K.zb("DirectionalLight");var M=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.sp=null;return H}O(L,J);return L}(k);h.wr=M;M.Mb("DirectionalLight");var T=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.M=null;H.direction=null;H.min=null;return H}O(L,J);return L}(k);h.hx=T;T.zb("Draggable");var S=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.cma=null;return H}O(L,J);return L}(k);
h.qB=S;S.Mb("Draggable");var W=function(J){function L(){return J!==null&&J.apply(this,arguments)||this}O(L,J);return L}(k);h.Jm=W;W.zb("Dragging");var X=function(J){function L(){return J!==null&&J.apply(this,arguments)||this}O(L,J);return L}(e);h.zF=X;X.zb("FirstPersonControls");var Z=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}O(L,J);return L}(k);h.Er=Z;Z.Mb("FirstPersonControls");var ca=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||
this;H.color="#ffffff";H.opacity=1;H.height=0;H.radius=1;H.renderOrder=0;return H}O(L,J);return L}(k);h.Fr=ca;ca.zb("Floor");var ea=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.floor=null;return H}O(L,J);return L}(k);h.lx=ea;ea.Mb("Floor");var Y=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.distance=0;H.EW=!1;H.x=0;H.y=0;H.z=0;return H}O(L,J);return L}(k);h.mx=Y;Y.zb("FloorTransform");var U=function(J){function L(){var H=J!==null&&J.apply(this,
arguments)||this;H.manager=null;return H}O(L,J);return L}(k);h.ou=U;U.Mb("FloorTransform");var V=function(J){function L(){return J!==null&&J.apply(this,arguments)||this}O(L,J);return L}(e);h.AF=V;V.zb("FlyOverControls");var aa=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}O(L,J);return L}(k);h.Gr=aa;aa.Mb("FlyOverControls");var ba=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.geometry=null;return H}O(L,J);return L}(k);h.Geometry=
ba;ba.zb("Geometry");var da=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.eHa="#ffffff";H.depthTest=!0;H.Zla=10;H.XJa="#ffffff";H.size=10;return H}O(L,J);return L}(k);h.pu=da;da.zb("Grid");var fa=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.grid=null;return H}O(L,J);return L}(k);h.vB=fa;fa.Mb("Grid");var ha=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.group=null;return H}O(L,J);return L}(k);h.Group=ha;ha.zb("Group");
var ka=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.group=null;return H}O(L,J);return L}(k);h.DK=ka;ka.Mb("Group");var ia=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.properties=null;H.lw=null;H.M=null;H.tp=null;H.priority=void 0;H.isSprite=!1;H.qHa=null;return H}O(L,J);return L}(k);h.Mi=ia;ia.zb("ImageMaterial");var ja=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}O(L,J);return L}(k);h.xB=ja;
ja.Mb("ImageMaterial");var qa=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.pOa=7;H.intensity=1;return H}O(L,J);return L}(k);h.iQ=qa;qa.zb("MotionBlurEffect");var ra=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.line=null;H.renderOrder=0;return H}O(L,J);return L}(k);h.Line=ra;ra.zb("Line");var sa=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.line=null;return H}O(L,J);return L}(k);h.AB=sa;sa.Mb("Line");var ta=function(J){function L(){var H=
J!==null&&J.apply(this,arguments)||this;H.color="#ffffff";H.opacity=1;H.width=1;H.transparent=!0;H.depthTest=!0;return H}O(L,J);return L}(k);h.ci=ta;ta.zb("LineMaterial");var ua=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}O(L,J);return L}(k);h.zB=ua;ua.Mb("LineMaterial");var va=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.F=null;H.position=null;return H}O(L,J);return L}(k);h.ru=va;va.zb("LineToTransform");var wa=function(J){function L(){return J!==
null&&J.apply(this,arguments)||this}O(L,J);return L}(k);h.BB=wa;wa.Mb("LineToTransform");var xa=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.material=null;return H}O(L,J);return L}(k);h.Material=xa;xa.zb("Material");var ya=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.name=null;return H}O(L,J);return L}(k);h.ox=ya;ya.zb("MaterialVariant");var za=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}O(L,
J);return L}(k);h.Kr=za;za.Mb("MaterialVariant");var Aa=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.Te=null;H.renderOrder=0;return H}O(L,J);return L}(k);h.Mesh=Aa;Aa.zb("Mesh");var Ba=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.Te=null;return H}O(L,J);return L}(k);h.tu=Ba;Ba.Mb("Mesh");var Ca=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.properties=null;H.Zna=null;H.HNa=null;H.tp=null;H.M=null;H.Zma=null;H.cb=null;
return H}O(L,J);return L}(k);h.Ni=Ca;Ca.zb("Model");var Da=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}O(L,J);return L}(k);h.qx=Da;Da.Mb("Model");var Ea=function(J){function L(){return J!==null&&J.apply(this,arguments)||this}O(L,J);return L}(k);h.FF=Ea;Ea.zb("NotCollidable");var Fa=function(J){function L(){return J!==null&&J.apply(this,arguments)||this}O(L,J);return L}(k);h.nTa=Fa;Fa.Mb("NotCollidable");var Ga=function(J){function L(){var H=J!==null&&
J.apply(this,arguments)||this;H.Lqa=!0;H.Mqa=!0;return H}O(L,J);return L}(k);h.Lr=Ga;Ga.zb("NotSelectable");var Ha=function(J){function L(){return J!==null&&J.apply(this,arguments)||this}O(L,J);return L}(k);h.GF=Ha;Ha.Mb("NotSelectable");var Ia=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.ra=null;return H}O(L,J);return L}(k);h.Object3D=Ia;Ia.zb("Object3D");var Ja=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.id=null;H.container=null;return H}
O(L,J);return L}(k);h.LK=Ja;Ja.zb("Object3DId");var Ka=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}O(L,J);return L}(k);h.sx=Ka;Ka.Mb("Object3DId");var La=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.sV=void 0;H.castShadow=void 0;H.receiveShadow=void 0;H.opacity=1;H.zV=void 0;H.M=null;return H}O(L,J);return L}(k);h.ei=La;La.zb("ObjectTransform");var Ma=function(J){function L(){return J!==null&&J.apply(this,arguments)||this}
O(L,J);return L}(k);h.CB=Ma;Ma.Mb("ObjectTransform");var Na=function(J){function L(){return J!==null&&J.apply(this,arguments)||this}O(L,J);return L}(e);h.HF=Na;Na.zb("OrbitControls");var Oa=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}O(L,J);return L}(k);h.Mr=Oa;Oa.Mb("OrbitControls");var Pa=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.width=100;H.height=100;return H}O(L,J);return L}(k);h.OrthographicCamera=Pa;Pa.zb("OrthographicCamera");
var Qa=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.camera=null;H.width=void 0;H.height=void 0;return H}O(L,J);return L}(k);h.uu=Qa;Qa.Mb("OrthographicCamera");var Ra=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.F=null;H.attach=!1;H.id=null;return H}O(L,J);return L}(k);h.pb=Ra;Ra.zb("Parent");var Sa=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.parent=null;H.ce=null;H.id=void 0;H.attach=!1;return H}O(L,J);return L}(k);
h.wu=Sa;Sa.Mb("Parent");var Ta=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.width=100;H.height=100;H.Nk=void 0;H.Ud=void 0;H.fov=75;H.near=.01;H.far=100;H.lla=!1;H.IGa=0;H.jj=!1;return H}O(L,J);return L}(k);h.PerspectiveCamera=Ta;Ta.zb("PerspectiveCamera");var Ua=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.camera=null;H.yl=null;H.scene=null;H.boundingBox=null;H.ula=null;H.l8=!1;H.width=void 0;H.height=void 0;H.fov=void 0;H.Ud=void 0;H.Nk=void 0;
H.near=void 0;H.far=void 0;return H}O(L,J);return L}(k);h.Tk=Ua;Ua.Mb("PerspectiveCamera");var Va=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.Ge=1;H.We=1;H.Dh=1;H.scale=1;H.bE=void 0;H.cE=void 0;return H}O(L,J);return L}(k);h.Uk=Va;Va.zb("PixelScaleTransform");var Wa=function(J){function L(){return J!==null&&J.apply(this,arguments)||this}O(L,J);return L}(k);h.JF=Wa;Wa.Mb("PixelScaleTransform");var Xa=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;
H.renderOrder=null;return H}O(L,J);return L}(k);h.Plane=Xa;Xa.zb("Plane");var Ya=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.geometry=null;return H}O(L,J);return L}(k);h.FB=Ya;Ya.Mb("Plane");var Za=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.Ba=null;H.M=null;H.matrixWorld=null;H.origin=new n.Vector3;H.direction=new n.Vector3;H.Qb=new n.Vector2;H.XA=!1;H.Gla=!1;H.Sg=!1;H.enabled=!0;return H}O(L,J);return L}(k);h.yc=Za;Za.zb("Pointer");var $a=
function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.F=null;H.rotate=!0;H.M=null;return H}O(L,J);return L}(k);h.Cl=$a;$a.zb("PointerOverTransform");var ab=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}O(L,J);return L}(k);h.xu=ab;ab.Mb("PointerOverTransform");var bb=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}O(L,J);return L}(k);h.ux=bb;bb.Mb("PointerDragging");var cb=function(J){function L(){var H=
J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}O(L,J);return L}(k);h.vx=cb;cb.Mb("PointerSelection");var db=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.OE=null;H.lY=null;H.tY=null;return H}O(L,J);return L}(k);h.mo=db;db.zb("ProjectedMaterial");var eb=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.OE=null;H.ra=null;H.DP=null;H.xA=null;H.material=null;H.XO=null;return H}O(L,J);return L}(k);h.Nr=eb;eb.Mb("ProjectedMaterial");var fb=
function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.cb=null;H.renderer=null;H.JX=[];return H}O(L,J);return L}(k);h.qj=fb;fb.zb("Renderer");var gb=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}O(L,J);return L}(k);h.yu=gb;gb.Mb("Renderer");var hb=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.opacity=1;H.locked=!1;H.enabled=!0;H.scene=null;H.Ba=null;H.backgroundColor=null;H.nla=null;H.JGa=null;H.environmentIntensity=
1;H.rIa=null;H.mma=null;H.LIa=null;H.MIa=0;H.VV=0;H.outputColorSpace=null;H.n8=1;H.M=null;return H}O(L,J);return L}(k);h.Scene=hb;hb.zb("Scene");var ib=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.scene=null;H.manager=null;return H}O(L,J);return L}(k);h.Op=ib;ib.Mb("Scene");var jb=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.M=null;H.SE=!1;H.kt=!0;H.Tt=!1;H.bB=!1;return H}O(L,J);return L}(k);h.vd=jb;jb.zb("Selectable");var kb=function(J){function L(){return J!==
null&&J.apply(this,arguments)||this}O(L,J);return L}(k);h.KF=kb;kb.Mb("Selectable");var lb=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.color="#ffffff";H.opacity=1;H.depthTest=!0;H.doubleSided=!1;return H}O(L,J);return L}(k);h.wd=lb;lb.zb("SolidMaterial");var mb=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}O(L,J);return L}(k);h.wx=mb;mb.Mb("SolidMaterial");var nb=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||
this;H.radius=1;H.widthSegments=32;H.heightSegments=16;H.renderOrder=0;return H}O(L,J);return L}(k);h.Sphere=nb;nb.zb("Sphere");var ob=function(J){function L(){return J!==null&&J.apply(this,arguments)||this}O(L,J);return L}(k);h.LF=ob;ob.Mb("Sphere");var pb=function(J){function L(){return J!==null&&J.apply(this,arguments)||this}O(L,J);return L}(k);h.SpotLight=pb;pb.zb("SpotLight");var qb=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.light=null;H.sp=null;return H}O(L,J);
return L}(k);h.Au=qb;qb.Mb("SpotLight");var rb=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.SN=.5;H.TN=.5;H.height=100;H.width=100;H.scale=1;H.sizeAttenuation=!1;H.Fi=null;H.renderOrder=0;return H}O(L,J);return L}(k);h.Sprite=rb;rb.zb("Sprite");var sb=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}O(L,J);return L}(k);h.Bu=sb;sb.Mb("Sprite");var tb=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.Mz=
!1;H.positionX=0;H.positionY=0;H.positionZ=0;H.Wd=0;H.fd=0;H.Ve=0;H.jf="XYZ";H.scale=1;H.Ge=1;H.We=1;H.Dh=1;H.translationX=0;H.translationY=0;H.Xe=0;H.easing=0;H.M=null;return H}O(L,J);return L}(k);h.sa=tb;tb.zb("Transform");var ub=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.Mz=!1;H.positionX=0;H.positionY=0;H.positionZ=0;H.Wd=0;H.fd=0;H.Ve=0;H.jf="XYZ";H.scale=1;H.Ge=1;H.We=1;H.Dh=1;H.translationX=0;H.translationY=0;H.Xe=0;return H}O(L,J);return L}(k);h.Eg=ub;ub.Mb("Transform");
var vb=function(J){function L(){return J!==null&&J.apply(this,arguments)||this}O(L,J);return L}(k);h.OF=vb;vb.Mb("TransformEasing");var wb=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.translate=!0;H.rotate=!0;H.scale=!0;H.M=null;return H}O(L,J);return L}(k);h.Fh=wb;wb.zb("TransformControls");var xb=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.I9=null;H.Gk=null;H.le=null;return H}O(L,J);return L}(k);h.Om=xb;xb.Mb("TransformControls");var yb=function(J){function L(){var H=
J!==null&&J.apply(this,arguments)||this;H.kf=void 0;return H}O(L,J);return L}(e);h.yx=yb;yb.zb("TransitionControls");var zb=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}O(L,J);return L}(k);h.Du=zb;zb.Mb("TransitionControlsSystemState");var Ab=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.properties=null;H.ira=null;H.M=null;return H}O(L,J);return L}(k);h.qo=Ab;Ab.zb("VideoMaterial");var Bb=function(J){function L(){var H=J!==
null&&J.apply(this,arguments)||this;H.manager=null;return H}O(L,J);return L}(k);h.IB=Bb;Bb.Mb("VideoMaterial");var Cb=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.Ba=null;H.width=null;H.height=null;return H}O(L,J);return L}(k);h.ro=Cb;Cb.zb("Viewport");var Db=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.Ba=null;H.properties=null;return H}O(L,J);return L}(k);h.QF=Db;Db.zb("ViewportPlaneGeometry");var Eb=function(J){function L(){var H=J!==null&&
J.apply(this,arguments)||this;H.geometry=null;H.QPa=void 0;H.OPa=void 0;H.Vh=void 0;H.verticalAlign=void 0;H.zE=void 0;H.zIndex=void 0;return H}O(L,J);return L}(k);h.Ax=Eb;Eb.Mb("ViewportPlaneGeometry");var Fb=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.hNa=1;H.EKa=.5;H.color="#000000";H.opacity=.5;return H}O(L,J);return L}(k);h.RK=Fb;Fb.zb("VignetteEffect");var Gb=function(J){function L(){return J!==null&&J.apply(this,arguments)||this}O(L,J);return L}(k);h.kg=Gb;Gb.Mb("XRPerspectiveCamera");
var Hb=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.locked=!0;return H}O(L,J);return L}(k);h.RF=Hb;Hb.zb("XRBasicControls");var Ib=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}O(L,J);return L}(k);h.Qp=Ib;Ib.Mb("XRBasicControlsSystemState");var Jb=function(J){function L(){return J!==null&&J.apply(this,arguments)||this}O(L,J);return L}(e);h.SK=Jb;Jb.zb("XRDragControls");var Kb=function(J){function L(){var H=J!==null&&J.apply(this,
arguments)||this;H.manager=null;return H}O(L,J);return L}(k);h.Rp=Kb;Kb.Mb("XRDragControlsSystemState");var Lb=function(J){function L(){return J!==null&&J.apply(this,arguments)||this}O(L,J);return L}(e);h.TK=Lb;Lb.zb("XRFlyControls");var Mb=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}O(L,J);return L}(k);h.Sp=Mb;Mb.Mb("XRFlyControlsSystemState");var Nb=function(J){function L(){return J!==null&&J.apply(this,arguments)||this}O(L,J);return L}(e);h.UK=
Nb;Nb.zb("XRTeleportControls");var Ob=function(J){function L(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}O(L,J);return L}(k);h.Tp=Ob;Ob.Mb("XRTeleportControlsSystemState")})(g||(g={}));return g});
define("tdv/player/view/Flash",["require","exports","tdv/player/view/util/Device"],function(a,l,k){return function(){function n(){this.oa=document.createElement("div");this.oa.style.position="absolute";this.oa.style.left="0";this.oa.style.top="0";this.oa.style.right="0";this.oa.style.bottom="0";this.oa.style.zIndex="0";this.oa.style.pointerEvents="none";this.oa.style.backgroundColor="#ffffff";this.oa.style.display="none";this.oa.style.opacity="0";this.oa.style.transition="opacity 100ms ease-in-out";
this.roa=this.roa.bind(this);this.L7=this.L7.bind(this)}n.prototype.bc=function(){return this.oa};n.prototype.roa=function(){this.oa.removeEventListener("transitionend",this.roa);this.oa.style.opacity="0";this.oa.addEventListener("transitionend",this.L7)};n.prototype.L7=function(){this.oa.removeEventListener("transitionend",this.L7);this.oa.style.display="none"};n.prototype.m=function(){k.Ub()!==k.Ii&&(this.oa.style.display="block",this.oa.style.opacity="0",this.oa.offsetHeight,this.oa.style.opacity=
"1",this.oa.addEventListener("transitionend",this.Pmb))};return n}()});
define("tdv/player/view/webgl/ecs/Entity",["require","exports"],function(){return function(){function a(l,k){this.T=l;this.tag=k||"Entity";this.id=this.tag+"_"+a.ZW++;this.components={};this.AX={};this.sqa=0}a.prototype.getComponent=function(l){return this.components[l.id]};a.prototype.O=function(l,k){k===void 0&&(k=!1);var n=this.components[l.id];n?this.T.lab(this,l):k&&(n=this.K(l));return n};a.prototype.K=function(l){if(l.id in this.components)return this.components[l.id];l.g7&&this.sqa++;var k=
this.components[l.id]=new l;this.T.h$a(this,l);return k};a.prototype.ja=function(l){var k;k===void 0&&(k=!1);l.id in this.components&&(l.g7&&this.sqa--,k?this.components[l.id].clear():this.AX[l.id]=this.components[l.id],delete this.components[l.id],this.T.dOa(this,l,k))};a.prototype.pab=function(){for(var l in this.AX)this.AX[l].clear(),delete this.AX[l]};a.prototype.Ogb=function(){for(var l in this.components){var k=this.components[l].constructor;k.g7||(this.AX[l]=this.components[l],delete this.components[l],
this.T.dOa(this,k,!1))}};a.ZW=0;return a}()});define("tdv/player/view/webgl/ecs/Query",["require","exports"],function(){return function(){function a(){this.id=a.d2a++;this.v=[]}a.d2a=0;return a}()});
define("tdv/player/view/webgl/ecs/SystemQuery",["require","exports"],function(){return function(){function a(l,k){this.id=a.ZW++;this.name=k;this.v=l.v;this.be=l.v.slice();this.Da=[];this.Vg=[]}a.prototype.mab=function(){this.be.length&&(this.be=[]);this.Da.length&&(this.Da=[]);this.Vg.length&&(this.Vg=[])};a.ZW=0;return a}()});
define("tdv/player/view/webgl/ecs/QueriesManager",["require","exports","tdv/player/view/webgl/ecs/Query","tdv/player/view/webgl/ecs/SystemQuery"],function(a,l,k,n){function g(b){return typeof b=="string"?b:b.id}function h(b,c){b.indexOf(c)<0&&b.push(c);return b}function e(b,c){c=b.indexOf(c);c>=0&&b.splice(c,1);return b}return function(){function b(){this.feb={};this.J={};this.LJ={};this.rO={};this.dA={};this.JJ={};this.HV={};this.IJ={}}b.prototype.ma=function(c){this.HV[c.id]={};this.HV[c.aa]={}};
b.prototype.jbb=function(c,d){c=this.a0a(c);d=new n(c,d);this.LJ[c.id].push(d);return d};b.prototype.a0a=function(c){var d=this.kdb(c);if(d=this.feb[d])return d;d=new k;this.J[d.id]=d;c=c.map(g);this.IJ[d.id]={};for(var f=0;f<c.length;f++){var m=c[f];this.IJ[d.id][m]=!0;this.HV[m][d.id]=!0}this.JJ[d.id]={};this.LJ[d.id]=[];return d};b.prototype.kdb=function(c){c=c.map(g);c.sort();return c.join("-")};b.prototype.Gfb=function(c){this.rO[c.id]={};this.dA[c.id]={}};b.prototype.Hfb=function(c){delete this.rO[c.id];
delete this.dA[c.id]};b.prototype.Bfb=function(c,d){var f=d.id,m=d.aa;d=c.id;this.rO[d][f]=!0;for(var p in this.dA[d])if(m in this.IJ[p]){delete this.JJ[p][d];delete this.dA[d][p];e(this.J[p].v,c);for(var q=this.LJ[p],r=0,t=q.length;r<t;r++){var u=q[r];h(u.Vg,c);e(u.be,c);e(u.Da,c)}}for(p in this.HV[f])if(!(d in this.JJ[p])){f=!0;for(var v in this.IJ[p])if(m=v[0]!="!",(m?v:v.slice(1))in this.rO[d]!=m){f=!1;break}if(f)for(this.JJ[p][d]=!0,this.dA[d][p]=!0,h(this.J[p].v,c),q=this.LJ[p],r=0,t=q.length;r<
t;r++)u=q[r],h(u.be,c),e(u.Vg,c),e(u.Da,c)}};b.prototype.Dfb=function(c,d){var f=d.id,m="!"+f;d=c.id;delete this.rO[d][f];for(var p in this.dA[d])if(f in this.IJ[p]){delete this.JJ[p][d];delete this.dA[d][p];e(this.J[p].v,c);for(var q=this.LJ[p],r=0,t=q.length;r<t;r++){var u=q[r];h(u.Vg,c);e(u.be,c);e(u.Da,c)}}for(p in this.HV[m])if(!(d in this.JJ[p])){f=!0;for(var v in this.IJ[p])if(m=v[0]!="!",(m?v:v.slice(1))in this.rO[d]!=m){f=!1;break}if(f)for(this.JJ[p][d]=!0,this.dA[d][p]=!0,this.J[p].v.push(c),
q=this.LJ[p],r=0,t=q.length;r<t;r++)u=q[r],h(u.be,c),e(u.Vg,c),e(u.Da,c)}};b.prototype.Cfb=function(c,d){d=d.id;var f=c.id,m;for(m in this.dA[f])if(d in this.IJ[m]){f=this.LJ[m];for(var p=0,q=f.length;p<q;p++)h(f[p].Da,c)}};return b}()});
define("tdv/player/view/webgl/ecs/World","require exports tdv/view/util/Animation tdv/player/view/webgl/ecs/Entity tdv/player/view/webgl/ecs/QueriesManager tdv/player/view/util/XR".split(" "),function(a,l,k,n,g,h){return function(){function e(b){this.enabled=!0;this.v={};this.NV=[];this.components={};this.sY=[];this.KJ=new g;this.O5=[];this.rE=!1;this.FJ=b}e.prototype.O8=function(b){this.fcb=b};e.prototype.Uq=function(){return this.FJ};e.prototype.ma=function(b){this.components[b.id]=b;this.KJ.ma(b);
return this};e.prototype.ed=function(b,c){var d=(new b).initialize(this,c,this.sY.length);this.sY.push(d);for(var f in b.J)d[f]=this.KJ.jbb(b.J[f],c+"."+f);this.sY.sort(function(m,p){return m.order-p.order});return this};e.prototype.rc=function(b){b=new n(this,b);this.v[b.id]=b;this.KJ.Gfb(b);this.Za();return b};e.prototype.dd=function(b){b.id in this.v&&(delete this.v[b.id],this.NV.push(b),b.Ogb(),this.Za())};e.prototype.h$a=function(b,c){this.KJ.Bfb(b,c);this.Za()};e.prototype.dOa=function(b,c,
d){this.KJ.Dfb(b,c);d||this.O5.push(b);this.Za()};e.prototype.lab=function(b,c){this.KJ.Cfb(b,c);this.Za()};e.prototype.Ua=function(b){this.enabled=b;this.Za()};e.prototype.Za=function(){this.enabled&&!this.rE&&(this.rE=!0,k.requestFrame(this.update,this,h.isPresenting?void 0:this.fcb))};e.prototype.update=function(b){b=b||0;this.rE=!1;if(this.enabled){for(var c=(new Date).getTime(),d=0;d<this.sY.length;d++){var f=this.sY[d];f.Yc(b,c);for(var m in f.constructor.J)f[m].mab()}for(d=0;d<this.O5.length;d++)this.O5[d].pab();
this.O5.length=0;for(d=this.NV.length-1;d>=0;d--)this.NV[d].sqa==0&&(this.KJ.Hfb(this.NV[d]),this.NV.splice(d,1))}};return e}()});define("tdv/player/view/webgl/ecs/System",["require","exports"],function(){return function(){function a(){this.order=0;this.T=null;this.name=""}a.prototype.initialize=function(l,k,n){n===void 0&&(n=0);this.T=l;this.name=k;this.order=n;return this};a.prototype.Yc=function(){};return a}()});
define("tdv/player/view/webgl/system/light/AmbientLightSystem","require exports three.mod tdv/player/view/util/Color tdv/player/view/webgl/components tdv/player/view/webgl/ecs/System".split(" "),function(a,l,k,n,g,h){a=function(e){function b(){var c=e.call(this)||this;c.xb=c.xb.bind(c);c.ib=c.ib.bind(c);c.bg=c.bg.bind(c);c.Ca=c.Ca.bind(c);return c}O(b,e);b.prototype.Yc=function(){this.$D.v.length&&this.$D.v.slice().forEach(this.xb);this.aE.v.length&&this.aE.v.slice().forEach(this.Ca);this.Di.Da.length&&
this.Di.Da.slice().forEach(this.ib);this.Di.v.length&&this.Di.v.slice().forEach(this.bg)};b.prototype.xb=function(c){var d=c.K(g.hB),f=c.K(g.Object3D);d.light=f.ra=new k.AmbientLight;this.ib(c)};b.prototype.ib=function(c){var d=c.getComponent(g.AmbientLight);c=c.getComponent(g.hB).light;c.color=n.mr(d.color).convertLinearToSRGB();c.intensity=d.intensity*Math.PI;c.visible=c.intensity>0};b.prototype.bg=function(){};b.prototype.Ca=function(c){var d=c.getComponent(g.hB).light;d.parent&&d.parent.remove(d);
c.ja(g.hB);c.ja(g.Object3D)};b.J={};return b}(h);a.J={};a.J.$D=[g.AmbientLight,g.hB.aa];a.J.Di=[g.AmbientLight,g.hB];a.J.aE=[g.AmbientLight.aa,g.hB];return a});
define("tdv/player/view/webgl/system/animation/AutoplayController",["require","tdv/constants/EventName","tdv/constants/PlaybackState"],function(a){function l(g,h,e,b,c){this.B=g;this.De=h;this.Wg=e;this.El=b;this.Na=c;this.K3()}var k=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState");l.prototype.getAnimations=function(){return this.Wg};l.prototype.eW=function(){return this.El};l.prototype.frame=function(g){this.H==n.PLAYING&&(this.wv(this.gi.time+g/1E3),this.Na())};l.prototype.dispose=
function(){this.i4();this.KB=this.$F=this.gi=this.Na=this.El=this.Wg=this.De=this.B=null};l.prototype.K3=function(){this.gi=new THREE.AnimationMixer(this.De);this.$b=0;this.Pb=!1;this.$F=[];this.KB=[];for(var g=0;g<this.Wg.length;g++){var h=this.Wg[g],e=h.get("animationDirection")=="alternate",b=this.$b;this.$b+=this.El[g].duration*(e?2:1);this.KB.push({start:b,end:this.$b});b=this.gi.clipAction(this.El[g]);e?b.setLoop(THREE.LoopPingPong,2):b.setLoop(THREE.LoopOnce,1);this.$F.push(b);h.set("state",
n.ca);h.set("currentTime",0);h.set("duration",this.El[g].duration)}this.H=n.ca;this.Pm=void 0;this.B.bind(k.N("state"),this.Fj,this,!0);this.B.bind(k.N("currentTime"),this.wH,this,!0);this.B.bind(k.N("animationDirection"),this.Iza,this,!0);this.B.set("duration",this.$b);this.wv(0);this.B.get("autoplay")&&this.B.set("state",n.PLAYING)};l.prototype.i4=function(){this.B.h(k.N("state"),this.Fj,this,!0);this.B.h(k.N("currentTime"),this.wH,this,!0);this.B.h(k.N("animationDirection"),this.Iza,this,!0);this.B.set("state",
n.ca);for(var g=0;g<this.Wg.length;g++)this.$F[g].stop(),this.gi.uncacheClip(this.El[g]),this.Wg[g].set("state",n.ca),this.Wg[g].set("currentTime",0);this.B.set("duration",void 0);this.B.set("currentTime",void 0)};l.prototype.Iza=function(){this.i4();this.K3()};l.prototype.Fj=function(){var g=this.B.get("state");this.H!=g&&(this.H==n.ca?g==n.Yb?this.B.set("state",n.ca):g==n.PLAYING&&(this.H=n.PLAYING,this.Pb=!1,this.wv(0),this.Na()):this.H==n.PLAYING?g==n.ca?(this.H=n.ca,this.Pb&&this.B.get("finalFrame")==
"last"?this.wv(this.$b):this.wv(0)):g==n.Yb&&(this.H=n.Yb):this.H==n.Yb&&(g==n.PLAYING?(this.H=n.PLAYING,this.Na()):g==n.ca&&(this.H=n.ca,this.wv(0))),this.Pm!==void 0&&this.Wg[this.Pm].set("state",this.H),this.B.set("state",this.H))};l.prototype.wH=function(){var g=this.B.get("currentTime");this.gi.time!=g&&(this.H!=n.ca&&this.wv(g),this.B.set("currentTime",this.gi.time))};l.prototype.wv=function(g){if(this.gi.time!=g||this.Pm===void 0)if(g>this.$b)this.B.get("loop")?this.B.set("currentTime",g%this.$b):
(this.Pb=!0,this.B.m(k.Sb),this.B.set("state",n.ca));else{for(var h=this.Pm||0;g>this.KB[h].end;)h++;for(;g<this.KB[h].start;)h--;if(this.Pm!==h){for(var e=this.Pm||0;e<h;e++){var b=this.Wg[e],c=this.$F[e],d=this.KB[e];b.get("finalFrame")=="last"&&b.get("animationDirection")=="normal"?(c.reset(),c.startAt(d.start),b.set("currentTime",b.get("duration")),c.clampWhenFinished=!0,c.play()):(b.set("currentTime",0),c.stop(),c.clampWhenFinished=!1);b.set("state",n.ca)}b=this.Wg[h];c=this.$F[h];d=this.KB[h];
c.reset();c.startAt(d.start);c.clampWhenFinished=b.get("finalFrame")=="last"&&b.get("animationDirection")=="normal";c.play();for(e=this.Pm||0;e>h;e--)b=this.Wg[e],c=this.$F[e],b.set("currentTime",0),c.stop();this.Pm=h}else c=this.$F[this.Pm],g<this.gi.time&&(c.reset(),c.startAt(this.KB[this.Pm].start)),c.paused=!1;this.gi.update(g-this.gi.time);b=this.Wg[this.Pm];b.set("state",this.H);g=this.gi.time-this.KB[this.Pm].start;b=b.get("duration");h=g>b;this.Wg[this.Pm].set("currentTime",h?2*b-g:g);this.Wg[this.Pm].set("currentDirection",
h?"backward":"forward");this.B.set("currentTime",this.gi.time);this.Na()}};return l});
define("tdv/player/view/webgl/system/animation/NonAutoplayController",["require","tdv/constants/EventName","tdv/constants/PlaybackState"],function(a){function l(g,h,e,b,c){this.B=g;this.De=h;this.Wg=e;this.El=b;this.Na=c;this.Pga=this.Pga.bind(this);this.Gga=this.Gga.bind(this);this.K3()}var k=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState");l.prototype.dispose=function(){this.i4();this.Na=this.El=this.Wg=this.De=this.B=null};l.prototype.getAnimations=function(){return this.Wg};l.prototype.eW=
function(){return this.El};l.prototype.frame=function(g){this.Hx.length>0&&(this.gi.update(g/1E3),this.Hx.forEach(function(h){this.cua(h)}.bind(this)),this.Na())};l.prototype.K3=function(){this.gi=new THREE.AnimationMixer(this.De);this.gi.addEventListener("loop",this.Pga);this.gi.addEventListener("finished",this.Gga);this.Gx=new Map;this.LZ=new Map;this.Hx=[];for(var g=0;g<this.Wg.length;g++){var h=this.Wg[g],e=this.El[g];this.LZ.set(h,e);var b=this.gi.clipAction(e);this.Gx.set(h,b);h.set("duration",
e.duration);h.set("currentTime",h.get("currentTime")||0);h.set("currentDirection","forward");h.bind(k.N("state"),this.wza,this,!0);h.bind(k.N("animationDirection"),this.tza,this,!0);h.bind(k.N("currentTime"),this.sza,this,!0);h.bind(k.N("currentDirection"),this.rza,this,!0);h.bind(k.N("loop"),this.vza,this,!0);h.bind(k.N("finalFrame"),this.uza,this,!0);this.yN(h);this.FEa(h)}this.Na()};l.prototype.i4=function(){for(var g=0;g<this.Wg.length;g++){var h=this.Wg[g];h.h(k.N("state"),this.wza,this,!0);
h.h(k.N("animationDirection"),this.tza,this,!0);h.h(k.N("currentTime"),this.sza,this,!0);h.h(k.N("currentDirection"),this.rza,this,!0);h.h(k.N("loop"),this.vza,this,!0);h.h(k.N("finalFrame"),this.uza,this,!0);this.Gx.get(h).stop();this.Gx["delete"](h);this.gi.uncacheClip(this.LZ.get(h));this.LZ["delete"](h);this.Wg[g].set("state",n.ca);this.Wg[g].set("currentTime",0)}this.gi=this.LZ=this.Gx=null};l.prototype.Pga=function(g){this.Gx.forEach(function(h,e){g.action==h&&e.get("loop")&&e.m(k.Or)})};l.prototype.Gga=
function(g){this.Gx.forEach(function(h,e){g.action==h&&(this.cua(e),e.set("state",n.ca),e.get("animationDirection")=="alternate"&&e.set("currentDirection",e.get("currentDirection")=="forward"?"backward":"forward"),e.m(k.Sb))}.bind(this))};l.prototype.tza=function(g){this.yN(g.source)};l.prototype.vza=function(g){this.yN(g.source)};l.prototype.uza=function(g){this.yN(g.source)};l.prototype.rza=function(g){this.yN(g.source)};l.prototype.sza=function(g){this.yN(g.source)};l.prototype.cua=function(g){this.aua=
!0;var h=this.Gx.get(g),e=g.get("animationDirection")=="alternate";e=h._loopCount>0&&h._loopCount%2==1&&e;g.set("currentDirection",e?"backward":"forward");h=h.time;var b=g.get("duration");e?g.set("currentTime",b-h):g.set("currentTime",h);this.aua=!1};l.prototype.yN=function(g){if(!this.aua){var h=this.Gx.get(g),e=g.get("animationDirection")=="alternate",b=g.get("currentDirection")=="backward"&&e,c=g.get("loop"),d=g.get("finalFrame")=="last",f=g.get("currentTime");g=g.get("duration");c?(h.loop=e?THREE.LoopPingPong:
THREE.LoopRepeat,h.repetitions=Infinity,h.clampWhenFinished=!1):b?(h.loop=THREE.LoopPingPong,h.repetitions=2,h.clampWhenFinished=!1):(h.loop=THREE.LoopOnce,h.repetitions=1,h.clampWhenFinished=d||e);e=!e||h._loopCount!=-1&&h._loopCount%2!=0?e&&h._loopCount%2==1?g-f:f:b?g+g-f:f;h.time!=e&&(h.time=e,h.paused&&h.enabled&&e==0&&h.stop());this.Na()}};l.prototype.wza=function(g){this.FEa(g.source)};l.prototype.FEa=function(g){var h=this.Gx.get(g),e=g.get("state");var b=this.Hx.indexOf(g)>=0?n.PLAYING:h.paused&&
h.enabled&&h.time<g.get("duration")?n.Yb:n.ca;b!=e&&(b==n.PLAYING?e==n.Yb?(this.Hx.splice(this.Hx.indexOf(g),1),h.paused=!0):e==n.ca&&(this.Hx.splice(this.Hx.indexOf(g),1),!h.paused&&h.enabled&&h.stop()):b==n.Yb?e==n.PLAYING?(this.Hx.push(g),h.paused=!1):e==n.ca&&h.stop():b==n.ca&&(e==n.PLAYING?(this.Hx.push(g),h.paused&&h.enabled&&g.get("animationDirection")=="alternate"&&g.get("currentDirection")=="backward"?h.paused=!1:(h.reset(),h.play(),h.fadeIn(.1))):e==n.Yb&&(h.play(),h.paused=!0,this.gi.update(0))),
g.set("state",e),this.Na())};return l});define("tdv/player/view/util/geo/Fov",["require","exports"],function(){return function(){function a(){}a.xm=function(l,k,n){return this.QI(l,k,n)};a.rr=function(l,k,n){return this.QI(l,n,k)};a.QI=function(l,k,n){return 2*Math.atan(n*Math.tan(l*this.MF*.5)/k)*this.YTa};a.YTa=180/Math.PI;a.MF=Math.PI/180;return a}()});
define("tdv/player/view/webgl/system/util/entity/Util",["require","exports","tdv/player/view/webgl/components","tdv/player/view/util/geo/Fov","three.mod"],function(a,l,k,n,g){return function(){function h(){}h.Sc=function(e){return e?e.isObject3D?e:(e=e.getComponent(k.Object3D))?e.ra:null:null};h.getWorldPosition=function(e,b){b=b||new g.Vector3;e=this.Sc(e);if(!e)return null;b.setFromMatrixPosition(e.matrixWorld);return b};h.aY=function(e,b){(e=e.getComponent(k.Object3D))&&e.ra!==null&&(e=e.ra,e.matrixAutoUpdate=
!1,e.matrixWorldNeedsUpdate=!1,b.Mz&&e.parent?(e.parent.updateWorldMatrix(!0,!1),e.matrix.copy(e.parent.matrixWorld).invert()):e.matrix.identity(),e.matrix.multiply(this.r7.makeTranslation(b.translationX,b.translationY,b.Xe)),e.matrix.multiply(this.r7.makeRotationFromEuler(this.Sbb.set(b.Wd*this.MF,b.fd*this.MF,b.Ve*this.MF,b.jf))),e.matrix.multiply(this.r7.makeTranslation(b.positionX,b.positionY,b.positionZ)),e.matrix.multiply(this.r7.makeScale(b.scale*b.Ge,b.scale*b.We,b.scale*b.Dh)),e.updateMatrixWorld(!0),
e.matrix.decompose(e.position,e.quaternion,e.scale))};h.eW=function(e){if(!e)return[];e=e.getComponent(k.Ni);return(e=e===null||e===void 0?void 0:e.Zma)?e.animations||[]:[]};h.gW=function(e){return e.getComponent(k.uu)||e.getComponent(k.Tk)};h.ut=function(e){var b=e.getComponent(k.uu);return b?b.camera:(e=e.getComponent(k.Tk))?e.yl||e.camera:null};h.Qf=function(e){return this.mW(this.Sc(e))};h.mW=function(e){for(;e&&!e.isScene;)e=e.parent;return e};h.Mib=function(e,b){e.userData.camera=b};h.Pib=function(e,
b,c){e.userData.width=b;e.userData.height=c};h.Nib=function(e,b){e.userData.colorSpace!==b&&(e.userData.colorSpace=b,this.$qa(e))};h.Oib=function(e,b){e.userData.RIa!==b&&(e.userData.RIa=b,this.$qa(e))};h.jw=function(e){return e.userData.camera};h.pW=function(e){return e.userData.width};h.RD=function(e){return e.userData.height};h.oW=function(e){return e.userData.colorSpace};h.d9=function(e,b){e.userData.background!==b&&(e.userData.background=b,this.$qa(e))};h.$qa=function(e){if(e&&e.userData){var b=
e.userData.background,c=e.userData.colorSpace,d=e.userData.RIa;b&&b.isColor?e.background=c==g.SRGBColorSpace||d?b:b.clone().convertLinearToSRGB():(b&&b.isTexture&&(b.colorSpace=c==g.SRGBColorSpace?g.SRGBColorSpace:g.LinearSRGBColorSpace),e.background=b)}};h.e$a=function(e,b){var c=e.userData.oqa||(e.userData.oqa=[]);c.indexOf(b)>=0||(c.push(b),e.add(b),this.K9(e))};h.Zoa=function(e,b){var c=e.userData.oqa;if(c){var d=c.indexOf(b);d<0||(c.splice(d,1),e.remove(b))}};h.K9=function(e){var b=e.userData.oqa;
if(b){var c=-e.far*.99;b.forEach(function(d){d.position.z=c})}};h.g$a=function(e,b){var c=e.userData.jqa||(e.userData.jqa=[]);c.indexOf(b)>=0||(c.push(b),e.add(b),this.$Qa(e))};h.aOa=function(e,b){var c=e.userData.jqa;if(c){var d=c.indexOf(b);d<0||(c.splice(d,1),e.remove(b))}};h.$Qa=function(e){var b=e.userData.jqa;if(b){var c=e.far*.99;b.forEach(function(d){d.scale.x=d.scale.y=d.scale.z=c})}};h.f$a=function(e,b){var c=e.userData.hoa||(e.userData.hoa=[]);c.indexOf(b)>=0||(c.push(b),e.add(b),this.ZQa(e))};
h.$Na=function(e,b){var c=e.userData.hoa;if(c){var d=c.indexOf(b);d<0||(c.splice(d,1),e.remove(b))}};h.ZQa=function(e){var b=e.userData.hoa;if(b){var c=e.near*1.001;b.forEach(function(d){d.position.z=-c;d.scale.x=d.scale.y=d.scale.z=2*Math.tan((e.aspect>1?n.rr(e.fov,e.aspect,1):e.fov)*this.MF*.5)*c*2}.bind(this))}};h.cJ=function(e){if((e=this.Sc(e))&&e.parent){var b=this.UJa(e);if(b)return this.bX.setFromMatrixScale(e.parent.matrixWorld),b/Math.max(this.bX.x,this.bX.y,this.bX.z)}};h.UJa=function(e){if((e=
this.Sc(e))&&e.parent){var b=this.mW(e);if(b){var c=this.jw(b);if(c)return e.matrixWorld.decompose(this.objectPosition,this.wfb,this.bX),this.objectPosition.applyMatrix4(c.matrixWorldInverse),this.xi.setFromMatrixScale(c.matrixWorld),Math.abs(this.objectPosition.z)*2*Math.tan(c.fov*this.MF/2)*Math.max(this.xi.x,this.xi.y,this.xi.z)/this.RD(b)}}};h.MD=function(e,b){if(e.userData.id===b)return e;var c=null;if(e.children)for(var d=0;d<e.children.length&&!c;d++)c=this.MD(e.children[d],b);if(!c&&e.skeleton)for(d=
0;d<e.skeleton.bones.length&&!c;d++)c=this.MD(e.skeleton.bones[d],b);return c};h.cJa=function(){this.fma||(this.fma=new g.WebGLRenderer);return this.fma};h.BPa=function(e){this.ama||(this.ama=new g.DRACOLoader,this.ama.setDecoderPath(g.Ara));this.k7||(this.k7=new g.KTX2Loader,this.k7.setTranscoderPath(g.rra),this.k7.detectSupport(this.cJa()));e.setKTX2Loader(this.k7);e.setMeshoptDecoder(g.MeshoptDecoder);e.setDRACOLoader(this.ama);return e};h.r7=new g.Matrix4;h.Sbb=new g.Euler;h.objectPosition=new g.Vector3;
h.wfb=new g.Quaternion;h.bX=new g.Vector3;h.xi=new g.Vector3;h.MF=Math.PI/180;h.fma=null;return h}()});
define("tdv/player/view/webgl/system/animation/Behaviour","require tdv/binding/BindingsHandler tdv/constants/PlaybackState tdv/player/view/webgl/components tdv/player/script/Model3DAnimation tdv/player/view/webgl/system/animation/AutoplayController tdv/player/view/webgl/system/animation/NonAutoplayController tdv/player/view/webgl/system/util/entity/Util".split(" "),function(a){function l(f){this.A=f;this.El=this.De=null;this.MZ={};this.L_=new Map;this.dv=this.Qm=this.B=null;this.fh=!1;this.HS=this.HS.bind(this);
this.update()}function k(f,m){if(f==m||!(f!=null&&f.length!=0||m!=null&&m.length!=0))return!0;if(f==null||m==null||f.length!=m.length)return!1;for(var p=0;p<f.length;p++)if(f[p]!=m[p])return!1;return!0}var n=a("tdv/binding/BindingsHandler"),g=a("tdv/constants/PlaybackState"),h=a("tdv/player/view/webgl/components"),e=a("tdv/player/script/Model3DAnimation"),b=a("tdv/player/view/webgl/system/animation/AutoplayController"),c=a("tdv/player/view/webgl/system/animation/NonAutoplayController"),d=a("tdv/player/view/webgl/system/util/entity/Util");
l.prototype.update=function(){var f=this.A.getComponent(h.Animation);this.Nj(f&&f.properties)};l.prototype.frame=function(f,m){this.DN();this.fh&&(this.fh=!1,this.Qm&&this.Qm.frame(f,m),this.dv&&this.dv.frame(f,m))};l.prototype.dispose=function(){this.Nj(null)};l.prototype.Nj=function(f){this.B!=f&&(this.B&&(n.da(this.B,["animations.autoplay"],this.HS),this.P4a()),(this.B=f)&&n.xD(this.B,["animations.autoplay"],this.HS),this.HS())};l.prototype.HS=function(){this.NEa()};l.prototype.DN=function(){if(!this.De){var f=
d.Sc(this.A),m=d.eW(this.A);if(this.De!=f||this.El!=m)this.De=f,this.El=m,this.MZ={},this.El.forEach(function(p){p.name&&(this.MZ[p.name]=p)}.bind(this)),this.NEa()}};l.prototype.NEa=function(){var f=this.B&&this.B.get("animations")||[],m=this.El||[],p=m.slice(),q=[],r=[],t=[],u=[];f.length&&m.length&&f.forEach(function(v){var w=v.get("index"),y=v.get("name"),x;w!==void 0&&w<m.length?x=m[w]:y!==void 0&&y in this.MZ&&(x=this.MZ[y]);p.indexOf(x)>=0&&(p.splice(p.indexOf(x),1),v.get("autoplay")?(q.push(x),
r.push(v)):(t.push(x),u.push(v)))}.bind(this));this.B&&r.length==0&&p.length>0&&(r=p.map(function(v){if(this.L_.has(v))return this.L_.get(v);var w=new e;this.L_.set(v,w);return w}.bind(this)),q=p);k(this.Qm&&this.Qm.getAnimations()||[],r)&&k(this.Qm&&this.Qm.eW()||[],q)||(this.Qm&&(this.Qm.dispose(),this.Qm=null),r.length>0&&(this.Qm=new b(this.B,this.De,r,q,this.Na.bind(this))));k(this.dv&&this.dv.getAnimations()||[],u)&&k(this.dv&&this.dv.eW()||[],t)||(this.dv&&(this.dv.dispose(),this.dv=null),
u.length>0&&(this.dv=new c(this.B,this.De,u,t,this.Na.bind(this))))};l.prototype.P4a=function(){(this.B&&this.B.get("animations")||[]).forEach(function(f){f.set("state",g.ca);f.set("currentTime",0)});this.L_.clear()};l.prototype.Na=function(){this.fh||(this.fh=!0,this.A.T.Za())};l.Va=function(f){f.K(h.Vw).manager=new l(f)};l.xa=function(f){var m=f.getComponent(h.Vw);m.manager.dispose();m.manager=null;f.ja(h.Vw)};l.update=function(f){f.getComponent(h.Vw).manager.update()};l.frame=function(f,m,p){f.getComponent(h.Vw).manager.frame(m,
p)};return l});
define("tdv/player/view/webgl/system/animation/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/animation/Behaviour"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/animation/Behaviour");a=l.extend(k,function(){k.apply(this,arguments)});a.prototype.Yc=function(h,e){this.oGa.v.length&&this.oGa.v.slice().forEach(g.Va);this.animations.Da.length&&
this.animations.Da.slice().forEach(function(b){g.update(b,h,e)});this.animations.v.length&&this.animations.v.slice().forEach(function(b){g.frame(b,h,e)});this.pGa.v.length&&this.pGa.v.slice().forEach(g.xa)};a.J={};a.J.oGa=[n.Animation,n.Vw.aa];a.J.pGa=[n.Animation.aa,n.Vw];a.J.animations=[n.Animation,n.Vw];return a});
define("tdv/player/view/webgl/system/aranchor/System","require exports three.mod tdv/player/view/webgl/ecs/System tdv/player/view/webgl/components tdv/player/view/util/XR".split(" "),function(a,l,k,n,g,h){a=function(m){function p(){var q=m.call(this)||this;q.xb=q.xb.bind(q);q.ib=q.ib.bind(q);q.Ca=q.Ca.bind(q);return q}O(p,m);p.prototype.Yc=function(){this.xGa.v.length&&this.xGa.v.slice().forEach(this.xb);this.wGa.v.length&&this.wGa.v.slice().forEach(this.ib);this.yGa.v.length&&this.yGa.v.slice().forEach(this.Ca);
this.zGa.v.length&&this.zGa.v.slice().forEach(this.Ca)};p.prototype.xb=function(q){q.K(g.Tw);this.ib(q)};p.prototype.ib=function(q){var r=q.K(g.Object3D).ra,t=q.getComponent(g.Tw);h.isPresenting&&h.zp==h.po.tr?t.anchor&&t.anchor instanceof XRAnchor&&h.EI.has(t.anchor)?(r.visible=!0,r.matrixAutoUpdate=!1,q=h.EI.get(t.anchor),t.fd||(e.copy(h.Ic).applyMatrix4(d.copy(q).invert()).normalize(),c.setFromQuaternion(b.setFromUnitVectors(f,e),"YXZ"),t.fd=(new k.Matrix4).makeRotationY(c.y)),r.matrix.identity().multiply(q).multiply(t.fd),
this.Cla(t)):t.anchor&&t.anchor instanceof Promise?(r.visible=!1,this.Ykb(t,r.parent)):(r.visible=!1,t.anchor=h.fhb().then(function(u){t.anchor=u}).catch(function(u){console.error(u);t.anchor=null})):(r.visible=!0,r.matrixAutoUpdate=!0,r.matrix.identity(),this.iHa(t),this.Cla(t))};p.prototype.Ykb=function(q,r){if(r){for(;q.kJ.length>h.nd.length;)q.kJ.pop().removeFromParent();for(;q.kJ.length<h.nd.length;){var t=this.Uab();r.add(t);q.kJ.push(t)}for(r=0;r<h.nd.length;r++){var u=h.nd[r];u.K6||h.rPa(u,
!0);t=q.kJ[r];u.Bt?(t.visible=!0,t.children[0].scale.set(h.xi,h.xi,h.xi),t.matrix.copy(u.Bt)):t.visible=!1}}};p.prototype.Uab=function(){var q=new k.Mesh(new k.RingGeometry(.1,.125,60),new k.MeshBasicMaterial({color:16777215,depthWrite:!1,depthTest:!1,transparent:!0,side:k.DoubleSide}));q.rotation.x=-Math.PI/2;var r=new k.Group;r.matrixAutoUpdate=!1;r.add(q);return r};p.prototype.Cla=function(q){for(;q.kJ.length;)q.kJ.pop().removeFromParent();h.nd.forEach(function(r){return h.rPa(r,!1)})};p.prototype.iHa=
function(q){q.anchor&&(q.anchor instanceof XRAnchor?h.Dbb(q.anchor):q.anchor instanceof Promise&&h.aab(),q.anchor=null)};p.prototype.Ca=function(q){var r=q.getComponent(g.Tw);this.Cla(r);this.iHa(r);q.ja(g.Tw)};p.J={};return p}(n);var e=new k.Vector3,b=new k.Quaternion,c=new k.Euler,d=new k.Matrix4,f=new k.Vector3(0,0,1);a.J={};a.J.xGa=[g.$E,g.Object3D,g.Tw.aa];a.J.wGa=[g.$E,g.Object3D,g.Tw];a.J.yGa=[g.$E.aa,g.Tw];a.J.zGa=[g.Object3D.aa,g.Tw];return a});
define("tdv/player/view/util/geo/Tessellate",["require"],function(){function a(v,w,y,x,z){for(var A,D=0,E=w,B=y-x;E<y;E+=x)D+=(v[B]-v[E])*(v[E+1]+v[B+1]),B=E;if(z===D>0)for(z=w;z<y;z+=x)A=r(z,v[z],v[z+1],A);else for(z=y-x;z>=w;z-=x)A=r(z,v[z],v[z+1],A);A&&c(A,A.next)&&(t(A),A=A.next);return A}function l(v,w){if(!v)return v;w||(w=v);do{var y=!1;if(v.fQa||!c(v,v.next)&&b(v.Vd,v,v.next)!==0)v=v.next;else{t(v);v=w=v.Vd;if(v===v.next)break;y=!0}}while(y||v!==w);return w}function k(v,w,y,x,z,A,D){if(v){if(!D&&
A){var E=v,B=E;do B.z===0&&(B.z=h(B.x,B.y,x,z,A)),B.Qt=B.Vd,B=B.Qn=B.next;while(B!==E);B.Qt.Qn=null;B.Qt=null;E=B;var C,F,G,I,N=1;do{B=E;var P=E=null;for(F=0;B;){F++;var Q=B;for(C=G=0;C<N&&(G++,Q=Q.Qn,Q);C++);for(I=N;G>0||I>0&&Q;)G!==0&&(I===0||!Q||B.z<=Q.z)?(C=B,B=B.Qn,G--):(C=Q,Q=Q.Qn,I--),P?P.Qn=C:E=C,C.Qt=P,P=C;B=Q}P.Qn=null;N*=2}while(F>1)}for(E=v;v.Vd!==v.next;){B=v.Vd;Q=v.next;if(A)P=n(v,x,z,A);else a:{var R=v;P=R.Vd;I=R.next;if(b(P,R,I)>=0)P=!1;else{F=P.x;G=R.x;N=I.x;C=P.y;R=R.y;var K=I.y,
M=F<G?F<N?F:N:G<N?G:N,T=C<R?C<K?C:K:R<K?R:K,S=F>G?F>N?F:N:G>N?G:N,W=C>R?C>K?C:K:R>K?R:K;for(I=I.next;I!==P;){if(I.x>=M&&I.x<=S&&I.y>=T&&I.y<=W&&e(F,C,G,R,N,K,I.x,I.y)&&b(I.Vd,I,I.next)>=0){P=!1;break a}I=I.next}P=!0}}if(P)w.push(B.yh/y|0),w.push(v.yh/y|0),w.push(Q.yh/y|0),t(v),E=v=Q.next;else if(v=Q,v===E){if(D)if(D===1){v=l(v);D=w;E=y;B=v;do Q=B.Vd,P=B.next.next,!c(Q,P)&&d(Q,B,B.next,P)&&p(Q,P)&&p(P,Q)&&(D.push(Q.yh/E|0),D.push(B.yh/E|0),D.push(P.yh/E|0),t(B),t(B.next),B=v=P),B=B.next;while(B!==
v);v=l(B);k(v,w,y,x,z,A,2)}else{if(D===2)a:{D=v;do{for(E=D.next.next;E!==D.Vd;){if(B=D.yh!==E.yh){B=D;Q=E;if(P=B.next.yh!==Q.yh&&B.Vd.yh!==Q.yh){b:{P=B;do{if(P.yh!==B.yh&&P.next.yh!==B.yh&&P.yh!==Q.yh&&P.next.yh!==Q.yh&&d(P,P.next,B,Q)){P=!0;break b}P=P.next}while(P!==B);P=!1}P=!P}if(P){if(P=p(B,Q)&&p(Q,B)){P=B;F=!1;G=(B.x+Q.x)/2;N=(B.y+Q.y)/2;do P.y>N!==P.next.y>N&&P.next.y!==P.y&&G<(P.next.x-P.x)*(N-P.y)/(P.next.y-P.y)+P.x&&(F=!F),P=P.next;while(P!==B);P=F}P=P&&(b(B.Vd,B,Q.Vd)||b(B,Q.Vd,Q))||c(B,
Q)&&b(B.Vd,B,B.next)>0&&b(Q.Vd,Q,Q.next)>0}B=P}if(B){v=q(D,E);D=l(D,D.next);v=l(v,v.next);k(D,w,y,x,z,A,0);k(v,w,y,x,z,A,0);break a}E=E.next}D=D.next}while(D!==v)}}else k(l(v),w,y,x,z,A,1);break}}}}function n(v,w,y,x){var z=v.Vd,A=v.next;if(b(z,v,A)>=0)return!1;var D=z.x,E=v.x,B=A.x,C=z.y,F=v.y,G=A.y,I=D<E?D<B?D:B:E<B?E:B,N=C<F?C<G?C:G:F<G?F:G,P=D>E?D>B?D:B:E>B?E:B,Q=C>F?C>G?C:G:F>G?F:G,R=h(I,N,w,y,x);w=h(P,Q,w,y,x);y=v.Qt;for(v=v.Qn;y&&y.z>=R&&v&&v.z<=w;){if(y.x>=I&&y.x<=P&&y.y>=N&&y.y<=Q&&y!==z&&
y!==A&&e(D,C,E,F,B,G,y.x,y.y)&&b(y.Vd,y,y.next)>=0)return!1;y=y.Qt;if(v.x>=I&&v.x<=P&&v.y>=N&&v.y<=Q&&v!==z&&v!==A&&e(D,C,E,F,B,G,v.x,v.y)&&b(v.Vd,v,v.next)>=0)return!1;v=v.Qn}for(;y&&y.z>=R;){if(y.x>=I&&y.x<=P&&y.y>=N&&y.y<=Q&&y!==z&&y!==A&&e(D,C,E,F,B,G,y.x,y.y)&&b(y.Vd,y,y.next)>=0)return!1;y=y.Qt}for(;v&&v.z<=w;){if(v.x>=I&&v.x<=P&&v.y>=N&&v.y<=Q&&v!==z&&v!==A&&e(D,C,E,F,B,G,v.x,v.y)&&b(v.Vd,v,v.next)>=0)return!1;v=v.Qn}return!0}function g(v,w){return v.x-w.x}function h(v,w,y,x,z){v=(v-y)*z|0;
w=(w-x)*z|0;v=(v|v<<8)&16711935;v=(v|v<<4)&252645135;v=(v|v<<2)&858993459;w=(w|w<<8)&16711935;w=(w|w<<4)&252645135;w=(w|w<<2)&858993459;return(v|v<<1)&1431655765|((w|w<<1)&1431655765)<<1}function e(v,w,y,x,z,A,D,E){return(z-D)*(w-E)>=(v-D)*(A-E)&&(v-D)*(x-E)>=(y-D)*(w-E)&&(y-D)*(A-E)>=(z-D)*(x-E)}function b(v,w,y){return(w.y-v.y)*(y.x-w.x)-(w.x-v.x)*(y.y-w.y)}function c(v,w){return v.x===w.x&&v.y===w.y}function d(v,w,y,x){var z=m(b(v,w,y)),A=m(b(v,w,x)),D=m(b(y,x,v)),E=m(b(y,x,w));return z!==A&&D!==
E||z===0&&f(v,y,w)||A===0&&f(v,x,w)||D===0&&f(y,v,x)||E===0&&f(y,w,x)?!0:!1}function f(v,w,y){return w.x<=Math.max(v.x,y.x)&&w.x>=Math.min(v.x,y.x)&&w.y<=Math.max(v.y,y.y)&&w.y>=Math.min(v.y,y.y)}function m(v){return v>0?1:v<0?-1:0}function p(v,w){return b(v.Vd,v,v.next)<0?b(v,w,v.next)>=0&&b(v,v.Vd,w)>=0:b(v,w,v.Vd)<0||b(v,v.next,w)<0}function q(v,w){var y=new u(v.yh,v.x,v.y),x=new u(w.yh,w.x,w.y),z=v.next,A=w.Vd;v.next=w;w.Vd=v;y.next=z;z.Vd=y;x.next=y;y.Vd=x;A.next=x;x.Vd=A;return x}function r(v,
w,y,x){v=new u(v,w,y);x?(v.next=x.next,v.Vd=x,x.next.Vd=v,x.next=v):(v.Vd=v,v.next=v);return v}function t(v){v.next.Vd=v.Vd;v.Vd.next=v.next;v.Qt&&(v.Qt.Qn=v.Qn);v.Qn&&(v.Qn.Qt=v.Qt)}function u(v,w,y){this.yh=v;this.x=w;this.y=y;this.next=this.Vd=null;this.z=0;this.Qn=this.Qt=null;this.fQa=!1}return function(v,w,y){y=y||2;var x=w&&w.length,z=x?w[0]*y:v.length,A=a(v,0,z,y,!0),D=[];if(!A||A.next===A.Vd)return D;var E;if(x){var B=A;var C=y;A=[];var F;x=0;for(F=w.length;x<F;x++){var G=w[x]*C;var I=x<
F-1?w[x+1]*C:v.length;G=a(v,G,I,C,!1);G===G.next&&(G.fQa=!0);I=A;var N=I.push,P=G,Q=G;do{if(P.x<Q.x||P.x===Q.x&&P.y<Q.y)Q=P;P=P.next}while(P!==G);N.call(I,Q)}A.sort(g);for(x=0;x<A.length;x++){C=void 0;w=A[x];b:{F=B;G=w.x;I=w.y;N=-Infinity;do{if(I<=F.y&&I>=F.next.y&&F.next.y!==F.y&&(P=F.x+(I-F.y)*(F.next.x-F.x)/(F.next.y-F.y),P<=G&&P>N&&(N=P,C=F.x<F.next.x?F:F.next,P===G)))break b;F=F.next}while(F!==B);if(C){Q=C;var R=C.x,K=C.y,M=Infinity;F=C;do{if(G>=F.x&&F.x>=R&&G!==F.x&&e(I<K?G:N,I,R,K,I<K?N:G,
I,F.x,F.y)){P=Math.abs(I-F.y)/(G-F.x);var T;if((T=p(F,w))&&!(T=P<M)&&(T=P===M)&&!(T=F.x>C.x)&&(T=F.x===C.x)){T=C;var S=F;T=b(T.Vd,T,S.Vd)<0&&b(S.next,T,T.next)<0}T&&(C=F,M=P)}F=F.next}while(F!==Q)}else C=null}C&&(w=q(C,w),l(w,w.next),B=l(C,C.next))}A=B}if(v.length>80*y){var W=E=v[0];var X=x=v[1];for(B=y;B<z;B+=y)w=v[B],C=v[B+1],w<W&&(W=w),C<X&&(X=C),w>E&&(E=w),C>x&&(x=C);E=Math.max(E-W,x-X);E=E!==0?32767/E:0}k(A,D,y,W,X,E,0);return D}});
define("tdv/player/view/webgl/system/util/material/Util",["require","exports","three.mod"],function(a,l,k){return function(){function n(){}n.adb=function(g){return g.userData.Kt||g.material};n.AD=function(g,h){if(g.material!=h&&g.userData.Kt!=h){var e=g.userData.TW,b=g.userData.Rna;this.FX(g);g.material=h;b?this.GHa(g):e&&this.lma(g);g.needsUpdate=!0}};n.lma=function(g,h){h===void 0&&(h=null);g.userData.TW||(g.userData.TW=!0,g.userData.Kt=g.material,g.material=h||this.Bab(g.material))};n.FX=function(g){g.userData.TW&&
(this.H5(g.material),g.material=g.userData.Kt,delete g.userData.Kt,delete g.userData.TW,delete g.userData.Rna)};n.Hkb=function(g){if(g.userData.TW){var h=g.userData.Kt;g=g.material;g.side=h.side;g.depthTest=h.depthTest;g.map&&h.map&&(g.map.colorSpace=h.map.colorSpace);g.emissiveMap&&h.emissiveMap&&(g.emissiveMap.colorSpace=h.emissiveMap.colorSpace)}};n.GHa=function(g){this.Ndb(g)||(this.FX(g),this.lma(g,this.zab(g.material)),g.userData.Rna=!0)};n.Ndb=function(g){return!(!g.userData.Rna&&g.material&&
!this.Y6(g.material))};n.Y6=function(g){return Array.isArray(g)?!!g.every(function(h){return n.Y6(h)}):g?!(g.isMeshPhysicalMaterial||g.isMeshStandardMaterial):!1};n.zab=function(g){return Array.isArray(g)?g.map(function(h){return n.rHa(h)}):g?this.rHa(g):g};n.rHa=function(g){return(new k.MeshBasicMaterial).copy(g)};n.Bab=function(g){return Array.isArray(g)?g.map(function(h){return h.clone()}):g?g.clone():g};n.H5=function(g){Array.isArray(g)?g.forEach(function(h){h.dispose()}):g&&g.dispose()};return n}()});
define("tdv/player/view/webgl/system/area/System","require tdv/utils tdv/constants/EventName tdv/player/view/util/geo/Tessellate tdv/player/view/webgl/ecs/System tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/system/util/material/Util".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/player/view/util/geo/Tessellate"),g=a("tdv/player/view/webgl/ecs/System"),h=a("tdv/player/view/webgl/components"),e=a("tdv/player/view/webgl/system/util/entity/Util"),
b=a("tdv/player/view/webgl/system/util/material/Util");a=l.extend(g,function(){g.apply(this,arguments);this.xb=this.xb.bind(this);this.ib=this.ib.bind(this);this.Ca=this.Ca.bind(this);this.M9=this.M9.bind(this)});a.prototype.Yc=function(){this.BGa.v.length&&this.BGa.v.slice().forEach(this.xb);this.AGa.Da.length&&this.Bkb(this.AGa.Da.slice());this.areas.Da.length&&this.areas.Da.slice().forEach(this.ib);this.CGa.v.length&&this.CGa.v.slice().forEach(this.Ca);this.DGa.v.length&&this.DGa.v.slice().forEach(this.Ca)};
a.prototype.xb=function(G){G.K(h.iB);this.ib(G)};a.prototype.ib=function(G){this.Ukb(G);this.fo(G)};a.prototype.Bkb=function(G){var I=[];G.forEach(function(N){N.getComponent(h.cF).h5.forEach(function(P){I.indexOf(P)===-1&&I.push(P)})});I.forEach(this.M9)};a.prototype.Ukb=function(G){this.elb(G);this.M9(G)};a.prototype.elb=function(G){var I=G.getComponent(h.jo),N=I&&I.v||[],P=(I=G.getComponent(h.iB))&&I.v||[];P.forEach(function(Q){if(N.indexOf(Q)===-1){var R=Q.getComponent(h.cF).h5.filter(function(K){return K!==
K});R.length==0?Q.ja(h.cF):Q.O(h.cF).h5=R}});N.forEach(function(Q){P.indexOf(Q)===-1&&Q.O(h.cF,!0).h5.push(G)})};var c=new THREE.Matrix4,d=[];a.prototype.M9=function(G){var I=G.getComponent(h.jo);for(I=I&&I.v||[];d.length<I.length;)d.push(new THREE.Vector3);var N=I.map(function(M,T){return M.getComponent(h.Object3D).ra.getWorldPosition(d[T])});N=N.filter(function(M,T){return M.distanceTo(N[(T+1)%N.length])>1E-4});I=this.sdb(N);if(I.length===0)this.Ova(G),this.rEa(G);else{this.a6a(G,I.length*3);this.glb(G,
d,I);c.copy(G.getComponent(h.Object3D).ra.matrixWorld).invert();d.forEach(function(M){M.applyMatrix4(c)});G=G.getComponent(h.Geometry);for(var P=G.geometry.attributes.position.array,Q=0,R=0;Q<I.length;){var K=d[I[Q++]];P[R++]=K.x;P[R++]=K.y;P[R++]=K.z;K=d[I[Q++]];P[R++]=K.x;P[R++]=K.y;P[R++]=K.z;K=d[I[Q++]];P[R++]=K.x;P[R++]=K.y;P[R++]=K.z}G.geometry.attributes.position.needsUpdate=!0}};var f=new THREE.Plane,m=new THREE.Vector3,p=new THREE.Vector3,q=new THREE.Vector3,r=new THREE.Line3,t=new THREE.Vector3,
u=new THREE.Vector3,v=new THREE.Vector3,w=new THREE.Vector3,y=new THREE.Vector3,x=5*Math.PI/180;a.prototype.sdb=function(G){if(G.length<3)return[];var I=G[0];for(var N=Number.NEGATIVE_INFINITY,P=1;P<G.length;++P){var Q=I.distanceToSquared(G[P]);if(!(Q<=N)){N=Q;var R=G[P]}}if(N<=0)return[];r.set(I,R);N=Number.NEGATIVE_INFINITY;for(P=0;P<G.length;++P)if(Q=r.closestPointToPoint(G[P],!0,t).distanceToSquared(G[P]),!(Q<=N)){N=Q;var K=G[P]}if(N<=0)return[];f.setFromCoplanarPoints(I,R,K);for(P=0;P<G.length;++P)if(N=
G[P],N!==I&&N!==R&&N!==K){u.copy(I).sub(N).normalize();v.copy(R).sub(N).normalize();w.copy(K).sub(N).normalize();N=u.dot(v);Q=u.dot(w);var M=v.dot(w);N<Q&&N<M?y.copy(u).cross(v):Q<M?y.copy(u).cross(w):y.copy(v).cross(w);y.normalize();N=Math.abs(Math.acos(y.dot(f.normal)));N>Math.PI*.5&&(N=Math.PI-N);if(N>x)return[]}p.copy(G[1]).sub(G[0]).normalize();q.copy(f.normal).cross(p).normalize();I=[];for(P=0;P<G.length;++P)f.projectPoint(G[P],m),I.push(m.dot(p),m.dot(q));return n(I,null,2)};var z=new THREE.Vector3,
A=new THREE.Vector3,D=new THREE.Vector3,E=new THREE.Vector3,B=new THREE.Vector3,C=new THREE.Vector3,F=new THREE.Vector3;a.prototype.glb=function(G,I,N){var P=0;z.set(0,0,0);for(var Q=0;Q<N.length;){D.copy(I[N[Q++]]);E.copy(I[N[Q++]]);B.copy(I[N[Q++]]);A.copy(D).add(E).add(B).divideScalar(3);var R=F.subVectors(B,D).cross(C.subVectors(E,D)).length()*.5;A.multiplyScalar(R);z.add(A);P+=R}z.divideScalar(P);I=G.O(h.sa,!0);I.positionX=z.x;I.positionY=z.y;I.positionZ=z.z;e.aY(G,I);this.rEa(G,P)};a.prototype.rEa=
function(G,I){(G=(G=G.O(h.jo))&&G.M)&&G.m(k.V,{area:I})};a.prototype.fo=function(G){var I=G.getComponent(h.Object3D);if(I=I&&I.ra){var N=G.getComponent(h.Material).material;N&&b.AD(I,N);I.renderOrder=G.getComponent(h.jo).renderOrder}};a.prototype.Ova=function(G){var I=G.getComponent(h.Geometry);I&&(I.geometry&&I.geometry.dispose(),G.ja(h.Geometry),G.getComponent(h.Object3D).ra.geometry=null);if(I=G.getComponent(h.Object3D))I.ra&&I.ra.parent&&I.ra.parent.remove(I.ra),G.ja(h.Object3D)};a.prototype.a6a=
function(G,I){var N=G.getComponent(h.Geometry);N&&N.geometry&&N.geometry.attributes.position.array.length===I*3||(N=G.O(h.Geometry,!0),N.geometry&&N.geometry.dispose(),N.geometry=this.DXa(I),I=G.getComponent(h.Object3D),I||(I=G.K(h.Object3D),I.ra=new THREE.Mesh,this.fo(G)),I.ra.geometry=N.geometry)};a.prototype.DXa=function(G){var I=new THREE.BufferGeometry,N=I.setAttribute,P=THREE.Float32BufferAttribute;G*=3;for(var Q=[],R=0;R<G;R++)Q.push(0);N.call(I,"position",new P(Q,3));return I};a.prototype.Ca=
function(G){this.Ova(G);G.ja(h.iB);G.ja(h.Object3D)};a.J={};a.J.BGa=[h.Material,h.jo,h.iB.aa];a.J.AGa=[h.Object3D,h.sa,h.cF];a.J.areas=[h.jo,h.Material,h.iB];a.J.CGa=[h.jo.aa,h.iB];a.J.DGa=[h.Material.aa,h.iB];return a});
define("tdv/player/view/webgl/system/beacon/System","require tdv/utils tdv/constants/EventName tdv/player/view/webgl/ecs/System tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/player/view/webgl/ecs/System"),g=a("tdv/player/view/webgl/components"),h=a("tdv/player/view/webgl/system/util/entity/Util");a=l.extend(n,function(){n.apply(this,arguments);this.Zpa=this.Zpa.bind(this);this.B9=
this.B9.bind(this);this.Ypa=this.Ypa.bind(this);this.A9=this.A9.bind(this);this.AV=new Map;this.aMa=new Map;this.n5=new Map;this.bMa=new Map});a.prototype.Yc=function(){this.KGa.v.length&&this.KGa.v.slice().forEach(this.Zpa);this.LGa.v.length&&this.LGa.v.slice().forEach(this.B9);this.MGa.v.length&&this.MGa.v.slice().forEach(this.B9);this.NGa.v.length&&this.NGa.v.slice().forEach(this.Ypa);this.OGa.v.length&&this.OGa.v.slice().forEach(this.A9);this.PGa.v.length&&this.PGa.v.slice().forEach(this.A9);
this.frame()};a.J={};a.J.KGa=[g.Object3D,g.Ip,g.$w.aa];a.J.P$a=[g.Object3D,g.Ip,g.$w];a.J.LGa=[g.Object3D.aa,g.$w];a.J.MGa=[g.Ip.aa,g.$w];a.J.NGa=[g.Object3D,g.lB,g.mB.aa];a.J.OGa=[g.Object3D.aa,g.mB];a.J.PGa=[g.lB.aa,g.mB];a.prototype.frame=function(){this.P$a.v.length!=0&&this.n5.forEach(function(e,b){var c=this.AV.get(b)||[];c.forEach(function(d){var f=d.getComponent(g.Object3D).ra;d.getComponent(g.mB).position.set(0,0,0).applyMatrix4(f.matrixWorld)});e.forEach(function(d){var f=d.getComponent(g.Object3D).ra;
d.getComponent(g.$w).position.set(0,0,0).applyMatrix4(f.matrixWorld)});e.forEach(function(d){var f=d.getComponent(g.Ip).M;d=this.fW(c,d.getComponent(g.$w).position);f.m(k.V,{beacons:d})}.bind(this))}.bind(this))};a.prototype.ocb=function(e){return function(b){var c=this.AV.get(e.T)||[];return this.fW(c,b)}.bind(this)};a.prototype.fW=function(e,b){e=e.map(function(c){return{entity:c,distance:b.distanceTo(c.getComponent(g.mB).position)}});e.sort(function(c,d){return c.distance-d.distance});return e};
a.prototype.Zpa=function(e){e.K(g.$w).position=new THREE.Vector3;this.bMa.set(e,h.Sc(e));var b=this.n5.get(e.T);b||this.n5.set(e.T,b=[]);b.indexOf(e)<0&&b.push(e);e.getComponent(g.Ip).fW=this.ocb(e)};a.prototype.B9=function(e){var b=this.n5.get(e.T),c=b.indexOf(e);c>=0&&b.splice(c,1);this.bMa["delete"](e);e.ja(g.$w)};a.prototype.Ypa=function(e){e.K(g.mB).position=new THREE.Vector3;this.aMa.set(e,h.Sc(e));var b=this.AV.get(e.T);b||this.AV.set(e.T,b=[]);b.indexOf(e)<0&&b.push(e)};a.prototype.A9=function(e){var b=
this.AV.get(e.T),c=b.indexOf(e);c>=0&&b.splice(c,1);this.aMa["delete"](e);e.ja(g.mB)};return a});
define("tdv/player/view/webgl/system/camera/System","require tdv/utils tdv/constants/EventName tdv/player/view/webgl/ecs/System tdv/player/view/webgl/components tdv/player/view/util/geo/Fov tdv/player/view/util/XR tdv/player/view/webgl/system/util/entity/Util".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/player/view/webgl/ecs/System"),g=a("tdv/player/view/webgl/components"),h=a("tdv/player/view/util/geo/Fov"),e=a("tdv/player/view/util/XR"),b=a("tdv/player/view/webgl/system/util/entity/Util");
a=l.extend(n,function(){n.apply(this,arguments);this.aqa=this.aqa.bind(this);this.bqa=this.bqa.bind(this);this.O9=this.O9.bind(this);this.P9=this.P9.bind(this);this.wqa=this.wqa.bind(this);this.xqa=this.xqa.bind(this);e.M.bind(k.V,this.Ya,this,!0)});a.prototype.Yc=function(){this.fNa.v.length&&this.fNa.v.slice().forEach(this.aqa);this.oNa.v.length&&this.oNa.v.slice().forEach(this.bqa);this.CJ.Da.length&&this.CJ.Da.slice().forEach(this.O9);this.Nt.Da.length&&this.Nt.Da.slice().forEach(this.P9);this.gNa.v.length&&
this.gNa.v.slice().forEach(this.wqa);this.pNa.v.length&&this.pNa.v.slice().forEach(this.xqa)};a.prototype.Ya=function(){this.Nt.v.forEach(function(q){q.O(g.PerspectiveCamera)})};a.prototype.aqa=function(q){var r=q.O(g.OrthographicCamera),t=q.K(g.uu);q.K(g.Object3D).ra=t.camera=r.camera=new THREE.OrthographicCamera;this.O9(q)};a.prototype.bqa=function(q){var r=q.O(g.PerspectiveCamera),t=q.K(g.Tk);t.boundingBox=new THREE.Box3;t.l8=!0;q.K(g.Object3D).ra=t.camera=r.camera=new THREE.PerspectiveCamera;
this.P9(q)};a.prototype.O9=function(q){var r=q.getComponent(g.OrthographicCamera);q=q.getComponent(g.uu);q.width=r.width;q.height=r.height;q=q.camera;q.left=r.width*-.5;q.right=r.width*.5;q.top=r.height*.5;q.bottom=r.height*-.5;q.updateProjectionMatrix()};a.prototype.P9=function(q){var r=q.getComponent(g.PerspectiveCamera),t=q.getComponent(g.Tk);r.jj&&e.zg?(q.K(e.zp==e.po.Sr?g.kg:g.Tf),t.width=e.framebufferWidth?e.framebufferWidth*.5:r.width,t.height=e.framebufferHeight||r.height,q=t.yl=e.zg.xr.getCamera(),
q.aspect=t.width/t.height,q.fov=t.fov=q&&q.cameras.length?Math.atan2(1,q.cameras[0].projectionMatrix.elements[5])*2*f:r.fov,q.near=t.near=.1,q.far=t.far=1E3,b.K9(q)):(q.ja(g.Tf),q.ja(g.kg),t.fov=r.fov,t.Ud=r.Ud,t.Nk=r.Nk,t.width=r.width,t.height=r.height,t.yl=null,q=t.camera,q.aspect=t.width/t.height,q.fov=r.Ud?h.xm(r.Ud,t.width,t.height):r.Nk?r.Nk:t.width>t.height?h.xm(t.fov,t.width,t.height):t.fov,q.near=t.near=r.near,q.far=t.far=r.far,b.K9(q),t.camera.updateProjectionMatrix())};a.prototype.wqa=
function(q){var r=q.getComponent(g.uu);r.camera.parent&&r.camera.parent.remove(r.camera);r.camera=null;q.ja(g.uu);q.ja(g.Object3D)};a.prototype.xqa=function(q){var r=q.getComponent(g.Tk),t=r.camera;e.lnb&&t.parent&&t.parent.remove(t);r.camera=null;q.ja(g.Tk);q.ja(g.Object3D)};a.J={};a.J.fNa=[g.OrthographicCamera,g.uu.aa];a.J.gNa=[g.OrthographicCamera.aa,g.uu];a.J.oNa=[g.PerspectiveCamera,g.Tk.aa];a.J.pNa=[g.PerspectiveCamera.aa,g.Tk];a.J.CJ=[g.OrthographicCamera,g.uu];a.J.Nt=[g.PerspectiveCamera,
g.Tk];a.sK=l.extend(n,function(){n.apply(this,arguments);this.Joa=this.Joa.bind(this)});a.sK.prototype.Yc=function(){this.Nt.v.length&&this.Nt.v.slice().forEach(this.Joa)};a.sK.prototype.Joa=function(q){var r=q.getComponent(g.PerspectiveCamera);if(r.lla){var t=q.getComponent(g.Tk),u=t.scene||b.Qf(q),v=t.camera;if(u&&v&&b.mW(v)===u){var w=Number.POSITIVE_INFINITY,y=Number.NEGATIVE_INFINITY;if(r.jj)w=.1,y=1E3;else{var x=!1;t.l8&&(t.boundingBox=this.rXa(u,t.boundingBox),t.l8=!1,x=!0);u=t.boundingBox;
u=[[u.min.x,u.max.x],[u.min.y,u.max.y],[u.min.z,u.max.z]];for(var z=0;z<2;z++)for(var A=0;A<2;A++)for(var D=0;D<2;D++)p.set(u[0][z],u[1][A],u[2][D]).applyMatrix4(v.matrixWorldInverse),-p.z>y&&(y=-p.z),-p.z<w&&(w=-p.z);u=Math.max(r.IGa||0,0);z=(w+y)*.5;w+=(w-z)*u;y+=(y-z)*u;y=y==Infinity||isNaN(y)?2E3:y;w=w>0?w:y>20?.1:.01}if(Math.abs(r.near-w)>d||Math.abs(r.far-y)>d)v.far=t.far=r.far=y,v.near=t.near=r.near=w,b.K9(v),b.$Qa(v),b.ZQa(v),v.updateProjectionMatrix();x||t.ula||(t.ula=setTimeout(function(){t.ula=
null;t.l8=!0;q.T&&q.T.Za()},c))}}};a.sK.prototype.rXa=function(q,r){r||(r=new THREE.Box3);r.makeEmpty();q.traverse(function(t){if(t.boundingBox)var u=t.boundingBox;else{if(!t.geometry||t.isSprite||t.ow||t.material&&!t.material.visible)return;t.updateWorldMatrix(!1,!1);u=t.geometry;u.boundingBox===null&&u.computeBoundingBox();u=u.boundingBox}m.copy(u);m.applyMatrix4(t.matrixWorld);r.union(m)});return r};var c=500,d=1E-4,f=180/Math.PI,m=new THREE.Box3,p=new THREE.Vector3;a.sK.J={};a.sK.J.Nt=[g.PerspectiveCamera,
g.Tk];return a});
define("tdv/player/view/webgl/system/cameraControls/ARBehaviour","require exports tdv/player/view/util/XR tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/components three.mod".split(" "),function(a,l,k,n,g,h){a=function(){function r(t){this.locked=!0;this.Ci=!1;this.kf=1;this.F=t;this.update()}r.prototype.update=function(){var t=this.F.getComponent(g.Uw),u=(t===null||t===void 0?void 0:t.locked)||!1;!u&&this.locked&&(this.Ci=!0);this.locked=u;this.kf=(t===null||t===void 0?void 0:
t.kf)||1;this.properties=t.properties;this.Ci&&k.C8();this.locked||k.setScale(this.kf)};r.prototype.frame=function(){this.locked||(this.Ci=!1,this.GI())};r.prototype.GI=function(){if(k.isPresenting){var t=this.F.getComponent(g.Uw);t=t.wb&&n.Sc(t.wb);p.compose(k.Ic,k.ug,f);t&&p.premultiply(m.copy(t.matrixWorld).decompose(c,b,d).compose(c,b,f).invert());p.decompose(c,b,d);this.properties.set("x",c.x);this.properties.set("y",c.y);this.properties.set("z",c.z);e.setFromQuaternion(b);this.properties.set("yaw",
-e.y*q);this.properties.set("pitch",e.x*q);this.properties.set("roll",e.z*q);this.properties.set("distance",0)}};r.prototype.dispose=function(){};r.Va=function(t){t.K(g.ur).manager=new r(t)};r.update=function(t){t.getComponent(g.ur).manager.update()};r.frame=function(t,u,v){t.getComponent(g.ur).manager.frame(u,v)};r.xa=function(t){var u=t.getComponent(g.ur);u.manager.dispose();u.manager=null;t.ja(g.ur)};return r}();var e=new h.Euler(0,0,0,"YXZ"),b=new h.Quaternion,c=new h.Vector3,d=new h.Vector3,
f=new h.Vector3(1,1,1),m=new h.Matrix4,p=new h.Matrix4,q=180/Math.PI;return a});
define("tdv/player/view/webgl/system/util/RaycastUtil",["require","exports","three.mod","tdv/player/view/webgl/components","tdv/player/view/webgl/system/util/entity/Util"],function(a,l,k,n,g){a=function(){function d(){}d.i5=function(f,m,p){f.camera=m;m=p.getComponent(n.yc);p=(p=g.Sc(p))&&p.matrixWorld;p||(p=m.matrixWorld);p?(f.ray.origin.copy(m.origin).applyMatrix4(p),f.ray.direction.copy(m.origin).add(m.direction).applyMatrix4(p).sub(f.ray.origin).normalize()):(f.ray.origin.copy(m.origin),f.ray.direction.copy(m.direction).normalize());
return f};d.intersect=function(f,m){h.length=0;m.forEach(function(p){this.INa(p);p.isSkinnedMesh&&!p.userData.pla&&(p.userData.pla=p.geometry.boundingBox,p.geometry.boundingBox=b,p.userData.SGa=p.geometry.boundingSphere,p.geometry.boundingSphere=c,h.push(p))}.bind(this));f.firstHitOnly=!0;m=m.filter(function(p){return(p.isScene||p.parent)&&(!p.isMesh||p.geometry)});e.length=0;e=f.intersectObjects(m,!1,e);h.forEach(function(p){p.geometry.boundingBox=p.userData.pla;delete p.userData.pla;p.geometry.boundingSphere=
p.userData.SGa;delete p.userData.SGa});e=e.filter(function(p){return p.object.isLine?!1:!0});e.length>1&&e.sort(function(p,q){var r=-p.object.renderOrder,t=-q.object.renderOrder;r==t&&(r=p.object.material&&!p.object.material.depthTest?0:1,t=q.object.material&&!q.object.material.depthTest?0:1);r==t&&(r=p.distance,t=q.distance);return r-t});return e};d.INa=function(f){if(f.isMesh&&f.geometry&&f.geometry.attributes&&f.geometry.attributes.position&&!f.geometry.userData.QGa&&!f.isSkinnedMesh){try{f.geometry.computeBoundsTree()}catch(m){}f.geometry.userData.QGa=
!0}};return d}();var h=[],e=[],b=new k.Box3;b.min.x=b.min.y=b.min.z=-Infinity;b.max.x=b.max.y=b.max.z=Infinity;var c=new k.Sphere;c.center.x=c.center.y=c.center.z=0;c.radius=Infinity;return a});
define("tdv/player/view/webgl/system/cameraControls/CollidableObjects",["require","exports","tdv/player/view/webgl/system/util/entity/Util","tdv/player/view/webgl/system/util/RaycastUtil","three.mod"],function(a,l,k,n,g){a=function(){function c(d){this.QJ=null;this.$Ha=new g.Vector3;this.Yla=void 0;this.Ba=d}c.prototype.refresh=function(){this.QJ=null};c.prototype.fK=function(d,f){return this.intersect(d,f).length>0};c.prototype.Ceb=function(d){var f=k.ut(this.Ba);if(!f)return[];h.far=f.far;h.setFromCamera(d,
f);return n.intersect(h,this.z6())};c.prototype.GW=function(d){var f=k.ut(d.Ba||this.Ba);if(!f)return[];h.far=Infinity;h.camera=f;h.ray.origin.copy(d.origin);h.ray.direction.copy(d.direction);d.matrixWorld&&h.ray.applyMatrix4(d.matrixWorld);return n.intersect(h,this.z6())};c.prototype.intersect=function(d,f){h.far=d.distanceTo(f);h.ray.origin.copy(d);h.ray.direction.copy(f).sub(d).normalize();return n.intersect(h,this.z6())};c.prototype.RV=function(d){if(this.$Ha.equals(d)&&this.Yla!==void 0)return this.Yla;
h.far=Infinity;h.ray.origin.copy(d);var f=[],m=[];this.z6().forEach(function(q){q.isGaussianCloud||q.ow?m.push(q):f.push(q)});var p=Infinity;[f,m].forEach(function(q){(q==m?b:[e]).forEach(function(r){h.ray.direction.copy(r);r=n.intersect(h,q);r.length!=0&&(r=d.y-r[0].point.y,r<p&&(p=r))})});if(p==Infinity)return Infinity;this.$Ha.copy(d);return this.Yla=p};c.prototype.z6=function(){if(this.QJ)return this.QJ;var d=k.Qf(this.Ba);if(!d)return this.QJ=[];var f=[];(c.aX.get(this.Ba.T)||[]).forEach(function(p){(p=
k.Sc(p))&&f.push(p)});this.QJ=[];for(d=[d];d.length>0;){var m=d.pop();m.userData.$W||m.isSprite||m.isLine||m.isSkinnedMesh||m.material&&!m.material.visible||f.indexOf(m)!==-1||(m.children&&d.push.apply(d,m.children),this.QJ.push(m))}return this.QJ};c.wib=function(d){this.aX.clear();d.forEach(function(f){this.aX.has(f.T)||this.aX.set(f.T,[]);this.aX.get(f.T).push(f)}.bind(this))};c.aX=new Map;return c}();var h=new g.Raycaster,e=new g.Vector3(0,-1,0),b=[(new g.Vector3(0,-1,.1)).normalize(),(new g.Vector3(0,
-1,.1)).normalize().applyMatrix4((new g.Matrix4).makeRotationY(Math.PI*2/3)),(new g.Vector3(0,-1,.1)).normalize().applyMatrix4((new g.Matrix4).makeRotationY(-Math.PI*2/3))];return a});
define("tdv/player/view/webgl/system/cameraControls/SequenceController","require exports tdv/constants/EventName tdv/constants/PlaybackState tdv/player/parser/ClassInfo tdv/player/view/webgl/components tdv/view/util/Ease tdv/view/util/EaseDimension".split(" "),function(a,l,k,n,g,h,e,b){return function(){function c(d,f,m){this.F=d;this.properties=f;this.Yh=m;this.hpa=0;this.DJ=this.wA=void 0;this.k8=!1;this.W8(0);this.rma=this.S5=this.qma=this.Q5=this.state=void 0;this.Zc(n.ca);this.Yh.bind(k.N("state"),
this.AJ,this,!0);this.Yh.bind(k.N("movementIndex"),this.BMa,this,!0)}c.prototype.PP=function(){this.Yh.get("mandatory")||(this.y5(),this.Yh.get("restartMovementOnUserInteraction")?this.state==n.PLAYING&&(this.hQa(),this.Zc(n.Yb,!0)):this.state==n.PLAYING&&this.Zc(n.ca))};c.prototype.ylb=function(){this.state==n.Yb&&this.k8&&this.Yh.get("restartMovementOnUserInteraction")&&this.Gjb()};c.prototype.frame=function(d){this.state==n.PLAYING&&this.wf!==null&&(this.wf.Ena()||this.wA!=0||this.Yh.m(k.vr),this.wf.Lb(d),
this.Skb(),this.properties.set("x",this.wf.nb("x")),this.properties.set("y",this.wf.nb("y")),this.properties.set("z",this.wf.nb("z")),this.properties.set("yaw",this.wE(this.wf.nb("yaw"),-180,180)),this.properties.set("pitch",this.wf.nb("pitch")),this.properties.set("distance",this.wf.nb("distance")),this.properties.set("fov",this.wf.nb("fov")),this.properties.set("easing",0),d=this.Yh.get("movements")[this.wA],d.set("position",this.wf.wm()),d.m(k.me),this.wf.Re()&&(d.m(k.Sb),this.W8((this.wA+1)%this.Yh.get("movements").length,
!0),this.wA==0&&(this.hpa++,this.Yh.m(k.Or),this.hpa==this.Yh.get("repeat")&&(this.eOa(),this.Zc(n.ca),this.Yh.m(k.Sb)))))};c.prototype.Skb=function(){var d=this.Q5!==void 0&&this.qma!==void 0,f=this.S5!==void 0&&this.rma!==void 0;if(d||f){var m=this.HJa(this.F);if(m){var p=this.wf.getTime(),q=this.wf.hj();m=m.O(h.Scene);d=d&&p<this.Q5?1-p/this.Q5:0;f=f&&q-p<this.S5?1-(q-p)/this.S5:0;f>0||d>0?f>d?(m.sO=this.rma,m.VV=f):(m.sO=this.qma,m.VV=d):(m.sO="#000000",m.VV=0)}}};c.prototype.eOa=function(){var d=
this.HJa(this.F);d&&(d.O(h.Scene).VV=0)};c.prototype.dispose=function(){this.y5();this.Yh.h(k.N("state"),this.AJ,this);this.Yh.h(k.N("movementIndex"),this.BMa,this);this.Zc(n.ca)};c.prototype.AJ=function(){var d=this.Yh.get("state");this.state!=d&&(d==n.Yb&&this.state==n.ca?this.Yh.set("state",n.ca):this.Zc(d))};c.prototype.Zc=function(d,f){f===void 0&&(f=void 0);this.state!=d&&(this.state=d,this.state==n.PLAYING?(this.y5(),this.k8=!1,this.IHa(),this.nab()):this.state==n.Yb?(this.k8=!!f,this.hQa()):
this.state==n.ca&&(this.k8=!1,this.y5(),this.hpa=0,d=this.wf.getTime(),f=this.wf.hj(),d>0&&d<f&&this.eOa(),this.W8(0)));this.Yh.set("state",this.state)};c.prototype.BMa=function(){this.W8(this.Yh.get("movementIndex"))};c.prototype.W8=function(d,f){f===void 0&&(f=void 0);if(this.wA!==d||f)this.wA=d,this.IHa(),this.Yh.set("movementIndex",this.wA),this.Yh.get("movements")[this.wA].set("position",0)};c.prototype.HJa=function(d){for(;d&&!d.getComponent(h.Scene);)d=(d=d.getComponent(h.pb))&&d.F||null;return d};
c.prototype.Gjb=function(){this.D8=setTimeout(function(){this.D8=null;this.Zc(n.PLAYING)}.bind(this),this.Yh.get("restartMovementDelay"))};c.prototype.y5=function(){this.D8&&(clearTimeout(this.D8),this.D8=null)};c.prototype.IHa=function(){var d=this.Yh.get("movements")[this.wA],f=this.properties.get("x",this.properties.get("initialX",0)),m=this.properties.get("y",this.properties.get("initialY",0)),p=this.properties.get("z",this.properties.get("initialZ",0)),q=this.wE(this.properties.get("yaw",this.properties.get("initialYaw",
0)),-180,180),r=this.properties.get("pitch",this.properties.get("initialPitch",0)),t=this.properties.get("distance",0),u=this.properties.get("fov",this.properties.get("initialFov"));if(g.Qa("TargetModel3DCameraMovement",d)){var v=d.get("targetX",f);var w=d.get("targetY",m);var y=d.get("targetZ",p);var x=d.get("targetYaw",q);var z=d.get("targetPitch",r);var A=d.get("targetFov",u);var D=d.get("targetDistance",t);switch(this.Xbb(d)){case "left":x=this.wE(x,q-360,q);break;case "right":x=this.wE(x,q,q+
360);break;case "longest":x=this.wE(x,q-180,q+180);x=x==q?q+360:x>=q?this.wE(x,q-360,q):this.wE(x,q,q+360);break;default:x=this.wE(x,q-180,q+180)}}else g.Qa("DistanceModel3DCameraMovement",d)&&(v=f+d.get("xDelta",0),w=m+d.get("yDelta",0),y=p+d.get("zDelta",0),x=q+d.get("yawDelta",0),z=r+d.get("pitchDelta",0),A=u+d.get("fovDelta",0),D=t+d.get("distanceDelta",0));this.wf=new e(d.get("easing"),[new b("x",f,v,d.get("xSpeed")),new b("y",m,w,d.get("ySpeed")),new b("z",p,y,d.get("zSpeed")),new b("yaw",q,
x,d.get("yawSpeed")),new b("pitch",r,z,d.get("pitchSpeed")),new b("fov",u,A,d.get("fovSpeed")),new b("distance",t,D,d.get("distanceSpeed"))],d.get("duration"));this.Q5=d.get("fadeFromDuration");this.qma=d.get("fadeFromColor");this.S5=d.get("fadeToDuration");this.rma=d.get("fadeToColor")};c.prototype.nab=function(){this.DJ=void 0};c.prototype.hQa=function(){if(this.wf){this.DJ=void 0;var d=this.wf&&this.wf.jW("yaw");d&&(d.to>d.from?this.DJ="right":d.to<d.from&&(this.DJ="left"))}};c.prototype.Xbb=function(d){d=
d.get("yawPath");d=="longest"&&this.DJ&&(d=this.DJ);this.DJ=void 0;return d};c.prototype.wE=function(d,f,m){for(;d<f;)d+=m-f;for(;d>m;)d-=m-f;return d};return c}()});
define("tdv/player/view/webgl/system/cameraControls/SequencesController","require exports tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/PlaybackState tdv/player/view/webgl/system/cameraControls/SequenceController tdv/player/view/webgl/system/util/entity/Util".split(" "),function(a,l,k,n,g,h,e){return function(){function b(c,d){this.F=c;this.properties=d;this.a8=this.a8.bind(this);this.Y7=this.Y7.bind(this);this.AJ=this.AJ.bind(this);this.ym=this.mw=null;this.uP=[];this.hh=null;
this.VE=!1;this.Sz=new Map;k.ba(this.properties,["userInteracting"],this.a8,!0);k.ba(this.properties,["initialSequence","idleSequence","sequences.movements"],this.Y7,!0);k.ba(this.properties,["state"],this.AJ,!0);this.ready=!1}b.prototype.frame=function(c){if(!this.ready){var d=e.Qf(this.F),f=0;d&&d.traverse(function(m){(m.isMesh||m.isSprite)&&f++});if(f>0)this.ready=!0,this.Xfb();else return!1}this.hh&&this.Sz.get(this.hh).frame(c);(c=this.hh&&this.hh.get("state")==g.PLAYING)&&this.F.T.Za();this.properties.set("controllingPosition",
c)};b.prototype.dispose=function(){this.hh&&this.hh.get("mandatory")&&this.properties.set("inMandatorySequence",!1);this.hh&&this.properties.set("controllingPosition",!1);k.da(this.properties,["userInteracting"],this.a8);k.da(this.properties,["initialSequence","idleSequence","sequences.movements"],this.Y7);k.da(this.properties,["state"],this.AJ);this.q9();this.ym&&this.nO(this.ym);this.mw&&this.nO(this.mw);this.uP.forEach(this.nO.bind(this));this.uP=[]};b.prototype.pY=function(){this.VE||this.mJ||
!this.ym||this.hh||!this.properties.get("timeToIdle")||(this.mJ=setTimeout(function(){this.mJ=null;this.Kfb()}.bind(this),this.properties.get("timeToIdle")))};b.prototype.q9=function(){this.mJ&&(clearTimeout(this.mJ),this.mJ=null)};b.prototype.Kfb=function(){this.ym&&this.ym.set("state",g.PLAYING)};b.prototype.Xfb=function(){this.mw?this.mw.set("state",g.PLAYING):this.pY()};b.prototype.AJ=function(){this.hh?this.hh.set("state",this.properties.get("state")):this.properties.get("state")==g.PLAYING?
(this.pY(),this.mJ||this.properties.set("state",g.ca)):this.q9()};b.prototype.a8=function(){var c=this.properties.get("userInteracting");this.VE!=c&&(this.VE&&(this.hh&&this.Sz.get(this.hh).ylb(),!this.ym||this.hh&&this.hh!=this.ym||this.pY()),this.VE=c)&&(this.q9(),this.hh&&this.Sz.get(this.hh).PP())};b.prototype.Y7=function(){var c=this.ppa(this.properties.get("initialSequence"));this.mw!=c&&(this.mw&&this.nO(this.mw),(this.mw=c)&&this.Mla(this.mw));c=this.ppa(this.properties.get("idleSequence"));
this.ym!=c&&(this.ym&&this.nO(this.ym),(this.ym=c)&&this.Mla(this.ym));var d=(this.properties.get("sequences")||[]).filter(this.ppa.bind(this));this.uP.forEach(function(m){d.indexOf(m)<0&&this.nO(m)}.bind(this));var f=this.uP;this.uP=d;this.uP.forEach(function(m){f.indexOf(m)<0&&this.Mla(m)}.bind(this));this.hh||!this.ym||this.mJ||this.pY()};b.prototype.ppa=function(c){var d=c&&c.get("movements");return d&&d.length!=0?c:null};b.prototype.NMa=function(c){c=c.source;var d=c.get("state");d==g.PLAYING?
(this.q9(),d=this.hh,this.hh=c,d&&d!=this.hh&&d.set("state",g.ca),this.properties.set("state",g.PLAYING),this.properties.set("inMandatorySequence",c.get("mandatory")),this.F.T.Za()):d==g.Yb?c==this.hh&&this.properties.set("state",g.Yb):d==g.ca&&c==this.hh&&(this.properties.set("state",g.ca),this.properties.set("inMandatorySequence",!1),this.hh=null,c!=this.ym&&this.pY())};b.prototype.Mla=function(c){if(this.Sz.has(c))this.Sz.get(c);else{c.set("state",g.ca);c.bind(n.N("state"),this.NMa,this,!0);var d=
new h(this.F,this.properties,c);this.Sz.set(c,d)}};b.prototype.nO=function(c){this.Sz.has(c)&&(c.set("state",g.ca),c.h(n.N("state"),this.NMa,this),this.Sz.get(c).dispose(),this.Sz["delete"](c))};return b}()});
define("tdv/player/view/webgl/system/cameraControls/CameraSequenceBehaviour",["require","exports","tdv/player/view/webgl/system/cameraControls/SequencesController","tdv/player/view/webgl/components"],function(a,l,k,n){return function(){function g(h){this.OX=this.properties=null;this.F=h;this.update()}g.prototype.update=function(){var h=this.F.getComponent(n.xK);this.xP(h&&h.properties)};g.prototype.xP=function(h){var e;this.properties&&((e=this.OX)===null||e===void 0||e.dispose(),this.OX=null);if(this.properties=
h)this.OX=new k(this.F,this.properties)};g.prototype.frame=function(h){this.OX&&this.OX.frame(h)};g.prototype.dispose=function(){this.xP(null)};g.Va=function(h){h.K(n.ax).manager=new g(h)};g.update=function(h){h.getComponent(n.ax).manager.update()};g.frame=function(h,e,b){h.getComponent(n.ax).manager.frame(e,b)};g.xa=function(h){h.getComponent(n.ax).manager.dispose();h.ja(n.ax)};return g}()});
define("tdv/player/view/webgl/system/cameraControls/DraggingObserver",["require","exports"],function(){return function(){function a(){}a.JO=function(l){return this.Y9.indexOf(l)>=0};a.zpa=function(l){this.Y9=[];l.forEach(function(k){k=k.T;this.Y9.indexOf(k)<0&&this.Y9.push(k)}.bind(this))};a.Y9=[];return a}()});
define("tdv/player/view/webgl/system/cameraControls/CameraControlBehaviourMixin",["require"],function(){return{Bmb:function(){},Cmb:function(){},E0:function(){return this.B&&this.B.get("inMandatorySequence")||this.B&&!this.B.get("keyboardEnabled")?!0:!1},Zm:function(){return this.B&&this.B.get("inMandatorySequence")||this.B&&(!this.B.get("mouseEnabled")||this.B.get("mouseDisabled"))?!0:!1},cya:function(){return this.B&&this.B.get("doubleClickDisabled")?!0:!1},Vza:function(){this.aM()||this.my||this.DFa()},
Uza:function(){this.aM()||this.my||this.CFa()},BM:function(){this.dya()||this.DFa()},AM:function(){this.dya()||this.CFa()},DFa:function(){this.B&&this.B.set("userInteracting",!0)},CFa:function(){this.B&&this.B.set("userInteracting",!1)}}});
define("tdv/player/view/webgl/system/cameraControls/Object3DMovingSetter",["require","exports","tdv/player/view/webgl/system/util/entity/Util","three.mod"],function(a,l,k,n){return function(){function g(h){this.matrixWorld=new n.Matrix4;this.hE=!1;this.timeout=null;this.F=h}g.prototype.xP=function(h,e){if(this.eK!=h||this.propertyName!=e)this.eK&&this.eK.set(this.propertyName,!1),this.eK=h,this.propertyName=e,this.eK&&this.eK.set(this.propertyName,this.hE)};g.prototype.Wqa=function(){var h=k.Sc(this.F),
e=!!h&&!h.matrixWorld.equals(this.matrixWorld);e&&this.matrixWorld.copy(h.matrixWorld);this.Bp(e);this.timeout&&(clearTimeout(this.timeout),this.timeout=null);e&&(this.timeout=setTimeout(function(){this.timeout=null;this.Bp(!1)}.bind(this),g.lTa))};g.prototype.xa=function(){this.Bp(!1);this.timeout&&clearTimeout(this.timeout)};g.prototype.Bp=function(h){this.hE!=h&&(this.hE=h,this.eK&&this.eK.set(this.propertyName,h))};g.lTa=100;return g}()});
define("tdv/player/view/webgl/system/cameraControls/PropertiesSetter",["require","exports"],function(){return function(){function a(l){this.properties=l}a.prototype.UOa=function(l){this.properties.set("fov",this.WO(l,this.properties.get("minFov",.1),this.properties.get("maxFov",180)))};a.prototype.mj=function(l){this.properties.set("yaw",this.I8(this.jfb(l,this.properties.get("minYaw"),this.properties.get("maxYaw"),this.properties.get("yaw"))))};a.prototype.Yn=function(l){this.properties.set("pitch",
this.WO(l,this.properties.get("minPitch",-90),this.properties.get("maxPitch",90)))};a.prototype.setX=function(l){this.properties.set("x",this.WO(l,this.properties.get("minX"),this.properties.get("maxX")))};a.prototype.setY=function(l){this.properties.set("y",this.WO(l,this.properties.get("minY"),this.properties.get("maxY")))};a.prototype.setZ=function(l){this.properties.set("z",this.WO(l,this.properties.get("minZ"),this.properties.get("maxZ")))};a.prototype.Ap=function(l){this.properties.set("distance",
this.WO(l,this.properties.get("minDistance"),this.properties.get("maxDistance")))};a.prototype.Yj=function(l){this.properties.set("easing",l)};a.prototype.jfb=function(l,k,n,g){if(k!==void 0||n!==void 0){var h=this.I8(l-g);if(k!==void 0&&h<0){if(this.I8(g)+h<k)return k}else if(n!==void 0&&h>0&&this.I8(g)+h>n)return n}return l};a.prototype.WO=function(l,k,n){if(isNaN(l))throw"invalid value";k!==void 0&&l<k&&(l=k);n!==void 0&&l>n&&(l=n);return l};a.prototype.I8=function(l){for(;l<-180;)l+=360;for(;l>
180;)l-=360;return l};return a}()});
define("tdv/player/view/webgl/system/util/mixin/KeyboardMixin",["require","tdv/view/util/KeyboardControl"],function(a){var l=a("tdv/view/util/KeyboardControl");return{Ffa:function(k){this.N0=this.N0.bind(this);this.O0=this.O0.bind(this);this.TQ=this.sk=!1;this.Gg={};for(var n=0;n<k.length;n++)this.Gg[k[n]]=!1;this.bS=0;this.P0=!1;this.cS(!0)},Gfa:function(){this.cS(!1)},cS:function(k){this.P0!=k&&(this.P0&&(document.removeEventListener("keyup",this.O0),document.removeEventListener("keydown",this.N0)),
this.P0=k)&&(document.addEventListener("keyup",this.O0),document.addEventListener("keydown",this.N0))},dya:function(){return this.bS>0},O0:function(k){if(!(l.rp()||this.E0&&this.E0())){var n=!1;this.sk!=k.shiftKey&&(this.sk=k.shiftKey,n=!0);this.TQ!=k.ctrlKey&&(this.TQ=k.ctrlKey,n=!0);this.Gg[k.code]===!0&&(this.Gg[k.code]=!1,n=!0,this.jq&&this.jq(k.code),this.bS--,this.bS==0&&this.Uza&&this.Uza());n&&this.SS&&this.SS()}},N0:function(k){if(!(l.rp()||this.E0&&this.E0())){var n=!1;this.sk!=k.shiftKey&&
(this.sk=k.shiftKey,n=!0);this.TQ!=k.ctrlKey&&(this.TQ=k.ctrlKey,n=!0);this.Gg[k.code]===!1&&(n=this.Gg[k.code]=!0,this.AH&&this.AH(k.code),this.bS++,this.bS==1&&this.Vza&&this.Vza());n&&this.SS&&this.SS()}},Omb:function(){return this.sk},Imb:function(){return this.TQ}}});
define("tdv/player/view/model3d/renderer/adapters/cursor/InstanceCursorManager",["require","exports","tdv/view/constants/Cursor"],function(a,l,k){a=function(){function g(){this.Ff=[]}g.prototype.Xt=function(h){this.OOa(h);this.Ab=h;this.Sca=null};g.prototype.POa=function(h){this.OOa(h?h.NJa():null);this.Ab=null;this.Sca=h};g.prototype.Tib=function(h,e){this.Ab&&this.Ab.set("cursor",h);this.Sca&&this.Sca.L8(h,e)};g.prototype.OOa=function(h){this.Je&&(this.Je.Tgb(this),this.Je=void 0);h&&(this.Je=n.get(h),
this.Je.n$a(this))};g.prototype.dispose=function(){this.Xt(null);this.Ff=[]};g.prototype.push=function(h){this.Ff.push(h);this.Je&&this.Je.update()};g.prototype.pop=function(h){for(var e=this.Ff.length-1;e>=0;e--)if(this.Ff[e]==h){this.Ff.splice(e,1);this.Je&&this.Je.update();break}};g.prototype.has=function(h){return this.Ff.indexOf(h)>=0};g.prototype.top=function(){if(this.Ff.length)return this.Ff[this.Ff.length-1]};g.prototype.all=function(){return this.Ff};return g}();var n=function(){function g(h){this.cc=
h;this.xd=[]}g.prototype.n$a=function(h){this.xd.push(h);this.update()};g.prototype.Tgb=function(h){this.xd.splice(this.xd.indexOf(h),1);this.update();this.xd.length==0&&g.clear(this.cc)};g.prototype.update=function(){var h=this.nVa();var e=this.Aea(k.NF)?k.NF:this.Aea(k.Li)?k.Li:this.Aea(k.mf)?k.mf:this.Zs()||k.lf;this.xd.forEach(function(b){b.Tib(e,h)})};g.prototype.Aea=function(h){for(var e=this.xd.length-1;e>=0;e--)if(this.xd[e].has(h))return!0;return!1};g.prototype.nVa=function(){var h=[];this.xd.forEach(function(e){e.all().forEach(function(b){h.indexOf(b)<
0&&h.push(b)})});return h};g.prototype.Zs=function(){for(var h,e=this.xd.length-1;e>=0&&h===void 0;e--)h=this.xd[e].top();return h};g.get=function(h){var e=this.bb.get(h);e||this.bb.set(h,e=new g(h));return e};g.clear=function(h){this.bb["delete"](h)};g.bb=new Map;return g}();return a});
define("tdv/view/util/MouseLocker",["require","exports","tdv/constants/EventName","tdv/events/EventDispatcher"],function(a,l,k,n){return function(g){function h(e){var b=g.call(this)||this;if(e instanceof HTMLElement)b.OLa=e;else throw Error("invalid element");b.W7=b.W7.bind(b);document.addEventListener("pointerlockchange",b.W7.bind(b),!1);return b}O(h,g);h.prototype.dispose=function(){document.removeEventListener("pointerlockchange",this.W7)};h.prototype.lock=function(){if(!this.Xq())return this.OLa.requestPointerLock()};
h.prototype.unlock=function(){this.Xq()&&document.exitPointerLock()};h.prototype.Xq=function(){return document.pointerLockElement===this.OLa};h.prototype.W7=function(){this.m(k.V)};h.Xq=function(){return document.pointerLockElement!==null};return h}(n)});
define("tdv/player/view/webgl/system/util/mixin/MouseMixin",["require","tdv/constants/EventName","tdv/player/view/model3d/renderer/adapters/cursor/InstanceCursorManager","tdv/view/util/MouseLocker"],function(a){function l(e,b){var c=b.x-e.x;e=b.y-e.y;return Math.sqrt(c*c+e*e)}var k=a("tdv/constants/EventName"),n=a("tdv/player/view/model3d/renderer/adapters/cursor/InstanceCursorManager"),g=a("tdv/view/util/MouseLocker"),h=180/Math.PI;return{kga:function(){this.q1=this.uS=this.my=this.cv=!1;this.S2=
this.af=null;this.y0=new n;this.yS=null;this.P2a=this.a2a.bind(this)},lga:function(){this.C3(null);this.y0.dispose()},Rya:function(e){this.Eq(e);if(!this.Zm||!this.Zm()){var b=this.$L();this.cv||(this.cv=!0,b||this.BM&&this.BM());this.uS=!e.h8||!e.h8.buttons||(e.h8.buttons&2)===0;this.S2=e;this.kq&&this.kq(e.x,e.y);this.T1&&this.T1(e.x,e.y)}},$L:function(){return this.cv||this.my||this.q1},aM:function(){return this.cv},Jmb:function(){return this.my},Kmb:function(){return this.uS},Lmb:function(){return this.q1},
Tya:function(e){this.Eq(e);if(this.Zm&&this.Zm())this.vS(e);else if(this.rg&&this.rg(e.x,e.y),this.cv||this.lM.Xq()){var b=e.movementX!==void 0?e.movementX:e.x-this.S2.x,c=e.movementY!==void 0?e.movementY:e.y-this.S2.y;this.lM.Xq()&&(b*=-1,c*=-1);this.S2=e;this.S1&&this.S1(b,c,e.x,e.y)}},vS:function(e){this.cv&&(e&&this.Eq(e),this.uS=this.cv=!1,this.Qy&&this.Qy(this.yd,this.zd),this.BH&&this.BH(),this.$L()||this.AM&&this.AM())},Nya:function(e){this.Zm&&this.Zm()||(this.Eq(e),this.Py&&this.Py(e.x,
e.y))},Oya:function(e){this.Zm&&this.Zm()||this.cya&&this.cya()||(this.Eq(e),this.zM&&this.zM(e.x,e.y))},Uya:function(e){this.Eq(e);if(!this.Zm||!this.Zm()){e=e.Wz/10;var b=this.$L();this.yS||(this.q1=!0,this.Q2a&&this.Q2a(),b||this.BM&&this.BM());this.U1&&this.U1(e);this.yS&&clearTimeout(this.yS);this.yS=setTimeout(this.P2a,100)}},a2a:function(){this.yS=null;this.O2a&&this.O2a();this.q1=!1;this.$L()||this.AM&&this.AM()},Qya:function(e){if(!(this.Zm&&this.Zm()||e.touches.length<2)){var b=this.$L();
this.my||(this.my=!0,this.b2a(e.touches),b||this.BM&&this.BM());this.Nza&&this.Nza();this.vS()}},Pya:function(e){this.Zm&&this.Zm()||e.touches.length<2||!this.my||(this.Vya(e.touches),this.Iga&&this.Iga(this.Y7a,this.Z7a,this.Eja,this.$7a),this.Mza&&this.Mza(this.hfa,this.ifa,this.NU,this.OU,1,this.Eja,this.MR,this.Dja,this.gfa,this.MU))},jga:function(){this.my&&(this.my=!1,this.Jga&&this.Jga());this.$L()||this.AM&&this.AM()},b2a:function(e){this.gfa=this.ifa=this.hfa=this.MR=this.Eja=this.OU=this.NU=
this.Dja=this.MU=void 0;this.LU=e;this.Vya(e)},Vya:function(e){l(e[0],this.LU[0])+l(e[1],this.LU[1])>l(e[0],this.LU[1])+l(e[1],this.LU[0])&&(e=[e[1],e[0]]);var b=e[0];var c=e[1];b=Math.atan2(-(c.y-b.y),c.x-b.x)*h;c=l(e[0],e[1]);var d=(e[0].x+e[1].x)/2,f=(e[0].y+e[1].y)/2;this.Eja=this.MR!==void 0?c/this.MR:1;this.$7a=this.MU!==void 0?b-this.MU:0;this.MU=b;this.Dja=c;this.Y7a=this.NU!==void 0?d-this.NU:0;this.Z7a=this.OU!==void 0?f-this.OU:0;this.NU=d;this.OU=f;this.hfa!==void 0||(this.hfa=this.NU);
this.ifa!==void 0||(this.ifa=this.OU);this.gfa!==void 0||(this.gfa=this.MU);this.MR!==void 0||(this.MR=this.Dja);this.LU=e},Sya:function(){},dZa:function(){this.vS();this.jga()},wR:function(){return this.af?this.af.gb():100},QG:function(){return this.af?this.af.Kb():100},py:function(){return this.af?Math.max(this.af.gb(),this.af.Kb()):100},C3:function(e){this.af!=e&&(this.af&&(this.af.h(k.Ra,this.Rya,this,!0),this.af.h(k.fb,this.Tya,this,!0),this.af.h(k.ab,this.vS,this,!0),this.af.h(k.la,this.Nya,
this,!0),this.af.h(k.di,this.Oya,this,!0),this.af.h(k.Rk,this.Uya,this,!0),this.af.h(k.iaa,this.Pya,this,!0),this.af.h(k.sB,this.Qya,this,!0),this.af.h(k.BK,this.jga,this,!0),this.lM.h(k.V,this.Sya,this,!0),this.lM.dispose(),this.lM=null),this.af=e,this.y0.Xt(this.af),this.af&&(this.af.bind(k.Ra,this.Rya,this,!0),this.af.bind(k.fb,this.Tya,this,!0),this.af.bind(k.ab,this.vS,this,!0),this.af.bind(k.la,this.Nya,this,!0),this.af.bind(k.di,this.Oya,this,!0),this.af.bind(k.Rk,this.Uya,this,!0),this.af.bind(k.iaa,
this.Pya,this,!0),this.af.bind(k.sB,this.Qya,this,!0),this.af.bind(k.BK,this.jga,this,!0),this.lM=new g(this.af.va().bc()),this.lM.bind(k.V,this.Sya,this,!0)))},xS:function(e){e.x=-1+2*e.x/this.wR();e.y=1-2*e.y/this.QG();return e},Eq:function(e){this.yd=e.x;this.zd=e.y;this.mM=e.pageX;this.nM=e.pageY},SH:function(e){this.y0.push(e)},P2:function(e){this.y0.pop(e)}}});
define("tdv/player/view/webgl/system/util/mixin/ScreenJoystickMixin",["require","tdv/constants/EventName"],function(a){var l=a("tdv/constants/EventName");return{Y4a:function(){this.u3=!1;this.yq=null;this.lH=this.bM=0;this.ZH=!1;this.HCa(!0)},Z4a:function(){this.HCa(!1);this.sDa(null)},HCa:function(k){this.u3!=k&&((this.u3=k)||this.t3())},sDa:function(k){this.yq!=k&&(this.t3(),this.yq&&(this.yq.h(l.Np,this.ICa,this,!0),this.yq.h(l.Dg,this.t3,this,!0),this.yq.h(l.V,this.GCa,this,!0),this.lH=this.bM=
0),this.yq=k)&&(this.yq.bind(l.Np,this.ICa,this,!0),this.yq.bind(l.Dg,this.t3,this,!0),this.yq.bind(l.V,this.GCa,this,!0))},ICa:function(){!this.ZH&&this.u3&&(this.ZH=!0,this.$Aa&&this.$Aa())},GCa:function(){this.ZH&&(this.bM=this.yq.getX(),this.lH=this.yq.getY(),this.YAa&&this.YAa())},t3:function(){this.ZH&&(this.ZH=!1,this.lH=this.bM=0,this.ZAa&&this.ZAa())},Nmb:function(){return this.ZH}}});
define("tdv/player/view/webgl/system/cameraControls/FirstPersonBehaviour","require tdv/utils tdv/constants/EventName tdv/constants/Key tdv/player/view/webgl/components tdv/player/view/webgl/system/cameraControls/CameraControlBehaviourMixin tdv/player/view/webgl/system/cameraControls/CollidableObjects tdv/player/view/webgl/system/cameraControls/DraggingObserver tdv/player/view/webgl/system/cameraControls/Object3DMovingSetter tdv/player/view/webgl/system/cameraControls/PropertiesSetter tdv/player/view/webgl/system/util/mixin/KeyboardMixin tdv/player/view/webgl/system/util/mixin/MouseMixin tdv/player/view/webgl/system/util/mixin/ScreenJoystickMixin tdv/view/constants/Cursor tdv/view/util/Ease tdv/view/util/EaseDimension".split(" "),function(a){function l(M){this.eR=
!1;this.kda=0;this.Uva=!1;this.Vva=M}function k(M){this.A=M;this.ts=new f(M);this.Ffa(x);this.kga();this.Y4a();this.fI=.025;this.gn=.25;this.l1=this.m1=this.n1=this.d0=0;this.Ka=null;this.c_=this.o4=!1;this.Ha=void 0;this.qya=new THREE.Vector3(void 0,void 0,void 0);this.Vu=[];this.V1a=5;this.S1a=10;this.Qx=new c(this.A);this.SH(t.tB);this.cM={};[h.ta.bk,h.ta.Ji,h.ta.eb,h.ta.Db].forEach(function(T){this.cM[T]=new l(300)}.bind(this));[h.ta.Fp,h.ta.oo,h.ta.Kp,h.ta.so,h.ta.Q,h.ta.E].forEach(function(T){this.cM[T]=
new l(300)}.bind(this));this.update()}var n=a("tdv/utils"),g=a("tdv/constants/EventName"),h=a("tdv/constants/Key"),e=a("tdv/player/view/webgl/components"),b=a("tdv/player/view/webgl/system/cameraControls/CameraControlBehaviourMixin"),c=a("tdv/player/view/webgl/system/cameraControls/CollidableObjects"),d=a("tdv/player/view/webgl/system/cameraControls/DraggingObserver"),f=a("tdv/player/view/webgl/system/cameraControls/Object3DMovingSetter"),m=a("tdv/player/view/webgl/system/cameraControls/PropertiesSetter"),
p=a("tdv/player/view/webgl/system/util/mixin/KeyboardMixin"),q=a("tdv/player/view/webgl/system/util/mixin/MouseMixin"),r=a("tdv/player/view/webgl/system/util/mixin/ScreenJoystickMixin"),t=a("tdv/view/constants/Cursor"),u=a("tdv/view/util/Ease"),v=a("tdv/view/util/EaseDimension");n.f5(k,[b,p,q,r]);k.prototype.update=function(){var M=this.A.getComponent(e.zF);this.Nj(M&&M.properties);this.ts.xP(M&&M.properties,"moving");var T=(!M.mO||!d.JO(this.A.T))&&M.enabled;this.C3(M&&(T?M.Pf:null));this.cS(!!M&&
T&&M.YD);this.sDa(!!M&&T&&M.sOa);T||this.BH();T&&M.YD||(this.So=this.Ro=this.Ml=this.$k=this.Nl=0)};k.prototype.frame=function(M){this.j1a()?this.x0a(M):this.y0a(M);this.sZa()};k.prototype.j1a=function(){return this.properties&&this.properties.get("playingSequence")||this.Ti};k.prototype.x0a=function(M){this.properties&&this.properties.get("playingSequence")||this.rVa(M)};k.prototype.rVa=function(M){this.Ti&&(this.Ti.Lb(M),this.Ka.setX(this.Ti.nb("x")),this.Ka.setY(this.Ti.nb("y")),this.Ka.setZ(this.Ti.nb("z")),
this.Ka.Yj(0),this.Ti.Re()&&(this.Ti=null),this.A.T.Za())};var w=1E3/3600*8/1.7;k.prototype.y0a=function(M){F.set(this.B.get("x"),this.B.get("y"),this.B.get("z"));this.C_a(M,N,Q);this.N_a(F,N,G);this.Ka.setX(G.x);this.Ka.setY(G.y);this.Ka.setZ(G.z);this.Ka.mj(this.B.get("yaw")+Q.x);this.Ka.Yn(this.B.get("pitch")+Q.y);this.Ka.Yj(this.gn);N.x==0&&N.y==0&&N.z==0&&Q.x==0&&Q.y==0||this.A.T.Za()};k.prototype.sZa=function(){this.B9a();this.F8a();this.ts.Wqa();this.ZH&&this.A.T.Za();this.Qx.refresh()};k.prototype.C_a=
function(M,T,S){M/=1E3;var W=this.sk?.2:1,X=1.7*w;X*=this.B.get("translationSpeed")*W;var Z=this.B.get("rotationSpeed")*W;W=this.l1;var ca=this.m1,ea=this.n1,Y=this.d0;this.l1=this.m1=this.n1=this.d0=0;var U=(W*W+ca*ca)/y;U=U>1?1/Math.sqrt(U):1;W*=U;ca*=U;var V=E*Math.atan2(this.bM,Math.abs(this.lH));U=Math.sqrt(this.bM*this.bM+this.lH*this.lH);var aa=Math.max(this.QG(),this.wR()),ba=this.B.get("fov")/aa*2;W=-W*ba*Z;ca=ca*ba*Z;ea=-ea*25*X;ba=this.vR(h.ta.Fp,h.ta.Kp)*X;var da=this.vR(h.ta.so,h.ta.oo)*
X,fa=this.vR(h.ta.Q,h.ta.E)*X,ha=this.vR(h.ta.Ji,h.ta.bk)*Z*30,ka=this.vR(h.ta.eb,h.ta.Db)*Z*30;Y=2*Y*1.7/aa;Z*=V*U*.125;X*=-U*.5*this.lH;(U=this.A.getComponent(e.sa))&&(W||ca||ea||ba||fa||da||ha||ka||Z||X||Y)?(B.makeRotationFromEuler(C.set(0,U.fd*D,0,U.jf)),T.set(ba*M,fa*M+Y,(da+X+ea)*M).applyMatrix4(B),S.set(W+(ka+Z)*M,ca+ha*M)):(T.set(0,0,0),S.set(0,0))};k.prototype.vR=function(M,T){M=this.cM[M].getState();if(M===l.u$)return-3;if(M===l.Ji)return-1.5;T=this.cM[T].getState();return T===l.u$?3:T===
l.Ji?1.5:0};k.prototype.N_a=function(M,T,S){S.copy(M).add(T);if(!S.equals(M)){var W=!this.qya.equals(M);this.XEa(S,W);this.Ha!==void 0&&T.y!==0&&(this.Ha=Math.max(.595,this.Ha+T.y));var X=this.Qx.RV(S);(W||X==Infinity)&&this.aXa();var Z=X!==Infinity?S.y-X:void 0;if(this.B.get("keepHeight")&&X!==Infinity){X=this.uR();if(Z>(W?Z:this.E_a(M))+this.B.get("maxStepHeight",X*.25)){S.copy(M);return}S.y=(W?Z:this.L_a(Z))+X}if(this.B.get("collisionDetection")&&(P.copy(T).normalize().multiplyScalar(.1).add(S),
this.Qx.fK(M,P))){S.copy(M);return}Z!==void 0&&this.TUa(Z);this.qya.copy(S)}};k.prototype.aXa=function(){this.Vu=[]};k.prototype.E_a=function(M){return this.Vu.length==0?M:this.Vu[this.Vu.length-1]};k.prototype.L_a=function(M){return this.Vu.length<this.V1a?M:this.Vu.reduce((T,S)=>T+S,0)/this.Vu.length};k.prototype.TUa=function(M){this.Vu.push(M);this.Vu.length>this.S1a&&this.Vu.shift()};k.prototype.XEa=function(M,T){if(this.Ha===void 0||T)M=this.Qx.RV(M),M!==Infinity&&(this.Ha=M)};k.prototype.uR=
function(){return this.Ha===void 0?1.7:this.Ha};k.prototype.AH=function(M){this.A.T.Za();this.cM[M].uoa()};k.prototype.jq=function(M){this.cM[M].voa()};k.prototype.T1=function(){this.xj=!0;this.SH(t.Li)};k.prototype.zM=function(M,T){if(this.B.get("doubleClickAction")=="translate"&&(this.xS(K.set(M,T)),M=this.Qx.Ceb(K),M.length!=0)){var S=M[0];M=F.set(this.B.get("x"),this.B.get("y"),this.B.get("z"));T=G.copy(S.point);this.XEa(M);var W=this.uR();S.face&&S.face.normal?(S=I.copy(S.face.normal).transformDirection(S.object.matrixWorld),
S=Math.abs(Math.acos(S.dot(R)))<Math.PI*.25):S=T.y<M.y-W*.75;if(S)T.y+=W;else{N.copy(T).sub(M);S=N.length();var X=W*2;if(S<X)return;T.sub(N.multiplyScalar(X/S));T.y+=W-this.Qx.RV(T)}this.Qx.fK(M,T)||Math.abs(W-this.Qx.RV(T))>W*.05||(this.Ti=new u("cubic_in_out",[new v("x",M.x,T.x),new v("y",M.y,T.y),new v("z",M.z,T.z)],1500),this.A.T.Za())}};var y=2500;k.prototype.S1=function(M,T){this.xj&&(this.l1+=M,this.m1+=T,this.A.T.Za())};k.prototype.BH=function(){this.xj=!1;this.P2(t.Li);this.A.T.Za()};k.prototype.U1=
function(M){this.n1+=M;this.A.T.Za()};k.prototype.Iga=function(M,T){this.d0+=T;this.A.T.Za()};k.prototype.$Aa=function(){this.dZa();this.SH(t.Li)};k.prototype.YAa=function(){this.A.T.Za()};k.prototype.ZAa=function(){this.P2(t.Li)};k.prototype.Nj=function(M){this.B!=M&&(this.B&&(this.Ka=null,z.forEach(function(T){this.B.h(g.N(T),this.bha,this,!0)}.bind(this)),A.forEach(function(T){this.B.h(g.N(T),this.zga,this,!0)}.bind(this)),this.B.set("userInteracting",!1)),this.B=M)&&(this.Ka=new m(this.B),z.forEach(function(T){this.B.bind(g.N(T),
this.bha,this,!0)}.bind(this)),this.bha(),A.forEach(function(T){this.B.bind(g.N(T),this.zga,this,!0)}.bind(this)),this.zga(),this.B.set("userInteracting",!1))};k.prototype.bha=function(){this.o4||(this.o4=!0,this.A.T.Za())};k.prototype.B9a=function(){if(this.o4&&this.A&&this.B){this.o4=!1;var M=this.A.O(e.sa,!0);M.translationX=this.B.get("x");M.translationY=this.B.get("y");M.Xe=this.B.get("z");M.fd=-this.B.get("yaw");M.Wd=this.B.get("pitch");M.Ve=0;M.jf="YXZ";M.positionX=0;M.positionY=0;M.positionZ=
0;M.easing=this.B.get("easing")}};k.prototype.zga=function(){this.c_||(this.c_=!0,this.A.T.Za())};k.prototype.F8a=function(){this.c_&&this.A&&this.B&&(this.c_=!1,this.A.O(e.PerspectiveCamera,!0).fov=this.B.get("fov"))};var x=[h.ta.bk,h.ta.Ji,h.ta.eb,h.ta.Db,h.ta.Fp,h.ta.oo,h.ta.Kp,h.ta.so,h.ta.Q,h.ta.E],z="minYaw maxYaw yaw minPitch maxPitch pitch minX maxX x minY maxY y minZ maxZ z distance easingSpeed".split(" "),A=["minFov","maxFov","fov"],D=Math.PI/180,E=180/Math.PI,B=new THREE.Matrix4,C=new THREE.Euler,
F=new THREE.Vector3,G=new THREE.Vector3,I=new THREE.Vector3,N=new THREE.Vector3,P=new THREE.Vector3,Q=new THREE.Vector2,R=new THREE.Vector3(0,1,0),K=new THREE.Vector2;k.prototype.dispose=function(){this.Nj(null);this.Gfa();this.lga();this.Z4a();this.ts.xa();this.Qx=null};k.Va=function(M){M.K(e.Er).manager=new k(M)};k.xa=function(M){var T=M.getComponent(e.Er);T.manager.dispose();T.manager=null;M.ja(e.Er)};k.update=function(M){M.getComponent(e.Er).manager.update()};k.frame=function(M,T,S){M.getComponent(e.Er).manager.frame(T,
S)};l.prototype.uoa=function(){this.eR||(this.eR=!0,this.Uva=Date.now()-this.kda<this.Vva,this.kda=Date.now())};l.prototype.voa=function(){this.eR&&(this.eR=!1)};l.prototype.getState=function(){return this.eR||Date.now()-this.kda<this.Vva?this.Uva?l.u$:l.Ji:l.bk};l.bk=0;l.Ji=1;l.u$=2;return k});
define("tdv/player/view/webgl/system/cameraControls/FlyOverBehaviour","require tdv/utils tdv/constants/EventName tdv/constants/Key tdv/player/view/util/geo/Fov tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/components tdv/player/view/webgl/system/cameraControls/CameraControlBehaviourMixin tdv/player/view/webgl/system/cameraControls/DraggingObserver tdv/player/view/webgl/system/cameraControls/Object3DMovingSetter tdv/player/view/webgl/system/cameraControls/PropertiesSetter tdv/player/view/webgl/system/cameraControls/SequencesController tdv/player/view/webgl/system/util/mixin/KeyboardMixin tdv/player/view/webgl/system/util/mixin/MouseMixin tdv/view/constants/Cursor tdv/view/util/Ease tdv/view/util/EaseDimension".split(" "),function(a){function l(U){this.A=
U;this.Ffa(P);this.kga();this.ts=new m(U);this.qd=w;this.Ls=this.kk=null;this.fI=.025;this.gn=.25;this.cj=void 0;this.gI=1;this.Nl=this.$k=this.Ml=this.So=this.Ro=0;this.$l=[];this.eH=this.fH=this.gH=this.cH=this.bH=this.lC=this.jk=this.by=this.ey=this.hy=this.gy=this.ay=void 0;this.efa=1E3;this.FR=void 0;this.RL=0;this.Ka=null;this.SH(t.tB);this.update()}function k(U,V){U=V-U;U>180?U-=360:U<-180&&(U+=360);return U}function n(){return(new Date).getTime()}var g=a("tdv/utils"),h=a("tdv/constants/EventName"),
e=a("tdv/constants/Key");a("tdv/player/view/util/geo/Fov");var b=a("tdv/player/view/webgl/system/util/entity/Util"),c=a("tdv/player/view/webgl/components"),d=a("tdv/player/view/webgl/system/cameraControls/CameraControlBehaviourMixin"),f=a("tdv/player/view/webgl/system/cameraControls/DraggingObserver"),m=a("tdv/player/view/webgl/system/cameraControls/Object3DMovingSetter"),p=a("tdv/player/view/webgl/system/cameraControls/PropertiesSetter");a("tdv/player/view/webgl/system/cameraControls/SequencesController");
var q=a("tdv/player/view/webgl/system/util/mixin/KeyboardMixin"),r=a("tdv/player/view/webgl/system/util/mixin/MouseMixin"),t=a("tdv/view/constants/Cursor"),u=a("tdv/view/util/Ease"),v=a("tdv/view/util/EaseDimension");g.f5(l,[d,q,r]);l.prototype.update=function(){var U=this.A.getComponent(c.AF);this.Nj(U&&U.properties);this.ts.xP(U&&U.properties,"moving");var V=(!U.mO||!f.JO(this.A.T))&&U.enabled;this.C3(U&&(V?U.Pf:null));this.cS(!!U&&V&&U.YD);V||this.BH();V&&U.YD||(this.So=this.Ro=this.Ml=this.$k=
this.Nl=0)};l.prototype.frame=function(U){this.Ti&&(this.Ti.Lb(U),this.Ka.setX(this.Ti.nb("x")),this.Ka.setY(this.Ti.nb("y")),this.Ka.setZ(this.Ti.nb("z")),this.Ka.Ap(this.Ti.nb("distance")),this.Ka.Yj(0),this.Ti.Re()&&(this.Ti=null));this.qh&&(this.qh=Math.max(0,this.qh-U/this.efa),this.Ka.setX(this.B.get("x")+this.eH*this.qh),this.Ka.setY(this.B.get("y")+this.fH*this.qh),this.Ka.setZ(this.B.get("z")+this.gH*this.qh),this.Ka.mj(this.B.get("yaw")+this.cH*this.qh),this.Ka.Yn(this.B.get("pitch")+this.bH*
this.qh),this.Ka.Yj(0),this.A.T.Za(),this.qh==0&&this.NT());if(this.So||this.Ro||this.Ml||this.$k||this.Nl){var V=U/1E3;this.pga(this.Ml*V,this.$k*V,this.Nl*V,this.So*V,this.Ro*V)}if(this.qd==w&&this.im!==void 0&&!this.$k&&this.B.get("keepHeight")&&this.FR!==void 0&&Math.abs(this.im-this.B.get("y"))>S){this.RL=Math.max(this.RL-U,0);V=this.B.get("y");var aa=this.im-V;this.Ka.setY(V+Math.min(U*this.FR,Math.abs(aa))*(aa>0?1:-1));this.A.T.Za()}this.qd!=w||!this.Ls||this.qh||this.Ti||(this.sG(),this.A.T.Za());
this.ts.Wqa()};l.prototype.SS=function(){this.ika()};l.prototype.ika=function(){var U=this.Nl!=0||this.$k!=0||this.Ml!=0;this.So=this.Ro=this.Nl=this.$k=this.Ml=0;var V=this.Gg[e.ta.Fp]?1:this.Gg[e.ta.Kp]?-1:0,aa=this.Gg[e.ta.so]?1:this.Gg[e.ta.oo]?-1:0,ba=this.Gg[e.ta.Q]?1:this.Gg[e.ta.E]?-1:0,da=this.Gg[e.ta.bk]?1:this.Gg[e.ta.Ji]?-1:0,fa=this.Gg[e.ta.eb]?1:this.Gg[e.ta.Db]?-1:0;if(da||fa||V||aa||ba){var ha=this.sk?.2:1;V&&(this.Ml=-V*ha*this.B.get("translationSpeed"));ba&&(this.$k=-ba*ha*this.B.get("translationSpeed"));
aa&&(this.Nl=-aa*ha*this.B.get("translationSpeed"));fa&&(this.So=-fa*ha*100*this.B.get("rotationSpeed"));da&&(this.Ro=da*ha*100*this.B.get("rotationSpeed"));this.sG();this.A.T.Za();this.aia();this.cZa();V=this.Nl!=0||this.$k!=0||this.Ml!=0;!U&&V&&this.NT()}};l.prototype.T1=function(){this.xj=!0;this.qd==E||this.qd==B||n()<this.Bwa+500||(this.SH(t.Li),this.qd=w)};l.prototype.S1=function(U,V,aa,ba){if(this.xj&&!(this.qd==E||this.qd==B||n()<this.Bwa+500)){var da=(U*U+V*V)/2500;da=da>1?1/Math.sqrt(da):
1;U*=da;V*=da;da=this.I_a();this.qd!=da?(this.qd=da,this.qd==y?this.a7a(aa,ba):this.qd==x?this.LDa():this.qd==z?this.o7a():this.qd==D&&this.m7a()):this.qd!=w&&(this.qd==y?this.M8a(U,V,aa,ba):this.qd==x?this.p9a(U,V):this.qd==z?this.r9a(U,V):this.qd==D&&this.o9a(U,V))}};l.prototype.BH=function(){this.P2(t.Li);this.xj=!1;this.qd!=w&&(this.qd=w,this.kk=null,this.JDa(),this.aia(),this.Txa(),this.A.T.Za())};l.prototype.U1=function(U){this.qd!=A?(this.qd=A,this.i7a()):this.b9a(U);this.oga&&clearTimeout(this.oga);
this.oga=setTimeout(function(){this.oga=null;this.qd==A&&(this.qd=w,this.sv())}.bind(this),1E3)};l.prototype.Mza=function(U,V,aa,ba,da,fa,ha,ka,ia,ja){this.qd!=E&&this.qd!=B?(U=Math.abs(fa-da)>.05,aa=k(ia,ja)>5,V=Math.abs(ba-V)>.02*this.QG(),ia=Math.min(Math.abs(ia),180-Math.abs(ia),Math.abs(ja),180-Math.abs(ja))<10,ha=ha/this.py()<.2,(U||V)&&(ia||ha)?(this.qd=B,this.n7a()):!aa&&!U||ia&&ha||(this.qd=E,this.p7a())):this.qd==E?this.s9a(da,fa,ia,ja):this.qd==B&&this.q9a(V,ba,da,fa)};l.prototype.Jga=
function(){this.kk=null;this.qd==E&&this.JDa();this.qd=w;this.Bwa=n();this.aia();this.Txa();this.A.T.Za()};l.prototype.zM=function(U,V){if(this.B.get("doubleClickAction")=="zoom"){var aa=b.Qf(this.A),ba=b.ut(this.A);ba&&aa&&(ca.set(U,V),this.xS(ca),U=this.QR(ca,ba),U.length!=0&&(this.sv(),this.sG(),U=U[0].point,C.setFromMatrixPosition(ba.matrixWorld),this.Ti=new u("quad_in_out",[new v("x",C.x,(U.x+C.x)*.5),new v("y",C.y,(U.y+C.y)*.5),new v("z",C.z,(U.z+C.z)*.5),new v("distance",0,0)],500)))}};l.prototype.I_a=
function(){return this.uS?this.sk?x:y:this.aM()?this.sk?D:z:w};l.prototype.a7a=function(U,V){this.XM();this.sG();this.yVa(U,V);this.B.get("keepHeight")&&this.c4();this.A.T.Za()};l.prototype.M8a=function(U,V,aa,ba){var da=b.ut(this.A);da&&(C.setFromMatrixPosition(da.matrixWorld),this.kk?(F.set(aa,ba,0),this.xS(F),F.unproject(da),U=this.kk.x-C.x,V=this.kk.z-C.z,Math.atan2(this.kk.y-C.y,Math.sqrt(V*V+U*U))*T>-2?(I.copy(this.kk).applyMatrix4(da.matrixWorldInverse),N.copy(F).applyMatrix4(da.matrixWorldInverse),
U=I.z/N.z,G.copy(N).multiplyScalar(U).applyMatrix4(da.matrixWorld).sub(this.kk),G.y!=0&&this.sv()):(U=(this.kk.y-C.y)/(F.y-C.y),G.copy(F).sub(C).multiplyScalar(U).add(C).sub(this.kk)),G.multiplyScalar(-1)):(W.makeRotationFromEuler(ea.set(0,-this.B.get("yaw")*M,0,"YXZ")),X.set(-U*this.B.get("translationSpeed")/this.py(),0,-V*this.B.get("translationSpeed")/this.py()).applyMatrix4(W),G.copy(X).multiplyScalar(this.gI*10)),this.Ka.setX(C.x+G.x),this.Ka.setY(C.y+G.y),this.Ka.setZ(C.z+G.z),this.BN(G.x,G.y,
G.z,0,0),this.Ka.Yj(this.gn))};l.prototype.LDa=function(){this.XM();this.kk=null;this.Gba();this.sv();this.A.T.Za()};l.prototype.p9a=function(U,V){var aa;aa||(aa=1);U=U*360/this.wR()*this.B.get("rotationSpeed");V=-V*180/this.QG()*this.B.get("rotationSpeed");this.Ka.mj(this.B.get("yaw")+U);this.Ka.Yn(this.B.get("pitch")+V);this.Ka.Ap(this.rha/aa);this.BN(0,0,0,U,V);this.Ka.Yj(this.gn);this.A.T.Za()};l.prototype.o7a=function(){this.LDa()};l.prototype.r9a=function(U,V){var aa=b.ut(this.A),ba=this.B.get("distance")||
this.cj||1;V=V*ba*2*Math.tan(aa.fov*M/2)/this.QG();V!=0&&this.sv();this.Ka.setY(this.B.get("y")+V);U=U*360/this.wR()*this.B.get("rotationSpeed");this.Ka.mj(this.B.get("yaw")+U);this.BN(0,V,0,U,0);this.Ka.Yj(this.gn)};l.prototype.m7a=function(){this.XM();this.sG();this.sv();this.A.T.Za()};l.prototype.o9a=function(U,V){U=-U*360/this.wR()*this.B.get("rotationSpeed");V=V*180/this.QG()*this.B.get("rotationSpeed");this.Ka.mj(this.B.get("yaw")+U);this.Ka.Yn(this.B.get("pitch")+V);this.BN(0,0,0,U,V);this.Ka.Yj(this.gn);
this.A.T.Za()};l.prototype.i7a=function(){this.sv();this.XM();this.kk=null;this.sG();this.B.get("keepHeight")&&this.c4();this.A.T.Za()};l.prototype.b9a=function(U){this.$5a(X);X.multiplyScalar(-U*this.B.get("translationSpeed")*(this.gI||1));this.cj&&this.jua(this.cj+X.y);this.Ka.setX(this.B.get("x")+X.x);this.Ka.setY(this.B.get("y")+X.y);this.Ka.setZ(this.B.get("z")+X.z);this.Ka.Yj(this.fI)};l.prototype.p7a=function(){this.XM();this.kk=null;this.Gba();this.sv();this.A.T.Za();this.nv=void 0};l.prototype.s9a=
function(U,V,aa,ba){this.nv!==void 0||(this.nv=aa);aa=k(this.nv,ba);this.nv=ba;this.Ka.mj(this.B.get("yaw")+aa);this.Ka.Ap(this.rha*U/V);this.BN(0,0,0,aa,0);this.Ka.Yj(this.gn);this.A.T.Za()};l.prototype.n7a=function(){this.XM();this.kk=null;this.Gba();this.sv();this.A.T.Za();this.U2=void 0};l.prototype.q9a=function(U,V,aa,ba){this.U2!==void 0||(this.U2=U);U=-(V-this.U2)*180/this.QG();this.U2=V;this.Ka.Yn(this.B.get("pitch")+U);this.Ka.Ap(this.rha*aa/ba);this.BN(0,0,0,0,U);this.Ka.Yj(this.gn);this.A.T.Za()};
l.prototype.yVa=function(U,V){var aa=b.Qf(this.A),ba=b.ut(this.A);this.kk=null;ba&&aa&&(ca.set(U,V),this.xS(ca),U=this.QR(ca,ba),U.length&&(this.kk=U[0].point))};l.prototype.Gba=function(){this.Ls=null;var U=b.Qf(this.A),V=b.ut(this.A);V&&U&&(ca.set(0,0),U=this.QR(ca,V),U.length&&(this.Ls=U[0].point),this.Ls||(this.Ls=(new THREE.Vector3).setFromMatrixPosition(V.matrixWorld)),this.B.set("distance",C.setFromMatrixPosition(V.matrixWorld).distanceTo(this.Ls)),this.rha=this.B.get("distance"),this.B.set("x",
this.Ls.x),this.B.set("y",this.Ls.y),this.B.set("z",this.Ls.z),this.B.set("easing",0))};l.prototype.sG=function(){this.Ls&&(this.Ls=null,C.setFromMatrixPosition(b.ut(this.A).matrixWorld),this.B.set("distance",0),this.B.set("x",C.x),this.B.set("y",C.y),this.B.set("z",C.z),this.B.set("easing",0))};var w="none",y="dragging",x="rotating",z="rotating yaw dragging y",A="moving front",D="rotating around camera",E="rotating yaw gesture",B="rotating pitch gesture",C=new THREE.Vector3,F=new THREE.Vector3,G=
new THREE.Vector3,I=new THREE.Vector3,N=new THREE.Vector3;l.prototype.Nj=function(U){this.B!=U&&(this.B&&(this.Ka=null,Q.forEach(function(V){this.B.h(h.N(V),this.eFa,this,!1)}.bind(this)),R.forEach(function(V){this.B.h(h.N(V),this.Kz,this,!1)}.bind(this)),K.forEach(function(V){this.B.h(h.N(V),this.ct,this,!1)}.bind(this)),this.B.set("userInteracting",!1)),this.B=U)&&(this.Ka=new p(this.B),Q.forEach(function(V){this.B.bind(h.N(V),this.eFa,this,!1)}.bind(this)),R.forEach(function(V){this.B.bind(h.N(V),
this.Kz,this,!1)}.bind(this)),K.forEach(function(V){this.B.bind(h.N(V),this.ct,this,!1)}.bind(this)),this.Kz(),this.ct(),this.B.set("userInteracting",!1))};l.prototype.Kz=function(){if(this.A&&this.B){var U=this.A.O(c.sa,!0);U.translationX=this.B.get("x");var V=this.B.get("y")-U.translationY;Math.abs(V)>S&&(U.translationY=this.B.get("y"),this.qd!=w||this.Ml||this.$k||this.Nl||this.So||this.Ro||this.Ti||this.qh||this.sv());U.Xe=this.B.get("z");U.fd=-this.B.get("yaw");U.Wd=this.B.get("pitch");U.Ve=
0;U.jf="YXZ";U.positionX=0;U.positionY=0;U.positionZ=this.B.get("distance");U.easing=this.B.get("easing");(this.B.get("minHeight")!==void 0||this.B.get("keepHeight"))&&this.rFa()}};l.prototype.ct=function(){this.A&&this.B&&(this.A.O(c.PerspectiveCamera,!0).fov=this.B.get("fov"))};l.prototype.pga=function(U,V,aa,ba,da){var fa=this.A.getComponent(c.sa);fa&&(W.makeRotationFromEuler(ea.set(0,fa.fd*M,0,fa.jf)),X.set(U,V,aa).applyMatrix4(W).multiplyScalar(this.gI),this.cj!==void 0&&(this.cj+=X.y,this.NT()),
this.Ka.setX(this.B.get("x")+X.x),this.Ka.setY(this.B.get("y")+X.y),this.Ka.setZ(this.B.get("z")+X.z),this.Ka.mj(this.B.get("yaw")+ba),this.Ka.Yn(this.B.get("pitch")+da),this.Ka.Yj(this.gn))};l.prototype.$5a=function(U){var V=this.A.getComponent(c.sa);V&&(W.makeRotationFromEuler(ea.set(V.Wd*M,V.fd*M,V.Ve*M,V.jf)),U.set(0,0,1).applyMatrix4(W))};l.prototype.XM=function(){this.lC=n();this.jk=1;this.by=this.ey=this.hy=this.gy=this.ay=0;this.qh=this.eH=this.fH=this.gH=this.cH=this.bH=void 0};l.prototype.BN=
function(U,V,aa,ba,da){var fa=n();this.jk=fa-this.lC;this.lC=fa;this.by=U;this.ey=V;this.hy=aa;this.gy=ba;this.ay=da};l.prototype.JDa=function(){this.jk&&(this.eH=this.by/this.jk,this.fH=this.ey/this.jk,this.gH=this.hy/this.jk,this.cH=this.gy/this.jk,this.bH=this.ay/this.jk,this.qh=1)};l.prototype.eFa=function(){this.B.get("minHeight")!==void 0&&(this.cj===void 0&&this.c4(),this.cj!==void 0&&this.cj<this.B.get("minHeight")&&(this.cj=this.B.get("minHeight")),this.rFa())};l.prototype.sv=function(){this.cj=
this.im=void 0;this.OT&&(clearTimeout(this.OT),this.OT=null)};l.prototype.Txa=function(){this.RL=2E3;this.FR=void 0;this.A.T.Za()};l.prototype.cZa=function(){this.RL=0;this.FR=Infinity;this.A.T.Za()};l.prototype.aia=function(){this.kk||this.cj!==void 0||this.OT||(this.OT=setTimeout(function(){this.OT=null;this.c4()}.bind(this),0))};l.prototype.c4=function(){var U=this.uR();U!==void 0?this.jua(U):this.NT()};l.prototype.jua=function(U){var V=this.B.get("minHeight")||U;this.cj=Math.max(U,V);this.NT();
this.im=this.B.get("y")+this.cj-U};l.prototype.NT=function(){if(this.cj)this.gI=Math.min(10,Math.max(this.cj||0,.1));else{this.hs(X);this.q_a(Z);var U=this.jfa(X,Z);this.gI=U.length?X.distanceTo(U[0].point):X.y-(this.B.get("minY")||0)}this.gI=Math.max(Math.abs(this.gI||0),.1)};l.prototype.rFa=function(){this.sFa||this.cj===void 0||(this.sFa=setTimeout(function(){this.sFa=null;var U=this.uR();U!==void 0&&this.cj!==void 0&&(U=this.cj-U,this.FR=this.RL==0?Infinity:Math.abs(U/this.RL),this.im=this.B.get("y")+
U,U!==0&&this.A.T.Za())}.bind(this),0))};l.prototype.uR=function(){if(this.B)return this.hs(X),this.T_a(X.x,X.y,X.z)};l.prototype.T_a=function(U,V,aa){var ba=this.jfa(X.set(U,V,aa),Z.set(0,-1,0));if(ba.length>0)return ba[0].distance;ba=this.jfa(X.set(U,V+1E3,aa),Z.set(0,-1,0));if(ba.length>0)return ba[ba.length-1].distance-1E3};l.prototype.jfa=function(U,V){Y.ray.origin.copy(U);Y.ray.direction.copy(V);return Y.intersectObjects(this.TG(),!1)};l.prototype.QR=function(U,V){Y.setFromCamera(U,V);return Y.intersectObjects(this.TG(),
!1)};l.prototype.TG=function(){var U=this.A&&b.Qf(this.A);if(!U)return[];var V=[];U.traverse(function(aa){aa.isSprite||aa.isLine||V.push(aa)});return V};l.prototype.hs=function(U){U.set(0,0,0);this.B&&(U.applyMatrix4(W.makeTranslation(0,0,this.B.get("distance"))),U.applyMatrix4(W.makeRotationFromEuler(ea.set(this.B.get("pitch")*M,-this.B.get("yaw")*M,0*M,"YXZ"))),U.applyMatrix4(W.makeTranslation(this.B.get("x"),this.B.get("y"),this.B.get("z"))))};l.prototype.q_a=function(U){this.B?(W.makeRotationFromEuler(ea.set(this.B.get("pitch")*
M,-this.B.get("yaw")*M,0,"YXZ")),U.set(0,0,-1).applyMatrix4(W)):U.set(0,0,-1)};var P=[e.ta.bk,e.ta.Ji,e.ta.eb,e.ta.Db,e.ta.Fp,e.ta.oo,e.ta.Kp,e.ta.so,e.ta.Q,e.ta.E],Q=["minHeight"],R="minYaw maxYaw yaw minPitch maxPitch pitch minX maxX x minY maxY y minZ maxZ z distance easingSpeed".split(" "),K=["minFov","maxFov","fov"],M=Math.PI/180,T=180/Math.PI,S=1E-6,W=new THREE.Matrix4,X=new THREE.Vector3(0,0,0),Z=new THREE.Vector3(0,0,0),ca=new THREE.Vector2(0,0),ea=new THREE.Euler,Y=new THREE.Raycaster;l.prototype.dispose=
function(){this.sG();this.Nj(null);this.Gfa();this.lga();this.ts.xa()};l.Va=function(U){U.K(c.Gr).manager=new l(U)};l.xa=function(U){var V=U.getComponent(c.Gr);V.manager.dispose();V.manager=null;U.ja(c.Gr)};l.update=function(U){U.getComponent(c.Gr).manager.update()};l.frame=function(U,V,aa){U.getComponent(c.Gr).manager.frame(V,aa)};return l});
define("tdv/player/view/webgl/system/cameraControls/OrbitBehaviour","require tdv/utils tdv/constants/EventName tdv/constants/Key tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/system/cameraControls/CameraControlBehaviourMixin tdv/player/view/webgl/system/cameraControls/DraggingObserver tdv/player/view/webgl/system/cameraControls/Object3DMovingSetter tdv/player/view/webgl/system/cameraControls/PropertiesSetter tdv/player/view/webgl/system/util/mixin/KeyboardMixin tdv/player/view/webgl/system/util/mixin/MouseMixin tdv/view/constants/Cursor".split(" "),function(a){function l(C){this.A=
C;this.Ffa(D);this.kga();this.ts=new d(C);this.kl=new THREE.Matrix4;this.fI=.05;this.gn=.25;this.Ml=this.$k=this.Nl=this.So=this.Ro=0;this.eH=this.fH=this.gH=this.cH=this.bH=this.lC=this.jk=this.by=this.ey=this.hy=this.gy=this.ay=void 0;this.efa=1E3;this.zCa=720;this.pEa=4;this.oya=720;this.Hfa=2;this.Ka=null;this.SH(q.tB);this.update()}var k=a("tdv/utils"),n=a("tdv/constants/EventName"),g=a("tdv/constants/Key"),h=a("tdv/player/view/webgl/components"),e=a("tdv/player/view/webgl/system/util/entity/Util"),
b=a("tdv/player/view/webgl/system/cameraControls/CameraControlBehaviourMixin"),c=a("tdv/player/view/webgl/system/cameraControls/DraggingObserver"),d=a("tdv/player/view/webgl/system/cameraControls/Object3DMovingSetter"),f=a("tdv/player/view/webgl/system/cameraControls/PropertiesSetter"),m=a("tdv/player/view/webgl/system/util/mixin/KeyboardMixin"),p=a("tdv/player/view/webgl/system/util/mixin/MouseMixin"),q=a("tdv/view/constants/Cursor");k.f5(l,[b,m,p]);l.prototype.update=function(){var C=this.A.getComponent(h.HF);
this.Nj(C&&C.properties);this.ts.xP(C&&C.properties,"moving");var F=(!C.mO||!c.JO(this.A.T))&&C.enabled;this.C3(C&&(F?C.Pf:null));this.cS(!!C&&F&&C.YD);F||this.BH();F&&C.YD||(this.So=this.Ro=this.Ml=this.$k=this.Nl=0)};l.prototype.frame=function(C){this.qh&&(this.qh=Math.max(0,this.qh-C/this.efa),this.Ka.setX(this.B.get("x")+this.eH*this.qh),this.Ka.setY(this.B.get("y")+this.fH*this.qh),this.Ka.setZ(this.B.get("z")+this.gH*this.qh),this.Ka.mj(this.B.get("yaw")+this.cH*this.qh),this.Ka.Yn(this.B.get("pitch")+
this.bH*this.qh),this.A.T.Za());if(this.So||this.Ro||this.Ml||this.$k||this.Nl)C/=1E3,this.pga(this.Ml*C,this.$k*C,this.Nl*C,this.So*C,this.Ro*C);this.ts.Wqa()};l.prototype.SS=function(){this.ika()};l.prototype.ika=function(){this.So=this.Ro=this.Nl=this.$k=this.Ml=0;var C=this.Gg[g.ta.Fp]?1:this.Gg[g.ta.Kp]?-1:0,F=this.Gg[g.ta.so]?1:this.Gg[g.ta.oo]?-1:0,G=this.Gg[g.ta.Q]?1:this.Gg[g.ta.E]?-1:0,I=this.Gg[g.ta.bk]?1:this.Gg[g.ta.Ji]?-1:0,N=this.Gg[g.ta.eb]?1:this.Gg[g.ta.Db]?-1:0;if(C||F||G||I||N){var P=
this.sk?.2:1;C&&(this.Ml=-C*P*this.Hfa*this.B.get("translationSpeed"));G&&(this.$k=-G*P*this.Hfa*this.B.get("translationSpeed"));F&&(this.Nl=-F*P*this.Hfa*this.B.get("translationSpeed"));N&&(this.So=N*P*this.oya*this.B.get("rotationSpeed"));I&&(this.Ro=-I*P*this.oya*this.B.get("rotationSpeed"));this.A.T.Za()}};l.prototype.T1=function(){this.SH(q.Li);this.xj=!0;this.lC=(new Date).getTime();this.jk=1;this.by=this.ey=this.hy=this.gy=this.ay=0;this.qh=this.eH=this.fH=this.gH=this.cH=this.bH=void 0;this.A.T.Za()};
l.prototype.S1=function(C,F){if(this.xj){var G=(C*C+F*F)/2500;G=G>1?1/Math.sqrt(G):1;C*=G;F*=G;G=(new Date).getTime();this.jk=G-this.lC;this.lC=G;this.by=this.ey=this.hy=this.gy=this.ay=0;G=this.uS;this.sk&&(G=!G);G?(this.gy=+C*this.B.get("rotationSpeed")*this.zCa/this.py(),this.ay=-F*this.B.get("rotationSpeed")*this.zCa/this.py(),this.yCa(this.gy,this.ay)):(this.Uwa(C*this.pEa/this.py(),F*this.pEa/this.py(),u),this.by=u.x,this.ey=u.y,this.hy=u.z,this.Hja(this.by,this.ey,this.hy));this.Ka.Yj(this.gn)}};
l.prototype.Uwa=function(C,F,G){var I=this.A.getComponent(h.sa);G.set(-C*this.B.get("translationSpeed"),+F*this.B.get("translationSpeed"),0*this.B.get("translationSpeed"));G.applyMatrix4(z.makeRotationFromEuler(x.set(I.Wd*r,I.fd*r,I.Ve*r,I.jf)));G.multiplyScalar(this.B.get("distance"))};l.prototype.BH=function(){this.P2(q.Li);this.xj&&(this.xj=!1,this.jk&&(this.eH=this.by/this.jk,this.fH=this.ey/this.jk,this.gH=this.hy/this.jk,this.cH=this.gy/this.jk,this.bH=this.ay/this.jk,this.qh=1,this.Ka.Yj(this.gn)),
this.lC=void 0)};l.prototype.U1=function(C){this.Ka.Ap(this.B.get("distance")-C*this.B.get("distance")*this.B.get("translationSpeed"));this.Ka.Yj(this.fI)};l.prototype.zM=function(C,F){if(this.B.get("doubleClickAction")=="center"){var G=e.Qf(this.A),I=e.ut(this.A);I&&G&&(w.set(C,F),this.xS(w),C=this.QR(w,I),C.length!=0&&(C=C[0].point,F=u.setFromMatrixPosition(I.matrixWorld).sub(C),I=F.length(),y.setFromUnitVectors(v.set(0,0,1),F.normalize()),x.setFromQuaternion(y,"YXZ"),F=x.x*t,this.Ka.mj(-x.y*t),
this.Ka.Yn(F),this.Ka.Ap(I),this.Ka.setX(C.x),this.Ka.setY(C.y),this.Ka.setZ(C.z),this.Ka.Yj(this.fI)))}};l.prototype.Nza=function(){this.Uxa=this.B.get("distance");this.xj=!1};l.prototype.Iga=function(C,F,G){this.Uwa(C/this.py(),F/this.py(),u);this.Hja(u.x,u.y,u.z);this.Ka.Ap(this.Uxa/G);this.Ka.Yj(this.gn)};l.prototype.Jga=function(){this.Uxa=this.B.get("distance")};l.prototype.pga=function(C,F,G,I,N){var P=this.A.getComponent(h.sa);P&&(z.makeRotationFromEuler(x.set(0,P.fd*r,0,P.jf)),u.set(C,F,
G).applyMatrix4(z).multiplyScalar(this.B.get("distance")),this.Hja(u.x,u.y,u.z),this.yCa(I,N),this.Ka.Yj(this.gn))};l.prototype.Hja=function(C,F,G){this.Ka.setX(this.B.get("x")+C);this.Ka.setY(this.B.get("y")+F);this.Ka.setZ(this.B.get("z")+G)};l.prototype.yCa=function(C,F){this.Ka.mj(this.B.get("yaw")+C);this.Ka.Yn(this.B.get("pitch")+F)};l.prototype.Nj=function(C){this.B!=C&&(this.B&&(this.Ka=null,E.forEach(F=>{this.B.h(n.N(F),this.Kz,this)}),B.forEach(F=>{this.B.h(n.N(F),this.ct,this)}),this.B.set("userInteracting",
!1)),this.B=C)&&(this.B.set("userInteracting",!1),this.Ka=new f(this.B),E.forEach(F=>{this.B.bind(n.N(F),this.Kz,this)}),B.forEach(F=>{this.B.bind(n.N(F),this.ct,this)}),this.Kz(),this.ct())};l.prototype.QR=function(C,F){A.setFromCamera(C,F);return A.intersectObjects(this.TG(),!1)};l.prototype.TG=function(){var C=this.A&&e.Qf(this.A);if(!C)return[];var F=[];C.traverse(function(G){G.isSprite||G.isLine||F.push(G)});return F};l.prototype.Kz=function(){if(this.A&&this.B){var C=this.A.O(h.sa,!0);C.translationX=
this.B.get("x");C.translationY=this.B.get("y");C.Xe=this.B.get("z");C.fd=-this.B.get("yaw");C.Wd=this.B.get("pitch");C.Ve=0;C.jf="YXZ";C.positionX=0;C.positionY=0;C.positionZ=this.B.get("distance");C.easing=this.B.get("easing")}};l.prototype.ct=function(){this.A&&this.B&&(this.A.O(h.PerspectiveCamera,!0).fov=this.B.get("fov"))};var r=Math.PI/180,t=180/Math.PI,u=new THREE.Vector3(0,1,0),v=new THREE.Vector3(0,1,0),w=new THREE.Vector2(0,0),y=new THREE.Quaternion,x=new THREE.Euler,z=new THREE.Matrix4,
A=new THREE.Raycaster,D=[g.ta.bk,g.ta.Ji,g.ta.eb,g.ta.Db,g.ta.Fp,g.ta.oo,g.ta.Kp,g.ta.so,g.ta.Q,g.ta.E],E="easing minYaw maxYaw yaw minPitch maxPitch pitch minDistance maxDistance distance minX maxX x minY maxY y minZ maxZ z".split(" "),B=["minFov","maxFov","fov"];l.prototype.dispose=function(){this.Nj(null);this.Gfa();this.lga();this.ts.xa()};l.Va=function(C){C.K(h.Mr).manager=new l(C)};l.xa=function(C){var F=C.getComponent(h.Mr);F.manager.dispose();F.manager=null;C.ja(h.Mr)};l.update=function(C){C.getComponent(h.Mr).manager.update()};
l.frame=function(C,F,G){C.getComponent(h.Mr).manager.frame(F,G)};return l});
define("tdv/player/view/webgl/system/cameraControls/TransitionBehaviour","require exports tdv/player/view/util/XR tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/components three.mod".split(" "),function(a,l,k,n,g,h){a=function(){function c(d){this.F=d;this.properties=this.F.getComponent(g.yx).properties;this.jj()&&this.L$a();this.update()}c.prototype.update=function(){this.properties=this.F.getComponent(g.yx).properties;this.jj()||this.HGa()};c.prototype.frame=function(){this.jj()?
this.K$a():this.HGa()};c.prototype.L$a=function(){var d=this.F.getComponent(g.yx).kf||1;this.nIa();k.setPosition({x:this.properties.get("x"),y:this.properties.get("y"),z:this.properties.get("z"),yaw:this.properties.get("yaw")});k.setScale(d)};c.prototype.K$a=function(){this.nIa();k.setPosition({x:this.properties.get("x"),y:this.properties.get("y"),z:this.properties.get("z"),yaw:void 0});this.properties.set("yaw",-e.setFromQuaternion(k.ug).y*b)};c.prototype.HGa=function(){var d=this.F.O(g.sa,!0);d.translationX=
this.properties.get("x");d.translationY=this.properties.get("y");d.Xe=this.properties.get("z");d.fd=-this.properties.get("yaw");d.Wd=this.properties.get("pitch");d.Ve=0;d.jf="YXZ";d.positionX=0;d.positionY=0;d.positionZ=this.properties.get("distance",0);d.easing=0;this.F.O(g.PerspectiveCamera,!0).fov=this.properties.get("fov")};c.prototype.nIa=function(){var d=n.Qf(this.F),f=this.F.getComponent(g.Tk);f=f&&f.camera;k.Cw!==f&&k.Qpa(k.zg,d,f,k.mQ.paa)};c.prototype.jj=function(){return this.F.getComponent(g.PerspectiveCamera).jj};
c.Va=function(d){d.K(g.Du).manager=new c(d)};c.update=function(d){d.getComponent(g.Du).manager.update()};c.frame=function(d,f,m){d.getComponent(g.Du).manager.frame(f,m)};c.xa=function(d){d.getComponent(g.Du).manager=null;d.ja(g.Du)};return c}();var e=new h.Euler,b=180/Math.PI;return a});
define("tdv/player/view/webgl/system/cameraControls/XRBasicBehaviour",["require","exports","tdv/constants/EventName","tdv/player/view/util/XR","tdv/player/view/webgl/components"],function(a,l,k,n,g){return function(){function h(e){this.locked=!0;this.Ci=!1;this.F=e;n.M.bind(k.V,this.Ya,this,!0);this.update()}h.prototype.update=function(){var e=this.F.getComponent(g.RF);e=(e===null||e===void 0?void 0:e.locked)||!1;!e&&this.locked&&(this.Ci=!0);this.locked=e;this.Ci&&n.C8()};h.prototype.frame=function(){this.locked||
(this.Ci=!1)};h.prototype.dispose=function(){n.M.h(k.V,this.Ya,this)};h.prototype.Ya=function(){this.F.O(g.Qp)};h.Va=function(e){e.K(g.Qp).manager=new h(e)};h.update=function(e){e.getComponent(g.Qp).manager.update()};h.frame=function(e,b,c){e.getComponent(g.Qp).manager.frame(b,c)};h.xa=function(e){var b=e.getComponent(g.Qp);b.manager.dispose();b.manager=null;e.ja(g.Qp)};return h}()});
define("tdv/player/view/webgl/system/cameraControls/XRDragBehaviour","require exports tdv/constants/EventName tdv/player/view/util/XR tdv/player/view/webgl/system/cameraControls/CollidableObjects tdv/player/view/webgl/components three.mod".split(" "),function(a,l,k,n,g,h,e){a=function(){function x(z){this.locked=!0;this.Ci=!1;this.dma=this.sm=this.Se=null;this.L5=new e.Matrix4;this.UI=new e.Vector3;this.kP=new Map;this.kf=1;this.RE=0;this.lu=!1;this.Kk=0;this.xk=null;this.sE=new e.Vector3;this.Fd=
new e.Vector3;this.y7=new e.Quaternion;this.vX=this.wX=this.xX=0;this.Nz=new e.Box3(new e.Vector3(-Infinity,-Infinity,-Infinity),new e.Vector3(Infinity,Infinity,Infinity));this.F=z;this.Ek=this.Ek.bind(this);this.lt=new g(this.F);n.M.bind(k.V,this.Ya,this,!0);this.update()}x.prototype.update=function(){var z=this.F.getComponent(h.SK),A=(z===null||z===void 0?void 0:z.locked)||!1;!A&&this.locked&&(this.Ci=!0);this.locked=A;this.kf=(z===null||z===void 0?void 0:z.kf)||1;this.Kk=z===null||z===void 0?void 0:
z.Kk;this.TE();this.properties=z.properties;this.locked||(n.setScale(this.kf),this.BV(),this.Ek());this.Ci&&(b.setFromQuaternion(n.xl),n.setPosition({pitch:b.x*w,roll:b.z*w}),this.HI())};x.prototype.frame=function(z){if(!this.locked){this.iu();this.FY();this.HI();if(!this.properties.get("controllingPosition")){this.Fd.copy(n.Ic);this.y7.copy(n.ug);var A;(A=this.tV())||(A=this.hla(z));A||(A=this.uV(z));A&&(z={},n.Ic.equals(this.Fd)||(z.x=this.Fd.x,z.y=this.Fd.y,z.z=this.Fd.z),n.ug.equals(this.y7)||
(b.setFromQuaternion(this.y7,"YXZ"),z.yaw=-b.y*w,z.pitch=b.x*w,z.roll=b.z*w),n.setPosition(z))}this.GI();this.WN();this.Ci=!1}};x.prototype.dispose=function(){n.M.h(k.V,this.Ya,this);this.properties.set("userInteracting",!1);this.TE();this.hf();this.gY([])};x.prototype.TE=function(){x.yB.forEach(function(z){var A;(A=this.properties)===null||A===void 0||A.h(k.N(z),this.Ek,this)}.bind(this))};x.prototype.BV=function(){x.yB.forEach(function(z){var A;(A=this.properties)===null||A===void 0||A.bind(k.N(z),
this.Ek,this,!0)}.bind(this))};x.prototype.Ek=function(){this.Nz.min.set(this.properties.get("minX",-Infinity),this.properties.get("minY",-Infinity),this.properties.get("minZ",-Infinity));this.Nz.max.set(this.properties.get("maxX",Infinity),this.properties.get("maxY",Infinity),this.properties.get("maxZ",Infinity))};x.prototype.HI=function(){var z=this.properties.get("x"),A=this.properties.get("y"),D=this.properties.get("z"),E=this.properties.get("yaw"),B=this.properties.get("pitch"),C=this.properties.get("distance");
if(z!==this.sE.x||A!==this.sE.y||D!==this.sE.z||E!==this.xX||B!==this.wX||C!==this.vX)this.sE.set(z,A,D),m.identity(),m.multiply(p.makeTranslation(z,A,D)),m.multiply(p.makeRotationFromEuler(b.set(B*y,-E*y,0,"YXZ"))),m.multiply(p.makeTranslation(0,0,C)),m.decompose(d,c,f),b.setFromQuaternion(c,"YXZ"),n.setPosition({x:d.x,y:d.y,z:d.z,yaw:-b.y*w})};x.prototype.GI=function(){d.copy(n.Ic).sub(this.sE);var z=d.length();b.setFromQuaternion(c.setFromUnitVectors(u,d.multiplyScalar(1/z)),"YXZ");this.properties.set("x",
this.sE.x);this.properties.set("y",this.sE.y);this.properties.set("z",this.sE.z);this.properties.set("yaw",-b.y*w);this.properties.set("pitch",b.x*w);this.properties.set("roll",b.z*w);this.properties.set("distance",z)};x.prototype.WN=function(){this.xX=this.properties.get("yaw");this.wX=this.properties.get("pitch");this.vX=this.properties.get("distance")};x.prototype.iu=function(){this.gY((x.YE.get(this.F.T)||[]).map(function(z){return z.getComponent(h.yc)}))};x.prototype.gY=function(z){var A=[],
D=[];this.kP.forEach(function(E){z.indexOf(E)===-1&&A.push(E)}.bind(this));z.forEach(function(E){this.kP.has(E.M)||D.push(E)}.bind(this));this.sm&&z.indexOf(this.sm)===-1&&this.hf();A.forEach(function(E){this.zX(E.M);this.kP.delete(E.M)}.bind(this));D.forEach(function(E){this.rV(E.M);this.kP.set(E.M,E)}.bind(this));this.Se=z.find(function(E){return E.Sg})||null};x.prototype.rV=function(z){z.bind(k.la,this.Ht,this,!0);z.bind(k.Ra,this.Xh,this,!0)};x.prototype.zX=function(z){z.h(k.la,this.Ht,this);
z.h(k.Ra,this.Xh,this)};x.prototype.Ya=function(){this.F.O(h.Rp)};x.prototype.Ht=function(z){this.properties.get("inMandatorySequence")||z.data.zW||z.data.type=="other"||this.properties.get("clickTranslationDisabled")||(z=this.kP.get(z.source),z=this.lt.GW(z),z.length!=0&&(this.xk=z[0].point))};x.prototype.Xh=function(z){if(!this.properties.get("inMandatorySequence")&&!this.properties.get("mouseDisabled")){this.hf();z=z.source;var A=this.kP.get(z),D=this.lt.GW(A);D.length!=0&&(this.sm=A,this.dma=
z,this.dma.bind(k.ab,this.hf,this,!0),this.UI.copy(D[0].point),this.L5.copy(this.sm.matrixWorld))}};x.prototype.hf=function(){this.sm&&(this.sm.M.h(k.ab,this.hf,this),this.sm=this.dma=null)};x.prototype.tV=function(){if(!this.xk)return!1;this.Fd.copy(this.xk).sub(n.Ic).multiplyScalar(.5).add(n.Ic);this.xk=null;return!0};x.prototype.uV=function(z){return this.vV()?!0:this.wV(z)?!0:!1};x.prototype.vV=function(){if(!this.Se)return!1;if(this.Se.Qb.y===0&&this.Se.Qb.x===0)return this.RE=Date.now(),this.lu=
!1;if(this.lu)return!0;var z=Math.sqrt(this.Se.Qb.y*this.Se.Qb.y+this.Se.Qb.x*this.Se.Qb.x)*this.properties.get("rotationSpeed",1),A=Math.atan2(-this.Se.Qb.y,this.Se.Qb.x),D=Math.abs(A)<Math.PI*.25;A=Math.abs(A)>Math.PI*.75;return this.Kk!==0&&z>.95&&(D||A)&&Date.now()-this.RE<100?(this.lu=!0,z=this.Kk*(A?-1:1),z=-b.setFromQuaternion(n.ug,"YXZ").y*w+z,n.setPosition({yaw:z}),!0):!1};x.prototype.wV=function(z){if(!this.Se||this.Se.Qb.y===0&&this.Se.Qb.x===0)return!1;z=4E3/3600/this.kf*this.properties.get("translationSpeed",
1)*(this.Se.XA?3:1)*z/1E3;var A=d.set(0,0,-1).applyQuaternion(n.ug),D=f.set(1,0,0).applyQuaternion(n.ug);A.normalize().multiplyScalar(-this.Se.Qb.y*z);D.normalize().multiplyScalar(this.Se.Qb.x*z);this.Fd.set(n.Ic.x+A.x+D.x,n.Ic.y+A.y+D.y,n.Ic.z+A.z+D.z);return!0};x.prototype.hla=function(z){if(!this.sm)return!1;this.ila(z);z=m.copy(this.L5);var A=p.copy(this.sm.matrixWorld),D=q.compose(n.Ic,n.ug,v);A=r.copy(D).invert().multiply(A);t.copy(z).multiply(A.invert()).decompose(this.Fd,this.y7,d);return!0};
x.prototype.ila=function(z){if(!this.sm||this.sm.Qb.y===0&&this.sm.Qb.x===0)return!1;z=90*z/1E3*this.properties.get("rotationSpeed",1);var A=q.makeRotationFromQuaternion(c.setFromRotationMatrix(this.L5)),D=r.copy(A).invert(),E=p.identity();E.multiply(m.makeTranslation(this.UI.x,this.UI.y,this.UI.z));E.multiply(A);E.multiply(m.makeRotationFromEuler(b.set(this.sm.Qb.y*z*y,this.sm.Qb.x*z*y,0,"YXZ")));E.multiply(D);E.multiply(m.makeTranslation(-this.UI.x,-this.UI.y,-this.UI.z));this.L5.premultiply(E);
return!0};x.prototype.FY=function(){this.properties.get("inMandatorySequence")?this.properties.set("userInteracting",!1):this.sm?this.properties.set("userInteracting",!0):this.xk?this.properties.set("userInteracting",!0):!this.Se||this.Se.Qb.y===0&&this.Se.Qb.x===0?this.properties.set("userInteracting",!1):this.properties.set("userInteracting",!0)};x.XJ=function(z,A){this.YE.set(z,A)};x.Va=function(z){z.K(h.Rp).manager=new x(z)};x.update=function(z){z.getComponent(h.Rp).manager.update()};x.frame=
function(z,A,D){z.getComponent(h.Rp).manager.frame(A,D)};x.xa=function(z){var A=z.getComponent(h.Rp);A.manager.dispose();A.manager=null;z.ja(h.Rp)};x.YE=new Map;x.yB="minX maxX minY maxY minZ maxZ".split(" ");return x}();var b=new e.Euler(0,0,0,"YXZ"),c=new e.Quaternion,d=new e.Vector3,f=new e.Vector3,m=new e.Matrix4,p=new e.Matrix4,q=new e.Matrix4,r=new e.Matrix4,t=new e.Matrix4,u=new e.Vector3(0,0,1),v=new e.Vector3(1,1,1),w=180/Math.PI,y=Math.PI/180;return a});
define("tdv/player/view/webgl/system/cameraControls/XRFlyBehaviour","require exports tdv/constants/EventName tdv/player/view/util/XR tdv/player/view/webgl/system/cameraControls/CollidableObjects tdv/player/view/webgl/components three.mod".split(" "),function(a,l,k,n,g,h,e){a=function(){function y(x){this.locked=!0;this.Ci=!1;this.Vj=this.HX=this.Se=null;this.boa=new e.Matrix4;this.GJ=[];this.kf=1;this.RE=0;this.lu=!1;this.Kk=0;this.xk=null;this.mra=!1;this.Fd=new e.Vector3;this.vX=this.wX=this.xX=
this.MNa=this.LNa=this.KNa=0;this.Nz=new e.Box3(new e.Vector3(-Infinity,-Infinity,-Infinity),new e.Vector3(Infinity,Infinity,Infinity));this.F=x;this.Ek=this.Ek.bind(this);this.lt=new g(this.F);n.M.bind(k.V,this.Ya,this,!0);this.update()}y.prototype.update=function(){var x=this.F.getComponent(h.TK),z=(x===null||x===void 0?void 0:x.locked)||!1;!z&&this.locked&&(this.Ci=!0);this.locked=z;this.kf=(x===null||x===void 0?void 0:x.kf)||1;this.Kk=x===null||x===void 0?void 0:x.Kk;this.TE();this.properties=
x.properties;this.locked||(n.setScale(this.kf),this.BV(),this.Ek());this.Ci&&(b.setFromQuaternion(n.xl),n.setPosition({pitch:b.x*v,roll:b.z*v}),this.HI(!0))};y.prototype.frame=function(x){if(!this.locked){this.iu();this.FY();this.HI(!1);if(!this.properties.get("controllingPosition")){this.Fd.copy(n.Ic);var z=this.kE=-b.setFromQuaternion(n.ug).y*v;var A=this.tV();this.mra&&this.Vj&&this.boa.copy(this.Vj.matrixWorld);this.mra=!1;A||(A=this.mra=this.ila(x));A||(A=this.hla(x));A||(A=this.uV(x));A&&(x=
{},n.Ic.equals(this.Fd)||(x.x=this.Fd.x,x.y=this.Fd.y,x.z=this.Fd.z),this.kE!=z&&(x.yaw=this.kE),n.setPosition(x))}this.GI();this.WN();this.Ci=!1}};y.prototype.dispose=function(){n.M.h(k.V,this.Ya,this);this.properties.set("userInteracting",!1);this.TE();this.hf();this.gY([])};y.prototype.TE=function(){y.yB.forEach(function(x){var z;(z=this.properties)===null||z===void 0||z.h(k.N(x),this.Ek,this)}.bind(this))};y.prototype.BV=function(){y.yB.forEach(function(x){var z;(z=this.properties)===null||z===
void 0||z.bind(k.N(x),this.Ek,this,!0)}.bind(this))};y.prototype.Ek=function(){this.Nz.min.set(this.properties.get("minX",-Infinity),this.properties.get("minY",-Infinity),this.properties.get("minZ",-Infinity));this.Nz.max.set(this.properties.get("maxX",Infinity),this.properties.get("maxY",Infinity),this.properties.get("maxZ",Infinity))};y.prototype.HI=function(x){var z=this.properties.get("x"),A=this.properties.get("y"),D=this.properties.get("z"),E=this.properties.get("controllingPosition"),B=this.properties.get("yaw"),
C=this.properties.get("pitch"),F=this.properties.get("distance");if(z!==this.KNa||A!==this.LNa||D!==this.MNa||B!==this.xX||C!==this.wX||F!==this.vX)m.identity(),m.multiply(p.makeTranslation(z,A,D)),m.multiply(p.makeRotationFromEuler(b.set(C*w,-B*w,0,"YXZ"))),m.multiply(p.makeTranslation(0,0,F)),m.decompose(d,c,f),b.setFromQuaternion(c,"YXZ"),n.setPosition({x:d.x,y:d.y,z:d.z,yaw:!x||E?void 0:-b.y*v})};y.prototype.GI=function(){this.properties.set("x",n.Ic.x);this.properties.set("y",n.Ic.y);this.properties.set("z",
n.Ic.z);b.setFromQuaternion(n.ug);this.properties.set("yaw",-b.y*v);this.properties.set("pitch",b.x*v);this.properties.set("roll",b.z*v);this.properties.set("distance",0)};y.prototype.WN=function(){this.KNa=this.properties.get("x");this.LNa=this.properties.get("y");this.MNa=this.properties.get("z");this.xX=this.properties.get("yaw");this.wX=this.properties.get("pitch");this.vX=this.properties.get("distance")};y.prototype.iu=function(){this.gY((y.YE.get(this.F.T)||[]).map(function(x){return x.getComponent(h.yc)}))};
y.prototype.gY=function(x){var z=[],A=[];this.GJ.forEach(function(D){x.indexOf(D)===-1&&z.push(D)}.bind(this));x.forEach(function(D){this.GJ.indexOf(D)===-1&&A.push(D)}.bind(this));this.Vj&&x.indexOf(this.Vj)===-1&&this.hf();z.forEach(function(D){this.zX(D);this.GJ.splice(this.GJ.indexOf(D),1)}.bind(this));A.forEach(function(D){this.rV(D);this.GJ.push(D)}.bind(this));this.Se=x.find(function(D){return D.Sg})||null;this.HX=x.find(function(D){return!D.Sg})||this.Se};y.prototype.rV=function(x){x.M.bind(k.Ra,
this.Xh,this,!0);x.M.bind(k.la,this.Ht,this,!0)};y.prototype.zX=function(x){x.M.h(k.Ra,this.Xh,this);x.M.h(k.la,this.Ht,this)};y.prototype.Ya=function(){this.F.O(h.Sp)};y.prototype.Ht=function(x){if(!(this.properties.get("inMandatorySequence")||x.data.zW||x.data.type=="other"||this.properties.get("clickTranslationDisabled"))){var z=this.GJ.find(function(A){return x.source===A.M});z&&(z=this.lt.GW(z),z.length!=0&&(this.xk=z[0].point))}};y.prototype.Xh=function(x){if(!this.properties.get("inMandatorySequence")&&
!this.properties.get("mouseDisabled")){this.hf();var z=this.GJ.find(function(A){return x.source===A.M});z&&(this.Vj=z,this.Vj.M.bind(k.ab,this.hf,this,!0),this.boa.copy(this.Vj.matrixWorld),z=this.lt.GW(z),z.length!=0&&(this.fE=(new e.Vector3).copy(z[0].point)))}};y.prototype.hf=function(){this.Vj&&(this.Vj.M.h(k.ab,this.hf,this),this.fE=this.Vj=null)};y.prototype.tV=function(){if(!this.xk)return!1;this.Fd.copy(this.xk).sub(n.Ic).multiplyScalar(.5).add(n.Ic);this.xk=null;return!0};y.prototype.uV=
function(x){return this.vV()?!0:this.wV(x)?!0:!1};y.prototype.vV=function(){var x=this.HX;if(!x)return!1;if(x.Qb.y===0&&x.Qb.x===0)return this.RE=Date.now(),this.lu=!1;if(this.lu)return!0;var z=Math.sqrt(x.Qb.y*x.Qb.y+x.Qb.x*x.Qb.x),A=Math.atan2(-x.Qb.y,x.Qb.x);x=Math.abs(A)<Math.PI*.25;A=Math.abs(A)>Math.PI*.75;return this.Kk!==0&&z>.95&&(x||A)&&Date.now()-this.RE<100?(this.lu=!0,this.kE+=this.Kk*(A?-1:1),!0):!1};y.prototype.wV=function(x){if(!this.Se||this.Se.Qb.y===0&&this.Se.Qb.x===0)return!1;
x=1E4/3600/this.kf*this.properties.get("translationSpeed",1)*(this.Se.XA?3:1)*x/1E3;this.Se.matrixWorld.decompose(d,c,f);var z=d.set(0,0,-1).applyQuaternion(c),A=f.set(1,0,0).applyQuaternion(c);z.normalize().multiplyScalar(-this.Se.Qb.y*x);A.normalize().multiplyScalar(this.Se.Qb.x*x);this.Fd.set(n.Ic.x+z.x+A.x,n.Ic.y+z.y+A.y,n.Ic.z+z.z+A.z);return!0};y.prototype.hla=function(){if(!this.Vj)return!1;var x=this.nHa(m.copy(this.boa)),z=this.nHa(p.copy(this.Vj.matrixWorld)),A=q.compose(n.Ic,n.ug,u);z=
r.copy(A).invert().multiply(z);t.copy(x).multiply(z.invert()).decompose(this.Fd,c,d);this.kE=-b.setFromQuaternion(c).y*v;return!0};y.prototype.nHa=function(x){return x.decompose(d,c,f).compose(d,c.identity(),f)};y.prototype.ila=function(x){if(!this.Vj||!this.fE||this.Vj.Qb.y===0&&this.Vj.Qb.x===0)return!1;x=90*x/1E3;var z=m.compose(n.Ic,n.ug,u),A=p.identity();A.multiply(q.makeTranslation(this.fE.x,this.fE.y,this.fE.z));A.multiply(q.makeRotationY(-this.kE*w));A.multiply(q.makeRotationFromEuler(b.set(this.Vj.Qb.y*
x*w,this.Vj.Qb.x*x*w,0,"YXZ")));A.multiply(q.makeRotationY(this.kE*w));A.multiply(q.makeTranslation(-this.fE.x,-this.fE.y,-this.fE.z));z.premultiply(A);z.decompose(this.Fd,c,d);this.kE=-b.setFromQuaternion(c).y*v;return!0};y.prototype.FY=function(){this.properties.get("inMandatorySequence")?this.properties.set("userInteracting",!1):this.Vj?this.properties.set("userInteracting",!0):this.xk?this.properties.set("userInteracting",!0):!this.Se||this.Se.Qb.y===0&&this.Se.Qb.x===0?this.properties.set("userInteracting",
!1):this.properties.set("userInteracting",!0)};y.XJ=function(x,z){this.YE.set(x,z)};y.Va=function(x){x.K(h.Sp).manager=new y(x)};y.update=function(x){x.getComponent(h.Sp).manager.update()};y.frame=function(x,z,A){x.getComponent(h.Sp).manager.frame(z,A)};y.xa=function(x){var z=x.getComponent(h.Sp);z.manager.dispose();z.manager=null;x.ja(h.Sp)};y.YE=new Map;y.yB="minX maxX minY maxY minZ maxZ".split(" ");return y}();var b=new e.Euler(0,0,0,"YXZ");new e.Euler(0,0,0,"YXZ");var c=new e.Quaternion,d=new e.Vector3,
f=new e.Vector3,m=new e.Matrix4,p=new e.Matrix4,q=new e.Matrix4,r=new e.Matrix4,t=new e.Matrix4,u=new e.Vector3(1,1,1),v=180/Math.PI,w=Math.PI/180;return a});
define("tdv/player/view/webgl/system/cameraControls/XRTeleportBehaviour","require exports tdv/constants/EventName tdv/player/view/util/XR tdv/player/view/webgl/system/cameraControls/CollidableObjects tdv/player/view/webgl/components three.mod".split(" "),function(a,l,k,n,g,h,e){a=function(){function r(t){this.locked=!0;this.Ci=!1;this.HX=this.le=this.cr=null;this.kf=1;this.RE=0;this.lu=!1;this.Kk=0;this.xk=null;this.Fd=new e.Vector3;this.ZV=[];this.Rt=new e.Vector3;this.Nz=new e.Box3(new e.Vector3(-Infinity,
-Infinity,-Infinity),new e.Vector3(Infinity,Infinity,Infinity));this.F=t;this.Ek=this.Ek.bind(this);this.lt=new g(this.F);n.M.bind(k.V,this.Ya,this,!0);this.update()}r.prototype.update=function(){var t=this.F.getComponent(h.UK),u=(t===null||t===void 0?void 0:t.locked)||!1;!u&&this.locked&&(this.Ci=!0);this.locked=u;this.kf=(t===null||t===void 0?void 0:t.kf)||1;this.Kk=t===null||t===void 0?void 0:t.Kk;this.TE();this.properties=t.properties;this.locked||(n.setScale(this.kf),this.BV(),this.Ek());this.Ci&&
(b.setFromQuaternion(n.xl),n.setPosition({x:this.properties.get("x"),y:this.properties.get("y"),z:this.properties.get("z"),yaw:this.properties.get("yaw"),pitch:b.x*q,roll:b.z*q}))};r.prototype.TE=function(){r.yB.forEach(function(t){var u;(u=this.properties)===null||u===void 0||u.h(k.N(t),this.Ek,this)}.bind(this))};r.prototype.BV=function(){r.yB.forEach(function(t){var u;(u=this.properties)===null||u===void 0||u.bind(k.N(t),this.Ek,this,!0)}.bind(this))};r.prototype.Ek=function(){this.Nz.min.set(this.properties.get("minX",
-Infinity),this.properties.get("minY",-Infinity),this.properties.get("minZ",-Infinity));this.Nz.max.set(this.properties.get("maxX",Infinity),this.properties.get("maxY",Infinity),this.properties.get("maxZ",Infinity))};r.prototype.frame=function(t){this.locked||(this.iu(),this.FY(),this.HI(),this.properties.get("controllingPosition")||(this.Fd.copy(n.Ic),this.tV()||this.uV(t),this.Fd.y=this.qGa(this.Rt.y,this.y6(this.Fd.x,this.Fd.y,this.Fd.z),t),this.zbb()&&(this.Fd.copy(this.Rt),this.Fd.y=this.qGa(this.Rt.y,
this.y6(this.Fd.x,this.Fd.y,this.Fd.z),t)),this.Nz.clampPoint(this.Fd,this.Fd),n.Ic.equals(this.Fd)||n.setPosition({x:this.Fd.x,y:this.Fd.y,z:this.Fd.z,$a:void 0})),this.GI(),this.WN(),this.ihb(),this.Ci=!1)};r.prototype.ihb=function(){this.lt.refresh();this.ZV.forEach(function(t){t.y=NaN})};r.prototype.dispose=function(){n.M.h(k.V,this.Ya,this);this.properties.set("userInteracting",!1);this.TE()};r.prototype.HI=function(){var t=this.properties.get("x"),u=this.properties.get("y"),v=this.properties.get("z");
if(this.Rt.x!==t||this.Rt.y!==u||this.Rt.z!==v)this.properties.get("controllingPosition")||(u=this.y6(t,u,v)),n.setPosition({x:t,y:u,z:v,yaw:void 0}),this.WN()};r.prototype.GI=function(){this.properties.set("x",n.Ic.x);this.properties.set("y",n.Ic.y);this.properties.set("z",n.Ic.z);b.setFromQuaternion(n.ug);this.properties.set("yaw",-b.y*q);this.properties.set("pitch",b.x*q);this.properties.set("roll",b.z*q)};r.prototype.WN=function(){this.Rt.copy(n.Ic);this.JNa=this.Ema(this.Rt)};r.prototype.iu=
function(){var t=null,u=null;(r.YE.get(this.F.T)||[]).forEach(function(v){v=v.getComponent(h.yc);v.Sg?t=v:u=v});this.Gib(t,u)};r.prototype.Gib=function(t,u){this.cr=t;this.HX=u;t=t?t.M:null;this.le!==t&&(this.le&&this.zX(this.le),(this.le=t)&&this.rV(this.le))};r.prototype.rV=function(t){t.bind(k.la,this.Ht,this,!0)};r.prototype.zX=function(t){t.h(k.la,this.Ht,this)};r.prototype.Ya=function(){this.F.O(h.Tp)};r.prototype.Ht=function(t){if(this.cr&&this.properties&&!this.properties.get("inMandatorySequence")&&
!t.data.zW&&t.data.type!="other"&&!this.properties.get("clickTranslationDisabled")&&this.properties.get("doubleClickAction")=="translate"&&(t=this.lt.GW(this.cr),t.length!=0)){var u=t[0];if(u.face&&u.face.normal){t=c.copy(n.Ic);var v=d.copy(u.point);u=f.copy(u.face.normal).transformDirection(u.object.matrixWorld);if(Math.abs(Math.acos(u.dot(p)))<Math.PI*.25)v.y+=this.l6();else{u=m.copy(v).sub(t);var w=u.length(),y=this.l6()*.5;if(w<y)return;v.sub(u.multiplyScalar(y/w))}v.y=this.y6(v.x,v.y,v.z);this.lt.fK(t,
v)||(this.xk=new e.Vector3(v.x,v.y,v.z))}}};r.prototype.tV=function(){if(!this.xk)return!1;this.Fd.copy(this.xk);this.xk=null;return!0};r.prototype.uV=function(t){return this.vV()?!0:this.wV(t)?!0:!1};r.prototype.vV=function(){var t=this.HX;if(!t)return!1;if(t.Qb.y===0&&t.Qb.x===0)return this.RE=Date.now(),this.lu=!1;if(this.lu)return!0;var u=Math.sqrt(t.Qb.y*t.Qb.y+t.Qb.x*t.Qb.x),v=Math.atan2(-t.Qb.y,t.Qb.x);t=Math.abs(v)<Math.PI*.25;v=Math.abs(v)>Math.PI*.75;return this.Kk!==0&&u>.95&&(t||v)&&Date.now()-
this.RE<100?(this.lu=!0,u=this.Kk*(v?-1:1),u=-b.setFromQuaternion(n.ug,"YXZ").y*q+u,n.setPosition({x:void 0,y:void 0,z:void 0,yaw:u}),!0):!1};r.prototype.wV=function(t){if(!this.cr||this.cr.Qb.y===0&&this.cr.Qb.x===0)return!1;t=4E3/3600/this.kf*this.properties.get("translationSpeed",1)*(this.cr.XA?3:1)*t/1E3;var u=c.set(0,0,-1).applyQuaternion(n.ug),v=d.crossVectors(u,p);u.y=0;v.y=0;u.normalize().multiplyScalar(-this.cr.Qb.y*t);v.normalize().multiplyScalar(this.cr.Qb.x*t);this.Fd.set(n.Ic.x+u.x+v.x,
n.Ic.y,n.Ic.z+u.z+v.z);return!0};r.prototype.FY=function(){this.properties.get("inMandatorySequence")?this.properties.set("userInteracting",!1):this.xk?this.properties.set("userInteracting",!0):!this.cr||this.cr.Qb.y===0&&this.cr.Qb.x===0?this.properties.set("userInteracting",!1):this.properties.set("userInteracting",!0)};r.prototype.zbb=function(){if(!this.properties.get("collisionDetection"))return!1;var t=c,u=d;t.copy(this.Fd).sub(this.Rt);u.copy(this.Rt).add(t.setLength(t.length()+.2/this.kf));
if(this.lt.fK(this.Rt,u))return!0;t=this.properties.get("maxStepHeight");t===void 0&&(t=this.l6()*.25);u=this.Ema(this.Fd);return this.JNa>-Infinity&&u>-Infinity&&this.JNa+t<u?!0:!1};r.prototype.qGa=function(t,u,v){var w=u-t,y=Math.abs(w);v=2/this.kf*(v/1E3);return v>y?u:t+w*v/y};r.prototype.y6=function(t,u,v){t=this.Ci?-Infinity:this.Ema(c.set(t,u,v));return t===-Infinity?u:t+this.l6()};r.prototype.Ema=function(t){var u=this.ZV.findIndex(function(w){return w.x==t.x&&w.z==t.z&&!isNaN(w.y)});if(u!==
-1)return this.ZV[u].y;u=this.lt.RV(t);var v=this.ZV.find(function(w){return isNaN(w.y)});v||this.ZV.push(v=new e.Vector3);v.set(t.x,t.y-u,t.z);return v.y};r.prototype.l6=function(){return n.bO/this.kf};r.XJ=function(t,u){this.YE.set(t,u)};r.Va=function(t){t.K(h.Tp).manager=new r(t)};r.update=function(t){t.getComponent(h.Tp).manager.update()};r.frame=function(t,u,v){t.getComponent(h.Tp).manager.frame(u,v)};r.xa=function(t){var u=t.getComponent(h.Tp);u.manager.dispose();u.manager=null;t.ja(h.Tp)};
r.YE=new Map;r.yB="minX maxX minY maxY minZ maxZ".split(" ");return r}();var b=new e.Euler(0,0,0,"YXZ"),c=new e.Vector3,d=new e.Vector3,f=new e.Vector3,m=new e.Vector3,p=new e.Vector3(0,1,0),q=180/Math.PI;return a});
define("tdv/player/view/webgl/system/cameraControls/System","require tdv/utils tdv/player/view/webgl/ecs/System tdv/player/view/webgl/components tdv/player/view/webgl/system/cameraControls/ARBehaviour tdv/player/view/webgl/system/cameraControls/CollidableObjects tdv/player/view/webgl/system/cameraControls/CameraSequenceBehaviour tdv/player/view/webgl/system/cameraControls/DraggingObserver tdv/player/view/webgl/system/cameraControls/FirstPersonBehaviour tdv/player/view/webgl/system/cameraControls/FlyOverBehaviour tdv/player/view/webgl/system/cameraControls/OrbitBehaviour tdv/player/view/webgl/system/cameraControls/TransitionBehaviour tdv/player/view/webgl/system/cameraControls/XRBasicBehaviour tdv/player/view/webgl/system/cameraControls/XRDragBehaviour tdv/player/view/webgl/system/cameraControls/XRFlyBehaviour tdv/player/view/webgl/system/cameraControls/XRTeleportBehaviour".split(" "),function(a){var l=
a("tdv/utils"),k=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/cameraControls/ARBehaviour"),h=a("tdv/player/view/webgl/system/cameraControls/CollidableObjects"),e=a("tdv/player/view/webgl/system/cameraControls/CameraSequenceBehaviour"),b=a("tdv/player/view/webgl/system/cameraControls/DraggingObserver"),c=a("tdv/player/view/webgl/system/cameraControls/FirstPersonBehaviour"),d=a("tdv/player/view/webgl/system/cameraControls/FlyOverBehaviour"),
f=a("tdv/player/view/webgl/system/cameraControls/OrbitBehaviour"),m=a("tdv/player/view/webgl/system/cameraControls/TransitionBehaviour"),p=a("tdv/player/view/webgl/system/cameraControls/XRBasicBehaviour"),q=a("tdv/player/view/webgl/system/cameraControls/XRDragBehaviour"),r=a("tdv/player/view/webgl/system/cameraControls/XRFlyBehaviour"),t=a("tdv/player/view/webgl/system/cameraControls/XRTeleportBehaviour");a=l.extend(k,function(){k.apply(this,arguments)});a.prototype.Yc=function(u,v){(this.joa.be.length||
this.joa.Vg.length)&&h.wib(this.joa.v);this.WGa.v.length&&this.WGa.v.slice().forEach(e.Va);this.t5.Da.length&&this.t5.Da.slice().forEach(e.update);this.t5.v.length&&this.t5.v.slice().forEach(function(w){e.frame(w,u,v)});this.XGa.v.length&&this.XGa.v.slice().forEach(e.xa);this.IIa.v.length&&this.IIa.v.slice().forEach(d.xa);this.JIa.v.length&&this.JIa.v.slice().forEach(d.xa);this.KIa.v.length&&this.KIa.v.slice().forEach(d.xa);this.zIa.v.length&&this.zIa.v.slice().forEach(c.xa);this.AIa.v.length&&this.AIa.v.slice().forEach(c.xa);
this.BIa.v.length&&this.BIa.v.slice().forEach(c.xa);this.XMa.v.length&&this.XMa.v.slice().forEach(f.xa);this.YMa.v.length&&this.YMa.v.slice().forEach(f.xa);this.ZMa.v.length&&this.ZMa.v.slice().forEach(f.xa);this.ERa.v.length&&this.ERa.v.slice().forEach(p.xa);this.FRa.v.length&&this.FRa.v.slice().forEach(p.xa);this.GRa.v.length&&this.GRa.v.slice().forEach(p.xa);this.tGa.v.length&&this.tGa.v.slice().forEach(g.xa);this.uGa.v.length&&this.uGa.v.slice().forEach(g.xa);this.vGa.v.length&&this.vGa.v.slice().forEach(g.xa);
this.HIa.v.length&&this.HIa.v.slice().forEach(d.Va);this.$V.Da.length&&this.$V.Da.slice().forEach(d.update);this.$V.v.length&&this.$V.v.slice().forEach(function(w){d.frame(w,u,v)});this.yIa.v.length&&this.yIa.v.slice().forEach(c.Va);this.YV.Da.length&&this.YV.Da.slice().forEach(c.update);this.YV.v.length&&this.YV.v.slice().forEach(function(w){c.frame(w,u,v)});this.WMa.v.length&&this.WMa.v.slice().forEach(f.Va);this.mX.Da.length&&this.mX.Da.slice().forEach(f.update);this.mX.v.length&&this.mX.v.slice().forEach(function(w){f.frame(w,
u,v)});this.DRa.v.length&&this.DRa.v.slice().forEach(p.Va);this.IY.Da.length&&this.IY.Da.slice().forEach(p.update);this.IY.v.length&&this.IY.v.slice().forEach(function(w){p.frame(w,u,v)});this.RRa.v.length&&this.RRa.v.slice().forEach(t.xa);this.SRa.v.length&&this.SRa.v.slice().forEach(t.xa);this.TRa.v.length&&this.TRa.v.slice().forEach(t.xa);this.JRa.v.length&&this.JRa.v.slice().forEach(q.xa);this.KRa.v.length&&this.KRa.v.slice().forEach(q.xa);this.LRa.v.length&&this.LRa.v.slice().forEach(q.xa);this.NRa.v.length&&
this.NRa.v.slice().forEach(r.xa);this.ORa.v.length&&this.ORa.v.slice().forEach(r.xa);this.PRa.v.length&&this.PRa.v.slice().forEach(r.xa);this.IQa.v.length&&this.IQa.v.slice().forEach(m.xa);this.JQa.v.length&&this.JQa.v.slice().forEach(m.xa);this.sGa.v.length&&this.sGa.v.slice().forEach(g.Va);this.g5.Da.length&&this.g5.Da.slice().forEach(g.update);this.g5.v.length&&this.g5.v.slice().forEach(function(w){g.frame(w,u,v)});t.XJ(this.T,this.Xj.v.slice());this.QRa.v.length&&this.QRa.v.slice().forEach(t.Va);
this.LY.Da.length&&this.LY.Da.slice().forEach(t.update);this.LY.v.length&&this.LY.v.slice().forEach(function(w){t.frame(w,u,v)});q.XJ(this.T,this.Xj.v.slice());this.IRa.v.length&&this.IRa.v.slice().forEach(q.Va);this.JY.Da.length&&this.JY.Da.slice().forEach(q.update);this.JY.v.length&&this.JY.v.slice().forEach(function(w){q.frame(w,u,v)});r.XJ(this.T,this.Xj.v.slice());this.MRa.v.length&&this.MRa.v.slice().forEach(r.Va);this.KY.Da.length&&this.KY.Da.slice().forEach(r.update);this.KY.v.length&&this.KY.v.slice().forEach(function(w){r.frame(w,
u,v)});this.HQa.v.length&&this.HQa.v.slice().forEach(m.Va);this.JP.Da.length&&this.JP.Da.slice().forEach(m.update);this.JP.be.length&&this.JP.be.slice().forEach(m.update);this.JP.v.length&&this.JP.v.slice().forEach(function(w){m.frame(w,u,v)});if(this.$z.be.length||this.$z.Vg.length)b.zpa(this.$z.v),this.YV.v.slice().forEach(c.update),this.$V.v.slice().forEach(d.update),this.mX.v.slice().forEach(f.update),this.IY.v.slice().forEach(p.update),this.JY.v.slice().forEach(q.update),this.KY.v.slice().forEach(r.update),
this.LY.v.slice().forEach(t.update)};a.J={};a.J.Xj=[n.yc];a.J.$z=[n.Jm];a.J.joa=[n.FF];a.J.yIa=[n.zF,n.kg.aa,n.Tf.aa,n.Er.aa];a.J.YV=[n.zF,n.kg.aa,n.Tf.aa,n.Er];a.J.zIa=[n.zF.aa,n.Er];a.J.AIa=[n.kg,n.Er];a.J.BIa=[n.Tf,n.Er];a.J.HIa=[n.AF,n.kg.aa,n.Tf.aa,n.Gr.aa];a.J.$V=[n.AF,n.kg.aa,n.Tf.aa,n.Gr];a.J.IIa=[n.AF.aa,n.Gr];a.J.JIa=[n.kg,n.Gr];a.J.KIa=[n.Tf,n.Gr];a.J.WMa=[n.HF,n.kg.aa,n.Tf.aa,n.Mr.aa];a.J.mX=[n.HF,n.kg.aa,n.Tf.aa,n.Mr];a.J.XMa=[n.HF.aa,n.Mr];a.J.YMa=[n.kg,n.Mr];a.J.ZMa=[n.Tf,n.Mr];a.J.HQa=
[n.yx,n.Tk,n.Du.aa];a.J.JP=[n.yx,n.Tk,n.Du];a.J.IQa=[n.Tk.aa,n.Du];a.J.JQa=[n.yx.aa,n.Du];a.J.QRa=[n.kg,n.Tf.aa,n.UK,n.Tp.aa];a.J.LY=[n.kg,n.Tf.aa,n.UK,n.Tp];a.J.RRa=[n.UK.aa,n.Tp];a.J.SRa=[n.kg.aa,n.Tp];a.J.TRa=[n.Tf,n.Tp];a.J.DRa=[n.kg,n.Tf.aa,n.RF,n.Qp.aa];a.J.IY=[n.kg,n.Tf.aa,n.RF,n.Qp];a.J.ERa=[n.RF.aa,n.Qp];a.J.FRa=[n.kg.aa,n.Qp];a.J.GRa=[n.Tf,n.Qp];a.J.IRa=[n.kg,n.Tf.aa,n.SK,n.Rp.aa];a.J.JY=[n.kg,n.Tf.aa,n.SK,n.Rp];a.J.JRa=[n.SK.aa,n.Rp];a.J.KRa=[n.kg.aa,n.Rp];a.J.LRa=[n.Tf,n.Rp];a.J.MRa=[n.kg,
n.Tf.aa,n.TK,n.Sp.aa];a.J.KY=[n.kg,n.Tf.aa,n.TK,n.Sp];a.J.NRa=[n.TK.aa,n.Sp];a.J.ORa=[n.kg.aa,n.Sp];a.J.PRa=[n.Tf,n.Sp];a.J.sGa=[n.Tf,n.kg.aa,n.Uw,n.ur.aa];a.J.g5=[n.Tf,n.Uw,n.ur];a.J.tGa=[n.Uw.aa,n.ur];a.J.uGa=[n.Tf.aa,n.ur];a.J.vGa=[n.kg,n.ur];a.J.WGa=[n.xK,n.ax.aa];a.J.t5=[n.xK,n.ax];a.J.XGa=[n.xK.aa,n.ax];return a});
define("tdv/player/view/webgl/system/cameraOffsetTransform/System","require exports three.mod tdv/player/view/webgl/components tdv/player/view/webgl/ecs/System tdv/player/view/util/XR".split(" "),function(a,l,k,n,g,h){a=function(q){function r(){var t=q.call(this)||this;t.bg=t.bg.bind(t);return t}O(r,q);r.prototype.Yc=function(){this.v.v.length&&this.v.v.slice().forEach(this.bg)};r.prototype.bg=function(t){var u=t.getComponent(n.Object3D);if(u&&u.ra&&u.ra.parent){u=u.ra;var v=t.getComponent(n.wK);
if(v.Ba){var w=v.Ba,y=w.getComponent(n.PerspectiveCamera);(w=w.getComponent(n.Object3D))&&w.ra&&(w=w.ra,w.updateMatrixWorld(!0),y.jj?(c.copy(h.Ic),m.copy(h.ug)):w.matrixWorld.decompose(c,m,f),v.rotate||m.identity(),e.copy(u.parent.matrixWorld).invert(),b.compose(c,m,f.set(1,1,1)).premultiply(e),b.decompose(c,m,f.set(1,1,1)),d.setFromQuaternion(m,"YXZ"),t=t.O(n.sa),t.translationX=c.x,t.translationY=c.y,t.Xe=c.z,t.Wd=0,t.fd=d.y*p,t.Ve=0)}}};r.J={};return r}(g);a.J={};a.J.v=[n.wK,n.Object3D,n.sa];var e=
new k.Matrix4,b=new k.Matrix4,c=new k.Vector3,d=new k.Euler,f=new k.Vector3,m=new k.Quaternion,p=180/Math.PI;return a});
define("tdv/player/view/webgl/system/canvasMaterial/Behaviour",["require","tdv/player/view/webgl/components","tdv/player/view/webgl/system/util/entity/Util"],function(a){function l(g){this.A=g;this.HDa=this.za=null;this.Ha=this.Pa=void 0;this.update()}var k=a("tdv/player/view/webgl/components"),n=a("tdv/player/view/webgl/system/util/entity/Util");l.prototype.update=function(){var g=this.A.getComponent(k.If),h=g.source&&g.source.width||0,e=g.source&&g.source.height||0;!this.za||!!this.za.isSpriteMaterial==
g.isSprite&&this.Pa==h&&this.Ha==e||(this.za.map.dispose(),this.za.dispose(),this.za=null);this.Pa=h;this.Ha=e;this.za||(g.isSprite?(this.za=new THREE.SpriteMaterial,this.za.sizeAttenuation=!1):this.za=new THREE.MeshBasicMaterial,this.za.map=new THREE.Texture,this.za.transparent=!0,this.A.K(k.Material).material=this.za);this.za.map.image!=g.source&&(this.za.map.image=g.source,this.za.map.needsUpdate=!0);this.HDa!=g.aK&&(this.HDa=g.aK,this.za.map.needsUpdate=!0);this.za.opacity=g.opacity||0;this.za.depthTest=
!!g.depthTest;this.za.visible=this.za.opacity>0&&!g.hidden;this.za.needsUpdate=!0;if(g.colorSpace)var b=g.colorSpace;else(g=n.Qf(this.A))&&(b=n.oW(g));this.za.map&&b&&(this.za.map.colorSpace=b);this.A.T.Za()};l.prototype.dispose=function(){this.za&&(this.za.map.dispose(),this.za.map=null,this.za.dispose(),this.za=null,this.A.ja(k.Material));this.A=null};l.Va=function(g){g.K(k.oB).manager=new l(g)};l.xa=function(g){var h=g.getComponent(k.oB);h.manager.dispose();h.manager=null;g.ja(k.oB)};l.update=
function(g){g.getComponent(k.oB).manager.update()};return l});
define("tdv/player/view/webgl/system/canvasMaterial/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/canvasMaterial/Behaviour"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/canvasMaterial/Behaviour");a=l.extend(k,function(){k.apply(this,arguments)});a.prototype.Yc=function(){this.Nn.v.length&&this.Nn.v.slice().forEach(g.Va);
this.materials.Da.length&&this.materials.Da.slice().forEach(g.update);this.On.v.length&&this.On.v.slice().forEach(g.xa)};a.J={};a.J.Nn=[n.If,n.oB.aa];a.J.materials=[n.If,n.oB];a.J.On=[n.If.aa,n.oB];return a});
define("tdv/player/view/webgl/system/clippingRect/System",["require","exports","three.mod","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components"],function(a,l,k,n,g){var h=[new k.Vector3(1,0,0),new k.Vector3(-1,0,0),new k.Vector3(0,1,0),new k.Vector3(0,-1,0)];a=function(e){function b(){var c=e.call(this)||this;c.xb=c.xb.bind(c);c.ib=c.ib.bind(c);c.Ca=c.Ca.bind(c);return c}O(b,e);b.prototype.Yc=function(){this.tE.v.length&&this.tE.v.slice().forEach(this.xb);this.planes.v.length&&this.planes.v.slice().forEach(this.ib);
this.pX.v.length&&this.pX.v.slice().forEach(this.Ca)};b.prototype.xb=function(c){c.K(g.pB).planes=[new k.Plane,new k.Plane,new k.Plane,new k.Plane];c.K(g.Object3D).ra=new k.Object3D;this.ib(c)};b.prototype.ib=function(c){var d=c.K(g.Object3D).ra;c=c.K(g.pB);c.planes[0].set(h[0],.5).applyMatrix4(d.matrixWorld);c.planes[1].set(h[1],.5).applyMatrix4(d.matrixWorld);c.planes[2].set(h[2],.5).applyMatrix4(d.matrixWorld);c.planes[3].set(h[3],.5).applyMatrix4(d.matrixWorld)};b.prototype.Ca=function(c){c.ja(g.pB);
c.ja(g.Object3D)};b.J={};return b}(n);a.J={};a.J.tE=[g.fF,g.pB.aa];a.J.planes=[g.fF,g.pB,g.sa,g.Object3D];a.J.pX=[g.fF.aa,g.pB];return a});
define("tdv/player/view/webgl/system/light/DirectionalLightHelper",["require","exports","three.mod","tdv/player/view/webgl/system/util/entity/Util"],function(a,l,k,n){a=function(){function d(f){this.light=f;f=new k.EdgesGeometry(new k.PlaneGeometry(2,2));var m=new k.LineBasicMaterial({color:16711680,linewidth:1,depthTest:!1,transparent:!0});this.jh=new k.LineSegments(f,m);f=(new k.BufferGeometry).setFromPoints([new k.Vector3,new k.Vector3]);m=new k.LineBasicMaterial({color:65280,depthTest:!1,transparent:!0});
this.line=new k.Line(f,m);this.light.add(this.jh);this.light.add(this.line)}d.prototype.update=function(){var f=this.Qf();this.jh.parent!=f&&(this.jh.parent&&(this.jh.parent.remove(this.jh),this.line.parent.remove(this.line)),f&&(f.add(this.jh),f.add(this.line)));if(f){this.jh.material.color!=this.light.color&&(this.jh.material.color=this.light.color,this.jh.material.needsUpdate=!0,this.line.material.color=this.light.color,this.line.material.needsUpdate=!0);this.light.updateMatrixWorld(!0);g.setFromMatrixPosition(this.light.matrixWorld);
this.light.target.updateMatrixWorld(!0);h.setFromMatrixPosition(this.light.target.matrixWorld);e.copy(h).sub(g).normalize();c.y=Math.atan2(e.x,e.z);c.x=-Math.atan2(e.y,Math.sqrt(e.x*e.x+e.z*e.z));c.z=0;c.order="YXZ";b.setFromEuler(c);f=n.RD(f);this.jh.quaternion.copy(b);var m=n.cJ(this.line)*f*2/7;e.setLength(m).multiplyScalar(-1);m=this.line.geometry.attributes.position;m.setXYZ(0,0,0,0);m.setXYZ(1,e.x,e.y,e.z);m.needsUpdate=!0;this.jh.position.copy(e);this.jh.updateMatrixWorld(!0);f=n.cJ(this.jh)*
f/7;this.jh.scale.set(f,f,f);this.jh.updateMatrixWorld(!0)}};d.prototype.dispose=function(){this.jh.geometry.dispose();this.jh.material.dispose();this.jh.parent&&this.jh.parent.remove(this.jh);this.line.geometry.dispose();this.line.material.dispose();this.line.parent&&this.line.parent.remove(this.line)};d.prototype.Qf=function(){for(var f=this.light.parent;f&&!f.isScene;)f=f.parent;return f};return d}();var g=new k.Vector3,h=new k.Vector3,e=new k.Vector3,b=new k.Quaternion,c=new k.Euler;return a});
define("tdv/player/view/webgl/system/light/DirectionalLightSystem","require exports three.mod tdv/player/view/util/Color tdv/player/view/webgl/components tdv/player/view/webgl/ecs/System tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/system/light/DirectionalLightHelper".split(" "),function(a,l,k,n,g,h,e,b){function c(m,p){p.makeEmpty();var q=new k.Box3;m.traverse(function(r){if(r.geometry&&!r.isSprite&&!r.isLine){r.updateWorldMatrix(!1,!1);var t=r.geometry;t.boundingBox===null&&
t.computeBoundingBox();q.copy(t.boundingBox);q.applyMatrix4(r.matrixWorld);p.union(q)}});return p}a=function(m){function p(){var q=m.call(this)||this;q.xb=q.xb.bind(q);q.ib=q.ib.bind(q);q.bg=q.bg.bind(q);q.Ca=q.Ca.bind(q);return q}O(p,m);p.prototype.Yc=function(){this.$D.v.length&&this.$D.v.slice().forEach(this.xb);this.aE.v.length&&this.aE.v.slice().forEach(this.Ca);this.Di.Da.length&&this.Di.Da.slice().forEach(this.ib);this.Di.v.length&&this.Di.v.slice().forEach(this.bg)};p.prototype.xb=function(q){var r=
q.K(g.wr),t=q.K(g.Object3D);r.light=t.ra=new k.DirectionalLight;this.ib(q)};p.prototype.ib=function(q){var r=q.getComponent(g.DirectionalLight),t=q.getComponent(g.wr),u=t.light;u.color=n.mr(r.color).convertLinearToSRGB();u.intensity=r.intensity*Math.PI;u.visible=u.intensity>0;u.castShadow=u.intensity>0&&r.castShadow;var v=u.castShadow?r.hqa:16;v!=u.shadow.mapSize.width&&(u.shadow.dispose(),u.shadow=u.shadow.clone(),u.shadow.mapSize.width=u.shadow.mapSize.height=v);u.shadow.radius=r.iqa;u.shadow.bias=
r.gqa;r.PV!=!!t.sp&&(t=q.O(g.wr),r.PV?t.sp=new b(u):(t.sp.dispose(),t.sp=null))};p.prototype.bg=function(q){this.nlb(q);this.Uqa(q)};p.prototype.nlb=function(q){var r=q.getComponent(g.DirectionalLight);if((q=q.getComponent(g.wr).light)&&q.castShadow){var t=e.Sc(r.target);if(t){var u=q.shadow.camera,v=c(t,d);t=Number.POSITIVE_INFINITY;for(var w=Number.NEGATIVE_INFINITY,y=Number.NEGATIVE_INFINITY,x=Number.POSITIVE_INFINITY,z=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,D=0;D<2;D++)for(var E=
0;E<2;E++)for(var B=0;B<2;B++)f.set(D==0?v.min.x:v.max.x,E==0?v.min.y:v.max.y,B==0?v.min.z:v.max.z).applyMatrix4(u.matrixWorldInverse),f.x<t&&(t=f.x),f.x>w&&(w=f.x),f.y>y&&(y=f.y),f.y<x&&(x=f.y),-f.z>A&&(A=-f.z),-f.z<z&&(z=-f.z);r=r.rjb||0;v=(z+A)*.5;z+=(z-v)*r;A+=(A-v)*r;v=(t+w)*.5;t+=(t-v)*r;w+=(w-v)*r;v=(y+x)*.5;y+=(y-v)*r;x+=(x-v)*r;if(u.left!=t||u.right!=w||u.top!=y||u.bottom!=x||u.near!=z||u.far!=A)q.shadow.camera.left=t,q.shadow.camera.top=y,q.shadow.camera.right=w,q.shadow.camera.bottom=x,
q.shadow.camera.near=z,q.shadow.camera.far=A,q.shadow.camera.updateProjectionMatrix(),q.shadow.needsUpdate=!0}}};p.prototype.Uqa=function(q){(q=(q=q.getComponent(g.wr))&&q.sp)&&q.update()};p.prototype.Ca=function(q){var r=q.getComponent(g.wr),t=r&&r.sp;t&&t.dispose();(r=r.light)&&r.parent&&r.parent.remove(r);q.ja(g.wr);q.ja(g.Object3D)};p.J={};return p}(h);a.J={};a.J.$D=[g.DirectionalLight,g.wr.aa];a.J.Di=[g.DirectionalLight,g.wr];a.J.aE=[g.DirectionalLight.aa,g.wr];var d=new k.Box3,f=new k.Vector3;
return a});
define("tdv/player/view/webgl/system/dragging/Behaviour",["require","tdv/constants/EventName","tdv/player/view/webgl/components","tdv/player/view/webgl/system/util/entity/Util","tdv/view/constants/Cursor"],function(a){function l(y){this.xh=y;this.Je=this.Ho=null;this.gR=!1;this.update()}var k=a("tdv/constants/EventName"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/util/entity/Util"),h=a("tdv/view/constants/Cursor");l.prototype.update=function(){var y=this.xh.getComponent(n.yc);this.dU(y&&
y.enabled?y.JD:null);this.cU(y&&y.enabled?y.G5:null)};l.prototype.frame=function(){this.$f()};l.prototype.dU=function(y){this.Ho!=y&&(this.Ho&&this.Ho.h(k.fb,this.rg,this,!0),(this.Ho=y)&&this.Ho.bind(k.fb,this.rg,this,!0))};l.prototype.cU=function(y){this.Je!=y&&(this.Je&&this.gR&&this.Je.pop(h.Li),(this.Je=y)&&this.gR&&this.Je.push(h.Li))};l.prototype.rg=function(){var y=v.get(this.xh.T);y&&y.length!=0&&this.xh.T.Za()};l.prototype.$f=function(){var y=v.get(this.xh.T),x=y&&y.length||0;this.YCa(x>
0);if(x!=0&&(x=this.xh.getComponent(n.yc))){var z=g.Sc(this.xh);z?(e.copy(x.origin).applyMatrix4(z.matrixWorld),b.copy(x.origin).add(x.direction).applyMatrix4(z.matrixWorld).sub(e).normalize()):(e.copy(x.origin),b.copy(x.direction).normalize());for(x=0;x<y.length;x++){z=y[x];var A=z.getComponent(n.hx),D=z.getComponent(n.qB),E=w.get(z);E&&A&&D&&(D.cIa||(D.cIa=(new THREE.Vector3).setFromMatrixPosition(E.matrixWorld)),c.copy(D.cIa),d.copy(A.direction),this.K_a(c,d,e,b,f),D.cma||(D.cma=(new THREE.Vector3).copy(f).sub(c)),
f.sub(D.cma),A.min&&m.copy(f).sub(A.min).dot(A.direction)<0&&f.copy(A.min),f.applyMatrix4(p.copy(E.parent.matrixWorld).invert()),z=z.O(n.sa),q.multiply(p.makeTranslation(z.translationX,z.translationY,z.Xe).invert()),q.multiply(p.makeRotationFromEuler(r.set(z.Wd*u,z.fd*u,z.Ve*u,z.jf)).invert()),f.applyMatrix4(p),z.positionX=f.x,z.positionY=f.y,z.positionZ=f.z)}}};l.prototype.YCa=function(y){this.gR!=y&&(this.gR=y,this.Je&&(this.gR?this.Je.push(h.Li):this.Je.pop(h.Li)))};l.prototype.K_a=function(y,
x,z,A,D){t.copy(y).sub(z);z=x.dot(A);var E=A.dot(A),B=x.dot(x);A=t.dot(A);var C=t.dot(x);D.copy(y);y=z*z-E*B;y!=0&&D.addScaledVector(x,(E*C-A*z)/y)};var e=new THREE.Vector3,b=new THREE.Vector3,c=new THREE.Vector3,d=new THREE.Vector3,f=new THREE.Vector3,m=new THREE.Vector3,p=new THREE.Matrix4,q=new THREE.Matrix4,r=new THREE.Euler,t=new THREE.Vector3,u=Math.PI/180;l.prototype.dispose=function(){this.YCa(!1);this.dU(null);this.cU(null);this.A=null};l.cqa=function(y){y.K(n.ux).manager=new l(y)};l.yqa=
function(y){var x=y.getComponent(n.ux);x.manager.dispose();x.manager=null;y.ja(n.ux)};l.iu=function(y){y.getComponent(n.ux).manager.update()};l.frame=function(y){y.getComponent(n.ux).manager.frame()};var v=new Map,w=new Map;l.fjb=function(y){y.K(n.qB);y.K(n.Jm);l.lK(y)};l.lK=function(y){var x=g.Sc(y);w.set(y,x);var z=v.get(y.T);z||v.set(y.T,z=[]);x&&z.indexOf(y)<0&&z.push(y)};l.mQa=function(y){var x=v.get(y.T),z=x.indexOf(y);z>=0&&x.splice(z,1);w["delete"](y);y.ja(n.qB);y.ja(n.Jm)};return l});
define("tdv/player/view/webgl/system/dragging/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/dragging/Behaviour"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/dragging/Behaviour");a=l.extend(k,function(){k.apply(this,arguments)});a.prototype.Yc=function(){this.qX.v.length&&this.qX.v.slice().forEach(g.cqa);this.Xj.Da.length&&
this.Xj.Da.slice().forEach(g.iu);this.Xj.v.length&&this.Xj.v.slice().forEach(g.frame);this.rX.v.length&&this.rX.v.slice().forEach(g.yqa);this.bIa.v.length&&this.bIa.v.slice().forEach(g.fjb);this.aIa.v.length&&this.aIa.v.slice().forEach(g.lK);this.dIa.v.length&&this.dIa.v.slice().forEach(g.mQa);this.eIa.v.length&&this.eIa.v.slice().forEach(g.mQa)};a.J={};a.J.qX=[n.yc,n.ux.aa];a.J.Xj=[n.yc,n.ux];a.J.rX=[n.yc.aa,n.ux];a.J.bIa=[n.Object3D,n.hx,n.qB.aa];a.J.aIa=[n.Object3D,n.hx,n.qB];a.J.dIa=[n.Object3D.aa,
n.qB];a.J.eIa=[n.hx.aa,n.qB];return a});
define("tdv/player/view/webgl/system/floor/System","require exports three.mod tdv/player/view/util/Color tdv/player/view/webgl/components tdv/player/view/webgl/ecs/System".split(" "),function(a,l,k,n,g,h){a=function(c){function d(){var f=c.call(this)||this;f.xb=f.xb.bind(f);f.ib=f.ib.bind(f);f.Ca=f.Ca.bind(f);f.bg=f.bg.bind(f);return f}O(d,c);d.prototype.Yc=function(){this.FIa.v.length&&this.FIa.v.slice().forEach(this.xb);this.GIa.v.length&&this.GIa.v.slice().forEach(this.Ca);this.Y5.Da.length&&this.Y5.Da.slice().forEach(this.ib);
this.Y5.v.length&&this.Y5.v.slice().forEach(this.bg)};d.prototype.xb=function(f){var m=f.K(g.lx),p=f.K(g.Object3D);m.floor=p.ra=this.Rab();this.fo(f,!0)};d.prototype.ib=function(f){this.fo(f)};d.prototype.Ca=function(f){var m=f.getComponent(g.lx).floor;m.parent&&m.parent.remove(m);m.geometry.dispose();m.material.dispose();f.ja(g.lx);f.ja(g.Object3D)};d.prototype.bg=function(f){this.Shb(f)};d.prototype.Shb=function(f){var m=f.getComponent(g.Fr),p=(f=(f=f.getComponent(g.lx))&&f.floor)&&f.parent&&f.parent.matrixWorld;
if(p){b.setFromMatrixScale(p);var q=Math.max(Math.abs(b.x),Math.abs(b.y),Math.abs(b.z));f.matrix.identity();f.matrix.multiply(e.makeScale(m.radius/q,m.radius/q,m.radius/q));f.matrix.multiply(e.extractRotation(p).invert());f.matrix.multiply(e.makeTranslation(0,m.height/m.radius,0));f.matrix.multiply(e.makeRotationX(-Math.PI*.5));f.updateMatrixWorld(!0)}};d.prototype.Rab=function(){var f=new k.CircleGeometry(1,128);f=new k.Mesh(f);f.receiveShadow=!0;f.needsUpdate=!0;f.matrixAutoUpdate=!1;f.castShadow=
!1;return f};d.prototype.fo=function(f,m){m===void 0&&(m=!1);var p=f.getComponent(g.Fr);f=f.getComponent(g.lx).floor;var q=p.color=="transparent",r=f.material&&f.material.isShadowMaterial||!1;f.material&&(m||r!=q)&&(f.material.dispose(),f.material=null);q?f.material||(f.material=new k.ShadowMaterial):(f.material||(f.material=new k.MeshStandardMaterial,f.material.defines.USE_UV="",f.material.onBeforeCompile=function(t){var u=t.fragmentShader.lastIndexOf("}");t.fragmentShader=t.fragmentShader.substring(0,
u)+"float uvCenterCoef = 2.0 * length(vUv - 0.5);\nfloat uvAlphaCoef = 1.0 - smoothstep(0.97, 1.0, uvCenterCoef);\ngl_FragColor.a = uvAlphaCoef * gl_FragColor.a;\n"+t.fragmentShader.substring(u,t.fragmentShader.length)},f.material.roughness=1,f.material.metalness=0,f.material.envMapIntensity=0,f.material.transparent=!0),f.material.color=n.mr(p.color));f.material.needsUpdate=!0;f.material.opacity=p.opacity;f.renderOrder=p.renderOrder};d.J={};return d}(h);a.J={};a.J.FIa=[g.Fr,g.lx.aa];a.J.Y5=[g.Fr,
g.lx];a.J.GIa=[g.Fr.aa,g.lx];var e=new k.Matrix4,b=new k.Vector3;return a});
define("tdv/player/view/webgl/system/floorTransform/Behaviour",["require","tdv/player/view/webgl/components","tdv/player/view/webgl/system/util/entity/Util"],function(a){function l(w){this.A=w;this.Iha=!1}var k=a("tdv/player/view/webgl/components"),n=a("tdv/player/view/webgl/system/util/entity/Util");l.prototype.update=function(){this.Iha=!1};l.prototype.frame=function(){this.$f()};l.prototype.$f=function(){if(!this.Iha&&(this.Bb=this.Bb||n.Qf(this.A))){var w=n.Sc(this.A),y=w&&w.parent;if(y&&y.matrixWorld){var x=
[];this.Bb.traverse(function(E){E.isSprite||E.isLine||E==w||x.push(E)});var z=this.A.O(k.mx);f.set(z.x,z.y,z.z).applyMatrix4(y.matrixWorld);d.ray.origin.set(f.x,f.y,f.z);d.ray.direction.set(0,-1,0);var A=d.intersectObjects(x,!1);if(A.length!=0){var D=A[0];e.copy(y.matrixWorld).invert();A=this.A.O(k.sa,!0);b.setFromMatrixPosition(y.matrixWorld);g.copy(D.object.matrixWorld);c.setFromMatrixPosition(g);h.copy(g).invert();!z.EW&&D.face&&D.face.normal?q.copy(D.face.normal).applyMatrix4(g).sub(c).add(b):
q.copy(b).add(r);q.applyMatrix4(e).normalize();u.setFromUnitVectors(p,q);t.setFromQuaternion(u,A.jf);A.Wd=t.x*v;A.fd=t.y*v;A.Ve=t.z*v;f.copy(D.point).applyMatrix4(e);A.translationX=f.x;A.translationY=f.y;A.Xe=f.z;m.setFromMatrixScale(e);y=Math.max(m.x,m.y,m.z);A.positionX=0;A.positionY=0;A.positionZ=y*z.distance;this.Iha=!0}}}};l.prototype.dispose=function(){};var g=new THREE.Matrix4,h=new THREE.Matrix4,e=new THREE.Matrix4,b=new THREE.Vector3,c=new THREE.Vector3,d=new THREE.Raycaster,f=new THREE.Vector3,
m=new THREE.Vector3;new THREE.Matrix4;new THREE.Matrix4;var p=new THREE.Vector3(0,0,1),q=new THREE.Vector3,r=new THREE.Vector3(0,1,0),t=new THREE.Euler,u=new THREE.Quaternion,v=180/Math.PI;l.Va=function(w){w.K(k.ou).manager=new l(w)};l.xa=function(w){var y=w.getComponent(k.ou);y.manager.dispose();y.manager=null;w.ja(k.ou)};l.frame=function(w){w.getComponent(k.ou).manager.frame()};l.update=function(w){w.getComponent(k.ou).manager.update()};return l});
define("tdv/player/view/webgl/system/floorTransform/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/floorTransform/Behaviour"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/floorTransform/Behaviour");a=l.extend(k,function(){k.apply(this,arguments)});a.prototype.Yc=function(){this.CIa.v.length&&this.CIa.v.slice().forEach(g.Va);
this.X5.Da.length&&this.X5.v.slice().forEach(g.update);this.X5.v.length&&this.X5.v.slice().forEach(g.frame);this.DIa.v.length&&this.DIa.v.slice().forEach(g.xa);this.EIa.v.length&&this.EIa.v.slice().forEach(g.xa)};a.J={};a.J.CIa=[n.Object3D,n.mx,n.ou.aa];a.J.X5=[n.Object3D,n.mx,n.ou];a.J.DIa=[n.Object3D.aa,n.ou];a.J.EIa=[n.mx.aa,n.ou];return a});
define("tdv/player/view/webgl/system/group/Behaviour",["require","tdv/player/view/webgl/components"],function(a){var l=a("tdv/player/view/webgl/components");return{Va:function(k){var n=k.K(l.DK),g=k.K(l.Object3D);k.K(l.sa);k=k.O(l.Group);g.ra=n.group=k.group=new THREE.Group},xa:function(k){k.getComponent(l.DK).group=null;k.ja(l.DK);k.ja(l.Object3D)}}});
define("tdv/player/view/webgl/system/group/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/group/Behaviour"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/group/Behaviour");a=l.extend(k,function(){k.apply(this,arguments)});a.prototype.Yc=function(){this.bKa.v.length&&this.bKa.v.slice().forEach(g.Va);this.cKa.v.length&&
this.cKa.v.slice().forEach(g.xa)};a.J={};a.J.bKa=[n.Group,n.DK.aa];a.J.cKa=[n.Group.aa,n.DK];return a});
define("tdv/player/view/webgl/system/grid/System","require tdv/utils tdv/player/view/util/Color tdv/player/view/webgl/ecs/System tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/system/util/material/Util".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/player/view/util/Color"),n=a("tdv/player/view/webgl/ecs/System"),g=a("tdv/player/view/webgl/components");a("tdv/player/view/webgl/system/util/entity/Util");a("tdv/player/view/webgl/system/util/material/Util");
a=l.extend(n,function(){n.apply(this,arguments);this.xb=this.xb.bind(this);this.ib=this.ib.bind(this);this.Ca=this.Ca.bind(this)});a.prototype.Yc=function(){this.ZJa.v.length&&this.ZJa.v.slice().forEach(this.xb);this.YJa.Da.length&&this.YJa.Da.slice().forEach(this.ib);this.$Ja.v.length&&this.$Ja.v.slice().forEach(this.Ca)};a.prototype.xb=function(h){var e=h.getComponent(g.pu);e=new THREE.LineSegments(this.kO(e),this.rm(e));h.K(g.Object3D).ra=h.K(g.vB).grid=e};a.prototype.ib=function(h){var e=h.getComponent(g.pu);
h=h.getComponent(g.vB).grid;h.geometry=this.kO(e);h.material=this.rm(e)};a.prototype.Ca=function(h){var e=h.getComponent(g.vB).grid;e.material.dispose();e.geometry.dispose();h.ja(g.Object3D);h.ja(g.vB)};a.prototype.kO=function(h){k.mr(h.eHa);k.mr(h.XJa);var e=h.size/h.Zla,b=h.size/2,c=[];for(let d=0,f=-b;d<=h.Zla;d++,f+=e)c.push(-b,0,f,b,0,f),c.push(f,0,-b,f,0,b);h=new THREE.BufferGeometry;h.setAttribute("position",new THREE.Float32BufferAttribute(c,3));h.setAttribute("color",new THREE.Float32BufferAttribute([],
3));return h};a.prototype.rm=function(h){var e=new THREE.LineBasicMaterial;e.depthTest=h.depthTest;e.toneMapped=!1;e.vertexColors=!0;return e};a.J={};a.J.ZJa=[g.pu,g.vB.aa];a.J.YJa=[g.pu,g.vB];a.J.$Ja=[g.pu.aa,g.vB];return a});
define("tdv/view/images/ImageAnimation","require tdv/utils tdv/constants/EventName tdv/constants/PlaybackState tdv/events/Event tdv/events/EventDispatcher tdv/view/util/Animation".split(" "),function(a){function l(f,m,p,q){this.mna=f;this.src=f.src;this.E8=m;this.GV=p;this.frameCount=q;this.frameWidth=this.mna.width/this.GV;this.frameHeight=this.mna.height/this.E8}var k=a("tdv/utils"),n=a("tdv/constants/EventName"),g=a("tdv/constants/PlaybackState");a("tdv/events/Event");var h=a("tdv/events/EventDispatcher"),
e=a("tdv/view/util/Animation");a=k.extend(h,function(f,m,p,q,r,t,u){h.call(this);this.gs=r;this.ki=new l(f,m,p,r);this.pCa=t;this.Bpa(q);this.Kda=u;this.fa=document.createElement("canvas");this.fa.width=this.ki.frameWidth;this.fa.height=this.ki.frameHeight;this.Fa=this.fa.getContext("2d");this.Fa.globalCompositeOperation="copy";this.H=g.ca;this.f3=this.Do=0;this.y_=void 0;this.Vi=b.request(this.ki);this.Vi.bind(n.V,this.Yk,this,!0);this.Yk()});a.prototype.Bpa=function(f){if(this.$g!==f){var m=this.IU;
this.$g=f;this.IU=this.$g*this.ki.frameCount;this.Lda=this.IU-this.$g*.1;m!==void 0&&(this.Do=this.Do/m*this.IU)}};a.prototype.TOa=function(f){this.Kda!==f&&(this.Kda=f,this.Yk())};a.prototype.Zc=function(f){if(this.H!=f){if(f==g.Yb){if(this.H!=g.PLAYING)return}else f==g.PLAYING?this.H==g.ca&&(this.Do=this.f3=0,this.Yk()):f!=g.ca||this.Do==0&&this.f3!=0||(this.Do=this.Lda,this.Yk());this.H=f;e.requestFrame(this.iq,this);this.m(n.$e)}};a.prototype.getState=function(){return this.H};a.prototype.iq=
function(f){this.H==g.PLAYING&&(this.Do=Math.min(this.Do+f,this.Vi.Vi.length*this.$g),this.Do>=this.IU&&(this.f3++,this.pCa&&this.f3==this.pCa?(this.Zc(g.ca),this.Do=this.Lda,this.m(n.Sb)):(this.Do%=this.IU,this.m(n.Or))),this.Yk(),this.H==g.PLAYING&&e.requestFrame(this.iq,this))};a.prototype.clear=function(){this.Zc(g.ca);this.fa.width=this.fa.height=0;this.fa=null;b.release(this.ki);this.ki=null};a.prototype.Ig=function(){return this.fa};a.prototype.Yk=function(){var f=this.Kda&&this.Do>=this.Lda?
0:Math.floor(this.Do/this.$g);this.y_!=f&&f<this.Vi.Vi.length&&(this.y_=f,this.Fa.drawImage(this.Vi.get(this.y_),0,0),this.m(n.V,{frameIndex:this.y_}))};l.prototype.isEqual=function(f){return this.src==f.src&&this.E8==f.E8&&(this.GV=f.GV)&&(this.frameWidth=f.frameWidth)&&(this.frameHeight=f.frameHeight)&&(this.frameCount=f.frameCount)};var b={bl:[],FUa:2E3,request:function(f){f=this.zj(f);f.Hk++;this.UDa(f);return f.frames},release:function(f){f=this.zj(f);f.Hk--;f.Hk==0&&this.$6a(f)},zj:function(f){for(var m=
0;m<this.bl.length;m++)if(this.bl[m].gcb.isEqual(f))return this.bl[m];m={};m.gcb=f;m.frames=new c(f);m.Hk=0;this.bl.push(m);return m},$6a:function(f){this.UDa(f);f.Sla=setTimeout(function(){b.wYa(f)},b.FUa)},UDa:function(f){f.Sla&&(clearTimeout(f.Sla),f.Sla=null)},wYa:function(f){this.bl.splice(this.bl.indexOf(f),1);f.frames.clear()}},c=k.extend(h,function(f){h.call(this);this.ki=f;this.Vi=[];d.add(this)});c.prototype.clear=function(){d.remove(this);this.Vi.forEach(function(f){f.width=0;f.height=
0});this.Vi=null};c.prototype.get=function(f){return this.Vi[f]};c.prototype.Wbb=function(){var f=this.Vi.length%this.ki.GV,m=Math.floor(this.Vi.length/this.ki.GV)%this.ki.E8,p=document.createElement("canvas");p.width=this.ki.frameWidth;p.height=this.ki.frameHeight;var q=p.getContext("2d");q.globalCompositeOperation="copy";q.drawImage(this.ki.mna,f*this.ki.frameWidth,m*this.ki.frameHeight,this.ki.frameWidth,this.ki.frameHeight,0,0,this.ki.frameWidth,this.ki.frameHeight);c.zZa(p);this.Vi.push(p);this.m(n.V)};
c.zZa=function(){var f=document.createElement("canvas");f.width=1;f.height=1;var m=f.getContext("2d");return function(p){m.drawImage(p,0,0,1,1,0,0,1,1)}}();var d={bl:[],Aja:null,add:function(f){this.bl.push(f);this.FCa()},remove:function(f){this.bl=this.bl.filter(function(m){return m!=f})},FCa:function(){this.Aja||(this.Aja=setTimeout(function(){this.Aja=null;this.nT()}.bind(this),40))},nT:function(){if(this.bl.length!=0){for(var f=(new Date).getTime()+10;(new Date).getTime()<f;){var m=this.bl.filter(function(p){return p.Vi.length==
0});m=m.length>0?m[0]:this.bl[0];m.Wbb();if(m.Vi.length==m.ki.frameCount&&(this.bl.splice(this.bl.indexOf(m),1),this.bl.length==0))return}this.FCa()}}};return a});
define("tdv/player/view/webgl/system/imageMaterial/AnimationPlaybackController",["require","tdv/constants/EventName","tdv/constants/PlaybackState"],function(a){function l(g,h){this.Od=g;this.Gc=h;this.Kd=!1;this.kba();this.nba();this.zH()}var k=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState");l.prototype.clear=function(){this.bia();this.hia();this.Od.get("autoplay")||this.Od.set("state",n.ca);this.Od=null;this.Gc.Zc(n.ca);this.Gc=null};l.prototype.gg=function(g){this.Kd!=g&&(this.Kd=
g,this.Iv())};l.prototype.zH=function(){this.Gc.Zc(this.Od.get("state"))};l.prototype.PS=function(){this.Iv()};l.prototype.RS=function(){this.Gc.Bpa(this.Od.get("frameDuration"))};l.prototype.QS=function(){this.Gc.TOa(this.Od.get("finalFrame")=="first")};l.prototype.NS=function(){this.Od.m(k.Or)};l.prototype.MS=function(){this.Od.m(k.Sb)};l.prototype.OS=function(){this.Od.set("state",this.Gc.getState())};l.prototype.Iv=function(){this.Od.get("autoplay")&&this.Gc.Zc(this.Kd?n.PLAYING:n.ca)};l.prototype.kba=
function(){this.Od.bind(k.N("state"),this.zH,this,!0);this.Od.bind(k.N("autoplay"),this.PS,this,!0);this.Od.bind(k.N("frameDuration"),this.RS,this,!0);this.Od.bind(k.N("finalFrame"),this.QS,this,!0)};l.prototype.bia=function(){this.Od.h(k.N("state"),this.zH,this,!0);this.Od.h(k.N("autoplay"),this.PS,this,!0);this.Od.h(k.N("frameDuration"),this.RS,this,!0);this.Od.h(k.N("finalFrame"),this.QS,this,!0)};l.prototype.nba=function(){this.Gc.bind(k.Or,this.NS,this,!0);this.Gc.bind(k.Sb,this.MS,this,!0);
this.Gc.bind(k.$e,this.OS,this,!0)};l.prototype.hia=function(){this.Gc.h(k.Or,this.NS,this,!0);this.Gc.h(k.Sb,this.MS,this,!0);this.Gc.h(k.$e,this.OS,this,!0)};return l});
define("tdv/player/view/webgl/system/imageMaterial/TextureController",["require","tdv/constants/EventName","tdv/player/parser/ClassInfo","tdv/view/images/ImageAnimation","tdv/player/view/webgl/system/imageMaterial/AnimationPlaybackController"],function(a){function l(e,b,c,d){this.qe=e;this.Gd=b;this.Ma=c;this.Na=d.bind(this);n.Qa("AnimatedImageResource",this.qe)?(this.Gc=new g(this.Gd,this.qe.get("rowCount",1),this.qe.get("colCount",1),this.qe.get("frameDuration"),this.qe.get("frameCount",this.qe.get("rowCount",
1)*this.qe.get("colCount",1)),this.qe.get("repeat"),this.qe.get("finalFrame")=="first"),this.Ma.image=this.Gc.Ig(),this.Gc.bind(k.V,this.KR,this,!0),this.Wp=new h(this.qe,this.Gc)):this.Ma.image=this.Gd;this.Ma.needsUpdate=!0;this.Na()}var k=a("tdv/constants/EventName"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/view/images/ImageAnimation"),h=a("tdv/player/view/webgl/system/imageMaterial/AnimationPlaybackController");l.prototype.gg=function(e){this.Wp&&this.Wp.gg(e)};l.prototype.dispose=function(){this.Wp&&
(this.Wp.clear(),this.Wp=null);this.Gc&&(this.Gc.h(k.V,this.KR,this,!0),this.Gc.clear(),this.Gc=null);this.Ma=this.Gd=this.qe=null};l.prototype.KR=function(){this.Ma.needsUpdate=!0;this.Na()};return l});define("tdv/player/view/webgl/system/util/texture/Util",["require"],function(){var a={},l=null;a.$Ia=function(){if(!l){var k=document.createElement("canvas");k.width=128;k.height=128;k.getContext("2d").clearRect(0,0,k.width,k.height);l=k}return l};return a});
define("tdv/view/util/Scale",["require","tdv/player/view/util/geo/Fov","tdv/view/constants/Alignment","tdv/view/constants/ScaleMode"],function(a){var l=a("tdv/player/view/util/geo/Fov"),k=a("tdv/view/constants/Alignment"),n=a("tdv/view/constants/ScaleMode"),g=180/Math.PI,h=Math.PI/180;return{m6:function(e,b,c,d,f,m,p){b||(b=e*d/c);f||(f=n.rB);var q={};switch(f){case n.rB:q.width=e;q.height=b;break;case n.NONE:q.width=c;q.height=d;break;case n.oj:q.width=Math.min(b*c/d,e);q.height=Math.min(e*d/c,b);
break;case n.Dr:q.width=Math.max(b*c/d,e);q.height=Math.max(e*d/c,b);break;case n.Lp:q.width=e;q.height=e*d/c;break;case n.Qk:q.width=b*c/d,q.height=b}q.width>e?(q.$A=e/q.width,q.xY=m==k.eb?0:m==k.Db?1-q.$A:(1-q.$A)*.5,q.width=e):(q.xY=0,q.$A=1);q.height>b?(q.cB=b/q.height,q.GY=p==k.Tc?1-q.cB:p==k.Fc?0:(1-q.cB)*.5,q.height=b):(q.GY=0,q.cB=1);return q},Tma:function(e,b,c,d,f,m,p,q){b||(b=l.xm(e,c,d));f||(f=n.rB);m||(m=4096/360);var r={};switch(f){case n.rB:r.Ud=e;r.Nk=b;break;case n.NONE:r.Ud=2*Math.atan2(c*
.5,m*45)*g;r.Nk=l.xm(r.Ud,c,d);break;case n.oj:r.Ud=Math.min(l.rr(b,c,d),e);r.Nk=Math.min(l.xm(e,c,d),b);break;case n.Dr:r.Ud=Math.max(l.rr(b,c,d),e);r.Nk=Math.max(l.xm(e,c,d),b);break;case n.Lp:r.Ud=e;r.Nk=l.xm(e,c,d);break;case n.Qk:r.Ud=l.rr(b,c,d),r.Nk=b}r.Ud>e?(r.$A=Math.tan(e*.5*h)*c/Math.tan(r.Ud*.5*h)/c,r.xY=p==k.eb?0:p==k.Db?1-r.$A:(1-r.$A)*.5,r.Ud=e):(r.xY=0,r.$A=1);r.Nk>b?(r.cB=Math.tan(b*.5*h)*d/Math.tan(r.Nk*.5*h)/d,r.GY=q==k.Tc?1-r.cB:q==k.Fc?0:(1-r.cB)*.5,r.Nk=b):(r.GY=0,r.cB=1);return r}}});
define("tdv/player/view/webgl/system/imageMaterial/Behaviour","require tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/Event tdv/player/parser/ClassInfo tdv/player/view/image/Item tdv/player/view/image/Repository tdv/player/view/webgl/system/imageMaterial/TextureController tdv/player/view/webgl/system/util/texture/Util tdv/player/view/webgl/components tdv/view/util/Ease tdv/view/util/EaseDimension tdv/view/util/Scale".split(" "),function(a){function l(v){this.A=v;this.iD=this.iD.bind(this);
this.Na=this.Na.bind(this);this.Qj=this.Qj.bind(this);v=v.getComponent(f.Mi);this.Mh=v.tp;this.Ae=v.M;this.qe=this.B=null;this.y1a=v.isSprite;this.fh=!1;this.Fo=this.rb=null;this.iy=0;this.$ia=this.Yca=this.Mf=this.P_=this.ha=void 0;this.Lia(v.lw);this.Nj(v.properties)}var k=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/events/Event"),h=a("tdv/player/parser/ClassInfo"),e=a("tdv/player/view/image/Item"),b=a("tdv/player/view/image/Repository"),c=a("tdv/player/view/webgl/system/imageMaterial/TextureController"),
d=a("tdv/player/view/webgl/system/util/texture/Util"),f=a("tdv/player/view/webgl/components"),m=a("tdv/view/util/Ease"),p=a("tdv/view/util/EaseDimension"),q=a("tdv/view/util/Scale"),r=["height","scaleMode","width"],t=["levels.url","levels.width","levels.height"],u="depthTest enabled encoding hidden side opacity easeDuration".split(" ");l.prototype.frame=function(v){var w=this.A.getComponent(f.Mi);this.Lia(w.lw);this.Nj(w.properties);this.Fo&&(this.Fo.Lb(v),this.iy=this.Fo.nb("alpha"),this.mka(),this.Fo.Re()&&
(this.Fo=null),this.A.T.Za());this.H8a();this.fh&&(this.fh=!1)};l.prototype.iD=function(){if(this.qe&&this.B){var v=this.qe&&this.qe.get("levels")||[];v=v.filter(function(C){return!!C.get("url")});var w=1,y=1;h.Qa("AnimatedImageResource",this.qe)&&(w=this.qe.get("rowCount"),y=this.qe.get("colCount"));var x=null;if(v.length>0){v.sort(function(C,F){return F.get("width")-C.get("width")});x=this.B.get("width");var z=this.B.get("height"),A=this.B.get("scaleMode","fill"),D=v[0].get("width")/y,E=v[0].get("height")/
w,B=q.m6(x,z,D,E,A);x=v.reduce(function(C,F){return!C||C.get("width")>F.get("width")&&F.get("width")/y>=B.width&&F.get("height")/w>=B.height?F:C})}this.eU(x)}};l.prototype.eU=function(v){this.rb!=v&&(this.rb&&(this.FYa(),this.dda(),this.G_(),this.fs(),this.fh=!1),this.rb=v)&&(this.$r(),this.Wx(),this.ZQ(),this.fh=!1,this.Na())};l.prototype.ZQ=function(){this.ae||(this.ae=new e,this.ae.AP([this.rb.get("url")]),this.ae.bind(n.ia,this.Ke,this,!0),this.ae.bind(n.xc,this.eAa,this,!0),this.ae.bind(n.ad,
this.th,this,!0),this.ov=this.A.getComponent(f.Mi).priority,b.rA(this.ae,this.ov))};l.prototype.fs=function(){this.ae&&(this.ae.h(n.ia,this.Ke,this,!0),this.ae.h(n.xc,this.eAa,this,!0),this.ae.h(n.ad,this.th,this,!0),b.eo(this.ae,this.ov),this.ae=null)};l.prototype.Ke=function(){this.oYa();this.Lja(new g(n.ia))};l.prototype.eAa=function(v){this.Lja(new g(n.xc,{percent:v.percent}))};l.prototype.th=function(){this.Lja(new g(n.ad))};l.prototype.Lja=function(v){this.Mh&&this.Mh.m(v)};l.prototype.Na=function(){this.fh||
(this.fh=!0,this.A.T.Za())};l.prototype.$r=function(){this.Ma=new THREE.Texture;this.Ma.image=d.$Ia();this.Ma.generateMipmaps=!0;this.Ma.minFilter=THREE.LinearMipMapLinearFilter};l.prototype.G_=function(){this.Ma&&(this.Ma.dispose(),this.Ma=null)};l.prototype.Wx=function(){this.y1a?(this.za=new THREE.SpriteMaterial({map:this.Ma}),this.za.sizeAttenuation=!0):this.za=new THREE.MeshBasicMaterial({map:this.Ma});this.za.transparent=!0;this.za.needsUpdate=!0;this.A.K(f.Material).material=this.za;this.gua(0);
this.A.O(f.ei,!0);this.A.O(f.Material,!0);this.Qj(!0)};l.prototype.Qj=function(v){var w=this.B.get("enabled")&&!this.B.get("hidden")&&!!this.Hq,y=this.ha!==w;if(y||v){this.ha=w;w=this.iy;var x=this.ha?1:0,z=this.B.get("hidden")?0:this.B.get("easeDuration",200);this.Fo=w!==x?new m("linear",[new p("alpha",w,x,void 0)],Math.abs(w-x)*z):null;this.mka()}w=this.B.get("encoding");if(this.P_!==w||v)this.P_=w,this.y9a();w=this.B.get("depthTest");if(this.Yca!==w||v)this.Yca=w,this.Y8a();w=this.B.get("opacity");
if(this.Mf!==w||v)this.Mf=w,this.mka();w=this.B.get("side");if(this.$ia!==w||v)this.$ia=w,this.Z8a();y&&this.Ae&&this.Ae.m(this.ha?n.od:n.jd)};l.prototype.H8a=function(){if(this.za){var v=this.A.getComponent(f.Mi);v=(v=(v=v&&v.qHa)&&v.getComponent(f.pB))?v.planes:null;this.za.clippingPlanes!==v&&(this.za.clippingPlanes=v,this.za.needsUpdate=!0)}};l.prototype.y9a=function(){if(this.za&&(this.za.map||this.za.emissiveMap)){var v=this.P_=="srgb"?THREE.SRGBColorSpace:THREE.LinearSRGBColorSpace;this.za.map&&
(this.za.map.colorSpace=v);this.za.emissiveMap&&(this.za.emissiveMap.colorSpace=v);this.za.needsUpdate=!0}this.A.O(f.ei,!0);this.Na()};l.prototype.Y8a=function(){this.za&&(this.za.depthTest=this.Yca);this.A.O(f.ei,!0);this.Na()};l.prototype.mka=function(){this.za&&this.gua((this.Mf||0)*this.iy);this.Hq&&this.Hq.gg(this.Mf>0);this.Na()};l.prototype.gua=function(v){this.za.opacity=v;this.za.visible=this.za.opacity>0;this.za.isShaderMaterial&&this.za.uniforms.opacity&&(this.za.uniforms.opacity.value=
v);this.A.O(f.ei,!0)};l.prototype.Z8a=function(){if(this.za)switch(this.$ia){case "back":this.za.side=THREE.BackSide;break;case "double":this.za.side=THREE.DoubleSide;break;default:this.za.side=THREE.FrontSide}this.A.O(f.ei,!0);this.Na()};l.prototype.dda=function(){this.za&&(this.za.dispose(),this.za=null,this.A.ja(f.Material))};l.prototype.oYa=function(){this.Hq=new c(this.qe,b.xg(this.rb.get("url")),this.Ma,this.Na);this.Qj(!0)};l.prototype.FYa=function(){this.Hq&&(this.Hq.dispose(),this.Hq=null)};
l.prototype.Lia=function(v){this.qe!=v&&(this.qe&&k.da(this.qe,t,this.iD),(this.qe=v)&&k.ba(this.qe,t,this.iD,!1),this.iD())};l.prototype.Nj=function(v){if(this.B!=v){this.B&&(k.da(this.B,r,this.iD),k.da(this.B,u,this.Qj));if(this.B=v)k.ba(this.B,r,this.iD,!1),k.ba(this.B,u,this.Qj,!1);this.iD()}};l.prototype.dispose=function(){this.eU(null);this.Lia(null);this.Nj(null);this.A=this.Mh=null};l.Va=function(v){v.K(f.xB).manager=new l(v)};l.xa=function(v){var w=v.getComponent(f.xB);w.manager.dispose();
w.manager=null;v.ja(f.xB)};l.frame=function(v,w){v.getComponent(f.xB).manager.frame(w)};return l});
define("tdv/player/view/webgl/system/imageMaterial/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/imageMaterial/Behaviour"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/imageMaterial/Behaviour");a=l.extend(k,function(){k.apply(this,arguments)});a.prototype.Yc=function(h,e){this.On.v.length&&this.On.v.slice().forEach(g.xa);
this.Nn.v.length&&this.Nn.v.slice().forEach(g.Va);this.materials.v.length&&this.materials.v.slice().forEach(function(b){g.frame(b,h,e)})};a.J={};a.J.Nn=[n.Mi,n.xB.aa];a.J.materials=[n.Mi,n.xB];a.J.On=[n.Mi.aa,n.xB];return a});
define("tdv/player/view/webgl/system/lineMaterial/Behaviour",["require","tdv/player/view/util/Color","tdv/player/view/webgl/components"],function(a){function l(g){this.A=g;this.za=null;this.update()}var k=a("tdv/player/view/util/Color"),n=a("tdv/player/view/webgl/components");l.prototype.update=function(){this.za||(this.za=new THREE.LineBasicMaterial,this.A.K(n.Material).material=this.za);var g=this.A.getComponent(n.ci);this.za.color=k.mr(g.color||"#ffffff");this.za.lineWidth=g.width||1;this.za.opacity=
g.opacity||0;this.za.transparent=g.transparent;this.za.depthTest=!!g.depthTest;this.za.visible=this.za.opacity>0;this.za.needsUpdate=!0};l.prototype.dispose=function(){this.za&&(this.za.dispose(),this.za=null,this.A.ja(n.Material));this.A=null};l.Va=function(g){g.K(n.zB).manager=new l(g)};l.xa=function(g){var h=g.getComponent(n.zB);h.manager.dispose();h.manager=null;g.ja(n.zB)};l.update=function(g){g.getComponent(n.zB).manager.update()};return l});
define("tdv/player/view/webgl/system/lineMaterial/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/lineMaterial/Behaviour"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/lineMaterial/Behaviour");a=l.extend(k,function(){k.apply(this,arguments)});a.prototype.Yc=function(){this.Nn.v.length&&this.Nn.v.slice().forEach(g.Va);
this.materials.Da.length&&this.materials.Da.slice().forEach(g.update);this.On.v.length&&this.On.v.slice().forEach(g.xa)};a.J={};a.J.Nn=[n.ci,n.zB.aa];a.J.materials=[n.ci,n.zB];a.J.On=[n.ci.aa,n.zB];return a});
define("tdv/player/view/webgl/system/line/System","require tdv/utils tdv/player/view/webgl/ecs/System tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/system/util/material/Util".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components");a("tdv/player/view/webgl/system/util/entity/Util");var g=a("tdv/player/view/webgl/system/util/material/Util");a=l.extend(k,function(){k.apply(this,
arguments);this.xb=this.xb.bind(this);this.ib=this.ib.bind(this);this.Ca=this.Ca.bind(this)});a.prototype.Yc=function(){this.rLa.v.length&&this.rLa.v.slice().forEach(this.xb);this.lines.Da.length&&this.lines.Da.slice().forEach(this.ib);this.sLa.v.length&&this.sLa.v.slice().forEach(this.Ca);this.tLa.v.length&&this.tLa.v.slice().forEach(this.Ca);this.uLa.v.length&&this.uLa.v.slice().forEach(this.Ca)};a.prototype.xb=function(h){h.K(n.Object3D).ra=new THREE.LineSegments;h.K(n.AB);h.K(n.sa);if(!h.getComponent(n.Geometry)){var e=
(new THREE.BufferGeometry).setFromPoints([new THREE.Vector3(0,0,0),new THREE.Vector3(0,0,1)]);e.userData.NKa=!0;h.K(n.Geometry).geometry=e}this.ib(h)};a.prototype.ib=function(h){var e=h.getComponent(n.Object3D).ra;g.AD(e,h.getComponent(n.Material).material);var b=h.getComponent(n.Geometry).geometry;e.geometry!=b&&(e.geometry&&b.userData.NKa&&e.geometry.dispose(),e.geometry=b,e.needsUpdate=!0);h=h.getComponent(n.Line).renderOrder||0;e.renderOrder!=h&&(e.renderOrder=h,e.needsUpdate=!0)};a.prototype.Ca=
function(h){h.ja(n.AB);h.ja(n.Geometry);var e=h.getComponent(n.Object3D);e&&(e=e.ra,e.geometry&&e.geometry.userData.NKa&&e.geometry.dispose(),e.geometry=null,g.AD(e,null),h.ja(n.Object3D))};a.J={};a.J.rLa=[n.Line,n.Material,n.AB.aa];a.J.lines=[n.Line,n.Geometry,n.Material,n.AB];a.J.sLa=[n.Line.aa,n.AB];a.J.tLa=[n.Material.aa,n.AB];a.J.uLa=[n.Geometry.aa,n.AB];return a});
define("tdv/player/view/webgl/system/lineToTransform/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/util/entity/Util"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/util/entity/Util");a=l.extend(k,function(){k.apply(this,arguments);this.xb=this.xb.bind(this);this.Ca=this.Ca.bind(this);this.bg=this.bg.bind(this)});a.prototype.Yc=
function(){this.nLa.v.length&&this.nLa.v.slice().forEach(this.xb);this.mLa.v.length&&this.mLa.v.slice().forEach(this.bg);this.oLa.v.length&&this.oLa.v.slice().forEach(this.Ca);this.pLa.v.length&&this.pLa.v.slice().forEach(this.Ca);this.qLa.v.length&&this.qLa.v.slice().forEach(this.Ca)};a.prototype.xb=function(m){m.K(n.BB)};a.prototype.Ca=function(m){m.ja(n.BB)};var h=new THREE.Matrix4,e=new THREE.Quaternion,b=new THREE.Vector3,c=new THREE.Vector3(0,0,1),d=new THREE.Euler,f=180/Math.PI;a.prototype.bg=
function(m){var p=m.getComponent(n.sa);if(p){var q=g.Sc(m);if(q&&q.parent){var r=m.getComponent(n.ru),t=r.F;if(t){r=g.Sc(t);if(!r||!r.parent)return;b.setFromMatrixPosition(r.matrixWorld)}else if(r.position)b.copy(r.position);else return;h.copy(q.parent.matrixWorld).invert();b.applyMatrix4(h);b.x-=p.translationX;b.y-=p.translationY;b.z-=p.Xe;q=b.length();e.setFromUnitVectors(c,b.normalize());d.setFromQuaternion(e,p.jf);d.x*=f;d.y*=f;d.z*=f;if(p.scale!=q||p.Wd!=d.x||p.fd!=d.y||p.Ve!=d.z)p=m.O(n.sa),
p.scale=q,p.Wd=d.x,p.fd=d.y,p.Ve=d.z,g.aY(m,p),m.T.Za()}}};a.J={};a.J.nLa=[n.Object3D,n.ru,n.BB.aa];a.J.mLa=[n.Object3D,n.ru,n.BB,n.sa];a.J.oLa=[n.Object3D.aa,n.BB];a.J.pLa=[n.ru.aa,n.BB];a.J.qLa=[n.sa.aa,n.BB];return a});
define("tdv/player/view/webgl/system/objectTransform/System","require tdv/utils tdv/constants/EventName tdv/player/view/util/XR tdv/player/view/webgl/ecs/System tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/system/util/material/Util".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/player/view/util/XR"),g=a("tdv/player/view/webgl/ecs/System"),h=a("tdv/player/view/webgl/components"),e=a("tdv/player/view/webgl/system/util/entity/Util"),
b=a("tdv/player/view/webgl/system/util/material/Util");a=l.extend(g,function(){g.apply(this,arguments);this.xb=this.xb.bind(this);this.Ca=this.Ca.bind(this);this.ib=this.ib.bind(this)});a.prototype.Yc=function(){this.fMa.v.length&&this.fMa.v.slice().forEach(this.xb);this.koa.Da.length&&this.koa.Da.slice().forEach(this.ib);this.gMa.v.length&&this.gMa.v.slice().forEach(this.Ca);this.hMa.v.length&&this.hMa.v.slice().forEach(this.Ca)};a.prototype.xb=function(c){c.K(h.CB);this.koa.v.forEach(function(d){this.g1a(d,
c)&&this.V2(e.Sc(d))}.bind(this));this.ib(c)};a.prototype.ib=function(c){var d=c.getComponent(h.ei);if(c=e.Sc(c))this.RVa(c,d),this.V2(c),this.we(c,d)};a.prototype.Ca=function(c){c.ja(h.CB);var d=e.Sc(c);d&&(this.gXa(d),this.V2(d),c.ja(h.CB))};a.prototype.RVa=function(c,d){c.userData.VMa=d.opacity;c.userData.sV=d.sV;c.userData.castShadow=d.castShadow;c.userData.receiveShadow=d.receiveShadow;c.userData.zV=d.zV};a.prototype.gXa=function(c){c.userData.VMa=void 0;c.userData.sV=void 0;c.userData.castShadow=
void 0;c.userData.receiveShadow=void 0;c.userData.zV=void 0};a.prototype.V2=function(c){if(n.Sh!=c&&!c.ow){var d=this.Jwa(c),f=this.VZa(c),m=this.XZa(c),p=this.YZa(c),q=this.WZa(c);if(c.material){if(d===void 0&&q!==!0)b.FX(c);else{var r=c.userData.Kt||c.material,t=b.Y6(r),u=b.Y6(c.material),v=r.opacity;r=r.transparent;q!==!0&&u&&!t?b.FX(c):q!==!0||u||b.GHa(c);v!==void 0&&(t=v*(d===void 0?1:d),u=t>0,r=t<1?!0:r,c.material.opacity!==t||c.material.visible!==u||c.material.transparent!==r)&&(b.lma(c),c.material.opacity=
t,c.material.transparent=r,c.material.visible=u,c.material.needsUpdate=!0);b.Hkb(c)}var w=this.MZa(f);(c.material.map==null?[]:Array.isArray(c.material.map)?c.material.map:[c.material.map]).forEach(function(y){y.anisotropy!==w&&(y.anisotropy=w,y.needsUpdate=!0)})}c.isMesh&&(m!==void 0&&c.castShadow!==m&&(c.castShadow=m),p!==void 0&&c.receiveShadow!==p&&(c.receiveShadow=p));c.children&&c.children.forEach(function(y){y.userData.web=d;y.userData.teb=f;y.userData.veb=m;y.userData.xeb=p;y.userData.ueb=
q;this.V2(y)}.bind(this))}};a.prototype.MZa=function(c){return 1+Math.round((c||0)*(e.cJa().capabilities.getMaxAnisotropy()-1))};a.prototype.Jwa=function(c){var d=c.userData.VMa;c=c.userData.web;if(c!==void 0||d!==void 0)if(d=(c!==void 0?c:1)*(d!==void 0?d:1),d!==1)return d};a.prototype.VZa=function(c){var d=c.userData.sV;if(d!==void 0)return d;c=c.userData.teb;if(c!==void 0)return c};a.prototype.XZa=function(c){var d=c.userData.castShadow;if(d!==void 0)return d;c=c.userData.veb;if(c!==void 0)return c};
a.prototype.YZa=function(c){var d=c.userData.receiveShadow;if(d!==void 0)return d;c=c.userData.xeb;if(c!==void 0)return c};a.prototype.WZa=function(c){var d=c.userData.zV;if(d!==void 0)return d;c=c.userData.ueb;if(c!==void 0)return c};a.prototype.we=function(c,d){var f=this.Jwa(c);f!==void 0&&(f=f>0,c.userData.Glb!==f&&(c.userData.Glb=f,d.M&&d.M.m(f?k.od:k.jd)))};a.prototype.g1a=function(c,d){c=e.Sc(c);d=e.Sc(d);if(!c||!d)return!1;for(d=d.parent;d;){if(d===c)return!0;d=d.parent}return!1};a.J={};a.J.fMa=
[h.ei,h.Object3D,h.CB.aa];a.J.koa=[h.ei,h.Object3D,h.CB];a.J.gMa=[h.ei.aa,h.CB];a.J.hMa=[h.Object3D.aa,h.CB];return a});
define("tdv/player/view/webgl/system/materialVariant/Behaviour",["require","tdv/player/view/webgl/components","tdv/player/view/webgl/system/util/material/Util"],function(a){function l(g){this.A=g;this.Lka=this.Wm=this.De=null;this.GN=-1}var k=a("tdv/player/view/webgl/components"),n=a("tdv/player/view/webgl/system/util/material/Util");l.prototype.frame=function(){if(!this.Wm&&(this.Wm=this.A.getComponent(k.Ni).Zma)){var g=this.Wm.userData&&this.Wm.userData.gltfExtensions&&this.Wm.userData.gltfExtensions.KHR_materials_variants;
this.Lka=g&&g.variants||[];this.update()}};l.prototype.update=function(){if(this.Lka){var g=this.A.getComponent(k.ox).name,h=this.Lka.findIndex(function(b){return b.name==g}),e=this.Wm.scene;this.De!=e?(this.De&&this.uCa(this.De),this.De=e,this.GN=h,this.De&&this.wDa(this.De,this.GN)):this.GN!=h&&(this.GN=h,this.De&&this.wDa(this.De,this.GN));this.A.T.Za()}};l.prototype.uCa=function(g){this.kua(g,-1)};l.prototype.wDa=function(g,h){this.P1a(g,h,function(){this.De==g&&this.GN==h&&this.kua(g,h)}.bind(this))};
l.prototype.P1a=function(g,h,e){var b=[];g.traverse(function(c){var d=c.isMesh&&c.userData.gltfExtensions&&c.userData.gltfExtensions.KHR_materials_variants;if(d=d&&d.mappings){c.userData.lgb||(c.userData.lgb=n.adb(c));c.userData.WE||(c.userData.WE={});for(var f=null,m=d.length-1;m>=0&&!f;--m)d[m].variants.indexOf(h)!=-1&&(f=d[m]);f&&b.push(this.Wm.parser.getDependency("material",f.material).then(function(p){c.userData.WE[h]||(c.userData.WE[h]=p)}))}}.bind(this));Promise.all(b).then(function(){e(g,
h)})};l.prototype.kua=function(g,h){g.traverse(function(e){if(e.userData.WE){var b=e.userData.WE[h];b&&(n.AD(e,b),this.Wm.parser.assignFinalMaterial(e),this.A.O(k.ei,!0))}}.bind(this));this.A.T.Za()};l.prototype.dispose=function(){this.De&&(this.uCa(this.De),this.A.O(k.ei,!0),this.De=null)};l.Va=function(g){g.K(k.Kr).manager=new l(g)};l.xa=function(g){var h=g.getComponent(k.Kr);h.manager.dispose();h.manager=null;g.ja(k.Kr)};l.update=function(g){g.getComponent(k.Kr).manager.update()};l.frame=function(g){g.getComponent(k.Kr).manager.frame()};
return l});
define("tdv/player/view/webgl/system/materialVariant/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/materialVariant/Behaviour"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/materialVariant/Behaviour");a=l.extend(k,function(){k.apply(this,arguments)});a.prototype.Yc=function(){this.yLa.v.length&&this.yLa.v.slice().forEach(g.Va);this.q7.v.length&&
this.q7.v.slice().forEach(g.frame);this.q7.Da.length&&this.q7.Da.slice().forEach(g.update);this.zLa.v.length&&this.zLa.v.slice().forEach(g.xa);this.ALa.v.length&&this.ALa.v.slice().forEach(g.xa);this.BLa.v.length&&this.BLa.v.slice().forEach(g.xa)};a.J={};a.J.yLa=[n.ox,n.Ni,n.Object3D,n.Kr.aa];a.J.q7=[n.ox,n.Ni,n.Object3D,n.Kr];a.J.zLa=[n.ox.aa,n.Kr];a.J.ALa=[n.Object3D.aa,n.Kr];a.J.BLa=[n.Ni.aa,n.Kr];return a});
define("tdv/player/view/webgl/system/mesh/Behaviour",["require","tdv/player/view/webgl/components"],function(a){var l=a("tdv/player/view/webgl/components");return{Va:function(k){var n=k.K(l.tu);k.K(l.sa);var g=k.O(l.Mesh);k.K(l.Object3D).ra=n.Te=g.Te=new THREE.Mesh(k.getComponent(l.Geometry).geometry,k.getComponent(l.Material).material);g.Te.renderOrder=g.renderOrder},update:function(k){var n=k.O(l.tu);n.Te.geometry=k.getComponent(l.Geometry).geometry;n.Te.material=k.getComponent(l.Material).material;
n.Te.renderOrder=k.getComponent(l.Mesh).renderOrder},xa:function(k){k.getComponent(l.tu).Te=null;k.ja(l.tu);k.ja(l.Object3D)}}});
define("tdv/player/view/webgl/system/mesh/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/mesh/Behaviour"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/mesh/Behaviour");a=l.extend(k,function(){k.apply(this,arguments)});a.prototype.Yc=function(){this.ELa.v.length&&this.ELa.v.slice().forEach(g.Va);this.DLa.Da.length&&
this.DLa.Da.slice().forEach(g.update);this.u7.v.length&&this.u7.v.slice().forEach(g.xa);this.pfb.v.length&&this.u7.v.slice().forEach(g.xa);this.qfb.v.length&&this.u7.v.slice().forEach(g.xa)};a.J={};a.J.ELa=[n.Mesh,n.Geometry,n.Material,n.tu.aa];a.J.DLa=[n.Mesh,n.Geometry,n.Material,n.tu];a.J.u7=[n.Mesh.aa,n.tu];a.J.pfb=[n.Geometry.aa,n.tu];a.J.qfb=[n.Material.aa,n.tu];return a});
define("tdv/player/view/util/FileLoader",["require","exports","tdv/constants/EventName","tdv/events/EventDispatcher","tdv/util/LoadQueue"],function(a,l,k,n,g){return function(h){function e(b,c){var d=h.call(this)||this;d.uq=null;d.wua=null;d.XB=!1;d.gM=null;d.ke=b;d.ov=c;d.eD=new Request(b);d.uU=d.uU.bind(d);d.NQ=d.NQ.bind(d);return d}O(e,h);e.prototype.start=function(){this.gM||(this.XB=!1,this.gM=g.add(this.ke,this.ov,this.uU,this.NQ))};e.prototype.uU=function(){this.ke.indexOf("filesystem:")===
0?this.lZa():this.mZa()};e.prototype.lZa=function(){var b=this,c=new XMLHttpRequest;c.open("GET",this.ke,!0);c.responseType="arraybuffer";c.onload=function(){b.hAa(c.response);c.onload=c.onerror=null};c.onerror=function(){b.dAa();c.onload=c.onerror=null};c.send()};e.prototype.mZa=function(){var b=this;fetch(this.eD).then(function(c){function d(t){t===void 0&&(t=null);if(t=t||r)t.close(),r=null,b.uq=null}function f(t){var u;return(u=b.uq.read().then(function(v){var w=v===null||v===void 0?void 0:v.value;
w&&(q+=w.byteLength,t.enqueue(w));v&&v.done&&(p&&q<p?t.error("connection closed prematurely"):(p=q,d(t)));p!==void 0&&b.m(k.xc,{totalBytes:p,bytesLoaded:q,percent:q<p?100*q/p:100})}))===null||u===void 0?void 0:u.catch(function(v){console.log("Error reading response",v);t.error(v)})}if(b.XB)return c.body.getReader().cancel(),Promise.reject("cancel requested before server responded.");if(!c.ok)return Promise.resolve(c);var m=c.headers.get("content-length")||c.headers.get("x-content-length"),p,q=0;m!==
null&&(p=parseInt(m,10));b.uq=c.body.getReader();var r=null;return new Response(new ReadableStream({start:function(t){b.XB?t.close():r=t},pull:function(t){return f(t)},cancel:function(){return d()}}))}).then(function(c){return c.arrayBuffer()}).then(function(c){b.hAa(c)}).catch(function(){b.dAa()})};e.prototype.cancel=function(){this.gM&&(this.gM.cancel(),this.gM=null)};e.prototype.NQ=function(){this.XB=!0;this.uq&&(this.uq.cancel(),this.uq=null)};e.prototype.hAa=function(b){var c;this.wua=b;(c=this.gM)===
null||c===void 0||c.loaded();this.m(k.ia,{buffer:b})};e.prototype.dAa=function(){this.cancel();this.m(k.ad)};e.prototype.getData=function(){return this.wua};return e}(n)});
define("tdv/player/view/webgl/system/model/loaders/GLTFLoader","require exports three.mod tdv/constants/EventName tdv/constants/Priority tdv/events/EventDispatcher tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/system/util/RaycastUtil tdv/player/view/webgl/system/util/Util tdv/player/view/util/Capabilities tdv/player/view/util/FileLoader tdv/player/view/util/Flags tdv/player/view/util/URL tdv/player/view/webgl/components".split(" "),function(a,l,k,n,g,h,e,b,c,d,f,m,p,q){return function(r){function t(u){var v=
r.call(this)||this;v.type=t.TYPE;v.EJ=[];v.qE=[];v.wLa=0;v.F=u;v.yoa=v.yoa.bind(v);v.zoa=v.zoa.bind(v);v.EO=e.BPa(new k.GLTFLoader);return v}O(t,r);t.prototype.Fma=function(){return this.Wm?this.Wm.scene:null};t.prototype.start=function(u){this.url=u;this.APa();this.st.start()};t.prototype.update=function(){if(this.EJ.length!=0||this.qE.length!=0)if(c.$eb())this.F.T.Za();else{for(var u=Date.now()+8,v=this.F.getComponent(q.Ni).cb.Kc().Jn();this.qE.length>0&&Date.now()<u;){var w=this.qE.shift();v&&
v.initTexture(w)}for(;this.EJ.length>0&&Date.now()<u;)b.INa(this.EJ.shift());this.EJ.length==0&&this.qE.length==0?this.QQa():this.F.T.Za()}};t.prototype.dispose=function(){this.nQa()};t.prototype.APa=function(){this.st=new f(this.url,g.DF);this.i$a()};t.prototype.nQa=function(){this.st&&(this.Sgb(),this.st.cancel())};t.prototype.i$a=function(){this.st.bind(n.ia,this.yA,this,!0);this.st.bind(n.xc,this.eP,this,!0);this.st.bind(n.ad,this.dP,this,!0)};t.prototype.Sgb=function(){this.st.h(n.ia,this.yA,
this);this.st.h(n.xc,this.eP,this);this.st.h(n.ad,this.dP,this)};t.prototype.yA=function(){this.EO.parse(this.st.getData(),p.getDirectory(this.url),this.yoa,this.zoa)};t.prototype.eP=function(u){this.m(n.xc,u.data)};t.prototype.dP=function(){this.wLa<2?(this.wLa++,this.nQa(),this.APa(),this.st.start()):this.m(n.ad)};t.prototype.zoa=function(u){m.bx&&u&&u.message&&console.error(u.message);this.m(n.ad)};t.prototype.yoa=function(u){this.EO&&(this.EJ=[],this.qE=[],u.scene.traverse(function(v){if(v.isMesh){var w=
v.material;w&&(d.GNa==1&&w.isMeshPhysicalMaterial&&(v.material=w=(new k.MeshStandardMaterial).copy(w)),w.depthWrite=!w.transparent,w=this.Xcb(w),this.qE=this.qE.concat(w))}this.EJ.push(v)}.bind(this)),this.Wm=u,this.EJ.length==0&&this.qE.length==0?this.QQa():this.F.T.Za())};t.prototype.QQa=function(){this.m(n.INIT);this.m(n.ia)};t.prototype.Xcb=function(u){var v=[];u.isMeshStandardMaterial?(u.alphaMap&&v.push(u.alphaMap),u.aoMap&&v.push(u.aoMap),u.bumpMap&&v.push(u.bumpMap),u.displacementMap&&v.push(u.displacementMap),
u.emissiveMap&&v.push(u.emissiveMap),u.envMap&&v.push(u.envMap),u.lightMap&&v.push(u.lightMap),u.map&&v.push(u.map),u.metalnessMap&&v.push(u.metalnessMap),u.normalMap&&v.push(u.normalMap),u.roughnessMap&&v.push(u.roughnessMap)):u.isMeshBasicMaterial&&(u.alphaMap&&v.push(u.alphaMap),u.envMap&&v.push(u.envMap),u.map&&v.push(u.map));return v};t.TYPE="gltf";return t}(h)});
define("tdv/player/view/webgl/system/model/loaders/GSLoader","require exports tdv/constants/EventName tdv/constants/RenderOrder tdv/events/EventDispatcher tdv/player/view/util/LibsLoader".split(" "),function(a,l,k,n,g,h){return function(e){function b(c){var d=e.call(this)||this;d.type=b.TYPE;d.Bk=null;d.TD=null;d.url="";d.HD=null;d.In=null;d.FI=null;d.bK=null;d.properties=c;d.yA=d.yA.bind(d);d.eP=d.eP.bind(d);d.dP=d.dP.bind(d);d.kX=d.kX.bind(d);return d}O(b,e);b.prototype.Fma=function(){return this.Bk};
b.prototype.start=function(c){this.url=c;h.GS.kj()?this.bQa():h.GS.load(this.Lfb,this)};b.prototype.update=function(){(!this.TD||this.In&&this.In.state==TDV.GS.StateFx.PLAYING)&&this.m(k.V)};b.prototype.dispose=function(){this.FI&&(this.properties.h(k.N("antialiasingLevel"),this.moa,this),this.FI.dispose(),this.FI=null);this.bK&&(this.properties.h(k.N("sphericalHarmonicsMaxDegree"),this.Coa,this),this.bK.dispose(),this.bK=null);this.properties.h(k.N("displayEffect"),this.poa,this);this.TD&&(this.Bk.remove(this.TD),
this.TD=null);this.Bk&&(this.Bk.removeEventListener("refresh",this.kX),this.Bk.dispose(),this.Bk=null);this.url=""};b.prototype.Lfb=function(){this.url&&this.bQa()};b.prototype.bQa=function(){this.Bk=new TDV.GS.GaussianSplattingGroup;this.Bk.addEventListener("refresh",this.kX);this.Bk.renderOrder=n.NSa;this.Bk.ow=!0;this.FI=new TDV.GS.AntialiasingFx;this.bK=new TDV.GS.SphericalHarmonicsFx;this.Bk.fx=(this.Bk.fx||[]).concat([this.FI,this.bK]);this.properties.bind(k.N("antialiasingLevel"),this.moa,
this,!1);this.properties.bind(k.N("sphericalHarmonicsMaxDegree"),this.Coa,this,!1);this.properties.bind(k.N("displayEffect"),this.poa,this,!1);this.moa();this.Coa();this.poa();(new TDV.GS.GaussianCloudLoader).load(this.url,this.yA,this.eP,this.dP)};b.prototype.yA=function(c){this.Bk&&(this.TD=c,this.Bk.add(c),this.m(k.INIT),this.m(k.ia))};b.prototype.eP=function(c){var d=c.total;c=c.loaded;this.m(k.xc,{totalBytes:d,bytesLoaded:c,percent:c<d?100*c/d:100})};b.prototype.dP=function(){this.m(k.ad)};b.prototype.poa=
function(){var c=this.properties.get("displayEffect");if(this.HD!=c&&this.Bk){var d=this.Bk.fx;this.In&&(d=d.filter(function(f){return f!=this.In}.bind(this)),this.In.dispose(),this.In=null);if(this.HD=c)this.In=new TDV.GS.RadialFadeInAnimationFx,this.In.sparseFadeFactor=this.HD.get("sparseFadeFactor"),this.In.denseFadeFactor=this.HD.get("denseFadeFactor"),this.In.denseTimeDelay=this.HD.get("denseTimeDelay"),this.In.speedFactor=this.HD.get("speedFactor"),this.In.minimumPointSize=this.HD.get("minimumPointSize"),
d=d.concat([this.In]),this.In.play(),this.kX();this.Bk.fx=d}};b.prototype.kX=function(){this.m(k.V)};b.prototype.moa=function(){this.FI&&(this.FI.value=this.properties.get("antialiasingLevel"),this.m(k.V))};b.prototype.Coa=function(){this.bK&&(this.bK.maxDegree=this.properties.get("sphericalHarmonicsMaxDegree"),this.m(k.V))};b.TYPE="gs";return b}(g)});
define("tdv/player/view/webgl/system/model/loaders/TilesLoader","require exports three.mod tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/system/util/material/Util tdv/player/view/util/URL".split(" "),function(a,l,k,n,g,h,e,b){a=function(q){function r(){var t=q.call(this)||this;t.type=r.TYPE;t.He=null;t.EO=null;t.camera=null;t.Qq=null;t.width=void 0;t.height=void 0;t.kj=!1;t.e5=null;t.session=null;t.config=null;return t}O(r,q);
r.prototype.Fma=function(){return this.He?this.He.group:null};r.prototype.Ghb=function(t){this.config=t};r.prototype.start=function(t){this.e5=this.lcb(t);this.He=new k.TDTiles.TilesRenderer(t);this.EO=h.BPa(new k.GLTFLoader(this.He.manager));this.He.manager.addHandler(/\.gltf$/,this.EO);this.config&&(this.He.maxDepth=this.config.maxDepth,this.He.loadSiblings=this.config.loadSiblings,this.He.parseQueue.maxJobs=this.config.Hoa,this.He.downloadQueue.maxJobs=this.config.$la,this.He.lruCache.minSize=
this.config.Pna,this.He.lruCache.maxSize=this.config.Ona,this.He.errorTarget=this.config.errorTarget,this.He.errorThreshold=this.config.errorThreshold);b.una(t)&&(this.He.fetchOptions.mode="cors");this.He.onLoadModel=this.onLoadModel.bind(this);this.He.onDisposeModel=this.onDisposeModel.bind(this);this.He.onLoadTileSet=this.onLoadTileSet.bind(this);this.He.onTileVisibilityChange=this.onTileVisibilityChange.bind(this);this.He.preprocessURL=this.Wfb.bind(this);this.m(n.INIT)};r.prototype.dispose=function(){this.He&&
(this.EO=null,this.He.dispose(),this.He=null,this.Qq&&this.Qq.removeFromParent(),this.session=this.e5=null)};r.prototype.setCamera=function(t){this.camera!==t&&(this.camera=t,this.XQa(),this.updateCamera())};r.prototype.setSize=function(t,u){if(this.width!==t||this.height!==u)this.width=t,this.height=u,this.hlb()};r.prototype.update=function(){this.camera&&this.width&&this.height&&(this.XQa(),this.He.update())};r.prototype.lcb=function(t){return(new window.URL(t)).searchParams.get("key")||null};r.prototype.ndb=
function(t){return(new window.URL(t)).searchParams.get("session")||null};r.prototype.updateCamera=function(){this.He&&this.camera&&(this.He.setCamera(this.camera),this.He.setCamera(this.Qq))};r.prototype.XQa=function(){this.camera&&(this.Qq||(this.Qq=new k.OrthographicCamera(-1,1,-1,1),this.Qq.matrixAutoUpdate=!1),this.Qq.parent!==this.camera&&this.camera.add(this.Qq),this.camera.updateMatrixWorld(!0),p.setFromMatrixPosition(this.camera.matrixWorld),m.copy(p).y-=this.camera.far,m.applyMatrix4(c.copy(this.camera.matrixWorld).invert()),
f.random().cross(m).normalize(),this.Qq.matrix.lookAt(d,m,f),this.Qq.near=this.camera.near,this.Qq.far=this.camera.far)};r.prototype.hlb=function(){this.He&&this.camera&&this.width&&this.height&&(this.He.setResolution(this.camera,this.width,this.height),this.He.setResolution(this.Qq,1,1))};r.prototype.Wfb=function(t){t=new window.URL(t);/^http/.test(t.protocol)&&(this.e5&&t.searchParams.append("key",this.e5),this.session&&t.searchParams.append("session",this.session));return t.toString()};r.prototype.onLoadModel=
function(){this.kj||(this.kj=!0,this.m(n.ia));this.m(n.V)};r.prototype.onDisposeModel=function(t){t.traverse(function(u){u instanceof k.Mesh&&e.FX(u)})};r.prototype.onTileVisibilityChange=function(t,u,v){v&&this.m(n.V)};r.prototype.onLoadTileSet=function(){this.session==null&&this.He.traverse(function(t){return t.content&&t.content.uri?(this.session=this.ndb(t.content.uri),!0):!1}.bind(this));this.m(n.V)};r.TYPE="tiles";return r}(g);var c=new k.Matrix4,d=new k.Vector3,f=new k.Vector3,m=new k.Vector3,
p=new k.Vector3;return a});
define("tdv/player/view/webgl/system/model/loaders/TilesLoaderConfig",["require","exports"],function(){return function(){function a(){this.errorTarget=6;this.maxDepth=this.errorThreshold=Infinity;this.loadSiblings=!0;this.$la=6;this.Hoa=3;this.Pna=600;this.Ona=800}a.Sab=function(l){var k=new a;k.errorTarget=l.get("errorTarget",k.errorTarget);k.errorThreshold=l.get("errorThreshold",k.errorThreshold);k.maxDepth=l.get("maxDepth",k.maxDepth);k.loadSiblings=l.get("loadSiblings",k.loadSiblings);k.$la=l.get("downloadMaxJobs",
k.$la);k.Hoa=l.get("parseMaxJobs",k.Hoa);k.Pna=l.get("lruCacheMinSize",k.Pna);k.Ona=l.get("lruCacheMaxSize",k.Ona);return k};return a}()});
define("tdv/player/view/webgl/system/model/GeometryQuery",["require","tdv/player/view/webgl/system/util/RaycastUtil"],function(a){function l(b){this.Ea=b}var k=a("tdv/player/view/webgl/system/util/RaycastUtil"),n=new THREE.Raycaster,g=new THREE.Vector3,h=new THREE.Vector3(0,-1,0),e=new THREE.Vector3(0,1,0);l.prototype.fK=function(b,c){n.ray.origin.copy(b);g.copy(c).sub(b);var d=g.length();g.normalize();n.ray.direction.copy(g);b=this.TG();return k.intersect(n,b).filter(function(f){if(f.distance>=d*
.98||!f.object.visible)return!1;f=Array.isArray(f.object.material)&&f.face?f.object.material[f.face.materialIndex]:f.object.material;return!f||f.visible}).length>0};l.prototype.Ccb=function(b){n.ray.origin.copy(b);n.ray.direction.copy(h);b=this.TG();var c=k.intersect(n,b);if(c.length>0)return c[0].distance;n.ray.direction.copy(e);c=k.intersect(n,b);if(c.length>0)return-c[0].distance};l.prototype.TG=function(){var b=[];this.Ea.traverse(function(c){c.isSprite||c.isLine||b.push(c)});return b};return l});
define("tdv/player/view/webgl/system/model/MetadataQuery",["require","exports"],function(){return function(){function a(l){this.TD=l}a.prototype.getMetadata=function(){return this.TD.metadata};return a}()});
define("tdv/player/view/webgl/system/model/ObjectQuery",["require","tdv/player/view/webgl/system/util/entity/Util"],function(a){function l(n,g){this.Tb=n;this.u0a=g}var k=a("tdv/player/view/webgl/system/util/entity/Util");l.prototype.sJa=function(n){return(n=this.Sc(n))&&n.matrixWorld};l.prototype.Sc=function(n){return n?k.MD(this.u0a,n):k.Sc(this.Tb)};return l});
define("tdv/player/view/webgl/system/model/ProjectionQuery",["require","tdv/player/view/webgl/system/util/entity/Util"],function(a){function l(c,d,f){this.Tb=c;this.f2a=d;this.LZa=f}var k=a("tdv/player/view/webgl/system/util/entity/Util"),n=new THREE.Vector3,g=new THREE.Vector3,h=new THREE.Vector3,e=new THREE.Frustum,b=new THREE.Matrix4;l.prototype.Yma=function(c,d){d=this.f2a.sJa(d);if(!d)return null;g.copy(c).applyMatrix4(d);var f=(c=k.Sc(this.Tb))&&k.mW(c);c=f&&k.jw(f);if(!c)return null;b.identity().multiplyMatrices(c.projectionMatrix,
c.matrixWorldInverse);e.setFromProjectionMatrix(b);if(!e.containsPoint(g))return null;d=(f&&k.pW(f))/2;f=(f&&k.RD(f))/2;n.copy(g).project(c);d=n.x*d+d;f=-(n.y*f)+f;h.setFromMatrixPosition(c.matrixWorld);c=this.LZa.fK(h,g);return{x:Math.round(d),y:Math.round(f),visible:!c}};return l});
define("tdv/player/view/webgl/system/model/Loader","require tdv/constants/EventName tdv/player/script/Model3DResourceLevel tdv/player/view/webgl/system/model/loaders/GLTFLoader tdv/player/view/webgl/system/model/loaders/GSLoader tdv/player/view/webgl/system/model/loaders/TilesLoader tdv/player/view/webgl/system/model/loaders/TilesLoaderConfig tdv/player/view/webgl/system/model/GeometryQuery tdv/player/view/webgl/system/model/MetadataQuery tdv/player/view/webgl/system/model/ObjectQuery tdv/player/view/webgl/system/model/ProjectionQuery tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/components tdv/player/view/util/Device tdv/player/view/util/FileType tdv/player/view/util/URL".split(" "),function(a){function l(u,
v,w,y){this.A=u;this.bq=v;u=this.A.getComponent(q.Ni);this.B=u.properties;this.Jj=y;this.qf=w;this.Ae=this.Jj.Xv(1);this.qf.QN(this.Ae,1);this.La=this.Wm=null;w=this.r0a(u.Zna);this.pd=this.bYa(w);this.aVa();this.pd.type===e.TYPE&&this.pd.Ghb(b.Sab(u.Zna));this.pd.start(w)}var k=a("tdv/constants/EventName"),n=a("tdv/player/script/Model3DResourceLevel"),g=a("tdv/player/view/webgl/system/model/loaders/GLTFLoader"),h=a("tdv/player/view/webgl/system/model/loaders/GSLoader"),e=a("tdv/player/view/webgl/system/model/loaders/TilesLoader"),
b=a("tdv/player/view/webgl/system/model/loaders/TilesLoaderConfig"),c=a("tdv/player/view/webgl/system/model/GeometryQuery"),d=a("tdv/player/view/webgl/system/model/MetadataQuery"),f=a("tdv/player/view/webgl/system/model/ObjectQuery"),m=a("tdv/player/view/webgl/system/model/ProjectionQuery"),p=a("tdv/player/view/webgl/system/util/entity/Util"),q=a("tdv/player/view/webgl/components"),r=a("tdv/player/view/util/Device"),t=a("tdv/player/view/util/FileType");a("tdv/player/view/util/URL");l.prototype.bYa=
function(u){return t.is(u,t.Ora)?new h(this.B):t.is(u,t.qUa)?new e:new g(this.A)};l.prototype.r0a=function(u){var v=u.get("levels");if(!w&&r.ub())var w=(w=v.find(function(y){return y.get("tags").indexOf(n.yZ)>-1}))&&w.get("url");w||v.length&&(w=v[0].get("url"));w||(w=u.get("url"));return w};l.prototype.update=function(){};l.prototype.frame=function(){this.pd.type===e.TYPE?this.A9a():this.pd.type===g.TYPE?this.Q8a():this.pd.type===h.TYPE&&this.R8a()};l.prototype.A9a=function(){var u=p.Qf(this.A),v=
u&&p.jw(u);v&&(this.pd.setCamera(v),this.pd.setSize(p.pW(u),p.RD(u)),this.pd.update())};l.prototype.Q8a=function(){this.pd.update()};l.prototype.R8a=function(){this.pd.update()};l.prototype.aVa=function(){this.pd.bind(k.INIT,this.Qza,this,!0);this.pd.bind(k.ia,this.Ke,this,!0);this.pd.bind(k.ad,this.th,this,!0);this.pd.bind(k.xc,this.Ej,this,!0);this.pd.bind(k.V,this.iAa,this,!0)};l.prototype.A4a=function(){this.pd.h(k.INIT,this.Qza,this);this.pd.h(k.ia,this.Ke,this);this.pd.h(k.ad,this.th,this);
this.pd.h(k.xc,this.Ej,this);this.pd.h(k.V,this.iAa,this)};l.prototype.Qza=function(){this.La=this.pd.Fma();this.bq.K(q.Object3D).ra=this.La;var u=this.pd.type==g.TYPE,v=this.pd.type==h.TYPE;this.EVa(this.La,u||v);v=this.A.O(q.Ni,!0);v.Zma=u?this.pd.Wm:null;this.A.O(q.Animation,!0).properties=v.properties};l.prototype.Ke=function(){this.B.set("geometryQuery",new c(this.La));this.B.set("objectQuery",new f(this.A,this.La));this.B.set("projectionQuery",new m(this.A,this.B.get("objectQuery"),this.B.get("geometryQuery")));
this.pd.type==h.TYPE&&this.B.set("metadataQuery",new d(this.pd.TD));this.r4();this.A.O(q.ei)};l.prototype.Ej=function(u){this.Ae.m(k.xc,u.data)};l.prototype.th=function(){this.Ae.m(k.ad)};l.prototype.iAa=function(){this.A.O(q.Object3D,!0)};l.prototype.r4=function(){this.B.set("isLoaded",!0);this.Ae.m(k.ia)};l.prototype.EVa=function(u,v){u.userData.id===void 0&&(u.userData.id="root");if(v!==!1)for(var w=[u];w.length;){var y=w.shift();u=[];y.children&&(u=u.concat(y.children));y.isSkinnedMesh&&(u=u.concat(y.skeleton.bones));
u.forEach(function(x,z){x.userData.id===void 0&&(x.userData.id=y.userData.id+"/"+z);w.push(x)})}};l.prototype.dispose=function(){this.La&&(this.pd.type!=h.TYPE&&this.La.traverse(function(u){function v(x){x&&w.indexOf(x)<0&&w.push(x)}var w=[];v(u.material);v(u.userData.Kt);if(u.userData.WE)for(var y in u.userData.WE)v(u.userData.WE[y]);w.forEach(function(x){x.dispose();Object.keys(x).forEach(function(z){(z=x[z])&&typeof z==="object"&&"minFilter"in z&&z.dispose()})});u.geometry&&u.geometry.userData.QGa&&
u.geometry.disposeBoundsTree();u.geometry&&u.geometry.dispose()}),this.La=null,this.bq.ja(q.Object3D));this.pd&&(this.A4a(),this.pd.dispose(),this.pd=null);this.Ae&&(this.qf.qP(this.Ae),this.Jj.qP(this.Ae),this.qf=this.Ae=null);this.B&&(this.B.set("geometryQuery",null),this.B.set("objectQuery",null),this.B.set("isLoaded",!1),this.B=null)};return l});
define("tdv/player/view/webgl/system/model/object/draggable/DraggableSize3DControls","require tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/RenderOrder tdv/events/EventDispatcher tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util".split(" "),function(a){function l(r,t,u){this.Tb=r;this.A=t;this.P=u;this.Ql=this.Ql.bind(this);this.uh=this.uh.bind(this);this.Ry=this.Ry.bind(this);this.Me=null;this.ha=!1;this.W2=[1,1,1,1,1,1];this.jy=[];this.Yg=[this.LN=
this.Zr(),this.KN=this.Zr(),this.NN=this.Zr(),this.MN=this.Zr(),this.PN=this.Zr(),this.ON=this.Zr()];this.Yg.forEach(function(v){v=v.O(e.wd);v.opacity=.5;v.depthTest=!1}.bind(this));k.ba(this.P,m,this.uh,!0);k.ba(this.P,p,this.Ql,!0);k.ba(this.P,q,this.Ry,!0)}var k=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/constants/RenderOrder"),h=a("tdv/events/EventDispatcher"),e=a("tdv/player/view/webgl/components"),b=a("tdv/player/view/webgl/system/util/entity/Util");l.prototype.frame=
function(){if(this.ha&&(this.m6a(this.Yg.map(function(C){return b.cJ(C)||1})),this.Me)){var r=b.Sc(this.A),t=b.Sc(this.PL(this.Me));if(r&&t){d.copy(r.matrixWorld).invert();c.setFromMatrixPosition(t.matrixWorld).applyMatrix4(d);r=this.P.get("x");t=this.P.get("y");var u=this.P.get("z"),v=this.P.get("width"),w=this.P.get("height"),y=this.P.get("depth"),x=0,z=0,A=0,D=0,E=0,B=0;switch(this.Me){case this.LN:D=c.x-v*.5;x=D*.5;break;case this.KN:D=-c.x-v*.5;x=-D*.5;break;case this.NN:E=c.y-w*.5;z=E*.5;break;
case this.MN:E=-c.y-w*.5;z=-E*.5;break;case this.PN:B=c.z-y*.5;A=B*.5;break;case this.ON:B=-c.z-y*.5,A=-B*.5}this.P.set("x",r+x);this.P.set("width",v+D);this.P.set("y",t+z);this.P.set("height",w+E);this.P.set("z",u+A);this.P.set("depth",y+B)}}};var c=new THREE.Vector3,d=new THREE.Matrix4;l.prototype.Zr=function(){var r=this.Tb.T.rc("DraggingSphere");this.jy.push(r);r.K(e.Mesh).renderOrder=g.lSa;r.K(e.Geometry).geometry=new THREE.SphereGeometry;r.K(e.wd);return r};l.prototype.uh=function(){this.LN.O(e.wd).color=
this.P.get("draggableXControlsColor");this.KN.O(e.wd).color=this.P.get("draggableXControlsColor");this.NN.O(e.wd).color=this.P.get("draggableYControlsColor");this.MN.O(e.wd).color=this.P.get("draggableYControlsColor");this.PN.O(e.wd).color=this.P.get("draggableZControlsColor");this.ON.O(e.wd).color=this.P.get("draggableZControlsColor");var r=this.P.get("draggableSphereRadius");this.Yg.forEach(function(t,u){t.O(e.sa,!0).scale=r*this.W2[u]}.bind(this))};l.prototype.Ql=function(){this.LN.O(e.sa,!0).positionX=
this.P.get("width")/2;this.KN.O(e.sa,!0).positionX=-this.P.get("width")/2;this.NN.O(e.sa,!0).positionY=this.P.get("height")/2;this.MN.O(e.sa,!0).positionY=-this.P.get("height")/2;this.PN.O(e.sa,!0).positionZ=this.P.get("depth")/2;this.ON.O(e.sa,!0).positionZ=-this.P.get("depth")/2};l.prototype.Ry=function(){var r=this.P.get("sizeDraggable");this.ha!=r&&(this.ha=r,this.Yg.forEach(function(t){r?(t.K(e.pb).F=this.A,this.Yg.forEach(function(u){u=u.K(e.vd);u.Tt=!0;u.kt=!0;u.M=new h;u.M.bind(n.tc,this.sM,
this,!0);u.M.bind(n.Eb,this.Dga,this,!0);u.M.bind(n.Ra,this.Bga,this,!0);u.M.bind(n.ab,this.Cga,this,!0)}.bind(this))):(t.ja(e.pb),this.Yg.forEach(function(u){u.ja(e.vd)}.bind(this)))}.bind(this)))};l.prototype.m6a=function(r){for(var t=!1,u=0;u<this.W2.length&&!t;u++)t=this.W2[u]!=r[u];t&&(this.W2=r,this.uh())};l.prototype.sM=function(r){(r=this.ny(r))&&r!=this.Me&&(r.O(e.wd).opacity=1)};l.prototype.Dga=function(r){(r=this.ny(r))&&r!=this.Me&&(r.O(e.wd).opacity=.5)};l.prototype.ny=function(r){r=
this.Yg.map(function(t){return t.getComponent(e.vd).M}).indexOf(r.source);return r==-1?null:this.Yg[r]};l.prototype.Bga=function(r){r=this.ny(r);this.iU(r)};l.prototype.Cga=function(r){r=this.ny(r);r==this.Me&&(this.iU(null),this.Ql(),(r=this.Yg.indexOf(r)!=-1)&&this.P.m(n.Mm),r&&this.P.m(n.Qsa))};l.prototype.iU=function(r){this.Me&&(this.Me.O(e.wd).opacity=.5,this.PL(this.Me).ja(e.hx));if(this.Me=r)this.Me.O(e.wd).opacity=1,r=this.PL(this.Me).K(e.hx),r.direction=this.k_a(this.Me),r.min=this.l_a(this.Me)};
l.prototype.k_a=function(r){var t=b.getWorldPosition(this.A);return b.getWorldPosition(r).sub(t)};l.prototype.PL=function(r){return this.Yg.indexOf(r)!=-1?r:null};l.prototype.l_a=function(r){var t=this.O_a(r);if(t){t=b.getWorldPosition(t);var u=b.getWorldPosition(r).sub(t);switch(r){case this.LN:case this.KN:var v=this.P.get("minWidth");break;case this.NN:case this.MN:v=this.P.get("minHeight");break;case this.PN:case this.ON:v=this.P.get("minDepth")}return t.add(u.setLength(v||f))}};l.prototype.O_a=
function(r){switch(r){case this.LN:return this.KN;case this.KN:return this.LN;case this.NN:return this.MN;case this.MN:return this.NN;case this.PN:return this.ON;case this.ON:return this.PN}return null};l.prototype.dispose=function(){k.da(this.P,m,this.uh);k.da(this.P,p,this.Ql);k.da(this.P,q,this.Ry);var r=this.Tb.T;this.jy.forEach(function(t){r.dd(t)});this.P=this.Tb=this.Yg=this.A=this.jy=null};var f=1E-6,m=["draggableSphereRadius","draggableXControlsColor","draggableYControlsColor","draggableZControlsColor"],
p="depth height x y z width".split(" "),q=["sizeDraggable"];return l});
define("tdv/player/view/webgl/system/model/object/BoxController","require tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/webgl/components tdv/player/view/webgl/system/model/object/draggable/DraggableSize3DControls".split(" "),function(a){function l(f,m,p){this.Tb=f;this.P=p;this.Ql=this.Ql.bind(this);this.uh=this.uh.bind(this);this.Sy=this.Sy.bind(this);this.A=this.BXa();f=this.A.K(h.pb);f.F=this.Tb;f.id=this.P.get("parentId");this.Ku=this.xca();this.Ku.K(h.pb).F=
this.A;this.nR=this.PXa();this.nR.K(h.pb).F=this.A;this.jy=[this.A,this.Ku,this.nR];this.qda=new e(this.Tb,this.A,this.P);f=this.A.K(h.vd);f.kt=!0;f.Tt=!0;f.M=this.P;k.ba(this.P,b,this.uh,!0);k.ba(this.P,c,this.Ql,!0);k.ba(this.P,d,this.Sy,!0);this.P.m(n.od)}var k=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/events/EventDispatcher"),h=a("tdv/player/view/webgl/components"),e=a("tdv/player/view/webgl/system/model/object/draggable/DraggableSize3DControls");l.prototype.frame=
function(){this.qda.frame()};l.prototype.BXa=function(){var f=this.Tb.T.rc("Box");f.K(h.Group);return f};l.prototype.xca=function(){var f=this.Tb.T.rc("BoxBorder");f.K(h.Line);f.K(h.Geometry).geometry=this.CXa();f.K(h.ci);return f};l.prototype.PXa=function(){var f=this.Tb.T.rc("BoxFace");f.K(h.Mesh);var m=f.K(h.ei);m.castShadow=!1;m.receiveShadow=!1;f.K(h.Geometry).geometry=new THREE.BoxGeometry(1,1,1);f.K(h.wd);return f};l.prototype.CXa=function(){var f=[new THREE.Vector3(-.5,-.5,.5),new THREE.Vector3(.5,
-.5,.5),new THREE.Vector3(.5,-.5,.5),new THREE.Vector3(.5,.5,.5),new THREE.Vector3(.5,.5,.5),new THREE.Vector3(-.5,.5,.5),new THREE.Vector3(-.5,.5,.5),new THREE.Vector3(-.5,-.5,.5),new THREE.Vector3(-.5,-.5,-.5),new THREE.Vector3(.5,-.5,-.5),new THREE.Vector3(.5,-.5,-.5),new THREE.Vector3(.5,.5,-.5),new THREE.Vector3(.5,.5,-.5),new THREE.Vector3(-.5,.5,-.5),new THREE.Vector3(-.5,.5,-.5),new THREE.Vector3(-.5,-.5,-.5),new THREE.Vector3(-.5,-.5,.5),new THREE.Vector3(-.5,-.5,-.5),new THREE.Vector3(.5,
-.5,.5),new THREE.Vector3(.5,-.5,-.5),new THREE.Vector3(-.5,.5,.5),new THREE.Vector3(-.5,.5,-.5),new THREE.Vector3(.5,.5,.5),new THREE.Vector3(.5,.5,-.5)];return(new THREE.BufferGeometry).setFromPoints(f)};l.prototype.uh=function(){var f=this.Ku.O(h.ci);f.color=this.P.get("lineColor");f.opacity=this.P.get("lineOpacity");f.width=this.P.get("lineWidth");f.depthTest=this.P.get("depthTest");f=this.nR.O(h.wd);f.color=this.P.get("faceColor");f.opacity=this.P.get("faceOpacity");f.depthTest=this.P.get("depthTest");
f=this.A.O(h.vd,!0);f.bB=this.P.get("useHandCursor");f.SE=this.P.get("transparentAreaActive")};l.prototype.Ql=function(){var f=this.A.O(h.sa,!0);f.positionX=this.P.get("x");f.positionY=this.P.get("y");f.positionZ=this.P.get("z");f=this.Ku.O(h.sa,!0);var m=this.nR.O(h.sa,!0);m.Ge=f.Ge=this.P.get("width");m.We=f.We=this.P.get("height");m.Dh=f.Dh=this.P.get("depth")};l.prototype.Sy=function(){if(this.P.get("positionDraggable")){var f=this.A.O(h.Fh,!0);f.M||(f.M=new g,f.M.bind(n.V,this.Bm,this,!0));f.translate=
this.P.get("positionDraggable")||!1;f.rotate=!1;f.scale=!1}else(f=this.A.getComponent(h.Fh))&&f.M.h(n.V,this.Bm,this),this.A.ja(h.Fh)};l.prototype.Bm=function(f){this.P.set({x:f.data.position.x,y:f.data.position.y,z:f.data.position.z});this.P.m(n.Mm)};l.prototype.dispose=function(){this.qda.dispose();this.qda=null;k.da(this.P,d,this.Sy);k.da(this.P,b,this.uh);k.da(this.P,c,this.Ql);var f=this.Tb.T;this.jy.forEach(function(m){f.dd(m)});this.Tb=this.nR=this.Ku=this.A=this.jy=null;this.P.m(n.jd);this.P=
null};var b=["transparentAreaActive","useHandCursor"],c="depth height x y z width".split(" "),d=["positionDraggable"];return l});
define("tdv/player/view/webgl/system/model/object/draggable/DraggableSize2DControls","require tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/RenderOrder tdv/events/EventDispatcher tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util".split(" "),function(a){function l(y,x,z){this.Tb=y;this.A=x;this.P=z;this.CH=this.CH.bind(this);this.uh=this.uh.bind(this);this.Ry=this.Ry.bind(this);this.Me=null;this.ha=!1;this.DZ=this.pv=1;this.Mu=this.Tb.T.rc("DraggingSize2DContainer");
this.Mu.K(e.Group);this.Mu.K(e.sa);this.Yg=[this.Yfa=this.Zr(),this.Rfa=this.Zr(),this.via=this.Zr(),this.$ha=this.Zr()];this.Yg.forEach(function(A){A.K(e.sa);A=A.O(e.wd);A.color="#ffffff";A.opacity=.5;A.depthTest=!1}.bind(this));this.Ku=this.xca();this.jy=[this.Mu,this.Ku].concat(this.Yg);[this.Ku].concat(this.Yg).forEach(function(A){A.K(e.pb).F=this.Mu}.bind(this));k.ba(this.P,v,this.CH,!0);k.ba(this.P,u,this.uh,!0);k.ba(this.P,w,this.Ry,!0)}var k=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),
g=a("tdv/constants/RenderOrder"),h=a("tdv/events/EventDispatcher"),e=a("tdv/player/view/webgl/components"),b=a("tdv/player/view/webgl/system/util/entity/Util"),c=new THREE.Matrix4,d=new THREE.Vector3,f=new THREE.Vector3,m=new THREE.Quaternion,p=new THREE.Vector3,q=new THREE.Vector3,r=new THREE.Euler,t=180/Math.PI;l.prototype.frame=function(){if(this.ha){var y=b.Sc(this.Mu),x=y&&b.mW(y),z=x&&b.jw(x);if(z){if(this.Me){var A=b.pW(x);x=b.RD(x);b.getWorldPosition(this.A,q).project(z);q.x=(q.x+1)*A*.5;
q.y=(1-q.y)*x*.5;b.getWorldPosition(this.Me,p).project(z);p.x=(p.x+1)*A*.5;p.y=(1-p.y)*x*.5;A=this.P.get("anchorX");x=this.P.get("anchorY");var D,E,B=q.x-p.x,C=p.y-q.y,F=-B,G=-C;this.Rfa===this.Me&&(A>0||x<1)?B>C?D=B/A:E=C/(1-x):this.$ha===this.Me&&(A<1||x<1)?F>C?D=F/(1-A):E=C/(1-x):this.Yfa===this.Me&&(A>0||x>0)?B>G?D=B/A:E=G/x:this.via===this.Me&&(A<1||x>0)&&(F>G?D=F/(1-A):E=G/x);E!==void 0&&D===void 0?D=E*this.bua:D!==void 0&&E===void 0&&(E=D/this.bua);D!==void 0&&E!==void 0&&(A=this.P.get("sizeAttenuation")?
this.pv/this.DZ:1,this.P.set("width",this.Pa=D*A),this.P.set("height",this.Ha=E*A))}D=this.Mu.getComponent(e.sa);c.copy(y.parent.matrixWorld).invert().multiply(z.matrixWorld).decompose(d,m,f);r.setFromQuaternion(m,D.jf);r.x*=t;r.y*=t;r.z*=t;if(D.Wd!=r.x||D.fd!=r.y||D.Ve!=r.z)D=this.Mu.O(e.sa),D.Wd=r.x,D.fd=r.y,D.Ve=r.z;y.parent.getWorldScale(d);this.f5a(1/Math.max(d.x,d.y,d.z));this.Nia(b.cJ(this.Mu)||1)}}};l.prototype.D8a=function(y,x){this.Wja!=null&&clearTimeout(this.Wja);this.Wja=setTimeout(function(){this.Wja=
null;if(this.Pa!==y||this.Ha!==x)this.Pa=y,this.Ha=x,this.bua=this.Pa/this.Ha}.bind(this),100)};l.prototype.Zr=function(){var y=this.Tb.T.rc("DraggingSphere");y.K(e.Mesh).renderOrder=g.kSa;y.K(e.Geometry).geometry=new THREE.SphereGeometry;y.K(e.wd);return y};l.prototype.xca=function(){var y=this.Tb.T.rc("BoxBorder");y.K(e.Line);y.K(e.Geometry).geometry=this.mYa();var x=y.K(e.ci);x.color="#0000ff";x.depthTest=!1;x.width=1;return y};l.prototype.mYa=function(){var y=[new THREE.Vector3(-.5,-.5,0),new THREE.Vector3(.5,
-.5,0),new THREE.Vector3(.5,-.5,0),new THREE.Vector3(.5,.5,0),new THREE.Vector3(.5,.5,0),new THREE.Vector3(-.5,.5,0),new THREE.Vector3(-.5,.5,0),new THREE.Vector3(-.5,-.5,0)];return(new THREE.BufferGeometry).setFromPoints(y)};l.prototype.uh=function(){var y=this.Ku.O(e.ci);y.color=this.P.get("draggableLineColor");y.opacity=this.P.get("draggableLineOpacity");y.width=this.P.get("draggableLineWidth");this.Yg.forEach(function(x){x.O(e.wd).color=this.P.get("draggableSphereColor");x.O(e.sa).scale=this.P.get("draggableSphereRadius")*
this.pv}.bind(this))};l.prototype.Nia=function(y){this.pv!=y&&(this.pv=y,this.CH(),this.uh())};l.prototype.f5a=function(y){this.DZ!=y&&(this.DZ=y,this.CH(),this.uh())};l.prototype.CH=function(){var y=this.P.get("anchorX"),x=this.P.get("anchorY"),z=this.P.get("width"),A=this.P.get("height"),D=this.P.get("sizeAttenuation")?this.DZ:this.pv,E=this.Yfa.O(e.sa,!0);E.positionX=-y*z*D;E.positionY=x*A*D;E=this.via.O(e.sa,!0);E.positionX=(1-y)*z*D;E.positionY=x*A*D;E=this.Rfa.O(e.sa,!0);E.positionX=-y*z*D;
E.positionY=(x-1)*A*D;E=this.$ha.O(e.sa,!0);E.positionX=(1-y)*z*D;E.positionY=(x-1)*A*D;E=this.Ku.O(e.sa,!0);E.positionX=(.5-y)*z*D;E.positionY=(x-.5)*A*D;E.Ge=z*D;E.We=A*D;this.D8a(z,A)};l.prototype.Ry=function(){var y=this.P.get("sizeDraggable");this.ha!=y&&((this.ha=y)?(this.Mu.K(e.pb).F=this.A,this.Yg.forEach(function(x){x=x.K(e.vd);x.Tt=!0;x.kt=!0;x.M=new h;x.M.bind(n.tc,this.sM,this,!0);x.M.bind(n.Eb,this.Dga,this,!0);x.M.bind(n.Ra,this.Bga,this,!0);x.M.bind(n.ab,this.Cga,this,!0)}.bind(this))):
(this.Mu.ja(e.pb),this.Yg.forEach(function(x){x.ja(e.vd)}.bind(this))))};l.prototype.sM=function(y){(y=this.ny(y))&&y!=this.Me&&(y.O(e.wd).opacity=1)};l.prototype.Dga=function(y){(y=this.ny(y))&&y!=this.Me&&(y.O(e.wd).opacity=.5)};l.prototype.Bga=function(y){y=this.ny(y);this.iU(y)};l.prototype.Cga=function(y){(y=this.ny(y))&&y==this.Me&&(this.iU(null),this.CH(),(y=this.Yg.indexOf(y)!=-1)&&this.P.m(n.Mm),y&&this.P.m(n.Qsa))};l.prototype.ny=function(y){y=this.Yg.map(function(x){return x.getComponent(e.vd).M}).indexOf(y.source);
if(y==-1)return null;y=this.Yg[y];return this.r1a(y)?y:null};l.prototype.r1a=function(y){var x=this.P.get("anchorX"),z=this.P.get("anchorY");return this.Rfa===y&&(x>0||z>0)||this.$ha===y&&(x<1||z>0)||this.Yfa===y&&(x>0||z<1)||this.via===y&&(x<1||z<1)?!0:!1};l.prototype.iU=function(y){this.Me&&(this.Me.O(e.wd).opacity=.5,this.PL(this.Me).ja(e.hx));if(this.Me=y){this.Me.O(e.wd).opacity=1;var x=this.PL(this.Me).K(e.hx),z=b.getWorldPosition(this.A);y=b.getWorldPosition(y);y=(new THREE.Vector3).copy(y).sub(z);
var A=Math.min(y.length(),this.pv*10);z=(new THREE.Vector3).copy(z).add(d.copy(y).setLength(A));x.direction=y;x.min=z}};l.prototype.PL=function(y){return this.Yg.indexOf(y)!=-1?y:null};l.prototype.dispose=function(){k.da(this.P,v,this.CH);k.da(this.P,u,this.uh);k.da(this.P,w,this.Ry);var y=this.Tb.T;this.jy.forEach(function(x){y.dd(x)});this.P=this.Tb=this.Yg=this.A=this.jy=null};var u=["draggableLineColor","draggableLineOpacity","draggableLineWidth","draggableSphereColor","draggableSphereRadius"],
v="anchorX anchorY height sizeAttenuation x y z width".split(" "),w=["sizeDraggable"];return l});
define("tdv/player/view/webgl/system/model/object/SpriteController","require tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/Priority tdv/constants/RenderOrder tdv/events/EventDispatcher tdv/player/view/webgl/components tdv/player/view/webgl/system/model/object/draggable/DraggableSize2DControls tdv/player/view/webgl/system/util/entity/Util".split(" "),function(a){function l(x,z,A,D,E){this.Tb=x;this.qf=A;this.Jj=D;this.P=E;this.Ql=this.Ql.bind(this);this.$S=this.$S.bind(this);this.uh=
this.uh.bind(this);this.X1=this.X1.bind(this);this.Sy=this.Sy.bind(this);this.Mh=this.qf.Xv(1);this.Hua=new THREE.Vector3;this.a_=new THREE.Euler;this.P.get("preload")&&this.Jj.QN(this.Mh);this.A=this.Tb.T.rc("SpriteContainer");this.A.K(b.Group);x=this.A.K(b.pb);x.F=this.Tb;x.id=this.P.get("parentId");this.PU=this.Tb.T.rc("TranslationSpriteContainer");this.PU.K(b.Group);this.PU.K(b.pb).F=this.A;this.Av=this.Tb.T.rc("Sprite");this.Av.K(b.pb).F=this.PU;x=this.Av.K(b.Mi);x.properties=this.P;x.lw=this.P.get("image");
x.M=this.P;x.tp=this.Mh;x.isSprite=!0;x.priority=this.P.get("preload")?g.DF:g.csa;this.Av.K(b.vd).M=this.P;this.Av.K(b.lB);this.Av.K(b.fQ).object=this.P;this.Sfa=!1;this.pv=1E-4;this.Fy=this.A.T.rc("TranslationLine");this.Fy.K(b.Line);this.Fy.K(b.ci);this.pda=new c(this.Tb,this.PU,this.P);k.ba(this.P,y,this.Sy,!0);k.ba(this.P,t,this.Ql,!0);k.ba(this.P,v,this.$S,!0);k.ba(this.P,w,this.uh,!0);k.ba(this.P,u,this.X1,!0)}var k=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/constants/Priority"),
h=a("tdv/constants/RenderOrder"),e=a("tdv/events/EventDispatcher"),b=a("tdv/player/view/webgl/components"),c=a("tdv/player/view/webgl/system/model/object/draggable/DraggableSize2DControls"),d=a("tdv/player/view/webgl/system/util/entity/Util");l.prototype.frame=function(){this.pda.frame();this.Nia(d.cJ(this.A)||1E-4)};l.prototype.Ql=function(){this.A.K(b.pb).id!=this.P.get("parentId")&&(this.A.O(b.pb).id=this.P.get("parentId"));var x=this.A.O(b.sa,!0);x.translationX=this.P.get("x");x.translationY=
this.P.get("y");x.Xe=this.P.get("z")};l.prototype.Nia=function(x){this.pv!=x&&(this.pv=x,this.P.set("worldPixelScale",d.UJa(this.A)),this.$S())};l.prototype.$S=function(){var x=this.A.O(b.sa,!0),z=this.PU.O(b.sa,!0),A=this.Fy.O(b.sa,!0),D=this.P.get("translationLength");p.set(this.P.get("translationX"),this.P.get("translationY"),this.P.get("translationZ"));D=D!==void 0?D*this.pv:p.length();if(this.Hua.equals(p)){var E=this.a_.x;var B=this.a_.y;var C=this.a_.z}else f.setFromUnitVectors(q,p.normalize()),
B=Math.atan2(p.x,p.z),E=-Math.atan2(p.y,Math.sqrt(p.x*p.x+p.z*p.z)),C=0;z.translationX=0;z.translationX=0;z.translationY=0;z.Xe=D;A.scale=D;x.Wd=E*r;x.fd=B*r;x.Ve=C*r;x.jf="YXZ";this.aFa()};var f=new THREE.Quaternion,m=new THREE.Euler,p=new THREE.Vector3,q=new THREE.Vector3(0,0,1),r=180/Math.PI;l.prototype.uh=function(){var x=this.Av.O(b.vd,!0);x.bB=this.P.get("useHandCursor");x.SE=this.P.get("transparentAreaActive");x.kt=this.P.get("clickEnabled");x.Tt=this.P.get("rollOverEnabled");x=this.Fy.O(b.ci);
x.color=this.P.get("translationLineColor");x.depthTest=this.P.get("depthTest");x.opacity=this.P.get("hidden")?0:this.P.get("translationLineOpacity");x.transparent=!1;x.width=this.P.get("translationLineWidth");this.aFa();x=this.Fy.O(b.Line,!0);var z=this.Av.O(b.Sprite,!0);x.renderOrder=z.renderOrder=this.P.get("depthTest")?h.MTa:h.NTa};l.prototype.X1=function(){var x=this.Av.O(b.Sprite,!0);x.SN=this.P.get("anchorX");x.TN=this.P.get("anchorY");x.width=this.P.get("width");x.height=this.P.get("height");
x.scale=this.P.get("scale");x.sizeAttenuation=this.P.get("sizeAttenuation")};l.prototype.Sy=function(){if(this.P.get("positionDraggable")||this.P.get("translationDraggable")){var x=this.A.O(b.Fh,!0);x.M||(x.M=new e,x.M.bind(n.V,this.Bm,this,!0));x.translate=this.P.get("positionDraggable")||!1;x.rotate=this.P.get("translationDraggable")||!1;x.scale=!1}else(x=this.A.getComponent(b.Fh))&&x.M.h(n.V,this.Bm,this),this.A.ja(b.Fh)};l.prototype.Bm=function(x){var z=p.set(this.P.get("translationX"),this.P.get("translationY"),
this.P.get("translationZ")).length();m.setFromQuaternion(x.data.quaternion,this.A.getComponent(b.sa).jf);p.copy(q).setLength(z).applyQuaternion(x.data.quaternion);this.Hua.copy(p);this.a_.copy(m);this.P.set({x:x.data.position.x,y:x.data.position.y,z:x.data.position.z,translationX:p.x,translationY:p.y,translationZ:p.z});this.P.m(n.Mm)};l.prototype.aFa=function(){var x=this.P.get("translationLineVisible")&&this.P.get("translationLineOpacity")>0&&(this.P.get("translationX")!=0||this.P.get("translationY")!=
0||this.P.get("translationZ")!=0);this.Sfa!=x&&((this.Sfa=x)?this.Fy.K(b.pb).F=this.A:this.Fy.ja(b.pb))};l.prototype.dispose=function(){this.pda.dispose();this.pda=null;k.da(this.P,y,this.Sy);k.da(this.P,t,this.Ql);k.da(this.P,v,this.$S);k.da(this.P,w,this.uh);k.da(this.P,u,this.X1);this.qf.qP(this.Mh);this.Jj.qP(this.Mh);this.Mh=this.Jj=this.qf=null;var x=this.Tb.T;this.Tb=null;x.dd(this.Av);this.Av=null;x.dd(this.Fy);this.Fy=null;x.dd(this.A);this.P=this.A=null};var t=["parentId","x","y","z"],u=
"anchorX anchorY width height scale sizeAttenuation".split(" "),v=["translationX","translationY","translationZ","translationLength"],w="clickEnabled depthTest hidden rollOverEnabled transparentAreaActive translationLineColor translationLineOpacity translationLineVisible translationLineWidth useHandCursor".split(" "),y=["positionDraggable","translationDraggable"];return l});
define("tdv/player/view/webgl/system/model/object/ControllerFactory",["require","tdv/player/parser/ClassInfo","tdv/player/view/webgl/system/model/object/BoxController","tdv/player/view/webgl/system/model/object/SpriteController"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/view/webgl/system/model/object/BoxController"),n=a("tdv/player/view/webgl/system/model/object/SpriteController");return{create:function(g,h,e,b,c){return l.Qa("SpriteModel3DObject",c)?new n(g,h,e,b,c):l.Qa("BoxModel3DObject",
c)?new k(g,h,c):null}}});
define("tdv/player/view/webgl/system/model/Objects",["require","tdv/binding/BindingsHandler","tdv/player/view/util/LoadingGroup","tdv/player/view/webgl/components","tdv/player/view/webgl/system/model/object/ControllerFactory"],function(a){function l(e,b,c,d){this.A=e;this.bq=b;this.qf=c;this.Jj=d;this.hza=new n(this.Jj.Xv(.1));this.gza=new n(this.qf.Xv(.1));this.DH=this.DH.bind(this);this.Lz=e.T;this.B=this.A.getComponent(g.Ni).properties;this.La=(e=this.A.getComponent(g.Object3D))&&e.ra;this.gl=
[];this.B1=new Map;k.ba(this.B,["objects.enabled"],this.DH,!0)}var k=a("tdv/binding/BindingsHandler"),n=a("tdv/player/view/util/LoadingGroup"),g=a("tdv/player/view/webgl/components"),h=a("tdv/player/view/webgl/system/model/object/ControllerFactory");l.prototype.update=function(){var e=this.A.getComponent(g.Object3D);e=e&&e.ra;if(this.La!==e){var b=this.La;this.La=e;this.E4(!!b)}};l.prototype.frame=function(){this.B1.forEach(function(e){e&&e.frame&&e.frame()})};l.prototype.dispose=function(){this.La=
null;k.da(this.B,["objects.enabled"],this.DH);this.jDa([])};l.prototype.DH=function(){this.E4()};l.prototype.E4=function(e){var b=this.B.get("objects").filter(function(c){return c.get("enabled")});this.jDa(b,e);this.hza.update();this.gza.update()};l.prototype.jDa=function(e,b){if(this.gl!=e||b)this.gl.forEach(function(c){(b||e.indexOf(c)<0)&&this.D4a(c)}.bind(this)),e.forEach(function(c){(b||this.gl.indexOf(c)<0)&&this.cVa(c)}.bind(this)),this.gl=e};l.prototype.cVa=function(e){this.B1.set(e,h.create(this.A,
this.bq,this.gza,this.hza,e))};l.prototype.D4a=function(e){var b=this.B1.get(e);b&&b.dispose();this.B1["delete"](e)};return l});
define("tdv/player/view/webgl/system/model/Properties",["require","tdv/constants/EventName","tdv/player/view/webgl/components"],function(a){function l(e,b){this.A=e;this.bq=b;this.ni=this.La=this.B=null;this.Nj(this.A.getComponent(n.Ni).properties);this.update()}var k=a("tdv/constants/EventName"),n=a("tdv/player/view/webgl/components");l.prototype.frame=function(){this.update()};l.prototype.update=function(){var e=this.bq.getComponent(n.Object3D);e=e&&e.ra;this.La!=e&&(this.La=e,this.bG())};l.prototype.Nj=
function(e){this.B&&g.forEach(function(b){this.B.h(k.N(b),this.bG,this,!1)}.bind(this));if(this.B=e)g.forEach(function(b){this.B.bind(k.N(b),this.bG,this,!1)}.bind(this)),this.bG()};l.prototype.bG=function(){this.iDa(this.B.get("model"));this.La&&this.A.T.Za()};l.prototype.iDa=function(e){this.ni!=e&&(this.ni&&h.forEach(function(b){this.ni.h(k.N(b),this.Fba,this,!1)}.bind(this)),this.ni=e)&&(h.forEach(function(b){this.ni.bind(k.N(b),this.Fba,this,!1)}.bind(this)),this.Fba())};l.prototype.Fba=function(){var e=
this.bq.O(n.sa,!0);e.positionX=this.ni.get("positionX");e.positionY=this.ni.get("positionY");e.positionZ=this.ni.get("positionZ");e.jf=this.ni.get("rotationOrder");e.Wd=this.ni.get("rotationX");e.fd=this.ni.get("rotationY");e.Ve=this.ni.get("rotationZ");e.scale=this.ni.get("scale");e.Ge=this.ni.get("invertX")?-1:1;e.We=this.ni.get("invertY")?-1:1;e.Dh=this.ni.get("invertZ")?-1:1;e.translationX=this.ni.get("translationX");e.translationY=this.ni.get("translationY");e.Xe=this.ni.get("translationZ")};
l.prototype.dispose=function(){this.La=null;this.iDa(null);this.Nj(null)};var g=["model"],h="invertX invertY invertZ positionX positionY positionZ rotationOrder rotationX rotationY rotationZ scale translationX translationY translationZ".split(" ");return l});
define("tdv/player/view/webgl/system/model/Behaviour","require tdv/constants/EventName tdv/events/Event tdv/player/view/util/LoadingGroup tdv/player/view/webgl/components tdv/player/view/webgl/system/model/Loader tdv/player/view/webgl/system/model/Objects tdv/player/view/webgl/system/model/Properties".split(" "),function(a){function l(d){this.A=d;this.A.K(h.Group);d=this.A.getComponent(h.Ni);this.bq=d.NI;this.Jj=new g(d.HNa);this.qf=new g(d.tp);this.Ae=d.M;this.pd=new e(this.A,this.bq,this.qf,this.Jj);
this.gl=new b(this.A,this.bq,this.qf,this.Jj);this.B=new c(this.A,this.bq)}var k=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/player/view/util/LoadingGroup"),h=a("tdv/player/view/webgl/components"),e=a("tdv/player/view/webgl/system/model/Loader"),b=a("tdv/player/view/webgl/system/model/Objects"),c=a("tdv/player/view/webgl/system/model/Properties");l.prototype.update=function(){this.pd.update();this.gl.update();this.B.update()};l.prototype.frame=function(){this.pd.frame();this.gl.frame();
this.B.frame();this.Ae.m(new n(k.me))};l.prototype.dispose=function(){this.pd&&(this.pd.dispose(),this.pd=null);this.gl&&(this.gl.dispose(),this.gl=null);this.B&&(this.B.dispose(),this.B=null);this.qf&&(this.qf.dispose(),this.qf=null);this.Ae=this.bq=null};l.Va=function(d){d.K(h.qx).manager=new l(d)};l.xa=function(d){var f=d.getComponent(h.qx);f.manager.dispose();f.manager=null;d.ja(h.qx)};l.update=function(d){d.getComponent(h.qx).manager.update()};l.frame=function(d){d.getComponent(h.qx).manager.frame()};
return l});
define("tdv/player/view/webgl/system/model/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/model/Behaviour"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/model/Behaviour");a=l.extend(k,function(){k.apply(this,arguments)});a.prototype.Yc=function(){this.JLa.v.length&&this.JLa.v.slice().forEach(g.Va);this.v7.Da.length&&this.v7.Da.slice().forEach(g.update);
this.v7.v.length&&this.v7.v.slice().forEach(g.frame);this.KLa.v.length&&this.KLa.v.slice().forEach(g.xa)};a.J={};a.J.JLa=[n.Ni,n.qx.aa];a.J.v7=[n.Ni,n.qx];a.J.KLa=[n.Ni.aa,n.qx];return a});
define("tdv/player/view/webgl/system/objectId/Behaviour",["require","tdv/player/view/webgl/components","tdv/player/view/webgl/system/util/entity/Util"],function(a){function l(g){this.A=g;this.De=null}var k=a("tdv/player/view/webgl/components"),n=a("tdv/player/view/webgl/system/util/entity/Util");l.prototype.frame=function(){if(!this.De){var g=this.A.getComponent(k.LK),h=n.Sc(g.container);if(this.De=h&&g.id&&n.MD(h,g.id)||null)this.A.K(k.Object3D).ra=this.De,this.A.T.Za()}};l.prototype.update=function(){this.De&&
(this.A.ja(k.Object3D),this.De=null)};l.prototype.dispose=function(){this.De&&(this.A.ja(k.Object3D),this.De=null)};l.Va=function(g){g.K(k.sx).manager=new l(g)};l.xa=function(g){var h=g.getComponent(k.sx);h.manager.dispose();h.manager=null;g.ja(k.sx)};l.frame=function(g){g.getComponent(k.sx).manager.frame()};l.update=function(g){g.getComponent(k.sx).manager.update()};return l});
define("tdv/player/view/webgl/system/objectId/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/objectId/Behaviour"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/objectId/Behaviour");a=l.extend(k,function(){k.apply(this,arguments)});a.prototype.Yc=function(){this.dMa.v.length&&this.dMa.v.slice().forEach(g.Va);this.B7.Da.length&&
this.B7.Da.slice().forEach(g.update);this.B7.v.length&&this.B7.v.slice().forEach(g.frame);this.eMa.v.length&&this.eMa.v.slice().forEach(g.xa)};a.J={};a.J.dMa=[n.LK,n.sx.aa];a.J.B7=[n.LK,n.sx];a.J.eMa=[n.LK.aa,n.sx];return a});
define("tdv/player/view/webgl/system/plane/System","require exports three.mod tdv/player/view/webgl/ecs/System tdv/player/view/webgl/components tdv/player/view/webgl/system/util/material/Util".split(" "),function(a,l,k,n,g,h){a=function(e){function b(){var c=e.call(this)||this;c.xb=c.xb.bind(c);c.ib=c.ib.bind(c);c.Ca=c.Ca.bind(c);return c}O(b,e);b.prototype.Yc=function(){this.tE.v.length&&this.tE.v.slice().forEach(this.xb);this.planes.Da.length&&this.planes.Da.slice().forEach(this.ib);this.uNa.v.length&&
this.uNa.v.slice().forEach(this.Ca);this.vNa.v.length&&this.vNa.v.slice().forEach(this.Ca)};b.prototype.xb=function(c){var d=new k.PlaneGeometry;c.K(g.FB).geometry=d;c.K(g.Object3D).ra=new k.Mesh(d);this.ib(c)};b.prototype.ib=function(c){var d=c.K(g.Object3D).ra,f=c.getComponent(g.Material).material;f&&h.AD(d,f);d.renderOrder=c.getComponent(g.Plane).renderOrder};b.prototype.Ca=function(c){var d=c.getComponent(g.FB);d.geometry.dispose();d.geometry=null;c.ja(g.FB);c.ja(g.Object3D)};b.J={};return b}(n);
a.J={};a.J.tE=[g.Material,g.Plane,g.FB.aa];a.J.planes=[g.Plane,g.Material,g.FB];a.J.uNa=[g.Plane.aa,g.FB];a.J.vNa=[g.Material.aa,g.FB];return a});
define("tdv/player/view/webgl/system/parent/Behaviour",["require","tdv/player/view/webgl/components","tdv/player/view/webgl/system/util/entity/Util"],function(a){var l=a("tdv/player/view/webgl/components"),k=a("tdv/player/view/webgl/system/util/entity/Util");return{Va:function(n){var g=n.getComponent(l.pb),h=k.Sc(g.F);if(h){var e=n.K(l.wu);e.parent=h;g.id&&(h=h&&k.MD(h,g.id));e.id=g.id;e.ce=k.Sc(n);e.attach=g.attach;h&&e.ce&&(e.attach?h.attach(e.ce):h.add(e.ce))}},update:function(n){var g=n.getComponent(l.pb),
h=n.getComponent(l.wu),e=k.Sc(g.F),b=k.Sc(n);if(h.parent!=e||h.ce!=b||g.id!=h.id||g.attach!=h.attach||b&&e&&!b.parent)h=n.O(l.wu),h.ce&&h.ce.parent&&(g.F.O(l.Object3D),h.ce.parent.remove(h.ce)),h.parent=e,g.id&&(e=e&&k.MD(e,g.id)),h.id=g.id,h.ce=b,h.attach=g.attach,e&&h.ce&&(h.attach?e.attach(h.ce):e.add(h.ce),(g=n.getComponent(l.sa))&&k.aY(n,g))},xa:function(n){var g=n.getComponent(l.wu);g.ce&&g.ce.parent&&g.ce.parent.remove(g.ce);g.parent=null;g.ce=null;g.id=void 0;n.ja(l.wu)}}});
define("tdv/player/view/webgl/system/parent/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/parent/Behaviour"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/parent/Behaviour");a=l.extend(k,function(){k.apply(this,arguments)});a.prototype.Yc=function(){this.cX.v.length&&this.cX.v.slice().forEach(g.Va);this.Gt.v.length&&
this.Gt.v.slice().forEach(g.update);this.Gt.Da.length&&this.Gt.Da.slice().forEach(g.update);this.Gt.be.length&&this.Gt.be.slice().forEach(g.update);this.fHa.v.length&&this.fHa.v.slice().forEach(g.xa);this.gHa.v.length&&this.gHa.v.slice().forEach(g.xa)};a.J={};a.J.cX=[n.Object3D,n.pb,n.wu.aa];a.J.Gt=[n.Object3D,n.pb,n.wu];a.J.fHa=[n.Object3D.aa,n.pb,n.wu];a.J.gHa=[n.pb.aa,n.wu];return a});
define("tdv/player/view/webgl/system/pixelScaleTransform/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/util/entity/Util"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/util/entity/Util");a=l.extend(k,function(){k.apply(this,arguments);this.xb=this.xb.bind(this);this.Ca=this.Ca.bind(this);this.bg=this.bg.bind(this)});
a.prototype.Yc=function(){this.rNa.v.length&&this.rNa.v.slice().forEach(this.xb);this.qNa.v.length&&this.qNa.v.slice().forEach(this.bg);this.sNa.v.length&&this.sNa.v.slice().forEach(this.Ca);this.tNa.v.length&&this.tNa.v.slice().forEach(this.Ca)};a.prototype.xb=function(b){b.K(n.JF)};a.prototype.Ca=function(b){b.ja(n.JF)};var h=new THREE.Matrix4,e=new THREE.Vector3;a.prototype.bg=function(b){var c=b.getComponent(n.Uk),d=b.getComponent(n.sa);if(d){var f=b.getComponent(n.Object3D).ra;if(f&&f.parent){var m=
b.getComponent(n.Eg),p=1E-7;m&&(p=g.cJ(b)||p);h.copy(f.parent.matrixWorld).invert();e.setFromMatrixScale(h);f=Math.max(e.x,e.y,e.z);m&&m.Mz&&(p/=f,f=1);m=c.scale*f;c.bE!==void 0&&(m=Math.min(c.bE*p,m));c.cE!==void 0&&(m=Math.max(c.cE*p,m));if(d.scale!=m||d.Ge!=c.Ge||d.We!=c.We||d.Dh!=c.Dh)d=b.O(n.sa),d.scale=m,d.Ge=c.Ge,d.We=c.We,d.Dh=c.Dh}}};a.J={};a.J.rNa=[n.Object3D,n.Uk,n.JF.aa];a.J.qNa=[n.Object3D,n.Uk,n.JF];a.J.sNa=[n.Object3D.aa,n.JF];a.J.tNa=[n.Uk.aa,n.JF];return a});
define("tdv/player/view/webgl/system/pointerOverTransform/Behaviour",["require","tdv/constants/EventName","tdv/player/view/webgl/components","tdv/player/view/webgl/system/util/entity/Util"],function(a){function l(u){this.A=u;this.ES=new THREE.Vector3;this.Rb=new THREE.Vector3;this.ffa=this.Ad=this.Fja=!1;this.OM=null;this.update()}var k=a("tdv/constants/EventName"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/util/entity/Util");l.prototype.update=function(){this.fha=this.A.getComponent(n.Cl).F};
l.prototype.frame=function(){this.iFa();this.Kz()};l.prototype.iFa=function(){var u=(t.get(this.A.T)||[]).map(function(v){return v.getComponent(n.yc)}).filter(function(v){return v&&v.M}).reduce(function(v,w){return!v||!v.Sg&&w.Sg?w:v},null);u=u&&u.M;this.OM!==u&&(this.OM&&this.H4a(this.OM),(this.OM=u)&&this.hVa(this.OM))};l.prototype.hVa=function(u){u.bind(k.fb,this.rg,this,!0);u.bind(k.Eb,this.Bs,this,!0)};l.prototype.H4a=function(u){u.h(k.fb,this.rg,this);u.h(k.Eb,this.Bs,this)};l.prototype.rg=
function(u){if(this.fha&&g.MD(g.Sc(this.fha),u.data.objectId)&&["mesh","gs"].includes(u.data.type)){var v=this.Ad;this.Ad=!0;var w=g.Sc(this.A);if((w=w&&w.parent)&&w.matrixWorld){var y=this.A.getComponent(n.Cl);y&&(e.setFromMatrixPosition(w.matrixWorld),b.copy(w.matrixWorld).invert(),c.fromArray(u.data.objectMatrixWorld),h.setFromMatrixPosition(c),d.copy(c).invert(),y.rotate?u.data.normal?this.ES.copy(u.data.normal).applyMatrix4(c).sub(h).add(e):this.ES.copy(u.data.cameraPosition):this.ES.copy(p),
this.ES.applyMatrix4(b).normalize(),this.Rb.copy(u.data.position).applyMatrix4(b),this.Fja=!0,this.A.T.Za(),v||(u=(y=this.A.getComponent(n.Cl))&&y.M)&&u.m(k.tc))}}else this.Bs()};var h=new THREE.Vector3,e=new THREE.Vector3,b=new THREE.Matrix4,c=new THREE.Matrix4,d=new THREE.Matrix4;l.prototype.Bs=function(){if(this.Ad){this.Ad=!1;this.A.T.Za();var u=this.A.getComponent(n.Cl);(u=u&&u.M)&&u.m(k.Eb)}};l.prototype.Kz=function(){if(this.Fja||this.Ad){this.Fja=!1;var u=this.A.O(n.sa,!0);u.positionX=0;u.positionY=
0;u.positionZ=0;f.setFromUnitVectors(m,this.ES);q.setFromQuaternion(f,u.jf);u.Wd=q.x*r;u.fd=q.y*r;u.Ve=q.z*r;u.translationX=this.Rb.x;u.translationY=this.Rb.y;u.Xe=this.Rb.z;u.easing=this.ffa?.4:0;this.ffa||(g.aY(this.A,u),this.ffa=!0)}};var f=new THREE.Quaternion,m=new THREE.Vector3(0,0,1),p=new THREE.Vector3(0,1,0),q=new THREE.Euler,r=180/Math.PI;l.prototype.dispose=function(){this.fha=null;this.iFa()};l.XJ=function(u,v){t.set(u,v)};var t=new Map;l.Va=function(u){u.K(n.xu).manager=new l(u)};l.xa=
function(u){var v=u.getComponent(n.xu);v.manager.dispose();v.manager=null;u.ja(n.xu)};l.frame=function(u){u.getComponent(n.xu).manager.frame()};l.update=function(u){u.getComponent(n.xu).manager.update()};return l});
define("tdv/player/view/webgl/system/pointerOverTransform/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/pointerOverTransform/Behaviour"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/pointerOverTransform/Behaviour");a=l.extend(k,function(){k.apply(this,arguments)});a.prototype.Yc=function(){g.XJ(this.T,this.Xj.v.slice());
this.yNa.v.length&&this.yNa.v.slice().forEach(g.Va);this.q8.Da.length&&this.q8.v.slice().forEach(g.update);this.q8.v.length&&this.q8.v.slice().forEach(g.frame);this.zNa.v.length&&this.zNa.v.slice().forEach(g.xa);this.ANa.v.length&&this.ANa.v.slice().forEach(g.xa)};a.J={};a.J.Xj=[n.yc];a.J.yNa=[n.Object3D,n.Cl,n.xu.aa];a.J.q8=[n.Object3D,n.Cl,n.xu];a.J.zNa=[n.Object3D.aa,n.xu];a.J.ANa=[n.Cl.aa,n.xu];return a});
define("tdv/player/view/webgl/system/util/material/ProjectedMaterial",["require"],function(){var a={Jp:function(){this.yjb=this.PPa=this.xjb=this.o9=this.n9=this.m9=0;this.lqa=!1;this.mY=new THREE.CubeTexture;this.Vjb=this.lQa=this.Ujb=this.z9=this.targetY=this.targetX=this.l9=0;this.tqa=!1;this.uY=new THREE.CubeTexture;this.y9=0;this.jf="XYZ"},bnb:function(){return new a.Jp},create:function(n){var g=new THREE.ShaderMaterial;g.uniforms={sCube:{value:n.mY},sPos:{value:new THREE.Vector3},sRot:{value:new THREE.Matrix4},
sEnabled:{value:!1},sCoef:{value:0},tCube:{value:n.uY},tPos:{value:new THREE.Vector3},tRot:{value:new THREE.Matrix4},tEnabled:{value:!1},tCoef:{value:0}};g.fragmentShader="uniform samplerCube sCube;\nuniform vec3 sPos;\nuniform mat4 sRot;\nuniform bool sEnabled;\nuniform float sCoef;\nuniform samplerCube tCube;\nuniform vec3 tPos;\nuniform mat4 tRot;\nuniform bool tEnabled;\nuniform float tCoef;\nvarying vec3 vWorldPosition;\nvoid main() {\n    vec4 sFragColor;\n    vec4 tFragColor;\n    if (sEnabled) \n    {\n        vec4 sCubePosition4 = sRot * vec4((vWorldPosition - sPos), 1);\n        vec3 sCubePosition = sCubePosition4.xyz / sCubePosition4.w;\n        sFragColor = textureCube(sCube, sCubePosition);\n    }\n    if (tEnabled)\n    {\n        vec4 tCubePosition4 = tRot * vec4((vWorldPosition - tPos), 1);\n        vec3 tCubePosition = tCubePosition4.xyz / tCubePosition4.w;\n        tFragColor = textureCube(tCube, tCubePosition);\n    }\n    if (sEnabled && tEnabled)\n    {\n        float alpha = 1.0 - ((1.0 - tCoef) * (1.0 - sCoef));\n        vec4 mixedColor = mix(sFragColor, tFragColor, tCoef);\n        gl_FragColor = vec4(mixedColor.rgb, mixedColor.a * alpha);\n    }\n    else if (sEnabled)\n    {\n        gl_FragColor = vec4(sFragColor.rgb, sFragColor.a * sCoef);\n    }\n    else if (tEnabled)\n    {\n        gl_FragColor = vec4(tFragColor.rgb, tFragColor.a * tCoef);\n    }\n    else\n    {\n        gl_FragColor = vec4(0, 0, 0, 0);\n    }\n#include <tonemapping_fragment>\n#include <colorspace_fragment>\n}";
g.vertexShader="varying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvWorldPosition = (modelMatrix * vec4(position, 1.0)).xyz;\n   gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}";g.side=THREE.DoubleSide;g.depthWrite=!0;g.transparent=!0;g.needsUpdate=!0;this.update(g,n);return g},update:function(n,g){n.uniforms.sCube.value=g.mY;n.uniforms.sPos.value.set(g.m9,g.n9,g.o9);n.uniforms.sRot.value.makeRotationFromEuler(l.set(g.xjb*k,g.PPa*k,g.yjb*k,g.jf));n.uniforms.sEnabled.value=
g.lqa&&g.l9>0;n.uniforms.sCoef.value=g.l9;n.uniforms.tCube.value=g.uY;n.uniforms.tPos.value.set(g.targetX,g.targetY,g.z9);n.uniforms.tRot.value.makeRotationFromEuler(l.set(g.Ujb*k,g.lQa*k,g.Vjb*k,g.jf));n.uniforms.tEnabled.value=g.tqa&&g.y9>0;n.uniforms.tCoef.value=g.y9;n.needsUpdate=!0;return n}},l=new THREE.Euler,k=Math.PI/180;return a});
define("tdv/player/view/webgl/system/projectedMaterial/System","require tdv/utils tdv/constants/RenderOrder tdv/player/view/util/geo/Fov tdv/player/view/webgl/ecs/System tdv/player/view/webgl/components tdv/player/view/webgl/system/util/material/ProjectedMaterial tdv/player/view/webgl/system/util/entity/Util".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/RenderOrder");a("tdv/player/view/util/geo/Fov");var n=a("tdv/player/view/webgl/ecs/System"),g=a("tdv/player/view/webgl/components"),
h=a("tdv/player/view/webgl/system/util/material/ProjectedMaterial"),e=a("tdv/player/view/webgl/system/util/entity/Util");a=l.extend(n,function(){n.apply(this,arguments);this.xb=this.xb.bind(this);this.Ca=this.Ca.bind(this);this.ib=this.ib.bind(this)});a.prototype.Yc=function(){this.PNa.v.length&&this.PNa.v.slice().forEach(this.Ca);this.QNa.v.length&&this.QNa.v.slice().forEach(this.Ca);this.ONa.v.length&&this.ONa.v.slice().forEach(this.xb);this.NNa.Da.length&&this.NNa.Da.slice().forEach(this.ib)};
a.prototype.xb=function(c){var d=c.getComponent(g.mo),f=(d=d&&d.OE)&&e.Sc(d),m=e.Qf(d);if(f&&m){var p=c.K(g.Nr);p.OE=d;p.XO=new h.Jp;p.material=this.Wx(p.XO);p.ra=this.lXa(f,p.material);p.DP=this.AXa(p.material);p.xA=this.hYa(p.material);p.colorSpace=e.oW(m);c.K(g.Object3D).ra=p.ra;this.ib(c)}};a.prototype.ib=function(c){this.Qj(c);this.x9a(c);this.w9a(c);this.c9a(c)};a.prototype.Ca=function(c){var d=c.getComponent(g.Nr),f=e.Sc(d.OE);f&&(f.visible=!0);d.ra&&d.ra.traverse(function(m){m.material==d.material&&
(m.material=b)});d.DP&&((f=d.DP.parent)&&e.aOa(f,d.DP),d.DP=null);d.xA&&((f=d.xA.parent)&&e.$Na(f,d.xA),d.xA=null);d.material&&(d.XO.mY=null,d.XO.uY=null,d.XO=null,d.material.dispose(),d.material=null);c.ja(g.Nr);c.ja(g.Object3D)};a.prototype.Qj=function(c){var d=c.getComponent(g.mo);c=c.getComponent(g.Nr);var f=c.XO;d.lY?(f.mY!=d.lY&&(f.mY=d.lY),f.m9=d.m9,f.n9=d.n9,f.o9=d.o9,f.PPa=d.nY,f.l9=d.NPa,f.lqa=!0):(f.lqa=!1,f.l9=0);d.tY?(f.uY!=d.tY&&(f.uY=d.tY),f.targetX=d.targetX,f.targetY=d.targetY,f.z9=
d.z9,f.lQa=d.Wjb,f.y9=d.jQa,f.tqa=!0):(f.tqa=!1,f.y9=0);h.update(c.material,f)};a.prototype.x9a=function(c){c=c.getComponent(g.mo);var d=e.Sc(c.OE);d&&(d.visible=(1-(c.lY?c.NPa:0))*(1-(c.tY?c.jQa:0))>0)};a.prototype.w9a=function(c){var d=c.getComponent(g.mo),f=c.getComponent(g.Nr).DP;!!f.parent!=d.LPa&&(c=(c=e.Qf(c)||e.Qf(d.OE))&&e.jw(c),d.LPa?c&&e.g$a(c,f):c&&e.aOa(c,f))};a.prototype.c9a=function(c){var d=c.getComponent(g.mo),f=c.getComponent(g.Nr).xA;!!f.parent!=d.xA&&(c=(c=e.Qf(c)||e.Qf(d.OE))&&
e.jw(c),d.xA?c&&e.f$a(c,f):e.$Na(c,f))};var b=new THREE.MeshBasicMaterial;a.prototype.Wx=function(c){c=h.create(c);c.polygonOffset=!0;c.polygonOffsetUnits=1;c.polygonOffsetFactor=-10;c.needsUpdate=!0;return c};a.prototype.lXa=function(c,d){if(this.owa(c))return new THREE.Object3D;var f=new Map;c.traverse(function(t){if(t.material&&t.userData){var u={};t.material&&(u.material=t.material,t.material=d);t.userData&&(u.userData=t.userData,t.userData={});var v=t.children.filter(function(w){return!this.owa(w)}.bind(this));
t.children.length!=v.length&&(u.children=t.children,t.children=v);f.set(t,u)}}.bind(this));var m=c.clone();f.forEach(function(t,u){t.material&&(u.material=t.material);t.userData&&(u.userData=t.userData);t.children&&(u.children=t.children)});for(c=[[c,m]];c.length;){var p=c.shift(),q=p[0];p=p[1];q.He&&(p.He=q.He);for(var r=0;r<q.children.length;r++)c.push([q.children[r],p.children[r]])}return m};a.prototype.owa=function(c){return c.ow||c.isGaussianCloud};a.prototype.AXa=function(c){return new THREE.Mesh(new THREE.BoxGeometry(2,
2,2),c)};a.prototype.hYa=function(c){c=new THREE.Mesh(new THREE.PlaneGeometry(1,1),c);c.renderOrder=k.DTa;return c};a.J={};a.J.ONa=[g.mo,g.Nr.aa];a.J.NNa=[g.mo,g.Object3D,g.Nr];a.J.PNa=[g.mo.aa,g.Nr];a.J.QNa=[g.Object3D.aa,g.Nr];return a});
define("tdv/player/view/webgl/system/renderer/effect/AmbientOcclusion",["require","tdv/player/view/webgl/components","tdv/view/util/Ease","tdv/view/util/EaseDimension"],function(a){function l(h){this.A=h;this.enabled=!1;this.Fo=null;this.iy=0;this.passes=[];this.Am=this.Cm=!1;this.Jf=null;this.Ha=this.Pa=100}var k=a("tdv/player/view/webgl/components"),n=a("tdv/view/util/Ease"),g=a("tdv/view/util/EaseDimension");l.prototype.dispose=function(){this.Jf&&(this.Jf.saoRenderTarget.dispose(),this.Jf.blurIntermediateRenderTarget.dispose(),
this.Jf.beautyRenderTarget.dispose(),this.Jf.normalRenderTarget.dispose(),this.Jf.depthRenderTarget.dispose(),this.Jf.depthMaterial.dispose(),this.Jf.normalMaterial.dispose(),this.Jf.saoMaterial.dispose(),this.Jf.vBlurMaterial.dispose(),this.Jf.hBlurMaterial.dispose(),this.Jf.materialCopy.dispose(),this.Jf.depthCopy.dispose(),this.Jf=null)};l.prototype.update=function(h,e,b,c,d){var f=this.A.getComponent(k.rK),m=!!f;if(this.Cm=this.enabled!=m)(this.enabled=m)?(!this.Jf&&h&&e&&(this.Jf=new THREE.SAOPass(h,
e,!1,!0)),this.Fo=new n("linear",[new g("alpha",0,1,void 0)],f.iIa),this.iy=0,this.passes=[this.Jf],this.Am=!0):(this.passes=[],this.Am=!1);this.enabled&&(this.Fo&&(this.Fo.Lb(d),this.iy=this.Fo.nb("alpha"),this.iy==1&&(this.Fo=null),this.A.T.Za()),f.output!==null&&(this.Jf.params.output=f.output),this.Jf.params.saoBias=f.bias/f.scale,this.Jf.params.saoIntensity=this.iy*f.intensity,this.Jf.params.saoScale=f.scale,this.Jf.params.saoKernelRadius=f.dLa,this.Jf.params.saoMinResolution=f.FLa/1E3,this.Jf.params.saoBlur=
f.tla>0,this.Jf.params.saoBlurRadius=f.tla,this.Jf.params.saoBlurStdDev=8,this.Jf.params.saoBlurDepthCutoff=.01,(this.Pa!=b||this.Ha!=c)&&this.Jf.setSize(this.Pa=b,this.Ha=c))};return l});
define("tdv/player/view/webgl/system/renderer/effect/Antialias",["require","tdv/player/view/webgl/components"],function(a){function l(n){this.A=n;this.enabled=!1;this.passes=[];this.Am=this.Cm=!1;this.Fu=null}var k=a("tdv/player/view/webgl/components");l.prototype.dispose=function(){this.Fu&&(this.Fu.material.dispose(),this.Fu=null)};l.prototype.update=function(n,g,h,e){n=this.A.getComponent(k.bF);n=!!n&&n.QIa;if(this.Cm=this.enabled!=n)(this.enabled=n)?(this.Fu||(this.Fu=new THREE.ShaderPass(THREE.FXAAShader),
this.Fu.needsSwap=!0),this.passes=[this.Fu],this.Am=!0):(this.passes=[],this.Am=!1);!this.enabled||this.Pa==h&&this.Ha==e||(this.Pa=h,this.Ha=e,this.Fu.material.uniforms.resolution.value.x=1/this.Pa,this.Fu.material.uniforms.resolution.value.y=1/this.Ha,this.Fu.setSize(h,e))};return l});
define("tdv/player/view/webgl/system/renderer/effect/MotionBlur",["require","tdv/player/view/webgl/components"],function(a){function l(n){this.A=n;this.enabled=!1;this.tP=void 0;this.Fo=null;this.iy=0;this.passes=[];this.Am=this.Cm=!1;this.Xi=null;this.Nha=new THREE.Matrix4;this.Qha=new THREE.Matrix4;this.Mha=new THREE.Vector3}var k=a("tdv/player/view/webgl/components");l.prototype.dispose=function(){this.Xi&&(this.Xi.dispose(),this.Xi=null)};l.prototype.update=function(n,g){var h=this.A.getComponent(k.iQ),
e=!!h,b=h?h.pOa:void 0;if(this.Cm=this.enabled!=e||this.tP!=b)(this.enabled=e)?(this.tP!=b&&this.Xi&&(this.Xi.dispose(),this.Xi=null),!this.Xi&&n&&g&&(this.Xi=new THREE.MotionBlurPass(this.tP=b),this.Xi.needsSwap=!0,this.Nha.copy(g.matrixWorldInverse),this.Qha.copy(g.projectionMatrix),this.Mha.copy(g.position)),this.passes=[this.Xi],this.Am=!0):(this.passes=[],this.Am=!1);this.enabled&&(this.Xi.uniforms.inverseProjectionMatrix.value.copy(g.projectionMatrix).invert(),this.Xi.uniforms.near.value=g.near,
this.Xi.uniforms.far.value=g.far,this.Xi.uniforms.depthLimit.value=.99,this.Xi.uniforms.clipToWorldMatrix.value.copy(g.matrixWorld).multiply(this.Xi.uniforms.inverseProjectionMatrix.value),this.Xi.uniforms.previousWorldToClipMatrix.value.copy(this.Qha).multiply(this.Nha),this.Xi.uniforms.cameraMove.value.copy(g.position).sub(this.Mha),this.Xi.uniforms.velocityFactor.value=h.intensity);this.Nha.copy(g.matrixWorldInverse);this.Qha.copy(g.projectionMatrix);this.Mha.copy(g.position)};return l});
define("tdv/player/view/webgl/system/renderer/effect/Rendering",["require","tdv/player/view/util/Color","tdv/player/view/webgl/components"],function(a){function l(n){this.A=n;this.enabled=!0;this.passes=[];this.ioa=this.Am=this.Cm=!1;this.S3=void 0;this.Ri=this.Ps=this.hm=null}a("tdv/player/view/util/Color");var k=a("tdv/player/view/webgl/components");l.prototype.dispose=function(){this.hm&&(this.hm.dispose(),this.hm=null);this.Ps&&(this.Ps=null);this.Ri&&(this.Ri.material.dispose(),this.Ri=null)};
l.prototype.update=function(n,g,h,e,b,c){b=this.A.getComponent(k.bF);c=!!b&&b.$Pa&&c;if(this.Cm=this.S3!==c)(this.S3=c)?(this.hm||(this.hm=new THREE.SSAARenderPass(n,g),this.hm.sampleLevel=b.oY,this.hm.needsSwap=!0,this.hm.clear=!0,this.hm.clearColor=65793,this.hm.clearAlpha=0),this.Ri||(this.Ri=new THREE.ShaderPass(THREE.CopyShader),this.Ri.needsSwap=!0),this.passes=[this.hm,this.Ri],this.ioa=this.Am=!0):(this.Ps||(this.Ps=new THREE.RenderPass,this.Ps.clear=!0,this.Ps.clearColor=65793,this.Ps.clearAlpha=
0),this.passes=[this.Ps],this.ioa=this.Am=!1);this.S3?(this.hm.scene=n,this.hm.camera=g,this.hm.sampleLevel=b.oY,this.Ri.uniforms.opacity.value=Math.pow(2,Math.round(b.oY>5?5:b.oY)),this.hm.setSize(h,e)):(this.Ps.scene=n,this.Ps.camera=g,this.Ps.setSize(h,e))};return l});
define("tdv/player/view/webgl/system/renderer/effect/Vignette",["require","tdv/player/view/util/Color","tdv/player/view/webgl/components"],function(a){function l(h){this.A=h;this.enabled=!1;this.passes=[];this.Am=this.Cm=!1;this.ht=null;this.Ie=void 0}var k=a("tdv/player/view/util/Color"),n=a("tdv/player/view/webgl/components");l.prototype.dispose=function(){this.ht&&(this.ht.material.dispose(),this.ht=null)};l.prototype.update=function(){var h=this.A.getComponent(n.RK),e=!!h;if(this.Cm=this.enabled!=
e)(this.enabled=e)?(this.ht||(this.ht=new THREE.ShaderPass(g),this.ht.needsSwap=!0),this.passes=[this.ht],this.Am=!0):(this.passes=[],this.Am=!1);this.enabled&&(this.ht.uniforms.innerRadius.value=h.EKa,this.ht.uniforms.outerRadius.value=h.hNa,this.ht.uniforms.opacity.value=h.opacity,this.Ie!==h.color&&(this.Ie=h.color,this.ht.uniforms.color.value=k.mr(this.Ie)))};var g={uniforms:{tDiffuse:{value:null},innerRadius:{value:.5},outerRadius:{value:.5},opacity:{value:.5},color:{value:new THREE.Color(0,
0,0)}},vertexShader:"varying vec2 vUv;\nvoid main() {\n    vUv = uv;\n    gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",fragmentShader:"uniform float innerRadius;\nuniform float outerRadius;\nuniform float opacity;\nuniform vec3 color;\nuniform sampler2D tDiffuse;\nvarying vec2 vUv;\nvoid main() {\n    vec4 texel = texture2D(tDiffuse, vUv);\n    vec2 uv = vUv - vec2(0.5, 0.5);\n    float radius = sqrt(dot(uv, uv)) * 1.4142135623730951;\n    float coef = clamp((radius - innerRadius) / (outerRadius - innerRadius), 0.0, 1.0);\n    float alpha = opacity * coef;\n    float composedAlpha = alpha + texel.a * (1.0 - alpha);\n    if (composedAlpha > 0.0)\n    {\n        vec3 rgb = (color * alpha + texel.rgb * texel.a * (1.0 - alpha)) / composedAlpha;\n        gl_FragColor = vec4(rgb, composedAlpha);\n    }\n    else\n    {\n        gl_FragColor = texel;\n    }\n}"};
return l});
define("tdv/player/view/webgl/system/renderer/ScenePostprocessing","require tdv/player/view/webgl/system/renderer/effect/AmbientOcclusion tdv/player/view/webgl/system/renderer/effect/Antialias tdv/player/view/webgl/system/renderer/effect/MotionBlur tdv/player/view/webgl/system/renderer/effect/Rendering tdv/player/view/webgl/system/renderer/effect/Vignette tdv/player/view/webgl/system/util/entity/Util".split(" "),function(a){function l(c){this.je=c;this.Bb=this.zc=this.ng=null;this.Ha=this.Pa=void 0;
this.QT=null;this.Zca=!0;this.Ri=this.Wu=this.o=null;this.N_=[new h(c),new k(c),new g(c),new e(c),new n(c)];this.A1=!1}var k=a("tdv/player/view/webgl/system/renderer/effect/AmbientOcclusion"),n=a("tdv/player/view/webgl/system/renderer/effect/Antialias"),g=a("tdv/player/view/webgl/system/renderer/effect/MotionBlur"),h=a("tdv/player/view/webgl/system/renderer/effect/Rendering"),e=a("tdv/player/view/webgl/system/renderer/effect/Vignette"),b=a("tdv/player/view/webgl/system/util/entity/Util");l.prototype.dispose=
function(){this.o&&(this.o.domElement.style.backgroundColor=void 0);for(;this.N_.length;)this.N_.pop().dispose();this.cda();this.Wu&&(this.Wu.material.dispose(),this.Wu=null);this.Ri&&(this.Ri.material.dispose(),this.Ri=null)};l.prototype.setSize=function(c,d){if(this.Pa!=c||this.Ha!=d)this.Pa=c,this.Ha=d,this.ng&&this.ng.setSize(this.Pa,this.Ha),this.o&&!this.o.xr.isPresenting&&this.o.setSize(this.Pa,this.Ha)};l.prototype.Mw=function(c){this.Bb=c};l.prototype.setCamera=function(c){this.zc=c};l.prototype.setRenderTarget=
function(c){this.QT!=c&&(this.QT=c,this.cda())};l.prototype.Khb=function(c){this.Zca!=c&&(this.Zca=c,this.ng&&(this.ng.renderToScreen=c))};l.prototype.b9=function(c){this.o!=c&&(this.o=c,this.o.setSize(this.Pa,this.Ha),this.cda())};l.prototype.render=function(c){this.R6a();this.O8a(c);this.o.domElement.style.backgroundColor=this.A1?"#000000":void 0;this.ng.renderTarget1.ZKa=!0;this.ng.renderTarget2.ZKa=!0;this.ng.render()};l.prototype.R6a=function(){this.ng||(this.ng=new THREE.EffectComposer(this.o,
this.QT||void 0),this.ng.renderToScreen=this.Zca,this.ng.setSize(this.Pa,this.Ha))};l.prototype.O8a=function(c){var d=!1,f=!1;this.A1=!1;this.N_.forEach(function(p){p.update(this.Bb,this.zc,this.Pa,this.Ha,c,this.ng.renderToScreen);d||(d=p.Cm);f||(f=p.Am);this.A1||(this.A1=p.ioa)}.bind(this));f=f&&this.o.outputColorSpace==THREE.SRGBColorSpace&&this.ng.renderToScreen;b.Oib(this.Bb,f);f&&!this.Wu?(this.Wu=new THREE.ShaderPass(THREE.GammaCorrectionShader),d=this.Wu.needsSwap=!0):this.Wu&&(this.Wu.enabled=
f);this.ng.renderToScreen||this.Ri?this.Ri&&(this.Ri.enabled=!this.ng.renderToScreen):(this.Ri=new THREE.ShaderPass(THREE.CopyShader),d=this.Ri.needsSwap=!0);if(d){var m=[];this.N_.forEach(function(p){m=m.concat(p.passes)});this.Wu&&m.push(this.Wu);for(this.Ri&&m.push(this.Ri);this.ng.passes.length>0;)this.ng.removePass(this.ng.passes[this.ng.passes.length-1]);m.forEach(function(p){this.ng.addPass(p)}.bind(this))}};l.prototype.cda=function(){this.ng&&(this.ng.renderTarget1!=this.QT&&this.ng.renderTarget1.dispose(),
this.ng.renderTarget2!=this.QT&&this.ng.renderTarget2.dispose(),this.ng=null)};return l});
define("tdv/player/view/webgl/system/renderer/SceneRenderer","require tdv/constants/EventName tdv/player/view/util/XR tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/system/util/Util tdv/player/view/webgl/system/renderer/ScenePostprocessing".split(" "),function(a){function l(m){this.Kqa=this.Kqa.bind(this);this.Nd=m;this.opacity=0;this.height=this.width=void 0;this.renderTarget=null;this.scene=void 0;this.ECa=!1;this.yia=!0;this.IX=this.camera=
void 0;this.WH=!1;this.n2=void 0;this.Rc=new b(m);this.update()}var k=a("tdv/constants/EventName"),n=a("tdv/player/view/util/XR"),g=a("tdv/player/view/webgl/components"),h=a("tdv/player/view/webgl/system/util/entity/Util"),e=a("tdv/player/view/webgl/system/util/Util"),b=a("tdv/player/view/webgl/system/renderer/ScenePostprocessing");l.prototype.update=function(){var m=this.Nd.getComponent(g.Scene);this.opacity=m&&m.opacity||0;this.ECa=m?m.locked:!1;this.yia=m?m.enabled:!0;var p=m&&m.scene;this.scene!=
p&&(this.scene=p,this.WH=!0,this.Rc.Mw(this.scene));var q=(p=m&&m.Ba)&&h.gW(p),r=q&&q.width;q=q&&q.height;if(this.width!=r||this.height!=q)this.width=r,this.height=q,this.WH=!0,this.Rc.setSize(this.width,this.height);m=m&&m.outputColorSpace=="srgb"?THREE.SRGBColorSpace:THREE.LinearSRGBColorSpace;this.n2!=m&&(this.n2=m,this.WH=!0,h.Nib(this.scene,m));m=p&&h.ut(p);this.camera!=m&&(this.camera=m,this.WH=!0,this.Rc.setCamera(this.camera));p=p&&h.gW(p).camera;this.IX!=p&&(this.IX=p);this.scene&&(h.Mib(this.scene,
this.camera),h.Pib(this.scene,n.isPresenting?2048:this.width,n.isPresenting?2048:this.height));return this};l.prototype.render=function(m,p,q){if((p||this.WH||!this.ECa)&&this.yia){this.renderTarget||(this.renderTarget=e.Nla(m));p?(m.xr.isPresenting||m.setRenderTarget(null),this.WH=!0):(m.setRenderTarget(this.renderTarget),this.renderTarget.texture.colorSpace=this.n2,this.WH=!1);m.outputColorSpace=this.n2;var r=this.Nd.getComponent(g.Scene),t=e.TIa(m.domElement);r&&r.n8!==1&&(t*=r.n8);m.getPixelRatio()!=
t&&m.setPixelRatio(t);this.keb(m);m.xr.isPresenting?(m.clear(),m.render(this.scene,this.IX)):(this.Rc.setRenderTarget(this.renderTarget),this.Rc.Khb(p),this.Rc.b9(m),this.Rc.render(q));this.ohb(m);(r=this.Nd.getComponent(g.Scene))&&r.M&&r.M.m(k.me)}};l.prototype.keb=function(m){var p=[],q=[];this.scene.traverse(function(r){r.ow||r.isGaussianCloud?p.push(r):r.visible&&r.material&&r.material.transparent&&r.material.depthTest&&r.renderOrder<=0&&r.renderOrder>=-100&&r.material.opacity>0&&q.push(r)});
c.camera=this.IX;c.ray.origin.setFromMatrixPosition(this.IX.matrixWorld);c.firstHitOnly=!0;q.forEach(function(r){f.setFromMatrixPosition(r.matrixWorld).sub(c.ray.origin);c.ray.direction.copy(f).normalize();var t=f.length();c.far=t;d.length=0;d=c.intersectObjects(p,!1,d);d.length>0&&d[0].distance<t&&(r.visible=!1,r.userData.NQa=!0)});this.kjb(m)};l.prototype.ohb=function(m){this.bkb(m);this.scene.traverse(function(p){p.userData.NQa&&(p.visible=!0,delete p.userData.NQa)})};l.prototype.kjb=function(m){m.setTransparentSort(this.Kqa)};
l.prototype.bkb=function(m){m.setTransparentSort(null)};l.prototype.Kqa=function(m,p){return m.$ma!==p.$ma?m.$ma-p.$ma:m.renderOrder!==p.renderOrder?m.renderOrder-p.renderOrder:m.object.ow||p.object.ow?(m.object.ow?-1:1)-(p.object.ow?-1:1):m.z!==p.z?p.z-m.z:m.id-p.id};var c=new THREE.Raycaster,d=[],f=new THREE.Vector3;l.prototype.isVisible=function(){return this.scene&&this.camera&&this.opacity>0&&this.yia};l.prototype.dispose=function(){this.camera=this.scene=this.Nd=null;this.Rc&&(this.Rc.dispose(),
this.Rc=null);this.renderTarget&&(this.renderTarget.dispose(),this.renderTarget=null)};return l});
define("tdv/player/view/webgl/system/renderer/Behaviour",["require","tdv/constants/EventName","tdv/player/view/util/XR","tdv/player/view/webgl/components","tdv/player/view/webgl/system/renderer/SceneRenderer"],function(a){function l(e){this.A=e;this.lz=[];this.Kj=null;this.M6a();this.K6a()}var k=a("tdv/constants/EventName"),n=a("tdv/player/view/util/XR"),g=a("tdv/player/view/webgl/components"),h=a("tdv/player/view/webgl/system/renderer/SceneRenderer");l.prototype.frame=function(e){var b=!!this.o&&
n.zg==this.o;if(!n.isPresenting||b){var c=this.A.getComponent(g.qj).JX.map(function(m){for(var p=0;p<this.lz.length;p++)if(this.lz[p].Nd==m)return this.lz[p].update();return new h(m)}.bind(this));this.lz.filter(function(m){return c.indexOf(m)<0}).forEach(function(m){m.dispose()});this.lz=c;var d=this.lz.filter(function(m){return m.isVisible()});if(d.length>0){b&&d.reduce(function(m,p){return m.opacity>p.opacity?m:p});var f=d.length==1&&d[0].opacity>=1||b;d.forEach(function(m){m.render(this.o,f,e)}.bind(this));
f||this.M4a(d.slice(0,2))}b&&this.A.T.Za()}};l.prototype.M4a=function(e){this.Bo.material.uniforms.t1.value=e[0].renderTarget.texture;this.Bo.material.uniforms.o1.value=e[0].opacity;e.length>1?(this.Bo.material.uniforms.useT2.value=1,this.Bo.material.uniforms.t2.value=e[1].renderTarget.texture,this.Bo.material.uniforms.o2.value=e[1].opacity):this.Bo.material.uniforms.useT2.value=0;this.o.setSize(e[0].width,e[0].height);this.o.setRenderTarget(null);this.o.setClearColor(0,0);this.o.clear();this.o.render(this.DQ,
this.Pba)};l.prototype.dispose=function(){for(;this.lz.length;)this.lz.shift().dispose();this.lz=null;this.I7a();this.K7a()};l.prototype.M6a=function(){var e=this.A.O(g.qj);this.Kj=e.cb.Kc();this.Kj.a5();e.renderer=this.Kj.Jn();this.o=e.renderer;n.M.bind(k.V,this.RFa,this,!0)};l.prototype.K7a=function(){n.M.h(k.V,this.RFa,this);this.o=null;this.Kj.A8();this.Kj=null};l.prototype.RFa=function(){this.A.T.Za()};l.prototype.K6a=function(){this.DQ=new THREE.Scene;this.Pba=new THREE.OrthographicCamera(window.innerWidth/
-2,window.innerWidth/2,window.innerHeight/2,window.innerHeight/-2,-10,10);this.DQ.add(this.Pba);this.Bo=new THREE.Mesh(new THREE.PlaneGeometry(window.innerWidth,window.innerHeight),this.zXa());this.DQ.add(this.Bo)};l.prototype.I7a=function(){this.DQ.remove(this.Bo);this.Bo.geometry.dispose();this.Bo.geometry=null;this.Bo.material.dispose();this.DQ=this.Pba=this.Bo=this.Bo.material=null};l.prototype.zXa=function(){var e=new THREE.ShaderMaterial({uniforms:{t1:{value:null},t2:{value:null},o1:{value:1},
o2:{value:1},useT2:{value:1}},vertexShader:"varying vec2 vUv;\nvoid main() {\nvUv = vec2( uv.x, uv.y );\ngl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D t1;\nuniform sampler2D t2;\nuniform float o1;\nuniform float o2;\nuniform int useT2;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texel1 = texture2D(t1, vUv);\n   texel1.a = texel1.a * o1;\n   if (useT2 == 1) {\n\t  vec4 texel2 = texture2D(t2, vUv);\n     texel2.a = texel2.a * o2;\n     gl_FragColor = mix(texel1, texel2, texel2.a);\n   } else {\n     gl_FragColor = texel1;\n   }\n#include <colorspace_fragment>\n#include <tonemapping_fragment>\n}"});
e.transparent=!0;return e};l.Va=function(e){e.K(g.yu).manager=new l(e)};l.xa=function(e){var b=e.getComponent(g.yu);b.manager.dispose();b.manager=null;e.ja(g.yu)};l.update=function(e){e.getComponent(g.yu).manager.update()};l.frame=function(e,b,c){e.getComponent(g.yu).manager.frame(b,c)};return l});
define("tdv/player/view/webgl/system/renderer/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/renderer/Behaviour"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/renderer/Behaviour");a=l.extend(k,function(){k.apply(this,arguments)});a.prototype.Yc=function(h,e){this.hOa.v.length&&this.hOa.v.slice().forEach(g.Va);this.Un.v.length&&
this.Un.v.slice().forEach(function(b){g.frame(b,h,e)});this.iOa.v.length&&this.iOa.v.slice().forEach(g.xa)};a.J={};a.J.hOa=[n.qj,n.yu.aa];a.J.iOa=[n.qj.aa,n.yu];a.J.Un=[n.qj,n.yu];return a});
define("tdv/player/view/webgl/system/scene/BackgroundSprite","require tdv/utils tdv/constants/EventName tdv/constants/RenderOrder tdv/events/EventDispatcher tdv/player/view/map/renderer/item/Item tdv/player/view/webgl/system/util/entity/Util tdv/constants/Priority tdv/player/view/image/Repository tdv/player/view/util/XR".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/constants/RenderOrder"),g=a("tdv/events/EventDispatcher"),h=a("tdv/player/view/map/renderer/item/Item"),
e=a("tdv/player/view/webgl/system/util/entity/Util"),b=a("tdv/constants/Priority"),c=a("tdv/player/view/image/Repository"),d=a("tdv/player/view/util/XR");a=l.extend(g,function(m,p){g.call(this);this.ke=m;this.Bb=p;this.Ja=new h;this.Ja.AP([this.ke]);this.Ja.bind(k.ia,this.Ke,this,!1);this.Ja.bind(k.ad,this.th,this,!1);this.vc=null;this.Mf=0;d.M.bind(k.V,this.ui,this,!0);c.rA(this.Ja,b.DF)});a.prototype.Xn=function(m){this.Mf!==m&&(this.Mf=m,this.ui())};a.prototype.kj=function(){return!!this.vc};a.prototype.Ke=
function(){this.lYa();this.m(k.ia)};a.prototype.th=function(){this.m(k.ad)};a.prototype.lYa=function(){var m=new THREE.Texture;m.image=c.xg(this.ke);m.generateMipmaps=!0;m.minFilter=THREE.LinearMipMapLinearFilter;m.needsUpdate=!0;m=new THREE.SpriteMaterial({map:m});m.sizeAttenuation=!1;m.transparent=!0;m.polygonOffset=!0;m.polygonOffsetUnits=1;m.polygonOffsetFactor=-10;this.vc=new THREE.Sprite(m);this.vc.renderOrder=n.XRa;this.ui()};a.prototype.ui=function(){if(this.vc){var m=d.isPresenting&&d.zp==
d.po.tr?0:this.Mf;this.vc.material.opacity!=m&&(this.vc.material.opacity=m,this.vc.material.visible=m>0,this.vc.material.needsUpdate=!0)}};a.prototype.dispose=function(){this.vc&&(this.vc.parent&&e.Zoa(this.vc.parent,this.vc),this.vc.material.map.dispose(),this.vc.material.dispose(),this.vc=null)};a.prototype.update=function(){if(this.vc){var m=e.jw(this.Bb);this.vc.parent!=m&&(this.vc.parent&&e.Zoa(this.vc.parent,this.vc),m&&e.e$a(m,this.vc));if(m){var p=e.RD(this.Bb),q=this.vc.material.map.image.width,
r=this.vc.material.map.image.height;m=p/(2*Math.tan(m.fov*f/2));p=Math.max(p/m,e.pW(this.Bb)/(m*q/r));this.vc.scale.y!=p&&(this.vc.scale.y=p,this.vc.scale.x=p*q/r)}q=e.oW(this.Bb);this.vc.material.map.colorSpace!=q&&(this.vc.material.map.colorSpace=q,this.vc.material.needsUpdate=!0)}};a.prototype.dispose=function(){this.vc&&(this.vc.parent&&e.Zoa(this.vc.parent,this.vc),this.vc.material.map.dispose(),this.vc.material.dispose(),this.vc=null);this.Ja&&c.eo(this.Ja,b.DF);d.M.h(k.V,this.ui,this)};var f=
Math.PI/180;return a});
define("tdv/player/view/webgl/system/scene/Background","require tdv/constants/EventName tdv/player/view/webgl/components tdv/player/view/webgl/system/scene/BackgroundSprite tdv/view/util/Ease tdv/view/util/EaseDimension".split(" "),function(a){function l(b,c){this.A=b;this.Mh=c;this.Nx=void 0;this.Cj=this.zo=this.ka=this.Bb=null;this.update()}var k=a("tdv/constants/EventName"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/scene/BackgroundSprite"),h=a("tdv/view/util/Ease"),
e=a("tdv/view/util/EaseDimension");l.prototype.frame=function(b){this.ka&&this.oI(b);this.zo&&this.zo.update();this.Cj&&this.Cj.update()};l.prototype.update=function(){var b=this.A.getComponent(n.Scene);this.Bb=b.scene;if(!this.Bb){if(!b.scene)return;this.Bb=b.scene}b=b.nla||null;this.Nx===b||this.ka||(this.dR(this.Cj),this.Cj=null,(this.Nx=b)?this.Cj=this.yXa(this.Nx):(this.XQ(),this.Mh.m(k.ia)))};l.prototype.oI=function(b){this.ka.Lb(b);this.zo&&this.zo.Xn(Math.min(1,Math.max(0,this.ka.nb("alpha"))));
this.Cj&&this.Cj.Xn(Math.min(1,Math.max(0,this.ka.nb("nextAlpha"))));this.ka.Re()&&(this.ka=null,this.zo&&(this.dR(this.zo),this.zo=null),this.zo=this.Cj,this.Cj=null,this.update());this.A.T.Za()};l.prototype.Xga=function(){this.Cj.h(k.ia,this.Xga,this,!0);this.Cj.h(k.ad,this.Yga,this,!0);this.XQ();this.Mh.m(k.ia)};l.prototype.Yga=function(){this.dR(this.Cj);this.Cj=null;this.XQ();this.Mh.m(k.ia)};l.prototype.XQ=function(){this.Cj&&this.zo?this.ka=new h("linear",[new e("nextAlpha",0,2,void 0),new e("alpha",
2,0,void 0)],600):this.Cj?this.ka=new h("linear",[new e("nextAlpha",0,1,void 0)],300):this.zo&&(this.ka=new h("linear",[new e("alpha",1,0,void 0)],300));this.A.T.Za()};l.prototype.yXa=function(b){b=new g(b,this.Bb);this.cWa(b);b.Xn(0);return b};l.prototype.dR=function(b){b&&(this.r8a(b),b.dispose())};l.prototype.cWa=function(b){b.bind(k.ia,this.Xga,this,!0);b.bind(k.ad,this.Yga,this,!0)};l.prototype.r8a=function(b){b.h(k.ia,this.Xga,this,!0);b.h(k.ad,this.Yga,this,!0)};l.prototype.dispose=function(){this.zo&&
(this.dR(this.zo),this.zo=null);this.Cj&&(this.dR(this.Cj),this.Cj=null)};return l});
define("tdv/player/view/webgl/system/scene/Environment","require tdv/constants/EventName tdv/constants/Priority tdv/player/view/util/Color tdv/player/view/util/LoadingGroup tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util tdv/view/images/ImageLoader tdv/player/view/util/XR".split(" "),function(a){function l(f,m){this.A=f;this.FG=void 0;this.Eda=1;this.s3=this.dN=this.cN=this.PB=this.cG=this.Nx=void 0;this.zc=this.o=this.Bb=null;this.Mh=m;this.qf=new h(this.Mh);this.Qd=
[new c(n.DF),new c(n.DF)];this.Qd.forEach(function(p){p.bind(k.ia,this.Ke,this,!0);p.bind(k.ad,this.th,this,!0)}.bind(this));d.M.bind(k.V,this.ya,this,!0);this.uDa([]);this.update()}var k=a("tdv/constants/EventName"),n=a("tdv/constants/Priority"),g=a("tdv/player/view/util/Color"),h=a("tdv/player/view/util/LoadingGroup"),e=a("tdv/player/view/webgl/components"),b=a("tdv/player/view/webgl/system/util/entity/Util"),c=a("tdv/view/images/ImageLoader"),d=a("tdv/player/view/util/XR");l.prototype.frame=function(){if(this.Bb){var f=
l.ldb(this.A.T,this.Bb);this.o!=f&&(this.o&&(this.Qu(),this.F_()),this.o=f)&&(this.ya(),this.kka())}};l.prototype.update=function(){var f=this.A.getComponent(e.Scene),m=!1,p=!1,q=f.rIa||null;this.FG!==q&&(this.FG=q,p=!0);q=f.nla||null;this.Nx!==q&&(this.Nx=q,p=!0);q=f.JGa||null;this.cG!==q&&(this.cG=q,p=!0);p&&(this.wFa(),this.kka(),m=!0);this.PB!==f.backgroundColor&&(this.PB=f.backgroundColor,m=!0);this.Bb!==f.scene&&(this.Bb=f.scene,m=!0);this.Eda!==f.environmentIntensity&&(this.Eda=f.environmentIntensity,
m=!0);m&&this.ya()};l.prototype.wFa=function(){this.uDa(this.s0a())};l.prototype.s0a=function(){var f=[];this.FG&&f.indexOf(this.FG)==-1&&f.push(this.FG);!this.Nx&&this.cG&&f.indexOf(this.cG)==-1&&f.push(this.cG);if(this.Bb&&this.Bb.background&&this.Bb.background.image&&this.Bb.background.image.src){var m=this.Bb.background.image.src;f.indexOf(m)==-1&&f.push(m)}return f};l.prototype.uDa=function(f){var m=[],p=[];this.Qd.forEach(function(q){var r=q.ql();f.indexOf(r)<0?(q.cancel(),m.push(q)):p.push(r)});
f.forEach(function(q){p.indexOf(q)<0&&m.shift().load(q)})};l.prototype.kka=function(){var f=0;this.qf.kHa();this.Qd.forEach(function(m){m.ql()&&!m.kj()&&(this.qf.QN(m),f++)}.bind(this));f==0&&this.Mh&&this.Mh.m(k.ia)};l.prototype.dispose=function(){this.Qd.forEach(function(f){f.cancel();f.h(k.ia,this.Ke,this,!0);f.h(k.ad,this.th,this,!0)}.bind(this));this.A&&(this.F_(),this.Qu(),this.A=null);d.M.h(k.V,this.ya,this)};l.prototype.Ke=function(){this.ya();this.kka()};l.prototype.ya=function(){if(this.Bb&&
this.o){this.Bb.environmentIntensity=this.Eda;if(this.FG){var f=this.gxa(this.FG);f&&this.zVa(f)}else this.F_();d.isPresenting&&d.zp==d.po.tr?this.Qu():this.Nx?this.Qu():this.cG?(f=this.gxa(this.cG))&&this.dua(f):this.PB?this.dua(void 0,this.PB):this.Qu();this.wFa();this.A.T.Za()}};l.prototype.gxa=function(f){for(var m=0;m<this.Qd.length;m++)if(this.Qd[m].kj()&&this.Qd[m].ql()==f)return this.Qd[m];return null};l.prototype.dua=function(f,m){if(this.Bb){if(f){var p=f&&f.ql()||void 0;if(p==this.dN)return;
this.Qu();b.d9(this.Bb,this.$r(f,!1));this.dN=p;this.cN=void 0}m&&m!=this.cN&&(this.Qu(),b.d9(this.Bb,m=="transparent"?null:g.mr(m)),this.cN=m,this.dN=void 0)}};l.prototype.Qu=function(){this.Bb&&(this.cN||this.dN)&&(this.dN&&(this.Bb.background.dispose(),b.d9(this.Bb,null),this.dN=void 0),this.cN&&(b.d9(this.Bb,null),this.cN=void 0))};l.prototype.zVa=function(f){if(this.Bb){var m=f&&f.ql()||void 0;m!=this.s3&&(this.F_(),this.Bb.environment=this.$r(f,d.isPresenting?!1:!0),this.s3=m)}};l.prototype.F_=
function(){this.Bb&&this.s3&&(this.Bb.environment.dispose(),this.Bb.environment=null,this.s3=void 0)};l.prototype.$r=function(f,m){return Math.round(f.dg()/f.wg())<6?this.OXa(f,m):this.IXa(f,m)};l.prototype.OXa=function(f,m){var p=new THREE.Texture;p.image=f.xg();p.colorSpace=b.oW(this.Bb);p.mapping=THREE.EquirectangularReflectionMapping;p.needsUpdate=!0;return m?(this.o.Fn=!0,f=new THREE.PMREMGenerator(this.o),p=f.fromEquirectangular(p).texture,f.dispose(),this.o.Fn=!1,p):p};l.prototype.IXa=function(f,
m){for(var p=Array(6),q=f.dg()/6,r=f.wg(),t=0;t<6;t++){var u=document.createElement("canvas");u.width=q;u.height=r;u.getContext("2d").drawImage(f.xg(),t*q,0,q,r,0,0,q,r);p[t]=u}f=new THREE.CubeTexture;f.images=[p[1],p[3],p[4],p[5],p[0],p[2]];f.colorSpace=b.oW(this.Bb);f.needsUpdate=!0;return m?(this.o.Fn=!0,m=new THREE.PMREMGenerator(this.o),p=m.fromCubemap(f).texture,m.dispose(),this.o.Fn=!1,p):f};l.prototype.th=function(){this.A.getComponent(e.Scene).scene.environment=null;this.A.T.Za()};l.oCa=
new Map;l.Rpa=function(f,m){l.oCa.set(f,m||[])};l.ldb=function(f,m){f=l.oCa.get(f)||[];for(var p=0;p<f.length;p++){var q=f[p].getComponent(e.qj);if(q&&q.JX.filter(function(r){return r.getComponent(e.Scene).scene==m}).length>0)return q.renderer}return null};return l});
define("tdv/player/view/webgl/system/scene/FadeColor","require exports tdv/constants/RenderOrder tdv/player/view/util/Color tdv/player/view/util/XR tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util three.mod".split(" "),function(a,l,k,n,g,h,e,b){a=function(){function d(f){this.opacity=this.sO=void 0;this.F=f}d.prototype.frame=function(){var f=this.F.getComponent(h.Scene),m=f.scene,p=m&&e.jw(m),q=f.sO;f=f.VV;!g.isPresenting&&p&&q&&f>0?(this.hbb(),this.qlb(m,p),this.plb(q,
f)):(this.opacity=this.sO=void 0,this.oHa())};d.prototype.update=function(){};d.prototype.qlb=function(f,m){this.Fi.parent!=m&&m.add(this.Fi);var p=e.pW(f);f=e.RD(f);m.isPerspectiveCamera?(this.Fi.position.z=-m.near*1.01,m=f/(2*Math.tan(m.fov*c/2)),m=Math.max(f/m,p/(m*p/f)),this.Fi.scale.y=m,this.Fi.scale.x=m*p/f):m.isOrthographicCamera&&(this.Fi.position.z=-(m.near+1),this.Fi.scale.y=m.top-m.bottom,this.Fi.scale.x=m.right-m.left)};d.prototype.plb=function(f,m){this.sO!==f&&this.opacity!==m&&(this.Fi.material.color=
n.mr(f),this.Fi.material.opacity=m,this.Fi.material.needsUpdate=!0)};d.prototype.hbb=function(){if(!this.Fi){var f=new b.SpriteMaterial;f.depthTest=!1;f.renderOrder=k.Kra;f.sizeAttenuation=!1;f.transparent=!0;f.visible=!0;f.opacity=0;f.needsUpdate=!0;this.Fi=new b.Sprite(f);this.Fi.renderOrder=k.Kra}};d.prototype.oHa=function(){var f,m,p;if(this.Fi){var q=this.Fi.material;(f=q.map)===null||f===void 0||f.dispose();(m=q.envMap)===null||m===void 0||m.dispose();q.dispose();this.Fi.geometry.dispose();
(p=this.Fi.parent)===null||p===void 0||p.remove(this.Fi)}};d.prototype.dispose=function(){this.oHa()};return d}();var c=Math.PI/180;return a});
define("tdv/player/view/webgl/system/scene/Fog","require exports tdv/constants/EventName tdv/player/view/util/Color tdv/player/view/webgl/components three.mod tdv/player/view/util/XR".split(" "),function(a,l,k,n,g,h,e){return function(){function b(c){this.F=c;e.M.bind(k.V,this.update,this,!0)}b.prototype.update=function(){var c=this.F.getComponent(g.Scene),d=c.scene,f=e.isPresenting&&e.zp==e.po.tr?0:c.MIa;c=n.mr(c.LIa||"#ffffff");f>0?d.fog==null?d.fog=new h.FogExp2(c,f):(d.fog.color=c,d.fog.density=
f):d.fog=null};b.prototype.dispose=function(){e.M.h(k.V,this.update,this);var c=this.F.getComponent(g.Scene);c&&c.scene&&(c.scene.fog=null)};return b}()});
define("tdv/player/view/webgl/system/scene/Behaviour","require tdv/player/view/webgl/components tdv/player/view/util/LoadingGroup tdv/player/view/webgl/system/scene/Background tdv/player/view/webgl/system/scene/Environment tdv/player/view/webgl/system/scene/FadeColor tdv/player/view/webgl/system/scene/Fog".split(" "),function(a){function l(c){this.A=c;this.Mh=null;var d=this.A.O(k.Scene),f=this.A.O(k.Op);this.A.K(k.Object3D).ra=f.scene=d.scene=new THREE.Scene;this.qf=new n;this.lR=new h(c,this.qf.Xv());
this.Yd=new g(c,this.qf.Xv());this.T_=new b(c);this.pwa=new e(c)}var k=a("tdv/player/view/webgl/components"),n=a("tdv/player/view/util/LoadingGroup"),g=a("tdv/player/view/webgl/system/scene/Background"),h=a("tdv/player/view/webgl/system/scene/Environment"),e=a("tdv/player/view/webgl/system/scene/FadeColor"),b=a("tdv/player/view/webgl/system/scene/Fog");l.prototype.frame=function(c){this.lR.frame(c);this.Yd.frame(c)};l.prototype.pma=function(c){this.pwa.frame(c)};l.prototype.update=function(){this.lR.update();
this.Yd.update();this.T_.update();this.pwa.update();this.X8a()};l.prototype.X8a=function(){var c=this.A.getComponent(k.Scene);this.Mh!=c.mma&&(this.Mh=c.mma,this.qf.Qhb(this.Mh))};l.prototype.dispose=function(){this.qf&&(this.qf.dispose(),this.qf=null);this.Yd&&(this.Yd.dispose(),this.Yd=null);this.lR&&(this.lR.dispose(),this.lR=null);this.T_&&(this.T_.dispose(),this.T_=null);this.A&&(this.A=null)};l.Va=function(c){c.K(k.Op).manager=new l(c)};l.xa=function(c){var d=c.getComponent(k.Op);d.manager.dispose();
d.manager=null;c.ja(k.Op);c.ja(k.Object3D)};l.frame=function(c,d){c.getComponent(k.Op).manager.frame(d)};l.pma=function(c,d){(c=c.getComponent(k.Op))&&c.manager&&c&&c.manager.pma(d)};l.update=function(c){c.getComponent(k.Op).manager.update()};l.Rpa=function(c,d){h.Rpa(c,d)};return l});
define("tdv/player/view/webgl/system/scene/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/scene/Behaviour"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/scene/Behaviour");a=l.extend(k,function(){k.apply(this,arguments)});a.prototype.Yc=function(h){this.qOa.v.length&&this.qOa.v.slice().forEach(g.Va);this.scenes.Da.length&&
this.scenes.Da.slice().forEach(g.update);this.scenes.v.length&&this.scenes.v.slice().forEach(function(e){g.frame(e,h)});g.Rpa(this.T,this.Un.v.slice());this.rOa.v.length&&this.rOa.v.slice().forEach(g.xa)};a.J={};a.J.qOa=[n.Scene,n.Op.aa];a.J.scenes=[n.Scene,n.Op];a.J.rOa=[n.Scene.aa,n.Op];a.J.Un=[n.qj,n.yu];a.iZ=l.extend(k,function(){k.apply(this,arguments)});a.iZ.prototype.Yc=function(h){this.scenes.v.length&&this.scenes.v.slice().forEach(function(e){g.pma(e,h)})};a.iZ.J={};a.iZ.J.scenes=[n.Scene,
n.Op];return a});
define("tdv/player/view/util/ColorPicker",["require","tdv/player/view/util/Device"],function(a){function l(b){this.dh=b;b.tagName=="CANVAS"?(this.fa=b,this.Vc=1):(this.fa=document.createElement("canvas"),this.Vc=g.Md()==g.pj?.5:1,this.fa.width=Math.round(b.width*this.Vc),this.fa.height=Math.round(b.height*this.Vc));this.Fa=this.fa.getContext("2d");this.Fa.globalCompositeOperation="copy";this.fa!=b&&this.Fa.drawImage(b,0,0,b.width,b.height,0,0,this.fa.width,this.fa.height)}function k(b,c,d){b<0?b=
d==THREE.RepeatWrapping?c+b%c:d==THREE.MirroredRepeatWrapping?Math.floor(Math.abs(b/c))%2==0?Math.abs(b%c):c-1+b%c:0:b>=c&&(b=d==THREE.RepeatWrapping?b%c:d==THREE.MirroredRepeatWrapping?Math.floor(b/c)%2==1?c-1-b%c:b%c:c-1);return b}function n(b,c,d){try{if(b instanceof CanvasRenderingContext2D)return b.getImageData(c,d,1,1).data;if(b.tagName&&b.tagName=="CANVAS")return b.q1a?[0,0,0,0]:b.getContext("2d").getImageData(c,d,1,1).data;h.drawImage(b,c,d,1,1,0,0,1,1);return h.getImageData(0,0,1,1).data}catch(f){return[0,
0,0,0]}}var g=a("tdv/player/view/util/Device");l.prototype.transparent=function(b,c){return l.transparent(this.Fa,Math.round(b*this.Vc),Math.round(c*this.Vc))};l.prototype.WA=function(b,c){return l.WA(this.Fa,Math.round(b*this.Vc),Math.round(c*this.Vc))};l.prototype.info=function(b,c){return l.info(this.Fa,Math.round(b*this.Vc),Math.round(c*this.Vc))};l.prototype.dispose=function(){this.fa!=this.dh&&(this.fa.width=this.fa.height=0);this.dh=this.fa=this.Fa=null};l.ikb=function(b,c,d){if(!b.image||
!b.image.width||!b.image.height)return!0;c=k(Math.round(c*b.image.width),b.image.width,b.wrapS);d=k(Math.round((1-d)*b.image.height),b.image.height,b.wrapT);return!l.transparent(b.image,c,d)};l.transparent=function(b,c,d){return!l.WA(b,c,d)};l.WA=function(b,c,d){return!b.tagName||b.tagName&&b.tagName=="VIDEO"?!0:n(b,c,d)[3]>0};l.info=function(b,c,d){b=n(b,c,d);c=b[3];return{WA:c>0,opacity:c,color:"#"+e[b[0]]+e[b[1]]+e[b[2]]}};a=document.createElement("canvas");a.width=a.height=1;var h=a.getContext("2d");
h.globalCompositeOperation="copy";var e=function(){for(var b=Array(256),c=0;c<16;c++)b[c]="0"+c.toString(16);for(;c<256;c++)b[c]=c.toString(16);return b}();return l});
define("tdv/player/view/webgl/system/selection/Behaviour","require tdv/constants/EventName tdv/player/view/util/ColorPicker tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/system/util/RaycastUtil tdv/view/constants/Cursor".split(" "),function(a){function l(B){this.xh=B;this.eN=this.ky=this.Je=this.Ho=null;this.DS=void 0;this.ty=!1;this.update()}function k(B,C,F,G){this.F=B;this.ra=C;this.point=F;this.normal=G}function n(B){return{x:B.x,y:B.y,z:B.z}}
function g(B,C,F,G){var I=C.T,N=B.get(I);N||B.set(I,N=[]);B=N.indexOf(C);F&&B<0?N.push(C):!F&&B>=0&&N.splice(B,1);G.delete(I)}var h=a("tdv/constants/EventName"),e=a("tdv/player/view/util/ColorPicker"),b=a("tdv/player/view/webgl/components"),c=a("tdv/player/view/webgl/system/util/entity/Util"),d=a("tdv/player/view/webgl/system/util/RaycastUtil"),f=a("tdv/view/constants/Cursor");l.prototype.update=function(){var B=this.xh.getComponent(b.yc);B.Ot=this;this.dU(B&&B.enabled?B.JD:null);this.cU(B&&B.enabled?
B.G5:null)};l.prototype.frame=function(){this.bXa();var B=this.xh.getComponent(b.yc);B&&B.Gla?this.XAa():this.zia(q)};l.prototype.dU=function(B){if(this.Ho!=B){if(this.Ho)for(var C in u)this.Ho.h(C,this.Ae,this);if(this.Ho=B)for(C in u)this.Ho.bind(C,this.Ae,this,!0)}};l.prototype.Ae=function(B){var C=this.xh.getComponent(b.yc);C&&C.enabled&&(C=u[B.name])&&C.call(this,B)};l.prototype.cU=function(B){this.Je!=B&&(this.Je&&this.ty&&this.Je.pop(f.mf),(this.Je=B)&&this.ty&&this.Je.push(f.mf))};l.prototype.rg=
function(B){this.Eq(B);this.aM&&v.indexOf(this.xh.T)==-1&&w.indexOf(this.xh.T)==-1?this.zia(q):this.zia(p)};l.prototype.Py=function(B){this.Eq(B);(B=this.cea())&&this.v4(h.la,B)};l.prototype.zM=function(B){this.Eq(B);(B=this.cea())&&this.v4(h.di,B)};l.prototype.kq=function(B){this.aM=!0;this.Eq(B);if(B=this.cea())this.Dda=B.F,this.Gda=B.F.getComponent(b.vd).M,this.v4(h.Ra,B)};l.prototype.Qy=function(B){this.aM=!1;this.Eq(B);if(this.Dda)var C=(C=this.Dda.getComponent(b.vd))&&C.M;!C&&this.Gda&&(C=this.Gda);
this.Gda=this.Dda=null;C&&(B=this.Hwa(),C.m(h.ab,B),C=this.xh.getComponent(b.yc),C.M&&C.M.m(h.ab,B))};l.prototype.Eq=function(B){this.yd=B.x;this.zd=B.y;this.mM=B.pageX;this.nM=B.pageY};l.prototype.zia=function(B){var C=(new Date).getTime()+B;this.DS&&C>=this.DS||(this.DS=C,clearTimeout(this.eN),this.eN=setTimeout(function(){this.eN=null;this.DS=void 0;this.XAa()}.bind(this),B))};l.prototype.XAa=function(){var B=this.e0a();this.ZCa(B&&B.F);B&&this.v4(h.fb,B)};l.prototype.Koa=function(B,C,F){var G=
this.yd,I=this.zd,N=this.mM,P=this.nM;this.nM=this.mM=this.zd=this.yd=void 0;B=this.nea(B,[]);C=this.gea(B,C,F);var Q;C&&(Q=this.yxa(C));this.yd=G;this.zd=I;this.mM=N;this.nM=P;return Q};l.prototype.e0a=function(){var B=this.xh.getComponent(b.yc);if(!B)return null;var C=this.d0a();return this.gea(C,B.origin,B.direction)||null};l.prototype.cea=function(){var B=this.xh.getComponent(b.yc);if(!B)return null;var C=this.b_a();return this.gea(C,B.origin,B.direction)||null};l.prototype.ZCa=function(B){if(this.ky!=
B){if(this.ky!=null!=(B!=null)){var C=this.xh.getComponent(b.yc);C&&C.M&&C.M.m(B?h.tc:h.Eb)}this.ky&&this.yEa(this.ky,h.Eb);(this.ky=B)&&this.yEa(this.ky,h.tc);B=this.ky&&this.ky.getComponent(b.vd);B=!!B&&B.bB;this.ty!=B&&(this.ty=B,this.Je&&(this.ty?this.Je.push(f.mf):this.Je.pop(f.mf)))}};l.prototype.gea=function(B,C,F){var G=Array.from(B.keys());C=this.b1a(G,C,F);for(F=0;F<C.length;F++){G=C[F];var I=G.point,N=G.object,P=G.face&&G.face.normal,Q=B.get(N),R=Q&&Q.getComponent(b.vd);if(R){var K=Array.isArray(N.material)&&
G.face?N.material[G.face.materialIndex]:N.material;if(!K||K.visible)if(R.SE||!K||!K.map||e.ikb(K.map,G.uv.x,G.uv.y))return N.isSkinnedMesh&&(N=this.vZa(N.skeleton.bones,I)),new k(Q,N,I,P)}}return null};l.prototype.b_a=function(){var B=this.xh.T,C=D.get(B);if(!C){C=y.get(B);var F=z.get(B);C=this.nea(C,F);D.set(B,C)}return C};l.prototype.d0a=function(){var B=this.xh.T,C=E.get(B);if(!C){C=x.get(B);var F=A.get(B);C=this.nea(C,F);E.set(B,C)}return C};l.prototype.nea=function(B,C){var F=(C&&C.map(function(N){return c.Sc(N)}).filter(function(N){return!!N})||
[]).slice(),G=new Map;B&&B.forEach(function(N){var P=c.Sc(N);P&&F.indexOf(P)==-1&&(F.push(P),G.set(N,P))});var I=new Map;G.forEach(function(N,P){for(var Q=[N];Q.length;){var R=Q.shift();if(R==N||F.indexOf(R)==-1)I.set(R,P),R.children&&(Q=Q.concat(R.children))}});return I};l.prototype.b1a=function(B,C,F){t.camera=this.Kwa();var G=c.Sc(this.xh);G=G&&G.matrixWorld;G||(G=(G=this.xh.getComponent(b.yc))&&G.matrixWorld);G?(t.ray.origin.copy(C).applyMatrix4(G),t.ray.direction.copy(C).add(F).applyMatrix4(G).sub(t.ray.origin).normalize()):
(t.ray.origin.copy(C),t.ray.direction.copy(F).normalize());return d.intersect(t,B)};l.prototype.v4=function(B,C){var F=this.yxa(C);C=C.F.getComponent(b.vd);F.zW=C&&C.M.zW(B)||!1;C.M&&C.M.m(B,F);C=this.xh.getComponent(b.yc);C.M&&C.M.m(B,F)};l.prototype.Hwa=function(){var B={};this.yd!==void 0&&this.zd!==void 0&&(B.x=this.yd,B.y=this.zd);this.mM!==void 0&&this.nM!==void 0&&(B.pageX=this.mM,B.pageY=this.nM);return B};l.prototype.yxa=function(B){var C=this.Hwa(),F=B.ra,G=B.point;B=B.normal;C.position=
n(G);var I=this.Kwa();C.cameraPosition=n(I?r.setFromMatrixPosition(I.matrixWorld):r.set(0,0,0));I=F;for(var N=C;;){N.object=I.userData.id;N.name=I.name;N.type=I.isMesh?"mesh":I.isBone?"bone":I.ow||I.isGaussianCloud?"gs":"other";N.localPosition=n(I.worldToLocal(r.copy(G)));r.setFromMatrixScale(I.matrixWorld);N.localScale=Math.max(r.x,r.y,r.z);N.objectMatrixWorld=F.matrixWorld.toArray();B&&(N.normal=n(m(F,B,I,r)));if(!I.parent||!I.parent.userData.id)break;I=I.parent;N=N.parent={}}return C};var m=function(){var B=
new THREE.Vector3,C=new THREE.Matrix4;return function(F,G,I,N){N.copy(G);if(F==I)return N;N.applyMatrix4(F.matrixWorld);N.sub(B.setFromMatrixPosition(F.matrixWorld));N.add(B.setFromMatrixPosition(I.matrixWorld));N.applyMatrix4(C.copy(I.matrixWorld).invert()).normalize();return N}}();l.prototype.Kwa=function(){if(this.V_.camera)return this.V_.camera;var B=this.xh.getComponent(b.yc);B=B&&B.Ba;this.V_.camera=B&&c.ut(B);return this.V_.camera};l.prototype.bXa=function(){this.V_={}};l.prototype.yEa=function(B,
C){(B=(B=B.getComponent(b.vd))&&B.M)&&B.m(C)};l.prototype.vZa=function(B,C){var F=null,G=Infinity;for(B=B.slice();B.length;){var I=B.shift(),N=C.distanceTo(I.getWorldPosition(r));N<G&&(F=I,G=N);B.unshift.apply(B,I.children)}return F};l.prototype.dispose=function(){this.eN&&(clearTimeout(this.eN),this.eN=null,this.DS=void 0);this.dU(null);this.cU(null);this.ZCa(null)};var p=16,q=400,r=new THREE.Vector3(0,1,0),t=new THREE.Raycaster;a=new THREE.Box3;a.min.x=a.min.y=a.min.z=-Infinity;a.max.x=a.max.y=
a.max.z=Infinity;a=new THREE.Sphere;a.center.x=a.center.y=a.center.z=0;a.radius=Infinity;var u={};u[h.fb]=l.prototype.rg;u[h.la]=l.prototype.Py;u[h.di]=l.prototype.zM;u[h.Ra]=l.prototype.kq;u[h.ab]=l.prototype.Qy;l.cqa=function(B){B.K(b.vx).manager=new l(B)};l.yqa=function(B){var C=B.getComponent(b.vx);C.manager.dispose();C.manager=null;B.ja(b.vx)};l.frame=function(B){B.getComponent(b.vx).manager.frame()};l.iu=function(B){B.getComponent(b.vx).manager.update()};l.jjb=function(B){B.K(b.KF);l.pRa(B)};
l.pRa=function(B){var C=c.Sc(B),F=B.getComponent(b.vd);g(y,B,C&&F.kt,D);g(x,B,C&&F.Tt,E)};l.rQa=function(B){g(y,B,!1,D);g(x,B,!1,E);B.ja(b.KF)};l.ijb=function(B){B.K(b.GF);l.kRa(B)};l.kRa=function(B){var C=c.Sc(B),F=B.getComponent(b.Lr);g(z,B,C&&F.Lqa,D);g(A,B,C&&F.Mqa,E)};l.qQa=function(B){g(A,B,!1,E);g(z,B,!1,D);B.ja(b.GF)};var v=[];l.Hib=function(B){v=[];B.forEach(function(C){v.indexOf(C.T)<0&&v.push(C.T)})};var w=[];l.zpa=function(B){w=[];B.forEach(function(C){w.indexOf(C.T)<0&&w.push(C.T)})};
var y=new Map,x=new Map,z=new Map,A=new Map,D=new Map,E=new Map;return l});
define("tdv/player/view/webgl/system/selection/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/selection/Behaviour"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/selection/Behaviour");a=l.extend(k,function(){k.apply(this,arguments)});a.prototype.Yc=function(){this.qX.v.length&&this.qX.v.slice().forEach(g.cqa);this.Xj.Da.length&&
this.Xj.Da.slice().forEach(g.iu);this.Xj.v.length&&this.Xj.v.slice().forEach(g.frame);this.rX.v.length&&this.rX.v.slice().forEach(g.yqa);this.BOa.v.length&&this.BOa.v.slice().forEach(g.jjb);this.AOa.v.length&&this.AOa.Da.slice().forEach(g.pRa);this.COa.v.length&&this.COa.v.slice().forEach(g.rQa);this.DOa.v.length&&this.DOa.v.slice().forEach(g.rQa);this.YLa.v.length&&this.YLa.v.slice().forEach(g.ijb);this.XLa.v.length&&this.XLa.Da.slice().forEach(g.kRa);this.ZLa.v.length&&this.ZLa.v.slice().forEach(g.qQa);
this.$La.v.length&&this.$La.v.slice().forEach(g.qQa);(this.Moa.be.length||this.Moa.Vg.length)&&g.Hib(this.Moa.v);(this.$z.be.length||this.$z.Vg.length)&&g.zpa(this.$z.v)};a.J={};a.J.$z=[n.Jm];a.J.Moa=[n.Cl];a.J.qX=[n.yc,n.vx.aa];a.J.Xj=[n.yc,n.vx];a.J.rX=[n.yc.aa,n.vx];a.J.BOa=[n.Object3D,n.vd,n.KF.aa];a.J.AOa=[n.Object3D,n.vd,n.KF];a.J.COa=[n.Object3D.aa,n.KF];a.J.DOa=[n.vd.aa,n.KF];a.J.YLa=[n.Object3D,n.Lr,n.GF.aa];a.J.XLa=[n.Object3D,n.Lr,n.GF];a.J.ZLa=[n.Object3D.aa,n.GF];a.J.$La=[n.Lr.aa,n.GF];
return a});
define("tdv/player/view/webgl/system/light/SpotLightSystem","require exports three.mod tdv/player/view/util/Color tdv/player/view/webgl/components tdv/player/view/webgl/ecs/System tdv/player/view/webgl/system/util/entity/Util".split(" "),function(a,l,k,n,g,h,e){a=function(b){function c(){var d=b.call(this)||this;d.xb=d.xb.bind(d);d.ib=d.ib.bind(d);d.bg=d.bg.bind(d);d.Ca=d.Ca.bind(d);return d}O(c,b);c.prototype.Yc=function(){this.$D.v.length&&this.$D.v.slice().forEach(this.xb);this.aE.v.length&&this.aE.v.slice().forEach(this.Ca);
this.Di.Da.length&&this.Di.Da.slice().forEach(this.ib);this.Di.v.length&&this.Di.v.slice().forEach(this.bg)};c.prototype.xb=function(d){var f=d.K(g.Au),m=d.K(g.Object3D);f.light=m.ra=new k.SpotLight;this.ib(d)};c.prototype.ib=function(d){var f=d.getComponent(g.SpotLight),m=d.getComponent(g.Au),p=m.light;p.color=n.mr(f.color).convertLinearToSRGB();p.intensity=f.intensity*Math.PI;p.visible=p.intensity>0;p.castShadow=p.intensity>0&&f.castShadow;p.distance=f.distance;p.angle=f.angle*Math.PI/180;p.penumbra=
f.penumbra;p.decay=f.decay;p.target.position.set(0,0,1);p.add(p.target);var q=p.castShadow?f.hqa:16;q!=p.shadow.mapSize.width&&(p.shadow.dispose(),p.shadow=p.shadow.clone(),p.shadow.mapSize.width=p.shadow.mapSize.height=q);p.shadow.bias=f.gqa;p.shadow.radius=f.iqa;f.PV!=!!m.sp&&(m=d.O(g.Au),f.PV?m.sp=new k.SpotLightHelper(p):(m.sp.dispose(),m.sp=null))};c.prototype.bg=function(d){this.Uqa(d)};c.prototype.Uqa=function(d){var f=d.getComponent(g.Au);if(f=f&&f.sp)d=e.Qf(d),f.parent!=d&&(f.parent&&f.parent.remove(f),
d&&d.add(f)),f.update()};c.prototype.Ca=function(d){var f=d.getComponent(g.Au),m=f&&f.sp;m&&m.parent&&m.parent.remove(m);m&&m.dispose();f=f.light;f.parent&&f.parent.remove(f);d.ja(g.Au);d.ja(g.Object3D)};c.J={};return c}(h);a.J={};a.J.$D=[g.SpotLight,g.Au.aa];a.J.Di=[g.SpotLight,g.Au];a.J.aE=[g.SpotLight.aa,g.Au];return a});
define("tdv/player/view/webgl/system/solidMaterial/Behaviour",["require","tdv/player/view/util/Color","tdv/player/view/webgl/components"],function(a){function l(g){this.A=g;this.za=null;this.update()}var k=a("tdv/player/view/util/Color"),n=a("tdv/player/view/webgl/components");l.prototype.update=function(){this.za||(this.za=new THREE.MeshBasicMaterial,this.za.transparent=!0,this.A.K(n.Material).material=this.za);var g=this.A.getComponent(n.wd);this.za.color=k.mr(g.color||"#ffffff");this.za.opacity=
g.opacity||0;this.za.depthTest=!!g.depthTest;this.za.side=g.doubleSided?THREE.DoubleSide:THREE.FrontSide;this.za.visible=this.za.opacity>0;this.za.needsUpdate=!0};l.prototype.dispose=function(){this.za&&(this.za.dispose(),this.za=null,this.A.ja(n.Material));this.A=null};l.Va=function(g){g.K(n.wx).manager=new l(g)};l.xa=function(g){var h=g.getComponent(n.wx);h.manager.dispose();h.manager=null;g.ja(n.wx)};l.update=function(g){g.getComponent(n.wx).manager.update()};return l});
define("tdv/player/view/webgl/system/solidMaterial/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/solidMaterial/Behaviour"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/solidMaterial/Behaviour");a=l.extend(k,function(){k.apply(this,arguments)});a.prototype.Yc=function(){this.Nn.v.length&&this.Nn.v.slice().forEach(g.Va);
this.materials.Da.length&&this.materials.Da.slice().forEach(g.update);this.On.v.length&&this.On.v.slice().forEach(g.xa)};a.J={};a.J.Nn=[n.wd,n.wx.aa];a.J.materials=[n.wd,n.wx];a.J.On=[n.wd.aa,n.wx];return a});
define("tdv/player/view/webgl/system/sphere/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/util/material/Util"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/util/material/Util");a=l.extend(k,function(){k.apply(this,arguments);this.xb=this.xb.bind(this);this.ib=this.ib.bind(this);this.Ca=this.Ca.bind(this)});a.prototype.Yc=
function(){this.TPa.v.length&&this.TPa.v.slice().forEach(this.xb);this.SPa.Da.length&&this.SPa.Da.slice().forEach(this.ib);this.UPa.v.length&&this.UPa.v.slice().forEach(this.Ca);this.VPa.v.length&&this.VPa.v.slice().forEach(this.Ca)};a.prototype.xb=function(h){h.K(n.Object3D).ra=new THREE.Mesh(new THREE.SphereGeometry);h.K(n.LF);this.ib(h)};a.prototype.ib=function(h){var e=h.getComponent(n.Object3D).ra;g.AD(e,h.getComponent(n.Material).material);h=h.getComponent(n.Sphere);var b=e.geometry;if(b.radius!=
h.radius||b.widthSegments!=h.widthSegments||b.heightSegments!=h.heightSegments)b.dispose(),b=new THREE.SphereGeometry(h.radius,h.widthSegments,h.heightSegments),e.geometry=b,e.needsUpdate=!0;h=h.renderOrder||0;e.renderOrder!=h&&(e.renderOrder=h,e.needsUpdate=!0)};a.prototype.Ca=function(h){var e=h.getComponent(n.Object3D);(e=e&&e.ra)&&e.geometry&&(e.geometry.dispose(),e.geometry=null);e&&g.AD(e,null);h.ja(n.LF);h.ja(n.Object3D)};a.J={};a.J.TPa=[n.Sphere,n.Material,n.LF.aa];a.J.SPa=[n.Sphere,n.Material,
n.LF];a.J.UPa=[n.Sphere.aa,n.LF];a.J.VPa=[n.Material.aa,n.LF];return a});
define("tdv/player/view/webgl/system/sprite/Behaviour",["require","tdv/player/view/util/XR","tdv/player/view/webgl/components","tdv/player/view/webgl/system/util/entity/Util","tdv/player/view/webgl/system/util/material/Util"],function(a){function l(c){this.A=c;this.Bb=null;this.Zba=90;this.$ba=100;this.Pa=this.Ha=void 0;this.pU=!1;this.Vc=1;this.vc=this.A.O(n.Sprite).Fi=this.A.O(n.Object3D,!0).ra=new THREE.Sprite;this.vc.material.opacity=0;this.Qj();this.update();this.frame()}var k=a("tdv/player/view/util/XR"),
n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/util/entity/Util"),h=a("tdv/player/view/webgl/system/util/material/Util");l.prototype.update=function(){var c=this.A.getComponent(n.Sprite);this.Ha=c.height;this.Pa=c.width;this.pU=c.sizeAttenuation;this.vc.center.x=c.SN;this.vc.center.y=1-c.TN;this.Vc=c.scale;this.Cn();this.vc.needsUpdate=!0};l.prototype.frame=function(){this.Bb||(this.Bb=g.Qf(this.A));this.ct();this.Qj();this.Cn()};l.prototype.ct=function(){if(this.Bb){var c=
g.jw(this.Bb);if(c&&c.isPerspectiveCamera){var d=g.RD(this.Bb);if(this.Zba!=c.fov||this.$ba!=d)this.Zba=c.fov,this.$ba=d,this.Cn(),this.vc.needsUpdate=!0}}};l.prototype.Qj=function(){var c=this.Bb?this.A.getComponent(n.Material).material:null;c&&h.AD(this.vc,c);this.vc.renderOrder=this.A.getComponent(n.Sprite).renderOrder;this.vc.material&&this.vc.material.sizeAttenuation!=this.pU&&(this.vc.material.sizeAttenuation=this.pU,this.vc.material.needsUpdate=!0)};l.prototype.Cn=function(){var c=this.Ha;
this.pU||(c/=this.$ba/(2*Math.tan(this.Zba*b/2)));var d=this.Vc;this.vc.parent&&(this.vc.parent.getWorldScale(e),d/=Math.max(e.x,e.y,e.z));k.isPresenting&&this.pU&&(d/=k.xi);c*=d;d=c*this.Pa/this.Ha;var f=this.A.getComponent(n.sa)||this.A.K(n.sa);if(f.Ge!=d||f.We!=c||f.Dh!=1)f=this.A.O(n.sa,!0),f.Ge=d,f.We=c,f.Dh=1};var e=new THREE.Vector3,b=Math.PI/180;l.prototype.dispose=function(){};l.Va=function(c){c.K(n.Bu).manager=new l(c)};l.xa=function(c){var d=c.getComponent(n.Bu);d.manager.dispose();d.manager=
null;c.ja(n.Bu);c.ja(n.Object3D)};l.update=function(c){c.getComponent(n.Bu).manager.update()};l.frame=function(c){c.getComponent(n.Bu).manager.frame()};return l});
define("tdv/player/view/webgl/system/sprite/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/sprite/Behaviour"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/sprite/Behaviour");a=l.extend(k,function(){k.apply(this,arguments)});a.prototype.Yc=function(){this.XPa.v.length&&this.XPa.v.slice().forEach(g.Va);this.p9.Da.length&&
this.p9.v.slice().forEach(g.update);this.p9.v.length&&this.p9.v.slice().forEach(g.frame);this.YPa.v.length&&this.YPa.v.slice().forEach(g.xa);this.ZPa.v.length&&this.ZPa.v.slice().forEach(g.xa)};a.J={};a.J.XPa=[n.Material,n.Sprite,n.Bu.aa];a.J.p9=[n.Sprite,n.Material,n.Bu];a.J.YPa=[n.Sprite.aa,n.Bu];a.J.ZPa=[n.Material.aa,n.Bu];return a});
define("tdv/player/view/webgl/system/transform/System","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/player/view/webgl/ecs/System tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util".split(" "),function(a){function l(f,m,p){for(;f<m-180;)f+=360;for(;f>m+180;)f-=360;return k(f,m,p)}function k(f,m,p){if(!p)return m;f=(m-f)*(1-p);Math.abs(f)<1E-5&&(f=0);return m-f}var n=a("tdv/utils"),g=a("tdv/constants/EventName"),h=a("tdv/events/Event"),e=a("tdv/player/view/webgl/ecs/System"),
b=a("tdv/player/view/webgl/components"),c=a("tdv/player/view/webgl/system/util/entity/Util");a=n.extend(e,function(){e.apply(this,arguments);this.xb=this.xb.bind(this);this.ib=this.ib.bind(this);this.Ca=this.Ca.bind(this)});a.prototype.Yc=function(f,m){this.cX.v.length&&this.cX.v.slice().forEach(this.xb);this.Gt.be.length&&this.Gt.be.slice().forEach(function(p){this.ib(p,f,m)}.bind(this));this.Gt.Da.length&&this.Gt.Da.slice().forEach(function(p){this.ib(p,f,m)}.bind(this));this.iMa.v.length&&this.iMa.v.slice().forEach(function(p){this.ib(p,
f,m)}.bind(this));this.pIa.v.length&&this.pIa.v.slice().forEach(this.Ca);this.qIa.v.length&&this.qIa.v.slice().forEach(this.Ca)};a.prototype.xb=function(f){var m=f.getComponent(b.sa),p=f.K(b.Eg);p.positionX=m.positionX;p.positionY=m.positionY;p.positionZ=m.positionZ;p.Wd=m.Wd;p.fd=m.fd;p.Ve=m.Ve;p.jf=m.jf;p.scale=m.scale;p.Ge=m.Ge;p.We=m.We;p.Dh=m.Dh;p.translationX=m.translationX;p.translationY=m.translationY;p.Xe=m.Xe;this.updateMatrixWorld(f)};a.prototype.ib=function(f){var m=f.getComponent(b.sa),
p=f.getComponent(b.Eg),q=m.easing||0;q?f.getComponent(b.OF)||f.K(b.OF):f.ja(b.OF);var r=null;m.Mz!==p.Mz&&(r||(r=f.O(b.Eg)),r.Mz=m.Mz);m.positionX!==p.positionX&&(r||(r=f.O(b.Eg)),r.positionX=k(r.positionX,m.positionX,q));m.positionY!==p.positionY&&(r||(r=f.O(b.Eg)),r.positionY=k(r.positionY,m.positionY,q));m.positionZ!==p.positionZ&&(r||(r=f.O(b.Eg)),r.positionZ=k(r.positionZ,m.positionZ,q));m.Wd!==p.Wd&&(r||(r=f.O(b.Eg)),r.Wd=l(r.Wd,m.Wd,q));m.fd!==p.fd&&(r||(r=f.O(b.Eg)),r.fd=l(r.fd,m.fd,q));m.Ve!==
p.Ve&&(r||(r=f.O(b.Eg)),r.Ve=l(r.Ve,m.Ve,q));m.scale!==p.scale&&(r||(r=f.O(b.Eg)),r.scale=m.scale);m.Ge!==p.Ge&&(r||(r=f.O(b.Eg)),r.Ge=m.Ge);m.We!==p.We&&(r||(r=f.O(b.Eg)),r.We=m.We);m.Dh!==p.Dh&&(r||(r=f.O(b.Eg)),r.Dh=m.Dh);m.translationX!==p.translationX&&(r||(r=f.O(b.Eg)),r.translationX=k(r.translationX,m.translationX,q));m.translationY!==p.translationY&&(r||(r=f.O(b.Eg)),r.translationY=k(r.translationY,m.translationY,q));m.Xe!==p.Xe&&(r||(r=f.O(b.Eg)),r.Xe=k(r.Xe,m.Xe,q));r?this.updateMatrixWorld(f):
f.ja(b.OF)};var d=new THREE.Vector3;a.prototype.updateMatrixWorld=function(f){c.aY(f,f.getComponent(b.Eg));var m=f.getComponent(b.sa).M;m&&(c.getWorldPosition(f,d),f={position:{}},f.position.x=d.x,f.position.y=d.y,f.position.z=d.z,m.m(new h(g.Mm,f)))};a.prototype.Ca=function(f){f.ja(b.Eg);f.ja(b.OF)};a.J={};a.J.Gt=[b.Object3D,b.sa,b.Eg];a.J.cX=[b.Object3D,b.sa,b.Eg.aa];a.J.iMa=[b.Object3D,b.sa,b.Eg,b.OF];a.J.pIa=[b.Object3D.aa,b.sa,b.Eg];a.J.qIa=[b.sa.aa,b.Eg];return a});
define("tdv/player/view/webgl/system/transformControls/TransformControlsGizmo",["require","three.mod","tdv/constants/RenderOrder"],function(a){const l=a("three.mod"),k=a("tdv/constants/RenderOrder");class n extends l.Object3D{constructor(t){function u(M,T){M=new l.TorusGeometry(M,.0075,3,64,T*Math.PI*2);M.rotateY(Math.PI/2);M.rotateX(Math.PI/2);return M}function v(M){const T=new l.Object3D;for(const W in M)for(let X=M[W].length;X--;){const Z=M[W][X][0].clone();var S=M[W][X][1];const ca=M[W][X][2],
ea=M[W][X][3],Y=M[W][X][4];Z.name=W;Z.tag=Y;S&&Z.position.set(S[0],S[1],S[2]);ca&&Z.rotation.set(ca[0],ca[1],ca[2]);ea&&Z.scale.set(ea[0],ea[1],ea[2]);Z.updateMatrix();S=Z.geometry.clone();S.applyMatrix4(Z.matrix);Z.geometry=S;Z.renderOrder=k.ZTa;Z.position.set(0,0,0);Z.rotation.set(0,0,0);Z.scale.set(1,1,1);T.add(Z)}return T}super();this.type="TransformControlsGizmo";this.properties=t;var w=new l.MeshBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),y=new l.LineBasicMaterial({depthTest:!1,
depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0});t=w.clone();t.opacity=.15;y=y.clone();y.opacity=.5;var x=w.clone();x.color.setHex(16711680);const z=w.clone();z.color.setHex(65280);const A=w.clone();A.color.setHex(255);const D=w.clone();D.color.setHex(16711680);D.opacity=.5;const E=w.clone();E.color.setHex(65280);E.opacity=.5;const B=w.clone();B.color.setHex(255);B.opacity=.5;const C=w.clone();C.opacity=.25;var F=w.clone();F.color.setHex(16776960);F.opacity=.25;w.clone().color.setHex(16776960);
var G=w.clone();G.color.setHex(7895160);var I=new l.CylinderGeometry(0,.04,.1,12);I.translate(0,.05,0);const N=new l.BoxGeometry(.08,.08,.08);N.translate(0,.04,0);w=new l.BufferGeometry;w.setAttribute("position",new l.Float32BufferAttribute([0,0,0,1,0,0,0,0,0,0,0,0],3));const P=new l.CylinderGeometry(.0075,.0075,.5,3);P.translate(0,.25,0);I={X:[[new l.Mesh(I,x),[.5,0,0],[0,0,-Math.PI/2]],[new l.Mesh(I,x),[-.5,0,0],[0,0,Math.PI/2]],[new l.Mesh(P,x),[0,0,0],[0,0,-Math.PI/2]]],Y:[[new l.Mesh(I,z),[0,
.5,0]],[new l.Mesh(I,z),[0,-.5,0],[Math.PI,0,0]],[new l.Mesh(P,z)]],Z:[[new l.Mesh(I,A),[0,0,.5],[Math.PI/2,0,0]],[new l.Mesh(I,A),[0,0,-.5],[-Math.PI/2,0,0]],[new l.Mesh(P,A),null,[Math.PI/2,0,0]]],XYZ:[[new l.Mesh(new l.OctahedronGeometry(.1,0),C.clone()),[0,0,0]]],XY:[[new l.Mesh(new l.BoxGeometry(.15,.15,.01),B.clone()),[.15,.15,0]]],YZ:[[new l.Mesh(new l.BoxGeometry(.15,.15,.01),D.clone()),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new l.Mesh(new l.BoxGeometry(.15,.15,.01),E.clone()),[.15,0,.15],[-Math.PI/
2,0,0]]]};const Q={X:[[new l.Mesh(new l.CylinderGeometry(.2,0,.6,4),t),[.3,0,0],[0,0,-Math.PI/2]],[new l.Mesh(new l.CylinderGeometry(.2,0,.6,4),t),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new l.Mesh(new l.CylinderGeometry(.2,0,.6,4),t),[0,.3,0]],[new l.Mesh(new l.CylinderGeometry(.2,0,.6,4),t),[0,-.3,0],[0,0,Math.PI]]],Z:[[new l.Mesh(new l.CylinderGeometry(.2,0,.6,4),t),[0,0,.3],[Math.PI/2,0,0]],[new l.Mesh(new l.CylinderGeometry(.2,0,.6,4),t),[0,0,-.3],[-Math.PI/2,0,0]]],XYZ:[[new l.Mesh(new l.OctahedronGeometry(.2,
0),t)]],XY:[[new l.Mesh(new l.BoxGeometry(.2,.2,.01),t),[.15,.15,0]]],YZ:[[new l.Mesh(new l.BoxGeometry(.2,.2,.01),t),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new l.Mesh(new l.BoxGeometry(.2,.2,.01),t),[.15,0,.15],[-Math.PI/2,0,0]]]},R={START:[[new l.Mesh(new l.OctahedronGeometry(.01,2),y),null,null,null,"helper"]],END:[[new l.Mesh(new l.OctahedronGeometry(.01,2),y),null,null,null,"helper"]],DELTA:[[new l.Line(function(){const M=new l.BufferGeometry;M.setAttribute("position",new l.Float32BufferAttribute([0,
0,0,1,1,1],3));return M}(),y),null,null,null,"helper"]],X:[[new l.Line(w,y.clone()),[-1E3,0,0],null,[1E6,1,1],"helper"]],Y:[[new l.Line(w,y.clone()),[0,-1E3,0],[0,0,Math.PI/2],[1E6,1,1],"helper"]],Z:[[new l.Line(w,y.clone()),[0,0,-1E3],[0,-Math.PI/2,0],[1E6,1,1],"helper"]]};F={XYZE:[[new l.Mesh(u(.5,1),G),null,[0,Math.PI/2,0]]],X:[[new l.Mesh(u(.5,.5),x)]],Y:[[new l.Mesh(u(.5,.5),z),null,[0,0,-Math.PI/2]]],Z:[[new l.Mesh(u(.5,.5),A),null,[0,Math.PI/2,0]]],E:[[new l.Mesh(u(.75,1),F),null,[0,Math.PI/
2,0]]]};G={AXIS:[[new l.Line(w,y.clone()),[-1E3,0,0],null,[1E6,1,1],"helper"]]};const K={XYZE:[[new l.Mesh(new l.SphereGeometry(.25,10,8),t)]],X:[[new l.Mesh(new l.TorusGeometry(.5,.1,4,24),t),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],Y:[[new l.Mesh(new l.TorusGeometry(.5,.1,4,24),t),[0,0,0],[Math.PI/2,0,0]]],Z:[[new l.Mesh(new l.TorusGeometry(.5,.1,4,24),t),[0,0,0],[0,0,-Math.PI/2]]],E:[[new l.Mesh(new l.TorusGeometry(.75,.1,2,24),t)]]};x={X:[[new l.Mesh(N,x),[.5,0,0],[0,0,-Math.PI/2]],[new l.Mesh(P,x),
[0,0,0],[0,0,-Math.PI/2]],[new l.Mesh(N,x),[-.5,0,0],[0,0,Math.PI/2]]],Y:[[new l.Mesh(N,z),[0,.5,0]],[new l.Mesh(P,z)],[new l.Mesh(N,z),[0,-.5,0],[0,0,Math.PI]]],Z:[[new l.Mesh(N,A),[0,0,.5],[Math.PI/2,0,0]],[new l.Mesh(P,A),[0,0,0],[Math.PI/2,0,0]],[new l.Mesh(N,A),[0,0,-.5],[-Math.PI/2,0,0]]],XY:[[new l.Mesh(new l.BoxGeometry(.15,.15,.01),B),[.15,.15,0]]],YZ:[[new l.Mesh(new l.BoxGeometry(.15,.15,.01),D),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new l.Mesh(new l.BoxGeometry(.15,.15,.01),E),[.15,0,.15],
[-Math.PI/2,0,0]]],XYZ:[[new l.Mesh(new l.BoxGeometry(.1,.1,.1),C.clone())]]};t={X:[[new l.Mesh(new l.CylinderGeometry(.2,0,.6,4),t),[.3,0,0],[0,0,-Math.PI/2]],[new l.Mesh(new l.CylinderGeometry(.2,0,.6,4),t),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new l.Mesh(new l.CylinderGeometry(.2,0,.6,4),t),[0,.3,0]],[new l.Mesh(new l.CylinderGeometry(.2,0,.6,4),t),[0,-.3,0],[0,0,Math.PI]]],Z:[[new l.Mesh(new l.CylinderGeometry(.2,0,.6,4),t),[0,0,.3],[Math.PI/2,0,0]],[new l.Mesh(new l.CylinderGeometry(.2,0,.6,4),t),
[0,0,-.3],[-Math.PI/2,0,0]]],XY:[[new l.Mesh(new l.BoxGeometry(.2,.2,.01),t),[.15,.15,0]]],YZ:[[new l.Mesh(new l.BoxGeometry(.2,.2,.01),t),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new l.Mesh(new l.BoxGeometry(.2,.2,.01),t),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new l.Mesh(new l.BoxGeometry(.2,.2,.2),t),[0,0,0]]]};y={X:[[new l.Line(w,y.clone()),[-1E3,0,0],null,[1E6,1,1],"helper"]],Y:[[new l.Line(w,y.clone()),[0,-1E3,0],[0,0,Math.PI/2],[1E6,1,1],"helper"]],Z:[[new l.Line(w,y.clone()),[0,0,-1E3],[0,-Math.PI/
2,0],[1E6,1,1],"helper"]]};this.mA={};this.Ot={};this.jJ={};this.add(this.mA.translate=v(I));this.add(this.mA.rotate=v(F));this.add(this.mA.scale=v(x));this.add(this.Ot.translate=v(Q));this.add(this.Ot.rotate=v(K));this.add(this.Ot.scale=v(t));this.add(this.jJ.translate=v(R));this.add(this.jJ.rotate=v(G));this.add(this.jJ.scale=v(y));this.Ot.translate.visible=!1;this.Ot.rotate.visible=!1;this.Ot.scale.visible=!1}updateMatrixWorld(t){const u=(this.properties.mode==="scale"?"local":this.properties.nqa)===
"local"?this.properties.pK:m;this.mA.translate.visible=this.properties.mode==="translate";this.mA.rotate.visible=this.properties.mode==="rotate";this.mA.scale.visible=this.properties.mode==="scale";this.jJ.translate.visible=this.properties.mode==="translate";this.jJ.rotate.visible=this.properties.mode==="rotate";this.jJ.scale.visible=this.properties.mode==="scale";let v=[];v=v.concat(this.Ot[this.properties.mode].children);v=v.concat(this.mA[this.properties.mode].children);v=v.concat(this.jJ[this.properties.mode].children);
for(let y=0;y<v.length;y++){const x=v[y];x.visible=!0;x.rotation.set(0,0,0);x.position.copy(this.properties.dB);var w=void 0;this.properties.camera.isOrthographicCamera?(w=this.properties.camera,w=(w.top-w.bottom)/w.zoom):(w=this.properties.camera,w=this.properties.dB.distanceTo(this.properties.Ic)*Math.min(1.9*Math.tan(Math.PI*w.fov/360)/w.zoom,7));x.scale.set(1,1,1).multiplyScalar(w*this.properties.size/4);x.tag==="helper"?(x.visible=!1,x.name==="AXIS"?(x.visible=!!this.properties.axis,this.properties.axis===
"X"&&(h.setFromEuler(e.set(0,0,0)),x.quaternion.copy(u).multiply(h),Math.abs(b.copy(p).applyQuaternion(u).dot(this.properties.eye))>.9&&(x.visible=!1)),this.properties.axis==="Y"&&(h.setFromEuler(e.set(0,0,Math.PI/2)),x.quaternion.copy(u).multiply(h),Math.abs(b.copy(q).applyQuaternion(u).dot(this.properties.eye))>.9&&(x.visible=!1)),this.properties.axis==="Z"&&(h.setFromEuler(e.set(0,Math.PI/2,0)),x.quaternion.copy(u).multiply(h),Math.abs(b.copy(r).applyQuaternion(u).dot(this.properties.eye))>.9&&
(x.visible=!1)),this.properties.axis==="XYZE"&&(h.setFromEuler(e.set(0,Math.PI/2,0)),b.copy(this.properties.xE),x.quaternion.setFromRotationMatrix(d.lookAt(c,b,q)),x.quaternion.multiply(h),x.visible=this.properties.zk),this.properties.axis==="E"&&(x.visible=!1)):x.name==="START"?(x.position.copy(this.properties.oK),x.visible=this.properties.zk):x.name==="END"?(x.position.copy(this.properties.dB),x.visible=this.properties.zk):x.name==="DELTA"?(x.position.copy(this.properties.oK),x.quaternion.copy(this.properties.nra),
g.set(1E-10,1E-10,1E-10).add(this.properties.oK).sub(this.properties.dB).multiplyScalar(-1),g.applyQuaternion(this.properties.nra.clone().invert()),x.scale.copy(g),x.visible=this.properties.zk):(x.quaternion.copy(u),this.properties.zk?x.position.copy(this.properties.oK):x.position.copy(this.properties.dB),this.properties.axis&&(x.visible=this.properties.axis.search(x.name)!==-1))):(x.quaternion.copy(u),this.properties.mode==="translate"||this.properties.mode==="scale"?(x.name==="X"&&Math.abs(b.copy(p).applyQuaternion(u).dot(this.properties.eye))>
.99&&(x.scale.set(1E-10,1E-10,1E-10),x.visible=!1),x.name==="Y"&&Math.abs(b.copy(q).applyQuaternion(u).dot(this.properties.eye))>.99&&(x.scale.set(1E-10,1E-10,1E-10),x.visible=!1),x.name==="Z"&&Math.abs(b.copy(r).applyQuaternion(u).dot(this.properties.eye))>.99&&(x.scale.set(1E-10,1E-10,1E-10),x.visible=!1),x.name==="XY"&&Math.abs(b.copy(r).applyQuaternion(u).dot(this.properties.eye))<.2&&(x.scale.set(1E-10,1E-10,1E-10),x.visible=!1),x.name==="YZ"&&Math.abs(b.copy(p).applyQuaternion(u).dot(this.properties.eye))<
.2&&(x.scale.set(1E-10,1E-10,1E-10),x.visible=!1),x.name==="XZ"&&Math.abs(b.copy(q).applyQuaternion(u).dot(this.properties.eye))<.2&&(x.scale.set(1E-10,1E-10,1E-10),x.visible=!1)):this.properties.mode==="rotate"&&(f.copy(u),b.copy(this.properties.eye).applyQuaternion(h.copy(u).invert()),x.name.search("E")!==-1&&x.quaternion.setFromRotationMatrix(d.lookAt(this.properties.eye,c,q)),x.name==="X"&&(h.setFromAxisAngle(p,Math.atan2(-b.y,b.z)),h.multiplyQuaternions(f,h),x.quaternion.copy(h)),x.name==="Y"&&
(h.setFromAxisAngle(q,Math.atan2(b.x,b.z)),h.multiplyQuaternions(f,h),x.quaternion.copy(h)),x.name==="Z"&&(h.setFromAxisAngle(r,Math.atan2(b.y,b.x)),h.multiplyQuaternions(f,h),x.quaternion.copy(h))),x.visible=x.visible&&(x.name.indexOf("X")===-1||this.properties.IPa),x.visible=x.visible&&(x.name.indexOf("Y")===-1||this.properties.JPa),x.visible=x.visible&&(x.name.indexOf("Z")===-1||this.properties.KPa),x.visible=x.visible&&(x.name.indexOf("E")===-1||this.properties.IPa&&this.properties.JPa&&this.properties.KPa),
x.material.Ie=x.material.Ie||x.material.color.clone(),x.material.Mf=x.material.Mf||x.material.opacity,x.material.color.copy(x.material.Ie),x.material.opacity=x.material.Mf,this.properties.enabled&&this.properties.axis&&(x.name===this.properties.axis?(x.material.color.setHex(16776960),x.material.opacity=1):this.properties.axis.split("").some(function(z){return x.name===z})&&(x.material.color.setHex(16776960),x.material.opacity=1)))}super.updateMatrixWorld(t)}}const g=new l.Vector3,h=new l.Quaternion,
e=new l.Euler,b=new l.Vector3(0,1,0),c=new l.Vector3(0,0,0),d=new l.Matrix4,f=new l.Quaternion,m=new l.Quaternion,p=new l.Vector3(1,0,0),q=new l.Vector3(0,1,0),r=new l.Vector3(0,0,1);return n});
define("tdv/player/view/webgl/system/transformControls/TransformControlsPlane",["require","three.mod"],function(a){const l=a("three.mod");class k extends l.Mesh{constructor(r){super(new l.PlaneGeometry(1E5,1E5,2,2),new l.MeshBasicMaterial({visible:!1,wireframe:!0,side:l.DoubleSide,transparent:!0,opacity:.1,toneMapped:!1}));this.properties=r;this.type="TransformControlsPlane"}updateMatrixWorld(r){let t=this.properties.nqa;this.position.copy(this.properties.dB);this.properties.mode==="scale"&&(t="local");
m.copy(c).applyQuaternion(t==="local"?this.properties.pK:h);p.copy(d).applyQuaternion(t==="local"?this.properties.pK:h);q.copy(f).applyQuaternion(t==="local"?this.properties.pK:h);g.copy(p);switch(this.properties.mode){case "translate":case "scale":switch(this.properties.axis){case "X":g.copy(this.properties.eye).cross(m);e.copy(m).cross(g);break;case "Y":g.copy(this.properties.eye).cross(p);e.copy(p).cross(g);break;case "Z":g.copy(this.properties.eye).cross(q);e.copy(q).cross(g);break;case "XY":e.copy(q);
break;case "YZ":e.copy(m);break;case "XZ":g.copy(q);e.copy(p);break;case "XYZ":case "E":e.set(0,0,0)}break;default:e.set(0,0,0)}e.length()===0?this.quaternion.copy(this.properties.VGa):(b.lookAt(n.set(0,0,0),e,g),this.quaternion.setFromRotationMatrix(b));super.updateMatrixWorld(r)}}const n=new l.Vector3,g=new l.Vector3(0,1,0),h=new l.Quaternion,e=new l.Vector3,b=new l.Matrix4,c=new l.Vector3(1,0,0),d=new l.Vector3(0,1,0),f=new l.Vector3(0,0,1),m=new l.Vector3,p=new l.Vector3,q=new l.Vector3;return k});
define("tdv/player/view/webgl/system/transformControls/TransformControls",["require","three.mod","tdv/player/view/webgl/system/transformControls/TransformControlsGizmo","tdv/player/view/webgl/system/transformControls/TransformControlsPlane"],function(a){function l(r,t,u){r=t.intersectObject(r,!0);for(t=0;t<r.length;t++)if(r[t].object.visible||u)return r[t];return!1}var k=a("three.mod"),n=a("tdv/player/view/webgl/system/transformControls/TransformControlsGizmo"),g=a("tdv/player/view/webgl/system/transformControls/TransformControlsPlane");
const h=new k.Vector3,e=new k.Vector3,b=new k.Quaternion,c={X:new k.Vector3(1,0,0),Y:new k.Vector3(0,1,0),Z:new k.Vector3(0,0,1)},d={type:"change"},f={type:"mouseDown",mode:null},m={type:"mouseUp",mode:null},p={type:"objectChange"};class q extends k.Object3D{constructor(r){super();this.camera=r;this.visible=!1;this.mA=r=new n(this);this.add(r);this.jh=r=new g(this);this.add(r);this.object=void 0;this.enabled=!0;this.axis=null;this.mode="translate";this.zk=!1;this.Hw=this.npa=this.Dp=null;this.nqa=
"world";this.size=1;this.KPa=this.JPa=this.IPa=!0;this.offset=new k.Vector3;this.cQa=new k.Vector3;this.lIa=new k.Vector3;this.xi=new k.Vector3;this.ogb=new k.Vector3;this.mNa=new k.Quaternion;this.Foa=new k.Quaternion;this.Goa=new k.Vector3;this.Mlb=new k.Vector3;this.X9=new k.Quaternion;this.Llb=new k.Vector3;this.Ooa=new k.Vector3;this.HJ=new k.Quaternion;this.rpa=new k.Vector3;this.dB=new k.Vector3;this.oK=new k.Vector3;this.pK=new k.Quaternion;this.nra=new k.Quaternion;this.Ic=new k.Vector3;
this.VGa=new k.Quaternion;this.GA=new k.Vector3;this.FA=new k.Vector3;this.xE=new k.Vector3;this.rotationAngle=0;this.eye=new k.Vector3}updateMatrixWorld(r=!1){this.object!==void 0&&(this.object.updateMatrixWorld(),this.object.parent===null?console.error("TransformControls: The attached 3D object must be a part of the scene graph."):this.object.parent.matrixWorld.decompose(this.ogb,this.mNa,this.Goa),this.object.matrixWorld.decompose(this.dB,this.pK,this.Llb),this.Foa.copy(this.mNa).invert(),this.X9.copy(this.pK).invert());
this.camera.updateMatrixWorld();this.camera.matrixWorld.decompose(this.Ic,this.VGa,this.xi);this.camera.isOrthographicCamera?this.camera.getWorldDirection(this.eye).negate():this.eye.copy(this.Ic).sub(this.dB).normalize();super.updateMatrixWorld(r)}xgb(r){if(this.object!==void 0&&this.zk!==!0&&this.axis!==null){if(r=l(this.jh,r,!0))this.object.updateMatrixWorld(),this.object.parent&&this.object.parent.updateMatrixWorld(),this.Ooa.copy(this.object.position),this.HJ.copy(this.object.quaternion),this.rpa.copy(this.object.scale),
this.object.matrixWorld.decompose(this.oK,this.nra,this.Mlb),this.GA.copy(r.point).sub(this.oK);this.zk=!0;f.mode=this.mode;this.dispatchEvent(f)}}ygb(r){if(this.zk===!1){var t=l(this.mA.Ot[this.mode],r);this.axis=t?t.object.name:null}else{t=this.axis;var u=this.mode,v=this.object,w=this.nqa;if(u==="scale")w="local";else if(t==="E"||t==="XYZE"||t==="XYZ")w="world";if(v!==void 0&&t!==null&&this.zk!==!1&&(r=l(this.jh,r,!0))){this.FA.copy(r.point).sub(this.oK);if(u==="translate")this.offset.copy(this.FA).sub(this.GA),
w==="local"&&t!=="XYZ"&&this.offset.applyQuaternion(this.X9),t.indexOf("X")===-1&&(this.offset.x=0),t.indexOf("Y")===-1&&(this.offset.y=0),t.indexOf("Z")===-1&&(this.offset.z=0),w==="local"&&t!=="XYZ"?this.offset.applyQuaternion(this.HJ).divide(this.Goa):this.offset.applyQuaternion(this.Foa).divide(this.Goa),v.position.copy(this.offset).add(this.Ooa),this.Dp&&(w==="local"&&(v.position.applyQuaternion(b.copy(this.HJ).invert()),t.search("X")!==-1&&(v.position.x=Math.round(v.position.x/this.Dp)*this.Dp),
t.search("Y")!==-1&&(v.position.y=Math.round(v.position.y/this.Dp)*this.Dp),t.search("Z")!==-1&&(v.position.z=Math.round(v.position.z/this.Dp)*this.Dp),v.position.applyQuaternion(this.HJ)),w==="world"&&(v.parent&&v.position.add(h.setFromMatrixPosition(v.parent.matrixWorld)),t.search("X")!==-1&&(v.position.x=Math.round(v.position.x/this.Dp)*this.Dp),t.search("Y")!==-1&&(v.position.y=Math.round(v.position.y/this.Dp)*this.Dp),t.search("Z")!==-1&&(v.position.z=Math.round(v.position.z/this.Dp)*this.Dp),
v.parent&&v.position.sub(h.setFromMatrixPosition(v.parent.matrixWorld))));else if(u==="scale")t.search("XYZ")!==-1?(w=this.FA.length()/this.GA.length(),this.FA.dot(this.GA)<0&&(w*=-1),e.set(w,w,w)):(h.copy(this.GA),e.copy(this.FA),h.applyQuaternion(this.X9),e.applyQuaternion(this.X9),e.divide(h),t.search("X")===-1&&(e.x=1),t.search("Y")===-1&&(e.y=1),t.search("Z")===-1&&(e.z=1)),v.scale.copy(this.rpa).multiply(e),this.Hw&&(t.search("X")!==-1&&(v.scale.x=Math.round(v.scale.x/this.Hw)*this.Hw||this.Hw),
t.search("Y")!==-1&&(v.scale.y=Math.round(v.scale.y/this.Hw)*this.Hw||this.Hw),t.search("Z")!==-1&&(v.scale.z=Math.round(v.scale.z/this.Hw)*this.Hw||this.Hw));else if(u==="rotate"){this.offset.copy(this.FA).sub(this.GA);u=20/this.dB.distanceTo(h.setFromMatrixPosition(this.camera.matrixWorld));r=!1;if(t==="XYZE")this.xE.copy(this.offset).cross(this.eye).normalize(),this.rotationAngle=this.offset.dot(h.copy(this.xE).cross(this.eye))*u;else if(t==="X"||t==="Y"||t==="Z")this.xE.copy(c[t]),h.copy(c[t]),
w==="local"&&h.applyQuaternion(this.pK),h.cross(this.eye),h.length()===0?r=!0:this.rotationAngle=this.offset.dot(h.normalize())*u;if(t==="E"||r)this.xE.copy(this.eye),this.rotationAngle=this.FA.angleTo(this.GA),this.cQa.copy(this.GA).normalize(),this.lIa.copy(this.FA).normalize(),this.rotationAngle*=this.lIa.cross(this.cQa).dot(this.eye)<0?1:-1;this.npa&&(this.rotationAngle=Math.round(this.rotationAngle/this.npa)*this.npa);w==="local"&&t!=="E"&&t!=="XYZE"?(v.quaternion.copy(this.HJ),v.quaternion.multiply(b.setFromAxisAngle(this.xE,
this.rotationAngle)).normalize()):(this.xE.applyQuaternion(this.Foa),v.quaternion.copy(b.setFromAxisAngle(this.xE,this.rotationAngle)),v.quaternion.multiply(this.HJ).normalize())}this.dispatchEvent(d);this.dispatchEvent(p)}}}DNa(){this.zk&&this.axis!==null&&(m.mode=this.mode,this.dispatchEvent(m));this.zk=!1;this.axis=null}dispose(){this.traverse(r=>{r.geometry&&r.geometry.dispose();r.material&&r.material.dispose()})}attach(r){this.object=r;this.visible=!0;return this}detach(){this.object=void 0;
this.visible=!1;this.axis=null;return this}reset(){this.enabled&&this.zk&&(this.object.position.copy(this.Ooa),this.object.quaternion.copy(this.HJ),this.object.scale.copy(this.rpa),this.dispatchEvent(d),this.dispatchEvent(p),this.GA.copy(this.FA))}setSize(r){this.size=r}}return q});
define("tdv/player/view/webgl/system/transformControls/System","require exports three.mod tdv/constants/EventName tdv/events/Event tdv/player/view/webgl/components tdv/player/view/webgl/ecs/System tdv/player/view/webgl/system/util/RaycastUtil tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/system/transformControls/TransformControls tdv/player/view/util/XR".split(" "),function(a,l,k,n,g,h,e,b,c,d,f){function m(w){var y=this,x=y.getComponent(h.Om),z=y.getComponent(h.Fh),A=x.I9;x=
x.Gk;if(A&&x)if(r.hIa.find(function(E){return E!=y}))A.zk&&A.DNa(b.i5(v,A.camera,x));else{var D=x.getComponent(h.yc).JD;w.name==n.Ra?(A.xgb(b.i5(v,A.camera,x)),D.h(n.la,m,y),A.zk&&(D.bind(n.la,m,y,!0),A.object.userData={position:A.object.position.clone(),quaternion:A.object.quaternion.clone(),scale:A.object.scale.clone()})):w.name==n.ab?A.DNa(b.i5(v,A.camera,x)):w.name==n.fb?(f.isPresenting||D.h(n.la,m,y),A.ygb(b.i5(v,A.camera,x))):w.name==n.la&&(A.reset(),A.object.position.copy(A.object.userData.position),
A.object.quaternion.copy(A.object.userData.quaternion),A.object.scale.copy(A.object.userData.scale),x=q(z),A.mode=x[(x.indexOf(A.mode)+1)%x.length]);A.zk&&!y.getComponent(h.Jm)?y.K(h.Jm):!A.zk&&y.getComponent(h.Jm)&&y.ja(h.Jm);z.M&&(A.zk&&w.name==n.fb||w.name==n.la)&&(t.compose(A.object.position,A.object.quaternion,A.object.scale),u.multiplyMatrices(A.object.parent.matrixWorld,t),z.M.m(new g(n.V,{position:A.object.position,quaternion:A.object.quaternion,scale:p(A.object.scale),matrix:t,matrixWorld:u})))}}
function p(w){var y=Math.abs(w.x-w.y)+Math.abs(w.x-w.z),x=Math.abs(w.y-w.x)+Math.abs(w.y-w.z),z=Math.abs(w.z-w.x)+Math.abs(w.z-w.y);if(!(y>x&&y>z)){if(x>y&&x>z)return w.y;if(z>y&&z>x)return w.z}return w.x}function q(w){var y=[];w.translate&&y.push("translate");w.rotate&&y.push("rotate");w.scale&&y.push("scale");y.length==0&&y.push("translate");return y}var r=function(w){function y(){var x=w.call(this)||this;x.xb=x.xb.bind(x);x.ib=x.ib.bind(x);x.Ca=x.Ca.bind(x);return x}O(y,w);y.prototype.Yc=function(){this.EQa.v.length&&
this.EQa.v.slice().forEach(this.xb);this.FQa.v.length&&this.FQa.v.slice().forEach(this.Ca);this.GQa.v.length&&this.GQa.v.slice().forEach(this.Ca);this.DQa.v.length&&this.DQa.v.slice().forEach(this.ib);y.hIa=this.$z.v};y.prototype.xb=function(x){x.K(h.Om)};y.prototype.ib=function(x){this.tlb(x);this.iu(x)};y.prototype.tlb=function(x){var z=x.getComponent(h.Object3D).ra,A;a:{for(A=z;A;){if(!A.visible){A=!1;break a}A=A.parent}A=!0}A||(z=null);var D=c.Qf(x),E=D&&c.jw(D),B=x.getComponent(h.Fh);A=x.getComponent(h.Om).I9;
A&&z&&A.camera===E&&A.parent===D||(A&&(A.object.parent.remove(A.object),A.detach(),A.dispose()),A=null,E&&z&&D&&(A=new d(E),A.attach(new k.Object3D),D.add(A)),x.O(h.Om).I9=A);A&&z&&(z.parent!=A.object.parent&&(A.object.parent&&A.object.parent.remove(A.object),z.parent&&z.parent.add(A.object)),x=q(B),x.indexOf(A.mode)==-1&&(A.mode=x[0]),A.object.matrix.copy(z.matrix),A.object.matrix.decompose(A.object.position,A.object.quaternion,A.object.scale))};y.prototype.iu=function(x){var z=x.getComponent(h.Om),
A=this.Vcb(x),D=A&&A.getComponent(h.yc).JD||null,E=(z=z.Gk)&&z.getComponent(h.yc);E=E&&E.JD||null;A!=z&&(E&&(E.h(n.Ra,m,x),E.h(n.ab,m,x),E.h(n.fb,m,x),E.h(n.la,m,x)),x.O(h.Om).le=D)&&(D.bind(n.Ra,m,x,!0),D.bind(n.ab,m,x,!0),D.bind(n.fb,m,x,!0));A!=z&&(x.O(h.Om).Gk=A)};y.prototype.Vcb=function(x){return this.Xj.v.length?this.Xj.v.reduce(function(z,A){if(A.T!==x.T)return z;if(!z)return A;var D=A.getComponent(h.yc);return!z.getComponent(h.yc).Sg&&D.Sg?A:z}):null};y.prototype.Ca=function(x){var z=x.getComponent(h.Om),
A=z&&z.I9;A&&(A.object.parent.remove(A.object),A.detach(),A.dispose());if(z=z.le)z.h(n.Ra,m,x),z.h(n.ab,m,x),z.h(n.fb,m,x),z.h(n.la,m,x);x.ja(h.Om)};y.J={};y.hIa=[];return y}(e),t=new k.Matrix4,u=new k.Matrix4,v=new k.Raycaster;r.J.$z=[h.Jm];r.J.Xj=[h.yc];r.J.DQa=[h.Object3D,h.Fh,h.Om];r.J.EQa=[h.Object3D,h.Fh,h.Om.aa];r.J.FQa=[h.Object3D.aa,h.Om];r.J.GQa=[h.Fh.aa,h.Om];return r});
define("tdv/player/view/webgl/system/videoMaterial/VideoPlayerController",["require","tdv/constants/EventName","tdv/constants/PlaybackState","tdv/events/Event","tdv/view/av/VideoPlayer"],function(a){function l(e,b,c,d){this.qa=e;this.B=b;this.Ae=c;this.Na=d;this.Ee=e.Vb();this.mg=this.B.get("currentTime");this.H=this.B.get("state");this.Ol=this.B.get("loop");this.M2=this.Ee.get("mute");this.z1=this.B.get("mute");this.H=this.B.get("autoplay")?n.PLAYING:n.Yb;this.mba();this.B.set("state",this.H);this.qa.Ag(this.M2||
this.z1);this.qa.setLoop(this.Ol);this.qa.setCurrentTime(this.mg);this.qa.Zc(this.H)}var k=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/events/Event"),h=a("tdv/view/av/VideoPlayer");l.prototype.dispose=function(){this.fia()};l.prototype.QAa=function(){var e=this.B.get("currentTime",0);this.mg!=e&&this.qa.setCurrentTime(this.mg=e)};l.prototype.UAa=function(){var e=this.B.get("state",n.ca);this.H!=e&&this.qa.Zc(this.H=e)};l.prototype.SAa=function(){var e=this.B.get("mute",
!1);this.z1!=e&&this.qa.Ag(this.M2||(this.z1=e))};l.prototype.RAa=function(){var e=this.B.get("loop",!1);this.Ol!=e&&this.qa.setLoop(this.Ol=e)};l.prototype.gT=function(){var e=this.Ee.get("mute",!1);this.M2!=e&&this.qa.Ag((this.M2=e)||this.z1)};l.prototype.qT=function(){this.B.set("currentTime",this.mg=this.qa.getCurrentTime())};l.prototype.oT=function(){this.B.set("duration",this.qa.hj())};l.prototype.pT=function(){this.B.set("state",this.H=this.qa.getState());this.Na()};l.prototype.rT=function(){this.Ae.m(new g(k.Sb))};
l.prototype.mba=function(){this.Ee.bind(k.N("mute"),this.gT,this,!0);this.qa.bind(h.Cg,this.qT,this,!0);this.qa.bind(h.Zj,this.oT,this,!0);this.qa.bind(k.$e,this.pT,this,!0);this.qa.bind(k.Sb,this.rT,this,!0);this.B.bind(k.N("currentTime"),this.QAa,this,!0);this.B.bind(k.N("state"),this.UAa,this,!0);this.B.bind(k.N("mute"),this.SAa,this,!0);this.B.bind(k.N("loop"),this.RAa,this,!0)};l.prototype.fia=function(){this.Ee.h(k.N("mute"),this.gT,this,!0);this.qa.h(h.Cg,this.qT,this,!0);this.qa.h(h.Zj,this.oT,
this,!0);this.qa.h(k.$e,this.pT,this,!0);this.qa.h(k.Sb,this.rT,this,!0);this.B.h(k.N("currentTime"),this.QAa,this,!0);this.B.h(k.N("state"),this.UAa,this,!0);this.B.h(k.N("mute"),this.SAa,this,!0);this.B.h(k.N("loop"),this.RAa,this,!0)};return l});
define("tdv/player/view/webgl/system/videoMaterial/TextureController","require tdv/constants/EventName tdv/constants/PlaybackState tdv/constants/Priority tdv/player/view/image/Item tdv/player/view/image/Repository tdv/player/view/webgl/system/util/texture/Util tdv/player/view/webgl/system/util/Util tdv/player/view/util/Device".split(" "),function(a){function l(f,m,p,q){this.P_=d.Ub()==d.Xw?THREE.LinearSRGBColorSpace:m.get("encoding","srgb")=="srgb"?THREE.SRGBColorSpace:THREE.LinearSRGBColorSpace;
this.$r();this.qa=f;this.B=m;this.rb=p;this.Na=q;this.SM=this.rb.get("posterURL");this.IFa=this.rb.get("url");this.Pa=this.rb.get("width");this.Ha=this.rb.get("height");this.Fg=null;this.hI=this.iI=void 0;this.xya();this.rb.bind(k.N("posterURL"),this.OAa,this,!0);this.Na();this.Fa=this.fa=null}var k=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/constants/Priority"),h=a("tdv/player/view/image/Item"),e=a("tdv/player/view/image/Repository"),b=a("tdv/player/view/webgl/system/util/texture/Util"),
c=a("tdv/player/view/webgl/system/util/Util"),d=a("tdv/player/view/util/Device");l.prototype.update=function(){var f=this.qa.j6();f.isEmpty()&&(f=null);if(f&&(!this.Fg||this.Fg&&!this.Fg.isEqual(f))){this.Fg=f;f=this.Fg.Ru;var m=c.QO(f);m&&(f.width=f.videoWidth||this.Pa,f.height=f.videoHeight||this.Ha);!this.fa&&this.IFa&&c.zRa(this.IFa)&&(this.fa=document.createElement("canvas"),this.fa.width=this.Pa,this.fa.height=this.Ha,this.Fa=this.fa.getContext("2d"));this.fa&&m&&(this.Fa.drawImage(f,0,0,this.fa.width,
this.fa.height),f=this.fa);this.tDa(f)}else!this.Fg&&this.bz&&this.Ma.image!=this.bz&&this.tDa(this.bz);(this.Ma.needsUpdate||this.qa.getState()==n.PLAYING)&&this.Na()};l.prototype.OAa=function(){this.t6a(this.rb.get("posterURL"))};l.prototype.t6a=function(f){this.SM!=f&&(this.DEa(),this.SM=f,this.xya())};l.prototype.xya=function(){this.SM&&(this.bz=null,this.RM=new h,this.RM.AP([this.SM]),this.RM.bind(k.ia,this.NAa,this,!0),e.rA(this.RM,this.B.get("loadPriority",g.Mp)))};l.prototype.DEa=function(){this.SM&&
(this.RM.h(k.ia,this.NAa,this,!0),e.eo(this.RM,this.B.get("loadPriority",g.Mp)),this.bz=this.RM=null)};l.prototype.NAa=function(){this.bz=e.xg(this.SM);if(this.bz.width!=this.Pa||this.bz.height!=this.Ha){var f=document.createElement("canvas"),m=f.getContext("2d");f.width=this.Pa;f.height=this.Ha;m.drawImage(this.bz,0,0,this.Pa,this.Ha);this.bz=f}this.Na()};l.prototype.tDa=function(f){this.Ma&&this.iI==f.width&&this.hI==f.height?this.Ma.image=f:this.$r(f);this.Ma.needsUpdate=!0};l.prototype.$r=function(f){this.G_();
this.Ma=new THREE.Texture;this.Ma.image=f||b.$Ia();this.iI=this.Ma.image.width;this.hI=this.Ma.image.height;this.Ma.generateMipmaps=!1;this.Ma.minFilter=THREE.LinearFilter;this.Ma.magFilter=THREE.LinearFilter;this.Ma.format=THREE.RGBAFormat};l.prototype.G_=function(){this.Ma&&(this.hI=this.iI=void 0,this.Ma.dispose(),this.Ma=null)};l.prototype.dispose=function(){this.DEa();this.rb.h(k.N("posterURL"),this.OAa,this,!0);this.Fa=this.rb=null;this.fa&&(this.fa=this.fa.width=this.fa.height=0);this.G_();
this.Na=this.Rh=this.qa=null};l.prototype.B6=function(){return this.Ma};return l});
define("tdv/player/view/webgl/system/videoMaterial/AlphaMapController","require exports tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/Priority tdv/player/view/image/Item tdv/player/view/image/Repository three.mod".split(" "),function(a,l,k,n,g,h,e,b){var c=["alphaMap"];return function(){function d(f,m,p){this.Ahb=function(q){this.d5!=q&&(this.WQa(),this.d5=q,this.kfb())};this.properties=f;this.level=m;this.Za=p;this.R7=this.R7.bind(this);k.ba(this.level,c,this.R7,!0)}d.prototype.dispose=
function(){k.da(this.level,c,this.R7);this.WQa();this.I5()};d.prototype.B6=function(){return this.texture};d.prototype.R7=function(){this.Ahb(this.level.get("alphaMapURL"))};d.prototype.kfb=function(){this.d5&&(this.DI=new h,this.DI.AP([this.d5]),this.DI.bind(n.ia,this.jMa,this,!0),e.rA(this.DI,this.properties.get("loadPriority",g.Mp)))};d.prototype.WQa=function(){this.DI&&(this.DI.h(n.ia,this.jMa,this,!0),e.eo(this.DI,this.properties.get("loadPriority",g.Mp)),this.kGa=this.DI=null)};d.prototype.jMa=
function(){this.kGa=e.xg(this.d5);this.createTexture();this.Za()};d.prototype.createTexture=function(){this.texture=new b.Texture;this.texture.image=this.kGa;this.texture.generateMipmaps=!1;this.texture.minFilter=b.LinearFilter;this.texture.magFilter=b.LinearFilter;this.texture.format=b.RGBAFormat;this.texture.needsUpdate=!0};d.prototype.I5=function(){this.texture&&(this.texture.dispose(),this.texture=null)};return d}()});
define("tdv/player/view/webgl/system/util/material/VideoShader",["require","tdv/player/view/util/Device","tdv/player/view/webgl/system/util/Util"],function(a){a("tdv/player/view/util/Device");var l=a("tdv/player/view/webgl/system/util/Util");return{fSa:function(){this.blending=0;this.TO=void 0;this.MPa=this.threshold=0},fUa:function(){this.LO=!1;this.height=this.width=100},create:function(k,n,g){var h=k.LO&&l.uKa(),e=k.LO&&l.tKa(),b=void 0,c=!h,d={uniforms:{},transparent:!0};d.uniforms.text1={type:"sampler2D",
value:null};d.uniforms.textAlpha={type:"sampler2D",value:null};d.uniforms.validTextAlpha={type:"bool",value:!1};d.uniforms.opacity={type:"float",value:1};d.vertexShader=["varying vec2 vUV;\nvoid main() {","\tvUV = vec2( uv.x, "+(h?"1.0 - uv.y":"uv.y")+");","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}"].join("\n");if(e||n.blending||n.TO){h=[];var f=[];h=h.concat(["uniform sampler2D text1;","uniform sampler2D textAlpha;","uniform bool validTextAlpha;","uniform float opacity;",
"varying vec2 vUV;"]);f=f.concat(["   vec4 color = texture2D(text1, vUV);","   float alpha = color.a * opacity;","   if (validTextAlpha)","       alpha *= texture2D(textAlpha, vUV).r;"]);n.blending&&(b=Math.min(k.width,k.height)*.5*n.blending,d.uniforms.blendingLimit={type:"v2",value:new THREE.Vector2(b/k.width,b/k.height)},h=h.concat(["uniform vec2 blendingLimit;"]),f=f.concat("   float xCoef = 0.0;,   float yCoef = 0.0;,   if (vUV.x < blendingLimit.x) {,      xCoef = 1.0 - (vUV.x / blendingLimit.x);,      xCoef = xCoef * xCoef;,   } else if ((1.0 - vUV.x) < blendingLimit.x) {,      xCoef = 1.0 - ((1.0 - vUV.x) / blendingLimit.x);,      xCoef = xCoef * xCoef;,   },   if (vUV.y < blendingLimit.y) {,      yCoef = 1.0 - (vUV.y / blendingLimit.y);,      yCoef = yCoef * yCoef;,   } else if ((1.0 - vUV.y) < blendingLimit.y) {,      yCoef = 1.0 - ((1.0 - vUV.y) / blendingLimit.y);,      yCoef = yCoef * yCoef;,   },   alpha = alpha * (1.0 - sqrt(xCoef + yCoef));".split(",")));
n.TO&&(d.uniforms.chromaColor={type:"v3",value:new THREE.Vector3(parseInt(n.TO.substr(1,2),16)/255,parseInt(n.TO.substr(3,2),16)/255,parseInt(n.TO.substr(5,2),16)/255)},d.uniforms.chromaThreshold={type:"f",value:n.threshold},d.uniforms.chromaSmoothing={type:"f",value:n.MPa},h=h.concat(["uniform vec3 chromaColor;","uniform float chromaThreshold;","uniform float chromaSmoothing;"]),f=f.concat("    float maskY = 0.2989 * chromaColor.r + 0.5866 * chromaColor.g + 0.1145 * chromaColor.b;{    float maskCr = 0.7132 * (chromaColor.r - maskY);{    float maskCb = 0.5647 * (chromaColor.b - maskY);{    float Y = 0.2989 * color.r + 0.5866 * color.g + 0.1145 * color.b;{    float Cr = 0.7132 * (color.r - Y);{    float Cb = 0.5647 * (color.b - Y);{    float chromaBlendValue = smoothstep(chromaThreshold, chromaThreshold + chromaSmoothing, distance(vec2(Cr, Cb), vec2(maskCr, maskCb)));{    alpha = alpha * chromaBlendValue;".split("{")));
f=f.concat(["\tgl_FragColor = vec4(color"+(e?".bgr":".rgb")+", alpha);"]);b=THREE.RGBAFormat;d.fragmentShader=[].concat(h,["void main() {"],f,[],["}"]).join("\n")}else d.fragmentShader="uniform sampler2D text1;\nuniform sampler2D textAlpha;\nuniform bool validTextAlpha;\nuniform float opacity;\nvarying vec2 vUV;\nvoid main() {\n   vec4 color = texture2D(text1, vUV);\n   float alpha = color.a * opacity;\n   if (validTextAlpha)\n       alpha *= 1.0 - texture2D(textAlpha, vUV).r;\n\tgl_FragColor = vec4(color.rgb, alpha);\n\n}";
k=new THREE.ShaderMaterial(d);k.transparent=!0;k.depthWrite=!0;k.side=THREE.FrontSide;k.depthTest=!0;k.needsUpdate=!0;k.userData.yQa=c;k.userData.zQa=b;this.EY(k,g);return k},EY:function(k,n){k.uniforms.text1.value!==n&&(k.userData.yQa!==void 0&&(n.flipY=k.userData.yQa),k.userData.zQa!==void 0&&(n.format=k.userData.zQa),k.uniforms.text1.value=n)},zkb:function(k,n){k.uniforms.textAlpha.value!==n&&(k.uniforms.textAlpha.value=n,k.uniforms.validTextAlpha.value=!!n)}}});
define("tdv/player/view/webgl/system/videoMaterial/Behaviour","require tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/PlaybackState tdv/player/view/webgl/system/videoMaterial/VideoPlayerController tdv/player/view/webgl/system/videoMaterial/TextureController tdv/player/view/webgl/system/videoMaterial/AlphaMapController tdv/player/view/webgl/system/util/material/VideoShader tdv/player/view/webgl/system/util/Util tdv/player/view/webgl/components tdv/view/av/SubtitleController tdv/view/av/VideoPlayer".split(" "),
function(a){function l(q){this.A=q;this.L1=this.L1.bind(this);q=q.getComponent(f.qo);this.Ae=q.M;this.B=q.properties;this.O4=q.ira;this.Ee=this.A.T.Uq();this.Na=this.Na.bind(this);this.fh=!1;this.rb=null;k.ba(this.O4,["levels.url","levels.srcObject","levels.width","levels.height"],this.L1,!0)}var k=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/constants/PlaybackState"),h=a("tdv/player/view/webgl/system/videoMaterial/VideoPlayerController"),e=a("tdv/player/view/webgl/system/videoMaterial/TextureController"),
b=a("tdv/player/view/webgl/system/videoMaterial/AlphaMapController"),c=a("tdv/player/view/webgl/system/util/material/VideoShader"),d=a("tdv/player/view/webgl/system/util/Util"),f=a("tdv/player/view/webgl/components"),m=a("tdv/view/av/SubtitleController"),p=a("tdv/view/av/VideoPlayer");l.prototype.update=function(){this.fh&&(this.fh=!1,this.Hq.update(),c.EY(this.za,this.Hq.B6()),c.zkb(this.za,this.pba.B6()))};l.prototype.L1=function(){this.eU(p.Ak(this.O4))};l.prototype.eU=function(q){q=q&&(q.get("url")||
q.get("srcObject"))?q:null;this.rb!=q&&(this.rb&&(this.HFa.dispose(),this.HFa=null,this.B.h(n.N("opacity"),this.TAa,this,!0),this.dda(),this.Hq.dispose(),this.Hq=null,this.pba.dispose(),this.pba=null,this.HYa(),this.fh=!1),this.rb=q)&&(this.rYa(),this.HFa=new h(this.qa,this.B,this.Ae,this.Na),this.Hq=new e(this.qa,this.B,this.rb,this.Na),this.pba=new b(this.B,this.rb,this.Na),this.Wx(),this.B.bind(n.N("opacity"),this.TAa,this,!0),this.hDa(this.Mf=this.B.get("opacity",1)),this.fh=!1,this.Na())};l.prototype.Na=
function(){this.fh||(this.fh=!0,this.A.T.Za())};l.prototype.rYa=function(){this.qa=new p(this.A.T.Uq(),this.O4);this.wn=new m(this.B,this.qa)};l.prototype.HYa=function(){this.qa.Zc(g.ca);this.qa.clear();this.qa=null;this.wn.clear();this.wn=null};l.prototype.Wx=function(){var q=new c.fUa;q.LO=!this.rb.get("srcObject")&&d.LO(this.rb.get("url"));q.width=this.rb.get("width");q.height=this.rb.get("height");var r=new c.fSa;r.blending=this.B.get("blending",0);r.TO=this.B.get("chromaColor");r.threshold=this.B.get("chromaThreshold",
0);r.MPa=this.B.get("chromaSmoothing",0);this.za=c.create(q,r,this.Hq.B6());this.A.K(f.Material).material=this.za};l.prototype.dda=function(){this.za.dispose();this.za=null;this.A.ja(f.Material)};l.prototype.dispose=function(){this.eU(null);this.B.set("state",g.ca);this.A=this.Ae=this.B=this.Ee=null;k.da(this.O4,["levels.url","levels.srcObject","levels.width","levels.height"],this.L1)};l.prototype.TAa=function(){var q=this.B.get("opacity");this.Mf!=q&&(this.hDa(this.Mf=q),this.Na())};l.prototype.hDa=
function(q){this.za.opacity=q;this.za.isShaderMaterial&&this.za.uniforms.opacity&&(this.za.uniforms.opacity.value=q)};l.Va=function(q){q.K(f.IB).manager=new l(q)};l.xa=function(q){var r=q.getComponent(f.IB);r.manager.dispose();r.manager=null;q.ja(f.IB)};l.update=function(q){q.getComponent(f.IB).manager.update()};return l});
define("tdv/player/view/webgl/system/videoMaterial/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/videoMaterial/Behaviour"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/videoMaterial/Behaviour");a=l.extend(k,function(){k.apply(this,arguments)});a.prototype.Yc=function(){this.Nn.v.length&&this.Nn.v.slice().forEach(g.Va);
this.On.v.length&&this.On.v.slice().forEach(g.xa);this.materials.v.length&&this.materials.v.slice().forEach(g.update)};a.J={};a.J.Nn=[n.qo,n.IB.aa];a.J.materials=[n.qo,n.IB];a.J.On=[n.qo.aa,n.IB];return a});
define("tdv/player/view/webgl/system/viewport/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/system/util/entity/Util","tdv/player/view/webgl/components"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/system/util/entity/Util"),g=a("tdv/player/view/webgl/components");a=l.extend(k,function(){k.apply(this,arguments);this.Uia=this.Uia.bind(this);this.EN=this.EN.bind(this)});a.prototype.Yc=function(){this.jra.be.length&&
this.jra.be.slice().forEach(this.Uia);this.CJ.Da.length&&this.CJ.Da.slice().forEach(this.EN);this.Nt.Da.length&&this.Nt.Da.slice().forEach(this.EN);this.CJ.be.length&&this.CJ.be.slice().forEach(this.EN);this.Nt.be.length&&this.Nt.be.slice().forEach(this.EN)};a.prototype.Uia=function(h){var e=h.getComponent(g.ro),b=n.gW(e.Ba),c=b&&b.width||100;b=b&&b.height||100;if(e.width!=c||e.height!=b)e=h.O(g.ro),e.width=c,e.height=b};a.prototype.EN=function(h){var e=n.gW(h);this.jra.v.forEach(function(b){if(b.getComponent(g.ro).Ba==
h){var c=b.getComponent(g.ro);if(c.width!=e.width||c.height!=e.height)c=b.O(g.ro),c.width=e.width,c.height=e.height}})};a.J={};a.J.jra=[g.ro];a.J.CJ=[g.OrthographicCamera];a.J.Nt=[g.PerspectiveCamera];return a});
define("tdv/player/view/webgl/system/util/geometry/Plane",["require"],function(){return{create:function(){var a=new THREE.BufferGeometry;a.setAttribute("position",new THREE.BufferAttribute(new Float32Array(18),3));a.setAttribute("normal",new THREE.BufferAttribute(new Float32Array(18),3));a.setAttribute("uv",new THREE.BufferAttribute(new Float32Array(12),2));a.setIndex(new THREE.BufferAttribute(new Uint32Array(6),1));return a},set:function(a,l,k,n,g,h,e,b,c,d,f,m,p,q,r){var t=a.getAttribute("position").array,
u=a.getAttribute("normal").array,v=a.getAttribute("uv").array,w=a.getIndex().array;t[9]=t[0]=l;t[10]=t[1]=k;t[11]=t[2]=n;v[6]=v[0]=g;v[7]=v[1]=h;t[3]=t[0]+f;t[4]=t[1]+m;t[5]=t[2]+p;v[2]=v[0];v[3]=v[1]+q;t[12]=t[6]=t[3]+e;t[13]=t[7]=t[4]+b;t[14]=t[8]=t[5]+c;v[8]=v[4]=v[2]+d;v[9]=v[5]=v[3];t[15]=t[12]-f;t[16]=t[13]-m;t[17]=t[14]-p;v[10]=v[8];v[11]=v[9]-q;l=b*p-c*m;c=c*f-e*p;e=e*m-b*f;b=1/Math.sqrt(l*l+c*c+e*e);u[0]=u[3]=u[6]=u[9]=u[12]=u[15]=l*b;u[1]=u[4]=u[7]=u[10]=u[13]=u[16]=c*b;u[2]=u[5]=u[8]=u[11]=
u[14]=u[17]=e*b;w[0]=0;w[1]=2;w[2]=1;w[3]=3;w[4]=5;w[5]=4;a.getAttribute("position").needsUpdate=!0;a.getAttribute("normal").needsUpdate=!0;a.getAttribute("uv").needsUpdate=!0;a.clearGroups();a.addGroup(0,6,r);a.computeBoundingBox();a.computeBoundingSphere();return a}}});
define("tdv/player/view/webgl/system/util/BindableWatcher",["require","tdv/constants/EventName","tdv/events/async"],function(a){function l(g,h,e){this.ks=g;this.B=h;this.zea=e;this.q3=this.q3.bind(this);this.aL=void 0;this.B.forEach(function(b){this.ks.bind(k.N(b),this.KS,this,!0)}.bind(this));this.q3()}var k=a("tdv/constants/EventName"),n=a("tdv/events/async");l.prototype.stop=function(){this.B.forEach(function(g){this.ks.h(k.N(g),this.KS,this,!0)}.bind(this));this.aL&&(n.cancel(this.aL),this.aL=
void 0)};l.prototype.KS=function(){this.aL||(this.aL=n.yE(this.q3))};l.prototype.q3=function(){this.aL=void 0;var g=this.ks;this.zea.apply(window,this.B.map(function(h){return g.get(h)}))};return l});
define("tdv/player/view/webgl/system/viewportPlaneGeometry/System","require tdv/utils tdv/player/view/webgl/ecs/System tdv/player/view/webgl/components tdv/player/view/webgl/system/util/geometry/Plane tdv/player/view/webgl/system/util/BindableWatcher tdv/player/view/webgl/system/util/entity/Util tdv/view/constants/Alignment tdv/view/constants/ScaleMode".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/util/geometry/Plane"),
h=a("tdv/player/view/webgl/system/util/BindableWatcher"),e=a("tdv/player/view/webgl/system/util/entity/Util"),b=a("tdv/view/constants/Alignment"),c=a("tdv/view/constants/ScaleMode"),d=l.extend(k,function(){k.apply(this,arguments);this.Tia=this.Tia.bind(this);this.pka=this.pka.bind(this);this.sja=this.sja.bind(this)});d.prototype.Yc=function(){this.tE.v.length&&this.tE.v.slice().forEach(this.Tia);this.planes.Da.length&&this.planes.Da.slice().forEach(this.pka);this.pX.v.length&&this.pX.v.slice().forEach(this.sja)};
d.prototype.Tia=function(f){var m=f.getComponent(n.QF),p=f.K(n.ro);p.Ba=m.Ba;var q=e.gW(m.Ba);q&&(p.width=q.width,p.height=q.height);p=f.K(n.Ax);p.geometry=g.create();p.VNa=new h(m.properties,"width height horizontalAlign verticalAlign scaleMode zIndex".split(" "),function(r,t,u,v,w,y){var x=f.O(n.Ax);x.QPa=r;x.OPa=t;x.Vh=u;x.verticalAlign=v;x.zE=w;x.zIndex=y});f.K(n.Geometry).geometry=p.geometry};d.prototype.sja=function(f){var m=f.getComponent(n.Ax);m.geometry.dispose();m.geometry=null;m.VNa.stop();
m.VNa=null;f.ja(n.Geometry);f.ja(n.ro);f.ja(n.Ax)};d.prototype.pka=function(f){var m=f.getComponent(n.Ax),p=f.getComponent(n.ro),q=p.width,r=p.height,t=m.QPa,u=m.OPa;switch(m.zE){case c.NONE:p=t;var v=u;break;case c.Lp:p=q;v=u*q/t;break;case c.Qk:v=r;p=t*r/u;break;case c.Dr:t*r>u*q?(v=r,p=t*r/u):(p=q,v=u*q/t);break;default:t*r>u*q?(p=q,v=u*q/t):(v=r,p=t*r/u)}switch(m.Vh){case b.eb:q=-q*.5;break;case b.Db:q=q*.5-p;break;default:q=-p*.5}switch(m.verticalAlign){case b.Tc:r=r*.5-v;break;case b.Fc:r=-r*
.5;break;default:r=-v*.5}t=m.zIndex-d.$Sa;g.set(m.geometry,q,r,0,0,0,p,0,0,1,0,v,0,1,0);f.O(n.sa,!0).positionZ=t;f.T.Za()};d.$Sa=100;d.J={};d.J.tE=[n.QF,n.Ax.aa];d.J.planes=[n.QF,n.Ax,n.ro];d.J.pX=[n.QF.aa,n.Ax];return d});
define("tdv/player/view/webgl/systems","require exports tdv/player/view/webgl/system/light/AmbientLightSystem tdv/player/view/webgl/system/animation/System tdv/player/view/webgl/system/aranchor/System tdv/player/view/webgl/system/area/System tdv/player/view/webgl/system/beacon/System tdv/player/view/webgl/system/camera/System tdv/player/view/webgl/system/cameraControls/System tdv/player/view/webgl/system/cameraOffsetTransform/System tdv/player/view/webgl/system/canvasMaterial/System tdv/player/view/webgl/system/clippingRect/System tdv/player/view/webgl/system/light/DirectionalLightSystem tdv/player/view/webgl/system/dragging/System tdv/player/view/webgl/system/floor/System tdv/player/view/webgl/system/floorTransform/System tdv/player/view/webgl/system/group/System tdv/player/view/webgl/system/grid/System tdv/player/view/webgl/system/imageMaterial/System tdv/player/view/webgl/system/lineMaterial/System tdv/player/view/webgl/system/line/System tdv/player/view/webgl/system/lineToTransform/System tdv/player/view/webgl/system/objectTransform/System tdv/player/view/webgl/system/materialVariant/System tdv/player/view/webgl/system/mesh/System tdv/player/view/webgl/system/model/System tdv/player/view/webgl/system/objectId/System tdv/player/view/webgl/system/plane/System tdv/player/view/webgl/system/parent/System tdv/player/view/webgl/system/pixelScaleTransform/System tdv/player/view/webgl/system/pointerOverTransform/System tdv/player/view/webgl/system/projectedMaterial/System tdv/player/view/webgl/system/renderer/System tdv/player/view/webgl/system/scene/System tdv/player/view/webgl/system/selection/System tdv/player/view/webgl/system/light/SpotLightSystem tdv/player/view/webgl/system/solidMaterial/System tdv/player/view/webgl/system/sphere/System tdv/player/view/webgl/system/sprite/System tdv/player/view/webgl/system/transform/System tdv/player/view/webgl/system/transformControls/System tdv/player/view/webgl/system/videoMaterial/System tdv/player/view/webgl/system/viewport/System tdv/player/view/webgl/system/viewportPlaneGeometry/System".split(" "),function(a,
l,k,n,g,h,e,b,c,d,f,m,p,q,r,t,u,v,w,y,x,z,A,D,E,B,C,F,G,I,N,P,Q,R,K,M,T,S,W,X,Z,ca,ea,Y){a={};a.AmbientLight=k;a.Animation=n;a.$E=g;a.jo=h;a.lB=e;a.Camera=b;a.cSa=c;a.wK=d;a.If=f;a.fF=m;a.DirectionalLight=p;a.Jm=q;a.Fr=r;a.mx=t;a.pu=v;a.Group=u;a.Mi=w;a.ci=y;a.Line=x;a.ru=z;a.ei=A;a.ox=D;a.Mesh=E;a.Ni=B;a.rTa=C;a.pb=G;a.Plane=F;a.Uk=I;a.Cl=N;a.mo=P;a.qj=Q;a.Scene=R;a.Selection=K;a.wd=T;a.Sphere=S;a.SpotLight=M;a.Sprite=W;a.sa=X;a.Fh=Z;a.qo=ca;a.ro=ea;a.QF=Y;return a});
define("tdv/view/util/Screenshot",["require","exports"],function(){return function(){function a(){}a.BQa=function(l){var k;k||(k="screenshot.jpg");a:{try{var n=l.toDataURL("image/jpeg");break a}catch(g){}n=void 0}if(!n)return!1;l=n;n=document.createElement("a");typeof n.download==="string"?(document.body.appendChild(n),n.download=k,n.href=l,n.click(),document.body.removeChild(n)):window.location.replace(l);return!0};return a}()});
define("tdv/player/view/webgl/Renderer","require exports tdv/constants/EventName tdv/view/core/UIComponent tdv/view/util/Assets tdv/player/view/Flash tdv/player/view/webgl/ecs/World tdv/player/view/webgl/components tdv/player/view/webgl/systems tdv/view/util/Screenshot".split(" "),function(a,l,k,n,g,h,e,b,c,d){function f(q){return q.map(function(r){return String.fromCharCode(r)}).join("")}a=function(q){function r(t,u,v){var w=q.call(this)||this;w.Ee=t;w.R=u;w.V9a=v;w.Lz=(new e(t)).ma(b.rK).ma(b.AmbientLight).ma(b.hB).ma(b.Animation).ma(b.Vw).ma(b.bF).ma(b.$E).ma(b.Tw).ma(b.Uw).ma(b.ur).ma(b.Tf).ma(b.jo).ma(b.iB).ma(b.cF).ma(b.lB).ma(b.mB).ma(b.Ip).ma(b.$w).ma(b.If).ma(b.oB).ma(b.xK).ma(b.ax).ma(b.wK).ma(b.dSa).ma(b.fF).ma(b.pB).ma(b.DirectionalLight).ma(b.wr).ma(b.hx).ma(b.qB).ma(b.Jm).ma(b.zF).ma(b.Er).ma(b.AF).ma(b.Gr).ma(b.Fr).ma(b.lx).ma(b.mx).ma(b.ou).ma(b.Geometry).ma(b.pu).ma(b.vB).ma(b.Group).ma(b.DK).ma(b.Mi).ma(b.xB).ma(b.Line).ma(b.ci).ma(b.zB).ma(b.ru).ma(b.BB).ma(b.AB).ma(b.Material).ma(b.ei).ma(b.CB).ma(b.ox).ma(b.Kr).ma(b.Mesh).ma(b.tu).ma(b.Ni).ma(b.qx).ma(b.FF).ma(b.nTa).ma(b.Lr).ma(b.GF).ma(b.Object3D).ma(b.LK).ma(b.sx).ma(b.HF).ma(b.Mr).ma(b.OrthographicCamera).ma(b.uu).ma(b.PerspectiveCamera).ma(b.Tk).ma(b.pb).ma(b.wu).ma(b.Uk).ma(b.JF).ma(b.Plane).ma(b.FB).ma(b.yc).ma(b.ux).ma(b.Cl).ma(b.xu).ma(b.vx).ma(b.mo).ma(b.Nr).ma(b.wd).ma(b.wx).ma(b.sa).ma(b.OF).ma(b.Eg).ma(b.Fh).ma(b.Om).ma(b.qj).ma(b.yu).ma(b.Scene).ma(b.Op).ma(b.vd).ma(b.KF).ma(b.Sphere).ma(b.LF).ma(b.SpotLight).ma(b.Au).ma(b.Sprite).ma(b.Bu).ma(b.wd).ma(b.wx).ma(b.yx).ma(b.Du).ma(b.qo).ma(b.IB).ma(b.ro).ma(b.QF).ma(b.Ax).ma(b.RK).ma(b.kg).ma(b.RF).ma(b.Qp).ma(b.SK).ma(b.Rp).ma(b.TK).ma(b.Sp).ma(b.UK).ma(b.Tp).ed(c.Camera,
"Camera").ed(c.ro,"Viewport").ed(c.Mi,"ImageMaterial").ed(c.If,"CanvasMaterial").ed(c.ci,"LineMaterial").ed(c.wd,"SolidMaterial").ed(c.qo,"VideoMaterial").ed(c.ox,"MaterialVariant").ed(c.QF,"ViewportPlaneGeometry").ed(c.pu,"Grid").ed(c.Group,"Group").ed(c.Line,"Line").ed(c.Mesh,"Mesh").ed(c.Plane,"Plane").ed(c.Fr,"Floor").ed(c.Sphere,"Sphere").ed(c.Sprite,"Sprite").ed(c.Ni,"Model").ed(c.$E,"ARAnchor").ed(c.mo,"ProjectedMaterial").ed(c.AmbientLight,"AmbientLight").ed(c.DirectionalLight,"DirectionalLight").ed(c.SpotLight,
"SpotLight").ed(c.Scene,"Scene").ed(c.pb,"Parent").ed(c.rTa,"ObjectId").ed(c.Animation,"Animation").ed(c.wK,"CameraOffsetTransform").ed(c.ei,"ObjectTransform").ed(c.mx,"FloorTransform").ed(c.cSa,"CameraControls").ed(c.Jm,"Dragging").ed(c.Selection,"Selection").ed(c.Cl,"PointerOverTransform").ed(c.Uk,"PixelScaleTransform").ed(c.sa,"Transform").ed(c.Fh,"TransformControls").ed(c.jo,"Area").ed(c.ru,"LineToTransform").ed(c.Camera.sK,"CameraAutoNearFar").ed(c.fF,"ClippingRect").ed(c.Scene.iZ,"SceneFade").ed(c.lB,
"Beacon").ed(c.qj,"Renderer");w.o=w.Lz.rc("Renderer");w.YH=[];w.Yia=!1;w.bind(k.od,w.Zo,w,!0);w.bind(k.jd,w.Xo,w,!0);return w}O(r,q);r.prototype.Ib=function(){q.prototype.Ib.call(this);this.KG||(this.KG=new h,this.va().vk(this.KG.bc()))};r.prototype.rc=function(t){return this.Lz.rc(t)};r.prototype.dd=function(t){this.Lz.dd(t)};r.prototype.Za=function(){this.Lz.Za()};r.prototype.gGa=function(t){!(this.YH.indexOf(t)>=0)&&(this.YH.push(t),t=this.o.O(b.qj))&&(t.JX=this.YH.slice())};r.prototype.ahb=function(t){t=
this.YH.indexOf(t);!(t<0)&&(this.YH.splice(t,1),t=this.o.O(b.qj))&&(t.JX=this.YH.slice())};r.prototype.O8=function(t){this.Lz.O8(t)};r.prototype.Ua=function(t){this.Lz.Ua(t)};r.prototype.OJ=function(){this.KG.m();this.Lz.update();return d.BQa(this.o.getComponent(b.qj).renderer.domElement)};r.prototype.zla=function(){this.Lz.update();return this.o.getComponent(b.qj).renderer.domElement.toDataURL("image/png")};r.prototype.Zo=function(){this.U6a()};r.prototype.Xo=function(){this.L7a()};r.prototype.U6a=
function(){var t=this.o.getComponent(b.qj);if(!t&&(t=this.o.K(b.qj),t.cb=this.R,t.JX=this.YH.slice(),this.Ee.get(m)&&this.V9a)){this.kV=document.createElement("div");for(var u in p)this.kV.style[u]=p[u];this.va().vk(this.kV)}};r.prototype.L7a=function(){this.o.getComponent(b.qj)&&(this.kV&&this.va().z8(this.kV),this.kV=null,this.o.ja(b.qj))};return r}(n);var m=f([119,97,116,101,114,109,97,114,107]),p={};p[f([104,101,105,103,104,116])]=f([49,48,48,37]);p[f([119,105,100,116,104])]=f([49,48,48,37]);
p[f([112,111,115,105,116,105,111,110])]=f([97,98,115,111,108,117,116,101]);p[f([116,111,112])]=0;p[f([108,101,102,116])]=0;p[f([98,97,99,107,103,114,111,117,110,100,73,109,97,103,101])]=f([117,114,108,40,34])+g.gUa+f([34,41]);p[f([98,97,99,107,103,114,111,117,110,100,80,111,115,105,116,105,111,110])]=f([99,101,110,116,101,114]);p[f([98,97,99,107,103,114,111,117,110,100,83,105,122,101])]=f([99,111,110,116,97,105,110]);p[f([112,111,105,110,116,101,114,69,118,101,110,116,115])]=f([110,111,110,101]);
p[f([98,97,99,107,103,114,111,117,110,100,82,101,112,101,97,116])]=f([110,111,45,114,101,112,101,97,116]);p[f([111,112,97,99,105,116,121])]=.5;return a});
define("tdv/player/view/model3d/renderer/adapters/CameraAdapter","require exports tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/parser/ClassInfo tdv/player/view/webgl/components tdv/player/view/util/XR".split(" "),function(a,l,k,n,g,h,e){var b=["autoNearFar","autoNearFarTolerance","near","far","userInteracting"],c=["inTransition"],d={OrbitModel3DCamera:h.HF,FirstPersonModel3DCamera:h.zF,FlyOverModel3DCamera:h.AF},f={FirstPersonModel3DCamera:h.UK,OrbitModel3DCamera:h.SK,FlyOverModel3DCamera:h.TK};
return function(){function m(p,q,r,t){this.renderer=p;this.model=q;this.wb=r;this.Ba=t;this.cb=this.renderer.R;this.camera=null;this.Tg=this.Tg.bind(this);this.J7=this.J7.bind(this);this.renderer.bind(n.Zb,this.rl,this,!0);this.model.bind(n.N("camera"),this.C7,this,!0);this.cb.bind(n.N("isKeyboardTarget"),this.toa,this,!0);e.M.bind(n.V,this.Ya,this,!0);this.C7();this.Ya();this.toa();this.rl()}m.prototype.Jw=function(p){for(var q in d){var r=this.Ba.O(d[q]);r&&(r.locked=p)}for(q in f)if(r=this.Ba.O(f[q]))r.locked=
p;if(r=this.Ba.O(h.Uw))r.locked=p};m.prototype.Ua=function(p){for(var q in d){var r=this.Ba.O(d[q]);r&&(r.enabled=p)}};m.prototype.dispose=function(){this.setCamera(null);this.model.h(n.N("camera"),this.C7,this);this.cb.h(n.N("isKeyboardTarget"),this.toa,this);this.renderer.h(n.Zb,this.rl,this);e.M.h(n.V,this.Ya,this)};m.prototype.Ya=function(){this.Ba.O(h.PerspectiveCamera,!0).jj=e.zg==this.cb.Kc().Jn()};m.prototype.C7=function(){this.setCamera(this.model.get("camera"))};m.prototype.setCamera=function(p){if(this.camera!==
p){this.camera&&(this.NE(!1),k.da(this.camera,b,this.Tg),k.da(this.camera,c,this.J7),this.camera.set("inTransition",!1));if(this.camera=p)k.ba(this.camera,b,this.Tg,!0),k.ba(this.camera,c,this.J7,!0),this.F$a(),this.Ba.O(h.xK,!0).properties=this.camera;this.aRa()}};m.prototype.aRa=function(){var p,q,r,t,u=!!this.camera&&this.camera.get("inTransition");u?t=this.Ba.O(h.yx,!0):this.Ba.ja(h.yx);for(var v in d){var w=d[v];!u&&this.camera&&g.Qa(v,this.camera)?p=this.Ba.O(w,!0):this.Ba.ja(w);(w=f[v])&&(!u&&
this.camera&&g.Qa(v,this.camera)?q=this.Ba.O(w,!0):this.Ba.ja(w))}u?this.Ba.ja(h.Uw):r=this.Ba.O(h.Uw,!0);p&&(p.properties=this.camera,p.Pf=this.renderer.getParent(),p.sOa=this.cb.aS,p.YD=this.cb.get("isKeyboardTarget"));t&&(t.properties=this.camera,t.kf=this.model.get("worldUnitToMeters"));q&&(q.properties=this.camera,q.kf=this.model.get("worldUnitToMeters"),q.Kk=this.cb.get("vrThumbstickRotationStep"));r&&(r.properties=this.camera,r.kf=this.model.get("worldUnitToMeters"),r.Kk=this.cb.get("arThumbstickRotationStep"),
r.wb=this.wb)};m.prototype.toa=function(){var p=this.zcb();p&&(p.YD=this.cb.get("isKeyboardTarget"))};m.prototype.zcb=function(){if(!this.camera)return null;var p=null,q;for(q in d){var r=d[q];this.camera&&g.Qa(q,this.camera)&&(p=this.Ba.O(r,!0))}return p};m.prototype.Tg=function(){if(this.camera){var p=this.Ba.O(h.PerspectiveCamera,!0);p.lla=this.camera.get("autoNearFar");p.IGa=this.camera.get("autoNearFarTolerance");p.near=this.camera.get("near");p.far=this.camera.get("far");this.NE(this.camera.get("userInteracting"))}};
m.prototype.J7=function(){this.aRa()};m.prototype.rl=function(){var p=this.Ba.O(h.PerspectiveCamera,!0);p.width=this.renderer.Uh();p.height=this.renderer.Th()};m.prototype.F$a=function(){var p=this.camera;p.set("fov",p.get("initialFov"));p.set("x",p.get("initialX"));p.set("y",p.get("initialY"));p.set("z",p.get("initialZ"));p.set("distance",p.get("initialDistance",0));p.set("yaw",p.get("initialYaw"));p.set("pitch",p.get("initialPitch"))};m.prototype.NE=function(p){this.VE!=p&&(this.VE=p,this.camera&&
this.camera.m(this.VE?n.gta:n.fta))};return m}()});define("tdv/player/script/OrbitLight",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("OrbitLight",l,function(){l.call(this)})});
define("tdv/player/view/model3d/renderer/adapters/ArrayAdapter",["require","exports","tdv/binding/BindingsHandler"],function(a,l,k){return function(){function n(){this.dX=this.dX.bind(this);this.w8=this.object=null;this.elements=[];this.SV=new Map;this.FNa=this.Vg=this.be=this.filter=null}n.prototype.UA=function(g,h){this.dispose();this.object=g;this.w8=h;k.ba(this.object,[this.w8],this.dX,!0)};n.prototype.dX=function(g){g=g||[];this.filter&&(g=g.filter(this.filter));var h=this.elements,e=this.elements=
g;h.forEach(function(b,c){var d=e.indexOf(b);if(d==-1){var f=this.SV.get(b);this.SV["delete"](b);this.Vg&&this.Vg(b,f)}else d!=c&&(f=this.SV.get(b),this.FNa&&(c=this.FNa(b,d,f,c),c!=f&&this.SV.set(b,c)))}.bind(this));e.forEach(function(b,c){h.indexOf(b)==-1&&this.be&&(c=this.be(b,c),this.SV.set(b,c))}.bind(this))};n.prototype.dispose=function(){this.object&&(k.da(this.object,[this.w8],this.dX),this.dX([]),this.w8=this.object=null)};return n}()});
define("tdv/player/view/model3d/renderer/adapters/lights/AmbientLightAdapter",["require","exports","tdv/binding/BindingsHandler","tdv/player/view/webgl/components"],function(a,l,k,n){var g=["color","intensity"];return function(){function h(e,b,c,d,f){this.Tg=this.Tg.bind(this);this.object=e;this.model=b;this.wb=c;this.yg=d;this.Ba=f;this.F=c.T.rc("AmbientLight");this.F.K(n.AmbientLight);this.F.K(n.pb).F=this.yg;k.ba(this.object,g,this.Tg,!0)}h.prototype.dispose=function(){k.da(this.object,g,this.Tg);
this.F&&(this.F.T.dd(this.F),this.F=null)};h.prototype.Tg=function(){var e=this.F.O(n.AmbientLight);e.color=this.object.get("color");e.intensity=this.object.get("intensity")};return h}()});
define("tdv/player/view/model3d/renderer/adapters/lights/OrbitLightAdapter","require exports three.mod tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/webgl/components".split(" "),function(a,l,k,n,g,h,e){a=function(){function q(r,t,u,v,w){this.Tg=this.Tg.bind(this);this.object=r;this.model=t;this.wb=u;this.yg=v;this.Ba=w;this.F=this.wb.T.rc("OrbitLight");this.F.K(e.DirectionalLight).target=this.wb;this.F.K(e.pb);r=this.F.K(e.sa);r.jf="YXZ";r.positionZ=
10;this.NJ=null;n.ba(this.object,b,this.Tg,!0)}q.prototype.dispose=function(){n.da(this.object,b,this.Tg);this.F&&(this.F.T.dd(this.F),this.F=null);this.NJ&&(this.NJ.dispose(),this.NJ=null)};q.prototype.Tg=function(){var r=this.F.O(e.DirectionalLight);r.castShadow=this.object.get("castShadow");r.color=this.object.get("color");r.PV=this.object.get("displayHelper");r.intensity=this.object.get("intensity");r.mode=this.object.get("mode");var t=this.object.get("mode")=="fixed_to_target"?this.yg:this.Ba;
this.F.getComponent(e.pb).F!=t&&(this.F.O(e.pb).F=t);t=this.object.get("yaw");var u=-this.object.get("pitch"),v=this.F.getComponent(e.sa);if(v.Wd!=u||v.fd!=t)v=this.F.O(e.sa),v.Wd=u,v.fd=t;r.gqa=this.object.get("shadowBias");r.iqa=this.object.get("shadowRadius");r.hqa=this.object.get("shadowMapSize");r.rjb=this.object.get("shadowTolerance");this.object.get("rotationDraggable")!=!!this.NJ&&(this.object.get("rotationDraggable")?this.NJ=new c(this.object,this.model,this.wb):(this.NJ.dispose(),this.NJ=
null))};return q}();var b="castShadow color displayHelper intensity mode pitch yaw rotationDraggable shadowBias shadowRadius shadowMapSize shadowTolerance".split(" "),c=function(){function q(r,t,u){this.fP=this.fP.bind(this);this.object=r;this.model=t;this.wb=u;this.M=new h;this.M.bind(g.V,this.Bm,this,!0);this.ww=this.wb.T.rc("OrbitLightTransformControls");this.ww.K(e.sa).jf="YXZ";this.ww.K(e.Group);this.ww.K(e.pb).F=this.wb;this.oA=this.wb.T.rc("OrbitLightTransformControlsInner");this.oA.K(e.sa).jf=
"YXZ";this.oA.K(e.Group);this.oA.K(e.pb).F=this.ww;r=this.oA.K(e.Fh);r.translate=!1;r.rotate=!0;r.scale=!1;r.M=this.M;n.ba(this.object,d,this.fP,!0);n.ba(this.model,f,this.fP,!0)}q.prototype.dispose=function(){n.da(this.object,d,this.fP);n.da(this.model,f,this.fP);this.ww&&(this.ww.T.dd(this.ww),this.ww=null);this.oA&&(this.oA.T.dd(this.oA),this.oA=null)};q.prototype.fP=function(){if(this.object.get("mode")=="fixed_to_target"){var r=this.ww.O(e.sa);r.fd=0;r.Wd=0}else r=this.ww.O(e.sa),r.fd=-this.model.get("camera").get("yaw"),
r.Wd=this.model.get("camera").get("pitch");r.Ve=0;r=this.oA.O(e.sa);r.fd=this.object.get("yaw");r.Wd=-this.object.get("pitch");r.Ve=0};q.prototype.Bm=function(r){m.setFromQuaternion(r.data.quaternion,"YXZ");this.object.set({yaw:m.y*p,pitch:-m.x*p});this.object.m(g.Mm)};return q}(),d=["mode","yaw","pitch"],f=["camera.yaw","camera.pitch"],m=new k.Euler,p=180/Math.PI;return a});
define("tdv/player/view/model3d/renderer/adapters/lights/SpotLightAdapter","require exports three.mod tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/webgl/components".split(" "),function(a,l,k,n,g,h,e){a=function(){function f(m,p,q,r,t){this.Tg=this.Tg.bind(this);this.object=m;this.model=p;this.wb=q;this.yg=r;this.Ba=t;this.F=q.T.rc("SpotLight");this.F.K(e.SpotLight);this.F.K(e.pb).F=this.yg;this.F.K(e.sa).jf="YXZ";this.pr=new h;this.pr.bind(g.V,this.Bm,
this,!0);n.ba(this.object,b,this.Tg,!0)}f.prototype.dispose=function(){n.da(this.object,b,this.Tg);this.F.T.dd(this.F);this.F=null};f.prototype.Tg=function(){var m=this.F.O(e.SpotLight);m.color=this.object.get("color");m.intensity=this.object.get("intensity");m.distance=this.object.get("distance");m.PV=this.object.get("displayHelper");m.angle=this.object.get("angle");m.penumbra=this.object.get("penumbra");m.decay=this.object.get("decay");m.castShadow=this.object.get("castShadow");m.hqa=this.object.get("shadowMapSize");
m.gqa=this.object.get("shadowBias");m.iqa=this.object.get("shadowRadius");m=this.object.get("yaw");var p=-this.object.get("pitch"),q=this.F.getComponent(e.sa);if(q.Wd!=p||q.fd!=m||q.positionX!=this.object.get("x")||q.positionY!=this.object.get("y")||q.positionZ!=this.object.get("z"))q=this.F.O(e.sa),q.Wd=p,q.fd=m,q.translationX=this.object.get("x"),q.translationY=this.object.get("y"),q.Xe=this.object.get("z");this.object.get("rotationDraggable")||this.object.get("positionDraggable")?(m=this.F.O(e.Fh,
!0),m.M=this.pr,m.rotate=this.object.get("rotationDraggable"),m.translate=this.object.get("positionDraggable"),m.scale=!1):this.F.ja(e.Fh)};f.prototype.Bm=function(m){c.setFromQuaternion(m.data.quaternion,"YXZ");this.object.set({x:m.data.position.x,y:m.data.position.y,z:m.data.position.z,yaw:c.y*d,pitch:-c.x*d});this.object.m(g.Mm)};return f}();var b="color intensity distance angle penumbra displayHelper decay castShadow shadowMapSize shadowBias shadowRadius x y z pitch yaw rotationDraggable positionDraggable".split(" "),
c=new k.Euler,d=180/Math.PI;return a});
define("tdv/player/view/model3d/renderer/adapters/lights/LightAdapterFactory","require exports tdv/player/parser/ClassInfo tdv/player/view/model3d/renderer/adapters/lights/AmbientLightAdapter tdv/player/view/model3d/renderer/adapters/lights/OrbitLightAdapter tdv/player/view/model3d/renderer/adapters/lights/SpotLightAdapter".split(" "),function(a,l,k,n,g,h){return function(){function e(){}e.Jla=function(b,c,d,f,m){return k.Qa("AmbientLight",b)?new n(b,c,d,f,m):k.Qa("OrbitLight",b)?new g(b,c,d,f,m):
k.Qa("SpotLight",b)?new h(b,c,d,f,m):null};return e}()});
define("tdv/player/view/model3d/renderer/adapters/lights/LightsAdapter","require exports tdv/player/view/util/Device tdv/player/script/OrbitLight tdv/player/view/model3d/renderer/adapters/ArrayAdapter tdv/player/view/model3d/renderer/adapters/lights/LightAdapterFactory".split(" "),function(a,l,k,n,g,h){return function(){function e(b,c,d,f){this.ema=this.aA=null;this.model=b;this.wb=c;this.yg=d;this.Ba=f;this.p7=new g;this.p7.be=this.rMa.bind(this);this.p7.Vg=this.sMa.bind(this);this.p7.UA(this.model,
"lights");this.D$a()}e.prototype.dispose=function(){this.p7.dispose();this.Ygb()};e.prototype.rMa=function(b){return h.Jla(b,this.model,this.wb,this.yg,this.Ba)};e.prototype.sMa=function(b,c){c.dispose()};e.prototype.D$a=function(){var b,c,d,f;k.gf()&&this.model.get("backgroundPanoramaURL")&&(this.aA=new n,(b=this.aA)===null||b===void 0||b.set("intensity",.001),(c=this.aA)===null||c===void 0||c.set("castShadow",!0),(d=this.aA)===null||d===void 0||d.set("shadowMapWidth",64),(f=this.aA)===null||f===
void 0||f.set("shadowTolerance",4),this.ema=this.rMa(this.aA))};e.prototype.Ygb=function(){this.aA&&(this.sMa(this.aA,this.ema),this.ema=this.aA=null)};return e}()});
define("tdv/player/view/model3d/renderer/adapters/FloorAdapter",["require","exports","tdv/binding/BindingsHandler","tdv/constants/RenderOrder","tdv/player/view/webgl/components"],function(a,l,k,n,g){var h=["floorColor","floorHeight","floorOpacity","floorRadius"];return function(){function e(b,c,d){this.model=b;this.object=c;this.wb=d;this.Tg=this.Tg.bind(this);this.F=d.T.rc("Floor");this.F.K(g.Fr);this.F.K(g.pb).F=this.wb;k.ba(this.object,h,this.Tg,!0)}e.prototype.dispose=function(){k.da(this.object,
h,this.Tg);this.F.T.dd(this.F);this.F=null};e.prototype.Tg=function(){var b=this.object.get("floorColor"),c=this.object.get("floorOpacity"),d=this.object.get("floorHeight"),f=this.object.get("floorRadius");if(b&&c>0){var m=this.F.O(g.Fr,!0);m.color=b;m.opacity=c;m.height=d;m.radius=f;m.renderOrder=this.model==this.object?n.eTa:n.oTa}else this.F.ja(g.Fr)};return e}()});
define("tdv/player/view/model3d/renderer/adapters/objects/ObjectAdapterFactory",["require","exports","tdv/player/parser/ClassInfo"],function(a,l,k){return function(){function n(){}n.St=function(g,h){n.Y4[g]=h};n.Mdb=function(g){for(var h in n.Y4)if(k.Qa(h,g))return!0;return!1};n.Jla=function(g,h,e,b,c){for(var d in n.Y4)if(k.Qa(d,g))return new n.Y4[d](g,h,e,b,c);return null};n.Y4={};return n}()});
define("tdv/player/view/model3d/renderer/adapters/objects/ObjectArrayAdapter",["require","exports","tdv/player/view/model3d/renderer/adapters/ArrayAdapter","tdv/player/view/model3d/renderer/adapters/objects/ObjectAdapterFactory"],function(a,l,k,n){return function(){function g(h,e,b,c,d){this.phb=h;this.model=e;this.wb=b;this.Yna=c;this.renderer=d;this.filter=this.filter.bind(this);this.be=this.be.bind(this);this.Vg=this.Vg.bind(this);this.vJ=new k;this.vJ.filter=this.filter;this.vJ.be=this.be;this.vJ.Vg=
this.Vg;this.vJ.UA(this.model,"objects")}g.prototype.filter=function(h){return n.Mdb(h)?!0:!1};g.prototype.be=function(h){return n.Jla(h,this.phb,this.wb,this.Yna,this.renderer)};g.prototype.Vg=function(h,e){e.dispose()};g.prototype.dispose=function(){this.vJ.dispose()};return g}()});
define("tdv/player/view/model3d/renderer/adapters/objects/SpritesEnabledAdapter",["require","exports","tdv/constants/EventName","tdv/player/parser/ClassInfo"],function(a,l,k,n){return function(){function g(h,e){this.sS=h.sS;this.Ea=e;this.gl=[];this.sS.bind(k.N("spritesEnabled"),this.gBa,this,!0);this.Ea.bind(k.N("objects"),this.DH,this,!0);this.ya()}g.prototype.dispose=function(){this.sS.h(k.N("spritesEnabled"),this.gBa,this);this.Ea.h(k.N("objects"),this.DH,this);this.gl.forEach(function(h){h.Dpa(!1)});
this.gl=[]};g.prototype.gBa=function(){this.ya()};g.prototype.DH=function(){this.ya()};g.prototype.ya=function(){var h=[];this.sS.get("spritesEnabled")===!1&&h.push("SpriteModel3DObject");var e=this.Ea.get("objects");this.gl.forEach(function(b){e.indexOf(b)==-1&&b.Dpa(!1)});this.gl=e;this.gl.forEach(function(b){var c=h.some(function(d){return n.Qa(d,b)});b.Dpa(c)})};return g}()});
define("tdv/player/view/model3d/renderer/adapters/objects/UserInteractionObjectsVisibleAdapter",["require","exports","tdv/binding/BindingsHandler"],function(a,l,k){var n=["camera","objects","postprocessing"],g=["userInteracting","moving"];return function(){function h(e){this.model=e;this.camera=null;this.lj=[];this.xJ=this.xJ.bind(this);this.E7=this.E7.bind(this);k.ba(this.model,n,this.xJ,!0)}h.prototype.dispose=function(){this.HE([])};h.prototype.xJ=function(){this.setCamera(this.model.get("camera"));
this.HE([].concat(this.model.get("objects"),this.model.get("postprocessing")))};h.prototype.setCamera=function(e){this.camera!==e&&(this.camera&&k.da(this.camera,g,this.E7),(this.camera=e)&&k.ba(this.camera,g,this.E7,!0))};h.prototype.E7=function(){this.MP()};h.prototype.HE=function(e){this.lj!=e&&(e||(e=[]),this.lj&&this.lj.forEach(function(b){e.indexOf(b)==-1&&(b.NE&&b.NE(!1),b.Bp&&b.Bp(!1))}.bind(this)),this.lj=e,this.MP())};h.prototype.MP=function(){if(this.lj&&this.camera){var e=this.camera.get("userInteracting"),
b=this.camera.get("moving");this.lj.forEach(function(c){c.NE&&c.NE(e);c.Bp&&c.Bp(b)}.bind(this))}};return h}()});
define("tdv/player/view/model3d/renderer/adapters/objects/XRObjectsVisibleAdapter","require exports tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/view/util/XR tdv/player/view/util/xr/pointer/PointerState".split(" "),function(a,l,k,n,g,h){var e=["objects"];return function(){function b(c){this.model=c;this.lj=[];this.xJ=this.xJ.bind(this);g.M.bind(n.V,this.Ya,this,!0);g.M.bind(n.me,this.gP,this,!0);k.ba(this.model,e,this.xJ,!0);this.Ya();this.gP()}b.prototype.dispose=function(){g.M.h(n.V,
this.Ya,this);g.M.h(n.me,this.gP,this);this.HE([])};b.prototype.xJ=function(){this.HE([].concat(this.model.get("objects")))};b.prototype.HE=function(c){this.lj!=c&&(c||(c=[]),this.lj&&this.lj.forEach(function(d){c.indexOf(d)==-1&&(d.S8&&d.S8(!0),d.OA&&d.OA(!1))}.bind(this)),this.lj=c,this.MP())};b.prototype.Ya=function(){this.dib(g.isPresenting&&g.zp==g.po.Sr,g.isPresenting&&g.zp==g.po.tr)};b.prototype.gP=function(){this.T8(g.isPresenting&&g.zp==g.po.Sr&&g.nd.length===1&&g.nd[0].type===h.HB)};b.prototype.dib=
function(c,d){if(this.ob!==c||this.BKa!==d)this.ob=c,this.BKa=d,this.MP()};b.prototype.T8=function(c){this.CKa!==c&&(this.CKa=c,this.MP())};b.prototype.MP=function(){if(this.lj){var c=this.ob===!1,d=this.ob===!0,f=this.BKa===!0,m=this.CKa===!0;this.lj.forEach(function(p){p.S8&&p.S8(c);p.OA&&p.OA(d);p.$Oa&&p.$Oa(f);p.T8&&p.T8(m)}.bind(this))}};return b}()});
define("tdv/player/view/model3d/renderer/adapters/BaseModelAdapter","require exports tdv/binding/BindingsHandler tdv/player/view/webgl/components tdv/player/view/model3d/renderer/adapters/FloorAdapter tdv/player/view/model3d/renderer/adapters/objects/ObjectArrayAdapter tdv/player/view/model3d/renderer/adapters/objects/SpritesEnabledAdapter tdv/player/view/model3d/renderer/adapters/objects/UserInteractionObjectsVisibleAdapter tdv/player/view/model3d/renderer/adapters/objects/XRObjectsVisibleAdapter".split(" "),function(a,
l,k,n,g,h,e,b,c){var d=["variant"];return function(){function f(m,p,q,r){this.object=m;this.model=p;this.yg=q;this.renderer=r;this.b8=this.b8.bind(this);this.F=this.yg.T.rc("Model");m=this.F.K(n.Ni);this.NI=m.NI=this.yg.T.rc("ModelContent");this.NI.K(n.pb).F=this.F;m.M=this.object;this.object.get("preload")&&(m.HNa=this.model.x6().Xv());m.tp=this.model.u6().Xv();m.Zna=this.object.get("model");m.properties=this.object;m.cb=this.renderer.R;m=this.F.K(n.vd);m.M=this.object;m.kt=!0;m.Tt=!0;this.F.K(n.pb).F=
this.yg;this.F.K(n.sa);k.ba(this.object,d,this.b8,!0);this.vJ=new h(this.model,this.object,this.F,this.NI,this.renderer);this.zjb=new e(this.renderer,this.object);this.zlb=new b(this.model);this.Plb=new c(this.model);this.dcb=new g(this.model,this.object,this.F)}f.prototype.ij=function(){return this.F};f.prototype.dispose=function(){k.da(this.object,d,this.b8);this.F.T.dd(this.NI);this.F.T.dd(this.F);this.vJ.dispose();this.zjb.dispose();this.zlb.dispose();this.Plb.dispose();this.dcb.dispose()};f.prototype.b8=
function(){var m=this.object.get("variant");m?this.F.O(n.ox,!0).name=m:this.F.ja(n.ox)};return f}()});
define("tdv/player/view/model3d/renderer/adapters/Mixins","require exports tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/Priority tdv/player/view/webgl/components three.mod".split(" "),function(a,l,k,n,g,h,e){var b=["collidable"],c="canvas canvasTimestamp encoding depthTest hidden opacity".split(" "),d=["image"],f=["color","depthTest","opacity","width"],m=["parentId"],p=["maxWorldToPixelScale","minWorldToPixelScale","scale"],q="x y z normalX normalY normalZ upX upY upZ width height attachToParent".split(" "),
r=new e.Matrix4,t=new e.Vector3,u=new e.Vector3,v=new e.Vector3,w=new e.Euler,y=180/Math.PI,x="x y z positionX positionY positionZ rotationX rotationY rotationZ scale translationX translationY translationZ attachToParent".split(" "),z=["clickEnabled","rollOverEnabled","transparentAreaActive","useHandCursor"],A=["castShadow","receiveShadow"],D=["color","depthTest","hidden","opacity"],E=["video"],B=["hidden","enabled","opacity"];return{yK:function(C){return function(F){function G(){return F!==null&&
F.apply(this,arguments)||this}O(G,F);G.prototype.Wc=function(){F.prototype.Wc.call(this);k.ba(this.object,b,this.lMa||(this.lMa=this.Afb.bind(this)),!0)};G.prototype.Xc=function(){k.da(this.object,b,this.lMa);F.prototype.Xc.call(this)};G.prototype.Afb=function(){this.object.get("collidable")?this.F.ja(h.FF):this.F.K(h.FF)};return G}(C)},If:function(C){return function(F){function G(){return F!==null&&F.apply(this,arguments)||this}O(G,F);G.prototype.Wc=function(){F.prototype.Wc.call(this);this.F.K(h.If);
k.ba(this.object,c,this.kMa||(this.kMa=this.zfb.bind(this)),!0)};G.prototype.Xc=function(){k.da(this.object,c,this.kMa);F.prototype.Xc.call(this)};G.prototype.zfb=function(){var I=this.F.O(h.If);I.source=this.object.get("canvas");I.aK=this.object.get("canvasTimestamp");I.opacity=this.object.get("opacity");I.isSprite=!1;I.hidden=this.object.get("hidden");I.depthTest=this.object.get("depthTest");I.colorSpace=this.object.get("encoding")=="srgb"?e.SRGBColorSpace:e.LinearSRGBColorSpace};return G}(C)},
Mi:function(C){return function(F){function G(){return F!==null&&F.apply(this,arguments)||this}O(G,F);G.prototype.Wc=function(){F.prototype.Wc.call(this);this.tp=this.model.u6().Xv(.1);this.object.get("preload")&&this.model.x6().QN(this.tp,.1);var I=this.F.K(h.Mi);I.properties=this.object;I.M=this.object;I.isSprite=!1;I.priority=this.object.get("preload")?g.DF:g.csa;I.tp=this.tp;k.ba(this.object,d,this.pMa||(this.pMa=this.cP.bind(this)),!0)};G.prototype.Xc=function(){this.model.u6().qP(this.tp);this.model.x6().qP(this.tp);
k.da(this.object,d,this.pMa);F.prototype.Xc.call(this)};G.prototype.cP=function(){this.F.O(h.Mi).lw=this.object.get("image")};return G}(C)},ci:function(C){return function(F){function G(){return F!==null&&F.apply(this,arguments)||this}O(G,F);G.prototype.Wc=function(){F.prototype.Wc.call(this);this.F.K(h.ci);k.ba(this.object,f,this.tMa||(this.tMa=this.Mfb.bind(this)),!0)};G.prototype.Xc=function(){k.da(this.object,f,this.tMa);F.prototype.Xc.call(this)};G.prototype.Mfb=function(){var I=this.F.O(h.ci);
I.color=this.object.get("color");I.opacity=this.object.get("opacity");I.depthTest=this.object.get("depthTest");I.width=this.object.get("width")};return G}(C)},Plane:function(C){return function(F){function G(){return F!==null&&F.apply(this,arguments)||this}O(G,F);G.prototype.Wc=function(){F.prototype.Wc.call(this);this.F.K(h.Plane);this.F.K(h.sa);k.ba(this.object,q,this.JMa||(this.JMa=this.Ufb.bind(this)),!0)};G.prototype.Xc=function(){k.da(this.object,q,this.JMa);F.prototype.Xc.call(this)};G.prototype.Ufb=
function(){t.set(0,0,0);v.set(this.object.get("upX",0),this.object.get("upY",1),this.object.get("upZ",0));u.set(this.object.get("normalX",0),this.object.get("normalY",0),this.object.get("normalZ",1)).multiplyScalar(-1);r.lookAt(t,u,v);w.setFromRotationMatrix(r);var I=this.F.O(h.sa);I.Mz=this.object.get("attachToParent");I.translationX=this.object.get("x",0);I.translationY=this.object.get("y",0);I.Xe=this.object.get("z",0);I.Ge=this.object.get("width",1);I.We=this.object.get("height",1);I.Wd=w.x*y;
I.fd=w.y*y;I.Ve=w.z*y;I.positionX=0;I.positionY=0;I.positionZ=0};return G}(C)},pb:function(C){return function(F){function G(){return F!==null&&F.apply(this,arguments)||this}O(G,F);G.prototype.Wc=function(){F.prototype.Wc.call(this);this.F.K(h.pb).F=this.wb;k.ba(this.object,m,this.FMa||(this.FMa=this.Sfb.bind(this)),!0)};G.prototype.Xc=function(){k.da(this.object,m,this.FMa);F.prototype.Xc.call(this)};G.prototype.Sfb=function(){this.F.O(h.pb).id=this.object.get("parentId")};return G}(C)},ETa:function(C){return function(F){function G(){return F!==
null&&F.apply(this,arguments)||this}O(G,F);G.prototype.Wc=function(){F.prototype.Wc.call(this);k.ba(this.object,p,this.IMa||(this.IMa=this.Tfb.bind(this)),!0)};G.prototype.Xc=function(){k.da(this.object,p,this.IMa);F.prototype.Xc.call(this)};G.prototype.Tfb=function(){var I=this.object.get("maxWorldToPixelScale"),N=this.object.get("minWorldToPixelScale");if(I!==void 0||N!==void 0){var P=this.F.O(h.Uk,!0);P.bE=I;P.cE=N;P.Ge=P.We=P.Dh=this.object.get("scale")}else(P=this.F)===null||P===void 0||P.ja(h.Uk)};
return G}(C)},Lsa:function(C){return function(F){function G(){return F!==null&&F.apply(this,arguments)||this}O(G,F);G.prototype.Wc=function(){F.prototype.Wc.call(this);this.F.K(h.sa);k.ba(this.object,x,this.KMa||(this.KMa=this.Vfb.bind(this)),!0)};G.prototype.Xc=function(){k.da(this.object,x,this.KMa);F.prototype.Xc.call(this)};G.prototype.Vfb=function(){var I=this.F.O(h.sa);I.Mz=this.object.get("attachToParent");I.positionX=this.object.get("x",this.object.get("positionX",0));I.positionY=this.object.get("y",
this.object.get("positionY",0));I.positionZ=this.object.get("z",this.object.get("positionZ",0));I.jf=this.object.get("rotationOrder","XYZ");I.Wd=this.object.get("rotationX",0);I.fd=this.object.get("rotationY",0);I.Ve=this.object.get("rotationZ",0);I.scale=this.object.get("scale",1);I.translationX=this.object.get("translationX",0);I.translationY=this.object.get("translationY",0);I.Xe=this.object.get("translationZ",0)};return G}(C)},vd:function(C){return function(F){function G(){return F!==null&&F.apply(this,
arguments)||this}O(G,F);G.prototype.Wc=function(){F.prototype.Wc.call(this);k.ba(this.object,z,this.MMa||(this.MMa=this.Zfb.bind(this)),!0)};G.prototype.Xc=function(){k.da(this.object,z,this.MMa);F.prototype.Xc.call(this)};G.prototype.Zfb=function(){var I=this.object.get("clickEnabled"),N=this.object.get("rollOverEnabled");if(I!==!1&&N!==!1)this.F.ja(h.Lr);else{var P=this.F.K(h.Lr);P.Lqa=I===!1;P.Mqa=N===!1}I===!1&&N===!1?this.F.ja(h.vd):(P=this.F.O(h.vd,!0),P.bB=this.object.get("useHandCursor"),
P.SE=this.object.get("transparentAreaActive"),P.M=this.object,P.kt=!!I,P.Tt=!!N)};return G}(C)},PK:function(C){return function(F){function G(){return F!==null&&F.apply(this,arguments)||this}O(G,F);G.prototype.Wc=function(){F.prototype.Wc.call(this);k.ba(this.object,A,this.OMa||(this.OMa=this.egb.bind(this)),!0)};G.prototype.Xc=function(){k.da(this.object,A,this.OMa);F.prototype.Xc.call(this)};G.prototype.egb=function(){var I=this.F.O(h.ei,!0);I.castShadow=this.object.get("castShadow");I.receiveShadow=
this.object.get("receiveShadow")};return G}(C)},wd:function(C){return function(F){function G(){return F!==null&&F.apply(this,arguments)||this}O(G,F);G.prototype.Wc=function(){F.prototype.Wc.call(this);this.F.K(h.wd);this.visible=!1;k.ba(this.object,D,this.QMa||(this.QMa=this.fgb.bind(this)),!0)};G.prototype.Xc=function(){k.da(this.object,D,this.QMa);this.gg(!1);F.prototype.Xc.call(this)};G.prototype.fgb=function(){var I=this.F.O(h.wd);I.color=this.object.get("color");I.opacity=this.object.get("hidden")?
0:this.object.get("opacity");I.depthTest=this.object.get("depthTest");this.gg(I.opacity>0)};G.prototype.gg=function(I){this.visible!=I&&((this.visible=I)?this.object.m(n.od):this.object.m(n.jd))};return G}(C)},qo:function(C){return function(F){function G(){return F!==null&&F.apply(this,arguments)||this}O(G,F);G.prototype.Wc=function(){F.prototype.Wc.call(this);var I=this.F.K(h.qo);I.properties=this.object;I.M=this.object;k.ba(this.object,E,this.SMa||(this.SMa=this.BJ.bind(this)),!0)};G.prototype.Xc=
function(){k.da(this.object,E,this.SMa);F.prototype.Xc.call(this)};G.prototype.BJ=function(){this.F.O(h.qo).ira=this.object.get("video")};return G}(C)},CZ:function(C){return function(F){function G(){return F!==null&&F.apply(this,arguments)||this}O(G,F);G.prototype.Wc=function(){F.prototype.Wc.call(this);k.ba(this.object,B,this.TMa||(this.TMa=this.hgb.bind(this)),!0)};G.prototype.Xc=function(){k.da(this.object,B,this.TMa);F.prototype.Xc.call(this)};G.prototype.hgb=function(){var I=this.F.O(h.ei,!0);
I.opacity=this.object.get("enabled")&&!this.object.get("hidden")?this.object.get("opacity"):0;I.M=this.object};return G}(C)}}});
define("tdv/player/view/model3d/renderer/adapters/ModelAdapter","require exports three.mod tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/model3d/renderer/adapters/BaseModelAdapter tdv/player/view/model3d/renderer/adapters/Mixins tdv/player/view/webgl/components".split(" "),function(a,l,k,n,g,h,e,b,c){a=function(p){function q(r,t,u,v){r=p.call(this,r,t,u,v)||this;r.CA=r.CA.bind(r);r.wb=r.F;r.pr=new h;r.pr.bind(g.V,r.Bm,r,!0);n.ba(r.object,d,r.CA,!0);
r.Wc();return r}O(q,p);q.prototype.Wc=function(){};q.prototype.Xc=function(){};q.prototype.dispose=function(){n.da(this.object,d,this.CA);this.pr.h(g.V,this.Bm,this);this.pr=null;this.Xc();p.prototype.dispose.call(this)};q.prototype.Bm=function(r){var t=this.model.get("model");t.set("translationX",r.data.position.x);t.set("translationY",r.data.position.y);t.set("translationZ",r.data.position.z);f.setFromQuaternion(r.data.quaternion,t.get("rotationOrder"));t.set("rotationX",f.x*m);t.set("rotationY",
f.y*m);t.set("rotationZ",f.z*m);r.data.scale>.001&&t.set("scale",r.data.scale);this.object.m(g.Mm)};q.prototype.CA=function(){if(this.object.get("positionDraggable")||this.object.get("rotationDraggable")||this.object.get("scaleDraggable")){var r=this.NI.O(c.Fh,!0);r.translate=this.object.get("positionDraggable")||!1;r.rotate=this.object.get("rotationDraggable")||!1;r.scale=this.object.get("scaleDraggable")||!1;r.M=this.pr}else this.NI.ja(c.Fh)};return q}(e);var d=["positionDraggable","rotationDraggable",
"scaleDraggable"],f=new k.Euler,m=180/Math.PI;return b.PK(a)});
define("tdv/view/util/MeasureText",["require","exports","tdv/view/util/Font"],function(a,l,k){function n(e,b,c){c===void 0&&(c=null);h.style.fontFamily=k.cA(b.fontFamily);h.style.font=k.A6(b);h.innerHTML=e;document.body.appendChild(h);var d=new g(Math.ceil(h.clientWidth),Math.ceil(h.clientHeight));document.body.removeChild(h);c&&(c.font=k.A6(b),e=c.measureText(e).width,e>0&&(d.height*=e/d.width,d.width=e));return d}var g=function(){return function(e,b){this.width=e;this.height=b}}(),h=document.createElement("div");
h.style.display="inline-block";h.style.margin="0";h.style.padding="0";h.style.whiteSpace="nowrap";n.Iaa=function(){return function(){this.fontFamily="Arial";this.fontSize="12px";this.fontWeight="400";this.fontStyle="normal"}}();return n});
define("tdv/player/canvas/MenuCanvas",["require","exports","tdv/view/util/MeasureText","tdv/view/util/Font"],function(a,l,k,n){var g=function(){function e(b,c,d){this.ih=b;this.item=c;this.label=c.get("label");this.fontFamily=this.ih.get("fontFamily","Arial");this.fontSize=Math.round(12*d)+"px";this.backgroundColor=this.ih.get("backgroundColor","#000000");this.nOa=this.ih.get("rollOverBackgroundColor",this.backgroundColor);this.whb=this.ih.get("selectedBackgroundColor",this.nOa);this.tt=this.ih.get("fontColor",
"#000000");this.oOa=this.ih.get("rollOverFontColor",this.tt);this.xhb=this.ih.get("selectedFontColor",this.oOa);this.xQa=this.wQa=this.eu=this.hu=this.height=this.width=this.left=this.top=0;this.status=!1;this.rna=!0}e.prototype.rlb=function(){var b=new k.Iaa;b.fontFamily=this.fontFamily;b.fontSize=this.fontSize;b=k(this.label,b);this.hu=b.width;this.eu=b.height};e.prototype.Sib=function(b){this.status!==b&&(this.status=b,this.rna=!0)};e.prototype.Obb=function(b){if(this.rna){this.rna=!1;switch(this.status){case "over":var c=
this.nOa;var d=this.oOa;break;case "selected":c=this.whb;d=this.xhb;break;default:c=this.backgroundColor,d=this.tt}b.clearRect(this.left,this.top,this.width,this.height);b.fillStyle=c;b.fillRect(this.left,this.top,this.width,this.height);b.fillStyle=d;b.font=this.fontSize+" "+n.cA(this.fontFamily);b.textBaseline="middle";b.textAlign="center";b.fillText(this.label,Math.round(this.wQa),Math.round(this.xQa));return!0}return!1};return e}(),h=180/Math.PI;return function(){function e(b,c){this.ih=b;this.items=
c.map(this.Wab.bind(this));this.RO=this.SO=this.Rj=this.Sj=0;this.Lk();this.canvas=document.createElement("canvas");this.canvas.width=this.Sj;this.canvas.height=this.Rj;this.context=this.canvas.getContext("2d");this.selectedIndex=this.xw=-1}e.prototype.Wab=function(b){return new g(this.ih,b,3)};e.prototype.Adb=function(b){return this.Sj/3*b/300};e.prototype.Lcb=function(b){return this.Rj/3*b/300};e.prototype.ff=function(){return 2*Math.atan2(this.Sj/3*.5,300)*h};e.prototype.dg=function(){return this.Sj};
e.prototype.wg=function(){return this.Rj};e.prototype.Ig=function(){return this.canvas};e.prototype.Lk=function(){var b=0,c=0;this.items.forEach(function(p){p.rlb();b=Math.max(p.hu,b);c=Math.max(p.eu,c)}.bind(this));this.SO=b+30;this.RO=c+30;var d=0,f=0,m=0;this.UW=20;this.items.length>20&&(this.UW=Math.ceil(this.items.length/Math.ceil(this.items.length/20)));this.items.forEach(function(p){m>=this.UW&&(m=0,f+=this.SO,d=0);p.left=f;p.top=d;p.wQa=f+this.SO*.5;p.xQa=d+this.RO*.5;p.width=this.SO;p.height=
this.RO;m+=1;d+=this.RO}.bind(this));this.Sj=Math.ceil(this.items.length/this.UW)*this.SO;this.Rj=Math.min(this.UW,this.items.length)*this.RO};e.prototype.update=function(){for(var b=!1,c=0;c<this.items.length;c++)this.items[c].Sib(this.xw==c?"over":this.selectedIndex==c?"selected":"normal"),b=this.items[c].Obb(this.context)||b;return b};e.prototype.Lma=function(b,c){var d=-1;b>=0&&b<this.Sj&&c>=0&&c<this.Rj&&(d=Math.floor(b/this.SO)*this.UW+Math.floor(c/this.RO),d>=this.items.length&&(d=-1));return d};
e.prototype.IE=function(b){this.xw=b};e.prototype.Nw=function(b){this.selectedIndex=b};e.prototype.clear=function(){this.items=this.canvas=this.context=this.ih=null};return e}()});
define("tdv/player/view/model3d/renderer/adapters/MenuAdapter","require exports three.mod tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/RenderOrder tdv/player/canvas/MenuCanvas tdv/events/EventDispatcher tdv/player/view/util/XR tdv/player/view/webgl/components tdv/view/util/Ease tdv/view/util/EaseDimension tdv/view/util/Animation".split(" "),function(a,l,k,n,g,h,e,b,c,d,f,m,p){function q(A){return c.isPresenting?-v.setFromQuaternion(c.xl,"YXZ").y*x:A.get("camera").get("yaw")}function r(A){return c.isPresenting?
v.setFromQuaternion(c.xl,"YXZ").x*x:A.get("camera").get("pitch")}a=function(){function A(D,E,B){this.model=D;this.wb=E;this.Ba=B;this.f8=this.f8.bind(this);this.Pn=[];this.YO=[];this.Yq=!1;c.M.bind(g.V,this.Ya,this,!0);n.ba(this.model,["xrMenu"],this.f8,!0)}A.prototype.dispose=function(){n.da(this.model,["xrMenu"],this.f8);c.M.h(g.V,this.Ya,this);this.xa()};A.prototype.Ya=function(){this.jRa()};A.prototype.f8=function(){this.jRa()};A.prototype.jRa=function(){var D=c.isPresenting?this.model.get("xrMenu"):
null;D!=this.ih&&(this.ih&&this.xa(),(this.ih=D)&&this.Va())};A.prototype.Va=function(){this.Rv=this.Ba.T.rc("CameraOffsetGroup");this.Rv.K(d.Group);this.Rv.K(d.sa).easing=0;var D=this.Rv.K(d.wK);D.Ba=this.Ba;D.rotate=!1;this.Rv.K(d.pb).F=this.wb;this.rw=new t(this.model,this.ih,this.Rv);this.rw.bind(g.la,this.Nfb,this,!0);this.rw.bind(g.Eb,this.Ofb,this,!0);this.rw.bind(g.tc,this.Pfb,this,!0)};A.prototype.Nfb=function(){this.aQa();this.dGa(this.ih,0);this.rw.gg(!1)};A.prototype.dGa=function(D,E){for(;this.Pn.length>
E;)this.Vla(this.Pn.pop());this.Pn.push(this.Xab(D))};A.prototype.sHa=function(){for(this.rw.gg(!0);this.Pn.length;)this.Vla(this.Pn.pop())};A.prototype.Xab=function(D){D=new u(this.model,this.ih,D,this.Rv,this.Pn.length>0?this.Pn[this.Pn.length-1]:this.rw);if(this.Pn.length>0){var E=this.Pn[this.Pn.length-1];var B=E.Jc();E=E.Lc()+E.ff()/2+1+D.ff()/2;D.setPosition(E,B)}else E=q(this.model),B=r(this.model);D.setPosition(E,B);D.Vna.get("children",[]).forEach(function(C){C.bind(g.la,this.xMa,this,!0)},
this);D.bind(g.tc,this.wMa,this,!0);D.bind(g.Eb,this.vMa,this,!0);return D};A.prototype.Vla=function(D){D.Vna.get("children",[]).forEach(function(E){E.h(g.la,this.xMa,this)},this);D.h(g.tc,this.wMa,this);D.h(g.Eb,this.vMa,this);this.bpa(D);D.dispose()};A.prototype.xMa=function(D){D=D.source;if(D.get("children",[]).length){var E=this.acb(D);this.dGa(D,E+1)}else this.sHa()};A.prototype.wMa=function(D){this.t$a(D.source)};A.prototype.vMa=function(D){this.bpa(D.source)};A.prototype.Pfb=function(){this.NP()};
A.prototype.Ofb=function(){this.NP()};A.prototype.t$a=function(D){this.bpa(D);this.YO.push(D);this.YO.length>0&&this.Kjb();this.NP()};A.prototype.bpa=function(D){this.YO=this.YO.filter(function(E){return E!=D});this.YO.length==0&&this.aQa();this.NP()};A.prototype.NP=function(){this.cPa(this.YO.length>0||this.rw.Yq())};A.prototype.cPa=function(D){this.Yq!==D&&((this.Yq=D)?(this.model.get("camera").MOa(!0),this.model.get("camera").jPa(!0),this.X8&&(clearTimeout(this.X8),this.X8=0)):this.X8=setTimeout(function(){this.X8=
0;this.model.get("camera").MOa(!1);this.model.get("camera").jPa(!1)}.bind(this),100))};A.prototype.aQa=function(){this.z5||(this.z5=setTimeout(this.sHa.bind(this),3E3))};A.prototype.Kjb=function(){this.z5&&(clearTimeout(this.z5),this.z5=0)};A.prototype.acb=function(D){return this.Pn.findIndex(function(E){return E.Vna.get("children",[]).indexOf(D)>=0?!0:!1})};A.prototype.xa=function(){this.Rv&&(this.Rv.T.dd(this.Rv),this.Rv=null);this.rw&&(this.rw.dispose(),this.rw=null);for(;this.Pn.length;)this.Vla(this.Pn.pop());
this.cPa(!1)};return A}();b=function(A){function D(E,B,C,F,G){var I=A.call(this)||this;I.model=E;I.ih=B;I.t7=C;I.yg=F;I.sw=new e(I.ih,I.t7);I.$a=0;I.pitch=0;I.wf=new f("linear",[new m("coef",0,1)],150);I.xw=-1;I.selectedIndex=-1;I.Ue=!1;G?(I.nY=G===null||G===void 0?void 0:G.Lc(),I.mqa=G===null||G===void 0?void 0:G.Jc()):(I.nY=q(I.model),I.mqa=r(I.model));I.F=I.yg.T.rc("MenuItems");I.F.K(d.Plane).renderOrder=h.fTa;I.F.K(d.pb).F=I.yg;I.F.K(d.sa).jf="YXZ";E=I.F.K(d.If);E.source=I.sw.Ig();E.isSprite=
!1;E.hidden=!1;E.depthTest=!1;I.F.K(d.FF);E=I.F.K(d.vd);E.bB=!0;E.SE=!1;E.M=I;E.kt=!0;E.Tt=!0;I.hLa=Date.now();I.bind(g.fb,I.Wj,I,!0);I.bind(g.tc,I.mE,I,!0);I.bind(g.Eb,I.Sn,I,!0);I.bind(g.la,I.gX,I,!0);c.M.bind(g.NY,I.lE,I,!0);p.requestFrame(I.vp,I);I.Ep();I.kK();I.lE();return I}O(D,A);D.prototype.dispose=function(){this.h(g.fb,this.Wj,this);this.h(g.tc,this.mE,this);this.h(g.Eb,this.Sn,this);this.h(g.la,this.gX,this);c.M.h(g.NY,this.lE,this);p.cHa(this.vp,this);this.F.T.dd(this.F)};D.prototype.Lc=
function(){return this.$a};D.prototype.Jc=function(){return this.pitch};D.prototype.ff=function(){return this.sw.ff()};D.prototype.KJa=function(){return this.selectedIndex};D.prototype.Yq=function(){return this.Ue};D.prototype.setPosition=function(E,B){this.$a=E;this.pitch=B;this.mK()};D.prototype.Wj=function(E){this.IE(this.eJa(E))};D.prototype.mE=function(){this.Ue=!0;this.kK()};D.prototype.Sn=function(){this.Ue=!1;this.IE(-1);this.kK()};D.prototype.gX=function(E){E=this.eJa(E);this.Nw(E);this.t7[E].m(g.la)};
D.prototype.eJa=function(E){var B=(E.data.localPosition.x+.5)*this.sw.dg();E=(.5-E.data.localPosition.y)*this.sw.wg();return this.sw.Lma(B,E)};D.prototype.vp=function(){c.isPresenting||this.lE();p.requestFrame(this.vp,this)};D.prototype.lE=function(){if(this.wf){var E=Date.now();this.wf.Lb(E-this.hLa);this.hLa=E;this.wf.Re()&&(this.wf=null);this.kK()}this.mK()};D.prototype.setScale=function(E){this.F.getComponent(d.sa).scale!=E&&(this.F.O(d.sa).scale=E)};D.prototype.Xn=function(E){this.F.getComponent(d.If).opacity!=
E&&(this.F.O(d.If).opacity=E)};D.prototype.IE=function(E){this.xw!=E&&(this.xw>=0&&this.t7[this.xw].m(g.Eb),this.xw=E,this.xw>=0&&this.t7[this.xw].m(g.tc),this.Ep())};D.prototype.Nw=function(E){this.selectedIndex!=E&&(this.selectedIndex=E,this.Ep())};D.prototype.Ep=function(){this.sw.Nw(this.selectedIndex);this.sw.IE(this.xw);this.sw.update()&&(this.F.O(d.If).aK=Date.now())};D.prototype.mK=function(){var E=this.ih.get("distance")/this.model.get("worldUnitToMeters",1),B=this.F.O(d.sa);w.identity();
w.multiply(y.makeRotationFromQuaternion(c.ug,"YXZ"));w.multiply(y.makeRotationFromQuaternion(c.xl,"YXZ").invert());var C=this.$a,F=this.pitch;if(this.wf){var G=this.wf.nb("coef");for(C-=this.nY;C>180;)C-=360;for(;C<-180;)C+=360;F-=this.mqa;C=this.nY+C*G;F=this.mqa+F*G}w.multiply(y.makeRotationFromEuler(v.set(F*z,-C*z,0,"YXZ"),"YXZ"));v.setFromRotationMatrix(w,B.jf);B.Wd=v.x*x;B.fd=v.y*x;B.Ve=v.z*x;B.positionZ=-E;B.Ge=this.sw.Adb(E);B.We=this.sw.Lcb(E)};D.prototype.kK=function(){};return D}(b);var t=
function(A){function D(E,B,C){E=A.call(this,E,B,[B],C,null)||this;E.visible=!0;E.F.K(d.sa).easing=.01;E.bP=E.bP.bind(E);n.ba(E.model,["camera.pitch","camera.yaw"],E.bP,!0);return E}O(D,A);D.prototype.dispose=function(){A.prototype.dispose.call(this);n.da(this.model,["camera.pitch","camera.yaw"],this.bP)};D.prototype.gg=function(E){this.visible!==E&&(this.visible=E,this.visible||(this.IE(-1),this.Nw(-1)),E=!this.visible,this.F.getComponent(d.If).hidden!==E&&(this.F.O(d.If).hidden=E,this.bP()))};D.prototype.bP=
function(){this.visible&&(this.setPosition(q(this.model),this.OJa()),this.kK())};D.prototype.lE=function(){this.bP();A.prototype.lE.call(this)};D.prototype.kK=function(){var E=this.ih.get("opacity",.5),B=this.ih.get("rollOverOpacity",E);E=this.Ue?B:E;var C=.66,F=this.model.get("camera"),G=r(this.model);F=Math.abs(G-this.OJa())/(F.get("fov")*.5);F<1&&(C+=(1-F)*(1-C),E+=(1-F)*(B-E));E*=this.wf?this.wf.nb("coef"):1;this.Xn(Math.min(1,Math.max(0,E)));this.setScale(C);this.Ep()};D.prototype.OJa=function(){var E=
r(this.model);return Math.min(90,Math.max(-90,40-E))};return D}(b),u=function(A){function D(E,B,C,F,G){E=A.call(this,E,B,C.get("children",[]),F,G)||this;E.Vna=C;return E}O(D,A);D.prototype.kK=function(){var E=this.ih.get("opacity",.5),B=this.ih.get("rollOverOpacity",E);E=this.Ue?B:E;E*=this.wf?this.wf.nb("coef"):1;this.Xn(Math.min(1,Math.max(0,E)))};return D}(b),v=new k.Euler,w=new k.Matrix4,y=new k.Matrix4,x=180/Math.PI,z=Math.PI/180;return a});
define("tdv/player/view/model3d/renderer/adapters/ToolTipAdapter",["require","exports","tdv/binding/BindingsHandler","tdv/constants/EventName"],function(a,l,k,n){return function(){function g(h,e){this.renderer=h;this.model=e;this.cb=this.renderer.R;this.S7=this.S7.bind(this);this.lj=[];this.ZA="";this.tw=null;this.Va()}g.prototype.dispose=function(){this.xa()};g.prototype.Va=function(){k.ba(this.model,"objects",this.S7,!0);this.model.bind(n.tc,this.zMa,this,!0);this.model.bind(n.Eb,this.yMa,this,
!0)};g.prototype.xa=function(){this.model.h(n.tc,this.zMa,this);this.model.h(n.Eb,this.yMa,this);k.da(this.model,"objects",this.S7);this.HE([]);this.tw&&this.Sn(this.tw)};g.prototype.S7=function(){this.HE(this.model.get("objects"))};g.prototype.HE=function(h){this.lj!=h&&(this.lj.forEach(function(e){e.h(n.tc,this.EMa,this);e.h(n.Eb,this.DMa,this);e.h(n.jd,this.CMa,this)}.bind(this)),this.tw&&this.lj.indexOf(this.tw)>=0&&h.indexOf(this.tw)<0&&this.Sn(this.tw),this.lj=h,this.lj.forEach(function(e){e.bind(n.tc,
this.EMa,this,!0);e.bind(n.Eb,this.DMa,this,!0);e.bind(n.jd,this.CMa,this,!0)}.bind(this)))};g.prototype.EMa=function(h){h=h.source;this.mE(h,h.get("toolTip"))};g.prototype.DMa=function(h){this.Sn(h.source)};g.prototype.CMa=function(h){this.Sn(h.source)};g.prototype.zMa=function(){this.mE(this.model,this.model.get("toolTip"))};g.prototype.yMa=function(){this.Sn(this.model)};g.prototype.Sn=function(h){this.tw==h&&(this.tw=null,this.yPa(""))};g.prototype.mE=function(h,e){this.tw!=h&&(this.tw=h,this.yPa(e||
""))};g.prototype.yPa=function(h){this.ZA!=h&&(this.ZA=h,this.cb.set("toolTip",this.ZA))};return g}()});
define("tdv/player/view/panorama/renderer/object/canvas/SurfaceReticleCanvas",["require"],function(){function a(l){this.Ie=this.Xu(l.get("surfaceReticleColor"));this.mz=this.Xu(l.get("surfaceReticleSelectionColor"));this.Mf=l.get("surfaceReticleOpacity");this.d5a=l.get("surfaceReticleSelectionOpacity");this.Rm=this.Gh=128;this.B3a=.456;this.C3a=.088;this.R0a=.18;this.fa=document.createElement("canvas");this.fa.width=this.Gh;this.fa.height=this.Rm;this.Fa=this.fa.getContext("2d");this.Fa.fillStyle=
"red";this.Fa.imageSmoothingEnabled=!0;this.Fa.fillRect(0,0,this.Gh,this.Rm);this.Ad=this.Px=!1;this.dM=this.p2=void 0;this.aG=0}a.prototype.dea=function(){return this.fm(this.mz[0]*NaN+NaN*this.Ie[0],this.mz[1]*NaN+NaN*this.Ie[1])};a.prototype.Xu=function(l){l=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(l);return[parseInt(l[1],16),parseInt(l[2],16),parseInt(l[3],16)]};a.prototype.fm=function(l,k){return"rgba("+l.join(",")+", "+k+")"};a.prototype.setPosition=function(l){this.Rb!=l&&(this.Rb=
l,this.Pd=!0)};a.prototype.dg=function(){return this.Gh};a.prototype.wg=function(){return this.Rm};a.prototype.Ig=function(){return this.fa};a.prototype.update=function(){if(!this.Pd)return!1;this.Pd=!1;this.Fa.clearRect(0,0,this.Gh,this.Rm);var l=[this.mz[0]*this.Rb+(1-this.Rb)*this.Ie[0],this.mz[1]*this.Rb+(1-this.Rb)*this.Ie[1],this.mz[2]*this.Rb+(1-this.Rb)*this.Ie[2]],k=this.d5a*this.Rb+(1-this.Rb)*this.Mf;this.Fa.strokeStyle=this.fm(l,k);this.Fa.fillStyle=this.fm(l,k*this.Rb);this.Fa.beginPath();
this.Fa.lineWidth=this.Gh*this.C3a;this.Fa.arc(.5*this.Gh,.5*this.Gh,this.Gh*this.B3a,0,2*Math.PI,!1);this.Fa.stroke();this.Fa.beginPath();this.Fa.arc(.5*this.Gh,.5*this.Gh,this.Gh*this.R0a,0,2*Math.PI,!1);this.Fa.fill();return!0};return a});define("tdv/player/view/model3d/renderer/adapters/canvas/SurfaceReticleCanvas",["require","tdv/player/view/panorama/renderer/object/canvas/SurfaceReticleCanvas"],function(a){return a("tdv/player/view/panorama/renderer/object/canvas/SurfaceReticleCanvas")});
define("tdv/player/view/model3d/renderer/adapters/SurfaceSelectorPointerAdapter","require tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/EventDispatcher tdv/constants/RenderOrder tdv/player/view/model3d/renderer/adapters/canvas/SurfaceReticleCanvas tdv/player/view/util/Device tdv/player/view/util/XR tdv/player/view/webgl/components".split(" "),function(a){function l(p,q,r){this.Ea=p;this.Tb=q;this.o=r;this.R=this.o.R;this.Ny=this.Ny.bind(this);this.Wy=this.Wy.bind(this);this.Ad=void 0;
this.Ea.bind(n.N("surfaceSelectionEnabled"),this.zda,this,!0);this.zda()}var k=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/events/EventDispatcher"),h=a("tdv/constants/RenderOrder"),e=a("tdv/player/view/model3d/renderer/adapters/canvas/SurfaceReticleCanvas"),b=a("tdv/player/view/util/Device"),c=a("tdv/player/view/util/XR"),d=a("tdv/player/view/webgl/components");l.prototype.zda=function(){var p=this.Ea.get("surfaceSelectionEnabled");!!this.A!=p&&(p?this.DG():this.cs())};
l.prototype.DG=function(){if(!this.A){this.A=this.Tb.T.rc("PointerReticle");this.A.K(d.Plane).renderOrder=h.TTa;this.A.K(d.Cl).F=this.Tb;this.A.K(d.Lr);this.A.K(d.FF);this.A.K(d.pb).F=this.Tb;var p=this.A.K(d.Ip);p.M=new g;p.M.bind(n.V,this.IS,this,!0);k.ba(this.Ea,f,this.Ny,!0);this.Fv=new e(this.R);this.Fv.setPosition(0);this.Fv.update();p=this.A.K(d.If);p.source=this.Fv.Ig();p.depthTest=!1;k.ba(this.Ea,m,this.Wy,!0);c.M.bind(n.V,this.tBa,this,!0);this.Ae=null;this.cI(!1)}};l.prototype.cs=function(){this.A&&
(this.Ae&&(this.Ae.m(n.Eb),this.Ae=null),k.da(this.Ea,m,this.Wy),this.gU(null),this.A.getComponent(d.Ip).M.h(n.V,this.IS,this,!0),this.Tb.T.dd(this.A),this.Fv=this.A=null,c.M.h(n.V,this.tBa,this),k.da(this.Ea,f,this.Ny))};l.prototype.Ny=function(){var p=this.A.O(d.Uk,!0);p.Ge=p.We=2;p.scale=this.Ea.get("surfaceReticleRadius");p.bE=this.Ea.get("surfaceReticleMaxRadius");p.cE=this.Ea.get("surfaceReticleMinRadius")};l.prototype.IS=function(p){p=this.$wa(p.data.beacons);var q=this.Iwa(p);q==0&&(p=null);
this.n5a(p);this.E5a(q)};l.prototype.Wy=function(){this.gU(this.Ea&&this.Ea.get("pointer"))};l.prototype.gU=function(p){this.ue!==p&&(this.ue&&(this.ue.h(n.la,this.Py,this,!0),this.ue.h(n.fb,this.rg,this,!0),this.ue.h(n.Eb,this.Bs,this,!0)),this.ue=p)&&(this.ue.bind(n.la,this.Py,this,!0),this.ue.bind(n.fb,this.rg,this,!0),this.ue.bind(n.Eb,this.Bs,this,!0))};l.prototype.Py=function(p){var q=null;if(b.ub()&&!c.isPresenting){var r=this.A.getComponent(d.Ip);r&&r.fW&&p.data.position&&(p=r.fW((new THREE.Vector3).copy(p.data.position)),
p=this.$wa(p),this.Iwa(p)!=0&&(q=this.aea(p)))}else q=this.Ae;q&&q.m(n.la)};l.prototype.rg=function(p){this.cI(p.data.type=="other"?!1:!0)};l.prototype.Bs=function(){this.cI(!1)};l.prototype.cI=function(p){this.Ad!==p&&(this.Ad=p,this.ui())};l.prototype.tBa=function(){this.ui()};l.prototype.ui=function(){this.A.O(d.If).opacity=b.ub()&&!c.isPresenting||!this.Ad?0:1};l.prototype.n5a=function(p){p=this.aea(p);this.Ae!=p&&(this.Ae&&this.Ae.m(n.Eb),(this.Ae=p)&&this.Ae.m(n.tc))};l.prototype.$wa=function(p){if(!p)return null;
for(var q=0;q<p.length;q++)if(this.aea(p[q]))return p[q];return null};l.prototype.Iwa=function(p){if(!p)return 0;var q=this.A.getComponent(d.sa);return q?Math.max(0,1-p.distance/(this.Ea.get("surfaceSelectionCoef")*q.scale*q.Ge)):0};l.prototype.aea=function(p){return(p=(p=p&&p.entity)&&p.getComponent(d.fQ))&&p.Qjb||null};l.prototype.E5a=function(p){this.Fv.setPosition(p);this.Fv.update()&&(this.A.O(d.If).aK=(new Date).getTime())};l.prototype.dispose=function(){this.cs();this.Ea.h(n.N("surfaceSelectionEnabled"),
this.zda,this,!0)};var f=["surfaceReticleRadius","surfaceReticleMaxRadius","surfaceReticleMinRadius"],m=["pointer"];return l});
define("tdv/player/view/model3d/renderer/adapters/objects/NearestObjectsVisibleAdapter","require exports tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/webgl/components".split(" "),function(a,l,k,n,g,h){var e=["maxNearestObjectsVisible"];return function(){function b(c,d,f){this.Ea=c;this.Tb=d;this.Yba=f;this.ha=!1;this.R1=this.R1.bind(this);k.ba(this.Ea,e,this.R1,!0)}b.prototype.R1=function(){var c=!!this.Ea.get("maxNearestObjectsVisible");this.ha!=
c&&(this.ha&&this.cs(),(this.ha=c)&&this.DG())};b.prototype.DG=function(){var c=this.Yba.K(h.Ip);c.M=new g;c.M.bind(n.V,this.IS,this,!0);this.Tb.T.Za()};b.prototype.cs=function(){this.Yba.getComponent(h.Ip).M.h(n.V,this.IS,this);this.Yba.ja(h.Ip);this.Ea.get("objects").forEach(function(c){c.get("hideBasedOnDistance")&&c.Epa(!1)})};b.prototype.IS=function(c){var d=this,f=0,m=this.Ea.get("maxNearestObjectsVisible");c.data.beacons.forEach(function(p){if(p=d.SZa(p))p.get("hideBasedOnDistance")?(p.Epa(f>=
m),f++):p.Epa(!1)})};b.prototype.SZa=function(c){c=(c=c.entity.getComponent(h.fQ))&&c.object;c.get&&c.get("hideBasedOnDistance")!==void 0||(c=null);return c};b.prototype.dispose=function(){k.da(this.Ea,e,this.R1);this.ha&&(this.ha=!1,this.cs())};return b}()});
define("tdv/player/view/model3d/renderer/adapters/measure/MeasureAreaAdapter","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/webgl/components".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/events/EventDispatcher"),h=a("tdv/player/view/webgl/components");a=l.extend(g,function(b,c){g.call(this);this.$d=b;this.Tb=c;this.sg=this.sg.bind(this);this.A=null;this.lm=
0;this.Kd=!1;this.ET=[];this.$d.bind(n.N("areaOpacity"),this.wAa,this);this.Ez()});a.prototype.Z8=function(b){this.ET.forEach(function(c){c.h(n.od,this.we,this,!0);c.h(n.jd,this.we,this,!0)}.bind(this));this.ET=b;this.ET.forEach(function(c){c.bind(n.od,this.we,this,!0);c.bind(n.jd,this.we,this,!0)}.bind(this));this.GEa();this.we()};a.prototype.dispose=function(){this.$d.h(n.N("areaOpacity"),this.wAa,this);this.xz()};a.prototype.ij=function(){return this.A};a.prototype.isVisible=function(){return this.Kd};
a.prototype.wAa=function(){this.Ez();this.ui()};a.prototype.Ez=function(){this.$d.get("areaOpacity")>0?this.mD():this.xz()};a.prototype.mD=function(){if(!this.A){this.A=this.Tb.T.rc("MeasureArea");var b=new g;b.bind(n.V,this.KC,this,!0);this.A.K(h.jo).M=b;this.A.K(h.wd);this.A.K(h.pb).F=this.Tb;k.ba(this.$d,e,this.sg,!0);this.GEa()}};a.prototype.xz=function(){this.A&&(this.A.getComponent(h.jo).M.h(n.V,this.KC,this,!0),k.da(this.$d,e,this.sg),this.A.T.dd(this.A),this.A=null)};a.prototype.xv=function(b){this.Kd!=
b&&((this.Kd=b)?(this.zq(1),this.m(n.od)):(this.zq(0),this.m(n.jd)))};a.prototype.we=function(){this.xv(this.ET.every(function(b){return b.isVisible()}))};a.prototype.KC=function(b){this.$d.set("area",b.data.area)};a.prototype.sg=function(){if(this.A){var b=this.A.O(h.wd);b.color=this.$d.get("areaColor");b.depthTest=this.$d.get("depthTest");b.doubleSided=!0;this.ui()}};a.prototype.zq=function(b){this.lm!=b&&(this.lm=b,this.ui())};a.prototype.ui=function(){this.A&&(this.A.O(h.wd).opacity=this.$d.get("areaOpacity")*
Math.max(1E-4,this.lm))};a.prototype.GEa=function(){this.A&&(this.A.O(h.jo).v=this.ET.map(function(b){return b.ij()}))};var e=["areaColor","areaOpacity","depthTest"];return a});
define("tdv/player/view/model3d/renderer/adapters/canvas/MeasureLabelCanvas",["require","tdv/view/util/MeasureText","tdv/view/util/Font"],function(a){function l(){this.Oda=this.Xu("#ffffff");this.PB=this.Xu("#000000");this.Rm=this.Gh=0;this.fa=document.createElement("canvas");this.Fa=this.fa.getContext("2d");this.Fa.imageSmoothingQuality="high";this.Dv=new k.Iaa;this.Pda=this.LL=void 0;this.rba=this.sba=.5;this.gt=void 0;this.xN=l.naa;this.Cz=void 0;this.BP(0)}var k=a("tdv/view/util/MeasureText"),
n=a("tdv/view/util/Font");l.Sra="imperial area";l.Tra="imperial length";l.$ra="metric area";l.naa="metric length";l.prototype.dispose=function(){this.fa.width=this.fa.height=0;this.fa=null};l.prototype.Thb=function(g){this.Oda!=g&&(this.Oda=g,this.Pd=!0)};l.prototype.Chb=function(g){this.PB!=g&&(this.PB=g,this.Pd=!0)};l.prototype.Uhb=function(g){this.Pda!=g&&(this.Pda=g,this.Pd=!0)};l.prototype.Vhb=function(g){this.LL!=g&&(this.LL=g,this.Pd=!0)};l.prototype.tpa=function(){this.Dv.SN!=.5&&(this.rba=
.5,this.Pd=!0)};l.prototype.upa=function(g){this.Dv.TN!=g&&(this.sba=g,this.Pd=!0)};l.prototype.BP=function(g){this.gt!=g&&(this.gt=g,this.jka())};l.prototype.Wib=function(g){this.xN!=g&&(this.xN=g,this.jka())};l.prototype.Xib=function(g){this.Cz!=g&&(this.Cz=g,this.jka())};l.prototype.jka=function(){if(this.Cz===void 0)this.Xa=this.gt.toFixed(2);else if(this.xN==l.naa){var g=this.gt*this.Cz;this.Xa=g>=1?g.toFixed(2)+"m":(g*100).toFixed(2)+"cm"}else this.xN==l.$ra?(g=this.gt*this.Cz*this.Cz,this.Xa=
g>=.1?g.toFixed(2)+"m\u00b2":(g*1E4).toFixed(2)+"cm\u00b2"):this.xN==l.Tra?(g=this.gt*this.Cz*1.0936,this.Xa=g>1760?(g/1760).toFixed(2)+"mi":g>=100?g.toFixed(2)+"yd":g*3>=1?(g*3).toFixed(2)+"ft":(g*3*12).toFixed(2)+"in"):this.xN==l.Sra&&(g=this.gt*this.Cz*this.Cz*10.76364864,this.Xa=g>=1?g.toFixed(2)+"ft\u00b2":(g*144).toFixed(2)+"in\u00b2");this.Pd=!0};l.prototype.Xu=function(g){g=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(g);return[parseInt(g[1],16),parseInt(g[2],16),parseInt(g[3],16)]};l.prototype.fm=
function(g,h){return"rgba("+g.join(",")+", "+h+")"};l.prototype.dg=function(){return this.Gh};l.prototype.wg=function(){return this.Rm};l.prototype.Ig=function(){return this.fa};l.prototype.update=function(){if(!this.Pd)return!1;this.Pd=!1;this.Dv.fontFamily=this.Pda||"Arial";this.Dv.fontSize=this.LL?typeof this.LL=="string"?this.LL:this.LL+"px":"30px";var g=k(this.Xa,this.Dv),h=this.Xu(this.Oda),e=this.Xu(this.PB),b=g.width;g=g.height;var c=.5*g,d=.3*g,f=c+b+.5*g,m=d+g+.2*g,p=.5*m;this.fa.width=
this.fa.height=this.Gh=this.Rm=Math.max(128,Math.pow(2,Math.ceil(Math.log(Math.max(f,m))/Math.LN2)));var q=this.Gh*this.rba-f*this.rba,r=this.Rm*this.sba-m*this.sba;this.oL();this.Fa.save();this.Fa.translate(q,r);this.Fa.fillStyle=this.fm(e,1);this.Fa.beginPath();this.Fa.moveTo(0,p);this.Fa.quadraticCurveTo(0,0,p,0);this.Fa.lineTo(f-p,0);this.Fa.quadraticCurveTo(f,0,f,p);this.Fa.quadraticCurveTo(f,m,f-p,m);this.Fa.lineTo(p,m);this.Fa.quadraticCurveTo(0,m,0,m-p);this.Fa.closePath();this.Fa.fill();
this.Fa.fillStyle=this.fm(h,1);this.Fa.font=this.Dv.fontSize+" '"+this.Dv.fontFamily+"'";this.Fa.font=this.Dv.fontSize+(isNaN(this.Dv.fontSize)?"":"px")+" "+n.cA(this.Dv.fontFamily);this.Fa.textBaseline="middle";this.Fa.textAlign="center";this.Fa.fillText(this.Xa,Math.round(c+b*.5),Math.round(d+g*.5));this.Fa.restore();return!0};l.prototype.oL=function(){this.Fa.clearRect(0,0,this.Gh,this.Rm)};return l});
define("tdv/player/view/model3d/renderer/adapters/measure/MeasureLabelAdapter","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/RenderOrder tdv/events/EventDispatcher tdv/player/view/webgl/components tdv/player/view/model3d/renderer/adapters/canvas/MeasureLabelCanvas tdv/view/effects/Effect".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/constants/RenderOrder"),h=a("tdv/events/EventDispatcher"),
e=a("tdv/player/view/webgl/components"),b=a("tdv/player/view/model3d/renderer/adapters/canvas/MeasureLabelCanvas"),c=a("tdv/view/effects/Effect");a=l.extend(h,function(f,m,p){h.call(this);this.iga=f;this.$d=m;this.Tb=p;this.sg=this.sg.bind(this);this.Bq=this.A=null;this.lm=0;this.Kd=!1;this.d4=this.hi=this.YC=this.DC=null;this.gt=void 0;this.Wi=new b;this.iga.bind(n.N("worldUnitToMeters"),this.cha,this,!0);this.$d.bind(n.N("units"),this.Qga,this,!0);this.mD()});a.prototype.fPa=function(f){this.E3(f,
null,null)};a.prototype.Eib=function(f){this.E3(null,f,null)};a.prototype.Bhb=function(f){this.E3(null,null,f)};a.prototype.E3=function(f,m,p){if(this.YC!=m||this.DC!=f||this.hi!=p)[this.DC,this.YC,this.hi].forEach(function(q){q&&q.h(n.od,this.we,this,!0);q&&q.h(n.jd,this.we,this,!0)}.bind(this)),this.xz(),this.DC=f,this.YC=m,this.hi=p,this.mD(),this.sg(),this.eh(!0),[this.DC,this.YC,this.hi].forEach(function(q){q&&q.bind(n.od,this.we,this,!0);q&&q.bind(n.jd,this.we,this,!0)}.bind(this)),this.DC?
(this.A.O(e.pb).F=this.DC.ij(),this.A.O(e.sa).Xe=.5,f=this.A.O(e.Sprite),f.SN=.5,f.TN=.5,this.Wi.tpa(),this.Wi.upa(.5)):this.YC?(this.A.O(e.pb).F=this.YC.ij(),this.A.O(e.sa).Xe=0,f=this.A.O(e.Sprite),f.SN=.5,f.TN=1.1,this.Wi.tpa(),this.Wi.upa(1)):this.hi?(this.A.O(e.pb).F=this.hi.ij(),this.A.O(e.sa).Xe=0,f=this.A.O(e.Sprite),f.SN=.5,f.TN=.5,this.Wi.tpa(),this.Wi.upa(.5)):this.A.O(e.pb).F=null,this.we(),this.Qga(),this.cha()};a.RTa="partialDistance";a.Tsa="distance";a.QTa="area";a.prototype.setStyle=
function(f){this.d4!=f&&(this.d4=f,this.sg())};a.prototype.BP=function(f){f!==void 0&&this.gt!==f&&(this.gt=f,this.Wi.BP(f),this.eh(),this.we())};a.prototype.dispose=function(){this.iga.h(n.N("worldUnitToMeters"),this.cha,this,!0);this.$d.h(n.N("units"),this.Qga,this,!0);this.E3(null,null);this.Wi.dispose();this.Wi=null;this.xz()};a.prototype.cha=function(){this.Wi.Xib(this.iga.get("worldUnitToMeters"));this.eh()};a.prototype.Qga=function(){var f=this.$d.get("units"),m=!!this.hi;this.Wi.Wib(f=="imperial"?
m?b.Sra:b.Tra:m?b.$ra:b.naa);this.eh()};a.prototype.mD=function(){if(!this.A){this.A=this.Tb.T.rc("MeasureLabel");this.A.K(e.Sprite).renderOrder=g.aTa;this.A.K(e.Lr);var f=this.A.K(e.If);f.source=this.Wi.Ig();f.isSprite=!0;k.ba(this.$d,d,this.sg,!0);this.A.K(e.sa);this.A.K(e.pb)}};a.prototype.xz=function(){this.A&&(k.da(this.$d,d,this.sg),this.A.T.dd(this.A),this.A=null)};a.prototype.isVisible=function(){return this.Kd};a.prototype.xv=function(f){this.Kd!=f&&((this.Kd=f)?(this.L6a(),this.m(n.od)):
(this.J7a(),this.zq(0),this.m(n.jd)))};a.prototype.we=function(){this.xv(this.gt>0&&(this.DC&&this.DC.isVisible()||this.YC&&this.YC.isVisible()||this.hi&&this.hi.isVisible()))};a.prototype.L6a=function(){this.Bq||(this.Bq=new c,this.Bq.set("duration",300),this.Bq.bind(c.D$,this.fBa,this,!0),this.Bq.bind(c.Al,this.eBa,this,!0),this.Bq.play())};a.prototype.J7a=function(){this.Bq&&(this.Bq.h(c.D$,this.fBa,this,!0),this.Bq.h(c.Al,this.eBa,this,!0),this.Bq.stop(),this.Bq=null)};a.prototype.fBa=function(){this.zq(2*
this.Bq.wm()-1)};a.prototype.eBa=function(){this.zq(1)};a.prototype.sg=function(){this.A.O(e.If).depthTest=this.QL("depthTest");this.Wi.Thb(this.QL("labelFontColor"));this.Wi.Chb(this.QL("labelBackgroundColor"));this.Wi.Uhb(this.QL("labelFontFamily"));this.Wi.Vhb(this.QL("labelFontSize"));this.ui();this.eh()};a.prototype.QL=function(f){var m;this.d4&&(m=this.$d.get(this.d4+f[0].toUpperCase()+f.substr(1)));m===void 0&&(m=this.$d.get(f));return m};a.prototype.eh=function(f){if(this.Wi.update()||f){f=
this.A.O(e.If);var m=this.A.O(e.Sprite);f.aK=(new Date).getTime();m.width=this.Wi.dg();m.height=this.Wi.wg()}};a.prototype.zq=function(f){this.lm!=f&&(this.lm=f,this.ui())};a.prototype.ui=function(){this.A.O(e.If).opacity=this.QL("labelOpacity")*Math.max(1E-4,this.lm)};var d="depthTest areaLabelBackgroundColor areaLabelFontColor areaLabelFontFamily areaLabelOpacity areaLabelFontSize distanceLabelBackgroundColor distanceLabelFontColor distanceLabelFontFamily distanceLabelOpacity distanceLabelFontSize labelBackgroundColor labelFontColor labelFontFamily labelOpacity labelFontSize partialDistanceLabelBackgroundColor partialDistanceLabelFontColor partialDistanceLabelFontFamily partialDistanceLabelOpacity partialDistanceLabelFontSize".split(" ");
return a});
define("tdv/player/view/model3d/renderer/adapters/measure/MeasureLineAdapter","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/webgl/components".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/events/EventDispatcher"),h=a("tdv/player/view/webgl/components");a=l.extend(g,function(b,c){g.call(this);this.$d=b;this.Tb=c;this.xn=this.vn=null;this.sg=this.sg.bind(this);this.A=
null;this.lm=0;this.Kd=!1;this.mD()});a.prototype.Z8=function(b,c){if(this.vn!=b||this.xn!=c)this.vn&&this.vn.h(n.od,this.we,this,!0),this.vn&&this.vn.h(n.jd,this.we,this,!0),this.xn&&this.xn.h(n.od,this.we,this,!0),this.xn&&this.xn.h(n.jd,this.we,this,!0),this.vn=b,this.xn=c,this.vn&&this.vn.bind(n.od,this.we,this,!0),this.vn&&this.vn.bind(n.jd,this.we,this,!0),this.xn&&this.xn.bind(n.od,this.we,this,!0),this.xn&&this.xn.bind(n.jd,this.we,this,!0),this.A.O(h.pb,!0).F=this.vn&&this.vn.ij(),this.A.O(h.ru,
!0).F=this.xn&&this.xn.ij(),this.we()};a.prototype.ij=function(){return this.A};a.prototype.dispose=function(){this.Z8(null,null);this.xz()};a.prototype.mD=function(){this.A||(this.A=this.Tb.T.rc("MeasureLine"),this.A.K(h.Line),this.A.K(h.ci),this.A.K(h.sa),k.ba(this.$d,e,this.sg,!0))};a.prototype.xz=function(){this.A&&(k.da(this.$d,e,this.sg),this.A.T.dd(this.A),this.A=null)};a.prototype.isVisible=function(){return this.Kd};a.prototype.xv=function(b){this.Kd!=b&&((this.Kd=b)?(this.zq(1),this.m(n.od)):
(this.zq(0),this.m(n.jd)))};a.prototype.we=function(){this.xv(this.vn&&this.vn.isVisible()&&this.xn&&this.xn.isVisible())};a.prototype.sg=function(){var b=this.A.O(h.ci);b.color=this.$d.get("lineColor");b.depthTest=this.$d.get("depthTest");b.width=this.$d.get("lineWidth");b.depthTest=this.$d.get("depthTest");this.ui()};a.prototype.zq=function(b){this.lm!=b&&(this.lm=b,this.ui())};a.prototype.ui=function(){this.A.O(h.ci).opacity=this.$d.get("lineOpacity")*Math.max(1E-4,this.lm)};var e=["depthTest",
"lineColor","lineOpacity","lineWidth"];return a});
define("tdv/player/view/model3d/renderer/adapters/measure/MeasurePointAdapter","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/webgl/components".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/events/EventDispatcher"),h=a("tdv/player/view/webgl/components");a=l.extend(g,function(d,f,m,p){g.call(this);this.$d=d;this.Ea=f;this.Tb=m;this.Ms=p;this.Y1=this.Y1.bind(this);
this.sg=this.sg.bind(this);this.Yo=this.Yo.bind(this);this.A=null;this.xj=this.XT=this.Ad=this.OB=!1;this.lm=0;this.Kd=!1;this.mD();k.ba(this.$d,e,this.Y1,!0);k.ba(this.$d,c,this.sg,!0);k.xD(this.Ms,b,this.Yo,!0);this.bind(n.Mm,this.MAa,this,!0);this.bind(n.tc,this.d2,this,!0);this.bind(n.Eb,this.Bs,this,!0);this.Yo();this.I6()&&this.xv(!0)});a.prototype.dispose=function(){k.da(this.$d,e,this.Y1);k.da(this.$d,c,this.sg);k.da(this.Ms,b,this.Yo);this.h(n.Mm,this.MAa,this,!0);this.h(n.tc,this.d2,this,
!0);this.h(n.Eb,this.Bs,this,!0);this.xz()};a.prototype.ij=function(){return this.A};a.prototype.GOa=function(d){this.OB!==d&&((this.OB=d)?(d=this.A.K(h.Cl),d.F=this.Tb,d.rotate=!1,d.M=new g,this.xv(!0),d.M.bind(n.tc,this.sM,this,!0)):((d=this.A.getComponent(h.Cl))&&d.M.h(n.tc,this.sM,this,!0),this.A.ja(h.Cl),d=this.Ea.worldPositionToLocal([this.x,this.y,this.z],this.Ea.getMatrixWorld()),this.NOa(d[0],d[1],d[2])),this.tD(),this.uka())};a.prototype.ROa=function(d){d===void 0&&(d=!1);this.xj!==d&&((this.xj=
d)?this.A.K(h.Jm):this.A.ja(h.Jm))};a.prototype.Lib=function(d){this.XT!==d&&(this.XT=d,this.uka(),this.Ad=!1,this.tD())};a.prototype.NOa=function(d,f,m){this.Ms.set("x",d);this.Ms.set("y",f);this.Ms.set("z",m);this.xv(this.I6())};a.prototype.mD=function(){this.A=this.Tb.T.rc("MeasurePoint");this.A.K(h.Sphere);this.A.K(h.wd);this.A.K(h.vd).M=this;this.A.K(h.Lr);this.A.K(h.sa).M=this;this.A.K(h.Uk);this.A.K(h.pb).F=this.Tb;this.uka();this.ui();this.tD()};a.prototype.xz=function(){this.A.T.dd(this.A);
this.A=null};a.prototype.isVisible=function(){return this.Kd};a.prototype.xv=function(d){this.Kd!=d&&((this.Kd=d)?(this.zq(1),this.m(n.od)):(this.zq(0),this.m(n.jd)))};a.prototype.uka=function(){var d=this.A.O(h.vd);d.bB=this.XT;d.Tt=this.XT;d.kt=!this.OB;d=this.A.O(h.Lr,!0);d.Mqa=!this.XT||this.OB;d.Lqa=this.OB};a.prototype.sM=function(){this.xv(!0)};a.prototype.d2=function(){this.Ad=!0;this.tD()};a.prototype.Bs=function(){this.Ad=!1;this.tD()};a.prototype.Y1=function(){this.A.O(h.pb).id=this.$d.get("parentId")};
a.prototype.sg=function(){if(this.A){var d=this.A.O(h.Uk);d.Ge=d.We=d.Dh=1;d.bE=this.$d.get("pointMaxRadius");d.cE=this.$d.get("pointMinRadius");d.scale=this.$d.get("pointRadius")||1;this.A.O(h.wd).depthTest=this.$d.get("depthTest");this.tD()}};a.prototype.tD=function(){if(this.A){var d=this.OB?"pointDragColor":this.Ad?"pointOverColor":"pointColor";this.A.O(h.wd).color=this.$d.get(d)}};a.prototype.zq=function(d){this.lm!=d&&(this.lm=d,this.ui())};a.prototype.ui=function(){this.A.O(h.wd).opacity=Math.max(1E-4,
this.lm)};a.prototype.MAa=function(d){this.x=d.data.position.x;this.y=d.data.position.y;this.z=d.data.position.z};a.prototype.Yo=function(){if(this.I6()&&this.A){var d=this.A.O(h.sa,!0);d.positionX=d.positionY=d.positionZ=0;d.Wd=d.fd=d.Ve=0;d.translationX=this.Ms.get("x");d.translationY=this.Ms.get("y");d.Xe=this.Ms.get("z")}};a.prototype.I6=function(){var d=this.Ms.get("x"),f=this.Ms.get("y"),m=this.Ms.get("z");return d!==void 0&&f!==void 0||m!==void 0};a.prototype.distanceTo=function(d){var f=this.x-
d.x,m=this.y-d.y;d=this.z-d.z;return Math.sqrt(f*f+m*m+d*d)};var e=["parentId"],b=["x","y","z"],c="depthTest mode pointDragColor pointColor pointOverColor pointMaxRadius pointMinRadius pointRadius".split(" ");return a});
define("tdv/player/view/model3d/renderer/adapters/measure/MeasureAdapter","require tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/Key tdv/player/view/model3d/renderer/adapters/measure/MeasureAreaAdapter tdv/player/view/model3d/renderer/adapters/measure/MeasureLabelAdapter tdv/player/view/model3d/renderer/adapters/measure/MeasureLineAdapter tdv/player/view/model3d/renderer/adapters/measure/MeasurePointAdapter tdv/player/view/util/Device".split(" "),function(a){function l(u,v,w,y,
x){this.P=u;this.Ea=v;this.Tb=w;this.o=x;this.R=this.o.R;this.xs=this.xs.bind(this);this.b2=this.b2.bind(this);this.Q1=this.Q1.bind(this);this.l2=this.l2.bind(this);this.wM=this.wM.bind(this);this.KC=this.KC.bind(this);this.Wy=this.Wy.bind(this);this.jq=this.jq.bind(this);this.ue=null;this.Mj=new Map;this.DT=new Map;this.qs=[];this.nH=[];this.JM=new Map;this.oi=[];this.Ij=null;this.y4();this.Of=this.qd=void 0;this.ha=!1;k.ba(this.P,["enabled"],this.xs,!0)}var k=a("tdv/binding/BindingsHandler"),n=
a("tdv/constants/EventName"),g=a("tdv/constants/Key"),h=a("tdv/player/view/model3d/renderer/adapters/measure/MeasureAreaAdapter"),e=a("tdv/player/view/model3d/renderer/adapters/measure/MeasureLabelAdapter"),b=a("tdv/player/view/model3d/renderer/adapters/measure/MeasureLineAdapter"),c=a("tdv/player/view/model3d/renderer/adapters/measure/MeasurePointAdapter"),d=a("tdv/player/view/util/Device");l.prototype.dispose=function(){this.cs();k.da(this.P,["enabled"],this.xs);this.Ij=this.oi=this.nH=this.qs=
this.DT=this.Mj=null;this.y4();this.Of=this.qd=null};l.prototype.xs=function(){this.P.get("enabled")?this.DG():this.cs()};l.prototype.DG=function(){this.ha||(this.ha=!0,this.vXa(),this.yva(this.P),document.addEventListener("keyup",this.jq),k.ba(this.P,f,this.b2,!0),k.ba(this.P,p,this.l2,!0),k.ba(this.P,m,this.Q1,!0),k.ba(this.P,q,this.wM,!0),k.ba(this.P,r,this.KC,!0),k.ba(this.Ea,t,this.Wy,!0))};l.prototype.cs=function(){this.ha&&(this.ha=!1,this.pDa([]),this.Sva(this.P),this.CYa(),document.removeEventListener("keyup",
this.jq),k.da(this.P,f,this.b2),k.da(this.P,p,this.l2),k.da(this.P,m,this.Q1),k.da(this.P,q,this.wM),k.da(this.P,r,this.KC),k.da(this.Ea,t,this.Wy),this.gU(null))};l.prototype.Wy=function(){this.gU(this.Ea&&this.Ea.get("pointer"))};l.prototype.gU=function(u){this.ue!==u&&(this.ue&&(this.ue.h(n.la,this.oAa,this,!0),this.ue.h(n.di,this.pAa,this,!0)),this.ue=u)&&(this.ue.bind(n.la,this.oAa,this,!0),this.ue.bind(n.di,this.pAa,this,!0))};l.prototype.b2=function(){this.pDa(this.P.get("points"))};l.prototype.Q1=
function(){var u=this.P.get("mode");if(u!=this.qd){switch(this.qd){case "create":this.oi.length<1||this.Ij&&this.oi.length<2?u="create":this.G4a(this.Ij);break;case "edit":u=="create"?this.P.get("type")==="single"&&this.oi.length>0?u="edit":this.JZ():this.oz(null);break;case "view":u==="create"&&(this.P.get("type")==="single"&&this.oi.length>0?u="view":this.JZ());break;default:u=="create"&&(this.P.get("type")==="single"&&this.oi.length>0&&this.Cea(this.sy(-1))?u="edit":this.oz(this.sy(-1),!1))}this.qd=
u;this.P.set("mode",this.qd);this.jFa()}};l.prototype.l2=function(){var u=this.P.get("type");u!==this.Of&&(this.Of=u,this.Of==="single"&&this.oi.length>1&&this.P.set("points",this.Tmb.slice(0,1)))};l.prototype.wM=function(){this.ZEa();this.x4()};l.prototype.KC=function(){var u=this.qea(this.hi);u&&u.BP(this.P.get("area"))};l.prototype.jq=function(u){u.which==g.aZ&&this.R.get("isKeyboardTarget")&&(this.P.get("mode")=="create"?this.P.set("mode","edit"):this.qd=="edit"&&this.oz(null))};l.prototype.JZ=
function(){this.gVa();this.oz(this.sy(-1),!1)};l.prototype.TR=function(){return d.ub()&&!d.gf()};l.prototype.gVa=function(){var u=this.R.get("application").yi("MeasureModel3DObjectPoint");if(!this.TR()){var v=this.sy(-1);v&&this.Cea(v)&&(u.set("x",v.get("x")),u.set("y",v.get("y")),u.set("z",v.get("z")))}this.P.set("points",this.oi.concat([u]))};l.prototype.sy=function(u){var v=[this.P].concat(this.oi);return u<0&&v.length-u>0?v[v.length+u]:u>=0&&u<v.length?v[u]:null};l.prototype.G4a=function(u){this.P.set("points",
this.oi.filter(function(v){return v!=u}))};l.prototype.Cea=function(u){return!!u&&this.Mj.get(u).I6()};l.prototype.oAa=function(u){if(u.data.type!="other")if(this.P.get("mode")=="create"){if(this.Ij){var v=this.Ij;this.oz(null);this.AVa(v,u)}this.Of=="single"&&this.oi.length>0?this.P.set("mode","edit"):this.JZ()}else this.P.get("mode")=="edit"&&this.oz(null)};l.prototype.pAa=function(){this.P.get("mode")=="create"&&this.TR()&&this.P.set("mode","edit")};l.prototype.IAa=function(){this.P.get("mode")==
"create"&&this.P.set("mode","edit")};l.prototype.HAa=function(u){if(this.P.get("mode")=="create"){var v=this.sy(-2);u=this.DT.get(u.source);v==u?this.P.set("mode","edit"):(v=this.Ij,this.oz(null),v.set("x",u.get("x")),v.set("y",u.get("y")),v.set("z",u.get("z")),v=this.sy(0),u==v?this.P.set("mode","edit"):this.JZ())}};l.prototype.JAa=function(u){this.P.get("mode")=="edit"&&this.oz(this.DT.get(u.source),!0)};l.prototype.KAa=function(){this.P.get("mode")=="edit"&&this.oz(null)};l.prototype.LAa=function(){this.x4()};
l.prototype.x4=function(){for(var u=[],v=this.sy(0),w=this.wea(),y=0;y<w.length;y++){var x=w[y];v=this.Mj.get(v);var z=this.Mj.get(x);z=v.distanceTo(z);(v=this.qea(this.qs[y]))&&v.BP(z);u.push(z);v=x}u=u.reduce(function(A,D){return A+D},0);(v=this.qea(this.Mj.get(w[w.length-1])))&&v.BP(u);this.P.set("distance",isNaN(u)?void 0:u)};l.prototype.AVa=function(u,v){if(v=v&&v.data.position)v=this.Ea.worldPositionToLocal(v,this.Ea.getMatrixWorld()),this.Mj.get(u).NOa(v.x,v.y,v.z)};l.prototype.oz=function(u,
v){v||(v=!1);if(this.Ij!==u){if(this.Ij){var w=this.Mj.get(this.Ij);w.ROa(!1);w.GOa(!1)}if(this.Ij=u)w=this.Mj.get(this.Ij),w.ROa(v),w.GOa(v||!this.TR());this.$Ea();this.jFa();this.y4()}};l.prototype.pDa=function(u){this.oi!=u&&(this.oi.forEach(function(v){u.indexOf(v)==-1&&this.Sva(v)}.bind(this)),this.oi=u,this.Ij&&this.oi.indexOf(this.Ij)&&(this.Ij=null),this.y4(),this.oi.forEach(function(v){this.yva(v)}.bind(this)),this.$Ea(),this.ZEa(),this.C8a(),this.x4())};l.prototype.wea=function(){return this.oi.filter(function(u){return this.Cea(u)||
this.Mj.get(u).OB}.bind(this))};l.prototype.$Ea=function(){for(;this.oi.length<this.qs.length;)this.EYa();for(;this.oi.length>this.qs.length;)this.aYa();for(var u=!0,v=0;v<this.oi.length;v++){var w=this.sy(v),y=this.sy(v+1);w==this.Ij&&(u=!1);var x=u?y:w;this.qs[v].Z8(this.Mj.get(u?w:y),this.Mj.get(x))}};l.prototype.ZEa=function(){this.x8a();var u=this.wea(),v=u.length==1;this.P.get("displayPartialDistanceLabel")&&!v&&this.qs.forEach(function(w){var y=this.W0(w);y.fPa(w);y.setStyle(e.RTa)}.bind(this));
this.P.get("displayDistanceLabel")&&(v?(u=this.W0(this.qs[0]),u.fPa(this.qs[0]),u.setStyle(e.Tsa)):u.length>1&&(v=this.Mj.get(u[u.length-1]),u=this.W0(v),u.Eib(v),u.setStyle(e.Tsa)));this.P.get("displayAreaLabel")&&this.hi&&(u=this.W0(this.hi),u.Bhb(this.hi),u.setStyle(e.QTa));this.GYa();this.x4();this.KC()};l.prototype.jFa=function(){var u=!this.Ij&&this.qd!="view";this.Mj.forEach(function(v){v.Lib(u)})};l.prototype.C8a=function(){this.hi&&this.hi.Z8([this.P].concat(this.wea()).map(function(u){return this.Mj.get(u)}.bind(this)))};
l.prototype.yva=function(u){var v=this.Mj.get(u);v||(v=new c(this.P,this.Ea,this.Tb,u),this.Mj.set(u,v),this.DT.set(v,u),v.bind(n.di,this.IAa,this,!0),v.bind(n.la,this.HAa,this,!0),v.bind(n.Ra,this.JAa,this,!0),v.bind(n.ab,this.KAa,this,!0),v.bind(n.Mm,this.LAa,this,!1))};l.prototype.Sva=function(u){var v=this.Mj.get(u);v&&(v.h(n.Mm,this.LAa,this,!1),v.h(n.di,this.IAa,this,!0),v.h(n.la,this.HAa,this,!0),v.h(n.Ra,this.JAa,this,!0),v.h(n.ab,this.KAa,this,!0),v.dispose(),this.Mj["delete"](u),this.DT["delete"](v))};
l.prototype.aYa=function(){var u=new b(this.P,this.Tb);this.qs.push(u)};l.prototype.EYa=function(){this.qs.length!=0&&this.qs.pop().dispose()};l.prototype.$Xa=function(){var u=new e(this.Ea,this.P,this.Tb);this.nH.push(u);return u};l.prototype.x8a=function(){this.JM.clear()};l.prototype.W0=function(u){var v=this.nH.length>this.JM.size?this.nH[this.JM.size]:this.$Xa();this.JM.set(u,v);return v};l.prototype.qea=function(u){return this.JM.get(u)};l.prototype.GYa=function(){for(;this.nH.length>this.JM.size;)this.DYa()};
l.prototype.DYa=function(){this.nH.length!=0&&this.nH.pop().dispose()};l.prototype.vXa=function(){this.hi||(this.hi=new h(this.P,this.Tb))};l.prototype.CYa=function(){this.hi&&(this.hi.dispose(),this.hi=null)};l.prototype.y4=function(){this.P.set("draggingPoint",!!this.Ij)};var f=["points"],m=["mode"],p=["type"],q=["displayAreaLabel","displayDistanceLabel","displayPartialDistanceLabel"],r=["area"],t=["pointer"];return l});
define("tdv/player/view/model3d/renderer/adapters/objects/CanvasPlaneAdapter",["require","exports","tdv/binding/BindingsHandler","tdv/player/view/model3d/renderer/adapters/Mixins"],function(a,l,k,n){a=function(){function g(h,e,b,c,d){this.object=h;this.model=e;this.wb=b;this.renderer=d;this.de=this.de.bind(this);this.enabled=!1;this.F=null;k.ba(this.object,["enabled"],this.de,!0)}g.prototype.Wc=function(){};g.prototype.Xc=function(){};g.prototype.dispose=function(){this.disable();k.da(this.object,
["enabled"],this.de)};g.prototype.de=function(){this.object.get("enabled")?this.enable():this.disable()};g.prototype.enable=function(){this.enabled||(this.enabled=!0,this.F=this.wb.T.rc("CanvasPlane"),this.Wc())};g.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.Xc(),this.F.T.dd(this.F),this.F=null)};return g}();a=n.vd(a);a=n.yK(a);a=n.If(a);a=n.CZ(a);a=n.PK(a);a=n.pb(a);return a=n.Plane(a)});
define("tdv/player/view/model3d/renderer/adapters/objects/ChildAdapter","require exports three.mod tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/webgl/components tdv/player/view/model3d/renderer/adapters/BaseModelAdapter tdv/player/view/model3d/renderer/adapters/Mixins".split(" "),function(a,l,k,n,g,h,e,b,c){a=function(p){function q(r,t,u,v,w){r=p.call(this,r,t,u,w)||this;r.CA=r.CA.bind(r);r.wb=u;r.pr=new h;r.pr.bind(g.V,r.Bm,r,!0);r.F.K(e.lB);r.F.K(e.fQ).object=
r.object;n.ba(r.object,d,r.CA,!0);r.Wc();return r}O(q,p);q.prototype.Wc=function(){};q.prototype.Xc=function(){};q.prototype.dispose=function(){n.da(this.object,d,this.CA);this.pr.h(g.V,this.Bm,this);this.pr=null;this.Xc();p.prototype.dispose.call(this)};q.prototype.Bm=function(r){f.setFromQuaternion(r.data.quaternion,this.object.get("rotationOrder"));this.object.set({x:0,y:0,z:0,translationX:r.data.position.x,translationY:r.data.position.y,translationZ:r.data.position.z,rotationX:f.x*m,rotationY:f.y*
m,rotationZ:f.z*m,scale:Math.max(r.data.scale,.001)});this.object.m(g.Mm)};q.prototype.CA=function(){if(this.object.get("positionDraggable")||this.object.get("rotationDraggable")||this.object.get("scaleDraggable")){var r=this.F.O(e.Fh,!0);r.translate=this.object.get("positionDraggable")||!1;r.rotate=this.object.get("rotationDraggable")||!1;r.scale=this.object.get("scaleDraggable")||!1;r.M=this.pr}else this.F.ja(e.Fh)};return q}(b);var d=["positionDraggable","rotationDraggable","scaleDraggable"],f=
new k.Euler,m=180/Math.PI;k=c.vd(a);k=c.CZ(k);k=c.yK(k);k=c.PK(k);k=c.pb(k);k=c.ETa(k);return k=c.Lsa(k)});
define("tdv/player/view/model3d/renderer/adapters/objects/ImagePlaneAdapter",["require","exports","tdv/binding/BindingsHandler","tdv/player/view/model3d/renderer/adapters/Mixins"],function(a,l,k,n){a=function(){function g(h,e,b,c,d){this.object=h;this.model=e;this.wb=b;this.renderer=d;this.de=this.de.bind(this);this.enabled=!1;this.F=null;k.ba(this.object,["enabled"],this.de,!0)}g.prototype.Wc=function(){};g.prototype.Xc=function(){};g.prototype.dispose=function(){this.disable();k.da(this.object,
["enabled"],this.de)};g.prototype.de=function(){this.object.get("enabled")?this.enable():this.disable()};g.prototype.enable=function(){this.enabled||(this.enabled=!0,this.F=this.wb.T.rc("ImagePlane"),this.Wc())};g.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.Xc(),this.F.T.dd(this.F),this.F=null)};return g}();a=n.vd(a);a=n.yK(a);a=n.Mi(a);a=n.PK(a);a=n.pb(a);return a=n.Plane(a)});
define("tdv/player/view/model3d/renderer/adapters/objects/InnerObjectAdapter",["require","exports","tdv/binding/BindingsHandler","tdv/player/view/webgl/components","tdv/player/view/model3d/renderer/adapters/Mixins"],function(a,l,k,n,g){var h=["objectId"];a=function(){function e(b,c,d,f,m){this.object=b;this.model=c;this.wb=d;this.renderer=m;this.F=this.wb.T.rc("InnerObject");this.W1=this.W1.bind(this);k.ba(this.object,h,this.W1,!0);this.Wc()}e.prototype.Wc=function(){};e.prototype.Xc=function(){};
e.prototype.W1=function(){var b=this.F.O(n.LK,!0);b.id=this.object.get("objectId");b.container=this.wb};e.prototype.dispose=function(){this.Xc();k.da(this.object,h,this.W1);this.wb.T.dd(this.F);this.F=null};return e}();a=g.vd(a);a=g.yK(a);a=g.PK(a);return a=g.CZ(a)});
define("tdv/player/view/model3d/renderer/adapters/objects/LineAdapter","require exports tdv/binding/BindingsHandler tdv/player/view/webgl/components tdv/player/view/model3d/renderer/adapters/Mixins three.mod".split(" "),function(a,l,k,n,g,h){var e=["x","y","z"],b=["targetX","targetY","targetZ"];a=function(){function c(d,f,m,p,q){this.object=d;this.model=f;this.wb=m;this.renderer=q;this.de=this.de.bind(this);this.U7=this.U7.bind(this);this.Z7=this.Z7.bind(this);this.enabled=!1;this.F=null;k.ba(this.object,
["enabled"],this.de,!0)}c.prototype.Wc=function(){};c.prototype.Xc=function(){};c.prototype.dispose=function(){this.disable();k.da(this.object,["enabled"],this.de)};c.prototype.de=function(){this.object.get("enabled")?this.enable():this.disable()};c.prototype.enable=function(){this.enabled||(this.enabled=!0,this.F=this.wb.T.rc("Line"),this.F.K(n.sa),this.F.K(n.Line),this.F.K(n.ru).position=new h.Vector3,k.ba(this.object,e,this.U7,!0),k.ba(this.object,b,this.Z7,!0),this.Wc())};c.prototype.disable=
function(){this.enabled&&(this.enabled=!1,this.Xc(),k.da(this.object,e,this.U7),k.da(this.object,b,this.Z7),this.F.T.dd(this.F),this.F=null)};c.prototype.U7=function(){var d=this.F.O(n.sa);d.translationX=this.object.get("x",0);d.translationY=this.object.get("y",0);d.Xe=this.object.get("z",0)};c.prototype.Z7=function(){var d=this.F.O(n.ru);d.position.x=this.object.get("targetX");d.position.y=this.object.get("targetY");d.position.z=this.object.get("targetZ")};return c}();a=g.vd(a);a=g.ci(a);return a=
g.pb(a)});
define("tdv/player/view/model3d/renderer/adapters/objects/HorizonGridAdapter",["require","exports","tdv/binding/BindingsHandler","tdv/player/view/webgl/components","tdv/player/view/model3d/renderer/adapters/Mixins"],function(a,l,k,n,g){var h=["x","y","z"],e="divisions centerLinesColor depthTest gridColor opacity size".split(" ");a=function(){function b(c,d,f,m,p){this.object=c;this.model=d;this.wb=f;this.renderer=p;this.de=this.de.bind(this);this.zA=this.zA.bind(this);this.M7=this.M7.bind(this);this.enabled=
!1;this.F=null;k.ba(this.object,["enabled"],this.de,!0)}b.prototype.Wc=function(){};b.prototype.Xc=function(){};b.prototype.dispose=function(){this.disable();k.da(this.object,["enabled"],this.de)};b.prototype.de=function(){this.object.get("enabled")?this.enable():this.disable()};b.prototype.enable=function(){this.enabled||(this.enabled=!0,this.F=this.wb.T.rc("HorizonGrid"),this.F.K(n.sa),this.F.K(n.pu),k.ba(this.object,h,this.zA,!0),k.ba(this.object,e,this.M7,!0),this.Wc())};b.prototype.disable=function(){this.enabled&&
(this.enabled=!1,this.Xc(),k.da(this.object,h,this.zA),k.da(this.object,e,this.M7),this.F.T.dd(this.F),this.F=null)};b.prototype.zA=function(){var c=this.F.O(n.sa);c.translationX=this.object.get("x",0);c.translationY=this.object.get("y",0);c.Xe=this.object.get("z",0)};b.prototype.M7=function(){var c=this.F.O(n.pu);c.eHa=this.object.get("centerLinesColor");c.depthTest=this.object.get("depthTest");c.Zla=this.object.get("divisions");c.XJa=this.object.get("gridColor");c.size=this.object.get("size")};
return b}();a=g.CZ(a);return a=g.pb(a)});
define("tdv/player/view/model3d/renderer/adapters/objects/SphereAdapter",["require","exports","tdv/binding/BindingsHandler","tdv/player/view/webgl/components","tdv/player/view/model3d/renderer/adapters/Mixins"],function(a,l,k,n,g){var h=["radius","maxRadius","minRadius"];a=function(){function e(b,c,d,f,m){this.object=b;this.model=c;this.wb=d;this.renderer=m;this.de=this.de.bind(this);this.BA=this.BA.bind(this);this.enabled=!1;this.F=null;k.ba(this.object,["enabled"],this.de,!0)}e.prototype.Wc=function(){};
e.prototype.Xc=function(){};e.prototype.dispose=function(){this.disable();k.da(this.object,["enabled"],this.de)};e.prototype.de=function(){this.object.get("enabled")?this.enable():this.disable()};e.prototype.enable=function(){this.enabled||(this.enabled=!0,this.F=this.wb.T.rc("Sphere"),this.F.K(n.Sphere),this.F.K(n.Uk),k.ba(this.object,h,this.BA,!0),this.Wc())};e.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.Xc(),k.da(this.object,h,this.BA),this.F.T.dd(this.F),this.F=null)};e.prototype.BA=
function(){var b=this.F.O(n.Uk);b.Ge=b.We=b.Dh=1;b.scale=this.object.get("radius");b.bE=this.object.get("maxRadius");b.cE=this.object.get("minRadius")};return e}();a=g.vd(a);a=g.yK(a);a=g.wd(a);a=g.pb(a);return a=g.Lsa(a)});
define("tdv/player/view/model3d/renderer/adapters/objects/ProjectedMaterialAdapter",["require","exports","tdv/binding/BindingsHandler","tdv/player/view/webgl/components","tdv/player/view/model3d/renderer/adapters/Mixins"],function(a,l,k,n,g){var h="cameraBox skyBox sourceAlpha sourceCubeTexture sourceX sourceY sourceYaw sourceZ targetAlpha targetCubeTexture targetX targetY targetYaw targetZ".split(" ");a=function(){function e(b,c,d,f,m){this.object=b;this.model=c;this.wb=d;this.Yna=f;this.renderer=
m;this.de=this.de.bind(this);this.X7=this.X7.bind(this);this.enabled=!1;this.F=null;k.ba(this.object,["enabled"],this.de,!0)}e.prototype.Wc=function(){};e.prototype.Xc=function(){};e.prototype.dispose=function(){this.disable();k.da(this.object,["enabled"],this.de)};e.prototype.de=function(){this.object.get("enabled")?this.enable():this.disable()};e.prototype.enable=function(){if(!this.enabled){this.enabled=!0;this.F=this.wb.T.rc("ProjectedMaterial");this.F.K(n.mo);var b=this.F.K(n.pb);b.F=this.wb;
b.attach=!0;k.ba(this.object,h,this.X7,!0);this.Wc()}};e.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.Xc(),k.da(this.object,h,this.X7),this.F.T.dd(this.F),this.F=null)};e.prototype.X7=function(){var b=this.F.O(n.mo);b.xA=this.object.get("nearPlane")||!1;b.LPa=this.object.get("skyBox")||!1;b.NPa=this.object.get("sourceAlpha")||0;b.OE=this.Yna;b.m9=this.object.get("sourceX")||0;b.n9=this.object.get("sourceY")||0;b.o9=this.object.get("sourceZ")||0;b.nY=this.object.get("sourceYaw")||
0;b.lY=this.object.get("sourceCubeTexture");b.jQa=this.object.get("targetAlpha")||0;b.targetX=this.object.get("targetX")||0;b.targetY=this.object.get("targetY")||0;b.z9=this.object.get("targetZ")||0;b.Wjb=this.object.get("targetYaw")||0;b.tY=this.object.get("targetCubeTexture")};return e}();return g.pb(a)});
define("tdv/player/view/model3d/renderer/adapters/objects/SurfaceReticleAdapter","require tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/RenderOrder tdv/player/view/model3d/renderer/adapters/canvas/SurfaceReticleCanvas tdv/player/view/webgl/components".split(" "),function(a){function l(f,m,p,q,r){this.P=f;this.Ea=m;this.Tb=p;this.o=r;this.R=this.o.R;this.xs=this.xs.bind(this);this.Ny=this.Ny.bind(this);this.Yo=this.Yo.bind(this);this.sg=this.sg.bind(this);this.gga=this.Tb.getComponent(e.Ni).tp;
this.gga.bind(n.ia,this.Oy,this,!1);this.hga=this.Kya=!1;this.Fv=new h(this.R);this.Fv.setPosition(0);this.Fv.update();this.A=null;k.ba(this.P,["enabled"],this.xs,!0)}var k=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/constants/RenderOrder"),h=a("tdv/player/view/model3d/renderer/adapters/canvas/SurfaceReticleCanvas"),e=a("tdv/player/view/webgl/components");l.prototype.xs=function(){this.P.get("enabled")?this.DG():this.cs()};l.prototype.DG=function(){if(!this.A){this.A=
this.Tb.T.rc("Reticle");var f=this.A.K(e.pb);f.F=this.Tb;f.id=this.P.get("parentId");this.A.K(e.Plane).renderOrder=g.STa;this.A.K(e.If).source=this.Fv.Ig();this.A.K(e.lB);f=this.A.K(e.fQ);f.Qjb=this.P;f.object=this.P;k.ba(this.Ea,d,this.Ny,!0);k.ba(this.P,b,this.Yo,!0);k.ba(this.P,c,this.sg,!0)}};l.prototype.cs=function(){this.A&&(this.Tb.T.dd(this.A),this.A=null,k.da(this.Ea,d,this.Ny),k.da(this.P,b,this.Yo),k.da(this.P,c,this.sg))};l.prototype.Ny=function(){var f=this.A.O(e.Uk,!0);f.Ge=f.We=2;f.scale=
this.Ea.get("surfaceReticleRadius");f.bE=this.Ea.get("surfaceReticleMaxRadius");f.cE=this.Ea.get("surfaceReticleMinRadius");this.fFa()};l.prototype.Yo=function(){var f=this.A.O(e.mx,!0);f.x=this.P.get("x");f.y=this.P.get("y");f.z=this.P.get("z");f.distance=this.P.get("distance");f.EW=this.P.get("horizontal")};l.prototype.sg=function(){var f=this.A.O(e.vd,!0);f.bB=this.P.get("useHandCursor");f.SE=this.P.get("transparentAreaActive");f.M=this.P;f=this.A.O(e.If);f.opacity=this.P.get("opacity");f.hidden=
this.P.get("hidden");f.depthTest=this.P.get("depthTest")};l.prototype.Oy=function(){this.Kya=!0;this.fFa()};l.prototype.fFa=function(){var f=this.Kya&&this.Ea.get("opacity")>.5;this.hga!=f&&(this.hga=f)&&this.A&&this.A.O(e.mx)};l.prototype.dispose=function(){this.cs();k.da(this.P,["enabled"],this.xs);this.gga.h(n.ia,this.Oy,this,!1);this.gga=null};var b=["distance","horizontal","x","y","z"],c=["depthTest","hidden","opacity","transparentAreaActive","useHandCursor"],d=["opacity","surfaceReticleRadius",
"surfaceReticleMaxRadius","surfaceReticleMinRadius","surfaceSelectionEnabled"];return l});
define("tdv/player/view/model3d/renderer/adapters/objects/VideoPlaneAdapter",["require","exports","tdv/binding/BindingsHandler","tdv/player/view/model3d/renderer/adapters/Mixins"],function(a,l,k,n){a=function(){function g(h,e,b,c,d){this.object=h;this.model=e;this.wb=b;this.renderer=d;this.de=this.de.bind(this);this.enabled=!1;this.F=null;k.ba(this.object,["enabled"],this.de,!0)}g.prototype.Wc=function(){};g.prototype.Xc=function(){};g.prototype.dispose=function(){this.disable();k.da(this.object,
["enabled"],this.de)};g.prototype.de=function(){this.object.get("enabled")?this.enable():this.disable()};g.prototype.enable=function(){this.enabled||(this.enabled=!0,this.F=this.wb.T.rc("VideoPlane"),this.Wc())};g.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.Xc(),this.F.T.dd(this.F),this.F=null)};return g}();a=n.vd(a);a=n.yK(a);a=n.qo(a);a=n.pb(a);a=n.PK(a);return a=n.Plane(a)});
define("tdv/player/view/model3d/renderer/adapters/objects/objects","require exports tdv/player/view/model3d/renderer/adapters/measure/MeasureAdapter tdv/player/view/model3d/renderer/adapters/objects/CanvasPlaneAdapter tdv/player/view/model3d/renderer/adapters/objects/ChildAdapter tdv/player/view/model3d/renderer/adapters/objects/ImagePlaneAdapter tdv/player/view/model3d/renderer/adapters/objects/InnerObjectAdapter tdv/player/view/model3d/renderer/adapters/objects/LineAdapter tdv/player/view/model3d/renderer/adapters/objects/HorizonGridAdapter tdv/player/view/model3d/renderer/adapters/objects/SphereAdapter tdv/player/view/model3d/renderer/adapters/objects/ObjectAdapterFactory tdv/player/view/model3d/renderer/adapters/objects/ProjectedMaterialAdapter tdv/player/view/model3d/renderer/adapters/objects/SurfaceReticleAdapter tdv/player/view/model3d/renderer/adapters/objects/VideoPlaneAdapter".split(" "),function(a,
l,k,n,g,h,e,b,c,d,f,m,p,q){return{UA:function(){f.St("MeasureModel3DObject",k);f.St("ChildModel3DObject",g);f.St("HorizonGridModel3DObject",c);f.St("CanvasPlaneModel3DObject",n);f.St("ImagePlaneModel3DObject",h);f.St("InnerModel3DObject",e);f.St("LineModel3DObject",b);f.St("ProjectedMaterialModel3DObject",m);f.St("SphereModel3DObject",d);f.St("SurfaceReticleModel3DObject",p);f.St("VideoPlaneModel3DObject",q)}}});
define("tdv/view/events/MouseEvent",["require","exports","tdv/events/Event"],function(a,l,k){return function(n){function g(h,e,b,c,d,f,m,p){e===void 0&&(e=0);b===void 0&&(b=0);c===void 0&&(c=0);d===void 0&&(d=0);f===void 0&&(f=0);m===void 0&&(m=0);p===void 0&&(p=null);h=n.call(this,h)||this;h.x=e;h.y=b;h.pageX=c;h.pageY=d;h.delta=f;h.Wz=m;h.h8=p;h.movementX=p&&p.movementX||void 0;h.movementY=p&&p.movementY||void 0;return h}O(g,n);g.prototype.clone=function(){var h=new g(this.name,this.x,this.y,this.pageX,
this.pageY,this.delta,this.Wz,this.h8);h.source=this.source;return h};return g}(k)});
define("tdv/player/view/model3d/renderer/adapters/pointer/FirstPersonPointerAdapter","require exports tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/Key tdv/view/events/MouseEvent tdv/events/EventDispatcher tdv/player/view/util/Device tdv/utils tdv/view/util/MouseLocker tdv/player/parser/ClassInfo".split(" "),function(a,l,k,n,g,h,e,b,c,d,f){return function(m){function p(q,r,t,u,v){var w=m.call(this)||this;w.uJ=[];w.aGa=0;w.WFa=0;w.J5=!1;w.jIa=!1;w.Gna=!1;w.gLa=0;w.renderer=q;w.$h=
r;w.model=t;w.wb=u;w.Ba=v;w.Ov=w.Ov.bind(w);w.s5=w.s5.bind(w);w.Rla=c.ar(w.Rla,w);w.vA=w.vA.bind(w);w.j7=w.j7.bind(w);w.i7=w.i7.bind(w);w.cb=w.renderer.R;w.Pf=w.renderer.getParent();w.enabled=!0;w.type=p.hQ;w.Va();return w}O(p,m);p.prototype.getType=function(){return this.type};p.prototype.Ua=function(q){this.enabled=q};p.prototype.dispose=function(){this.xa()};p.prototype.Va=function(){this.Pf.bind(n.fb,this.Ov,this,!0);this.Pf.bind(n.la,this.VFa,this,!0);k.xD(this.model,["camera.lockMouse"],this.s5,
!0);k.xD(this.model,["objects"],this.vA,!0);this.zm=new d(this.Pf.va().bc());this.zm.bind(n.V,this.PLa,this,!0);document.addEventListener("keyup",this.j7);document.addEventListener("keydown",this.i7);this.$t(p.hQ)};p.prototype.xa=function(){this.Pf.h(n.fb,this.Ov,this);this.Pf.h(n.la,this.VFa,this);k.da(this.model,["camera.lockMouse"],this.s5);k.da(this.model,["objects"],this.vA);this.bY([]);this.zm.h(n.V,this.PLa,this);this.zm.Xq()&&this.zm.unlock();this.dPa(!1);this.zm.dispose();document.removeEventListener("keyup",
this.j7);document.removeEventListener("keydown",this.i7)};p.prototype.s5=function(){this.OW=!b.ub()&&this.model.get("camera").get("lockMouse");!this.OW&&this.zm.Xq()&&this.zm.unlock();this.hRa()};p.prototype.hRa=function(){this.dPa((!this.J5||!this.jIa)&&(b.ub()||!this.OW))};p.prototype.dPa=function(q){this.Gna!=q&&((this.Gna=q)?this.cb.aS.a5():this.cb.aS.A8())};p.prototype.Ov=function(){this.zm.Xq()||this.$t(p.hQ)};p.prototype.i7=function(q){p.gTa.indexOf(q.code)!=-1&&(this.type==p.hQ&&this.$t(p.haa),
this.OW&&!this.zm.Xq()&&this.zm.lock())};p.prototype.j7=function(q){q.code==g.ta.OK&&(q=(new Date).getTime(),this.RQa(n.la),q-this.gLa<500&&this.RQa(n.di),this.gLa=q)};p.prototype.RQa=function(q){var r=this.cb.gb()/2,t=this.cb.Kb()/2;q=new h(q,r,t,r,t,0,0,void 0);this.Pf.m(q)};p.prototype.VFa=function(){this.WFa=(new Date).getTime();this.OW&&!this.zm.Xq()?this.zm.lock():this.Rla()};p.prototype.yab=function(){this.OW&&this.zm.Xq()&&this.zm.unlock()};p.prototype.PLa=function(){this.zm.Xq()?this.$t(p.haa):
this.$t(p.hQ)};p.prototype.vA=function(){this.bY(this.model.get("objects",[]))};p.prototype.bY=function(q){var r=this;this.uJ.forEach(function(t){t.h(n.la,r.cMa,r)});this.uJ=q;this.uJ.forEach(function(t){t.bind(n.la,r.cMa,r,!0);f.Qa("MeasureModel3DObject",t)&&(t.bind(n.N("draggingPoint"),r.VW,r,!0),t.bind(n.N("mode"),r.VW,r,!0))});this.VW()};p.prototype.cMa=function(q){q.source.get("useHandCursor")&&(this.aGa=(new Date).getTime())};p.prototype.VW=function(){var q=!1,r=!1;this.uJ.forEach(function(u){f.Qa("MeasureModel3DObject",
u)&&(r=r||!!u.get("draggingPoint"),q=q||u.get("mode")=="edit"&&!!u.get("draggingPoint"))});this.jIa=q;var t=this.model.get("camera");r!=this.J5&&(this.J5=r,setTimeout(function(){t.Mhb(this.J5)}.bind(this),0));this.hRa()};p.prototype.Rla=function(){Math.abs(this.WFa-this.aGa)>100&&this.yab()};p.prototype.$t=function(q){this.type!==q&&(this.type=q,this.m(n.V))};p.hQ="mouse";p.haa="gaze";p.gTa=[g.ta.bk,g.ta.Ji,g.ta.eb,g.ta.Db,g.ta.Fp,g.ta.Kp,g.ta.so,g.ta.oo,g.ta.E,g.ta.Q];return p}(e)});
define("tdv/player/view/model3d/renderer/adapters/pointer/GazePointerAdapter","require exports three.mod tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/RenderOrder tdv/player/canvas/ReticleCanvas tdv/player/view/model3d/renderer/adapters/cursor/InstanceCursorManager tdv/player/view/webgl/components tdv/view/constants/Cursor tdv/view/util/Animation".split(" "),function(a,l,k,n,g,h,e,b,c,d,f){var m=new k.Vector3(0,0,0),p=new k.Vector3(0,0,-1);a=function(){function r(t,u,v,w,y){this.renderer=
t;this.$h=u;this.model=v;this.wb=w;this.Ba=y;this.BY=this.BY.bind(this);this.KA=this.KA.bind(this);this.Oz=this.Oz.bind(this);this.cb=this.renderer.R;this.Pf=this.renderer.getParent();this.Bw=this.model.get("application").yi("Model3DPointer");this.Va()}r.prototype.Ua=function(t){var u=this.Ba.O(c.yc);u&&(u.enabled=t)};r.prototype.dispose=function(){this.xa()};r.prototype.Va=function(){this.sP=new e(this.cb.D6());this.kcb=new q(this.Pf,this.sP);this.qp=new b;this.qp.POa(this.kcb);var t=this.Ba.K(c.yc);
t.Ba=this.Ba;t.origin=m;t.direction=p;t.JD=this.Pf;t.G5=this.qp;t.M=this.Bw;this.cb.set("toolTipCentered",!0);this.model.set("pointer",this.Bw);this.Zib();this.dqa();this.qp.push(d.NF);f.requestFrame(this.BY)};r.prototype.xa=function(){this.qp.pop(d.NF);this.Yjb();this.zqa();this.cb.set("toolTipCentered",!1);this.cb.set("toolTipCenteredOffsetY",void 0);this.model.set("pointer",void 0);this.Ba.ja(c.yc);this.qp.dispose();f.cHa(this.BY)};r.prototype.dqa=function(){this.yp=this.wb.T.rc("GazeReticle");
this.yp.K(c.pb).F=this.Ba;this.yp.K(c.Plane).renderOrder=h.KSa;this.yp.K(c.FF);var t=this.yp.K(c.If);t.source=this.sP.Ig();t.depthTest=!1;this.yp.K(c.sa).Xe=-1;this.renderer.bind(g.Zb,this.KA,this,!0);this.KA();this.xV(this.Ba.getComponent(c.yc),this.Bw)};r.prototype.xV=function(t,u){u.set("originX",t.origin.x);u.set("originY",t.origin.y);u.set("originZ",t.origin.z);u.set("directionX",t.direction.x);u.set("directionY",t.direction.y);u.set("directionZ",t.direction.z)};r.prototype.zqa=function(){this.yp&&
(this.yp.T.dd(this.yp),this.yp=null)};r.prototype.jlb=function(){if(this.yp){var t=this.yp.O(c.Uk,!0);t.Ge=t.We=2;var u=Math.min(this.cb.gb(),this.cb.Kb())/100;t.cE=t.bE=Math.round(u*4);this.cb.set("toolTipCenteredOffsetY",2*u)}};r.prototype.BY=function(t){this.yp&&this.sP.update(t)&&(this.yp.O(c.If).aK=(new Date).getTime());f.requestFrame(this.BY)};r.prototype.KA=function(){this.jlb()};r.prototype.Zib=function(){n.xD(this.model,"camera",this.Oz,!0)};r.prototype.Yjb=function(){n.da(this.model,"camera",
this.Oz);this.QOa(!0)};r.prototype.Oz=function(){this.QOa(!1)};r.prototype.QOa=function(t){var u=this.Ba.O(c.zF);u&&(u.mO=t);(u=this.Ba.O(c.AF))&&(u.mO=t);(u=this.Ba.O(c.HF))&&(u.mO=t)};return r}();var q=function(){function r(t,u){this.Pf=t;this.sP=u}r.prototype.NJa=function(){return this.Pf};r.prototype.L8=function(t,u){u.indexOf(d.mf)>-1?this.sP.VJ(!0):this.sP.VJ(!1)};return r}();return a});
define("tdv/player/view/model3d/renderer/adapters/pointer/XRPointerAdapter","require exports three.mod tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/model3d/renderer/adapters/cursor/InstanceCursorManager tdv/player/view/webgl/components tdv/player/view/util/Device tdv/player/view/util/XR tdv/view/constants/Cursor tdv/player/parser/ClassInfo".split(" "),function(a,l,k,n,g,h,e,b,c,d,f,m,p){a=function(){function v(w,y,x,z,A,D){this.uJ=
[];this.WW=[];this.renderer=w;this.$h=y;this.model=x;this.En=z;this.wb=A;this.Ba=D;this.vA=this.vA.bind(this);this.Pt=[];this.enabled=!1;this.Va()}v.prototype.Ua=function(w){this.enabled!==w&&((this.enabled=w)?n.xD(this.model,["objects"],this.vA,!0):(n.da(this.model,["objects"],this.vA),this.bY([])))};v.prototype.dispose=function(){this.xa()};v.prototype.Va=function(){f.M.bind(g.me,this.Kg,this,!0)};v.prototype.xa=function(){f.M.h(g.me,this.Kg,this);this.iY([])};v.prototype.Kg=function(){this.iY(f.nd)};
v.prototype.iY=function(w){if(!this.enabled||w.find(function(z){return z.Pz}))w=[];var y=this.Pt;this.Pt=w.map(function(z){var A=y.findIndex(function(D){return D.hb==z});return A!==-1?y.splice(A,1)[0]:new q(z,this.model,this.En,this.wb,this.Ba)}.bind(this));y.forEach(function(z){z.dispose()});this.Pt.forEach(function(z){z.Ua(this.enabled);z.update()}.bind(this));var x=this.Pt.reduce(function(z,A){return!z||z.Yz<A.Yz?A:z},null);this.Pt.forEach(function(z){z.Jpa(z===x)});this.model.set("pointer",x!==
null?x.Ft:void 0)};v.prototype.vA=function(){this.bY(this.model.get("objects",[]))};v.prototype.bY=function(w){this.uJ=w;this.VW()};v.prototype.VW=function(){this.WW.forEach(function(w){w.h(g.N("mode"),this.Tna,this)}.bind(this));this.WW=[];this.WW=this.uJ.filter(function(w){return p.Qa("MeasureModel3DObject",w)});this.WW.forEach(function(w){w.bind(g.N("mode"),this.Tna,this,!0)}.bind(this));this.Tna()};v.prototype.Tna=function(){var w=!1,y=!1;this.WW.forEach(function(z){y=y||z.get("mode")=="create";
w=w||z.get("mode")=="edit"}.bind(this));var x=this.model.get("camera");y?x.LOa(!0):setTimeout(function(){x.LOa(!1)},10)};return v}();var q=function(){function v(w,y,x,z,A){this.Yz=this.LI=0;this.hb=w;this.model=y;this.En=x;this.wb=z;this.Ba=A;this.Yz=this.LI=this.hb.handedness==="right"?1:0;this.Ft=this.model.get("application").yi("Model3DPointer");this.Sg=this.enabled=!1;this.Va()}v.prototype.update=function(){this.OP();f.KE(this.hb,this.Qla.Ue,this.Qla.Ue,this.model.get("surfaceSelectionEnabled")&&
(this.Qeb||this.Seb||this.Reb)?void 0:this.distance);f.a9(this.hb,!this.Sg||!this.enabled)};v.prototype.Ua=function(w){this.enabled!==w&&(this.enabled=w,w=this.Gk.O(c.yc,!0))&&(w.enabled=this.enabled)};v.prototype.Jpa=function(w){this.Sg!==w&&(this.Sg=w,w=this.Gk.O(c.yc,!0))&&(w.Sg=this.Sg)};v.prototype.dispose=function(){this.xa()};v.prototype.Va=function(){this.Qla=new u(this.Ft);this.qp=new b;this.qp.POa(this.Qla);this.Ei=new e;this.le=new e;this.Gk=this.Ba.T.rc("Pointer");var w=this.Gk.O(c.yc,
!0);w.Gla=!0;w.matrixWorld=new k.Matrix4;w.Ba=this.Ba;w.JD=this.Ei;w.G5=this.qp;w.M=this.le;w.enabled=this.enabled;f.M.bind(g.vu,this.iX,this,!0);f.M.bind(g.EB,this.jX,this,!0);f.M.bind(g.Uf,this.hX,this,!0);this.le.bind(g.Ra,this.Xh,this,!0);this.le.bind(g.ab,this.hf,this,!0);this.le.bind(g.la,this.gX,this,!0);this.le.bind(g.di,this.AMa,this,!0);this.le.bind(g.fb,this.Wj,this,!0);this.le.bind(g.Eb,this.Sn,this,!0)};v.prototype.xa=function(){this.le.h(g.Ra,this.Xh,this);this.le.h(g.ab,this.hf,this);
this.le.h(g.la,this.gX,this);this.le.h(g.di,this.AMa,this);this.le.h(g.fb,this.Wj,this);this.le.h(g.Eb,this.Sn,this);this.Gk.T.dd(this.Gk);this.qp.dispose();f.M.h(g.vu,this.iX,this);f.M.h(g.EB,this.jX,this);f.M.h(g.Uf,this.hX,this)};v.prototype.OP=function(){var w=this.Gk.O(c.yc,!0);w.matrixWorld.copy(this.hb.matrixWorld);w.origin.copy(this.hb.ray.origin);w.direction.copy(this.hb.ray.direction);w.Qb.copy(this.hb.Qb);w.XA=this.hb.XA;this.xV(w,this.Ft);(this.hb.pressed||d.gf())&&this.Ei.m(g.fb)};v.prototype.xV=
function(w,y){t.origin.set(w.origin);t.direction.set(w.direction);t.applyMatrix4(w.matrixWorld);y.set("originX",w.origin.x);y.set("originY",w.origin.y);y.set("originZ",w.origin.z);y.set("directionX",w.direction.x);y.set("directionY",w.direction.y);y.set("directionZ",w.direction.z)};v.prototype.hX=function(w){w.data.pointerState===this.hb&&(w=Date.now()-this.LI<300,this.LI=Date.now(),this.Ei.m(g.la),w&&this.Ei.m(g.di))};v.prototype.iX=function(w){w.data.pointerState===this.hb&&(this.Ei.m(g.fb),this.Yz=
Date.now(),this.Ei.m(g.Ra))};v.prototype.jX=function(w){w.data.pointerState===this.hb&&this.Ei.m(g.ab)};v.prototype.Wj=function(w){this.PX(w);this.lPa(w);this.Ft.m(this.hO(w))};v.prototype.Xh=function(w){this.PX(w);this.lPa(w);this.Ft.m(this.hO(w))};v.prototype.hf=function(w){this.distance=void 0;this.Ft.m(this.hO(w))};v.prototype.gX=function(w){this.Ft.m(this.hO(w))};v.prototype.AMa=function(w){this.Ft.m(this.hO(w))};v.prototype.Sn=function(w){this.distance=void 0;this.Ft.m(this.hO(w))};v.prototype.PX=
function(w){w.data.position?(w=w.data.position,t.copy(this.hb.ray).applyMatrix4(this.hb.matrixWorld),this.distance=t.origin.distanceTo(r.set(w.x,w.y,w.z))):this.distance=void 0};v.prototype.lPa=function(w){this.Seb=w.data.type=="mesh";this.Qeb=w.data.type=="bone";this.Reb=w.data.type=="gs"};v.prototype.hO=function(w){var y=this.Aab(w);w.data&&w.data.position&&(w=this.nkb(r.set(w.data.position.x,w.data.position.y,w.data.position.z)),y.data=Object.assign({},y.data,{position:{x:w.x,y:w.y,z:w.z}}));return y};
v.prototype.Aab=function(w){var y=new h(w.name,w.data);y.source=w.source;return y};v.prototype.nkb=function(w){var y=this.En.getComponent(c.Object3D);return(y=y===null||y===void 0?void 0:y.ra)?y.worldToLocal(w):w};return v}(),r=new k.Vector3,t=new k.Ray,u=function(){function v(w){this.Ft=w}v.prototype.NJa=function(){return this.Ft};v.prototype.L8=function(w,y){this.Ue=y.indexOf(m.mf)>-1};return v}();return a});
define("tdv/player/view/model3d/renderer/adapters/pointer/MousePointerAdapter","require exports three.mod tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/model3d/renderer/adapters/cursor/InstanceCursorManager tdv/player/view/util/geo/Fov tdv/player/view/webgl/components".split(" "),function(a,l,k,n,g,h,e,b,c){var d=new k.Vector3(0,0,0),f=Math.PI/180,m=new k.Vector3;return function(){function p(q,r,t,u,v){this.renderer=q;this.$h=r;this.model=t;this.wb=
u;this.Ba=v;this.b6=this.b6.bind(this);this.KA=this.KA.bind(this);this.Ov=this.Ov.bind(this);this.cb=this.renderer.R;this.Pf=this.renderer.getParent();this.Bw=this.model.get("application").yi("Model3DPointer");this.enabled=!0;this.Va()}p.prototype.Ua=function(q){this.enabled=q;var r=this.Ba.O(c.yc);r&&(r.enabled=q)};p.prototype.dispose=function(){this.xa()};p.prototype.Va=function(){this.Ei=new h;var q=this.Ba.K(c.yc);q.Ba=this.Ba;q.origin=d;q.direction=new k.Vector3;q.JD=this.Ei;q.M=this.Bw;this.qp=
new e;this.qp.Xt(this.Pf);q.G5=this.qp;q.enabled=this.enabled;n.ba(this.model,["camera.fov"],this.b6,!0);this.renderer.bind(g.Zb,this.KA,this,!0);this.Pf.Q$a(g.Ra,this.ZFa,this);this.Pf.bind(g.fb,this.Ov,this,!0);this.Pf.bind(g.ab,this.$Fa,this,!0);this.Pf.bind(g.la,this.XFa,this,!0);this.Pf.bind(g.di,this.YFa,this,!0);this.model.set("picker",this);this.model.set("pointer",this.Bw)};p.prototype.xa=function(){n.da(this.model,["camera.fov"],this.b6);this.renderer.h(g.Zb,this.KA,this);this.Pf.h(g.Ra,
this.ZFa,this);this.Pf.h(g.fb,this.Ov,this);this.Pf.h(g.ab,this.$Fa,this);this.Pf.h(g.la,this.XFa,this);this.Pf.h(g.di,this.YFa,this);this.Ba.ja(c.yc);this.qp.dispose();this.model.set("picker",void 0);this.model.set("pointer",void 0)};p.prototype.KA=function(){this.Vqa()};p.prototype.b6=function(){this.Vqa()};p.prototype.ZFa=function(q){var r=q.clone();r.name=g.fb;this.Ov(r);this.Ei.m(q)};p.prototype.Ov=function(q){this.tfb=q.x;this.ufb=q.y;this.Vqa();this.Ei.m(q)};p.prototype.$Fa=function(q){this.Ei.m(q)};
p.prototype.XFa=function(q){this.Ei.m(q)};p.prototype.YFa=function(q){this.Ei.m(q)};p.prototype.Vqa=function(){var q=this.Ba.O(c.yc);this.vJa(this.tfb,this.ufb,q.direction);this.xV(q,this.Bw)};p.prototype.xV=function(q,r){r.set("originX",q.origin.x);r.set("originY",q.origin.y);r.set("originZ",q.origin.z);r.set("directionX",q.direction.x);r.set("directionY",q.direction.y);r.set("directionZ",q.direction.z)};p.prototype.vJa=function(q,r,t){var u;t=t||new k.Vector3;var v=((u=this.model.get("camera"))===
null||u===void 0?void 0:u.get("fov"))||90;u=this.cb.gb();var w=this.cb.Kb();q===void 0&&(q=u/2);r===void 0&&(r=w/2);t.set(q-u/2,w/2-r,-u/(Math.tan((u>w?v:b.rr(v,u,w))*f/2)*2)).normalize();return t};p.prototype.Koa=function(q,r){var t=this.Ba.getComponent(c.yc);if(t&&t.Ot)return t.Ot.Koa([this.wb],d,this.vJa(q,r,m))};return p}()});
define("tdv/player/view/model3d/renderer/adapters/pointer/PointerAdapter","require exports tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/view/model3d/renderer/adapters/pointer/FirstPersonPointerAdapter tdv/player/view/model3d/renderer/adapters/pointer/GazePointerAdapter tdv/player/view/model3d/renderer/adapters/pointer/XRPointerAdapter tdv/player/view/model3d/renderer/adapters/pointer/MousePointerAdapter tdv/player/view/util/XR".split(" "),function(a,l,k,n,g,h,e,b,c){return function(){function d(f,
m,p,q,r,t){this.renderer=f;this.$h=m;this.model=p;this.En=q;this.wb=r;this.Ba=t;this.enabled=!0;this.Oz=this.Oz.bind(this);this.Va()}d.prototype.Ua=function(f){var m;this.enabled=f;(m=this.SI)===null||m===void 0||m.Ua(this.enabled)};d.prototype.dispose=function(){this.xa()};d.prototype.Va=function(){k.ba(this.model,"camera",this.Oz,!1);c.M.bind(n.V,this.HRa,this,!0);this.Yqa()};d.prototype.xa=function(){k.da(this.model,"camera",this.Oz);c.M.h(n.V,this.HRa,this);this.$t("none");this.oQa()};d.prototype.Oz=
function(){this.Yqa()};d.prototype.HRa=function(){this.Yqa()};d.prototype.Yqa=function(){c.isPresenting?this.$t("xr"):this.model.get("camera").get("class")=="FirstPersonModel3DCamera"?this.hjb():(this.oQa(),this.$t("mouse"))};d.prototype.hjb=function(){this.vO||(this.vO=new g(this.renderer,this.$h,this.model,this.wb,this.Ba),this.vO.bind(n.V,this.mMa,this,!0),this.mMa())};d.prototype.oQa=function(){var f;this.vO&&((f=this.vO)===null||f===void 0||f.dispose(),this.vO=void 0)};d.prototype.mMa=function(){var f;
switch((f=this.vO)===null||f===void 0?void 0:f.getType()){case g.haa:this.$t("gaze");break;default:this.$t("mouse")}};d.prototype.$t=function(f){var m;if(this.type!==f){this.SI&&this.SI.dispose();this.type=f;switch(this.type){case "mouse":this.SI=new b(this.renderer,this.$h,this.model,this.wb,this.Ba);break;case "gaze":this.SI=new h(this.renderer,this.$h,this.model,this.wb,this.Ba);break;case "xr":this.SI=new e(this.renderer,this.$h,this.model,this.En,this.wb,this.Ba);break;default:this.SI=void 0}(m=
this.SI)===null||m===void 0||m.Ua(this.enabled)}};return d}()});
define("tdv/player/view/model3d/renderer/adapters/postprocessing/AmbientOcclusionPostprocessingAdapter",["require","tdv/binding/BindingsHandler","tdv/player/view/webgl/components"],function(a){function l(h,e){this.Rc=h;this.je=e;this.ha=!1;this.Yi=this.Yi.bind(this);k.ba(this.Rc,g,this.Yi,!0)}var k=a("tdv/binding/BindingsHandler"),n=a("tdv/player/view/webgl/components");l.prototype.Yi=function(){var h=this.Rc.get("enabled")&&!this.Rc.get("disabled");this.ha!=h&&(this.ha&&this.je.ja(n.rK),(this.ha=
h)&&this.je.K(n.rK));this.ha&&(h=this.je.O(n.rK),h.iIa=this.Rc.get("easingDuration"),h.bias=this.Rc.get("bias"),h.intensity=this.Rc.get("intensity"),h.scale=this.Rc.get("scale"),h.dLa=this.Rc.get("kernelRadius"),h.FLa=this.Rc.get("minResolution"),h.tla=this.Rc.get("blurRadius"),h.output=this.Rc.get("output")=="ao"?THREE.SAOPass.OUTPUT.SAO:THREE.SAOPass.OUTPUT.Default)};l.prototype.dispose=function(){this.je.ja(n.rK);this.je=null;k.da(this.Rc,g,this.Yi)};var g="disabled enabled bias easingDuration intensity scale kernelRadius minResolution blurRadius output".split(" ");
return l});
define("tdv/player/view/model3d/renderer/adapters/postprocessing/AntialiasPostprocessingAdapter",["require","tdv/binding/BindingsHandler","tdv/player/view/webgl/components"],function(a){function l(h,e){this.Rc=h;this.je=e;this.ha=!1;this.Yi=this.Yi.bind(this);k.ba(this.Rc,g,this.Yi,!0)}var k=a("tdv/binding/BindingsHandler"),n=a("tdv/player/view/webgl/components");l.prototype.Yi=function(){var h=this.Rc.get("enabled")&&!this.Rc.get("disabled");this.ha!=h&&(this.ha&&this.je.ja(n.bF),(this.ha=h)&&this.je.K(n.bF));
this.ha&&(h=this.je.O(n.bF),h.QIa=this.Rc.get("mode")=="fxaa",h.$Pa=this.Rc.get("mode")=="ssaa",h.oY=this.Rc.get("ssaaSampleLevel"))};l.prototype.dispose=function(){this.je.ja(n.bF);this.je=null;k.da(this.Rc,g,this.Yi)};var g=["disabled","enabled","mode","ssaaSampleLevel"];return l});
define("tdv/player/view/model3d/renderer/adapters/postprocessing/MotionBlurPostprocessingAdapter",["require","tdv/binding/BindingsHandler","tdv/player/view/webgl/components"],function(a){function l(h,e){this.Rc=h;this.je=e;this.ha=!1;this.Yi=this.Yi.bind(this);k.ba(this.Rc,g,this.Yi,!0)}var k=a("tdv/binding/BindingsHandler"),n=a("tdv/player/view/webgl/components");l.prototype.Yi=function(){var h=this.Rc.get("enabled")&&!this.Rc.get("disabled");this.ha!=h&&(this.ha&&this.je.ja(n.iQ),(this.ha=h)&&this.je.K(n.iQ));
this.ha&&(h=this.je.O(n.iQ),h.pOa=this.Rc.get("samples"),h.intensity=this.Rc.get("intensity"))};l.prototype.dispose=function(){this.je.ja(n.iQ);this.je=null;k.da(this.Rc,g,this.Yi)};var g=["disabled","enabled","samples","intensity"];return l});
define("tdv/player/view/model3d/renderer/adapters/postprocessing/VignettePostprocessingAdapter",["require","tdv/binding/BindingsHandler","tdv/player/view/webgl/components"],function(a){function l(h,e){this.Rc=h;this.je=e;this.Yi=this.Yi.bind(this);k.ba(this.Rc,g,this.Yi,!0)}var k=a("tdv/binding/BindingsHandler"),n=a("tdv/player/view/webgl/components");l.prototype.Yi=function(){var h=this.Rc.get("enabled")&&!this.Rc.get("disabled");this.ha!=h&&(this.ha&&this.je.ja(n.RK),(this.ha=h)&&this.je.K(n.RK));
this.ha&&(h=this.je.O(n.RK),h.EKa=this.Rc.get("innerRadius"),h.hNa=this.Rc.get("outerRadius"),h.color=this.Rc.get("color"),h.opacity=this.Rc.get("opacity"))};l.prototype.dispose=function(){this.je.ja(n.RK);this.je=null;k.da(this.Rc,g,this.Yi)};var g="enabled disabled opacity color innerRadius outerRadius".split(" ");return l});
define("tdv/player/view/model3d/renderer/adapters/postprocessing/PostprocessingArrayAdapter","require exports tdv/player/view/model3d/renderer/adapters/ArrayAdapter tdv/player/view/model3d/renderer/adapters/postprocessing/AmbientOcclusionPostprocessingAdapter tdv/player/view/model3d/renderer/adapters/postprocessing/AntialiasPostprocessingAdapter tdv/player/view/model3d/renderer/adapters/postprocessing/MotionBlurPostprocessingAdapter tdv/player/view/model3d/renderer/adapters/postprocessing/VignettePostprocessingAdapter tdv/player/parser/ClassInfo".split(" "),function(a,
l,k,n,g,h,e,b){return function(){function c(d,f){this.model=d;this.Nd=f;this.filter=this.filter.bind(this);this.be=this.be.bind(this);this.Vg=this.Vg.bind(this);this.tX=new k;this.tX.filter=this.filter;this.tX.be=this.be;this.tX.Vg=this.Vg;this.tX.UA(this.model,"postprocessing")}c.prototype.filter=function(d){return b.Qa("AmbientOcclusionModel3DPostprocessing",d)||b.Qa("AntialiasModel3DPostprocessing",d)||b.Qa("MotionBlurModel3DPostprocessing",d)||b.Qa("VignetteModel3DPostprocessing",d)};c.prototype.be=
function(d){return b.Qa("AmbientOcclusionModel3DPostprocessing",d)?new n(d,this.Nd):b.Qa("AntialiasModel3DPostprocessing",d)?new g(d,this.Nd):b.Qa("MotionBlurModel3DPostprocessing",d)?new h(d,this.Nd):b.Qa("VignetteModel3DPostprocessing",d)?new e(d,this.Nd):null};c.prototype.Vg=function(d,f){f.dispose()};c.prototype.dispose=function(){this.tX.dispose()};return c}()});
define("tdv/player/view/util/ScreenFrameRateMonitor",["require","exports"],function(){var a=function(){function l(){}l.init=function(){for(var k=0;k<=l.maa;k++)l.tma.push(0);window.requestAnimationFrame(l.vp)};l.gJa=function(){return l.frameRate};l.vp=function(k){l.tJ!==0&&(l.tma[Math.min(Math.round(1E3/(k-l.tJ)),l.maa)]++,l.tP++);l.tJ=k;l.tP<l.ZSa?window.requestAnimationFrame(l.vp):l.T$a()};l.T$a=function(){for(var k=0,n=0,g=30;g<=l.maa;g+=10){for(var h=0,e=-5;e<=5;e++)h+=l.tma[g+e];h>k&&(k=h,n=
g)}l.frameRate=n};l.maa=200;l.ZSa=60;l.tma=[];l.tJ=0;l.tP=0;l.frameRate=60;return l}();a.init();return a});
define("tdv/player/view/model3d/renderer/adapters/ScenePixelRatioAdapter","require exports tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/util/Flags tdv/player/view/webgl/components tdv/player/view/util/ScreenFrameRateMonitor".split(" "),function(a,l,k,n,g,h,e,b){a=function(){function f(m,p){this.hE=this.enabled=!1;this.ULa=this.VLa=0;this.model=m;this.Nd=p;this.Cqa=this.Cqa.bind(this);this.D7=this.D7.bind(this);this.V7=this.V7.bind(this);k.ba(this.model,
"pixelRatioMinScale",this.V7,!0)}f.prototype.dispose=function(){this.disable();k.da(this.model,"pixelRatioMinScale",this.V7)};f.prototype.V7=function(){this.disable();this.model.get("pixelRatioMinScale")<1&&this.enable()};f.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.Bp(!1),this.jP.h(n.V,this.HMa,this),k.da(this.model,"camera.x camera.y camera.z camera.yaw camera.pitch camera.fov camera.distance".split(" "),this.D7),this.jP.dispose())};f.prototype.enable=function(){this.enabled||
(this.enabled=!0,this.jP=new c(this.model.get("pixelRatioMinScale")),this.jP.bind(n.V,this.HMa,this,!0),k.ba(this.model,"camera.x camera.y camera.z camera.yaw camera.pitch camera.fov camera.distance".split(" "),this.D7,!0))};f.prototype.D7=function(){this.VLa=Date.now();this.Bp(!0)};f.prototype.Cqa=function(){Date.now()-this.VLa>f.xsa&&this.Bp(!1)};f.prototype.Bp=function(m){this.hE!==m&&((this.hE=m)?(this.ULa=window.setInterval(this.Cqa,f.xsa),this.jP.enable()):(window.clearInterval(this.ULa),this.jP.disable()),
this.oRa())};f.prototype.HMa=function(){this.oRa()};f.prototype.oRa=function(){var m=this.hE&&this.enabled?this.jP.kA():1;this.Nd.getComponent(e.Scene).n8!=m&&(this.Nd.O(e.Scene).n8=m)};f.xsa=100;return f}();var c=function(f){function m(p){var q=f.call(this)||this;q.AE=[];q.UO=0;q.vp=q.vp.bind(q);q.J$a(p);q.reset();return q}O(m,f);m.prototype.J$a=function(p){for(var q=1;q>p;q-=.1)this.AE.push(q);Math.abs(p-this.AE[this.AE.length-1])>d&&this.AE.push(p);h.bx&&console.log("steps = ["+this.AE.map(function(r){return r.toFixed(2)}).join(", ")+
"]")};m.prototype.reset=function(){this.disable();this.tJ=0;this.PJ=.5;this.Ina=0;this.scale=this.AE.length*.5;this.qpa=Math.floor(this.scale);this.lHa();this.enable()};m.prototype.enable=function(){!this.UO&&this.PJ>m.asa&&(this.UO=window.requestAnimationFrame(this.vp))};m.prototype.disable=function(){this.UO&&(window.cancelAnimationFrame(this.UO),this.UO=0)};m.prototype.kA=function(){return this.AE[this.qpa]};m.prototype.dispose=function(){this.disable()};m.prototype.vp=function(p){this.tJ!==0&&
(this.Tkb(p-this.tJ),this.dlb());this.tJ=p;this.UO=this.PJ>m.asa?window.requestAnimationFrame(this.vp):0};m.prototype.Tkb=function(p){for(this.cW.push(p);this.cW.length>m.HSa;)this.cW.shift(),this.JI=this.cW.reduce(function(q,r){return q+r},0)/this.cW.length};m.prototype.lHa=function(){this.cW=[];this.JI=void 0};m.prototype.dlb=function(){if(this.JI!==void 0){var p=1E3/b.gJa(),q=p*m.cTa;p=Math.max(1E3/m.dTa,p*m.XSa);if(this.JI<=p)var r=-1;else if(this.JI>q)r=1;else{h.bx&&console.log("["+q.toFixed(2)+
" > "+this.JI.toFixed(2)+" > "+p.toFixed(2)+"]");return}this.Ina&&this.Ina!==r&&(this.PJ*=m.ITa);this.Ina=r;this.scale=Math.min(Math.max(this.scale+r*this.PJ,0),this.AE.length-1);r==1?h.bx&&console.log("["+this.JI.toFixed(2)+" > "+q.toFixed(2)+"]",this.scale.toFixed(2),"("+(r*this.PJ).toFixed(2)+")"):r==-1&&h.bx&&console.log("["+this.JI.toFixed(2)+" <= "+p.toFixed(2)+"]",this.scale.toFixed(2),"("+(r*this.PJ).toFixed(2)+")");q=Math.round(this.scale);this.qpa!==q&&(this.lHa(),this.qpa=q,this.m(n.V))}};
m.cTa=1.5;m.XSa=1.1;m.HSa=15;m.ITa=.75;m.asa=.01;m.dTa=60;return m}(g),d=1E-6;return a});
define("tdv/player/view/model3d/renderer/adapters/SceneAdapter","require exports tdv/constants/EventName tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util tdv/player/view/model3d/renderer/adapters/CameraAdapter tdv/player/view/model3d/renderer/adapters/lights/LightsAdapter tdv/player/view/model3d/renderer/adapters/ModelAdapter tdv/player/view/model3d/renderer/adapters/MenuAdapter tdv/player/view/model3d/renderer/adapters/ToolTipAdapter tdv/player/view/model3d/renderer/adapters/SurfaceSelectorPointerAdapter tdv/player/view/model3d/renderer/adapters/objects/NearestObjectsVisibleAdapter tdv/player/view/model3d/renderer/adapters/objects/objects tdv/player/view/model3d/renderer/adapters/pointer/PointerAdapter tdv/player/view/model3d/renderer/adapters/postprocessing/PostprocessingArrayAdapter tdv/player/view/model3d/renderer/adapters/ScenePixelRatioAdapter tdv/player/view/util/XR".split(" "),function(a,
l,k,n,g,h,e,b,c,d,f,m,p,q,r,t,u){var v=function(y){return y.map(function(x){return String.fromCharCode(x)}).join("")}([119,97,116,101,114,109,97,114,107]),w="anisotropicFilteringLevel bakedTextures environmentURL backgroundImageURL backgroundPanoramaURL backgroundColor fogColor fogDensity opacity encoding environmentIntensity".split(" ");p.UA();return function(){function y(x,z,A){var D=this;this.renderer=x;this.$h=z;this.model=A;this.cb=this.renderer.R;this.enabled=!0;this.jj=!1;this.model.lpa();
this.Nd=this.$h.rc("Scene");x=this.Nd.K(n.Scene);x.mma=this.model.u6().QN(this.model.x6().Xv(.1),.1);x.M=this.model;x.locked=!0;this.En=this.$h.rc("Anchor");this.En.K(n.$E);this.En.K(n.Group);this.En.K(n.pb).F=this.Nd;this.ILa=new b(this.model,this.model,this.En,this.renderer);this.wb=this.ILa.ij();x.Ba=this.Ba=this.$h.rc("PerspectiveCamera");this.Ba.K(n.pb).F=this.En;this.r5=new h(this.renderer,this.model,this.wb,this.Ba);this.r5.Jw(!0);this.ofb=new c(this.model,this.wb,this.Ba);this.thb=new t(this.model,
this.Nd);this.ifb=new e(this.model,this.wb,this.En,this.Ba);this.wNa=new q(this.renderer,this.$h,this.model,this.En,this.wb,this.Ba);w.forEach(function(E){D.model.bind(k.N(E),D.woa,D,!0)});this.Cgb=new r(this.model,this.Nd);this.$h.gGa(this.Nd);this.vfb=new m(this.model,this.wb,this.Ba);this.Rjb=new f(this.model,this.wb,this.renderer);this.mkb=new d(this.renderer,this.model);u.M.bind(k.V,this.Ya,this,!0);this.woa();this.Ya()}y.prototype.Jw=function(x){this.Nd.O(n.Scene).locked=x;this.r5.Jw(x)};y.prototype.Ua=
function(x){this.enabled!==x&&(this.enabled=x,this.Rw())};y.prototype.Ya=function(){this.jj=u.zg==this.cb.Kc().Jn();this.Rw()};y.prototype.Rw=function(){var x=(this.model.get("camera").get("xrEnabled")||this.model.get("camera").get("vrEnabled"))&&!(this.model.get("application")&&this.model.get("application").get(v));x=this.enabled&&(!this.jj||x);this.Nd.O(n.Scene).enabled=x;this.wNa.Ua(x);this.r5.Ua(x)};y.prototype.dispose=function(){w.forEach(function(x){this.model.h(k.N(x),this.woa,this)}.bind(this));
this.model.h(k.N("camera"),this.C7,this);u.M.h(k.V,this.Ya,this);this.thb.dispose();this.ofb.dispose();this.ILa.dispose();this.r5.dispose();this.ifb.dispose();this.wNa.dispose();this.Cgb.dispose();this.Rjb.dispose();this.vfb.dispose();this.mkb.dispose();this.$h.ahb(this.Nd);this.$h.dd(this.Nd);this.$h.dd(this.En);this.$h.dd(this.Ba)};y.prototype.ddb=function(){return this.wb?g.cJ(this.wb):void 0};y.prototype.woa=function(){var x=this.Nd.O(n.Scene);x.opacity=this.model.get("opacity");x.rIa=this.model.get("environmentURL");
x.nla=this.model.get("backgroundImageURL");x.JGa=this.model.get("backgroundPanoramaURL");x.backgroundColor=this.model.get("backgroundColor");x.outputColorSpace=this.model.get("encoding");x.LIa=this.model.get("fogColor");x.MIa=this.model.get("fogDensity");x.environmentIntensity=this.model.get("environmentIntensity");x=this.model.get("anisotropicFilteringLevel");var z=this.model.get("bakedTextures");if(x!=0||z){var A=this.Nd.O(n.ei,!0);A.sV=x;A.zV=z}else this.Nd.ja(n.ei)};return y}()});
define("tdv/player/view/model3d/renderer/Renderer","require tdv/utils tdv/player/view/webgl/components tdv/player/view/webgl/Renderer tdv/player/view/model3d/renderer/adapters/SceneAdapter tdv/view/constants/Cursor tdv/view/constants/LayoutMode tdv/view/containers/Container".split(" "),function(a){var l=a("tdv/utils");a("tdv/player/view/webgl/components");var k=a("tdv/player/view/webgl/Renderer"),n=a("tdv/player/view/model3d/renderer/adapters/SceneAdapter"),g=a("tdv/view/constants/Cursor"),h=a("tdv/view/constants/LayoutMode"),
e=a("tdv/view/containers/Container");a=l.extend(e,function(b,c,d){e.call(this);this.Ee=b;this.R=c;this.sS=d;this.df("Renderer");this.set("toolTipDisabled",!0);this.set("cursor",g.wB);this.set("layout",h.MY);this.ef=null;this.ha=!0;this.rH=[];this.bN=new Map});a.prototype.Ib=function(){e.prototype.Ib.call(this);this.ef==null&&(this.ef=new k(this.Ee,this.R,!0),this.ef.wa({left:0,top:0,right:0,bottom:0,cursor:g.wB,toolTipDisabled:!0}),this.ef.Ua(this.ha),this.mb(this.ef),this.rH.forEach(this.vDa.bind(this)))};
a.prototype.Ua=function(b){this.ha!==b&&(this.ha=b,this.ef&&this.ef.Ua(this.ha),this.set("interactionEnabled",this.ha))};a.prototype.Za=function(){this.ef&&this.ef.Za()};a.prototype.Wdb=function(b){return this.rH.indexOf(b)>=0};a.prototype.eGa=function(b){this.rH.indexOf(b)>=0||(this.rH.push(b),this.ef&&this.vDa(b))};a.prototype.cpa=function(b){var c=this.rH.indexOf(b);c<0||(this.rH.splice(c,1),this.ef&&this.cEa(b),this.rH.length===0&&this.Ua(!0))};a.prototype.Npa=function(b,c){(b=this.bN.get(b))&&
b.Jw(c)};a.prototype.hPa=function(b,c){(b=this.bN.get(b))&&b.Ua(c)};a.prototype.lW=function(b){return(b=this.bN.get(b))?b.ddb():void 0};a.prototype.OJ=function(){return this.ef&&this.ef.OJ()};a.prototype.zla=function(){return this.ef&&this.ef.zla()};a.prototype.vDa=function(b){this.cEa(b);this.bN.set(b,new n(this,this.ef,b))};a.prototype.cEa=function(b){var c=this.bN.get(b);c&&(this.bN["delete"](b),c.dispose())};return a});
define("tdv/player/script/Model3DPlayer","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/player/parser/ClassInfo tdv/player/script/helper/ButtonProperty tdv/player/script/PlaybackMediaPlayer tdv/player/view/model3d/controller/Controller tdv/player/view/model3d/renderer/Renderer tdv/view/constants/ButtonMode".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/helper/ButtonProperty"),
e=a("tdv/player/script/PlaybackMediaPlayer"),b=a("tdv/player/view/model3d/controller/Controller"),c=a("tdv/player/view/model3d/renderer/Renderer"),d=a("tdv/view/constants/ButtonMode"),f=g.define("Model3DPlayer",e,function(){e.call(this,"model");this.ds=this.j1=this.ej=!1;this.U=this.o=null;this.$b=this.tf=0;this.Zd=l.ar(this.Qh,this);this.Tba=new h(this,"buttonToggleSprites",d.Vk);this.Tba.bind(k.Sk,function(){this.set("spritesEnabled",!0)},this);this.Tba.bind(k.Nm,function(){this.set("spritesEnabled",
!1)},this);this.Tba.set("pressed",this.get("spritesEnabled"))});f.prototype.play=function(){this.FH()};f.prototype.pause=function(){this.EH()};f.prototype.stop=function(){this.QC()};f.prototype.restart=function(){this.PC()};f.prototype.getModelPixelScale=function(){return this.H_a()};f.prototype.captureToDataURL=function(){return this.o&&this.o.zla()};f.prototype.saveScreenshot=function(){return this.o&&this.o.OJ()};f.prototype.set=function(m,p){if(this.get(m)!=p){switch(m){case "model":this.j1=!0;
this.set("requesterPlayer",null);this.Zd();break;case "viewerArea":this.ej=!0;this.Zd();break;case "displayPlaybackBar":this.ds=!0,this.Zd()}e.prototype.set.call(this,m,p)}};f.prototype.get=function(m,p){switch(m){case "currentTime":return this.U&&this.U.getTime()||0}return e.prototype.get.call(this,m,p)};f.prototype.Qh=function(){this.ej&&(this.ej=!1,this.Yx(),this.get("viewerArea")&&this.Xx(),this.lU(this.get("viewerArea")),this.j1=!0);var m=!1;if(this.o&&(this.j1||this.W3)){var p=this.get("model");
if(p&&!this.o.Vb()){this.Zd();return}this.j1=!1;this.$b=this.tf=0;m=!0;p?(this.get("viewerArea").Kc().Cjb(),this.MJ(this.get("requesterPlayer")?[this.get("requesterPlayer"),this]:[this]),this.U.uib(p)):this.U.MA()}this.ds&&(this.ds=!1,m=!0);m&&this.Jz()};f.prototype.rN=function(){this.set("model",null)};f.prototype.Xx=function(){var m=this.get("application"),p=this.get("viewerArea");this.o=new c(m,p,this);this.o.wa({left:0,top:0,bottom:0,right:0});p.mb(this.o);this.U=new b(p,this.o);this.U.bind(b.lF,
this.ln,this);this.U.bind(b.kF,this.MC,this);this.U.bind(b.mF,this.WS,this);this.U.bind(b.P$,this.tAa,this,!0);this.U.bind(b.gd,this.Kf,this);this.kD(!0)};f.prototype.Yx=function(){this.o&&(this.U.h(b.lF,this.ln,this),this.U.h(b.kF,this.MC,this),this.U.h(b.mF,this.WS,this),this.U.h(b.P$,this.tAa,this,!0),this.U.h(b.gd,this.Kf,this),this.U.clear(),this.o.getParent().removeChild(this.o),this.o=null,this.kD(!1))};f.prototype.Kf=function(m){this.Id(m.data.state)};f.prototype.ln=function(m){var p=this.get("viewerArea");
this.te=p&&p.te;this.qS(m.data.model);this.Jz()};f.prototype.WS=function(m){this.m(new n(f.sSa,{model:m.data.model}))};f.prototype.MC=function(m){this.te=null;this.pS(m.data.model)};f.prototype.tAa=function(m){this.tf=m.data.time;this.$b=m.data.duration;this.Jz()};f.prototype.Ala=function(){var m=this.get("model");return(m=(m=m&&m.get("camera"))&&m.get("doubleClickAction"))&&m!="none"?!0:!1};f.prototype.BT=function(m){this.$H(m.data.position)};f.prototype.Xl=function(){this.U&&this.U.play()};f.prototype.Dq=
function(){this.U&&this.U.stop()};f.prototype.Is=function(){this.U&&this.U.pause()};f.prototype.$H=function(m){this.U&&this.U.setTime(m)};f.prototype.H_a=function(){return this.U&&this.U.lW()};f.prototype.Jz=function(){if(this.o){var m=this.o.getParent();this.$b>0&&this.get("displayPlaybackBar")?m.wa({playbackBarPosition:this.tf,playbackBarDuration:this.$b,playbackBarVisible:!0}):m.set("playbackBarVisible",!1)}};f.sSa="preloadMediaShow";return f});
define("tdv/player/script/Model3DPlayListItem","require tdv/constants/EventName tdv/constants/PlaybackState tdv/player/parser/ClassInfo tdv/player/script/MediaPlayer tdv/player/script/PlayListItem".split(" "),function(a){var l=a("tdv/constants/EventName"),k=a("tdv/constants/PlaybackState"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/player/script/MediaPlayer"),h=a("tdv/player/script/PlayListItem");a=n.define("Model3DPlayListItem",h,function(){h.call(this)});a.prototype.start=function(){h.prototype.start.call(this);
var e=this.get("player");e&&(e.bind(g.ai,this.ln,this),e.get("model")==this.get("media")&&this.get("media").get("isLoaded")?this.ln():e.set("model",this.get("media")))};a.prototype.stop=function(){var e=this.get("player");e&&(e.h(g.ai,this.ln,this),e.get("model")==this.get("media")&&e.set("model",null));h.prototype.stop.call(this)};a.prototype.ln=function(e){e&&e.data.media!=this.get("media")||(this.get("player").h(g.ai,this.ln,this),this.get("player").bind(g.lo,this.MC,this),this.N9a())};a.prototype.N9a=
function(){var e=this.get("media").get("camera").get("sequences",[]).find(function(b){return b.get("internal")&&b.get("state")==k.PLAYING});e?e.bind(l.Sb,this.iBa,this,!0):this.CD()};a.prototype.iBa=function(e){e.source.h(l.Sb,this.iBa,this,!0);this.CD()};a.prototype.MC=function(e){e.data.media==this.get("media")&&(this.get("player").h(g.lo,this.MC,this),this.stop(),this.end())};return a});
define("tdv/player/script/Model3DPointer",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("Model3DPointer",l,function(){l.call(this)})});define("tdv/player/script/Menu",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("Menu",l,function(){l.call(this)})});
define("tdv/player/script/MenuItem",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("MenuItem",l,function(){l.call(this)})});
define("tdv/player/script/MotionBlurModel3DPostprocessing",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DPostprocessing"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/Model3DPostprocessing");return l.define("MotionBlurModel3DPostprocessing",k,function(){k.call(this)})});
define("tdv/player/script/PhotoCamera",["require","exports","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a,l,k,n){a=function(g){function h(){return g.call(this)||this}O(h,g);return h}(k);n.create("PhotoCamera",a);return a});define("tdv/player/script/MovementPhotoCamera",["require","exports","tdv/player/script/PhotoCamera","tdv/player/parser/ClassInfo"],function(a,l,k,n){a=function(g){function h(){return g.call(this)||this}O(h,g);return h}(k);n.create("MovementPhotoCamera",a);return a});
define("tdv/player/constants/RotationMode",["require"],function(){var a={gF:"drag_acceleration",gx:"drag_rotation"};a.dsa=a.gF;a.Xsa=a.gx;return a});define("tdv/player/view/panorama/control/events/RotationChangeEvent",["require","tdv/utils","tdv/events/Event"],function(a){var l=a("tdv/utils"),k=a("tdv/events/Event");return l.extend(k,function(n){k.call(this,n);this.iP=this.TP=this.EA=this.fB=0})});
define("tdv/player/view/panorama/control/events/ZoomChangeEvent",["require","tdv/utils","tdv/events/Event"],function(a){var l=a("tdv/utils"),k=a("tdv/events/Event");return l.extend(k,function(n){k.call(this,n);this.bna=this.ieb=0})});
define("tdv/player/view/panorama/control/camera/MouseManager","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Device tdv/player/constants/RotationMode tdv/player/view/panorama/control/events/RotationChangeEvent tdv/player/view/panorama/control/events/ZoomChangeEvent".split(" "),function(a){function l(q,r){return q*r}function k(q,r){var t=r>0?1:-1;return t*(Math.pow(q,t*r)-1)/(q-1)}function n(q,r){return Math.min(Math.max(q/r,-1),1)}var g=
a("tdv/utils"),h=a("tdv/constants/EventName"),e=a("tdv/events/Event"),b=a("tdv/events/EventDispatcher"),c=a("tdv/player/view/util/Device"),d=a("tdv/player/constants/RotationMode"),f=a("tdv/player/view/panorama/control/events/RotationChangeEvent"),m=a("tdv/player/view/panorama/control/events/ZoomChangeEvent"),p=g.extend(b,function(){b.call(this);this.Gya=this.Hya=1800;this.$1a=this.X7a=0;this.SR=!1;this.xq=void 0;this.sH=d.dsa;this.oEa=d.Xsa;this.hR=0;this.p3=void 0;this.Lq=!1;this.fL=null;this.VG=
3;this.kb=90;this.nda=this.eI=this.Vc=1;this.te=this.Ab=null;this.AT=!1});p.prototype.setCamera=function(q){this.Hya=q.get("manualRotationSpeed");this.Gya=q.get("manualRotationSpeed");this.VG=q.get("manualZoomSpeed");this.nda=q.get("draggingFactor")};p.prototype.GE=function(q){this.sH=q;this.tka()};p.prototype.ZJ=function(q){this.oEa=q;this.tka()};p.prototype.SJ=function(q){this.kb=q;this.eI=this.kb/90};p.prototype.Xt=function(q){this.Hn();if(q){this.Ab=q;if(this.te=q.Ocb&&q.te)this.te.bind(h.Ra,
this.IBa,this,!0),this.te.bind(h.ab,this.JBa,this,!0);this.Ab.bind(h.Ra,this.re,this,!0);this.Ab.bind(h.fb,this.cl,this,!0);this.Ab.bind(h.ab,this.dl,this,!0);this.Ab.bind(h.Rk,this.tH,this,!0);this.Ab.Vb().get("settings").get(TDV.PlayerSettings.zTa)!==!1&&this.Ab.bind(h.CK,this.MG,this,!0);this.Ab.bind(h.sB,this.Cwa,this,!0);this.Ab.bind(h.BK,this.Awa,this,!0);this.tka()}};p.prototype.Hn=function(){this.Ab!=null&&(this.te&&(this.te.h(h.Ra,this.IBa,this),this.te.h(h.ab,this.JBa,this),this.te=null),
this.Ab.h(h.Ra,this.re,this),this.Ab.h(h.fb,this.cl,this),this.Ab.h(h.ab,this.dl,this),this.Ab.h(h.Rk,this.tH,this),this.Ab.h(h.CK,this.MG,this),this.Ab.h(h.sB,this.Cwa,this),this.Ab.h(h.BK,this.Awa,this),this.Ab=null,this.Q_())};p.prototype.tka=function(){this.Ab&&(c.nr()?(this.p3=this.oEa,this.hR=this.X7a):(this.p3=this.sH,this.hR=this.$1a))};p.prototype.IBa=function(){this.AT=!0};p.prototype.JBa=function(){this.AT=!1};p.prototype.re=function(q){this.AT||(this.q7a(q),this.ija())};p.prototype.cl=
function(q){this.AT||this.CN(q)};p.prototype.dl=function(){this.AT||(this.Cda(),this.Q_())};p.prototype.tH=function(q){this.Dka(q);this.ija(500)};p.prototype.Cwa=function(){this.ija()};p.prototype.MG=function(q){this.Eka(q)};p.prototype.Awa=function(){this.Q_()};p.prototype.q7a=function(q){this.SR=!0;this.xq=q;this.CN(q)};p.prototype.CN=function(q){if(this.SR)switch(this.p3){case d.gF:this.u9a(q);break;case d.gx:this.t9a(q)}};p.prototype.u9a=function(q){var r=this.nFa,t=q.x-this.xq.x;t=+l(k(10,n(Math.abs(t)<
3?0:t,this.Ab.gb())),this.Hya*this.eI);q=q.y-this.xq.y;r.call(this,t,-l(k(10,n(Math.abs(q)<3?0:q,this.Ab.Kb())),this.Gya*this.eI))};p.prototype.t9a=function(q){this.ska(-l(n(q.x-this.xq.x,this.Ab.gb()),this.kb*this.nda),+l(n(q.y-this.xq.y,this.Ab.gb()),this.kb*this.nda));this.xq=q};p.prototype.Cda=function(){if(this.SR)switch(this.SR=!1,this.p3){case d.gF:this.nFa(0,0)}};p.prototype.nFa=function(q,r){var t=new f(p.kx);t.fB=q;t.EA=r;this.m(t)};p.prototype.ska=function(q,r){var t=new f(p.kx);t.TP=q;
t.iP=r;this.m(t)};p.prototype.Eka=function(q){if(this.Vc!=q.scale){this.Cda();var r=this.Vc;this.Vc=q.scale;q=new m(p.Cr);q.bna=this.kb*r/this.Vc-this.kb;this.m(q)}};p.prototype.Dka=function(q){if(q.delta!=0){this.Cda();var r=new m(p.Cr);r.bna=this.kb*-q.delta*this.VG/100;this.m(r)}};p.prototype.ija=function(q){var r=this.fL!=null;this.RDa();if(q&&(r||!this.Lq)){var t=this;this.fL=setTimeout(function(){t.fL=null;t.Q_()},q)}this.Lq||(this.Lq=!0,this.m(new e(p.ak)))};p.prototype.Q_=function(){this.RDa();
this.Lq&&(this.Lq=!1,this.m(new e(p.$j)))};p.prototype.RDa=function(){this.fL!=null&&(clearTimeout(this.fL),this.fL=null)};p.kx="rotation change";p.Cr="zoom change";p.ak="user interaction start";p.$j="user interaction end";return p});
define("tdv/player/view/panorama/control/camera/MovementManager",["require","tdv/player/view/util/Device"],function(a){function l(){this.fI=n.ub()?.066:.1;this.c2a=.5;this.b7a=n.ub()?.066:.1;this.$9a=.1;this.U3=this.a4=!1;this.reset()}function k(g,h,e){g=(h-g)*(1-e);Math.abs(g)<.01&&(g=0);return h-g}var n=a("tdv/player/view/util/Device");l.prototype.reset=function(){this.Eva=this.Ica=this.xL=this.dC=this.aR=this.Mca=this.Lca=this.Qca=this.SL=this.VG=this.j3=this.m3=this.Ks=this.zT=this.Lv=this.nV=
0};l.prototype.Tpa=function(g,h,e,b,c,d,f,m,p){return this.nV!=g||(this.zT=h)||this.m3!=e||b!=0||c!=0||this.U3!=f||this.$ya!=m||this.a4!=p?(this.nV=g,this.zT=h,this.m3=e,this.Lv+=b,this.Ks+=c,this.j3+=d,this.U3=f,this.$ya=m,this.a4=p,!0):!1};l.prototype.ojb=function(g,h){return this.VG!=g||h!=0?(this.VG=g,this.SL+=h,!0):!1};l.prototype.Rf=function(){return this.Qca!=0||this.Lca!=0||this.Mca!=0||this.aR!=0||this.nV!=0||this.zT!=0||this.m3!=0||this.VG!=0||this.Lv!=0||this.Ks!=0||this.SL!=0};l.prototype.Lb=
function(g){g=1E3/g;var h=this.Qca/g,e=this.nV/g+this.Lv;this.Lv=0;var b=this.Lca/g,c=this.zT/g+this.Ks;this.Ks=0;var d=this.Mca/g,f=this.m3/g+this.j3;this.j3=0;var m=this.VG+this.SL*g;this.SL=0;var p=e==0&&c==0&&f==0,q=h==0&&b==0&&d==0;this.U3&&q&&!p||this.a4&&p&&!q||this.$ya&&!p&&!q?(p=p?this.fI:q?this.b7a:this.c2a,this.dC=k(h,e,p),this.xL=k(b,c,p),this.Ica=k(d,f,p)):(this.dC=e,this.xL=c,this.Ica=f);h=this.aR==0;e=m==0;this.aR=this.U3&&h&&!e||this.a4&&e&&!h?k(this.aR,m,this.$9a):m;this.Qca=this.dC*
g;this.Lca=this.xL*g;this.Mca=this.Ica*g;this.Eva=this.aR/g};return l});
define("tdv/player/view/object3d/Renderer","require tdv/utils tdv/view/core/UIComponent tdv/player/view/panorama/control/camera/MouseManager tdv/player/view/panorama/control/camera/MovementManager tdv/view/util/Animation tdv/constants/EventName".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/view/core/UIComponent"),n=a("tdv/player/view/panorama/control/camera/MouseManager"),g=a("tdv/player/view/panorama/control/camera/MovementManager"),h=a("tdv/view/util/Animation"),e=a("tdv/constants/EventName");
a=l.extend(k,function(){k.call(this);this.df("Renderer");this.fa=document.createElement("canvas");this.fa.style.position="absolute";this.fa.style.left="0";this.fa.style.top="0";this.va().vk(this.fa);this.xC=null;this.Ga=this.VL=this.TL=this.UL=0;this.Zl=!1;this.X3a=150;this.JR=0;this.Lo=null;this.bind(e.Zb,this.kd,this,!0);this.Gb=new n;this.Gb.wnb(720);this.Gb.RX(0);this.Gb.GE("drag_rotation");this.Gb.SJ(360);this.Gb.bind(n.kx,this.i3a,this);this.Ac=new g});a.prototype.bib=function(b,c,d){this.xC=
b;this.UL=c;this.TL=d;this.VL=Math.floor(this.xC.length*this.Ga/360);this.ria();this.Gb.Xt(this);this.Sa()};a.prototype.oab=function(){this.xC=null;this.Cv();this.ria();this.Gb.Hn()};a.prototype.play=function(){this.Zl=!0;this.Sa()};a.prototype.i3a=function(b){this.Cv();this.Ac.Tpa(b.fB,b.EA,0,b.TP,b.iP,0,!1,!0);this.Sa()};a.prototype.Kga=function(){this.play()};a.prototype.iq=function(b){this.xC&&(this.Ac.Rf()?(this.Zl=!1,this.Ac.Lb(b),this.Yta(this.Ac.dC),this.Sa()):this.Zl?(this.Yta(this.X3a*b/
1E3),this.Sa()):this.ZL()||this.vU())};a.prototype.mj=function(b){for(this.Ga=b;this.Ga<0;)this.Ga+=360;for(;this.Ga>=360;)this.Ga-=360;this.T8a()};a.prototype.T8a=function(){if(this.xC){var b=Math.floor(this.xC.length*this.Ga/360);this.VL!=b&&(this.VL=b,this.gCa())}};a.prototype.Yta=function(b){this.mj(this.Ga+b)};a.prototype.kd=function(){this.ria()};a.prototype.ria=function(){var b=this.fa;if(this.UL==0||this.TL==0)b.width=0,b.height=0;else{var c=this.Uh(),d=this.Th();d*this.UL>c*this.TL?(b.width=
c,b.height=this.TL*c/this.UL):(b.height=d,b.width=this.UL*d/this.TL);b.style.left=Math.round((c-b.width)*.5)+"px";b.style.top=Math.round((d-b.height)*.5)+"px";this.gCa()}};a.prototype.gCa=function(){if(this.xC){var b=this.fa;b.getContext("2d").drawImage(this.xC[this.VL],0,0,this.UL,this.TL,0,0,b.width,b.height)}};a.prototype.ZL=function(){return this.Lo?!0:!1};a.prototype.vU=function(){this.Cv();if(this.JR>0){var b=this;this.Lo=setTimeout(function(){b.Lo=null;b.Kga()},this.JR)}};a.prototype.Cv=function(){this.Lo&&
(clearTimeout(this.Lo),this.Lo=null)};a.prototype.Sa=function(){h.requestFrame(this.iq,this)};return a});
define("tdv/player/script/Object3D","require tdv/constants/EventName tdv/constants/Priority tdv/events/Event tdv/player/parser/ClassInfo tdv/player/script/helper/LevelUtil tdv/player/view/ProgressBar tdv/player/view/object3d/Renderer tdv/view/containers/Container tdv/view/images/ImageLoader".split(" "),function(a){var l=a("tdv/constants/EventName"),k=a("tdv/constants/Priority"),n=a("tdv/events/Event"),g=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/helper/LevelUtil"),e=a("tdv/player/view/ProgressBar"),
b=a("tdv/player/view/object3d/Renderer"),c=a("tdv/view/containers/Container"),d=a("tdv/view/images/ImageLoader");a=g.define("Object3D",c,function(){c.call(this);this.Qd=this.To=this.bj=this.o=null;this.bind(l.od,this.Zo,this);this.bind(l.jd,this.Xo,this)});a.prototype.Ib=function(){c.prototype.Ib.call(this);this.o||(this.o=new b,this.o.wa({left:0,top:0,right:0,bottom:0}),this.mb(this.o));this.bj||(this.bj=new e,this.bj.wa({left:0,bottom:0,right:0,height:20,visible:!1}),this.mb(this.bj))};a.prototype.Zo=
function(){this.I1a()};a.prototype.Xo=function(){this.Dq()};a.prototype.I1a=function(){this.bj.set("percent",0);this.bj.set("visible",!0);this.o.mj(this.get("yaw"));var f=this.get("frames",[]);this.To=[];this.Qd=[];for(var m=0;m<f.length;m++){var p=h.yt(f[m]);this.To.push(p);p=new d(k.Mp);p.bind(l.ia,this.US,this);p.bind(l.ad,this.VS,this);this.Qd.push(p)}for(m=0;m<f.length;m++)this.Qd[m].load(this.To[m].get("url"))};a.prototype.US=function(){var f=this.Qd.filter(function(m){return m.kj()});this.bj.set("percent",
100*f.length/this.Qd.length);f.length==this.Qd.length&&this.Ke()};a.prototype.VS=function(){};a.prototype.Ke=function(){this.bj.set("visible",!1);var f=this.To[0].get("width",this.Qd[0].dg()),m=this.To[0].get("height",this.Qd[0].wg()),p=this.Qd.map(function(q){return q.xg()});this.o.bib(p,f,m);this.m(new n(l.ia))};a.prototype.Dq=function(){this.Qd&&(this.bj.set("visible",!1),this.o.oab(),this.Qd=this.Qd.forEach(function(f){f.h(l.ia,this.US,this);f.h(l.ad,this.VS,this);f.cancel()}),this.To=this.Qd=
null)};return a});define("tdv/player/script/RotationalCameraPosition",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("RotationalCameraPosition",l,function(k,n,g){l.call(this);k!==void 0&&this.set("yaw",k);n!==void 0&&this.set("pitch",n);g!==void 0&&this.set("hfov",g)})});
define("tdv/player/script/PanoramaCameraPosition",["require","tdv/player/script/RotationalCameraPosition","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/player/script/RotationalCameraPosition");return a("tdv/player/parser/ClassInfo").define("PanoramaCameraPosition",l,function(){l.apply(this,arguments)})});
define("tdv/player/script/PanoramaCamera",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo","tdv/player/script/PanoramaCameraPosition","tdv/player/script/RotationalCameraPosition"],function(a){var l=a("tdv/binding/Bindable"),k=a("tdv/player/parser/ClassInfo"),n=a("tdv/player/script/PanoramaCameraPosition"),g=a("tdv/player/script/RotationalCameraPosition"),h=k.define("RotationalCamera",l,function(){l.call(this);this.set("initialPosition",new g)});return k.define("PanoramaCamera",h,function(){h.call(this);
this.set("initialPosition",new n)})});define("tdv/player/script/RotationalCameraDisplayPosition",["require","tdv/player/script/RotationalCameraPosition","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/player/script/RotationalCameraPosition");return a("tdv/player/parser/ClassInfo").define("RotationalCameraDisplayPosition",l,function(){l.apply(this,arguments)})});
define("tdv/player/script/PanoramaCameraDisplayPosition",["require","tdv/player/script/RotationalCameraDisplayPosition","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/player/script/RotationalCameraDisplayPosition");return a("tdv/player/parser/ClassInfo").define("PanoramaCameraDisplayPosition",l,function(){l.apply(this,arguments)})});
define("tdv/player/script/PanoramaCameraMovement",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("PanoramaCameraMovement",l,function(){l.call(this)})});
define("tdv/player/script/RotationalCameraSequence",["require","tdv/binding/Bindable","tdv/events/Event","tdv/player/parser/ClassInfo","tdv/constants/EventName"],function(a){var l=a("tdv/binding/Bindable"),k=a("tdv/events/Event"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/constants/EventName");a=n.define("RotationalCameraSequence",l,function(){l.call(this)});a.prototype.play=a.prototype.play=function(){this.m(new k(g.tx))};a.prototype.pause=a.prototype.pause=function(){this.m(new k(g.MK))};return a});
define("tdv/player/script/PanoramaCameraSequence",["require","tdv/player/parser/ClassInfo","tdv/player/script/RotationalCameraSequence"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/RotationalCameraSequence");return l.define("PanoramaCameraSequence",k,function(){k.call(this)})});
define("tdv/player/script/PanoramaMapLocation",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("PanoramaMapLocation",l,function(){l.call(this)})});define("tdv/player/script/PanoramaModel3DLocation",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("PanoramaModel3DLocation",l,function(){l.call(this)})});
define("tdv/player/script/PanoramaOverlay",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("PanoramaOverlay",l,function(){l.call(this)})});
define("tdv/player/view/panorama/control/AudioController",["require","tdv/constants/PlaybackState","tdv/player/script/DirectionalPanoramaAudio","tdv/player/view/util/geo/Vector"],function(a){function l(h){this.o=h;this.Wr=[];this.Dea=!1;this.sb=this.Ga=0}var k=a("tdv/constants/PlaybackState"),n=a("tdv/player/script/DirectionalPanoramaAudio"),g=a("tdv/player/view/util/geo/Vector");l.prototype.clear=function(){this.stop();this.Wr=this.o=null};l.prototype.end=function(h){var e=[],b=[],c=this.pxa(h);
this.Wr.forEach(function(d){c.indexOf(d)<0?e.push(d):b.push(d)});e.forEach(function(d){d.ZI().Zc(k.ca)});this.Wr=b;this.Dea=!1};l.prototype.start=function(h){this.end(h);this.Wr=this.pxa(h);this.Dea=this.Wr.filter(function(e){return e instanceof n}).length>0;this.IEa();this.z3(k.PLAYING,!0)};l.prototype.play=function(){this.z3(k.PLAYING)};l.prototype.pause=function(){this.z3(k.Yb)};l.prototype.stop=function(){this.z3(k.ca)};l.prototype.xe=function(){this.Ga=this.o.Lc();this.sb=this.o.Jc();this.IEa()};
l.prototype.IEa=function(){if(this.Dea){var h=Math.PI/180,e=this.Ga*h,b=this.sb*h,c=new g(Math.sin(e)*Math.cos(b),Math.sin(b),Math.cos(e)*Math.cos(b));this.Wr.forEach(function(d){if(d instanceof n){var f=d.get("yaw",e)*h,m=d.get("pitch",b)*h,p=d.get("maximumAngle",360)*h;f=new g(Math.sin(f)*Math.cos(m),Math.sin(m),Math.cos(f)*Math.cos(m));p=Math.min(1,Math.max(0,1-Math.acos(c.TI(f))/p));d.ZI().TA(p)}}.bind(this))}};l.prototype.pxa=function(h){return h?h.get("audios",[]):[]};l.prototype.z3=function(h,
e){(e?this.Wr.slice().reverse():this.Wr).forEach(function(b){if(b.get("autoplay",!1)){b=b.ZI();var c=b.getState();h==k.PLAYING&&c!=k.PLAYING?b.Zc(k.PLAYING):h==k.Yb&&c==k.PLAYING?b.Zc(k.Yb):h==k.ca&&c!=k.ca&&b.Zc(k.ca)}})};return l});
define("tdv/player/view/util/geo/Transformation",["require"],function(){function a(c){c%=n;c<0&&(c+=n);return e[c*g|0]}function l(c){c%=n;c<0&&(c+=n);return h[c*g|0]}function k(){this.identity()}k.prototype.identity=function(){this.m11=1;this.m21=this.m13=this.m12=0;this.m22=1;this.m32=this.m31=this.m23=0;this.m33=1;this.tz=this.Hi=this.Gi=0};k.prototype.clone=function(){var c=new k;c.m11=this.m11;c.m12=this.m12;c.m13=this.m13;c.m21=this.m21;c.m22=this.m22;c.m23=this.m23;c.m31=this.m31;c.m32=this.m32;
c.m33=this.m33;c.Gi=this.Gi;c.Hi=this.Hi;c.tz=this.tz;return c};k.prototype.concat=function(c){var d=this.m11,f=this.m12,m=this.m13,p=this.m21,q=this.m22,r=this.m23,t=this.m31,u=this.m32,v=this.m33,w=this.Gi,y=this.Hi,x=this.tz;this.m11=d*c.m11+f*c.m21+m*c.m31;this.m12=d*c.m12+f*c.m22+m*c.m32;this.m13=d*c.m13+f*c.m23+m*c.m33;this.m21=p*c.m11+q*c.m21+r*c.m31;this.m22=p*c.m12+q*c.m22+r*c.m32;this.m23=p*c.m13+q*c.m23+r*c.m33;this.m31=t*c.m11+u*c.m21+v*c.m31;this.m32=t*c.m12+u*c.m22+v*c.m32;this.m33=
t*c.m13+u*c.m23+v*c.m33;this.Gi=w*c.m11+y*c.m21+x*c.m31+c.Gi;this.Hi=w*c.m12+y*c.m22+x*c.m32+c.Hi;this.tz=w*c.m13+y*c.m23+x*c.m33+c.tz};k.prototype.translate=function(c,d,f){this.Gi+=c;this.Hi+=d;this.tz+=f};k.prototype.scale=function(c,d,f){this.m11*=c;this.m12*=d;this.m13*=f;this.m21*=c;this.m22*=d;this.m23*=f;this.m31*=c;this.m32*=d;this.m33*=f;this.Gi*=c;this.Hi*=d;this.tz*=f};k.prototype.rotateX=function(c){var d=a(c);c=l(c);var f=this.m12*d+this.m13*c,m=this.m22*c-this.m23*d,p=this.m22*d+this.m23*
c,q=this.m32*c-this.m33*d,r=this.m32*d+this.m33*c,t=this.Hi*c-this.tz*d,u=this.Hi*d+this.tz*c;this.m12=this.m12*c-this.m13*d;this.m13=f;this.m22=m;this.m23=p;this.m32=q;this.m33=r;this.Hi=t;this.tz=u};k.prototype.rotateY=function(c){var d=a(c);c=l(c);var f=-this.m11*d+this.m13*c,m=this.m21*c+this.m23*d,p=-this.m21*d+this.m23*c,q=this.m31*c+this.m33*d,r=-this.m31*d+this.m33*c,t=this.Gi*c+this.tz*d,u=-this.Gi*d+this.tz*c;this.m11=this.m11*c+this.m13*d;this.m13=f;this.m21=m;this.m23=p;this.m31=q;this.m33=
r;this.Gi=t;this.tz=u};k.prototype.rotateZ=function(c){var d=a(c);c=l(c);var f=this.m11*d+this.m12*c,m=this.m21*c-this.m22*d,p=this.m21*d+this.m22*c,q=this.m31*c-this.m32*d,r=this.m31*d+this.m32*c,t=this.Gi*c-this.Hi*d,u=this.Gi*d+this.Hi*c;this.m11=this.m11*c-this.m12*d;this.m12=f;this.m21=m;this.m22=p;this.m31=q;this.m32=r;this.Gi=t;this.Hi=u};k.prototype.rotate=function(c,d,f){this.rotateX(c);this.rotateY(d);this.rotateZ(f)};k.prototype.invert=function(){var c=this.Acb();if(c==0)return!1;var d=
this.clone();this.m11=(d.m22*d.m33-d.m23*d.m32)/c;this.m12=(d.m13*d.m32-d.m12*d.m33)/c;this.m13=(d.m12*d.m23-d.m13*d.m22)/c;this.m21=(d.m23*d.m31-d.m21*d.m33)/c;this.m22=(d.m11*d.m33-d.m13*d.m31)/c;this.m23=(d.m13*d.m21-d.m11*d.m23)/c;this.m31=(d.m21*d.m32-d.m22*d.m31)/c;this.m32=(d.m12*d.m31-d.m11*d.m32)/c;this.m33=(d.m11*d.m22-d.m12*d.m21)/c;this.Gi=-(d.Gi*this.m11+d.Hi*this.m21+d.tz*this.m31);this.Hi=-(d.Gi*this.m12+d.Hi*this.m22+d.tz*this.m32);this.tz=-(d.Gi*this.m13+d.Hi*this.m23+d.tz*this.m33);
return!0};k.prototype.Acb=function(){return this.m11*(this.m22*this.m33-this.m23*this.m32)+this.m12*(this.m23*this.m31-this.m21*this.m33)+this.m13*(this.m21*this.m32-this.m22*this.m31)};k.prototype.UN=function(c){var d=c.x*this.m12+c.y*this.m22+c.z*this.m32+this.Hi,f=c.x*this.m13+c.y*this.m23+c.z*this.m33+this.tz;c.x=c.x*this.m11+c.y*this.m21+c.z*this.m31+this.Gi;c.y=d;c.z=f};for(var n=Math.PI*2,g=18E4/n,h=new Float32Array(180001),e=new Float32Array(180001),b=0;b<18E4;b++)h[b]=Math.cos(b/g),e[b]=
Math.sin(b/g);h[18E4]=h[0];e[18E4]=e[0];return k});define("tdv/player/view/panorama/renderer/constants/EyeLayer",["require"],function(){return{Ww:0,eb:1,Db:2}});
define("tdv/player/view/panorama/renderer/object/util/PanoramaFormat",["require","tdv/player/parser/ClassInfo","tdv/player/view/util/Capabilities"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/view/util/Capabilities"),n={get:function(g){return g.KUa||(g.KUa=this.tZa(g))},tZa:function(g){if(l.Qa("CubicPanoramaFrame",g))return g.get("stereoCube")?n.GB:g.get("cube")?n.nx:n.Km;if(l.Qa("SphericPanoramaFrame",g)){var h=g.get("stereoSphere"),e=g.get("sphere"),b=g.get("hfov");g=g.get("vfov");
var c=b>359.9&&g>179.9,d=!1;h&&!e?d=!0:h?e&&!h.get("levels").some(k.sQa)?d=!1:c&&k.Y$a()?d=!0:!c&&k.X$a()&&(d=!0):d=!1;return d?(h=h.get("levels"),e=Math.max.apply(Math,h.map(function(f){return f.get("width")})),Math.max.apply(Math,h.map(function(f){return f.get("height")}))/g/(e/b)>1?n.Rr:n.zu):n.Ir}},GB:"stereoCube_12_1",nx:"monoCube_6_1",Km:"monoCube_1_1",Ir:"monoSphere_1_1",Rr:"stereoSphere_1_2",zu:"stereoSphere_2_1"};return n});
define("tdv/player/view/panorama/renderer/object/util/LevelUtil","require tdv/player/parser/ClassInfo tdv/player/script/ImageResourceLevel tdv/player/view/panorama/renderer/constants/EyeLayer tdv/player/view/panorama/renderer/constants/Face tdv/player/view/panorama/renderer/object/util/PanoramaFormat tdv/view/util/Scale tdv/player/view/util/Capabilities tdv/player/view/util/Device tdv/player/view/util/FileType tdv/player/view/util/URL tdv/view/constants/ScaleMode tdv/view/images/ImageLoader tdv/view/av/VideoPlayer".split(" "),
function(a){function l(K,M,T){return K.split(M).join(T).split(encodeURI(M)).join(T)}function k(K,M){return K.indexOf(M)>=0||K.indexOf(encodeURI(M))>=0}function n(){var K=D.pA()&&E.Rg("recent_ipad_use_max_res",!1);n=function(){return K};return K}function g(K){if(K.length==0)return 1;K.sort(function(M,T){return T.get("width")-M.get("width")});return K[0].get("width")/K[0].get("height")}function h(K,M){var T=1E4;n()||(D.gf()?T=2048:D.pA()?T=1280:D.ub()&&(T=1024));switch(K){case z.nx:return[6*T,T];case z.Km:return[T,
T];case z.GB:return[12*T,T]}switch(K){case z.Rr:M*=2;break;case z.zu:M*=.5}return M>2?[T*4,T*4/M]:[T*2*M,T*2]}function e(K){if(n())return[void 0,void 0];switch(K){case z.nx:if(D.gf()||D.ub())return[18432,1536];break;case z.Rr:if(D.gf())return[5352,5352];if(D.ub())return[6086,6086];break;case z.Ir:if(D.gf())return[7168,3584];if(D.ub()&&D.pA())return[8192,4096]}return[void 0,void 0]}function b(K,M){var T=e(M);M=K.filter(function(S){return v.Qa("TiledImageResourceLevel",S)?!0:T[0]!==void 0&&S.get("width")>
T[0]||T[1]!==void 0&&S.get("height")>T[1]?!1:!0});M.length==0&&(M=[d(K)[0]]);return M}function c(){return D.pA()?[w.Usa]:D.d7()||D.e7()?D.Dc()==D.mu||D.Dc()==D.jB?[w.zZ,w.Jaa]:[w.Jaa,w.zZ]:D.gf()?[w.zZ]:D.ub()?[w.yZ]:[]}function d(K){K.sort(function(M,T){return M.get("width")-T.get("width")});return K}function f(K,M){function T(S){return Math.abs(S.get("width")*S.get("height")-M[0]*M[1])}K.sort(function(S,W){return T(S)-T(W)});return K.length&&K[0]||null}function m(K,M,T){K=K.filter(function(S){return S.get("tags").indexOf(M)<
0});return K.length?K:T!==void 0?T:[]}function p(K,M,T){K=K.filter(function(S){return S.get("tags").indexOf(M)>=0});return K.length?K:T!==void 0?T:[]}function q(K,M,T){switch(T){case z.GB:case z.nx:case z.Km:return K;case z.Ir:case z.zu:return K*M.get("hfov",180)/90;case z.Rr:return K*M.get("hfov",180)*2/90}}function r(K,M){switch(M){case z.GB:return K.get("stereoCube").get("levels");case z.nx:return K.get("cube").get("levels");case z.Km:return K.get("front").get("levels");case z.Ir:return K.get("sphere").get("levels");
case z.Rr:case z.zu:return K.get("stereoSphere").get("levels")}}function t(K,M){var T=r(K,M),S=K.get("minFaceSize");if(S){var W=q(S,K,M);K=T.filter(function(X){return X.get("height")>=W});K.length>0&&(T=K)}return T}function u(K){for(var M=[],T=0;T<K.length;T++){var S=K[T];M.indexOf(S)<0&&M.push(S)}return M}var v=a("tdv/player/parser/ClassInfo"),w=a("tdv/player/script/ImageResourceLevel"),y=a("tdv/player/view/panorama/renderer/constants/EyeLayer"),x=a("tdv/player/view/panorama/renderer/constants/Face"),
z=a("tdv/player/view/panorama/renderer/object/util/PanoramaFormat"),A=a("tdv/view/util/Scale");a("tdv/player/view/util/Capabilities");var D=a("tdv/player/view/util/Device");a("tdv/player/view/util/FileType");var E=a("tdv/player/view/util/URL"),B=a("tdv/view/constants/ScaleMode"),C=a("tdv/view/images/ImageLoader"),F=a("tdv/view/av/VideoPlayer"),G={tJa:function(K){K=K.get("frames");if(K.length==0)return 1;var M=K[0];K=z.get(M)==z.Ir&&M.Ln()?(K=F.Ak(M.get("sphere")))?[K]:[]:z.get(M)!=z.Rr&&z.get(M)!=
z.zu||!M.Ln()?G.Oma(M,!1):(K=F.Ak(M.get("stereoSphere")))?[K]:[];return Math.max.apply(Math,K.map(function(T){return G.edb(M,T)}).concat([1]))},edb:function(K,M){M=G.Dma(K,M,x.FRONT);M=M.get("width");var T=K.QD().get("hfov",360);switch(z.get(K)){case z.GB:return M/1080;case z.nx:return M/540;case z.Km:return M/90;case z.Ir:return M/T;case z.Rr:return M/T;case z.zu:return M/(2*T)}},ona:function(K,M){K=G.op(K,M);return K.length<=6&&K.every(function(T){return C.C9(T)})},Qoa:function(K,M){return G.op(K,
M).every(function(T){return C.C9(T)})},op:function(K,M,T){if(!K)return[];T||(T=!1);if(v.Qa("Panorama",K))return T=K.get("flipImageHorizontally",!1),u([].concat(Array.prototype.concat.apply([],K.get("frames").map(function(V){return G.op(V,M,T)})),Array.prototype.concat.apply([],K.get("overlays").map(function(V){return G.op(V,M,T)}))));if(v.Qa("PanoramaFrame",K)){var S=Array.prototype.concat.apply([],K.get("overlays").map(function(V){return G.op(V,M,T)}));if(z.get(K)==z.Ir&&K.Ln())return G.op(F.Ak(K.get("sphere")),
M).concat(S);if((z.get(K)==z.Rr||z.get(K)==z.zu)&&K.Ln())return G.op(F.Ak(K.get("stereoSphere")),M).concat(S);var W=G.Oma(K,M)[0];T=K.get("flipImageHorizontally",!1);if(z.get(K)==z.Km){var X=[x.FRONT,x.eb,x.BACK,x.Db,x.Tc,x.Fc];return Array.prototype.concat.apply([],X.map(function(V){return(V=G.Dma(K,W,V))?G.op(V,M,T):[]})).concat(S)}return G.op(W,M,T).concat(S)}if(v.Qa("Video360ResourceLevel",K))return(S=K.get("posterURL"))?[S]:[];if(v.Qa("HotspotPanoramaOverlay",K))return K.get("projected")?Array.prototype.concat.apply([],
K.get("items").map(function(V){return G.op(V,M,T)})):[];if(v.Qa("FlatHotspotPanoramaOverlayImage",K)||v.Qa("HotspotPanoramaOverlayImage",K))return S=K.get("image").get("levels"),W=S[0],G.op(W,M,T),Array.prototype.concat.apply([],S.map(function(V){return G.op(V,M,T)}));if(v.Qa("TiledImageResourceLevel",K)){var Z=[];S=Math.round(K.get("width")/K.get("height"));if(S==1)var ca=z.Km;else if(S==12)ca=z.dmb;else if(S==6)ca=z.nx;else return[];var ea=S==12?[y.Db,y.eb]:[y.Ww];X=[x.Db,x.eb,x.Tc,x.Fc,x.FRONT,
x.BACK];var Y=K.get("colCount",S)/S,U=K.get("rowCount",1);ea.forEach(function(V){X.forEach(function(aa){for(var ba=0;ba<U;ba++)for(var da=0;da<Y;da++)Z.push(G.QJa(K,ca,V,aa,T,U,ba,da))})});return Z}return v.Qa("ImageResourceLevel",K)?[K.get("url")]:[]},Oma:function(K,M){var T=z.get(K),S=this.f_a(K);if(S)return M&&!this.bya(S)&&(K=this.wxa(K),K!=S)?[K,S]:[S];S=p(t(K,T),w.Kaa);if(S.length>0)return d(S);S=this.U_a(K);return M&&!this.bya(S)&&(K=this.wxa(K),K!=S)?[K,S]:[S]},Peb:function(K){return K.get("tags").indexOf(w.Kaa)>=
0},Dma:function(K,M,T){if(z.get(K)!=z.Km)return M;switch(T){case x.FRONT:var S=K.get("front");break;case x.eb:S=K.get("left");break;case x.BACK:S=K.get("back");break;case x.Db:S=K.get("right");break;case x.Tc:S=K.get("top");break;case x.Fc:S=K.get("bottom")}K=S&&S.get("levels")||[];if(K.length==0)return null;K=K.filter(function(W){return W.get("width")==M.get("width")&&W.get("height")==M.get("height")&&W.get("grayscale",!1)==M.get("grayscale",!1)&&W.get("colCount",1)==M.get("colCount",1)&&W.get("rowCount",
1)==M.get("rowCount",1)});return K[0]},QJa:function(K,M,T,S,W,X,Z,ca){K=K.get("url");var ea=0;k(K,"{eye}")?K=l(K,"{eye}",R[T]):ea+=6*(W?P:N)[T];k(K,"{face}")?K=l(K,"{face}",Q[S]):M!=z.Km&&(ea+=I[S]);K=l(K,"{row}",Z);return K=l(K,"{column}",ca+ea*X)},gdb:function(K,M){return G.xR(G.OG(K.get("image")),90,90,B.oj,M)},wcb:function(K,M){return G.xR(G.OG(K.get("image")),K.get("hfov"),K.get("vfov"),K.get("scaleMode"),M)},Ncb:function(K,M){return G.xR(G.OG(K.get("image")),K.get("hfov"),K.get("vfov"),K.get("scaleMode"),
M)},ydb:function(K,M){return G.xR(G.OG(K.get("image")),K.get("hfov"),K.get("vfov"),K.get("scaleMode"),M)},fJa:function(K,M){return G.xR(G.OG(K.get("image")),K.get("hfov"),K.get("vfov"),K.get("scaleMode"),M)},OG:function(K){return K&&K.get("levels")||[]},xR:function(K,M,T,S,W){if(!K||!K.length)return null;K=m(K,w.Cu,K);for(var X=c(),Z=0;Z<X.length;Z++)K=p(K,X[Z],K);X=1E4;n()||(D.gf()?X=2048:D.pA()?X=1280:D.ub()&&(X=1024));Z=d(K)[K.length-1];M=A.Tma(M,T,Z.get("width"),Z.get("height"),S,W);return f(K,
[M.Ud*X/90,M.Nk*X/90])},Fcb:function(K){var M=G.OG(K.get("image"));if(!M||!M.length)return null;M=m(M,w.Cu,M);for(var T=c(),S=0;S<T.length;S++)M=p(M,T[S],M);T=d(M)[M.length-1];K=A.m6(K.get("width"),K.get("height"),T.get("width"),T.get("height"),K.get("scaleMode"));return f(M,[K.width,K.height])},jdb:function(K){var M=G.OG(K.get("image"));if(!M||!M.length)return null;M=m(M,w.Cu,M);for(var T=c(),S=0;S<T.length;S++)M=p(M,T[S],M);T=1E4;n()||(D.gf()?T=2048:D.pA()?T=1280:D.ub()&&(T=1024));var W=S=20;(K=
K.get("vertices"))&&K.length==4&&(S=K[0].get("yaw"),W=K[1].get("yaw"),W<S&&(W+=360),S=W-S,W=K[0].get("pitch"),K=K[3].get("pitch"),W-=K);return f(M,[S*T/90,W*T/90])},wxa:function(K){var M=z.get(K);K=t(K,M);K=b(K,M);K=p(K,w.Cu,K);M=c();for(var T=0;T<M.length;T++)K=p(K,M[T],K);return f(K,[0,0])},U_a:function(K){var M=z.get(K);K=t(K,M);K=b(K,M);K=m(K,w.Cu,K);for(var T=c(),S=0;S<T.length;S++)K=p(K,T[S],K);M=h(M,g(K));return f(K,M)},f_a:function(K){var M=c();if(M.length==0)return null;var T=z.get(K),S=
t(K,T);S=b(S,T);S=m(S,w.Cu,S);K=[];for(var W=0;W<M.length&&K.length==0;W++)K=p(S,M[W]);if(K.length==0)return null;M=h(T,g(K));return f(K,M)},bya:function(K){return K.get("tags").indexOf(w.Kaa)>=0?!1:D.Dc()==D.kB?!0:C.C9(K.get("url"))}},I=function(){var K={};K[x.Db]=0;K[x.eb]=1;K[x.Tc]=2;K[x.Fc]=3;K[x.FRONT]=4;K[x.BACK]=5;return K}(),N=function(){var K={};K[y.Db]=0;K[y.eb]=1;K[y.Ww]=0;return K}(),P=function(){var K={};K[y.Db]=1;K[y.eb]=0;K[y.Ww]=0;return K}(),Q=function(){var K={};K[x.Db]="r";K[x.eb]=
"l";K[x.Tc]="u";K[x.Fc]="d";K[x.FRONT]="f";K[x.BACK]="b";return K}(),R=function(){var K={};K[y.eb]="l";K[y.Db]="r";K[y.Ww]="b";return K}();return G});
define("tdv/player/view/panorama/control/camera/LimitsManager","require tdv/utils tdv/constants/EventName tdv/player/view/util/geo/Fov tdv/player/view/util/geo/Transformation tdv/player/view/util/geo/Vector tdv/player/view/panorama/renderer/object/util/LevelUtil".split(" "),function(a){function l(p){this.o=p;this.Pd=!1;this.ip=l.TF;this.Rda=this.aH=!1;this.Sf(null);this.o.bind(n.Zb,this.kd,this,!0);this.kd()}var k=a("tdv/utils"),n=a("tdv/constants/EventName"),g=a("tdv/player/view/util/geo/Fov"),h=
a("tdv/player/view/util/geo/Transformation"),e=a("tdv/player/view/util/geo/Vector"),b=a("tdv/player/view/panorama/renderer/object/util/LevelUtil");l.prototype.mKa=function(){return this.ip!==l.TF};l.prototype.lKa=function(){return this.ip&l.VK?!0:!1};l.prototype.nKa=function(){return this.ip&l.WK?!0:!1};l.prototype.oKa=function(){return this.ip&l.WF?!0:!1};l.prototype.kKa=function(){return this.ip&l.SF?!0:!1};l.prototype.OA=function(p){this.aH=p};l.prototype.Lc=function(){this.mp();return this.Ga};
l.prototype.Jc=function(){this.mp();return this.sb};l.prototype.Jg=function(){this.mp();return this.Hd};l.prototype.hA=function(){this.mp();return this.kb};l.prototype.Sf=function(p){p?(this.lha=p.get("hfov",360),this.v2=p.get("vfov",180),this.uT=p.get("pitch",0),this.GH=p.get("partial",!1),this.Gea=p.qKa(),this.Bea=p.gKa(),this.Lea=Math.min(p.get("hfovMax",170),170),this.GR=p.get("hfovMin"),this.bga=b.tJa(p)):(this.lha=360,this.v2=180,this.uT=0,this.Bea=this.Gea=this.GH=!1,this.Lea=120,this.bga=
this.GR=1);this.Ga=0;this.sb=this.uT;this.Hd=0;this.Pd=!0};l.prototype.setPosition=function(p,q,r,t,u){this.Ga=p;this.sb=q;this.Hd=r;this.kb=t;this.Rda=u;this.Pd=!0};l.prototype.kd=function(){var p=this.o.gb(),q=this.o.Kb();if(this.Pa!=p||this.Ha!=q)this.Pa=p,this.Ha=q,this.Pd=!0};l.prototype.mp=function(){if(this.Pd){this.Pd=!1;var p=this.Ga*f,q=this.sb*f,r=this.kb*f,t=(this.Rda?g.rr(this.Lea,this.Pa,this.Ha):this.Lea)*f;a:{var u=this.GR;if(k.qA(u)&&(u=u.match(/^\s*([+-]?\d+\.?\d*)\s*%\s*$/))&&u.length>=
2){u=parseFloat(u[1]);break a}u=void 0}u=u!==void 0?2*Math.atan2(this.Pa*this.o.getPixelRatio()*.5,this.bga*45*u/100):this.GR?(this.Rda?g.rr(this.GR,this.Pa,this.Ha):this.GR)*f:2*Math.atan2(this.Pa*this.o.getPixelRatio()*.5,this.bga*45);u=Math.min(t,u);if(this.aH){var v=360;var w=180;var y=0}else if(this.Gea||this.Bea){v=this.Bea?90:this.uT+this.v2*.5;var x=this.Gea?-90:this.uT-this.v2*.5;w=v-x;y=(v+x)*.5;v=this.lha}else v=this.lha,y=this.uT,w=this.v2;v*=f;w*=f;y*=f;for(x=this.Pa/this.Ha;p<-c;)p+=
2*c;for(;p>c;)p-=2*c;r=Math.max(Math.min(r,t),u);t=l.TF;if(!this.aH){q>d?t|=l.WF:q<-d&&(t|=l.SF);q=Math.max(Math.min(q,c*.5),-c*.5);var z=2*Math.atan(Math.tan(r*.5)/x);if(z>=w)r=2*Math.atan(Math.tan(w*.5)*x),q=y,t|=l.WF|l.SF;else{var A=Math.min(w*.5+y,c*.5);w=Math.max(-w*.5+y,-c*.5);y=!this.GH&&A>=.99*c*.5?c*.5:A-z*.5;w=!this.GH&&w<=.99*-c*.5?-c*.5:w+z*.5;q>y?(q=y,t|=l.WF):q<w&&(q=w,t|=l.SF)}this.GH&&(w=Math.tan(r*.5),x=w/x,x=new e(-w,q>0?x:-x,1),w=new h,w.rotateX(-q),x.apply(w),x=x.Lc()*2,x<0&&(x+=
2*c),w=Math.max(0,v*.5-x*.5-.25*f),z=Math.min(0,-v*.5+x*.5+.25*f),x>v?(p=0,r=Math.max(u,r*v/x),t|=l.VK|l.WK):p>w?(p=w,t|=l.WK):p<z&&(p=z,t|=l.VK))}this.Ga=p*m;this.sb=q*m;this.kb=r*m;this.ip=t}};var c=Math.PI,d=Math.PI*.5,f=Math.PI/180,m=180/Math.PI;l.TF=0;l.VK=1;l.WK=2;l.WF=4;l.SF=8;return l});
define("tdv/player/view/panorama/control/camera/HoverMouseManager",["require","tdv/utils","tdv/constants/EventName","tdv/events/EventDispatcher","tdv/player/view/panorama/control/events/RotationChangeEvent"],function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/events/EventDispatcher"),g=a("tdv/player/view/panorama/control/events/RotationChangeEvent"),h=l.extend(n,function(){n.call(this);this.SR=!1;this.xq=void 0;this.kb=90;this.Hda=.1;this.zc=this.Ab=null});h.prototype.setCamera=
function(e){this.zc&&this.zc.h(k.N("hoverFactor"),this.aka,this);if(this.zc=e)this.zc.bind(k.N("hoverFactor"),this.aka,this),this.aka()};h.prototype.aka=function(){this.Hda=this.zc.get("hoverFactor")};h.prototype.SJ=function(e){this.kb=e};h.prototype.Xt=function(e){this.Hn();e&&(this.Ab=e,this.xq=void 0,this.Ab.bind(k.fb,this.cl,this,!0))};h.prototype.Hn=function(){this.Ab!=null&&(this.Ab.h(k.fb,this.cl,this),this.Ab=null)};h.prototype.cl=function(e){this.CN(e)};h.prototype.CN=function(e){this.xq&&
this.ska.call(this,+(this.kb*this.Hda*Math.min(Math.max((e.x-this.xq.x)/this.Ab.gb(),-1),1)),-(this.kb*this.Hda*Math.min(Math.max((e.y-this.xq.y)/this.Ab.gb(),-1),1)));this.xq=e};h.prototype.ska=function(e,b){if(e!=0||b!=0){var c=new g(h.kx);c.TP=e;c.iP=b;this.m(c)}};h.kx="rotation change";return h});
define("tdv/player/view/panorama/control/camera/HoverCameraController","require tdv/utils tdv/events/Event tdv/events/EventDispatcher tdv/player/view/panorama/control/camera/MovementManager tdv/player/view/panorama/control/camera/HoverMouseManager".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=a("tdv/player/view/panorama/control/camera/MovementManager"),h=a("tdv/player/view/panorama/control/camera/HoverMouseManager"),e=l.extend(n,function(b,
c,d){n.call(this);this.o=b;this.ld=this.o.ld;this.ua=c;this.Bc=d;this.$C=this.IZ=this.ha=!1;this.Ac=new g;this.tk=null;this.Hd=this.sb=this.Ga=0;this.kb=90;this.Gb=new h;this.Gb.bind(h.kx,this.YS,this,!0)});e.prototype.clear=function(){this.Gb.h(h.kx,this.YS,this,!0);this.Gb.Hn();this.Gb=null;this.tG();this.o=this.ld=this.Bc=this.ua=this.Ac=null};e.prototype.setCamera=function(b){this.Ac.reset();this.Gb.setCamera(b)};e.prototype.setPosition=function(b,c,d,f){if(this.Ga!=b||this.sb!=c||this.Hd!=d||
this.kb!=f)this.Ga=b,this.sb=c,this.Hd=d,this.kb=f,this.Gb.SJ(this.kb),this.Fia(!1),this.xU()};e.prototype.Rf=function(){return this.IZ&&this.$C?!0:!1};e.prototype.Lb=function(b){this.eV=!1;this.Ac.Lb(b);this.$C=!1;b=this.Ga+this.Ac.dC;var c=this.sb+this.Ac.xL;this.Bc.hr(this.kb);this.ua.setPosition(b,c,this.Hd,this.Bc.ff(),this.Bc.bw());this.Ga=this.ua.Lc();this.sb=this.ua.Jc();this.Hd=this.ua.Jg();this.kb=this.ua.hA()};e.prototype.wt=function(){return this.Ga};e.prototype.vt=function(){return this.sb};
e.prototype.OD=function(){return this.Hd};e.prototype.$I=function(){return this.kb};e.prototype.Ua=function(b){this.ha!=b&&((this.ha=b)?this.xU():(this.tG(),this.Fia(!1)))};e.prototype.YS=function(b){this.md(b.fB,b.EA,0,0,b.TP,b.iP,0,0,!1,!1,!0,!0)};e.prototype.md=function(b,c,d,f,m,p,q,r,t,u,v,w){var y=this.Ac.Tpa(b,c,d,m,p,q,u,v,w)||y;y&&this.dj()};e.prototype.dj=function(){this.$C=!0;this.m(new k(e.Ki))};e.prototype.xU=function(){this.tG();this.tk=setTimeout(this.nT.bind(this),30)};e.prototype.tG=
function(){this.tk&&(clearTimeout(this.tk),this.tk=null)};e.prototype.nT=function(){this.Fia(this.ha)};e.prototype.Fia=function(b){this.IZ!=b&&((this.IZ=b)?(this.Ac.reset(),this.Gb.Xt(this.o.getParent()),this.dj()):this.Gb.Hn())};e.Ki="position change request";return e});
define("tdv/player/view/panorama/control/camera/GyroscopeManager","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Device tdv/player/view/util/Gyroscope".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher");a("tdv/player/view/util/Device");var h=a("tdv/player/view/util/Gyroscope");a=l.extend(g,function(){g.call(this);this.FFa=this.ha=!1;this.Hd=this.sb=this.Ga=
0;this.h3=!1;this.Ks=this.Lv=0});a.prototype.Ua=function(e){if(this.ha!=e)if(this.ha=e){h.bind(this.KS,this,!0);e=h.zt();var b=e.pitch;this.Lv=this.Ga-e.yaw;this.Ks=this.sb-b;this.An()}else h.h(this.KS,this,!0)};a.prototype.setPosition=function(e,b,c){this.Ga!=e&&(this.Lv=this.XH(this.Lv+(e-this.XH(this.Ga,e)),0),this.Ga=e);this.sb!=b&&(this.Ks+=b-this.sb,this.sb=b);this.Hd=c};a.prototype.wt=function(){return this.Ga};a.prototype.vt=function(){return this.sb};a.prototype.OD=function(){return this.Hd};
a.prototype.Rf=function(){return h.jgb()};a.prototype.Lb=function(e){var b=h.zt(),c=b.roll;e=20*e/1E3;var d=b.pitch+(this.FFa?this.Ks:0);this.Ga=this.Zg(this.Ga,this.XH(this.XH(b.yaw,this.Ga)+this.Lv,this.Ga),e);this.sb=this.Zg(this.sb,d,e);this.Hd=this.Zg(this.Hd,c,e)};a.prototype.mjb=function(e){this.FFa=e};a.prototype.Zg=function(e,b,c){e=(b-e)*(1-c);Math.abs(e)<.01&&(e=0);return b-e};a.prototype.XH=function(e,b){for(;e+180<b;)e+=360;for(;e-180>b;)e-=360;return e};a.prototype.KS=function(){this.ha&&
this.An()};a.prototype.An=function(){this.m(new n(k.V))};return a});define("tdv/player/view/panorama/control/constants/Movement",["require"],function(){return{IK:"left",JK:"right",HK:"down",KK:"up",Osa:"rotate10x",ota:"zoom2x",PLAYING:"playing",Bx:"zoomIn",Cx:"zoomOut",Dg:"stop"}});
define("tdv/player/view/panorama/control/camera/KeyboardManager","require tdv/utils tdv/constants/Key tdv/events/Event tdv/events/EventDispatcher tdv/player/view/panorama/control/constants/Movement tdv/view/util/KeyboardControl".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/Key"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),h=a("tdv/player/view/panorama/control/constants/Movement"),e=a("tdv/view/util/KeyboardControl"),b=l.extend(g,function(d){g.call(this);this.o=d;this.ha=
!1;this.pg={};this.tU=null;this.sk=this.sU=!1;this.L0=this.L0.bind(this);this.$m=this.$m.bind(this);this.ld=this.o.ld;document.addEventListener("keydown",this.L0);document.addEventListener("keyup",this.$m)});b.prototype.clear=function(){this.ha=!1;this.ld=this.o=null;document.removeEventListener("keydown",this.L0);document.removeEventListener("keyup",this.$m)};b.prototype.Ua=function(d){this.ha!=d&&(this.ha=d)&&this.A4()};var c=[k.bk,k.Ji,k.eb,k.Db,k.Fp,k.so,k.oo,k.Kp,k.rZ,k.nZ];b.prototype.L0=function(d){if(!e.rp()){var f=
d.which,m=!1;!this.pg[f]&&c.indexOf(f)>=0&&(this.tU||this.sU||(this.tU=setTimeout(this.m3a.bind(this),100)),m=this.pg[f]=!0);this.sk!=d.shiftKey&&(this.sk=d.shiftKey,m=!0);m&&this.A4()}};b.prototype.m3a=function(){this.sU=!0;this.A4()};b.prototype.$m=function(d){if(!e.rp()){var f=d.which,m=!1;if(f in this.pg){delete this.pg[f];m=!1;for(f in this.pg)this.pg[f]&&(m=!0);m||(this.tU&&clearTimeout(this.tU),this.tU=null,this.sU=!1);m=!0}this.sk!=d.shiftKey&&(this.sk=d.shiftKey,m=!0);m&&this.A4()}};b.prototype.A4=
function(){if(this.ha){var d=this.ld.get("gazeModeEnabled"),f=this.ld.get("arrowKeysAction");if(d||f!="none"){d=d||f=="rotate";f=[];this.pg[k.rZ]?f.push(h.Bx):this.pg[k.nZ]&&f.push(h.Cx);this.sU&&(this.pg[k.rZ]||this.pg[k.nZ])&&f.push(h.ota);this.pg[k.eb]||this.pg[k.Fp]?f.push(h.IK):(this.pg[k.Db]||this.pg[k.Kp])&&f.push(h.JK);if(d||this.sk)this.pg[k.bk]||this.pg[k.so]?f.push(h.KK):(this.pg[k.Ji]||this.pg[k.oo])&&f.push(h.HK);this.sU&&(this.pg[k.eb]||this.pg[k.Db]||this.pg[k.bk]||this.pg[k.Ji]||this.pg[k.Fp]||
this.pg[k.Kp]||this.pg[k.so]||this.pg[k.oo])&&f.push(h.Osa);f.length==0&&f.push(h.Dg);this.m(new n(b.Q$,{TLa:f}))}}};b.Q$="movementsChange";return b});
define("tdv/player/view/panorama/control/camera/TargetManager",["require"],function(){function a(){this.YF=!0;this.reset()}function l(k,n,g){k=(n-k)*(1-g);Math.abs(k)<.01&&(k=0);return n-k}a.prototype.reset=function(){this.YF&&(this.YF=!1,this.g4=this.h4=this.vz=this.kp=this.yL=this.BL=this.zL=this.hC=void 0)};a.prototype.moveTo=function(k,n,g,h,e){this.kp=k;this.vz=n;this.h4=g;this.g4=h;this.$ea=e;this.YF=!0};a.prototype.setPosition=function(k,n,g,h){this.hC=k;this.zL=n;this.BL=g;this.yL=h};a.prototype.wt=
function(){return this.hC};a.prototype.vt=function(){return this.zL};a.prototype.OD=function(){return this.BL};a.prototype.$I=function(){return this.yL};a.prototype.Rf=function(){return this.YF};a.prototype.Lb=function(){if(this.YF)if(this.$ea)this.hC=this.kp,this.zL=this.vz,this.BL=this.h4,this.yL=this.g4,this.YF=!1;else{for(var k=this.hC,n=this.kp-180,g=this.kp+180;k<n;)k+=g-n;for(;k>g;)k-=g-n;this.hC=k;this.hC=l(this.hC,this.kp,.5);this.zL=l(this.zL,this.vz,.5);this.BL=l(this.BL,this.h4,.5);this.yL=
l(this.yL,this.g4,.5);this.hC==this.kp&&this.zL==this.vz&&this.BL==this.h4&&this.yL==this.g4&&(this.YF=!1)}};return a});
define("tdv/player/view/panorama/control/camera/VRPoseManager",["require","tdv/player/view/util/geo/Quaternion","tdv/player/view/util/URL","tdv/player/view/util/XR"],function(a){function l(b){this.o=b;this.ha=!1;this.Hd=this.sb=this.Ga=0;this.m0=void 0}var k=a("tdv/player/view/util/geo/Quaternion"),n=a("tdv/player/view/util/URL"),g=a("tdv/player/view/util/XR");l.prototype.Ua=function(b){this.ha!=b&&(this.ha=b,this.m0=void 0)};l.prototype.setPosition=function(b,c,d){if(this.ha&&this.m0!==void 0){for(var f=
b-this.m0;f>180;)f-=360;for(;f<-180;)f+=360;(f<-1E-4||f>1E-4)&&g.vP(b)}this.Ga=b;this.sb=c;this.Hd=d};l.prototype.wt=function(){return this.Ga};l.prototype.vt=function(){return this.sb};l.prototype.OD=function(){return this.Hd};l.prototype.Rf=function(){return!0};l.prototype.Lb=function(){if(g.zg&&!this.o.e3){g.vP();var b=k.G9(g.ug,!0);this.m0=this.Ga=b.$a;this.sb=b.pitch;this.Hd=b.kh;this.sb=e===void 0?b.pitch:e;this.Hd=h===void 0?b.kh:h;g.setScale(1)}};var h=n.Ck("debug")?n.n6("force_vr_roll"):
void 0,e=n.Ck("debug")?n.n6("force_vr_pitch"):void 0;return l});
define("tdv/player/view/panorama/control/camera/ManualCameraController","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/constants/RotationMode tdv/player/view/panorama/control/camera/GyroscopeManager tdv/player/view/panorama/control/camera/KeyboardManager tdv/player/view/panorama/control/camera/MovementManager tdv/player/view/panorama/control/camera/MouseManager tdv/player/view/panorama/control/camera/TargetManager tdv/player/view/panorama/control/camera/VRPoseManager tdv/player/view/panorama/control/constants/Movement tdv/player/view/util/geo/Quaternion tdv/player/view/util/XR tdv/view/constants/Cursor".split(" "),function(a){var l=
a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),h=a("tdv/player/constants/RotationMode"),e=a("tdv/player/view/panorama/control/camera/GyroscopeManager"),b=a("tdv/player/view/panorama/control/camera/KeyboardManager"),c=a("tdv/player/view/panorama/control/camera/MovementManager"),d=a("tdv/player/view/panorama/control/camera/MouseManager"),f=a("tdv/player/view/panorama/control/camera/TargetManager"),m=a("tdv/player/view/panorama/control/camera/VRPoseManager"),
p=a("tdv/player/view/panorama/control/constants/Movement");a("tdv/player/view/util/geo/Quaternion");var q=a("tdv/player/view/util/XR"),r=a("tdv/view/constants/Cursor"),t=l.extend(g,function(u,v,w){g.call(this);this.o=u;this.ld=this.o.ld;this.ua=v;this.Bc=w;this.$C=this.rC=this.BR=this.X2=this.ha=!1;this.Ac=new c;this.Xs=new f;this.Hd=this.sb=this.Ga=0;this.kb=90;this.eI=1;this.Si=void 0;this.Jba=this.CQ=5;this.eV=!1;this.Gb=new d;this.Gb.bind(d.kx,this.YS,this,!0);this.Gb.bind(d.Cr,this.NC,this,!0);
this.Gb.bind(d.ak,this.Es,this,!0);this.Gb.bind(d.$j,this.Ds,this,!0);this.Xm=new e;this.Xm.bind(k.V,this.Oza,this);this.qC=!1;this.Qo=new b(this.o);this.Qo.bind(b.Q$,this.Yza,this,!0);this.Kv=new m(this.o);q.M.bind(k.V,this.nq,this,!0);this.nq()});t.prototype.clear=function(){this.Gb.h(d.kx,this.YS,this,!0);this.Gb.h(d.Cr,this.NC,this,!0);this.Gb.h(d.ak,this.Es,this,!0);this.Gb.h(d.$j,this.Ds,this,!0);this.Gb.Hn();this.Gb=null;this.Xm.h(k.V,this.Oza,this);this.Xm=null;this.Qo.h(b.Q$,this.Yza,this,
!0);this.Qo.clear();this.Qo=null;q.M.h(k.V,this.nq,this,!0);this.Bc=this.ua=this.Ac=null;this.j_();this.o=this.ld=null};t.prototype.setCamera=function(u){this.Ac.reset();this.Xs.reset();this.Gb.setCamera(u);this.CQ=u.get("automaticRotationSpeed");this.Jba=u.get("automaticZoomSpeed")};t.prototype.wl=function(u){Array.isArray(u)||(u=[u]);var v=0,w=0,y=0,x=!1;u.includes(p.Dg)||(u.includes(p.IK)?v=-this.CQ:u.includes(p.JK)&&(v=+this.CQ),u.includes(p.HK)?w=-this.CQ:u.includes(p.KK)&&(w=+this.CQ),u.includes(p.Bx)?
y=-this.Jba:u.includes(p.Cx)&&(y=+this.Jba),u.includes(p.PLAYING)&&(x=!0),u.includes(p.ota)&&(y*=2),u.includes(p.Osa)&&(v*=10,w*=10),v*=this.eI,w*=this.eI);this.md(v,w,0,y,0,0,0,0,x,!0,!0,!0)};t.prototype.setPosition=function(u,v,w,y){this.Ga=u;this.sb=v;this.Hd=w;this.kb=y;this.eI=this.kb/90;this.Xm.setPosition(this.Ga,this.sb,this.Hd);this.Kv.setPosition(this.Ga,this.sb,this.Hd);this.Gb.SJ(this.kb);this.Xs.setPosition(this.Ga,this.sb,this.Hd,this.kb)};t.prototype.moveTo=function(u,v,w,y,x){this.Xs.moveTo(u,
v,w,this.Bc.OIa(y),x);this.X2=!1;this.Ac.reset();this.dj()};t.prototype.Upa=function(u,v,w){this.md(0,0,0,0,u,v,w,0,!1,!1,!1)};t.prototype.Rf=function(){return this.ha&&(this.$C||this.uRa())?!0:!1};t.prototype.tab=function(){this.$C=this.eV=!1};t.prototype.uRa=function(){return this.ha?this.eV?!0:this.Kv.ha?this.Kv.Rf()||this.Ac.Rf():this.Xm.ha?this.qC?!0:this.Xm.Rf()||this.Ac.Rf():this.Ac.Rf()||this.Xs.Rf():!1};t.prototype.Lb=function(u){this.eV=!1;this.Ac.Lb(u);this.$C=!1;var v=this.kb;if(this.Kv.ha){this.Kv.Lb(u);
u=this.Kv.wt()+this.Ac.dC+this.t0a();var w=this.Kv.vt();var y=this.Kv.OD()}else this.Xs.Rf()?(this.Xs.Lb(u),u=this.Xs.wt(),w=this.Xs.vt(),y=this.Xs.OD(),v=this.Xs.$I()):(this.Xm.ha?(this.qC=!1,this.Xm.Lb(u),u=this.Xm.wt()+this.Ac.dC,w=this.Xm.vt(),this.BR&&(w+=this.Ac.xL),y=this.Xm.OD()):(u=this.Ga+this.Ac.dC,w=this.sb+this.Ac.xL,y=0),v+=this.Ac.Eva);this.Bc.hr(v);this.ua.setPosition(u,w,y,this.Bc.ff(),this.Bc.bw());this.Ga=this.ua.Lc();this.sb=this.ua.Jc();this.Hd=this.ua.Jg();this.kb=this.ua.hA();
if(this.X2&&this.ua.mKa()){v=this.Ac.nV;if(this.ua.lKa()||this.ua.nKa())v=-v;u=this.Ac.zT;if(this.ua.oKa()||this.ua.kKa())u=-u;this.md(v,u,0,0,0,0,0,0,!0,!1,!1,!0)}};t.prototype.wt=function(){return this.Ga};t.prototype.vt=function(){return this.sb};t.prototype.OD=function(){return this.Hd};t.prototype.$I=function(){return this.kb};t.prototype.Ua=function(u){this.ha!=u&&((this.ha=u)?(this.jD(this.Gb.sH==h.gx?r.tB:void 0),this.Gb.Xt(this.o.getParent()),this.dj()):(this.j_(),this.Gb.Hn()),this.lka())};
t.prototype.TX=function(u){this.rC!=u&&(this.rC=u,this.lka(),this.qC=!0)};t.prototype.EE=function(u){this.Qo.Ua(u)};t.prototype.lka=function(){var u=this.o.Dt();this.Xm.Ua(this.ha&&this.rC&&!u);this.Kv.Ua(this.ha&&u)};t.prototype.Oza=function(){this.dj()};t.prototype.UX=function(u){this.BR=u;this.Xm.mjb(this.BR)};t.prototype.GE=function(u){this.Gb.GE(u);this.jD(this.Gb.sH==h.gx?r.tB:void 0)};t.prototype.ZJ=function(u){this.Gb.ZJ(u)};t.prototype.nq=function(){this.ha&&(this.o.Dt()&&q.vP(this.Ga),this.lka(),
this.dj())};t.prototype.YS=function(u){var v=!this.Kv.ha&&(!this.Xm.ha||this.BR);if(this.Gb.sH==h.gF){var w=void 0;if(u.fB!=0||u.EA!=0){var y=Math.sqrt(u.EA*u.EA+u.fB*u.fB)>25,x=Math.atan2(u.EA,u.fB)*180/Math.PI;x>=-22.5&&x<22.5?w=y?r.isa:r.hsa:x>=22.5&&x<67.5?w=y?r.ksa:r.rsa:x>=67.5&&x<112.5?w=y?r.jsa:r.qsa:x>=112.5&&x<157.5?w=y?r.lsa:r.ssa:x>=157.5||x<-157.5?w=y?r.psa:r.wsa:x>=-157.5&&x<-112.5?w=y?r.osa:r.vsa:x>=-112.5&&x<-67.5?w=y?r.msa:r.tsa:x>=-67.5&&x<-22.5&&(w=y?r.nsa:r.usa)}this.jD(w);this.md(u.fB,
u.EA,0,0,u.TP,u.iP,0,0,!1,!1,!1,v)}else this.md(u.fB,u.EA,0,0,u.TP,u.iP,0,0,!1,!1,v,v)};t.prototype.NC=function(u){this.md(0,0,0,u.ieb,0,0,0,u.bna,!1,!0,!1,!0)};t.prototype.md=function(u,v,w,y,x,z,A,D,E,B,C,F){var G=!1;this.ld.get("rotationEnabled")&&(G=this.Ac.Tpa(u,v,w,x,z,A,B,C,F)||G);this.ld.get("zoomEnabled")&&(G=this.Ac.ojb(y,D)||G);G&&(this.Xs.reset(),this.X2=E,this.dj())};t.prototype.t0a=function(){if(!this.o.Dt())return 0;this.T2=this.T2||0;for(var u=0,v=0;v<q.nd.length&&u==0;v++)u=q.nd[v].Pz?
0:q.nd[v].Qb.x;v=this.o.R.get("vrThumbstickRotationStep");v=u>0&&this.T2<=0?v:u<0&&this.T2>=0?-v:0;this.T2=u;return v};t.prototype.dj=function(){this.$C=!0;this.m(new n(t.Ki))};t.prototype.Es=function(){this.eV=!0;this.m(new n(t.ak));this.Gb.sH==h.gx&&this.jD(r.Li)};t.prototype.Ds=function(){this.m(new n(t.$j));this.Gb.sH==h.gx&&this.jD(r.tB)};t.prototype.Yza=function(u){this.wl(u.data.TLa);u.data.TLa.indexOf(p.Dg)<0&&this.o.Vb().m(new n(k.PF,{EP:u}))};t.prototype.jD=function(u){this.Si!=u&&this.ha&&
(this.Si&&this.o.mP(this.Si),(this.Si=u)&&this.o.x8(this.Si))};t.prototype.j_=function(){this.Si&&(this.o.mP(this.Si),this.Si=void 0)};t.Ki="position change request";t.ak="user interaction start";t.$j="user interaction end";return t});define("tdv/player/script/TargetRotationalCameraMovement",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("TargetRotationalCameraMovement",l,function(){l.call(this)})});
define("tdv/player/view/panorama/control/camera/SequenceCameraController","require tdv/utils tdv/constants/EventName tdv/constants/PlaybackState tdv/events/Event tdv/events/EventDispatcher tdv/player/parser/ClassInfo tdv/player/script/DistanceRotationalCameraMovement tdv/player/script/TargetRotationalCameraMovement tdv/view/util/Ease tdv/view/util/EaseDimension".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/events/Event"),h=
a("tdv/events/EventDispatcher"),e=a("tdv/player/parser/ClassInfo");a("tdv/player/script/DistanceRotationalCameraMovement");a("tdv/player/script/TargetRotationalCameraMovement");var b=a("tdv/view/util/Ease"),c=a("tdv/view/util/EaseDimension"),d=l.extend(h,function(f,m,p){h.call(this);this.o=f;this.ua=m;this.Bc=p;this.YM=this.Xb=null;this.qn=this.XC=!1;this.IH=void 0;this.oM=[];this.oia=0;this.ka=null;this.sb=this.Ga=0;this.kb=90});d.prototype.clear=function(){this.end();this.ua=this.o=null};d.prototype.start=
function(f){this.x6a(f);this.N3a();this.qn=!1;this.Xua();this.XC=!1;this.dj();this.ll()};d.prototype.end=function(){this.Xb!=null&&(this.bva(),this.XC=this.qn=!1,this.ka=null,this.ll())};d.prototype.rgb=function(){this.Xb&&this.Xb.get("restartMovementOnUserInteraction")?this.XC||(this.ZDa(),this.nja(),this.ka=null,this.XC=!0,this.ll()):(this.ka=null,this.pause())};d.prototype.vgb=function(){this.XC&&(this.XC=!1,this.mya()||this.l7a())};d.prototype.x6a=function(f){this.bva();this.Xb=f;this.Xb.bind(k.tx,
this.cBa,this,!0);this.Xb.bind(k.MK,this.bBa,this,!0);this.Xb.bind(k.N("movementIndex"),this.V1,this,!0);this.oM=this.Xb.get("movements",[])};d.prototype.bva=function(){this.nja();this.Xb!=null&&(this.Xb.h(k.tx,this.cBa,this),this.Xb.h(k.MK,this.bBa,this),this.Xb.h(k.N("movementIndex"),this.V1,this),this.Xb.set("movementIndex",-1),this.Xb=null,this.oM=[])};d.prototype.pl=function(){return this.Xb?this.qn?n.Yb:n.PLAYING:n.ca};d.prototype.setPosition=function(f,m,p,q){this.Ga=f;this.sb=m;this.kb=q};
d.prototype.Rf=function(){return!this.Xb||!this.ka||this.qn||this.XC||this.mya()?!1:!0};d.prototype.Lb=function(f){if(this.Rf()){this.ka.Lb(f);f=this.ka.nb("hfov");if(this.ap!=this.Bc.ap){this.ap=this.Bc.ap;var m=this.ka.jW("hfov");m.from=this.Bc.KV(m.from);m.to=this.Bc.KV(m.to);f=this.Bc.KV(f)}this.ua.setPosition(this.ka.nb("yaw"),this.ka.nb("pitch"),0,f,this.Bc.bw());this.Ga=this.ua.Lc();this.sb=this.ua.Jc();this.kb=this.ua.hA();this.ka.Re()&&this.R2a()}};d.prototype.wt=function(){return this.Ga};
d.prototype.vt=function(){return this.sb};d.prototype.$I=function(){return this.kb};d.prototype.play=function(){this.qn&&(this.qn=!1,this.ka||this.V1(),this.Xua(),this.dj(),this.ll())};d.prototype.pause=function(){this.qn||(this.qn=!0,this.ZDa(),this.ll())};d.prototype.cBa=function(){this.play()};d.prototype.bBa=function(){this.pause()};d.prototype.N3a=function(){this.oia=0;var f=this.Xb.get("movementIndex",-1);f==-1&&(f=0);this.K2(f)};d.prototype.P3a=function(){this.oia++;var f=this.Xb.get("repeat",
1);this.oM.length>0&&(f==0||this.oia<f)?this.K2(0):(this.Xb.m(new g(k.Sb)),this.end(),this.n8a())};d.prototype.O3a=function(){this.K2(this.Xb.get("movementIndex",0)+1)};d.prototype.K2=function(f){f<this.oM.length?this.Xb.get("movementIndex")!=f?this.Xb.set("movementIndex",f):this.V1():(this.Xb.m(new g(k.Or)),this.P3a())};d.prototype.V1=function(){var f=this.Xb.get("movementIndex");this.ka=f>=0?this.XQ(this.oM[f]):null};d.prototype.R2a=function(){this.oM[this.Xb.get("movementIndex")].m(new g(k.Sb));
this.O3a()};d.prototype.mya=function(){return this.YM!=null};d.prototype.l7a=function(){this.nja();var f=this,m=this.Xb.get("restartMovementDelay")||0;this.YM=setTimeout(function(){f.YM=null;f.h3a()},m);this.ll()};d.prototype.nja=function(){this.YM&&(clearTimeout(this.YM),this.YM=null)};d.prototype.h3a=function(){this.K2(this.Xb.get("movementIndex"));this.dj();this.ll()};d.prototype.XQ=function(f){var m,p=this.VH(this.Ga,-180,180),q=this.sb,r=this.kb;if(e.Qa("TargetRotationalCameraMovement",f)){var t=
f.get("targetYaw",p);var u=f.get("targetPitch",q);(m=f.get("targetHfov"))?(this.Bc.ePa(m),m=this.Bc.ff()):m=r;this.ua.setPosition(t,u,0,m,this.Bc.bw());if(this.ua.GH)t=this.ua.Lc();else switch(this.jZa(f)){case "left":t=this.VH(t,p-360,p);break;case "right":t=this.VH(t,p,p+360);break;case "longest":t=this.VH(t,p-180,p+180);t=t>=p?this.VH(t,p-360,p):this.VH(t,p,p+360);break;default:t=this.VH(t,p-180,p+180)}}else e.Qa("DistanceRotationalCameraMovement",f)&&(t=p+f.get("yawDelta",0),this.ua.GH&&(t=Math.min(Math.max(-180,
t),180)),u=q+f.get("pitchDelta",0),m=r+f.get("hfovDelta",0),this.ua.setPosition(t,u,0,m,this.Bc.bw()),this.ua.GH&&(t=this.ua.Lc()));u=this.ua.Jc();m=this.ua.hA();this.ap=this.Bc.ap;return new b(f.get("easing"),[new c("yaw",p,t,f.get("yawSpeed")),new c("pitch",q,u,f.get("pitchSpeed")),new c("hfov",r,m,f.get("hfovSpeed"))],f.get("duration"))};d.prototype.Xua=function(){this.IH=void 0};d.prototype.ZDa=function(){if(this.ka){this.IH=void 0;var f=this.ka&&this.ka.jW("yaw");f&&(f.to>f.from?this.IH="right":
f.to<f.from&&(this.IH="left"))}};d.prototype.jZa=function(f){f=f.get("path");f=="longest"&&this.IH&&(f=this.IH);this.IH=void 0;return f};d.prototype.VH=function(f,m,p){for(;f<m;)f+=p-m;for(;f>p;)f-=p-m;return f};d.prototype.dj=function(){this.m(new g(d.Ki))};d.prototype.n8a=function(){this.m(new g(d.caa))};d.prototype.ll=function(){this.m(new g(d.gd))};d.Ki="position change request";d.caa="sequence end";d.gd="playback state change";return d});
define("tdv/player/view/panorama/control/camera/Controller","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/panorama/control/camera/LimitsManager tdv/player/view/panorama/control/camera/HoverCameraController tdv/player/view/panorama/control/camera/ManualCameraController tdv/player/view/panorama/control/camera/SequenceCameraController tdv/player/view/panorama/control/constants/Movement tdv/player/view/util/XR tdv/constants/PlaybackState".split(" "),
function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),h=a("tdv/player/view/panorama/control/camera/LimitsManager"),e=a("tdv/player/view/panorama/control/camera/HoverCameraController"),b=a("tdv/player/view/panorama/control/camera/ManualCameraController"),c=a("tdv/player/view/panorama/control/camera/SequenceCameraController"),d=a("tdv/player/view/panorama/control/constants/Movement"),f=a("tdv/player/view/util/XR"),m=a("tdv/constants/PlaybackState"),
p=l.extend(g,function(q,r){g.call(this);this.o=q;this.o.bind(k.Zb,this.kd,this);f.M.bind(k.V,this.nq,this,!0);this.Bc=r;this.tia=!1;this.kb=this.Hd=this.sb=this.Ga=void 0;this.Nv=this.Mv=this.zS=this.CS=this.BS=this.AS=!1;this.jp=!0;this.SL=this.Ks=0;this.ha=!1;this.Lo=null;this.JR=5E3;this.LR=this.Xea=null;this.Dia=[];this.Hj=this.NB=m.ca;this.ua=new h(q);this.qc=new b(this.o,this.ua,this.Bc);this.qc.bind(b.Ki,this.As,this,!0);this.qc.bind(b.ak,this.Es,this,!0);this.qc.bind(b.$j,this.Ds,this,!0);
this.Ko=new e(this.o,this.ua,this.Bc);this.Ko.bind(e.Ki,this.As,this,!0);this.Nf=new c(this.o,this.ua,this.Bc);this.Nf.bind(c.Ki,this.As,this,!0);this.Nf.bind(c.caa,this.hv,this,!0);this.Nf.bind(c.gd,this.dBa,this,!0)});p.prototype.clear=function(){this.Cv();this.qc.h(b.Ki,this.As,this);this.qc.h(b.ak,this.Es,this,!0);this.qc.h(b.$j,this.Ds,this,!0);this.qc.clear();this.qc=null;this.Ko.h(e.Ki,this.As,this,!0);this.Ko.clear();this.Ko=null;this.Nf.h(c.Ki,this.As,this);this.Nf.h(c.caa,this.hv,this);
this.Nf.h(c.gd,this.dBa,this);this.Nf.clear();this.ua=this.Nf=null;this.o.h(k.Zb,this.kd,this);f.M.h(k.V,this.nq,this,!0);this.o=null;this.zc&&(this.zc.h(k.N("sequences"),this.Vga,this,!0),this.zc=null);this.H3([])};p.prototype.end=function(){this.NB=m.ca;this.Cv();this.qc.Ua(!1);this.Ko.Ua(!1);this.Nf.end();this.ha=!1;this.nz(0,0,0);this.LR=this.Xea=null;this.zc&&(this.zc.h(k.N("sequences"),this.Vga,this,!0),this.zc=null);this.H3([]);this.qI()};p.prototype.start=function(q,r){this.NB=m.PLAYING;this.ha=
!0;this.nz(0,0,0);this.fU(q);this.D5a(r);this.fCa();this.V3(this.LR);this.Ko.Ua(!0);this.qI()};p.prototype.pl=function(){return this.Hj};p.prototype.play=function(q){this.NB=m.PLAYING;this.Nf.pl()==m.Yb?this.Nf.play():this.Nf.pl()==m.ca&&(!q&&this.LR?this.V3(this.LR):this.ZL()||this.vU());this.qI()};p.prototype.resume=function(){this.NB==m.Yb&&(this.qc.tab(),this.play(!0))};p.prototype.pause=function(){this.qc.wl(d.Dg);this.NB==m.PLAYING&&(this.NB=m.Yb,this.Nf.pl()==m.PLAYING?(this.Nf.pause(),this.qI()):
this.ZL()&&this.Cv())};p.prototype.stop=function(){this.NB=m.ca;this.Nf.pl()!=m.ca&&this.Nf.end();this.qc.wl(d.Dg);this.qI();this.ZL()&&this.Cv()};p.prototype.moveTo=function(q,r,t,u,v){this.qc.moveTo(q,r,t,u,v)};p.prototype.H3=function(q){this.Dia.forEach(function(r){r.h(k.tx,this.LCa,this,!0)}.bind(this));this.Dia=q;this.Dia.forEach(function(r){r.bind(k.tx,this.LCa,this,!0)}.bind(this))};p.prototype.nq=function(){this.ua.OA(this.o.Dt())};p.prototype.wl=function(q){this.qc.wl(q)};p.prototype.Upa=
function(q,r,t){this.qc.Upa(q,r,t)};p.prototype.TX=function(q){this.rC!=q&&(this.rC=q,this.qc.TX(this.rC),this.Sa())};p.prototype.UX=function(q){this.qc.UX(q)};p.prototype.GE=function(q){this.qc.GE(q)};p.prototype.ZJ=function(q){this.qc.ZJ(q)};p.prototype.EE=function(q){this.qc.EE(q)};p.prototype.JA=function(q){this.ha&&(this.qc.Rf()||this.o.Dt()||this.rC&&(this.qc.ha||!this.qc.BR)?(this.qc.uRa()&&this.Nf.rgb(),this.qc.Lb(q),this.un(this.qc.wt(),this.qc.vt(),this.qc.OD(),this.qc.$I()),this.Sa()):
this.Nf.XC?(this.Nf.vgb(),this.Sa()):this.Nf.Rf()?(this.Nf.Lb(q),this.un(this.Nf.wt(),this.Nf.vt(),0,this.Nf.$I()),this.Sa()):this.Ko.Rf()?(this.Ko.Lb(q),this.un(this.Ko.wt(),this.Ko.vt(),0,this.Ko.$I()),this.Sa()):this.tia?(this.tia=!1,this.Bc.hr(this.o.ff()),this.ua.setPosition(this.o.Lc(),this.o.Jc(),this.o.Jg(),this.Bc.ff(),this.Bc.bw()),this.un(this.ua.Lc(),this.ua.Jc(),this.ua.Jg(),this.ua.hA()),this.Sa()):(this.nz(0,0,0),this.NB==m.PLAYING&&this.Nf.pl()!=m.PLAYING&&(this.ZL()||this.vU())))};
p.prototype.xe=function(){this.k9a();this.fCa()};p.prototype.k9a=function(){var q=this.o.Lc()-this.Ga||0,r=this.o.Jc()-this.sb||0;this.o.Jg();this.nz(q,r,this.o.ff()-this.kb||0)};p.prototype.fCa=function(){this.Ga=this.o.Lc();this.sb=this.o.Jc();this.Hd=this.o.Jg();this.kb=this.o.ff();this.qc.setPosition(this.Ga,this.sb,this.Hd,this.kb);this.Nf.setPosition(this.Ga,this.sb,this.Hd,this.kb);this.Ko.setPosition(this.Ga,this.sb,this.Hd,this.kb)};p.prototype.fU=function(q){this.ua.Sf(q)};p.prototype.D5a=
function(q){this.zc=q;this.JR=q.get("timeToIdle",5E3);this.Xea=q.get("idleSequence");this.LR=q.get("initialSequence");this.qc.setCamera(q);this.Ko.setCamera(q);q.bind(k.N("sequences"),this.Vga,this,!0);this.H3(q.get("sequences",[]))};p.prototype.Vga=function(){this.H3(this.zc.get("sequences",[]))};p.prototype.LCa=function(q){this.V3(q.source)};p.prototype.As=function(){this.Cv();this.Sa()};p.prototype.Es=function(){this.m(new n(p.ak))};p.prototype.Ds=function(){this.m(new n(p.$j))};p.prototype.V3=
function(q){q?(this.qc.Ua(!q.get("mandatory",!1)),this.Nf.start(q)):this.hv()};p.prototype.hv=function(){this.qc.Ua(!0);this.vU()};p.prototype.dBa=function(){this.qI()};p.prototype.kd=function(){this.tia=!0;this.Sa()};p.prototype.ZL=function(){return this.Lo!=null};p.prototype.vU=function(){this.Cv();var q=this;this.Lo=setTimeout(function(){q.Lo=null;q.Kga()},this.JR)};p.prototype.Cv=function(){this.Lo&&(clearTimeout(this.Lo),this.Lo=null)};p.prototype.Kga=function(){this.V3(this.Xea)};p.prototype.Sa=
function(){this.m(new n(p.oc))};p.prototype.un=function(q,r,t,u){this.o.setPosition(q,r,t,u)};p.prototype.nz=function(q,r,t){var u=!1,v=Math.abs(q)<.001&&Math.abs(r)<.001&&Math.abs(t)<.001;v||this.rC?(u=this.jp!=1,this.Nv=this.Mv=this.zS=this.CS=this.BS=this.AS=!1,this.jp=!0):(this.AS!=q<-.001&&(this.AS=!this.AS,u=!0),this.BS!=q>.001&&(this.BS=!this.BS,u=!0),this.zS!=r<-.001&&(this.zS=!this.zS,u=!0),this.CS!=r>.001&&(this.CS=!this.CS,u=!0),this.Mv!=t<-.001&&(this.Mv=!this.Mv,u=!0),this.Nv!=t>.001&&
(this.Nv=!this.Nv,u=!0),this.jp!=v&&(this.jp=!this.jp,u=!0));v||this.m(new n(p.Ar,{yaw:this.Ga,pitch:this.sb,roll:this.Hd,hfov:this.kb}));u&&((this.ha||this.jp)&&this.m(new n(p.Bl,{movingLeft:this.AS,movingRight:this.BS,movingUp:this.CS,movingDown:this.zS,zoomingIn:this.Mv,zoomingOut:this.Nv,stopped:this.jp})),this.qI())};p.prototype.qI=function(){if(this.ha){var q=this.Nf.pl();this.jp||(q=m.PLAYING)}else q=m.ca;this.Hj!=q&&(this.Hj=q,this.m(new n(p.gd,{state:this.Hj})))};p.oc="request frame";p.Bl=
"movement change";p.Ar="position change";p.gd="playback state change";p.ak="user interaction start";p.$j="user interaction end";return p});
define("tdv/player/view/panorama/control/transition/PositionController","require tdv/constants/EventName tdv/player/view/panorama/control/camera/LimitsManager tdv/player/view/util/Device tdv/player/view/util/Gyroscope tdv/player/view/util/URL tdv/player/view/util/XR tdv/player/view/util/geo/Quaternion".split(" "),function(a){function l(d,f,m){this.o=d;this.Bc=f;this.ap=this.Bc.ap;this.$s=m;this.ua=new k(d);m.Eh&&this.ua.Sf(m.Eh);this.kz=new k(d);this.eja=this.BC=this.CC=void 0;this.Ga=this.o.Lc();
this.sb=this.o.Jc();this.Hd=this.o.Jg();this.kb=this.$s.Eh?this.o.ff():this.Bc.bw()?this.Bc.KV(l.p$):l.p$;this.QDa=0;this.Aa=null;this.wya=!0}a("tdv/constants/EventName");var k=a("tdv/player/view/panorama/control/camera/LimitsManager");a("tdv/player/view/util/Device");var n=a("tdv/player/view/util/Gyroscope"),g=a("tdv/player/view/util/URL"),h=a("tdv/player/view/util/XR"),e=a("tdv/player/view/util/geo/Quaternion");new THREE.Euler;l.prototype.Sf=function(d,f,m){if(this.Aa!=d)if(this.VC=!0,this.Aa=d,
this.o.Dt()){this.eja=this.Ga;for(d=this.eja-f;d>180;)d-=360;for(;d<-180;)d+=360;h.vP(f)}else this.Spa(f,m)};l.prototype.Spa=function(d,f){this.Ga=d;this.sb=f};l.prototype.RI=function(d){this.Bc.ePa(d);return this.Bc.ff()};l.prototype.hr=function(d){this.kb=d};l.prototype.YX=function(d){this.wya=d};l.prototype.YJ=function(d){this.QDa=d};l.prototype.JA=function(){this.ap!=this.Bc.ap&&(this.ap=this.Bc.ap,this.kb=this.Bc.KV(this.kb));if(this.$s.ob()){var d=e.G9(h.ug,!0);this.Ga=d.$a;this.sb=c===void 0?
d.pitch:c;this.Hd=b===void 0?d.kh:b;this.CC=this.Ga;this.BC=this.sb}else if(this.$s.dKa()){d=n.zt();var f=this.XH(d.yaw,this.Ga);this.Ga+=this.CC===void 0?0:f-this.CC;this.sb+=this.BC===void 0?0:d.pitch-this.BC;this.Hd=d.roll;this.CC=d.yaw;this.BC=d.pitch}else d=this.XH(this.o.Lc(),this.Ga),f=this.o.Jc(),this.Ga+=this.CC===void 0?0:d-this.CC,this.sb+=this.BC===void 0?0:f-this.BC,this.Hd=this.o.Jg();this.VC&&this.ua.Sf(this.Aa);this.ua.OA(this.$s.ob());this.ua.setPosition(this.Ga,this.sb,this.Hd,this.kb,
this.Bc.bw());if(this.VC)if(this.VC=!1,this.$s.ob())(d=this.$s.Eh&&this.o.cg(this.$s.Eh))&&d.set("deltaYaw",this.eja-this.ua.Lc());else if(d=this.$s.Eh&&this.o.cg(this.$s.Eh))d.set("deltaYaw",this.o.Lc()-this.ua.Lc()),d.set("deltaPitch",this.o.Jc()-this.ua.Jc()),d.set("deltaRoll",this.o.Jg()-this.ua.Jg());this.Ga=this.ua.Lc();this.sb=this.ua.Jc();this.Hd=this.ua.Jg();this.$s.ob()||this.$s.dKa()||(this.CC=this.Ga,this.BC=this.sb);this.kb=this.wya?this.ua.hA():this.kb;this.o.setPosition(this.Ga,this.sb,
this.Hd,this.kb);this.o.YJ(this.QDa)};l.prototype.F8=function(d,f){this.kz.Sf(d);this.kz.setPosition(0,0,0,f,this.Bc.bw());return this.kz.hA()};l.prototype.shb=function(d,f){this.kz.Sf(d);this.kz.setPosition(f.$a,f.pitch,f.kh,f.Ud,this.Bc.bw());f.$a=this.kz.Lc();f.pitch=this.kz.Jc();f.kh=this.kz.Jg();f.Ud=this.kz.hA()};l.prototype.XH=function(d,f){for(;d+180<f;)d+=360;for(;d-180>f;)d-=360;return d};l.prototype.THa=function(){return l.p$};l.p$=TDV.Jsa.gSa;var b=g.Ck("debug")?g.n6("force_vr_roll"):
void 0,c=g.Ck("debug")?g.n6("force_vr_pitch"):void 0;return l});
define("tdv/player/view/panorama/control/transition/TransitionData",["require","tdv/player/script/RotationalCameraPosition","tdv/player/script/RotationalCameraDisplayPosition","tdv/player/view/util/Device","tdv/player/view/util/FileType"],function(a){function l(b,c,d,f,m){this.o=b;this.Wh=c;b=this.o.R;this.wY=b.get("transitionMode","blending");c=b.get("transitionDuration",500);this.I0a(d,f)&&(this.wY=l.hZ,c=1500);this.rla=b.get("blendingTransitionDuration",c);this.bcb=b.get("firstTransitionDuration",
c);this.YHa=b.get("disolveTransitionDuration",c);this.LQa=b.get("translationTransitionDuration",1E3);b.get("translationTransitionSpeed");this.MQa=b.get("translationTransitionEnabled",!0);this.$Ma=b.get("originTransitionDuration",3E3);this.E6=400;this.Z9=1E3;this.rfb=b.get("modelToPanoramaTraslationDuration",1500);this.ngb=b.get("panoramaToModelTraslationDuration",1E3);this.Eh=d;this.ujb=!d||d.sna();this.vjb=!d||d.LKa();this.$c=f;this.kQa=!f||f.sna();this.uqa=!f||f.LKa();this.Sjb=!!f&&this.xfa(f);
c=(this.dK=m)&&m.get("initialPosition")||new k;this.zh=new k;this.zh.set("yaw",c.get("yaw",0));this.zh.set("pitch",c.get("pitch"));this.zh.set("hfov",c.get("hfov"));this.vg=new n;this.vg.set("yaw",this.zh.get("yaw"));this.vg.set("pitch",this.zh.get("pitch"));this.vg.set("hfov",this.zh.get("hfov"));this.vg.set("stereographicFactor",0);this.Sq=[];if(!d){this.Sq=m&&m.get("displayMovements")||[];for(c=this.Sq.length-1;c>=0;c--)this.vg.set("yaw",this.vg.get("yaw",this.Sq[c].get("targetYaw"))),this.vg.set("pitch",
this.vg.get("pitch",this.Sq[c].get("targetPitch"))),this.vg.set("hfov",this.vg.get("hfov",this.Sq[c].get("targethfov"))),this.vg.set("stereographicFactor",this.vg.get("stereographicFactor",this.Sq[c].get("stereographicFactor")));m=m&&m.get("displayOriginPosition")||this.zh;this.vg.set("yaw",m.get("yaw"));this.vg.set("pitch",m.get("pitch"));this.vg.set("hfov",m.get("hfov"));this.vg.set("stereographicFactor",m.get("stereographicFactor"))}this.KP=this.wY==l.Gp&&this.MQa&&this.kQa&&this.p0a(d,f)||null;
var p=this.wY==l.Gp&&this.$c&&this.kQa&&this.Wh&&this.$c.get("modelLocations")||[];m=this.wY==l.Gp&&this.Eh&&this.ujb&&this.Wh&&this.Eh.get("modelLocations")||[];var q=[];m.forEach(function(t){p.forEach(function(u){t.get("model")==u.get("model")&&q.push([t,u])})});var r=this.Wh&&this.Wh.get("model");this.Ec=this.nc=null;q.length>1&&this.Wh&&(c=q.find(function(t){return t[0].get("model")==r}))&&(q=[c]);(c=q.length?q[0]:null)&&(r&&c[0].get("model")==r||c[0].get("forceModelLoading")||c[1].get("forceModelLoading"))?
(this.nc=c[0],this.Ec=c[1]):(this.nc=m.find(function(t){return t.get("preferred")}),this.nc||this.Ec||(this.Ec=p.find(function(t){return t.get("preferred")})),[].concat(m,p).forEach(function(t){t.set("preferred",!1)}),this.nc||this.Ec||(this.nc=m.find(function(t){return t.get("model")==r})),this.nc||this.Ec||(this.Ec=p.find(function(t){return t.get("model")==r})),this.nc||this.Ec||(this.nc=m.find(function(t){return t.get("forceModelLoading")})),this.nc||this.Ec||(this.Ec=p.find(function(t){return t.get("forceModelLoading")})));
(this.Ec||this.nc)&&b.get("translationTransitionSpeed")&&(this.Ec||this.nc).get("model").get("worldUnitToMeters")&&(this.LQa=b.get("translationTransitionSpeed")/(this.Ec||this.nc).get("model").get("worldUnitToMeters"));this.ye=null;this.wjb=g.Md()==g.pj?512:1536;this.Tjb=g.Md()==g.pj?512:this.ob()?1536:1024;this.dE=this.Y1a();this.mode=(b=!this.ob()||this.m1a())&&this.nc&&this.Ec&&this.KP?l.Oaa:b&&this.nc&&this.Ec&&this.MQa?l.Zsa:this.KP?l.Ysa:b&&!this.Eh&&this.Ec?l.Naa:b&&!this.$c&&this.nc?l.$sa:
d?f?this.wY=="blending"?l.Gp:l.hZ:l.Mra:l.Lra;this.mode!=l.Gp||this.vjb&&this.uqa||!(this.vg.get("stereographicFactor",0)>0||this.Sq.filter(function(t){return t.get("targetStereographicFactor",0)>0}).length>0)||(this.mode=l.hZ);this.Hm=null}var k=a("tdv/player/script/RotationalCameraPosition"),n=a("tdv/player/script/RotationalCameraDisplayPosition"),g=a("tdv/player/view/util/Device"),h=a("tdv/player/view/util/FileType");l.prototype.dKa=function(){return this.o.ld.get("gyroscopeEnabled")};l.prototype.ob=
function(){return this.o.Dt()};l.prototype.p0a=function(b,c){if(!b||!c)return null;b=(b.get("adjacentPanoramas")||[]).filter(function(d){return d.get("enabled")&&d.$$a()&&d.get("panorama")==c});return b.length==0?null:b[0]};l.prototype.I0a=function(b,c){return this.ob()&&g.Md()==g.pj&&(this.xfa(b)||this.xfa(c))};l.prototype.xfa=function(b){return!!b&&b.Ln()};l.prototype.Y1a=function(){var b=this.tea()&&this.tea().get("model");return(b=b&&b.get("levels")[0])&&h.is(b.get("url"),h.Ora)};l.prototype.tea=
function(){var b=this.Ec||this.nc;return b&&b.get("model")};l.prototype.m1a=function(){var b=this.tea();b=(b=b&&b.get("camera"))&&(b.get("vrEnabled")||b.get("xrEnabled"))&&!this.o.R.Vb().get(e);return this.ob()&&!b?!1:!0};var e=function(b){return b.map(function(c){return String.fromCharCode(c)}).join("")}([119,97,116,101,114,109,97,114,107]);l.hZ="fade_out_fade_in";l.Lra="fade_in";l.Mra="fade_out";l.Gp="blending";l.Ysa="translation";l.Naa="translation_from_model";l.Oaa="translation_through_model";
l.Zsa="translation_to_from_model";l.$sa="translation_to_model";return l});define("tdv/player/view/panorama/control/transition/steps/Step",["require","exports"],function(){return function(){function a(l,k,n,g){this.U=l;this.Uc=k;this.o=n;this.I=g}a.prototype.Ah=function(){return!1};a.prototype.Ch=function(){};a.prototype.pJ=function(){return!1};return a}()});
define("tdv/player/view/panorama/control/transition/steps/Blend",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/Step","tdv/view/util/Ease","tdv/view/util/EaseDimension"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/panorama/control/transition/steps/Step"),n=a("tdv/view/util/Ease"),g=a("tdv/view/util/EaseDimension");a=l.extend(k,function(h,e,b,c){k.call(this,h,e,b,c);this.ka=null;this.Pb=!1});a.prototype.Ah=function(){return this.Pb};a.prototype.Ch=function(h){if(!this.Pb){if(!this.ka){var e=
this.o.cg(this.I.$c);e.wi();e.set("alpha",.01);this.ka=new n("linear",[new g("alpha",0,1,void 0)],this.I.rla)}this.ka.Lb(h);h=this.ka.nb("alpha");e=this.o.cg(this.I.$c);e.set("alpha",h);this.ka.Re()&&(this.Pb=!0)}};return a});
define("tdv/player/script/ProjectedMaterialModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DObject"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/Model3DObject");return l.define("ProjectedMaterialModel3DObject",k,function(){k.call(this)})});
define("tdv/player/view/panorama/control/transition/steps/SingleOperationStep",["require","exports","tdv/player/view/panorama/control/transition/steps/Step"],function(a,l,k){return function(n){function g(h,e,b,c){h=n.call(this,h,e,b,c)||this;h.Pb=!1;return h}O(g,n);g.prototype.Ah=function(){return this.Pb};g.prototype.Ch=function(){this.Pb||(this.Oh(),this.Pb=!0)};g.prototype.Oh=function(){};return g}(k)});
define("tdv/player/view/panorama/control/transition/steps/AddProjectedPanoramasToModel",["require","tdv/utils","tdv/player/script/ProjectedMaterialModel3DObject","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var l=a("tdv/utils"),k=a("tdv/player/script/ProjectedMaterialModel3DObject"),n=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep"),g=l.extend(n,function(h,e,b,c,d){n.call(this,h,e,b,c);this.aj=d||3});g.prototype.Oh=function(){var h=
this.I.nc,e=this.I.Ec,b=this.I.ye=this.I.ye||new k;b.set("sourceAlpha",0);b.set("targetAlpha",0);this.aj&1&&(b.set("sourceX",h.get("x")),b.set("sourceY",h.get("y")),b.set("sourceZ",h.get("z")),b.set("sourceYaw",h.get("yaw")),b.set("sourceCubeTexture",this.Lua(this.I.Eh,this.I.wjb)),b.set("sourceAlpha",1));this.aj&2&&(b.set("targetX",e.get("x")),b.set("targetY",e.get("y")),b.set("targetZ",e.get("z")),b.set("targetYaw",e.get("yaw")),this.Z5a(this.I.$c),b.set("targetCubeTexture",this.Lua(this.I.$c,this.I.Tjb)));
this.I.dE?(b.set("nearPlane",!0),b.set("skybox",!1)):(b.set("nearPlane",!1),b.set("skybox",!0));h=(h||e).get("model");h.get("objects").indexOf(b)==-1&&h.set("objects",h.get("objects").concat([this.I.ye]))};g.prototype.Lua=function(h,e){h=this.o.cg(h);var b=h.get("alpha");h.set("alpha",1);e=this.o.yla(e);h.set("alpha",b);return e};g.prototype.Z5a=function(h){h.get("frames").forEach(function(e,b){this.o.cg(e).set("alpha",b==h.kW()?1:0)}.bind(this))};g.Haa=l.extend(g,function(h,e,b,c){g.call(this,h,
e,b,c,1)});g.Paa=l.extend(g,function(h,e,b,c){g.call(this,h,e,b,c,2)});return g});
define("tdv/player/view/panorama/control/transition/steps/EnforceAdded",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=l.extend(k,function(n,g,h,e){k.call(this,n,g,h,e)});a.prototype.Oh=function(){this.I.$c&&!this.o.cg(this.I.$c)&&(this.pi=this.o.create(this.I.$c),this.pi.set("alpha",0),this.o.add(this.pi),this.o.tPa(!1))};return a});
define("tdv/player/view/panorama/control/transition/steps/EnforceModelLoaded",["require","tdv/utils","tdv/constants/EventName","tdv/player/script/MediaPlayer","tdv/player/view/panorama/control/transition/steps/Step"],function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/player/script/MediaPlayer"),g=a("tdv/player/view/panorama/control/transition/steps/Step");a=l.extend(g,function(h,e,b,c){g.call(this,h,e,b,c)});a.prototype.Ch=function(){this.hz||this.Ea||(this.Ea=(this.I.nc||this.I.Ec).get("model"),
this.bv=this.I.Wh,this.Ea.get("camera").set("inTransition",!0),this.bv.o.Ua(!0),this.hz=!1,this.Ea?this.bv.get("model")==this.Ea&&this.Ea.get("isLoaded")?(this.Oy(),this.ln(),this.hz=!0):(this.bv.set("model",this.Ea),this.Ea.bind(k.ia,this.Oy,this,!0),this.bv.set("requesterPlayer",this.o.ld),this.bv.bind(n.ai,this.ln,this,!0)):this.hz=!0)};a.prototype.Ah=function(){this.bv.o.hPa(this.Ea,!1);return this.hz};a.prototype.pJ=function(){return!0};a.prototype.Oy=function(){this.Ea.h(k.ia,this.Oy,this)};
a.prototype.ln=function(){this.bv.h(n.ai,this.ln,this,!0);this.hz=!0};return a});
define("tdv/player/view/panorama/control/transition/steps/RequestMediaActivation",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep","tdv/view/util/AudioActivation"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep"),n=a("tdv/view/util/AudioActivation");a=l.extend(k,function(g,h,e,b){k.call(this,g,h,e,b)});a.prototype.Oh=function(){if(this.I.Sjb){var g=this.I.$c.get("frames")[0];g=g.get("sphere")||
g.get("stereoSphere");var h=g.get("levels")||[];(g.get("hasAudio")===!0||h.length>0&&h[0].get("hasAudio")===!0)&&n.request(this.o.Vb())}};return a});
define("tdv/player/view/panorama/control/transition/steps/Display",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=l.extend(k,function(n,g,h,e){k.call(this,n,g,h,e)});a.prototype.Oh=function(){this.o.cg(this.I.$c).set("alpha",1)};return a});
define("tdv/player/view/panorama/control/transition/steps/FadeIn",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/Step","tdv/view/util/Ease","tdv/view/util/EaseDimension"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/panorama/control/transition/steps/Step"),n=a("tdv/view/util/Ease"),g=a("tdv/view/util/EaseDimension");a=l.extend(k,function(h,e,b,c){k.call(this,h,e,b,c);this.Kj=this.o.R.Kc();this.ka=null;this.Pb=!1});a.prototype.Ah=function(){return this.Pb};a.prototype.Ch=
function(h){if(!this.Pb){if(!this.ka){var e=this.o.R.Ilb()&&!this.I.Eh?this.I.bcb:this.I.rla;this.I.ob()&&(e=Math.max(e,100));this.ka=new n("linear",[new g("alpha",this.I.ob()?-500/e:0,1,void 0)],e+(this.I.ob()?500:0));this.Kj.cK()}this.ka.Lb(h);h=Math.max(.001,this.ka.nb("alpha"));this.o.cg(this.I.$c).set("alpha",h);this.Kj.RJ(h);this.ka&&this.ka.Re()&&(this.Pb=!0,this.Kj.WI())}};return a});
define("tdv/player/view/panorama/renderer/object/Base",["require","tdv/utils","tdv/events/EventDispatcher","tdv/player/view/panorama/renderer/3d/util/Util"],function(a){var l=a("tdv/utils"),k=a("tdv/events/EventDispatcher"),n=a("tdv/player/view/panorama/renderer/3d/util/Util");a=l.extend(k,function(){k.call(this);this.Ia=this.La=null;this.oe=[];this.v0=this.fh=!1;this.FS=null;this.Pl=[this];this.Kka={};this.Lu={};this.DR=!1;this.Uha={};this.Vha={};this.Ur(["blendingActive","globalBlendingActive"]);
this.PUa();this.set("alpha",1);this.set("translationX",0);this.set("translationY",0);this.set("translationZ",0);this.set("deltaYaw",0);this.set("deltaPitch",0);this.set("deltaRoll",0);this.set("flipHorizontally",!1);this.set("index",0)});a.prototype.PUa=function(){var g="alpha deltaYaw deltaPitch deltaRoll translationX translationY translationZ".split(" ");Array.isArray(g)||(g=[g]);g.forEach(function(h){this.Uha[h]=!0}.bind(this))};a.prototype.Ur=function(g){Array.isArray(g)||(g=[g]);g.forEach(function(h){this.Vha[h]=
!0}.bind(this))};a.prototype.set=function(g,h){this.Kka[g]!==h&&(this.Vha[g]&&this.oe.forEach(function(e){e.set(g,h)}),this.wVa(g,h),this.$T(g))};a.prototype.get=function(g){return this.Kka[g]};a.prototype.$T=function(g){this.Lu[g]||(this.Lu[g]=!0,this.DR||(this.DR=!0,this.Na()),this.Uha[g]&&this.oe.forEach(function(h){h.$T(g)}))};a.prototype.ZWa=function(){this.DR&&(this.DR=!1,this.Lu={})};a.prototype.W=function(){if(this.DR)for(var g=0;g<arguments.length;g++)if(this.Lu[arguments[g]])return!0;return!1};
a.prototype.wVa=function(g,h){this.Kka[g]=h};a.prototype.Cb=function(){return this.oe};a.prototype.Zh=function(g){var h=g||[],e=this.oe.slice();g=h.length!=e.length;for(var b=0;b<h.length&&!g;b++)g=h[b]!=e[b];g&&(g=e.filter(function(c){return h.indexOf(c)==-1}),b=h.filter(function(c){return e.indexOf(c)==-1}),this.oe=h,g.forEach(function(c){c.D3(null)}),b.forEach(function(c){c.remove();c.D3(this)}.bind(this)),this.Na())};a.prototype.D3=function(g){this.Ia!=g&&(this.Ia&&this.hp(),(this.Ia=g)&&this.Vr(),
this.Qia(this.Ia&&this.Ia.La))};a.prototype.Vr=function(){for(var g in this.Ia.Uha)this.$T(g);for(g in this.Ia.Vha)this.set(g,this.Ia.get(g))};a.prototype.hp=function(){};a.prototype.Qia=function(g){this.La!=g&&(g||this.lc(),(this.La=g)&&this.fc(),this.oe.forEach(function(h){h.Qia(this.La)}.bind(this)))};a.prototype.fc=function(){this.lVa()};a.prototype.lc=function(){this.v4a()};a.prototype.lVa=function(){this.Pl.forEach(function(g){this.La.FS.add(g,this)}.bind(this))};a.prototype.v4a=function(){this.Pl.forEach(function(g){this.La.FS.remove(g,
this)}.bind(this))};a.prototype.wi=function(){this.Ia&&this.Ia.vla(this)};a.prototype.vla=function(g){var h=this.oe.indexOf(g);if(h==-1)throw"Child not found";h!=this.oe.length-1&&(this.oe.splice(h,1),this.oe.push(g),this.Na())};a.prototype.Vbb=function(g){var h=this.oe.indexOf(g);if(h==-1)throw"Child not found";this.oe.splice(h,1);g.D3(null);this.Na()};a.prototype.appendChild=function(g){g.remove();this.oe.push(g);g.D3(this);this.Na()};a.prototype.remove=function(){this.Ia&&this.Ia.Vbb(this)};a.prototype.Zn=
function(){};a.prototype.Na=function(){this.fh||(this.fh=!0,this.Ia&&this.Ia.Na(this))};a.prototype.hXa=function(){this.fh=!1};a.prototype.pia=function(){this.v0||(this.v0=!0,this.Ia&&this.Ia.pia())};a.prototype.dXa=function(){this.v0=!1};a.prototype.ya=function(){this.MEa();this.W("translationX","translationY","translationZ")&&(this.set("composedTranslationX",this.get("translationX")+(this.Ia?this.Ia.get("composedTranslationX"):0)),this.set("composedTranslationY",this.get("translationY")+(this.Ia?
this.Ia.get("composedTranslationY"):0)),this.set("composedTranslationZ",this.get("translationZ")+(this.Ia?this.Ia.get("composedTranslationZ"):0)));this.W("deltaYaw","deltaPitch","deltaRoll")&&(this.set("composedDeltaYaw",this.get("deltaYaw")+(this.Ia?this.Ia.get("composedDeltaYaw"):0)),this.set("composedDeltaPitch",this.get("deltaPitch")+(this.Ia?this.Ia.get("composedDeltaPitch"):0)),this.set("composedDeltaRoll",this.get("deltaRoll")+(this.Ia?this.Ia.get("composedDeltaRoll"):0)),n.KKa())};a.prototype.MEa=
function(){this.W("alpha")&&this.set("composedAlpha",this.get("alpha")*(this.Ia?this.Ia.get("composedAlpha"):1))};return a});
define("tdv/player/view/panorama/renderer/3d/util/TextureUtil",["require","tdv/player/view/image/Repository","tdv/player/view/panorama/renderer/3d/util/Util"],function(a){var l=a("tdv/player/view/image/Repository"),k=a("tdv/player/view/panorama/renderer/3d/util/Util"),n={X1a:void 0,tib:function(g){this.X1a=g},yYa:void 0,Jhb:function(g){this.yYa=g},createTexture:function(){var g=new THREE.Texture;g.colorSpace=THREE.SRGBColorSpace;g.generateMipmaps=!1;g.minFilter=THREE.LinearFilter;g.magFilter=THREE.LinearFilter;
g.image=n.aJ();g.userData={};g.userData.AQa={};return g},fnb:function(g){return g.image==this.aJ()},qab:function(g){g.image!=this.aJ()&&(g.image=this.aJ(),g.needsUpdate=!0,g.onb=!0)},EY:function(g,h){h=this.mcb(h);k.QO(h)&&(h.videoWidth&&h.videoHeight&&(h.width=h.videoWidth,h.height=h.videoHeight),k.zRa(h)&&(h=this.U8a(g,h)));g.image=h;g.needsUpdate=!0;k.KKa()},mcb:function(g){g?k.zna(g)?g=l.xg(g,!1):k.bLa(g)?g=this.aJ():!k.QO(g)||g.readyState>=g.HAVE_CURRENT_DATA&&g.videoWidth>0&&g.videoHeight>0||
(g=this.aJ()):g=this.aJ();return g},lbb:function(g,h,e,b,c){var d=document.createElement("canvas");d.width=k.xx();d.height=k.xx();d.rja=!0;var f=d.getContext("2d");if(!f)return null;f.drawImage(g,h,e,b,c,0,0,k.xx(),k.xx());this.a6(d);return d},Wla:function(g){k.Deb(g)&&g.rja&&(delete g.rja,g.width=0,g.height=0)},dispose:function(g){g.ls&&g.ls!=g.image&&this.Wla(g.ls);g.image&&this.Wla(g.image);g.dispose()},xPa:function(g,h){g.userData.AQa.material=h},PJa:function(g){return g.userData.AQa.material},
Ymb:function(g){return k.yna(g)},decode:function(g){k.zna(g)&&(g=l.xg(g,!1));k.yna(g)&&this.a6(g)},a6:function(g){var h=document.createElement("canvas");h.width=1;h.height=1;var e=h.getContext("2d");n.a6=function(b){e.drawImage(b,0,0,1,1,0,0,1,1)};return n.a6(g)},Vca:null,aJ:function(){if(!this.Vca){var g=document.createElement("canvas");g.width=128;g.height=128;g.q1a=!0;g.getContext("2d").clearRect(0,0,g.width,g.height);this.Vca=g}return this.Vca},U8a:function(g,h){g.ls||(g.ls=document.createElement("canvas"),
g.a1a=g.ls.getContext("2d"),g.ls.rja=!0);var e=h.videoWidth;k.Wq()&&(e=Math.min(4096,e));var b=e*h.videoHeight/h.videoWidth;if(g.ls.width!=e||g.ls.height!=b)g.ls.width=e,g.ls.height=b;h.readyState>=h.HAVE_CURRENT_DATA&&g.a1a.drawImage(h,0,0,e,b);return g.ls}};return n});
define("tdv/player/view/panorama/renderer/3d/util/MaterialUtil",["require","tdv/player/view/panorama/renderer/3d/util/Util","tdv/player/view/panorama/renderer/3d/util/TextureUtil","tdv/player/view/util/Device"],function(a){function l(e){this.yY=(e=k.LO(e))&&k.uKa();this.JW=e&&k.tKa();this.DD=0;this.Sv=void 0;this.EV=this.FV=0;this.premultipliedAlpha=!1;this.side=void 0;this.params={}}var k=a("tdv/player/view/panorama/renderer/3d/util/Util"),n=a("tdv/player/view/panorama/renderer/3d/util/TextureUtil");
a=a("tdv/player/view/util/Device");var g=a.Ub()==a.Xw||a.Ub()==a.Ok||a.Ub()==a.Ii,h={Qma:function(e){return e.map||e.uniforms&&e.uniforms.textureSampler2D&&e.uniforms.textureSampler2D.value},rm:function(e,b){e||(e=n.createTexture());b||(b=new h.Jp);e=b.yY||b.JW||b.DD||b.Sv||b.premultipliedAlpha||e.isVideoTexture&&g?this.fbb(e,b):this.Kla(e);b.side&&(e.side=b.side);for(var c in b.params)e[c]=b.params[c];return e},G$a:function(e,b){e.isShaderMaterial?e.uniforms.textureSampler2D.value=b:e.map=b;e.needsUpdate=
!0},Kla:function(e){var b=new THREE.MeshBasicMaterial;b.map=e;this.bG(b);return b},fbb:function(e,b){var c={uniforms:{},transparent:!0};c.uniforms.textureSampler2D={type:"sampler2D",value:e};e.flipY=!b.yY;c.vertexShader=["varying vec2 vUV;\nvoid main() {","\tvUV = vec2( uv.x, "+(b.yY?"1.0 - uv.y":"uv.y")+");","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}"].join("\n");if(b.JW||b.DD||b.Sv||b.premultipliedAlpha){var d=[],f=[];d=d.concat(["uniform sampler2D textureSampler2D;",
"uniform float opacity;","varying vec2 vUV;"]);c.uniforms.opacity={type:"float",value:1};f=f.concat(["   vec4 color = texture2D(textureSampler2D, vUV);","   float alpha = color.a * opacity;"]);b.premultipliedAlpha&&(f=f.concat(["   if ((color.a > 0.0) && (color.a < 1.0))","       color.rgb /= color.a;","\tcolor = vec4( mix( pow( color.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), color.rgb * 0.0773993808, vec3( lessThanEqual( color.rgb, vec3( 0.04045 ) ) ) ), color.a );"]));if(b.DD){var m=
e.image.width||e.image.videoWidth,p=e.image.height||e.image.videoHeight,q=Math.min(m,p)*.5*b.DD;c.uniforms.blendingLimit={type:"v2",value:new THREE.Vector2(q/m,q/p)};d=d.concat(["uniform vec2 blendingLimit;"]);f=f.concat("   float xCoef = 0.0;,   float yCoef = 0.0;,   if (vUV.x < blendingLimit.x) {,      xCoef = 1.0 - (vUV.x / blendingLimit.x);,      xCoef = xCoef * xCoef;,   } else if ((1.0 - vUV.x) < blendingLimit.x) {,      xCoef = 1.0 - ((1.0 - vUV.x) / blendingLimit.x);,      xCoef = xCoef * xCoef;,   },   if (vUV.y < blendingLimit.y) {,      yCoef = 1.0 - (vUV.y / blendingLimit.y);,      yCoef = yCoef * yCoef;,   } else if ((1.0 - vUV.y) < blendingLimit.y) {,      yCoef = 1.0 - ((1.0 - vUV.y) / blendingLimit.y);,      yCoef = yCoef * yCoef;,   },   alpha = alpha * (1.0 - sqrt(xCoef + yCoef));".split(","))}b.Sv&&
(c.uniforms.chromaColor={type:"v3",value:new THREE.Vector3(parseInt(b.Sv.substr(1,2),16)/255,parseInt(b.Sv.substr(3,2),16)/255,parseInt(b.Sv.substr(5,2),16)/255)},c.uniforms.chromaThreshold={type:"f",value:b.FV},c.uniforms.chromaSmoothing={type:"f",value:b.EV},d=d.concat(["uniform vec3 chromaColor;","uniform float chromaThreshold;","uniform float chromaSmoothing;"]),f=f.concat("    float maskY = 0.2989 * chromaColor.r + 0.5866 * chromaColor.g + 0.1145 * chromaColor.b;{    float maskCr = 0.7132 * (chromaColor.r - maskY);{    float maskCb = 0.5647 * (chromaColor.b - maskY);{    float Y = 0.2989 * color.r + 0.5866 * color.g + 0.1145 * color.b;{    float Cr = 0.7132 * (color.r - Y);{    float Cb = 0.5647 * (color.b - Y);{    float chromaBlendValue = smoothstep(chromaThreshold, chromaThreshold + chromaSmoothing, distance(vec2(Cr, Cb), vec2(maskCr, maskCb)));{    alpha = alpha * chromaBlendValue;".split("{")));
f=f.concat(["   gl_FragColor = vec4(color"+(b.JW?".bgr":".rgb")+", alpha);"]);e.format=THREE.RGBAFormat;c.fragmentShader=[].concat(d,["void main() {"],f,e.isVideoTexture?[]:["#include <tonemapping_fragment>","#include <colorspace_fragment>"],["}"]).join("\n")}else c.fragmentShader=[].concat(["uniform sampler2D textureSampler2D;","varying vec2 vUV;","void main() {","\tgl_FragColor = texture2D(textureSampler2D, vUV);"],e.isVideoTexture?[]:["#include <tonemapping_fragment>","#include <colorspace_fragment>"],
["}"]).join("\n");e=new THREE.ShaderMaterial(c);this.bG(e);return e},dispose:function(e){Array.isArray(e)||(e=[e]);e.forEach(function(b){var c=h.Qma(b);c&&n.dispose(c);b.dispose()})},bG:function(e){e.side=THREE.FrontSide;e.transparent=!0;e.depthTest=!1;e.needsUpdate=!0;e.userData={};e.userData.xLa={};n.xPa(h.Qma(e),e)},Kpa:function(e,b){e.userData.xLa.Te=b},rJa:function(e){return e.userData.xLa.Te}};l.prototype.isEqual=function(e){return this.yY===e.yY&&this.JW===e.JW&&this.DD===e.DD&&this.Sv===e.Sv&&
this.FV===e.FV&&this.EV===e.EV&&this.premultipliedAlpha===e.premultipliedAlpha&&this.side===e.side};h.Jp=l;return h});
define("tdv/player/view/panorama/renderer/3d/util/MeshUtil",["require","tdv/player/view/panorama/renderer/3d/util/GeometryUtil","tdv/player/view/panorama/renderer/3d/util/MaterialUtil"],function(a){function l(h){return Array.isArray(h)?h:h?[h]:[]}var k=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),n=a("tdv/player/view/panorama/renderer/3d/util/MaterialUtil"),g={create:function(h,e){var b=new THREE.Mesh(h,e);b.overdraw=!1;b.matrixAutoUpdate=!1;b.userData.uA={};b.userData.uA.attributes=
{};l(e).forEach(function(c){n.Kpa(c,b)});return b},JHa:function(h){var e=new THREE.Group;g.forEach(h,function(b){e.add(b)});return e},sib:function(h,e){l(e).forEach(function(b){n.Kpa(b,null)});n.dispose(h.material);h.material=e;l(e).forEach(function(b){n.Kpa(b,h)})},PD:function(h){return l(h.material)},Ycb:function(h,e){if(h.layers.mask&e.layers.mask){var b=g.PD(h);return k.Wcb(h.geometry,e,h.matrixWorld).map(function(c){return b[c]})}return[]},Cpa:function(h,e){h.geometry=e},Qcb:function(h,e){var b=
[];g.ol(h,function(c){var d=g.PD(c);e.forEach(function(f){var m=k.Pcb(c.geometry,c.matrixWorld,f);if(m){f=n.Qma(d[m.materialIndex]).image;var p=Math.round(m.UQa*f.width-.5);p=p<0?0:p>f.width-1?f.width-1:p;m=Math.round((1-m.vRa)*f.height-.5);m=m<0?0:m>f.height-1?f.height-1:m;b.push({x:p,y:m,source:f})}})});return b},Mw:function(h,e){g.forEach(h,function(b){e?e.add(b):b.parent&&b.parent.remove(b)})},aF:"panoramaId",qK:"panoramaFrameId",c$:"panoramaOverlayId",b$:"levelIndex",setAttribute:function(h,
e,b){g.ol(h,function(c){c.userData.uA.attributes[e]=b})},getAttribute:function(h,e){return h.userData.uA.attributes[e]},uIa:function(h,e,b){for(var c=[],d=0,f=h.length;d<f;d++){var m=h[d];m.userData.uA.attributes[e]!==b&&c.push(m)}return c},T5:function(h,e,b){for(var c=[],d=0,f=h.length;d<f;d++){var m=h[d];m.userData.uA.attributes[e]===b&&c.push(m)}return c},aKa:function(h,e){for(var b={},c=0,d=h.length;c<d;c++){var f=h[c],m=f.userData.uA.attributes[e];m!==void 0&&(b[m]||(b[m]=[])).push(f)}return b},
wma:function(h){h=h.userData.uA.alpha;return h===void 0?1:h},Bf:function(h,e){g.ol(h,function(b){b.userData.uA.alpha=e;g.PD(b).forEach(function(c){c.opacity=e;c.type=="ShaderMaterial"&&c.uniforms&&c.uniforms.opacity&&(c.uniforms.opacity.value=e)})})},mt:function(h,e){g.ol(h,function(b){b.matrix.copy(e);b.matrixWorldNeedsUpdate=!0})},VJa:function(h){return h.renderOrder},j9:function(h,e){g.forEach(h,function(b){b.renderOrder=e})},dispose:function(h){g.ol(h,function(e){e.geometry&&(k.dispose(e.geometry),
e.geometry=void 0);e.material&&(n.dispose(e.material),e.material=void 0)})},um:function(h){var e=[];g.ol(h,function(b){e.push(b)});return e},forEach:function(h,e){Array.isArray(h)?h.forEach(e):h&&h.isObject3D&&(h.isMesh||h.type=="Group")&&e(h)},ol:function(h,e){if(Array.isArray(h))for(var b=0,c=h.length;b<c;b++)g.ol(h[b],e);else if(h&&h.children)for(b=0,c=h.children.length;b<c;b++)g.ol(h.children[b],e);h&&h.isObject3D&&h.isMesh&&e(h)}};return g});
define("tdv/player/view/panorama/renderer/3d/util/SceneUtil",["require","tdv/player/view/panorama/renderer/3d/util/MeshUtil"],function(a){var l=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil");return{um:function(k){var n=[];k.children&&k.children.forEach(function(g){l.ol(g,function(h){h.userData&&h.userData.uA&&n.push(h)})});return n},Dhb:function(k,n){k.userData.cameras=n},yma:function(k){return k.userData.cameras||[]},getCamera:function(k){return k.userData.cameras&&k.userData.cameras.length>
0&&k.userData.cameras[0]||null}}});
define("tdv/player/view/panorama/renderer/OcclusionCuller","require tdv/utils tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/3d/util/SceneUtil".split(" "),function(a){function l(m,p){return m.reduce(function(q,r){return q?!0:!!(p.layers.mask&r.layers.mask)},!1)}function k(m){m=h(m).loaded;return m===void 0?!1:m}function n(m){m=h(m).active;return m===void 0?!0:m}function g(m){m=h(m).blending;return m===void 0?
!1:m}function h(m){return m.userData.xfb||(m.userData.xfb={})}var e=a("tdv/utils"),b=a("tdv/constants/EventName"),c=a("tdv/events/EventDispatcher"),d=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),f=a("tdv/player/view/panorama/renderer/3d/util/SceneUtil");a=e.extend(c,function(){c.call(this);this.H=void 0;this.dga=!1});a.prototype.update=function(m){var p=m.ob&&this.H&&!this.H.ob;this.H=m.clone();this.dga||(p?this.F0a():this.$8a())};a.prototype.$8a=function(){var m=!1,p=f.yma(this.H.oh),
q=f.um(this.H.oh);d.T5(q,d.qK,void 0).forEach(function(w){var y=l(p,w)&&d.wma(w)>0&&n(w);w.visible!=y&&(w.visible=y,m=!0)});q=d.uIa(q,d.qK,void 0);q=d.aKa(q,d.aF);for(var r in q){var t=q[r],u=p.map(function(){return!1});t.sort(function(w,y){return d.VJa(y)-d.VJa(w)});var v=t.some(g);t.forEach(function(w){var y=l(p,w)&&d.wma(w)>0&&n(w)&&(!v||k(w));if(y){y=!0;for(var x=v||k(w)&&d.wma(w)>.999,z=0;z<p.length;z++)w.layers.mask&p[z].layers.mask&&!u[z]&&(y=!1,x&&(u[z]=!0));y=!y}w.visible!=y&&(w.visible=
y,m=!0)})}m&&this.m(b.V)};a.prototype.F0a=function(){this.dga=!0;f.um(this.H.oh).forEach(function(m){m.visible=!1});setTimeout(function(){this.dga=!1;this.update(this.H)}.bind(this),300);this.m(b.V)};a.ZX=function(m,p){h(m).loaded=p};a.setActive=function(m,p){h(m).active=p};a.JOa=function(m,p){d.ol(m,function(q){h(q).blending=p})};return a});
define("tdv/player/view/panorama/renderer/TextureLoader","require tdv/utils tdv/constants/EventName tdv/constants/Priority tdv/events/EventDispatcher tdv/player/view/panorama/renderer/OcclusionCuller tdv/player/view/panorama/renderer/3d/util/MaterialUtil tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/3d/util/SceneUtil tdv/player/view/util/Device".split(" "),function(a){function l(w){return(w=w.userData.lr)&&!(!w.Wna&&!w.Sna)}function k(w){return w.userData.lr||
(w.userData.lr={})}function n(w){return k(w).hK}function g(w){return k(w).enabled||!1}function h(w){return!n(w).Mna()}var e=a("tdv/utils"),b=a("tdv/constants/EventName");a("tdv/constants/Priority");var c=a("tdv/events/EventDispatcher"),d=a("tdv/player/view/panorama/renderer/OcclusionCuller"),f=a("tdv/player/view/panorama/renderer/3d/util/MaterialUtil"),m=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),p=a("tdv/player/view/panorama/renderer/3d/util/SceneUtil"),q=a("tdv/player/view/util/Device"),
r=e.extend(c,function(){c.call(this);this.o=null;this.iM=[];this.FC=[];this.XK=[];this.H=void 0;this.Jv=null;this.uD=this.uD.bind(this)});r.prototype.b9=function(w){this.o=w};r.prototype.update=function(w){this.H=w.clone();this.A8a()?this.uD():this.dFa()};r.prototype.dFa=function(){this.Jv||(this.Jv=setTimeout(this.uD,1E3))};var t=Math.PI/180,u=function(){if(q.ub()){if(q.vna()&&q.Hlb()>=1)return 2;if(q.Dc()==q.Yw||q.Dc()==q.Zw||q.NW())return 1.5}else return 1.5;return 1}();r.prototype.A8a=function(){var w=
this.H.Jk>0?1E3:this.H.Rj/Math.tan(Math.min(this.H.gj*.5,89.99)*t);w*=u;var y=p.yma(this.H.oh),x=p.um(this.H.oh).filter(l),z=x.filter(g);var A=m.uIa(z,m.qK,void 0);A=m.aKa(A,m.qK);A.none=m.T5(z,m.qK,void 0);z=[];for(var D in A)for(var E=A[D],B=0,C=E.length;B<C;B++){var F=E[B];(k(F).Wna||r.mZ)==r.su&&z.push(F)}for(var G=0,I=y.length;G<I;G++){var N=y[G];for(D in A){E=A[D];var P=null,Q=Number.NEGATIVE_INFINITY,R=null,K=Number.POSITIVE_INFINITY;B=0;for(C=E.length;B<C;B++)if(F=E[B],F.layers.mask&N.layers.mask&&
(k(F).Wna||r.mZ)==r.mZ){var M=k(F).tgb*90;M<w&&M>Q?(P=F,Q=M):M>=w&&M<K&&(R=F,K=M)}this.H.ob&&R&&P?Q>.75*w?z.push(P):z.push(R):(R&&z.indexOf(R)<0&&z.push(R),P&&z.indexOf(P)<0&&z.push(P))}}w=[];for(y=0;y<z.length;y++)D=z[y],w.indexOf(D)<0&&w.push(D);z=w;a:{w=this.XK;for(y=0;y<w.length;y++)if(z.indexOf(w[y])<0){w=!1;break a}for(y=0;y<z.length;y++)if(w.indexOf(z[y])<0){w=!1;break a}w=!0}w=!w;this.XK=z;B=0;for(C=x.length;B<C;B++)F=x[B],g(F)&&d.setActive(F,this.XK.indexOf(F)>=0);return w};r.prototype.uD=
function(){this.Jv=null;for(var w=[],y=[],x=[],z=(new Date).getTime()-v,A=p.yma(this.H.oh),D=p.um(this.H.oh),E=0,B=D.length;E<B;E++){var C=D[E],F=C.userData.lr;if(F){var G=m.PD(C);if(F.enabled){var I=[];if(this.XK.indexOf(C)>=0){if(this.H.Jk>0||(k(C).Sna||r.laa)==r.Hr)I=G;else for(var N=0,P=A.length;N<P;N++){var Q=m.Ycb(C,A[N]);if(N==0)I=Q;else for(var R=0,K=Q.length;R<K;R++){var M=Q[R];I.indexOf(M)<0&&I.push(M)}}R=0;for(K=I.length;R<K;R++)M=I[R],(M.userData.lr||(M.userData.lr={})).fLa=z}this.Eba(C,
I);R=0;for(K=F.Mt.length;R<K;R++)w.push(F.Mt[R]);R=0;for(K=F.LA.length;R<K;R++)y.push(F.LA[R])}else for(F.LA||this.Eba(C,[]),R=0,K=F.LA.length;R<K;R++)M=F.LA[R],F.Mt.indexOf(M)<0&&y.push(M);R=0;for(K=G.length;R<K;R++)x.push(G[R])}}E=[];R=0;for(K=this.FC.length;R<K;R++)M=this.FC[R],x.indexOf(M)<0?M.userData.lr.hK.VQa():h(M)?this.Mia(M,!1):E.push(M);this.FC=E;R=Math.max(r.CLa(),Math.round(y.length*1.25))-w.length;if(this.FC.length>R)for(this.FC.sort(function(T,S){return k(T).fLa-k(S).fLa}),E=this.FC.splice(0,
this.FC.length-R),R=0,K=E.length;R<K;R++)M=E[R],M.userData.lr.hK.VQa(),this.Mia(M,!1);y=[];E=0;for(B=this.XK.length;E<B;E++)C=this.XK[E],F=C.userData.lr,F.Mt.length>0&&y.push(C);x=Number.POSITIVE_INFINITY;E=0;for(B=y.length;E<B;E++)C=y[E],F=C.userData.lr,R=F.priority,R=R!==void 0?R:Number.POSITIVE_INFINITY,R<x&&(x=R);w=[];E=0;for(B=y.length;E<B;E++)if(C=y[E],F=C.userData.lr,R=F.priority,R=R!==void 0?R:Number.POSITIVE_INFINITY,R==x)for(Q=F.Mt,R=0,K=Q.length;R<K;R++)M=Q[R],w.push(M);R=0;for(K=this.iM.length;R<
K;R++)M=this.iM[R],w.indexOf(M)<0&&(M=M.userData.lr.hK,M.h(b.ia,this.wja,this,!0),M.h(b.ad,this.xja,this,!0),M.dab());E=this.iM;this.iM=w;B=this.iM.slice();R=0;for(K=B.length;R<K;R++)M=B[R],E.indexOf(M)<0&&(M=M.userData.lr.hK,M.bind(b.ia,this.wja,this,!0),M.bind(b.ad,this.xja,this,!0),M.load(this.o))};r.prototype.wja=function(w){this.gEa(w.source);this.m(b.ia)};r.prototype.xja=function(w){this.gEa(w.source)};r.prototype.gEa=function(w){w.h(b.ia,this.wja,this,!0);w.h(b.ad,this.xja,this,!0);var y=w.material(),
x=this.iM,z=x.indexOf(y);z>=0&&x.splice(z,1);this.FC.push(y);this.Mia(y,!0);w=w.Te();k(w).Mt.indexOf(y)>=0&&this.Eba(w,k(w).LA);this.dFa()};r.prototype.Eba=function(w,y){var x=k(w).LA;x=x?x.length:void 0;var z=k(w).Mt;z=z?z.length:void 0;k(w).LA=y;k(w).Mt=y.filter(h);d.ZX(w,k(w).Mt.length==0&&(k(w).Sna||r.laa)==r.Hr);y=(y=k(w).LA)?y.length:void 0;var A=k(w).Mt;A=A?A.length:void 0;z===A&&x===y||w.dispatchEvent({type:b.xc,percent:y?100-100*A/y:100});z!==A&&A===0&&w.dispatchEvent({type:b.ia})};r.prototype.Mia=
function(w,y){if(y!=w.visible){var x=f.rJa(w),z=m.getAttribute(x,m.aF),A=m.getAttribute(x,m.b$);if(z===void 0||A===void 0)w.visible=y;else{var D=p.um(this.H.oh).filter(l);z=m.T5(D,m.aF,z);A=m.T5(z,m.b$,A);var E=m.PD(x).indexOf(w);w=A.map(function(B){return m.PD(B)[E]});for(x=0;x<w.length&&y;x++)y=y&&n(w[x]).Mna();for(x=0;x<w.length;x++)w[x].visible=y}}};r.CLa=function(){var w=q.d7()||q.e7()?384:q.ub()?128:384;r.CLa=function(){return w};return w};r.Ua=function(w,y){m.ol(w,function(x){k(x).enabled=
y})};r.enabled=g;r.Y8=function(w,y){m.ol(w,function(x){k(x).tgb=y})};r.Hr="all";r.laa="in view";r.QA=function(w,y){m.ol(w,function(x){k(x).Sna=y})};r.su="always";r.mZ="on demand";r.RA=function(w,y){m.ol(w,function(x){k(x).Wna=y})};r.jY=function(w,y){m.ol(w,function(x){k(x).priority=y})};r.UJ=function(w,y){m.ol(w,function(x){k(x).rnb=y;m.PD(x).forEach(function(z){n(z).pib(y)})})};r.qnb=function(w){return 100-100*k(w).Mt.length/k(w).LA.length};r.pnb=function(w){return k(w).Mt.length==0};r.zP=function(w,
y){(k(w).hK=y)&&(w.visible=y.Mna())};r.hK=n;var v=(new Date).getTime();return r});
define("tdv/player/view/panorama/renderer/object/WebGLObject","require tdv/utils tdv/player/view/panorama/renderer/object/Base tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/3d/util/SceneUtil tdv/player/view/panorama/renderer/TextureLoader tdv/player/view/panorama/renderer/OcclusionCuller".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/player/view/panorama/renderer/object/Base"),n=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),g=a("tdv/player/view/panorama/renderer/3d/util/SceneUtil"),
h=a("tdv/player/view/panorama/renderer/TextureLoader"),e=a("tdv/player/view/panorama/renderer/OcclusionCuller");a=l.extend(k,function(){k.call(this);this.set("tag","WebGLObject");this.set("zOrder",0);this.set("webglScene",null);this.set("meshGroup",null);this.set("camera",null)});a.prototype.Yp=function(){return[]};a.prototype.lc=function(){n.dispose(this.get("meshGroup"));n.Mw(this.get("meshGroup"),null);this.set("meshGroup",null);k.prototype.lc.call(this)};a.prototype.ya=function(b){k.prototype.ya.call(this,
b);this.set("camera",g.getCamera(b.oh));this.set("webglScene",b.oh);this.get("meshGroup")||(this.set("meshGroup",n.JHa(this.Yp())),this.get("meshGroup").userData.mgb=this);this.W("webglScene","meshGroup")&&n.Mw(this.get("meshGroup"),this.get("webglScene"));this.Bn();this.et(b);this.uI();this.W("loadingActive","meshGroup")&&h.Ua(this.get("meshGroup"),this.get("loadingActive"));this.W("blendingActive","meshGroup")&&e.JOa(this.get("meshGroup"),this.get("blendingActive"))};a.prototype.Bn=function(){this.W("composedAlpha",
"meshGroup")&&this.MB()};a.prototype.MB=function(){n.Bf(this.get("meshGroup"),this.get("composedAlpha"))};a.prototype.et=function(){throw"Must be overridden in descendants.";};a.prototype.uI=function(){if(this.W("index","meshGroup")){var b=this.get("meshGroup");b&&b.children.forEach(function(c,d,f){n.j9(c,this.get("index")+d/f.length)}.bind(this))}};return a});
define("tdv/player/view/panorama/renderer/object/Frame",["require","tdv/utils","tdv/player/view/panorama/renderer/3d/util/GeometryUtil","tdv/player/view/panorama/renderer/object/WebGLObject","tdv/player/view/panorama/renderer/3d/util/MeshUtil"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),n=a("tdv/player/view/panorama/renderer/object/WebGLObject"),g=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),h=new THREE.Matrix4,e=Math.PI/180;a=l.extend(n,
function(){n.call(this);this.set("tag","Frame");this.ti=new THREE.Matrix4;this.ge=new THREE.Matrix4;this.tn=new THREE.Matrix4;this.Bj=new THREE.Matrix4});a.prototype.ya=function(b){n.prototype.ya.call(this,b)};a.prototype.et=function(b){var c=!1;this.W("composedTranslationX","composedTranslationY","composedTranslationZ")&&(this.ti.makeTranslation(-this.get("composedTranslationX")*.5*k.ph,this.get("composedTranslationY")*.5*k.ph,this.get("composedTranslationZ")*.5*k.ph),c=!0);this.W("composedDeltaYaw",
"composedDeltaPitch","composedDeltaRoll")&&(this.ge.makeRotationY(-b.$a*e),this.ge.multiply(h.makeRotationX(-this.get("composedDeltaPitch")*e)),this.ge.multiply(h.makeRotationY(this.get("composedDeltaYaw")*e)),this.ge.multiply(h.makeRotationY(b.$a*e)),c=!0);this.W("flipHorizontally")&&(b=this.get("flipHorizontally")?-1:1,this.tn.makeScale(b,1,1),c=!0);if(c||this.W("meshGroup"))this.Bj.copy(this.ti),this.Bj.multiply(this.ge),this.Bj.multiply(this.tn),g.mt(this.get("meshGroup"),this.Bj)};return a});
define("tdv/util/Map",["require"],function(){function a(){this.YG=l++;this.kS="_map_"+this.YG+"_key";this.M0={};this.ps=[];this.length=0}var l=0;a.prototype.set=a.prototype.add=function(k,n){this.ps.indexOf(k)<0&&this.ps.push(k);if(typeof k==="object"&&k!==null){var g=k[this.kS];if(!g){g=this.kS;for(var h=[],e=0;e<8;e++)h.push(Math.floor(Math.random()*16).toString(16));g=k[g]=h.join("")}}else g=k;this.M0[g]=n;this.length=this.ps.length};a.prototype.get=function(k){return this.M0[typeof k==="object"&&
k!==null?k[this.kS]:k]};a.prototype.Vdb=function(k){return this.ps.indexOf(k)>=0};a.prototype.remove=function(k){var n=this.ps.indexOf(k);n<0||(this.ps.splice(n,1),typeof k==="object"&&k!==null?(n=k[this.kS],delete k[this.kS]):n=k,delete this.M0[n],this.length=this.ps.length)};a.prototype.forEach=function(k){this.ps.slice().forEach(function(n){k(n,this.get(n))}.bind(this))};a.prototype.dispose=function(){for(;this.ps.length;)this.remove(this.ps.pop());this.ps=this.M0=null};return a});
define("tdv/player/view/panorama/renderer/object/util/EventAggregator",["require","tdv/utils","tdv/events/EventDispatcher","tdv/util/Map"],function(a){function l(){this.XI=[]}var k=a("tdv/utils"),n=a("tdv/events/EventDispatcher"),g=a("tdv/util/Map");a=k.extend(n,function(h){n.call(this);this.Wf=h;this.xd=[];this.xy=new g;this.jV=[];this.tda=[];this.uM=this.uM.bind(this)});a.prototype.fg=function(h){this.xd.forEach(function(e){if(e.removeEventListener)e.removeEventListener(this.Wf,this.uM);else if(e.h)e.h(this.Wf,
this.uM,this,!0);else throw"invalid instance type";}.bind(this));this.xd=h.slice();this.xd.forEach(function(e){if(e.addEventListener)e.addEventListener(this.Wf,this.uM);else if(e.bind)e.bind(this.Wf,this.uM,this,!0);else throw"invalid instance type";this.xy.Vdb(e)||this.xy.set(e,new l)}.bind(this));this.Zja()};a.prototype.dispose=function(){this.fg([]);this.xd=null;this.xy.dispose();this.tda=this.jV=this.xy=null};a.prototype.io=function(h){this.jV.push(h);this.Zja();return this};a.prototype.$q=function(h){this.tda.push(h);
return this};a.prototype.aw=function(h){this.xd.forEach(function(e){h(e,this.xy.get(e).XI)}.bind(this))};a.prototype.Mn=function(h){h=this.xy.get(h).XI;return h.length==0?null:h[h.length-1]};a.prototype.uM=function(h){var e=h.target||h.source;if(e=this.xy&&this.xy.get(e))e.XI.push(h),this.tda.forEach(function(b){b(h,this)}.bind(this)),this.Zja()};a.prototype.Zja=function(){if(this.xd.length!=0){for(var h=0;h<this.xd.length;h++)if(this.xy.get(this.xd[h]).XI.length==0)return;this.jV.length&&(h=this.jV.slice(),
this.jV=[],h.forEach(function(e){e(this)}.bind(this)))}};return a});
define("tdv/player/view/panorama/renderer/object/texturesource/TextureQueue","require tdv/utils tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/panorama/renderer/3d/util/TextureUtil tdv/player/view/panorama/renderer/3d/util/Util tdv/view/util/Animation tdv/player/view/util/XR tdv/player/view/util/ScreenFrameRateMonitor".split(" "),function(a){function l(){t||q.length===0||(f.P6?g():k())}function k(){r||(r=!0,f.requestFrame(n,null))}function n(){r=!1;u=void 0;g()}function g(){if(!t){u===
void 0&&(u=Date.now());for(var y=1E3/p.gJa()*.4;q.length&&Date.now()-u<y;)q.shift().add(!0);q.length&&k()}}var h=a("tdv/utils"),e=a("tdv/constants/EventName"),b=a("tdv/events/EventDispatcher"),c=a("tdv/player/view/panorama/renderer/3d/util/TextureUtil"),d=a("tdv/player/view/panorama/renderer/3d/util/Util"),f=a("tdv/view/util/Animation"),m=a("tdv/player/view/util/XR"),p=a("tdv/player/view/util/ScreenFrameRateMonitor"),q=[],r=!1,t=!1,u=void 0,v={add:function(y,x,z,A){var D=q.find(function(E){E.texture===
x});D?(D.source=z,D.renderer=y):(D=new w(y,x,z),q.push(D));A&&D.bind(e.ia,A,this,!0);l();return D},fla:function(y,x,z){y=new w(y,x,z);y.add(!0);return y}};d.x$a(function(y){v.eY(y)});v.eY=function(y){if(t!==y)if(t=y)for(;q.length;)q.shift().add();else l()};var w=h.extend(b,function(y,x,z){b.call(this);this.renderer=y;this.texture=x;this.source=z});w.prototype.add=function(y){c.EY(this.texture,this.source);!m.isPresenting&&this.renderer&&y&&this.renderer.initTexture(this.texture);this.m(e.ia)};w.prototype.remove=
function(){var y=q.indexOf(this);y>=0&&q.splice(y,1);c.EY(this.texture,null)};return v});
define("tdv/player/view/panorama/renderer/object/texturesource/TextureSource","require tdv/utils tdv/constants/EventName tdv/constants/Priority tdv/events/EventDispatcher tdv/player/view/panorama/renderer/3d/util/MaterialUtil tdv/player/view/panorama/renderer/3d/util/TextureUtil tdv/player/view/util/Device".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/constants/Priority"),g=a("tdv/events/EventDispatcher"),h=a("tdv/player/view/panorama/renderer/3d/util/MaterialUtil"),
e=a("tdv/player/view/panorama/renderer/3d/util/TextureUtil"),b=a("tdv/player/view/util/Device"),c=l.extend(g,function(){g.call(this);this.Of=void 0;this.Ma=e.createTexture();this.Ma.colorSpace=THREE.SRGBColorSpace;this.yfa=this.bfa=this.Fea=!1;this.H=c.oQ;this.hS=n.Mp;this.o=null});c.prototype.type=function(){return this.Of};c.prototype.texture=function(){return this.Ma};c.prototype.material=function(){return this.Ma&&e.PJa(this.Ma)};c.prototype.Te=function(){var d=this.Ma&&e.PJa(this.Ma);return d&&
h.rJa(d)};c.prototype.pib=function(d){this.hS=d};c.prototype.Zhb=function(d){this.Fea!==d&&(this.Fea=d,this.REa())};c.prototype.WX=function(d){this.yfa!==d&&(this.yfa=d,this.YEa())};c.prototype.Hpa=function(d){this.bfa!==d&&(this.bfa=d,this.YEa())};c.prototype.YEa=function(){var d=this.yfa&&!this.bfa;!!this.Ma.isVideoTexture!==d&&(this.Ma.isVideoTexture=d,this.XNa(),this.REa())};c.prototype.REa=function(){this.Fea?this.Ma.colorSpace=THREE.LinearSRGBColorSpace:!this.Ma.isVideoTexture||b.Ub()!=b.Xw&&
b.Ub()!=b.Ok&&b.Ub()!=b.Ii?this.Ma.colorSpace=THREE.SRGBColorSpace:this.Ma.colorSpace=THREE.LinearSRGBColorSpace};c.prototype.load=function(d){this.H===c.oQ&&(this.o=d,this.H=c.wZ,this.Nba())};c.prototype.dab=function(){this.loading()&&(this.H==c.wZ?this.b4():this.yU(),this.H=c.oQ)};c.prototype.VQa=function(){this.H!=c.oQ&&(this.H==c.wZ?this.b4():this.H==c.Daa?this.yU():this.TU(),this.H=c.oQ)};c.prototype.XNa=function(){if(this.Ma){var d=this.material(),f=e.createTexture();f.flipY=this.Ma.flipY;f.format=
this.Ma.format;f.colorSpace=this.Ma.colorSpace;this.Ma.isVideoTexture&&(f.isVideoTexture=!0,f.update=function(){});e.dispose(this.Ma);d&&e.xPa(f,d);d&&h.G$a(d,f);this.Ma=f;this.$ga()}};c.prototype.$ga=function(){};c.prototype.Nba=function(){};c.prototype.b4=function(){};c.prototype.Lba=function(){};c.prototype.yU=function(){};c.prototype.TU=function(){e.qab(this.texture)};c.prototype.loading=function(){return this.H==c.wZ||this.H==c.Daa};c.prototype.Mna=function(){return this.H==c.Caa||this.H==c.Ssa};
c.prototype.dispose=function(){e.dispose(this.Ma);this.Ma=null};c.prototype.xM=function(d){this.H=d?c.Daa:c.Ssa;d?this.Lba():this.m(k.ad)};c.prototype.kza=function(){this.H=c.Caa;this.m(k.ia)};c.oQ="initial";c.wZ="loading";c.Daa="adding";c.Ssa="error loading";c.Caa="added";c.aUa="custom";c.bUa="image tile";c.smb="image animation";c.tmb="video 360";return c});
define("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource","require tdv/utils tdv/constants/EventName tdv/player/view/image/Item tdv/player/view/image/Repository tdv/player/view/panorama/renderer/object/texturesource/TextureQueue tdv/player/view/panorama/renderer/object/texturesource/TextureSource".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/player/view/image/Item"),g=a("tdv/player/view/image/Repository"),h=a("tdv/player/view/panorama/renderer/object/texturesource/TextureQueue"),
e=a("tdv/player/view/panorama/renderer/object/texturesource/TextureSource");a=l.extend(e,function(b){e.call(this);this.Of=e.aUa;this.ke=b;this.ke||(this.H=e.Caa);this.dh=this.ae=null;this.hI=this.iI=void 0});a.prototype.$n=function(b){this.dh=b;h.add(this.o,this.Ma,this.dh,function(){var c=this.Ma&&this.Ma.image&&this.Ma.image.width||void 0,d=this.Ma&&this.Ma.image&&this.Ma.image.height||void 0;this.iI===void 0||this.hI===void 0||this.iI===c&&this.hI===d||this.XNa();this.iI=c;this.hI=d}.bind(this))};
a.prototype.xg=function(){return g.xg(this.ke)};a.prototype.update=function(b){b?h.add(this.o,this.Ma,this.dh):h.fla(this.o,this.Ma,this.dh)};a.prototype.Nba=function(){this.ke?this.ZQ():this.xM(!0)};a.prototype.b4=function(){this.fs()};a.prototype.Lba=function(){this.kza()};a.prototype.TU=function(){this.fs()};a.prototype.dispose=function(){this.fs();e.prototype.dispose.call(this)};a.prototype.Ke=function(){this.xM(!0)};a.prototype.th=function(){this.xM(!1)};a.prototype.$ga=function(){this.dh&&h.fla(this.o,
this.Ma,this.dh)};a.prototype.ZQ=function(){this.ae||(this.ae=new n,this.ae.AP([this.ke]),this.ae.bind(k.ia,this.Ke,this,!0),this.ae.bind(k.ad,this.th,this,!0),g.rA(this.ae,this.hS))};a.prototype.fs=function(){this.ae&&(this.ae.h(k.ia,this.Ke,this,!0),this.ae.h(k.ad,this.th,this,!0),g.eo(this.ae,this.hS),this.ae=null)};return a});
define("tdv/player/view/panorama/renderer/object/texturesource/ImageTextureSource","require tdv/utils tdv/constants/EventName tdv/player/view/image/Item tdv/player/view/image/Repository tdv/player/view/panorama/renderer/object/texturesource/TextureQueue tdv/player/view/panorama/renderer/object/texturesource/TextureSource".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/player/view/image/Item"),g=a("tdv/player/view/image/Repository"),h=a("tdv/player/view/panorama/renderer/object/texturesource/TextureQueue"),
e=a("tdv/player/view/panorama/renderer/object/texturesource/TextureSource");a=l.extend(e,function(b){e.call(this);this.Of=e.bUa;this.ke=b;this.dh=this.VM=this.ae=null});a.prototype.xg=function(){return this.dh};a.prototype.Nba=function(){this.ZQ()};a.prototype.b4=function(){this.fs()};a.prototype.Lba=function(){this.jYa()};a.prototype.yU=function(){this.fs();this.eda()};a.prototype.TU=function(){this.fs();this.eda()};a.prototype.dispose=function(){this.fs();this.eda();e.prototype.dispose.call(this)};
a.prototype.Ke=function(){this.dh=g.xg(this.ke);this.xM(!0)};a.prototype.th=function(){this.xM(!1)};a.prototype.lza=function(){this.kza()};a.prototype.$ga=function(){this.dh&&h.fla(this.o,this.Ma,this.dh)};a.prototype.ZQ=function(){this.ae||(this.ae=new n,this.ae.AP([this.ke]),this.ae.bind(k.ia,this.Ke,this,!0),this.ae.bind(k.ad,this.th,this,!0),g.rA(this.ae,this.hS))};a.prototype.fs=function(){this.ae&&(this.ae.h(k.ia,this.Ke,this,!0),this.ae.h(k.ad,this.th,this,!0),g.eo(this.ae,this.hS),this.ae=
null)};a.prototype.jYa=function(){this.VM=h.add(this.o,this.Ma,this.dh);this.VM.bind(k.ia,this.lza,this,!0)};a.prototype.eda=function(){this.VM&&(this.VM.h(k.ia,this.lza,this,!0),this.VM.remove(),this.VM=null)};return a});
define("tdv/player/view/panorama/renderer/object/texturesource/ImageTileTextureSource",["require","tdv/utils","tdv/player/view/image/Repository","tdv/player/view/panorama/renderer/3d/util/TextureUtil","tdv/player/view/panorama/renderer/object/texturesource/ImageTextureSource"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/image/Repository"),n=a("tdv/player/view/panorama/renderer/3d/util/TextureUtil"),g=a("tdv/player/view/panorama/renderer/object/texturesource/ImageTextureSource");a=l.extend(g,
function(h,e,b,c,d){g.call(this,h.get("url"));this.dc=e;this.ec=b;this.Pa=c;this.Ha=d;this.C1a=this.dc!=0||this.ec!=0||this.Pa!=h.get("width")||this.Ha!=h.get("height")});a.prototype.Ke=function(){this.C1a?(this.pYa(),this.fs(),this.xM(!!this.dh)):g.prototype.Ke.call(this)};a.prototype.yU=function(){g.prototype.yU.call(this);this.fda()};a.prototype.TU=function(){g.prototype.TU.call(this);this.fda()};g.prototype.dispose=function(){g.prototype.dispose.call(this);this.fda()};a.prototype.pYa=function(){var h=
k.xg(this.ke);this.dh=n.lbb(h,this.dc,this.ec,this.Pa,this.Ha)};a.prototype.fda=function(){this.dh&&(n.Wla(this.dh),this.dh=null)};return a});
define("tdv/player/view/panorama/renderer/object/util/MeshFactory","require tdv/player/parser/ClassInfo tdv/player/view/panorama/renderer/constants/EyeLayer tdv/player/view/panorama/renderer/constants/Face tdv/player/view/panorama/renderer/3d/util/Util tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource tdv/player/view/panorama/renderer/object/texturesource/ImageTextureSource tdv/player/view/panorama/renderer/object/texturesource/ImageTileTextureSource tdv/player/view/panorama/renderer/3d/util/GeometryUtil tdv/player/view/panorama/renderer/3d/util/MaterialUtil tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/object/util/PanoramaFormat tdv/player/view/panorama/renderer/object/util/LevelUtil tdv/player/view/panorama/renderer/TextureLoader tdv/player/view/util/Device".split(" "),function(a){var l=
a("tdv/player/parser/ClassInfo"),k=a("tdv/player/view/panorama/renderer/constants/EyeLayer"),n=a("tdv/player/view/panorama/renderer/constants/Face"),g=a("tdv/player/view/panorama/renderer/3d/util/Util"),h=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource"),e=a("tdv/player/view/panorama/renderer/object/texturesource/ImageTextureSource"),b=a("tdv/player/view/panorama/renderer/object/texturesource/ImageTileTextureSource"),c=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),
d=a("tdv/player/view/panorama/renderer/3d/util/MaterialUtil"),f=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),m=a("tdv/player/view/panorama/renderer/object/util/PanoramaFormat"),p=a("tdv/player/view/panorama/renderer/object/util/LevelUtil"),q=a("tdv/player/view/panorama/renderer/TextureLoader"),r=a("tdv/player/view/util/Device"),t={Vab:function(u,v){var w=m.get(u);switch(w){case m.GB:case m.nx:case m.Km:return this.UXa(w,u,v);case m.Ir:case m.Rr:case m.zu:return this.WXa(w,u,v)}},pbb:function(u,
v){var w=new e(v.get("posterURL"));w.WX(!0);return this.Bva(u,v,w)},obb:function(u,v){var w=new h;w.WX(!0);return this.Bva(u,v,w)},Bva:function(u,v,w){var y=u.get("hfov"),x=u.get("vfov"),z=u.get("pitch"),A=v.get("width");v=v.get("url");u=m.get(u);var D=u==m.zu?2:1,E=u==m.Rr?2:1;u=D+E>2?[k.eb,k.Db]:[k.Ww];var B=Math.round(A/D);A=new d.Jp(v);var C=d.rm(w.texture(),A);q.zP(C,w);C.visible=!0;return u.map(function(F,G){G=c.OHa(y,x,z,1,1,G%D/D,(E-1-Math.floor(G/D))/E,1/D,1/E);G=f.create(G,[C]);G.layers.set(F);
q.Y8(G,B/y);return G}.bind(this))},gbb:function(u){var v=[n.Db,n.eb,n.Tc,n.Fc,n.FRONT,n.BACK].map(function(){var y=new h;y.$n(t.k0a(u));var x=d.rm(y.texture());q.zP(x,y);x.visible=!0;return x}),w=c.NHa(1,1);v=f.create(w,v);q.Y8(v,256/90);v.layers.set(k.Ww);return v},aja:{},k0a:function(u){if(!t.aja[u]){var v=document.createElement("canvas");v.width=v.height=256;var w=v.getContext("2d");w.fillStyle=u;w.fillRect(0,0,v.width,v.height);t.aja[u]=v}return t.aja[u]},UXa:function(u,v,w){var y=u==m.GB?[k.Db,
k.eb]:[k.Ww],x=v.get("flipImageHorizontally");x&&(y=y.reverse());var z=u==m.Km?1:6*y.length,A=w.get("width")/z,D=w.get("height");if(l.Qa("TiledImageResourceLevel",w)){var E=w.get("colCount",z)/z;var B=w.get("rowCount",1)}else this.rCa(u,w)?(E=Math.ceil(A/g.xx()),B=Math.ceil(D/g.xx())):B=E=1;var C=[n.Db,n.eb,n.Tc,n.Fc,n.FRONT,n.BACK];return y.map(function(F,G){var I=Array(6);C.forEach(function(Q,R){var K=p.Dma(v,w,Q);l.Qa("TiledImageResourceLevel",w)?I[c.Vsa.indexOf(Q)]=this.QXa(K,u,F,Q,x,E,B):I[c.Vsa.indexOf(Q)]=
this.vva(K,E,B,u==m.Km?0:Math.round((G*C.length+R)*A),0,A,D,E>1||B>1||u!=m.Km?A>256?1:.5:0)}.bind(this));var N=Array.prototype.concat.apply([],I),P=c.NHa(E,B);N=f.create(P,N);N.layers.set(F);q.Y8(N,A/90);return N}.bind(this))},WXa:function(u,v,w){var y=u==m.Ir?[k.Ww]:[k.eb,k.Db];v.get("flipImageHorizontally")&&(y=y.reverse());var x=w.get("width"),z=w.get("height"),A=v.get("hfov"),D=v.get("vfov"),E=v.get("pitch"),B=Math.round(x/A/(z/D)),C=Math.round(x/B),F=Math.round(z/Math.round(z/D/(x/A))),G=(u=
this.rCa(u,w))?Math.ceil(C/g.xx()):1,I=u?Math.ceil(F/g.xx()):1;return y.map(function(N,P){P=this.vva(w,G,I,P%B*C,Math.floor(P/B)*F,C,F);var Q=c.OHa(A,D,E,G,I,0,0,1,1);P=f.create(Q,P);P.layers.set(N);q.Y8(P,C/A);return P}.bind(this))},rCa:function(u,v){switch(u){case m.GB:case m.nx:case m.Rr:case m.zu:return!0;case m.Km:return!1;case m.Ir:return r.Edb().maxTextureSize<Math.max(v.get("width"),v.get("height"))?!0:g.Wq()||r.ub()?!1:r.Dc()==r.kB?!0:!1}},vva:function(u,v,w,y,x,z,A,D){D||(D=0);for(var E=
[],B=0;B<w;B++)for(var C=x+D+(A-2*D)*B/w,F=x+D+(A-2*D)*(B+1)/w,G=0;G<v;G++){var I=y+D+(z-2*D)*G/v,N=y+D+(z-2*D)*(G+1)/v;I=u?new b(u,I,C,N-I,F-C):new h;N=d.Kla(I.texture());q.zP(N,I);E.push(N)}return E},QXa:function(u,v,w,y,x,z,A){for(var D=[],E=0;E<A;E++)for(var B=0;B<z;B++){var C=u?new e(p.QJa(u,v,w,y,x,A,E,B)):new h;var F=d.Kla(C.texture());q.zP(F,C);F.visible=!1;D.push(F)}return D}};return t});
define("tdv/player/view/panorama/renderer/object/SolidFrame","require tdv/utils tdv/constants/EventName tdv/player/view/panorama/renderer/object/Frame tdv/player/view/panorama/renderer/object/util/EventAggregator tdv/player/view/panorama/renderer/object/util/MeshFactory tdv/player/view/panorama/renderer/TextureLoader".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/player/view/panorama/renderer/object/Frame"),g=a("tdv/player/view/panorama/renderer/object/util/EventAggregator"),
h=a("tdv/player/view/panorama/renderer/object/util/MeshFactory"),e=a("tdv/player/view/panorama/renderer/TextureLoader");a=l.extend(n,function(b){n.call(this);this.Ie=b;this.set("tag","SolidFrame");this.Lh=null});a.prototype.fc=function(){this.Lh=(new g(k.ia)).io(this.Ke.bind(this));n.prototype.fc.call(this)};a.prototype.lc=function(){this.Lh.dispose();n.prototype.lc.call(this)};a.prototype.Yp=function(){var b=[h.gbb(this.Ie)];e.RA(b,e.su);e.QA(b,e.Hr);this.Lh.fg(b);return b};a.prototype.Ke=function(){this.m(k.ud);
this.m(k.ia)};return a});
define("tdv/player/view/panorama/control/transition/steps/FadeInVR","require tdv/utils tdv/player/view/panorama/control/transition/steps/Step tdv/player/view/panorama/renderer/object/SolidFrame tdv/view/util/Ease tdv/view/util/EaseDimension tdv/player/view/util/XR".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/player/view/panorama/control/transition/steps/Step"),n=a("tdv/player/view/panorama/renderer/object/SolidFrame"),g=a("tdv/view/util/Ease"),h=a("tdv/view/util/EaseDimension"),e=a("tdv/player/view/util/XR");
a=l.extend(k,function(b,c,d,f){k.call(this,b,c,d,f);this.ka=null;this.Pb=!1});a.prototype.Ah=function(){return this.Pb};a.prototype.Ch=function(b){if(!this.Pb){this.I.Hm||(this.I.Hm=new n("#000000"),this.I.Hm.set("alpha",1),this.o.add(this.I.Hm));if(!this.ka){this.I.Hm.wi();var c=this.I.rla*2;this.ka=new g("linear",[new h("alpha",2,0,void 0)],c);this.I.Hm.wi()}this.ka.Lb(b);this.I.Hm.set("alpha",Math.min(.99,this.ka.nb("alpha")));this.o.cg(this.I.$c).set("alpha",1);this.ka&&this.ka.Re()&&(this.Pb=
!0,this.o.remove(this.I.Hm),this.I.Hm=null);e.nd.forEach(function(d){e.Ppa(d,!this.Pb)}.bind(this))}};return a});
define("tdv/player/view/panorama/control/transition/steps/FadeOut","require tdv/utils tdv/player/view/panorama/control/transition/steps/Step tdv/player/view/panorama/renderer/3d/util/Util tdv/view/util/Ease tdv/view/util/EaseDimension".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/player/view/panorama/control/transition/steps/Step"),n=a("tdv/player/view/panorama/renderer/3d/util/Util"),g=a("tdv/view/util/Ease"),h=a("tdv/view/util/EaseDimension");a=l.extend(k,function(e,b,c,d){k.call(this,e,
b,c,d);this.Kj=this.o.R.Kc();this.ka=null;this.Pb=!1});a.prototype.Ah=function(){return this.Pb};a.prototype.Ch=function(e){if(!this.Pb){if(!this.ka){n.e9(!0);this.Kj.PE();this.o.cg(this.I.Eh).set("alpha",0);var b=this.I.YHa;this.ka=new g("linear",[new h("position",0,1,void 0)],b)}this.ka.Lb(e);this.Kj.CE(this.ka.nb("position"));this.ka.Re()&&(this.Pb=!0,this.Kj.ID(),n.e9(!1))}};return a});
define("tdv/player/view/panorama/control/transition/steps/FadeOutVR","require tdv/utils tdv/player/view/panorama/control/transition/steps/Step tdv/player/view/panorama/renderer/object/SolidFrame tdv/view/util/Ease tdv/view/util/EaseDimension tdv/player/view/util/XR".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/player/view/panorama/control/transition/steps/Step"),n=a("tdv/player/view/panorama/renderer/object/SolidFrame"),g=a("tdv/view/util/Ease"),h=a("tdv/view/util/EaseDimension"),e=a("tdv/player/view/util/XR");
a=l.extend(k,function(b,c,d,f){k.call(this,b,c,d,f);this.ka=null;this.Pb=!1});a.prototype.Ah=function(){return this.Pb};a.prototype.Ch=function(b){if(!this.Pb){this.I.Hm||(this.I.Hm=new n("#000000"),this.I.Hm.set("alpha",0),this.o.add(this.I.Hm));if(!this.ka){this.I.Hm.wi();var c=this.I.YHa*2;this.ka=new g("linear",[new h("alpha",0,2,void 0)],c)}this.ka.Lb(b);b=Math.min(1,this.ka.nb("alpha"));this.I.Hm.set("alpha",b);e.nd.forEach(function(d){e.Ppa(d,!0)});b==1&&this.o.cg(this.I.Eh).set("alpha",0);
this.ka.Re()&&(this.Pb=!0)}};return a});
define("tdv/player/view/panorama/control/transition/steps/MoveFromTranslationPosition",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/Step","tdv/view/util/Ease","tdv/view/util/EaseDimension"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/panorama/control/transition/steps/Step"),n=a("tdv/view/util/Ease"),g=a("tdv/view/util/EaseDimension");a=l.extend(k,function(h,e,b,c){k.call(this,h,e,b,c);this.ka=null;this.Pb=!1});a.prototype.Ah=function(){return this.Pb};a.prototype.Ch=
function(h){if(!this.Pb){if(!this.ka){var e=this.o.ff(),b=this.Uc.F8(this.I.$c,e),c=!this.I.ob()&&Math.abs(e-b)>.01?this.I.Z9:1;this.ka=new n("cubic_in_out",[new g("hfov",e,b,void 0)],c)}this.ka.Lb(h);this.Uc.hr(this.ka.nb("hfov"));this.ka.Re()&&(this.Uc.YX(!0),this.Pb=!0)}};return a});
define("tdv/player/view/panorama/control/transition/steps/MoveToInitialPosition",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/Step","tdv/view/util/Ease","tdv/view/util/EaseDimension"],function(a){function l(e,b,c){for(;e<b;)e+=c-b;for(;e>c;)e-=c-b;return e}var k=a("tdv/utils"),n=a("tdv/player/view/panorama/control/transition/steps/Step"),g=a("tdv/view/util/Ease"),h=a("tdv/view/util/EaseDimension");a=k.extend(n,function(e,b,c,d){n.call(this,e,b,c,d);this.ka=null;this.Pb=
!1;this.s1=0});a.prototype.Ah=function(){return this.Pb};a.prototype.Ch=function(e){this.Pb||(this.ka||(this.ka=this.s1<this.I.Sq.length?this.fYa(this.s1):this.LXa()),this.ka.Lb(e),this.Uc.Spa(this.ka.nb("yaw"),this.ka.nb("pitch")),this.Uc.hr(this.ka.nb("hfov")),this.Uc.YJ(this.ka.nb("stereographicFactor")),this.ka.Re()&&(this.ka=null,this.s1++,this.s1>this.I.Sq.length&&(this.Uc.YX(!0),this.Pb=!0)))};a.prototype.LXa=function(){var e=l(this.o.Lc(),-180,180),b=this.o.Jc();this.o.Jg();var c=this.o.ff(),
d=this.o.H.Jk,f=this.I.zh.get("hfov");f={$a:this.I.zh.get("yaw"),pitch:this.I.zh.get("pitch",b),kh:this.o.Jg(),Ud:f?this.Uc.RI(f):c,Jk:0};this.Uc.shb(this.I.$c,f);f.$a=l(f.$a,e-180,e+180);var m=Math.abs(c-f.Ud)>.5,p=Math.abs(d-f.Jk),q=p>.01;m=this.I.ob()?1:Math.max(m?this.I.Z9:1,q?this.I.$Ma*p:1);return new g(q?"linear":"cubic_in_out",[new h("yaw",e,f.$a,void 0),new h("pitch",b,f.pitch,void 0),new h("hfov",c,f.Ud,void 0),new h("stereographicFactor",d,f.Jk,void 0)],m)};a.prototype.fYa=function(e){var b=
this.I.Sq[e],c=l(this.o.Lc(),-180,180),d=this.o.Jc();this.o.Jg();var f=this.o.ff(),m=this.o.H.Jk,p=b.get("targetStereographicFactor",m),q=b.get("targetHfov");if(q)q=this.Uc.RI(q);else{for(q=!1;e<this.I.Sq.length&&!q;e++)q=this.I.Sq[e].get("targetHfov")!==void 0;q?q=f:(q=this.Uc.RI(this.I.zh.get("hfov",this.Uc.THa())),q=f+(q-f)*(m-p))}e=b.get("targetYaw",c);var r=b.get("targetPitch",d);this.o.Jg();switch(b.get("path")){case "left":e=l(e,c-360,c);break;case "right":e=l(e,c,c+360);break;case "longest":e=
l(e,-360,360);e=e>=c?l(e,c,c+360):l(e,c-360,c);break;default:e=l(e,c-180,c+180)}return new g(b.get("easing"),[new h("yaw",c,e,b.get("yawSpeed")),new h("pitch",d,r,b.get("pitchSpeed")),new h("hfov",f,q,b.get("hfovSpeed")),new h("stereographicFactor",m,p,b.get("stereographicFactorSpeed"))],b.get("duration"))};return a});
define("tdv/player/view/panorama/control/transition/steps/MoveToOriginPosition",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/Step","tdv/view/util/Ease","tdv/view/util/EaseDimension"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/panorama/control/transition/steps/Step"),n=a("tdv/view/util/Ease"),g=a("tdv/view/util/EaseDimension");a=l.extend(k,function(h,e,b,c){k.call(this,h,e,b,c);this.ka=null;this.Pb=!1});a.prototype.Ah=function(){return this.Pb};a.prototype.Ch=
function(h){if(!this.Pb){if(!this.ka){var e=this.o.Jc(),b=this.o.ff(),c=this.o.H.Jk,d=this.I.vg.get("stereographicFactor",0),f=Math.abs(c-d),m=d>0?this.I.vg.get("pitch",e):e,p=this.I.vg.get("hfov");p=p?this.Uc.RI(p):b;d==0&&(p=Math.min(b,this.Uc.F8(this.I.$c,p)));this.Uc.YX(!1);f=this.I.ob()?1:Math.max(Math.abs(b-p)>.5?this.I.Z9:1,f>.01?this.I.$Ma:1);this.ka=new n("cubic_in_out",[new g("hfov",b,p,void 0),new g("pitch",e,m,void 0),new g("stereographicFactor",c,d,void 0)],f)}this.ka.Lb(h);this.Uc.hr(this.ka.nb("hfov"));
this.Uc.YJ(this.ka.nb("stereographicFactor"));this.Uc.Spa(this.o.Lc(),this.ka.nb("pitch"));this.ka.Re()&&(this.Uc.Sf(this.I.$c,this.I.vg.get("yaw"),this.I.vg.get("pitch",this.o.Jc())),this.Pb=!0)}};return a});
define("tdv/player/view/panorama/control/transition/steps/MoveToTranslationPosition",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/Step","tdv/view/util/Ease","tdv/view/util/EaseDimension"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/panorama/control/transition/steps/Step"),n=a("tdv/view/util/Ease"),g=a("tdv/view/util/EaseDimension");a=l.extend(k,function(h,e,b,c){k.call(this,h,e,b,c);this.ka=null;this.Pb=!1});a.prototype.Ah=function(){return this.Pb};a.prototype.Ch=
function(h){if(!this.Pb){if(!this.ka){var e=this.o.ff(),b=Math.min(this.Uc.F8(this.I.$c,e),e),c=!this.I.ob()&&Math.abs(e-b)>.01?this.I.Z9:1;this.ka=new n("cubic_in_out",[new g("hfov",e,b,void 0)],c);this.Uc.YX(!1)}this.ka.Lb(h);this.Uc.hr(this.ka.nb("hfov"));this.ka.Re()&&(this.Uc.Sf(this.I.$c,this.o.Lc()+this.I.KP.aJa(),this.o.Jc()),this.Pb=!0)}};a.prototype.pJ=function(){return!0};return a});
define("tdv/player/view/panorama/control/transition/steps/Remove",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=l.extend(k,function(n,g,h,e){k.call(this,n,g,h,e)});a.prototype.Oh=function(){var n=this.o.cg(this.I.Eh);this.o.remove(n)};return a});
define("tdv/player/view/panorama/control/transition/steps/RemoveProjectedPanoramasFromModel",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=l.extend(k,function(n,g,h,e){k.call(this,n,g,h,e)});a.prototype.Oh=function(){var n=(this.I.nc||this.I.Ec).get("model");n.set("objects",n.get("objects").filter(function(g){return g!=this.I.ye}.bind(this)));
[this.I.ye.get("sourceCubeTexture"),this.I.ye.get("targetCubeTexture")].forEach(function(g){g&&g.dispose()});this.I.ye=null};return a});
define("tdv/player/view/panorama/control/transition/steps/RequestViewerArea",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=l.extend(k,function(n,g,h,e){k.call(this,n,g,h,e)});a.prototype.Oh=function(){var n=[this.o.ld];this.H1a()&&n.push(this.I.Wh);this.o.ld.MJ(n)};a.prototype.H1a=function(){return this.I.Ec?!0:this.o.ld.get("keepModel3DLoadedWithoutLocation")&&
this.I.Eh&&this.I.Wh&&this.I.Wh.get("model")?!0:!1};return a});
define("tdv/player/view/panorama/control/transition/steps/RestoreModelPosition",["require","exports","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a,l,k){return function(n){function g(h,e,b,c){return n.call(this,h,e,b,c)||this}O(g,n);g.prototype.Oh=function(){var h,e,b;(b=(e=(h=this.I.Wh)===null||h===void 0?void 0:h.get("model"))===null||e===void 0?void 0:e.get("camera"))===null||b===void 0||b.nhb()};return g}(k)});
define("tdv/player/view/panorama/control/transition/steps/SetInitialPosition",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=l.extend(k,function(n,g,h,e){k.call(this,n,g,h,e)});a.prototype.Oh=function(){this.Uc.Sf(this.I.$c,this.I.zh.get("yaw"),this.I.zh.get("pitch",this.o.Jc()));var n=this.I.zh.get("hfov");n&&(n=this.Uc.RI(n),this.Uc.hr(n))};
return a});
define("tdv/player/view/panorama/control/transition/steps/SetInitialPositionFromModel",["require","tdv/utils","tdv/player/view/util/geo/Fov","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var l=a("tdv/utils");a("tdv/player/view/util/geo/Fov");var k=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=l.extend(k,function(n,g,h,e){k.call(this,n,g,h,e)});a.prototype.Oh=function(){var n=this.I.Ec.get("model").get("camera");if(this.I.dK.get("keepInitialPositionOnTranslation")){var g=this.I.zh.get("yaw");
n=this.I.zh.get("pitch")}else g=n.get("yaw")-this.I.Ec.get("yaw"),n=this.I.dK.get("enterPointingToHorizon")?0:n.get("pitch");this.Uc.Sf(this.I.$c,g,n);if(g=this.I.zh.get("hfov"))g=this.Uc.RI(g),this.Uc.hr(g)};return a});
define("tdv/player/view/panorama/control/transition/steps/SetInitialPositionThroughModel",["require","tdv/utils","tdv/player/view/util/geo/Quaternion","tdv/player/view/util/XR","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/util/geo/Quaternion"),n=a("tdv/player/view/util/XR"),g=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=l.extend(g,function(h,e,b,c){g.call(this,h,e,b,c)});a.prototype.Oh=
function(){if(n.isPresenting){var h=k.G9(n.ug,!0);this.I.Ec.get("model").get("camera");var e=h.$a-this.I.Ec.get("yaw");h=h.pitch}else this.I.dK.get("keepInitialPositionOnTranslation")?(e=this.I.zh.get("yaw"),h=this.I.zh.get("pitch")):(h=this.I.Ec.get("model").get("camera"),e=h.get("yaw")-this.I.Ec.get("yaw"),h=h.get("pitch"));this.Uc.Sf(this.I.$c,e,h)};return a});
define("tdv/player/view/panorama/control/transition/steps/SetModelInitialPosition",["require","tdv/utils","tdv/constants/EventName","tdv/player/view/panorama/control/transition/steps/Step"],function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/player/view/panorama/control/transition/steps/Step");a=l.extend(n,function(g,h,e,b){n.call(this,g,h,e,b);this.Ea=null;this.Pb=!1});a.prototype.L2a=function(){this.Pb=!0};a.prototype.Ah=function(){return this.Pb};a.prototype.Ch=function(){if(!this.Ea&&
(this.Ea=this.I.nc.get("model"),this.I.Wh.get("model")==this.Ea)){var g=this.Ea.get("camera");g.set("easing",0);g.set("x",this.I.nc.get("x"));g.set("y",this.I.nc.get("y"));g.set("z",this.I.nc.get("z"));g.set("yaw",this.o.Lc()+this.I.nc.get("yaw"));g.set("pitch",this.o.Jc());g.set("fov",this.o.gb()>this.o.Kb()?this.o.xO():this.o.yO());this.Ea.bind(k.me,this.L2a,this,!0)}};return a});
define("tdv/player/view/panorama/control/transition/steps/SetModelInTransition",["require","exports","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a,l,k){a=function(n){function g(h,e,b,c,d){h=n.call(this,h,e,b,c)||this;h.value=!1;h.value=d;return h}O(g,n);g.prototype.Oh=function(){var h,e=(h=this.I.nc||this.I.Ec||this.I.Wh)===null||h===void 0?void 0:h.get("model");e&&e.get("camera").set("inTransition",this.value)};return g}(k);l=function(n){function g(h,e,b,c){return n.call(this,
h,e,b,c,!0)||this}O(g,n);return g}(a);a.fi=l;l=function(n){function g(h,e,b,c){return n.call(this,h,e,b,c,!1)||this}O(g,n);return g}(a);a.jg=l;return a});
define("tdv/player/view/panorama/control/transition/steps/SetModelPlayerEnabled",["require","exports","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a,l,k){a=function(n){function g(h,e,b,c,d){h=n.call(this,h,e,b,c)||this;h.enabled=!1;h.enabled=d;return h}O(g,n);g.prototype.Oh=function(){var h;(h=this.I.Wh)===null||h===void 0||h.o.Ua(this.enabled)};return g}(k);l=function(n){function g(h,e,b,c){return n.call(this,h,e,b,c,!0)||this}O(g,n);return g}(a);a.fi=l;l=function(n){function g(h,
e,b,c){return n.call(this,h,e,b,c,!1)||this}O(g,n);return g}(a);a.jg=l;return a});
define("tdv/player/view/panorama/control/transition/steps/SetModelRenderingPaused",["require","exports","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a,l,k){a=function(n){function g(h,e,b,c,d){h=n.call(this,h,e,b,c)||this;h.paused=!1;h.paused=d;return h}O(g,n);g.prototype.Oh=function(){var h,e=(h=this.I.Ec||this.I.nc||this.I.Wh)===null||h===void 0?void 0:h.get("model");e&&this.I.Wh.o.hPa(e,!this.paused)};return g}(k);l=function(n){function g(h,e,b,c){return n.call(this,
h,e,b,c,!0)||this}O(g,n);return g}(a);a.fi=l;l=function(n){function g(h,e,b,c){return n.call(this,h,e,b,c,!1)||this}O(g,n);return g}(a);a.jg=l;return a});
define("tdv/player/view/panorama/control/transition/steps/SetMinFaceSize",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep","tdv/player/view/panorama/control/transition/TransitionData"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep"),n=a("tdv/player/view/panorama/control/transition/TransitionData");a=l.extend(k,function(g,h,e,b){k.call(this,g,h,e,b)});a.prototype.Oh=function(){this.I.$c&&(this.I.mode==
n.Naa||this.I.mode==n.Oaa?this.I.$c.set("minFaceSize",1024):this.I.$c.set("minFaceSize",void 0))};return a});
define("tdv/player/view/panorama/control/transition/steps/SetOriginPosition",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=l.extend(k,function(n,g,h,e){k.call(this,n,g,h,e)});a.prototype.Oh=function(){var n=this.I.uqa?this.I.vg.get("stereographicFactor",0):0;this.Uc.YJ(n);this.Uc.Sf(this.I.$c,this.I.vg.get("yaw"),this.I.vg.get("pitch",this.o.Jc()));
(n=this.I.vg.get("hfov"))||this.I.Eh||(n=this.Uc.THa());n&&(n=this.Uc.RI(n),this.Uc.hr(n),this.Uc.YX(!this.I.uqa))};return a});
define("tdv/player/view/panorama/control/transition/steps/SetRenderingPaused",["require","exports","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a,l,k){a=function(n){function g(h,e,b,c,d){h=n.call(this,h,e,b,c)||this;h.paused=!1;h.paused=d;return h}O(g,n);g.prototype.Oh=function(){this.o.tPa(this.paused)};return g}(k);l=function(n){function g(h,e,b,c){return n.call(this,h,e,b,c,!0)||this}O(g,n);return g}(a);a.fi=l;l=function(n){function g(h,e,b,c){return n.call(this,
h,e,b,c,!1)||this}O(g,n);return g}(a);a.jg=l;return a});
define("tdv/player/view/panorama/control/transition/steps/SetTranslationPosition",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=l.extend(k,function(n,g,h,e){k.call(this,n,g,h,e)});a.prototype.Oh=function(){var n=this.Uc.F8(this.I.$c,this.o.ff());this.Uc.hr(n);this.Uc.Sf(this.I.$c,this.o.Lc()+this.I.KP.aJa(),this.o.Jc())};a.prototype.pJ=function(){return!0};
return a});
define("tdv/player/view/panorama/control/transition/steps/SetXRPointersVisible",["require","exports","tdv/player/view/panorama/control/transition/steps/Step","tdv/player/view/util/XR"],function(a,l,k,n){a=function(g){function h(e,b,c,d,f){e=g.call(this,e,b,c,d)||this;e.value=!1;e.ended=!1;e.wait=!1;e.Ah=function(){return this.ended};e.value=f;e.value||(e.wait=!0);return e}O(h,g);h.prototype.Ch=function(){n.nd.forEach(function(e){n.Ppa(e,!this.value)}.bind(this));this.wait?this.wait=!1:this.ended=
!0};return h}(k);l=function(g){function h(e,b,c,d){return g.call(this,e,b,c,d,!0)||this}O(h,g);return h}(a);a.fi=l;l=function(g){function h(e,b,c,d){return g.call(this,e,b,c,d,!1)||this}O(h,g);return h}(a);a.jg=l;return a});
define("tdv/player/view/panorama/control/transition/steps/ReleaseViewerArea",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=l.extend(k,function(n,g,h,e){k.call(this,n,g,h,e)});a.prototype.Oh=function(){this.I.nc&&this.I.Wh.get("model")==this.I.nc.get("model")&&this.o.ld.MJ([this.I.Wh])};return a});
define("tdv/player/view/panorama/control/transition/steps/Translate",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/Step","tdv/player/view/panorama/renderer/3d/util/Util","tdv/player/view/util/Device"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/panorama/control/transition/steps/Step"),n=a("tdv/player/view/panorama/renderer/3d/util/Util"),g=a("tdv/player/view/util/Device");a=l.extend(k,function(h,e,b,c){k.call(this,h,e,b,c);this.H="not initialized";this.Rb=0});
a.prototype.Ah=function(){return this.H=="ended"};a.prototype.Ch=function(h){this.Ah()||(this.H=="not initialized"&&this.NR(),this.H=="initialized"&&(this.Fq.get("ready")||this.Fq.ona())&&this.uU(),this.H=="started"&&this.ya(h),this.Rb>=1&&this.kR())};a.prototype.NR=function(){this.KBa=this.I.LQa;this.EQ=.25;this.nWa=.75;this.o4a=.25;this.qEa=this.q0a();this.hba=.5*this.KBa;this.w8a=this.KBa-2*this.hba;this.qH=1/(this.hba+this.w8a);this.HZ=this.qH/this.hba;this.sz=0;this.Fq=this.o.cg(this.I.$c);this.dja=
this.o.cg(this.I.Eh);this.EL=this.I.KP.Dcb();this.H="initialized"};a.prototype.q0a=function(){var h=this.I.KP.get("distance");return h?Math.min(.99,h/this.I.Eh.get("distanceToFloor")):.75};a.prototype.uU=function(){this.o.iPa(!this.I.ob()&&g.Ub()!=g.Ok);this.Fq.wi();this.H="started"};a.prototype.ya=function(h){this.Fq.get("ready")&&n.e9(!0);this.Fq.get("ready")||this.Rb<this.o4a?this.Rb>=1-.5*this.sz*this.sz/this.HZ?this.sz=Math.sqrt(2*(1-this.Rb)*this.HZ):this.sz<this.qH&&(this.sz=Math.min(this.sz+
this.HZ*h,this.qH)):this.sz=Math.max(this.sz-this.HZ*h,0);this.Rb=Math.min(Math.max(0,this.Rb+this.sz*h),1);this.Fq.get("ready")||(this.EQ=Math.max(this.EQ,this.Rb));this.E4(this.Rb,Math.max(0,Math.min(1,(this.Rb-this.EQ)/(this.nWa-this.EQ))))};a.prototype.kR=function(){this.Fq.set("alpha",1);this.o.iPa(!1);this.H="ended";n.e9(!1)};a.prototype.E4=function(h,e){var b=(h-1)*this.qEa;this.Fq.set("translationX",b*this.EL.x);this.Fq.set("translationY",b*this.EL.y);this.Fq.set("translationZ",b*this.EL.z);
this.Fq.get("ready");h*=this.qEa;this.dja.set("translationX",h*this.EL.x);this.dja.set("translationY",h*this.EL.y);this.dja.set("translationZ",h*this.EL.z);this.Fq.set("alpha",Math.max(.01,Math.min(.99,e)))};a.prototype.pJ=function(){return this.Rb<this.EQ};return a});
define("tdv/player/script/TargetModel3DCameraMovement",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DCameraMovement"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/Model3DCameraMovement");return l.define("TargetModel3DCameraMovement",k,function(){k.call(this)})});
define("tdv/player/view/panorama/control/transition/steps/TranslateModelFromPanorama","require tdv/utils tdv/constants/EventName tdv/constants/PlaybackState tdv/player/script/Model3DCameraSequence tdv/player/script/TargetModel3DCameraMovement tdv/player/view/panorama/control/transition/steps/Step tdv/player/view/util/XR".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/player/script/Model3DCameraSequence"),h=a("tdv/player/script/TargetModel3DCameraMovement"),
e=a("tdv/player/view/panorama/control/transition/steps/Step"),b=a("tdv/player/view/util/XR");a=l.extend(e,function(d,f,m,p){e.call(this,d,f,m,p);this.Ws=this.Pb=!1});a.prototype.Ah=function(){return this.Pb};a.prototype.Ch=function(){this.I.Wh.get("model")!=this.I.nc.get("model")?this.hv():this.Xb?this.Xb.get("state")==n.ca&&setTimeout(function(){this.hv()}.bind(this),10):this.Ws||(this.Ws=!0,this.Xia(),this.nU())};a.prototype.Xia=function(){var d=this.I.nc.get("model").get("camera");this.Pha=d.get("sequences").find(function(q){return q.get("state")===
n.PLAYING});var f=d.sN;f||(f={x:d.get("initialX",d.get("x")),y:d.get("initialY",d.get("y")),z:d.get("initialZ",d.get("z")),yaw:d.get("initialYaw",d.get("yaw")),pitch:d.get("initialPitch",d.get("pitch")),fov:d.get("initialFov",d.get("fov")),distance:d.get("initialDistance",d.get("distance"))});d.set("easing",0);d.set("x",this.I.nc.get("x"));d.set("y",this.I.nc.get("y"));d.set("z",this.I.nc.get("z"));d.set("distance",0);b.isPresenting||d.set("yaw",this.o.Lc()+this.I.nc.get("yaw"));d.set("pitch",this.o.Jc());
d.set("fov",this.o.gb()>this.o.Kb()?this.o.xO():this.o.yO());var m=[];if(this.I.dE){var p=new h;p.set("duration",this.I.E6);p.set("easing","linear");p.bind(k.me,this.Fga,this,!0);this.Jda=p;m.push(p);this.I.ye.set("sourceAlpha",1)}else this.I.ye.set("sourceAlpha",.99);this.ie=new h;this.ie.set("targetX",f.x);this.ie.set("targetY",f.y);this.ie.set("targetZ",f.z);b.isPresenting||this.ie.set("targetYaw",f.yaw);this.ie.set("targetPitch",f.pitch);this.ie.set("targetFov",f.fov);this.ie.set("targetDistance",
f.distance);this.ie.set("duration",this.I.ngb);this.ie.set("easing","quad_in_out");this.ie.bind(k.me,this.Rga,this,!0);m.push(this.ie);this.Xb=new g;this.Xb.set("movements",m);this.Xb.set("mandatory",!0);this.Xb.set("internal",!0);this.Xb.bind(k.Sb,this.hv,this,!0);d.set("sequences",d.get("sequences").concat([this.Xb]));this.Xb.play();this.CU=(new THREE.Vector3).set(f.x,f.y,f.z);this.nD=(new THREE.Vector3).set(this.I.nc.get("x"),this.I.nc.get("y"),this.I.nc.get("z"))};a.prototype.Fga=function(){var d=
this.Jda.get("position");this.I.ye.set("sourceAlpha",1-d);this.I.ye.set("targetAlpha",0)};a.prototype.Rga=function(){if(this.I.dE)this.I.ye.set("sourceAlpha",0),this.I.ye.set("targetAlpha",0);else{var d=this.AR();this.I.ye.set("sourceAlpha",1-Math.max(.01,Math.min(.99,(d-0)/.33)))}};var c=new THREE.Vector3;a.prototype.AR=function(){var d=this.I.nc.get("model").get("camera");return c.set(d.get("x"),d.get("y"),d.get("z")).distanceTo(this.nD)/this.nD.distanceTo(this.CU)};a.prototype.hv=function(){if(!this.Pb){var d=
this.I.nc.get("model").get("camera");d.set("sequences",d.get("sequences").filter(function(f){return f!=this.Xb}.bind(this)));this.Pha&&d.get("sequences").includes(this.Pha)&&this.Pha.play();this.Pb=!0;this.VT()}};a.prototype.nU=function(){var d=this.I.nc.get("model");this.JT=d.get("postprocessing");this.KT=d.get("surfaceSelectionEnabled");d.set("postprocessing",!1);d.set("surfaceSelectionEnabled",!1)};a.prototype.VT=function(){var d=this.I.nc.get("model"),f=this.JT,m=this.KT;setTimeout(function(){d.set("postprocessing",
f);d.set("surfaceSelectionEnabled",m)},30)};return a});
define("tdv/player/view/panorama/control/transition/steps/TranslateModelThroughPanoramas","require tdv/utils tdv/constants/EventName tdv/player/script/Model3DCameraSequence tdv/player/script/TargetModel3DCameraMovement tdv/player/view/panorama/control/transition/steps/Step tdv/player/view/util/XR".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/player/script/Model3DCameraSequence"),g=a("tdv/player/script/TargetModel3DCameraMovement"),h=a("tdv/player/view/panorama/control/transition/steps/Step"),
e=a("tdv/player/view/util/XR");a=l.extend(h,function(c,d,f,m){h.call(this,c,d,f,m);this.Pb=this.Ws=!1});a.prototype.Ah=function(){return this.Pb};a.prototype.Ch=function(){this.I.Wh.get("model")!=this.I.Ec.get("model")?this.sAa():this.Ws||(this.Ws=!0,this.N6a(),this.nU())};a.prototype.N6a=function(){var c=this.I.Ec.get("model").get("camera");c.set("easing",0);c.set("x",this.I.nc.get("x"));c.set("y",this.I.nc.get("y"));c.set("z",this.I.nc.get("z"));c.set("distance",0);e.isPresenting||c.set("yaw",this.o.Lc()+
this.I.nc.get("yaw"));c.set("pitch",this.o.Jc());c.set("fov",this.o.gb()>this.o.Kb()?this.o.xO():this.o.yO());var d=[];if(this.I.dE){var f=new g;f.set("duration",this.I.E6);f.set("easing","linear");f.bind(k.me,this.Fga,this,!0);this.Jda=f;d.push(f);this.I.ye.set("skyBox",!1);this.I.ye.set("nearPlane",!0);this.I.ye.set("sourceAlpha",1);this.I.ye.set("targetAlpha",0)}else this.I.ye.set("skyBox",!0),this.I.ye.set("nearPlane",!1),this.I.ye.set("targetAlpha",.01),this.I.ye.set("sourceAlpha",.99);this.ie=
new g;this.ie.set("targetX",this.I.Ec.get("x"));this.ie.set("targetY",this.I.Ec.get("y"));this.ie.set("targetZ",this.I.Ec.get("z"));this.I.dK.get("keepInitialPositionOnTranslation")&&(e.isPresenting||(f=this.I.zh.get("yaw")+this.I.Ec.get("yaw"),this.ie.set("targetYaw",f)),f=this.I.zh.get("pitch"),f!==void 0&&this.ie.set("targetPitch",f),f=this.I.zh.get("hfov"),f!==void 0&&this.ie.set("targetFov",f));this.ie.set("duration",1500);this.ie.set("easing","cubic_in_out");this.ie.bind(k.me,this.M2a,this,
!0);d.push(this.ie);this.I.dE&&(f=new g,f.set("duration",this.I.E6),f.set("easing","linear"),f.bind(k.me,this.Ega,this,!0),this.Ida=f,d.push(f));this.Xb=new n;this.Xb.set("movements",d);this.Xb.set("mandatory",!0);this.Xb.set("internal",!0);this.Xb.bind(k.Sb,this.sAa,this,!0);c.set("sequences",c.get("sequences").concat([this.Xb]));this.Xb.play();this.nD=(new THREE.Vector3).set(this.I.nc.get("x"),this.I.nc.get("y"),this.I.nc.get("z"));this.CU=(new THREE.Vector3).set(this.I.Ec.get("x"),this.I.Ec.get("y"),
this.I.Ec.get("z"))};a.prototype.M2a=function(){if(this.I.dE)this.I.ye.set("sourceAlpha",0),this.I.ye.set("targetAlpha",0);else{var c=this.AR();this.I.ye.set("targetAlpha",Math.max(.01,Math.min(.99,c-0)));this.I.ye.set("sourceAlpha",1)}};var b=new THREE.Vector3;a.prototype.AR=function(){var c=this.I.nc.get("model").get("camera");return b.set(c.get("x"),c.get("y"),c.get("z")).distanceTo(this.nD)/this.nD.distanceTo(this.CU)};a.prototype.Fga=function(){var c=this.Jda.get("position");this.I.ye.set("sourceAlpha",
1-c);this.I.ye.set("targetAlpha",0)};a.prototype.Ega=function(){var c=this.Ida.get("position");this.I.ye.set("sourceAlpha",0);this.I.ye.set("targetAlpha",c)};a.prototype.sAa=function(){var c=this.I.nc.get("model").get("camera");c.set("sequences",c.get("sequences").filter(function(d){return d!=this.Xb}.bind(this)));this.VT();this.Pb=!0};a.prototype.nU=function(){var c=this.I.nc.get("model"),d=this.I.Wh;this.JT=c.get("postprocessing");this.KT=c.get("surfaceSelectionEnabled");this.c4a=d.get("spritesEnabled");
c.set("postprocessing",!1);c.set("surfaceSelectionEnabled",!1);d.set("spritesEnabled",!1)};a.prototype.VT=function(){var c=this.I.nc.get("model"),d=this.I.Wh,f=this.JT,m=this.KT,p=this.c4a;setTimeout(function(){c.set("postprocessing",f);c.set("surfaceSelectionEnabled",m);d.set("spritesEnabled",p)},500)};return a});
define("tdv/player/view/panorama/control/transition/steps/TranslateModelToPanorama","require tdv/utils tdv/constants/EventName tdv/constants/PlaybackState tdv/player/script/Model3DCameraSequence tdv/player/script/TargetModel3DCameraMovement tdv/player/view/panorama/control/transition/steps/Step tdv/player/view/util/geo/Fov tdv/player/view/util/XR".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/player/script/Model3DCameraSequence"),
h=a("tdv/player/script/TargetModel3DCameraMovement"),e=a("tdv/player/view/panorama/control/transition/steps/Step"),b=a("tdv/player/view/util/geo/Fov"),c=a("tdv/player/view/util/XR");a=l.extend(e,function(f,m,p,q){e.call(this,f,m,p,q);this.Ws=this.Pb=!1});a.prototype.Ah=function(){return this.Pb};a.prototype.Ch=function(){this.Xb?this.Xb.get("state")==n.ca&&setTimeout(function(){this.hv()}.bind(this),10):this.Ws||(this.Ws=!0,this.Xia(),this.nU())};a.prototype.Xia=function(){var f=this.I.Ec.get("model").get("camera");
f.Njb();var m=Math.abs(f.get("pitch")-this.o.Jc()),p=m>30;this.ie=new h;this.ie.set("targetX",this.I.Ec.get("x"));this.ie.set("targetY",this.I.Ec.get("y"));this.ie.set("targetZ",this.I.Ec.get("z"));this.ie.set("targetDistance",0);this.ie.set("targetFov",this.E0a(this.o.ff()));c.isPresenting||this.ie.set("targetYaw",this.o.Lc()+this.I.Ec.get("yaw"));p?this.ie.set("targetPitch",f.get("pitch")):this.ie.set("targetPitch",this.o.Jc());this.ie.set("duration",this.I.rfb);this.ie.set("easing","cubic_in_out");
this.ie.bind(k.me,this.Rga,this,!0);var q=[this.ie];p&&(p=new h,p.set("targetPitch",this.o.Jc()),p.set("duration",m/90*1E3),p.set("easing","quad_in_out"),q.push(p));this.I.dE?(m=new h,m.set("duration",this.I.E6),m.set("easing","linear"),m.bind(k.me,this.Ega,this,!0),this.Ida=m,q.push(m),this.I.ye.set("targetAlpha",0)):this.I.ye.set("targetAlpha",.01);this.Xb=new g;this.Xb.set("movements",q);this.Xb.set("mandatory",!0);this.Xb.set("internal",!0);this.Xb.bind(k.Sb,this.hv,this,!0);f.set("sequences",
f.get("sequences").concat([this.Xb]));this.Xb.play();this.nD=(new THREE.Vector3).set(f.get("x"),f.get("y"),f.get("z"));this.CU=(new THREE.Vector3).set(this.I.Ec.get("x"),this.I.Ec.get("y"),this.I.Ec.get("z"))};a.prototype.E0a=function(f){return this.o.gb()<this.o.Kb()?b.xm(f,this.o.gb(),this.o.Kb()):f};a.prototype.Rga=function(){if(!this.Pb&&!this.I.dE){var f=this.AR();this.I.ye.set("targetAlpha",Math.max(.01,Math.min(.99,(f-.66)/(1-.66))))}};var d=new THREE.Vector3;a.prototype.AR=function(){var f=
this.I.Ec.get("model").get("camera");return d.set(f.get("x"),f.get("y"),f.get("z")).distanceTo(this.nD)/this.nD.distanceTo(this.CU)};a.prototype.Ega=function(){var f=this.Ida.get("position");this.I.ye.set("targetAlpha",f)};a.prototype.hv=function(){this.Pb||this.rZa()};a.prototype.rZa=function(){var f=this.I.Ec.get("model").get("camera");f.set("sequences",f.get("sequences").filter(function(m){return m!=this.Xb}.bind(this)));this.Pb=!0;this.Xb=null;this.VT();this.o.cg(this.I.$c).set("alpha",1)};a.prototype.nU=
function(){var f=this.I.Ec.get("model");this.JT=f.get("postprocessing");this.KT=f.get("surfaceSelectionEnabled");f.set("postprocessing",!1);f.set("surfaceSelectionEnabled",!1)};a.prototype.VT=function(){var f=this.I.Ec.get("model"),m=this.JT,p=this.KT;setTimeout(function(){f.set("postprocessing",m);f.set("surfaceSelectionEnabled",p)},30)};return a});
define("tdv/player/view/panorama/control/transition/steps/TriggerEvent",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=l.extend(k,function(n,g,h,e,b){k.call(this,n,g,h,e);this.HWa=b});a.prototype.Oh=function(){this.HWa.call(this.U)};return a});
define("tdv/player/view/panorama/control/transition/steps/WaitUserInteractionWindow",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/Step"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/panorama/control/transition/steps/Step");a=l.extend(k,function(n,g,h,e){k.call(this,n,g,h,e)});a.prototype.Ah=function(){var n=this.o.Vb(),g=n&&n.FN;n=n&&n.kM;return!!g&&!g.get("visible")&&!!n&&!n.get("visible")};return a});
define("tdv/player/view/panorama/control/transition/steps/WaitReady",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/Step"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/panorama/control/transition/steps/Step"),n=l.extend(k,function(g,h,e,b){k.call(this,g,h,e,b);this.jz=null});n.prototype.Ah=function(){this.jz||(this.jz=this.I.$c&&this.o.cg(this.I.$c));return this.jz&&this.jz.get("ready")};n.prototype.pJ=function(){return!0};n.mTa=l.extend(n,function(g,h,e,b){n.call(this,
g,h,e,b)});n.mTa.prototype.pJ=function(){return!1};n.sTa=l.extend(n,function(g,h,e,b){n.call(this,g,h,e,b)});n.sTa.prototype.Ah=function(){this.jz||(this.jz=this.I.$c&&this.o.cg(this.I.$c));return this.jz&&(this.jz.get("ready")||this.jz.Qoa())};return n});
define("tdv/player/view/panorama/control/transition/Controller","require tdv/events/Event tdv/events/EventDispatcher tdv/player/view/panorama/control/transition/PositionController tdv/player/view/panorama/control/transition/TransitionData tdv/player/view/panorama/control/transition/steps/Blend tdv/player/view/panorama/control/transition/steps/AddProjectedPanoramasToModel tdv/player/view/panorama/control/transition/steps/EnforceAdded tdv/player/view/panorama/control/transition/steps/EnforceModelLoaded tdv/player/view/panorama/control/transition/steps/RequestMediaActivation tdv/player/view/panorama/control/transition/steps/Display tdv/player/view/panorama/control/transition/steps/FadeIn tdv/player/view/panorama/control/transition/steps/FadeInVR tdv/player/view/panorama/control/transition/steps/FadeOut tdv/player/view/panorama/control/transition/steps/FadeOutVR tdv/player/view/panorama/control/transition/steps/MoveFromTranslationPosition tdv/player/view/panorama/control/transition/steps/MoveToInitialPosition tdv/player/view/panorama/control/transition/steps/MoveToOriginPosition tdv/player/view/panorama/control/transition/steps/MoveToTranslationPosition tdv/player/view/panorama/control/transition/steps/Remove tdv/player/view/panorama/control/transition/steps/RemoveProjectedPanoramasFromModel tdv/player/view/panorama/control/transition/steps/RequestViewerArea tdv/player/view/panorama/control/transition/steps/RestoreModelPosition tdv/player/view/panorama/control/transition/steps/SetInitialPosition tdv/player/view/panorama/control/transition/steps/SetInitialPositionFromModel tdv/player/view/panorama/control/transition/steps/SetInitialPositionThroughModel tdv/player/view/panorama/control/transition/steps/SetModelInitialPosition tdv/player/view/panorama/control/transition/steps/SetModelInTransition tdv/player/view/panorama/control/transition/steps/SetModelPlayerEnabled tdv/player/view/panorama/control/transition/steps/SetModelRenderingPaused tdv/player/view/panorama/control/transition/steps/SetMinFaceSize tdv/player/view/panorama/control/transition/steps/SetOriginPosition tdv/player/view/panorama/control/transition/steps/SetRenderingPaused tdv/player/view/panorama/control/transition/steps/SetTranslationPosition tdv/player/view/panorama/control/transition/steps/SetXRPointersVisible tdv/player/view/panorama/control/transition/steps/ReleaseViewerArea tdv/player/view/panorama/control/transition/steps/Translate tdv/player/view/panorama/control/transition/steps/TranslateModelFromPanorama tdv/player/view/panorama/control/transition/steps/TranslateModelThroughPanoramas tdv/player/view/panorama/control/transition/steps/TranslateModelToPanorama tdv/player/view/panorama/control/transition/steps/TriggerEvent tdv/player/view/panorama/control/transition/steps/WaitUserInteractionWindow tdv/player/view/panorama/control/transition/steps/WaitReady tdv/utils".split(" "),function(a){var l=
a("tdv/events/Event"),k=a("tdv/events/EventDispatcher"),n=a("tdv/player/view/panorama/control/transition/PositionController"),g=a("tdv/player/view/panorama/control/transition/TransitionData"),h=a("tdv/player/view/panorama/control/transition/steps/Blend"),e=a("tdv/player/view/panorama/control/transition/steps/AddProjectedPanoramasToModel"),b=a("tdv/player/view/panorama/control/transition/steps/EnforceAdded"),c=a("tdv/player/view/panorama/control/transition/steps/EnforceModelLoaded"),d=a("tdv/player/view/panorama/control/transition/steps/RequestMediaActivation"),
f=a("tdv/player/view/panorama/control/transition/steps/Display"),m=a("tdv/player/view/panorama/control/transition/steps/FadeIn"),p=a("tdv/player/view/panorama/control/transition/steps/FadeInVR"),q=a("tdv/player/view/panorama/control/transition/steps/FadeOut"),r=a("tdv/player/view/panorama/control/transition/steps/FadeOutVR"),t=a("tdv/player/view/panorama/control/transition/steps/MoveFromTranslationPosition"),u=a("tdv/player/view/panorama/control/transition/steps/MoveToInitialPosition"),v=a("tdv/player/view/panorama/control/transition/steps/MoveToOriginPosition"),
w=a("tdv/player/view/panorama/control/transition/steps/MoveToTranslationPosition"),y=a("tdv/player/view/panorama/control/transition/steps/Remove"),x=a("tdv/player/view/panorama/control/transition/steps/RemoveProjectedPanoramasFromModel"),z=a("tdv/player/view/panorama/control/transition/steps/RequestViewerArea"),A=a("tdv/player/view/panorama/control/transition/steps/RestoreModelPosition"),D=a("tdv/player/view/panorama/control/transition/steps/SetInitialPosition"),E=a("tdv/player/view/panorama/control/transition/steps/SetInitialPositionFromModel"),
B=a("tdv/player/view/panorama/control/transition/steps/SetInitialPositionThroughModel"),C=a("tdv/player/view/panorama/control/transition/steps/SetModelInitialPosition"),F=a("tdv/player/view/panorama/control/transition/steps/SetModelInTransition"),G=a("tdv/player/view/panorama/control/transition/steps/SetModelPlayerEnabled"),I=a("tdv/player/view/panorama/control/transition/steps/SetModelRenderingPaused"),N=a("tdv/player/view/panorama/control/transition/steps/SetMinFaceSize"),P=a("tdv/player/view/panorama/control/transition/steps/SetOriginPosition"),
Q=a("tdv/player/view/panorama/control/transition/steps/SetRenderingPaused"),R=a("tdv/player/view/panorama/control/transition/steps/SetTranslationPosition"),K=a("tdv/player/view/panorama/control/transition/steps/SetXRPointersVisible"),M=a("tdv/player/view/panorama/control/transition/steps/ReleaseViewerArea"),T=a("tdv/player/view/panorama/control/transition/steps/Translate"),S=a("tdv/player/view/panorama/control/transition/steps/TranslateModelFromPanorama"),W=a("tdv/player/view/panorama/control/transition/steps/TranslateModelThroughPanoramas"),
X=a("tdv/player/view/panorama/control/transition/steps/TranslateModelToPanorama"),Z=a("tdv/player/view/panorama/control/transition/steps/TriggerEvent"),ca=a("tdv/player/view/panorama/control/transition/steps/WaitUserInteractionWindow"),ea=a("tdv/player/view/panorama/control/transition/steps/WaitReady"),Y=a("tdv/utils").extend(k,function(U,V,aa){k.call(this);this.R=U;this.o=V;this.Bc=aa;this.Uc=this.bv=null;this.Mva=this.Pu=this.xT=this.$y=void 0;this.I=null;this.Ph=[]});Y.prototype.Mpa=function(U){this.bv=
U};Y.prototype.clear=function(){this.jia(this.Pu);this.I&&this.jia(this.I.$c);this.xT=this.$y=void 0;this.ua=this.Bc=this.o=this.R=this.I=null};Y.prototype.start=function(U,V){!this.I&&U==this.Pu||this.I&&U==this.I.$c?this.xT=this.$y=void 0:(this.$y=U,this.xT=V,this.Ph.length==0&&this.Y3())};Y.prototype.Qe=function(){this.$y=null;!this.I&&this.Pu&&this.Y3()};Y.prototype.pna=function(){return this.I!==null};Y.prototype.Bcb=function(){return this.I&&this.I.$c};Y.prototype.Y3=function(){this.I=new g(this.o,
this.bv,this.Pu,this.$y,this.xT);this.Uc=new n(this.o,this.Bc,this.I);this.xT=this.$y=void 0;this.na(N);this.na(b);switch(this.I.mode){case g.Mra:this.na(K.jg);this.na(A);this.I.ob()?(this.na(r),this.uc(this.Az)):(this.uc(this.Az),this.na(q));this.na(Q.fi);this.na(I.jg);this.na(G.fi);this.uc(this.rD);this.na(y);this.uc(this.Hv);this.na(F.jg);this.na(K.fi);break;case g.Lra:this.na(z);this.uc(this.nI);this.na(ea);this.na(d);this.na(P);this.uc(this.Bz);this.na(m);this.na(ca);this.na(u);this.uc(this.mI);
break;case g.hZ:this.na(z);this.uc(this.Az);this.na(K.jg);this.I.ob()?this.na(r):this.na(q);this.uc(this.nI);this.uc(this.rD);this.na(y);this.uc(this.Hv);this.na(ea);this.na(d);this.na(P);this.uc(this.Bz);this.I.ob()?this.na(p):this.na(m);this.na(K.fi);this.na(ca);this.na(u);this.uc(this.mI);break;case g.Ysa:this.na(z);this.uc(this.nI);this.uc(this.Az);this.uc(this.rD);this.I.ob()?(this.na(ea),this.na(R),this.uc(this.Bz),this.na(T),this.na(y),this.uc(this.Hv)):(this.na(w),this.uc(this.Bz),this.na(T),
this.na(y),this.uc(this.Hv),this.na(t),this.na(d),this.na(ca));this.uc(this.mI);break;case g.Gp:this.na(z);this.uc(this.nI);this.na(ea);this.I.ob()?(this.uc(this.Az),this.uc(this.rD),this.na(D),this.uc(this.Bz),this.na(h),this.na(y),this.uc(this.Hv)):(this.uc(this.Az),this.uc(this.rD),this.na(v),this.uc(this.Bz),this.na(h),this.na(y),this.uc(this.Hv),this.na(d),this.na(ca),this.na(u));this.uc(this.mI);break;case g.Naa:this.na(Q.fi);this.na(z);this.uc(this.nI);this.na(c);this.na(I.jg);this.na(ea);
this.na(K.jg);this.na(e.Paa);this.na(E);this.na(X);this.na(F.jg);this.na(F.fi);this.uc(this.Bz);this.na(Q.jg);this.na(G.jg);this.na(x);this.na(K.fi);this.na(d);this.na(ca);this.na(I.fi);this.uc(this.mI);break;case g.$sa:this.na(c);this.uc(this.Az);this.na(C);this.uc(this.rD);this.na(K.jg);this.na(e.Haa);this.na(Q.fi);this.na(I.jg);this.na(y);this.uc(this.Hv);this.na(S);this.na(F.jg);this.na(x);this.na(K.fi);this.na(M);break;case g.Oaa:this.uc(this.nI);this.na(c);this.uc(this.Az);this.uc(this.rD);
this.na(K.jg);this.na(e.Haa);this.na(ea);this.na(e.Paa);this.na(C);this.na(Q.fi);this.na(I.jg);this.na(y);this.uc(this.Hv);this.na(W);this.na(G.jg);this.na(F.jg);this.na(x);this.na(B);this.uc(this.Bz);this.na(f);this.na(Q.jg);this.na(K.fi);this.na(d);this.na(ca);this.na(I.fi);this.uc(this.mI);break;case g.Zsa:this.uc(this.nI),this.na(c),this.na(K.jg),this.na(e.Haa),this.na(C),this.na(Q.fi),this.na(I.jg),this.na(ea),this.uc(this.Az),this.uc(this.rD),this.na(y),this.uc(this.Hv),this.na(S),this.na(x),
this.na(e.Paa),this.na(E),this.na(X),this.na(F.jg),this.uc(this.Bz),this.na(Q.jg),this.na(G.jg),this.na(x),this.na(K.fi),this.na(I.fi),this.uc(this.mI)}this.uc(this.Pja);this.Sa()};Y.prototype.Gja=function(){this.Pu=this.I.$c;this.Mva=this.I.dK;this.I=this.Uc=null;this.$y===void 0?this.Pu?this.a8a(this.Pu,this.Mva):this.b8a():this.Y3()};window.Eab=!0;window.Fab=!0;document.addEventListener("keydown",function(U){U.which==67&&(window.Eab=window.Fab=!0)});Y.prototype.JA=function(U){for(;this.Ph.length;){var V=
this.Ph[0];V.s7a||(V.s7a=(new Date).getTime());if(this.$y!==void 0&&this.$y!==this.Pu&&V.pJ()){this.jia(this.I.$c);this.Ph=[];this.Y3();break}else if(V.Ch(U),this.Sa(),this.Uc.JA(U),V.Ah())this.Ph.shift(),this.Ph.length==0&&this.Gja();else break}};document.addEventListener("keydown",function(){(new Date).getTime()});document.addEventListener("keyup",function(){(new Date).getTime()});Y.prototype.xe=function(){};Y.prototype.na=function(U){this.Ph.push(new U(this,this.Uc,this.o,this.I))};Y.prototype.uc=
function(U){this.Ph.push(new Z(this,this.Uc,this.o,this.I,U))};Y.prototype.jia=function(U){U&&(U=this.o.cg(U))&&(this.o.remove(U),this.Hv())};Y.prototype.nI=function(){this.m(new l(Y.baa,{panorama:this.I.$c}))};Y.prototype.Hv=function(){this.m(new l(Y.T$,{panorama:this.I?this.I.Eh:this.Pu,nextPanorama:this.I?this.I.$c:null}))};Y.prototype.Az=function(){this.m(new l(Y.oF,{panorama:this.I.Eh}))};Y.prototype.rD=function(){this.m(new l(Y.nF,{panorama:this.I.Eh,nextPanorama:this.I.$c}))};Y.prototype.mI=
function(){this.m(new l(Y.pF,{panorama:this.I.$c,camera:this.I.dK}))};Y.prototype.Pja=function(){this.m(new l(Y.Br))};Y.prototype.Bz=function(){this.m(new l(Y.qF,{panorama:this.I.$c,camera:this.I.dK}))};Y.prototype.a8a=function(U,V){this.m(new l(Y.z$,{panorama:U,camera:V}))};Y.prototype.b8a=function(){this.m(new l(Y.A$))};Y.prototype.Sa=function(){this.m(new l(Y.oc))};Y.oc="request frame";Y.baa="request load";Y.T$="panorama removed";Y.z$="all pending panoramas displayed";Y.A$="all pending panoramas hidden";
Y.nF="panorama end";Y.qF="panorama start";Y.pF="panorama show";Y.oF="panorama hide";Y.Br="transition end";return Y});
define("tdv/player/view/panorama/control/frames/BaseFramesController",["require","tdv/utils","tdv/events/Event","tdv/events/EventDispatcher"],function(a){var l=a("tdv/utils"),k=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=l.extend(n,function(h){n.call(this);this.o=h});g.prototype.clear=function(){this.end();this.o=null};g.prototype.HO=function(h){for(var e=this.e0(h),b=h.kW(),c=0;c<e;c++)this.o.cg(this.kea(h,c)).set("alpha",c==b?1:0)};g.prototype.getTime=function(){return 0};g.prototype.start=
function(){};g.prototype.end=function(){};g.prototype.play=function(){};g.prototype.pause=function(){};g.prototype.hP=function(){};g.prototype.rP=function(){};g.prototype.r9=function(){};g.prototype.stop=function(){};g.prototype.WJ=function(){};g.prototype.DE=function(){};g.prototype.PP=function(){};g.prototype.xe=function(){};g.prototype.pl=function(){};g.prototype.e0=function(h){return h.get("frames").length};g.prototype.kea=function(h,e){return h.get("frames")[e]};g.prototype.Sa=function(){this.m(new k(g.oc))};
g.prototype.bt=function(h,e,b,c,d,f){this.m(new k(g.Pk,{time:h,duration:e,transitionPosition:b,transitionLength:c,steps:d,selectedStep:f}))};g.prototype.ll=function(){this.m(new k(g.gd,{state:this.pl()}))};g.oc="request frame";g.qSa="frame display";g.rSa="frame hide";g.Pk="time change";g.gd="playback state change";return g});
define("tdv/player/view/panorama/control/frames/HDRFramesController","require tdv/utils tdv/constants/EventName tdv/constants/Priority tdv/player/view/panorama/control/frames/BaseFramesController tdv/player/view/util/geo/Point tdv/player/view/util/geo/Transformation tdv/view/images/ImageLoader".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/constants/Priority"),g=a("tdv/player/view/panorama/control/frames/BaseFramesController"),h=a("tdv/player/view/util/geo/Point"),
e=a("tdv/player/view/util/geo/Transformation"),b=a("tdv/view/images/ImageLoader"),c=l.extend(g,function(d){g.call(this,d);this.Y_=null;this.Uda=this.LG=0;this.Aa=this.pH=null;this.Gha=!1;this.kb=360;this.GFa=180;this.sb=.5;this.gq=.2;this.Hy=.45;this.Bya=5E3;this.Fya=1;this.g1=[[.5,.25],[.5,.375],[.25,.5],[.375,.5],[.5,.5],[.625,.5],[.75,.5],[.5,.625],[.5,.75]];this.U1a=[.05,.1,.05,.1,.4,.1,.05,.1,.05]});c.prototype.HO=function(d){g.prototype.HO.call(this,d);this.fU(d)};c.prototype.start=function(d){this.fU(d);
this.Sa()};c.prototype.end=function(){this.fU(null)};c.prototype.fU=function(d){this.Aa!=d&&(this.Aa&&(this.s8a(),this.Aa=null,this.y8a()),this.Aa=d)&&(this.iWa(),this.kb=d.get("hfov",360),this.GFa=d.get("vfov",180),this.sb=d.get("pitch",0),this.Oha=this.QH=void 0,this.N1a(d),this.Rb=.5)};c.prototype.PP=function(){this.Gha=!1};c.prototype.WJ=function(d){this.Rb=d/c.xQ;this.Sa();this.Gha=!0};c.prototype.DE=function(d){this.WJ(d)};c.prototype.bt=function(){var d=this.e0(this.Aa),f=this.Rb*(d-1),m=Math.max(0,
Math.min(d-2,Math.floor(f))),p=void 0;f-m<.01?p=m:f-m>.99&&(p=m+1);g.prototype.bt.call(this,this.Rb*c.xQ,c.xQ,this.Rb*c.xQ,c.xQ,d,p)};c.prototype.xe=function(d){if(this.Aa){var f=this.o.Lc(),m=this.o.Jc(),p=this.o.Jg(),q=0;if(this.QH!==void 0&&this.Oha!==void 0&&this.PBa!==void 0){var r=f-this.QH,t=m-this.Oha,u=p-this.PBa;q=Math.sqrt(r*r+t*t+u*u)*1E3/d}this.QH=f;this.Oha=m;this.PBa=p;r=this.e0(this.Aa);var v=this.Rb*(r-1);t=Math.max(0,Math.min(r-2,Math.floor(v)));u=t+1;v=1-(v-t);for(var w=1-v,y=[],
x=0;x<r;x++)y.push(0);y[u]=w;y[t]=w<1?1:0;for(x=0;x<r;x++)this.o.cg(this.kea(this.Aa,x)).set("alpha",y[x]);this.bt();if(this.Y_&&(q<=this.Fya||this.o.Dt())&&!this.Gha){x=Math.PI/180;q=180/Math.PI;y=this.o.gb();var z=this.o.Kb(),A=new e;A.rotateZ(-p*x);A.rotateX(-m*x);A.rotateY(-f*x);f=[];for(x=0;x<this.g1.length;x++)m=new h(this.g1[x][0]*y,this.g1[x][1]*z,0),p=this.o.unproject(m).SJa(),p.apply(A),m=p.Lc()*q,p=p.Jc()*q,f.push(Math.round((90-p)*this.Uda/180)*this.LG+Math.round((m+180)*this.LG/360));
m=[];for(x=0;x<r;x++){p=this.Y_[x];for(y=q=0;y<this.g1.length;y++)q+=this.U1a[y]*p[f[y]];m.push(q)}x=m[t];f=m[u];t=v*m[t]+w*m[u];d=Math.min(1/r,d/this.Bya);r=this.Rb;u=Math.max.apply(Math,m);v=Math.min.apply(Math,m);t<this.gq&&t<u?r=f>t?r+d:r-d:t>this.Hy&&t>v&&(r=x<t?r-d:r+d);r=Math.min(1,Math.max(0,r));this.Rb!=r&&(this.Rb=r,this.Sa())}}};c.prototype.N1a=function(d){var f=d.get("frames",[]).map(m=>m.get("thumbnailUrl"));this.pH=f.map(m=>{var p=null;m&&(p=new b(n.Mp),p.bind(k.ia,this.jAa,this),p.bind(k.ad,
this.kAa,this));return p});this.pH.forEach((m,p)=>{m&&m.load(f[p])})};c.prototype.y8a=function(){this.Iva();this.Y_=null};c.prototype.I2a=function(){this.LG=150;this.pH.map(function(d){d&&(this.LG=Math.min(d.dg()*360/this.kb,this.LG))},this);this.Uda=Math.round(this.LG/2);this.Y_=this.pH.map(function(d){return this.cYa(d,this.LG,this.Uda,this.kb,this.GFa,this.sb)},this);this.Iva()};c.prototype.cYa=function(d,f,m,p,q,r){var t=document.createElement("canvas");t.width=f;t.height=m;var u=t.getContext("2d");
u.fillStyle="#000000";u.fillRect(0,0,f,m);d&&(d=d.xg(),p=Math.round(f*p/360),u.drawImage(d,(f-p)*.5,Math.round(m*(90-(r+q*.5))/180),p,Math.round(m*q/180)));f=[];t=u.getImageData(0,0,t.width,t.height);for(m=u=0;u<t.height;u++)for(q=0;q<t.width;q++,m+=4)f.push((.299*t.data[m]+.587*t.data[m+1]+.114*t.data[m+2])/255);return f};c.prototype.Iva=function(){this.pH.forEach(d=>{d&&(d.h(k.ia,this.jAa,this),d.h(k.ad,this.kAa,this),d.cancel())});this.pH=null};c.prototype.jAa=function(){this.pH.filter(d=>d&&!d.kj()).length==
0&&this.I2a()};c.prototype.kAa=function(){};c.prototype.iWa=function(){this.Aa.bind(k.N("minimumLuminance"),this.Ty,this);this.Aa.bind(k.N("maximumLuminance"),this.Ty,this);this.Aa.bind(k.N("luminanceChangeTime"),this.Ty,this);this.Aa.bind(k.N("maxLuminanceChangeSpeed"),this.Ty,this);this.Ty()};c.prototype.s8a=function(){this.Aa.h(k.N("minimumLuminance"),this.Ty,this);this.Aa.h(k.N("maximumLuminance"),this.Ty,this);this.Aa.h(k.N("luminanceChangeTime"),this.Ty,this);this.Aa.h(k.N("maxLuminanceChangeSpeed"),
this.Ty,this)};c.prototype.Ty=function(){this.gq=this.Aa.get("minimumLuminance");this.Hy=this.Aa.get("maximumLuminance");this.gq==void 0&&this.Hy==void 0?(this.gq=.2,this.Hy=.45):this.gq==void 0?this.gq=Math.min(.2,this.Hy):this.gq==void 0?this.Hy=Math.max(.45,this.gq):this.gq=Math.min(this.gq,this.Hy);this.Hy=Math.min(1,Math.max(0,this.Hy));this.gq=Math.min(1,Math.max(0,this.gq));this.Bya=Math.max(100,this.Aa.get("luminanceChangeTime",5E3));this.Fya=this.Aa.get("maxLuminanceChangeSpeed",1);this.Sa()};
c.xQ=1E3;return c});
define("tdv/player/view/panorama/control/frames/LiveFramesController","require tdv/utils tdv/binding/ChangeWatcher tdv/constants/EventName tdv/constants/PlaybackState tdv/player/view/panorama/control/frames/BaseFramesController".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/binding/ChangeWatcher"),n=a("tdv/constants/EventName"),g=a("tdv/constants/PlaybackState"),h=a("tdv/player/view/panorama/control/frames/BaseFramesController");a=l.extend(h,function(e){h.call(this,e);this.W_=this.X_=null;
this.lk=this.Ui=5E3;this.tf=void 0;this.$b=this.Ui;this.gs=1;this.Aa=null;this.iH=!1;this.RT=void 0});a.prototype.start=function(e){this.Aa=e;this.iH=!1;this.F0=!0;this.X_=k.Sw(this.Aa,"frameDisplayTime",this.cka,this);this.W_=k.Sw(this.Aa,"frameTransitionTime",this.cka,this);this.gs=this.e0(this.Aa);this.tf=this.Aa.kW()*(this.Ui+this.lk);this.cka(!0);this.bt();this.Sa();this.ll()};a.prototype.cka=function(e){var b=Math.max(100,this.Aa.get("frameDisplayTime",5E3)),c=Math.max(100,this.Aa.get("frameTransitionTime",
5E3));if(this.Ui!=b||this.lk!=c||e){e=this.OL();var d=this.h_a();this.Ui=b;this.lk=c;this.gs>1?(this.tf=e*(this.Ui+this.lk)+d*this.Ui+d*this.lk,this.$b=this.gs*(this.Ui+this.lk)):(this.tf=d*this.Ui,this.$b=this.Ui)}};a.prototype.OL=function(){return this.gs>1?Math.floor(this.tf/(this.Ui+this.lk)):0};a.prototype.i_a=function(){return this.gs>1?(this.OL()+1)%this.gs:0};a.prototype.h_a=function(){return this.gs>1?Math.max(0,Math.min(1,this.tf-this.OL()*(this.Ui+this.lk))):this.tf/this.Ui};a.prototype.Swa=
function(){return this.gs>1?Math.max(0,Math.min(1,(this.tf-(this.OL()*(this.Ui+this.lk)+this.Ui))/this.lk)):0};a.prototype.u7a=function(e){var b=Math.floor(e/this.lk);return b*(this.Ui+this.lk)+this.Ui+(e-b*this.lk)};a.prototype.hEa=function(e){var b=Math.floor(e/(this.Ui+this.lk));return b*this.lk+Math.max(0,e-b*(this.Ui+this.lk)-this.Ui)};a.prototype.play=function(){this.iH&&(this.iH=!1,this.F0&&this.Sa(),this.ll())};a.prototype.pause=function(){this.iH=!0;this.ll()};a.prototype.hP=function(){this.pause()};
a.prototype.rP=function(){this.play()};a.prototype.end=function(){this.F0=!1;this.Aa=null;this.X_&&(this.X_.UE(),this.X_=null);this.W_&&(this.W_.UE(),this.W_=null);this.ll()};a.prototype.WJ=function(e){this.tf=e;this.Sa()};a.prototype.DE=function(e){this.tf=this.u7a(e);this.Sa();this.pause()};a.prototype.xe=function(e){if(this.F0){var b=this.tf;this.iH||(b+=e);if(this.RT===void 0&&b>=this.$b-this.lk)this.RT=this.tf,this.Aa.m(n.Or);else{this.tf=b;this.tf%=this.$b;this.RT!==void 0&&this.tf<this.RT&&
(this.RT=void 0);e=this.OL();b=this.i_a();var c=this.Swa(),d=b>e?c:1;c=b>e?1:1-c;for(var f=0;f<this.gs;f++){var m=f==e?c:f==b?d:0;var p=this.o.cg(this.kea(this.Aa,f));p.get("alpha")!=m&&(m>0&&m<1&&p.wi(),p.get("alpha"),p.set("alpha",m))}this.bt();this.iH||this.Sa()}}};a.prototype.pl=function(){return this.F0?this.iH?g.Yb:g.PLAYING:g.ca};a.prototype.ll=function(){h.prototype.ll.call(this,this.pl())};a.prototype.bt=function(){h.prototype.bt.call(this,this.tf,this.$b,this.hEa(this.tf),this.hEa(this.$b),
this.gs+1,this.Swa()===0?this.OL():void 0)};return a});define("tdv/player/view/panorama/control/frames/StandardFramesController",["require","tdv/utils","tdv/player/view/panorama/control/frames/BaseFramesController"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/panorama/control/frames/BaseFramesController");return l.extend(k,function(n){k.call(this,n)})});
define("tdv/player/view/panorama/control/frames/VideoFramesController",["require","tdv/utils","tdv/constants/EventName","tdv/constants/PlaybackState","tdv/player/view/panorama/control/frames/BaseFramesController"],function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/player/view/panorama/control/frames/BaseFramesController");a=l.extend(g,function(h){g.call(this,h);this.Ef=!1});a.prototype.HO=function(){};a.prototype.start=function(h){this.end();
this.Aa=h;this.Aa.set("mute",this.Ef);this.Aa.get("autoplay")&&this.Aa.set("state",n.PLAYING);this.Fx()};a.prototype.getTime=function(){return this.Aa?this.Aa.get("currentTime"):0};a.prototype.pl=function(){return this.Aa?this.Aa.get("state"):n.ca};a.prototype.play=function(){this.Aa&&this.Aa.set("state",n.PLAYING)};a.prototype.pause=function(){this.Aa&&this.Aa.set("state",n.Yb)};a.prototype.r9=function(){this.Aa&&this.Aa.set("state",n.Yb)};a.prototype.stop=function(){this.Aa&&this.Aa.set("state",
n.ca)};a.prototype.end=function(){this.Aa&&(this.iz(),this.Aa=null)};a.prototype.WJ=function(h){this.Aa&&this.Aa.set("state",n.PLAYING);this.Aa&&this.Aa.set("currentTime",h)};a.prototype.Ag=function(h){this.Ef=h;this.Aa&&this.Aa.set("mute",this.Ef)};a.prototype.Fx=function(){this.Aa.bind(k.N("currentTime"),this.Lf,this,!0);this.Aa.bind(k.N("duration"),this.Wo,this,!0);this.Aa.bind(k.N("state"),this.Fj,this,!0);this.Aa.get("state")!=n.ca&&this.ll()};a.prototype.iz=function(){this.Aa.h(k.N("currentTime"),
this.Lf,this,!0);this.Aa.h(k.N("duration"),this.Wo,this,!0);this.Aa.h(k.N("state"),this.Fj,this,!0)};a.prototype.Fj=function(){this.ll()};a.prototype.Lf=function(){this.bt()};a.prototype.Wo=function(){this.bt()};a.prototype.bt=function(){this.Aa&&g.prototype.bt.call(this,this.Aa.get("currentTime"),this.Aa.get("duration"))};return a});
define("tdv/player/view/panorama/control/FramesController","require tdv/utils tdv/constants/PlaybackState tdv/events/Event tdv/events/EventDispatcher tdv/player/parser/ClassInfo tdv/player/view/panorama/control/frames/BaseFramesController tdv/player/view/panorama/control/frames/HDRFramesController tdv/player/view/panorama/control/frames/LiveFramesController tdv/player/view/panorama/control/frames/StandardFramesController tdv/player/view/panorama/control/frames/VideoFramesController".split(" "),function(a){var l=
a("tdv/utils");a("tdv/constants/PlaybackState");var k=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/view/panorama/control/frames/BaseFramesController"),e=a("tdv/player/view/panorama/control/frames/HDRFramesController"),b=a("tdv/player/view/panorama/control/frames/LiveFramesController"),c=a("tdv/player/view/panorama/control/frames/StandardFramesController"),d=a("tdv/player/view/panorama/control/frames/VideoFramesController"),f=l.extend(n,
function(m){n.call(this);this.o=m;this.Tfa=this.r_(b);this.Iea=this.r_(e);this.N4=this.r_(d);this.fja=this.r_(c);this.pe=null});f.prototype.clear=function(){this.i_(this.Tfa);this.Tfa=null;this.i_(this.Iea);this.Iea=null;this.i_(this.N4);this.N4=null;this.i_(this.fja);this.o=this.pe=this.fja=null};f.prototype.r_=function(m){m=new m(this.o);m.bind(h.oc,this.Yf,this,!0);m.bind(h.Pk,this.Cs,this,!0);m.bind(h.gd,this.Kf,this,!0);return m};f.prototype.i_=function(m){m.h(h.oc,this.Yf,this);m.h(h.Pk,this.Cs,
this);m.h(h.gd,this.Kf,this);m.clear()};f.prototype.ufa=function(m,p){return g.Qa(p,m)};f.prototype.Mwa=function(m){return this.ufa(m,"HDRPanorama")?this.Iea:this.ufa(m,"LivePanorama")?this.Tfa:this.ufa(m,"VideoPanorama")?this.N4:this.fja};f.prototype.HO=function(m){(this.pe=this.Mwa(m))&&this.pe.HO(m)};f.prototype.start=function(m){this.Yf();(this.pe=this.Mwa(m))&&this.pe.start(m)};f.prototype.pl=function(){if(this.pe)return this.pe.pl()};f.prototype.getTime=function(){return this.pe?this.pe.getTime():
0};f.prototype.play=function(){this.pe&&this.pe.play()};f.prototype.pause=function(){this.pe&&this.pe.pause()};f.prototype.hP=function(){this.pe&&this.pe.hP()};f.prototype.rP=function(){this.pe&&this.pe.rP()};f.prototype.r9=function(){this.pe&&this.pe.r9()};f.prototype.stop=function(){this.pe&&this.pe.stop();this.m(new k(f.Pk,{duration:0,time:0,steps:void 0,selectedStep:void 0}))};f.prototype.end=function(){this.pe&&(this.pe.end(),this.pe=null)};f.prototype.WJ=function(m){this.pe&&this.pe.WJ(m)};
f.prototype.DE=function(m){this.pe&&this.pe.DE(m)};f.prototype.PP=function(){this.pe&&this.pe.PP()};f.prototype.xe=function(m){this.pe&&this.pe.xe(m)};f.prototype.Ag=function(m){this.N4.Ag(m)};f.prototype.Yf=function(){this.m(new k(f.oc))};f.prototype.Cs=function(m){this.m(new k(f.Pk,m.data))};f.prototype.Kf=function(m){this.m(new k(f.gd,m.data))};f.oc="request frame";f.qSa="frame display";f.rSa="frame hide";f.Pk="time change";f.gd="playback state change";return f});
define("tdv/player/view/panorama/control/LoadController",["require","tdv/utils","tdv/constants/EventName","tdv/events/EventDispatcher","tdv/view/events/ProgressEvent"],function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/events/EventDispatcher"),g=a("tdv/view/events/ProgressEvent");a=l.extend(n,function(h){n.call(this);this.o=h;this.pi=this.Aa=null});a.prototype.start=function(h){this.Aa=h;this.pi=this.o.cg(this.Aa);this.pi.bind(k.ia,this.Ke,this,!0);this.pi.bind(k.xc,this.Xy,
this,!0);this.pi.get("ready")?this.m(k.ud,{panorama:this.Aa}):this.pi.bind(k.ud,this.c2,this,!0);this.pi.set("loadingActive",!0)};a.prototype.stop=function(){this.Aa=null;this.pi&&(this.pi.h(k.ud,this.c2,this),this.pi.h(k.ia,this.Ke,this),this.pi.h(k.xc,this.Xy,this),this.pi.set("loadingActive",!1),this.pi=null,this.m(k.Dg))};a.prototype.clear=function(){this.stop()};a.prototype.c2=function(){this.pi.h(k.ud,this.c2,this);this.m(k.ud,{panorama:this.Aa})};a.prototype.Ke=function(){this.pi.h(k.ud,this.c2,
this);this.pi.h(k.ia,this.Ke,this);this.pi.h(k.xc,this.Xy,this);this.pi=null;this.m(k.ia,{panorama:this.Aa});this.Aa=null;this.m(k.Dg)};a.prototype.Xy=function(h){this.m(new g(k.xc,h.percent))};return a});
define("tdv/player/view/panorama/control/MapController","require exports tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/script/MapPlayer".split(" "),function(a,l,k,n,g,h){var e=function(c){function d(f){var m=c.call(this)||this;m.renderer=f;m.Qna=[];m.SW=new Map;m.eg=null;return m}O(d,c);d.prototype.clear=function(){this.V8([])};d.prototype.V8=function(f){f?Array.isArray(f)||(f=[f]):f=[];this.Qna.filter(function(m){return!f.includes(m)}).forEach(this.Wgb.bind(this));
f.filter(function(m){return!this.Qna.includes(m)}.bind(this)).forEach(this.r$a.bind(this));this.Qna=f};d.prototype.display=function(f){this.Sf(f)};d.prototype.Qe=function(f){this.eg==f&&this.stop()};d.prototype.stop=function(){this.Sf(null)};d.prototype.r$a=function(f){var m=new b(this.renderer,f);m.bind(d.nj,this.DX,this,!0);m.Sf(this.eg);this.SW.set(f,m)};d.prototype.Wgb=function(f){var m=this.SW.get(f);m.h(d.nj,this.DX,this);m.dispose();this.SW.delete(f)};d.prototype.Sf=function(f){this.eg!==f&&
(this.eg=f,this.SW.forEach(function(m){m.Sf(f)}))};d.prototype.xe=function(){this.SW.forEach(function(f){f.blb()})};d.prototype.DX=function(f){this.m(new n(d.nj,{yawDelta:f.data.yawDelta}))};d.nj="request yaw change";return d}(g),b=function(c){function d(f,m){var p=c.call(this)||this;p.renderer=f;p.tA=m;p.eg=null;p.qw=null;p.q$a();return p}O(d,c);d.prototype.dispose=function(){this.Vgb();this.Sf(null)};d.prototype.Sf=function(f){this.eg!==f&&(this.mHa(),this.eg=f,this.s$a())};d.prototype.blb=function(){this.lRa()};
d.prototype.zOa=function(f,m,p){f=f.get("mapLocations",[]);for(var q=0;q<f.length;q++){var r=f[q];if(r.get("map")==m)return r}return p&&f.length>0?f[0]:null};d.prototype.HPa=function(){this.tA.u$a(this.qw);this.tA.bind(h.nj,this.DX,this,!0);this.lRa()};d.prototype.jeb=function(){this.tA.Xgb(this.qw);this.tA.h(h.nj,this.DX,this)};d.prototype.mHa=function(){this.qw&&(this.jeb(),this.qw=null)};d.prototype.s$a=function(){this.eg&&(this.qw=this.zOa(this.eg,this.tA.get("map",null),!0))&&this.HPa()};d.prototype.lRa=
function(){if(this.qw){var f=this.renderer.Lc(),m=this.renderer.Jc();this.tA.jr(this.qw,f,m,this.renderer.ff())}};d.prototype.q$a=function(){this.tA.bind(k.N("map"),this.uMa,this,!1)};d.prototype.Vgb=function(){this.tA.h(k.N("map"),this.uMa,this)};d.prototype.uMa=function(){this.eg&&(this.mHa(),(this.qw=this.zOa(this.eg,this.tA.get("map",null),!1))&&this.HPa())};d.prototype.DX=function(f){this.m(new n(e.nj,{yawDelta:f.data.yawDelta}))};return d}(g);return e});
define("tdv/player/view/util/Gamepad","require tdv/constants/EventName tdv/events/async tdv/events/EventDispatcher tdv/view/util/Animation tdv/player/view/util/URL tdv/player/view/util/XR".split(" "),function(a){function l(w){this.l_=w;this.Il=null;this.Uba={};for(w=0;w<this.l_.buttons.length;w++)this.Uba[this.l_.buttons[w]]=!1;this.Sba=0;this.ZC=null;this.TH=[new THREE.Quaternion,new THREE.Quaternion];this.bm=this.TH[0];this.aj=[new THREE.Vector3,new THREE.Vector3];this.Rb=this.aj[0];this.UM=new THREE.Vector3;
this.PH=new THREE.Quaternion;this.Sua=0}function k(w,y,x){this.oeb=w;this.buttons=y;this.Fgb=x}function n(){if(!v&&u!=c.xf){u=c.xf;var w=navigator.getGamepads&&navigator.getGamepads();if(w){for(var y=0;y<q.length;y++)q[y].XOa(null);for(y=0;y<w.length;y++){var x=w[y];if(x&&(x.pose||x.FKa)){var z=x.id||x.hnb,A=z+(x.hand?"-"+x.hand:""),D=t[A];if(!D){a:{for(var E=0;E<f.length;E++){var B=f[E];if(z.indexOf(m[B].oeb)==0){z=B;break a}}z=void 0}z&&q.push(D=t[A]=new l(m[z]))}D&&t[A].XOa(x)}}(w=r)&&!r.Cna()&&
(r=null);for(y=0;y<q.length;y++)if(D=q[y],D.Cna()&&D.pressed()){r=D;break}if(!r)for(y=0;y<q.length;y++)if(D=q[y],D.Cna()){if(D.hand()=="right"){r=D;break}r||(r=D)}w!=r&&e.yE(g)}}}function g(){p.m(h.V)}var h=a("tdv/constants/EventName"),e=a("tdv/events/async"),b=a("tdv/events/EventDispatcher"),c=a("tdv/view/util/Animation"),d=a("tdv/player/view/util/URL");a("tdv/player/view/util/XR");var f="oculus go;oculus touch;xr-standard;gear vr;daydream;vive;vive focus;microsoft;unknown".split(";"),m={};m["oculus go"]=
new k("Oculus Go",["trackpad","trigger"],"trigger");m["oculus touch"]=new k("Oculus Touch","thumbstick trigger grip abutton bbutton surface".split(" "),"trigger");m["xr-standard"]=new k("xr-standard","trigger grip unknow_button_0 thumbstick abutton bbutton unknow_button".split(" "),"trigger");m["gear vr"]=new k("Gear VR",["trackpad","trigger"],"trigger");m.daydream=new k("Daydream Controller",["trackpad","menu","system"],"trackpad");m.vive=new k("OpenVR",["trackpad","trigger","grip","menu","system"],
"trigger");m["vive focus"]=new k("HTC Vive Focus",["trackpad","trigger","grip"],"trigger");m.microsoft=new k("Spatial Controller (Spatial Interaction Source)",["thumbstick","trigger","grip","menu","thumbpad"],"trigger");m.unknown=new k("",[],void 0);l.prototype.XOa=function(w){if(this.Il=w){this.w0a=this.Il.hand||this.Il.gnb;this.Il.pose&&this.Il.pose.orientation?(this.ZC=this.Il.pose,this.ZC.orientation&&(this.bm=this.TH[0]==this.bm?this.TH[1]:this.TH[0],this.bm.fromArray(this.ZC.orientation)),this.ZC.position?
(this.Rb=this.aj[0]==this.Rb?this.aj[1]:this.aj[0],this.Rb.fromArray(this.ZC.position)):this.Rb=null):this.Il.FKa&&(this.ZC=this.Il.FKa.transform,this.bm=this.TH[0]==this.bm?this.TH[1]:this.TH[0],this.bm.copy(this.ZC.orientation),this.Rb=this.aj[0]==this.Rb?this.aj[1]:this.aj[0],this.Rb.copy(this.ZC.position));w=0;for(var y=Math.min(this.Il.buttons.length,this.Il.buttons.length);w<y;w++)this.Uba[this.l_.buttons[w]]=this.Il.buttons[w].pressed;for(w=this.Sba=0;w<this.Il.buttons.length;w++)this.Il.buttons[w].pressed&&
this.Sba++;(w=!!this.UM!=!!this.Rb||this.Rb&&this.UM.x!=this.Rb.x&&this.UM.y!=this.Rb.y&&this.UM.z!=this.Rb.z)&&(this.Rb?this.UM.copy(this.Rb):this.UM.set(0,0,0,0));(y=!!this.PH!=!!this.bm||this.bm&&(this.PH.x!=this.bm.x||this.PH.y!=this.bm.y||this.PH.z!=this.bm.z||this.PH.w!=this.bm.w))&&(this.bm?this.PH.copy(this.bm):this.PH.set(0,0,0));if(w||y)this.Sua=c.xf}};l.prototype.Cna=function(){return!!this.Il};l.prototype.Keb=function(){return c.xf-this.Sua>500};l.prototype.hand=function(){return this.w0a};
l.prototype.quaternion=function(){return this.bm};l.prototype.position=function(){return this.Rb};l.prototype.pressed=function(w){w||(w=this.l_.Fgb);return w?this.Uba[w]:this.Sba>0};var p=new b;p.all=function(){n();return q};p.Sg=function(){n();return r};p.eb="left";p.Db="right";var q=[],r=null,t={},u=void 0,v=d.Rg("disable-controller",!1);return p});
define("tdv/player/view/util/geo/Line",["require","tdv/player/view/util/geo/Point","tdv/player/view/util/geo/Vector"],function(a){function l(g,h){this.Lg=g||new k(0,0,0);this.Fk=h||new k(1,0,0)}var k=a("tdv/player/view/util/geo/Point"),n=a("tdv/player/view/util/geo/Vector");l.prototype.clone=function(){return new l(this.Lg.clone(),this.Fk.clone())};l.prototype.apply=function(g){g.UN(this.Lg);g.UN(this.Fk)};l.prototype.SJa=function(){return n.LD(this.Lg,this.Fk)};return l});
define("tdv/player/view/util/geo/Frustum",["require","tdv/player/view/util/geo/Line","tdv/player/view/util/geo/Point"],function(a){function l(g,h,e){this.Pa=g||100;this.Ha=h||100;this.kb=e||Math.PI;this.Tha=void 0;this.Lu=!0}var k=a("tdv/player/view/util/geo/Line"),n=a("tdv/player/view/util/geo/Point");l.prototype.SJ=function(g){this.kb!=g&&(this.kb=g,this.Lu=!0)};l.prototype.hA=function(){return this.kb};l.prototype.FPa=function(g){this.Pa!=g&&(this.Pa=g,this.Lu=!0)};l.prototype.dg=function(){return this.Pa};
l.prototype.YOa=function(g){this.Ha!=g&&(this.Ha=g,this.Lu=!0)};l.prototype.wg=function(){return this.Ha};l.prototype.project=function(g){if(g.z!=0){this.lFa();var h=1/g.z,e=this.Tha*h;g.x=this.Pa*.5-g.x*e;g.y=this.Ha*.5-g.y*e;g.z=h}};l.prototype.unproject=function(g){this.lFa();return new k(new n(0,0,0),new n(this.Pa*.5-g.x,this.Ha*.5-g.y,this.Tha))};l.prototype.lFa=function(){this.Lu&&(this.Tha=this.Pa*.5/Math.tan(this.kb*.5),this.Lu=!1)};return l});
define("tdv/player/view/panorama/renderer/RendererState",["require","exports"],function(){return function(){function a(){this.kh=this.pitch=this.$a=0;this.gj=this.Ud=90;this.Rj=this.Sj=this.height=this.width=100;this.tl=1;this.nJ=this.ob=!1;this.Jk=0;this.vma=this.pV=this.aoa=!1;this.lJ=this.uX=!0;this.camera=this.MV=this.LV=this.oh=null;this.Gn=this.enabled=!1;this.xf=0;this.rY=void 0}a.prototype.clone=function(){var l=new a;l.$a=this.$a;l.pitch=this.pitch;l.kh=this.kh;l.Ud=this.Ud;l.gj=this.gj;
l.width=this.width;l.height=this.height;l.Sj=this.Sj;l.Rj=this.Rj;l.tl=this.tl;l.ob=this.ob;l.nJ=this.nJ;l.Jk=this.Jk;l.aoa=this.aoa;l.vma=this.vma;l.pV=this.pV;l.uX=this.uX;l.lJ=this.lJ;l.oh=this.oh;l.LV=this.LV;l.MV=this.MV;l.camera=this.camera;l.enabled=this.enabled;l.Gn=this.Gn;l.xf=this.xf;l.rY=this.rY;return l};return a}()});
define("tdv/player/view/panorama/renderer/3d/util/StereographicEffect",["require","tdv/constants/RenderOrder","tdv/player/view/panorama/renderer/constants/EyeLayer","tdv/player/view/panorama/renderer/3d/util/Util"],function(a){var l=a("tdv/constants/RenderOrder"),k=a("tdv/player/view/panorama/renderer/constants/EyeLayer"),n=a("tdv/player/view/panorama/renderer/3d/util/Util");return function(g){var h=1,e=new THREE.WebGLCubeRenderTarget(1024),b=new THREE.CubeCamera(.1,1E4,e);b.layers.enable(k.Ww);b.layers.enable(k.eb);
e=new THREE.ShaderMaterial;e.uniforms={tCube:{value:b.renderTarget.texture},tFlip:{value:1},opacity:{value:1}};e.fragmentShader="uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldPosition;\nvoid main() {\n\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\n\tgl_FragColor.a *= opacity;\n#include <tonemapping_fragment>\n#include <colorspace_fragment>\n}";e.vertexShader="varying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}\n";
e.side=THREE.BackSide;e.depthWrite=!1;e.transparent=!0;e.depthTest=!1;e.needsUpdate=!0;var c=new THREE.Mesh(new THREE.SphereGeometry(5,64,64),e);c.overdraw=!1;c.matrixAutoUpdate=!1;c.renderOrder=l.uTa;var d=new THREE.Matrix4;this.YJ=function(m){h=m};this.start=function(m){m.add(c);m.add(b);m.traverse(function(p){p.layers.test(b.layers)&&(p.userData.Lna=p.layers.mask,p.layers.mask=b.layers.mask)});b.visible=!0;c.visible=!0;g.setClearColor(16777215,1)};this.stop=function(m){g.setClearColor(0,0);m.traverse(function(p){p.userData.Lna!==
void 0&&(p.layers.mask=p.userData.Lna,delete p.userData.Lna)});b.visible=!1;c.visible=!1;m.remove(c);m.remove(b)};var f=0;this.render=function(m,p){h>0&&(c.matrix.copy(p.matrixWorld),c.matrix.multiply(d.makeTranslation(0,0,-h*5)),c.matrixWorldNeedsUpdate=!0,f++,n.Eeb()&&f%10!=0||(n.Ehb(),c.visible=!1,b.update(g,m),c.visible=!0))}}});
define("tdv/player/view/panorama/renderer/3d/Renderer","require tdv/player/view/util/geo/Fov tdv/player/view/util/geo/Quaternion tdv/player/view/panorama/renderer/constants/EyeLayer tdv/player/view/panorama/renderer/3d/util/StereographicEffect tdv/player/view/panorama/renderer/3d/util/GeometryUtil tdv/player/view/panorama/renderer/3d/util/SceneUtil tdv/player/view/panorama/renderer/3d/util/Util tdv/player/view/util/XR".split(" "),function(a){function l(m){this.R=m;this.zc=new THREE.PerspectiveCamera(90,
16/9,.1,2*e.ph);this.zc.layers.enable(g.eb);this.Nu=new THREE.PerspectiveCamera;this.Bb=new THREE.Scene;this.Cva=new THREE.Scene;this.Dva=new THREE.Scene;this.Bb.add(this.zc);this.aq=this.lja=this.x_=this.w_=this.o=null;this.aza=this.Fca=!1}var k=a("tdv/player/view/util/geo/Fov"),n=a("tdv/player/view/util/geo/Quaternion"),g=a("tdv/player/view/panorama/renderer/constants/EyeLayer"),h=a("tdv/player/view/panorama/renderer/3d/util/StereographicEffect"),e=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),
b=a("tdv/player/view/panorama/renderer/3d/util/SceneUtil"),c=a("tdv/player/view/panorama/renderer/3d/util/Util"),d=a("tdv/player/view/util/XR");l.prototype.icb=function(){this.XWa()};l.prototype.Jn=function(){return this.o};l.prototype.Qf=function(){return this.Bb};l.prototype.getCamera=function(){return this.Nu};l.prototype.Dt=function(){return d.isPresenting&&d.zg==this.o&&d.IA==this.Bb};l.prototype.scb=function(){return this.Nu.isArrayCamera&&this.Nu.cameras.length>0?Math.atan2(1,this.Nu.cameras[0].projectionMatrix.elements[5])*
2*f:this.Nu.fov};l.prototype.getPixelRatio=function(){return this.o?this.o.getPixelRatio():c.getPixelRatio()};l.prototype.vcb=function(){return d.isPresenting&&d.framebufferWidth?d.framebufferWidth*.5:this.o?this.o.domElement.width:1024};l.prototype.ucb=function(){return d.isPresenting&&d.framebufferHeight?d.framebufferHeight:this.o?this.o.domElement.height:1024};l.prototype.Ig=function(){return this.o.domElement};l.prototype.update=function(m){this.n9a(m);this.N8a(m);this.ct(m)};l.prototype.yla=
function(m){this.o.Fn=!0;m=c.rbb(m);var p=new THREE.CubeCamera(this.Nu.near,this.Nu.far,m);this.Bb.add(p);p.position.setFromMatrixPosition(this.Nu.matrixWorld);p.update(this.o,this.Bb);this.Bb.remove(p);this.o.Fn=!1;return m.texture};l.prototype.render=function(){this.b3()};l.prototype.n9a=function(m){m.enabled&&(this.o||this.T6a(m),m.ob&&d.getType()==d.zx.ko&&(this.aza=!0));this.aEa==m.width&&this.$Da==m.height||this.o.setSize(this.aEa=m.width,this.$Da=m.height);if(this.Fca=m.enabled&&!m.ob)this.w_.setSize(m.width,
m.height),this.x_.setSize(m.width,m.height)};l.prototype.T6a=function(m){!this.o&&m.enabled&&(this.R.Kc().a5(),this.w_=this.R.Kc().qcb(),this.o=this.R.Kc().Jn(),m=this.o.getSize(new THREE.Vector2),this.aEa=m.width,this.$Da=m.height,this.x_=this.R.Kc().rcb(),this.lja=new h(this.o,this.zc))};l.prototype.XWa=function(){this.o&&(this.w_=this.o=this.x_=this.aq=null,this.R.Kc().A8())};l.prototype.ct=function(m){m.ob?this.Nu=this.o.xr.getCamera():(this.zc.quaternion.copy(n.PIa(m.$a,m.pitch,m.kh)),this.zc.fov=
k.xm(m.Ud,m.width,m.height),this.zc.aspect=m.width/m.height,this.zc.updateProjectionMatrix(),this.zc.updateMatrixWorld(),this.Nu=this.zc);b.Dhb(this.Bb,this.Dt()?this.o.xr.getCamera().cameras:[this.zc]);this.Bb.snb===!0&&this.Bb.updateMatrixWorld()};l.prototype.N8a=function(m){var p=!m.ob&&m.Jk>0?this.lja:null;this.aq!=p&&(this.aq&&this.aq.stop(this.Bb),(this.aq=p)&&this.aq.start(this.Bb));this.aq&&this.aq==this.lja&&this.aq.YJ(m.Jk)};l.prototype.b3=function(){this.aza&&this.o.resetState();this.aq&&
this.aq.render(this.Bb,this.zc);this.o.render(this.Bb,this.zc);this.Fca&&(this.w_.render(this.Cva,this.zc),this.x_.render(this.Dva,this.zc))};var f=180/Math.PI;return l});
define("tdv/player/view/panorama/renderer/object/ComposedWebGLObject","require tdv/utils tdv/player/view/panorama/renderer/object/Base tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource tdv/player/view/panorama/renderer/3d/util/MaterialUtil tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/3d/util/SceneUtil tdv/player/view/panorama/renderer/TextureLoader tdv/player/view/panorama/renderer/OcclusionCuller".split(" "),function(a){var l=a("tdv/utils"),
k=a("tdv/player/view/panorama/renderer/object/Base"),n=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource"),g=a("tdv/player/view/panorama/renderer/3d/util/MaterialUtil"),h=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),e=a("tdv/player/view/panorama/renderer/3d/util/SceneUtil"),b=a("tdv/player/view/panorama/renderer/TextureLoader"),c=a("tdv/player/view/panorama/renderer/OcclusionCuller");a=l.extend(k,function(){k.call(this);this.set("tag","ComposedWebGLObject");
this.set("webglScene",null);this.set("meshGroup",null);this.set("camera",null);this.set("textureSource",null);this.set("materialConfig",this.aga=new g.Jp);this.Vx&&this.Vx();this.wG&&this.wG();this.bC&&this.bC();this.Zp&&this.Zp()});a.prototype.fc=function(){k.prototype.fc.call(this);this.rq&&this.rq();this.mS&&this.mS();this.NM&&this.NM()};a.prototype.lc=function(){this.jM&&this.jM();this.PM&&this.PM();this.tq&&this.tq();h.dispose(this.get("meshGroup"));h.Mw(this.get("meshGroup"),null);this.set("meshGroup",
null);k.prototype.lc.call(this)};a.prototype.ya=function(d){this.$f&&this.$f(d);k.prototype.ya.call(this,d);this.set("camera",e.getCamera(d.oh));this.set("webglScene",d.oh);this.get("meshGroup")||(this.set("meshGroup",h.JHa(this.Yp())),this.get("meshGroup").userData.mgb=this);this.W("webglScene","meshGroup")&&h.Mw(this.get("meshGroup"),this.get("webglScene"));this.Bn();this.Qj&&this.Qj(d);this.z9a();this.Fz&&this.Fz(d);this.Kq&&this.Kq(d);this.uI();this.W("loadingActive","meshGroup")&&b.Ua(this.get("meshGroup"),
this.get("loadingActive"));this.W("blendingActive","meshGroup")&&c.JOa(this.get("meshGroup"),this.get("blendingActive"))};a.prototype.Bn=function(){this.W("composedAlpha","meshGroup")&&this.MB()};a.prototype.MB=function(){h.Bf(this.get("meshGroup"),this.get("composedAlpha"))};a.prototype.z9a=function(){if(this.W("textureSource")||this.W("materialConfig")&&!this.aga.isEqual(this.get("materialConfig"))){var d=this.NL();d&&(h.sib(d,this.WQ()),this.MB())}};a.prototype.uI=function(){if(this.W("index",
"meshGroup")){var d=this.get("meshGroup");d&&d.children.forEach(function(f,m,p){h.j9(f,this.get("index")+m/p.length)}.bind(this))}};a.prototype.WQ=function(){var d=this.get("textureSource")||new n;this.aga=this.get("materialConfig");var f=g.rm(d.texture(),this.aga);b.zP(f,d);return[f]};a.prototype.uva=function(){var d=new n,f=g.rm(d.texture());b.zP(f,d);return[f]};a.prototype.oy=function(d){return h.Qcb(this.get("meshGroup"),d)};return a});
define("tdv/player/view/panorama/renderer/object/geometry/RectangleGeometryMixin","require tdv/constants/Priority tdv/player/view/panorama/renderer/3d/util/GeometryUtil tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/view/util/Scale tdv/player/view/panorama/renderer/TextureLoader tdv/player/view/util/geo/Fov tdv/player/view/util/geo/Quaternion tdv/view/constants/Alignment".split(" "),function(a){var l=a("tdv/constants/Priority"),k=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),
n=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),g=a("tdv/view/util/Scale"),h=a("tdv/player/view/panorama/renderer/TextureLoader"),e=a("tdv/player/view/util/geo/Fov"),b=a("tdv/player/view/util/geo/Quaternion"),c=a("tdv/view/constants/Alignment"),d=new THREE.Matrix4,f=Math.PI/180;return{Vx:function(){this.set("distance",void 0);this.set("rotationX",0);this.set("rotationY",0);this.set("rotationZ",0);this.set("yaw",0);this.set("pitch",0);this.set("roll",0);this.set("scale",1);this.set("contentWidth",
100);this.set("contentHeight",100);this.set("hfov",void 0);this.set("vfov",null);this.set("scaleMode",null);this.set("horizontalAlign",null);this.set("verticalAlign",null);this.set("attachToCamera",!1);this.Jh=this.aC();this.ti=new THREE.Matrix4;this.ge=new THREE.Matrix4;this.sq=new THREE.Matrix4;this.Eo=new THREE.Matrix4;this.rk=new THREE.Matrix4;this.Iba=new THREE.Matrix4;this.mua=new THREE.Quaternion;this.ova=new THREE.Matrix4;this.GQ=new THREE.Matrix4;this.SQ=new THREE.Matrix4;this.TB=new THREE.Matrix4;
this.Qi=new THREE.Matrix4},Fz:function(m){this.et(m);this.zka()},zka:function(){if(this.W("hfov","vfov","contentWidth","contentHeight","panoramaPixelsPerDegree","scaleMode","horizontalAlign","verticalAlign")){var m=g.Tma(this.get("hfov"),this.get("vfov"),this.get("contentWidth"),this.get("contentHeight"),this.get("scaleMode"),this.get("panoramaPixelsPerDegree"),this.get("horizontalAlign"),this.get("verticalAlign"));m=k.pPa(this.Jh[1],m.xY,m.GY,m.$A,m.cB);this.Jh[1]!=m&&(this.Jh[1]=m,(m=this.NL())&&
n.Cpa(m,this.Jh[1]))}},NL:function(){var m=this.get("meshGroup");return m?n.um(m)[1]:null},Yp:function(){return[0,1].map(function(m){var p=m==0?this.uva():this.WQ();m=n.create(this.Jh[m],p);h.QA(m,h.Hr);h.RA(m,h.su);h.UJ(m,l.kQ);h.jY(m,1);return m}.bind(this))},aC:function(){return[k.lO(),k.lO()]},et:function(m){var p=!1;this.W("composedTranslationX","composedTranslationY","composedTranslationZ")&&(this.ti.makeTranslation(-this.get("composedTranslationX")*.5*k.ph,this.get("composedTranslationY")*
.5*k.ph,this.get("composedTranslationZ")*.5*k.ph),p=!0);this.W("composedDeltaYaw","composedDeltaPitch","composedDeltaRoll")&&(this.ge.makeRotationY(-m.$a*f),this.ge.multiply(d.makeRotationX(-this.get("composedDeltaPitch")*f)),this.ge.multiply(d.makeRotationY(this.get("composedDeltaYaw")*f)),this.ge.multiply(d.makeRotationY(m.$a*f)),p=!0);this.W("yaw","pitch")&&(this.sq.makeRotationY(-this.get("yaw")*f),this.sq.multiply(d.makeRotationX(this.get("pitch")*f)),p=!0);if(this.W("distance","flipHorizontally",
"scale","hfov","vfov","contentWidth","contentHeight","scaleMode","horizontalAlign","verticalAlign","composedTranslationX","composedTranslationY","composedTranslationZ")){var q=this.Ia.get("composedTranslationX")==0&&this.Ia.get("composedTranslationY")==0&&this.Ia.get("composedTranslationZ")==0&&this.get("distance")!==void 0?k.fw(this.get("distance")):k.xt();this.Eo.makeTranslation(0,0,-q);var r=this.get("contentWidth"),t=this.get("contentHeight"),u=this.get("hfov"),v=this.get("vfov")||e.xm(u,r,t),
w=(this.get("flipHorizontally")?-1:1)*this.get("scale"),y=this.get("scale"),x=this.get("scaleMode"),z=this.get("panoramaPixelsPerDegree");p=this.get("horizontalAlign")||c.Ye;var A=this.get("verticalAlign")||c.Xd;r=g.Tma(u,v,r,t,x,z,p,A);u=w*k.Uma(q,u);v=y*k.Vma(q,v);this.GQ.makeScale(u,v,1);w*=k.Uma(q,r.Ud);q=y*k.Vma(q,r.Nk);this.SQ.makeScale(w,q,1);this.ova.makeTranslation(p==c.eb?-(u-w)*.5:p==c.Db?(u-w)*.5:0,A==c.Tc?(v-q)*.5:A==c.Fc?-(v-q)*.5:0,0);p=!0}this.W("rotationX","rotationY","rotationZ",
"roll")&&(this.rk.makeRotationZ(this.get("roll")*f),this.rk.multiply(d.makeRotationY(this.get("rotationY")*f)),this.rk.multiply(d.makeRotationX(this.get("rotationX")*f)),this.rk.multiply(d.makeRotationZ(this.get("rotationZ")*f)),p=!0);this.set("cameraYaw",m.$a);this.set("cameraPitch",m.pitch);this.set("cameraRoll",m.kh);this.get("attachToCamera")&&this.W("cameraYaw","cameraPitch","cameraRoll")?(this.mua.copy(b.PIa(m.$a,m.pitch,m.kh)),this.Iba.makeRotationFromQuaternion(this.mua),p=!0):this.W("attachToCamera")&&
(this.Iba.identity(),p=!0);if(p||this.W("meshGroup"))this.Qi.copy(this.ti),this.Qi.multiply(this.ge),this.Qi.multiply(this.Iba),this.Qi.multiply(this.sq),this.Qi.multiply(this.Eo),this.Qi.multiply(this.rk),this.TB.copy(this.Qi),this.TB.multiply(this.GQ),this.Qi.multiply(this.ova),this.Qi.multiply(this.SQ),m=n.um(this.get("meshGroup")),n.mt(m[0],this.TB),n.mt(m[1],this.Qi)}}});
define("tdv/player/view/panorama/renderer/object/Plane",["require","tdv/utils","tdv/player/view/panorama/renderer/object/ComposedWebGLObject","tdv/player/view/panorama/renderer/object/geometry/RectangleGeometryMixin"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/panorama/renderer/object/ComposedWebGLObject");a=a("tdv/player/view/panorama/renderer/object/geometry/RectangleGeometryMixin");return l.extend(k,a,function(){k.call(this);this.set("tag","Plane")})});
define("tdv/player/view/panorama/renderer/object/Cap","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/parser/ClassInfo tdv/player/view/panorama/renderer/object/Plane tdv/player/view/panorama/renderer/object/texturesource/ImageTextureSource tdv/player/view/panorama/renderer/object/util/EventAggregator tdv/player/view/panorama/renderer/object/util/LevelUtil tdv/player/view/util/ColorPicker tdv/view/events/ProgressEvent".split(" "),function(a){function l(q,r,t,u,v,w){for(q=
(q-r)/w;t+180<u;)u-=360;for(;t-180>u;)u+=360;t=(t-u)/w;return t=q<-.1||q>.1?k(v,t,Math.abs(1/(1500*q))):k(v,t,.08)}function k(q,r,t){q=(r-q)*(1-t);Math.abs(q)<1E-5&&(q=0);return r-q}var n=a("tdv/utils"),g=a("tdv/binding/BindingsHandler"),h=a("tdv/constants/EventName"),e=a("tdv/player/parser/ClassInfo"),b=a("tdv/player/view/panorama/renderer/object/Plane"),c=a("tdv/player/view/panorama/renderer/object/texturesource/ImageTextureSource"),d=a("tdv/player/view/panorama/renderer/object/util/EventAggregator"),
f=a("tdv/player/view/panorama/renderer/object/util/LevelUtil"),m=a("tdv/player/view/util/ColorPicker"),p=a("tdv/view/events/ProgressEvent");a=n.extend(b,function(q){b.call(this);this.C=q;this.Pl.push(this.C);this.Pg=this.Pg.bind(this);this.Of=e.Qa("CeilingCapPanoramaOverlay",this.C)?"ceiling":"tripod";this.set("tag","Cap");this.set("pitch",this.Of=="tripod"?-90:90);this.Ad=!1;this.QH=this.Rha=this.nv=void 0;this.$3a=this.Of=="tripod"?1:-1;this.Fl=this.am=this.Lh=null});a.prototype.fc=function(){b.prototype.fc.call(this);
this.Lh=(new d(h.ia)).io(this.vs.bind(this));this.am=(new d(h.xc)).$q(this.yH.bind(this));g.ba(this.C,"angle distance hfov image.levels.url inertia rotate".split(" "),this.Pg,!0)};a.prototype.lc=function(){this.Fl&&this.Fl.dispose();this.Fl=null;this.Lh.dispose();this.am.dispose();g.da(this.C,"angle distance hfov image.levels.url inertia rotate".split(" "),this.Pg);b.prototype.lc.call(this)};a.prototype.Pg=function(){this.set("angle",this.C.get("angle"));this.set("distance",this.C.get("distance"));
this.set("hfov",this.C.get("hfov"));var q=f.wcb(this.C,this.get("panoramaPixelsPerDegree"));this.set("imageURL",q&&q.get("url"));this.set("imageWidth",q&&q.get("width"));this.set("imageHeight",q&&q.get("height"));this.set("inertia",this.C.get("inertia"));this.set("rotate",this.C.get("rotate"))};a.prototype.Yp=function(){var q=b.prototype.Yp.call(this);this.Lh.fg(q);this.am.fg(q);return q};a.prototype.ya=function(q){this.gka();this.CN(q);b.prototype.ya.call(this,q)};a.prototype.gka=function(){this.W("imageURL")&&
this.get("imageURL")&&(this.set("textureSource",new c(this.get("imageURL"))),this.set("contentWidth",this.get("imageWidth")),this.set("contentHeight",this.get("imageHeight")))};a.prototype.vs=function(){this.m(h.ud);this.m(h.ia)};a.prototype.yH=function(q,r){var t=0;r.aw(function(u){(u=r.Mn(u))&&(t+=u.percent)});this.m(new p(h.xc,t/r.xd.length))};a.prototype.CN=function(q){this.set("rendererYaw",q.$a);if(this.W("angle","inertia","rotate")||(this.get("rotate")||this.get("inertia"))&&this.W("rendererYaw")){var r=
this.get("angle"),t=this.get("rotate"),u=this.get("inertia"),v=this.$3a*q.$a;t&&(r+=v);var w=0,y=r-v;this.nv!==void 0&&(u&&(t?(w=l(v,this.QH,r,this.nv,this.Rha,q.xf),r=this.nv+w*q.xf):(w=l(v,this.QH,y,this.OBa,this.Rha,q.xf),y=this.OBa+w*q.xf,r=y+v)),this.nv!=r&&this.Na());this.OBa=y;this.nv=r;this.Rha=w;this.QH=v;this.set("rotationZ",-r)}};a.prototype.Zn=function(q){if(q.Wf==h.Lm){var r=!q.qm()&&this.Ys(q);r&&(q.yD(this.C),this.C.get("useHandCursor")&&q.CI(this.C),q.nm(this.get("distance")));this.Ad!=
r&&(this.Ad=r,this.C.m(this.Ad?h.tc:h.Eb),q.pw()&&this.C.m(this.Ad?h.EF:h.Jr))}else q.Wf==h.Uf&&!q.qm()&&this.Ys(q)&&(this.C.AO(h.la,!0).length>1&&q.Yt(this.C),q.nm(this.get("distance")),this.C.m(h.la))};a.prototype.Ys=function(q){return this.oy(q.Os).some(function(r){var t=this.c_a();return t&&t.WA(r.x,r.y)}.bind(this))};a.prototype.c_a=function(){if(this.Fl)return this.Fl;var q=this.get("textureSource");if(q=q&&q.xg())this.Fl=new m(q);return this.Fl};return a});
define("tdv/player/view/panorama/renderer/object/ParticleCylinders","require tdv/utils tdv/constants/EventName tdv/constants/PlaybackState tdv/player/view/panorama/renderer/object/Base tdv/player/view/util/XR".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/player/view/panorama/renderer/object/Base"),h=a("tdv/player/view/util/XR");a=l.extend(g,function(){g.call(this);this.ti=new THREE.Matrix4;this.BFa=!1;this.Bj=new THREE.Matrix4;
this.ah=null;this.tn=new THREE.Matrix4;this.PT=this.CT=0;this.zQ=.75;this.cR=.5;this.$u=4;this.ega=0;this.av=-2;this.rs=3;this.c1=0;this.HG=7;this.vT=this.WC=1;this.rS=.15;this.IG=this.HH=0;this.x0=this.O2=n.ca;this.Z3=this.T3=1E3});var e=Math.PI/180,b=new THREE.Matrix4;a.prototype.yo=function(){};a.prototype.fc=function(){g.prototype.fc.call(this);this.m(k.ud);this.m(k.ia)};a.prototype.lc=function(){this.gca()};a.prototype.Sl=function(){this.yo();this.TT()};a.prototype.Tl=function(){this.Na()};a.prototype.TT=
function(){this.ah&&(this.gca(),this.wva())};a.prototype.t_=function(){};a.prototype.wva=function(){this.Q4a();this.ah=new THREE.Group;for(var c=this.x0==n.PLAYING,d=this.HH,f=this.IG;f+d>0;){var m=Math.random()*(f+d)<=f;m?f--:d--;var p=this.t_();p.matrixAutoUpdate=!1;p.overdraw=!1;p.material.opacity=0;p.userData={Zbb:m,nP:new THREE.Matrix4,nGa:new THREE.Matrix4,mpa:new THREE.Matrix4,y:void 0,URa:void 0,vE:c};this.ah.add(p);c&&this.sia(p,this.av,this.rs);this.O4a(p)}this.CT=c?this.ah.children.length:
0;this.Uka.add(this.ah);this.lua()};a.prototype.gca=function(){if(this.ah){this.ah.parent&&this.ah.parent.remove(this.ah);for(var c=0,d=this.ah&&this.ah.children.length;c<d;c++)this.ah.children[c].material.dispose();this.ah=null;this.PT=0}};a.prototype.Q4a=function(){this.tn=(new THREE.Matrix4).makeScale(this.WC,this.WC,this.WC)};a.prototype.sia=function(c,d,f){d+=Math.random()*(f-d);if(c.userData.Zbb){f=this.HG;var m=360*Math.random()*e;c.userData.nP.makeTranslation(f*Math.cos(m),d,f*Math.sin(m))}else f=
Math.random()*2*Math.PI,m=this.ega+(this.$u-this.ega)*Math.sqrt(Math.random()),c.userData.nP.makeTranslation(m*Math.cos(f),d,m*Math.sin(f));c.userData.nP.multiply(this.tn);c.userData.y=d};a.prototype.O4a=function(c){var d=this.rS+Math.random()*(this.qH-this.rS);do var f=Math.random()*this.c1;while(f>80&&f<100);var m=Math.random()*360,p=Math.sin(m*e)*Math.sin(f*e)*d,q=-Math.cos(f*e)*d;d*=Math.cos(m*e)*Math.sin(f*e);c.userData.URa=q*this.WC;c.userData.nGa.makeTranslation(p,q,d);c.userData.mpa.makeRotationY(m*
e);c.userData.mpa.multiply(b.makeRotationX(-f*e))};a.prototype.ya=function(c){g.prototype.ya.call(this,c);this.G8a(c);this.Uka=c.oh;this.Uka!=(this.ah&&this.ah.parent)?(this.gca(),this.Uka&&this.wva()):this.W("index")&&this.lua();this.g9a(c)};a.prototype.G8a=function(c){c=c.ob&&h.getType()==h.zx.ko;c!=this.Sxa&&(this.Sxa=c)&&setTimeout(function(){this.ah&&this.TT()}.bind(this),0)};a.prototype.g9a=function(c){if(this.ah){this.W("composedTranslationX","composedTranslationY","composedTranslationZ")&&
(this.BFa=this.get("composedTranslationX")!=0||this.get("composedTranslationY")!=0||this.get("composedTranslationZ")!=0,this.ti.makeTranslation(-this.get("composedTranslationX")*this.$u,this.get("composedTranslationY")*this.$u,this.get("composedTranslationZ")*this.$u));var d=this.O2==n.PLAYING,f=this.ah.children,m=f.length,p=d?Math.round(m*c.xf/this.T3):0;if(this.CT+p>0){this.PT=d?0:Math.min(this.CT,this.PT+Math.round(m*c.xf/this.Z3));c=this.get("composedAlpha");for(d=0;d<m;d++){var q=f[d];if(!q.userData.vE)if(p>
0)p--,q.userData.vE=!0,this.CT++,this.sia(q,this.rs,this.rs+(this.rs-this.av));else continue;q.userData.nP.multiply(q.userData.nGa);q.userData.y+=q.userData.URa;if(q.userData.y<this.av||q.userData.y>this.rs){if(this.PT>0){this.PT--;q.userData.vE=!1;this.CT--;q.material.opacity=0;continue}var r=q.userData.y<this.av?this.rs:this.av;this.sia(q,r,r)}r=c;q.userData.y<this.av+this.cR?r*=(q.userData.y-this.av)/this.cR:q.userData.y>this.rs-this.zQ&&(r*=(this.rs-q.userData.y)/this.zQ);q.material.opacity=r*
this.vT;this.BFa?(q.matrix.copy(this.ti),q.matrix.multiply(q.userData.nP)):q.matrix.copy(q.userData.nP);q.matrix.multiply(q.userData.mpa);q.matrixWorldNeedsUpdate=!0}this.Na()}}};a.prototype.lua=function(){if(this.ah)for(var c=this.get("index"),d=0;d<this.ah.children.length;d++)this.ah.children[d].renderOrder=c};return a});
define("tdv/player/view/panorama/renderer/object/Dust","require tdv/utils tdv/binding/BindingsHandler tdv/constants/PlaybackState tdv/player/view/panorama/renderer/object/ParticleCylinders tdv/player/view/util/Color tdv/player/view/util/Device".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/PlaybackState"),g=a("tdv/player/view/panorama/renderer/object/ParticleCylinders"),h=a("tdv/player/view/util/Color"),e=a("tdv/player/view/util/Device");a=l.extend(g,
function(c){g.call(this);this.C=c;this.Sl=this.Sl.bind(this);this.Tl=this.Tl.bind(this);this.yo()});a.prototype.fc=function(){g.prototype.fc.call(this);this.C.set("state",this.C.get("startState"));k.ba(this.C,"color intensity speed opacity distance maxDistance farPlaneDistance minSpeed maxSpeed particleCount farPlaneParticleCount particleScale".split(" "),this.Sl,!0);k.ba(this.C,["state"],this.Tl,!0)};a.prototype.lc=function(){k.da(this.C,"color intensity speed opacity distance maxDistance farPlaneDistance minSpeed maxSpeed particleCount farPlaneParticleCount particleScale".split(" "),
this.Sl);k.da(this.C,["state"],this.Tl);this.C.set("state",n.ca);g.prototype.lc.call(this)};a.prototype.Sl=function(){this.yo();this.TT()};a.prototype.Tl=function(){this.O2=this.C.get("state");this.Na()};a.prototype.yo=function(){g.prototype.yo.call(this);var c=e.ub()||e.Ub()==e.Xw?2500:e.gf()?4E3:5E3;this.rS=this.qH=this.C.get("speed",.2)*.2;this.$u=this.C.get("distance",.5)*14.5+.5;this.vT=this.C.get("opacity",.1)*1;this.WC=.036;this.HH=this.C.get("intensity",.1)*c;this.Ie=h.xp(this.C.get("color",
"#ffffff"));this.IG=0;this.HG=15;this.x0=this.C.get("initialState");this.T3=this.C.get("startDuration");this.Z3=this.C.get("stopDuration");this.zQ=.75;this.cR=.5;this.av=-2;this.rs=4;this.c1=180;this.$va()};a.prototype.t_=function(){return new THREE.Sprite(this.Wx())};a.prototype.Wx=function(){var c=new THREE.SpriteMaterial;c.map=this.$r();c.side=THREE.FrontSide;c.transparent=!0;c.depthTest=!1;c.needsUpdate=!0;return c};a.prototype.$r=function(){if(this.Ma)return this.Ma;var c=document.createElement("canvas");
c.width=c.height=b;this.Ma=new THREE.Texture;this.Ma.colorSpace=THREE.SRGBColorSpace;this.Ma.image=c;this.Ma.needsUpdate=!0;this.$va();return this.Ma};a.prototype.$va=function(){if(this.Ma){var c=this.Ma.image,d=c.getContext("2d"),f=d.createRadialGradient(c.width*.5,c.height*.5,c.height*.2,c.width*.5,c.height*.5,c.height*.5);f.addColorStop(0,"rgba("+this.Ie[0]+", "+this.Ie[1]+", "+this.Ie[2]+", 1)");f.addColorStop(1,"rgba("+this.Ie[0]+", "+this.Ie[1]+", "+this.Ie[2]+", 0)");d.fillStyle=f;d.clearRect(0,
0,c.width,c.height);d.fillRect(0,0,c.width,c.height);this.Ma.needsUpdate=!0}};var b=32;return a});
define("tdv/player/view/panorama/renderer/object/geometry/FlatRectangleGeometryMixin","require tdv/utils tdv/constants/Priority tdv/player/view/panorama/renderer/3d/util/GeometryUtil tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/view/util/Scale tdv/player/view/panorama/renderer/TextureLoader tdv/view/constants/Alignment".split(" "),function(a){a("tdv/utils");var l=a("tdv/constants/Priority"),k=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),n=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),
g=a("tdv/view/util/Scale"),h=a("tdv/player/view/panorama/renderer/TextureLoader"),e=a("tdv/view/constants/Alignment"),b=new THREE.Matrix4,c=Math.PI/180;return{Vx:function(){this.set("distance",void 0);this.set("width",100);this.set("height",100);this.set("offsetX",void 0);this.set("offsetY",void 0);this.set("yaw",0);this.set("pitch",0);this.set("roll",0);this.set("rotationZ",0);this.set("contentWidth",100);this.set("contentHeight",100);this.set("scale",1);this.set("scaleMode",null);this.set("horizontalAlign",
null);this.set("verticalAlign",null);this.Jh=this.aC();this.ti=new THREE.Matrix4;this.ge=new THREE.Matrix4;this.sq=new THREE.Matrix4;this.Eo=new THREE.Matrix4;this.kL=new THREE.Matrix4;this.fN=new THREE.Matrix4;this.vua=new THREE.Matrix4;this.rk=new THREE.Matrix4;this.rva=new THREE.Matrix4;this.GQ=new THREE.Matrix4;this.SQ=new THREE.Matrix4;this.TB=new THREE.Matrix4;this.Qi=new THREE.Matrix4;this.mL=new THREE.Matrix4;this.oG=new THREE.Vector3},Fz:function(d){this.et(d);this.zka()},zka:function(){if(this.W("width",
"height","contentWidth","contentHeight","scaleMode","horizontalAlign","verticalAlign")){var d=g.m6(this.get("width"),this.get("height"),this.get("contentWidth"),this.get("contentHeight"),this.get("scaleMode"),this.get("horizontalAlign"),this.get("verticalAlign"));d=k.pPa(this.Jh[1],d.xY,d.GY,d.$A,d.cB);this.Jh[1]!=d&&(this.Jh[1]=d,(d=this.NL())&&n.Cpa(d,this.Jh[1]))}},NL:function(){var d=this.get("meshGroup");return d?n.um(d)[1]:null},Yp:function(){return[0,1].map(function(d){var f=d==0?this.uva():
this.WQ();d=n.create(this.Jh[d],f);h.QA(d,h.Hr);h.RA(d,h.su);h.UJ(d,l.kQ);h.jY(d,1);return d}.bind(this))},aC:function(){return[k.lO(),k.lO()]},et:function(d){var f=!1;this.W("composedTranslationX","composedTranslationY","composedTranslationZ")&&(this.ti.makeTranslation(-this.get("composedTranslationX")*.5*k.ph,this.get("composedTranslationY")*.5*k.ph,this.get("composedTranslationZ")*.5*k.ph),f=!0);this.W("composedDeltaYaw","composedDeltaPitch","composedDeltaRoll")&&(this.ge.makeRotationY(-d.$a*c),
this.ge.multiply(b.makeRotationX(-this.get("composedDeltaPitch")*c)),this.ge.multiply(b.makeRotationY(this.get("composedDeltaYaw")*c)),this.ge.multiply(b.makeRotationY(d.$a*c)),f=!0);this.W("yaw","pitch")&&(this.sq.makeRotationY(-this.get("yaw")*c),this.sq.multiply(b.makeRotationX(this.get("pitch")*c)),f=!0);if(this.W("distance","composedTranslationX","composedTranslationY","composedTranslationZ")){var m=this.get("composedTranslationX")==0&&this.get("composedTranslationY")==0&&this.get("composedTranslationZ")==
0&&this.get("distance")!==void 0;this.set("z",m?k.fw(this.get("distance")):k.xt())}this.W("z")&&(this.Eo.makeTranslation(0,0,-this.get("z")),f=!0);f&&(this.mL.copy(this.ti),this.mL.multiply(this.ge),this.mL.multiply(this.sq),this.mL.multiply(this.Eo));m=!1;this.set("rendererYaw",d.$a);this.set("rendererPitch",d.pitch);this.set("rendererRoll",d.kh);this.set("rendererCameraFOV",d.gj);this.set("rendererWidth",d.width);this.set("rendererHeight",d.height);d.gj&&this.W("z","rendererCameraFOV")&&this.set("rendererHeightZ",
Math.tan(d.gj*c*.5)*this.get("z")*2);if(d.gj&&(f||this.W("rendererYaw","rendererPitch","rendererRoll","rendererCameraFOV","rendererWidth","rendererHeight","rendererHeightZ","inVR"))){if(d.ob)this.kL.copy(this.mL),this.fN.identity();else{m=d.camera;this.kL.copy(m.matrixWorld);this.oG.setFromMatrixPosition(m.matrixWorld);this.oG.applyMatrix4(this.mL);this.oG.applyMatrix4(m.matrixWorldInverse);var p=-10,q=-10;this.oG.z<0&&(this.oG.applyMatrix4(m.projectionMatrix),p=this.oG.x*.5,q=this.oG.y*.5);var r=
this.get("rendererHeightZ");this.fN.makeTranslation(r*m.aspect*p,q*r,0)}m=!0}this.W("roll")&&(this.rk.makeRotationZ(this.get("roll")*c),m=!0);if(d.gj&&(f||this.W("rendererHeight","inVR","rendererHeightZ","width","height","contentWidth","contentHeight","scale","scaleMode","horizontalAlign","verticalAlign","flipHorizontally","offsetX","offsetY"))){f=d.ob?1024:d.height;m=this.get("scale")*this.get("rendererHeightZ")/f*(d.ob?2:1);var t=this.get("width");q=this.get("height");var u=this.get("offsetX");
r=this.get("offsetY");var v=this.get("contentWidth"),w=this.get("contentHeight");p=(this.get("flipHorizontally")?-1:1)*m;var y=this.get("scaleMode");d=this.get("horizontalAlign")||e.Ye;f=this.get("verticalAlign")||e.Xd;y=g.m6(t,q,v,w,y,d,f);v=p*t;w=m*q;this.GQ.makeScale(v,w,1);t=p*(t*.5-u);q=m*(r-q*.5);this.vua.makeTranslation(t,q,0);p*=y.width;m*=y.height;this.SQ.makeScale(p,m,1);this.rva.makeTranslation((d==e.eb?-(v-p)*.5:d==e.Db?(v-p)*.5:0)+t,(f==e.Tc?(w-m)*.5:f==e.Fc?-(w-m)*.5:0)+q,0);m=!0}m&&
(this.Qi.copy(this.kL),this.Qi.multiply(this.Eo),this.Qi.multiply(this.fN),this.Qi.multiply(this.rk),this.TB.copy(this.Qi),this.TB.multiply(this.vua),this.TB.multiply(this.GQ),this.Qi.multiply(this.rva),this.Qi.multiply(this.SQ),d=n.um(this.get("meshGroup")),n.mt(d[0],this.TB),n.mt(d[1],this.Qi))}}});
define("tdv/player/view/panorama/renderer/object/control/AnimationPlaybackController",["require","tdv/constants/EventName","tdv/constants/PlaybackState"],function(a){function l(g,h){this.Od=g;this.Gc=h;this.Kd=!1;this.kba();this.nba();this.zH()}var k=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState");l.prototype.clear=function(){this.bia();this.hia();this.Od.get("autoplay")||this.Od.set("state",n.ca);this.Od=null;this.Gc.Zc(n.ca);this.Gc=null};l.prototype.gg=function(g){this.Kd!=g&&(this.Kd=
g,this.Iv())};l.prototype.zH=function(){this.Gc.Zc(this.Od.get("state"))};l.prototype.PS=function(){this.Iv()};l.prototype.RS=function(){this.Gc.Bpa(this.Od.get("frameDuration"))};l.prototype.QS=function(){this.Gc.TOa(this.Od.get("finalFrame")=="first")};l.prototype.NS=function(){this.Od.m(k.Or)};l.prototype.MS=function(){this.Od.m(k.Sb)};l.prototype.OS=function(){this.Od.set("state",this.Gc.getState())};l.prototype.Iv=function(){this.Od.get("autoplay")&&this.Gc.Zc(this.Kd?n.PLAYING:n.ca)};l.prototype.kba=
function(){this.Od.bind(k.N("state"),this.zH,this,!0);this.Od.bind(k.N("autoplay"),this.PS,this,!0);this.Od.bind(k.N("frameDuration"),this.RS,this,!0);this.Od.bind(k.N("finalFrame"),this.QS,this,!0)};l.prototype.bia=function(){this.Od.h(k.N("state"),this.zH,this,!0);this.Od.h(k.N("autoplay"),this.PS,this,!0);this.Od.h(k.N("frameDuration"),this.RS,this,!0);this.Od.h(k.N("finalFrame"),this.QS,this,!0)};l.prototype.nba=function(){this.Gc.bind(k.Or,this.NS,this,!0);this.Gc.bind(k.Sb,this.MS,this,!0);
this.Gc.bind(k.$e,this.OS,this,!0)};l.prototype.hia=function(){this.Gc.h(k.Or,this.NS,this,!0);this.Gc.h(k.Sb,this.MS,this,!0);this.Gc.h(k.$e,this.OS,this,!0)};return l});
define("tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin","require tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/PlaybackState tdv/constants/Priority tdv/player/parser/ClassInfo tdv/player/view/panorama/renderer/3d/util/MaterialUtil tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/object/control/AnimationPlaybackController tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource tdv/player/view/panorama/renderer/TextureLoader tdv/player/view/util/ColorPicker tdv/view/images/ImageAnimation".split(" "),function(a){var l=
a("tdv/binding/BindingsHandler"),k=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/constants/Priority"),h=a("tdv/player/parser/ClassInfo"),e=a("tdv/player/view/panorama/renderer/3d/util/MaterialUtil"),b=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),c=a("tdv/player/view/panorama/renderer/object/control/AnimationPlaybackController"),d=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource"),f=a("tdv/player/view/panorama/renderer/TextureLoader"),
m=a("tdv/player/view/util/ColorPicker"),p=a("tdv/view/images/ImageAnimation");return{wG:function(){this.set("visible",!1);this.set("inView",!1);this.set("blending",0);this.set("chromaColor",void 0);this.set("chromaThreshold",0);this.set("chromaSmoothing",0);this.set("premultipliedAlpha",!1);this.set("projected",!1);this.set("image",null);this.set("level",null);this.set("levelURL",null);this.set("state",null);this.set("visibleOnStop",!0);this.set("side",void 0);this.set("isVideoTexture",!1);this.J1=
this.J1.bind(this);this.M1=this.M1.bind(this);this.Gc=null;this.rya=-1;this.Fl=this.lb=this.Wp=null},Qj:function(q){this.gka(q);this.sD(q);this.m9a(q)},gka:function(q){if(this.W("level")){var r=this.get("level");this.set("levelURL",r&&r.get("url"))}this.W("image","level","levelURL","projected","premultipliedAlpha")&&(this.Zua(),this.lb=this.get("image"),this.rb=this.get("level"),this.set("textureSource",new d(this.lb&&this.rb.get("url"))),this.set("premultipliedAlpha",this.lb&&this.rb.get("premultipliedAlpha")),
this.get("textureSource").Zhb(this.get("premultipliedAlpha")),this.jVa(),this.lb?(this.VUa(),this.YUa()):(this.m(k.ud),this.m(k.ia)));(r=this.get("textureSource"))&&r.Hpa(q.Jk>0);this.W("textureSource","isVideoTexture")&&r&&r.WX(this.get("isVideoTexture"))},sD:function(){if(this.W("blending","chromaColor","chromaThreshold","chromaSmoothing","premultipliedAlpha","side")){var q=new e.Jp;q.DD=this.get("blending");q.Sv=this.get("chromaColor");q.FV=this.get("chromaThreshold");q.EV=this.get("chromaSmoothing");
q.premultipliedAlpha=this.get("premultipliedAlpha");q.side=this.get("side");this.set("materialConfig",q)}},m9a:function(){if(this.W("meshGroup","projected","visible")){var q=this.get("projected")&&this.get("visible")?g.zaa:g.kQ;b.um(this.get("meshGroup")).forEach(function(r){f.UJ(r,q)}.bind(this))}},Bn:function(){this.W("visible","composedAlpha","image","state","visibleOnStop")&&this.set("inView",this.get("visible")&&this.get("composedAlpha")>0&&(this.get("visibleOnStop")||this.get("state")!=n.ca));
this.W("composedAlpha","meshGroup","inView")&&b.Bf(this.get("meshGroup"),this.get("inView")?this.get("composedAlpha"):0);this.Wp&&this.Wp.gg(this.get("inView"))},J1:function(){this.lb&&h.Qa("AnimatedImageResource",this.lb)?this.set("visibleOnStop",this.lb.get("visibleOnStop")):this.set("visibleOnStop",!0)},M1:function(){this.set("levelURL",this.rb.get("url"))},jM:function(){this.Zua()},Zua:function(){this.Wp&&(this.Wp.clear(),this.Wp=null);this.Gc&&(this.Gc.h(k.V,this.KR,this,!0),this.Gc.h(k.$e,this.Pxa,
this,!0),this.Gc.clear(),this.Gc=null);this.Fl&&(this.Fl.dispose(),this.Fl=null);this.get("textureSource")&&(this.kia(),this.set("textureSource",null));this.lb&&(this.w4a(),this.lb=null);this.rb&&(this.z4a(),this.rb=null)},VUa:function(){l.ba(this.lb,["visibleOnStop"],this.J1,!0)},w4a:function(){l.da(this.lb,["visibleOnStop"],this.J1)},YUa:function(){l.ba(this.rb,["url"],this.M1,!0)},z4a:function(){l.da(this.rb,["url"],this.M1)},Qxa:function(){this.kia();var q=this.get("image");if(h.Qa("AnimatedImageResource",
q)){this.Gc=new p(this.get("textureSource").xg(),q.get("rowCount",1),q.get("colCount",1),q.get("frameDuration"),q.get("frameCount",q.get("rowCount",1)*q.get("colCount",1)),q.get("repeat"),q.get("finalFrame")=="first");var r=this.Gc.Ig();this.Gc.bind(k.$e,this.Pxa,this,!0);this.Gc.bind(k.V,this.KR,this,!0);this.Wp=new c(q,this.Gc);this.set("visibleOnStop",q.get("visibleOnStop"));this.set("state",this.Gc.getState())}else r=this.get("textureSource").xg(),this.Fl=new m(r),this.set("visibleOnStop",!0),
this.set("state",null);this.Bn();this.set("contentWidth",r.width);this.set("contentHeight",r.height);this.get("textureSource").$n(r);this.m(k.ud);this.m(k.ia)},Rxa:function(){this.kia();this.m(k.ud);this.m(k.ia)},Pxa:function(){this.set("state",this.Gc.getState())},KR:function(q){var r=this.get("composedTranslationX")!=0||this.get("composedTranslationY")!=0||this.get("composedTranslationZ")!=0,t=!!this.get("blendingActive");q=q.data.frameIndex;var u=this.rya>q;this.rya=q;this.get("textureSource").update(!u||
r||t);this.Na()},jVa:function(){var q=this.get("textureSource");q.bind(k.ia,this.Qxa,this,!0);q.bind(k.ad,this.Rxa,this,!0)},kia:function(){var q=this.get("textureSource");q.h(k.ia,this.Qxa,this,!0);q.h(k.ad,this.Rxa,this,!0)},oea:function(q){return this.Fl&&this.Fl.dh==q.source?this.Fl.info(q.x,q.y):m.info(q.source,q.x,q.y)}}});
define("tdv/player/view/panorama/renderer/object/pointer/HotspotPointerMixin","require tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/parser/ClassInfo tdv/player/view/util/Color tdv/view/constants/Cursor tdv/util/Map".split(" "),function(a){function l(d){d=d.get("mapColor");return d=="image"||d=="transparent"||d=="any"}function k(d){d=d.get("mapColor");return d!="image"&&d!="transparent"&&d!="any"}var n=a("tdv/binding/BindingsHandler"),g=a("tdv/constants/EventName"),h=a("tdv/player/parser/ClassInfo"),
e=a("tdv/player/view/util/Color"),b=a("tdv/view/constants/Cursor"),c=new (a("tdv/util/Map"));return{bC:function(){this.set("beamEnabled",!1);this.I1=this.I1.bind(this);this.n0=null;this.$K={};this.sj=[];this.Hu=[];this.vy=null},$hb:function(d){this.vy!=d&&(this.cia(),this.vy=d,this.Pta())},Kq:function(d){this.cD=d.$a;this.bD=d.pitch},cia:function(){this.vy&&n.da(this.vy,["areas"],this.I1)},Pta:function(){this.vy&&n.ba(this.vy,["areas"],this.I1,!0)},NM:function(){this.cia();this.Pta()},PM:function(){this.QCa([]);
this.cia()},I1:function(){var d=this.vy.get("areas",[]);h.Qa("HotspotPanoramaOverlayImage",this.C)||h.Qa("FlatHotspotPanoramaOverlayImage",this.C)||h.Qa("QuadHotspotPanoramaOverlayImage",this.C)?this.n0=d.filter(l):this.n0=d.filter(k);this.n0.forEach(function(f){c.set(f,0)})},Zn:function(d){if(d.Wf==g.Lm){var f=this.$da(d);if(f.length>0){d.yD(f);var m=this.NZa(f),p;for(p in m)d.hGa(m[p],p);d.nm(this.get("distance"));(m=this.hc(f,d.sJ()))&&d.c5(m,this.oD(d.sJ()))}f=this.OZa(d,f);this.QCa(f,d.pw(),
d.sJ())}else if(d.Wf==g.Uf){if(f=this.$da(d),f.length>0){var q=!1;f.forEach(function(r){r.m(g.la);!q&&r.AO(g.la,!0).length>1&&(q=!0)});d.nm(this.get("distance"));q&&d.Yt(f)}}else d.Wf==g.vu?(f=this.$da(d),f.length>0&&(q=!1,f.forEach(function(r){var t={};d.pw()&&(t=d.Bw().wJa());r.m(g.Ra,t);!q&&r.AO(g.Ra,!0).length>1&&(q=!0)}),this.Hu=f,d.nm(this.get("distance")),q&&d.Yt(f))):d.Wf==g.EB&&this.Hu.length&&(this.Hu.forEach(function(r){var t={};d.pw()&&(t=d.Bw().wJa());r.m(g.ab,t)}),this.Hu=[])},OZa:function(d,
f){if(!d.Ana())return this.$K={},f;d=d.eya?"main":"secondary";this.$K[d]=f;f=[];for(d in this.$K)for(var m=0;m<this.$K[d].length;m++)f.indexOf(this.$K[d][m])<0&&f.push(this.$K[d][m]);return f},$da:function(d){if(!this.get("beamEnabled")||this.get("alpha")==0||d.qm())return[];var f=this.oy(d.Os);return f.length==0?[]:this.n0.filter(function(m){var p=m.get("mapColor");return p=="any"?!0:p=="image"?f.some(function(q){return this.oea(q).WA}.bind(this)):p=="transparent"?f.every(function(q){return!this.oea(q).WA}.bind(this)):
p&&p[0]=="#"?f.some(function(q){return e.k6(this.oea(q).color,p)<10}.bind(this)):!1}.bind(this))},QCa:function(d,f,m){this.sj.forEach(function(q){if(d.indexOf(q)<0){var r=c.get(q)-1;c.set(q,r);r==0&&(q.m(g.Eb,{center:m}),f&&q.m(g.Jr))}});var p=this.sj;this.sj=d;this.sj.forEach(function(q){if(p.indexOf(q)<0){var r=(c.get(q)||0)+1;c.set(q,r);r==1&&(q.m(g.tc,{center:m}),f&&q.m(g.EF))}})},hc:function(d,f){for(var m="",p=d.length-1;p>=0&&m=="";p--){var q=d[p];if(!f||q.get("displayTooltipInTouchScreens")&&
this.La.R.get("displayTooltipInTouchScreens")!==!1)m=q.get("toolTip","")}return m},oD:function(d){if(d){d=this.get("yaw")-this.cD;var f=this.get("pitch")-this.bD;return Math.sqrt(d*d+f*f)}return 0},NZa:function(d){var f={};this.vy.get("useHandCursor")===!0?f[b.mf]=d:this.vy.get("useHandCursor")!==!1&&d.forEach(function(m){var p;(p=m.get("useHandCursor")?b.mf:m.get("cursor"))&&(f[p]?f[p].push(m):f[p]=[m])});return f}}});
define("tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController",["require","tdv/player/view/util/Device","tdv/player/script/PanoramaPoint"],function(a){function l(){this.aj=void 0;this.VL=this.LH=0;this.Pd=!0;this.k_=this.Bja=this.Wda=void 0;this.Kd=!1}var k=a("tdv/player/view/util/Device"),n=a("tdv/player/script/PanoramaPoint"),g=Math.PI/180,h=k.Ub()==k.Ii?[-.5,0]:[0,0];l.prototype.LE=function(e){this.aj!=e&&(this.aj=e,this.Pd=!0)};l.prototype.JE=function(e){if(e<this.LH+h[0]||
e>this.LH+h[1])this.LH=e,this.Pd=!0};l.prototype.get=function(e,b){b!==void 0||(b=!0);this.Pd&&(this.ya(),this.Pd=!1);var c=this.Wda.get(e)||0;e=(this.Bja.get(e)||0)-c;b&&(e>180?e-=360:e<-180&&(e+=360));return c+e*this.k_};l.prototype.Sma=function(){this.Pd&&(this.ya(),this.Pd=!1);for(var e=this.Wda.get("vertices"),b=this.Bja.get("vertices"),c=[],d=0;d<e.length;d++){var f=e[d].get("yaw")||0,m=(b[d].get("yaw")||0)-f;m>180?m-=360:m<-180&&(m+=360);var p=e[d].get("pitch")||0,q=(b[d].get("pitch")||0)-
p;c.push(new n(f+m*this.k_,p+q*this.k_))}e=this.gS&&this.gS.length==c.length;for(d=0;d<c.length&&e;d++)e=this.gS[d].get("yaw")==c[d].get("yaw")||this.gS[d].get("pitch")==c[d].get("pitch");return e?this.gS:this.gS=c};l.prototype.ew=function(){return this.get("opacity",!1)};l.prototype.kA=function(){var e=this.get("hfov")||this.get("vfov"),b=this.aj[0].get("hfov")||this.aj[0].get("vfov");return Math.tan(e*.5*g)/Math.tan(b*.5*g)};l.prototype.ya=function(){for(var e=this.VL,b,c=this.aj.length-1,d,f;;){b=
Math.min(e+1,c);d=this.Cxa(e);f=this.Cxa(b);if(d<=this.LH&&this.LH<=f)break;if(d>this.LH){if(e==0){b=e;break}--e}else{if(e==c){b=e;break}e+=1}}this.Wda=this.aj[e];this.Bja=this.aj[b];e=f-d;this.k_=e>0?(this.LH-d)/e:0};l.prototype.Cxa=function(e){return this.aj[e].get("timestamp")};return l});
define("tdv/player/view/panorama/renderer/object/position/FlatHotspotImagePositionMixin",["require","tdv/binding/BindingsHandler","tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController"],function(a){var l=a("tdv/binding/BindingsHandler"),k=a("tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController");return{Zp:function(){this.set("playbackPositions",null);this.set("scaleMode",void 0);this.set("distance",void 0);this.se=this.se.bind(this);this.Hb=new k},rq:function(){l.ba(this.C,
"horizontalAlign verticalAlign scale scaleMode width height offsetX offsetY distance playbackPositions".split(" "),this.se,!0)},tq:function(){l.da(this.C,"horizontalAlign verticalAlign scale scaleMode width height offsetX offsetY distance playbackPositions".split(" "),this.se)},se:function(){this.set("horizontalAlign",this.C.get("horizontalAlign"));this.set("verticalAlign",this.C.get("verticalAlign"));this.set("scale",this.C.get("scale"));this.set("scaleMode",this.C.get("scaleMode"));this.set("width",
this.C.get("width"));this.set("height",this.C.get("height"));this.set("offsetX",this.C.get("offsetX",this.C.get("width")*.5));this.set("offsetY",this.C.get("offsetY",this.C.get("height")*.5));this.set("distance",this.C.get("distance"));this.set("playbackPositions",this.C.get("playbackPositions"))},$f:function(){this.W("playbackPositions","currentTime")&&(this.Hb.LE(this.get("playbackPositions")),this.Hb.JE(this.get("currentTime")),this.set("yaw",this.Hb.get("yaw")),this.set("pitch",this.Hb.get("pitch")),
this.set("roll",this.Hb.get("roll")),this.set("alpha",this.Hb.ew()))}}});
define("tdv/player/view/panorama/renderer/object/FlatHotspotImage","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/object/ComposedWebGLObject tdv/player/view/panorama/renderer/object/geometry/FlatRectangleGeometryMixin tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin tdv/player/view/panorama/renderer/object/pointer/HotspotPointerMixin tdv/player/view/panorama/renderer/object/position/FlatHotspotImagePositionMixin tdv/player/view/panorama/renderer/object/util/LevelUtil".split(" "),function(a){var l=
a("tdv/utils"),k=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),h=a("tdv/player/view/panorama/renderer/object/ComposedWebGLObject"),e=a("tdv/player/view/panorama/renderer/object/geometry/FlatRectangleGeometryMixin"),b=a("tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin"),c=a("tdv/player/view/panorama/renderer/object/pointer/HotspotPointerMixin"),d=a("tdv/player/view/panorama/renderer/object/position/FlatHotspotImagePositionMixin"),
f=a("tdv/player/view/panorama/renderer/object/util/LevelUtil"),m=0;a=l.extend(h,e,d,b,c,function(p){h.call(this);this.set("tag","FlatHotspotImage");this.set("id","flat_hs_image_"+m++);this.C=p;this.Pl.push(this.C);this.Pg=this.Pg.bind(this)});a.prototype.fc=function(){h.prototype.fc.call(this);k.ba(this.C,["image.levels"],this.Pg,!0)};a.prototype.lc=function(){k.da(this.C,["image.levels"],this.Pg);h.prototype.lc.call(this)};a.prototype.Pg=function(){this.set("image",this.C.get("image"));this.set("level",
f.Fcb(this.C))};a.prototype.ya=function(p){this.pI();h.prototype.ya.call(this,p);this.W("inView")&&this.C.m(this.get("inView")?n.od:n.jd)};a.prototype.pI=function(){if(this.W("meshGroup","panoramaId","id")){var p=this.get("meshGroup");p&&p.children.forEach(function(q){g.setAttribute(q,g.aF,this.get("panoramaId"));g.setAttribute(q,g.c$,this.get("id"))}.bind(this))}};return a});
define("tdv/player/view/panorama/renderer/object/overlay/FocusedMixin",["require","tdv/constants/EventName","tdv/player/view/panorama/renderer/3d/util/SceneUtil"],function(a){var l=a("tdv/constants/EventName"),k=a("tdv/player/view/panorama/renderer/3d/util/SceneUtil");a={bka:function(f){if(this.La){var m=this.n_a(f);m?(f=this.axa(this).some(function(p){return m.intersectsObject(p)}),this.Jia(f)):this.Jia(!1)}},axa:function(f){var m=f.get("meshGroup"),p=[];m&&m.traverse(function(q){q.geometry&&q.visible&&
(Array.isArray(q.material)?q.material.some(function(r){return r.opacity>0}):q.material.opacity>0)&&p.push(q)});f.Cb().forEach(function(q){p=p.concat(this.axa(q))}.bind(this));return p}};var n=new THREE.Frustum,g=new THREE.PerspectiveCamera,h=90,e=.5,b=new THREE.Matrix4,c=Math.PI/180,d=180/Math.PI;a.n_a=function(f){f=k.getCamera(f.oh);if(!f)return null;var m=this.La.R.get("focusAreaScale");if(!g.projectionMatrix.equals(f.projectionMatrix)||!g.matrixWorldInverse.equals(f.matrixWorldInverse)||h!=f.fov||
e!=m){g.copy(f);var p=g.fov*.5*c;g.fov=2*Math.atan2(e*Math.sin(p),Math.cos(p))*d;g.updateProjectionMatrix();n.setFromProjectionMatrix(b.copy(g.projectionMatrix).multiply(g.matrixWorldInverse));h=f.fov;e=m}return n};a.Mda=function(){this.ofa=!1};a.Nda=function(){this.Jia(!1)};a.Iia=function(f){this.uwa=f};a.Jia=function(f){this.ofa!==f&&(this.ofa=f,this.uwa&&this.uwa.m(this.ofa?l.BSa:l.CSa))};return a});
define("tdv/player/view/panorama/renderer/object/Hotspot","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/view/panorama/renderer/object/Base tdv/player/view/panorama/renderer/object/overlay/FocusedMixin tdv/player/view/panorama/renderer/object/util/EventAggregator tdv/player/view/util/Device tdv/view/util/Ease tdv/view/util/EaseDimension tdv/view/events/ProgressEvent tdv/player/view/util/XR tdv/player/view/util/xr/pointer/PointerState".split(" "),function(a){var l=
a("tdv/utils"),k=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/player/view/panorama/renderer/object/Base"),h=a("tdv/player/view/panorama/renderer/object/overlay/FocusedMixin"),e=a("tdv/player/view/panorama/renderer/object/util/EventAggregator");a("tdv/player/view/util/Device");var b=a("tdv/view/util/Ease"),c=a("tdv/view/util/EaseDimension"),d=a("tdv/view/events/ProgressEvent"),f=a("tdv/player/view/util/XR"),m=a("tdv/player/view/util/xr/pointer/PointerState");a=l.extend(g,
h,function(p){g.call(this);this.C=p;this.Pl.push(this.C);this.f2=this.f2.bind(this);this.e2=this.e2.bind(this);this.g2=this.g2.bind(this);this.Ur(["loadingActive","currentTime","panoramaPixelsPerDegree"]);this.set("tag","Hotspot");this.set("over",!1);this.set("centerOver",!1);this.set("enabled",!0);this.set("visible",!1);this.set("alpha",0);this.set("inVR",!1);this.set("overlaysEnabled",!0);this.set("enabledInVR",!0);this.set("enabledInVRWithGazePointer",!0);this.set("enabledInStandard",!0);this.set("interactionEnabled",
!0);this.set("centerOverDisplay",!1);this.set("rollOverDisplay",!1);this.set("loadingActive",!1);this.zba=this.Aba=this.vq=this.ve=this.qg=null;this.sj=[];this.yba=[];this.Dn=null;this.Iia(this.C)});a.prototype.fc=function(){this.qg=(new e(n.ia)).io(this.uH.bind(this));this.ve=(new e(n.xc)).$q(this.xH.bind(this));this.vq=(new e(n.ud)).io(this.v2a.bind(this));this.Aba=(new e(n.tc)).$q(this.o2a.bind(this));this.zba=(new e(n.Eb)).$q(this.n2a.bind(this));g.prototype.fc.call(this);k.ba(this.C,["items",
"rollOverItems","maps","rollOverMaps"],this.f2,!0);k.ba(this.C,"fadeInDuration fadeOutDuration enabledInVR enabledInStandard enabledInSurfaceSelection enabledInVRWithGazePointer enabled interactionEnabled centerOverDisplay rollOverDisplay".split(" "),this.g2,!0);k.ba(this.C,["areas"],this.e2,!0);this.Mda()};a.prototype.lc=function(){this.Nda();this.zN([],this.sj);this.Vja([],this.yba);this.qg.dispose();this.ve.dispose();this.vq.dispose();this.Aba.dispose();this.zba.dispose();k.da(this.C,["items",
"rollOverItems","maps","rollOverMaps"],this.f2);k.da(this.C,"fadeInDuration fadeOutDuration enabledInVR enabledInStandard enabledInSurfaceSelection enabledInVRWithGazePointer enabled interactionEnabled centerOverDisplay rollOverDisplay".split(" "),this.g2);k.da(this.C,["areas"],this.e2);this.get("visible")&&this.C.m(n.jd);g.prototype.lc.call(this)};a.prototype.f2=function(){this.set("items",this.La.jA(this.C.get("items",[])));this.set("rollOverItems",this.La.jA(this.C.get("rollOverItems",[])));this.set("maps",
this.La.jA(this.C.get("maps",[])));this.set("rollOverMaps",this.La.jA(this.C.get("rollOverMaps",[])));var p=[].concat(this.get("maps"),this.get("items"),this.get("rollOverMaps"),this.get("rollOverItems"));p.forEach(function(q){q.$hb(this.C)}.bind(this));this.get("items").forEach(function(q){q.set("projected",this.C.get("projected"))}.bind(this));this.Zh(p);this.qg.fg(p);this.ve.fg(p);this.vq.fg(p)};a.prototype.g2=function(){this.set("fadeInDuration",this.C.get("fadeInDuration"));this.set("fadeOutDuration",
this.C.get("fadeOutDuration"));this.set("enabled",this.C.get("enabled",!0));this.set("enabledInVR",this.C.get("enabledInVR"));this.set("enabledInStandard",this.C.get("enabledInStandard",!0));this.set("enabledInSurfaceSelection",this.C.get("enabledInSurfaceSelection",!0));this.set("enabledInVRWithGazePointer",this.C.get("enabledInVRWithGazePointer",this.C.get("enabledInVR")));this.set("centerOverDisplay",this.C.get("centerOverDisplay"));this.set("rollOverDisplay",this.C.get("rollOverDisplay",!1));
this.set("interactionEnabled",this.C.get("interactionEnabled",!0))};a.prototype.e2=function(){var p=this.C.get("areas");this.Aba.fg(p);this.zba.fg(p)};a.prototype.ya=function(p){this.Bn(p);g.prototype.ya.call(this,p);this.set("inVR",p.ob);this.set("surfaceSelection",p.rY);this.set("hotspotsEnabled",p.lJ);this.set("inVRWithGazePointer",p.ob&&f.nd.length===1&&f.nd[0].type===m.HB);this.we(p);this.bka(p)};a.prototype.we=function(){if(this.W("items","rollOverItems","maps","rollOverMaps","over","centerOver",
"inVR","hotspotsEnabled","enabledInVR","enabledInStandard","enabledInVRWithGazePointer","surfaceSelection","enabledInSurfaceSelection","enabled","interactionEnabled","rollOverDisplay","centerOverDisplay")||this.Ia&&this.Ia.W("composedAlpha")){var p=!1,q=!1,r=this.get("hotspotsEnabled")&&this.get("enabled")&&(!this.get("inVR")||this.get("enabledInVR"))&&(!this.get("inVRWithGazePointer")||this.get("enabledInVRWithGazePointer"))&&(this.get("inVR")||this.get("enabledInStandard"))&&(!this.get("surfaceSelection")||
this.get("enabledInSurfaceSelection"))&&this.Ia&&this.Ia.get("composedAlpha")>0,t=this.get("interactionEnabled");r&&(p=this.get("centerOver")&&!this.get("inVR"),q=this.get("over")||p,p=!this.get("rollOverDisplay")&&!this.get("centerOverDisplay")||this.get("over")&&this.get("rollOverDisplay")||p&&this.get("centerOverDisplay")!==!1&&this.get("rollOverDisplay"));this.get("rollOverItems").forEach(function(x){x.set("visible",q);x.set("beamEnabled",r&&q&&t)});var u=this.get("rollOverItems").length==0;this.get("items").forEach(function(x){x.set("visible",
u||!q);x.set("beamEnabled",r&&(u||!q)&&t)});this.get("rollOverMaps").forEach(function(x){x.set("visible",!1);x.set("beamEnabled",r&&q&&t)});var v=this.get("rollOverMaps").length==0;this.get("maps").forEach(function(x){x.set("visible",!1);x.set("beamEnabled",r&&(v||!q)&&t)});this.set("visible",p)}if(this.W("visible")){p=this.get("alpha");var w=this.get("visible")?1:0,y=(this.get("visible")?this.get("fadeInDuration"):this.get("fadeOutDuration"))*Math.abs(p-w);this.Dn=new b("linear",[new c("alpha",p,
w)],Math.max(y,1));this.Na();this.get("visible")?this.C.m(n.od):this.C.m(n.jd)}};a.prototype.Bn=function(p){this.Dn&&(this.Dn.Re()?this.Dn=null:(this.Dn.Lb(p.xf),this.set("alpha",this.Dn.nb("alpha"))),this.Na())};a.prototype.uH=function(){this.uk();this.m(n.ia)};a.prototype.v2a=function(){this.uk();this.m(n.ud)};a.prototype.xH=function(){this.uk()};a.prototype.uk=function(){var p=0;this.ve.aw(function(q){var r=0,t;this.qg.Mn(q)?r=100:(t=this.ve.Mn(q))&&(r=t.percent);p+=r}.bind(this));this.m(new d(n.xc,
p/this.ve.xd.length))};a.prototype.o2a=function(p){p.data.center?this.Vja([p.source],[]):this.zN([p.source],[])};a.prototype.n2a=function(p){p.data.center?this.Vja([],[p.source]):this.zN([],[p.source])};a.prototype.zN=function(p,q){this.HEa(this.sj,p,q);this.set("over",this.sj.length>0)};a.prototype.Vja=function(p,q){this.HEa(this.yba,p,q);this.set("centerOver",this.yba.length>0)};a.prototype.HEa=function(p,q,r){q||(q=[]);r||(r=[]);r.forEach(function(t){t=p.indexOf(t);t>=0&&p.splice(t,1)});q.forEach(function(t){p.indexOf(t)<
0&&p.push(t)})};return a});
define("tdv/player/view/panorama/renderer/object/position/HotspotImagePositionMixin",["require","tdv/binding/BindingsHandler","tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController"],function(a){var l=a("tdv/binding/BindingsHandler"),k=a("tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController");return{Zp:function(){this.set("playbackPositions",null);this.set("scaleMode",void 0);this.set("distance",void 0);this.se=this.se.bind(this);this.Hb=new k},rq:function(){l.ba(this.C,
"horizontalAlign verticalAlign scale scaleMode distance playbackPositions".split(" "),this.se,!0)},tq:function(){l.da(this.C,"horizontalAlign verticalAlign scale scaleMode distance playbackPositions".split(" "),this.se)},se:function(){this.set("horizontalAlign",this.C.get("horizontalAlign"));this.set("verticalAlign",this.C.get("verticalAlign"));this.set("scaleMode",this.C.get("scaleMode"));this.set("distance",this.C.get("distance"));this.set("scale",this.C.get("scale"));this.set("playbackPositions",
this.C.get("playbackPositions"))},$f:function(){this.W("playbackPositions","currentTime")&&(this.Hb.LE(this.get("playbackPositions")),this.Hb.JE(this.get("currentTime")),this.set("yaw",this.Hb.get("yaw")),this.set("pitch",this.Hb.get("pitch")),this.set("roll",this.Hb.get("roll")),this.set("rotationX",this.Hb.get("rotationX")),this.set("rotationY",this.Hb.get("rotationY")),this.set("hfov",this.Hb.get("hfov")),this.set("vfov",this.Hb.get("vfov")),this.set("alpha",this.Hb.ew()))}}});
define("tdv/player/view/panorama/renderer/object/HotspotImage","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/object/ComposedWebGLObject tdv/player/view/panorama/renderer/object/geometry/RectangleGeometryMixin tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin tdv/player/view/panorama/renderer/object/pointer/HotspotPointerMixin tdv/player/view/panorama/renderer/object/position/HotspotImagePositionMixin tdv/player/view/panorama/renderer/object/util/LevelUtil".split(" "),
function(a){var l=a("tdv/utils"),k=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),h=a("tdv/player/view/panorama/renderer/object/ComposedWebGLObject"),e=a("tdv/player/view/panorama/renderer/object/geometry/RectangleGeometryMixin"),b=a("tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin"),c=a("tdv/player/view/panorama/renderer/object/pointer/HotspotPointerMixin"),d=a("tdv/player/view/panorama/renderer/object/position/HotspotImagePositionMixin"),
f=a("tdv/player/view/panorama/renderer/object/util/LevelUtil"),m=0;a=l.extend(h,e,b,c,d,function(p){h.call(this);this.set("tag","HotspotImage");this.set("id","hs_image_"+m++);this.set("side",THREE.DoubleSide);this.set("wasInView",!1);this.C=p;this.Pl.push(this.C);this.Pg=this.Pg.bind(this)});a.prototype.fc=function(){h.prototype.fc.call(this);k.ba(this.C,["image.levels"],this.Pg,!0)};a.prototype.lc=function(){k.da(this.C,["image.levels"],this.Pg);h.prototype.lc.call(this)};a.prototype.Pg=function(){this.set("image",
this.C.get("image"));this.set("level",f.Ncb(this.C,this.get("panoramaPixelsPerDegree")))};a.prototype.ya=function(p){this.pI();h.prototype.ya.call(this,p);this.W("inView")&&(p=this.get("inView"),p!==this.get("wasInView")&&(this.set("wasInView",p),this.C.m(p?n.od:n.jd)))};a.prototype.pI=function(){if(this.W("meshGroup","panoramaId","id")){var p=this.get("meshGroup");p&&p.children.forEach(function(q){g.setAttribute(q,g.aF,this.get("panoramaId"));g.setAttribute(q,g.c$,this.get("id"))}.bind(this))}};
return a});
define("tdv/player/view/util/geo/Rectangle",["require","tdv/player/view/util/geo/Point","tdv/player/view/util/geo/Vector"],function(a){function l(g,h,e){this.Lg=g||new k(0,0,0);this.Fk=h||new k(1,0,0);this.pE=e||new k(0,1,0)}var k=a("tdv/player/view/util/geo/Point"),n=a("tdv/player/view/util/geo/Vector");l.prototype.clone=function(){return new l(this.Lg.clone(),this.Fk.clone(),this.pE.clone())};l.prototype.apply=function(g){g.UN(this.Lg);g.UN(this.Fk);g.UN(this.pE)};l.prototype.intersection=function(g,
h){var e=n.LD(g.Lg,g.Fk),b=n.LD(this.Lg,g.Lg),c=n.LD(this.Lg,this.Fk);c.E5(n.LD(this.Lg,this.pE));e=e.TI(c);if(!(e==0||h&&e<0))return h=-c.TI(b)/e,new k(g.Lg.x+(g.Fk.x-g.Lg.x)*h,g.Lg.y+(g.Fk.y-g.Lg.y)*h,g.Lg.z+(g.Fk.z-g.Lg.z)*h)};l.prototype.u8=function(g,h){var e=n.LD(this.Lg,this.Fk),b=n.LD(this.Lg,this.pE);g=n.LD(this.Lg,g);var c=e.Pma(),d=b.Pma();return h?new k(g.TI(e)/(c*c),g.TI(b)/(d*d),0):new k(g.TI(e)/c,g.TI(b)/d,0)};return l});
define("tdv/player/view/util/geo/Projection","require tdv/player/view/util/geo/Fov tdv/player/view/util/geo/Frustum tdv/player/view/util/geo/Line tdv/player/view/util/geo/Point tdv/player/view/util/geo/Rectangle tdv/player/view/util/geo/Transformation tdv/view/constants/ScaleMode".split(" "),function(a){var l=a("tdv/player/view/util/geo/Fov"),k=a("tdv/player/view/util/geo/Frustum"),n=a("tdv/player/view/util/geo/Line"),g=a("tdv/player/view/util/geo/Point"),h=a("tdv/player/view/util/geo/Rectangle"),
e=a("tdv/player/view/util/geo/Transformation"),b=a("tdv/view/constants/ScaleMode"),c=Math.PI/180,d=180/Math.PI,f=new e,m=new k,p=new h,q=new g;return{get:function(r,t,u,v,w,y,x,z){r*=c;t*=c;t=new g(Math.sin(-r)*Math.cos(t),Math.sin(t),Math.cos(-r)*Math.cos(t));f.identity();f.rotateY(u*c);f.rotateZ(w*c);f.rotateX(v*c);t.apply(f);return t.z>0?(m.FPa(x),m.YOa(z),m.SJ(y*c),m.project(t),t):null},Elb:function(r,t,u){f.identity();f.rotateX(-u.Jc()*c);f.rotateZ(-u.Jg()*c);f.rotateY(-u.Lc()*c);q.set(r,t,0);
r=u.unproject(q).SJa();r.apply(f);return{$a:r.Lc()*d,pitch:r.Jc()*d}},Cnb:function(r,t,u,v,w,y,x,z,A,D,E,B,C,F){F||(F=b.rB);C||(C=l.xm(B,D,E));B||(B=l.rr(C,D,E));var G=D*.5/Math.tan(B*.5*c),I=G*Math.tan(B*.5*c)*2,N=G*Math.tan(C*.5*c)*2;p.Lg.set(+I*.5,+N*.5,0);p.Fk.set(-I*.5,+N*.5,0);p.pE.set(+I*.5,-N*.5,0);f.identity();f.rotateZ(-A*c);f.rotateX(-x*c);f.rotateY(z*c);f.translate(0,0,G);f.rotateZ(-y*c);f.rotateX(-w*c);f.rotateY(-v*c);f.rotateY(u.Lc()*c);f.rotateZ(u.Jg()*c);f.rotateX(u.Jc()*c);p.apply(f);
q.set(r,t,0);w=p.intersection(u.unproject(q));v={x:void 0,y:void 0,xScaled:void 0,yScaled:void 0};w&&w.z>0&&(w=p.u8(w),v.xScaled=v.x=w.x/I,v.yScaled=v.y=w.y/N);if(F!=b.rB){switch(F){case b.oj:var P=Math.min(l.rr(C,D,E),B);var Q=Math.min(l.xm(B,D,E),C);break;case b.Dr:P=Math.max(l.rr(C,D,E),B);Q=Math.max(l.xm(B,D,E),C);break;case b.Lp:P=B;Q=l.xm(B,D,E);break;case b.Qk:P=l.rr(C,D,E),Q=C}if(P!=B||Q!=C)I=G*Math.tan(P*.5*c)*2,N=G*Math.tan(Q*.5*c)*2,p.Lg.set(+I*.5,+N*.5,0),p.Fk.set(-I*.5,+N*.5,0),p.pE.set(+I*
.5,-N*.5,0),p.apply(f),q.set(r,t,0),(w=p.intersection(u.unproject(q)))&&w.z>0&&(w=p.u8(w),v.xScaled=w.x/I,v.yScaled=w.y/N)}return v},Zmb:function(r,t,u,v,w,y,x){x=w*.5/Math.tan(x*.5*c);p.Lg.set(+w*.5,+y*.5,x);p.Fk.set(-w*.5,+y*.5,x);p.pE.set(+w*.5,-y*.5,x);f.identity();f.rotateZ(-v*c);f.rotateX(-u*c);f.rotateY(-t*c);f.rotateY(r.Lc()*c);f.rotateZ(r.Jg()*c);f.rotateX(r.Jc()*c);p.apply(f);r=new n(new g(0,0,0),new g(0,0,1));return(r=p.intersection(r))&&r.z>0?(r=p.u8(r),{x:r.x/w,y:r.y/y}):null}}});
define("tdv/player/view/panorama/renderer/object/geometry/SpriteGeometryMixin",["require","tdv/constants/Priority","tdv/player/view/panorama/renderer/3d/util/GeometryUtil","tdv/player/view/panorama/renderer/3d/util/MeshUtil","tdv/player/view/panorama/renderer/TextureLoader"],function(a){var l=a("tdv/constants/Priority"),k=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),n=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),g=a("tdv/player/view/panorama/renderer/TextureLoader"),h=Math.PI/
180;return{Vx:function(){this.set("distance",void 0);this.set("width",100);this.set("height",100);this.set("offsetX",void 0);this.set("offsetY",void 0);this.set("centerX",0);this.set("centerY",0);this.set("roll",0);this.Jh=this.aC();this.Zda=k.lO();this.Eo=new THREE.Matrix4;this.kL=new THREE.Matrix4;this.fN=new THREE.Matrix4;this.jza=new THREE.Matrix4;this.rk=new THREE.Matrix4;this.tn=new THREE.Matrix4;this.Bj=new THREE.Matrix4},Fz:function(e){this.et(e)},NL:function(){var e=this.get("meshGroup");
return e?n.um(e)[0]:null},Yp:function(){return[0].map(function(e){var b=this.WQ();e=n.create(this.Jh[e],b);g.QA(e,g.Hr);g.RA(e,g.su);g.UJ(e,l.kQ);g.jY(e,1);return e}.bind(this))},aC:function(){return[k.lO()]},et:function(e){var b=!1,c=!1;this.set("rendererYaw",e.$a);this.set("rendererPitch",e.pitch);this.set("rendererRoll",e.kh);this.set("rendererCameraFOV",e.gj);this.set("rendererWidth",e.width);this.set("rendererHeight",e.height);this.set("inVR",e.ob);if(this.W("distance","composedTranslationX",
"composedTranslationY","composedTranslationZ")){var d=this.get("composedTranslationX")==0&&this.get("composedTranslationY")==0&&this.get("composedTranslationZ")==0&&this.get("distance")!==void 0;this.set("z",d?k.fw(this.get("distance")):k.xt())}this.W("z")&&(this.Eo.makeTranslation(0,0,-this.get("z")),c=!0);e.gj&&this.W("z","rendererCameraFOV")&&this.set("rendererHeightZ",Math.tan(e.gj*h*.5)*this.get("z")*2);e.camera&&this.W("rendererYaw","rendererPitch","rendererRoll","rendererCameraFOV","rendererWidth",
"rendererHeight","rendererHeightZ","inVR","centerX","centerY")&&(this.kL.copy(e.camera.matrixWorld),b=this.get("rendererHeightZ"),d=b*e.camera.aspect,d=(this.get("centerX")-e.width*.5)*d/e.width*.5,b=(e.height*.5-this.get("centerY"))*b/e.height*.5,this.fN.makeTranslation(d,b,0),b=!0);this.W("roll")&&(this.rk.makeRotationZ(this.get("roll")*h),b=!0);e.gj&&(c||this.W("rendererHeight","inVR","rendererHeightZ","width","height","flipHorizontally"))&&(c=e.ob?512/e.height:1,e=(this.get("flipHorizontally")?
-1:1)*this.get("width")*c,c*=this.get("height"),this.tn.makeScale(e,c,1),b=!0);this.W("width","height","offsetX","offsetY")&&(e=.5-this.get("offsetX")/this.get("width"),c=this.get("offsetY")/this.get("height")-.5,this.jza.makeTranslation(e,c,0),b=!0);b&&(this.Bj.copy(this.kL),this.Bj.multiply(this.Eo),this.Bj.multiply(this.fN),this.Bj.multiply(this.rk),this.Bj.multiply(this.tn),this.Bj.multiply(this.jza),n.mt(this.get("meshGroup"),this.Bj))}}});
define("tdv/player/view/panorama/renderer/object/Sprite",["require","tdv/utils","tdv/player/view/panorama/renderer/object/ComposedWebGLObject","tdv/player/view/panorama/renderer/object/geometry/SpriteGeometryMixin"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/panorama/renderer/object/ComposedWebGLObject");a=a("tdv/player/view/panorama/renderer/object/geometry/SpriteGeometryMixin");return l.extend(k,a,function(){k.call(this);this.set("tag","Sprite")})});
define("tdv/player/view/panorama/renderer/object/canvas/LensFlareCanvas",["require","tdv/player/view/util/Color"],function(a){function l(n,g,h,e,b,c){this.Cq=g;this.fa=document.createElement("canvas");this.fa.width=this.Cq;this.fa.height=this.Cq;switch(n){case l.XP:this.OYa(h,e,b,c);break;case l.jZ:this.PYa(h,e,b,c)}}var k=a("tdv/player/view/util/Color");l.prototype.dg=function(){return this.Cq};l.prototype.wg=function(){return this.Cq};l.prototype.Ig=function(){return this.fa};l.prototype.OYa=function(n,
g,h,e){var b=this.Cq*.5,c=this.Cq*.5,d=this.Cq*.5,f=this.fa.getContext("2d");g=k.xp(g);for(var m=f.createRadialGradient(b,c,0,b,c,d),p=0;p<h.length;p++)m.addColorStop(e[p],"rgba("+g[0]+","+g[1]+","+g[2]+","+h[p]+")");f.fillStyle=m;f.globalAlpha=n;f.beginPath();f.arc(b,c,d,0,Math.PI*2,!0);f.closePath();f.fill()};l.prototype.PYa=function(n,g,h,e){var b=this.Cq*.5,c=this.Cq*.5,d=this.Cq*.5,f=this.fa.getContext("2d");f.clearRect(0,0,this.Cq,this.Cq);var m=k.xp(g),p=f.createRadialGradient(b,c,0,b,c,d);
for(g=0;g<h.length;g++)p.addColorStop(e[g],"rgba("+m[0]+","+m[1]+","+m[2]+","+h[g]+")");f.fillStyle=p;f.globalAlpha=n;f.beginPath();for(g=0;g<6;g++)h=45*Math.PI/180+2*Math.PI*g/6,n=b+Math.cos(h)*d,h=c+Math.sin(h)*d,g==0?f.moveTo(n,h):f.lineTo(n,h);f.closePath();f.fill()};l.XP="circle";l.jZ="hexagon";return l});
define("tdv/player/view/panorama/renderer/object/LensFlare","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/view/util/geo/Projection tdv/player/view/panorama/renderer/object/Base tdv/player/view/panorama/renderer/object/SolidFrame tdv/player/view/panorama/renderer/object/Sprite tdv/player/view/panorama/renderer/object/canvas/LensFlareCanvas tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/binding/BindingsHandler"),
n=a("tdv/constants/EventName"),g=a("tdv/player/view/util/geo/Projection"),h=a("tdv/player/view/panorama/renderer/object/Base"),e=a("tdv/player/view/panorama/renderer/object/SolidFrame"),b=a("tdv/player/view/panorama/renderer/object/Sprite"),c=a("tdv/player/view/panorama/renderer/object/canvas/LensFlareCanvas"),d=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource");a=l.extend(h,function(m){h.call(this);this.C=m;this.Pl.push(this.C);this.Pg=this.Pg.bind(this);this.set("tag",
"LensFlare");this.set("translationAlpha",0);this.Bba=this.wXa();this.tg=this.qYa();this.Zh(this.Bba.concat([this.tg]))});a.prototype.fc=function(){h.prototype.fc.call(this);this.m(n.ud);this.m(n.ia);k.ba(this.C,["yaw","pitch","bleaching","bleachingDistance"],this.Pg,!0)};a.prototype.lc=function(){k.da(this.C,["yaw","pitch","bleaching","bleachingDistance"],this.Pg);h.prototype.lc.call(this)};a.prototype.Pg=function(){this.set("yaw",this.C.get("yaw"));this.set("pitch",this.C.get("pitch"));this.set("bleaching",
this.C.get("bleaching"));this.set("bleachingDistance",this.C.get("bleachingDistance"))};a.prototype.ya=function(m){h.prototype.ya.call(this,m);this.set("rendererYaw",m.$a);this.set("rendererPitch",m.pitch);this.set("rendererRoll",m.kh);this.set("rendererCameraFOV",m.gj);this.set("rendererWidth",m.width);this.set("rendererHeight",m.height);this.set("inVR",m.ob);if(this.W("composedTranslationX","composedTranslationY","composedTranslationZ")){var p=this.get("composedTranslationX"),q=this.get("composedTranslationY"),
r=this.get("composedTranslationZ");this.set("translationAlpha",Math.max(0,1-Math.sqrt(p*p+q*q+r*r)*10))}if(this.W("rendererYaw","rendererPitch","rendererRoll","rendererCameraFOV","rendererWidth","rendererHeight","inVR","yaw","pitch","translationAlpha","composedDeltaYaw","composedDeltaPitch","composedDeltaRoll")){var t=m.$a+this.get("composedDeltaYaw"),u=m.pitch+this.get("composedDeltaPitch"),v=m.kh+this.get("composedDeltaRoll");p=this.get("translationAlpha");r=q=0;if(!m.ob&&(t=g.get(this.get("yaw"),
this.get("pitch"),t,u,v,m.gj,m.width,m.height))){var w=m.width*.5;var y=m.height*.5;var x=t.x;var z=t.y;w=(w-x)*2;y=(y-z)*2;r=Math.sqrt(w*w+y*y);t=Math.min(m.width,m.height);q=Math.max(0,Math.min(.7,1-r/Math.sqrt(m.width*m.width,m.height*m.height)))*p;m=this.get("bleaching");r=1-Math.max(0,Math.min(1,r/(t*this.get("bleachingDistance"))));r=m*r*p}for(m=0;m<this.Bba.length;m++)p=this.Bba[m],p.set("alpha",q),q>0&&(p.set("centerX",x+w*f[m].position),p.set("centerY",z+y*f[m].position));this.tg.set("alpha",
r)}};a.prototype.wXa=function(){return f.map(function(m){var p=(new c(m.form,m.gK,m.opacity,m.color,m.gJ,m.hJ)).Ig(),q=new d;q.$n(p);p=new b;p.set("textureSource",q);p.set("width",m.size);p.set("height",m.size);p.set("offsetX",m.size*.5);p.set("offsetY",m.size*.5);p.set("alpha",0);return p})};a.prototype.qYa=function(){return new e("#ffffff")};var f=[{form:c.jZ,position:.1,size:52,gK:128,opacity:.8,color:"#FCFCFC",gJ:[1,.5],hJ:[0,.866]},{form:c.jZ,position:.2,size:52,gK:128,opacity:.6,color:"#C8FCC8",
gJ:[1,.5],hJ:[0,.866]},{form:c.XP,position:.36,size:112,gK:128,opacity:.5,color:"#C8C8FC",gJ:[1,.9,.6,0],hJ:[0,.2,.4,1]},{form:c.XP,position:.47,size:32,gK:128,opacity:.3,color:"#96C8AF",gJ:[1,1,0],hJ:[0,.9,1]},{form:c.XP,position:.65,size:52,gK:128,opacity:.7,color:"#FCFCFC",gJ:[.7,.7,.2,0],hJ:[0,.1,.4,1]},{form:c.jZ,position:.88,size:128,gK:128,opacity:.4,color:"#AF96C8",gJ:[1,.5],hJ:[0,.866]},{form:c.XP,position:1,size:33,gK:128,opacity:.8,color:"#C89696",gJ:[.8,.8,.6,0],hJ:[0,.2,.4,1]}];return a});
define("tdv/player/view/panorama/renderer/object/MenuButton","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/view/panorama/renderer/object/Plane tdv/player/canvas/MenuCanvas tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource tdv/view/util/Ease tdv/view/util/EaseDimension tdv/player/view/util/XR".split(" "),function(a){function l(p,q,r){p=(q-p)*(1-r);Math.abs(p)<1E-5&&(p=0);return q-p}var k=a("tdv/utils"),n=a("tdv/binding/BindingsHandler"),
g=a("tdv/constants/EventName"),h=a("tdv/player/view/panorama/renderer/object/Plane"),e=a("tdv/player/canvas/MenuCanvas"),b=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource"),c=a("tdv/view/util/Ease"),d=a("tdv/view/util/EaseDimension"),f=a("tdv/player/view/util/XR");a=k.extend(h,function(p){h.call(this);this.Wb=p;this.ws=this.ws.bind(this);this.qq=this.fa=null;this.vz=this.kp=this.Sha=this.dz=void 0;this.Oua=20;this.Xg=null;this.Mf=this.Wb.get("opacity",.5);this.tT=this.Wb.get("rollOverOpacity",
this.Mf);this.T1a=1;this.W1a=.66;this.set("tag","MenuButton");this.set("visible",!1);this.set("over",!1);this.set("centerDistance",void 0)});a.prototype.fc=function(){h.prototype.fc.call(this);n.ba(this.Wb,["label"],this.ws,!0)};a.prototype.lc=function(){n.da(this.Wb,["label"],this.ws);h.prototype.lc.call(this)};a.prototype.ws=function(){this.fa=null};a.prototype.ya=function(p){this.dt(p);this.eh(p);this.oI(p);this.$f(p);this.we(p);h.prototype.ya.call(this,p)};a.prototype.dt=function(p){p.ob&&!this.qq&&
f.getType()==f.zx.ko&&this.Zh([this.qq=new h])};a.prototype.eh=function(){this.get("visible")&&(this.fa||(this.get("textureSource")||this.set("textureSource",new b),this.fa=new e(this.Wb,[this.Wb]),this.get("textureSource").$n(this.fa.Ig()),this.set("contentWidth",this.fa.dg()),this.set("contentHeight",this.fa.wg()),this.set("hfov",this.fa.ff()),this.set("distance",this.Wb.get("distance"))),this.fa.update()&&(this.get("textureSource").update(),this.Na()),this.W("over")&&this.fa.IE(this.get("over")?
0:-1))};a.prototype.oI=function(p){this.W("visible")&&(this.Xg=new c("linear",[new d("displayCoef",this.get("visible")?0:1,this.get("visible")?1:0,void 0)],300));this.Xg&&(this.Xg.Re()?this.Xg=null:this.Xg.Lb(p.xf))};a.prototype.$f=function(p){if(this.get("visible")||this.Xg){this.kp=p.$a;this.vz=Math.min(90,Math.max(-90,this.Oua+this.Oua-p.pitch));if(this.W("visible")&&this.get("visible"))this.set("yaw",p.$a),this.set("pitch",p.pitch);else{for(;this.kp+180<this.dz;)this.dz-=360;for(;this.kp-180>
this.dz;)this.dz+=360;var q=(this.kp-this.dz)/p.xf,r=(this.vz-this.Sha)/p.xf,t=Math.atan2(r,q);r=Math.sqrt(r*r+q*q);r=Math.min(r,10*m);q=Math.cos(t)*r;t=Math.sin(t)*r;this.set("yaw",l(this.get("yaw"),this.kp+q,.02));this.set("pitch",l(this.get("pitch"),this.vz+t,.02))}this.dz=this.kp;this.Sha=this.vz;t=this.get("yaw")-p.$a;p=this.get("pitch")-p.pitch;this.set("centerDistance",Math.sqrt(t*t+p*p))}};a.prototype.we=function(){if(!this.get("visible")&&!this.Xg)this.set("alpha",0);else if(this.W("over",
"centerDistance")||this.Xg){var p=this.get("over")?this.tT:this.Mf,q=this.W1a,r=this.get("centerDistance")/this.get("hfov");r<1&&(q+=(1-r)*(this.T1a-q),p+=(1-r)*(this.tT-p));this.Xg&&(p*=this.Xg.nb("displayCoef"),q*=this.Xg.nb("displayCoef"));this.set("alpha",p);this.set("scale",q)}};a.prototype.Zn=function(p){if(p.Wf==g.Lm){var q=!1;this.get("visible")&&!p.qm()&&(q=this.oy(p.Os).length>0);q&&(p.yD(this.Wb),p.CI(this.Wb),p.nm(this.get("distance")));this.get("over")!=q&&(this.get("over")&&this.Wb.m(g.Eb),
this.set("over",q),this.get("over")&&this.Wb.m(g.tc))}else p.Wf==g.Uf&&this.get("visible")&&!p.qm()&&this.oy(p.Os).length>0&&(p.Yt(this.Wb),this.Wb.m(g.la),this.m(g.la))};var m=Math.PI/180;return a});
define("tdv/player/view/panorama/renderer/object/MenuPanel","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/view/panorama/renderer/object/Plane tdv/player/canvas/MenuCanvas tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource tdv/view/util/Ease tdv/view/util/EaseDimension tdv/player/view/util/XR".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/player/view/panorama/renderer/object/Plane"),
h=a("tdv/player/canvas/MenuCanvas"),e=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource"),b=a("tdv/view/util/Ease"),c=a("tdv/view/util/EaseDimension"),d=a("tdv/player/view/util/XR");a=l.extend(g,function(f,m){g.call(this);this.Wb=f;this.JC=m;this.ws=this.ws.bind(this);this.fa=null;this.Sha=this.dz=void 0;this.Xg=null;this.Mf=this.Wb.get("opacity",.5);this.tT=this.Wb.get("rollOverOpacity",this.Mf);this.set("textureSource",new e);this.set("tag","MenuPanel");this.set("overIndex",
-1);this.set("selectedIndex",-1);this.Lva=!1});a.prototype.fc=function(){g.prototype.fc.call(this);k.ba(this.Wb,["label"],this.ws,!0);this.JC.forEach(function(f){k.ba(f,["label"],this.ws,!0)}.bind(this))};a.prototype.lc=function(){k.da(this.Wb,["label"],this.ws);this.JC.forEach(function(f){k.da(f,["label"],this.ws)}.bind(this));g.prototype.lc.call(this)};a.prototype.ws=function(){this.fa=null};a.prototype.ya=function(f){this.dt(f);this.eh(f);this.oI(f);this.$f(f);g.prototype.ya.call(this,f)};a.prototype.FXa=
function(){this.fa||(this.fa=new h(this.Wb,this.JC),this.get("textureSource").$n(this.fa.Ig()),this.set("contentWidth",this.fa.dg()),this.set("contentHeight",this.fa.wg()),this.set("hfov",this.fa.ff()),this.set("distance",this.Wb.get("distance")))};a.prototype.eh=function(){this.fa||this.FXa();this.W("selectedIndex")&&this.fa.IE(this.get("selectedIndex"));this.W("overIndex")&&this.fa.IE(this.get("overIndex"));this.fa.update()&&(this.get("textureSource").update(),this.Na())};a.prototype.dt=function(f){f.ob&&
!this.qq&&d.getType()==d.zx.ko&&this.Zh([this.qq=new g])};a.prototype.oI=function(f){this.Xg||this.Lva||(this.Xg=new b("linear",[new c("alpha",0,1,void 0),new c("scale",0,1,void 0),new c("yaw",f.$a,this.get("yaw"),void 0),new c("pitch",f.pitch,this.get("pitch"),void 0)],300));this.Xg&&(this.Xg.Re()?(this.Lva=!0,this.Xg=null):this.Xg.Lb(f.xf))};a.prototype.$f=function(){if(this.Xg){var f=this.get("overIndex")<0?this.Mf:this.tT;this.set("alpha",f*this.Xg.nb("alpha"));this.set("scale",this.Xg.nb("scale"));
this.set("yaw",this.Xg.nb("yaw"));this.set("pitch",this.Xg.nb("pitch"))}else this.W("overIndex")&&(f=this.get("overIndex")<0?this.Mf:this.tT,this.set("alpha",f))};a.prototype.Zn=function(f){if(f.Wf==n.Lm){var m=-1;if(!f.qm()){var p=this.oy(f.Os).filter(function(q){return q.source==this.fa.Ig()}.bind(this));p.length>0&&(m=this.fa.Lma(p[0].x,p[0].y))}m>=0&&(f.yD(this.JC[m]),f.CI(this.JC[m]),f.nm(this.get("distance")));this.get("overIndex")>=0!=m>=0&&(m>0?this.m(n.tc):this.m(n.Eb));this.get("overIndex")!=
m&&(this.get("overIndex")>=0&&this.JC[this.get("overIndex")].m(n.Eb),this.set("overIndex",m),this.get("overIndex")>=0&&this.JC[this.get("overIndex")].m(n.tc))}else f.Wf!=n.Uf||f.qm()||(p=this.oy(f.Os).filter(function(q){return q.source==this.fa.Ig()}.bind(this)),p.length>0&&(m=this.fa.Lma(p[0].x,p[0].y),m>=0&&(p=this.JC[m],this.set("selectedIndex",m),f.Yt(p),f.nm(this.get("distance")),p.m(n.la),this.m(n.la,{item:p}))))};return a});
define("tdv/player/view/panorama/renderer/object/MenuPanels",["require","tdv/utils","tdv/constants/EventName","tdv/player/view/panorama/renderer/object/Base","tdv/player/view/panorama/renderer/object/MenuPanel"],function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/player/view/panorama/renderer/object/Base"),g=a("tdv/player/view/panorama/renderer/object/MenuPanel");a=l.extend(n,function(b){n.call(this);this.Wb=b;this.UC=[];this.FM=null;this.set("tag","MenuPanels");this.set("visible",
!1)});a.prototype.ya=function(b){this.W("visible")&&this.get("visible")&&(this.set("yaw",b.$a),this.set("pitch",b.pitch),this.Vta(this.Wb));n.prototype.ya.call(this,b)};a.prototype.Vta=function(b){b=new g(this.Wb,b.get("children",[]));var c=this.get("yaw");this.Cb().forEach(function(d){c+=d.get("hfov")+e});b.set("yaw",c);b.set("pitch",this.get("pitch"));this.dVa(b);this.appendChild(b)};a.prototype.mCa=function(b){this.Cb().slice(b).forEach(function(c){this.E4a(c);c.remove()}.bind(this));this.UC=this.UC.filter(function(c){return this.Cb().indexOf(c)>=
0}.bind(this))};a.prototype.dVa=function(b){b.bind(k.tc,this.DBa,this,!0);b.bind(k.Eb,this.CBa,this,!0);b.bind(k.la,this.BBa,this,!0)};a.prototype.E4a=function(b){b.h(k.tc,this.DBa,this,!0);b.h(k.Eb,this.CBa,this,!0);b.h(k.la,this.BBa,this,!0)};a.prototype.DBa=function(b){this.UC.indexOf(b.source)<0&&(this.UC.push(b.source),this.UC.length==1&&this.ava())};a.prototype.CBa=function(b){b=this.UC.indexOf(b.source);b>=0&&(this.UC.splice(b,1),this.UC.length==0&&this.l6a())};a.prototype.BBa=function(b){var c=
b.source;b=b.data.item;b.get("children",[]).length?(this.mCa(this.Cb().indexOf(c)+1),this.Vta(b)):this.eva()};a.prototype.eva=function(){this.set("visible",!1);this.mCa(0);this.ava();this.m(k.nB)};a.prototype.ava=function(){this.FM&&(clearTimeout(this.FM),this.FM=null)};a.prototype.l6a=function(){this.FM||(this.FM=setTimeout(function(){this.FM=null;this.eva()}.bind(this),h))};var h=3E3,e=1;return a});
define("tdv/player/view/panorama/renderer/object/Menu","require tdv/utils tdv/constants/EventName tdv/player/view/panorama/renderer/object/Base tdv/player/view/panorama/renderer/object/MenuButton tdv/player/view/panorama/renderer/object/MenuPanels".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/player/view/panorama/renderer/object/Base"),g=a("tdv/player/view/panorama/renderer/object/MenuButton"),h=a("tdv/player/view/panorama/renderer/object/MenuPanels");a=l.extend(n,
function(e){n.call(this);this.C=e;this.Pl.push(this.C);this.set("tag","Menu");this.set("visible",!1);this.fe=new g(this.C);this.fe.bind(k.la,this.rWa,this,!1);this.Zi=new h(this.C);this.Zi.bind(k.nB,this.H3a,this,!1);this.Zh([this.fe,this.Zi])});a.prototype.fc=function(){n.prototype.fc.call(this);this.m(k.ud);this.m(k.ia)};a.prototype.ya=function(e){this.set("visible",e.ob);this.W("visible")&&(this.fe.set("visible",this.get("visible")),this.Zi.set("visible",!1));n.prototype.ya.call(this,e)};a.prototype.rWa=
function(){this.fe.set("visible",!1);this.Zi.set("visible",!0)};a.prototype.H3a=function(){this.fe.set("visible",this.get("visible"))};return a});
define("tdv/player/view/panorama/renderer/object/CustomPlane","require tdv/utils tdv/constants/EventName tdv/player/view/panorama/renderer/object/Plane tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource tdv/player/view/panorama/renderer/object/util/EventAggregator tdv/view/events/ProgressEvent".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/player/view/panorama/renderer/object/Plane"),g=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource"),
h=a("tdv/player/view/panorama/renderer/object/util/EventAggregator"),e=a("tdv/view/events/ProgressEvent");a=l.extend(n,function(){n.call(this);this.set("tag","CustomPlane");this.set("source",null);this.set("sourceUpdated",!1);this.set("sourceIsVideo",!1);this.ve=this.Lh=null});a.prototype.fc=function(){this.Lh=(new h(k.ia)).io(this.vs.bind(this));this.ve=(new h(k.ia)).$q(this.Xy.bind(this));n.prototype.fc.call(this)};a.prototype.lc=function(){this.Lh.dispose();this.ve.dispose();n.prototype.lc.call(this)};
a.prototype.ya=function(b){var c=this.get("textureSource");this.W("source","sourceUpdated","sourceIsVideo")&&(c||this.set("textureSource",c=new g),this.W("source")&&c.$n(this.get("source")),this.W("sourceIsVideo")&&c.WX(this.get("sourceIsVideo")),this.W("sourceUpdated")&&(c.update(),this.set("sourceUpdated",!1)));c&&c.Hpa(b.Jk>0);n.prototype.ya.call(this,b);this.W("meshGroup")&&(b=(b=this.get("meshGroup"))&&b.children||[],b.length&&(this.Lh.fg(b),this.ve.fg(b)))};a.prototype.vs=function(){this.m(k.ud);
this.m(k.ia)};a.prototype.Xy=function(b,c){var d=0;c.aw(function(f){(f=c.Mn(f))&&(d+=f.percent)});this.m(new e(k.xc,d/c.xd.length))};return a});
define("tdv/player/view/panorama/renderer/object/SurfaceSelector","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/view/panorama/renderer/3d/util/GeometryUtil tdv/player/view/panorama/renderer/object/Base tdv/player/view/panorama/renderer/object/CustomPlane tdv/player/view/panorama/renderer/object/canvas/SurfaceReticleCanvas tdv/player/view/util/geo/Line tdv/player/view/util/geo/Rectangle".split(" "),function(a){function l(q,r,t){this.eg=q;this.eg.bind(g.N("distanceToFloor"),
this.ya,this,!1);this.ml=r;this.ml.bind(g.N("yaw"),this.ya,this,!1);this.ml.bind(g.N("distance"),this.ya,this,!1);this.ml.bind(g.N("enabled"),this.ya,this,!1);this.ml.bind(g.N("enabledInSurfaceSelection"),this.ya,this,!1);this.Rb=null;this.Af=new b;this.Af.set("hfov",20);this.Af.set("vfov",20);this.Af.set("pitch",-90);this.Af.set("source",t.Ig());this.Af.set("contentWidth",t.dg());this.Af.set("contentHeight",t.wg());this.ya()}var k=a("tdv/utils"),n=a("tdv/binding/BindingsHandler"),g=a("tdv/constants/EventName"),
h=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),e=a("tdv/player/view/panorama/renderer/object/Base"),b=a("tdv/player/view/panorama/renderer/object/CustomPlane"),c=a("tdv/player/view/panorama/renderer/object/canvas/SurfaceReticleCanvas"),d=a("tdv/player/view/util/geo/Line"),f=a("tdv/player/view/util/geo/Rectangle");a=k.extend(e,function(q){e.call(this);this.G1=this.G1.bind(this);this.ev=this.ev.bind(this);this.D1=this.D1.bind(this);this.set("tag","SurfaceSelector");this.set("reticleVisible",
!1);this.set("enabled",!1);this.Aa=q;this.KZ=[];this.qR=new f;this.jl=new d;this.Le=new b;this.Le.set("hfov",20);this.Le.set("vfov",20);this.Le.set("pitch",-90);this.set("reticleCoef",1);this.Zh([this.Le])});a.prototype.fc=function(){this.dYa();e.prototype.fc.call(this);n.ba(this.Aa,["distanceToFloor"],this.G1,!0);n.ba(this.Aa,["adjacentPanoramas"],this.ev,!0);n.ba(this.La.ld,["adjacentPanoramaPositionsEnabled"],this.D1,!0);this.m(g.ud);this.m(g.ia)};a.prototype.lc=function(){e.prototype.lc.call(this);
n.da(this.Aa,["distanceToFloor"],this.G1);n.da(this.Aa,["adjacentPanoramas"],this.ev);n.da(this.La.ld,["adjacentPanoramaPositionsEnabled"],this.D1);this.PCa([])};a.prototype.G1=function(){var q=this.Aa.get("distanceToFloor");this.Le.set("distance",q);q=h.fw(q);var r=h.Uma(q,90),t=h.Vma(q,90);this.qR.Lg.set(-r*.5,-q,-t*.5);this.qR.Fk.set(r*.5,-q,-t*.5);this.qR.pE.set(-r*.5,-q,t*.5);this.vCa=q/h.xt()};a.prototype.ev=function(){this.PCa(this.Aa.get("adjacentPanoramas",[]))};a.prototype.D1=function(){this.ev()};
a.prototype.PCa=function(q){this.KZ.forEach(function(r){r.clear()});this.KZ=q.map(function(r){return new l(this.Aa,r,this.Hha)}.bind(this));q=[];this.La.ld.get("adjacentPanoramaPositionsEnabled")&&(q=q.concat(this.KZ.map(function(r){return r.Af})));q=q.concat([this.Le]);this.Zh(q)};a.prototype.ya=function(q){e.prototype.ya.call(this,q);this.set("enabled",q.rY);this.Cka();this.uD(q)};a.prototype.Cka=function(){this.W("enabled","reticleVisible","composedTranslationX","composedTranslationY","composedTranslationZ",
"composedDeltaYaw","composedDeltaPitch","composedDeltaRoll")&&(this.Le.set("alpha",this.get("reticleVisible")?1:0),this.set("alpha",!this.get("enabled")||this.get("composedTranslationX")||this.get("composedTranslationY")||this.get("composedTranslationZ")||this.get("composedDeltaYaw")||this.get("composedDeltaPitch")||this.get("composedDeltaRoll")?0:1),this.MEa())};a.prototype.dYa=function(){this.ZM=new c(this.La.R);this.ZM.setPosition(this.get("reticleCoef"));this.Le.set("source",this.ZM.Ig());this.Le.set("contentWidth",
this.ZM.dg());this.Le.set("contentHeight",this.ZM.wg());this.Hha=new c(this.La.R);this.Hha.setPosition(0);this.Hha.update(1)};a.prototype.uD=function(q){this.W("reticleCoef")&&this.ZM.setPosition(this.get("reticleCoef"));this.Le.set("sourceUpdated",this.ZM.update(q.xf))};a.prototype.Zn=function(q){if(q.eya)if(!this.get("enabled")||q.Os.length==0||q.qm()||q.Ue())this.set("reticleVisible",!1);else{var r=q.Os[0];this.jl.Lg.set(r.origin.x,r.origin.y,r.origin.z);this.jl.Fk.set(r.origin.x+r.direction.x,
r.origin.y+r.direction.y,r.origin.z+r.direction.z);if(r=this.qR.intersection(this.jl,!0)){var t=this.qR.u8(r,!0),u=2*(.5-t.x);t=2*(.5-t.y);var v=m*Math.atan2(-u,t),w=-90+m*Math.atan2(Math.sqrt(u*u+t*t),1);if(w<-75||w>-1)this.set("reticleVisible",!1);else{var y={x:u*this.vCa,y:-t*this.vCa};q.pw()||q.Ana()?q.Wf==g.Lm&&(this.set("reticleVisible",!0),this.Le.set("alpha",Math.min(1,(w- -75)/5)),this.Le.set("translationX",y.x),this.Le.set("translationZ",y.y)):this.set("reticleVisible",!1);var x=this.La.ld.get("surfaceSelectionHorizontalAngle")*
.5,z=this.La.ld.get("surfaceSelectionVerticalAngle")*.5;t=this.KZ.map(function(A){return{ml:A.ml,EW:A.Mcb(v),vertical:A.vdb(w),distance:A.k6(y)}}).filter(function(A){return A.EW<x&&A.vertical<z});t.length==0?this.set("reticleCoef",0):(t.sort(function(A,D){return A.distance-D.distance}),u=t[0].ml,this.set("reticleCoef",Math.max(0,Math.min(1,(1-t[0].EW/x)*(1-t[0].vertical/z)))),r=this.Aa.get("distanceToFloor")*Math.sqrt(r.x*r.x+r.y*r.y+r.z*r.z)/-r.y,q.Ana()&&q.l$a([u]),q.nm(r),q.Wf==g.Uf?(q.Yt([u]),
this.get("blendingActive")||u.m(g.Qr)):(q.yD([u]),q.pw()&&q.CI([u]),(r=this.La.R.get("displayTooltipInSurfaceSelection")&&u.get("panorama")&&u.get("panorama").get("label"))&&q.c5(r,0)))}}else this.set("reticleVisible",!1)}};l.prototype.clear=function(){this.eg.h(g.N("distanceToFloor"),this.ya,this,!1);this.eg=null;this.ml.h(g.N("yaw"),this.ya,this,!1);this.ml.h(g.N("distance"),this.ya,this,!1);this.ml.h(g.N("enabled"),this.ya,this,!1);this.ml.h(g.N("enabledInSurfaceSelection"),this.ya,this,!1);this.ml=
null};l.prototype.Mcb=function(q){if(!this.Rb)return Infinity;q=Math.abs(this.Rb.$a-q);return q>180?360-q:q};l.prototype.vdb=function(q){return this.Rb?Math.abs(this.Rb.pitch-q):Infinity};l.prototype.k6=function(q){if(!this.wN)return Infinity;var r=q.x-this.wN.x;q=q.y-this.wN.y;return Math.sqrt(r*r+q*q)};l.prototype.ya=function(){var q=this.ml.get("yaw"),r=this.ml.get("distance"),t=this.ml.get("enabled")&&this.ml.get("enabledInSurfaceSelection");if(q!==void 0&&r!==void 0&&t){t=this.eg.get("distanceToFloor");
var u=-90+Math.atan2(r,t)*m;this.Af.set("alpha",u<-1?1:0);this.Rb={$a:q,pitch:u};u=h.fw(t)/h.xt();this.wN={x:-Math.sin(q*p)*r/t*u,y:-Math.cos(q*p)*r/t*u};this.Af.set("translationX",this.wN.x);this.Af.set("translationZ",this.wN.y);this.Af.set("distance",t)}else this.wN=this.Rb=null,this.Af.set("alpha",0)};var m=180/Math.PI,p=Math.PI/180;return a});
define("tdv/player/view/panorama/renderer/object/Panorama","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/view/events/ProgressEvent tdv/player/view/panorama/renderer/object/Base tdv/player/view/panorama/renderer/object/Plane tdv/player/view/panorama/renderer/object/SurfaceSelector tdv/player/view/panorama/renderer/object/util/EventAggregator tdv/player/view/panorama/renderer/object/util/LevelUtil tdv/player/view/util/Preloader tdv/player/view/util/XR".split(" "),function(a){var l=
a("tdv/utils"),k=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/view/events/ProgressEvent"),h=a("tdv/player/view/panorama/renderer/object/Base"),e=a("tdv/player/view/panorama/renderer/object/Plane"),b=a("tdv/player/view/panorama/renderer/object/SurfaceSelector"),c=a("tdv/player/view/panorama/renderer/object/util/EventAggregator"),d=a("tdv/player/view/panorama/renderer/object/util/LevelUtil"),f=a("tdv/player/view/util/Preloader"),m=a("tdv/player/view/util/XR"),p=0;a=l.extend(h,
function(t){h.call(this);this.C=t;this.Pl.push(this.C);this.wH=this.wH.bind(this);this.Og=this.Og.bind(this);this.ev=this.ev.bind(this);this.Ur(["loadingActive","currentTime","panoramaPixelsPerDegree"]);this.set("tag","Panorama");this.set("loadingActive",!1);this.set("blendingActive",!0);this.set("currentTime",0);this.set("adjacentPanoramas",[]);this.set("preloadEnabled",!0);this.set("backgroundPreloadEnabled",!0);this.set("surfaceSelectionEnabled",!1);this.set("id","panorama_"+p++);this.set("ready",
!1);this.R2=[];this.vq=this.ve=this.qg=null;this.Vi=new q;this.SBa=new r;this.D7a=new b(this.C);this.oq=new r;this.Zh([this.Vi,this.SBa,this.D7a,this.oq])});a.prototype.fc=function(){this.qg=(new c(n.ia)).io(this.vs.bind(this));this.ve=(new c(n.xc)).$q(this.yH.bind(this));this.vq=(new c(n.ud)).io(this.z2a.bind(this));h.prototype.fc.call(this);this.get("blendingActive")&&this.La.set("globalBlendingActive",this.La.get("globalBlendingActive")+1);k.ba(this.C,["currentTime"],this.wH,!0);k.ba(this.C,["frames",
"overlays","vrMenu","flipImageHorizontally"],this.Og,!0);k.ba(this.C,["adjacentPanoramas"],this.ev,!0)};a.prototype.lc=function(){this.qg.dispose();this.ve.dispose();this.vq.dispose();this.get("blendingActive")&&this.La.set("globalBlendingActive",this.La.get("globalBlendingActive")-1);h.prototype.lc.call(this);k.da(this.C,["currentTime"],this.wH);k.da(this.C,["frames","overlays","vrMenu","flipImageHorizontally"],this.Og);k.da(this.C,["adjacentPanoramas"],this.ev);this.mja()};a.prototype.Og=function(){function t(A,
D,E){A=x.indexOf(A);return A<0?E:w[A].get(D,E)}function u(A){return t(A,"projected",!1)}var v=this.La.jA(this.C.get("frames"));v.forEach(function(A){A.set("panoramaId",this.get("id"));A.set("flipHorizontally",this.C.get("flipImageHorizontally"))}.bind(this));var w=this.C.get("overlays"),y=this.La.jA(w),x=y.slice(),z=y.filter(function(A){return t(A,"projected",!1)||t(A,"required",!1)}).filter(function(A){return t(A,"enabled",!0)});this.C.get("vrMenu")&&y.push(this.La.jA(this.C.get("vrMenu")));y.forEach(function(A){A.set("panoramaId",
this.get("id"))}.bind(this));this.qg.fg(v.concat(y));this.ve.fg(v.concat(y));this.vq.fg(v.concat(z));this.SBa.Zh(y.filter(u));this.Vi.Zh(v);this.oq.Zh(y.filter(function(A){return!u(A)}));this.set("panoramaPixelsPerDegree",d.tJa(this.C));this.WEa()};a.prototype.wH=function(){this.set("currentTime",this.C.get("currentTime",0))};a.prototype.ev=function(){this.set("adjacentPanoramas",this.C.get("adjacentPanoramas",[]))};a.prototype.vs=function(){this.uk();this.m(n.ia)};a.prototype.z2a=function(){this.uk();
this.set("ready",!0);this.m(n.ud)};a.prototype.yH=function(){this.uk()};a.prototype.uk=function(){var t=0;this.ve.aw(function(u){var v=0,w;this.qg.Mn(u)?v=100:(w=this.ve.Mn(u))&&(v=w.percent);t+=v}.bind(this));this.m(new g(n.xc,t/this.ve.xd.length))};a.prototype.ya=function(t){t.ob&&!this.qq&&m.getType()==m.zx.ko&&this.Zh([this.qq=new e].concat(this.Cb()));var u=this.get("blendingActive");this.set("blendingActive",this.get("alpha")<1);u!=this.get("blendingActive")&&this.La.set("globalBlendingActive",
this.La.get("globalBlendingActive")+(this.get("blendingActive")?1:-1));this.set("backgroundPreloadEnabled",this.La.Uq().get("backgroundPreloadEnabled")!==!1);this.set("preloadEnabled",t.uX);this.W("adjacentPanoramas","loadingActive","preloadEnabled","backgroundPreloadEnabled")&&(this.get("loadingActive")&&this.get("backgroundPreloadEnabled")?this.j7a():this.mja());this.W("index")&&this.WEa();h.prototype.ya.call(this,t)};a.prototype.ona=function(){return d.ona(this.C,this.get("preloadEnabled"))};a.prototype.Qoa=
function(){return d.Qoa(this.C,this.get("preloadEnabled"))};a.prototype.j7a=function(){this.mja();this.R2=this.get("adjacentPanoramas").map(function(t){t=t.get("panorama");return[t,d.op(t,this.get("preloadEnabled"))]}.bind(this));this.R2.forEach(function(t){f.iGa(t[0],t[1]);f.w7(t[0],1)})};a.prototype.mja=function(){this.R2.forEach(function(t){f.w7(t[0],-1);f.chb(t[0],t[1])});this.R2=[]};a.prototype.WEa=function(){var t=this.get("index");this.Vi.Cb().forEach(function(u,v,w){u.set("panoramaIndex",
t);u.set("frameIndex",v);u.set("frameCount",w.length)})};var q=l.extend(h,function(){h.call(this);this.Ur(["loadingActive","currentTime","panoramaPixelsPerDegree"]);this.set("loadingActive",!1);this.set("currentTime",0);this.set("tag","Group")});q.prototype.ya=function(t){this.Cb().forEach(function(u,v,w){u.set("frontFrame",w[w.length-1])});h.prototype.ya.call(this,t)};var r=l.extend(h,function(){h.call(this);this.Ur(["loadingActive","currentTime","panoramaPixelsPerDegree"]);this.set("loadingActive",
!1);this.set("currentTime",0);this.set("tag","Group")});return a});
define("tdv/player/view/panorama/renderer/object/PanoramaFrame",["require","tdv/utils","tdv/player/view/panorama/renderer/object/Frame","tdv/player/view/panorama/renderer/3d/util/MeshUtil"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/panorama/renderer/object/Frame"),n=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),g=0;a=l.extend(k,function(){k.call(this);this.set("tag","PanoramaFrame");this.set("panoramaIndex",0);this.set("frameIndex",0);this.set("frameCount",1);this.set("id","frame_"+
g++)});a.prototype.ya=function(h){k.prototype.ya.call(this,h);this.pI()};a.prototype.uI=function(){if(this.W("panoramaIndex","frameIndex","frameCount","meshGroup")){var h=this.get("meshGroup");if(h){var e=this.get("panoramaIndex"),b=this.get("frameIndex"),c=this.get("frameCount"),d=h.children.length;h.children.forEach(function(f,m){n.j9(f,e+(m+b/c)/d)}.bind(this))}}};a.prototype.pI=function(){if(this.W("meshGroup","panoramaId","id")){var h=this.get("meshGroup");h&&h.children.forEach(function(e,b){n.setAttribute(e,
n.aF,this.get("panoramaId"));n.setAttribute(e,n.b$,b);n.setAttribute(e,n.qK,this.get("id"))}.bind(this))}};return a});
define("tdv/player/view/panorama/renderer/object/ImagePanoramaFrame","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/Priority tdv/player/view/panorama/renderer/object/Base tdv/player/view/panorama/renderer/object/PanoramaFrame tdv/player/view/panorama/renderer/object/util/EventAggregator tdv/player/view/panorama/renderer/object/util/LevelUtil tdv/player/view/panorama/renderer/object/util/MeshFactory tdv/player/view/panorama/renderer/TextureLoader tdv/view/events/ProgressEvent".split(" "),function(a){var l=
a("tdv/utils"),k=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/constants/Priority"),h=a("tdv/player/view/panorama/renderer/object/Base"),e=a("tdv/player/view/panorama/renderer/object/PanoramaFrame"),b=a("tdv/player/view/panorama/renderer/object/util/EventAggregator"),c=a("tdv/player/view/panorama/renderer/object/util/LevelUtil"),d=a("tdv/player/view/panorama/renderer/object/util/MeshFactory"),f=a("tdv/player/view/panorama/renderer/TextureLoader"),m=a("tdv/view/events/ProgressEvent");
a=l.extend(e,function(q){e.call(this);this.set("tag","ImagePanoramaFrame");this.MBa=!0;this.C=q;this.Pl.push(this.C);this.am=this.Lh=this.vq=null;this.Ufa=[];this.Og=this.Og.bind(this);this.Ur(["loadingActive","currentTime","panoramaId","panoramaPixelsPerDegree"]);this.Zh([this.oq=new p])});a.prototype.fc=function(){this.vq=new b(n.ia);this.Lh=new b(n.ia);this.am=new b(n.xc);e.prototype.fc.call(this);k.ba(this.C,["overlays"],this.Og,!0)};a.prototype.lc=function(){this.vq.dispose();this.Lh.dispose();
this.am.dispose();k.da(this.C,["overlays"],this.Og);e.prototype.lc.call(this)};a.prototype.Og=function(){this.oq.Zh(this.La.jA(this.C.get("overlays")));this.EEa()};a.prototype.EEa=function(){this.Lh.fg([].concat(this.Ufa,this.oq.Cb()));this.am.fg([].concat(this.Ufa,this.oq.Cb()))};a.prototype.Yp=function(){var q=[],r=[],t=[];c.Oma(this.C,this.MBa).forEach(function(u,v){var w=d.Vab(this.C,u);c.Peb(u)?(v==0&&(q=q.concat(w),r=r.concat(w)),f.RA(w,v==0?f.su:f.mZ),f.QA(w,v==0?f.Hr:f.laa)):(v==0&&(q=q.concat(w)),
r=r.concat(w),f.RA(w,f.su),f.QA(w,f.Hr));f.UJ(w,v==0?g.zaa:g.Mp);f.jY(w,v);t=t.concat(w)}.bind(this));this.vq.fg(q);this.Ufa=r;this.EEa();this.Lh.io(this.vs.bind(this));this.vq.io(this.e3a.bind(this));this.am.$q(this.yH.bind(this));this.m(new m(n.xc,0));return t};a.prototype.e3a=function(){this.m(n.ud)};a.prototype.vs=function(){this.m(n.ia)};a.prototype.ya=function(q){this.MBa=q.uX;this.e9a();e.prototype.ya.call(this,q)};a.prototype.e9a=function(){var q=this.get("frontFrame");if(this.W("frontFrame")||
q&&q.W("alpha"))q=q&&q!=this?1-q.get("alpha"):1,this.oq.set("alpha",q)};a.prototype.yH=function(){var q=0;this.am.aw(function(r){var t=0,u;this.Lh.Mn(r)?t=100:(u=this.am.Mn(r))&&(t=u.percent);q+=t}.bind(this));this.m(new m(n.xc,q/this.am.xd.length))};var p=l.extend(h,function(){h.call(this);this.Ur(["loadingActive","panoramaId","panoramaPixelsPerDegree"]);this.set("loadingActive",!1);this.set("tag","Group")});return a});
define("tdv/player/view/panorama/renderer/object/ImagePlane","require tdv/utils tdv/constants/EventName tdv/player/view/panorama/renderer/object/Plane tdv/player/view/panorama/renderer/object/texturesource/ImageTextureSource tdv/player/view/panorama/renderer/object/util/EventAggregator tdv/view/events/ProgressEvent".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/player/view/panorama/renderer/object/Plane"),g=a("tdv/player/view/panorama/renderer/object/texturesource/ImageTextureSource"),
h=a("tdv/player/view/panorama/renderer/object/util/EventAggregator"),e=a("tdv/view/events/ProgressEvent");a=l.extend(n,function(){n.call(this);this.set("tag","ImagePlane");this.set("url",null);this.ve=this.qg=null});a.prototype.fc=function(){this.qg=(new h(k.ia)).io(this.vs.bind(this));this.ve=(new h(k.xc)).$q(this.Xy.bind(this));n.prototype.fc.call(this)};a.prototype.lc=function(){this.qg.dispose();this.ve.dispose();n.prototype.lc.call(this)};a.prototype.ya=function(b){if(this.W("url")){var c=this.get("url");
c=c?new g(c):null;this.set("textureSource",c)}n.prototype.ya.call(this,b);this.W("meshGroup")&&(b=(b=this.get("meshGroup"))&&b.children||[],b.length&&(this.qg.fg(b),this.ve.fg(b)))};a.prototype.vs=function(){this.m(k.ud);this.m(k.ia)};a.prototype.Xy=function(b,c){var d=0;c.aw(function(f){(f=c.Mn(f))&&(d+=f.percent)});this.m(new e(k.xc,d/c.xd.length))};return a});
define("tdv/player/view/panorama/renderer/object/control/CueController","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/constants/PlaybackState tdv/view/av/VideoPlayer".split(" "),function(a){function l(c,d){this.Td=c;this.qa=d;this.Zl=!1;this.hk=[];this.Co=this.wL=void 0;this.nf=[];this.lWa();this.Bca();this.X3();this.Fj()}function k(c,d,f){this.time=c;this.cue=d;this.action=f}var n=a("tdv/utils"),g=a("tdv/constants/EventName"),h=a("tdv/events/Event"),e=a("tdv/constants/PlaybackState"),
b=a("tdv/view/av/VideoPlayer");l.prototype.clear=function(){this.OQ();this.hk=[];this.u8a();this.qa=this.Td=null};l.prototype.lWa=function(){this.qa.bind(b.Cg,this.Lf,this,!0);this.qa.bind(g.$e,this.Fj,this,!0);this.qa.bind(g.Sb,this.SC,this,!0)};l.prototype.u8a=function(){this.qa.h(b.Cg,this.Lf,this,!0);this.qa.h(g.$e,this.Fj,this,!0);this.qa.h(g.Sb,this.SC,this,!0)};l.prototype.Fj=function(){var c=this.qa.getState()!=e.ca;this.Zl!=c&&((this.Zl=c)?this.X3():this.OQ())};l.prototype.SC=function(){this.yI()};
l.prototype.Lf=function(){this.yI()};l.prototype.X3=function(){this.Co=this.wL=0};l.prototype.yI=function(){if(this.qa&&this.Zl){var c=this.nf.slice(),d=this.qa.getCurrentTime(),f=d-this.wL;f<0&&(this.nf=[],this.Co=0);f=f>=0&&f<2;this.wL=d;var m;for(m=this.Co;m<this.hk.length&&!(this.hk[m].time>d);m++);for(;this.Co<m;this.Co++)d=this.hk[this.Co],d.action=="start"?(this.nf=n.union(this.nf,[d.cue]),f&&d.cue.m(new h(g.vr))):(this.nf=n.union(this.nf,[d.cue]),f&&d.cue.m(new h(g.Sb)));c.length==this.nf.length&&
n.intersection(c,this.nf).length==this.nf.length||this.QU()}};l.prototype.OQ=function(){this.nf.length>0&&(this.nf=[],this.QU())};l.prototype.QU=function(){this.Td.m(new h(g.zl,{activeCues:this.nf.slice()}))};l.prototype.Bca=function(){this.hk=[];this.Td.get("cues",[]).forEach(c=>{this.hk.push(new k(c.get("startTime",0),c,"start"));this.hk.push(new k(c.get("endTime",Number.POSITIVE_INFINITY),c,"end"))});this.hk.sort(function(c,d){return c.time==d.time?c.action==d.start?0:c.action=="start"?-1:1:c.time-
d.time})};return l});
define("tdv/player/view/panorama/renderer/object/control/VideoPlaybackController",["require","tdv/constants/EventName","tdv/constants/PlaybackState","tdv/events/Event","tdv/view/av/VideoPlayer"],function(a){function l(e,b,c){this.Ee=e;this.Td=b;this.qa=c;this.qa.setCurrentTime(this.mg=this.Td.get("currentTime",0));this.qa.Ag(this.Ef=this.Ee.get("mute",!1));this.qa.Zc(this.H=this.Td.get("state",n.ca));this.qa.setLoop(this.Ol=this.Td.get("loop"));this.$b=this.qa.hj();this.fVa();this.mVa();this.Fx()}
var k=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/events/Event"),h=a("tdv/view/av/VideoPlayer");l.prototype.clear=function(){this.F4a();this.L4a();this.iz();this.qa.Zc(n.ca);this.Td.set("state",n.ca);this.Td.set("currentTime",0);this.Td.set("duration",void 0)};l.prototype.pBa=function(){var e=this.Td.get("state",n.ca);this.H!=e&&this.qa.Zc(this.H=e)};l.prototype.nBa=function(){var e=this.Td.get("currentTime",0);this.mg!=e&&this.qa.setCurrentTime(this.mg=e)};l.prototype.gT=
function(){var e=this.Ee.get("mute",0);this.Ef!=e&&this.qa.Ag(this.Ef=e)};l.prototype.oBa=function(){var e=this.Td.get("loop");this.Ol!=e&&this.qa.setLoop(this.Ol=e)};l.prototype.qT=function(){this.Td.set("currentTime",this.mg=this.qa.getCurrentTime())};l.prototype.oT=function(){this.Td.set("duration",this.$b=this.qa.hj())};l.prototype.pT=function(){this.Td.set("state",this.H=this.qa.getState())};l.prototype.rT=function(){this.Td.m(new g(k.Sb))};l.prototype.fVa=function(){this.Ee.bind(k.N("mute"),
this.gT,this,!0)};l.prototype.F4a=function(){this.Ee.h(k.N("mute"),this.gT,this,!0)};l.prototype.mVa=function(){this.Td.bind(k.N("state"),this.pBa,this,!0);this.Td.bind(k.N("currentTime"),this.nBa,this,!0);this.Td.bind(k.N("loop"),this.oBa,this,!0)};l.prototype.L4a=function(){this.Td.h(k.N("state"),this.pBa,this,!0);this.Td.h(k.N("currentTime"),this.nBa,this,!0);this.Td.h(k.N("loop"),this.oBa,this,!0)};l.prototype.Fx=function(){this.qa.bind(h.Cg,this.qT,this,!0);this.qa.bind(h.Zj,this.oT,this,!0);
this.qa.bind(k.$e,this.pT,this,!0);this.qa.bind(k.Sb,this.rT,this,!0)};l.prototype.iz=function(){this.qa.h(h.Cg,this.qT,this,!0);this.qa.h(h.Zj,this.oT,this,!0);this.qa.h(k.$e,this.pT,this,!0);this.qa.h(k.Sb,this.rT,this,!0)};return l});
define("tdv/player/view/panorama/renderer/object/VideoPanoramaFrame","require tdv/utils tdv/constants/EventName tdv/constants/Priority tdv/constants/PlaybackState tdv/player/view/panorama/renderer/object/ImagePlane tdv/player/view/panorama/renderer/object/PanoramaFrame tdv/player/view/panorama/renderer/object/util/EventAggregator tdv/player/view/panorama/renderer/object/util/MeshFactory tdv/player/view/panorama/renderer/object/control/CueController tdv/player/view/panorama/renderer/object/control/VideoPlaybackController tdv/player/view/panorama/renderer/object/util/PanoramaFormat tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/TextureLoader tdv/player/view/util/Device tdv/view/av/SubtitleController tdv/view/av/VideoPlayer tdv/view/events/ProgressEvent tdv/view/util/Assets tdv/view/util/Ease tdv/view/util/EaseDimension".split(" "),function(a){var l=
a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/constants/Priority"),g=a("tdv/constants/PlaybackState"),h=a("tdv/player/view/panorama/renderer/object/ImagePlane"),e=a("tdv/player/view/panorama/renderer/object/PanoramaFrame"),b=a("tdv/player/view/panorama/renderer/object/util/EventAggregator"),c=a("tdv/player/view/panorama/renderer/object/util/MeshFactory"),d=a("tdv/player/view/panorama/renderer/object/control/CueController"),f=a("tdv/player/view/panorama/renderer/object/control/VideoPlaybackController"),
m=a("tdv/player/view/panorama/renderer/object/util/PanoramaFormat"),p=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),q=a("tdv/player/view/panorama/renderer/TextureLoader"),r=a("tdv/player/view/util/Device"),t=a("tdv/view/av/SubtitleController"),u=a("tdv/view/av/VideoPlayer"),v=a("tdv/view/events/ProgressEvent"),w=a("tdv/view/util/Assets"),y=a("tdv/view/util/Ease"),x=a("tdv/view/util/EaseDimension");a=l.extend(e,function(B){e.call(this);this.C=B;this.Pl.push(this.C);this.Ur(["loadingActive",
"currentTime","panoramaPixelsPerDegree"]);this.set("tag","VideoPanoramaFrame");this.set("frameEmpty",void 0);this.set("hasStableContent",void 0);this.S_=void 0;this.set("atStart",void 0);m.get(this.C)==m.Ir?this.Pka=this.C.get("sphere"):this.Pka=this.C.get("stereoSphere");this.Zl=!1;this.rb=u.Ak(this.Pka);this.uha=this.Kva=!1;this.IN=[];this.NH=[];this.cp=this.Yl=this.am=this.Lh=this.Rh=this.qa=null;this.qn=!1;this.tya=this.BC=this.CC=0});a.prototype.fc=function(){this.Lh=(new b(k.ia)).io(this.vs.bind(this));
this.am=(new b(k.xc)).$q(this.yH.bind(this));this.qa=new u(this.La.Uq(),this.Pka);this.bs=new d(this.C.QD(),this.qa);this.Ta=new f(this.La.Uq(),this.C.QD(),this.qa);this.wn=new t(this.C.QD(),this.qa);this.Fx();this.iYa();this.Kva=this.La.ld.get("displayPlayOverlay");this.uha=this.La.ld.get("clickAction")=="play_pause";var B=this.La.cg(this.C.QD());B.appendChild(this.Yl);B.appendChild(this.cp);e.prototype.fc.call(this)};a.prototype.lc=function(){this.Lh.dispose();this.am.dispose();this.iz();this.bs.clear();
this.bs=null;this.Ta.clear();this.Ta=null;this.wn.clear();this.wn=null;this.qa.clear();this.Rh=this.qa=null;this.Rva();e.prototype.lc.call(this)};a.prototype.iYa=function(){this.Rva();this.Yl=this.xva(w.tx,w.NK,w.qZ);this.cp=this.xva(w.MK,w.wTa,w.vTa)};a.prototype.xva=function(B,C,F){var G=new h;G.set("url",B);G.set("contentWidth",C);G.set("contentHeight",F);G.set("hfov",10);G.set("yaw",0);G.set("pitch",0);G.set("alpha",0);return G};a.prototype.Rva=function(){this.Yl&&(this.Yl.remove(),this.Yl=null);
this.cp&&(this.cp.remove(),this.cp=null)};a.prototype.Yp=function(){this.IN=c.obb(this.C,this.rb);this.L9a=q.hK(p.PD(this.IN[0])[0]);this.IN.forEach(function(C){q.RA(C,q.su);q.QA(C,q.Hr)});this.rb.get("posterURL")?(this.NH=c.pbb(this.C,this.rb),this.NH.forEach(function(C){q.RA(C,q.su);q.QA(C,q.Hr);q.UJ(C,n.zaa)})):this.NH=[];var B=[].concat(this.IN,this.NH);this.Lh.fg(B);this.am.fg(B);this.m(new v(k.xc,0));return B};a.prototype.ya=function(B){this.h9a(B);var C=this.qa.j6();this.set("frameEmpty",C.isEmpty());
this.set("atStart",!(this.get("currentTime")>1));this.eka();e.prototype.ya.call(this,B);this.Rh&&this.Rh.isEqual(C)?this.qa.getState()==g.PLAYING&&this.Na():(this.Rh=C,this.L9a.$n(this.Rh.Ru),this.Na())};a.prototype.eka=function(){this.get("frameEmpty")?this.set("hasStableContent",!1):this.get("currentTime")>this.S_+.2?this.set("hasStableContent",!0):this.get("currentTime")==0&&this.Mfa>this.qa.hj()-.5?this.set("hasStableContent",!0):this.set("hasStableContent",!1);this.W("frameEmpty")&&!this.get("frameEmpty")&&
(this.S_=this.get("currentTime"));!this.get("frameEmpty")&&this.get("currentTime")>0&&(this.Mfa=this.get("currentTime"))};a.prototype.Bn=function(){this.W("composedAlpha","meshGroup","frameEmpty","hasStableContent","atStart")&&(this.NH.length&&!this.get("hasStableContent")&&this.get("atStart")?(this.NH.forEach(function(B){p.Bf(B,this.get("composedAlpha"))}.bind(this)),this.IN.forEach(function(B){p.Bf(B,0)}.bind(this))):(this.NH.forEach(function(B){p.Bf(B,0)}.bind(this)),this.IN.forEach(function(B){p.Bf(B,
this.get("composedAlpha"))}.bind(this))))};a.prototype.vs=function(){this.m(k.ud);this.m(k.ia)};a.prototype.yH=function(B,C){var F=0;C.aw(function(G){(G=C.Mn(G))&&(F+=G.percent)});this.m(new v(k.xc,F/C.xd.length))};a.prototype.Fj=function(){this.Na()};a.prototype.Lf=function(){this.Na()};a.prototype.Zn=function(B){if(B.Wf==k.Uf&&!B.qm()&&this.uha&&(B.Yt(this.C),B=Date.now(),!(B-this.tya<500))){this.tya=B;B=this.C.QD();var C=B.get("state");C==g.PLAYING?B.set("state",g.Yb):C==g.Yb&&B.set("state",g.PLAYING)}};
a.prototype.h9a=function(B){if(this.uha){if(this.qn!=(this.qa.getState()==g.Yb))if(this.qn=!this.qn,this.Kva){var C=this.Yl.get("alpha"),F=this.qn?1:0;this.az=new y("linear",[new x("playAlpha",C,F),new x("playScale",B.ob?1.5:1,B.ob?1.5:1),new x("pauseAlpha",0,0),new x("pauseScale",1,1)],Math.abs(F-C)*z);this.Yl.wi()}else this.az=new y("linear",this.qn?[new x("playAlpha",0,0),new x("playScale",1,1),new x("pauseAlpha",0,2),new x("pauseScale",.5,1.5)]:[new x("playAlpha",0,2),new x("playScale",.5,1.5),
new x("pauseAlpha",0,0),new x("pauseScale",1,1)],A),this.Yl.wi(),this.cp.wi();this.az&&(this.az.Lb(B.xf),C=this.az.nb("playAlpha"),this.Yl.set("alpha",C<1?C:2-C),this.Yl.set("scale",this.az.nb("playScale")),C=this.az.nb("pauseAlpha"),this.cp.set("alpha",C<1?C:2-C),this.cp.set("scale",this.az.nb("pauseScale")),this.Na(),this.az.Re()&&(this.az=null));this.Yl.get("alpha")>0&&(this.get("globalBlendingActive")&&this.Yl.set("alpha",0),this.Yl.set("yaw",B.$a),this.Yl.set("pitch",B.pitch),this.Yl.set("hfov",
this.txa(B)));this.cp.get("alpha")>0&&(this.get("globalBlendingActive")&&this.cp.set("alpha",0),this.cp.set("yaw",B.$a),this.cp.set("pitch",B.pitch),this.cp.set("hfov",this.txa(B)))}};var z=300,A=600;a.prototype.txa=function(B){return B.ob?15:2*Math.atan((r.ub()?Math.min(B.width,B.height)/100*20:w.NK)*Math.tan(B.Ud*D*.5)/B.width)*E};var D=Math.PI/180,E=180/Math.PI;a.prototype.Fx=function(){this.qa.bind(u.Cg,this.Lf,this,!0);this.qa.bind(k.$e,this.Fj,this,!0)};a.prototype.iz=function(){this.qa.h(u.Cg,
this.Lf,this,!0);this.qa.h(k.$e,this.Fj,this,!0)};return a});
define("tdv/player/view/panorama/renderer/object/Popup","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/PlaybackState tdv/player/view/panorama/renderer/3d/util/Util tdv/player/view/panorama/renderer/object/Base tdv/player/view/panorama/renderer/object/SolidFrame tdv/player/view/panorama/renderer/object/CustomPlane tdv/player/view/panorama/renderer/object/ImagePlane tdv/player/view/panorama/renderer/object/control/VideoPlaybackController tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController tdv/player/view/panorama/renderer/object/util/EventAggregator tdv/player/view/panorama/renderer/object/util/LevelUtil tdv/player/view/util/ColorPicker tdv/player/view/util/geo/Fov tdv/view/core/UIComponent tdv/view/events/ProgressEvent tdv/view/util/Ease tdv/view/util/EaseDimension tdv/view/av/VideoPlayer".split(" "),function(a){function l(B){setTimeout(B,
0)}function k(B,C){for(B-=C;B>180;)B-=360;for(;B<-180;)B+=360;return B+C}var n=a("tdv/utils"),g=a("tdv/binding/BindingsHandler"),h=a("tdv/constants/EventName"),e=a("tdv/constants/PlaybackState");a("tdv/player/view/panorama/renderer/3d/util/Util");var b=a("tdv/player/view/panorama/renderer/object/Base"),c=a("tdv/player/view/panorama/renderer/object/SolidFrame"),d=a("tdv/player/view/panorama/renderer/object/CustomPlane"),f=a("tdv/player/view/panorama/renderer/object/ImagePlane"),m=a("tdv/player/view/panorama/renderer/object/control/VideoPlaybackController"),
p=a("tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController"),q=a("tdv/player/view/panorama/renderer/object/util/EventAggregator"),r=a("tdv/player/view/panorama/renderer/object/util/LevelUtil"),t=a("tdv/player/view/util/ColorPicker"),u=a("tdv/player/view/util/geo/Fov"),v=a("tdv/view/core/UIComponent"),w=a("tdv/view/events/ProgressEvent"),y=a("tdv/view/util/Ease"),x=a("tdv/view/util/EaseDimension"),z=a("tdv/view/av/VideoPlayer"),A=Math.PI/180;a=n.extend(b,function(B){b.call(this);
this.C=B;this.Pl.push(this.C);this.Og=this.Og.bind(this);this.h2=this.h2.bind(this);this.Ur(["loadingActive","currentTime","panoramaPixelsPerDegree"]);this.set("tag","Popup");this.set("inVR",!1);this.set("enabledInStandard",!0);this.set("interactionEnabled",!0);this.set("loadingActive",!1);this.set("frameEmpty",!0);this.set("state",e.ca);this.set("itemVisible","none");this.set("visible",!1);this.set("visiblePosition",0);this.set("alpha",0);this.set("over",!1);this.set("gazeOver",!1);this.set("video",
null);this.set("image",null);this.set("actualVisible",!1);this.Yd=this.Jb=this.lb=this.ve=this.qg=null;this.Hb=new p;this.Mx=this.zC=this.Dn=this.Rh=this.qa=null});a.prototype.fc=function(){this.qg=(new q(h.ia)).io(this.uH.bind(this));this.ve=(new q(h.xc)).$q(this.xH.bind(this));b.prototype.fc.call(this);this.xXa();this.appendChild(this.Yd);g.ba(this.C,D,this.Og,!0);g.xD(this.C,E,this.h2,!0)};var D="playbackPositions popupDistance popupMaxHeight popupMaxWidth image.levels.url video state".split(" "),
E=["visible"];a.prototype.lc=function(){this.qg.dispose();this.ve.dispose();g.da(this.C,D,this.Og);g.da(this.C,E,this.h2);this.zG();this.kC();this.Qu();b.prototype.lc.call(this)};a.prototype.Og=function(){var B=r.gdb(this.C,this.get("panoramaPixelsPerDegree"));this.set("imageURL",B&&B.get("url"));this.set("imageWidth",B&&B.get("width"));this.set("imageHeight",B&&B.get("height"));this.set("video",this.C.get("video"));this.set("state",this.C.get("state"));this.set("popupDistance",this.C.get("popupDistance"));
this.set("popupMaxWidth",this.C.get("popupMaxWidth"));this.set("popupMaxHeight",this.C.get("popupMaxHeight"));this.set("playbackPositions",this.C.get("playbackPositions"))};a.prototype.h2=function(){this.set("visible",this.C.get("visible"))};a.prototype.ya=function(B){this.cD=B.$a;this.bD=B.pitch;this.dt(B);this.i9a();this.cV(B);this.we(B);this.V8a(B);this.E8a(B);b.prototype.ya.call(this,B)};a.prototype.i9a=function(){this.W("playbackPositions","currentTime")&&(this.Hb.LE(this.get("playbackPositions")),
this.Hb.JE(this.get("currentTime")),this.set("sourceYaw",this.Hb.get("yaw")),this.set("sourcePitch",this.Hb.get("pitch")),this.set("sourceRotationX",this.Hb.get("rotationX")),this.set("sourceRotationY",this.Hb.get("rotationY")),this.set("sourceRotationZ",this.Hb.get("rotationZ")),this.set("sourceHFOV",this.Hb.get("hfov")))};a.prototype.dt=function(){if(this.W("video","imageURL")){var B=[this.Yd];this.W("imageURL")&&(this.YQ(),this.lb&&B.push(this.lb),this.$T("itemVisible"));this.W("video")&&(this.$Q(),
this.Jb&&B.push(this.Jb),this.$T("itemVisible"));this.qg.fg(B);this.ve.fg(B);this.Zh(B)}};a.prototype.cV=function(){if(this.qa){var B=this.qa.j6();this.set("frameEmpty",!!B&&B.isEmpty());!this.Rh||B&&!this.Rh.isEqual(B)?(this.Rh=B,this.Jb.set("source",this.Rh.Ru),this.Jb.set("sourceUpdated",!0),this.Na()):this.qa.getState()==e.PLAYING&&this.Na()}else this.set("frameEmpty",!1)};a.prototype.we=function(B){this.set("inVR",B.ob);this.set("hotspotsEnabled",B.lJ);this.set("rendererYaw",B.$a);this.set("rendererPitch",
B.pitch);this.set("rendererRoll",B.kh);this.set("rendererWidth",B.Sj);this.set("rendererHeight",B.Rj);this.set("rendererHFOV",B.Ud);if(this.W("visible")){var C=this.get("visiblePosition"),F=this.get("visible")?1:0,G=Math.max(1,this.C.get(this.get("visible")?"showDuration":"hideDuration")*Math.abs(F-C)),I=this.C.get(this.get("visible")?"showEasing":"hideEasing");C!=F&&(this.Dn=new y(I,[new x("position",C,F)],G));this.get("visible")||(this.set("actualVisible",!1),this.qa&&this.qa.Zc(e.ca))}this.Dn&&
(this.Dn.Re()?(this.Dn=null,this.get("visible")?(this.set("actualVisible",!0),this.C.m(h.nQ),this.C.get("autoplay")&&this.qa&&this.qa.Zc(e.PLAYING)):l(function(){this.C&&this.C.m(h.EK)}.bind(this))):this.Dn.Lb(B.xf),this.Dn&&(this.set("visiblePosition",this.Dn.nb("position")),this.Na()));C=!1;if(C=B.ob?this.W("visible","itemVisible"):this.W("rendererYaw","rendererPitch","rendererRoll","rendererWidth","rendererHeight","rendererHFOV","itemVisible","popupMaxWidth","popupMaxHeight","sourceHFOV"))this.set("targetImageScale",
this.Bxa(this.lb,B)),this.set("targetVideoScale",this.Bxa(this.Jb,B)),this.set("targetYaw",k(this.get("rendererYaw"),this.get("sourceYaw"))),this.set("targetPitch",this.get("rendererPitch")),this.set("targetRotationZ",k(B.ob?0:this.get("rendererRoll"),this.get("sourceRotationZ")));if(C||this.W("visiblePosition","targetScale","targetYaw","targetPitch","targetRoll","popupDistance","hfov")){F=this.get("visiblePosition");var N=this.get("targetYaw")*F+this.get("sourceYaw")*(1-F),P=this.get("targetPitch")*
F+this.get("sourcePitch")*(1-F),Q=this.get("sourceRotationX")*(1-F),R=this.get("sourceRotationY")*(1-F),K=this.get("targetRotationZ")*F+this.get("sourceRotationZ")*(1-F);B=Math.min(1,2*F);var M=this.get("popupDistance"),T=this.get("sourceHFOV");C=this.get("targetImageScale")*F+(1-F);F=this.get("targetVideoScale")*F+(1-F);this.set("alpha",B);this.lb&&this.lb.set("scale",C);this.Jb&&this.Jb.set("scale",F);[].concat(this.Jb?[this.Jb]:[],this.lb?[this.lb]:[]).forEach(function(S){S.set("yaw",N);S.set("pitch",
P);S.set("rotationX",Q);S.set("rotationY",R);S.set("rotationZ",K);S.set("distance",M);S.set("hfov",T)})}};a.prototype.V8a=function(B){if(this.W("frameEmpty","state","imageURL","video")){var C="none";!this.Jb||this.lb&&(this.get("frameEmpty")||this.get("state")==e.ca)?this.lb&&(C="image"):C="video";this.set("itemVisible",C)}if(this.W("itemVisible")){this.get("itemVisible")!="video"&&this.qa&&this.qa.Zc(e.ca);C=this.lb?this.lb.get("alpha"):0;var F=this.Jb?this.Jb.get("alpha"):0,G=this.get("itemVisible")==
"image"?1:0,I=this.get("itemVisible")=="video"?1:0,N=this.get("itemVisible")=="video"?1:Math.max(Math.abs(G-C),Math.abs(I-F))*200;this.zC=new y("linear",[new x("imageAlpha",C,G),new x("videoAlpha",F,I)],N)}this.zC&&(this.zC.Re()?this.zC=null:this.zC.Lb(B.xf),this.zC&&(this.lb&&this.lb.set("alpha",this.zC.nb("imageAlpha")),this.Jb&&this.Jb.set("alpha",this.zC.nb("videoAlpha")),this.Na()))};a.prototype.E8a=function(B){this.W("gazeOver","inVR","visible","actualVisible")&&(this.Yua(),this.get("inVR")&&
this.C.get("lookAwayToHide")&&!this.get("gazeOver")&&this.get("actualVisible")&&this.g7a());B.ob&&this.C.get("darkenBackground")&&this.C.get("lookAwayToHide")?(this.W("visible")&&this.get("visible")&&(this.Yd.set("alpha",.8),this.Mx=null),this.W("gazeOver")&&(this.Mx=new y(this.get("gazeOver")?"linear":"quad_in",[new x("alpha",this.Yd.get("alpha"),this.get("gazeOver")?.8:0)],this.get("gazeOver")?300:this.C.get("lookAwayToHideTime")))):(this.Mx=null,this.Yd.set("alpha",B.ob&&this.C.get("darkenBackground")?
.8:0));this.Mx&&(this.Mx.Re()?this.Mx=null:this.Mx.Lb(B.xf),this.Mx&&(this.Yd.set("alpha",this.Mx.nb("alpha")),this.Na()))};a.prototype.g7a=function(){this.Yua();this.Y0=setTimeout(function(){this.Y0=null;this.C.set("visible",!1)}.bind(this),this.C.get("lookAwayToHideTime"))};a.prototype.Yua=function(){this.Y0&&(clearTimeout(this.Y0),this.Y0=null)};a.prototype.Bxa=function(B,C){if(!B)return 1;var F=this.get("popupMaxWidth","100%"),G=v.wp(F),I=B.get("contentWidth"),N=B.get("contentHeight"),P=this.get("popupMaxHeight",
"100%"),Q=v.wp(P);if(this.get("inVR")){var R=B=this.get("rendererWidth")*.5,K=Math.min(C.gj,80);C=u.QI(K,B,R);var M=this.get("sourceHFOV");F=Math.min(Math.tan(C*(G!==void 0?G/100:F/B)*.5*A)/Math.tan(M*.5*A),Math.tan(K*(Q!==void 0?Q/100:P/R)*.5*A)/Math.tan(u.QI(M,I,N)*.5*A))}else B=this.get("rendererWidth"),R=this.get("rendererHeight"),F=I*Math.min((G!==void 0?B*G/100:F)/I,(Q!==void 0?R*Q/100:P)/N),C=this.get("rendererHFOV"),M=this.get("sourceHFOV"),F=Math.tan(C*.5*A)*F/B/Math.tan(M*.5*A);return F};
a.prototype.YQ=function(){this.zG();this.get("imageURL")&&(this.lb=new f,this.lb.set("url",this.get("imageURL")),this.lb.set("contentWidth",this.get("imageWidth")),this.lb.set("contentHeight",this.get("imageHeight")),this.lb.set("alpha",0))};a.prototype.zG=function(){this.lb&&(this.lb.remove(),this.lb=null)};a.prototype.$Q=function(){this.kC();if(this.get("video")){this.Jb=new d;var B=z.Ak(this.get("video"));this.Jb.set("contentWidth",B.get("width"));this.Jb.set("contentHeight",B.get("height"));this.Jb.set("alpha",
0);this.Jb.set("sourceIsVideo",!0);this.qa=new z(this.La.Uq(),this.get("video"));this.Ta=new m(this.La.Uq(),this.C,this.qa);this.Fx()}};a.prototype.kC=function(){this.Jb&&(this.iz(),this.Ta.clear(),this.Ta=null,this.qa.clear(),this.Rh=this.qa=null,this.Jb.remove(),this.Jb=null)};a.prototype.xXa=function(){this.Qu();this.Yd=new c("#000000")};a.prototype.Qu=function(){this.Yd&&(this.Yd.remove(),this.Yd=null)};a.prototype.uH=function(){this.m(h.ud);this.m(h.ia)};a.prototype.xH=function(B,C){var F=0;
C.aw(function(G){var I=0,N;this.qg.Mn(G)?I=100:(N=this.ve.Mn(G))&&(I=N.percent);F+=I}.bind(this));this.m(new w(h.xc,F/C.xd.length))};a.prototype.Fj=function(){this.Na()};a.prototype.Lf=function(){this.Na()};a.prototype.SC=function(){this.C.m(h.Sb)};a.prototype.Fx=function(){this.qa.bind(z.Cg,this.Lf,this,!0);this.qa.bind(h.$e,this.Fj,this,!0);this.qa.bind(h.Sb,this.SC,this,!0)};a.prototype.iz=function(){this.qa.h(z.Cg,this.Lf,this,!0);this.qa.h(h.$e,this.Fj,this,!0);this.qa.h(h.Sb,this.SC,this,!0)};
a.prototype.Zn=function(B){B.Wf==h.Lm?(!B.qm()&&this.get("visible")?(B.Yt(this.C),this.set("over",this.Ys(B)),this.set("gazeOver",this.N7a(B))):this.set("over",!1),this.get("over")&&(B.yD(this.C),B.pw()&&B.CI(this.C),B.nm(this.get("popupDistance"))),this.W("over")&&(this.C.m(this.get("over")?h.tc:h.Eb),B.pw()&&this.C.m(this.get("over")?h.EF:h.Jr))):B.Wf==h.Uf&&!B.qm()&&this.get("visible")&&(B.Yt(this.C),B.nm(this.get("popupDistance")),this.Ys(B)?B.Ieb()||this.C.m(h.la):this.C.set("visible",!1))};
a.prototype.Ys=function(B){return this.fEa(B.Os)};a.prototype.N7a=function(B){B=B.wO();return!!B&&this.fEa([B])};a.prototype.fEa=function(B){if(this.get("visible")){B=(this.get("itemVisible")=="video"?this.Jb:this.lb).oy(B);for(var C=0;C<B.length;C++){var F=B[C];if(t.WA(F.source,F.x,F.y))return!0}}return!1};return a});
define("tdv/player/view/panorama/renderer/object/ComposedObject",["require","tdv/utils","tdv/player/view/panorama/renderer/object/Base"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/panorama/renderer/object/Base");a=l.extend(k,function(){k.call(this);this.bC&&this.bC();this.Zp&&this.Zp()});a.prototype.fc=function(){k.prototype.fc.call(this);this.rq&&this.rq();this.NM&&this.NM()};a.prototype.lc=function(){this.tq&&this.tq();this.PM&&this.PM();k.prototype.lc.call(this)};a.prototype.ya=function(n){this.$f&&
this.$f(n);k.prototype.ya.call(this,n);this.Kq&&this.Kq(n)};return a});
define("tdv/player/view/panorama/renderer/object/pointer/FrameHotspotPointerMixin",["require","tdv/constants/EventName"],function(a){var l=a("tdv/constants/EventName");return{bC:function(){this.set("beamEnabled",!1);this.Ad=!1;this.bD=this.cD=void 0},Kq:function(k){this.cD=k.$a;this.bD=k.pitch},Zn:function(k){if(k.Wf==l.Lm){var n=!k.qm()&&this.Ys(k);if(n){k.yD(this.C);this.C.get("useHandCursor")&&k.CI(this.C);k.nm(this.get("distance"));var g=this.hc(k.sJ());g&&k.c5(g,this.oD(k.sJ()))}this.Ad!=n&&
(this.Ad=n,this.C.m(this.Ad?l.tc:l.Eb),k.pw()&&this.C.m(this.Ad?l.EF:l.Jr))}else k.Wf==l.Uf&&!k.qm()&&this.Ys(k)&&(this.C.AO(l.la,!0).length>1&&k.Yt(this.C),k.nm(this.get("distance")),this.C.m(l.la))},Ys:function(k){return this.get("beamEnabled")&&this.vea().oy(k.Os).length>0?!0:!1},hc:function(k){return!k||this.C.get("displayTooltipInTouchScreens")&&this.La.R.get("displayTooltipInTouchScreens")!==!1?this.C.get("toolTip",""):""},oD:function(k){if(k){k=this.get("yaw")-this.cD;var n=this.get("pitch")-
this.bD;return Math.sqrt(k*k+n*n)}return 0}}});
define("tdv/player/view/panorama/renderer/object/FrameHotspot","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/view/panorama/renderer/object/ComposedObject tdv/player/view/panorama/renderer/object/overlay/FocusedMixin tdv/player/view/panorama/renderer/object/util/EventAggregator tdv/player/view/panorama/renderer/object/util/LevelUtil tdv/player/view/panorama/renderer/object/pointer/FrameHotspotPointerMixin".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/binding/BindingsHandler"),
n=a("tdv/constants/EventName"),g=a("tdv/player/view/panorama/renderer/object/ComposedObject"),h=a("tdv/player/view/panorama/renderer/object/overlay/FocusedMixin"),e=a("tdv/player/view/panorama/renderer/object/util/EventAggregator"),b=a("tdv/player/view/panorama/renderer/object/util/LevelUtil");a=a("tdv/player/view/panorama/renderer/object/pointer/FrameHotspotPointerMixin");l=l.extend(g,a,h,function(c){g.call(this);this.C=c;this.$G=this.Sda=this.Sea=null;this.Pl.push(this.C);this.Og=this.Og.bind(this);
this.Ur(["loadingActive","panoramaPixelsPerDegree"]);this.set("tag","FrameHotspot");this.set("enabled",!0);this.set("inVR",!1);this.set("inScreenshot",!1);this.set("overlaysEnabled",!0);this.set("interactionEnabled",!0);this.set("contentInteractive",!1);this.set("transparent",!1);this.set("centerOverDisplay",!1);this.set("loadingActive",!1);this.set("visible",!1);this.set("loaded",!1);this.set("inView",!1);this.set("frameHidden",!0);this.Fg=this.Yu=this.ve=this.qg=null;this.Iia(this.C)});l.prototype.fc=
function(){this.qg=(new e(n.ia)).io(this.uH.bind(this));this.ve=(new e(n.xc)).$q(this.xH.bind(this));this.GXa();g.prototype.fc.call(this);k.ba(this.C,"url enabled image fadeInDuration fadeOutDuration contentInteractive interactionEnabled transparent".split(" "),this.Og,!0);this.Mda()};l.prototype.lc=function(){this.Nda();this.qg.dispose();this.ve.dispose();k.da(this.C,"url enabled image fadeInDuration fadeOutDuration contentInteractive interactionEnabled transparent".split(" "),this.Og);this.Nva();
this.Pva();g.prototype.lc.call(this)};l.prototype.Og=function(){this.set("url",this.C.get("url"));this.Fg.set("url",this.get("url"));this.set("image",this.C.get("image"));this.lb.set("image",this.get("image"));this.lb.set("level",this.get("image")&&b.fJa(this.C,this.get("panoramaPixelsPerDegree")));this.set("enabled",this.C.get("enabled"));this.set("fadeInDuration",this.C.get("fadeInDuration"));this.set("fadeOutDuration",this.C.get("fadeOutDuration"));this.set("interactionEnabled",this.C.get("interactionEnabled"));
this.set("contentInteractive",this.C.get("contentInteractive"));this.set("transparent",this.C.get("transparent"));this.Na()};l.prototype.ya=function(c){this.set("loaded",!!this.Fg&&this.Fg.get("frameLoaded"));this.set("inVR",c.ob);this.set("inScreenshot",c.nJ);this.set("hotspotsEnabled",c.lJ);g.prototype.ya.call(this,c);this.we(c);this.bka(c)};l.prototype.GXa=function(){this.YQ();this.SXa();this.RXa();var c=[this.lb,this.Yu,this.Fg];this.qg.fg(c);this.ve.fg(c);this.Zh(c)};l.prototype.we=function(){this.set("globalBlendingActiveCopy",
this.get("globalBlendingActive"));if(this.W("globalBlendingActive","globalBlendingActiveCopy","url","inVR","hotspotsEnabled","enabled","interactionEnabled","contentInteractive","composedTranslationX","composedTranslationY","composedTranslationZ")){var c=!(this.get("composedTranslationX")!=0||this.get("composedTranslationY")!=0||this.get("composedTranslationZ")!=0)&&this.get("globalBlendingActive")==0&&this.get("hotspotsEnabled")&&this.get("enabled")&&!this.get("inVR")&&!!this.get("url");this.set("visible",
c);this.set("beamEnabled",c&&this.get("interactionEnabled"));this.Fg.set("contentInteractive",c&&this.get("interactionEnabled")&&this.get("contentInteractive"))}this.set("frameHidden",!this.Fg.get("geometryVisible"));this.W("visible","loaded","frameHidden","transparent","inScreenshot")&&(this.get("visible")||this.set("loaded",!1),this.lb.set("alpha",!this.get("visible")||!this.get("frameHidden")&&this.get("loaded")?0:1),this.lb.set("alpha",1),this.Yu.set("alpha",!this.get("visible")||this.get("frameHidden")||
!this.get("loaded")||this.get("transparent")||this.get("inScreenshot")?0:1),this.Fg.set("alpha",this.get("visible")?1:0),this.Fg.set("transparent",this.get("transparent")),this.set("inView",this.get("visible")&&(this.get("loaded")||this.get("image"))),this.Na());this.W("inView")&&this.C.m(this.get("inView")?n.od:n.jd)};l.prototype.YQ=function(){this.zG();this.lb=new this.$G;this.lb.set("image",this.get("image"));this.lb.set("level",this.get("image")&&b.fJa(this.C,this.get("panoramaPixelsPerDegree")));
this.lb.set("visible",!0);this.lb.set("alpha",0);this.set("imagePlane",this.lb)};l.prototype.zG=function(){this.lb&&(this.lb.remove(),this.lb=null,this.set("imagePlane",null))};l.prototype.RXa=function(){this.Nva();this.Fg=new this.Sda;this.Fg.bind(n.ia,this.ywa,this,!0);this.Fg.set("url",this.get("url"));this.Fg.set("visible",!0);this.Fg.set("alpha",1);this.set("framePlane",this.Fg)};l.prototype.Nva=function(){this.Fg&&(this.Fg.h(n.ia,this.ywa,this,!0),this.Fg.remove(),this.Fg=null,this.set("framePlane",
null))};l.prototype.SXa=function(){this.Pva();this.Yu=new this.Sea;this.Yu.set("visible",!0);this.Yu.set("alpha",1);this.set("holePlane",this.Yu)};l.prototype.Pva=function(){this.Yu&&(this.Yu.remove(),this.Yu=null,this.set("holePlane",null))};l.prototype.vea=function(){return this.Yu};l.prototype.ywa=function(){this.Na()};l.prototype.uH=function(){this.m(n.ud);this.m(n.ia)};l.prototype.xH=function(c,d){var f=0;d.aw(function(m){(m=d.Mn(m))&&(f+=m.percent)});this.m(new ProgressEvent(n.xc,f/d.xd.length))};
return l});
define("tdv/player/view/panorama/renderer/object/ComposedCSSObject",["require","tdv/utils","tdv/player/view/panorama/renderer/object/Base"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/panorama/renderer/object/Base");a=l.extend(k,function(){k.call(this);this.set("tag","ComposedCSSObject");this.set("transparent",!1);this.set("cssScene",null);this.set("cssSceneOver",null);this.set("cssObject",this.yca());this.Vx&&this.Vx();this.wG&&this.wG();this.bC&&this.bC();this.Zp&&this.Zp()});a.prototype.yca=
function(){var n=new THREE.CSS3DObject;n.matrixAutoUpdate=!1;return n};a.prototype.fc=function(){k.prototype.fc.call(this);this.rq&&this.rq();this.mS&&this.mS();this.NM&&this.NM()};a.prototype.lc=function(){this.jM&&this.jM();this.PM&&this.PM();this.tq&&this.tq();var n=this.get("cssObject");n&&n.parent&&n.parent.remove(n);this.set("cssScene",null);k.prototype.lc.call(this)};a.prototype.ya=function(n){this.$f&&this.$f(n);k.prototype.ya.call(this,n);this.set("cssScene",n.LV);this.set("cssSceneOver",
n.MV);if(this.W("transparent")){var g=this.get("cssObject");g&&g.parent&&g.parent.remove(g)}this.W("cssScene","cssSceneOver","transparent")&&(g=this.get("transparent")?n.MV:n.LV)&&g.add(this.get("cssObject"));this.Bn();this.Qj&&this.Qj(n);this.Fz&&this.Fz(n);this.uI()};a.prototype.Bn=function(){this.W("composedAlpha","meshGroup")&&this.MB()};a.prototype.MB=function(){this.get("cssObject").element.style.display=this.get("composedAlpha")>0?"block":"none"};a.prototype.uI=function(){this.W("index")&&
(this.get("cssObject").containerElement.style.zIndex=this.get("index"))};return a});
define("tdv/player/view/panorama/renderer/object/geometry/CSSQuadGeometryMixin",["require","tdv/player/view/panorama/renderer/3d/util/GeometryUtil","tdv/player/view/util/geo/Vector"],function(a){var l=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),k=a("tdv/player/view/util/geo/Vector"),n=new THREE.Matrix4,g=Math.PI/180;return{Vx:function(){this.set("vertices",void 0);this.ti=new THREE.Matrix4;this.ge=new THREE.Matrix4;this.sq=new THREE.Matrix4;this.Eo=new THREE.Matrix4;this.us=new THREE.Matrix4},
yca:function(){var h=new THREE.CSS3DQuad;h.matrixAutoUpdate=!1;return h},Fz:function(h){var e=!1;if(this.W("vertices","contentWidth","contentHeight")){var b=this.get("vertices");e=k.eA(b[0].get("yaw")*g,b[0].get("pitch")*g).normalize();var c=k.eA(b[1].get("yaw")*g,b[1].get("pitch")*g).normalize(),d=k.eA(b[2].get("yaw")*g,b[2].get("pitch")*g).normalize();b=k.eA(b[3].get("yaw")*g,b[3].get("pitch")*g).normalize();var f=this.get("cssObject");f.vertices[0].set(e.x,e.y,-e.z);f.vertices[1].set(c.x,c.y,-c.z);
f.vertices[2].set(d.x,d.y,-d.z);f.vertices[3].set(b.x,b.y,-b.z);f.contentWidth=this.get("contentWidth");f.contentHeight=this.get("contentHeight");e=!0}c=!1;this.W("composedTranslationX","composedTranslationY","composedTranslationZ")&&(this.ti.makeTranslation(-this.get("composedTranslationX")*.5*l.ph,this.get("composedTranslationY")*.5*l.ph,this.get("composedTranslationZ")*.5*l.ph),c=!0);this.W("composedDeltaYaw","composedDeltaPitch","composedDeltaRoll")&&(this.ge.makeRotationY(-h.$a*g),this.ge.multiply(n.makeRotationX(-this.get("composedDeltaPitch")*
g)),this.ge.multiply(n.makeRotationY(this.get("composedDeltaYaw")*g)),this.ge.multiply(n.makeRotationY(h.$a*g)),c=!0);if(c||this.W("meshGroup"))this.us.copy(this.ti),this.us.multiply(this.ge),this.get("cssObject").matrix.copy(this.us),this.get("cssObject").matrixWorldNeedsUpdate=!0;this.set("cameraYaw",h.$a);this.set("cameraPitch",h.pitch);this.set("cameraRoll",h.kh);this.set("cameraHfov",h.Ud);this.set("cameraWidth",h.width);this.set("cameraHeight",h.height);h.camera&&(c||e||this.W("cameraYaw","cameraPitch",
"cameraRoll","cameraHfov","cameraWidth","cameraHeight"))&&(this.get("cssObject").projectVertices(h.camera),this.set("geometryVisible",this.get("cssObject").isVisible),this.W("geometryVisible")&&this.pia())}}});
define("tdv/player/view/panorama/renderer/object/geometry/QuadGeometryMixin","require tdv/constants/Priority tdv/player/view/panorama/renderer/3d/util/GeometryUtil tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/TextureLoader tdv/player/view/util/geo/Vector".split(" "),function(a){var l=a("tdv/constants/Priority"),k=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),n=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),g=a("tdv/player/view/panorama/renderer/TextureLoader"),
h=a("tdv/player/view/util/geo/Vector"),e=new THREE.Matrix4,b=Math.PI/180;return{Vx:function(){this.set("distance",void 0);this.set("vertices",void 0);this.Jh=null;this.ti=new THREE.Matrix4;this.ge=new THREE.Matrix4;this.tn=new THREE.Matrix4;this.Bj=new THREE.Matrix4},Fz:function(c){this.D9a(c);this.et(c)},NL:function(){var c=this.get("meshGroup");return c?n.um(c)[0]:null},Yp:function(){this.Jh||(this.Jh=this.aC());return[0].map(function(c){var d=this.WQ();c=n.create(this.Jh[c],d);g.QA(c,g.Hr);g.RA(c,
g.su);g.UJ(c,l.kQ);g.jY(c,1);return c}.bind(this))},D9a:function(){if(this.W("vertices")){var c=this.get("meshGroup");if(c)return this.Jh&&this.Jh.forEach(function(d){k.dispose(d)}),this.Jh=this.aC(),n.um(c).map(function(d,f){n.Cpa(d,this.Jh[f])}.bind(this))}},aC:function(){function c(w){return w==0||isNaN(w)||!isFinite(w)}var d=this.get("vertices")||[];if(d.length!=4)return[k.MHa(-1,1,1,1,1,1,1,-1,1,-1,-1,1)];var f=h.eA(d[0].get("yaw")*b,d[0].get("pitch")*b).normalize(),m=h.eA(d[1].get("yaw")*b,
d[1].get("pitch")*b).normalize(),p=h.eA(d[2].get("yaw")*b,d[2].get("pitch")*b).normalize();d=h.eA(d[3].get("yaw")*b,d[3].get("pitch")*b).normalize();var q=f.clone().E5(p),r=d.clone().E5(m),t=q.clone().E5(r).normalize();r=(f.y*2*t.x/f.x-2*t.y)/(-p.y+f.y*p.x/f.x);c(r)&&(r=(f.z*2*t.x/f.x-2*t.z)/(-p.z+f.z*p.x/f.x));c(r)&&(r=(f.z*2*t.y/f.y-2*t.z)/(-p.z+f.z*p.y/f.y));var u=(2*t.x-p.x*r)/f.x;c(u)&&(u=(2*t.y-p.y*r)/f.y);c(u)&&(u=(2*t.z-p.z*r)/f.z);q=(m.y*2*t.x/m.x-2*t.y)/(-d.y+m.y*d.x/m.x);c(q)&&(q=(m.z*
2*t.x/m.x-2*t.z)/(-d.z+m.z*d.x/m.x));c(q)&&(q=(m.z*2*t.y/m.y-2*t.z)/(-d.z+m.z*d.y/m.y));var v=(2*t.x-d.x*q)/m.x;c(v)&&(v=(2*t.y-d.y*q)/m.y);c(v)&&(v=(2*t.z-d.z*q)/m.z);f=f.$X(u);m=m.$X(v);p=p.$X(r);d=d.$X(q);return[k.MHa(f.x,f.y,-f.z,m.x,m.y,-m.z,p.x,p.y,-p.z,d.x,d.y,-d.z)]},et:function(c){var d=!1;this.W("composedTranslationX","composedTranslationY","composedTranslationZ")&&(this.ti.makeTranslation(-this.get("composedTranslationX")*.5*k.ph,this.get("composedTranslationY")*.5*k.ph,this.get("composedTranslationZ")*
.5*k.ph),d=!0);this.W("composedDeltaYaw","composedDeltaPitch","composedDeltaRoll")&&(this.ge.makeRotationY(-c.$a*b),this.ge.multiply(e.makeRotationX(-this.get("composedDeltaPitch")*b)),this.ge.multiply(e.makeRotationY(this.get("composedDeltaYaw")*b)),this.ge.multiply(e.makeRotationY(c.$a*b)),d=!0);this.W("distance","composedTranslationX","composedTranslationY","composedTranslationZ")&&(c=this.Ia.get("composedTranslationX")==0&&this.Ia.get("composedTranslationY")==0&&this.Ia.get("composedTranslationZ")==
0&&this.get("distance")!==void 0?k.fw(this.get("distance")):k.xt(),this.tn.makeScale(c,c,c),d=!0);if(d||this.W("meshGroup"))this.Bj.copy(this.ti),this.Bj.multiply(this.ge),this.Bj.multiply(this.tn),c=n.um(this.get("meshGroup")),n.mt(c[0],this.Bj)}}});
define("tdv/player/view/panorama/renderer/object/material/IFrameMaterialMixin",["require","tdv/constants/EventName"],function(a){var l=a("tdv/constants/EventName");return{wG:function(){this.set("visible",!1);this.set("inView",!1);this.set("url",!1);this.set("contentWidth",100);this.set("contentHeight",100);this.set("contentInteractive",!1);this.set("frameLoaded",!0);this.Pc=this.Ld=null;this.o0=void 0;this.U4=this.U4.bind(this);this.V4=this.V4.bind(this);this.W4=this.W4.bind(this);this.ZG=this.ZG.bind(this);
this.Yea=this.Yea.bind(this)},Qj:function(){this.W("cssObject")&&(this.TXa(),this.get("cssObject").element.appendChild(this.Ld));this.W("url")&&this.e6a(this.get("url"));this.W("contentWidth","contentHeight")&&(this.Ld.style.width=this.get("contentWidth")+2+"px",this.Ld.style.height=this.get("contentHeight")+2+"px");this.W("contentInteractive")&&(this.Ld.style.pointerEvents=this.get("contentInteractive")?"auto":"none")},Bn:function(){this.W("composedAlpha")&&(this.get("composedAlpha")>0?this.Pc&&
!this.Pc.parentNode&&(this.VEa(),this.Ld.appendChild(this.Pc)):this.Pc&&this.Pc.parentNode&&this.Ld.removeChild(this.Pc))},mS:function(){this.m(l.ud);this.get("frameLoaded")&&this.m(l.ia)},jM:function(){this.cXa()},V4:function(k){k.preventDefault();k.stopImmediatePropagation()},U4:function(){this.La.Uq().BE(null)},W4:function(k){k.preventDefault();k.stopImmediatePropagation()},ZG:function(){this.set("frameLoaded",!0);this.m(l.ia)},Yea:function(){this.p0=null;this.ZG()},TXa:function(){this.Pc||(this.Ld=
document.createElement("div"),this.Ld.style.position="absolute",this.Ld.style.left=this.Ld.style.top="-1px",this.get("cssObject").isCSS3DObject&&(this.Ld.style.transform="translate(-50%, -50%)"),this.Ld.style.overflow="hidden",this.Ld.style["-webkit-overflow-scrolling"]="touch",this.Ld.addEventListener("mouseenter",this.U4,!0),this.Ld.addEventListener("mousemove",this.V4,!0),this.Ld.addEventListener("mousewheel",this.W4,!0),this.Pc=document.createElement("iframe"),this.Pc.setAttribute("allow","fullscreen; accelerometer; geolocation; gyroscope; magnetometer; vr; autoplay; camera; microphone; display-capture; xr-spatial-tracking"),
this.Pc.setAttribute("frameborder","0"),this.Pc.setAttribute("scrolling","auto"),this.Pc.style.width="100%",this.Pc.style.height="100%",this.Pc.addEventListener("load",this.ZG,!0),this.get("composedAlpha")>0&&this.Ld.appendChild(this.Pc))},cXa:function(){this.Pc&&(this.Pc.src="",this.iia(),this.$B(),this.Pc.parentNode&&this.Pc.parentNode.removeChild(this.Pc),this.Pc=null);this.Ld&&(this.Ld.parentNode&&this.Ld.parentNode.removeChild(this.Ld),this.Ld.removeEventListener("mouseenter",this.U4,!0),this.Ld.removeEventListener("mousemove",
this.V4,!0),this.Ld.removeEventListener("mousewheel",this.W4,!0),this.Ld=null)},e6a:function(k){this.o0!==k&&(this.o0=k,this.set("frameLoaded",!1),this.VEa())},VEa:function(){this.o0?(this.j6a(),this.$Ua(),this.Pc.src=this.o0):(this.$B(),this.iia(),this.Pc.src="",this.ZG())},j6a:function(){this.$B();this.p0=setTimeout(this.Yea,3E3)},$B:function(){this.p0&&(clearTimeout(this.p0),this.p0=null)},$Ua:function(){this.iia();this.Pc.addEventListener("load",this.ZG,!0)},iia:function(){this.Pc.removeEventListener("load",
this.ZG,!0)}}});
define("tdv/player/view/panorama/renderer/object/material/PassthroughMaterialMixin",["require","tdv/player/view/panorama/renderer/3d/util/MeshUtil","tdv/constants/EventName"],function(a){var l=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),k=a("tdv/constants/EventName");return{wG:function(){this.get("materialConfig").params.blending=THREE.NoBlending},mS:function(){this.m(k.ud);this.m(k.ia)},Bn:function(){this.W("meshGroup","composedAlpha")&&l.Bf(this.get("meshGroup"),this.get("composedAlpha")>0?
.001:0)}}});
define("tdv/player/view/panorama/renderer/object/position/QuadFrameHotspotPositionMixin",["require","tdv/binding/BindingsHandler","tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController"],function(a){var l=a("tdv/binding/BindingsHandler"),k=a("tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController");return{Zp:function(){this.set("playbackPositions",null);this.se=this.se.bind(this);this.Hb=new k},rq:function(){l.ba(this.C,["playbackPositions","width","height"],
this.se,!0)},tq:function(){l.da(this.C,["playbackPositions","width","height"],this.se)},se:function(){this.set("playbackPositions",this.C.get("playbackPositions"));this.set("contentWidth",this.C.get("width"));this.set("contentHeight",this.C.get("height"))},$f:function(){this.W("playbackPositions","currentTime")&&(this.Hb.LE(this.get("playbackPositions")),this.Hb.JE(this.get("currentTime")),this.set("vertices",this.Hb.Sma()));this.W("framePlane","holePlane","imagePlane","vertices")&&this.Cb().forEach(function(n){n.set("vertices",
this.get("vertices"));n.set("contentWidth",this.get("contentWidth"));n.set("contentHeight",this.get("contentHeight"))}.bind(this))}}});
define("tdv/player/view/panorama/renderer/object/QuadFrameHotspot","require tdv/utils tdv/player/view/panorama/renderer/object/FrameHotspot tdv/player/view/panorama/renderer/object/ComposedCSSObject tdv/player/view/panorama/renderer/object/ComposedWebGLObject tdv/player/view/panorama/renderer/object/geometry/CSSQuadGeometryMixin tdv/player/view/panorama/renderer/object/geometry/QuadGeometryMixin tdv/player/view/panorama/renderer/object/material/IFrameMaterialMixin tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin tdv/player/view/panorama/renderer/object/material/PassthroughMaterialMixin tdv/player/view/panorama/renderer/object/position/QuadFrameHotspotPositionMixin".split(" "),function(a){var l=
a("tdv/utils"),k=a("tdv/player/view/panorama/renderer/object/FrameHotspot"),n=a("tdv/player/view/panorama/renderer/object/ComposedCSSObject"),g=a("tdv/player/view/panorama/renderer/object/ComposedWebGLObject"),h=a("tdv/player/view/panorama/renderer/object/geometry/CSSQuadGeometryMixin"),e=a("tdv/player/view/panorama/renderer/object/geometry/QuadGeometryMixin"),b=a("tdv/player/view/panorama/renderer/object/material/IFrameMaterialMixin"),c=a("tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin"),
d=a("tdv/player/view/panorama/renderer/object/material/PassthroughMaterialMixin");a=a("tdv/player/view/panorama/renderer/object/position/QuadFrameHotspotPositionMixin");var f=l.extend(g,e,c,function(){g.call(this);this.set("tag","QuadFrameHotspotImage")}),m=l.extend(n,h,b,function(){n.call(this);this.set("tag","QuadFrameHotspotFrame")}),p=l.extend(g,e,d,function(){g.call(this);this.set("tag","QuadFrameHotspotHole")});return l.extend(k,a,function(q){k.call(this,q);this.$G=f;this.Sda=m;this.Sea=p})});
define("tdv/player/view/panorama/renderer/object/position/QuadHotspotImagePositionMixin",["require","tdv/binding/BindingsHandler","tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController"],function(a){var l=a("tdv/binding/BindingsHandler"),k=a("tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController");return{Zp:function(){this.set("playbackPositions",null);this.set("distance",void 0);this.se=this.se.bind(this);this.Hb=new k},rq:function(){l.ba(this.C,["vertices",
"distance","playbackPositions"],this.se,!0)},tq:function(){l.da(this.C,["vertices","distance","playbackPositions"],this.se)},se:function(){this.set("distance",this.C.get("distance"));this.set("vertices",this.C.get("vertices"));this.set("playbackPositions",this.C.get("playbackPositions"))},$f:function(){this.W("playbackPositions","currentTime")&&(this.Hb.LE(this.get("playbackPositions")),this.Hb.JE(this.get("currentTime")),this.set("vertices",this.Hb.Sma()),this.set("alpha",this.Hb.ew()))}}});
define("tdv/player/view/panorama/renderer/object/QuadHotspotImage","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/object/ComposedWebGLObject tdv/player/view/panorama/renderer/object/geometry/QuadGeometryMixin tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin tdv/player/view/panorama/renderer/object/pointer/HotspotPointerMixin tdv/player/view/panorama/renderer/object/position/QuadHotspotImagePositionMixin tdv/player/view/panorama/renderer/object/util/LevelUtil".split(" "),
function(a){var l=a("tdv/utils"),k=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),h=a("tdv/player/view/panorama/renderer/object/ComposedWebGLObject"),e=a("tdv/player/view/panorama/renderer/object/geometry/QuadGeometryMixin"),b=a("tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin"),c=a("tdv/player/view/panorama/renderer/object/pointer/HotspotPointerMixin"),d=a("tdv/player/view/panorama/renderer/object/position/QuadHotspotImagePositionMixin"),
f=a("tdv/player/view/panorama/renderer/object/util/LevelUtil"),m=0;a=l.extend(h,e,d,b,c,function(p){h.call(this);this.set("tag","QuadHotspotImage");this.set("id","quad_hs_image_"+m++);this.set("side",THREE.DoubleSide);this.C=p;this.Pl.push(this.C);this.Pg=this.Pg.bind(this)});a.prototype.fc=function(){h.prototype.fc.call(this);k.ba(this.C,["image.levels"],this.Pg,!0)};a.prototype.lc=function(){k.da(this.C,["image.levels"],this.Pg);h.prototype.lc.call(this)};a.prototype.Pg=function(){this.set("image",
this.C.get("image"));this.set("level",f.jdb(this.C))};a.prototype.ya=function(p){this.pI();h.prototype.ya.call(this,p);this.W("inView")&&this.C.m(this.get("inView")?n.od:n.jd)};a.prototype.pI=function(){if(this.W("meshGroup","panoramaId","id")){var p=this.get("meshGroup");p&&p.children.forEach(function(q){g.setAttribute(q,g.aF,this.get("panoramaId"));g.setAttribute(q,g.c$,this.get("id"))}.bind(this))}};return a});
define("tdv/player/view/panorama/renderer/object/control/VideoAutoplayController",["require","tdv/constants/EventName","tdv/constants/PlaybackState"],function(a){function l(h,e){this.Ee=h;this.Td=e;this.Kd=!1;this.q2=!0;this.Kba=this.mha=!1;this.mba();this.xga()}var k=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState");l.prototype.clear=function(){this.xAa();this.fia()};l.prototype.gg=function(h){this.Kd!=h&&(this.Kd=h,this.Iv())};l.prototype.zib=function(h){this.q2!=h&&((this.q2=h)&&
this.xAa(),this.Iv())};l.prototype.Iv=function(){if(!this.Kd||this.q2)this.Td.set("state",n.ca);else if(this.Td.get("autoplay")||this.Kba)this.Kba=!1,this.Td.set("state",n.PLAYING)};l.prototype.xga=function(){if(!this.mha){var h=this.Td.get("video").get("autoplayTime");h!==void 0&&this.Td.get("video").get("autoplayTimeLimit")<(new Date).getTime()&&(h=void 0);this.Td.set("currentTime",h);this.Kba=h!==void 0}};l.prototype.xAa=function(){this.mha||(this.mha=!0,this.Td.get("state")==n.PLAYING?(this.Td.get("video").set("autoplayTimeLimit",
(new Date).getTime()+g),this.Td.get("video").set("autoplayTime",this.Td.get("currentTime",0))):this.Td.get("video").set("autoplayTime",void 0))};l.prototype.mba=function(){this.Td.get("video").bind(k.N("autoplayTime"),this.xga,this,!0)};l.prototype.fia=function(){this.Td.get("video").h(k.N("autoplayTime"),this.xga,this,!0)};var g=1E3;return l});
define("tdv/player/view/panorama/renderer/object/pointer/VideoHotspotPointerMixin",["require","tdv/constants/EventName","tdv/player/view/util/ColorPicker"],function(a){var l=a("tdv/constants/EventName"),k=a("tdv/player/view/util/ColorPicker");return{bC:function(){this.set("beamEnabled",!1);this.Ad=!1;this.bD=this.cD=void 0},Kq:function(n){this.cD=n.$a;this.bD=n.pitch},Zn:function(n){if(n.Wf==l.Lm){var g=!n.qm()&&this.Ys(n)&&!this.get("blendingActive");if(g){n.yD(this.C);this.C.get("useHandCursor")&&
n.CI(this.C);n.nm(this.get("distance"));var h=this.hc(n.sJ());h&&n.c5(h,this.oD(n.sJ()))}this.Ad!=g&&(this.Ad=g,this.C.m(this.Ad?l.tc:l.Eb),n.pw()&&this.C.m(this.Ad?l.EF:l.Jr))}else n.Wf==l.Uf&&!n.qm()&&this.Ys(n)&&(this.C.AO(l.la,!0).length>1&&n.Yt(this.C),n.nm(this.get("distance")),this.C.m(l.la))},Ys:function(n){if(this.get("beamEnabled")){n=this.vea().oy(n.Os);for(var g=0;g<n.length;g++){var h=n[g];if(k.WA(h.source,h.x,h.y))return!0}}return!1},hc:function(n){return!n||this.C.get("displayTooltipInTouchScreens")&&
this.La.R.get("displayTooltipInTouchScreens")!==!1?this.C.get("toolTip",""):""},oD:function(n){if(n){n=this.get("yaw")-this.cD;var g=this.get("pitch")-this.bD;return Math.sqrt(n*n+g*g)}return 0}}});
define("tdv/player/view/panorama/renderer/object/VideoHotspot","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/PlaybackState tdv/view/av/VideoPlayer tdv/player/view/panorama/renderer/object/ComposedObject tdv/player/view/panorama/renderer/object/control/VideoAutoplayController tdv/player/view/panorama/renderer/object/overlay/FocusedMixin tdv/player/view/panorama/renderer/object/util/EventAggregator tdv/player/view/panorama/renderer/object/util/LevelUtil tdv/player/view/panorama/renderer/object/pointer/VideoHotspotPointerMixin tdv/view/events/ProgressEvent tdv/view/util/Ease tdv/view/util/EaseDimension tdv/player/view/util/XR tdv/player/view/util/xr/pointer/PointerState".split(" "),function(a){var l=
a("tdv/utils"),k=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/constants/PlaybackState"),h=a("tdv/view/av/VideoPlayer"),e=a("tdv/player/view/panorama/renderer/object/ComposedObject"),b=a("tdv/player/view/panorama/renderer/object/control/VideoAutoplayController"),c=a("tdv/player/view/panorama/renderer/object/overlay/FocusedMixin"),d=a("tdv/player/view/panorama/renderer/object/util/EventAggregator"),f=a("tdv/player/view/panorama/renderer/object/util/LevelUtil"),m=a("tdv/player/view/panorama/renderer/object/pointer/VideoHotspotPointerMixin"),
p=a("tdv/view/events/ProgressEvent"),q=a("tdv/view/util/Ease"),r=a("tdv/view/util/EaseDimension"),t=a("tdv/player/view/util/XR"),u=a("tdv/player/view/util/xr/pointer/PointerState");a=l.extend(e,m,c,function(v){e.call(this);this.C=v;this.Qka=this.$G=null;this.Pl.push(this.C);this.Og=this.Og.bind(this);this.Ur(["loadingActive","currentTime","panoramaPixelsPerDegree"]);this.set("tag","VideoHotspot");this.set("enabled",!0);this.set("inVR",!1);this.set("overlaysEnabled",!0);this.set("enabledInVR",!0);
this.set("enabledInVRWithGazePointer",!0);this.set("enabledInStandard",!0);this.set("interactionEnabled",!0);this.set("centerOverDisplay",!1);this.set("loadingActive",!1);this.set("frameEmpty",!0);this.set("state",g.ca);this.set("itemVisible","none");this.set("blending",0);this.set("chromaColor",void 0);this.set("chromaThreshold",0);this.set("chromaSmoothing",0);this.Jb=this.lb=this.ve=this.qg=null;this.Rka=!1;this.Su=[];this.Iia(this.C)});a.prototype.fc=function(){this.qg=(new d(n.ia)).io(this.uH.bind(this));
this.ve=(new d(n.xc)).$q(this.xH.bind(this));this.Qm=new b(this.La.Uq(),this.C);e.prototype.fc.call(this);k.ba(this.C,"blending chromaColor chromaThreshold chromaSmoothing distance scaleMode image.levels video.levels enabled enabledInStandard enabledInVR enabledInVRWithGazePointer fadeInDuration fadeOutDuration interactionEnabled state videoVisibleOnStop".split(" "),this.Og,!0);this.Mda()};a.prototype.lc=function(){this.Nda();this.Qm.clear();this.qg.dispose();this.ve.dispose();k.da(this.C,"blending chromaColor chromaThreshold chromaSmoothing distance scaleMode image.levels video.levels enabled enabledInStandard enabledInVR enabledInVRWithGazePointer fadeInDuration fadeOutDuration interactionEnabled state videoVisibleOnStop".split(" "),
this.Og);this.zG();this.kC();e.prototype.lc.call(this)};a.prototype.Og=function(){this.set("image",this.C.get("image"));this.set("imageLevel",f.ydb(this.C,this.get("panoramaPixelsPerDegree")));this.set("video",this.C.get("video"));this.set("videoLevel",h.Ak(this.get("video")));this.set("enabled",this.C.get("enabled"));this.set("enabledInStandard",this.C.get("enabledInStandard"));this.set("enabledInVR",this.C.get("enabledInVR"));this.set("enabledInVRWithGazePointer",this.C.get("enabledInVRWithGazePointer",
this.C.get("enabledInVR")));this.set("fadeInDuration",this.C.get("fadeInDuration"));this.set("fadeOutDuration",this.C.get("fadeOutDuration"));this.set("interactionEnabled",this.C.get("interactionEnabled"));this.set("state",this.C.get("state"));this.set("videoVisibleOnStop",this.C.get("videoVisibleOnStop"));this.set("blending",this.C.get("blending"));this.set("chromaColor",this.C.get("chromaColor"));this.set("chromaThreshold",this.C.get("chromaThreshold"));this.set("chromaSmoothing",this.C.get("chromaSmoothing"))};
a.prototype.ya=function(v){this.set("inVR",v.ob);this.set("hotspotsEnabled",v.lJ);this.set("inVRWithGazePointer",v.ob&&t.nd.length===1&&t.nd[0].type===u.HB);this.dt();this.sD();e.prototype.ya.call(this,v);this.Iv();this.cV(v);this.we(v);this.bka(v)};a.prototype.dt=function(){if(this.W("video","videoLevel","image","imageLevel")){var v=[];this.W("image","imageLevel")&&(this.YQ(),this.lb&&v.push(this.lb));this.W("video","videoLevel")&&(this.$Q(),this.Jb&&v.push(this.Jb));this.Zh(v);this.qg.fg(v);this.ve.fg(v)}};
a.prototype.sD=function(){this.W("video","videoLevel","image","imageLevel","blending","chromaColor","chromaThreshold","chromaSmoothing")&&this.Cb().forEach(function(v){v.set("blending",this.get("blending"));v.set("chromaColor",this.get("chromaColor"));v.set("chromaThreshold",this.get("chromaThreshold"));v.set("chromaSmoothing",this.get("chromaSmoothing"))}.bind(this))};a.prototype.Iv=function(){this.W("video","composedAlpha","enabledInVR","enabledInVRWithGazePointer","enabledInStandard","enabled",
"inVR")&&this.Qm.gg(this.get("composedAlpha")>0&&this.get("hotspotsEnabled")&&this.get("enabled")&&(!this.get("inVR")||this.get("enabledInVR"))&&(!this.get("inVRWithGazePointer")||this.get("enabledInVRWithGazePointer"))&&(this.get("inVR")||this.get("enabledInStandard")));this.W("blendingActive")&&this.Qm.zib(this.get("blendingActive"))};a.prototype.cV=function(){this.set("frameEmpty",!this.Jb||!this.Jb.get("hasStableContent"))};a.prototype.we=function(v){var w=this.get("itemVisible");if(this.W("frameEmpty",
"state","image","video","inVR","hotspotsEnabled","enabledInVR","enabledInVRWithGazePointer","enabledInStandard","enabled","interactionEnabled")){var y="none";!this.get("hotspotsEnabled")||!this.get("enabled")||this.get("inVR")&&!this.get("enabledInVR")||this.get("inVRWithGazePointer")&&!this.get("enabledInVRWithGazePointer")||!this.get("inVR")&&!this.get("enabledInStandard")||(this.Jb&&(!this.lb||!this.get("frameEmpty")&&(this.get("state")!=g.ca||this.Rka&&this.get("videoVisibleOnStop")))?y="video":
this.lb&&(y="image"),this.get("state")!=g.ca&&(this.Rka=!0));this.set("itemVisible",y);this.set("beamEnabled",y!="none"&&this.get("interactionEnabled"))}if(this.W("itemVisible")){y=this.get("itemVisible")!="none";var x=w!="none";if(y&&x&&!this.get("chromaColor")&&this.Su.length==0)this.lb&&this.lb.set("alpha",this.get("itemVisible")=="image"?1:0),this.Jb&&this.Jb.set("alpha",this.get("itemVisible")=="video"?1:0);else{w=y==x?50:y?this.get("fadeInDuration"):this.get("fadeOutDuration");y!=x&&this.C.m(y?
n.od:n.jd);x=this.lb?this.lb.get("alpha"):0;var z=this.Jb?this.Jb.get("alpha"):0;y=[{video:z,image:x}];this.get("itemVisible")=="video"?(y.push({video:1,image:x,time:w*(1-z)}),y.push({video:1,image:0,time:50*(x-0)})):this.get("itemVisible")=="image"?(y.push({video:z,image:1,time:w*(1-x)}),y.push({video:0,image:1,time:50*(z-0)})):y.push({video:0,image:0,time:Math.max(z,x,1/w)*w});this.Su=[];for(w=1;w<y.length;w++)y[w].time>0&&this.Su.push(new q("linear",[new r("imageAlpha",y[w-1].image,y[w].image),
new r("videoAlpha",y[w-1].video,y[w].video)],y[w].time))}}this.Su.length>0&&(this.Su[0].Re()?this.Su.shift():this.Su[0].Lb(v.xf),this.Su.length>0&&(this.lb&&this.lb.set("alpha",this.Su[0].nb("imageAlpha")),this.Jb&&this.Jb.set("alpha",this.Su[0].nb("videoAlpha")),this.Na()))};a.prototype.YQ=function(){this.zG();this.get("image")&&this.get("imageLevel")&&(this.lb=new this.$G,this.lb.set("image",this.get("image")),this.lb.set("level",this.get("imageLevel")),this.lb.set("isVideoTexture",!0),this.lb.set("visible",
!0),this.lb.set("alpha",0),this.lb.set("side",THREE.DoubleSide))};a.prototype.zG=function(){this.lb&&(this.lb.remove(),this.lb=null)};a.prototype.$Q=function(){this.kC();this.get("video")&&this.get("videoLevel")&&(this.Jb=new this.Qka,this.Jb.set("scriptObject",this.C),this.Jb.set("video",this.get("video")),this.Jb.set("level",this.get("videoLevel")),this.Jb.set("visible",!0),this.Jb.set("alpha",0),this.Jb.set("side",THREE.DoubleSide))};a.prototype.kC=function(){this.Jb&&(this.Jb.remove(),this.Jb=
null)};a.prototype.uH=function(){this.m(n.ud);this.m(n.ia)};a.prototype.xH=function(v,w){var y=0;w.aw(function(x){(x=w.Mn(x))&&(y+=x.percent)});this.m(new p(n.xc,y/w.xd.length))};a.prototype.vea=function(){return this.get("itemVisible")=="video"?this.Jb:this.lb};return a});
define("tdv/player/view/panorama/renderer/object/material/VideoResourceMaterialMixin","require tdv/constants/EventName tdv/constants/PlaybackState tdv/player/view/panorama/renderer/3d/util/MaterialUtil tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/object/control/CueController tdv/player/view/panorama/renderer/object/control/VideoPlaybackController tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource tdv/view/av/SubtitleController tdv/view/av/VideoPlayer".split(" "),function(a){var l=
a("tdv/constants/EventName"),k=a("tdv/constants/PlaybackState"),n=a("tdv/player/view/panorama/renderer/3d/util/MaterialUtil"),g=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),h=a("tdv/player/view/panorama/renderer/object/control/CueController"),e=a("tdv/player/view/panorama/renderer/object/control/VideoPlaybackController"),b=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource"),c=a("tdv/view/av/SubtitleController"),d=a("tdv/view/av/VideoPlayer");return{wG:function(){this.set("visible",
!1);this.set("inView",!1);this.set("frameEmpty",!0);this.set("hasStableContent",!1);this.set("blending",0);this.set("chromaColor",void 0);this.set("chromaThreshold",0);this.set("chromaSmoothing",0);this.set("scriptObject",null);this.set("video",null);this.set("level",null);this.set("loop",!1);this.set("side",void 0);this.rb=this.Jb=null;this.Rka=!1;this.uN=this.Rh=this.wn=this.Ta=this.bs=this.qa=null},jM:function(){this.kC()},Qj:function(f){this.E9a();this.sD();this.cV(f)},E9a:function(){this.W("scriptObject",
"video","level")&&(this.kC(),this.Jb=this.get("video"),this.rb=this.get("level"),this.C=this.get("scriptObject"),this.$Q())},sD:function(){if(this.W("video","blending","chromaColor","chromaThreshold","chromaSmoothing","side")&&this.Jb){var f=new n.Jp(this.Jb.ql());f.DD=this.get("blending");f.Sv=this.get("chromaColor");f.FV=this.get("chromaThreshold");f.EV=this.get("chromaSmoothing");f.side=this.get("side");this.set("materialConfig",f)}},Bn:function(){this.W("visible","composedAlpha","image","state")&&
this.set("inView",this.get("visible")&&this.get("composedAlpha")>0);this.W("composedAlpha","meshGroup","inView")&&g.Bf(this.get("meshGroup"),this.get("inView")?this.get("composedAlpha"):0)},cV:function(f){var m=!!this.Rh&&this.Rh.isEmpty(),p=this.qa&&this.qa.j6(),q=!!p&&p.isEmpty();q&&!m&&this.qa.getState()==k.PLAYING&&this.C.get("loop")&&(p=this.Rh,q=!1);this.set("frameEmpty",q);this.eka();this.uN.Hpa(f.Jk>0);!this.Rh||p&&!this.Rh.isEqual(p)?(this.Rh=p,(f=this.Rh.Ru)&&f.tagName=="VIDEO"&&(f.width=
this.get("contentWidth"),f.height=this.get("contentHeight")),this.uN.$n(f),this.uN.update(),this.Na()):this.qa.getState()==k.PLAYING&&this.Na()},eka:function(){var f=this.qa.getCurrentTime(),m=this.qa.hj();this.get("frameEmpty")?this.set("hasStableContent",!1):f>this.S_+.1?this.set("hasStableContent",!0):f==0&&this.Mfa>m-.5?this.set("hasStableContent",!0):this.set("hasStableContent",!1);this.W("frameEmpty")&&!this.get("frameEmpty")&&(this.S_=f);!this.get("frameEmpty")&&f>0&&(this.Mfa=f)},$Q:function(){this.Jb&&
this.rb&&this.C&&(this.set("textureSource",this.uN=new b),this.uN.WX(!0),this.set("contentWidth",this.rb.get("width")),this.set("contentHeight",this.rb.get("height")),this.set("alpha",0),this.qa=new d(this.La.Uq(),this.Jb),this.qa.Fhb(),this.bs=new h(this.C,this.qa),this.Ta=new e(this.La.Uq(),this.C,this.qa),this.wn=new c(this.La.ld.get("panorama"),this.qa),this.Fx(),this.m(l.ud),this.m(l.ia))},kC:function(){this.qa&&(this.set("textureSource",this.uN=null),this.iz(),this.Ta.clear(),this.Ta=null,this.bs.clear(),
this.bs=null,this.wn.clear(),this.wn=null,this.qa.clear(),this.Rh=this.qa=null,this.set("frameEmpty",!0),this.set("hasStableContent",!1),this.rb=this.Jb=null)},Fx:function(){this.qa.bind(d.Cg,this.Lf,this,!0);this.qa.bind(l.$e,this.Fj,this,!0)},iz:function(){this.qa.h(d.Cg,this.Lf,this,!0);this.qa.h(l.$e,this.Fj,this,!0)},Fj:function(){this.Na()},Lf:function(){this.Na()}}});
define("tdv/player/view/panorama/renderer/object/position/QuadVideoHotspotPositionMixin",["require","tdv/binding/BindingsHandler","tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController"],function(a){var l=a("tdv/binding/BindingsHandler"),k=a("tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController");return{Zp:function(){this.set("playbackPositions",null);this.set("distance",void 0);this.se=this.se.bind(this);this.Hb=new k},rq:function(){l.ba(this.C,["playbackPositions",
"distance"],this.se,!0)},tq:function(){l.da(this.C,["playbackPositions","distance"],this.se)},se:function(){this.set("distance",this.C.get("distance"));this.set("playbackPositions",this.C.get("playbackPositions"))},$f:function(){this.W("playbackPositions","currentTime")&&(this.Hb.LE(this.get("playbackPositions")),this.Hb.JE(this.get("currentTime")),this.set("vertices",this.Hb.Sma()),this.set("alpha",this.Hb.ew()));this.W("video","image","vertices","distance")&&this.Cb().forEach(function(n){n.set("vertices",
this.get("vertices"));n.set("distance",this.get("distance"))}.bind(this))}}});
define("tdv/player/view/panorama/renderer/object/QuadVideoHotspot","require tdv/utils tdv/player/view/panorama/renderer/object/VideoHotspot tdv/player/view/panorama/renderer/object/ComposedWebGLObject tdv/player/view/panorama/renderer/object/geometry/QuadGeometryMixin tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin tdv/player/view/panorama/renderer/object/material/VideoResourceMaterialMixin tdv/player/view/panorama/renderer/object/position/QuadVideoHotspotPositionMixin".split(" "),function(a){var l=
a("tdv/utils"),k=a("tdv/player/view/panorama/renderer/object/VideoHotspot"),n=a("tdv/player/view/panorama/renderer/object/ComposedWebGLObject"),g=a("tdv/player/view/panorama/renderer/object/geometry/QuadGeometryMixin"),h=a("tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin"),e=a("tdv/player/view/panorama/renderer/object/material/VideoResourceMaterialMixin");a=a("tdv/player/view/panorama/renderer/object/position/QuadVideoHotspotPositionMixin");var b=l.extend(n,g,h,function(){n.call(this);
this.set("tag","QuadVideoHotspotImage")}),c=l.extend(n,g,e,function(){n.call(this);this.set("tag","QuadVideoHotspotVideo")});return l.extend(k,a,function(d){k.call(this,d);this.$G=b;this.Qka=c})});
define("tdv/player/view/panorama/renderer/object/Rain","require tdv/utils tdv/binding/BindingsHandler tdv/constants/PlaybackState tdv/player/view/panorama/renderer/object/ParticleCylinders tdv/player/view/util/Color tdv/player/view/util/Device".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/PlaybackState"),g=a("tdv/player/view/panorama/renderer/object/ParticleCylinders"),h=a("tdv/player/view/util/Color"),e=a("tdv/player/view/util/Device");a=l.extend(g,
function(b){g.call(this);this.C=b;this.Sl=this.Sl.bind(this);this.Tl=this.Tl.bind(this);this.yo()});a.prototype.fc=function(){g.prototype.fc.call(this);this.C.set("state",this.C.get("startState"));k.ba(this.C,"color speed intensity size opacity maxDistance farPlaneDistance particleCount farPlaneParticleCount".split(" "),this.Sl,!0);k.ba(this.C,["state"],this.Tl,!0)};a.prototype.lc=function(){k.da(this.C,"color speed intensity size opacity maxDistance farPlaneDistance particleCount farPlaneParticleCount".split(" "),
this.Sl);k.da(this.C,["state"],this.Tl);this.C.set("state",n.ca);g.prototype.lc.call(this)};a.prototype.Sl=function(){this.yo();this.TT()};a.prototype.Tl=function(){this.O2=this.C.get("state");this.Na()};a.prototype.yo=function(){g.prototype.yo.call(this);if(e.gf()){this.HG=this.$u=4;this.HH=2400;this.IG=1200;var b=1.5;var c=1.6}else this.$u=2,this.HG=4,this.HH=4800,this.IG=2400,c=b=1;var d=this.C.get("intensity",.5);this.Ie=h.xp(this.C.get("color","#ffffff"));this.vT=this.C.get("opacity",.25)*.24+
.01;this.vT*=2;this.WC=(d*(.37-.17)+.17)*b;b=(this.C.get("speed",.5)*(.09-.02)+.02)/this.WC*c;this.rS=b*.9;this.qH=b*1.1;this.HH=Math.round(this.C.get("particleCount",this.HH)*d);this.IG=Math.round(this.C.get("farPlaneParticleCount",this.IG)*d);this.c1=0;this.rs=2;this.av=-2;this.ega=0;this.zQ=.75;this.cR=.5;this.x0=this.C.get("initialState");this.T3=this.C.get("startDuration");this.Z3=this.C.get("stopDuration");this.$u=this.C.get("maxDistance",this.$u);this.HG=this.C.get("farPlaneDistance",this.HG);
this.tD()};a.prototype.t_=function(){var b=new THREE.MeshBasicMaterial;b.color=new THREE.Color(this.Ie[0]/255,this.Ie[1]/255,this.Ie[2]/255);b.side=THREE.FrontSide;b.transparent=!0;b.depthTest=!1;b.needsUpdate=!0;this.Zda||(this.Zda=new THREE.BoxGeometry(.01,.2,.01));return new THREE.Mesh(this.Zda,b)};a.prototype.tD=function(){var b=this.ah&&this.ah.children||[],c=new THREE.Color(this.Ie[0]/255,this.Ie[1]/255,this.Ie[2]/255);b.forEach(function(d){d.material.color=c;d.material.needsUpdate=!0})};return a});
define("tdv/player/view/panorama/renderer/object/Root","require tdv/utils tdv/util/Map tdv/constants/EventName tdv/events/Event tdv/player/view/panorama/renderer/object/Base".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/util/Map"),n=a("tdv/constants/EventName"),g=a("tdv/events/Event"),h=a("tdv/player/view/panorama/renderer/object/Base"),e=l.extend(h,function(b,c,d,f){h.call(this);this.Ee=b;this.R=c;this.ld=d;this.o=f;this.FS=new k;this.Qia(this);this.set("tag","Root");this.set("globalBlendingActive",
0)});e.prototype.Uq=function(){return this.Ee};e.prototype.cg=function(b){return this.FS.get(b)};e.prototype.all=function(){for(var b=[],c=[this];c.length>0;){var d=c.pop();b.push(d);for(var f=d.oe.length-1;f>=0;f--)c.push(d.oe[f])}return b};e.prototype.update=function(b){var c=this.all(),d=c.length,f;for(f=0;f<d;f++)c[f].hXa();for(f=0;f<d;f++)c[f].set("index",f);for(f=0;f<d;f++)c[f].La&&c[f].ya(b);for(f=0;f<d;f++)c[f].ZWa();if(this.v0){for(f=0;f<d;f++)c[f].dXa();this.update(b)}};e.prototype.Na=function(){this.fh||
this.m(new g(n.V));h.prototype.Na.call(this)};e.prototype.jA=function(b){return Array.isArray(b)?b.map(this.jA.bind(this)):this.FS.get(b)||e.Ybb.create(b)};return e});
define("tdv/player/view/panorama/renderer/object/Snow","require tdv/utils tdv/binding/BindingsHandler tdv/constants/PlaybackState tdv/player/view/panorama/renderer/object/ParticleCylinders tdv/player/view/util/Device".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/PlaybackState"),g=a("tdv/player/view/panorama/renderer/object/ParticleCylinders"),h=a("tdv/player/view/util/Device");a=l.extend(g,function(b){g.call(this);this.C=b;this.Sl=this.Sl.bind(this);
this.Tl=this.Tl.bind(this);this.yo()});a.prototype.fc=function(){g.prototype.fc.call(this);this.C.set("state",this.C.get("startState"));k.ba(this.C,["intensity","speed"],this.Sl,!0);k.ba(this.C,["state"],this.Tl,!0)};a.prototype.lc=function(){k.da(this.C,["intensity","speed"],this.Sl);k.da(this.C,["state"],this.Tl);this.C.set("state",n.ca);g.prototype.lc.call(this)};a.prototype.Sl=function(){this.yo();this.TT()};a.prototype.Tl=function(){this.O2=this.C.get("state");this.Na()};a.prototype.yo=function(){g.prototype.yo.call(this);
var b=this.C.get("intensity"),c=this.C.get("speed");if(h.ub()||h.Ub()==h.Xw){var d=1E3;var f=350;var m=1800;var p=400;var q=.8;var r=1.2}else h.gf()?(d=1500,f=500,m=2500,p=500,q=.8,r=1.2):(d=3E3,f=1E3,m=5E3,p=1E3,q=.6,r=1);this.x0=this.C.get("initialState");this.T3=this.C.get("startDuration");this.Z3=this.C.get("stopDuration");this.zQ=.75;this.cR=.5;this.$u=4;this.av=-2;this.rs=3;this.c1=35;this.HG=7;this.WC=(q+b*(r-q))/e;this.rS=this.qH=.15+c*1.35;this.HH=f+b*(d-f);this.IG=p+b*(m-p)};a.prototype.t_=
function(){return new THREE.Sprite(this.Wx())};a.prototype.Wx=function(){var b=new THREE.SpriteMaterial;b.map=this.$r();b.side=THREE.FrontSide;b.transparent=!0;b.depthTest=!1;b.needsUpdate=!0;return b};a.prototype.$r=function(){if(this.Ma)return this.Ma;var b=document.createElement("canvas");b.width=b.height=e;var c=b.getContext("2d"),d=c.createRadialGradient(b.width*.5,b.height*.5,b.height*.2,b.width*.5,b.height*.5,b.height*.5);d.addColorStop(0,"rgba(255, 255, 255, 0.8)");d.addColorStop(1,"rgba(255, 255, 255, 0)");
c.fillStyle=d;c.fillRect(0,0,b.width,b.height);this.Ma=new THREE.Texture;this.Ma.colorSpace=THREE.SRGBColorSpace;this.Ma.image=b;this.Ma.needsUpdate=!0;return this.Ma};var e=32;return a});
define("tdv/player/view/panorama/renderer/object/geometry/CSSRectangleGeometryMixin",["require","tdv/player/view/panorama/renderer/3d/util/GeometryUtil","tdv/player/view/util/Device"],function(a){var l=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),k=a("tdv/player/view/util/Device"),n=new THREE.Matrix4,g=Math.PI/180;return{Vx:function(){this.set("rotationX",0);this.set("rotationY",0);this.set("rotationZ",0);this.set("yaw",0);this.set("pitch",0);this.set("roll",0);this.set("scale",1);
this.set("hfov",void 0);this.set("vfov",null);this.ti=new THREE.Matrix4;this.ge=new THREE.Matrix4;this.sq=new THREE.Matrix4;this.Eo=new THREE.Matrix4;this.rk=new THREE.Matrix4;this.tn=new THREE.Matrix4;this.us=new THREE.Matrix4},yca:function(){var h=k.Md()==k.pj||k.Ub()==k.Xw?new THREE.CSS3DRectangle:new THREE.CSS3DObject;h.matrixAutoUpdate=!1;return h},Fz:function(h){if(this.W("contentWidth","contentHeight")){var e=this.get("cssObject");e.contentWidth=this.get("contentWidth");e.contentHeight=this.get("contentHeight");
e.updateVertices()}e=!1;this.W("composedTranslationX","composedTranslationY","composedTranslationZ")&&(this.ti.makeTranslation(-this.get("composedTranslationX")*.5*l.ph,this.get("composedTranslationY")*.5*l.ph,this.get("composedTranslationZ")*.5*l.ph),e=!0);this.W("composedDeltaYaw","composedDeltaPitch","composedDeltaRoll")&&(this.ge.makeRotationY(-h.$a*g),this.ge.multiply(n.makeRotationX(-this.get("composedDeltaPitch")*g)),this.ge.multiply(n.makeRotationY(this.get("composedDeltaYaw")*g)),this.ge.multiply(n.makeRotationY(h.$a*
g)),e=!0);this.W("yaw","pitch")&&(this.sq.makeRotationY(-this.get("yaw")*g),this.sq.multiply(n.makeRotationX(this.get("pitch")*g)),e=!0);if(this.W("flipHorizontally","hfov","vfov","composedTranslationX","composedTranslationY","composedTranslationZ")){e=this.get("contentWidth");var b=this.get("contentHeight"),c=this.get("hfov"),d=this.get("vfov");this.Eo.makeTranslation(0,0,-(e/(2*Math.tan(c*g*.5))));var f=(this.get("flipHorizontally")?-1:1)*this.get("scale"),m=this.get("scale");d&&(m*=e*Math.tan(d*
g*.5)/(b*Math.tan(c*g*.5)));this.tn.makeScale(f,m,1);e=!0}this.W("rotationX","rotationY","rotationZ","roll")&&(this.rk.makeRotationZ(this.get("roll")*g),this.rk.multiply(n.makeRotationY(this.get("rotationY")*g)),this.rk.multiply(n.makeRotationX(this.get("rotationX")*g)),this.rk.multiply(n.makeRotationZ(this.get("rotationZ")*g)),e=!0);if(e||this.W("meshGroup"))this.us.copy(this.ti),this.us.multiply(this.ge),this.us.multiply(this.sq),this.us.multiply(this.Eo),this.us.multiply(this.rk),this.us.multiply(this.tn),
this.get("cssObject").matrix.copy(this.us),this.get("cssObject").matrixWorldNeedsUpdate=!0;this.set("cameraYaw",h.$a);this.set("cameraPitch",h.pitch);this.set("cameraRoll",h.kh);this.set("cameraHfov",h.Ud);this.set("cameraWidth",h.width);this.set("cameraHeight",h.height);h.camera&&(e||this.W("cameraYaw","cameraPitch","cameraRoll","cameraHfov","cameraWidth","cameraHeight"))&&(this.get("cssObject").projectVertices(h.camera),this.set("geometryVisible",this.get("cssObject").isVisible),this.W("geometryVisible")&&
this.pia())}}});
define("tdv/player/view/panorama/renderer/object/position/RectangleFrameHotspotPositionMixin",["require","tdv/binding/BindingsHandler","tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController"],function(a){var l=a("tdv/binding/BindingsHandler"),k=a("tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController");return{Zp:function(){this.set("playbackPositions",null);this.se=this.se.bind(this);this.Hb=new k},rq:function(){l.ba(this.C,["playbackPositions","width",
"height"],this.se,!0)},tq:function(){l.da(this.C,["playbackPositions","width","height"],this.se)},se:function(){this.set("playbackPositions",this.C.get("playbackPositions"));this.set("contentWidth",this.C.get("width"));this.set("contentHeight",this.C.get("height"))},$f:function(){this.W("playbackPositions","currentTime")&&(this.Hb.LE(this.get("playbackPositions")),this.Hb.JE(this.get("currentTime")),this.set("yaw",this.Hb.get("yaw")),this.set("pitch",this.Hb.get("pitch")),this.set("roll",this.Hb.get("roll")),
this.set("rotationX",this.Hb.get("rotationX")),this.set("rotationY",this.Hb.get("rotationY")),this.set("hfov",this.Hb.get("hfov")),this.set("vfov",this.Hb.get("vfov")));this.W("framePlane","holePlane","imagePlane","yaw","pitch","roll","rotationX","rotationY","hfov","vfov","contentWidth","contentHeight")&&this.Cb().forEach(function(n){n.set("yaw",this.get("yaw"));n.set("pitch",this.get("pitch"));n.set("roll",this.get("roll"));n.set("rotationX",this.get("rotationX"));n.set("rotationY",this.get("rotationY"));
n.set("hfov",this.get("hfov"));n.set("vfov",this.get("vfov"));n.set("contentWidth",this.get("contentWidth"));n.set("contentHeight",this.get("contentHeight"))}.bind(this))}}});
define("tdv/player/view/panorama/renderer/object/RectangleFrameHotspot","require tdv/utils tdv/player/view/panorama/renderer/object/FrameHotspot tdv/player/view/panorama/renderer/object/ComposedCSSObject tdv/player/view/panorama/renderer/object/ComposedWebGLObject tdv/player/view/panorama/renderer/object/geometry/CSSRectangleGeometryMixin tdv/player/view/panorama/renderer/object/geometry/RectangleGeometryMixin tdv/player/view/panorama/renderer/object/material/IFrameMaterialMixin tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin tdv/player/view/panorama/renderer/object/material/PassthroughMaterialMixin tdv/player/view/panorama/renderer/object/position/RectangleFrameHotspotPositionMixin".split(" "),function(a){var l=
a("tdv/utils"),k=a("tdv/player/view/panorama/renderer/object/FrameHotspot"),n=a("tdv/player/view/panorama/renderer/object/ComposedCSSObject"),g=a("tdv/player/view/panorama/renderer/object/ComposedWebGLObject"),h=a("tdv/player/view/panorama/renderer/object/geometry/CSSRectangleGeometryMixin"),e=a("tdv/player/view/panorama/renderer/object/geometry/RectangleGeometryMixin"),b=a("tdv/player/view/panorama/renderer/object/material/IFrameMaterialMixin"),c=a("tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin"),
d=a("tdv/player/view/panorama/renderer/object/material/PassthroughMaterialMixin");a=a("tdv/player/view/panorama/renderer/object/position/RectangleFrameHotspotPositionMixin");var f=l.extend(g,e,c,function(){g.call(this);this.set("tag","RectangleFrameHotspotImage")}),m=l.extend(n,h,b,function(){n.call(this);this.set("tag","RectangleFrameHotspotFrame")}),p=l.extend(g,e,d,function(){g.call(this);this.set("tag","RectangleFrameHotspotHole")});return l.extend(k,a,function(q){k.call(this,q);this.$G=f;this.Sda=
m;this.Sea=p})});
define("tdv/player/view/panorama/renderer/object/position/RectangleVideoHotspotPositionMixin",["require","tdv/binding/BindingsHandler","tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController"],function(a){var l=a("tdv/binding/BindingsHandler"),k=a("tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController");return{Zp:function(){this.set("playbackPositions",null);this.set("scaleMode",void 0);this.set("distance",void 0);this.se=this.se.bind(this);this.Hb=new k},
rq:function(){l.ba(this.C,["playbackPositions","distance","scaleMode"],this.se,!0)},tq:function(){l.da(this.C,["playbackPositions","distance","scaleMode"],this.se)},se:function(){this.set("scaleMode",this.C.get("scaleMode"));this.set("distance",this.C.get("distance"));this.set("playbackPositions",this.C.get("playbackPositions"))},$f:function(){this.W("playbackPositions","currentTime")&&(this.Hb.LE(this.get("playbackPositions")),this.Hb.JE(this.get("currentTime")),this.set("yaw",this.Hb.get("yaw")),
this.set("pitch",this.Hb.get("pitch")),this.set("roll",this.Hb.get("roll")),this.set("rotationX",this.Hb.get("rotationX")),this.set("rotationY",this.Hb.get("rotationY")),this.set("hfov",this.Hb.get("hfov")),this.set("vfov",this.Hb.get("vfov")),this.set("alpha",this.Hb.ew()));this.W("video","image","yaw","pitch","roll","rotationX","rotationY","hfov","vfov","distance","scaleMode","image","video")&&this.Cb().forEach(function(n){n.set("yaw",this.get("yaw"));n.set("pitch",this.get("pitch"));n.set("roll",
this.get("roll"));n.set("rotationX",this.get("rotationX"));n.set("rotationY",this.get("rotationY"));n.set("hfov",this.get("hfov"));n.set("vfov",this.get("vfov"));n.set("scaleMode",this.get("scaleMode"));n.set("distance",this.get("distance"))}.bind(this))}}});
define("tdv/player/view/panorama/renderer/object/RectangleVideoHotspot","require tdv/utils tdv/player/view/panorama/renderer/object/VideoHotspot tdv/player/view/panorama/renderer/object/ComposedWebGLObject tdv/player/view/panorama/renderer/object/geometry/RectangleGeometryMixin tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin tdv/player/view/panorama/renderer/object/material/VideoResourceMaterialMixin tdv/player/view/panorama/renderer/object/position/RectangleVideoHotspotPositionMixin".split(" "),function(a){var l=
a("tdv/utils"),k=a("tdv/player/view/panorama/renderer/object/VideoHotspot"),n=a("tdv/player/view/panorama/renderer/object/ComposedWebGLObject"),g=a("tdv/player/view/panorama/renderer/object/geometry/RectangleGeometryMixin"),h=a("tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin"),e=a("tdv/player/view/panorama/renderer/object/material/VideoResourceMaterialMixin");a=a("tdv/player/view/panorama/renderer/object/position/RectangleVideoHotspotPositionMixin");var b=l.extend(n,
g,h,function(){n.call(this);this.set("tag","RectangleVideoHotspotImage")}),c=l.extend(n,g,e,function(){n.call(this);this.set("tag","RectangleVideoHotspotVideo")});return l.extend(k,a,function(d){k.call(this,d);this.$G=b;this.Qka=c})});
define("tdv/player/view/panorama/renderer/object/Factory","require tdv/player/parser/ClassInfo tdv/player/view/panorama/renderer/object/Base tdv/player/view/panorama/renderer/object/Cap tdv/player/view/panorama/renderer/object/Dust tdv/player/view/panorama/renderer/object/FlatHotspotImage tdv/player/view/panorama/renderer/object/Hotspot tdv/player/view/panorama/renderer/object/HotspotImage tdv/player/view/panorama/renderer/object/LensFlare tdv/player/view/panorama/renderer/object/Menu tdv/player/view/panorama/renderer/object/Panorama tdv/player/view/panorama/renderer/object/ImagePanoramaFrame tdv/player/view/panorama/renderer/object/VideoPanoramaFrame tdv/player/view/panorama/renderer/object/Popup tdv/player/view/panorama/renderer/object/QuadFrameHotspot tdv/player/view/panorama/renderer/object/QuadHotspotImage tdv/player/view/panorama/renderer/object/QuadVideoHotspot tdv/player/view/panorama/renderer/object/Rain tdv/player/view/panorama/renderer/object/Root tdv/player/view/panorama/renderer/object/Snow tdv/player/view/panorama/renderer/object/RectangleFrameHotspot tdv/player/view/panorama/renderer/object/RectangleVideoHotspot tdv/player/view/panorama/renderer/object/util/PanoramaFormat".split(" "),function(a){function l(D,
E){Array.isArray(E)||(E=[E]);for(var B=0;B<E.length;B++)if(k.Qa(E[B],D))return!0;return!1}var k=a("tdv/player/parser/ClassInfo"),n=a("tdv/player/view/panorama/renderer/object/Base"),g=a("tdv/player/view/panorama/renderer/object/Cap"),h=a("tdv/player/view/panorama/renderer/object/Dust"),e=a("tdv/player/view/panorama/renderer/object/FlatHotspotImage"),b=a("tdv/player/view/panorama/renderer/object/Hotspot"),c=a("tdv/player/view/panorama/renderer/object/HotspotImage"),d=a("tdv/player/view/panorama/renderer/object/LensFlare"),
f=a("tdv/player/view/panorama/renderer/object/Menu"),m=a("tdv/player/view/panorama/renderer/object/Panorama"),p=a("tdv/player/view/panorama/renderer/object/ImagePanoramaFrame"),q=a("tdv/player/view/panorama/renderer/object/VideoPanoramaFrame"),r=a("tdv/player/view/panorama/renderer/object/Popup"),t=a("tdv/player/view/panorama/renderer/object/QuadFrameHotspot"),u=a("tdv/player/view/panorama/renderer/object/QuadHotspotImage"),v=a("tdv/player/view/panorama/renderer/object/QuadVideoHotspot"),w=a("tdv/player/view/panorama/renderer/object/Rain"),
y=a("tdv/player/view/panorama/renderer/object/Root"),x=a("tdv/player/view/panorama/renderer/object/Snow"),z=a("tdv/player/view/panorama/renderer/object/RectangleFrameHotspot"),A=a("tdv/player/view/panorama/renderer/object/RectangleVideoHotspot");a("tdv/player/view/panorama/renderer/object/util/PanoramaFormat");a={};y.Ybb=a;a.create=function(D){if(D instanceof n)return D;if(l(D,["HDRPanorama","LivePanorama","Panorama","VideoPanorama"]))return new m(D);if(l(D,["CubicPanoramaFrame","SphericPanoramaFrame"]))return l(D,
"SphericPanoramaFrame")&&D.Ln()?new q(D):new p(D);if(l(D,["DustPanoramaOverlay"]))return new h(D);if(l(D,"HotspotPanoramaOverlay"))return new b(D);if(l(D,["HotspotPanoramaOverlayImage","HotspotPanoramaOverlayMap"]))return new c(D);if(l(D,"Menu"))return new f(D);if(l(D,["CeilingCapPanoramaOverlay","TripodCapPanoramaOverlay"]))return new g(D);if(l(D,["FlatHotspotPanoramaOverlayImage","FlatHotspotPanoramaOverlayMap"]))return new e(D);if(l(D,["LensFlarePanoramaOverlay"]))return new d(D);if(l(D,["RainPanoramaOverlay"]))return new w(D);
if(l(D,["SnowPanoramaOverlay"]))return new x(D);if(l(D,["PopupPanoramaOverlay"]))return new r(D);if(l(D,["QuadFramePanoramaOverlay"]))return new t(D);if(l(D,["QuadHotspotPanoramaOverlayImage","QuadHotspotPanoramaOverlayMap"]))return new u(D);if(l(D,["QuadVideoPanoramaOverlay"]))return new v(D);if(l(D,["FramePanoramaOverlay"]))return new z(D);if(l(D,["VideoPanoramaOverlay"]))return new A(D);throw"Invalid script object";};return a});
define("tdv/player/view/panorama/renderer/3d/util/RayUtil",["require","exports","three.mod"],function(a,l,k){return function(){function n(){}n.xJa=function(g,h,e,b,c,d){return n.tcb(g,h/b*2-1,-(e/c)*2+1,d)};n.tcb=function(g,h,e,b){b||(b=new k.Ray);b.origin.setFromMatrixPosition(g.matrixWorld);b.direction.set(h,e,.5).unproject(g).sub(b.origin).normalize();return b};n.Jcb=function(g,h){h||(h=new k.Ray);h.origin.set(0,0,0);h.direction.set(0,0,-1).applyQuaternion(g.quaternion);return h};n.Icb=function(g,
h){h||(h=new k.Ray);h.origin.set(0,0,0).applyMatrix4(g);h.direction.set(0,0,-1).applyMatrix4(g).sub(h.origin).normalize();return h};return n}()});
define("tdv/player/view/panorama/renderer/object/Reticle","require tdv/utils tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/object/Plane tdv/player/canvas/ReticleCanvas tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource tdv/player/view/util/XR".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),n=a("tdv/player/view/panorama/renderer/object/Plane"),g=a("tdv/player/canvas/ReticleCanvas"),
h=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource"),e=a("tdv/player/view/util/XR");a=l.extend(n,function(){n.call(this);this.fa=null;this.set("tag","Reticle");this.set("changing",!1);this.set("over",!1);this.set("overProgress",void 0);this.set("visible",!0);this.set("attachToCamera",!0);this.qq=null});a.prototype.ya=function(b){this.dt(b);this.eh(b);this.$f(b);n.prototype.ya.call(this,b)};a.prototype.dt=function(b){b.ob&&!this.qq&&e.getType()==e.zx.ko&&this.Zh([this.qq=
new n])};a.prototype.eh=function(b){this.fa||(this.set("textureSource",new h),this.fa=new g(this.La.R.D6()),this.get("textureSource").$n(this.fa.Ig()),this.set("contentWidth",this.fa.dg()),this.set("contentHeight",this.fa.wg()),this.set("hfov",6),this.set("distance",this.La.R.get("vrPointerDistance")));this.W("changing")&&this.fa.NA(b.ob&&this.get("changing"));this.W("over","overProgress")&&this.fa.VJ(this.get("over"),this.get("overProgress"));this.fa.update(b.xf)&&this.get("textureSource").update();
this.get("changing")&&this.Na()};a.prototype.$f=function(){this.wi()};a.prototype.Bn=function(){this.W("composedAlpha","meshGroup","visible")&&this.MB()};a.prototype.MB=function(){k.Bf(this.get("meshGroup"),this.get("visible")?this.get("composedAlpha"):0)};return a});
define("tdv/view/core/ToolTip","require exports tdv/utils tdv/constants/EventName tdv/view/core/ZIndex tdv/view/util/Font tdv/player/view/util/Device".split(" "),function(a,l,k,n,g,h,e){var b=document.createElement("pre"),c=document.createTextNode("");b.appendChild(c);return function(){function d(f){this.Fb=f;this.mEa=e.nr();this.Fb.bind(n.fb,this.rg,this);this.oa=document.createElement("span");this.oa.style.pointerEvents="none";this.oa.style.position="absolute";this.oa.style.zIndex=g.WTa.toString();
this.oa.style.textAlign="center";this.oa.style.display="none";this.Yd=document.createElement("span");this.Yd.style.position="absolute";this.Yd.style.left="0";this.Yd.style.top="0";this.Yd.style.right="0";this.Yd.style.bottom="0";this.oa.appendChild(this.Yd);this.yz=document.createElement("span");this.yz.style.position="relative";this.oa.appendChild(this.yz);this.tk=this.z0=this.Hh=null;this.Zy=this.Yy=void 0;this.yy=!1;this.nEa=void 0}d.prototype.bc=function(){return this.oa};d.prototype.BE=function(f){var m=
this;if(!this.mEa){for(;f&&f.get("toolTipDisabled");)f=f.getParent();this.Qe();this.Hh&&Object.keys(d.YP).forEach(function(p){m.Hh.h(n.N(p),m.Sga,m)});if(this.Hh=f)Object.keys(d.YP).forEach(function(p){m.Hh.bind(n.N(p),m.Sga,m,!1)}),this.Sga()}};d.prototype.tjb=function(f,m){this.Hh=f;this.nEa=m;this.I0()||(this.yy?this.DDa():this.xU())};d.prototype.BDa=function(f,m,p){this.yy&&this.Hh.m(n.Wsa);this.B8a(f);this.yz.innerHTML=this.l0a(m);this.Qua=p;this.oa.style.display="inline";this.$f();this.Hh.m(n.VTa);
this.yy=!0;(p||f.get("checkToolTipOcclusion"))&&this.Y6a(f)};d.prototype.$f=function(){var f=this.hs(),m=f.x;f=f.y;var p=this.oa.offsetWidth||0,q=this.oa.offsetHeight||0;if(this.Qua){m-=(this.oa.clientWidth||0)*.5;var r=this.Hh.get("toolTipCenteredOffsetY");f=r===void 0?f-(this.oa.clientHeight||0)*.5:r>0?f+r:f-((this.oa.clientHeight||0)-r)}m=Math.max(Math.min(m,this.Fb.gb()-p-3),3);f=Math.max(Math.min(f,this.Fb.Kb()-q-3),3);this.oa.style.left=m+"px";this.oa.style.top=f+"px"};d.prototype.hs=function(){if(this.Qua){var f=
k.offset(this.Hh.va().bc());return{x:f.left+this.Hh.gb()*.5,y:f.top+this.Hh.Kb()*.5}}return{x:this.Yy||0,y:(this.Zy||0)+25}};d.prototype.Qe=function(){this.tG();this.SDa();this.yy&&(this.oa.style.display="none",this.Hh.m(n.Wsa),this.yy=!1)};d.prototype.Sga=function(){this.Hh.get("toolTip")?this.I0()||(this.yy?this.CDa():this.xU()):this.I0()?this.tG():this.yy&&this.Qe()};d.prototype.rg=function(f){this.Yy=f.pageX;this.Zy=f.pageY;this.yy&&this.Hh.get("toolTipFollowMouse")&&this.$f()};d.prototype.CDa=
function(){this.BDa(this.Hh,this.Hh.get("toolTip"),this.Hh.get("toolTipCentered"))};d.prototype.DDa=function(){this.BDa(this.Hh,this.nEa,!0)};d.prototype.I0=function(){return this.tk!=null};d.prototype.xU=function(){var f=this.Hh&&this.Hh.get("toolTipDisplayTime");if(f===void 0||f===null)f=d.YP.toolTipDisplayTime;this.tG();this.tk=setTimeout(function(){this.tk=null;this.mEa?this.DDa():this.CDa()}.bind(this),f)};d.prototype.tG=function(){this.I0()&&(clearTimeout(this.tk),this.tk=null)};d.prototype.Y6a=
function(f){var m=this.hs();this.SDa();var p=function(){this.oa.style.display=this.yy&&!this.n1a(f,m.x,m.y)?"inline":"none"}.bind(this);this.z0=setInterval(p,300);p()};d.prototype.SDa=function(){this.z0&&(clearInterval(this.z0),this.z0=null)};d.prototype.B8a=function(f){function m(q){var r=f.get(q);return r===void 0?d.YP[q]:r}this.oa.style.opacity=m("toolTipOpacity");this.oa.style.paddingTop=m("toolTipPaddingTop")+"px";this.oa.style.paddingBottom=m("toolTipPaddingBottom")+"px";this.oa.style.paddingLeft=
m("toolTipPaddingLeft")+"px";this.oa.style.paddingRight=m("toolTipPaddingRight")+"px";this.oa.style.textAlign=m("toolTipHorizontalAlign");this.Yd.style.opacity=m("toolTipBackgroundOpacity");this.Yd.style.backgroundColor=m("toolTipBackgroundColor");this.Yd.style.border=[m("toolTipBorderSize")+"px","solid",m("toolTipBorderColor")].join(" ");var p=m("toolTipShadowColor");this.Yd.style.boxShadow=[m("toolTipShadowHorizontalLength")+"px",m("toolTipShadowVerticalLength")+"px",m("toolTipShadowBlurRadius")+
"px",m("toolTipShadowSpread")+"px","rgba("+parseInt("0x"+p.substr(1,2))+", "+parseInt("0x"+p.substr(3,2))+", "+parseInt("0x"+p.substr(5,2))+", "+m("toolTipShadowOpacity")+")"].join(" ");this.Yd.style.borderRadius=m("toolTipBorderRadius")+"px";this.yz.style.fontFamily=h.cA(m("toolTipFontFamily"));p=m("toolTipFontSize");typeof p==="number"?p+="px":typeof p!=="string"&&(p="");this.yz.style.fontSize=p;this.yz.style.fontWeight=m("toolTipFontWeight");this.yz.style.fontStyle=m("toolTipFontStyle");this.yz.style.color=
m("toolTipFontColor");p=m("toolTipTextShadowColor");this.yz.style.textShadow=[m("toolTipTextShadowHorizontalLength")+"px",m("toolTipTextShadowVerticalLength")+"px",m("toolTipTextShadowBlurRadius")+"px","rgba("+parseInt("0x"+p.substr(1,2))+", "+parseInt("0x"+p.substr(3,2))+", "+parseInt("0x"+p.substr(5,2))+", "+m("toolTipTextShadowOpacity")+")"].join(" ")};d.prototype.n1a=function(f,m,p){m=document.elementsFromPoint(m,p);f=f.va().bc();p=this.Fb.va().bc();for(var q=0;q<m.length;q++){var r=m[q];if(f==
r||f.contains(r))break;if(!this.oa.contains(r)&&p.contains(r)){var t=window.getComputedStyle(r);if(t.display!="none"&&t.visibility!="hidden"&&(r.tagName=="CANVAS"?1:this.pXa(t.backgroundColor))*parseFloat(t.opacity)>.29)return!0}}return!1};d.prototype.pXa=function(f){if(!f)return 0;f=f.toLowerCase();var m=f.match(/rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*(\d*\.?\d*)\s*\)/);return m?parseFloat(m[1]):f.match(/transparent/)?0:1};d.prototype.l0a=function(f){f=(f||"").split("\n");for(var m=0;m<f.length;m++)f[m]=
this.fZa(f[m]);return f.map(function(p){return"<div>"+p+"</div>"}).join("")};d.prototype.fZa=function(f){c.nodeValue=f;(f=b.innerHTML)||(f="&nbsp;");return f};d.YP={toolTip:void 0,toolTipBackgroundColor:"#F6F6F6",toolTipBackgroundOpacity:1,toolTipBorderColor:"#767676",toolTipBorderRadius:3,toolTipBorderSize:1,toolTipCentered:!1,toolTipCenteredOffsetY:void 0,toolTipFontFamily:"Segoe UI",toolTipFontSize:12,toolTipFontColor:"#606060",toolTipFontWeight:"normal",toolTipFontStyle:"normal",toolTipHorizontalAlign:"center",
toolTipOpacity:1,toolTipPaddingBottom:2,toolTipPaddingLeft:4,toolTipPaddingTop:2,toolTipPaddingRight:4,toolTipShadowBlurRadius:3,toolTipShadowColor:"#333333",toolTipShadowHorizontalLength:3,toolTipShadowOpacity:1,toolTipShadowSpread:0,toolTipShadowVerticalLength:3,toolTipTextShadowBlurRadius:3,toolTipTextShadowColor:"#000000",toolTipTextShadowHorizontalLength:0,toolTipTextShadowOpacity:0,toolTipTextShadowVerticalLength:0,toolTipDisplayTime:600};return d}()});
define("tdv/player/view/panorama/renderer/object/canvas/ToolTipCanvas",["require","tdv/view/core/ToolTip","tdv/view/util/MeasureText","tdv/view/util/Font"],function(a){function l(e,b){this.R=e;this.yn=b;this.Q6a()}var k=a("tdv/view/core/ToolTip"),n=a("tdv/view/util/MeasureText"),g=a("tdv/view/util/Font"),h=180/Math.PI;l.prototype.Ig=function(){return this.fa};l.prototype.dg=function(){return this.fa.width};l.prototype.wg=function(){return this.fa.height};l.prototype.ff=function(){return 2*Math.atan2(this.fa.width/
3*.5,600)*h};l.prototype.Q6a=function(){this.fa=document.createElement("canvas");var e=this.yn.split("\n"),b=this.Kh("toolTipBackgroundColor"),c=this.Kh("toolTipBackgroundOpacity"),d=this.Kh("toolTipBorderRadius"),f=this.Kh("toolTipBorderColor"),m=this.Kh("toolTipBorderSize");this.Kh("toolTipDisplayTime");var p=this.Kh("toolTipFontFamily"),q=this.Kh("toolTipFontSize"),r=this.Kh("toolTipFontColor"),t=this.Kh("toolTipFontWeight"),u=this.Kh("toolTipFontStyle"),v=this.Kh("toolTipPaddingBottom"),w=this.Kh("toolTipPaddingLeft"),
y=this.Kh("toolTipPaddingTop"),x=this.Kh("toolTipPaddingRight"),z=this.Kh("toolTipOpacity"),A=this.Kh("toolTipTextShadowBlurRadius"),D=this.Kh("toolTipTextShadowColor"),E=this.Kh("toolTipTextShadowHorizontalLength"),B=this.Kh("toolTipTextShadowVerticalLength"),C=this.Kh("toolTipTextShadowOpacity");isNaN(q)&&(q=12);d=Math.round(d*3);m=Math.round(m*3);q=Math.round(q*3);v=Math.round(v*3);w=Math.round(w*3);y=Math.round(y*3);x=Math.round(x*3);A=Math.round(A*3);E=Math.round(E*3);B=Math.round(B*3);var F=
new n.Iaa;F.fontFamily=p;F.fontSize=Math.round(q)+"px";F.fontWeight=t;F.fontStyle=u;this.fa=document.createElement("canvas");var G=this.fa.getContext("2d"),I=e.map(function(S){return n(S,F,G)}),N=0,P=0;I.forEach(function(S){N=Math.max(S.width,N);P+=S.height});var Q=e.length>1?P/e.length*.25:0;P+=(e.length-1)*Q;x=m+w+N+x+m;v=m+y+P+v+m;this.fa.width=this.fa.height=Math.max(256,Math.max(128,Math.pow(2,Math.ceil(Math.log(Math.max(x,v))/Math.LN2))));G=this.fa.getContext("2d");var R=(this.fa.width-x)*.5,
K=(this.fa.height-v)*.5;G.save();G.translate(R,K);G.globalAlpha=z;G.strokeStyle=f;G.fillStyle=b==="transparent"?"rgba(0,0,0,0)":this.Uta(c,b);G.lineWidth=m;G.beginPath();G.moveTo(d,0);G.lineTo(x-d,0);G.quadraticCurveTo(x,0,x,d);G.lineTo(x,v-d);G.quadraticCurveTo(x,v,x-d,v);G.lineTo(d,v);G.quadraticCurveTo(0,v,0,v-d);G.lineTo(0,d);G.quadraticCurveTo(0,0,d,0);G.closePath();G.fill();m>0&&G.stroke();G.fillStyle=r;G.font=t+" "+(u!="normal"?u+" ":"")+q+(isNaN(q)?"":"px")+" "+g.cA(p);G.shadowColor=this.Uta(C,
D);G.shadowOffsetX=E;G.shadowOffsetY=B;G.shadowBlur=A;G.textBaseline="middle";G.textAlign="center";var M=m+w+N*.5,T=m+y;e.forEach(function(S,W){G.fillText(S,Math.round(M),Math.round(T+I[W].height*.5));T+=I[W].height+Q})};l.prototype.Kh=function(e){var b=this.R.get(e);return b===void 0?k.YP[e]:b};l.prototype.Uta=function(e,b){return"rgba("+parseInt("0x"+b.substr(1,2))+", "+parseInt("0x"+b.substr(3,2))+", "+parseInt("0x"+b.substr(5,2))+", "+e+")"};return l});
define("tdv/player/view/panorama/renderer/object/ToolTip","require tdv/utils tdv/player/view/panorama/renderer/3d/util/GeometryUtil tdv/player/view/panorama/renderer/object/Plane tdv/player/view/panorama/renderer/object/canvas/ToolTipCanvas tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource tdv/player/view/util/XR".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),n=a("tdv/player/view/panorama/renderer/object/Plane"),
g=a("tdv/player/view/panorama/renderer/object/canvas/ToolTipCanvas"),h=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource"),e=a("tdv/player/view/util/XR");a=l.extend(n,function(){n.call(this);this.fa=null;this.set("tag","ToolTip");this.set("text","");this.Mq=new THREE.Vector3(0,0,-k.xt());this.qq=null});a.prototype.ya=function(f){this.dt(f);this.eh(f);n.prototype.ya.call(this,f)};a.prototype.dt=function(f){f.ob&&!this.qq&&e.getType()==e.zx.ko&&this.Zh([this.qq=new n])};
a.prototype.eh=function(f){if(!this.fa||this.W("text")){this.get("textureSource")||this.set("textureSource",new h);this.fa=new g(this.La.R,this.get("text"));this.get("textureSource").$n(this.fa.Ig());this.set("contentWidth",this.fa.dg());this.set("contentHeight",this.fa.wg());this.set("hfov",this.fa.ff());this.set("distance",this.La.R.get("vrPointerDistance"));var m=this.get("matrix"),p=this.get("intersectionYaw"),q=this.get("intersectionPitch");p!==void 0&&q!==void 0?(this.set("yaw",p),this.set("pitch",
q+c),this.set("distance",this.get("intersectionDistance"))):m?(this.Mq.applyMatrix4(m),this.Mq.x==0&&this.Mq.z==0||this.set("yaw",b*Math.atan2(this.Mq.x,-this.Mq.z)),this.Mq.y==0&&this.Mq.z==0||this.set("pitch",b*Math.atan2(this.Mq.y,Math.sqrt(this.Mq.z*this.Mq.z+this.Mq.x*this.Mq.x))+c)):(this.set("yaw",f.$a),this.set("pitch",f.pitch+d))}};var b=180/Math.PI,c=2,d=5;return a});
define("tdv/player/view/panorama/renderer/pointer/Pointer",["require","exports","tdv/player/view/panorama/renderer/3d/util/RayUtil","tdv/player/view/panorama/renderer/3d/util/SceneUtil"],function(a,l,k,n){return function(){function g(h,e){this.Of=h;this.o=e}g.prototype.update=function(){};g.prototype.clear=function(){};g.prototype.getType=function(){return this.Of};g.prototype.hJa=function(h){return this.c0=(h=h.oh&&n.getCamera(h.oh))?k.Jcb(h,this.c0):void 0};g.sQ="webxr";g.HB="gaze";g.AZ="gaze_click";
g.BZ="laser";g.qQ="mouse";g.rQ="touch";return g}()});
define("tdv/player/view/panorama/renderer/pointer/Beam",["require","exports","tdv/player/view/panorama/renderer/pointer/Pointer","tdv/view/constants/Cursor"],function(a,l,k,n){return function(){function g(h,e,b,c,d){d===void 0&&(d=!0);this.ue=h;this.Os=e;this.c0=b;this.Wf=c;this.eya=d;this.Mua=[];this.Ul=[];this.rU={};this.Pea=[];this.hc="";this.oD=Number.MAX_VALUE}g.prototype.Bw=function(){return this.ue};g.prototype.wO=function(){return this.c0};g.prototype.pw=function(){return this.ue.getType()==
k.qQ};g.prototype.Ana=function(){return this.ue.getType()==k.sQ};g.prototype.sJ=function(){return this.ue.getType()==k.rQ};g.prototype.Ieb=function(){return this.ue.getType()==k.HB};g.prototype.hGa=function(h,e){this.rU[e]=(this.rU[e]||[]).concat(h)};g.prototype.RPa=function(){return g.aSa.find(this.ceb.bind(this))};g.prototype.ceb=function(h){return this.rU[h]!==void 0&&this.rU[h].length>0?!0:!1};g.prototype.S9=function(){return Object.keys(this.rU).length>0};g.prototype.CI=function(h){this.hGa(h,
n.mf)};g.prototype.l$a=function(h){this.Pea=this.Pea.concat(h)};g.prototype.wbb=function(){return!this.RPa()&&this.Pea.length>0};g.prototype.yD=function(h){this.Ul=this.Ul.concat(h)};g.prototype.Ue=function(){return this.Ul.length>0};g.prototype.nm=function(h){h&&(this.AG===void 0||this.AG>h)&&(this.AG=h)};g.prototype.nw=function(){return this.AG};g.prototype.c5=function(h,e){if(this.hc==""||this.oD>e)this.hc=h,this.oD=e};g.prototype.ZA=function(){return this.hc};g.prototype.Yt=function(h){this.Mua=
h===void 0?[]:Array.isArray(h)?h:[h]};g.prototype.qm=function(){return this.Mua.length>0};g.aSa=[n.Li,n.gsa,n.tB,n.mf,n.lf];return g}()});
define("tdv/player/view/panorama/renderer/pointer/GazePointer","require tdv/utils tdv/constants/EventName tdv/constants/Key tdv/player/view/panorama/renderer/3d/util/RayUtil tdv/player/view/panorama/renderer/3d/util/SceneUtil tdv/player/view/panorama/renderer/object/Reticle tdv/player/view/panorama/renderer/object/ToolTip tdv/player/view/panorama/renderer/pointer/Beam tdv/player/view/panorama/renderer/pointer/Pointer tdv/player/view/util/XR".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),
n=a("tdv/constants/Key");a("tdv/player/view/panorama/renderer/3d/util/RayUtil");a("tdv/player/view/panorama/renderer/3d/util/SceneUtil");var g=a("tdv/player/view/panorama/renderer/object/Reticle"),h=a("tdv/player/view/panorama/renderer/object/ToolTip"),e=a("tdv/player/view/panorama/renderer/pointer/Beam"),b=a("tdv/player/view/panorama/renderer/pointer/Pointer"),c=a("tdv/player/view/util/XR");a=l.extend(b,function(d,f){b.call(this,b.HB,d);this.jl=this.H=null;this.Ul=[];this.Ad=this.Px=!1;this.HR=null;
this.Jxa=void 0;this.ZT=null;this.uBa=void 0;this.Le=new g;this.o.add(this.Le);this.Jq="";this.hc=new h;this.hc.set("alpha",0);this.o.add(this.hc);this.Cia=f?this.o.R.get("vrPointerSelectionTime"):void 0;this.Kxa=this.o.R.get("vrGazePointerHideTime");this.n4=this.n4.bind(this);this.$m=this.$m.bind(this);document.body.addEventListener("touchend",this.n4);document.addEventListener("keyup",this.$m,!0);c.M.bind(k.Qr,this.OFa,this,!0);this.fka();this.Aka()});a.prototype.clear=function(){document.body.removeEventListener("touchend",
this.n4);document.removeEventListener("keyup",this.$m,!0);c.M.h(k.Qr,this.OFa,this,!0);this.oja();this.o.remove(this.Le);this.Le=null;this.o.remove(this.hc);this.hc=null};a.prototype.update=function(d){this.H=d;this.H5a(d.Gn);this.km()};a.prototype.n4=function(){this.pL()};a.prototype.$m=function(d){d.code!=n.ta.$Y&&d.code!=n.ta.OK||this.pL()};a.prototype.OFa=function(){this.pL()};a.prototype.pL=function(){var d=this.Jl(k.Uf);this.gm(d);this.cI(!1);this.Mja()};a.prototype.Mja=function(){this.o.Vb().m(k.PF,
{EP:k.Uf})};a.prototype.km=function(){var d=this.Jl(k.Lm);this.gm(d);this.pz(d.ZA());a:{var f=this.Ul;for(var m=d.Ul,p=0;p<f.length;p++)if(m.indexOf(f[p])<0){f=!1;break a}for(p=0;p<m.length;p++)if(f.indexOf(m[p])<0){f=!1;break a}f=!0}f||(this.cI(!1),this.Ul=d.Ul,this.Ul.length&&this.cI(!0,d.S9()))};a.prototype.H5a=function(d){this.Px!=d&&(this.Px=d,this.Le.set("changing",this.Px),this.fka(),this.Aka())};a.prototype.cI=function(d,f){this.Ad!=d&&(this.Ad=d,this.Le.set("over",this.Ad&&f),this.fka(),
this.Aka())};a.prototype.pz=function(d){this.Jq!=d&&(this.Jq=d,this.hc.set("text",this.Jq),this.hc.set("alpha",this.Jq?1:0),this.Jq&&this.hc.wi())};a.prototype.gm=function(d){this.o.nW().sort(function(f,m){return m.get("index")-f.get("index")}).forEach(function(f){f.Zn(d)}.bind(this))};a.prototype.Jl=function(d){this.jl=this.hJa(this.H);return new e(this,this.jl?[this.jl]:[],this.jl,d)};a.prototype.Aka=function(){!this.Ad||this.Px||this.Cia===void 0?this.oja():this.Ad&&!this.ZT&&this.r7a()};a.prototype.fka=
function(){this.Ad||this.Px||this.Kxa===void 0?(this.Le.set("alpha",1),this.WDa()):this.Le.get("alpha")!=1||this.HR||this.d7a()};a.prototype.oja=function(){this.ZT&&(clearInterval(this.ZT),this.ZT=null)};a.prototype.r7a=function(){this.Le.set("overProgress",0);this.uBa=(new Date).getTime();this.ZT=setInterval(this.k3a.bind(this),100)};a.prototype.k3a=function(){var d=(new Date).getTime()-this.uBa;d>=this.Cia?(this.oja(),this.pL()):this.Le.set("overProgress",d/this.Cia)};a.prototype.WDa=function(){this.HR&&
(clearInterval(this.HR),this.HR=null)};a.prototype.d7a=function(){this.Jxa=(new Date).getTime();this.HR=setInterval(this.C2a.bind(this),10)};a.prototype.C2a=function(){var d=this.Kxa-((new Date).getTime()-this.Jxa);this.Le.set("alpha",Math.max(.01,Math.min(1,d/500)));d<=0&&this.WDa()};return a});
define("tdv/player/view/panorama/renderer/object/Laser","require tdv/utils tdv/player/view/panorama/renderer/3d/util/GeometryUtil tdv/player/view/panorama/renderer/3d/util/MaterialUtil tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource tdv/player/view/panorama/renderer/object/WebGLObject tdv/player/view/util/Color".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),n=a("tdv/player/view/panorama/renderer/3d/util/MaterialUtil"),
g=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),h=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource"),e=a("tdv/player/view/panorama/renderer/object/WebGLObject"),b=a("tdv/player/view/util/Color"),c=new THREE.Matrix4,d=Math.PI/180;a=l.extend(e,function(){e.call(this);this.set("tag","Laser");this.set("matrix",null);this.set("over",!1);this.set("pressed",!1);this.set("intersectionDistance",0);this.set("visible",!1);this.set("attachToCamera",!1);this.set("dotVisible",
!0);this.Xha=this.MT=this.qv=this.Wha=null;new THREE.Matrix4;this.Yha=new THREE.Matrix4;this.Yha.multiply(c.makeRotationX(-90*d));this.Yha.multiply(c.makeTranslation(0,f*.5,0));this.K_=this.J_=this.I_=this.$x=this.hda=null;new THREE.Matrix4;this.ida=new THREE.Matrix4;this.UQ=this.H_=this.gda=null;new THREE.Matrix4;this.vG=[new THREE.Matrix4,new THREE.Matrix4,new THREE.Matrix4];this.vG[0].multiply(c.makeRotationX(-90*d));this.vG[0].multiply(c.makeTranslation(0,-p*.5,0));this.vG[1].multiply(c.makeRotationX(-90*
d));this.vG[1].multiply(c.makeTranslation(0,-p*.5,-m*.5));this.vG[2].multiply(c.makeRotationX(-90*d));this.vG[2].multiply(c.makeTranslation(0,-p*.5,-m))});a.prototype.ya=function(q){e.prototype.ya.call(this,q);this.Cka();this.uD()};a.prototype.Cka=function(){this.W("visible")&&(this.get("meshGroup").visible=this.get("visible"));this.W("dotVisible")&&g.Bf([this.J_,this.H_],this.get("dotVisible")?1:0)};a.prototype.uD=function(){this.W("over","pressed")&&(this.QEa(),this.mFa())};var f=.35,m=.012,p=.1;
a.prototype.Yp=function(){this.H_=g.create(new THREE.SphereGeometry(2.3,32,32),this.JXa());this.J_=g.create(new THREE.SphereGeometry(2,32,32),this.KXa());this.Xha=g.create(new THREE.CylinderGeometry(.003,.003,f,8),this.kYa());this.sL=[];this.sL.push(g.create(new THREE.CylinderGeometry(m,m,p,32),this.Aca()));this.sL.push(g.create(new THREE.BoxGeometry(2*m,p,m),this.Aca()));this.sL.push(g.create(new THREE.CylinderGeometry(m,m,p,32),this.Aca()));return[this.H_,this.J_,this.Xha].concat(this.sL)};a.prototype.JXa=
function(){if(this.gda==null){var q=document.createElement("canvas");q.width=q.height=256;var r=q.getContext("2d"),t=new h;t.$n(q);this.gda=n.rm(t.texture(),new n.Jp);r.fillStyle="rgba(0, 0, 0, 0.75)";r.clearRect(0,0,q.width,q.height);r.fillRect(0,0,q.width,q.height)}return this.gda};a.prototype.KXa=function(){this.hda==null&&(this.$x=document.createElement("canvas"),this.$x.width=this.$x.height=256,this.I_=this.$x.getContext("2d"),this.K_=new h,this.K_.$n(this.$x),this.hda=n.rm(this.K_.texture(),
new n.Jp),this.QEa());return this.hda};a.prototype.QEa=function(){this.I_.fillStyle=this.dea();this.I_.clearRect(0,0,this.$x.width,this.$x.height);this.I_.fillRect(0,0,this.$x.width,this.$x.height);this.K_.update()};a.prototype.kYa=function(){this.Wha==null&&(this.qv=document.createElement("canvas"),this.qv.width=this.qv.height=256,this.MT=this.qv.getContext("2d"),this.Zha=new h,this.Zha.$n(this.qv),this.Wha=n.rm(this.Zha.texture(),new n.Jp),this.mFa());return[this.Wha]};a.prototype.mFa=function(){var q=
b.xp(this.dea()).join(", "),r=this.MT.createLinearGradient(0,0,0,this.qv.height);r.addColorStop(0,"rgba("+q+", 0)");r.addColorStop(.5,"rgba("+q+", 1)");r.addColorStop(1,"rgba("+q+", 1)");this.MT.fillStyle=r;this.MT.clearRect(0,0,this.qv.width,this.qv.height);this.MT.fillRect(0,0,this.qv.width,this.qv.height);this.Zha.update()};a.prototype.Aca=function(){if(this.UQ==null){var q=document.createElement("canvas");q.width=q.height=256;var r=q.getContext("2d"),t=new h;t.$n(q);this.UQ=n.rm(t.texture(),new n.Jp);
r.fillStyle="rgba(64, 64, 64, 1)";r.clearRect(0,0,q.width,q.height);r.fillRect(0,0,q.width,q.height)}return[this.UQ,this.UQ,this.UQ]};a.prototype.et=function(){var q=!1,r=!1,t=!1;if(this.W("intersectionDistance")){r=(r=this.get("intersectionDistance"))?k.fw(r):k.xt();var u=r/k.xt();this.ida.makeTranslation(0,0,-r);this.ida.multiply(c.makeScale(u,u,u));r=!0}this.W("matrix")&&(t=r=q=!0);r&&(c.identity(),(r=this.get("matrix"))&&c.multiply(r),c.multiply(this.ida),g.mt(this.J_,c),g.mt(this.H_,c));q&&(c.identity(),
(r=this.get("matrix"))&&c.multiply(r),c.multiply(this.Yha),g.mt(this.Xha,c));if(t)for(r=this.get("matrix"),q=0;q<this.sL.length;q++)c.identity(),r&&c.multiply(r),c.multiply(this.vG[q]),g.mt(this.sL[q],c)};a.prototype.uI=function(){if(this.W("index","meshGroup")){var q=this.get("meshGroup");q&&q.children.forEach(function(r){g.j9(r,this.get("index"))}.bind(this))}};a.prototype.dea=function(){return this.get("pressed")?this.La.R.get("vrPointerSelectionColor"):this.get("over")?this.La.R.get("vrPointerOverColor"):
this.La.R.get("vrPointerColor")};return a});
define("tdv/player/view/panorama/renderer/pointer/LaserPointer","require tdv/utils tdv/constants/EventName tdv/player/view/panorama/renderer/3d/util/RayUtil tdv/player/view/panorama/renderer/object/Laser tdv/player/view/panorama/renderer/object/Reticle tdv/player/view/panorama/renderer/object/ToolTip tdv/player/view/panorama/renderer/pointer/Beam tdv/player/view/panorama/renderer/pointer/Pointer tdv/player/view/util/Gamepad tdv/player/view/util/XR tdv/player/view/util/geo/Quaternion".split(" "),function(a){var l=
a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/player/view/panorama/renderer/3d/util/RayUtil"),g=a("tdv/player/view/panorama/renderer/object/Laser"),h=a("tdv/player/view/panorama/renderer/object/Reticle"),e=a("tdv/player/view/panorama/renderer/object/ToolTip"),b=a("tdv/player/view/panorama/renderer/pointer/Beam"),c=a("tdv/player/view/panorama/renderer/pointer/Pointer"),d=a("tdv/player/view/util/Gamepad"),f=a("tdv/player/view/util/XR"),m=a("tdv/player/view/util/geo/Quaternion"),p=new THREE.Matrix4,
q=Math.PI/180;a=l.extend(c,function(r){c.call(this,c.BZ,r);this.jl=this.H=null;this.Ul=[];this.al=new g;this.o.add(this.al);this.Le=new h;this.o.add(this.Le);this.$l=!1;this.Jq="";this.hc=null;this.Vm=new THREE.Matrix4});a.prototype.clear=function(){this.o.remove(this.al);this.o.remove(this.Le);this.Le=this.al=null;this.hc&&this.o.remove(this.hc);this.hc=null};a.prototype.update=function(r){this.H=r;this.Le.set("changing",r.Gn);this.Le.set("visible",r.Gn);var t=d.Sg();if(t&&!t.Keb()){var u=t.quaternion(),
v=t.position(),w=f.zg&&f.Ic,y=m.$a(f.zg&&f.ug);this.Vm.identity();v?(this.Vm.multiply(p.makeRotationY((y-r.$a)*q)),this.Vm.multiply(p.makeTranslation(-w.x,-w.y,-w.z)),this.Vm.multiply(p.makeTranslation(v.x,v.y,v.z)),this.Vm.multiply(p.makeRotationFromQuaternion(u))):(this.Vm.multiply(p.makeRotationY(-r.$a*q)),t.hand()==d.eb?this.Vm.multiply(p.makeTranslation(-.2,-.4,0)):this.Vm.multiply(p.makeTranslation(.2,-.4,0)),this.Vm.multiply(p.makeRotationY(y*q)),this.Vm.multiply(p.makeRotationFromQuaternion(u)),
this.Vm.multiply(p.makeTranslation(0,0,-.3)));this.al.set("matrix",null);this.al.set("matrix",this.Vm);this.al.set("pressed",t.pressed());this.al.set("visible",!0)}else this.al.set("visible",!1);this.km();r=!!t&&t.pressed();this.$l!=r&&(this.$l&&this.pL(),this.$l=r);this.al.wi();this.Le.wi()};a.prototype.pL=function(){var r=this.Jl(k.Uf);this.gm(r);this.al.set("over",!0);this.al.set("dotVisible",!0);this.al.set("intersectionDistance",r.nw());d.Sg();this.Mja()};a.prototype.Mja=function(){this.o.Vb().m(k.PF,
{EP:k.Uf})};a.prototype.km=function(){var r=this.Jl(k.Lm);this.gm(r);this.pz(r.ZA());a:{var t=this.Ul;for(var u=r.Ul,v=0;v<t.length;v++)if(u.indexOf(t[v])<0){t=!1;break a}for(v=0;v<u.length;v++)if(t.indexOf(u[v])<0){t=!1;break a}t=!0}t||!r.S9()&&!this.al.get("over")||(this.Ul=r.Ul,d.Sg());this.al.set("over",r.S9());this.al.set("intersectionDistance",r.nw());this.al.set("dotVisible",!r.wbb())};a.prototype.pz=function(r){this.Jq!=r&&(this.Jq&&this.o.remove(this.hc),this.Jq=r)&&(this.hc=new e(this.Jq),
this.hc.set("text",this.Jq),this.hc.set("matrix",null),this.hc.set("matrix",this.Vm),this.o.add(this.hc))};a.prototype.gm=function(r){this.o.nW().sort(function(t,u){return u.get("index")-t.get("index")}).forEach(function(t){t.Zn(r)}.bind(this))};a.prototype.Jl=function(r){this.jl=n.Icb(this.Vm,this.jl);return new b(this,[this.jl],this.hJa(this.H),r)};return a});
define("tdv/player/view/panorama/renderer/pointer/MousePointer","require tdv/utils tdv/constants/EventName tdv/player/view/panorama/renderer/3d/util/RayUtil tdv/player/view/panorama/renderer/3d/util/SceneUtil tdv/player/view/panorama/renderer/pointer/Beam tdv/player/view/panorama/renderer/pointer/Pointer tdv/view/constants/Cursor".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/player/view/panorama/renderer/3d/util/RayUtil"),g=a("tdv/player/view/panorama/renderer/3d/util/SceneUtil"),
h=a("tdv/player/view/panorama/renderer/pointer/Beam"),e=a("tdv/player/view/panorama/renderer/pointer/Pointer"),b=a("tdv/view/constants/Cursor");a=l.extend(e,function(c){e.call(this,e.qQ,c);this.o.R.bind(k.fb,this.cl,this,!0);this.o.R.bind(k.Jr,this.Mya,this,!0);this.o.R.bind(k.Eb,this.U4a,this,!0);this.o.R.bind(k.Ra,this.re,this,!0);this.o.R.bind(k.ab,this.dl,this,!0);this.Zy=this.Yy=this.cz=this.gp=this.zd=this.yd=void 0;this.jl=this.H=null;this.oN=void 0;this.hc=""});a.prototype.clear=function(){this.o.R.h(k.fb,
this.cl,this,!0);this.o.R.h(k.Jr,this.Mya,this,!0);this.o.R.h(k.Ra,this.re,this,!0);this.o.R.h(k.ab,this.dl,this,!0);this.Gka&&(this.o.mP(b.mf),this.Gka=!1);this.pz("")};a.prototype.update=function(c){this.H=c;this.nka()};a.prototype.wJa=function(){return{x:this.yd,y:this.zd,pageX:this.Yy,pageY:this.Zy}};a.prototype.cl=function(c){this.yd=c.x;this.zd=c.y;this.Yy=c.pageX;this.Zy=c.pageY;this.F4()};a.prototype.Mya=function(){this.Zy=this.Yy=this.zd=this.yd=void 0;this.F4()};a.prototype.U4a=function(){this.Zy=
this.Yy=this.zd=this.yd=void 0;this.F4()};a.prototype.re=function(c){this.yd=this.gp=c.x;this.zd=this.cz=c.y;this.Yy=c.pageX;this.Zy=c.pageY;this.gm(this.Jl(k.vu))};a.prototype.dl=function(c){this.yd=c.x;this.zd=c.y;this.Yy=c.pageX;this.Zy=c.pageY;this.gm(this.Jl(k.EB));this.wfa(this.gp,this.cz,this.yd,this.zd)&&this.gm(this.Jl(k.Uf))};a.prototype.nka=function(){this.ft||(this.ft=setTimeout(function(){this.ft=null;this.km()}.bind(this),300))};a.prototype.F4=function(){this.ft&&(clearTimeout(this.ft),
this.ft=null);this.km()};a.prototype.km=function(){var c=this.Jl(k.Lm);this.gm(c);this.pz(c.ZA());c=c.RPa();this.oN!=c&&(this.oN&&this.o.mP(this.oN),(this.oN=c)&&this.o.x8(this.oN))};a.prototype.pz=function(c){this.hc!=c&&(this.hc=c,this.o.R.set("toolTip",this.hc))};a.prototype.gm=function(c){this.o.nW().sort(function(d,f){return f.get("index")-d.get("index")}).forEach(function(d){d.Zn(c)}.bind(this))};a.prototype.Jl=function(c){return new h(this,this.h0(),null,c)};a.prototype.h0=function(){if(this.yd!==
void 0&&this.zd!==void 0&&this.H.oh){var c=g.getCamera(this.H.oh);if(c)return this.jl=n.xJa(c,this.yd,this.zd,this.H.width,this.H.height,this.jl),[this.jl]}return[]};a.prototype.wfa=function(c,d,f,m){c=f-c;d=m-d;return Math.sqrt(c*c+d*d)<=5};return a});
define("tdv/player/view/panorama/renderer/pointer/TouchPointer","require tdv/utils tdv/constants/EventName tdv/player/view/panorama/renderer/3d/util/RayUtil tdv/player/view/panorama/renderer/3d/util/SceneUtil tdv/player/view/panorama/renderer/pointer/Beam tdv/player/view/panorama/renderer/pointer/Pointer".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/player/view/panorama/renderer/3d/util/RayUtil"),g=a("tdv/player/view/panorama/renderer/3d/util/SceneUtil"),h=a("tdv/player/view/panorama/renderer/pointer/Beam"),
e=a("tdv/player/view/panorama/renderer/pointer/Pointer");a=l.extend(e,function(c){e.call(this,e.rQ,c);this.R=this.o.R;this.R.bind(k.Ra,this.re,this,!0);this.R.bind(k.ab,this.dl,this,!0);this.R.bind(k.N("touchOverAreaScale"),this.aha,this,!0);this.cz=this.gp=this.zd=this.yd=void 0;this.Pua=this.H=null;this.aha();this.Y3a=Array(b.length);this.hc="";this.km=this.km.bind(this)});a.prototype.clear=function(){this.R.h(k.Ra,this.re,this,!0);this.R.h(k.ab,this.dl,this,!0);this.R.h(k.N("touchOverAreaScale"),
this.aha,this,!0);this.pz("")};a.prototype.update=function(c){this.H=c;this.nka()};a.prototype.re=function(c){this.yd=this.gp=c.x;this.zd=this.cz=c.y;this.gm(this.Jl(k.vu))};a.prototype.dl=function(c){this.yd=c.x;this.zd=c.y;this.gm(this.Jl(k.EB));this.wfa(this.gp,this.cz,this.yd,this.zd)&&this.gm(this.Jl(k.Uf))};a.prototype.nka=function(){this.ft||(this.ft=setTimeout(this.km,300))};a.prototype.F4=function(){this.ft&&(clearTimeout(this.ft),this.ft=null);this.km()};a.prototype.km=function(){this.ft=
null;var c=this.Jl(k.Lm);this.gm(c);this.pz(c.ZA())};a.prototype.pz=function(c){if(this.hc!=c&&(this.hc=c,c=this.o.R,c.set("toolTip",this.hc),!c.get("toolTipDisabled"))){var d=c.Vb().hc;this.hc?d.tjb(c,this.hc):d.Qe()}};a.prototype.gm=function(c){this.o.nW().sort(function(d,f){return f.get("index")-d.get("index")}).forEach(function(d){d.Zn(c)}.bind(this))};a.prototype.Jl=function(c){var d=c==k.Lm?this.h0(this.H.width*.5,this.H.height*.5,this.Nua,this.Pua):this.h0(this.yd,this.zd,b,this.Y3a);return new h(this,
d,null,c)};a.prototype.h0=function(c,d,f,m){var p=this.H.oh&&g.getCamera(this.H.oh);if(p){var q=this.H.width,r=this.H.height,t=Math.min(q,r)/100;f.forEach(function(u,v){m[v]=n.xJa(p,c+u[0]*t,d+u[1]*t,q,r,m[v])});return m}return[]};a.prototype.wfa=function(c,d,f,m){c=f-c;d=m-d;return Math.sqrt(c*c+d*d)<=4*Math.round(1*Math.min(window.screen.width,window.screen.height)/100)};a.prototype.aha=function(){this.Nua=this.$Za(this.R.get("touchOverAreaScale"));this.Pua=Array(this.Nua.length)};a.prototype.$Za=
function(c){var d=[],f=Math.min(50,Math.ceil(c*5)),m=Math.min(50,Math.ceil(c*30));c=Math.min(50,Math.ceil(c*15));for(var p=-f;p<=f;p++)for(var q=-f;q<=f;q++){var r=Math.sqrt(q*q+p*p);r<=f&&d.push([q,p,r])}for(q=-m;q<-f;q++)d.push([q,0,Math.sqrt(q*q)]);for(q=f+1;q<=m;q++)d.push([q,0,Math.sqrt(q*q)]);for(p=-c;p<-f;p++)d.push([0,p,Math.sqrt(p*p)]);for(p=f+1;p<=c;p++)d.push([0,p,Math.sqrt(p*p)]);d.sort(function(t,u){return t[2]-u[2]});return d.map(function(t){return[t[0],t[1]]})};var b=function(){for(var c=
[],d=0;d<5;d++)for(var f=-2+4*d/4,m=0;m<5;m++){var p=-2+4*m/4,q=Math.sqrt(p*p+f*f);q<=2&&c.push([p,f,q])}c.sort(function(r,t){return r[2]-t[2]});return c.map(function(r){return[r[0],r[1]]})}();return a});
define("tdv/player/view/panorama/renderer/pointer/WebXRPointer","require exports tdv/constants/EventName tdv/player/view/panorama/renderer/object/ToolTip tdv/player/view/panorama/renderer/pointer/Beam tdv/player/view/panorama/renderer/pointer/Pointer tdv/player/view/panorama/renderer/3d/util/GeometryUtil tdv/player/view/util/XR three.mod".split(" "),function(a,l,k,n,g,h,e,b,c){function d(r,t){for(var u=0;u<r.length;u++)if(t.indexOf(r[u])<0)return!1;for(u=0;u<t.length;u++)if(r.indexOf(t[u])<0)return!1;
return!0}a=function(r){function t(u){u=r.call(this,h.sQ,u)||this;u.Gn=!1;u.CNa=new Map;u.lP=new Map;u.QW=null;u.Iqa=u.Iqa.bind(u);document.body.addEventListener("touchend",u.Iqa);b.M.bind(k.Uf,u.Ht,u,!0);return u}O(t,r);t.prototype.clear=function(){b.M.h(k.Uf,this.Ht,this);this.lP.forEach(function(u,v,w){this.ZHa(u);w.delete(v)}.bind(this))};t.prototype.update=function(u){this.state=u;this.Mkb();this.NA(u.Gn);this.NP()};t.prototype.Ht=function(u){this.QW=u=u.data.pointerState;u.Pz||this.FOa(u)};t.prototype.Iqa=
function(){var u=b.nd[0]||null;u&&!u.Pz&&this.FOa(u)};t.prototype.FOa=function(u){f.copy(u.ray).applyMatrix4(u.matrixWorld);var v=new g(this,[f],b.wO,k.Uf,this.QW==u);this.EOa(v);b.KE(u,!1,!1,u.nw);b.NX(u,50);this.vkb()};t.prototype.NA=function(u){this.Gn!==u&&(this.Gn=u,b.nd.forEach(function(v){b.Fib(v,u)}))};t.prototype.Mkb=function(){this.lP.forEach(function(u,v){b.nd.includes(v)||(this.ZHa(u),this.lP.delete(v))}.bind(this));b.nd.forEach(function(u){this.lP.has(u)||this.lP.set(u,this.mbb());b.a9(u,
!1)}.bind(this))};t.prototype.NP=function(){var u=b.nd.find(function(A){return A.Pz})?[]:b.nd;this.QW=this.QW||(b.nd.length?b.nd.find(function(A){return A.handedness=="right"})||b.nd[0]:null);for(var v=0;v<u.length;v++){var w=u[v];f.copy(w.ray).applyMatrix4(w.matrixWorld);var y=new g(this,[f],b.wO,k.Lm,this.QW==w);this.EOa(y);this.slb(y,w);var x=this.CNa.get(w),z=y.Ul;x&&d(x,z)||(this.CNa.set(w,z),x=(x=y.nw())?e.fw(x):e.xt(),z=z.length>0,((y=y.S9())||w.br)&&b.NX(w,5),b.KE(w,z,y,x))}};t.prototype.slb=
function(u,v){var w=u.ZA()||"",y=this.lP.get(v);y&&w!==y.get("text")&&(w?(y.set("text",w),y.set("alpha",1),y.wi(),w=(w=u.nw())?e.fw(w):e.xt(),m.radius=w,y.set("intersectionYaw",void 0),y.set("intersectionPitch",void 0),f.copy(v.ray).applyMatrix4(v.matrixWorld),f.intersectSphere(m,p)&&(p.x==0&&p.z==0||y.set("intersectionYaw",q*Math.atan2(p.x,-p.z)),p.y==0&&p.z==0||y.set("intersectionPitch",q*Math.atan2(p.y,Math.sqrt(p.z*p.z+p.x*p.x))),y.set("intersectionDistance",u.nw()))):(y.set("text",""),y.set("alpha",
0)))};t.prototype.EOa=function(u){this.o.nW().sort(function(v,w){return w.get("index")-v.get("index")}).forEach(function(v){v.Zn(u)}.bind(this))};t.prototype.vkb=function(){var u=this.o.Vb();u&&u.m(k.PF,{EP:k.Uf})};t.prototype.mbb=function(){var u=new n;u.set("alpha",0);this.o.add(u);return u};t.prototype.ZHa=function(u){this.o.remove(u)};return t}(h);var f=new c.Ray,m=new c.Sphere,p=new c.Vector3,q=180/Math.PI;return a});
define("tdv/player/view/panorama/renderer/pointer/Factory","require tdv/player/view/panorama/renderer/pointer/GazePointer tdv/player/view/panorama/renderer/pointer/LaserPointer tdv/player/view/panorama/renderer/pointer/MousePointer tdv/player/view/panorama/renderer/pointer/Pointer tdv/player/view/panorama/renderer/pointer/TouchPointer tdv/player/view/panorama/renderer/pointer/WebXRPointer".split(" "),function(a){var l=a("tdv/player/view/panorama/renderer/pointer/GazePointer"),k=a("tdv/player/view/panorama/renderer/pointer/LaserPointer"),
n=a("tdv/player/view/panorama/renderer/pointer/MousePointer"),g=a("tdv/player/view/panorama/renderer/pointer/Pointer"),h=a("tdv/player/view/panorama/renderer/pointer/TouchPointer"),e=a("tdv/player/view/panorama/renderer/pointer/WebXRPointer");return{create:function(b,c){switch(b){case g.sQ:return new e(c);case g.HB:return new l(c,!0);case g.AZ:return new l(c,!1);case g.BZ:return new k(c);case g.qQ:return new n(c);case g.rQ:return new h(c)}}}});
define("tdv/player/view/panorama/renderer/util/CursorManager",["require","tdv/view/constants/Cursor"],function(a){function l(n){this.cc=n;this.Ff=[]}var k=a("tdv/view/constants/Cursor");l.prototype.push=function(n){this.Ff.push(n);this.ya()};l.prototype.pop=function(n){for(var g=this.Ff.length-1;g>=0;g--)if(this.Ff[g]==n){this.Ff.splice(g,1);this.ya();break}};l.prototype.clear=function(){this.Ff.length>0&&(this.cc.set("cursor",k.lf),this.Ff=[])};l.prototype.ya=function(){this.cc.set("cursor",this.Ff.indexOf(k.Li)>=
0?k.Li:this.Ff.indexOf(k.mf)>=0?k.mf:this.Ff.length>0?this.Ff[this.Ff.length-1]:k.lf)};return l});
define("tdv/player/view/panorama/renderer/Renderer","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/Event tdv/view/core/UIComponent tdv/view/constants/Cursor tdv/player/view/util/Device tdv/player/view/util/Gamepad tdv/player/view/util/geo/Frustum tdv/player/view/Flash tdv/player/view/panorama/renderer/RendererState tdv/player/view/panorama/renderer/3d/Renderer tdv/player/view/panorama/renderer/object/Factory tdv/player/view/panorama/renderer/object/Root tdv/player/view/panorama/renderer/pointer/Factory tdv/player/view/panorama/renderer/pointer/Pointer tdv/player/view/panorama/renderer/util/CursorManager tdv/player/view/panorama/renderer/OcclusionCuller tdv/player/view/panorama/renderer/TextureLoader tdv/player/view/util/geo/Fov tdv/player/view/util/XR tdv/view/util/Animation tdv/view/util/Screenshot".split(" "),function(a){var l=
a("tdv/utils"),k=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/events/Event"),h=a("tdv/view/core/UIComponent"),e=a("tdv/view/constants/Cursor"),b=a("tdv/player/view/util/Device"),c=a("tdv/player/view/util/Gamepad"),d=a("tdv/player/view/util/geo/Frustum"),f=a("tdv/player/view/Flash"),m=a("tdv/player/view/panorama/renderer/RendererState"),p=a("tdv/player/view/panorama/renderer/3d/Renderer"),q=a("tdv/player/view/panorama/renderer/object/Factory"),r=a("tdv/player/view/panorama/renderer/object/Root"),
t=a("tdv/player/view/panorama/renderer/pointer/Factory"),u=a("tdv/player/view/panorama/renderer/pointer/Pointer"),v=a("tdv/player/view/panorama/renderer/util/CursorManager"),w=a("tdv/player/view/panorama/renderer/OcclusionCuller"),y=a("tdv/player/view/panorama/renderer/TextureLoader"),x=a("tdv/player/view/util/geo/Fov"),z=a("tdv/player/view/util/XR"),A=a("tdv/view/util/Animation"),D=a("tdv/view/util/Screenshot"),E=Math.PI/180,B=l.extend(h,function(C,F,G){h.call(this);this.df("Renderer");this.set("toolTipDisabled",
!0);this.set("cursor",e.wB);this.set("layout","absolute");this.set("interactionEnabled",!1);this.Ee=C;this.R=F;this.ld=G;this.Je=new v(F);this.ue=null;this.Yda=!1;this.H=new m;this.La=new r(this.Ee,this.R,this.ld,this);this.La.bind(n.V,this.requestFrame,this,!0);this.qk=new p(this.R);this.H.oh=this.qk.Qf();this.H.LV=this.qk.Cva;this.H.MV=this.qk.Dva;this.H.camera=this.qk.getCamera();this.sya=(new Date).getTime();this.j4=new y;this.j4.bind(n.ia,this.p3a,this,!0);this.iza=new w;this.iza.bind(n.V,this.T2a,
this,!0);this.$_=new d(this.H.width,this.H.height,this.H.Ud*E);this.bind(n.Zb,this.kd,this,!0);this.bind(n.od,this.Zo,this,!0);this.bind(n.jd,this.Xo,this,!0);z.M.bind(n.V,this.nq,this,!0);c.bind(n.V,this.B2a,this,!0);k.ba(this.ld,["fxaaEnabled","aaEnabled","hotspotsEnabled","preloadEnabled"],function(){this.H.lJ=this.ld.get("hotspotsEnabled");this.H.uX=this.ld.get("preloadEnabled");this.H.vma=this.ld.get("fxaaEnabled");this.H.pV=this.ld.get("aaEnabled");this.requestFrame()}.bind(this),!0);k.ba(this.ld,
["surfaceSelectionEnabled"],this.xka.bind(this));this.xka();this.nq();k.ba(this.Ee,["defaultVRPointer"],this.Kq.bind(this));this.Kq()});B.prototype.create=function(C){return q.create(C)};B.prototype.add=function(C){this.La.appendChild(C);this.La.Cb().length==1&&this.y2a()};B.prototype.remove=function(C){if(C=this.La.cg(C))C.remove(),this.La.Cb().length==0&&this.H2a()};B.prototype.cg=function(C){return this.La.cg(C)};B.prototype.nW=function(){return this.La.all()};B.prototype.Xhb=function(C){this.Yda!=
C&&(this.Yda=C,this.Kq())};B.prototype.iPa=function(C){this.H.aoa=C};B.prototype.x8=function(C){this.Je.push(C)};B.prototype.mP=function(C){this.Je.pop(C)};B.prototype.NA=function(C){this.H.Gn=C;this.requestFrame()};B.prototype.OJ=function(){this.KG.m();this.H.nJ=!0;this.c3();var C=D.BQa(this.qk.Ig());this.H.nJ=!1;this.c3();return C};B.prototype.yla=function(C){this.H.nJ=!0;this.c3();C=this.qk.yla(C);this.H.nJ=!1;return C};B.prototype.getPixelRatio=function(){return this.qk.getPixelRatio()};B.prototype.Dt=
function(){return!!this.qk&&this.qk.Dt()};B.prototype.Ib=function(){h.prototype.Ib.call(this);this.KG||(this.KG=new f,this.va().vk(this.KG.bc()))};B.prototype.Kq=function(){var C=this.H.ob?u.sQ:this.Yda?u.AZ:b.ub()?u.rQ:u.qQ;this.ue&&this.ue.getType()==C||(this.ue&&this.ue.clear(),this.ue=t.create(C,this),this.xka(),this.ue.update(this.H))};B.prototype.xka=function(){this.H.rY=this.ld.get("surfaceSelectionEnabled")&&[u.qQ,u.sQ,u.rQ,u.AZ].indexOf(this.ue&&this.ue.getType())>=0};B.prototype.hp=function(){this.Je.clear();
h.prototype.hp.call(this)};B.prototype.kd=function(){var C=this.gb(),F=this.Kb();if(this.H.width!=C||this.H.height!=F)C&&F?(this.H.width=C,this.H.height=F,this.$_.FPa(this.H.width),this.$_.YOa(this.H.height),this.requestFrame()):l.log("Invalid size values: "+C+" "+F)};B.prototype.Zo=function(){this.H.enabled=!0;this.requestFrame()};B.prototype.Xo=function(){this.H.enabled=!1};B.prototype.nq=function(){this.H.ob=z.isPresenting;this.Kq();this.requestFrame()};B.prototype.B2a=function(){this.Kq();this.requestFrame()};
B.prototype.p3a=function(){this.requestFrame()};B.prototype.T2a=function(){this.requestFrame()};B.prototype.y2a=function(){this.j4.b9(this.R.Kc().Jn())};B.prototype.H2a=function(){this.qk.icb();this.j4.b9(null)};B.prototype.tPa=function(C){this.e3!=C&&((this.e3=C)||this.requestFrame())};B.prototype.YJ=function(C){this.H.Jk!=C&&(this.H.Jk=C,this.requestFrame())};B.prototype.setPosition=function(C,F,G,I){if(this.H.$a!=C||this.H.pitch!=F||this.H.kh!=G||this.H.Ud!=I)isNaN(C)||isNaN(F)||isNaN(G)||!I?l.log("Invalid position values: "+
C+" "+F+" "+G+" "+I):(this.H.$a=C,this.H.pitch=F,this.H.kh=G,this.H.Ud=I,this.$_.SJ(this.H.Ud*E),this.requestFrame())};B.prototype.Lc=function(){return this.H.$a};B.prototype.Jc=function(){return this.H.pitch};B.prototype.Jg=function(){return this.H.kh};B.prototype.ff=function(){return this.H.Ud};B.prototype.xO=function(){return this.H.ob?this.H.gj:x.rr(this.H.gj,this.H.width,this.H.height)};B.prototype.yO=function(){return this.H.gj};B.prototype.unproject=function(C){return this.$_.unproject(C)};
B.prototype.requestFrame=function(){A.requestFrame(this.iq,this)};B.prototype.iq=function(){if(A.P6){var C=(new Date).getTime(),F=Math.max(1,Math.min(C-this.sya,33));this.sya=C;this.m(new g(B.aaa,{frameTime:F}));this.H.enabled&&(this.H.xf=F,this.c3())}else this.requestFrame()};B.prototype.c3=function(){this.La.Cb().length!=0&&(this.qk.update(this.H),this.H.Sj=this.qk.vcb(),this.H.Rj=this.qk.ucb(),this.H.gj=this.qk.scb(),this.H.tl=this.qk.getPixelRatio(),this.H.camera=this.qk.getCamera(),this.La.update(this.H),
this.j4.update(this.H),this.iza.update(this.H),this.ue.update(this.H),this.e3||this.qk.render())};B.aaa="render start";B.znb=function(){return!0};return B});
define("tdv/player/view/panorama/control/RenderingController",["require","tdv/utils","tdv/events/Event","tdv/events/EventDispatcher","tdv/player/view/panorama/renderer/Renderer"],function(a){var l=a("tdv/utils"),k=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=a("tdv/player/view/panorama/renderer/Renderer"),h=l.extend(n,function(e){n.call(this);this.o=e;this.o.bind(g.aaa,this.VAa,this,!0)});h.prototype.clear=function(){this.o.h(g.aaa,this.VAa,this,!0);this.o=null};h.prototype.requestFrame=
function(){this.o.requestFrame()};h.prototype.VAa=function(e){e=e.data.frameTime;this.m(new k(h.uF,{frameTime:e}));this.m(new k(h.vF,{frameTime:e}))};h.uF="frameStart";h.vF="positionSet";return h});
define("tdv/player/view/panorama/control/camera/OrientationFOVManager",["require","tdv/player/view/util/Device","tdv/player/view/util/geo/Fov"],function(a){function l(){this.Ha=this.Pa=0;this.kb=90;this.Gs="landscape";this.ap=0;this.D0=k.ub()}var k=a("tdv/player/view/util/Device"),n=a("tdv/player/view/util/geo/Fov");l.prototype.ePa=function(g){this.kb=this.OIa(g)};l.prototype.OIa=function(g){return this.D0&&this.Gs=="portrait"?n.QI(g,this.Ha,this.Pa):g};l.prototype.Scb=function(g){return this.D0&&
this.Gs=="portrait"?n.xm(g,this.Pa,this.Ha):g};l.prototype.hr=function(g){this.kb=this.D0&&this.Rmb?n.QI(g,this.Ha,this.Pa):g};l.prototype.bw=function(){return this.D0&&this.Gs=="portrait"};l.prototype.ff=function(){return this.kb};l.prototype.KV=function(g){return n.QI(g,this.Ha,this.Pa)};l.prototype.setSize=function(g,h){this.Pa=g;this.Ha=h;g=this.P_a();this.Gs!=g&&this.ap++;this.Gs=g};l.prototype.P_a=function(){return this.Pa===0||this.Ha===0?"landscape":this.Pa<this.Ha?"portrait":"landscape"};
return l});
define("tdv/player/view/panorama/control/translate/KeyboardManager","require tdv/utils tdv/constants/Key tdv/events/Event tdv/events/EventDispatcher tdv/view/util/KeyboardControl".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/Key"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),h=a("tdv/view/util/KeyboardControl"),e=l.extend(g,function(d){g.call(this);this.o=d;this.ha=!1;this.$m=this.$m.bind(this);this.ld=this.o.ld});e.prototype.clear=function(){this.ld=this.o=null};e.prototype.Ua=
function(d){this.ha!=d&&(this.ha&&document.removeEventListener("keyup",this.$m),(this.ha=d)&&document.addEventListener("keyup",this.$m))};e.prototype.$m=function(d){h.rp()||this.ld.get("gazeModeEnabled")||this.ld.get("arrowKeysAction")!="translate"||(c.includes(d.which)&&!d.shiftKey?this.m(new n(e.R$)):b.includes(d.which)&&!d.shiftKey&&this.m(new n(e.S$)))};const b=[k.bk,k.so],c=[k.Ji,k.oo];e.S$="moveForward";e.R$="moveBackward";return e});
define("tdv/player/view/panorama/control/translate/Controller","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/panorama/control/translate/KeyboardManager".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),h=a("tdv/player/view/panorama/control/translate/KeyboardManager");a=l.extend(g,function(b){g.call(this);this.o=b;this.Qo=new h(b);this.Qo.bind(h.S$,this.Xza,this,
!0);this.Qo.bind(h.R$,this.Wza,this,!0)});a.prototype.clear=function(){this.Qo.h(h.S$,this.Xza,this,!0);this.Qo.h(h.R$,this.Wza,this,!0);this.Qo.clear();this.Qo=null};a.prototype.EE=function(b){this.Qo.Ua(b)};a.prototype.Sf=function(b){this.Aa=b};a.prototype.end=function(){this.Aa=null};a.prototype.Xza=function(b){this.BEa(b);(b=this.KCa(this.o.Lc(),this.fxa()))&&b.m(k.Qr)};a.prototype.Wza=function(b){this.BEa(b);(b=this.KCa(this.o.Lc()-180,this.fxa()))&&b.m(k.Qr)};a.prototype.BEa=function(b){this.o.Vb().m(new n(k.PF,
{EP:b}))};a.prototype.fxa=function(){return this.o.ld.get("keyboardTranslateSelectionAngle")};a.prototype.KCa=function(b,c){var d,f;if(!this.Aa)return null;d!==void 0||(d=-90);f!==void 0||(f=360);var m=b-c*.5,p=b+c*.5,q=Math.max(-90,d-f*.5),r=Math.max(90,d+f*.5);c=this.Aa.get("adjacentPanoramas",[]).slice();c=c.filter(function(t){if(!t.get("enabled"))return!1;t=this.hs(t);if(!t)return!1;var u=t.$a;for(var v=b-180,w=b+180;u<v;)u+=w-v;for(;u>w;)u-=w-v;t=t.pitch;return m<=u&&u<=p&&q<=t&&t<=r}.bind(this));
if(c.length==0)return null;c.sort(function(t,u){t=this.hs(t);u=this.hs(u);return(b-t.$a)*(b-t.$a)+(d-t.pitch)*(d-t.pitch)-((b-u.$a)*(b-u.$a)+(d-u.pitch)*(d-u.pitch))}.bind(this));return c[0]};a.prototype.hs=function(b){var c=b.get("yaw");b=b.get("distance");if(c===void 0||b===void 0)return null;var d=this.Aa.get("distanceToFloor");return{$a:c,pitch:-90+Math.atan2(b,d)*e}};var e=180/Math.PI;return a});
define("tdv/player/view/panorama/control/Controller","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/panorama/control/AudioController tdv/player/view/panorama/control/camera/Controller tdv/player/view/panorama/control/transition/Controller tdv/player/view/panorama/control/FramesController tdv/player/view/panorama/control/LoadController tdv/player/view/panorama/control/MapController tdv/player/view/panorama/control/RenderingController tdv/player/view/panorama/control/camera/OrientationFOVManager tdv/player/view/panorama/control/translate/Controller tdv/player/view/util/geo/Projection".split(" "),function(a){var l=
a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),h=a("tdv/player/view/panorama/control/AudioController"),e=a("tdv/player/view/panorama/control/camera/Controller"),b=a("tdv/player/view/panorama/control/transition/Controller"),c=a("tdv/player/view/panorama/control/FramesController"),d=a("tdv/player/view/panorama/control/LoadController"),f=a("tdv/player/view/panorama/control/MapController"),m=a("tdv/player/view/panorama/control/RenderingController"),
p=a("tdv/player/view/panorama/control/camera/OrientationFOVManager"),q=a("tdv/player/view/panorama/control/translate/Controller"),r=a("tdv/player/view/util/geo/Projection"),t=l.extend(g,function(u,v){g.call(this);this.R=u;this.o=v;this.o.set("visible",!1);this.Bc=new p;this.dm=new m(this.o);this.Be=new d(this.o);this.ac=new b(this.R,this.o,this.Bc);this.yb=new e(this.o,this.Bc);this.og=new c(this.o);this.Iy=new f(this.o);this.ne=new h(this.o);this.q4=new q(this.o);this.dm.bind(m.uF,this.iT,this,!0);
this.dm.bind(m.vF,this.jT,this,!0);this.Be.bind(k.ud,this.fAa,this,!0);this.Be.bind(k.Dg,this.TS,this,!0);this.Be.bind(k.xc,this.Ej,this,!0);this.ac.bind(b.oc,this.Yf,this,!0);this.ac.bind(b.baa,this.gAa,this,!0);this.ac.bind(b.T$,this.yAa,this,!0);this.ac.bind(b.z$,this.oza,this,!0);this.ac.bind(b.A$,this.pza,this,!0);this.ac.bind(b.qF,this.bT,this,!0);this.ac.bind(b.oF,this.OC,this,!0);this.ac.bind(b.pF,this.Uy,this,!0);this.ac.bind(b.nF,this.aT,this,!0);this.ac.bind(b.Br,this.RC,this,!0);this.yb.bind(e.oc,
this.Yf,this,!0);this.yb.bind(e.Bl,this.ys,this);this.yb.bind(e.Ar,this.Yo,this);this.yb.bind(e.gd,this.Kf,this,!0);this.yb.bind(e.ak,this.Es,this,!0);this.yb.bind(e.$j,this.Ds,this,!0);this.og.bind(c.oc,this.Yf,this,!0);this.og.bind(c.Pk,this.Cs,this,!0);this.og.bind(c.gd,this.Kf,this,!0);this.Iy.bind(f.nj,this.mAa,this,!0)});t.prototype.clear=function(){this.Be.clear();this.dm.clear();this.yb.clear();this.ac.clear();this.og.clear();this.Iy.clear();this.ne.clear();this.Be.h(k.ud,this.fAa,this);this.Be.h(k.Dg,
this.TS,this);this.Be.h(k.xc,this.Ej,this);this.dm.h(m.uF,this.iT,this);this.dm.h(m.vF,this.jT,this);this.ac.h(b.oc,this.Yf,this);this.ac.h(b.baa,this.gAa,this);this.ac.h(b.T$,this.yAa,this);this.ac.h(b.z$,this.oza,this);this.ac.h(b.A$,this.pza,this);this.ac.h(b.qF,this.bT,this);this.ac.h(b.oF,this.OC,this);this.ac.h(b.pF,this.Uy,this);this.ac.h(b.nF,this.aT,this);this.ac.h(b.Br,this.RC,this);this.yb.h(e.zSa,this.Yf,this);this.yb.h(e.Bl,this.ys,this);this.yb.h(e.Ar,this.Yo,this);this.yb.h(e.gd,this.Kf,
this,!0);this.yb.h(e.ak,this.Es,this);this.yb.h(e.$j,this.Ds,this);this.og.h(c.oc,this.Yf,this);this.og.h(c.Pk,this.Cs,this);this.og.h(c.gd,this.Kf,this);this.Iy.h(f.nj,this.mAa,this);this.R=this.o=this.q4=this.ne=this.Iy=this.og=this.ac=this.yb=this.dm=this.Be=null};t.prototype.V8=function(u){this.Iy.V8(u)};t.prototype.Mpa=function(u){this.ac.Mpa(u)};t.prototype.Sf=function(u,v,w){this.o.set("visible",!0);this.og.r9();u.set("currentTime",w);this.ac.start(u,v)};t.prototype.QD=function(){return this.Be.Aa||
this.ac.Bcb()||this.ac.Pu};t.prototype.MA=function(){this.Be.stop();this.og.end();this.yb.end();this.ac.Qe();this.Iy.stop();this.ne.end();this.q4.end()};t.prototype.rP=function(){this.yb.resume();this.og.rP()};t.prototype.hP=function(){this.yb.pause();this.og.hP()};t.prototype.play=function(){this.yb.play();this.ne.play();this.og.play()};t.prototype.pause=function(){this.yb.pause();this.ne.pause();this.og.pause()};t.prototype.stop=function(){this.yb.stop();this.ne.stop();this.og.stop()};t.prototype.EE=
function(u){this.yb.EE(u);this.q4.EE(u)};t.prototype.getTime=function(){return this.og.getTime()};t.prototype.moveTo=function(u,v,w,y,x){this.yb.moveTo(u,v,w,y,x)};t.prototype.Lc=function(){return this.o?this.o.Lc():void 0};t.prototype.Jc=function(){return this.o?this.o.Jc():void 0};t.prototype.Jg=function(){return this.o?this.o.Jg():void 0};t.prototype.ff=function(){return this.o?this.Bc.Scb(this.o.ff()):void 0};t.prototype.xO=function(){return this.o?this.o.xO():void 0};t.prototype.yO=function(){return this.o?
this.o.yO():void 0};t.prototype.Kf=function(){var u=this.og.pl()||this.yb.pl();this.m(new n(t.gd,{state:u}))};t.prototype.wl=function(u){this.yb.wl(u)};t.prototype.TX=function(u){this.yb.TX(u)};t.prototype.GE=function(u){this.yb.GE(u)};t.prototype.UX=function(u){this.yb.UX(u)};t.prototype.Ag=function(u){this.og.Ag(u)};t.prototype.ZJ=function(u){this.yb.ZJ(u)};t.prototype.Yma=function(u,v){return(u=r.get(u,v,this.o.Lc(),this.o.Jc(),this.o.Jg(),this.o.ff(),this.o.gb(),this.o.Kb()))?{x:u.x,y:u.y}:null};
t.prototype.bdb=function(u,v){return(u=r.Elb(u,v,this.o))?{yaw:u.$a,pitch:u.pitch}:null};t.prototype.OJ=function(){this.o.OJ()};t.prototype.pna=function(){return this.ac.pna()};t.prototype.gAa=function(u){this.Be.start(u.data.panorama)};t.prototype.Ej=function(u){this.o.NA(u.percent<100);this.m(new n(t.ix,{percent:u.percent}))};t.prototype.fAa=function(u){this.og.end();this.q4.Sf(u.data.panorama)};t.prototype.TS=function(){this.o.NA(!1);this.m(new n(t.hF))};t.prototype.Yf=function(){this.dm.requestFrame()};
t.prototype.iT=function(u){u=u.data.frameTime;this.Bc.setSize(this.o.gb(),this.o.Kb());this.ac.JA(u);this.yb.JA(u)};t.prototype.jT=function(u){u=u.data.frameTime;this.ac.xe(u);this.yb.xe(u);this.og.xe(u);this.Iy.xe(u);this.ne.xe(u)};t.prototype.bT=function(u){this.Iy.display(u.data.panorama);this.og.HO(u.data.panorama);this.m(new n(t.qF,{panorama:u.data.panorama}))};t.prototype.yAa=function(u){this.Iy.Qe(u.data.panorama)};t.prototype.oza=function(u){this.og.start(u.data.panorama);this.ne.start(u.data.panorama)};
t.prototype.pza=function(){this.og.end();this.o.set("visible",!1)};t.prototype.aT=function(u){this.yb.end();this.ne.end(u.data.nextPanorama);this.m(new n(t.nF,{panorama:u.data.panorama}))};t.prototype.Uy=function(u){this.yb.start(u.data.panorama,u.data.camera);this.m(new n(t.pF,{panorama:u.data.panorama}))};t.prototype.OC=function(u){this.m(new n(t.oF,{panorama:u.data.panorama}))};t.prototype.mAa=function(u){this.yb.Upa(u.data.yawDelta,0)};t.prototype.ys=function(u){this.m(new n(t.Bl,u.data))};t.prototype.Yo=
function(u){this.m(new n(t.Ar,u.data))};t.prototype.RC=function(u){this.m(new n(t.Br,u.data))};t.prototype.Es=function(){this.og.PP();this.m(new n(t.ak))};t.prototype.Ds=function(){this.m(new n(t.$j))};t.prototype.VOa=function(u){this.og.WJ(u)};t.prototype.DE=function(u){this.og.DE(u)};t.prototype.Cs=function(u){this.m(new n(t.Pk,u.data))};t.ix="loadingProgress";t.hF="loadingEnd";t.Bl="movementChange";t.Ar="positionChange";t.qF="panoramaStart";t.nF="panoramaEnd";t.pF="panoramaShow";t.oF="panoramaHide";
t.gd="playbackStateChange";t.ak="userInteractionStart";t.$j="userInteractionEnd";t.Pk="timeChange";t.Br="transitionEnd";return t});
define("tdv/player/script/PanoramaPlayer","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/constants/PlaybackState tdv/player/constants/RotationMode tdv/player/parser/ClassInfo tdv/player/script/helper/ButtonProperty tdv/player/script/PlaybackMediaPlayer tdv/player/script/PanoramaCamera tdv/player/view/panorama/control/Controller tdv/player/view/panorama/control/constants/Movement tdv/player/view/panorama/renderer/Renderer tdv/player/view/util/Device tdv/player/view/util/Gyroscope tdv/player/view/util/InfoWindow tdv/player/view/util/XR tdv/view/constants/ButtonMode tdv/view/constants/State tdv/view/util/KeyboardControl".split(" "),function(a){var l=
a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/constants/PlaybackState"),h=a("tdv/player/constants/RotationMode"),e=a("tdv/player/parser/ClassInfo"),b=a("tdv/player/script/helper/ButtonProperty"),c=a("tdv/player/script/PlaybackMediaPlayer"),d=a("tdv/player/script/PanoramaCamera"),f=a("tdv/player/view/panorama/control/Controller"),m=a("tdv/player/view/panorama/control/constants/Movement"),p=a("tdv/player/view/panorama/renderer/Renderer"),q=a("tdv/player/view/util/Device"),
r=a("tdv/player/view/util/Gyroscope"),t=a("tdv/player/view/util/InfoWindow"),u=a("tdv/player/view/util/XR"),v=a("tdv/view/constants/ButtonMode"),w=a("tdv/view/constants/State"),y=a("tdv/view/util/KeyboardControl"),x=e.define("PanoramaPlayer",c,function(){c.call(this,"panorama");c.prototype.set.call(this,"rotationEnabled",!0);c.prototype.set.call(this,"zoomEnabled",!0);c.prototype.set.call(this,"surfaceSelectionEnabled",!1);c.prototype.set.call(this,"surfaceSelectionHorizontalAngle",90);c.prototype.set.call(this,
"surfaceSelectionVerticalAngle",180);c.prototype.set.call(this,"adjacentPanoramaPositionsEnabled",!1);c.prototype.set.call(this,"fxaaEnabled",!1);c.prototype.set.call(this,"aaEnabled",!1);this.qja=this.Tea=this.qC=this.b0=this.i1=this.$0=this.Xba=this.VC=this.ej=this.wba=!1;this.yea=!0;this.N3=this.Q0=this.No=this.p_=!1;this.bja=y.rp();y.aW.bind(k.V,this.D2a,this,!0);this.ds=!1;this.Z_=this.Vda=this.tf=this.$b=0;this.xha=this.zha=void 0;this.qga=!0;this.Hj=g.ca;this.jq=this.jq.bind(this);this.U=this.o=
null;this.Zya={};for(var z in x.Dx)this.Zya[z]=this.eYa(z);this.TZ=new b(this,"buttonToggleGyroscope",v.Vk);this.TZ.bind(k.Sk,function(){this.set("gyroscopeEnabled",!0)},this);this.TZ.bind(k.Nm,function(){this.set("gyroscopeEnabled",!1)},this);this.TZ.set("pressed",this.get("gyroscopeEnabled")&&r.nl);(new b(this,"buttonCardboardView",v.Ze)).bind(k.la,function(){this.set("viewMode",x.XF)},this,!0);(new b(this,"buttonVRView",v.Ze)).bind(k.la,function(){this.set("viewMode",x.XF)},this,!0);u.M.bind(k.V,
function(){this.Nja("viewMode");this.m(x.faa)},this,!0);this.SZ=new b(this,"buttonToggleGazeMode",v.Vk);this.SZ.bind(k.Sk,function(){this.set("gazeModeEnabled",!0)},this);this.SZ.bind(k.Nm,function(){this.set("gazeModeEnabled",!1)},this);this.SZ.set("pressed",this.get("gazeModeEnabled"));this.UZ=new b(this,"buttonToggleHotspots",v.Vk);this.UZ.bind(k.Sk,function(){this.set("hotspotsEnabled",!0)},this);this.UZ.bind(k.Nm,function(){this.set("hotspotsEnabled",!1)},this);this.UZ.set("pressed",this.get("hotspotsEnabled"));
this.ZZ=new b(this,"buttonToggleSurfaceSelection",v.Vk);this.ZZ.bind(k.Sk,function(){this.set("surfaceSelectionEnabled",!0)},this);this.ZZ.bind(k.Nm,function(){this.set("surfaceSelectionEnabled",!1)},this);this.ZZ.set("pressed",this.get("surfaceSelectionEnabled"));this.EWa=new b(this,"buttonScreenshot",v.Ze);this.EWa.bind(k.la,this.CCa,this,!0);this.Zd=l.ar(this.Qh,this)});x.oSa="cameraPositionChange";x.ix="loadingProgress";x.vSa="preloadMediaShow";x.faa="viewModeChange";x.prototype.moveLeft=function(){this.md(m.IK)};
x.prototype.moveRight=function(){this.md(m.JK)};x.prototype.moveUp=function(){this.md(m.KK)};x.prototype.moveDown=function(){this.md(m.HK)};x.prototype.playLeft=function(){this.md([m.IK,m.PLAYING])};x.prototype.playRight=function(){this.md([m.JK,m.PLAYING])};x.prototype.playUp=function(){this.md([m.KK,m.PLAYING])};x.prototype.playDown=function(){this.md([m.HK,m.PLAYING])};x.prototype.play=function(){this.Xl()};x.prototype.pause=function(){this.Is()};x.prototype.stop=function(){this.QC()};x.prototype.seek=
function(z){this.$H(z)};x.prototype.setFramePlaybackPosition=function(z){this.X5a(z)};x.prototype.setFrameTransitionPosition=function(z){this.Y5a(z)};x.prototype.restart=function(){this.PC()};x.prototype.zoomIn=function(){this.md(m.Bx)};x.prototype.zoomOut=function(){this.md(m.Cx)};x.prototype.resumeCamera=function(){this.T4a()};x.prototype.pauseCamera=function(){this.K3a()};x.prototype.moveTo=function(z,A,D,E){this.Yya(z,A,D,E,!1)};x.prototype.setPosition=function(z,A,D,E){this.Yya(z,A,D,E,!0)};
x.prototype.getScreenPosition=function(z,A){return this.g0a(z,A)};x.prototype.getPanoramaPosition=function(z,A){return this.Q_a(z,A)};x.prototype.saveScreenshot=function(){return this.CCa()};x.prototype.get=function(z,A){switch(z){case "currentTime":return this.U&&this.U.getTime()||0;case "viewMode":return u.isPresenting?x.XF:x.gba;case "video":z="panorama";break;case "rendererPanorama":return this.U&&this.U.QD()}if(!A)switch(z){case "mouseControlMode":A=h.dsa;break;case "touchControlMode":A=h.Xsa}return c.prototype.get.call(this,
z,A)};x.prototype.set=function(z,A){if(this.get(z)!=A){switch(z){case "application":this.wba=!0;this.Zd();break;case "startTime":this.VC=!0;this.Zd();break;case "video":case "panorama":z="panorama";this.VC=!0;this.Zd();break;case "camera":this.Xba=!0;this.Zd();break;case "viewerArea":this.ej=!0;this.Zd();break;case "displayPlaybackBar":case "hdrPanoramaDisplayPlaybackBarSteps":case "livePanoramaDisplayPlaybackBarSteps":case "buttonPlay":case "buttonPlayPause":this.ds=!0;this.Zd();break;case "mapPlayer":this.$0=
!0;this.Zd();break;case "model3DPlayer":this.i1=!0;this.Zd();break;case "gazeModeEnabled":q.H9()&&(A=!1);A&&y.rp()&&y.kpa();this.b0=!0;this.Zd();break;case "gyroscopeEnabled":this.qC=!0;this.Zd();break;case "gyroscopeVerticalDraggingEnabled":this.yea=!0;this.Zd();break;case "viewMode":A=="vr"&&(A=x.XF);A==x.XF?this.get("viewerArea").set("viewMode","vr"):this.get("viewerArea").set("viewMode","standard");A=u.isPresenting?x.XF:x.gba;break;case "hotspotsEnabled":this.Tea=!0;this.Zd();break;case "mouseControlMode":case "touchControlMode":this.p_=
!0;this.Zd();break;case "surfaceSelectionEnabled":this.qja=!0,this.Zd()}c.prototype.set.call(this,z,A)}};x.prototype.ir=function(z){this.No!=z&&((this.No=z)?document.addEventListener("keyup",this.jq,!0):document.removeEventListener("keyup",this.jq,!0),this.U&&this.U.EE(this.No),this.Q0=!0,this.Zd())};x.prototype.D2a=function(){var z=y.rp();this.bja!==z&&(this.N3=!0,this.bja=z,this.Zd())};x.prototype.jq=function(z){var A=this.get("gazeModeKeyCode");A&&!y.rp()&&z.code==A&&this.set("gazeModeEnabled",
!this.get("gazeModeEnabled"))};x.prototype.Ala=function(){return this.get("doubleClickAction")!="inherit"};x.prototype.ykb=function(){this.MJ([this])};x.prototype.Oba=function(z){c.prototype.Oba.call(this,z);z.bind(k.di,this.JFa,this,!0)};x.prototype.Uja=function(z){c.prototype.Uja.call(this,z);z.h(k.di,this.JFa,this,!0)};x.prototype.JFa=function(){switch(this.get("doubleClickAction")){case "toggle_fullscreen":var z=this.get("application").mk;z&&z.nl()&&z.toggle()}};x.prototype.eYa=function(z){var A=
x.Dx[z];z=new b(this,z,v.Ze);z.bind(k.Ra,function(){this.md(A.movement)},this);A.stopOnRelease&&z.bind(k.ab,function(){this.md(m.Dg)},this);return z};x.prototype.Qh=function(){if(this.ej||this.wba)this.ej=this.wba=!1,this.N3=this.Q0=this.p_=this.qC=this.b0=this.i1=this.$0=!0,this.Yx(),this.get("viewerArea")&&this.get("application")&&this.Xx(),this.lU(this.get("viewerArea"));var z=!1;if(this.o){this.$0&&(this.$0=!1,this.U.V8(this.get("mapPlayer")));this.i1&&(this.i1=!1,this.U.Mpa(this.get("model3DPlayer")));
this.p_&&(this.p_=!1,this.U.GE(this.get("mouseControlMode")),this.U.ZJ(this.get("touchControlMode")));if(this.VC||this.Xba)this.Z_=this.Vda=this.$b=this.tf=0,this.xha=this.zha=void 0,z=!0,this.Xba=this.VC=!1,this.get("panorama")?(this.get("viewerArea").Kc().Djb(),this.U.Sf(this.get("panorama"),this.get("camera",new d),this.get("startTime"))):(this.U.MA(),this.qga=!0,this.Hj=g.ca,this.Id(g.ca));if(this.b0||this.Q0||this.N3){this.Q0=this.N3=this.b0=!1;var A=this.get("gazeModeEnabled");this.o.Xhb(A&&
this.No&&!this.bja);this.SZ.set("pressed",A)}this.yea&&(this.yea=!1,this.U.UX(this.get("gyroscopeVerticalDraggingEnabled",!0)));this.qC&&(this.qC=!1,(A=this.get("gyroscopeEnabled")&&r.nl)&&r.disabled&&(A=!1,t.Pra.show(function(){r.ipa(function(){this.set("gyroscopeEnabled",!0)}.bind(this))}.bind(this))),this.set("gyroscopeEnabled",A),this.U.TX(A),this.TZ.set("pressed",A));this.Tea&&(this.Tea=!1,this.UZ.set("pressed",this.get("hotspotsEnabled")));this.ds&&(this.ds=!1,z=!0);this.qja&&(this.qja=!1,this.ZZ.set("pressed",
this.get("surfaceSelectionEnabled")));z&&this.Jz()}};x.prototype.rN=function(){this.U.pna()||this.set("panorama",null)};x.prototype.Xx=function(){var z=this.get("viewerArea"),A=this.get("application");this.o=new p(A,z,this);this.o.wa({left:0,top:0,bottom:0,right:0});z.mb(this.o);this.U=new f(z,this.o);this.U.bind(f.Bl,this.ys,this);this.U.bind(f.Ar,this.Cza,this);this.U.bind(f.ix,this.Ej,this);this.U.bind(f.hF,this.yM,this);this.U.bind(f.pF,this.Uy,this,!0);this.U.bind(f.oF,this.OC,this,!0);this.U.bind(f.qF,
this.bT,this,!0);this.U.bind(f.nF,this.aT,this,!0);this.U.bind(f.gd,this.Kf,this);this.U.bind(f.ak,this.Es,this);this.U.bind(f.$j,this.Ds,this);this.U.bind(f.Pk,this.Cs,this);this.U.bind(f.Br,this.RC,this,!0);this.get("application").bind(k.N("mute"),this.ZS,this);this.get("application").get("mute",!1)&&this.U.Ag(!0);this.U.EE(this.No);u.M.bind(k.V,this.nq,this,!0);this.wca();this.kD(!0)};x.prototype.Yx=function(){this.o&&(this.U.h(f.Bl,this.ys,this),this.U.h(f.Ar,this.Cza,this),this.U.h(f.ix,this.Ej,
this),this.U.h(f.hF,this.yM,this),this.U.h(f.pF,this.Uy,this,!0),this.U.h(f.oF,this.OC,this,!0),this.U.h(f.qF,this.bT,this,!0),this.U.h(f.nF,this.aT,this,!0),this.U.h(f.gd,this.Kf,this),this.U.h(f.ak,this.Es,this),this.U.h(f.$j,this.Ds,this),this.U.h(f.Pk,this.Cs,this),this.U.h(f.Br,this.RC,this),this.U.clear(),this.U=null,this.get("application").h(k.N("mute"),this.ZS,this),this.o.getParent().removeChild(this.o),this.o=null,u.M.h(k.V,this.nq,this,!0),this.kD(!1))};x.prototype.ZS=function(){this.o&&
this.U.Ag(this.get("application").get("mute",!1))};x.prototype.Kf=function(z){this.Hj=z.data.state;this.gh()};x.prototype.gh=function(){this.Id(this.qga||u.isPresenting?this.Hj:g.PLAYING)};x.prototype.Es=function(){this.m(new n(k.gta))};x.prototype.Ds=function(){this.m(new n(k.fta))};x.prototype.bT=function(z){this.m(new n(x.vSa,{panorama:z.data.panorama}))};x.prototype.aT=function(){};x.prototype.Uy=function(z){this.wca();this.qS(z.data.panorama)};x.prototype.OC=function(z){this.pS(z.data.panorama)};
x.prototype.ys=function(z){for(var A in x.Dx)this.Zya[A].set("state",z.data[x.Dx[A].pressedOn]?w.Nb:w.lf);this.qga=z.data.stopped;this.gh();this.m(new n(k.fsa,z.data))};x.prototype.Cza=function(z){this.wca();this.m(new n(x.oSa,z.data))};x.prototype.wca=function(){this.U&&(this.set("yaw",this.U.Lc()),this.set("pitch",this.U.Jc()),this.set("roll",this.U.Jg()),this.set("hfov",this.U.ff()),this.set("actualHFOV",this.U.xO()),this.set("actualVFOV",this.U.yO()))};x.prototype.Ej=function(z){this.o.getParent().wa({progressPercent:z.data.percent,
progressVisible:!0});this.m(new n(x.ix,z.data))};x.prototype.yM=function(){this.o.getParent().set("progressVisible",!1)};x.prototype.RC=function(){this.m(k.Maa)};x.prototype.nq=function(){this.set("viewMode",u.isPresenting?x.XF:x.gba);this.gh()};x.prototype.Yya=function(z,A,D,E,B){this.U&&this.U.moveTo(z,A,D,E,B)};x.prototype.md=function(z){this.U&&this.U.wl(z)};x.prototype.Xl=function(){this.U&&this.U.play()};x.prototype.Dq=function(){this.U&&this.U.stop()};x.prototype.Is=function(){this.U&&this.U.pause()};
x.prototype.$H=function(z){this.U&&(this.Rwa()?this.U.DE(z):this.U.VOa(z))};x.prototype.X5a=function(z){this.U&&this.U.VOa(z)};x.prototype.Y5a=function(z){this.U&&this.U.DE(z)};x.prototype.K3a=function(){this.U&&this.U.hP()};x.prototype.T4a=function(){this.U&&this.U.rP()};x.prototype.g0a=function(z,A){if(this.U)return this.U.Yma(z,A)};x.prototype.Q_a=function(z,A){if(this.U)return this.U.bdb(z,A)};x.prototype.CCa=function(){this.U&&this.U.OJ()};x.prototype.BT=function(z){this.$H(z.data.position)};
x.prototype.Cs=function(z){this.tf=z.data.time;this.$b=z.data.duration;this.Vda=z.data.transitionPosition;this.Z_=z.data.transitionLength;this.zha=z.data.steps;this.xha=z.data.selectedStep;this.Jz()};x.prototype.Jz=function(){var z=this.o.getParent(),A=!1;if(this.g_a()){var D=this.Rwa(),E=this.S_a();D?this.Z_>0&&(z.wa({playbackBarPosition:this.Vda,playbackBarDuration:this.Z_,playbackBarSteps:this.zha,playbackBarSelectedStep:this.xha,playbackBarLiveDragging:E}),A=!0):this.$b>0&&(z.wa({playbackBarPosition:this.tf,
playbackBarDuration:this.$b,playbackBarSteps:void 0,playbackBarSelectedStep:void 0,playbackBarLiveDragging:E}),A=!0)}z.set("playbackBarVisible",A)};x.prototype.g_a=function(){var z=this.get("panorama");return z?e.Qa("HDRPanorama",z)?this.get("hdrPanoramaDisplayPlaybackBar",this.get("displayPlaybackBar",!1)):e.Qa("LivePanorama",z)?this.get("livePanoramaDisplayPlaybackBar",this.get("displayPlaybackBar",!1)):e.Qa("VideoPanorama",z)?this.get("videoPanoramaDisplayPlaybackBar",this.get("displayPlaybackBar",
!0)):!1:!1};x.prototype.Rwa=function(){var z=this.get("panorama");return z?e.Qa("HDRPanorama",z)?this.get("hdrPanoramaDisplayPlaybackBarSteps",!0):e.Qa("LivePanorama",z)?this.get("livePanoramaDisplayPlaybackBarSteps",!0):!1:!1};x.prototype.S_a=function(){var z=this.get("panorama");return!z||e.Qa("VideoPanorama",z)?!1:!0};x.XF="cardboard";x.gba="standard";x.Dx={buttonMoveLeft:{movement:m.IK,pressedOn:"movingLeft",stopOnRelease:!0},buttonMoveRight:{movement:m.JK,pressedOn:"movingRight",stopOnRelease:!0},
buttonMoveUp:{movement:m.KK,pressedOn:"movingUp",stopOnRelease:!0},buttonMoveDown:{movement:m.HK,pressedOn:"movingDown",stopOnRelease:!0},buttonPlayLeft:{movement:[m.IK,m.PLAYING],pressedOn:"movingLeft",stopOnRelease:!1},buttonPlayRight:{movement:[m.JK,m.PLAYING],pressedOn:"movingRight",stopOnRelease:!1},buttonPlayUp:{movement:[m.KK,m.PLAYING],pressedOn:"movingUp",stopOnRelease:!1},buttonPlayDown:{movement:[m.HK,m.PLAYING],pressedOn:"movingDown",stopOnRelease:!1},buttonZoomIn:{movement:m.Bx,pressedOn:"zoomingIn",
stopOnRelease:!0},buttonZoomOut:{movement:m.Cx,pressedOn:"zoomingOut",stopOnRelease:!0}};return x});
define("tdv/player/script/PanoramaPlayListItem",["require","tdv/player/parser/ClassInfo","tdv/player/script/MediaPlayer","tdv/player/script/PlayListItem"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/MediaPlayer"),n=a("tdv/player/script/PlayListItem");a=l.define("PanoramaPlayListItem",n,function(){n.call(this)});a.prototype.start=function(){n.prototype.start.call(this);var g=this.get("player");g&&(g.bind(k.ai,this.Uy,this),g.set("panorama",this.get("media")),g.set("camera",
this.get("camera")))};a.prototype.stop=function(){var g=this.get("player");g&&(g.h(k.ai,this.Uy,this),g.get("panorama")==this.get("media")&&g.set("panorama",null));n.prototype.stop.call(this)};a.prototype.Uy=function(g){g.data.media==this.get("media")&&(this.get("player").h(k.ai,this.Uy,this),this.get("player").bind(k.lo,this.OC,this),this.CD())};a.prototype.OC=function(g){g.data.media==this.get("media")&&(this.get("player").h(k.lo,this.OC,this),this.stop(),this.end())};return a});
define("tdv/player/script/PanoramaSnapshot",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("PanoramaSnapshot",l,function(){l.call(this)})});
define("tdv/player/script/Photo",["require","exports","tdv/player/parser/ClassInfo","tdv/player/script/Media","tdv/player/script/helper/LevelUtil"],function(a,l,k,n,g){a=function(h){function e(){return h.call(this)||this}O(e,h);e.prototype.iw=function(){var b=[],c=this.get("image");c&&b.push(g.yt(c).get("url"));this.get("audios",[]).forEach(function(d){b=b.concat(d.iw())}.bind(this));return b};return e}(n);k.create("Photo",a);return a});
define("tdv/player/script/PhotoAlbum",["require","tdv/player/script/Media","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/player/script/Media");a=a("tdv/player/parser/ClassInfo").define("PhotoAlbum",l,function(){l.call(this);this.set("loop",!1)});a.prototype.iw=function(){var k=[],n=this.get("playList");n&&n.get("items",[]).forEach(function(g){(g=g.get("media"))&&(k=k.concat(g.iw()))});this.get("audios",[]).forEach(function(g){k=k.concat(g.iw())});return k};return a});
define("tdv/player/script/PhotoAlbumAudio",["require","tdv/constants/Priority","tdv/player/parser/ClassInfo","tdv/player/script/MediaAudio"],function(a){var l=a("tdv/constants/Priority"),k=a("tdv/player/parser/ClassInfo"),n=a("tdv/player/script/MediaAudio");return k.define("PhotoAlbumAudio",n,function(){n.call(this,l.xTa)})});
define("tdv/player/view/photo/control/audio/AudioController",["require","tdv/constants/PlaybackState"],function(a){function l(n){this.Wr=n;this.cL=[];this.Iu=[];this.it=1}var k=a("tdv/constants/PlaybackState");l.prototype.clear=function(){for(var n=0;n<this.cL.length;n++)this.cL[n].Zc(k.ca);this.sVa();this.Iu=this.cL=null};l.prototype.stop=function(){for(var n=0;n<this.Iu.length;n++)this.Iu[n].Zc(k.ca)};l.prototype.play=function(){for(var n=0;n<this.Iu.length;n++){var g=this.Iu[n];g.getState()!=k.PLAYING&&
g.Zc(k.PLAYING)}};l.prototype.pause=function(){for(var n=0;n<this.Iu.length;n++){var g=this.Iu[n];g.getState()==k.PLAYING&&g.Zc(k.Yb)}};l.prototype.start=function(){this.stop();for(var n=0;n<this.Wr.length;n++){var g=this.Wr[n],h=g.ZI();h&&(this.cL.push(h),g.get("autoplay",!1)&&this.Iu.push(h))}for(n=0;n<this.Iu.length;n++)this.Iu[n].Zc(k.PLAYING)};l.prototype.xe=function(){};l.prototype.sVa=function(){for(var n=0;n<this.cL.length;n++)this.cL[n].TA(1)};return l});
define("tdv/player/view/photo/control/audio/PhotoAudioController",["require","tdv/utils","tdv/player/view/photo/control/audio/AudioController"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/photo/control/audio/AudioController");return l.extend(k,function(n){k.call(this,n.get("audios",[]));this.J2=n})});
define("tdv/player/view/photo/control/audio/AlbumAudioController",["require","tdv/utils","tdv/player/view/photo/control/audio/AudioController"],function(a){var l=a("tdv/utils"),k=a("tdv/player/view/photo/control/audio/AudioController");return l.extend(k,function(n){k.call(this,n.get("audios",[]));this.Vf=n})});
define("tdv/player/view/photo/control/AudioController",["require","tdv/player/view/photo/control/audio/PhotoAudioController","tdv/player/view/photo/control/audio/AlbumAudioController"],function(a){function l(){this.dk=[];this.Gj=[]}var k=a("tdv/player/view/photo/control/audio/PhotoAudioController"),n=a("tdv/player/view/photo/control/audio/AlbumAudioController");l.prototype.clear=function(){this.gQa();this.Gj=this.dk=null};l.prototype.gQa=function(){for(var g=0;g<this.dk.length;g++)this.dk[g].clear();
for(g=0;g<this.Gj.length;g++)this.Gj[g].clear();this.dk=[];this.Gj=[]};l.prototype.pause=function(){for(var g=0;g<this.dk.length;g++)this.dk[g].pause();for(g=0;g<this.Gj.length;g++)this.Gj[g].pause()};l.prototype.play=function(){for(var g=0;g<this.dk.length;g++)this.dk[g].play();for(g=0;g<this.Gj.length;g++)this.Gj[g].play()};l.prototype.stop=function(){for(var g=0;g<this.dk.length;g++)this.dk[g].stop();for(g=0;g<this.Gj.length;g++)this.Gj[g].clear();this.Gj=[]};l.prototype.Ejb=function(g){g=new k(g);
this.Gj.push(g);g.start()};l.prototype.Mjb=function(g){for(var h=0;h<this.Gj.length;h++)if(this.Gj[h].J2==g){this.Gj[h].clear();this.Gj.splice(h,1);break}};l.prototype.pqa=function(g){g=new n(g);this.dk.push(g);g.start()};l.prototype.Jjb=function(g){for(var h=0;h<this.dk.length;h++)if(this.dk[h].Vf==g){this.dk[h].clear();this.dk.splice(h,1);break}};l.prototype.xe=function(g){for(var h=0;h<this.dk.length;h++)this.dk[h].xe(g);for(h=0;h<this.Gj.length;h++)this.Gj[h].xe(g)};return l});
define("tdv/player/view/photo/control/camera/LimitsManager",["require","tdv/utils","tdv/view/constants/ScaleMode"],function(a){function l(){this.Pd=!0;this.ec=this.dc=.5;this.jc=1;this.ri=k.oj;this.wo=this.xo=100}a("tdv/utils");var k=a("tdv/view/constants/ScaleMode");l.prototype.getX=function(){this.mp();return this.dc};l.prototype.getY=function(){this.mp();return this.ec};l.prototype.lA=function(){this.mp();return this.jc};l.prototype.setConfiguration=function(n,g,h){this.ri=h;this.ec=this.dc=.5;
this.jc=1;this.Pd=!0};l.prototype.setPosition=function(n,g,h){this.dc=n;this.ec=g;this.jc=h;this.Pd=!0};l.prototype.setSize=function(n,g){this.xo=n;this.wo=g;this.Pd=!0};l.prototype.mp=function(){if(this.Pd){this.Pd=!1;this.jc<1&&(this.jc=1);var n=Math.min(.5/this.jc,.5),g=Math.max(1-.5/this.jc,.5);this.dc<n?this.dc=n:this.dc>g&&(this.dc=g);n=Math.min(.5/this.jc,.5);g=Math.max(1-.5/this.jc,.5);this.ec<n?this.ec=n:this.ec>g&&(this.ec=g)}};return l});
define("tdv/player/view/photo/control/camera/PhotoCameraController",["require"],function(){function a(l){this.ua=l;this.ec=this.dc=.5;this.jc=1;this.h3=!1}a.prototype.start=function(){this.ec=this.dc=.5;this.jc=1;this.h3=!0};a.prototype.clear=function(){this.ua=null};a.prototype.setPosition=function(l,k,n){this.dc=l;this.ec=k;this.jc=n};a.prototype.Rf=function(){return this.h3};a.prototype.Lb=function(){this.h3=!1};return a});
define("tdv/player/script/PhotoCameraPosition",["require","exports","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a,l,k,n){a=function(g){function h(e,b,c){var d=g.call(this)||this;e!==void 0&&d.set("x",e);b!==void 0&&d.set("y",b);c!==void 0&&d.set("zoomFactor",c);return d}O(h,g);return h}(k);n.create("PhotoCameraPosition",a);return a});
define("tdv/player/view/photo/control/camera/MovementPhotoCameraController","require tdv/utils tdv/player/view/photo/control/camera/PhotoCameraController tdv/player/script/PhotoCameraPosition tdv/view/util/Ease tdv/view/util/EaseDimension".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/player/view/photo/control/camera/PhotoCameraController"),n=a("tdv/player/script/PhotoCameraPosition"),g=a("tdv/view/util/Ease"),h=a("tdv/view/util/EaseDimension");a=l.extend(k,function(e){k.call(this,e);this.ka=
null});a.prototype.start=function(e){var b=e.get("initialPosition",new n(.5,.5,1)),c=e.get("targetPosition",new n(.5,.5,1)),d=e.get("duration",1E3);d==0?(this.dc=b.get("x"),this.ec=b.get("y"),this.jc=b.get("zoomFactor")):this.ka=new g(e.get("easing","linear"),[new h("x",b.get("x",.5),c.get("x",.5)),new h("y",b.get("y",.5),c.get("y",.5)),new h("zoom",b.get("zoomFactor",1),c.get("zoomFactor",1))],d);this.Lb(0)};a.prototype.clear=function(){this.ka=null;k.prototype.clear.call(this)};a.prototype.Rf=function(){return this.ka!=
null};a.prototype.Lb=function(e){this.ka&&(this.ka.Lb(e),this.ua.setPosition(this.ka.nb("x"),this.ka.nb("y"),this.ka.nb("zoom")),this.dc=this.ua.getX(),this.ec=this.ua.getY(),this.jc=this.ua.lA(),this.ka.Re()&&(this.ka=null))};return a});
define("tdv/player/view/photo/control/CameraController","require tdv/utils tdv/events/Event tdv/events/EventDispatcher tdv/player/parser/ClassInfo tdv/constants/PlaybackState tdv/view/constants/ScaleMode tdv/player/view/photo/control/camera/LimitsManager tdv/player/view/photo/control/camera/PhotoCameraController tdv/player/view/photo/control/camera/MovementPhotoCameraController tdv/constants/EventName".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),
g=a("tdv/player/parser/ClassInfo"),h=a("tdv/constants/PlaybackState"),e=a("tdv/view/constants/ScaleMode"),b=a("tdv/player/view/photo/control/camera/LimitsManager"),c=a("tdv/player/view/photo/control/camera/PhotoCameraController"),d=a("tdv/player/view/photo/control/camera/MovementPhotoCameraController"),f=a("tdv/constants/EventName"),m=l.extend(n,function(p,q){n.call(this);this.R=p;this.sd=q;this.R.bind(f.Zb,this.kd,this);this.H=h.ca;this.rn=this.J2=this.zc=this.Ja=null;this.ua=new b});m.prototype.clear=
function(){this.end();this.ua=null;this.R.h(f.Zb,this.kd,this);this.R=null};m.prototype.end=function(p){if(this.Ja==p||typeof p=="undefined")this.Jva(),this.zc=this.J2=this.Ja=null};m.prototype.start=function(p){if(this.Ja!=p){this.end(this.Ja);var q=p.get("media"),r=p.get("camera"),t=q.get("width",100),u=q.get("height",100),v=r?r.get("scaleMode",e.oj):e.oj;this.Ja=p;this.zc=r;this.J2=q;this.ha=!0;this.ua.setConfiguration(t,u,v);this.gYa(r);this.Sa()}};m.prototype.stop=function(){this.H!=h.ca&&(this.H=
h.ca,this.rn&&(this.rn.start(this.zc),this.Sa()))};m.prototype.play=function(){if(this.H==h.ca||this.H==h.Yb)this.H=h.PLAYING,this.Sa()};m.prototype.pause=function(){this.H==h.PLAYING&&(this.H=h.Yb)};m.prototype.JA=function(p){this.rn&&this.rn.Rf()&&(this.H==h.PLAYING&&(this.rn.Lb(p),this.Sa()),this.un(this.rn.dc,this.rn.ec,this.rn.jc))};m.prototype.gYa=function(p){this.Jva();g.Qa("MovementPhotoCamera",p)?this.rn=new d(this.ua):this.rn=new c(this.ua);this.rn.start(p)};m.prototype.Jva=function(){this.rn&&
(this.rn.clear(),this.rn=null)};m.prototype.kd=function(){this.ua.setSize(this.R.gb(),this.R.Kb());this.Sa()};m.prototype.Sa=function(){this.m(new k(m.oc))};m.prototype.un=function(p,q,r){this.sd.setPosition(this.Ja,p,q,r)};m.oc="request frame";return m});
define("tdv/player/view/photo/control/StageControllerItem","require exports tdv/events/EventDispatcher tdv/events/Event tdv/constants/EventName tdv/player/script/PhotoCameraPosition".split(" "),function(a,l,k,n,g,h){return function(e){function b(c,d){var f=e.call(this)||this;f.sgb=c;f.renderer=d;f.camera=c.get("camera");f.sc=c.get("media");f.sc.set("enabled",!1);f.sc.bind(g.ia,f.yA,f,!1);return f}O(b,e);b.prototype.getItem=function(){return this.sgb};b.prototype.preload=function(){this.sc.set("opacity",
0);this.renderer.fGa(this.sc,this.camera);this.sc.get("isLoaded")&&this.SQa()};b.prototype.Bf=function(c){this.sc.set("opacity",c);this.Rw()};b.prototype.Cp=function(c){this.sc.set("offset",c);this.Rw()};b.prototype.setPosition=function(c,d,f){var m=this.camera.get("position")||new h;this.camera.set("position",m);m.set("x",c);m.set("y",d);m.set("zoomFactor",f)};b.prototype.njb=function(c){this.sc.set("zIndex",c)};b.prototype.isEnabled=function(){return this.sc.get("enabled")};b.prototype.Rw=function(){var c=
this.sc.get("offset"),d=this.sc.get("opacity");c>-1&&c<1&&d>0?(this.renderer.fGa(this.sc,this.camera),this.sc.set("enabled",!0)):this.sc.get("enabled")&&(this.renderer.fOa(this.sc),this.sc.set("enabled",!1))};b.prototype.clear=function(){this.renderer.fOa(this.sc);this.sc.h(g.ia,this.yA,this)};b.prototype.yA=function(){this.sc.get("enabled")||this.SQa()};b.prototype.SQa=function(){this.m(new n(b.Isa))};b.Isa="preloadEnd";return b}(k)});
define("tdv/player/view/photo/control/StageController",["require","exports","tdv/events/Event","tdv/events/EventDispatcher","tdv/player/view/photo/control/StageControllerItem"],function(a,l,k,n,g){return function(h){function e(b){var c=h.call(this)||this;c.Vs=[];c.o=b;return c}O(e,h);e.prototype.preload=function(b){this.PG(b).preload();return this};e.prototype.Bf=function(b,c){this.PG(b).Bf(c);this.Ez();return this};e.prototype.Cp=function(b,c){this.PG(b).Cp(c);this.Ez();return this};e.prototype.setPosition=
function(b,c,d,f){this.PG(b).setPosition(c,d,f);return this};e.prototype.wi=function(b){var c=this.Vs.findIndex(function(f){return f.getItem()==b}),d=this.Vs[c];this.Vs.splice(c,1);this.Vs.push(d);this.Vs.forEach(function(f,m){f.njb(m)})};e.prototype.stop=function(){this.UYa(function(b){b.clear()});this.Vs=[]};e.prototype.clear=function(){this.stop();this.Vs=null};e.prototype.Ez=function(){this.Vs.find(function(b){return b.isEnabled()})};e.prototype.PG=function(b){var c=this.uZa(b);c||(c=new g(b,
this.o),c.bind(g.Isa,this.G1a,this,!1),this.Vs.push(c));return c};e.prototype.UYa=function(b){this.Vs.forEach(b.bind(this))};e.prototype.uZa=function(b){return this.Vs.find(function(c){return c.getItem()==b})};e.prototype.G1a=function(b){this.m(new k(e.X$,{item:b.source.getItem()}))};e.X$="photo preload end";return e}(n)});define("tdv/player/view/photo/control/constants/TransitionMode",["require","exports"],function(){return{Gp:"blending",Pr:"scroll"}});
define("tdv/player/view/photo/control/display/TransitionController","require exports tdv/events/Event tdv/events/EventDispatcher tdv/player/view/photo/control/StageController tdv/player/view/photo/control/constants/TransitionMode".split(" "),function(a,l,k,n,g,h){var e=function(){function b(c,d,f){this.Nq=c;this.item=d;this.transitionDuration=f;this.index=c&&d?c.get("playList").get("items").indexOf(this.item):0;this.loaded=!1}b.prototype.isEqual=function(c){return c&&c.Nq==this.Nq&&c.item==this.item};
return b}();return function(b){function c(d,f,m){var p=b.call(this)||this;p.R=d;p.o=f;p.sd=m;p.sd.bind(g.X$,p.GBa,p,!1);p.vN=h.Gp;p.Oa=c.Tr;p.Dd=new e(null,null,0);p.he=null;p.Wl=null;p.Ou=null;p.Pj=void 0;p.hD=0;return p}O(c,b);c.prototype.clear=function(){var d;((d=this.Dd)===null||d===void 0?0:d.item)&&this.RU(this.Dd);this.Oa=c.Tr;this.Ou=this.Dd=this.he=this.Wl=null;this.sd.h(g.X$,this.GBa,this)};c.prototype.Vib=function(d){this.vN=d};c.prototype.Vpa=function(d){this.hD=d};c.prototype.Jqa=function(d,
f,m){this.Wl=null;d=new e(d,f,m);d.isEqual(this.Oa==c.Tr?this.Dd:this.he)||(this.Wl=d,this.AAa())};c.prototype.AAa=function(){this.Wl&&this.Oa==c.Tr&&(this.Wl.item&&!this.Wl.loaded?this.sd.preload(this.Wl.item):this.Xr())};c.prototype.GBa=function(d){this.Wl&&this.Wl.item==d.data.item&&(this.Wl.loaded=!0,this.AAa())};c.prototype.Xr=function(){this.Ou&&this.Ou!=this.Wl.Nq&&this.VCa(null);this.m(new k(c.daa));this.R.get("transitionMode")=="fade_out_fade_in"&&this.Wl.item!=null&&this.Dd.item!=null?this.$Va():
(this.he=this.Wl,this.Wl=null,this.Dd.Nq&&!this.Dd.item?this.ZVa():this.Dd.item?this.he.item&&this.vN==h.Gp?this.dG():this.he.item&&this.vN==h.omb?this.aWa():this.Dd.item&&this.YVa():this.XVa())};c.prototype.xe=function(d){if(this.Oa!=c.Tr){this.Pj+=d;d=this.he.transitionDuration;d=this.Pj>=d?1:this.Pj/d;switch(this.Oa){case c.Yaa:this.SEa(d);break;case c.Zaa:this.P8a(d);break;case c.aba:this.UEa(d);break;case c.$aa:this.TEa(d);break;case c.rj:this.sD(d);break;case c.bba:this.oFa(d)}d<1?this.Sa():
this.nC()}};c.prototype.nC=function(){switch(this.Oa){case c.aba:this.bZa();break;case c.$aa:this.aZa();break;case c.Yaa:this.ZYa();break;case c.rj:this.Ada();break;case c.bba:this.eZa();break;case c.Zaa:this.$Ya()}this.VCa(this.Dd.Nq);this.Wl==null?this.Pja(this.Dd):this.Xr()};c.prototype.$Va=function(){this.Oa=c.aba;this.he=new e(this.Dd.Nq,null,this.Dd.transitionDuration);this.Pj=0;this.Zf=this.Dd.transitionDuration;this.sd.Cp(this.Dd.item,0);this.UEa(0);this.Sa()};c.prototype.UEa=function(d){this.sd.Bf(this.Dd.item,
1-d)};c.prototype.bZa=function(){this.RU(this.Dd);this.Dd=this.he;this.Oa=c.Tr};c.prototype.ZVa=function(){this.Oa=c.$aa;this.Pj=0;this.Zf=this.he.transitionDuration;this.s4(this.he);this.sd.Cp(this.he.item,0);this.TEa(0);this.Sa()};c.prototype.TEa=function(d){this.sd.Bf(this.he.item,d)};c.prototype.aZa=function(){this.Dd=this.he;this.Oa=c.Tr;this.t4(this.Dd)};c.prototype.XVa=function(){this.Oa=c.Yaa;this.Pj=0;this.Zf=this.he.transitionDuration;this.s4(this.he);this.sd.Cp(this.he.item,0);this.sd.wi(this.he.item);
this.sd.Bf(this.he.item,1);this.o.Ua(!0);this.R.Kc().cK();this.SEa(0);this.Sa()};c.prototype.SEa=function(d){this.sd.Bf(this.he.item,d);this.R.Kc().RJ(d)};c.prototype.ZYa=function(){this.Dd=this.he;this.R.Kc().WI();this.Oa=c.Tr;this.t4(this.Dd)};c.prototype.dG=function(){this.Oa=c.rj;this.Pj=0;this.Zf=this.he.transitionDuration;this.s4(this.he);this.sd.Cp(this.Dd.item,0);this.sd.Cp(this.he.item,0);this.sd.wi(this.he.item);this.sD(0);this.Sa()};c.prototype.sD=function(d){this.sd.Bf(this.he.item,Math.min(1,
d*2));this.sd.Bf(this.Dd.item,Math.min(1,(1-d)*2))};c.prototype.Ada=function(){this.RU(this.Dd);this.Dd=this.he;this.Oa=c.Tr;this.t4(this.Dd)};c.prototype.aWa=function(){this.Oa=c.bba;this.Pj=0;this.Zf=this.he.transitionDuration;this.s4(this.he);this.sd.wi(this.he.item);this.oFa(0);this.Sa()};c.prototype.oFa=function(d){var f=this.Dd.Nq!=this.he.Nq||this.Dd.index<this.he.index;this.sd.Cp(this.he.item,(f?1-d:d-1)*(1+this.hD)).Bf(this.he.item,1);this.sd.Cp(this.Dd.item,(f?-d:d)*(1+this.hD)).Bf(this.Dd.item,
1)};c.prototype.eZa=function(){this.RU(this.Dd);this.Dd=this.he;this.Oa=c.Tr;this.t4(this.Dd)};c.prototype.YVa=function(){this.Oa=c.Zaa;this.Pj=0;this.Zf=this.Dd.transitionDuration;this.sd.Cp(this.Dd.item,0);this.R.Kc().PE();this.sd.Bf(this.Dd.item,0);this.o.Ua(!1);this.Sa()};c.prototype.P8a=function(d){this.R.Kc().CE(d)};c.prototype.$Ya=function(){this.R.Kc().ID();this.RU(this.Dd);this.Oa=c.Tr;this.Dd=this.he};c.prototype.s4=function(d){this.m(new k(c.rF,{album:d.Nq,item:d.item}))};c.prototype.RU=
function(d){this.m(new k(c.tF,{album:d.Nq,item:d.item}))};c.prototype.t4=function(d){this.m(new k(c.sF,{album:d.Nq,item:d.item}))};c.prototype.Pja=function(d){this.m(new k(c.Br,{album:d.Nq,item:d.item}))};c.prototype.VCa=function(d){this.Ou!=d&&(this.Ou&&this.j8a(this.Ou),(this.Ou=d)&&this.k8a(this.Ou))};c.prototype.k8a=function(d){this.m(new k(c.zr,{album:d}))};c.prototype.j8a=function(d){this.m(new k(c.yr,{album:d}))};c.prototype.Sa=function(){this.m(new k(c.oc))};c.Tr="stopped";c.rj="blending";
c.bba="scrolling";c.Zaa="exit_fading_out";c.aba="fading_out_before_fading_in";c.$aa="fading_in_after_fading_out";c.Yaa="entry_fading_in";c.oc="request frame";c.daa="transition begin";c.Br="transition end";c.rF="photo added";c.tF="photo removed";c.sF="photo displayed";c.zr="photo album show";c.yr="photo album hide";return c}(n)});
define("tdv/player/view/photo/control/display/ManualScrollController","require tdv/utils tdv/events/Event tdv/events/EventDispatcher tdv/constants/EventName tdv/player/parser/ClassInfo tdv/view/constants/ScaleMode tdv/player/script/PhotoCameraPosition tdv/player/view/photo/control/camera/LimitsManager tdv/view/util/Ease tdv/view/util/EaseDimension".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=a("tdv/constants/EventName"),h=a("tdv/player/parser/ClassInfo"),
e=a("tdv/view/constants/ScaleMode"),b=a("tdv/player/script/PhotoCameraPosition"),c=a("tdv/player/view/photo/control/camera/LimitsManager"),d=a("tdv/view/util/Ease"),f=a("tdv/view/util/EaseDimension"),m=l.extend(n,function(p,q){n.call(this);this.R=p;this.sd=q;this.wq=this.eq=this.Ja=this.Vf=this.Ab=null;this.gp=void 0;this.R3=0;this.$l=!1;this.hq=0;this.h1=this.wq?-1:0;this.d1=this.eq?1:0;this.ka=null;this.Zf=400;this.hD=0;this.ua=new c});m.prototype.clear=function(){this.sd=this.R=this.Ou=null};m.prototype.Lhb=
function(p,q){this.Vf=p;this.Ja=q;p=p&&p.get("playList")&&p.get("playList").get("items")||[];q=p.indexOf(q);this.eq=q>0?p[q-1]:null;this.wq=q<p.length-1?p[q+1]:null;this.hq=0;this.h1=this.wq?-1:0;this.d1=this.eq?1:0;this.LBa()};m.prototype.enable=function(){if(this.Ab=this.R)this.Ab.bind(g.Ra,this.re,this,!0),this.Ab.bind(g.fb,this.cl,this,!0),this.Ab.bind(g.ab,this.dl,this,!0),this.LBa()};m.prototype.disable=function(){this.Ab&&(this.Ab.h(g.Ra,this.re,this),this.Ab.h(g.fb,this.cl,this),this.Ab.h(g.ab,
this.dl,this),this.Ab=null)};m.prototype.Uib=function(p){this.Zf=p};m.prototype.Vpa=function(p){this.hD=p};m.prototype.LBa=function(){this.Ab&&(this.eq&&this.sd.preload(this.eq),this.wq&&this.sd.preload(this.wq))};m.prototype.fza=function(){return(new Date).getTime()};m.prototype.re=function(p){this.$l||(this.gp=p.x,this.R3=0,this.Jha=this.fza(),this.$l=!0,this.ka=null,this.m(new k(m.E$)),this.eq&&(p=this.cxa(this.eq),this.sd.setPosition(this.eq,p.x,p.y,p.zoom)),this.wq&&(p=this.cxa(this.wq),this.sd.setPosition(this.wq,
p.x,p.y,p.zoom)))};m.prototype.cl=function(p){if(this.$l){var q=p.x-this.gp,r=q/this.Ab.gb(),t=this.fza()-this.Jha;this.R3=q/t;this.Jha+=t;this.gp=p.x;this.hq=Math.max(this.h1,Math.min(this.d1,this.hq+r));this.Sa()}};m.prototype.dl=function(){if(this.$l){this.$l=!1;if(this.R3>1){var p="quad_out";var q=this.d1}else this.R3<-1?(p="quad_out",q=this.h1):(p="quad_in_out",q=this.hq<-.5?this.h1:this.hq>.5?this.d1:0);this.ka=new d(p,[new f("offset",this.hq,q,1E3/this.Zf)],0);this.Sa()}};m.prototype.xe=function(p){if(this.$l||
this.ka)this.ka&&(this.ka.Lb(p),this.hq=this.ka.nb("offset"),this.ka.Re()?(this.ka=null,this.VYa()):this.Sa()),this.Ja&&this.sd.Cp(this.Ja,this.hq*(1+this.hD)).Bf(this.Ja,1),this.eq&&this.sd.Cp(this.eq,(this.hq-1)*(1+this.hD)).Bf(this.eq,1),this.wq&&this.sd.Cp(this.wq,(this.hq+1)*(1+this.hD)).Bf(this.wq,1)};m.prototype.VYa=function(){this.m(new k(m.F$,{album:this.Vf,item:this.hq<0?this.wq:this.hq>0?this.eq:this.Ja}))};m.prototype.Sa=function(){this.m(new k(m.oc))};m.prototype.cxa=function(p){var q=
p&&p.get("camera"),r=p&&p.get("media");p=r&&r.get("width",100)||100;r=r&&r.get("height",100)||100;var t=q?q.get("scaleMode",e.oj):e.oj,u={};h.Qa("MovementPhotoCamera",q)?(q=q.get("initialPosition",new b(.5,.5,1)),u.x=q.get("x",.5),u.y=q.get("y",.5),u.zoom=q.get("zoomFactor",.5)):(u.x=.5,u.y=.5,u.zoom=1);this.ua.setConfiguration(p,r,t);this.ua.setSize(this.R.gb(),this.R.Kb());this.ua.setPosition(u.x,u.y,u.zoom);u.x=this.ua.getX();u.y=this.ua.getY();u.zoom=this.ua.lA();return u};m.oc="request frame";
m.E$="interaction begin";m.F$="interaction end";return m});
define("tdv/player/view/photo/control/DisplayController","require tdv/utils tdv/events/Event tdv/events/EventDispatcher tdv/constants/EventName tdv/player/view/photo/control/StageController tdv/player/view/photo/control/constants/TransitionMode tdv/player/view/photo/control/display/TransitionController tdv/player/view/photo/control/display/ManualScrollController".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher");a("tdv/constants/EventName");a("tdv/player/view/photo/control/StageController");
var g=a("tdv/player/view/photo/control/constants/TransitionMode"),h=a("tdv/player/view/photo/control/display/TransitionController"),e=a("tdv/player/view/photo/control/display/ManualScrollController"),b=l.extend(n,function(c,d,f){n.call(this);this.R=c;this.sd=f;this.vN=g.Gp;this.Zf=1E3;this.ac=new h(this.R,d,this.sd);this.ac.bind(h.oc,this.Yf,this,!0);this.ac.bind(h.daa,this.zza,this,!0);this.ac.bind(h.Br,this.Aza,this,!0);this.ac.bind(h.rF,this.cT,this,!0);this.ac.bind(h.tF,this.fT,this,!0);this.ac.bind(h.sF,
this.eT,this,!0);this.ac.bind(h.yr,this.zs,this,!0);this.ac.bind(h.zr,this.lq,this,!0);this.bn=new e(this.R,this.sd);this.bn.bind(e.oc,this.Yf,this,!0);this.bn.bind(e.E$,this.Cya,this,!0);this.bn.bind(e.F$,this.Dya,this,!0)});b.prototype.f9=function(c,d){this.vN=c;this.Zf=d;this.ac.Vib(c);this.bn.Uib(d);this.ac.Vpa(.05);this.bn.Vpa(.05)};b.prototype.display=function(c,d){this.ac.Jqa(c,d,this.Zf)};b.prototype.Qe=function(){this.ac.Jqa(null,null,this.Zf)};b.prototype.clear=function(){this.ac.h(h.oc,
this.Yf,this);this.ac.h(h.daa,this.zza,this);this.ac.h(h.Br,this.Aza,this);this.ac.h(h.rF,this.cT,this);this.ac.h(h.tF,this.fT,this);this.ac.h(h.sF,this.eT,this);this.ac.h(h.yr,this.zs,this);this.ac.h(h.zr,this.lq,this);this.ac.clear();this.ac=null;this.bn.bind(e.oc,this.Yf,this,!0);this.bn.bind(e.E$,this.Cya,this,!0);this.bn.bind(e.F$,this.Dya,this,!0);this.bn.clear();this.sd=this.R=this.bn=null};b.prototype.xe=function(c){this.ac.xe(c);this.bn.xe(c)};b.prototype.Yf=function(){this.Sa()};b.prototype.cT=
function(c){this.m(new k(b.rF,c.data))};b.prototype.fT=function(c){this.m(new k(b.tF,c.data))};b.prototype.eT=function(c){this.m(new k(b.sF,c.data));this.bn.Lhb(c.data.album,c.data.item)};b.prototype.zs=function(c){this.m(new k(b.yr,c.data))};b.prototype.lq=function(c){this.m(new k(b.zr,c.data))};b.prototype.zza=function(){this.bn.disable()};b.prototype.Aza=function(c){this.vN==g.Pr&&c.data.item&&this.bn.enable();c.data.album||this.m(new k(b.B$))};b.prototype.Cya=function(){this.m(new k(b.Gra))};
b.prototype.Dya=function(c){this.ac.Jqa(c.data.album,c.data.item,0);this.m(new k(b.Hra,c.data))};b.prototype.Sa=function(){this.m(new k(b.oc))};b.oc="request frame";b.rF="photo added";b.tF="photo removed";b.sF="photo displayed";b.zr="photo album show";b.yr="photo album hide";b.Gra="manual interaction begin";b.Hra="manual interaction end";b.B$="all pending photo albums hidden";return b});
define("tdv/player/view/photo/control/PlayListController","require tdv/utils tdv/binding/ChangeWatcher tdv/events/Event tdv/events/EventDispatcher tdv/constants/PlaybackState".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/binding/ChangeWatcher"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),h=a("tdv/constants/PlaybackState"),e=l.extend(g,function(){g.call(this);this.Vf=null;this.H=h.ca;this.Bia=null});e.prototype.clear=function(){this.kma()};e.prototype.pqa=function(b){this.kma();
this.Vf=b;this.H=h.PLAYING;this.Bia=k.Sw(this.Vf,"playList.selectedIndex",this.aI,this,!0);this.Vf.get("playList").get("selectedIndex")==0?this.aI():this.Vf.get("playList").set("selectedIndex",0)};e.prototype.kma=function(){this.Vf&&(this.H=h.ca,this.Bia.UE(),this.Vf=this.Bia=null)};e.prototype.stop=function(){this.H!=h.ca&&(this.H=h.ca,this.Vf.get("playList").set("selectedIndex",0))};e.prototype.play=function(){this.H==h.ca?(this.Vf.get("playList").set("selectedIndex",0),this.H=h.PLAYING,this.aI()):
this.H==h.Yb&&(this.H=h.PLAYING)};e.prototype.pause=function(){this.H==h.PLAYING&&(this.H=h.Yb)};e.prototype.next=function(){var b=this.Vf.get("playList"),c=b.get("selectedIndex"),d=b.get("items").length;(c<d-1||this.Vf.get("loop"))&&b.set("selectedIndex",(c+1)%d)};e.prototype.Roa=function(){var b=this.Vf.get("playList"),c=b.get("selectedIndex"),d=b.get("items").length;(c>0||this.Vf.get("loop"))&&b.set("selectedIndex",(c-1+d)%d)};e.prototype.h7=function(b){this.w6a(b)};e.prototype.itemEnd=function(b){if(this.Vf){var c=
this.Vf.get("playList").get("items");b!=(c.length>0?c[c.length-1]:void 0)||this.Vf.get("loop")?this.next():(this.H=h.ca,this.m(new n(e.w$,{album:this.Vf})))}};e.prototype.aI=function(){var b=this.i0a();b>=0&&(this.H!=h.PLAYING&&b!=0?this.m(new n(e.$$)):this.m(new n(e.J$,{album:this.Vf,item:this.Vf.get("playList").get("items")[b]})))};e.prototype.i0a=function(){return this.Vf?this.Vf.get("playList").get("selectedIndex"):-1};e.prototype.w6a=function(b){if(this.Vf){var c=this.Vf.get("playList");b=c.get("items").indexOf(b);
c.set("selectedIndex",b)}};e.$$="play request";e.J$="item request";e.w$="album end";return e});
define("tdv/player/view/photo/control/PlaybackController","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/constants/PlaybackState tdv/view/util/Visibility".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),h=a("tdv/constants/PlaybackState"),e=a("tdv/view/util/Visibility"),b=l.extend(g,function(c){g.call(this);this.R=c;this.FU=this.Ja=null;this.UH=void 0;this.K0=!1;this.H=h.ca;
e.bind(k.V,this.sBa,this,!0)});b.prototype.h7=function(c){this.ada();if(this.Ja=c)c=this.Ja.get("media").get("duration",0),this.UH=c==0?void 0:Math.max(0,c-this.R.get("transitionDuration")),this.K0=!1,this.H==h.PLAYING&&this.xda()};b.prototype.clear=function(){e.h(k.V,this.sBa,this,!0);this.h7(null)};b.prototype.stop=function(){this.H!=h.ca&&(this.ada(),this.Id(h.ca))};b.prototype.play=function(){if(this.H==h.ca){if(this.Id(h.PLAYING),this.Ja){this.K0=!1;var c=this.Ja.get("media").get("duration",
0);this.UH=c==0?void 0:c;this.xda()}}else this.H==h.Yb&&(this.Id(h.PLAYING),this.Ja&&this.xda())};b.prototype.pause=function(){this.H==h.PLAYING&&(this.Id(h.Yb),this.EBa())};b.prototype.xda=function(){this.K0||(this.K0=!0,this.m(new n(b.K$,{item:this.Ja})));this.jwa()};b.prototype.sBa=function(){e.visible?this.jwa():e.visible||this.EBa()};b.prototype.jwa=function(){if(this.UH!==void 0){var c=this;this.l4=(new Date).getTime()+this.UH;this.FU=setTimeout(function(){c.FU=null;c.Q7a()},this.UH)}else this.l4=
void 0};b.prototype.ada=function(){this.FU&&(clearTimeout(this.FU),this.FU=null)};b.prototype.EBa=function(){this.l4!==void 0&&(this.ada(),this.UH=Math.max(1,this.l4-(new Date).getTime()),this.l4=void 0)};b.prototype.Q7a=function(){var c=this.Ja;this.Ja=null;this.UH=void 0;this.m(new n(b.I$,{item:c}))};b.prototype.Id=function(c){this.H!=c&&(this.H=c,this.m(new n(b.gd,{state:this.H})))};b.gd="playback state change";b.K$="item start";b.I$="item end";return b});
define("tdv/player/view/photo/control/Controller","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/photo/control/AudioController tdv/player/view/photo/control/CameraController tdv/player/view/photo/control/DisplayController tdv/player/view/photo/control/PlayListController tdv/player/view/photo/control/PlaybackController tdv/player/view/photo/control/StageController tdv/view/util/Animation".split(" "),function(a){var l=a("tdv/utils");a("tdv/constants/EventName");
var k=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=a("tdv/player/view/photo/control/AudioController"),h=a("tdv/player/view/photo/control/CameraController"),e=a("tdv/player/view/photo/control/DisplayController"),b=a("tdv/player/view/photo/control/PlayListController"),c=a("tdv/player/view/photo/control/PlaybackController"),d=a("tdv/player/view/photo/control/StageController"),f=a("tdv/view/util/Animation"),m=l.extend(n,function(p,q){n.call(this);this.R=p;this.o=q;this.o.set("visible",!1);
this.$i=new b;this.Ta=new c(this.R);this.sd=new d(this.o);this.Wa=new e(this.R,this.o,this.sd);this.yb=new h(this.R,this.sd);this.ne=new g;this.$i.bind(b.J$,this.Sza,this,!0);this.$i.bind(b.$$,this.FAa,this,!0);this.$i.bind(b.w$,this.dT,this,!0);this.Ta.bind(c.K$,this.Tza,this);this.Ta.bind(c.I$,this.Rza,this);this.Ta.bind(c.gd,this.Kf,this,!0);this.Wa.bind(e.oc,this.Yf,this,!0);this.Wa.bind(e.rF,this.cT,this,!0);this.Wa.bind(e.tF,this.fT,this,!0);this.Wa.bind(e.sF,this.eT,this,!0);this.Wa.bind(e.yr,
this.zs,this,!0);this.Wa.bind(e.zr,this.lq,this,!0);this.Wa.bind(e.Gra,this.J2a,this,!0);this.Wa.bind(e.Hra,this.K2a,this,!0);this.Wa.bind(e.B$,this.qza,this,!0);this.yb.bind(h.oc,this.Yf,this,!0)});m.prototype.clear=function(){this.$i.clear();this.Ta.clear();this.Wa.clear();this.yb.clear();this.ne.clear();this.sd.clear();this.$i.h(b.J$,this.Sza,this);this.$i.h(b.w$,this.dT,this);this.$i.h(b.$$,this.FAa,this);this.Ta.h(c.K$,this.Tza,this);this.Ta.h(c.I$,this.Rza,this);this.Ta.h(c.gd,this.Kf,this);
this.Wa.h(e.oc,this.Yf,this);this.Wa.h(e.rF,this.cT,this);this.Wa.h(e.tF,this.fT,this);this.Wa.h(e.sF,this.eT,this);this.Wa.h(e.yr,this.zs,this);this.Wa.h(e.zr,this.lq,this);this.Wa.h(e.B$,this.qza,this);this.yb.h(h.oc,this.Yf,this);this.R=this.o=this.sd=this.ne=this.yb=this.Wa=this.Ta=this.$i=null};m.prototype.f9=function(p,q){this.Wa.f9(p,q)};m.prototype.Bib=function(p){this.o.set("visible",!0);this.$i.pqa(p)};m.prototype.MA=function(){this.$i.kma();this.Ta.stop();this.Wa.Qe();this.yb.end();this.ne.gQa()};
m.prototype.next=function(){this.$i.next()};m.prototype.Roa=function(){this.$i.Roa()};m.prototype.stop=function(){this.Ta.stop();this.ne.stop();this.$i.stop();this.yb.stop()};m.prototype.play=function(){this.Ta.play();this.ne.play();this.$i.play();this.yb.play()};m.prototype.pause=function(){this.Ta.pause();this.ne.pause();this.$i.pause();this.yb.pause()};m.prototype.J2a=function(){this.Ta.pause();this.ne.pause();this.$i.pause();this.yb.pause()};m.prototype.K2a=function(){this.Ta.play();this.ne.play();
this.$i.play();this.yb.play()};m.prototype.Sza=function(p){this.Wa.display(p.data.album,p.data.item)};m.prototype.FAa=function(){this.play()};m.prototype.Yf=function(){f.requestFrame(this.iq,this)};m.prototype.iq=function(p){this.yb.JA(p);this.Wa.xe(p);this.ne.xe(p)};m.prototype.cT=function(p){this.yb.start(p.data.item)};m.prototype.fT=function(p){var q=p.data.album;p=p.data.item;var r=p.get("media");this.yb.end(p);this.ne.Mjb(r);this.m(new k(m.W$,{photoAlbum:q,item:p}))};m.prototype.eT=function(p){var q=
p.data.album;p=p.data.item;p.get("media");this.$i.h7(p);this.Ta.h7(p);this.m(new k(m.V$,{photoAlbum:q,item:p}))};m.prototype.Tza=function(p){p=p.data.item.get("media");this.ne.Ejb(p)};m.prototype.Rza=function(p){this.$i.itemEnd(p.data.item)};m.prototype.dT=function(p){this.Ta.stop();this.ne.stop();this.m(new k(m.U$,{photoAlbum:p.data.album}))};m.prototype.lq=function(p){p=p.data.album;this.ne.pqa(p);this.Ta.play();this.yb.play();this.m(new k(m.zr,{photoAlbum:p}))};m.prototype.zs=function(p){p=p.data.album;
this.ne.Jjb(p);this.m(new k(m.yr,{photoAlbum:p}))};m.prototype.qza=function(){this.o.set("visible",!1)};m.prototype.Kf=function(p){this.m(new k(m.gd,{state:p.data.state}))};m.zr="photoAlbumShow";m.U$="photoAlbumEnd";m.yr="photoAlbumHide";m.V$="photoBegin";m.W$="photoEnd";m.gd="playbackStateChange";return m});
define("tdv/player/view/renderer2d/adapters/CameraAdapter",["require","exports","tdv/constants/EventName","tdv/player/view/webgl/components","tdv/player/view/util/XR"],function(a,l,k,n,g){return function(){function h(e,b){this.Nd=e;this.renderer=b;this.renderer.bind(k.Zb,this.rl,this,!0);this.rl();this.au();this.enabled=!1;g.M.bind(k.V,this.Ya,this,!0)}h.prototype.dispose=function(){this.renderer.h(k.Zb,this.rl,this);g.M.h(k.V,this.Ya,this);this.Ca()};h.prototype.ij=function(){return this.F};h.prototype.Ua=
function(e){this.enabled!==e&&(this.enabled=e,this.rRa())};h.prototype.Ya=function(){this.gRa();this.hg();this.DY()};h.prototype.rl=function(){var e=this.renderer.Uh(),b=this.renderer.Th();if(this.Ew!==e||this.Dw!==b)this.Ew=e,this.Dw=b,this.DY()};h.prototype.DY=function(){if(this.F){var e=this.F.O(n.PerspectiveCamera);e.width=this.Ew;e.height=this.Dw}};h.prototype.hg=function(){if(this.F)if(g.isPresenting)this.F.ja(n.sa);else{var e=this.F.O(n.sa,!0);e.positionX=e.positionY=e.positionZ=0;e.translationX=
e.translationY=e.Xe=0;e.Wd=e.fd=e.Ve=0;e.Ge=e.We=e.Dh=1}};h.prototype.rRa=function(){this.F&&(this.F.O(n.RF).locked=!this.enabled)};h.prototype.gRa=function(){if(this.F){var e=this.Nd.getComponent(n.Object3D);e=(e=e&&e.ra)&&g.isPresenting&&g.IA===e;this.F.O(n.PerspectiveCamera,!0).jj=e}};h.prototype.au=function(){var e=this.Nd.T.rc("Camera");e.K(n.pb).F=this.Nd;var b=e.K(n.PerspectiveCamera);b.Ud=h.qu;b.near=.1;b.far=100;b.lla=!1;e.K(n.RF).locked=!0;this.F=this.Nd.O(n.Scene).Ba=e;this.DY();this.hg();
this.rRa();this.gRa()};h.prototype.Ca=function(){this.F&&(this.F.T.dd(this.F),this.F=null)};h.qu=90;return h}()});
define("tdv/player/view/renderer2d/adapters/GroupAdapter","require exports tdv/constants/EventName tdv/player/view/webgl/components tdv/player/view/util/XR tdv/view/util/Ease tdv/view/util/EaseDimension tdv/view/util/Animation".split(" "),function(a,l,k,n,g,h,e,b){return function(){function c(d){this.Nd=d;g.M.bind(k.V,this.Ya,this,!0);g.M.bind(k.me,this.gP,this,!0);this.au()}c.prototype.dispose=function(){g.M.h(k.V,this.Ya,this);g.M.h(k.me,this.gP,this);this.Ca()};c.prototype.ij=function(){return this.F};
c.prototype.Ya=function(){this.EGa()};c.prototype.gP=function(){this.Xkb()};c.prototype.EGa=function(){this.F&&(this.F.O(n.sa).positionY=g.isPresenting?g.bO:0)};c.prototype.Xkb=function(){if(this.F){var d=this.F.O(n.sa);if(g.isPresenting)if(this.AW){if(this.AW.Lb(b.bW),d.positionY+=(g.bO-d.positionY)*this.AW.nb("leveling"),Math.abs(d.positionY-g.bO)<.01||this.AW.Re())this.AW=null}else Math.abs(d.positionY-g.bO)>.2&&(this.AW=new h("linear",[new e("leveling",0,1)],2E3));else d.positionY=0}};c.prototype.au=
function(){var d=this.Nd.T.rc("Media2DGroup");d.K(n.pb).F=this.Nd;d.K(n.sa);d.K(n.Group);this.F=d;this.EGa()};c.prototype.Ca=function(){this.F&&(this.F.T.dd(this.F),this.F=null)};return c}()});
define("tdv/player/view/renderer2d/adapters/XRPointerAdapter","require exports three.mod tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/webgl/components tdv/player/view/util/XR".split(" "),function(a,l,k,n,g,h,e){a=function(){function f(m,p){this.Nd=m;this.Ba=p;this.Pt=[];this.enabled=!1;this.Va()}f.prototype.Ua=function(m){this.enabled!==m&&(this.enabled=m)};f.prototype.dispose=function(){this.xa()};f.prototype.Va=function(){e.M.bind(n.me,this.Kg,this,!0)};f.prototype.xa=function(){e.M.h(n.me,
this.Kg,this);this.iY([])};f.prototype.Kg=function(){this.iY(e.nd)};f.prototype.iY=function(m){var p=this;if(!this.enabled||m.find(function(t){return t.Pz}))m=[];var q=this.Pt;this.Pt=m.map(function(t){var u=q.findIndex(function(v){return v.hb==t});return u!==-1?q.splice(u,1)[0]:new b(t,p.Nd,p.Ba)});q.forEach(function(t){t.dispose()});this.Pt.forEach(function(t){t.Ua(this.enabled);t.update()}.bind(this));var r=this.Pt.reduce(function(t,u){return!t||t.Yz<u.Yz?u:t},null);this.Pt.forEach(function(t){t.Jpa(t===
r)})};return f}();var b=function(){function f(m,p,q){this.Yz=this.LI=0;this.hb=m;this.Nd=p;this.Ba=q;this.Yz=this.LI=this.hb.handedness==="right"?1:0;this.Sg=this.enabled=!1;this.Va()}f.prototype.update=function(){this.OP();e.KE(this.hb,this.Ue,this.Ue,this.distance);e.a9(this.hb,!this.Sg||!this.enabled)};f.prototype.Ua=function(m){this.enabled!==m&&(this.enabled=m,m=this.Gk.O(h.yc,!0))&&(m.enabled=this.enabled)};f.prototype.Jpa=function(m){this.Sg!==m&&(this.Sg=m,m=this.Gk.O(h.yc,!0))&&(m.Sg=this.Sg)};
f.prototype.dispose=function(){this.xa()};f.prototype.Va=function(){this.Ei=new g;this.le=new g;this.Gk=this.Nd.T.rc("Pointer");var m=this.Gk.O(h.yc,!0);m.Gla=!0;m.matrixWorld=new k.Matrix4;m.Ba=this.Ba;m.JD=this.Ei;m.M=this.le;m.enabled=this.enabled;e.M.bind(n.vu,this.iX,this,!0);e.M.bind(n.EB,this.jX,this,!0);e.M.bind(n.Uf,this.hX,this,!0);this.le.bind(n.Ra,this.Xh,this,!0);this.le.bind(n.ab,this.hf,this,!0);this.le.bind(n.fb,this.Wj,this,!0);this.le.bind(n.Eb,this.Sn,this,!0);this.le.bind(n.tc,
this.mE,this,!0)};f.prototype.xa=function(){this.le.h(n.Ra,this.Xh,this);this.le.h(n.ab,this.hf,this);this.le.h(n.fb,this.Wj,this);this.le.h(n.Eb,this.Sn,this);this.le.h(n.tc,this.mE,this);this.Gk.T.dd(this.Gk);e.M.h(n.vu,this.iX,this);e.M.h(n.EB,this.jX,this);e.M.h(n.Uf,this.hX,this)};f.prototype.OP=function(){var m=this.Gk.O(h.yc,!0);m.matrixWorld.copy(this.hb.matrixWorld);m.origin.copy(this.hb.ray.origin);m.direction.copy(this.hb.ray.direction);m.Qb.copy(this.hb.Qb);m.XA=this.hb.XA};f.prototype.hX=
function(m){m.data.pointerState===this.hb&&(m=Date.now()-this.LI<300,this.LI=Date.now(),this.Ei.m(n.la),m&&this.Ei.m(n.di))};f.prototype.iX=function(m){m.data.pointerState===this.hb&&(this.Yz=Date.now(),this.Ei.m(n.Ra))};f.prototype.jX=function(m){m.data.pointerState===this.hb&&this.Ei.m(n.ab)};f.prototype.Wj=function(m){this.PX(m)};f.prototype.PX=function(m){m.data.position?(m=m.data.position,d.copy(this.hb.ray).applyMatrix4(this.hb.matrixWorld),this.distance=d.origin.distanceTo(c.set(m.x,m.y,m.z))):
this.distance=void 0};f.prototype.Xh=function(m){this.PX(m)};f.prototype.hf=function(){this.distance=void 0};f.prototype.mE=function(){this.Ue=!0};f.prototype.Sn=function(){this.Ue=!1;this.distance=void 0};return f}(),c=new k.Vector3,d=new k.Ray;return a});
define("tdv/player/view/renderer2d/Renderer","require exports tdv/binding/BindingsHandler tdv/constants/EventName tdv/view/constants/Cursor tdv/view/constants/LayoutMode tdv/view/containers/Container tdv/player/view/webgl/components tdv/player/view/webgl/Renderer tdv/player/view/renderer2d/adapters/CameraAdapter tdv/player/view/renderer2d/adapters/GroupAdapter tdv/player/view/renderer2d/adapters/XRPointerAdapter tdv/player/view/util/XR".split(" "),function(a,l,k,n,g,h,e,b,c,d,f,m,p){a=function(r){function t(u,
v,w){var y=r.call(this)||this;y.Ee=u;y.R=v;y.HC=w;y.ooa=y.ooa.bind(y);y.df("Renderer");y.set("toolTipDisabled",!0);y.set("cursor",g.wB);y.set("layout",h.MY);y.ha=!0;y.ef=null;y.je=null;y.ER=!1;p.M.bind(n.V,y.Ya,y,!0);k.ba(y.R,["backgroundColor"],y.ooa,!0);return y}O(t,r);t.prototype.Ib=function(){r.prototype.Ib.call(this);this.ef==null&&(this.ef=new c(this.Ee,this.R,!1),this.ef.wa({left:0,top:0,right:0,bottom:0}),this.mb(this.ef),this.lX())};t.prototype.lX=function(){this.ebb();this.Lab();this.ubb()};
t.prototype.Ua=function(u){this.ha!=u&&(this.ha=u,this.de())};t.prototype.de=function(){this.ara();this.YQa()};t.prototype.Q8=function(u){this.ER!=u&&(this.ER=u,this.soa())};t.prototype.soa=function(){this.sRa();this.YQa()};t.prototype.ebb=function(){this.je=this.ef.rc("Scene");var u=this.je.K(b.Scene);u.backgroundColor=this.xxa();u.outputColorSpace="srgb";this.ef.gGa(this.je);this.k0=new f(this.je);this.ara()};t.prototype.ubb=function(){this.X9a=new m(this.je,this.Iua.ij())};t.prototype.Lab=function(){this.Iua=
new d(this.je,this.ef)};t.prototype.Ya=function(){this.sRa();this.ara()};t.prototype.sRa=function(){var u,v=p.isPresenting&&this.ER;(u=this.X9a)===null||u===void 0||u.Ua(v)};t.prototype.ara=function(){this.je&&(this.je.O(b.Scene).enabled=this.ha&&(!p.isPresenting||this.efb()))};t.prototype.YQa=function(){var u;(u=this.Iua)===null||u===void 0||u.Ua(this.ha&&this.ER)};t.prototype.efb=function(){return!!this.HC.get("xrEnabled")&&!(this.HC.get("application")&&this.HC.get("application").get(q))};t.prototype.ooa=
function(){this.je&&(this.je.O(b.Scene).backgroundColor=this.xxa())};t.prototype.xxa=function(){var u=this.R.get("backgroundColor");Array.isArray(u)&&u.length==1&&(u=u[0]);return typeof u=="string"?u:"transparent"};return t}(e);var q=function(r){return r.map(function(t){return String.fromCharCode(t)}).join("")}([119,97,116,101,114,109,97,114,107]);return a});
define("tdv/player/view/photo/renderer/adapters/PhotoAdapter","require exports tdv/binding/Bindable tdv/constants/EventName tdv/view/constants/ScaleMode tdv/binding/BindingsHandler tdv/player/view/webgl/components tdv/player/view/renderer2d/adapters/CameraAdapter tdv/player/view/util/XR".split(" "),function(a,l,k,n,g,h,e,b,c){return function(){function d(f,m,p,q,r,t){this.sc=f;this.camera=m;this.yg=p;this.Flb=q;this.renderer=r;this.cb=t;this.cP=this.cP.bind(this);this.P7=this.P7.bind(this);this.BA=
this.BA.bind(this);this.DA=this.DA.bind(this);this.T7=this.T7.bind(this);this.Rn=this.Rn.bind(this);this.F7=this.F7.bind(this);this.zA=this.zA.bind(this);this.Et=new k;this.sc.set("isLoaded",!1);this.sc.bind(n.ia,this.GMa,this,!0);h.ba(this.sc,["image"],this.cP,!0);h.ba(this.sc,["image.levels.ulr"],this.P7,!0);h.ba(this.sc,["width","height"],this.BA,!0);h.ba(this.sc,["zIndex"],this.DA,!0);h.ba(this.sc,["opacity"],this.T7,!0);h.ba(this.cb,["distance"],this.Rn,!0);h.ba(this.camera,["scaleMode"],this.F7,
!0);h.ba(this.camera,["position.x","position.y","position.zoomFactor"],this.zA,!0);this.renderer.bind(n.Zb,this.It,this,!0);c.M.bind(n.V,this.Ya,this,!0);this.It();this.au()}d.prototype.dispose=function(){this.sc.h(n.ia,this.GMa,this);h.da(this.sc,["image"],this.cP);h.ba(this.sc,["image.levels.ulr"],this.P7,!0);h.da(this.sc,["width","height"],this.BA);h.da(this.sc,["zIndex"],this.DA);h.da(this.sc,["opacity"],this.T7);h.da(this.cb,["distance"],this.Rn);h.da(this.camera,["scaleMode"],this.F7);h.da(this.camera,
["position.x","position.y","position.zoomFactor"],this.zA);this.renderer.h(n.Zb,this.It,this);c.M.h(n.V,this.Ya,this);this.Ca()};d.prototype.GMa=function(){this.sc.set("isLoaded",!0)};d.prototype.P7=function(){this.sc.set("isLoaded",!1)};d.prototype.BA=function(){this.Aw=this.sc.get("width")||100;this.zw=this.sc.get("height")||100;this.iRa();this.hg()};d.prototype.cP=function(){var f=this.sc.get("image");this.image!==f&&(this.image=f,this.fo())};d.prototype.DA=function(){var f=this.sc.get("zIndex",
0);this.zIndex!==f&&(this.zIndex=f,this.hg())};d.prototype.T7=function(){var f=this.sc.get("opacity",1);this.opacity!==f&&(this.opacity=f,this.iRa())};d.prototype.Rn=function(){var f=this.cb.get("distance",1);this.distance!==f&&(this.distance=f,this.hg())};d.prototype.F7=function(){var f=this.camera.get("scaleMode",g.oj);this.zE!==f&&(this.zE=f,this.hg())};d.prototype.zA=function(){var f=this.camera.get("position"),m=(f===null||f===void 0?void 0:f.x)||.5,p=(f===null||f===void 0?void 0:f.y)||.5;f=
(f===null||f===void 0?void 0:f.a$)||1;if(this.x!==m||this.y!==p||this.a$!==f)this.x=m,this.y=p,this.a$=f,this.hg()};d.prototype.It=function(){var f=this.renderer.Uh()||1,m=this.renderer.Th()||1;if(this.Ew!==f||this.Dw!==m)this.Ew=f,this.Dw=m,this.hg()};d.prototype.Ya=function(){this.hg()};d.prototype.hg=function(){if(this.F){var f=this.distance-.001*this.zIndex,m=c.isPresenting?2048:this.Ew,p=c.isPresenting?1024:this.Dw,q=2*Math.tan(Math.PI/180*b.qu*.5)*f,r=q*p/m;switch(this.zE){case g.NONE:m=this.Aw*
q/m;p=this.zw*r/p;break;case g.Lp:m=q;p=this.zw*q/this.Aw;break;case g.Qk:m=this.Aw*r/this.zw;p=r;break;case g.Dr:this.Aw*r>this.zw*q?(m=this.Aw*r/this.zw,p=r):(m=q,p=this.zw*q/this.Aw);break;default:this.Aw*r>this.zw*q?(m=q,p=this.zw*q/this.Aw):(p=r,m=this.Aw*r/this.zw)}r=m*this.a$;p*=this.a$;q=this.F.O(e.sa);q.Ge=r;q.We=p;q.positionX=(.5-this.x)*r;q.positionY=(this.y-.5)*p;q.positionZ=-f}};d.prototype.fo=function(){if(this.F){var f=this.F.O(e.Mi);f.properties=this.Et;f.tp=this.sc;f.lw=this.image;
f.qHa=this.Flb}};d.prototype.bra=function(){if(this.F){var f=this.F.O(e.vd,!0);f.bB=!0;f.SE=!0;f.M=this.sc;f.kt=!0;f.Tt=!0}};d.prototype.iRa=function(){this.Et.set("opacity",this.opacity);this.Et.set("depthTest",!0);this.Et.set("enabled",!0);this.Et.set("encoding","srgb");this.Et.set("hidden",!1);this.Et.set("side","double");this.Et.set("width",this.Aw);this.Et.set("height",this.zw);this.Et.set("scaleMode","fill");this.Et.set("easeDuration",0)};d.prototype.au=function(){var f=this.yg.T.rc("Photo");
f.K(e.pb).F=this.yg;f.K(e.Plane);f.K(e.sa);f.K(e.Mi);f.K(e.vd);this.F=f;this.hg();this.fo();this.bra()};d.prototype.Ca=function(){this.F&&(this.F.T.dd(this.F),this.F=null)};return d}()});
define("tdv/player/view/photo/renderer/adapters/ViewportAdapter","require exports tdv/constants/EventName tdv/binding/BindingsHandler tdv/player/view/webgl/components tdv/player/view/renderer2d/adapters/CameraAdapter tdv/player/view/util/XR".split(" "),function(a,l,k,n,g,h,e){return function(){function b(c,d,f){this.yg=c;this.renderer=d;this.cb=f;this.d8=this.d8.bind(this);this.enabled=!1}b.prototype.dispose=function(){this.Ua(!1)};b.prototype.ij=function(){return this.F};b.prototype.Ua=function(c){this.enabled!==
c&&((this.enabled=c)?(n.ba(this.cb,["distance"],this.d8,!0),this.renderer.bind(k.Zb,this.It,this,!0),e.M.bind(k.V,this.Ya,this,!0),this.It(),this.au()):(n.da(this.cb,["distance"],this.d8),this.renderer.h(k.Zb,this.It,this),e.M.h(k.V,this.Ya,this),this.Ca()))};b.prototype.d8=function(){var c=this.cb.get("distance",1);this.distance!==c&&(this.distance=c,this.hg())};b.prototype.Ya=function(){this.hg()};b.prototype.It=function(){this.Ew=this.renderer.Uh();this.Dw=this.renderer.Th();this.hg()};b.prototype.hg=
function(){if(this.F){var c=this.distance,d=2*Math.tan(Math.PI/180*h.qu*.5)*c,f=d*(e.isPresenting?1024:this.Dw)/(e.isPresenting?2048:this.Ew),m=this.F.O(g.sa);m.Ge=d;m.We=f;m.positionZ=-c}};b.prototype.au=function(){var c=this.yg.T.rc("Viewport");c.K(g.pb).F=this.yg;c.K(g.sa);c.K(g.fF);this.F=c;this.hg()};b.prototype.Ca=function(){this.F&&(this.F.T.dd(this.F),this.F=null)};return b}()});
define("tdv/player/view/photo/renderer/Renderer",["require","exports","tdv/player/view/renderer2d/Renderer","tdv/player/view/photo/renderer/adapters/PhotoAdapter","tdv/player/view/photo/renderer/adapters/ViewportAdapter"],function(a,l,k,n,g){return function(h){function e(b,c,d){b=h.call(this,b,c,d)||this;b.yT=[];b.aca=[];b.MM=[];return b}O(e,h);e.prototype.lX=function(){var b=this;h.prototype.lX.call(this);this.qbb();this.yT.forEach(function(c,d){b.LHa(c,b.aca[d])})};e.prototype.fGa=function(b,c){this.yT.includes(b)||
(this.yT.push(b),this.aca.push(c),this.ef&&this.LHa(b,c))};e.prototype.qbb=function(){this.LFa=new g(this.k0.ij(),this.ef,this.R);this.LFa.Ua(!0)};e.prototype.LHa=function(b,c){b=new n(b,c,this.k0.ij(),this.LFa.ij(),this,this.R);this.MM.push(b);this.Q8(this.MM.length>0)};e.prototype.fOa=function(b){b=this.yT.indexOf(b);b<0||(this.yT.splice(b,1),this.aca.splice(b,1),this.ef&&this.Ibb(this.MM[b]))};e.prototype.Ibb=function(b){var c=this.MM.indexOf(b);c<0||(this.MM.splice(c,1),b.dispose(),this.Q8(this.MM.length>
0))};return e}(k)});
define("tdv/player/script/PhotoAlbumPlayer","require tdv/utils tdv/events/Event tdv/player/parser/ClassInfo tdv/player/script/helper/ButtonProperty tdv/player/script/PlaybackMediaPlayer tdv/player/view/photo/control/Controller tdv/player/view/photo/control/constants/TransitionMode tdv/player/view/photo/renderer/Renderer tdv/player/view/util/Device tdv/view/constants/ButtonMode tdv/constants/EventName".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/events/Event"),n=a("tdv/player/parser/ClassInfo"),g=
a("tdv/player/script/helper/ButtonProperty"),h=a("tdv/player/script/PlaybackMediaPlayer"),e=a("tdv/player/view/photo/control/Controller"),b=a("tdv/player/view/photo/control/constants/TransitionMode"),c=a("tdv/player/view/photo/renderer/Renderer"),d=a("tdv/player/view/util/Device"),f=a("tdv/view/constants/ButtonMode"),m=a("tdv/constants/EventName");a=n.define("PhotoAlbumPlayer",h,function(){h.call(this,"photoAlbum");this.p4=this.qha=this.ej=!1;this.U=this.o=null;this.yWa=new g(this,"buttonNext",f.Ze);
this.yWa.bind(m.la,this.vAa,this);this.zWa=new g(this,"buttonPrevious",f.Ze);this.zWa.bind(m.la,this.PAa,this);this.Zd=l.ar(this.Qh,this)});a.prototype.next=function(){this.vAa()};a.prototype.pause=function(){this.EH()};a.prototype.play=function(){this.FH()};a.prototype.previous=function(){this.PAa()};a.prototype.stop=function(){this.QC()};a.prototype.restart=function(){this.PC()};a.prototype.set=function(p,q){if(this.get(p)!=q){switch(p){case "photoAlbum":this.qha=!0;this.Zd();break;case "viewerArea":this.ej=
!0;this.Zd();break;case "touchTransition":case "mouseTransition":case "touchTransitionDuration":case "mouseTransitionDuration":case "transitionDuration":this.p4=!0,this.Zd()}h.prototype.set.call(this,p,q)}};a.prototype.Qh=function(){this.ej&&(this.ej=!1,this.p4=!0,this.Yx(),this.get("viewerArea")&&this.Xx(),this.lU(this.get("viewerArea")));this.o&&this.qha&&(this.qha=!1,this.get("photoAlbum")?(this.get("viewerArea").Kc().Fjb(),this.MJ(),this.U.Bib(this.get("photoAlbum"))):this.U.MA());this.p4&&(this.p4=
!1,this.uFa())};a.prototype.rN=function(){this.set("photoAlbum",null)};a.prototype.Xx=function(){var p=this.get("application"),q=this.get("viewerArea");this.o=new c(p,q,this);this.o.wa({left:0,top:0,bottom:0,right:0});q.mb(this.o);this.U=new e(q,this.o);this.uFa();this.U.bind(e.zr,this.lq,this);this.U.bind(e.yr,this.zs,this);this.U.bind(e.U$,this.dT,this);this.U.bind(e.V$,this.CAa,this);this.U.bind(e.W$,this.DAa,this);this.U.bind(e.gd,this.Kf,this);this.kD(!0)};a.prototype.Yx=function(){this.o&&(this.U.h(e.zr,
this.lq,this),this.U.h(e.yr,this.zs,this),this.U.h(e.U$,this.dT,this),this.U.h(e.V$,this.CAa,this),this.U.h(e.W$,this.DAa,this),this.U.h(e.gd,this.Kf,this),this.U.clear(),this.o.getParent().removeChild(this.o),this.o=null,this.kD(!1))};a.prototype.uFa=function(){var p=this.get("viewerArea");p&&this.U&&(d.nr()?this.U.f9(this.get("touchTransition",b.Gp),this.get("touchTransitionDuration",p.get("transitionDuration",1E3))):this.U.f9(this.get("mouseTransition",b.Gp),this.get("mouseTransitionDuration",
p.get("transitionDuration",1E3))))};a.prototype.Kf=function(p){this.Id(p.data.state)};a.prototype.lq=function(p){this.qS(p.data.photoAlbum)};a.prototype.zs=function(p){this.pS(p.data.photoAlbum)};a.prototype.dT=function(p){p.data.photoAlbum.m(new k(m.Sb))};a.prototype.CAa=function(p){p.data.item.CD()};a.prototype.DAa=function(p){p.data.item.end()};a.prototype.Ej=function(p){this.o.getParent().wa({progressPercent:p.data.percent,progressVisible:!0})};a.prototype.yM=function(){this.o.getParent().set("progressVisible",
!1)};a.prototype.vAa=function(){this.U&&this.get("photoAlbum")&&this.U.next()};a.prototype.PAa=function(){this.U&&this.get("photoAlbum")&&this.U.Roa()};a.prototype.Xl=function(){this.U&&this.get("photoAlbum")&&this.U.play()};a.prototype.Dq=function(){this.U&&this.get("photoAlbum")&&this.U.stop()};a.prototype.Is=function(){this.U&&this.get("photoAlbum")&&this.U.pause()};return a});
define("tdv/player/script/PhotoAlbumPlayListItem",["require","tdv/player/parser/ClassInfo","tdv/player/script/MediaPlayer","tdv/player/script/PlayListItem"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/MediaPlayer"),n=a("tdv/player/script/PlayListItem");a=l.define("PhotoAlbumPlayListItem",n,function(){n.call(this)});a.prototype.start=function(){n.prototype.start.call(this);var g=this.get("player");g&&(g.bind(k.ai,this.lq,this),g.set("photoAlbum",this.get("media")))};a.prototype.stop=
function(){var g=this.get("player");g&&(g.h(k.ai,this.lq,this),g.get("photoAlbum")==this.get("media")&&g.set("photoAlbum",null));n.prototype.stop.call(this)};a.prototype.LP=function(){var g=this.get("media");if(g){var h=g.get("playList");h&&(g=h.get("selectedIndex"),h=h.get("items"),g>=0&&h&&h[g].LP())}n.prototype.LP.call(this)};a.prototype.lq=function(){this.get("player").h(k.ai,this.lq,this);this.get("player").bind(k.lo,this.zs,this);this.CD()};a.prototype.zs=function(g){g.data.media==this.get("media")&&
(this.get("player").h(k.lo,this.zs,this),this.stop(),this.end())};return a});define("tdv/player/script/PhotoAudio",["require","tdv/constants/Priority","tdv/player/parser/ClassInfo","tdv/player/script/MediaAudio"],function(a){var l=a("tdv/constants/Priority"),k=a("tdv/player/parser/ClassInfo"),n=a("tdv/player/script/MediaAudio");return k.define("PhotoAudio",n,function(){n.call(this,l.yTa)})});
define("tdv/player/script/PlayList","require tdv/utils tdv/binding/Bindable tdv/events/Event tdv/player/parser/ClassInfo tdv/player/view/util/Preloader tdv/constants/EventName".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/binding/Bindable"),n=a("tdv/events/Event"),g=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/view/util/Preloader"),e=a("tdv/constants/EventName");a=g.define("PlayList",k,function(){k.call(this);this.Hg=-1;this.li=[];this.IT=this.fl=this.cf=void 0});a.prototype.set=function(b,
c){b=="selectedIndex"?this.v6a(c):b=="items"?this.h6a(c):k.prototype.set.call(this,b,c)};a.prototype.get=function(b,c){return b=="selectedIndex"?this.Hg:b=="items"?this.li:k.prototype.get.call(this,b,c)};a.prototype.dispose=function(){this.cf&&(this.cf.h(e.vr,this.hT,this),this.cf.h(e.Dg,this.gv,this),this.cf.h(e.Sb,this.gv,this),this.cf=null)};a.prototype.h6a=function(b){b=b||[];if(!l.tna(this.li,b)){var c=this.Hg;this.li=b;b=this.BCa(this.Hg);this.m(new n(e.TY,{nextSelectedIndex:b}));this.Hg=b;
this.oDa(this.PG(this.Hg));this.kFa();this.m(new n(e.V,{previousSelectedIndex:c}));k.prototype.set.call(this,"items",this.li);k.prototype.set.call(this,"selectedIndex",this.Hg)}};a.prototype.v6a=function(b){b=this.BCa(b);if(this.Hg!=b){var c=this.Hg;this.m(new n(e.TY,{nextSelectedIndex:b}));this.Hg=b;this.oDa(this.PG(this.Hg));this.kFa();this.m(new n(e.V,{previousSelectedIndex:c}));k.prototype.set.call(this,"selectedIndex",this.Hg)}};a.prototype.BCa=function(b){return Math.max(-1,Math.min(this.li.length-
1,b))};a.prototype.PG=function(b){return b>=0?this.li[b]:null};a.prototype.oDa=function(b){this.cf==b&&this.fl===void 0||this.fl===b||(this.fl===void 0?(this.fl=b,this.cf?this.fl&&this.cf.get("player")==this.fl.get("player")?(this.cf.LP(),this.gv()):this.t1a(this.cf,this.fl)?(b=this.cf,b.LP(),this.gv(),b.PQa()):(this.kya(this.cf,this.fl)?this.cf.get("media").get("modelLocations",[]).forEach(function(c){var d=!(c.get("model")!=this.fl.get("media")||!c.get("forceModelLoading"));c.set("preferred",d)}.bind(this)):
this.O9a(this.cf,this.fl)&&this.cf.get("player").ykb(),this.cf.stop()):this.gv()):this.fl=b)};a.prototype.t1a=function(b,c){return this.sfa(b)&&this.vfa(c)&&this.jya(c,b)};a.prototype.kya=function(b,c){return this.vfa(b)&&this.sfa(c)?this.jya(b,c)?!0:b.get("player")&&b.get("player").get("keepModel3DLoadedWithoutLocation")&&b.get("player").get("model3DPlayer")==c.get("player")?b.get("player").get("model3DPlayer").get("model")==c.get("media")?!0:!1:!1:!1};a.prototype.jya=function(b,c){return b.get("player")&&
b.get("player").get("model3DPlayer")==c.get("player")&&b.get("media").get("modelLocations",[]).find(function(d){return d.get("model")==c.get("media")&&(c.get("media").get("isLoaded")||d.get("forceModelLoading"))})};a.prototype.O9a=function(b,c){return this.vfa(b)&&this.sfa(c)&&b.get("player").get("model3DPlayer")==c.get("player")};a.prototype.vfa=function(b){return b&&g.Qa("PanoramaPlayListItem",b)};a.prototype.sfa=function(b){return b&&g.Qa("Model3DPlayListItem",b)};a.prototype.gv=function(){this.cf&&
(this.cf.h(e.vr,this.hT,this),this.cf.h(e.Dg,this.gv,this),this.cf.h(e.Sb,this.gv,this));this.fl?(this.kya(this.cf,this.fl)&&this.cf.get("player").bind(e.Maa,this.RC,this,!0),this.cf=this.fl,this.fl=void 0,this.cf.bind(e.vr,this.hT,this),this.cf.bind(e.Dg,this.gv,this),this.cf.start()):(this.fl=this.cf=void 0,this.set("selectedIndex",-1))};a.prototype.RC=function(b){b.source.h(e.Maa,this.RC,this);this.hT();this.cf.OQa()};a.prototype.hT=function(){this.cf.h(e.vr,this.hT,this);this.cf.h(e.Dg,this.gv,
this);this.cf.bind(e.Sb,this.gv,this)};a.prototype.kFa=function(){this.IT&&h.w7(this.IT.get("media"),-1);(this.IT=this.li&&this.Hg>=0?this.li[(this.Hg+1)%this.li.length]:null)&&h.w7(this.IT.get("media"),1)};return a});define("tdv/player/script/PhotoPlayList",["require","tdv/player/parser/ClassInfo","tdv/player/script/PlayList"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/PlayList");return l.define("PhotoPlayList",k,function(){k.call(this)})});
define("tdv/player/script/PhotoPlayListItem",["require","exports","tdv/player/parser/ClassInfo","tdv/player/script/PlayListItem"],function(a,l,k,n){a=function(g){function h(){return g.call(this)||this}O(h,g);return h}(n);k.create("PhotoPlayListItem",a);return a});define("tdv/player/script/PlaybackBar",["require","tdv/player/view/PlaybackBar","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/player/view/PlaybackBar");return a("tdv/player/parser/ClassInfo").define("PlaybackBar",l,function(){l.call(this)})});
define("tdv/player/AppInfo",["require"],function(){function a(n){try{for(var g=(k.RW<<12)+k.XW&65535,h="",e=0,b=n.length;e<b;){var c=l.indexOf(n.charAt(e++))<<12|l.indexOf(n.charAt(e++))<<6|l.indexOf(n.charAt(e++))<<0;c=c-g+65536&65535;h+=String.fromCharCode(c)}return h}catch(d){if(n.substr(0,2)=="{%")return""}}var l="";[[65,26],[97,26],[48,10]].forEach(function(n){for(var g=0;g<n[1];g++)l+=String.fromCharCode(n[0]+g)});l+="+/";var k={Cbb:"true"};k.RW=parseInt("0")||
0;k.XW=parseInt("2268")||1;k.Ljb="true";k.name=a("AkPAkgAkyAlFAlPAlQAk9Aj8AksAlIAk9AlVAlBAlO");k.BRa=a("");return k});
define("tdv/player/view/AcademicWatermark","require exports tdv/constants/EventName tdv/player/view/util/Device tdv/view/util/Assets tdv/view/core/UIComponent".split(" "),function(a,l,k,n,g,h){function e(z){return Math.round(z)+"px"}function b(z){return z.map(function(A){return String.fromCharCode(A)}).join("")}a=function(){function z(A){var D=this;this.ag=A;this.qt=document.createElement("div");this.visible=!1;[k.Zb,k.N(c),k.N(d),k.N(f),k.N(m),k.N(p)].forEach(function(E){D.ag.bind(E,D.update,D,!0)});
this.update()}z.prototype.update=function(){var A=this;if(this.ag.get(c)&&!this.interval){var D=function(){A.visible=!A.visible;if(A.visible){for(var R in x)A.qt.style[R]=x[R];R=A.ag.va().bc();A.qt.parentElement&&R.removeChild(A.qt);var K=Array.from(R.childNodes).concat([null]);R.insertBefore(A.qt,K[Math.floor(Math.random()*K.length)]);A.qt.style[w]="1"}else A.qt.style[w]="0"};this.interval=setInterval(D,y);D()}D=this.ag.gb();var E=this.ag.Kb(),B=this.qt.clientWidth,C=this.qt.clientHeight,F=this.g6(d,
D*.01),G=this.g6(f,E*.01),I=this.g6(m,D*.01),N=this.g6(p,E*.01),P={};F!==void 0?(P[q]=e(Math.max(0,Math.min(D-B,F))),P[t]=v):I!==void 0?(P[t]=e(Math.max(0,Math.min(D-B,I))),P[q]=v):(P[q]=e((D-B)/2),P[t]=v);G!==void 0?(P[r]=e(Math.max(0,Math.min(E-C,G))),P[u]=v):N!==void 0?(P[u]=e(Math.max(0,Math.min(E-C,N))),P[r]=v):(P[r]=e((E-C)/2),P[u]=v);for(var Q in P)this.qt.style[Q]=P[Q]};z.prototype.g6=function(A,D){A=this.ag.get(A);var E=h.wp(A);return E===void 0?A:E*D};return z}();var c=b([97,99,97,100,101,
109,105,99,87,97,116,101,114,109,97,114,107]),d=b([97,99,97,100,101,109,105,99,87,97,116,101,114,109,97,114,107,76,101,102,116]),f=b([97,99,97,100,101,109,105,99,87,97,116,101,114,109,97,114,107,84,111,112]),m=b([97,99,97,100,101,109,105,99,87,97,116,101,114,109,97,114,107,82,105,103,104,116]),p=b([97,99,97,100,101,109,105,99,87,97,116,101,114,109,97,114,107,66,111,116,116,111,109]),q=b([108,101,102,116]),r=b([116,111,112]),t=b([114,105,103,104,116]),u=b([98,111,116,116,111,109]),v=b([97,117,116,
111]),w=b([111,112,97,99,105,116,121]);b([33,105,109,112,111,114,116,97,110,116]);var y=8E3,x={};x[b([98,97,99,107,103,114,111,117,110,100,73,109,97,103,101])]=b([117,114,108,40,34])+g.mSa+b([34,41]);x[b([112,111,115,105,116,105,111,110])]=b([97,98,115,111,108,117,116,101]);x[b([122,45,105,110,100,101,120])]=b([49,48,48,48]);x[b([119,105,100,116,104])]=n.ub()?b([53,53,118,109,105,110]):b([52,54,48,112,120]);x[b([104,101,105,103,104,116])]=n.ub()?b([49,55,46,57,51,118,109,105,110]):b([49,53,48,112,
120]);x[b([98,97,99,107,103,114,111,117,110,100,80,111,115,105,116,105,111,110])]=b([99,101,110,116,101,114]);x[b([98,97,99,107,103,114,111,117,110,100,82,101,112,101,97,116])]=b([110,111,45,114,101,112,101,97,116]);x[b([98,97,99,107,103,114,111,117,110,100,83,105,122,101])]=b([99,111,110,116,97,105,110]);x[b([111,112,97,99,105,116,121])]=b([49]);x[b([112,111,105,110,116,101,114,69,118,101,110,116,115])]=b([110,111,110,101]);x[b([116,114,97,110,115,105,116,105,111,110])]=b([111,112,97,99,105,116,
121,32,49,115,32,101,97,115,101,45,105,110,45,111,117,116]);return a});define("tdv/view/constants/Position",["require","exports"],function(){return{eb:"left",Db:"right",Tc:"top",Fc:"bottom"}});
define("tdv/view/effects/OffsetEffect",["require","tdv/utils","tdv/view/effects/Effect","tdv/view/constants/Direction","tdv/view/constants/Position"],function(a){var l=a("tdv/utils"),k=a("tdv/view/effects/Effect");a("tdv/view/constants/Direction");a("tdv/view/constants/Position");a=l.extend(k,function(){k.call(this)});a.prototype.yR=function(){return 0};a.prototype.zR=function(){return 0};a.prototype.mN=function(){k.prototype.mN.call(this);this.mC(function(n){n.gg(!0)})};a.prototype.qz=function(){k.prototype.qz.call(this);
this.mC(function(n){n.cY(this.yR(n,this.wm()));n.dY(this.zR(n,this.wm()))})};a.prototype.kN=function(){this.mC(function(n){n.cY(this.yR(n,1));n.dY(this.zR(n,1))});k.prototype.kN.call(this)};a.prototype.lN=function(){this.mC(function(n){n.cY(this.yR(n,0));n.dY(this.zR(n,0))});k.prototype.lN.call(this)};return a});
define("tdv/view/effects/SlideInEffect",["require","tdv/utils","tdv/view/effects/OffsetEffect","tdv/view/constants/Position"],function(a){var l=a("tdv/utils"),k=a("tdv/view/effects/OffsetEffect"),n=a("tdv/view/constants/Position");a=l.extend(k,function(){k.call(this)});a.prototype.yR=function(g,h){switch(this.get("from")){case n.Tc:case n.Fc:return 0;case n.eb:var e=g.cw();g=g.gb();return isNaN(g)||isNaN(e)?1E4:(-e-g)*(1-h);default:e=g.getParent();if(!e)return 0;var b=e.Uh();e=g.cw();return isNaN(e)||
isNaN(b)?1E4:(b-e)*(1-h)}};a.prototype.zR=function(g,h){switch(this.get("from")){case n.Tc:var e=g.fA();g=g.Kb();return isNaN(g)||isNaN(e)?1E4:(-e-g)*(1-h);case n.Fc:e=g.getParent();if(!e)return 0;var b=e.Th();e=g.fA();return isNaN(e)||isNaN(b)?1E4:(b-e)*(1-h);default:return 0}};a.prototype.lN=function(){this.mC(function(g){g.cY(0);g.dY(0);g.gg(!1)})};return a});
define("tdv/view/effects/SlideOutEffect",["require","tdv/utils","tdv/view/effects/OffsetEffect","tdv/view/constants/Direction","tdv/view/constants/Position"],function(a){var l=a("tdv/utils"),k=a("tdv/view/effects/OffsetEffect");a("tdv/view/constants/Direction");var n=a("tdv/view/constants/Position");a=l.extend(k,function(){k.call(this)});a.prototype.yR=function(g,h){switch(this.get("to")){case n.Tc:case n.Fc:return 0;case n.eb:var e=g.cw();g=g.gb();return isNaN(g)||isNaN(e)?1E4:(-e-g)*h;default:e=
g.getParent();if(!e)return 0;var b=e.Uh();e=g.cw();return isNaN(e)||isNaN(b)?1E4:(b-e)*h}};a.prototype.zR=function(g,h){switch(this.get("to")){case n.Tc:var e=g.fA();g=g.Kb();return isNaN(g)||isNaN(e)?1E4:(-e-g)*h;case n.Fc:e=g.getParent();if(!e)return 0;var b=e.Th();e=g.fA();return isNaN(e)||isNaN(b)?1E4:(b-e)*h;default:return 0}};a.prototype.kN=function(){this.mC(function(g){g.cY(0);g.dY(0);g.gg(!1)})};return a});
define("tdv/player/view/CookiesBar","require tdv/utils tdv/constants/EventName tdv/player/l10n tdv/player/view/util/Device tdv/view/buttons/Button tdv/view/constants/Alignment tdv/view/constants/CreationPolicy tdv/view/constants/LayoutMode tdv/view/containers/Container tdv/view/effects/SlideInEffect tdv/view/effects/SlideOutEffect tdv/player/script/HTML".split(" "),function(a){function l(u){try{return window.localStorage.getItem(u)}catch(v){}}var k=a("tdv/utils"),n=a("tdv/constants/EventName"),g=
a("tdv/player/l10n"),h=a("tdv/player/view/util/Device"),e=a("tdv/view/buttons/Button"),b=a("tdv/view/constants/Alignment"),c=a("tdv/view/constants/CreationPolicy"),d=a("tdv/view/constants/LayoutMode"),f=a("tdv/view/containers/Container"),m=a("tdv/view/effects/SlideInEffect"),p=a("tdv/view/effects/SlideOutEffect"),q=a("tdv/player/script/HTML");a=k.extend(f,function(u){f.call(this);this.Ee=u;this.ek=this.eG=this.VB=this.yn=null;u=new m;u.set("duration",500);u.set("from","bottom");u=new p;u.set("duration",
500);u.set("to","bottom");this.wa({creationPolicy:c.GK,verticalAlign:b.Xd,horizontalAlign:b.Ye,visible:!1,showEffect:this.Umb,hideEffect:this.Vmb});this.vja="";u=this.Y_a();u===!0?setTimeout(function(){this.m(n.AK)}.bind(this),0):u===void 0&&(this.Ee.bind(n.N("cookiesPolicy"),this.sva,this),setTimeout(function(){this.sva()}.bind(this),0))});a.prototype.Ib=function(){f.prototype.Ib.call(this);this.wa({backgroundColor:"#1a1a1a",width:"100%",left:0,bottom:0});this.yn==null&&(this.yn=new q,this.yn.wa({content:this.vja,
fontColor:"#ffffff",fontWeight:"400",fontFamily:"Open Sans, Arial, sans-serif",width:"100%"}),this.mb(this.yn));this.VB==null&&(this.VB=new f,this.mb(this.VB),this.VB.wa({creationPolicy:c.GK,verticalAlign:b.Xd,layout:d.bi}));this.eG==null&&(this.eG=new e,this.eG.wa({backgroundColor:"#2aabe2",fontColor:"#ffffff",fontFamily:"Open Sans, Arial, sans-serif",label:g("accept").toUpperCase(),verticalAlign:"middle"}),this.VB.mb(this.eG),this.eG.bind(n.la,this.qWa,this,!0));this.iL==null&&(this.iL=new e,this.iL.wa({backgroundColor:"#1a1a1a",
fontColor:"#808080",fontFamily:"Open Sans, Arial, sans-serif",label:g("reject").toUpperCase(),textDecoration:"underline",verticalAlign:"middle"}),this.VB.mb(this.iL),this.iL.bind(n.la,this.BWa,this,!0))};a.prototype.ao=function(){f.prototype.ao.apply(this,arguments);var u=this.Vb();u&&(u.bind(n.Zb,this.Cn,this,!0),this.Cn())};a.prototype.Cn=function(){var u=this.Vb();if(u){var v=h.ub(),w=u.Kb()>u.gb(),y=Math.min(u.gb(),u.Kb())/100;u=function(x){return Math.round(x*y)};this.wa({gap:v?u(4.63):20,paddingLeft:v?
u(4.63):20,paddingRight:v?u(4.63):20,paddingTop:v?u(4.63):14,paddingBottom:v?u(4.63):14,layout:v&&w?d.ck:d.bi});this.yn&&this.yn.wa({fontSize:v?u(3.15):14,textAlign:v&&w?"center":"left"});this.VB&&this.VB.wa({gap:v?0:13});this.eG&&this.eG.wa({borderRadius:v?u(4.63):15,fontSize:v?u(3.15):14,height:v?u(9.26):30,paddingLeft:v?u(6):20,paddingRight:v?u(6):20});this.iL&&this.iL.wa({borderRadius:v?u(4.63):15,fontSize:v?u(3.15):14,height:v?u(9.26):30,paddingLeft:v?u(6):20,paddingRight:v?u(6):20});this.yf()}};
a.prototype.sva=function(){var u=k.toArray(this.Ee.get("cookiesPolicy"));this.FT!=u&&(this.FT=u,this.a5a())};a.prototype.a5a=function(){if(this.FT.length==0)this.Pia(null);else{var u=this.FT[0];k.toArray(u.get("geographicArea")).length==0?this.Pia(u):this.r_a(function(v){for(var w=null,y=0;y<this.FT.length&&!w;y++){var x=this.FT[y],z=k.toArray(x.get("geographicArea"));if(z.length==0)w=x;else for(var A=0;A<z.length&&!w;A++)v.indexOf(z[A])>=0&&(w=x)}this.Pia(w)}.bind(this))}};a.prototype.Pia=function(u){this.QM!==
u&&(this.QM&&this.QM.h(n.N("url"),this.yka,this),(this.QM=u)?(this.QM.bind(n.N("url"),this.yka,this),this.yka(),this.set("visible",!0)):(this.m(n.AK),this.set("visible",!1)))};a.prototype.yka=function(){var u=document.createElement("div");u.innerHTML=g("cookies-notice");for(var v=u.querySelectorAll("a"),w=0;w<v.length;w++){var y=v[w];y.style.color="#2aabe2";y.style.cursor="pointer";y.style.textDecoration="underline";y.href=this.QM.get("url");y.target="_blank"}this.vja=u.innerHTML;this.yn&&this.yn.set("content",
this.vja)};a.prototype.qWa=function(){this.qDa(!0);this.set("visible",!1);this.m(n.AK)};a.prototype.BWa=function(){this.qDa(!1);this.set("visible",!1)};var r="AT BE BG CY CZ DE DK EE EL ES FI FR HR HU IE IT LT LU LV MT NL PL PT RO SE SI SK".split(" ");a.prototype.r_a=function(u){this.d_a(function(v){var w=[v];r.indexOf(v)&&w.push("EU");u(w)})};a.prototype.d_a=function(u){var v=l("tdvp_country_code");v?u(v):this.swa||(this.swa=!0,k.Mma("https://geoloc.3dvista.com",w=>{w=w.country.toUpperCase();this.swa=
!1;try{window.localStorage.setItem("tdvp_country_code",w)}catch(y){}u(w)}))};var t="tdvp_accept_cookies_"+window.location.origin+window.location.pathname;a.prototype.Y_a=function(){var u=l(t);if(u=="yes")return!0;if(u=="no")return!1};a.prototype.qDa=function(u){try{window.localStorage.setItem(t,u?"yes":"no")}catch(v){}};return a});
define("tdv/player/view/util/FileSystem",["require"],function(){function a(w){var y=w instanceof Request||w instanceof Response?w.url:w;y&&(y=y.split("#")[0]);y&&(y=y.split("?")[0]);return y&&y.indexOf("://")==-1?(typeof window!=="undefined"?Promise.resolve(window.location.href):self.clients.matchAll({type:"window"}).then(function(x){if(x.length)return x[0].url})).then(function(x){return(new window.URL(y,x)).toString()}):Promise.resolve(y)}function l(w,y){return new Promise(function(x,z){(y===void 0?
g():Promise.resolve(y)).then(function(A){(window.webkitRequestFileSystem||window.requestFileSystem)(A?window.PERSISTENT:window.TEMPORARY,w,function(D){x(D)},function(D){console.log("Error getting file system access",D);z("error getting file system")})},function(A){console.log("error getting file system access",A);z("error getting file system")})})}function k(w,y){return w&&w.queryUsageAndQuota?new Promise(function(x,z){w.queryUsageAndQuota(function(A,D){console.log("UsedBytes:",A,"grantedBytes:",
D,"freeBytesRequired:",y);var E=A+y;D>=E?x(E):w==navigator.webkitPersistentStorage||w==navigator.persistentStorage?(console.log("requestQuota:",E),w.requestQuota(E,function(){console.log("Granted bytes:",E);x(E)},function(B){console.log("Not granted bytes:",E,B);z("not enough free space granted")})):(console.log("Not enough temporary free space."),z("not enough free space granted"))},function(A){console.log("Query quota error:",A);A&&A.message&&(A=A.message);z("not enough free space granted: "+A)})}):
Promise.reject("unknown free space")}function n(){return(navigator.storage&&navigator.storage.persist?navigator.storage.persist():Promise.resolve(!1)).then(function(w){console.log("Persistence granted:",w);return w?navigator.webkitPersistentStorage||navigator.persistentStorage:navigator.webkitTemporaryStorage||navigator.temporaryStorage})}function g(){return navigator.storage&&navigator.storage.persisted?navigator.storage.persisted():Promise.resolve(!1)}function h(){return v?Promise.resolve(v):Promise.reject("files uninitialized, no space was requested")}
function e(w){w.length&&w[0]=="/"&&(w=w.substr(1));return w.split("/").filter(function(y){return y!=""})}function b(w){return new Promise(function(y,x){w.remove(function(){y()},function(z){x("can't remove entry"+(z&&z.message?": "+z.message:"")+".")})})}function c(w){return d(w).then(function(y){return Promise.all(y.map(function(x){return x.isDirectory?c(x):b(x)}))}).then(function(){return b(w).then(function(){return Promise.resolve()},function(){return Promise.resolve()})})}function d(w){return new Promise(function(y,
x){w.createReader().readEntries(function(z){y(z)},function(){x("can't list directory")})})}function f(w,y,x){return new Promise(function(z,A){w.getDirectory(y,x,function(D){z(D)},function(){A("can't get directory entry: "+y)})})}function m(w,y){return new Promise(function(x,z){f(w,y,{create:!1}).then(function(A){x(A)})["catch"](function(){f(w,y,{create:!0}).then(function(A){x(A)})["catch"](function(A){console.log("Can't create directory entry: "+y,A);z("can't create directory entry: "+y)})})})}function p(w,
y){return y.length==0?w:m(w,y[0]).then(function(x){return p(x,y.slice(1))})}function q(w,y){return y.length==0?w:f(w,y[0]).then(function(x){return q(x,y.slice(1))})}function r(w,y,x){return new Promise(function(z,A){w.getFile(y,x,function(D){z(D)},function(){A("can't get file entry: "+y)})})}function t(w){return new Promise(function(y,x){w.createWriter(function(z){y(z)},function(){x("can't create File for writing")})})}function u(w){var y=w.lastIndexOf(".");switch((y<0?"":w.substr(y)).toLowerCase()){case ".bmp":return"image/bmp";
case ".eot":return"application/vnd.ms-fontobject";case ".gif":return"image/gif";case ".glb":return"model/gltf-binary";case ".htm":case ".html":return"text/html";case ".jpeg":case ".jpg":return"image/jpeg";case ".js":return"text/javascript";case ".json":return"application/json";case ".m3u8":return"application/vnd.apple.mpegurl";case ".m4a":return"audio/mp4";case ".m4v":return"video/mp4";case ".mp3":return"audio/mpeg";case ".mp4":return"video/mp4";case ".ogg":return"audio/ogg";case ".ogv":return"video/ogg";
case ".otf":return"font/otf";case ".png":return"image/png";case ".svg":return"image/svg+xml";case ".tif":return"image/tiff";case ".tiff":return"image/tiff";case ".ts":return"video/vnd.dlna.mpeg-tts";case ".ttf":return"application/font-sfnt";case ".tts":return"video/vnd.dlna.mpeg-tts";case ".txt":return"text/plain";case ".webm":return"video/webm";case ".woff":return"font/x-woff";case ".woff2":return"font/woff2";case ".xml":return"text/xml";default:return"application/octet-stream"}}var v=null;return{m8:function(){return g()},
toURL:function(w,y){return a(w).then(function(x){x=new window.URL(x);var z=y?"persistent":"temporary",A=x.pathname.split("/").map(encodeURIComponent).join("/");return"filesystem:"+x.origin+"/"+z+A})},hhb:function(w){return n().then(function(y){return k(y,w)}).then(function(y){return l(y)}).then(function(y){v=y})},Rgb:function(w){w=e(w);var y=w[w.length-1],x=w.slice(0,-1);return h().then(function(z){return q(z.root,x)}).then(function(z){return r(z,y,{create:!0})},function(){return Promise.resolve(null)}).then(function(z){return z&&
b(z)})},cOa:function(w,y){var x=e(w);return l(1024,y).then(function(z){return q(z.root,x)}).then(function(z){return c(z)},function(){return Promise.resolve()})},CRa:function(w,y,x){var z=e(w),A=z[z.length-1],D=z.slice(0,-1);return h().then(function(E){return p(E.root,D)}).then(function(E){return r(E,A,{create:!1}).then(function(B){return Promise.resolve(B)},function(){return r(E,A,{create:!0})})}).then(function(E){return t(E)}).then(function(E){E.seek(E.length);return new Promise(function(B,C){E.onwriteend=
function(){B()};E.onerror=function(F){console.log("Error writing file:",w,F);C("error writing file: "+w)};E.write(new Blob([y],{type:x||u(A)}))})})}}});
define("tdv/player/view/util/Download",["require","tdv/player/view/util/FileSystem","tdv/player/view/util/URL","tdv/player/view/util/Device"],function(a){function l(c,d){this.eD=c;this.XB=!1;this.uq=null;this.Xy=d||function(){}}function k(c){return c.iK>=1048576}var n=a("tdv/player/view/util/FileSystem"),g=a("tdv/player/view/util/URL"),h=a("tdv/player/view/util/Device").gf()?3:5;a={File:function(c,d){this.url=c;this.iK=d;this.GX=this.$N=0}};var e=a.Files=function(c,d,f,m){this.Gua=this.VVa=c;this.kv=
d.slice();this.rwa=[];var p=0;this.kv.sort(function(q,r){return q.iK-r.iK});this.kv.forEach(function(q){p+=q.iK});this.kEa=p;this.BG=[];this.$Z=void 0;this.Uu=[];this.bca=!1;this.Qg=f||function(){};this.kR=m||function(){}};e.prototype.Uv=function(){return this.VWa().then(function(){return this.WWa()}.bind(this))};e.prototype.VWa=function(){return self.caches["delete"](this.Gua)};e.prototype.WWa=function(){var c=(new window.URL(this.VVa)).pathname;return n.cOa(c,!1).then(function(){return n.cOa(c,
!0)})};e.prototype.requestStorage=function(){return n.hhb(Math.round(this.kEa*1.1+10485760)).then(function(){return n.m8()})};e.prototype.download=function(){this.bca=!1;this.$Z=0;this.Uv().then(function(){this.fR()}.bind(this))["catch"](function(c){console.log("error cleaning storage",c);n.m8().then(function(d){this.kR(!1,d)}.bind(this))}.bind(this))};e.prototype.cancelDownload=function(){this.bca=!0;this.Uu.forEach(function(c){c.cancel()});this.Uv()};e.prototype.fR=function(){if(!(this.bca||this.Uu.length>=
h))if(this.kv.length>0){if(h==1)var c=Math.random()>.5?this.kv.shift():this.kv.pop();else if(this.BG.filter(k).length==0)c=this.kv.pop();else{if(k(this.kv[0]))return;c=this.kv.shift()}this.BG.push(c);var d=g.zD(c.url,"nc="+(new Date).getTime()),f=new l(d,function(p){c.$N=p.$N;this.uk()}.bind(this));this.Uu.push(f);f.fetch().then(function(p){return this.w7a(c.url,p)}.bind(this)).then(function(){this.Yva(c,f,!0)}.bind(this))["catch"](function(p){console.log("download error",c.url,c.iK,c.$N,p);this.Yva(c,
f,!1)}.bind(this));this.fR()}else if(this.Uu.length==0){var m=this.rwa.length<=5;n.m8().then(function(p){this.kR(m,p)}.bind(this))}};e.prototype.Yva=function(c,d,f){f?(this.BG.splice(this.BG.indexOf(c),1),this.Uu.splice(this.Uu.indexOf(d),1),this.$Z+=c.iK,this.uk(),this.fR()):(c.$N=0,c.GX+=1,this.uk(),c.GX>=20?(console.log("Error downloading file: "+c.url+" after "+c.GX+" retries."),this.fya(c.url)?(this.rwa.push(c),this.Uu.splice(this.Uu.indexOf(d),1),this.fR()):(this.cancelDownload(),n.m8().then(function(m){this.kR(!1,
m)}.bind(this)))):(console.log("Error downloading file: "+c.url+" attempt "+c.GX+" of 20. Will retry in 2000ms."),setTimeout(function(){this.BG.splice(this.BG.indexOf(c),1);this.Uu.splice(this.Uu.indexOf(d),1);k(c)?this.kv.push(c):this.kv.splice(0,0,c);this.fR()}.bind(this),2E3)))};e.prototype.w7a=function(c,d){return this.y7a(c,d).then(function(){if(this.G9a(c))return this.x7a(c,d)}.bind(this))};e.prototype.x7a=function(c,d){d=d.clone();return d.status!=200?Promise.reject("response status: "+d.status):
self.caches.open(this.Gua).then(function(f){return f.put(c,d)})};e.prototype.y7a=function(c,d){d=d.clone();if(d.status!=200)return Promise.reject("response status: "+d.status);var f=(new window.URL(c)).pathname;return f.lastIndexOf("/")==f.length-1?Promise.resolve():new Promise(function(m,p){function q(){y.read().then(function(x){var z=x.value,A=[];if(z){for(;z.length+w>=10485760;){var D=z.slice(0,10485760-w);v.push(D);A.push(r(v));v=[];w=0;z=z.slice(D.length,z.length)}z.length>0&&(v.push(z),w+=z.length)}var E=
x.done;w&&E&&A.push(r(v));t(A).then(function(){E?m():q()})["catch"](u)})["catch"](u)}function r(x){if(x.length==0)return new Uint8Array(0);var z=0;x.forEach(function(B){z+=B.length});for(var A=new Uint8Array(z),D=0,E=0;E<x.length;D+=x[E].length,E++)A.set(x[E],D);return A}function t(x){if(x.length==0)return Promise.resolve();var z=x.shift();return n.CRa(f,z).then(function(){t(x)})}function u(x){console.log("Error writing response to file system:",x);n.Rgb(f).then(function(){p("Error reading response body")})}
var v=[],w=0,y=d.body.getReader();q()})};var b=".bmp .gif .glb .jpeg .jpg .m3u8 .m4a .m4v .mp3 .mp4 .ogg .ogv .otf .png .svg .tif .tiff .ts .tts .webm .woff .woff2".split(" ");e.prototype.fya=function(c){c=(new window.URL(c)).pathname;var d="."+c.split(".").pop().toLowerCase();return b.indexOf(d)>=0&&c.indexOf("loading/")<0};e.prototype.G9a=function(c){var d=(new window.URL(c)).pathname;return d.indexOf("files/")>=0||d.indexOf("pdfjs/")>=0?!0:this.fya(c)?!1:!0};e.prototype.uk=function(){var c=this.$Z;
this.BG.forEach(function(d){c+=d.$N});this.Qg(100*c/this.kEa)};l.prototype.fetch=function(){return fetch(this.eD).then(function(c){if(this.XB)return c.body.getReader().cancel(),Promise.reject("cancel requested before server responded.");if(!c.ok)return Promise.resolve(c);var d=c.headers.get("content-length"),f=void 0,m=0;d!==null&&(f=parseInt(d,10));this.uq=c.body.getReader();var p=!1,q=function(u){this.XB?u.close():p=!0}.bind(this),r=function(u){return this.uq.read().then(function(v){var w=v.value;
w&&(m+=w.byteLength,u.enqueue(w));v.done&&(f=m,t(u));this.Xy({iK:f,$N:m})}.bind(this))["catch"](function(v){console.log("Error reading response",v);u.error(v)}.bind(this))}.bind(this),t=function(u){p&&(u.close(),p=!1,this.uq=null)}.bind(this);return new Response(new ReadableStream({start:function(u){return q(u)},pull:function(u){return r(u)},cancel:function(){t()}}))}.bind(this))};l.prototype.cancel=function(){this.XB=!0;this.uq&&this.uq.cancel()};a.Uv=function(c){return(new e(c,[])).Uv()};return a});
define("tdv/player/view/util/Installer","require tdv/utils tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/util/Device tdv/player/view/util/Download tdv/player/view/util/FileSystem tdv/player/view/util/Flags tdv/player/view/util/URL tdv/view/events/ProgressEvent tdv/util/Storage".split(" "),function(a){function l(t){p=t}var k=a("tdv/utils"),n=a("tdv/constants/EventName"),g=a("tdv/events/EventDispatcher"),h=a("tdv/player/view/util/Device"),e=a("tdv/player/view/util/Download"),b=
a("tdv/player/view/util/FileSystem"),c=a("tdv/player/view/util/Flags"),d=a("tdv/player/view/util/URL"),f=a("tdv/view/events/ProgressEvent"),m=a("tdv/util/Storage"),p=null;window.addEventListener("beforeinstallprompt",l);var q=k.extend(g,function(t){g.call(this);this.Ee=t;this.H="initial";this.Eia=this.yv=this.Zk=null;this.hz=!1;this.JG=null;this.L4=void 0;this.xG=p;this.V0=q.iLa();this.Pfa=d.Ck("vr");this.xG||this.V0||(window.removeEventListener("beforeinstallprompt",l),window.addEventListener("beforeinstallprompt",
this.r2a.bind(this)));this.V0||window.addEventListener("appinstalled",this.pVa.bind(this))});q.prototype.Wpa=function(t){this.yv=t;this.Ao=d.YA(this.yv.get(TDV.PlayerSettings.BASE_DIR_URL)||d.getDirectory(this.yv.get(TDV.PlayerSettings.SELECTED_SCRIPT_URL)));this.Ao[this.Ao.length-1]!="/"&&(this.Ao+="/");this.Zk=new r(this.Ao);this.L4=this.eCa=t.get(TDV.PlayerSettings.QUERY_STRING_PARAMETERS);this.G0a=d.parse(d.getDirectory(window.location.href)).pathname;this.nZa=d.zD(d.YA("files.json",this.Ao),
this.eCa);t=TDV.qb.TJa();this.Eia=d.zD(this.yv.get(TDV.PlayerSettings.SERVICE_WORKER_URL),"swv="+t.MAJOR+"."+t.MINOR);this.Zk=new r(this.Ao);this.Zk.bind(n.ia,this.O7a,this,!0);this.Zk.load()};q.prototype.IO=function(){return this.Zk.state==r.eQ};q.prototype.$Ga=function(){return this.H=="can_install"&&!this.Pfa};q.prototype.bHa=function(){return this.IO()&&this.L4!=this.Zk.version&&!this.Pfa};q.prototype.ZGa=function(){return this.Zk.state!=r.zra&&!this.Pfa};q.prototype.IKa=function(){this.H=="can_install"&&
(this.xG?(this.xG.userChoice.then(function(t){t.outcome!="accepted"&&this.Id("unavailable")}.bind(this)),this.xG.prompt().then(function(){this.xG=null}.bind(this))):this.lda())};q.prototype.cancel=function(){this.H=="downloading"&&(this.JG&&(this.JG.cancelDownload(),this.JG=null),this.Zk.Uv(),this.Id("unavailable"))};q.prototype.Uv=function(){e.Uv(this.Ao);this.Zk.Uv()};q.prototype.O7a=function(){this.yv&&this.yv.get(TDV.PlayerSettings.ZY)?this.Id("unavailable"):this.Ee.get("downloadEnabled")!==!0?
this.Id("unavailable"):c.jSa!==!0?this.Id("unavailable"):h.Ub()!=h.Hp||h.Dc()==h.kB||h.Dc()==h.vK?this.Id("unavailable"):this.Eia?"serviceWorker"in navigator?this.IO()&&!this.bHa()?this.Id("unavailable"):navigator.onLine?this.p4a():this.Id("unavailable"):this.Id("unavailable"):this.Id("unavailable")};q.prototype.Id=function(t){this.H!=t&&(this.H=t,t=["can_install","unavailable"].indexOf(this.H)>=0,this.hz!=t&&(this.hz=t)&&this.m(n.ud))};q.prototype.p4a=function(){this.Id("registering_sw");navigator.serviceWorker.register(this.Eia,
{scope:this.G0a}).then(function(){this.MCa(!0)}.bind(this))["catch"](function(){this.MCa(!1)}.bind(this))};q.prototype.MCa=function(t){t?h.gf()?this.Id("can_install"):this.V0&&this.Zk.state==r.t$?(this.Id("can_install"),this.lda()):this.xG?this.Id("can_install"):(this.Id("sw_registered"),setTimeout(function(){this.H=="sw_registered"&&this.Id("can_install")}.bind(this),3E3)):this.Id("unavailable")};q.prototype.r2a=function(t){this.yv&&this.yv.get(TDV.PlayerSettings.ZY)||(this.xG=t,this.H=="sw_registered"&&
this.Id("can_install"))};q.prototype.pVa=function(){this.yv&&this.yv.get(TDV.PlayerSettings.ZY)||(this.H=="sw_registered"&&this.Id("can_install"),this.lda())};q.prototype.lda=function(){this.Id("downloading");this.m(n.vr);this.AEa(0);this.K1a()};q.prototype.K1a=function(){var t=d.zD(this.nZa,"nc="+(new Date).getTime());k.Mma(t,u=>{if(this.H=="downloading"){var v=[],w;for(w in u){var y=u[w].tags;if(y){Array.isArray(y)||(y=[y]);for(var x=0;x<y.length;x++)v.indexOf(y[x])<0&&v.push(y[x])}}var z=[];v.indexOf("mobilevr2gen")>=
0&&(h.d7()||h.e7())?z.push("mobilevr2gen"):v.indexOf("mobilevr")>=0&&h.gf()?z.push("mobilevr"):v.indexOf("mobile")>=0&&h.ub()?z.push("mobile"):v.indexOf("desktop")>=0&&!h.ub()&&z.push("desktop");v=[];for(w in u)if(!(w.indexOf(".DS_Store")>-1)){if(y=u[w].tags){var A=!1;if(Array.isArray(y)){x=0;for(var D=y.length;x<D&&!A;x++)A=z.indexOf(y[x])>=0}else A=z.indexOf(y)>=0;if(!A)continue}y=d.YA(w,this.Ao);v.push(new e.File(y,u[w].size))}var E=(new window.URL(window.location.pathname,window.location.href)).toString();
v.filter(function(B){return B.url==E}).length==0&&v.push(new e.File(E,1024));this.JG=new e.Files(this.Ao,v,this.AEa.bind(this),this.Xva.bind(this));this.JG.requestStorage().then(function(B){this.Zk.storage=B?r.pQ:r.Faa;this.Zk.state=r.t$;this.Zk.version=this.L4;this.Zk.save();this.JG.download()}.bind(this))["catch"](function(){this.Xva(!1,void 0)}.bind(this))}})};q.prototype.AEa=function(t){this.m(new f(n.xc,t))};q.prototype.Xva=function(t,u){this.JG=null;this.Id("unavailable");t&&(this.Zk.state=
r.eQ,this.Zk.save());t?this.m(n.Sb,{qY:!0}):u?this.m(n.Sb,{qY:!1,error:q.Cra}):h.gf()?this.m(n.Sb,{qY:!1,error:q.Bra}):this.V0?this.m(n.Sb,{qY:!1,error:q.Cra}):this.m(n.Sb,{qY:!1,error:q.Dra})};q.iLa=function(){return d.Rg("installed",!1)};q.Ggb=function(t,u){var v=new q.kaa(t);v.bind(n.ia,function(){var w=!1;v.state==q.kaa.eQ&&(w=q.iLa()?!0:!navigator.onLine);w?b.toURL(t,v.storage==q.kaa.pQ).then(function(y){u(y)}):u(t)},this,!0);v.load()};q.Dra="launchFromHomeScreen";q.Bra="addToBookmark";q.Cra=
"errorDownloading";var r=k.extend(g,function(t){g.call(this);this.Ao=t;this.Efa="installation_state_"+t;this.J3a=d.parse(this.Ao).pathname+"installation_state.json";this.state=this.storage=this.version=void 0;this.WCa()});r.prototype.load=function(){if(this.L1a()&&this.state==r.eQ)this.eEa(this.storage==r.pQ).then(function(){this.m(n.ia)}.bind(this))["catch"](function(){this.eEa(this.storage!=r.pQ).then(function(){this.storage=this.storage==r.Faa?r.pQ:r.Faa;this.wia();this.m(n.ia)}.bind(this))["catch"](function(){this.state=
r.t$;this.wia();this.m(n.ia)}.bind(this))}.bind(this));else this.m(n.ia)};r.prototype.save=function(){this.wia();this.state==r.eQ&&this.X4a()};r.prototype.L1a=function(){var t=m.getItem(this.Efa);if(!t)return!1;this.KZa(t);return!0};r.prototype.wia=function(){m.setItem(this.Efa,this.jEa())};r.prototype.eEa=function(t){return new Promise(function(u,v){b.toURL(this.Ao+"installation_state.json",t).then(w=>k.Mma(w,()=>u(),()=>v()))}.bind(this))};r.prototype.X4a=function(){b.CRa(this.J3a,this.jEa(),"text/json")};
r.prototype.jEa=function(){var t={};t.version=this.version;t.storage=this.storage;t.state=this.state;return JSON.stringify(t)};r.prototype.KZa=function(t){this.JZa(JSON.parse(t))};r.prototype.JZa=function(t){this.version=t.version;this.storage=t.storage;this.state=t.state};r.prototype.Uv=function(){m.removeItem(this.Efa);this.WCa()};r.prototype.WCa=function(){this.version="";this.storage=r.PTa;this.state=r.zra};r.PTa="unkonwn";r.Faa="temporary";r.pQ="persistent";r.zra="not started";r.t$="started";
r.eQ="completed";q.kaa=r;return q});
define("tdv/player/view/DownloadBar","require tdv/utils tdv/constants/EventName tdv/player/l10n tdv/player/view/util/Device tdv/player/view/util/Installer tdv/view/buttons/Button tdv/view/buttons/CloseButton tdv/view/constants/Alignment tdv/view/constants/LayoutMode tdv/view/containers/Container tdv/view/core/UIComponent tdv/view/text/Label".split(" "),function(a){function l(r){var t=new b;t.wa({label:r,backgroundColor:"#0071BC",borderRadius:2,fontColor:"#ffffff",fontWeight:"400",fontFamily:"Arial, sans-serif",
fontSize:14,paddingLeft:14,paddingRight:14,height:31,verticalAlign:d.Xd});return t}var k=a("tdv/utils"),n=a("tdv/constants/EventName"),g=a("tdv/player/l10n"),h=a("tdv/player/view/util/Device"),e=a("tdv/player/view/util/Installer"),b=a("tdv/view/buttons/Button"),c=a("tdv/view/buttons/CloseButton"),d=a("tdv/view/constants/Alignment"),f=a("tdv/view/constants/LayoutMode"),m=a("tdv/view/containers/Container"),p=a("tdv/view/core/UIComponent"),q=a("tdv/view/text/Label");a=k.extend(m,function(r,t){m.call(this);
this.Ee=r;this.bh=t;this.bh.bind(n.ud,this.$0a,this,!0);this.bh.bind(n.vr,this.X0a,this,!0);this.bh.bind(n.xc,this.Z0a,this,!0);this.bh.bind(n.Sb,this.Y0a,this,!0);this.Oa="hidden";this.iV=void 0;this.Aha=!1;this.Qg=void 0;this.ek=this.Ox=this.gG=this.kG=this.hG=this.Q3=this.Xa=null;this.kVa();this.wa({backgroundColor:"#000000",gap:18,height:55,width:"100%",paddingLeft:28,paddingRight:28,verticalAlign:d.Xd,layout:f.bi});this.gh()});a.prototype.$0a=function(){this.bh.$Ga()||this.bh.IO()&&this.bh.ZGa()?
(this.Oa="ready",this.Aha&&this.MDa()):this.Oa="hidden";this.gh()};a.prototype.X0a=function(){this.Oa="installing";this.gh()};a.prototype.Z0a=function(r){this.Qg=r.percent;this.gh()};a.prototype.Y0a=function(r){this.Oa=r.data.qY?"installed":"failed";this.lwa=r.data.error;this.gh()};a.prototype.rg=function(){this.v7a()};a.prototype.a2=function(){this.Aha||(this.Aha=!0,this.Oa=="ready"&&this.MDa())};a.prototype.MDa=function(){this.iV=setTimeout(function(){this.iV=null;this.x3a()}.bind(this),5E3);this.gh()};
a.prototype.v7a=function(){this.nCa();this.iV&&clearTimeout(this.iV);this.iV=null};a.prototype.x3a=function(){this.nCa();this.Oa=="ready"&&(this.Oa="hidden",this.gh())};a.prototype.kVa=function(){this.bind(n.fb,this.rg,this);this.Ee.bind(n.fb,this.a2,this);this.Ee.bind(n.Ra,this.a2,this)};a.prototype.nCa=function(){this.h(n.fb,this.rg,this);this.Ee.h(n.fb,this.a2,this);this.Ee.h(n.Ra,this.a2,this)};a.prototype.Ib=function(){m.prototype.Ib.call(this);this.Xa==null&&(this.Xa=new q,this.Xa.wa({fontColor:"#ffffff",
fontWeight:"400",fontFamily:"Arial, sans-serif",fontSize:14,text:g("download-tour")}),this.mb(this.Xa));this.hG==null&&(this.hG=l(g("download")),this.mb(this.hG),this.hG.bind(n.la,this.uWa,this,!0));this.kG==null&&(this.kG=l(g("refresh-downloaded")),this.mb(this.kG),this.kG.bind(n.la,this.AWa,this,!0));this.gG==null&&(this.gG=l(g("delete-downloaded")),this.mb(this.gG),this.gG.bind(n.la,this.tWa,this,!0));this.Q3==null&&(this.Q3=new p,this.Q3.wa({width:"100%"}),this.mb(this.Q3));this.Ox==null&&(this.Ox=
new c,this.Ox.wa({backgroundColor:"#ffffff",borderRadius:2,iconColor:"#000000",iconLineWidth:1,iconWidth:17,iconHeight:17,height:31,width:31}),this.mb(this.Ox),this.Ox.bind(n.la,this.sWa,this,!0));this.ek==null&&(this.ek=l(g("cancel")),this.mb(this.ek),this.ek.bind(n.la,this.fG,this,!0));h.ub()&&this.Cn();this.gh()};a.prototype.Vr=function(){m.prototype.Vr.call(this);h.ub()&&this.getParent().bind(n.Zb,this.Cn,this,!0)};a.prototype.hp=function(){h.ub()&&this.getParent().h(n.Zb,this.Cn,this,!0);m.prototype.hp.call(this)};
a.prototype.Cn=function(){var r=this.getParent();if(r){var t=Math.min(r.gb(),r.Kb())/100,u=function(v){return Math.round(v*t)};this.wa({gap:u(3.9),height:u(11.9),paddingLeft:u(6),paddingRight:u(6)});this.Xa&&this.Xa.wa({fontSize:u(3)});[this.hG,this.ek,this.kG,this.gG].forEach(function(v){v&&v.wa({borderRadius:u(.4),fontSize:u(3),paddingLeft:u(3),paddingRight:u(3),height:u(6.7)})});this.Ox&&this.Ox.wa({borderRadius:u(.4),iconLineWidth:u(.22),iconWidth:u(3.7),iconHeight:u(3.7),height:u(6.7),width:u(6.7)})}};
a.prototype.gh=function(){switch(this.Oa){case "ready":var r=this.bh.IO()?g("downloaded"):g("download-tour");break;case "installing":r=g("downloading");this.Qg!==void 0&&(r+="..."+this.Qg.toFixed(1)+"%");break;case "installed":r=g("downloaded");break;case "failed":r=this.lwa==e.Dra?h.ub()?g("storage-not-provided-launch-from-homescreen"):g("storage-not-provided-launch-from-desktop"):this.lwa==e.Bra?g("storage-not-provided-bookmark"):g("download-failed")}this.Xa&&this.Xa.set("text",r);this.hG&&this.hG.set("visible",
this.Oa=="ready"&&!this.bh.IO()&&this.bh.$Ga());this.gG&&this.gG.set("visible",this.Oa=="ready"&&this.bh.IO()&&this.bh.ZGa());this.kG&&this.kG.set("visible",this.Oa=="ready"&&this.bh.bHa());this.ek&&this.ek.set("visible",this.Oa=="installing");this.Ox&&this.Ox.set("visible",this.Oa!="installing");this.set("visible",this.Oa!="hidden")};a.prototype.uWa=function(){this.bh.IKa()};a.prototype.AWa=function(){this.bh.IKa()};a.prototype.tWa=function(){this.bh.Uv();this.Oa="hidden";this.gh()};a.prototype.fG=
function(){this.bh.cancel();this.Oa="hidden";this.gh()};a.prototype.sWa=function(){this.Oa=="installing"&&this.bh.cancel();this.Oa="hidden";this.gh()};return a});
define("tdv/player/view/MessageWindow","require tdv/utils tdv/constants/EventName tdv/player/l10n tdv/player/view/util/Device tdv/view/buttons/Button tdv/view/constants/Alignment tdv/view/constants/LayoutMode tdv/view/containers/Container tdv/view/effects/FadeInEffect tdv/view/effects/FadeOutEffect tdv/view/text/Label tdv/view/text/HTMLText tdv/view/util/KeyboardControl".split(" "),function(a){function l(t,u){this.text=t;this.Rq=u}var k=a("tdv/utils"),n=a("tdv/constants/EventName"),g=a("tdv/player/l10n"),
h=a("tdv/player/view/util/Device"),e=a("tdv/view/buttons/Button"),b=a("tdv/view/constants/Alignment"),c=a("tdv/view/constants/LayoutMode"),d=a("tdv/view/containers/Container"),f=a("tdv/view/effects/FadeInEffect"),m=a("tdv/view/effects/FadeOutEffect"),p=a("tdv/view/text/Label"),q=a("tdv/view/text/HTMLText"),r=a("tdv/view/util/KeyboardControl");a=k.extend(d,function(){d.call(this);this.ss=[];this.ek=this.iG=this.Xa=this.XG=this.gN=this.jt=null;this.IQ=this.IQ.bind(this);this.fG=this.fG.bind(this);var t=
new f;t.set("duration",500);t.set("easing","cubic_in");var u=new m;u.set("duration",500);u.set("easing","cubic_out");this.wa({backgroundColor:"#000000",backgroundOpacity:.6,horizontalAlign:b.Ye,gap:5,left:0,top:0,right:0,bottom:0,hideEffect:u,showEffect:t,visible:!1})});a.prototype.Ib=function(){d.prototype.Ib.call(this);this.jt==null&&(this.jt=new d,this.jt.wa({centerX:0,centerY:0,backgroundColor:"#ffffff",horizontalAlign:b.Ye,verticalAlign:b.Xd,layout:c.ck,shadow:!0,shadowColor:"#000000",shadowHorizontalLength:0,
shadowVerticalLength:0,shadowOpacity:.2}),this.mb(this.jt));this.Xa==null&&(this.Xa=new p,this.Xa.wa({fontColor:"#808080",fontWeight:"300",fontFamily:"Tahoma, Geneva, sans-serif"}),this.jt.mb(this.Xa));this.XG==null&&(this.XG=new q,this.XG.wa({width:"80%"}),this.jt.mb(this.XG));this.gN==null&&(this.gN=new d,this.gN.wa({backgroundColor:"#b3b3b3"}),this.jt.mb(this.gN));this.fk==null&&(this.fk=new d,this.fk.wa({horizontalAlign:b.Ye,verticalAlign:b.Xd,layout:c.bi}),this.jt.mb(this.fk));this.iG==null&&
(this.iG=new e,this.iG.wa({backgroundColor:"#606060",fontColor:"#FFFFFF",fontFamily:"Tahoma, Geneva, sans-serif",horizontalAlign:b.Ye,verticalAlign:b.Xd,label:g("yes").toUpperCase(),pressedBorderColor:"#808080",rollOverBorderColor:"#808080",tabIndex:1}),this.iG.bind(n.la,this.IQ,this,!0),this.fk.mb(this.iG));this.ek==null&&(this.ek=new e,this.ek.wa({backgroundColor:"#606060",fontColor:"#FFFFFF",fontFamily:"Tahoma, Geneva, sans-serif",horizontalAlign:b.Ye,verticalAlign:b.Xd,label:g("no").toUpperCase(),
pressedBorderColor:"#808080",rollOverBorderColor:"#808080",tabIndex:1}),this.ek.bind(n.la,this.fG,this,!0),this.fk.mb(this.ek))};a.prototype.Vr=function(){d.prototype.Vr.call(this);this.getParent().bind(n.Zb,this.Cn,this,!0)};a.prototype.hp=function(){this.getParent().h(n.Zb,this.Cn,this,!0);d.prototype.hp.call(this)};a.prototype.Cn=function(){var t=this.getParent();if(t){var u=t.gb();t=t.Kb();if(h.ub()){var v=Math.min(u,t);u=function(w){return Math.round(w*v/100)}}else u=function(w){return Math.round(w*
4)};this.jt&&this.jt.wa({borderRadius:u(1),width:u(80),height:u(40),gap:u(4),shadowBlurRadius:u(1),shadowSpread:u(1)});this.gN&&this.gN.wa({width:u(60),minHeight:2,height:u(.25)});this.fk&&this.fk.wa({gap:u(5)});this.ek&&this.ek.wa({borderRadius:u(1),width:u(20),height:u(10),fontSize:u(4.25)});this.iG&&this.iG.wa({borderRadius:u(1),width:u(20),height:u(10),fontSize:u(4.5)});this.Xa&&this.Xa.wa({fontSize:u(5)});this.D4()}};a.prototype.show=function(t,u){this.Cn();var v=this.ixa(u);v>=0&&this.lCa(v);
this.g4a(new l(t,u));this.pWa()};a.prototype.Qe=function(t){t=this.ixa(t);t>=0&&this.lCa(t)};a.prototype.pWa=function(){var t=this.getParent();t&&t.gr(this,t.Cb().length-1)};a.prototype.IQ=function(){this.Zta(!0)};a.prototype.fG=function(){this.Zta(!1)};a.prototype.ixa=function(t){for(var u=0;u<this.ss.length;u++)if(this.ss[u].Rq==t)return u;return-1};a.prototype.D4=function(){if(this.jt){r.bhb(this.IQ);r.apa(this.fG);var t=this.Dxa();t?(t.text.length<20?(this.XG.set("visible",!1),this.Xa.set("text",
t.text),this.Xa.set("visible",!0)):(this.Xa.set("visible",!1),this.XG.set("html",this.s_a(t.text)),this.XG.set("visible",!0)),this.ek.set("visible",t.Rq?!0:!1),this.set("visible",!0),r.w$a(this.IQ),r.ela(this.fG)):this.set("visible",!1)}};a.prototype.s_a=function(t){return"<div style=\"color:#808080; font-weight:300; font-family:'Tahoma', 'Geneva', sans-serif; font-size: "+this.Xa.get("fontSize")+'px; text-align:center;" >'+t+"</div>"};a.prototype.Zta=function(t){var u=this.Dxa();u&&(u=this.G_a(u.text),
this.C4a(u),u.forEach(v=>{v.Rq&&v.Rq.call(this,t)}))};a.prototype.g4a=function(t){this.ss.push(t);this.D4()};a.prototype.G_a=function(t){return this.ss.filter(u=>u.text==t)};a.prototype.C4a=function(t){this.ss=this.ss.filter(u=>!t.includes(u));this.D4()};a.prototype.lCa=function(t){this.ss.splice(t,1);t==this.ss.length&&this.D4()};a.prototype.Dxa=function(){return this.ss.length>0?this.ss[this.ss.length-1]:null};return a});
define("tdv/view/core/ContextMenu","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Device tdv/view/util/Fullscreen".split(" "),function(a){function l(G){return G.map(function(I){return String.fromCharCode(I)}).join("")}function k(G){for(;G&&G!=document;){if(G.getAttribute(r)=="Button")return!0;G=G.parentNode}return!1}var n=a("tdv/utils"),g=a("tdv/constants/EventName"),h=a("tdv/events/Event"),e=a("tdv/events/EventDispatcher"),b=a("tdv/player/view/util/Device"),
c=a("tdv/view/util/Fullscreen"),d=[];a=l([99,111,110,116,101,120,116,109,101,110,117]);var f=l([109,111,117,115,101,100,111,119,110]),m=l([109,111,117,115,101,117,112]),p=l([109,111,117,115,101,108,101,97,118,101]),q=l([109,111,117,115,101,101,110,116,101,114]),r=l([116,100,118,99,108,97,115,115]);document.addEventListener(a,function(G){if(!b.ub()||!k(G.target)){var I=b.Md()==b.lZ?200:0;setTimeout(function(){(t===void 0||u===void 0||v===void 0||w===void 0||Math.abs(v-t)+Math.abs(w-u)<10)&&d.forEach(function(N){N(G)});
t=u=v=w=void 0},I)}G.preventDefault();G.stopImmediatePropagation()},!0);var t,u,v,w;document.addEventListener("mousedown",function(G){v=t=G.screenX;w=u=G.screenY},!0);document.addEventListener("mousemove",function(G){v=G.screenX;w=G.screenY},!0);var y=1;n=n.extend(e,function(G,I){e.call(this);this.Fb=G;this.y_a=I;this.E1=this.E1.bind(this);this.re=this.re.bind(this);this.Dfa=!1;this.Afa=this.Afa.bind(this);this.Bfa=this.Bfa.bind(this);this.zfa=this.zfa.bind(this);this.Cfa=this.Cfa.bind(this);this.oa=
document.createElement("div");this.oa.style.setProperty("z-index",y,F[C]);for(var N in F[x])this.oa.style.setProperty(N,F[x][N],F[C]);d.push(this.E1)});n.prototype.clear=function(){this.F1a()&&this.Oea();this.oa=null;d.splice(d.indexOf(this.E1),1)};n.prototype.E1=function(G){var I=this.y_a();if(I.length!=0){this.oa.replaceChildren();this.Dfa=!1;var N=0;I.forEach(function(P){var Q=document.createElement("div");if(P){Q.textContent=P;for(var R in F[A])Q.style.setProperty(R,F[A][R],F[C]);var K=N;N++;
Q.addEventListener(q,function(M){this.Afa(M,K)}.bind(this));Q.addEventListener(p,function(M){this.Bfa(M,K)}.bind(this));Q.addEventListener(f,function(M){this.zfa(M,K)}.bind(this));Q.addEventListener(m,function(M){this.Cfa(M,K)}.bind(this))}else for(R in F[D])Q.style.setProperty(R,F[D][R],F[C]);for(R in F[z])Q.style.setProperty(R,F[z][R],F[C]);this.oa.appendChild(Q)}.bind(this));(c.fullscreenElement()||document.body).appendChild(this.oa);this.oa.style.setProperty("display","block",F[C]);I=G.pageX;
G=G.pageY;I+this.oa.clientWidth>document.body.clientWidth-5&&(I=document.body.clientWidth-this.oa.clientWidth-5);G+this.oa.clientHeight>document.body.clientHeight-5&&(G=document.body.clientHeight-this.oa.clientHeight-5);this.oa.style.setProperty("left",I+"px",F[C]);this.oa.style.setProperty("top",G+"px",F[C]);this.Fb.bind(g.Ra,this.re,this);document.addEventListener("mousedown",this.re);this.Z9a=setInterval(this.Y9a.bind(this),200)}};n.prototype.F1a=function(){return!!this.oa&&!!this.oa.parentNode};
n.prototype.Oea=function(){clearInterval(this.Z9a);this.oa.parentNode.removeChild(this.oa);document.removeEventListener("mousedown",this.re);this.Fb.h(g.Ra,this.re,this);this.oa.style.setProperty("display","none",F[C])};n.prototype.Y9a=function(){this.oa.contains(document.elementFromPoint(this.oa.offsetLeft+this.oa.clientWidth*.5,this.oa.offsetTop+this.oa.clientHeight*.5))||this.oa.style.setProperty("z-index",y*=10,F[C])};n.prototype.re=function(){this.Oea()};n.prototype.zfa=function(G){this.Dfa=
!0;G.preventDefault();G.stopImmediatePropagation()};n.prototype.Cfa=function(G,I){this.Dfa&&(this.Oea(),G.preventDefault(),G.stopImmediatePropagation(),this.m(new h(g.Qr,{index:I})))};n.prototype.Afa=function(G){for(var I in F[E])G.currentTarget.style.setProperty(I,F[E][I],F[C])};n.prototype.Bfa=function(G){for(var I in F[B])G.currentTarget.style.setProperty(I,F[B][I],F[C])};var x="0",z="1",A="2",D="3",E="4",B="5",C="6",F=function(G){return JSON.parse(G.map(function(I){return String.fromCharCode(I)}).join(""))}([123,
34,48,34,58,123,34,98,111,114,100,101,114,34,58,34,49,112,120,32,115,111,108,105,100,32,35,98,98,98,34,44,34,98,111,114,100,101,114,45,114,97,100,105,117,115,34,58,34,51,112,120,34,44,34,112,111,115,105,116,105,111,110,34,58,34,97,98,115,111,108,117,116,101,34,44,34,100,105,115,112,108,97,121,34,58,34,110,111,110,101,34,44,34,98,97,99,107,103,114,111,117,110,100,45,99,111,108,111,114,34,58,34,35,101,53,101,53,101,53,34,44,34,111,112,97,99,105,116,121,34,58,49,44,34,112,97,100,100,105,110,103,34,58,
48,44,34,109,97,114,103,105,110,34,58,48,44,34,112,111,105,110,116,101,114,45,101,118,101,110,116,115,34,58,34,97,108,108,34,44,34,116,101,120,116,45,97,108,105,103,110,34,58,34,108,101,102,116,34,44,34,98,111,120,45,115,104,97,100,111,119,34,58,34,49,112,120,32,49,112,120,32,51,112,120,32,114,103,98,97,40,48,44,32,48,44,32,48,44,32,48,46,50,41,34,125,44,34,49,34,58,123,34,102,111,110,116,45,102,97,109,105,108,121,34,58,34,65,114,105,97,108,34,44,34,102,111,110,116,45,115,105,122,101,34,58,34,49,
51,112,120,34,44,34,99,111,108,111,114,34,58,34,35,48,48,48,48,48,48,34,44,34,111,112,97,99,105,116,121,34,58,49,44,34,100,105,115,112,108,97,121,34,58,34,98,108,111,99,107,34,44,34,112,111,105,110,116,101,114,45,101,118,101,110,116,115,34,58,34,97,108,108,34,125,44,34,50,34,58,123,34,99,117,114,115,111,114,34,58,34,112,111,105,110,116,101,114,34,44,34,98,111,114,100,101,114,45,114,97,100,105,117,115,34,58,34,51,112,120,34,44,34,112,97,100,100,105,110,103,34,58,34,55,112,120,32,50,48,112,120,34,44,
34,119,104,105,116,101,45,115,112,97,99,101,34,58,34,110,111,119,114,97,112,34,125,44,34,51,34,58,123,34,109,97,114,103,105,110,34,58,34,55,112,120,32,53,112,120,34,44,34,98,111,114,100,101,114,45,116,111,112,34,58,34,49,112,120,32,115,111,108,105,100,32,35,97,97,97,34,44,34,98,111,114,100,101,114,45,98,111,116,116,111,109,34,58,34,49,112,120,32,115,111,108,105,100,32,35,102,102,102,34,125,44,34,52,34,58,123,34,99,111,108,111,114,34,58,34,35,102,102,102,102,102,102,34,44,34,98,97,99,107,103,114,111,
117,110,100,45,99,111,108,111,114,34,58,34,114,103,98,97,40,48,44,32,48,44,32,48,44,32,48,46,55,41,34,125,44,34,53,34,58,123,34,99,111,108,111,114,34,58,34,35,48,48,48,48,48,48,34,44,34,98,97,99,107,103,114,111,117,110,100,45,99,111,108,111,114,34,58,34,34,125,44,34,54,34,58,34,105,109,112,111,114,116,97,110,116,34,125]);return n});
define("tdv/view/core/Cursors",["require","exports","tdv/player/view/util/URL","tdv/view/constants/Cursor","tdv/view/util/Assets"],function(a,l,k,n,g){return function(){function h(e){this.Fb=e;this.Bv={};this.Bv[n.gsa]="move";this.Bv[n.hTa]="ew-resize";this.Bv[n.jTa]="ns-resize";this.Bv[n.iTa]="nesw-resize";this.Bv[n.kTa]="nwse-resize";this.Bv[n.mf]="pointer";this.Bv[n.wB]="inherit";this.Bv[n.lf]="default";this.ji={};this.ji[n.tB]="grab.cur";this.ji[n.Li]="grabbing.cur";this.ji[n.qsa]="N.cur";this.ji[n.rsa]=
"NE.cur";this.ji[n.hsa]="E.cur";this.ji[n.usa]="SE.cur";this.ji[n.tsa]="S.cur";this.ji[n.vsa]="SW.cur";this.ji[n.wsa]="W.cur";this.ji[n.ssa]="NW.cur";this.ji[n.jsa]="FN.cur";this.ji[n.ksa]="FNE.cur";this.ji[n.isa]="FE.cur";this.ji[n.nsa]="FSE.cur";this.ji[n.msa]="FS.cur";this.ji[n.osa]="FSW.cur";this.ji[n.psa]="FW.cur";this.ji[n.lsa]="FNW.cur";this.Cba={};this.Cba[n.NF]=g.NF;this.Fua={}}h.prototype.VIa=function(e){return this.z1a(e)?this.Axa(e):this.o1a(e)?this.e_a(e):this.h1a(e)?this.RZa(e):this.Axa(n.lf)};
h.prototype.GWa=function(e){if(!(e in this.Fua)){var b=new Image;b.src=this.Qwa(e);this.Fua[e]=b}};h.prototype.z1a=function(e){return e in this.Bv};h.prototype.Axa=function(e){return this.Bv[e]};h.prototype.o1a=function(e){return!!this.ji[e]};h.prototype.e_a=function(e){this.GWa(e);return"url("+this.Qwa(e)+"), default"};h.prototype.Qwa=function(e){return k.YA(this.Fb.get("settings").get(TDV.PlayerSettings.CURSORS_DIR_URL))+"/"+this.ji[e]};h.prototype.h1a=function(e){return e in this.Cba};h.prototype.RZa=
function(e){return"url("+this.Cba[e]+"), auto"};return h}()});define("tdv/view/helpers/DOMUpdateQueue",["require","exports"],function(){var a=1,l={};return{vbb:function(k,n){var g=k.__duqid;g===void 0&&(g=a.toString(),k.__duqid=g,a++);k=l[g]||(l[g]={e:k,s:{}});for(var h in n)k.s[h]=n[h]},process:function(){for(var k in l){var n=l[k],g=n.e.style;n=n.s;for(var h in n)g[h]=n[h]}l={}}}});
define("tdv/view/lifecycle/PriorityQueue",["require","exports"],function(){return function(){function a(){this.ez={};this.Ns=[];this.VQ=0}a.prototype.push=function(l,k){this.ez[k]==void 0?(this.ez[k]=[l],this.Ns.push(k),this.Ns.sort(function(n,g){return n-g}),this.VQ++):(k=this.ez[k],k.includes(l)||(k.push(l),this.VQ++))};a.prototype.YIa=function(){return this.VQ};a.prototype.isEmpty=function(){return this.Ns.length==0};a.prototype.ENa=function(){if(!this.isEmpty()){var l=this.Ns[0],k=this.ez[l].pop();
this.ez[l].length==0&&(delete this.ez[l],this.Ns=this.Ns.slice(1));this.VQ--;return k}};a.prototype.Noa=function(){if(!this.isEmpty()){var l=this.Ns[this.Ns.length-1],k=this.ez[l].pop();this.ez[l].length==0&&(delete this.ez[l],this.Ns=this.Ns.slice(0,this.Ns.length-1));this.VQ--;return k}};return a}()});
define("tdv/view/lifecycle/LifeCycleManager","require exports tdv/view/helpers/DOMUpdateQueue tdv/view/lifecycle/PriorityQueue tdv/view/util/Animation tdv/events/async".split(" "),function(a,l,k,n,g,h){return function(){function e(){this.rE=!1;this.nNa=void 0;this.enabled=!0;this.x5=new n;this.v8=new n;this.k9=new n;this.n7=new n;this.kra=new n;g.requestFrame(this.Kg,this)}e.prototype.clear=function(){this.enabled=!1};e.prototype.HW=function(b){this.x5.push(b,this.CO(b));this.KX()};e.prototype.Hf=
function(b){this.v8.push(b,this.CO(b));this.KX()};e.prototype.kc=function(b){this.k9.push(b,this.CO(b));this.KX()};e.prototype.yf=function(b){this.n7.push(b,this.CO(b));this.KX()};e.prototype.tb=function(b){this.kra.push(b,this.CO(b));this.KX()};e.prototype.update=function(){this.Jkb();this.olb();this.ju()};e.prototype.Jkb=function(){do{for(;!this.x5.isEmpty();){var b=this.x5.Noa();b&&b.Ib()}this.v8.isEmpty()||(b=this.v8.Noa())&&b.jb()}while(!this.v8.isEmpty()||!this.x5.isEmpty())};e.prototype.olb=
function(){for(;!this.k9.isEmpty()||!this.n7.isEmpty();)this.DY(),this.Lk()};e.prototype.DY=function(){for(;!this.k9.isEmpty();){var b=this.k9.Noa();if(b&&b.Zkb()){var c=b.getParent();c?(c.kc(),c.yf()):b.KOa(0,0,b.hw(),b.gw())}}};e.prototype.Lk=function(){for(;!this.n7.isEmpty();){var b=this.n7.ENa();b&&b.Lk()}};e.prototype.ju=function(){for(;!this.kra.isEmpty();){var b=this.kra.ENa();b&&b.ju()}k.process()};e.prototype.KX=function(){this.rE||(this.rE=!0,this.nNa=(new Date).getTime()+500,h.yE(this.RMa.bind(this)))};
e.prototype.RMa=function(){this.rE=!1;this.enabled&&this.update()};e.prototype.CO=function(b){return(b=b.getParent())?this.CO(b)+1:0};e.prototype.Kg=function(){this.rE&&(new Date).getTime()>=(this.nNa||0)&&this.RMa();g.requestFrame(this.Kg,this)};return e}()});
define("tdv/view/core/visuals/dom/DOMCanvasVisuals",["require","exports","tdv/view/core/visuals/dom/DOMUIBaseVisuals","tdv/view/core/visualprops/CanvasVisualProperties"],function(a,l,k,n){return function(g){function h(){return g.call(this)||this}O(h,g);h.prototype.np=function(){return new n};h.prototype.nh=function(e){g.prototype.nh.call(this,e);this.Ep(e)};h.prototype.Ep=function(e){if(e.canvas!==this.L.canvas&&(this.L.canvas&&this.z8(this.L.canvas),e.canvas)){var b=e.canvas;b.style.position="absolute";
b.style.left="0";b.style.top="0";b.style.cursor="inherit";this.vk(e.canvas)}};return h}(k)});
define("tdv/view/core/visuals/dom/DOMContainerVisuals",["require","exports","tdv/view/core/ZIndex","tdv/view/core/visuals/dom/DOMUIBaseVisuals","tdv/view/core/visualprops/ContainerVisualProperties"],function(a,l,k,n,g){return function(h){function e(){var b=h.call(this)||this;b.Kn=null;b.At=null;b.ho=null;b.ku=null;return b}O(e,h);e.prototype.np=function(){return new g};e.prototype.Vz=function(){h.prototype.Vz.call(this);this.Kcb().appendChild(this.o6());this.udb().appendChild(this.C6())};e.prototype.Kcb=
function(){this.Kn||(this.Kn=document.createElement("div"),this.Kn.setAttribute("tdvlayer","scrollbar"),this.Kn.style.position="absolute",this.Kn.style.zIndex=k.Psa);return this.Kn};e.prototype.udb=function(){this.ho||(this.ho=document.createElement("div"),this.ho.setAttribute("tdvlayer","scrollbar"),this.ho.style.position="absolute",this.ho.style.zIndex=k.Psa);return this.ho};e.prototype.o6=function(){this.At||(this.At=document.createElement("div"),this.At.style.position="absolute",this.At.style.left=
"0",this.At.style.top="0");return this.At};e.prototype.C6=function(){this.ku||(this.ku=document.createElement("div"),this.ku.style.position="absolute",this.ku.style.left="0",this.ku.style.top="0");return this.ku};e.prototype.nh=function(b){h.prototype.nh.call(this,b);this.llb(b)};e.prototype.llb=function(b){b.Dk!==this.L.Dk&&(b.Dk?this.Bh.appendChild(this.Kn):this.Bh.removeChild(this.Kn));b.Mk!==this.L.Mk&&(b.Mk?this.Bh.appendChild(this.ho):this.Bh.removeChild(this.ho));if(b.contentWidth!==this.L.contentWidth||
b.contentHeight!==this.L.contentHeight||b.Dk!==this.L.Dk||b.Mc!==this.L.Mc||b.zf!==this.L.zf||b.Wt!==this.L.Wt||b.Vt!==this.L.Vt||b.mh!==this.L.mh||b.Vn!==this.L.Vn||b.Wn!==this.L.Wn||b.Mk!==this.L.Mk||b.Nc!==this.L.Nc){var c=b.Dk&&b.Mk,d=Math.round(b.zf*100/b.contentWidth),f=Math.round(b.Mc*100/b.contentWidth),m=Math.round(b.Ug*100/b.contentHeight),p=Math.round(b.Nc*100/b.contentHeight);this.Kn.style.opacity=b.Wt.toString();this.Kn.style.left=b.Vn+"px";this.Kn.style.right=(c?b.mh:0)+b.Vn+"px";this.Kn.style.height=
b.mh+"px";this.Kn.style.bottom=b.Wn+"px";this.At.style.backgroundColor=b.Vt;this.At.style.borderRadius=Math.floor(b.mh/2)+"px";this.At.style.left=f+"%";this.At.style.width=d+"%";this.At.style.height=b.mh+"px";this.ho.style.opacity=b.Wt.toString();this.ho.style.top=b.Wn+"px";this.ho.style.right=b.Vn+"px";this.ho.style.width=b.mh+"px";this.ho.style.bottom=(c?b.mh:0)+b.Wn+"px";this.ku.style.backgroundColor=b.Vt;this.ku.style.borderRadius=Math.floor(b.mh/2)+"px";this.ku.style.top=p+"%";this.ku.style.width=
b.mh+"px";this.ku.style.height=m+"%"}};return e}(n)});
define("tdv/view/core/visuals/dom/DOMImageVisuals","require exports tdv/view/core/visuals/dom/DOMUIBaseVisuals tdv/view/core/visualprops/ImageVisualProperties tdv/player/view/util/Device tdv/view/constants/Alignment".split(" "),function(a,l,k,n,g,h){return function(e){function b(){var c=e.call(this)||this;c.VD=null;return c}O(b,e);b.prototype.np=function(){return new n};b.prototype.Vz=function(){e.prototype.Vz.call(this);this.vk(this.kJa())};b.prototype.kJa=function(){this.VD||(this.VD=document.createElement("div"),
this.VD.style.position="static",this.VD.style.overflow="hidden",this.VD.style.cursor="inherit");return this.VD};b.prototype.nh=function(c){e.prototype.nh.call(this,c);this.Rqa(c)};b.prototype.Rqa=function(c){if(c.image!==this.L.image&&(this.L.image&&this.VD.removeChild(this.L.image),c.image)){var d=c.image;this.VD.appendChild(d);d.style.position="static";d.style.cursor="inherit";d.style.display="inline";d.style.verticalAlign="top";d.style.visibility="hidden";d.style.pointerEvents="none";d.style.userSelect=
"none";d.style.visibility="inherit";d.style.webkitUserSelect="none";d.style.touchCallout="none";d.style.webkitTouchCallout="none";g.Ub()==g.Hp&&g.ub()&&(d.style.transform="translate3d(0,0,0)")}if(c.image!==this.L.image||c.contentWidth!==this.L.contentWidth||c.contentHeight!==this.L.contentHeight||c.width!==this.L.width||c.height!==this.L.height||c.Bd!==this.L.Bd||c.ze!==this.L.ze||c.ee!==this.L.ee||c.Cf!==this.L.Cf||c.borderTopLeftRadius!==this.L.borderTopLeftRadius||c.borderTopRightRadius!==this.L.borderTopRightRadius||
c.borderBottomRightRadius!==this.L.borderBottomRightRadius||c.borderBottomLeftRadius!==this.L.borderBottomLeftRadius||c.Pe!==this.L.Pe||c.vf!==this.L.vf||c.uf!==this.L.uf||c.Oe!==this.L.Oe||c.Vh!==this.L.Vh||c.verticalAlign!==this.L.verticalAlign){d=[Math.max(0,c.borderTopLeftRadius-Math.max(c.Pe,c.Oe)),Math.max(0,c.borderTopRightRadius-Math.max(c.Pe,c.vf)),Math.max(0,c.borderBottomRightRadius-Math.max(c.uf,c.vf)),Math.max(0,c.borderBottomLeftRadius-Math.max(c.uf,c.Oe))];var f=c.width-c.Bd-c.ze,m=
c.height-c.ee-c.Cf,p=this.kJa();p.style.width=f+"px";p.style.height=m+"px";p.style.borderTopLeftRadius=d[0]+"px";p.style.borderTopRightRadius=d[1]+"px";p.style.borderBottomRightRadius=d[2]+"px";p.style.borderBottomLeftRadius=d[3]+"px";if(c.image){c.image.style.width=c.contentWidth+"px";c.image.style.height=c.contentHeight+"px";switch(c.Vh){case h.eb:c.image.style.marginLeft="0px";c.image.style.marginRight=f-c.contentWidth+"px";break;case h.Db:c.image.style.marginLeft=f-c.contentWidth+"px";c.image.style.marginRight=
"0px";break;case h.Ye:c.image.style.marginLeft=Math.floor((f-c.contentWidth)*.5)+"px",c.image.style.marginRight=Math.ceil((f-c.contentWidth)*.5)+"px"}switch(c.verticalAlign){case h.Tc:c.image.style.marginTop="0px";c.image.style.marginBottom=m-c.contentHeight+"px";break;case h.Fc:c.image.style.marginTop=m-c.contentHeight+"px";c.image.style.marginBottom="0px";break;case h.Xd:c.image.style.marginTop=Math.floor((m-c.contentHeight)*.5)+"px",c.image.style.marginBottom=Math.ceil((m-c.contentHeight)*.5)+
"px"}}}};return b}(k)});
define("tdv/view/core/visuals/dom/DOMLabelVisuals","require exports tdv/view/core/visuals/dom/DOMUIBaseVisuals tdv/view/core/visualprops/LabelVisualProperties tdv/view/constants/Alignment tdv/view/constants/Direction tdv/view/util/Font".split(" "),function(a,l,k,n,g,h,e){return function(b){function c(){var d=b.call(this)||this;d.span=null;return d}O(c,b);c.prototype.fJ=function(){var d=this.span.clientWidth,f=this.span.clientHeight;this.span.style.fontStyle==="italic"&&(d+=f*1/5);return Math.round(d)};
c.prototype.eJ=function(){return this.span.clientHeight};c.prototype.np=function(){return new n};c.prototype.Vz=function(){b.prototype.Vz.call(this);this.vk(this.rdb())};c.prototype.rdb=function(){this.span||(this.span=document.createElement("span"),this.span.style.right="auto",this.span.style.bottom="auto",this.span.style.position="absolute",this.span.style.textAlign="center",this.span.style.cursor="inherit",this.span.style.whiteSpace="nowrap",this.span.style.transform="translate3d(0, 0, 0)");return this.span};
c.prototype.nh=function(d){b.prototype.nh.call(this,d);this.cra(d)};c.prototype.cra=function(d){var f=!1;if(d.direction!==this.L.direction||d.text!==this.L.text){switch(d.direction){case h.ck:this.span.style.lineHeight="100%";this.span.innerHTML=d.text.split("").join("<br/>");break;default:this.span.style.lineHeight="normal",this.span.textContent=d.text,this.span.innerHTML=this.span.innerHTML.split(" ").join("&nbsp;")}f=!0}d.fontFamily!==this.L.fontFamily&&(this.span.style.fontFamily=e.cA(d.fontFamily||
""),f=!0);d.fontSize!==this.L.fontSize&&(this.span.style.fontSize=d.fontSize!==void 0?d.fontSize+"px":"",f=!0);d.tt!==this.L.tt&&(this.span.style.color=d.tt||"",f=!0);d.fontWeight!==this.L.fontWeight&&(this.span.style.fontWeight=d.fontWeight,f=!0);d.fontStyle!==this.L.fontStyle&&(this.span.style.fontStyle=d.fontStyle,f=!0);d.textDecoration!==this.L.textDecoration&&(this.span.style.textDecoration=d.textDecoration,f=!0);if(f||d.width!==this.L.width||d.height!==this.L.height||d.Bd!==this.L.Bd||d.ze!==
this.L.ze||d.ee!==this.L.ee||d.Cf!==this.L.Cf||d.Vh!==this.L.Vh||d.verticalAlign!==this.L.verticalAlign){f=d.width-d.Bd-d.ze;var m=d.height-d.ee-d.Cf,p=this.fJ(),q=this.eJ();switch(d.Vh){case g.eb:this.span.style.left="0";break;case g.Db:this.span.style.left=f-p+"px";break;case g.Ye:this.span.style.left=Math.max(0,Math.round((f-p)*.5))+"px"}switch(d.verticalAlign){case g.Tc:this.span.style.top="0";break;case g.Fc:this.span.style.top=m-q+"px";break;case g.Xd:this.span.style.top=Math.max(0,Math.round((m-
q)*.5))+"px"}}if(d.fu!==this.L.fu||d.gu!==this.L.gu||d.co!==this.L.co||d.Qw!==this.L.Qw||d.Pw!==this.L.Pw)this.span.style.textShadow=[d.fu+"px",d.gu+"px",d.co+"px","rgba("+parseInt("0x"+d.Pw.substring(1,2))+", "+parseInt("0x"+d.Pw.substring(3,2))+", "+parseInt("0x"+d.Pw.substring(5,2))+", "+d.Qw+")"].join(" ")};return c}(k)});
define("tdv/view/core/visuals/dom/DOMHTMLVisuals",["require","exports","tdv/view/core/visuals/dom/DOMUIBaseVisuals","tdv/view/core/visualprops/HTMLVisualProperties"],function(a,l,k,n){return function(g){function h(){return g.call(this)||this}O(h,g);h.prototype.np=function(){return new n};h.prototype.nh=function(e){g.prototype.nh.call(this,e);this.Qqa(e)};h.prototype.Qqa=function(e){if(e.td!==this.L.td&&(this.L.td&&this.z8(this.L.td),e.td)){var b=e.td;b.style.position="absolute";b.style.left="0";b.style.top=
"0";this.vk(e.td)}};h.prototype.Hma=function(){return this.L&&this.L.td?this.L.td.clientWidth:0};h.prototype.Gma=function(){return this.L&&this.L.td?this.L.td.clientHeight:0};return h}(k)});define("tdv/view/core/visuals/VisualsType",["require","exports"],function(){return{DOM:"DOM",eSa:"Canvas"}});
define("tdv/view/core/visuals/dom/DOMVisualsFactory","require exports tdv/view/core/visuals/dom/DOMUIBaseVisuals tdv/view/core/visuals/dom/DOMCanvasVisuals tdv/view/core/visuals/dom/DOMContainerVisuals tdv/view/core/visuals/dom/DOMImageVisuals tdv/view/core/visuals/dom/DOMLabelVisuals tdv/view/core/visuals/dom/DOMHTMLVisuals tdv/view/canvas/Canvas tdv/view/core/UIComponent tdv/view/containers/Container tdv/view/images/Image tdv/view/html/HTML tdv/view/text/Label tdv/view/core/visuals/VisualsType".split(" "),function(a,
l,k,n,g,h,e,b,c,d,f,m,p,q,r){return function(){function t(){}t.prototype.create=function(u){if(u instanceof p)return new b;if(u instanceof c)return new n;if(u instanceof m)return new h;if(u instanceof q)return new e;if(u instanceof f)return new g;if(u instanceof d)return new k;throw Error("Invalid UI instance");};t.prototype.getType=function(){return r.DOM};t.bJ=function(){t.Ll||(t.Ll=new t);return t.Ll};return t}()});
define("tdv/view/events/GestureEvent",["require","exports","tdv/events/Event"],function(a,l,k){return function(n){function g(h,e,b,c,d,f,m,p){h=n.call(this,h)||this;h.scale=typeof e==="number"?e:1;h.rotation=typeof b==="number"?b:0;h.x=c||0;h.y=d||0;h.pageX=f||0;h.pageY=m||0;h.touches=p||[];return h}O(g,n);return g}(k)});
define("tdv/view/core/eventmanager/mousetouch/MouseTouchEventManager","require exports tdv/utils tdv/constants/EventName tdv/player/view/util/Device tdv/player/view/util/URL tdv/view/events/GestureEvent tdv/view/events/MouseEvent tdv/view/util/UserInitiatedAction".split(" "),function(a,l,k,n,g,h,e,b,c){a=function(){function p(q){this.O_=[];this.Xya=0;this.KYa=500;this.Vc=1;this.kl=0;this.component=q;this.tS=this.tS.bind(this);this.wS=this.wS.bind(this);this.p1=this.p1.bind(this);this.nga=this.nga.bind(this);
this.KU=this.KU.bind(this);this.JU=this.JU.bind(this);this.qD=this.qD.bind(this)}p.prototype.cfb=function(){return g.nr()};p.prototype.aPa=function(q){this.PR!==q&&((this.PR=q)?this.EG():this.yG(),this.iua())};p.prototype.nJa=function(){return this.PR||!1};p.prototype.va=function(){return this.component.va()};p.prototype.vEa=function(q,r){this.component.m(new b(n.Ra,q.x,q.y,q.pageX,q.pageY,void 0,void 0,r))};p.prototype.wEa=function(q,r){this.component.m(new b(n.fb,q.x,q.y,q.pageX,q.pageY,void 0,
void 0,r))};p.prototype.xEa=function(q,r){this.component.m(new b(n.ab,q.x,q.y,q.pageX,q.pageY,void 0,void 0,r))};p.prototype.i8a=function(q,r,t){this.component.m(new b(n.Rk,q.x,q.y,q.pageX,q.pageY,r.delta,r.Wz,t))};p.prototype.sEa=function(q){this.component.m(new b(n.la,q.x,q.y,q.pageX,q.pageY))};p.prototype.tEa=function(q){this.component.m(new b(n.di,q.x,q.y,q.pageX,q.pageY))};p.prototype.h8a=function(q,r,t){this.component.m(new e(n.sB,q,r,t.x,t.y,t.pageX,t.pageY,t.touches))};p.prototype.d8a=function(q,
r,t){this.component.m(new e(n.iaa,q,r,t.x,t.y,t.pageX,t.pageY,t.touches))};p.prototype.e8a=function(q,r,t){this.component.m(new e(n.BK,q,r,t.x,t.y,t.pageX,t.pageY,t.touches))};p.prototype.f8a=function(q){this.component.m(new e(n.MSa,void 0,q))};p.prototype.g8a=function(q){this.component.m(new e(n.CK,q))};p.prototype.vm=function(){var q=this.component.getParent();if(q)return q.lJa()};p.prototype.KU=function(q){q.stopImmediatePropagation();this.wda(["touchend"]);this.hya(q)?this.VBa(q):this.bCa(q,!0)};
p.prototype.bCa=function(q,r){var t,u=this.UG(q);r&&this.W7a(u);this.vEa(u,q);(t=this.vm())===null||t===void 0||t.bCa(q,r&&this.component.get("propagateClick"))};p.prototype.JU=function(q){q.preventDefault();q.stopImmediatePropagation();this.hya(q)?this.TBa(q):this.aCa(q)};p.prototype.aCa=function(q){var r,t=this.UG(q);this.V7a(t);this.wEa(t,q);(r=this.vm())===null||r===void 0||r.aCa(q)};p.prototype.eea=function(q,r){var t=q.pageX-r.pageX;q=q.pageY-r.pageY;return Math.sqrt(t*t+q*q)};p.prototype.qD=
function(q,r){this.$ca(["touchend"]);r!==!1&&q.preventDefault();q.stopImmediatePropagation();this.TM?this.UBa(q):(r=this.UG(q),this.$Ba(q,this.gya(r)),this.Wxa(r));this.TM=void 0;this.iua()};p.prototype.$Ba=function(q,r){var t,u=this.UG(q);this.xEa(u,q);this.U7a(r);(t=this.vm())===null||t===void 0||t.$Ba(q,r)};p.prototype.W7a=function(q){this.component.bind(n.Eb,this.lEa,this,!0);this.lI=q};p.prototype.V7a=function(q){if(this.lI){q=this.eea(this.lI,q);if(g.ub()){var r=this.component.Vb();r=Math.min(r.gb(),
r.Kb())*.01*p.DUa}else r=p.JUa;q>r&&this.m4()}};p.prototype.U7a=function(q){this.lI&&(this.sEa(this.lI),q&&this.tEa(this.lI),this.m4())};p.prototype.m4=function(){this.lI&&(this.component.h(n.Eb,this.lEa,this),this.lI=void 0)};p.prototype.lEa=function(){this.m4()};p.prototype.VBa=function(q){var r,t=this.lea(q);this.TM=t;this.h8a(t.scale,t.rotation,t.coordinates);(r=this.vm())===null||r===void 0||r.VBa(q)};p.prototype.TBa=function(q){var r,t=this.lea(q,this.TM),u=t.rotation-this.TM.rotation,v=t.scale/
this.TM.scale;this.TM=t;this.Vc*=v;for(this.kl+=u;this.kl>180;)this.kl-=360;for(;this.kl<-180;)this.kl+=360;this.d8a(this.Vc,this.kl,t.coordinates);u!=0&&this.f8a(this.kl);v!=1&&this.g8a(this.Vc);this.m4();(r=this.vm())===null||r===void 0||r.TBa(q)};p.prototype.UBa=function(q){var r,t=this.lea(q);this.e8a(this.Vc,this.kl,t.coordinates);(r=this.vm())===null||r===void 0||r.UBa(q)};p.prototype.tS=function(q){this.wda(["mouseup"]);q.stopImmediatePropagation();this.WBa(q,!0);f&&this.component.log(q.ctrlKey)};
p.prototype.WBa=function(q,r){var t,u=this.SG(q);r&&this.kXa(u);this.vEa(u,q);(t=this.vm())===null||t===void 0||t.WBa(q,r&&this.component.get("propagateClick"))};p.prototype.wS=function(q){q.preventDefault();q.stopImmediatePropagation();this.component.Vb().BE(this.component);this.XBa(q)};p.prototype.XBa=function(q){var r,t=this.SG(q);this.jXa(t);this.wEa(t,q);(r=this.vm())===null||r===void 0||r.XBa(q)};p.prototype.p1=function(q){this.$ca(["mouseup"]);q.preventDefault();q.stopImmediatePropagation();
var r=this.SG(q);this.YBa(q,this.gya(r));this.Wxa(r)};p.prototype.YBa=function(q,r){var t,u=this.SG(q);this.xEa(u);this.iXa(r);(t=this.vm())===null||t===void 0||t.YBa(q,r)};p.prototype.kXa=function(q){this.component.bind(n.Eb,this.cva,this,!0);this.uG=q};p.prototype.jXa=function(q){this.uG&&this.eea(this.uG,q)>p.uUa&&this.kca()};p.prototype.iXa=function(q){this.uG&&(this.sEa(this.uG),q&&this.tEa(this.uG),this.kca())};p.prototype.kca=function(){this.uG&&(this.component.h(n.Eb,this.cva,this),this.uG=
void 0)};p.prototype.cva=function(){this.kca()};p.prototype.hya=function(q){if((q=this.iea(q))&&q.length>1)for(var r=0,t=0;t<q.length;t++)if(this.l1a(q[t].target)&&(r++,r>1))return!0;return!1};p.prototype.l1a=function(q){for(var r=this.va().bc();q;){if(q==r)return!0;q=q.parentNode}return!1};p.prototype.Kua=function(){return!1};p.prototype.nga=function(q){this.component.Vb().mga&&(q.preventDefault(),q.stopImmediatePropagation(),this.ZBa(q))};p.prototype.ZBa=function(q){var r,t=this.SG(q),u=this.J_a(q);
this.Kua(u)||(r=this.vm())===null||r===void 0||r.ZBa(q);this.i8a(t,u,q)};p.prototype.SG=function(q){return this.Nwa(q.pageX,q.pageY)};p.prototype.J_a=function(q){var r={};r.delta=Math.max(-1,Math.min(1,-q.deltaY));r.Wz=r.delta;return r};p.prototype.Nwa=function(q,r){var t,u=k.offset(this.va().bc()),v=((t=this.component.Vb())===null||t===void 0?void 0:t.TC)||1;t={};t.x=(q-u.left)/v;t.y=(r-u.top)/v;t.pageX=q/v;t.pageY=r/v;t.nE=q;t.oE=r;return t};p.prototype.lea=function(q,r){var t=this.UG(q);return r?
(q=this.Ywa(q),{coordinates:t,scale:r.scale*q/r.touchesDistance,rotation:0,touchesDistance:q}):{coordinates:t,scale:1,rotation:0,touchesDistance:this.Ywa(q)}};p.prototype.UG=function(q){var r=this.iea(q);if(r.length==0)var t=this.d4a;else t={x:0,y:0,pageX:0,pageY:0,nE:0,oE:0,touches:[]},Array.from(r).forEach(function(u){u||(u=r[0]);u=this.Nwa(u.pageX,u.pageY);t.x+=u.x;t.y+=u.y;t.pageX+=u.pageX;t.pageY+=u.pageY;t.nE+=u.nE;t.oE+=u.oE;t.touches.push(u)}.bind(this)),t.x/=r.length,t.y/=r.length,t.pageX/=
r.length,t.pageY/=r.length,t.nE/=r.length,t.oE/=r.length;return this.d4a=t};p.prototype.iea=function(q){return q.touches||q.targetTouches||q.changedTouches};p.prototype.Ywa=function(q){var r=this.iea(q);return r&&r.length>1?(q=Math.abs(r[0].pageX-r[1].pageX),r=Math.abs(r[0].pageY-r[1].pageY),Math.sqrt(q*q+r*r)):0};p.prototype.iua=function(){this.va().bc().style["pointer-events"]=this.uxa()};p.prototype.uxa=function(){return this.PR?"auto":"none"};p.prototype.EG=function(){this.wda(d)};p.prototype.yG=
function(){this.$ca(d)};p.prototype.wda=function(q){m.includes(this.component)||m.push(this.component);this.O_=k.union(this.O_,q);q=this.Xwa(q);for(var r=0;r<q.length;r++){var t=q[r];t.target.addEventListener(t.name,t.handler)}};p.prototype.$ca=function(q){m.includes(this.component)&&m.splice(m.indexOf(this.component),1);this.O_=k.difference(this.O_,q);q=this.Xwa(q);for(var r=0;r<q.length;r++){var t=q[r];t.target.removeEventListener(t.name,t.handler)}};p.prototype.Xwa=function(q){this.nwa||(this.nwa=
this.m_a());for(var r=[],t=0;t<q.length;t++)r=r.concat(this.nwa[q[t]]);return r};p.prototype.m_a=function(){var q=this.va().bc();return{touchstart:[{target:q,name:"touchstart",handler:c.sr(this.KU)}],touchmove:[{target:q,name:"touchmove",handler:c.sr(this.JU)}],touchend:[{target:q,name:"touchend",handler:c.sr(this.qD,!0)},{target:document,name:"touchend",handler:c.sr(this.qD,!0)},{target:q,name:"touchcancel",handler:c.sr(this.qD,!0)},{target:document,name:"touchcancel",handler:c.sr(this.qD,!0)}],
mousedown:[{target:q,name:"mousedown",handler:c.sr(this.tS)}],mousemove:[{target:q,name:"mousemove",handler:c.sr(this.wS)}],mouseup:[{target:q,name:"mouseup",handler:c.sr(this.p1,!0)},{target:window,name:"mouseup",handler:c.sr(this.p1,!0)}],mousewheel:[{target:q,name:"wheel",handler:c.sr(this.nga)}]}};p.prototype.Wxa=function(q){this.Xya=(new Date).getTime();this.Wya=q};p.prototype.gya=function(q){if((new Date).getTime()-this.Xya>this.KYa||!this.Wya)return!1;q=this.eea(this.Wya,q);if(g.ub()){var r=
this.component.Vb();r=Math.min(r.gb(),r.Kb())*.01*p.CUa}else r=p.vUa;return q>r?!1:!0};p.JUa=10;p.DUa=5;p.uUa=10;p.CUa=10;p.vUa=10;return p}();var d=function(){var p=[];p=p.concat(["touchstart","touchmove"]);g.Md()!=g.pj&&(p=p.concat(["mousedown","mousemove","mousewheel"]));return p}(),f=h.Rg("debug"),m=window.enabledComponents=[];return a});
define("tdv/view/core/eventmanager/mousetouch/ScrollableContainerMouseTouchEventManager",["require","exports","tdv/constants/EventName","tdv/view/core/eventmanager/mousetouch/MouseTouchEventManager","tdv/player/view/util/Device"],function(a,l,k,n,g){return function(h){function e(b){var c=h.call(this,b)||this;c.component=b;c.Sx=0;c.Tx=0;c.Dmb=void 0;c.Emb=void 0;c.kva=0;c.sca=void 0;c.tca=void 0;c.uca=0;c.vca=0;c.hn=!1;c.jn=!1;c.sC=c.sC.bind(c);c.vD=c.vD.bind(c);c.ima();return c}O(e,h);e.prototype.ima=
function(){this.va().o6().addEventListener("mousedown",this.sC,!1);this.va().o6().addEventListener("touchstart",this.sC,!1);this.va().C6().addEventListener("mousedown",this.vD,!1);this.va().C6().addEventListener("touchstart",this.vD,!1);this.cfb()?this.component.bind(k.Ra,this.lva,this,!1):(this.component.bind(k.Ra,this.sXa,this,!1),this.component.bind(k.tc,this.qca,this,!1),this.component.bind(k.Eb,this.pca,this,!1),this.component.bind(k.Rk,this.tXa,this,!1))};e.prototype.va=function(){return this.component.va()};
e.prototype.sC=function(){this.component.Kw(!0);this.hn=!0};e.prototype.vD=function(){this.component.Lw(!0);this.jn=!0};e.prototype.qca=function(){this.component.ME(!0)};e.prototype.pca=function(){this.component.ME(!1)};e.prototype.sXa=function(b){this.component.hn||this.component.jn?(this.component.Vb().bind(k.fb,this.iva,this,!1),this.component.Vb().bind(k.ab,this.jva,this,!1),this.Sx=b.pageX,this.Tx=b.pageY):this.lva(b)};e.prototype.iva=function(b){var c=0,d=0;this.hn&&(c=(b.pageX-this.Sx)/this.va().Kn.clientWidth);
this.jn&&(d=(b.pageY-this.Tx)/this.va().ho.clientHeight);this.Sx=b.pageX;this.Tx=b.pageY;c==0&&d==0||this.component.$O(c,d,"content")};e.prototype.jva=function(){this.component.Vb().h(k.fb,this.iva,this);this.component.Vb().h(k.ab,this.jva,this);this.component.Kw(!1);this.component.Lw(!1);this.jn=this.hn=!1};e.prototype.Kua=function(b){return b.delta>0&&this.component.fO()||b.delta<0&&this.component.dO()?!0:!1};e.prototype.tXa=function(b){b=(g.Md()==g.lZ?b.Wz*.1:b.delta)*.3;this.component.$O(0,-b,
"page")};e.prototype.lva=function(b){if(this.component.eO()||this.component.gO())this.component.Vb().bind(k.fb,this.mva,this,!1),this.component.Vb().bind(k.ab,this.nva,this,!1),this.component.ME(!0),this.Sx=b.pageX,this.Tx=b.pageY,this.Q0a()};e.prototype.mva=function(b){var c=b.pageX-this.Sx,d=b.pageY-this.Tx;!this.hn&&!this.jn&&c*c+d*d>25&&(this.hn=this.component.eO(),this.jn=this.component.gO(),this.component.Kw(this.hn),this.component.Lw(this.jn));if(this.hn||this.jn)this.component.$O(this.hn?
-c:0,this.jn?-d:0),this.Sx=b.pageX,this.Tx=b.pageY,this.I8a()};e.prototype.nva=function(){this.component.Vb().h(k.fb,this.mva,this);this.component.Vb().h(k.ab,this.nva,this);this.component.ME(!1);var b=Math.max(Math.abs(this.uca/.001),Math.abs(this.vca/.001));this.component.mGa(-.5*this.uca*b,-.5*this.vca*b,b)};e.prototype.Q0a=function(){this.sca=this.Sx;this.tca=this.Tx};e.prototype.I8a=function(){var b=(new Date).getTime(),c=b-this.kva;c>10&&(this.kva=b,this.uca=(this.Sx-this.sca)/c,this.vca=(this.Tx-
this.tca)/c,this.sca=this.Sx,this.tca=this.Tx)};return e}(n)});
define("tdv/view/core/eventmanager/mousetouch/CloseButtonMouseTouchEventManager",["require","exports","tdv/constants/EventName","tdv/view/core/eventmanager/mousetouch/ScrollableContainerMouseTouchEventManager","tdv/view/util/KeyboardControl"],function(a,l,k,n,g){return function(h){function e(b){b=h.call(this,b)||this;b.Ly=b.Ly.bind(b);return b}O(e,h);e.prototype.EG=function(){h.prototype.EG.call(this);g.ela(this.Ly)};e.prototype.yG=function(){h.prototype.yG.call(this);g.apa(this.Ly)};e.prototype.Ly=
function(){this.component.m(k.la)};return e}(n)});
define("tdv/view/core/eventmanager/mousetouch/DropDownMouseTouchEventManager",["require","exports","tdv/constants/EventName","tdv/view/core/eventmanager/mousetouch/ScrollableContainerMouseTouchEventManager","tdv/view/util/KeyboardControl"],function(a,l,k,n,g){return function(h){function e(b){b=h.call(this,b)||this;b.component.pk.bind(k.od,b.c3a,b,!1);b.component.pk.bind(k.jd,b.b3a,b,!0);b.component.bind(k.nB,b.rM,b,!0);b.Ly=b.Ly.bind(b);return b}O(e,h);e.prototype.c3a=function(){g.jGa(this,[this.component.fe.va().bc()].concat(this.component.pk.uJa().map(function(b){return b.va().bc()})));
g.ela(this.Ly)};e.prototype.b3a=function(){g.apa(this.Ly);g.$oa(this)};e.prototype.rM=function(){g.Heb([this.component.fe.va().bc()].concat(this.component.pk.uJa().map(function(b){return b.va().bc()})))&&this.component.fe.va().bc().focus()};e.prototype.Ly=function(){this.component.close()};return e}(n)});
define("tdv/view/core/eventmanager/mousetouch/HTMLMouseTouchEventManager",["require","exports","tdv/view/core/eventmanager/mousetouch/MouseTouchEventManager"],function(a,l,k){return function(n){function g(){return n!==null&&n.apply(this,arguments)||this}O(g,n);g.prototype.qD=function(h,e){for(e=h.target;e&&e.tagName!="A"&&e.tagName!="BUTTON";)e=e.parentElement;e=!e;n.prototype.qD.call(this,h,e)};return g}(k)});
define("tdv/view/core/eventmanager/mousetouch/IconButtonMouseTouchEventManager",["require","exports","tdv/view/core/eventmanager/mousetouch/MouseTouchEventManager","tdv/view/constants/Cursor"],function(a,l,k,n){return function(g){function h(e){var b=g.call(this,e)||this;b.JU=function(c){var d=b.UG(c);b.c7(d)?g.prototype.JU.call(b,c):b.xwa(d,c)};b.tS=function(c){var d=b.SG(c);b.c7(d)?g.prototype.tS.call(b,c):b.xwa(d,c)};b.Qda=!1;b.Zxa=!1;return b}O(h,g);h.prototype.bPa=function(e){this.Zxa=e};h.prototype.va=
function(){return this.component.va()};h.prototype.KU=function(e){var b=this.UG(e);this.c7(b)?g.prototype.KU.call(this,e):this.IZa(b,e)};h.prototype.wS=function(e){var b=this.SG(e);if(this.c7(b)||this.Qda)g.prototype.wS.call(this,e),this.component.j8();else{this.Qda=!0;if(b=this.jea(b))b.dispatchEvent(this.dva(e)),e.preventDefault(),e.stopImmediatePropagation();this.Vwa(b)=="pointer"?this.component.j8(n.mf):this.component.j8(n.lf);this.Qda=!1}};h.prototype.c7=function(e){return this.Zxa||this.component.Oeb(e)};
h.prototype.xwa=function(e,b){if(e=this.jea(e))e.dispatchEvent(this.dva(b)),b.preventDefault(),b.stopImmediatePropagation()};h.prototype.IZa=function(e,b){if(e=this.jea(e))e.dispatchEvent(this.mXa(b)),b.preventDefault(),b.stopImmediatePropagation()};h.prototype.jea=function(e){var b=this;this.va().bc().style.pointerEvents="none";e=document.elementFromPoint(e.nE,e.oE);setTimeout(function(){b.va().bc().style.pointerEvents=b.uxa()},0);return e};h.prototype.dva=function(e){return new MouseEvent(e.type,
e)};h.prototype.mXa=function(e){return new TouchEvent(e.type,e)};h.prototype.Vwa=function(e){if(e){var b=e.style.cursor;b=="inherit"&&(b=this.Vwa(e.parentElement))}else b="default";return b};return h}(k)});
define("tdv/view/core/eventmanager/mousetouch/ThumbnailListMouseTouchEventManager","require exports tdv/constants/EventName tdv/view/core/eventmanager/mousetouch/ScrollableContainerMouseTouchEventManager tdv/view/util/KeyboardControl tdv/view/constants/LayoutMode".split(" "),function(a,l,k,n,g,h){return function(e){function b(c){c=e.call(this,c)||this;c.component.bind(k.N("layout"),c.Nga,c,!1);c.component.bind(k.N("items"),c.Lga,c,!1);return c}O(b,e);b.prototype.EG=function(){e.prototype.EG.call(this);
this.Dz()};b.prototype.yG=function(){e.prototype.yG.call(this);this.Dz()};b.prototype.Nga=function(){this.Dz()};b.prototype.Lga=function(){this.Dz()};b.prototype.Dz=function(){this.PR?this.component.get("layout")==h.bi?g.m$a(this,this.component.Cb().map(function(c){return c.va().bc()})):g.jGa(this,this.component.Cb().map(function(c){return c.va().bc()})):g.$oa(this)};return b}(n)});
define("tdv/view/core/eventmanager/mousetouch/ThumbnailGridMouseTouchEventManager",["require","exports","tdv/constants/EventName","tdv/view/core/eventmanager/mousetouch/ScrollableContainerMouseTouchEventManager","tdv/view/util/KeyboardControl"],function(a,l,k,n,g){return function(h){function e(b){b=h.call(this,b)||this;b.component.bind(k.N("layout"),b.Nga,b,!1);b.component.bind(k.N("items"),b.Lga,b,!1);return b}O(e,h);e.prototype.EG=function(){h.prototype.EG.call(this);this.Dz()};e.prototype.yG=function(){h.prototype.yG.call(this);
this.Dz()};e.prototype.Nga=function(){this.Dz()};e.prototype.Lga=function(){this.Dz()};e.prototype.Dz=function(){this.PR?g.j$a(this,this.component.Cb().map(function(b){return b.va().bc()}),this.component.an.ACa,this.component.an.fva):g.$oa(this)};return e}(n)});
define("tdv/view/list/thumblist/ThumbnailListItem","require exports tdv/utils tdv/binding/ChangeWatcher tdv/constants/EventName tdv/view/constants/Alignment tdv/view/constants/CreationPolicy tdv/view/constants/Cursor tdv/view/constants/LayoutMode tdv/view/constants/Position tdv/view/constants/ScaleMode tdv/view/constants/State tdv/view/containers/Container tdv/view/images/Image tdv/view/text/Label".split(" "),function(a,l,k,n,g,h,e,b,c,d,f,m,p,q,r){return function(t){function u(){var v=t.call(this)||
this;v.Gf=null;v.Xa=null;v.pG=[];v.set("ariaRole","option");v.set("autoRolledOver",!0);v.set("childrenInteractionEnabled",!1);v.set("contentOpaque",!0);v.set("creationPolicy",e.GK);v.set("cursor",b.mf);return v}O(u,t);u.prototype.Ob=function(){t.prototype.Ob.call(this);this.j("listLayout");this.j("overflow","hidden");this.j("item");this.j("thumbnailUrlFunction",this.Wca);this.j("sourceProperties");this.j("labelFunction",this.Uca);this.j("labelFontFamily");this.j("labelFontColor");this.j("labelFontSize");
this.j("labelFontStyle");this.j("labelFontWeight");this.j("labelGap");this.j("labelHorizontalAlign");this.j("labelPosition");this.j("labelTextDecoration");this.j("labelTextShadowColor");this.j("labelTextShadowHorizontalLength");this.j("labelTextShadowVerticalLength");this.j("labelTextShadowBlurRadius");this.j("labelTextShadowOpacity");this.j("thumbnailBorderRadius");this.j("thumbnailOpacity");this.j("thumbnailBorderSize");this.j("thumbnailBorderColor");this.j("thumbnailWidth");this.j("thumbnailHeight");
this.j("thumbnailMaxWidth");this.j("thumbnailMaxHeight");this.j("thumbnailShadow");this.j("thumbnailShadowHorizontalLength");this.j("thumbnailShadowVerticalLength");this.j("thumbnailShadowBlurRadius");this.j("thumbnailShadowSpread");this.j("thumbnailShadowColor");this.j("thumbnailShadowOpacity");this.D("rollOverBackgroundOpacity",m.ga,"backgroundOpacity");this.D("rollOverBackgroundColor",m.ga,"backgroundColor");this.D("rollOverBackgroundColorRatios",m.ga,"backgroundColorRatios");this.D("rollOverBackgroundColorDirection",
m.ga,"backgroundColorDirection");this.D("rollOverBorderRadius",m.ga,"borderRadius");this.D("rollOverBorderTopRadius",m.ga,"borderTopRadius");this.D("rollOverBorderBottomRadius",m.ga,"borderBottomRadius");this.D("rollOverBorderLeftRadius",m.ga,"borderLeftRadius");this.D("rollOverBorderRightRadius",m.ga,"borderRightRadius");this.D("rollOverBorderTopLeftRadius",m.ga,"borderTopLeftRadius");this.D("rollOverBorderTopRightRadius",m.ga,"borderTopRightRadius");this.D("rollOverBorderBottomLeftRadius",m.ga,
"borderBottomLeftRadius");this.D("rollOverBorderBottomRightRadius",m.ga,"borderBottomRightRadius");this.D("rollOverBorderSize",m.ga,"borderSize");this.D("rollOverBorderLeftSize",m.ga,"borderLeftSize");this.D("rollOverBorderTopSize",m.ga,"borderTopSize");this.D("rollOverBorderRightSize",m.ga,"borderRightSize");this.D("rollOverBorderBottomSize",m.ga,"borderBottomSize");this.D("rollOverBorderColor",m.ga,"borderColor");this.D("rollOverBorderLeftColor",m.ga,"borderLeftColor");this.D("rollOverBorderTopColor",
m.ga,"borderTopColor");this.D("rollOverBorderRightColor",m.ga,"borderRightColor");this.D("rollOverBorderBottomColor",m.ga,"borderBottomColor");this.D("rollOverLabelFontColor",m.ga,"labelFontColor");this.D("rollOverLabelFontSize",m.ga,"labelFontSize");this.D("rollOverLabelFontStyle",m.ga,"labelFontStyle");this.D("rollOverLabelFontWeight",m.ga,"labelFontWeight");this.D("rollOverLabelTextDecoration",m.ga,"labelTextDecoration");this.D("rollOverLabelTextShadowColor",m.ga,"labelTextShadowColor");this.D("rollOverLabelTextShadowHorizontalLength",
m.ga,"labelTextShadowHorizontalLength");this.D("rollOverLabelTextShadowVerticalLength",m.ga,"labelTextShadowVerticalLength");this.D("rollOverLabelTextShadowBlurRadius",m.ga,"labelTextShadowBlurRadius");this.D("rollOverLabelTextShadowOpacity",m.ga,"labelTextShadowOpacity");this.D("rollOverOpacity",m.ga,"opacity");this.D("rollOverPaddingLeft",m.ga,"paddingLeft");this.D("rollOverPaddingTop",m.ga,"paddingTop");this.D("rollOverPaddingRight",m.ga,"paddingRight");this.D("rollOverPaddingBottom",m.ga,"paddingBottom");
this.D("rollOverShadow",m.ga,"shadow");this.D("rollOverThumbnailOpacity",m.ga,"thumbnailOpacity");this.D("rollOverThumbnailBorderSize",m.ga,"thumbnailBorderSize");this.D("rollOverThumbnailBorderColor",m.ga,"thumbnailBorderColor");this.D("rollOverThumbnailShadow",m.ga,"thumbnailShadow");this.D("rollOverThumbnailShadowHorizontalLength",m.ga,"thumbnailShadowHorizontalLength");this.D("rollOverThumbnailShadowVerticalLength",m.ga,"thumbnailShadowVerticalLength");this.D("rollOverThumbnailShadowBlurRadius",
m.ga,"thumbnailShadowBlurRadius");this.D("rollOverThumbnailShadowSpread",m.ga,"thumbnailShadowSpread");this.D("rollOverThumbnailShadowColor",m.ga,"thumbnailShadowColor");this.D("rollOverThumbnailShadowOpacity",m.ga,"thumbnailShadowOpacity");this.D("selectedBackgroundOpacity",m.pa,"backgroundOpacity");this.D("selectedBackgroundColor",m.pa,"backgroundColor");this.D("selectedBackgroundColorRatios",m.pa,"backgroundColorRatios");this.D("selectedBackgroundColorDirection",m.pa,"backgroundColorDirection");
this.D("selectedBorderRadius",m.pa,"borderRadius");this.D("selectedBorderTopRadius",m.pa,"borderTopRadius");this.D("selectedBorderBottomRadius",m.pa,"borderBottomRadius");this.D("selectedBorderLeftRadius",m.pa,"borderLeftRadius");this.D("selectedBorderRightRadius",m.pa,"borderRightRadius");this.D("selectedBorderTopLeftRadius",m.pa,"borderTopLeftRadius");this.D("selectedBorderTopRightRadius",m.pa,"borderTopRightRadius");this.D("selectedBorderBottomLeftRadius",m.pa,"borderBottomLeftRadius");this.D("selectedBorderBottomRightRadius",
m.pa,"borderBottomRightRadius");this.D("selectedBorderSize",m.pa,"borderSize");this.D("selectedBorderLeftSize",m.pa,"borderLeftSize");this.D("selectedBorderTopSize",m.pa,"borderTopSize");this.D("selectedBorderRightSize",m.pa,"borderRightSize");this.D("selectedBorderBottomSize",m.pa,"borderBottomSize");this.D("selectedBorderColor",m.pa,"borderColor");this.D("selectedBorderLeftColor",m.pa,"borderLeftColor");this.D("selectedBorderTopColor",m.pa,"borderTopColor");this.D("selectedBorderRightColor",m.pa,
"borderRightColor");this.D("selectedBorderBottomColor",m.pa,"borderBottomColor");this.D("selectedLabelFontColor",m.pa,"labelFontColor");this.D("selectedLabelFontSize",m.pa,"labelFontSize");this.D("selectedLabelFontStyle",m.pa,"labelFontStyle");this.D("selectedLabelFontWeight",m.pa,"labelFontWeight");this.D("selectedLabelTextDecoration",m.pa,"labelTextDecoration");this.D("selectedLabelTextShadowColor",m.pa,"labelTextShadowColor");this.D("selectedLabelTextShadowHorizontalLength",m.pa,"labelTextShadowHorizontalLength");
this.D("selectedLabelTextShadowVerticalLength",m.pa,"labelTextShadowVerticalLength");this.D("selectedLabelTextShadowBlurRadius",m.pa,"labelTextShadowBlurRadius");this.D("selectedLabelTextShadowOpacity",m.pa,"labelTextShadowOpacity");this.D("selectedOpacity",m.pa,"opacity");this.D("selectedPaddingLeft",m.pa,"paddingLeft");this.D("selectedPaddingTop",m.pa,"paddingTop");this.D("selectedPaddingRight",m.pa,"paddingRight");this.D("selectedPaddingBottom",m.pa,"paddingBottom");this.D("selectedShadow",m.pa,
"shadow");this.D("selectedThumbnailOpacity",m.pa,"thumbnailOpacity");this.D("selectedThumbnailBorderSize",m.pa,"thumbnailBorderSize");this.D("selectedThumbnailBorderColor",m.pa,"thumbnailBorderColor");this.D("selectedThumbnailShadow",m.pa,"thumbnailShadow");this.D("selectedThumbnailShadowHorizontalLength",m.pa,"thumbnailShadowHorizontalLength");this.D("selectedThumbnailShadowVerticalLength",m.pa,"thumbnailShadowVerticalLength");this.D("selectedThumbnailShadowBlurRadius",m.pa,"thumbnailShadowBlurRadius");
this.D("selectedThumbnailShadowSpread",m.pa,"thumbnailShadowSpread");this.D("selectedThumbnailShadowColor",m.pa,"thumbnailShadowColor");this.D("selectedThumbnailShadowOpacity",m.pa,"thumbnailShadowOpacity")};u.prototype.kY=function(v){this.hU(v)};u.prototype.Ib=function(){t.prototype.Ib.call(this);this.Gf||(this.Gf=new q,this.mb(this.Gf),this.Gf.set("horizontalAlign",h.Ye),this.Gf.set("verticalAlign",h.Xd),this.Gf.bind(g.ia,this.yja,this,!1));this.Xa||(this.Xa=new r,this.mb(this.Xa))};u.prototype.Wca=
function(v){if(k.qA(v))return v;if(v&&v.Gqa)return v.Gqa};u.prototype.Uca=function(v){if(v&&v.label)return v.label};u.prototype.Kx=function(){return this.Xa&&this.Xa.get("text")||t.prototype.Kx.call(this)};u.prototype.jb=function(){if(this.S("sourceProperties")||this.S("item")){for(;this.pG.length;)this.pG.pop().UE();var v=this.G("sourceProperties"),w=this.G("item");v&&w&&v.forEach(function(x){this.pG.push(n.Sw(w,x,this.Wga,this,!0))}.bind(this))}if(this.S("sourceProperties")||this.S("item")||this.S("tooltipFunction"))v=
this.G("item"),v=this.G("tooltipFunction")(v),this.set("toolTip",v);if(this.S("sourceProperties")||this.S("item")||this.S("thumbnailUrlFunction"))v=this.G("item"),(v=this.G("thumbnailUrlFunction")(v))?this.Gf.get("url")!=v&&this.Gf.wa({url:v,visible:!0,opacity:.5}):this.Gf.wa({url:void 0,visible:!1}),this.$("thumbnailUrlFunction");if(this.S("sourceProperties")||this.S("item")||this.S("labelFunction"))v=this.G("item"),v=this.G("labelFunction")(v),this.Xa.wa({text:v,visible:v?!0:!1}),this.$("labelFunction");
this.$("sourceProperties");this.$("item");if(this.S("listLayout"))switch(this.G("listLayout")){case c.ck:this.wa({width:"100%",height:void 0});break;default:this.wa({height:"100%",width:void 0})}if(this.S("labelPosition")||this.S("listLayout")||this.S("thumbnailWidth")||this.S("thumbnailHeight")){var y=this;v=function(x,z){x=y.G(x);x===void 0&&(x=z);return x};switch(this.G("labelPosition")){case d.eb:case d.Db:this.set("layout",c.bi);this.Xa.set("width","100%");switch(this.G("listLayout")){case c.ck:this.Gf.wa({height:v("thumbnailHeight"),
width:v("thumbnailWidth"),scaleMode:v("thumbnailScaleMode",f.Qk)});break;default:this.Gf.wa({height:v("thumbnailHeight","100%"),width:v("thumbnailWidth"),scaleMode:v("thumbnailScaleMode",f.Qk)})}break;default:switch(this.set("layout",c.ck),this.Xa.set("width",void 0),this.G("listLayout")){case c.ck:this.Gf.wa({height:v("thumbnailHeight"),width:v("thumbnailWidth","100%"),scaleMode:v("thumbnailScaleMode",f.Lp)});break;default:this.Gf.wa({height:v("thumbnailHeight","100%"),width:v("thumbnailWidth"),
scaleMode:v("thumbnailScaleMode",f.Qk)})}}switch(this.G("labelPosition")){case d.eb:case d.Tc:this.gr(this.Xa,0);break;default:this.gr(this.Xa,1)}this.$("labelPosition")}this.$("listLayout");this.Qc(u.Vaa,u.yQ,[this],!0,!0);this.Qc(u.Xaa,u.yQ,[this.Gf],!0,!0);this.Qc(u.Waa,u.yQ,[this.Xa],!0,!0);t.prototype.jb.call(this)};u.prototype.Wga=function(){this.lD("item")};u.prototype.bI=function(v){t.prototype.bI.call(this,v)};u.prototype.yja=function(){this.Gf.set("opacity",1)};u.Vaa=["labelGap"];u.Xaa=
"thumbnailBorderColor thumbnailBorderRadius thumbnailBorderSize thumbnailMaxWidth thumbnailMaxHeight thumbnailOpacity thumbnailShadow thumbnailShadowHorizontalLength thumbnailShadowVerticalLength thumbnailShadowBlurRadius thumbnailShadowSpread thumbnailShadowColor thumbnailShadowOpacity".split(" ");u.Waa="labelFontFamily labelFontColor labelFontSize labelFontStyle labelFontWeight labelHorizontalAlign labelTextDecoration labelTextShadowColor labelTextShadowHorizontalLength labelTextShadowVerticalLength labelTextShadowBlurRadius labelTextShadowOpacity".split(" ");
u.yQ={labelFontFamily:"fontFamily",labelFontColor:"fontColor",labelFontSize:"fontSize",labelFontStyle:"fontStyle",labelFontWeight:"fontWeight",labelGap:"gap",labelHorizontalAlign:"horizontalAlign",labelTextDecoration:"textDecoration",labelTextShadowColor:"textShadowColor",labelTextShadowHorizontalLength:"textShadowHorizontalLength",labelTextShadowVerticalLength:"textShadowVerticalLength",labelTextShadowBlurRadius:"textShadowBlurRadius",labelTextShadowOpacity:"textShadowOpacity",thumbnailMaxWidth:"maxWidth",
thumbnailMaxHeight:"maxHeight",thumbnailBorderRadius:"borderRadius",thumbnailOpacity:"opacity",thumbnailBorderSize:"borderSize",thumbnailBorderColor:"borderColor",thumbnailShadow:"shadow",thumbnailShadowHorizontalLength:"shadowHorizontalLength",thumbnailShadowVerticalLength:"shadowVerticalLength",thumbnailShadowBlurRadius:"shadowBlurRadius",thumbnailShadowSpread:"shadowSpread",thumbnailShadowColor:"shadowColor",thumbnailShadowOpacity:"shadowOpacity"};return u}(p)});
define("tdv/view/list/thumblist/ThumbnailList","require exports tdv/events/Event tdv/view/constants/Alignment tdv/constants/EventName tdv/view/constants/LayoutMode tdv/view/constants/OverflowPolicy tdv/view/constants/Position tdv/view/containers/Container tdv/view/list/thumblist/ThumbnailListItem".split(" "),function(a,l,k,n,g,h,e,b,c,d){return function(f){function m(){var p=f.call(this)||this;p.An=!1;p.set("ariaRole","listbox");p.set("contentOpaque",!0);p.bind(g.N("selectedIndex"),p.c5a,p,!1);p.bind(g.Zb,
p.P7a,p,!1);return p}O(m,f);m.prototype.Ob=function(){f.prototype.Ob.call(this);this.j("layout",h.bi);this.j("selectedIndex",-1);this.j("items",[]);this.j("overflow",e.Pr);this.j("itemHorizontalAlign",n.Ye);this.j("itemLabelFontFamily");this.j("itemLabelPosition",b.Fc);this.j("itemLabelFunction");this.j("itemLabelGap");this.j("itemLabelHorizontalAlign",n.Ye);this.j("itemThumbnailBorderRadius");this.j("itemThumbnailScaleMode");this.j("itemThumbnailWidth");this.j("itemThumbnailHeight");this.j("itemThumbnailMaxWidth");
this.j("itemThumbnailMaxHeight");this.j("itemThumbnailUrlFunction");this.j("itemTooltipFunction");this.j("itemSourceProperties");this.j("itemVerticalAlign",n.Xd);this.j("itemBackgroundOpacity");this.j("itemBackgroundColor");this.j("itemBackgroundColorRatios");this.j("itemBackgroundColorDirection");this.j("itemBorderRadius");this.j("itemBorderTopRadius");this.j("itemBorderBottomRadius");this.j("itemBorderLeftRadius");this.j("itemBorderRightRadius");this.j("itemBorderTopLeftRadius");this.j("itemBorderTopRightRadius");
this.j("itemBorderBottomLeftRadius");this.j("itemBorderBottomRightRadius");this.j("itemBorderSize");this.j("itemBorderLeftSize");this.j("itemBorderTopSize");this.j("itemBorderRightSize");this.j("itemBorderBottomSize");this.j("itemBorderColor");this.j("itemBorderLeftColor");this.j("itemBorderTopColor");this.j("itemBorderRightColor");this.j("itemBorderBottomColor");this.j("itemLabelFontColor");this.j("itemLabelFontSize");this.j("itemLabelFontStyle");this.j("itemLabelFontWeight");this.j("itemLabelTextDecoration");
this.j("itemLabelTextShadowColor");this.j("itemLabelTextShadowHorizontalLength");this.j("itemLabelTextShadowVerticalLength");this.j("itemLabelTextShadowBlurRadius");this.j("itemLabelTextShadowOpacity");this.j("itemOpacity");this.j("itemPaddingLeft");this.j("itemPaddingTop");this.j("itemPaddingRight");this.j("itemPaddingBottom");this.j("itemShadow");this.j("itemThumbnailOpacity");this.j("itemThumbnailBorderSize");this.j("itemThumbnailBorderColor");this.j("itemThumbnailShadow");this.j("itemThumbnailShadowHorizontalLength");
this.j("itemThumbnailShadowVerticalLength");this.j("itemThumbnailShadowBlurRadius");this.j("itemThumbnailShadowSpread");this.j("itemThumbnailShadowColor");this.j("itemThumbnailShadowOpacity");this.j("rollOverItemBackgroundOpacity");this.j("rollOverItemBackgroundColor");this.j("rollOverItemBackgroundColorRatios");this.j("rollOverItemBackgroundColorDirection");this.j("rollOverItemBorderRadius");this.j("rollOverItemBorderTopRadius");this.j("rollOverItemBorderBottomRadius");this.j("rollOverItemBorderLeftRadius");
this.j("rollOverItemBorderRightRadius");this.j("rollOverItemBorderTopLeftRadius");this.j("rollOverItemBorderTopRightRadius");this.j("rollOverItemBorderBottomLeftRadius");this.j("rollOverItemBorderBottomRightRadius");this.j("rollOverItemBorderSize");this.j("rollOverItemBorderLeftSize");this.j("rollOverItemBorderTopSize");this.j("rollOverItemBorderRightSize");this.j("rollOverItemBorderBottomSize");this.j("rollOverItemBorderColor");this.j("rollOverItemBorderLeftColor");this.j("rollOverItemBorderTopColor");
this.j("rollOverItemBorderRightColor");this.j("rollOverItemBorderBottomColor");this.j("rollOverItemLabelFontSize");this.j("rollOverItemLabelFontStyle");this.j("rollOverItemLabelFontWeight");this.j("rollOverItemLabelTextDecoration");this.j("rollOverItemLabelTextShadowColor");this.j("rollOverItemLabelTextShadowHorizontalLength");this.j("rollOverItemLabelTextShadowVerticalLength");this.j("rollOverItemLabelTextShadowBlurRadius");this.j("rollOverItemLabelTextShadowOpacity");this.j("rollOverItemOpacity");
this.j("rollOverItemPaddingLeft");this.j("rollOverItemPaddingTop");this.j("rollOverItemPaddingRight");this.j("rollOverItemPaddingBottom");this.j("rollOverItemShadow");this.j("rollOverItemThumbnailOpacity");this.j("rollOverItemThumbnailBorderSize");this.j("rollOverItemThumbnailBorderColor");this.j("rollOverItemThumbnailShadow");this.j("rollOverItemThumbnailShadowHorizontalLength");this.j("rollOverItemThumbnailShadowVerticalLength");this.j("rollOverItemThumbnailShadowBlurRadius");this.j("rollOverItemThumbnailShadowSpread");
this.j("rollOverItemThumbnailShadowColor");this.j("rollOverItemThumbnailShadowOpacity");this.j("selectedItemBackgroundOpacity");this.j("selectedItemBackgroundColor");this.j("selectedItemBackgroundColorRatios");this.j("selectedItemBackgroundColorDirection");this.j("selectedItemBorderRadius");this.j("selectedItemBorderTopRadius");this.j("selectedItemBorderBottomRadius");this.j("selectedItemBorderLeftRadius");this.j("selectedItemBorderRightRadius");this.j("selectedItemBorderTopLeftRadius");this.j("selectedItemBorderTopRightRadius");
this.j("selectedItemBorderBottomLeftRadius");this.j("selectedItemBorderBottomRightRadius");this.j("selectedItemBorderSize");this.j("selectedItemBorderLeftSize");this.j("selectedItemBorderTopSize");this.j("selectedItemBorderRightSize");this.j("selectedItemBorderBottomSize");this.j("selectedItemBorderColor");this.j("selectedItemBorderLeftColor");this.j("selectedItemBorderTopColor");this.j("selectedItemBorderRightColor");this.j("selectedItemBorderBottomColor");this.j("selectedItemLabelFontSize");this.j("selectedItemLabelFontStyle");
this.j("selectedItemLabelFontWeight");this.j("selectedItemLabelTextDecoration");this.j("selectedItemLabelTextShadowColor");this.j("selectedItemLabelTextShadowHorizontalLength");this.j("selectedItemLabelTextShadowVerticalLength");this.j("selectedItemLabelTextShadowBlurRadius");this.j("selectedItemLabelTextShadowOpacity");this.j("selectedItemOpacity");this.j("selectedItemPaddingLeft");this.j("selectedItemPaddingTop");this.j("selectedItemPaddingRight");this.j("selectedItemPaddingBottom");this.j("selectedItemShadow");
this.j("selectedItemThumbnailOpacity");this.j("selectedItemThumbnailBorderSize");this.j("selectedItemThumbnailBorderColor");this.j("selectedItemThumbnailShadow");this.j("selectedItemThumbnailShadowHorizontalLength");this.j("selectedItemThumbnailShadowVerticalLength");this.j("selectedItemThumbnailShadowBlurRadius");this.j("selectedItemThumbnailShadowSpread");this.j("selectedItemThumbnailShadowColor");this.j("selectedItemThumbnailShadowOpacity")};m.prototype.YR=function(p){this.An=!0;this.set("selectedIndex",
this.pea(p.source))};m.prototype.c5a=function(){this.JCa()};m.prototype.P7a=function(){setTimeout(function(){this.JCa()}.bind(this),100)};m.prototype.JCa=function(){var p=this.get("selectedIndex"),q=this.Cb();p>=0&&p<q.length&&this.scrollIntoView(q[p])};m.prototype.pea=function(p){for(var q=this.Cb(),r=0;r<q.length;r++)if(q[r]==p)return r;return-1};m.prototype.jb=function(){if(this.S("layout")){var p=this.G("layout");p!=h.ck&&p!=h.bi&&this.set("layout",h.bi)}var q=!1;if(this.S("items")){q=!0;p=this.G("items")||
[];var r=this.Cb();if(r.length<p.length){for(var t=r.length;t<p.length;t++)r=new d,r.bind(g.la,this.YR,this,!1),this.Qc(m.vQ,m.UF,[r],!1,!1),this.Qc(m.wQ,m.VF,[r],!1,!1),this.mb(r);r=this.Cb()}if(r.length>p.length){for(t=p.length;t<r.length;t++){var u=r[t];u.h(g.la,this.YR,this);this.removeChild(u)}r=this.Cb()}for(t=0;t<p.length;t++)r[t].set("item",p[t]);this.$("items")}if(this.S("selectedIndex")||q){p=this.Cb();q=Math.min(p.length-1,Math.max(-1,this.G("selectedIndex")));this.set("selectedIndex",
q);for(t=0;t<p.length;t++)p[t].kY(t==q);this.$("selectedIndex");this.An&&(this.An=!1,this.m(new k(g.V)))}this.Qc(m.vQ,m.UF,this.Cb(),!0,!1);this.Qc(m.wQ,m.VF,this.Cb(),!0,!0);f.prototype.jb.call(this)};m.UF={layout:"listLayout",shadowHorizontalLength:"shadowHorizontalLength",shadowVerticalLength:"shadowVerticalLength",shadowBlurRadius:"shadowBlurRadius",shadowSpread:"shadowSpread",shadowOpacity:"shadowOpacity",shadowColor:"shadowColor"};m.VF={itemHorizontalAlign:"horizontalAlign",itemLabelFunction:"labelFunction",
itemLabelFontFamily:"labelFontFamily",itemLabelGap:"labelGap",itemLabelHorizontalAlign:"labelHorizontalAlign",itemLabelPosition:"labelPosition",itemSourceProperties:"sourceProperties",itemThumbnailBorderRadius:"thumbnailBorderRadius",itemThumbnailScaleMode:"thumbnailScaleMode",itemThumbnailHeight:"thumbnailHeight",itemThumbnailWidth:"thumbnailWidth",itemThumbnailMaxHeight:"thumbnailMaxHeight",itemThumbnailMaxWidth:"thumbnailMaxWidth",itemThumbnailUrlFunction:"thumbnailUrlFunction",itemTooltipFunction:"tooltipFunction",
itemVerticalAlign:"verticalAlign",itemBackgroundOpacity:"backgroundOpacity",itemBackgroundColor:"backgroundColor",itemBackgroundColorRatios:"backgroundColorRatios",itemBackgroundColorDirection:"backgroundColorDirection",itemBorderRadius:"borderRadius",itemBorderTopRadius:"borderTopRadius",itemBorderBottomRadius:"borderBottomRadius",itemBorderLeftRadius:"borderLeftRadius",itemBorderRightRadius:"borderRightRadius",itemBorderTopLeftRadius:"borderTopLeftRadius",itemBorderTopRightRadius:"borderTopRightRadius",
itemBorderBottomLeftRadius:"borderBottomLeftRadius",itemBorderBottomRightRadius:"borderBottomRightRadius",itemBorderSize:"borderSize",itemBorderLeftSize:"borderLeftSize",itemBorderTopSize:"borderTopSize",itemBorderRightSize:"borderRightSize",itemBorderBottomSize:"borderBottomSize",itemBorderColor:"borderColor",itemBorderLeftColor:"borderLeftColor",itemBorderTopColor:"borderTopColor",itemBorderRightColor:"borderRightColor",itemBorderBottomColor:"borderBottomColor",itemLabelFontColor:"labelFontColor",
itemLabelFontSize:"labelFontSize",itemLabelFontStyle:"labelFontStyle",itemLabelFontWeight:"labelFontWeight",itemLabelTextDecoration:"labelTextDecoration",itemLabelTextShadowColor:"labelTextShadowColor",itemLabelTextShadowHorizontalLength:"labelTextShadowHorizontalLength",itemLabelTextShadowVerticalLength:"labelTextShadowVerticalLength",itemLabelTextShadowBlurRadius:"labelTextShadowBlurRadius",itemLabelTextShadowOpacity:"labelTextShadowOpacity",itemOpacity:"opacity",itemPaddingLeft:"paddingLeft",itemPaddingTop:"paddingTop",
itemPaddingRight:"paddingRight",itemPaddingBottom:"paddingBottom",itemShadow:"shadow",itemThumbnailOpacity:"thumbnailOpacity",itemThumbnailBorderSize:"thumbnailBorderSize",itemThumbnailBorderColor:"thumbnailBorderColor",itemThumbnailShadow:"thumbnailShadow",itemThumbnailShadowHorizontalLength:"thumbnailShadowHorizontalLength",itemThumbnailShadowVerticalLength:"thumbnailShadowVerticalLength",itemThumbnailShadowBlurRadius:"thumbnailShadowBlurRadius",itemThumbnailShadowSpread:"thumbnailShadowSpread",
itemThumbnailShadowColor:"thumbnailShadowColor",itemThumbnailShadowOpacity:"thumbnailShadowOpacity",rollOverItemBackgroundOpacity:"rollOverBackgroundOpacity",rollOverItemBackgroundColor:"rollOverBackgroundColor",rollOverItemBackgroundColorRatios:"rollOverBackgroundColorRatios",rollOverItemBackgroundColorDirection:"rollOverBackgroundColorDirection",rollOverItemBorderRadius:"rollOverBorderRadius",rollOverItemBorderTopRadius:"rollOverBorderTopRadius",rollOverItemBorderBottomRadius:"rollOverBorderBottomRadius",
rollOverItemBorderLeftRadius:"rollOverBorderLeftRadius",rollOverItemBorderRightRadius:"rollOverBorderRightRadius",rollOverItemBorderTopLeftRadius:"rollOverBorderTopLeftRadius",rollOverItemBorderTopRightRadius:"rollOverBorderTopRightRadius",rollOverItemBorderBottomLeftRadius:"rollOverBorderBottomLeftRadius",rollOverItemBorderBottomRightRadius:"rollOverBorderBottomRightRadius",rollOverItemBorderSize:"rollOverBorderSize",rollOverItemBorderLeftSize:"rollOverBorderLeftSize",rollOverItemBorderTopSize:"rollOverBorderTopSize",
rollOverItemBorderRightSize:"rollOverBorderRightSize",rollOverItemBorderBottomSize:"rollOverBorderBottomSize",rollOverItemBorderColor:"rollOverBorderColor",rollOverItemBorderLeftColor:"rollOverBorderLeftColor",rollOverItemBorderTopColor:"rollOverBorderTopColor",rollOverItemBorderRightColor:"rollOverBorderRightColor",rollOverItemBorderBottomColor:"rollOverBorderBottomColor",rollOverItemLabelFontColor:"rollOverLabelFontColor",rollOverItemLabelFontSize:"rollOverLabelFontSize",rollOverItemLabelFontStyle:"rollOverLabelFontStyle",
rollOverItemLabelFontWeight:"rollOverLabelFontWeight",rollOverItemLabelTextDecoration:"rollOverLabelTextDecoration",rollOverItemLabelTextShadowColor:"rollOverLabelTextShadowColor",rollOverItemLabelTextShadowHorizontalLength:"rollOverLabelTextShadowHorizontalLength",rollOverItemLabelTextShadowVerticalLength:"rollOverLabelTextShadowVerticalLength",rollOverItemLabelTextShadowBlurRadius:"rollOverLabelTextShadowBlurRadius",rollOverItemLabelTextShadowOpacity:"rollOverLabelTextShadowOpacity",rollOverItemOpacity:"rollOverOpacity",
rollOverItemPaddingLeft:"rollOverPaddingLeft",rollOverItemPaddingTop:"rollOverPaddingTop",rollOverItemPaddingRight:"rollOverPaddingRight",rollOverItemPaddingBottom:"rollOverPaddingBottom",rollOverItemShadow:"rollOverShadow",rollOverItemThumbnailOpacity:"rollOverThumbnailOpacity",rollOverItemThumbnailBorderSize:"rollOverThumbnailBorderSize",rollOverItemThumbnailBorderColor:"rollOverThumbnailBorderColor",rollOverItemThumbnailShadow:"rollOverThumbnailShadow",rollOverItemThumbnailShadowHorizontalLength:"rollOverThumbnailShadowHorizontalLength",
rollOverItemThumbnailShadowVerticalLength:"rollOverThumbnailShadowVerticalLength",rollOverItemThumbnailShadowBlurRadius:"rollOverThumbnailShadowBlurRadius",rollOverItemThumbnailShadowSpread:"rollOverThumbnailShadowSpread",rollOverItemThumbnailShadowColor:"rollOverThumbnailShadowColor",rollOverItemThumbnailShadowOpacity:"rollOverThumbnailShadowOpacity",selectedItemBackgroundOpacity:"selectedBackgroundOpacity",selectedItemBackgroundColor:"selectedBackgroundColor",selectedItemBackgroundColorRatios:"selectedBackgroundColorRatios",
selectedItemBackgroundColorDirection:"selectedBackgroundColorDirection",selectedItemBorderRadius:"selectedBorderRadius",selectedItemBorderTopRadius:"selectedBorderTopRadius",selectedItemBorderBottomRadius:"selectedBorderBottomRadius",selectedItemBorderLeftRadius:"selectedBorderLeftRadius",selectedItemBorderRightRadius:"selectedBorderRightRadius",selectedItemBorderTopLeftRadius:"selectedBorderTopLeftRadius",selectedItemBorderTopRightRadius:"selectedBorderTopRightRadius",selectedItemBorderBottomLeftRadius:"selectedBorderBottomLeftRadius",
selectedItemBorderBottomRightRadius:"selectedBorderBottomRightRadius",selectedItemBorderSize:"selectedBorderSize",selectedItemBorderLeftSize:"selectedBorderLeftSize",selectedItemBorderTopSize:"selectedBorderTopSize",selectedItemBorderRightSize:"selectedBorderRightSize",selectedItemBorderBottomSize:"selectedBorderBottomSize",selectedItemBorderColor:"selectedBorderColor",selectedItemBorderLeftColor:"selectedBorderLeftColor",selectedItemBorderTopColor:"selectedBorderTopColor",selectedItemBorderRightColor:"selectedBorderRightColor",
selectedItemBorderBottomColor:"selectedBorderBottomColor",selectedItemLabelFontColor:"selectedLabelFontColor",selectedItemLabelFontSize:"selectedLabelFontSize",selectedItemLabelFontStyle:"selectedLabelFontStyle",selectedItemLabelFontWeight:"selectedLabelFontWeight",selectedItemLabelTextDecoration:"selectedLabelTextDecoration",selectedItemLabelTextShadowColor:"selectedLabelTextShadowColor",selectedItemLabelTextShadowHorizontalLength:"selectedLabelTextShadowHorizontalLength",selectedItemLabelTextShadowVerticalLength:"selectedLabelTextShadowVerticalLength",
selectedItemLabelTextShadowBlurRadius:"selectedLabelTextShadowBlurRadius",selectedItemLabelTextShadowOpacity:"selectedLabelTextShadowOpacity",selectedItemOpacity:"selectedOpacity",selectedItemPaddingLeft:"selectedPaddingLeft",selectedItemPaddingTop:"selectedPaddingTop",selectedItemPaddingRight:"selectedPaddingRight",selectedItemPaddingBottom:"selectedPaddingBottom",selectedItemShadow:"selectedShadow",selectedItemThumbnailOpacity:"selectedThumbnailOpacity",selectedItemThumbnailBorderSize:"selectedThumbnailBorderSize",
selectedItemThumbnailBorderColor:"selectedThumbnailBorderColor",selectedItemThumbnailShadow:"selectedThumbnailShadow",selectedItemThumbnailShadowHorizontalLength:"selectedThumbnailShadowHorizontalLength",selectedItemThumbnailShadowVerticalLength:"selectedThumbnailShadowVerticalLength",selectedItemThumbnailShadowBlurRadius:"selectedThumbnailShadowBlurRadius",selectedItemThumbnailShadowSpread:"selectedThumbnailShadowSpread",selectedItemThumbnailShadowColor:"selectedThumbnailShadowColor",selectedItemThumbnailShadowOpacity:"selectedThumbnailShadowOpacity",
tabIndex:"tabIndex",toolTipBackgroundColor:"toolTipBackgroundColor",toolTipBackgroundOpacity:"toolTipBackgroundOpacity",toolTipBorderRadius:"toolTipBorderRadius",toolTipBorderColor:"toolTipBorderColor",toolTipBorderSize:"toolTipBorderSize",toolTipDisplayTime:"toolTipDisplayTime",toolTipFontFamily:"toolTipFontFamily",toolTipFontSize:"toolTipFontSize",toolTipFontColor:"toolTipFontColor",toolTipFontWeight:"toolTipFontWeight",toolTipFontStyle:"toolTipFontStyle",toolTipPaddingBottom:"toolTipPaddingBottom",
toolTipPaddingLeft:"toolTipPaddingLeft",toolTipPaddingTop:"toolTipPaddingTop",toolTipPaddingRight:"toolTipPaddingRight",toolTipShadowBlurRadius:"toolTipShadowBlurRadius",toolTipShadowColor:"toolTipShadowColor",toolTipShadowHorizontalLength:"toolTipShadowHorizontalLength",toolTipShadowOpacity:"toolTipShadowOpacity",toolTipShadowSpread:"toolTipShadowSpread",toolTipShadowVerticalLength:"toolTipShadowVerticalLength",toolTipOpacity:"toolTipOpacity",toolTipTextShadowBlurRadius:"toolTipTextShadowBlurRadius",
toolTipTextShadowColor:"toolTipTextShadowColor",toolTipTextShadowHorizontalLength:"toolTipTextShadowHorizontalLength",toolTipTextShadowOpacity:"toolTipTextShadowOpacity",toolTipTextShadowVerticalLength:"toolTipTextShadowVerticalLength"};m.vQ=Object.keys(m.UF);m.wQ=Object.keys(m.VF);return m}(c)});
define("tdv/view/list/thumbgrid/ThumbnailGridItem","require exports tdv/utils tdv/binding/ChangeWatcher tdv/constants/EventName tdv/view/constants/Alignment tdv/view/constants/CreationPolicy tdv/view/constants/Cursor tdv/view/constants/LayoutMode tdv/view/constants/Position tdv/view/constants/ScaleMode tdv/view/constants/State tdv/view/containers/Container tdv/view/images/Image tdv/view/text/Label".split(" "),function(a,l,k,n,g,h,e,b,c,d,f,m,p,q,r){return function(t){function u(){var v=t.call(this)||
this;v.Gf=null;v.Xa=null;v.pG=[];v.set("ariaRole","option");v.set("autoRolledOver",!0);v.set("childrenInteractionEnabled",!1);v.set("contentOpaque",!0);v.set("creationPolicy",e.GK);v.set("cursor",b.mf);return v}O(u,t);u.prototype.Ob=function(){t.prototype.Ob.call(this);this.j("overflow","hidden");this.j("item");this.j("thumbnailUrlFunction",this.Wca);this.j("sourceProperties");this.j("labelFunction",this.Uca);this.j("labelFontFamily");this.j("labelFontColor");this.j("labelFontSize");this.j("labelFontStyle");
this.j("labelFontWeight");this.j("labelGap");this.j("labelHorizontalAlign");this.j("labelMaxWidth");this.j("labelPosition");this.j("labelTextDecoration");this.j("labelTextShadowColor");this.j("labelTextShadowHorizontalLength");this.j("labelTextShadowVerticalLength");this.j("labelTextShadowBlurRadius");this.j("labelTextShadowOpacity");this.j("thumbnailBorderRadius");this.j("thumbnailOpacity");this.j("thumbnailBorderSize");this.j("thumbnailBorderColor");this.j("thumbnailWidth");this.j("thumbnailHeight");
this.j("thumbnailMaxWidth");this.j("thumbnailMaxHeight");this.j("thumbnailShadow");this.j("thumbnailShadowHorizontalLength");this.j("thumbnailShadowVerticalLength");this.j("thumbnailShadowBlurRadius");this.j("thumbnailShadowSpread");this.j("thumbnailShadowColor");this.j("thumbnailShadowOpacity");this.D("rollOverBackgroundOpacity",m.ga,"backgroundOpacity");this.D("rollOverBackgroundColor",m.ga,"backgroundColor");this.D("rollOverBackgroundColorRatios",m.ga,"backgroundColorRatios");this.D("rollOverBackgroundColorDirection",
m.ga,"backgroundColorDirection");this.D("rollOverBorderRadius",m.ga,"borderRadius");this.D("rollOverBorderTopRadius",m.ga,"borderTopRadius");this.D("rollOverBorderBottomRadius",m.ga,"borderBottomRadius");this.D("rollOverBorderLeftRadius",m.ga,"borderLeftRadius");this.D("rollOverBorderRightRadius",m.ga,"borderRightRadius");this.D("rollOverBorderTopLeftRadius",m.ga,"borderTopLeftRadius");this.D("rollOverBorderTopRightRadius",m.ga,"borderTopRightRadius");this.D("rollOverBorderBottomLeftRadius",m.ga,
"borderBottomLeftRadius");this.D("rollOverBorderBottomRightRadius",m.ga,"borderBottomRightRadius");this.D("rollOverBorderSize",m.ga,"borderSize");this.D("rollOverBorderLeftSize",m.ga,"borderLeftSize");this.D("rollOverBorderTopSize",m.ga,"borderTopSize");this.D("rollOverBorderRightSize",m.ga,"borderRightSize");this.D("rollOverBorderBottomSize",m.ga,"borderBottomSize");this.D("rollOverBorderColor",m.ga,"borderColor");this.D("rollOverBorderLeftColor",m.ga,"borderLeftColor");this.D("rollOverBorderTopColor",
m.ga,"borderTopColor");this.D("rollOverBorderRightColor",m.ga,"borderRightColor");this.D("rollOverBorderBottomColor",m.ga,"borderBottomColor");this.D("rollOverLabelFontColor",m.ga,"labelFontColor");this.D("rollOverLabelFontSize",m.ga,"labelFontSize");this.D("rollOverLabelFontStyle",m.ga,"labelFontStyle");this.D("rollOverLabelFontWeight",m.ga,"labelFontWeight");this.D("rollOverLabelTextDecoration",m.ga,"labelTextDecoration");this.D("rollOverLabelTextShadowColor",m.ga,"labelTextShadowColor");this.D("rollOverLabelTextShadowHorizontalLength",
m.ga,"labelTextShadowHorizontalLength");this.D("rollOverLabelTextShadowVerticalLength",m.ga,"labelTextShadowVerticalLength");this.D("rollOverLabelTextShadowBlurRadius",m.ga,"labelTextShadowBlurRadius");this.D("rollOverLabelTextShadowOpacity",m.ga,"labelTextShadowOpacity");this.D("rollOverOpacity",m.ga,"opacity");this.D("rollOverPaddingLeft",m.ga,"paddingLeft");this.D("rollOverPaddingTop",m.ga,"paddingTop");this.D("rollOverPaddingRight",m.ga,"paddingRight");this.D("rollOverPaddingBottom",m.ga,"paddingBottom");
this.D("rollOverShadow",m.ga,"shadow");this.D("rollOverThumbnailOpacity",m.ga,"thumbnailOpacity");this.D("rollOverThumbnailBorderSize",m.ga,"thumbnailBorderSize");this.D("rollOverThumbnailBorderColor",m.ga,"thumbnailBorderColor");this.D("rollOverThumbnailShadow",m.ga,"thumbnailShadow");this.D("rollOverThumbnailShadowHorizontalLength",m.ga,"thumbnailShadowHorizontalLength");this.D("rollOverThumbnailShadowVerticalLength",m.ga,"thumbnailShadowVerticalLength");this.D("rollOverThumbnailShadowBlurRadius",
m.ga,"thumbnailShadowBlurRadius");this.D("rollOverThumbnailShadowSpread",m.ga,"thumbnailShadowSpread");this.D("rollOverThumbnailShadowColor",m.ga,"thumbnailShadowColor");this.D("rollOverThumbnailShadowOpacity",m.ga,"thumbnailShadowOpacity");this.D("selectedBackgroundOpacity",m.pa,"backgroundOpacity");this.D("selectedBackgroundColor",m.pa,"backgroundColor");this.D("selectedBackgroundColorRatios",m.pa,"backgroundColorRatios");this.D("selectedBackgroundColorDirection",m.pa,"backgroundColorDirection");
this.D("selectedBorderRadius",m.pa,"borderRadius");this.D("selectedBorderTopRadius",m.pa,"borderTopRadius");this.D("selectedBorderBottomRadius",m.pa,"borderBottomRadius");this.D("selectedBorderLeftRadius",m.pa,"borderLeftRadius");this.D("selectedBorderRightRadius",m.pa,"borderRightRadius");this.D("selectedBorderTopLeftRadius",m.pa,"borderTopLeftRadius");this.D("selectedBorderTopRightRadius",m.pa,"borderTopRightRadius");this.D("selectedBorderBottomLeftRadius",m.pa,"borderBottomLeftRadius");this.D("selectedBorderBottomRightRadius",
m.pa,"borderBottomRightRadius");this.D("selectedBorderSize",m.pa,"borderSize");this.D("selectedBorderLeftSize",m.pa,"borderLeftSize");this.D("selectedBorderTopSize",m.pa,"borderTopSize");this.D("selectedBorderRightSize",m.pa,"borderRightSize");this.D("selectedBorderBottomSize",m.pa,"borderBottomSize");this.D("selectedBorderColor",m.pa,"borderColor");this.D("selectedBorderLeftColor",m.pa,"borderLeftColor");this.D("selectedBorderTopColor",m.pa,"borderTopColor");this.D("selectedBorderRightColor",m.pa,
"borderRightColor");this.D("selectedBorderBottomColor",m.pa,"borderBottomColor");this.D("selectedLabelFontColor",m.pa,"labelFontColor");this.D("selectedLabelFontSize",m.pa,"labelFontSize");this.D("selectedLabelFontStyle",m.pa,"labelFontStyle");this.D("selectedLabelFontWeight",m.pa,"labelFontWeight");this.D("selectedLabelTextDecoration",m.pa,"labelTextDecoration");this.D("selectedLabelTextShadowColor",m.pa,"labelTextShadowColor");this.D("selectedLabelTextShadowHorizontalLength",m.pa,"labelTextShadowHorizontalLength");
this.D("selectedLabelTextShadowVerticalLength",m.pa,"labelTextShadowVerticalLength");this.D("selectedLabelTextShadowBlurRadius",m.pa,"labelTextShadowBlurRadius");this.D("selectedLabelTextShadowOpacity",m.pa,"labelTextShadowOpacity");this.D("selectedOpacity",m.pa,"opacity");this.D("selectedPaddingLeft",m.pa,"paddingLeft");this.D("selectedPaddingTop",m.pa,"paddingTop");this.D("selectedPaddingRight",m.pa,"paddingRight");this.D("selectedPaddingBottom",m.pa,"paddingBottom");this.D("selectedShadow",m.pa,
"shadow");this.D("selectedThumbnailOpacity",m.pa,"thumbnailOpacity");this.D("selectedThumbnailBorderSize",m.pa,"thumbnailBorderSize");this.D("selectedThumbnailBorderColor",m.pa,"thumbnailBorderColor");this.D("selectedThumbnailShadow",m.pa,"thumbnailShadow");this.D("selectedThumbnailShadowHorizontalLength",m.pa,"thumbnailShadowHorizontalLength");this.D("selectedThumbnailShadowVerticalLength",m.pa,"thumbnailShadowVerticalLength");this.D("selectedThumbnailShadowBlurRadius",m.pa,"thumbnailShadowBlurRadius");
this.D("selectedThumbnailShadowSpread",m.pa,"thumbnailShadowSpread");this.D("selectedThumbnailShadowColor",m.pa,"thumbnailShadowColor");this.D("selectedThumbnailShadowOpacity",m.pa,"thumbnailShadowOpacity")};u.prototype.kY=function(v){this.hU(v)};u.prototype.Ib=function(){t.prototype.Ib.call(this);this.Gf||(this.Gf=new q,this.mb(this.Gf),this.Gf.set("horizontalAlign",h.Ye),this.Gf.set("verticalAlign",h.Xd),this.Gf.bind(g.ia,this.yja,this,!1));this.Xa||(this.Xa=new r,this.mb(this.Xa))};u.prototype.Wca=
function(v){if(k.qA(v))return v;if(v&&v.Gqa)return v.Gqa};u.prototype.Uca=function(v){if(v&&v.label)return v.label};u.prototype.Kx=function(){return this.Xa&&this.Xa.get("text")||t.prototype.Kx.call(this)};u.prototype.jb=function(){if(this.S("sourceProperties")||this.S("item")){for(;this.pG.length;)this.pG.pop().UE();var v=this.G("sourceProperties"),w=this.G("item");v&&w&&v.forEach(function(x){this.pG.push(n.Sw(w,x,this.Wga,this,!0))}.bind(this))}if(this.S("sourceProperties")||this.S("item")||this.S("tooltipFunction"))v=
this.G("item"),v=this.G("tooltipFunction")(v),this.set("toolTip",v);if(this.S("sourceProperties")||this.S("item")||this.S("thumbnailUrlFunction"))v=this.G("item"),(v=this.G("thumbnailUrlFunction")(v))?this.Gf.get("url")!=v&&this.Gf.wa({url:v,visible:!0,opacity:.5}):this.Gf.wa({url:void 0,visible:!1}),this.$("thumbnailUrlFunction");if(this.S("sourceProperties")||this.S("item")||this.S("labelFunction"))v=this.G("item"),v=this.G("labelFunction")(v),this.Xa.wa({text:v,visible:v?!0:!1}),this.$("labelFunction");
this.$("item");this.$("sourceProperties");if(this.S("labelPosition")||this.S("listLayout")||this.S("thumbnailWidth")||this.S("thumbnailHeight")){var y=this;v=function(x,z){x=y.G(x);return x!==void 0?x:z};switch(this.G("labelPosition")){case d.eb:case d.Db:this.set("layout",c.bi);this.Xa.set("width","100%");this.Gf.wa({height:v("thumbnailHeight","100%"),width:v("thumbnailWidth"),scaleMode:v("thumbnailScaleMode",f.Qk)});break;default:this.set("layout",c.ck),this.Xa.set("width","100%"),this.Gf.wa({height:v("thumbnailHeight",
"100%"),width:v("thumbnailWidth","100%"),scaleMode:v("thumbnailScaleMode",f.Qk)})}switch(this.G("labelPosition")){case d.eb:case d.Tc:this.gr(this.Xa,0);break;default:this.gr(this.Xa,1)}this.$("labelPosition")}this.Qc(u.Vaa,u.Cta,[this],!0,!0);this.Qc(u.Xaa,u.Fta,[this.Gf],!0,!0);this.Qc(u.Waa,u.Eta,[this.Xa],!0,!0);t.prototype.jb.call(this)};u.prototype.Wga=function(){this.lD("item")};u.prototype.bI=function(v){t.prototype.bI.call(this,v)};u.prototype.yja=function(){this.Gf.set("opacity",1)};u.Cta=
{labelGap:"gap"};u.Vaa=Object.keys(u.Cta);u.Eta={labelFontFamily:"fontFamily",labelFontColor:"fontColor",labelFontSize:"fontSize",labelFontStyle:"fontStyle",labelFontWeight:"fontWeight",labelHorizontalAlign:"horizontalAlign",labelMaxWidth:"maxWidth",labelTextDecoration:"textDecoration",labelTextShadowColor:"textShadowColor",labelTextShadowHorizontalLength:"textShadowHorizontalLength",labelTextShadowVerticalLength:"textShadowVerticalLength",labelTextShadowBlurRadius:"textShadowBlurRadius",labelTextShadowOpacity:"textShadowOpacity"};
u.Waa=Object.keys(u.Eta);u.Fta={thumbnailMaxWidth:"maxWidth",thumbnailMaxHeight:"maxHeight",thumbnailBorderRadius:"borderRadius",thumbnailOpacity:"opacity",thumbnailBorderSize:"borderSize",thumbnailBorderColor:"borderColor",thumbnailShadow:"shadow",thumbnailShadowHorizontalLength:"shadowHorizontalLength",thumbnailShadowVerticalLength:"shadowVerticalLength",thumbnailShadowBlurRadius:"shadowBlurRadius",thumbnailShadowSpread:"shadowSpread",thumbnailShadowColor:"shadowColor",thumbnailShadowOpacity:"shadowOpacity"};
u.Xaa=Object.keys(u.Fta);return u}(p)});
define("tdv/view/list/thumbgrid/ThumbnailGrid","require exports tdv/events/Event tdv/view/constants/Alignment tdv/constants/EventName tdv/view/constants/LayoutMode tdv/view/constants/OverflowPolicy tdv/view/constants/Position tdv/view/containers/Container tdv/view/list/thumbgrid/ThumbnailGridItem".split(" "),function(a,l,k,n,g,h,e,b,c,d){return function(f){function m(){var p=f.call(this)||this;p.An=!1;p.set("contentOpaque",!0);p.set("ariaRole","listbox");return p}O(m,f);m.prototype.Ob=function(){f.prototype.Ob.call(this);
this.j("layout",h.uB);this.j("selectedIndex",-1);this.j("items",[]);this.j("overflow",e.Pr);this.j("itemHorizontalAlign",n.Ye);this.j("itemLabelFontFamily");this.j("itemLabelPosition",b.Fc);this.j("itemLabelFunction");this.j("itemLabelMaxWidth");this.j("itemLabelGap");this.j("itemLabelHorizontalAlign",n.Ye);this.j("itemSourceProperties");this.j("itemThumbnailBorderRadius");this.j("itemThumbnailScaleMode");this.j("itemThumbnailWidth");this.j("itemThumbnailHeight");this.j("itemThumbnailMaxWidth");this.j("itemThumbnailMaxHeight");
this.j("itemThumbnailUrlFunction");this.j("itemTooltipFunction");this.j("itemVerticalAlign",n.Xd);this.j("itemBackgroundOpacity");this.j("itemBackgroundColor");this.j("itemBackgroundColorRatios");this.j("itemBackgroundColorDirection");this.j("itemBorderRadius");this.j("itemBorderTopRadius");this.j("itemBorderBottomRadius");this.j("itemBorderLeftRadius");this.j("itemBorderRightRadius");this.j("itemBorderTopLeftRadius");this.j("itemBorderTopRightRadius");this.j("itemBorderBottomLeftRadius");this.j("itemBorderBottomRightRadius");
this.j("itemBorderSize");this.j("itemBorderLeftSize");this.j("itemBorderTopSize");this.j("itemBorderRightSize");this.j("itemBorderBottomSize");this.j("itemBorderColor");this.j("itemBorderLeftColor");this.j("itemBorderTopColor");this.j("itemBorderRightColor");this.j("itemBorderBottomColor");this.j("itemLabelFontColor");this.j("itemLabelFontSize");this.j("itemLabelFontStyle");this.j("itemLabelFontWeight");this.j("itemLabelMaxWidth");this.j("itemLabelTextDecoration");this.j("itemLabelTextShadowColor");
this.j("itemLabelTextShadowHorizontalLength");this.j("itemLabelTextShadowVerticalLength");this.j("itemLabelTextShadowBlurRadius");this.j("itemLabelTextShadowOpacity");this.j("itemOpacity");this.j("itemPaddingLeft");this.j("itemPaddingTop");this.j("itemPaddingRight");this.j("itemPaddingBottom");this.j("itemShadow");this.j("itemThumbnailOpacity");this.j("itemThumbnailBorderSize");this.j("itemThumbnailBorderColor");this.j("itemThumbnailShadow");this.j("itemThumbnailShadowHorizontalLength");this.j("itemThumbnailShadowVerticalLength");
this.j("itemThumbnailShadowBlurRadius");this.j("itemThumbnailShadowSpread");this.j("itemThumbnailShadowColor");this.j("itemThumbnailShadowOpacity");this.j("rollOverItemBackgroundOpacity");this.j("rollOverItemBackgroundColor");this.j("rollOverItemBackgroundColorRatios");this.j("rollOverItemBackgroundColorDirection");this.j("rollOverItemBorderRadius");this.j("rollOverItemBorderTopRadius");this.j("rollOverItemBorderBottomRadius");this.j("rollOverItemBorderLeftRadius");this.j("rollOverItemBorderRightRadius");
this.j("rollOverItemBorderTopLeftRadius");this.j("rollOverItemBorderTopRightRadius");this.j("rollOverItemBorderBottomLeftRadius");this.j("rollOverItemBorderBottomRightRadius");this.j("rollOverItemBorderSize");this.j("rollOverItemBorderLeftSize");this.j("rollOverItemBorderTopSize");this.j("rollOverItemBorderRightSize");this.j("rollOverItemBorderBottomSize");this.j("rollOverItemBorderColor");this.j("rollOverItemBorderLeftColor");this.j("rollOverItemBorderTopColor");this.j("rollOverItemBorderRightColor");
this.j("rollOverItemBorderBottomColor");this.j("rollOverItemLabelFontSize");this.j("rollOverItemLabelFontStyle");this.j("rollOverItemLabelFontWeight");this.j("rollOverItemLabelTextDecoration");this.j("rollOverItemLabelTextShadowColor");this.j("rollOverItemLabelTextShadowHorizontalLength");this.j("rollOverItemLabelTextShadowVerticalLength");this.j("rollOverItemLabelTextShadowBlurRadius");this.j("rollOverItemLabelTextShadowOpacity");this.j("rollOverItemOpacity");this.j("rollOverItemPaddingLeft");this.j("rollOverItemPaddingTop");
this.j("rollOverItemPaddingRight");this.j("rollOverItemPaddingBottom");this.j("rollOverItemShadow");this.j("rollOverItemThumbnailOpacity");this.j("rollOverItemThumbnailBorderSize");this.j("rollOverItemThumbnailBorderColor");this.j("rollOverItemThumbnailShadow");this.j("rollOverItemThumbnailShadowHorizontalLength");this.j("rollOverItemThumbnailShadowVerticalLength");this.j("rollOverItemThumbnailShadowBlurRadius");this.j("rollOverItemThumbnailShadowSpread");this.j("rollOverItemThumbnailShadowColor");
this.j("rollOverItemThumbnailShadowOpacity");this.j("selectedItemBackgroundOpacity");this.j("selectedItemBackgroundColor");this.j("selectedItemBackgroundColorRatios");this.j("selectedItemBackgroundColorDirection");this.j("selectedItemBorderRadius");this.j("selectedItemBorderTopRadius");this.j("selectedItemBorderBottomRadius");this.j("selectedItemBorderLeftRadius");this.j("selectedItemBorderRightRadius");this.j("selectedItemBorderTopLeftRadius");this.j("selectedItemBorderTopRightRadius");this.j("selectedItemBorderBottomLeftRadius");
this.j("selectedItemBorderBottomRightRadius");this.j("selectedItemBorderSize");this.j("selectedItemBorderLeftSize");this.j("selectedItemBorderTopSize");this.j("selectedItemBorderRightSize");this.j("selectedItemBorderBottomSize");this.j("selectedItemBorderColor");this.j("selectedItemBorderLeftColor");this.j("selectedItemBorderTopColor");this.j("selectedItemBorderRightColor");this.j("selectedItemBorderBottomColor");this.j("selectedItemLabelFontSize");this.j("selectedItemLabelFontStyle");this.j("selectedItemLabelFontWeight");
this.j("selectedItemLabelTextDecoration");this.j("selectedItemLabelTextShadowColor");this.j("selectedItemLabelTextShadowHorizontalLength");this.j("selectedItemLabelTextShadowVerticalLength");this.j("selectedItemLabelTextShadowBlurRadius");this.j("selectedItemLabelTextShadowOpacity");this.j("selectedItemOpacity");this.j("selectedItemPaddingLeft");this.j("selectedItemPaddingTop");this.j("selectedItemPaddingRight");this.j("selectedItemPaddingBottom");this.j("selectedItemShadow");this.j("selectedItemThumbnailOpacity");
this.j("selectedItemThumbnailBorderSize");this.j("selectedItemThumbnailBorderColor");this.j("selectedItemThumbnailShadow");this.j("selectedItemThumbnailShadowHorizontalLength");this.j("selectedItemThumbnailShadowVerticalLength");this.j("selectedItemThumbnailShadowBlurRadius");this.j("selectedItemThumbnailShadowSpread");this.j("selectedItemThumbnailShadowColor");this.j("selectedItemThumbnailShadowOpacity")};m.prototype.YR=function(p){this.An=!0;this.set("selectedIndex",this.pea(p.source))};m.prototype.pea=
function(p){for(var q=this.Cb(),r=0;r<q.length;r++)if(q[r]==p)return r;return-1};m.prototype.jb=function(){this.S("layout")&&this.G("layout")!=h.uB&&this.set("layout",h.uB);var p=!1;if(this.S("items")){p=!0;var q=this.G("items")||[],r=this.Cb();if(r.length<q.length){for(var t=r.length;t<q.length;t++)r=new d,r.bind(g.la,this.YR,this,!1),this.Qc(m.vQ,m.UF,[r],!1,!1),this.Qc(m.wQ,m.VF,[r],!1,!1),this.mb(r);r=this.Cb()}if(r.length>q.length){for(t=q.length;t<r.length;t++){var u=r[t];u.h(g.la,this.YR,this);
this.removeChild(u)}r=this.Cb()}for(t=0;t<q.length;t++)r[t].set("item",q[t]);this.$("items")}if(this.S("selectedIndex")||p){q=this.Cb();p=Math.min(q.length-1,Math.max(-1,this.G("selectedIndex")));this.set("selectedIndex",p);for(t=0;t<q.length;t++)q[t].kY(t==p);this.$("selectedIndex");this.An&&(this.An=!1,this.m(new k(g.V)))}this.Qc(m.vQ,m.UF,this.Cb(),!0,!1);this.Qc(m.wQ,m.VF,this.Cb(),!0,!0);f.prototype.jb.call(this)};m.UF={layout:"listLayout",shadowHorizontalLength:"shadowHorizontalLength",shadowVerticalLength:"shadowVerticalLength",
shadowBlurRadius:"shadowBlurRadius",shadowSpread:"shadowSpread",shadowOpacity:"shadowOpacity",shadowColor:"shadowColor"};m.VF={itemHorizontalAlign:"horizontalAlign",itemLabelFunction:"labelFunction",itemLabelFontFamily:"labelFontFamily",itemLabelGap:"labelGap",itemLabelHorizontalAlign:"labelHorizontalAlign",itemLabelMaxWidth:"labelMaxWidth",itemLabelPosition:"labelPosition",itemSourceProperties:"sourceProperties",itemThumbnailBorderRadius:"thumbnailBorderRadius",itemThumbnailScaleMode:"thumbnailScaleMode",
itemThumbnailHeight:"thumbnailHeight",itemThumbnailWidth:"thumbnailWidth",itemThumbnailMaxHeight:"thumbnailMaxHeight",itemThumbnailMaxWidth:"thumbnailMaxWidth",itemThumbnailUrlFunction:"thumbnailUrlFunction",itemTooltipFunction:"tooltipFunction",itemVerticalAlign:"verticalAlign",itemBackgroundOpacity:"backgroundOpacity",itemBackgroundColor:"backgroundColor",itemBackgroundColorRatios:"backgroundColorRatios",itemBackgroundColorDirection:"backgroundColorDirection",itemBorderRadius:"borderRadius",itemBorderTopRadius:"borderTopRadius",
itemBorderBottomRadius:"borderBottomRadius",itemBorderLeftRadius:"borderLeftRadius",itemBorderRightRadius:"borderRightRadius",itemBorderTopLeftRadius:"borderTopLeftRadius",itemBorderTopRightRadius:"borderTopRightRadius",itemBorderBottomLeftRadius:"borderBottomLeftRadius",itemBorderBottomRightRadius:"borderBottomRightRadius",itemBorderSize:"borderSize",itemBorderLeftSize:"borderLeftSize",itemBorderTopSize:"borderTopSize",itemBorderRightSize:"borderRightSize",itemBorderBottomSize:"borderBottomSize",
itemBorderColor:"borderColor",itemBorderLeftColor:"borderLeftColor",itemBorderTopColor:"borderTopColor",itemBorderRightColor:"borderRightColor",itemBorderBottomColor:"borderBottomColor",itemLabelFontColor:"labelFontColor",itemLabelFontSize:"labelFontSize",itemLabelFontStyle:"labelFontStyle",itemLabelFontWeight:"labelFontWeight",itemLabelTextDecoration:"labelTextDecoration",itemLabelTextShadowColor:"labelTextShadowColor",itemLabelTextShadowHorizontalLength:"labelTextShadowHorizontalLength",itemLabelTextShadowVerticalLength:"labelTextShadowVerticalLength",
itemLabelTextShadowBlurRadius:"labelTextShadowBlurRadius",itemLabelTextShadowOpacity:"labelTextShadowOpacity",itemOpacity:"opacity",itemPaddingLeft:"paddingLeft",itemPaddingTop:"paddingTop",itemPaddingRight:"paddingRight",itemPaddingBottom:"paddingBottom",itemShadow:"shadow",itemThumbnailOpacity:"thumbnailOpacity",itemThumbnailBorderSize:"thumbnailBorderSize",itemThumbnailBorderColor:"thumbnailBorderColor",itemThumbnailShadow:"thumbnailShadow",itemThumbnailShadowHorizontalLength:"thumbnailShadowHorizontalLength",
itemThumbnailShadowVerticalLength:"thumbnailShadowVerticalLength",itemThumbnailShadowBlurRadius:"thumbnailShadowBlurRadius",itemThumbnailShadowSpread:"thumbnailShadowSpread",itemThumbnailShadowColor:"thumbnailShadowColor",itemThumbnailShadowOpacity:"thumbnailShadowOpacity",rollOverItemBackgroundOpacity:"rollOverBackgroundOpacity",rollOverItemBackgroundColor:"rollOverBackgroundColor",rollOverItemBackgroundColorRatios:"rollOverBackgroundColorRatios",rollOverItemBackgroundColorDirection:"rollOverBackgroundColorDirection",
rollOverItemBorderRadius:"rollOverBorderRadius",rollOverItemBorderTopRadius:"rollOverBorderTopRadius",rollOverItemBorderBottomRadius:"rollOverBorderBottomRadius",rollOverItemBorderLeftRadius:"rollOverBorderLeftRadius",rollOverItemBorderRightRadius:"rollOverBorderRightRadius",rollOverItemBorderTopLeftRadius:"rollOverBorderTopLeftRadius",rollOverItemBorderTopRightRadius:"rollOverBorderTopRightRadius",rollOverItemBorderBottomLeftRadius:"rollOverBorderBottomLeftRadius",rollOverItemBorderBottomRightRadius:"rollOverBorderBottomRightRadius",
rollOverItemBorderSize:"rollOverBorderSize",rollOverItemBorderLeftSize:"rollOverBorderLeftSize",rollOverItemBorderTopSize:"rollOverBorderTopSize",rollOverItemBorderRightSize:"rollOverBorderRightSize",rollOverItemBorderBottomSize:"rollOverBorderBottomSize",rollOverItemBorderColor:"rollOverBorderColor",rollOverItemBorderLeftColor:"rollOverBorderLeftColor",rollOverItemBorderTopColor:"rollOverBorderTopColor",rollOverItemBorderRightColor:"rollOverBorderRightColor",rollOverItemBorderBottomColor:"rollOverBorderBottomColor",
rollOverItemLabelFontColor:"rollOverLabelFontColor",rollOverItemLabelFontSize:"rollOverLabelFontSize",rollOverItemLabelFontStyle:"rollOverLabelFontStyle",rollOverItemLabelFontWeight:"rollOverLabelFontWeight",rollOverItemLabelTextDecoration:"rollOverLabelTextDecoration",rollOverItemLabelTextShadowColor:"rollOverLabelTextShadowColor",rollOverItemLabelTextShadowHorizontalLength:"rollOverLabelTextShadowHorizontalLength",rollOverItemLabelTextShadowVerticalLength:"rollOverLabelTextShadowVerticalLength",
rollOverItemLabelTextShadowBlurRadius:"rollOverLabelTextShadowBlurRadius",rollOverItemLabelTextShadowOpacity:"rollOverLabelTextShadowOpacity",rollOverItemOpacity:"rollOverOpacity",rollOverItemPaddingLeft:"rollOverPaddingLeft",rollOverItemPaddingTop:"rollOverPaddingTop",rollOverItemPaddingRight:"rollOverPaddingRight",rollOverItemPaddingBottom:"rollOverPaddingBottom",rollOverItemShadow:"rollOverShadow",rollOverItemThumbnailOpacity:"rollOverThumbnailOpacity",rollOverItemThumbnailBorderSize:"rollOverThumbnailBorderSize",
rollOverItemThumbnailBorderColor:"rollOverThumbnailBorderColor",rollOverItemThumbnailShadow:"rollOverThumbnailShadow",rollOverItemThumbnailShadowHorizontalLength:"rollOverThumbnailShadowHorizontalLength",rollOverItemThumbnailShadowVerticalLength:"rollOverThumbnailShadowVerticalLength",rollOverItemThumbnailShadowBlurRadius:"rollOverThumbnailShadowBlurRadius",rollOverItemThumbnailShadowSpread:"rollOverThumbnailShadowSpread",rollOverItemThumbnailShadowColor:"rollOverThumbnailShadowColor",rollOverItemThumbnailShadowOpacity:"rollOverThumbnailShadowOpacity",
selectedItemBackgroundOpacity:"selectedBackgroundOpacity",selectedItemBackgroundColor:"selectedBackgroundColor",selectedItemBackgroundColorRatios:"selectedBackgroundColorRatios",selectedItemBackgroundColorDirection:"selectedBackgroundColorDirection",selectedItemBorderRadius:"selectedBorderRadius",selectedItemBorderTopRadius:"selectedBorderTopRadius",selectedItemBorderBottomRadius:"selectedBorderBottomRadius",selectedItemBorderLeftRadius:"selectedBorderLeftRadius",selectedItemBorderRightRadius:"selectedBorderRightRadius",
selectedItemBorderTopLeftRadius:"selectedBorderTopLeftRadius",selectedItemBorderTopRightRadius:"selectedBorderTopRightRadius",selectedItemBorderBottomLeftRadius:"selectedBorderBottomLeftRadius",selectedItemBorderBottomRightRadius:"selectedBorderBottomRightRadius",selectedItemBorderSize:"selectedBorderSize",selectedItemBorderLeftSize:"selectedBorderLeftSize",selectedItemBorderTopSize:"selectedBorderTopSize",selectedItemBorderRightSize:"selectedBorderRightSize",selectedItemBorderBottomSize:"selectedBorderBottomSize",
selectedItemBorderColor:"selectedBorderColor",selectedItemBorderLeftColor:"selectedBorderLeftColor",selectedItemBorderTopColor:"selectedBorderTopColor",selectedItemBorderRightColor:"selectedBorderRightColor",selectedItemBorderBottomColor:"selectedBorderBottomColor",selectedItemLabelFontColor:"selectedLabelFontColor",selectedItemLabelFontSize:"selectedLabelFontSize",selectedItemLabelFontStyle:"selectedLabelFontStyle",selectedItemLabelFontWeight:"selectedLabelFontWeight",selectedItemLabelTextDecoration:"selectedLabelTextDecoration",
selectedItemLabelTextShadowColor:"selectedLabelTextShadowColor",selectedItemLabelTextShadowHorizontalLength:"selectedLabelTextShadowHorizontalLength",selectedItemLabelTextShadowVerticalLength:"selectedLabelTextShadowVerticalLength",selectedItemLabelTextShadowBlurRadius:"selectedLabelTextShadowBlurRadius",selectedItemLabelTextShadowOpacity:"selectedLabelTextShadowOpacity",selectedItemOpacity:"selectedOpacity",selectedItemPaddingLeft:"selectedPaddingLeft",selectedItemPaddingTop:"selectedPaddingTop",
selectedItemPaddingRight:"selectedPaddingRight",selectedItemPaddingBottom:"selectedPaddingBottom",selectedItemShadow:"selectedShadow",selectedItemThumbnailOpacity:"selectedThumbnailOpacity",selectedItemThumbnailBorderSize:"selectedThumbnailBorderSize",selectedItemThumbnailBorderColor:"selectedThumbnailBorderColor",selectedItemThumbnailShadow:"selectedThumbnailShadow",selectedItemThumbnailShadowHorizontalLength:"selectedThumbnailShadowHorizontalLength",selectedItemThumbnailShadowVerticalLength:"selectedThumbnailShadowVerticalLength",
selectedItemThumbnailShadowBlurRadius:"selectedThumbnailShadowBlurRadius",selectedItemThumbnailShadowSpread:"selectedThumbnailShadowSpread",selectedItemThumbnailShadowColor:"selectedThumbnailShadowColor",selectedItemThumbnailShadowOpacity:"selectedThumbnailShadowOpacity",tabIndex:"tabIndex",toolTipBackgroundColor:"toolTipBackgroundColor",toolTipBackgroundOpacity:"toolTipBackgroundOpacity",toolTipBorderRadius:"toolTipBorderRadius",toolTipBorderColor:"toolTipBorderColor",toolTipBorderSize:"toolTipBorderSize",
toolTipDisplayTime:"toolTipDisplayTime",toolTipFontFamily:"toolTipFontFamily",toolTipFontSize:"toolTipFontSize",toolTipFontColor:"toolTipFontColor",toolTipFontWeight:"toolTipFontWeight",toolTipFontStyle:"toolTipFontStyle",toolTipPaddingBottom:"toolTipPaddingBottom",toolTipPaddingLeft:"toolTipPaddingLeft",toolTipPaddingTop:"toolTipPaddingTop",toolTipPaddingRight:"toolTipPaddingRight",toolTipShadowBlurRadius:"toolTipShadowBlurRadius",toolTipShadowColor:"toolTipShadowColor",toolTipShadowHorizontalLength:"toolTipShadowHorizontalLength",
toolTipShadowOpacity:"toolTipShadowOpacity",toolTipShadowSpread:"toolTipShadowSpread",toolTipShadowVerticalLength:"toolTipShadowVerticalLength",toolTipOpacity:"toolTipOpacity",toolTipTextShadowBlurRadius:"toolTipTextShadowBlurRadius",toolTipTextShadowColor:"toolTipTextShadowColor",toolTipTextShadowHorizontalLength:"toolTipTextShadowHorizontalLength",toolTipTextShadowOpacity:"toolTipTextShadowOpacity",toolTipTextShadowVerticalLength:"toolTipTextShadowVerticalLength"};m.vQ=Object.keys(m.UF);m.wQ=Object.keys(m.VF);
return m}(c)});
define("tdv/view/core/eventmanager/mousetouch/MouseTouchEventManagerFactory","require exports tdv/view/core/eventmanager/mousetouch/CloseButtonMouseTouchEventManager tdv/view/core/eventmanager/mousetouch/DropDownMouseTouchEventManager tdv/view/core/eventmanager/mousetouch/MouseTouchEventManager tdv/view/core/eventmanager/mousetouch/HTMLMouseTouchEventManager tdv/view/core/eventmanager/mousetouch/IconButtonMouseTouchEventManager tdv/view/core/eventmanager/mousetouch/ScrollableContainerMouseTouchEventManager tdv/view/core/eventmanager/mousetouch/ThumbnailListMouseTouchEventManager tdv/view/core/eventmanager/mousetouch/ThumbnailGridMouseTouchEventManager tdv/view/buttons/CloseButton tdv/view/list/dropdown/DropDown tdv/view/core/UIComponent tdv/view/html/HTML tdv/view/buttons/IconButton tdv/view/containers/ScrollableContainer tdv/view/list/thumblist/ThumbnailList tdv/view/list/thumbgrid/ThumbnailGrid".split(" "),function(a,
l,k,n,g,h,e,b,c,d,f,m,p,q,r,t,u,v){return function(){function w(){}w.prototype.create=function(y){if(y instanceof m)return new n(y);if(y instanceof v)return new d(y);if(y instanceof u)return new c(y);if(y instanceof f)return new k(y);if(y instanceof r)return new e(y);if(y instanceof q)return new h(y);if(y instanceof t)return new b(y);if(y instanceof p)return new g(y);throw Error("Invalid UI instance");};w.bJ=function(){w.Ll||(w.Ll=new w);return w.Ll};return w}()});
define("tdv/view/containers/Application","require exports tdv/utils tdv/constants/EventName tdv/view/containers/Container tdv/view/core/ContextMenu tdv/view/core/Cursors tdv/view/core/ToolTip tdv/view/lifecycle/LifeCycleManager tdv/view/util/Fullscreen tdv/player/view/util/Device tdv/view/util/UserInitiatedAction tdv/view/util/KeyboardControl tdv/view/events/MouseEvent tdv/view/core/visuals/dom/DOMVisualsFactory tdv/view/core/eventmanager/mousetouch/MouseTouchEventManagerFactory".split(" "),function(a,
l,k,n,g,h,e,b,c,d,f,m,p,q,r,t){return function(u){function v(w,y){var x=u.call(this)||this;x.j0=x.j0.bind(x);x.i0=x.i0.bind(x);x.F1=x.F1.bind(x);x.eM=new c;x.Tca=new e(x);x.ao(x,r.bJ(),t.bJ(),[]);x.df("Application");x.Oc=w;x.J4=y;x.Oc.style.overflow="hidden";x.Oc.style.userSelect="none";x.Oc.style["-webkit-user-select"]="none";x.Oc.style.touchAction="none";x.Oc.style.visibility="visible";x.Oc.style["-webkit-tap-highlight-color"]="rgba(255, 255, 255, 0)";x.Jd=document.createElement("div");x.Jd.style.position=
"absolute";x.Jd.style.left="0";x.Jd.style.top="0";x.Jd.style.right="0";x.Jd.style.bottom="0";x.Jd.style.width="auto";x.Jd.style.height="auto";x.Jd.style.margin="0";x.Oc.appendChild(x.Jd);x.Jd.appendChild(x.va().bc());x.Ng=void 0;x.Mg=void 0;x.d1a=10;x.PWa=500;x.UT=null;x.hc=new b(x);x.va().bc().appendChild(x.hc.bc());x.n_=new h(x,x.Lwa.bind(x));x.n_.bind(n.Qr,m.sr(x.F1),x,!0);x.mga=!0;x.set("contentOpaque",!0);x.Rx=null;x.RQ=[];document.addEventListener("mousemove",x.i0);window.addEventListener("mouseout",
x.i0);x.WVa();x.R4=0;x.Q4=0;x.TC=1;try{x.R4=window.top.innerWidth,x.Q4=window.top.innerHeight,x.Hea=!0}catch(z){x.Hea=!1}x.xFa();x.mk=new d(w);x.mk.bind(n.V,function(){this.Xda(this.mk.enabled())},x);p.Va();return x}O(v,u);v.prototype.start=function(){this.Ws||(this.Ws=!0,this.m(n.Np))};v.prototype.Ena=function(){return this.Ws};v.prototype.va=function(){return u.prototype.va.call(this)};v.prototype.xFa=function(){this.Hea&&!d.enabled()&&(this.R4=window.top.innerWidth,this.Q4=window.top.innerHeight)};
v.prototype.clear=function(){var w,y;this.BE(null);this.XDa();this.XYa();this.eM.clear();var x=this.va().bc();(w=x.parentElement)===null||w===void 0||w.removeChild(x);(y=this.Jd.parentElement)===null||y===void 0||y.removeChild(this.Jd);this.Tca=null;this.mk.Nqa();this.mk=null;this.n_&&(this.n_.clear(),this.n_=null)};v.prototype.vib=function(w){this.mga=w};v.prototype.Xda=function(w){w?this.UCa():this.$Wa()};v.prototype.Jy=function(){this.oS=this.fn=this.Jd.clientWidth||0;this.nS=this.dn=this.Jd.clientHeight||
0};v.prototype.BE=function(w){if(this.Rx!=w){this.Rx&&this.Rx.get("id");this.Rx!=null&&this.Rx.m(new q(n.Jr));this.Rx=w;for(var y=[];w!=null;)y=[w].concat(y),w=w.getParent();w=this.RQ.length-1;for(var x=!0;w>=0&&x;w--)y.includes(this.RQ[w])?x=!1:this.RQ[w].m(new q(n.Eb));for(w=0;w<y.length;w++)this.RQ.includes(y[w])||y[w].m(new q(n.tc));this.RQ=y;this.Rx!=null&&this.Rx.m(new q(n.EF));this.hc.BE(this.Rx)}};v.prototype.i0=function(w){var y=k.offset(this.va().bc());this.v1a(w,w.pageX-y.left,w.pageY-
y.top)?w.preventDefault():this.BE(null)};v.prototype.Lwa=function(){return[]};v.prototype.F1=function(){};v.prototype.v1a=function(w,y,x){return this.p1a(w.target)&&y>=0&&x>=0&&y<this.gb()&&x<this.Kb()};v.prototype.p1a=function(w){if(!this.Oc)return!1;for(;w;){if(w===this.Oc)return!0;w=w.parentElement}return!1};v.prototype.WVa=function(){window.addEventListener("resize",this.j0);this.cca=setInterval(function(){this.Tua()}.bind(this),this.PWa)};v.prototype.XYa=function(){window.removeEventListener("resize",
this.j0);this.cca&&(clearInterval(this.cca),this.cca=null)};v.prototype.Tua=function(){this.mk.enabled()?this.UCa():this.xFa();var w=this.Jd.clientWidth,y=this.Jd.clientHeight;if(this.Ng!=w||this.Mg!=y)this.Ng=w,this.Mg=y,this.k7a()};v.prototype.UCa=function(){if(this.Hea&&(f.Md()==f.gB&&f.Ub()==f.Hp||f.Md()==f.pj)){var w=d.fullscreenElement(),y=w.clientWidth;w=w.clientHeight;var x=(y>w?y:w)/(this.R4>this.Q4?this.R4:this.Q4),z=Math.round(y/x),A=Math.round(w/x);this.TC=x;this.Jd.style.left=Math.round((y-
z)*.5)+"px";this.Jd.style.top=Math.round((w-A)*.5)+"px";this.Jd.style.right="auto";this.Jd.style.bottom="auto";this.Jd.style.width=z+"px";this.Jd.style.height=A+"px";this.Jd.style.transform="scale("+[x,x].join(", ")+")";this.Jd.style.position="absolute"}else y=document.body.clientWidth,w=document.body.clientHeight,this.Jd.style.left="0",this.Jd.style.top="0",this.Jd.style.right="auto",this.Jd.style.bottom="auto",this.Jd.style.width=y+"px",this.Jd.style.height=w+"px",this.TC=1};v.prototype.$Wa=function(){this.Jd.style.position=
"absolute";this.Jd.style.left="0";this.Jd.style.top="0";this.Jd.style.right="0";this.Jd.style.bottom="0";this.Jd.style.width="auto";this.Jd.style.height="auto";this.Jd.style.transform="";this.TC=1};v.prototype.k7a=function(){this.XDa();var w=this;this.UT=setTimeout(function(){w.UT=null;w.kc()},this.d1a)};v.prototype.XDa=function(){this.UT&&(clearTimeout(this.UT),this.UT=null)};v.prototype.j0=function(){this.Tua()};return v}(g)});
define("tdv/view/containers/XRPanels",["require","exports","tdv/constants/EventName","tdv/player/view/util/XR","tdv/binding/BindingsHandler"],function(a,l,k,n,g){return function(){function h(e){this.ag=e;this.nK=this.nK.bind(this);this.SP=[];this.dla=[];n.M.bind(k.V,this.Ya,this,!0);this.nK()}h.prototype.dispose=function(){n.M.h(k.V,this.Ya,this);this.set([])};h.prototype.set=function(e){var b=this,c=e.filter(function(f){return!b.SP.includes(f)}),d=this.SP.filter(function(f){return!e.includes(f)});
c.forEach(function(f){f.vpa(b.ag);b.A$a(f)});d.forEach(function(f){f.vpa(null);b.ehb(f);f.Xla()});this.SP=e;this.nK()};h.prototype.get=function(){return this.SP};h.prototype.A$a=function(e){g.ba(e,["modal","content.visible"],this.nK,!1)};h.prototype.ehb=function(e){g.da(e,["modal","content.visible"],this.nK)};h.prototype.Ya=function(){this.nK()};h.prototype.nK=function(){function e(m){return m.get("modal")&&(m.get("content")?m.get("content").get("visible"):!1)}var b=this,c=[];if(n.isPresenting){var d=
this.SP.filter(function(m){return e(m)}),f=this.SP.filter(function(m){return!e(m)});c=d.length>0?[d[d.length-1]]:f}c.filter(function(m){return!b.dla.includes(m)}).forEach(function(m){return m.PHa()});this.dla.filter(function(m){return!c.includes(m)}).forEach(function(m){return m.Xla()});this.dla=c};return h}()});
define("tdv/view/util/Orientation","require exports tdv/view/core/ZIndex tdv/view/util/Assets tdv/view/util/Fullscreen tdv/constants/EventName tdv/events/EventDispatcher tdv/player/l10n tdv/player/view/util/Device".split(" "),function(a,l,k,n,g,h,e,b,c){function d(){q=TDV.qb.zt();var v=p||q;m!=v&&(m=v,f.m(h.V));v=!!p&&q!=p&&c.ub();r!=v&&(t||(t=document.createElement("div"),t.style.position="fixed",t.style.zIndex=k.ESa.toString(),t.style.left="0",t.style.top="0",t.style.margin="0",t.style.padding=
"0",t.style.height="100%",t.style.width="100%",t.style.backgroundColor="rgba(255, 255, 255, 0.99)",t.innerHTML=['<div style="box-sizing:border-box; padding:0 10vmin; display:table; height:100%; width:100vw;">\n<div style="vertical-align:middle; text-align:center; display:table-cell;">','<img style="width:22vmin" src="'+n.vZ+'"/>','<div style="color:#000; font-family:Arial, Helvetica, sans-serif; font-size:3.6vmin; line-height:4.3vmin; margin:5vmin 0; text-align:center;">'+b("rotate-device")+"</div>",
"</div>\n</div>"].join("\n"),u=t.querySelector("img")),r&&t.parentElement.removeChild(t),(r=v)&&(g.enabled()?g.fullscreenElement():document.body).appendChild(t));r&&(u.style.transform=m==f.ATa?"translate(-11%, 0) rotate(-90deg)":"none")}var f=new e;f.amb=TDV.qb.raa;f.ATa=TDV.qb.saa;f.Jw=function(v){p!=v&&(p=v,d())};f.pJa=function(){return p};f.get=function(){return m};var m=void 0,p=void 0,q=void 0,r=!1,t=null,u=null;window.addEventListener("resize",function(){d();setTimeout(d,500)},!0);try{window.screen.orientation.addEventListener("change",
d)}catch(v){window.addEventListener("orientationchange",d,!1)}d();return f});
define("tdv/player/script/Player","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/player/constants/RotationMode tdv/player/parser/ClassInfo tdv/player/AppInfo tdv/player/l10n tdv/player/script/helper/ButtonProperty tdv/player/view/AcademicWatermark tdv/player/view/CookiesBar tdv/player/view/DownloadBar tdv/player/view/MessageWindow tdv/player/view/UserInteractionWindow tdv/player/view/panorama/renderer/Renderer tdv/player/view/panorama/renderer/3d/util/TextureUtil tdv/player/view/util/Capabilities tdv/player/view/util/Device tdv/player/view/util/Gyroscope tdv/player/view/util/Installer tdv/player/view/util/LibsLoader tdv/player/view/util/Preloader tdv/player/view/util/URL tdv/player/view/util/XR tdv/view/constants/ButtonMode tdv/view/containers/Application tdv/view/containers/Container tdv/view/containers/XRPanels tdv/view/containers/layout/VerticalLayout tdv/view/util/Fullscreen tdv/view/util/AudioActivation tdv/view/util/Orientation tdv/view/util/UserInitiatedAction tdv/util/Storage".split(" "),function(a){var l=
a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/player/constants/RotationMode"),h=a("tdv/player/parser/ClassInfo"),e=a("tdv/player/AppInfo"),b=a("tdv/player/l10n"),c=a("tdv/player/script/helper/ButtonProperty"),d=a("tdv/player/view/AcademicWatermark"),f=a("tdv/player/view/CookiesBar"),m=a("tdv/player/view/DownloadBar"),p=a("tdv/player/view/MessageWindow"),q=a("tdv/player/view/UserInteractionWindow");a("tdv/player/view/panorama/renderer/Renderer");var r=a("tdv/player/view/panorama/renderer/3d/util/TextureUtil"),
t=a("tdv/player/view/util/Capabilities"),u=a("tdv/player/view/util/Device"),v=a("tdv/player/view/util/Gyroscope"),w=a("tdv/player/view/util/Installer"),y=a("tdv/player/view/util/LibsLoader"),x=a("tdv/player/view/util/Preloader"),z=a("tdv/player/view/util/URL"),A=a("tdv/player/view/util/XR"),D=a("tdv/view/constants/ButtonMode"),E=a("tdv/view/containers/Application"),B=a("tdv/view/containers/Container"),C=a("tdv/view/containers/XRPanels"),F=a("tdv/view/containers/layout/VerticalLayout"),G=a("tdv/view/util/Fullscreen"),
I=a("tdv/view/util/AudioActivation"),N=a("tdv/view/util/Orientation"),P=a("tdv/view/util/UserInitiatedAction"),Q=a("tdv/util/Storage"),R=h.define("Player",E,function(){E.apply(this,arguments);this.bh=new w(this);this.Wva=new m(this,this.bh);this.Ju=new B;this.Ju.wa({backgroundOpacity:0,visible:!0,width:"100%",height:"100%"});this.kM=new p;this.FN=new q;this.q_=new f(this);new d(this);this.W9a=new C(this);this.Zka=[];var S=new F;S.h9(0);this.XX(S);this.gg(!0);this.bind(k.N("settings"),this.l3a,this,
!0);this.L4=TDV.qb.TJa();N.bind(k.V,this.V2a,this,!0);I.hkb();this.xWa=new c(this,"buttonMute",D.Ze);this.xWa.bind(k.la,this.uAa,this,!0);this.FWa=new c(this,"buttonUnmute",D.Ze);this.FWa.bind(k.la,this.jBa,this,!0);this.VZ=new c(this,"buttonToggleMute",D.Vk);this.VZ.bind(k.Sk,this.uAa,this,!0);this.VZ.bind(k.Nm,this.jBa,this,!0);this.bind(k.N("mute"),this.S2a,this);this.VZ.set("pressed",this.get("mute"));this.vWa=new c(this,"buttonEnterFullscreen",D.Ze);this.vWa.bind(k.la,this.Kza,this,!0);this.wWa=
new c(this,"buttonExitFullscreen",D.Ze);this.wWa.bind(k.la,this.Lza,this,!0);this.RZ=new c(this,"buttonToggleFullscreen",D.Vk);this.RZ.bind(k.Sk,this.Kza,this,!0);this.RZ.bind(k.Nm,this.Lza,this,!0);this.RZ.set("pressed",this.get("fullscreenEnabled"));this.bind(k.N("fullscreenEnabled"),this.A2a,this,!0);this.set("fullscreenEnabled",this.mk.enabled());this.set("defaultMenu",["fullscreen","mute","rotation"]);this.bind(k.Np,this.o3a,this,!0);[k.Ra,k.ab,k.Rk,k.sB,k.BK].forEach(function(W){this.bind(W,
function(X){this.m(new n(k.PF,{EP:X}))},this,!0)}.bind(this));["keydown","keyup"].forEach(function(W){document.addEventListener(W,function(X){this.m(new n(k.PF,{EP:X}))}.bind(this))}.bind(this));A.M.bind(k.V,function(){A.isPresenting?N.Jw():N.Jw(E.prototype.get.call(this,"lockedOrientation"))},this);this.mk.bind(k.V,function(){var W=N.pJa();N.Jw();N.Jw(W)},this)});R.uSa="orientationChange";R.prototype.logCapabilities=function(){this.R1a()};R.prototype.activateAudio=function(S){this.LUa(S)};R.prototype.Xda=
function(S){E.prototype.Xda.apply(this,arguments);this.set("fullscreenEnabled",S)};R.prototype.Ob=function(){E.prototype.Ob.call(this);this.j("mute",!1);this.j("fullscreenEnabled",!1)};R.prototype.Ib=function(){E.prototype.Ib.call(this);this.Wva.getParent()!=this&&this.mb(this.Wva);this.Ju.getParent()!=this&&(this.mb(this.Ju),this.Ju.mb(this.q_),this.Ju.mb(this.kM),this.Ju.mb(this.FN))};R.prototype.W4a=function(S){var W=[];this.kM&&W.push(this.kM);this.FN&&W.push(this.FN);this.q_&&W.push(this.q_);
for(var X=!0,Z=0;Z<=W.length&&X;Z++)X=S.length-(W.length-Z)==S.indexOf(W[Z]);return X?S:S.filter(function(ca){return W.indexOf(ca)<0}).concat(W)};R.prototype.jb=function(){this.dCa||(this.dCa=l.difference(this.$_a(),"backgroundOpacity visible includeInLayout state left right top bottom centerX centerY width height minWidth minHeight maxWidth maxHeight actualWidth actualHeight paddingLeft paddingTop paddingRight paddingBottom".split(" ")));this.Qc(this.dCa,{},[this.Ju],!0,!0);E.prototype.jb.call(this);
this.Smb===!0&&this.Qmb()};R.prototype.set=function(S,W){switch(S){case "children":this.Ju.set(S,this.W4a(W));return;case "creationPolicy":this.Ju.set(S,W);return;case "fullscreenAvailable":case "gyroscopeAvailable":case "cardboardAvailable":case "isMobile":case "orientation":case "surfaceSelectionAvailable":case "touchEnabled":case "touchDevice":case "vrControllerAvailable":case "vrAvailable":W=this.get(S);break;case "fullscreenEnabled":W=this.mk.nl()&&W;break;case "fullscreenFallback":G.Apa(W);
break;case "lockedOrientation":u.gf()&&(W=void 0);N.Jw(W);break;case "installAvailable":W=this.bh.ready();break;case "mouseWheelEnabled":this.vib(z.Rg("mousewheelenabled",W));break;case "backgroundPreloadEnabled":this.m5a(W);break;case "vrPolyfillScale":A.s8=W;break;case "desktopMipmappingEnabled":r.Jhb(W);break;case "mobileMipmappingEnabled":r.tib(W);break;case "defaultVRPointer":W=="gaze"?A.DPa(A.Ksa.BF):A.DPa(A.Ksa.CF);break;case "xrPanels":this.Zka=W;this.AFa();break;case "xrPanelsEnabled":this.SFa=
this.J4&&W,this.AFa()}E.prototype.set.call(this,S,W)};R.prototype.get=function(S,W){switch(S){case "children":case "creationPolicy":return this.Ju.get(S,W);case "touchEnabled":return u.nr();case "touchDevice":return u.H9();case "isMobile":return u.ub();case "orientation":return N.get();case "lockedOrientation":return N.pJa();case "gyroscopeAvailable":return v.nl;case "cardboardAvailable":case "vrAvailable":return A.QP;case "arAvailable":return A.rGa;case "vrControllerAvailable":return A.Nlb;case "fullscreenAvailable":return this.mk.nl();
case "vrPolyfillScale":return A.s8;case "installAvailable":return this.bh.ready();case "surfaceSelectionAvailable":return!0;case "pageScale":return this.TC;case "xrPanels":return this.Zka;case "xrPanelsEnabled":return this.SFa;case M:case T:return this.J4?E.prototype.get.apply(this,arguments):!0;default:return E.prototype.get.apply(this,arguments)}};R.prototype.AFa=function(){this.W9a.set(this.SFa?this.Zka.slice():[])};R.prototype.uAa=function(){this.set("mute",!0)};R.prototype.jBa=function(){this.set("mute",
!1)};R.prototype.S2a=function(){this.VZ.set("pressed",this.get("mute"))};R.prototype.Kza=function(){this.set("fullscreenEnabled",!0)};R.prototype.Lza=function(){this.set("fullscreenEnabled",!1)};R.prototype.A2a=function(){this.get("fullscreenEnabled")?this.mk.rt():this.mk.tm();this.RZ.set("pressed",this.get("fullscreenEnabled"));this.set("fullscreenEnabled",this.mk.enabled())};R.prototype.l3a=function(){var S=this.get("settings");S&&(y.initialize(S),x.Wpa(S),THREE.rra=S.get(TDV.PlayerSettings.e$),
THREE.Ara=S.get(TDV.PlayerSettings.v$),THREE.JB=S.get(TDV.PlayerSettings.JB),this.bh.Wpa(S))};R.prototype.m5a=function(S){x.enabled(S)};R.prototype.Lwa=function(){var S=[];this.rL=[];(this.get("menu")||[]).forEach(function(Z){var ca=Z.get("label");S.push(Z.get("label"));ca&&this.rL.push(function(){Z.m("click")})}.bind(this));var W=this.get("defaultMenu",[]);if(W.indexOf("rotation")>=0){var X=this.Bi("PanoramaPlayer");X.length&&(S.push(X[0].get("mouseControlMode")==g.gF?b("change-to-drag-and-release"):
b("change-to-click-and-move")),this.rL.push(this.T7a.bind(this)))}W.indexOf("fullscreen")>=0&&this.mk.nl()&&(S.push(this.mk.enabled()?b("exit-fullscreen"):b("enter-fullscreen")),this.rL.push(this.R7a.bind(this)));W.indexOf("mute")>=0&&(S.push(this.get("mute")?b("unmute"):b("mute")),this.rL.push(this.S7a.bind(this)));W=[].concat(e.name?[e.name]:[],e.Cbb!="false"?e.RW?["v:"+e.RW+"."+e.XW]:["v:"+e.XW]:[]).join(" ");W!=""&&(S.length>0&&S.push(""),S.push(W),this.rL.push(this.A3a.bind(this)));return S};
R.prototype.F1=function(S){this.rL[S.data.index]()};R.prototype.T7a=function(){var S=this.Bi("PanoramaPlayer"),W=S[0].get("mouseControlMode")==g.gF?g.gx:g.gF;S.forEach(function(X){Q.setItem(K,W);X.set("mouseControlMode",W)})};R.prototype.o3a=function(){Q.getItem(K)==g.gx&&this.Bi("PanoramaPlayer").forEach(function(S){S.set("mouseControlMode",g.gx)});z.Ck("mute")&&this.set("mute",z.Rg("mute",this.get("mute")))};R.prototype.R7a=function(){this.mk.toggle()};R.prototype.S7a=function(){this.set("mute",
!this.get("mute"))};R.prototype.A3a=function(){e.BRa&&window.open(e.BRa,"_blank")};R.prototype.V2a=function(){this.m(R.uSa)};R.prototype.R1a=function(){l.Qbb(!0);l.log("UA: "+navigator.userAgent);l.log("screen: ("+Math.max(window.screen.width,window.screen.height)+", "+Math.min(window.screen.width,window.screen.height)+") dpr: "+window.devicePixelRatio+" ("+Math.max(window.screen.width,window.screen.height)*window.devicePixelRatio+", "+Math.min(window.screen.width,window.screen.height)*window.devicePixelRatio+
")");u.log();t.log();b.log();A.log()};R.prototype.LUa=function(S){I.active()?P.wait(S):(I.lra(S),I.request(this))};var K="tdvp_"+window.location.pathname+"_rotation_mode",M=[119,97,116,101,114,109,97,114,107].map(function(S){return String.fromCharCode(S)}).join(""),T=[97,99,97,100,101,109,105,99,87,97,116,101,114,109,97,114,107].map(function(S){return String.fromCharCode(S)}).join("");return R});
define("tdv/player/script/PlayerMenuItem",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("PlayerMenuItem",l,function(){l.call(this)})});
define("tdv/player/script/PopupPanoramaOverlay","require tdv/utils tdv/binding/Bindable tdv/constants/EventName tdv/constants/PlaybackState tdv/player/parser/ClassInfo tdv/player/script/helper/PlaybackPositionHelper".split(" "),function(a){a("tdv/utils");var l=a("tdv/binding/Bindable"),k=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/helper/PlaybackPositionHelper");a=g.define("PopupPanoramaOverlay",l,function(){l.call(this);
this.set("state",n.ca);this.bind(k.N("state"),function(){this.m(k.$e)},this,!0);this.Ed=void 0});a.prototype.show=function(){this.set("visible",!0)};a.prototype.Qe=function(){this.set("visible",!1)};a.prototype.play=function(){this.set("state",n.PLAYING)};a.prototype.pause=function(){this.set("state",n.MK)};a.prototype.stop=function(){this.set("state",n.ca)};a.prototype.hide=a.prototype.Qe;a.prototype.pause=a.prototype.pause;a.prototype.play=a.prototype.play;a.prototype.show=a.prototype.show;a.prototype.stop=
a.prototype.stop;a.prototype.get=function(e,b){switch(e){case "playbackPositions":return this.Ed===void 0&&(this.Ed=h.hdb(this)),this.Ed}return l.prototype.get.call(this,e,b)};a.prototype.set=function(e,b){var c=!1;switch(e){case "hfov":case "vfov":case "pitch":case "rotationX":case "rotationY":case "rotationZ":case "yaw":case "playbackPositions":this.Ed=void 0,c=!0}l.prototype.set.call(this,e,b);c&&e!="playbackPositions"&&this.m(k.N("playbackPositions"))};return a});
define("tdv/player/script/ProgressBar",["require","tdv/player/view/ProgressBar","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/player/view/ProgressBar");return a("tdv/player/parser/ClassInfo").define("ProgressBar",l,function(){l.call(this)})});
define("tdv/player/script/QuadFramePanoramaOverlay",["require","tdv/binding/Bindable","tdv/constants/EventName","tdv/player/parser/ClassInfo","tdv/player/script/helper/PlaybackPositionHelper"],function(a){var l=a("tdv/binding/Bindable"),k=a("tdv/constants/EventName"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/player/script/helper/PlaybackPositionHelper");a=n.define("QuadFramePanoramaOverlay",l,function(){l.call(this);this.Ed=void 0});a.prototype.set=function(h,e){var b=!1;switch(h){case "vertices":case "playbackPositions":this.Ed=
void 0,b=!0}l.prototype.set.call(this,h,e);b&&h!="playbackPositions"&&this.m(k.N("playbackPositions"))};a.prototype.get=function(h,e){switch(h){case "playbackPositions":return this.Ed===void 0&&(this.Ed=g.Xma(this)),this.Ed}return l.prototype.get.call(this,h,e)};return a});
define("tdv/player/script/QuadHotspotPanoramaOverlay",["require","tdv/player/parser/ClassInfo","tdv/player/script/HotspotPanoramaOverlay"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/HotspotPanoramaOverlay");return l.define("QuadHotspotPanoramaOverlay",k,function(){k.call(this)})});
define("tdv/player/script/QuadHotspotPanoramaOverlayArea",["require","tdv/player/parser/ClassInfo","tdv/player/script/HotspotPanoramaOverlayArea"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/HotspotPanoramaOverlayArea");return l.define("QuadHotspotPanoramaOverlayArea",k,function(){k.apply(this,arguments)})});
define("tdv/player/script/QuadHotspotPanoramaOverlayImageBase",["require","tdv/binding/Bindable","tdv/constants/EventName","tdv/player/parser/ClassInfo","tdv/player/script/helper/PlaybackPositionHelper"],function(a){var l=a("tdv/binding/Bindable"),k=a("tdv/constants/EventName"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/player/script/helper/PlaybackPositionHelper");a=n.define("QuadHotspotPanoramaOverlayImageBase",l,function(){l.call(this);this.Ed=void 0});a.prototype.get=function(h,e){switch(h){case "playbackPositions":return this.Ed===
void 0&&(this.Ed=g.Xma(this)),this.Ed}return l.prototype.get.call(this,h,e)};a.prototype.set=function(h,e){var b=!1;switch(h){case "opacity":case "distance":case "vertices":case "playbackPositions":this.Ed=void 0,b=!0}l.prototype.set.call(this,h,e);b&&h!="playbackPositions"&&this.m(k.N("playbackPositions"))};return a});
define("tdv/player/script/QuadHotspotPanoramaOverlayImage",["require","tdv/player/parser/ClassInfo","tdv/player/script/QuadHotspotPanoramaOverlayImageBase"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/QuadHotspotPanoramaOverlayImageBase");return l.define("QuadHotspotPanoramaOverlayImage",k,function(){k.call(this)})});
define("tdv/player/script/QuadHotspotPanoramaOverlayMap",["require","tdv/player/parser/ClassInfo","tdv/player/script/QuadHotspotPanoramaOverlayImageBase"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/QuadHotspotPanoramaOverlayImageBase");return l.define("QuadHotspotPanoramaOverlayMap",k,function(){k.call(this)})});
define("tdv/player/script/QuadVideoPanoramaOverlay","require tdv/binding/Bindable tdv/constants/EventName tdv/constants/PlaybackState tdv/events/Event tdv/player/parser/ClassInfo tdv/player/script/helper/PlaybackPositionHelper".split(" "),function(a){var l=a("tdv/binding/Bindable"),k=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/events/Event"),h=a("tdv/player/parser/ClassInfo"),e=a("tdv/player/script/helper/PlaybackPositionHelper");a=h.define("QuadVideoPanoramaOverlay",
l,function(){l.call(this);this.Ed=void 0});a.prototype.play=a.prototype.play=function(){this.set("state",n.PLAYING)};a.prototype.pause=a.prototype.pause=function(){this.set("state",n.Yb)};a.prototype.stop=a.prototype.stop=function(){this.set("state",n.ca)};a.prototype.set=function(b,c){var d=!1;switch(b){case "state":var f=this.get("state")||n.ca;f==n.ca&&c==n.PLAYING&&this.m(k.Np);f!=c&&this.m(new g(k.$e,{oldState:f,state:c}));break;case "enabledInCardboard":this.set("enabledInVR",c);break;case "distance":case "opacity":case "playbackPositions":case "vertices":this.Ed=
void 0,d=!0}l.prototype.set.call(this,b,c);d&&b!="playbackPositions"&&this.m(k.N("playbackPositions"))};a.prototype.get=function(b,c){switch(b){case "playbackPositions":return this.Ed===void 0&&(this.Ed=e.Xma(this)),this.Ed}return l.prototype.get.call(this,b,c)};return a});
define("tdv/player/script/RadialModel3DDisplayEffect",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("RadialModel3DDisplayEffect",l,function(){l.call(this)})});
define("tdv/player/script/RainPanoramaOverlay",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");a=a("tdv/player/parser/ClassInfo").define("RainPanoramaOverlay",l,function(){l.call(this)});a.prototype.get=function(k,n){k=="startState"&&n===void 0&&(n=this.get("initialState"));return l.prototype.get.call(this,k,n)};return a});
define("tdv/player/script/RotationalCameraMovement",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("RotationalCameraMovement",l,function(){l.call(this)})});define("tdv/player/script/SlideInEffect",["require","tdv/view/effects/SlideInEffect","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/view/effects/SlideInEffect");return a("tdv/player/parser/ClassInfo").define("SlideInEffect",l,function(){l.call(this)})});
define("tdv/player/script/SlideOutEffect",["require","tdv/view/effects/SlideOutEffect","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/view/effects/SlideOutEffect");return a("tdv/player/parser/ClassInfo").define("SlideOutEffect",l,function(){l.call(this)})});
define("tdv/player/script/SnowPanoramaOverlay",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");a=a("tdv/player/parser/ClassInfo").define("SnowPanoramaOverlay",l,function(){l.call(this)});a.prototype.get=function(k,n){k=="startState"&&n===void 0&&(n=this.get("initialState"));return l.prototype.get.call(this,k,n)};return a});
define("tdv/player/script/SphericPanoramaFrame",["require","tdv/player/parser/ClassInfo","tdv/player/script/PanoramaFrame"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/PanoramaFrame");a=l.define("SphericPanoramaFrame",k,function(){k.call(this)});a.prototype.Ln=function(){var n=this.get("sphere");return n&&l.Qa("Video360Resource",n)?!0:(n=this.get("stereoSphere"))&&l.Qa("Video360Resource",n)?!0:!1};return a});
define("tdv/player/script/SphereModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DObject"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/Model3DObject");return l.define("SphereModel3DObject",k,function(){k.call(this)})});define("tdv/player/script/SpotLight",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("SpotLight",l,function(){l.call(this)})});
define("tdv/player/script/SpriteModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DObject"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/Model3DObject");a=l.define("SpriteModel3DObject",k,function(){k.call(this)});a.prototype.getPixelScale=function(){return this.get("worldPixelScale")};return a});
define("tdv/player/script/SurfaceReticleModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DObject"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/Model3DObject");return l.define("SurfaceReticleModel3DObject",k,function(){k.call(this);this.set("transparentAreaActive",!0)})});
define("tdv/view/containers/tabpanel/Tab","require exports tdv/binding/ChangeWatcher tdv/view/containers/Container tdv/view/constants/Alignment tdv/view/constants/Direction tdv/view/text/Label".split(" "),function(a,l,k,n,g,h,e){return function(b){function c(d){var f=b.call(this)||this;f.df("Tab");f.iha=d;f.yn="";f.uja=!1;f.Xa=null;f.pya=null;f.Nka=!1;f.Oka=!1;f.set("childrenInteractionEnabled",!1);f.set("contentOpaque",!0);return f}O(c,b);c.prototype.Ob=function(){b.prototype.Ob.call(this);this.j("horizontalAlign",
g.Ye);this.j("verticalAlign",g.Xd);this.j("fontFamily");this.j("fontSize");this.j("fontColor");this.j("fontWeight");this.j("fontStyle");this.j("textDecoration");this.j("textShadowBlurRadius");this.j("textShadowColor");this.j("textShadowHorizontalLength");this.j("textShadowOpacity");this.j("textShadowVerticalLength")};c.prototype.EPa=function(d){this.Nka!=d&&(this.Nka=d,this.Oka=!0,this.Hf())};c.prototype.Ib=function(){b.prototype.Ib.call(this);this.Xa==null&&(this.Xa=new e,this.Xa.set("horizontalAlign",
"center"),this.mb(this.Xa))};c.prototype.Vr=function(){b.prototype.Vr.call(this);this.pya=k.Sw(this.iha,"label",this.wM,this);this.J3(this.iha.get("label"))};c.prototype.lia=function(){b.prototype.lia.call(this);this.pya.UE()};c.prototype.wM=function(){var d=this.iha.get("label");this.J3(d?d:"")};c.prototype.J3=function(d){this.yn!=d&&(this.yn=d,this.uja=!0,this.Hf())};c.prototype.jb=function(){this.uja&&(this.uja=!1,this.Xa.set("text",this.yn));this.Oka&&(this.Oka=!1,this.Xa.set("direction",this.Nka?
h.ck:h.bi));this.Qc(c.Dta,c.yQ,[this.Xa],!0,!0);b.prototype.jb.call(this)};c.Dta="fontFamily fontSize fontColor fontWeight fontStyle textDecoration textShadowColor textShadowHorizontalLength textShadowVerticalLength textShadowBlurRadius textShadowOpacity".split(" ");c.yQ=Object.fromEntries(c.Dta.map(function(d){return[d,d]}));return c}(n)});define("tdv/view/containers/tabpanel/TabsAlignment",["require","exports"],function(){return{jQ:"normal",FK:"inverse",tra:"center"}});
define("tdv/view/containers/tabpanel/TabPanel","require exports tdv/utils tdv/view/constants/GradientDirection tdv/view/constants/Cursor tdv/constants/EventName tdv/view/containers/Container tdv/view/constants/Alignment tdv/view/constants/LayoutMode tdv/view/constants/OverflowPolicy tdv/view/containers/tabpanel/Tab tdv/view/containers/tabpanel/TabsAlignment tdv/view/constants/Position tdv/view/core/visuals/VisualsType".split(" "),function(a,l,k,n,g,h,e,b,c,d,f,m,p,q){return function(r){function t(){var u=
r.call(this)||this;u.df("TabPanel");u.Hg=-1;u.aI=!1;u.BU=[];u.f4=!1;u.il=[];u.jha=!1;u.AU=[];u.si=null;u.Nh=null;u.TJ(!1);return u}O(t,r);t.prototype.Ob=function(){r.prototype.Ob.call(this);this.j("pages",[]);this.j("selectedIndex",-1);this.j("tabsSize",25);this.j("tabsPosition",p.Tc);this.j("tabsGap",0);this.j("tabsPadding",10);this.j("tabsAlign",m.jQ);this.j("tabsBackgroundOpacity",.6);this.j("tabsBackgroundColor",["#FFFFFF","#CCCCCC"]);this.j("tabsBackgroundColorRatios",[0,.5]);this.j("tabsRollOverBackgroundOpacity",
1);this.j("tabsRollOverBackgroundColor",["#FFFFFF","#CCCCCC"]);this.j("tabsRollOverBackgroundColorRatios",[0,.5]);this.j("backgroundColor","#FFFFFF");this.j("selectedTabBackgroundOpacity",1);this.j("selectedTabBackgroundColor");this.j("selectedTabBackgroundColorRatios");this.j("borderRadius",6);this.j("pagePaddingLeft",4);this.j("pagePaddingTop",4);this.j("pagePaddingRight",4);this.j("pagePaddingBottom",4);this.j("borderColor","#AAAAAA");this.j("borderSize",1);this.j("selectedTabFontSize");this.j("selectedTabFontColor");
this.j("selectedTabFontWeight");this.j("selectedTabFontStyle");this.j("selectedTabTextDecoration");this.j("selectedTabTextShadowBlurRadius");this.j("selectedTabTextShadowColor");this.j("selectedTabTextShadowHorizontalLength");this.j("selectedTabTextShadowOpacity");this.j("selectedTabTextShadowVerticalLength");this.j("tabsFontFamily");this.j("tabsFontSize");this.j("tabsFontColor");this.j("tabsFontWeight");this.j("tabsFontStyle");this.j("tabsTextDecoration");this.j("tabsTextShadowBlurRadius");this.j("tabsTextShadowColor");
this.j("tabsTextShadowHorizontalLength");this.j("tabsTextShadowOpacity");this.j("tabsTextShadowVerticalLength");this.j("tabsRollOverFontSize");this.j("tabsRollOverFontColor");this.j("tabsRollOverFontWeight");this.j("tabsRollOverFontStyle");this.j("tabsRollOverTextDecoration");this.j("tabsRollOverTextShadowBlurRadius");this.j("tabsRollOverTextShadowColor");this.j("tabsRollOverTextShadowHorizontalLength");this.j("tabsRollOverTextShadowOpacity");this.j("tabsRollOverTextShadowVerticalLength")};t.prototype.ao=
function(u,v,w,y){r.prototype.ao.call(this,u,v,w,y);this.lD("shadow")};t.prototype.Ib=function(){e.prototype.Ib.call(this);this.Nh==null&&(this.Nh=new e,this.Nh.TJ(!1),this.mb(this.Nh));this.si==null&&(this.si=new e,this.si.TJ(!1),this.mb(this.si))};t.prototype.set=function(u,v){u=="pages"?this.yib(v||[]):u=="selectedIndex"?this.Nw(v):u=="layout"&&(v=c.Qlb);e.prototype.set.call(this,u,v)};t.prototype.get=function(u,v){return u=="pages"?this.il:u=="selectedIndex"?this.KJa():e.prototype.get.call(this,
u,v)};t.prototype.Nw=function(u){this.Hg!=u&&(this.Hg=u,this.Hg=Math.min(Math.max(this.Hg,-1),this.il.length),this.aI=!0,this.Hf(),this.m(h.V),this.m(h.N("selectedIndex")))};t.prototype.KJa=function(){return this.Hg};t.prototype.yib=function(u){var v=this;k.tna(this.il,u)||(this.il.forEach(function(w){w.h(h.od,v.ABa,v);w.h(h.jd,v.zBa,v)}),this.il=u,this.il.forEach(function(w){w.bind(h.od,v.ABa,v);w.bind(h.jd,v.zBa,v)}),this.jha=!0,this.Hf())};t.prototype.G7a=function(u){this.BU=k.union(this.BU,[u.source]);
this.f4=!0;this.Hf()};t.prototype.F7a=function(u){this.BU=k.difference(this.BU,[u.source]);this.f4=!0;this.Hf()};t.prototype.E7a=function(u){this.Nw(this.AU.indexOf(u.source))};t.prototype.ABa=function(u){this.Nw(this.il.indexOf(u.source))};t.prototype.zBa=function(u){if(this.il.indexOf(u.source)==this.Hg){for(u=this.il.length-1;u>=0;u--)if(this.il[u].get("visible")){this.Nw(u);return}this.Hg=-1;this.Nw(0)}};t.prototype.jb=function(){var u=this,v=!1,w=!1,y=!1,x=!1,z=!1,A=this.G("tabsPosition"),D=
this.G("tabsAlign");this.jha&&(this.AU=[],this.si.ZNa(),this.Nh.ZNa(),this.il.forEach(function(F){var G=new f(F);G.TJ(!0);G.bind(h.tc,u.G7a,u,!1);G.bind(h.Eb,u.F7a,u,!1);G.bind(h.Ra,u.E7a,u,!1);u.AU.push(G);u.si.mb(G);F.wa({top:void 0,left:void 0,right:void 0,bottom:void 0,width:"100%",height:"100%"});u.Nh.mb(F)}),this.Hg=Math.min(Math.max(this.Hg,0),this.il.length-1),this.jha=!1,w=v=z=!0);this.S("tabsPosition")&&(this.$("tabsPosition"),x=w=v=!0);this.aI&&(this.aI=!1,y=w=z=!0);this.f4&&(this.f4=!1,
y=!0);this.S("overflow")&&this.si.wa({contentOpaque:this.G("overflow")==d.Pr,overflow:this.G("overflow")});["tabsAlign","tabsGap","tabsSize"].forEach(function(F){u.S(F)&&(u.$(F),v=!0)});"borderRadius borderTopRadius borderBottomRadius borderLeftRadius borderRightRadius borderTopLeftRadius borderTopRightRadius borderBottomLeftRadius borderBottomRightRadius borderSize borderLeftSize borderTopSize borderRightSize borderBottomSize borderColor borderLeftColor borderTopColor borderRightColor borderBottomColor shadow shadowHorizontalLength shadowVerticalLength shadowBlurRadius shadowSpread shadowColor backgroundOpacity backgroundColor backgroundColorRatios".split(" ").forEach(function(F){u.S(F)&&
(u.$(F),x=w=!0)});"tabsBackgroundOpacity tabsBackgroundColor tabsBackgroundColorRatios selectedTabBackgroundOpacity selectedTabBackgroundColor selectedTabBackgroundColorRatios selectedTabFontSize selectedTabFontColor selectedTabFontWeight selectedTabFontStyle selectedTabTextDecoration selectedTabTextShadowColor selectedTabTextShadowHorizontalLength selectedTabTextShadowVerticalLength selectedTabTextShadowBlurRadius selectedTabTextShadowOpacity tabsFontFamily tabsFontSize tabsFontColor tabsFontWeight tabsFontStyle tabsPadding tabsTextDecoration tabsRollOverFontSize tabsRollOverFontColor tabsTextShadowColor tabsTextShadowHorizontalLength tabsTextShadowVerticalLength tabsTextShadowBlurRadius tabsTextShadowOpacity tabsRollOverFontWeight tabsRollOverFontStyle tabsRollOverTextDecoration tabsRollOverTextShadowColor tabsRollOverTextShadowHorizontalLength tabsRollOverTextShadowVerticalLength tabsRollOverTextShadowBlurRadius tabsRollOverTextShadowOpacity".split(" ").forEach(function(F){u.S(F)&&
(u.$(F),w=!0)});["pagePaddingLeft","pagePaddingTop","pagePaddingRight","pagePaddingBottom"].forEach(function(F){u.S(F)&&(u.$(F),x=!0)});this.S("backgroundColorDirection")&&this.$("backgroundColorDirection");if(v){switch(A){case p.eb:this.si.wa({left:0,right:void 0});break;case p.Db:this.si.wa({left:void 0,right:0});break;case p.Tc:this.si.wa({bottom:void 0,top:0});break;case p.Fc:this.si.wa({bottom:0,top:void 0})}switch(A){case p.eb:case p.Db:this.si.wa({layout:c.ck,top:0,bottom:0,height:void 0,width:this.G("tabsSize")});
switch(D){case m.FK:this.si.set("verticalAlign",b.Fc);break;case m.tra:this.si.set("verticalAlign",b.Xd);break;default:this.si.set("verticalAlign",b.Tc)}break;case p.Tc:case p.Fc:switch(this.si.wa({layout:c.bi,left:0,right:0,height:this.G("tabsSize"),width:void 0}),D){case m.FK:this.si.set("horizontalAlign",b.Db);break;case m.tra:this.si.set("horizontalAlign",b.Ye);break;default:this.si.set("horizontalAlign",b.eb)}}this.si.set("gap",this.G("tabsGap"))}if(w)for(var E=0;E<this.il.length;E++){var B=
this.AU[E];A==p.Fc||A==p.Tc?(B.wa({layout:c.bi,width:void 0,paddingLeft:this.G("tabsPadding"),paddingTop:0,paddingRight:this.G("tabsPadding"),paddingBottom:0,height:"100%",backgroundColorDirection:n.Laa}),B.EPa(!1)):(B.wa({layout:c.ck,width:"100%",paddingLeft:0,paddingTop:this.G("tabsPadding"),paddingRight:0,paddingBottom:this.G("tabsPadding"),height:void 0,backgroundColorDirection:n.kZ}),B.EPa(!0));A==p.Fc||A==p.Db?B.set("borderTopLeftRadius",0):B.set("borderTopLeftRadius",this.G("borderTopLeftRadius",
"borderTopRadius","borderLeftRadius","borderRadius"));A==p.Fc||A==p.eb?B.set("borderTopRightRadius",0):B.set("borderTopRightRadius",this.G("borderTopRightRadius","borderTopRadius","borderRightRadius","borderRadius"));A==p.Tc||A==p.Db?B.set("borderBottomLeftRadius",0):B.set("borderBottomLeftRadius",this.G("borderBottomLeftRadius","borderBottomRadius","borderLeftRadius","borderRadius"));A==p.Tc||A==p.eb?B.set("borderBottomRightRadius",0):B.set("borderBottomRightRadius",this.G("borderBottomRightRadius",
"borderBottomRadius","borderRightRadius","borderRadius"));A==p.Db&&B.set("borderSize",this.G("borderRightSize","borderSize"));A==p.eb&&B.set("borderSize",this.G("borderLeftSize","borderSize"));A==p.Tc&&B.set("borderSize",this.G("borderTopSize","borderSize"));A==p.Fc&&B.set("borderSize",this.G("borderBottomSize","borderSize"));switch(A){case p.eb:var C=this.G("borderLeftColor","borderColor");break;case p.Db:C=this.G("borderRightColor","borderColor");break;case p.Fc:C=this.G("borderBottomColor","borderColor");
break;default:case p.Tc:C=this.G("borderTopColor","borderColor")}B.set("borderColor",C);B.wa({fontFamily:this.G("tabsFontFamily"),shadow:this.G("shadow")&&this.aLa(),shadowHorizontalLength:this.G("shadowHorizontalLength"),shadowVerticalLength:this.G("shadowVerticalLength"),shadowBlurRadius:this.G("shadowBlurRadius"),shadowSpread:this.G("shadowSpread"),shadowColor:this.G("shadowColor")})}if(w||y)for(E=0;E<this.il.length;E++)B=this.AU[E],y=E==this.Hg,C=this.BU.includes(B),y?(C=this.G("selectedTabBackgroundColor",
"tabsBackgroundColor"),C===void 0&&(C=this.G("backgroundColor"),C=Array.isArray(C)&&C.length>0?A==p.eb||A==p.Tc?C[0]:C[C.length-1]:C),B.wa({backgroundOpacity:this.G("selectedTabBackgroundOpacity","tabsBackgroundOpacity","backgroundOpacity"),backgroundColor:C,backgroundColorRatios:this.G("selectedTabBackgroundColorRatios","tabsBackgroundColorRatios"),cursor:g.lf,fontSize:this.G("selectedTabFontSize","tabsFontSize"),fontColor:this.G("selectedTabFontColor","tabsFontColor"),fontWeight:this.G("selectedTabFontWeight",
"tabsFontWeight"),fontStyle:this.G("selectedTabFontStyle","tabsFontStyle"),textDecoration:this.G("selectedTabTextDecoration","tabsTextDecoration"),textShadowColor:this.G("selectedTabTextShadowColor","tabsTextShadowColor"),textShadowHorizontalLength:this.G("selectedTabTextShadowHorizontalLength","tabsTextShadowHorizontalLength"),textShadowVerticalLength:this.G("selectedTabTextShadowVerticalLength","tabsTextShadowVerticalLength"),textShadowBlurRadius:this.G("selectedTabTextShadowBlurRadius","tabsTextShadowBlurRadius"),
textShadowOpacity:this.G("selectedTabTextShadowOpacity","tabsTextShadowOpacity")})):C?B.wa({backgroundOpacity:this.G("tabsRollOverBackgroundOpacity","tabsBackgroundOpacity","backgroundOpacity"),backgroundColor:this.G("tabsRollOverBackgroundColor","tabsBackgroundColor"),backgroundColorRatios:this.G("tabsRollOverBackgroundColorRatios","tabsBackgroundColorRatios"),cursor:g.mf,fontSize:this.G("tabsRollOverFontSize","tabsFontSize"),fontColor:this.G("tabsRollOverFontColor","tabsFontColor"),fontWeight:this.G("tabsRollOverFontWeight",
"tabsFontWeight"),fontStyle:this.G("tabsRollOverFontStyle","tabsFontStyle"),textDecoration:this.G("tabsRollOverTextDecoration","tabsTextDecoration"),textShadowColor:this.G("tabsRollOverTextShadowColor","tabsTextShadowColor"),textShadowHorizontalLength:this.G("tabsRollOverTextShadowHorizontalLength","tabsTextShadowHorizontalLength"),textShadowVerticalLength:this.G("tabsRollOverTextShadowVerticalLength","tabsTextShadowVerticalLength"),textShadowBlurRadius:this.G("tabsRollOverTextShadowBlurRadius","tabsTextShadowBlurRadius"),
textShadowOpacity:this.G("tabsRollOverTextShadowOpacity","tabsTextShadowOpacity")}):B.wa({backgroundOpacity:this.G("tabsBackgroundOpacity","backgroundOpacity"),backgroundColor:this.G("tabsBackgroundColor"),backgroundColorRatios:this.G("tabsBackgroundColorRatios"),fontSize:this.G("tabsFontSize"),fontColor:this.G("tabsFontColor"),fontWeight:this.G("tabsFontWeight"),fontStyle:this.G("tabsFontStyle"),textDecoration:this.G("tabsTextDecoration"),textShadowColor:this.G("tabsTextShadowColor"),textShadowHorizontalLength:this.G("tabsTextShadowHorizontalLength"),
textShadowVerticalLength:this.G("tabsTextShadowVerticalLength"),textShadowBlurRadius:this.G("tabsTextShadowBlurRadius"),textShadowOpacity:this.G("tabsTextShadowOpacity")}),B.wa({borderLeftSize:A==p.Db&&y?0:void 0,borderRightSize:A==p.eb&&y?0:void 0,borderBottomSize:A==p.Tc&&y?0:void 0,borderTopSize:A==p.Fc&&y?0:void 0});if(x){E=this.G("tabsSize");switch(A){case p.eb:this.Nh.wa({left:E-(this.G("borderLeftSize","borderSize")||0),right:0,top:0,bottom:0});break;case p.Db:this.Nh.wa({left:0,right:E-(this.G("borderRightSize",
"borderSize")||0),top:0,bottom:0});break;case p.Tc:this.Nh.wa({left:0,right:0,top:E-(this.G("borderTopSize","borderSize")||0),bottom:0});break;case p.Fc:this.Nh.wa({left:0,right:0,top:0,bottom:E-(this.G("borderBottomSize","borderSize")||0)})}A==p.Tc&&D==m.jQ||A==p.eb&&D==m.jQ?this.Nh.set("borderTopLeftRadius",0):this.Nh.set("borderTopLeftRadius",this.G("borderTopLeftRadius","borderTopRadius","borderLeftRadius","borderRadius"));A==p.Tc&&D==m.FK||A==p.Db&&D==m.jQ?this.Nh.set("borderTopRightRadius",
0):this.Nh.set("borderTopRightRadius",this.G("borderTopRightRadius","borderTopRadius","borderRightRadius","borderRadius"));A==p.Fc&&D==m.jQ||A==p.eb&&D==m.FK?this.Nh.set("borderBottomLeftRadius",0):this.Nh.set("borderBottomLeftRadius",this.G("borderBottomLeftRadius","borderBottomRadius","borderLeftRadius","borderRadius"));A==p.Fc&&D==m.FK||A==p.Db&&D==m.FK?this.Nh.set("borderBottomRightRadius",0):this.Nh.set("borderBottomRightRadius",this.G("borderBottomRightRadius","borderBottomRadius","borderRightRadius",
"borderRadius"));this.Nh.wa({paddingLeft:this.G("pagePaddingLeft"),paddingTop:this.G("pagePaddingTop"),paddingRight:this.G("pagePaddingRight"),paddingBottom:this.G("pagePaddingBottom"),borderLeftSize:this.G("borderLeftSize","borderSize"),borderTopSize:this.G("borderTopSize","borderSize"),borderRightSize:this.G("borderRightSize","borderSize"),borderBottomSize:this.G("borderBottomSize","borderSize"),borderLeftColor:this.G("borderLeftColor","borderColor"),borderTopColor:this.G("borderTopColor","borderColor"),
borderRightColor:this.G("borderRightColor","borderColor"),borderBottomColor:this.G("borderBottomColor","borderColor"),shadow:this.G("shadow")&&this.aLa(),shadowHorizontalLength:this.G("shadowHorizontalLength"),shadowVerticalLength:this.G("shadowVerticalLength"),shadowBlurRadius:this.G("shadowBlurRadius"),shadowSpread:this.G("shadowSpread"),shadowColor:this.G("shadowColor"),backgroundOpacity:this.G("backgroundOpacity"),backgroundColor:this.G("backgroundColor"),backgroundColorRatios:this.G("backgroundColorRatios")});
A==p.Tc||A==p.Fc?this.Nh.set("backgroundColorDirection",n.Laa):this.Nh.set("backgroundColorDirection",n.kZ)}if(z)for(E=0;E<this.il.length;E++)this.il[E].set("visible",E==this.Hg);e.prototype.jb.call(this)};t.prototype.aLa=function(){var u;return((u=this.BI)===null||u===void 0?void 0:u.getType())===q.DOM};return t}(e)});
define("tdv/player/script/TabPanel",["require","tdv/view/containers/tabpanel/TabPanel","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/view/containers/tabpanel/TabPanel");return a("tdv/player/parser/ClassInfo").define("TabPanel",l,function(){l.call(this)})});
define("tdv/view/containers/tabpanel/Page",["require","exports","tdv/view/containers/Container"],function(a,l,k){return function(n){function g(){var h=n.call(this)||this;h.df("Page");h.set("label","");return h}O(g,n);g.prototype.Ob=function(){n.prototype.Ob.call(this);this.j("visible")};return g}(k)});
define("tdv/player/script/TabPanelPage",["require","tdv/view/containers/tabpanel/Page","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/view/containers/tabpanel/Page");return a("tdv/player/parser/ClassInfo").define("TabPanelPage",l,function(){l.call(this)})});
define("tdv/player/script/TargetPanoramaCameraMovement",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("TargetPanoramaCameraMovement",l,function(){l.call(this)})});
define("tdv/player/script/TargetRotationalCameraDisplayMovement",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("TargetRotationalCameraDisplayMovement",l,function(){l.call(this)})});
define("tdv/player/script/TiledImageResourceLevel",["require","tdv/player/script/ImageResourceLevel","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/player/script/ImageResourceLevel");return a("tdv/player/parser/ClassInfo").define("TiledImageResourceLevel",l,function(){l.call(this)})});
define("tdv/player/script/TripodCapPanoramaOverlay",["require","tdv/player/parser/ClassInfo","tdv/player/script/CapPanoramaOverlay"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/CapPanoramaOverlay");return l.define("TripodCapPanoramaOverlay",k,function(){k.call(this)})});
define("tdv/player/script/ThumbnailGrid","require tdv/constants/EventName tdv/view/list/thumbgrid/ThumbnailGrid tdv/player/parser/ClassInfo tdv/player/script/helper/ButtonProperty tdv/view/constants/ButtonMode tdv/view/images/fliputil".split(" "),function(a){var l=a("tdv/constants/EventName"),k=a("tdv/view/list/thumbgrid/ThumbnailGrid"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/player/script/helper/ButtonProperty"),h=a("tdv/view/constants/ButtonMode"),e=a("tdv/view/images/fliputil");a=n.define("ThumbnailGrid",
k,function(){k.call(this);this.Rd=null;this.set("itemMode","normal");this.js=!1;this.JQ=new g(this,"buttonScrollDown",h.Ze);this.JQ.bind(l.la,this.uOa,this);this.KQ=new g(this,"buttonScrollLeft",h.Ze);this.KQ.bind(l.la,this.scrollLeft,this);this.LQ=new g(this,"buttonScrollRight",h.Ze);this.LQ.bind(l.la,this.xOa,this);this.MQ=new g(this,"buttonScrollUp",h.Ze);this.MQ.bind(l.la,this.yOa,this);this.bind(l.V,this.q3a,this)});a.prototype.Lk=function(){k.prototype.Lk.call(this);this.rI()};a.prototype.sI=
function(){k.prototype.sI.call(this);this.rI()};a.prototype.rI=function(){this.JQ.set("visible",!this.js||this.dO());this.MQ.set("visible",!this.js||this.fO());this.KQ.set("visible",!this.js||this.u5());this.LQ.set("visible",!this.js||this.v5())};a.prototype.set=function(b,c){if(b=="itemMode")switch(c){case "thumbnail-only":this.set("itemLabelFunction",this.kH);this.set("itemThumbnailUrlFunction",this.$R);this.set("itemTooltipFunction",this.Dy);this.set("itemSourceProperties",["label","media.label",
"media.thumbnailUrl","media.flipImageHorizontally"]);break;case "label-only":this.set("itemLabelFunction",this.Dy);this.set("itemThumbnailUrlFunction",this.kH);this.set("itemTooltipFunction",this.kH);this.set("itemSourceProperties",["label","media.label"]);break;default:this.set("itemLabelFunction",this.Dy),this.set("itemThumbnailUrlFunction",this.$R),this.set("itemTooltipFunction",this.Dy),this.set("itemSourceProperties",["label","media.label","media.thumbnailUrl","media.flipImageHorizontally"])}else b==
"playList"?(this.Rd&&this.Rd.h("change",this.Vy,this),(this.Rd=c)?(this.set("items",this.Rd.get("items")),this.set("selectedIndex",this.Rd.get("selectedIndex")),this.Rd.bind("change",this.Vy,this,!0)):this.set("items",[])):b=="hideScrollButtons"?(this.js=c,this.rI()):k.prototype.set.call(this,b,c)};a.prototype.get=function(b,c){switch(b){case "playList":return this.Rd;default:return k.prototype.get.call(this,b,c)}};a.prototype.Vy=function(){this.set("items",this.Rd.get("items"));this.set("selectedIndex",
this.Rd.get("selectedIndex"))};a.prototype.q3a=function(){this.Rd&&this.Rd.set("selectedIndex",this.get("selectedIndex"))};a.prototype.kH=function(){};a.prototype.Dy=function(b){return b.get("label")||b.get("media").get("label")};a.prototype.$R=function(b){b=b.get("media");var c=b.get("thumbnailUrl");b.get("flipImageHorizontally")&&(c=e.cGa(c));return c};return a});
define("tdv/player/script/ThumbnailList","require tdv/constants/EventName tdv/view/list/thumblist/ThumbnailList tdv/player/parser/ClassInfo tdv/player/script/helper/ButtonProperty tdv/view/constants/ButtonMode tdv/view/images/fliputil".split(" "),function(a){var l=a("tdv/constants/EventName"),k=a("tdv/view/list/thumblist/ThumbnailList"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/player/script/helper/ButtonProperty"),h=a("tdv/view/constants/ButtonMode"),e=a("tdv/view/images/fliputil");a=n.define("ThumbnailList",
k,function(){k.call(this);this.Rd=null;this.js=!1;this.JQ=new g(this,"buttonScrollDown",h.Ze);this.JQ.bind(l.la,this.uOa,this);this.KQ=new g(this,"buttonScrollLeft",h.Ze);this.KQ.bind(l.la,this.scrollLeft,this);this.LQ=new g(this,"buttonScrollRight",h.Ze);this.LQ.bind(l.la,this.xOa,this);this.MQ=new g(this,"buttonScrollUp",h.Ze);this.MQ.bind(l.la,this.yOa,this);this.bind(l.V,this.r3a,this)});a.prototype.Lk=function(){k.prototype.Lk.call(this);this.rI()};a.prototype.sI=function(){k.prototype.sI.call(this);
this.rI()};a.prototype.rI=function(){this.JQ.set("visible",!this.js||this.dO());this.MQ.set("visible",!this.js||this.fO());this.KQ.set("visible",!this.js||this.u5());this.LQ.set("visible",!this.js||this.v5())};a.prototype.set=function(b,c){if(b=="itemMode")switch(c){case "thumbnail-only":this.set("itemLabelFunction",this.kH);this.set("itemThumbnailUrlFunction",this.$R);this.set("itemTooltipFunction",this.Dy);this.set("itemSourceProperties",["label","media.label","media.thumbnailUrl","media.flipImageHorizontally"]);
break;case "label-only":this.set("itemLabelFunction",this.Dy);this.set("itemThumbnailUrlFunction",this.kH);this.set("itemTooltipFunction",this.kH);this.set("itemSourceProperties",["label","media.label"]);break;default:this.set("itemLabelFunction",this.Dy),this.set("itemThumbnailUrlFunction",this.$R),this.set("itemTooltipFunction",this.Dy),this.set("itemSourceProperties",["label","media.label","media.thumbnailUrl","media.flipImageHorizontally"])}else b=="playList"?(this.Rd&&this.Rd.h("change",this.Vy,
this),(this.Rd=c)?(this.set("items",this.Rd.get("items")),this.Rd.bind("change",this.Vy,this)):this.set("items",[])):b=="hideScrollButtons"?(this.js=c,this.rI()):k.prototype.set.call(this,b,c)};a.prototype.get=function(b,c){switch(b){case "playList":return this.Rd;default:return k.prototype.get.call(this,b,c)}};a.prototype.Vy=function(){this.set("items",this.Rd.get("items"));this.set("selectedIndex",this.Rd.get("selectedIndex"))};a.prototype.r3a=function(){this.Rd&&this.Rd.set("selectedIndex",this.get("selectedIndex"))};
a.prototype.kH=function(){};a.prototype.Dy=function(b){return b.get("label")||b.get("media").get("label")};a.prototype.$R=function(b){b=b.get("media");var c=b.get("thumbnailUrl");b.get("flipImageHorizontally")&&(c=e.cGa(c));return c};return a});define("tdv/player/script/UIComponent",["require","tdv/view/core/UIComponent","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/view/core/UIComponent");return a("tdv/player/parser/ClassInfo").define("UIComponent",l,function(){l.call(this)})});
define("tdv/player/script/Video",["require","tdv/player/parser/ClassInfo","tdv/player/script/Media"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/Media");a=l.define("Video",k,function(){k.call(this);this.Ja=void 0});a.prototype.iw=function(){this.get("video");return[]};return a});
define("tdv/player/script/VideoPanorama",["require","tdv/player/parser/ClassInfo","tdv/player/script/Panorama"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/Panorama");return l.define("VideoPanorama",k,function(){k.call(this)})});
define("tdv/player/script/Video360Resource",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");a=a("tdv/player/parser/ClassInfo").define("Video360Resource",l,function(){l.call(this)});a.prototype.get=function(k,n){if(n===void 0)switch(k){case "gain":n=1}switch(k){case "levels":n=[this];break;case "subtitlesURL":case "gain":for(var g=l.prototype.get.call(this,k),h=this.get("levels"),e=0;h&&e<h.length&&g===void 0;e++){var b=h[e];b!=this&&(g=
b.get(k))}return g!==void 0?g:n}return l.prototype.get.call(this,k,n)};return a});
define("tdv/player/script/Video360",["require","tdv/player/parser/ClassInfo","tdv/player/script/SphericPanoramaFrame","tdv/player/script/VideoPanorama","tdv/player/script/Video360Resource"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/SphericPanoramaFrame"),n=a("tdv/player/script/VideoPanorama"),g=a("tdv/player/script/Video360Resource");a=l.define("Video360",n,function(){n.call(this);this.oq=this.JN=this.Jb=void 0});a.prototype.set=function(h,e){h=="video"?this.TVa(e):
h=="videoStereo"?this.UVa(e):n.prototype.set.call(this,h,e)};a.prototype.get=function(h,e){return h=="video"?this.Jb!==void 0?this.Jb:e:h=="videoStereo"?this.JN!==void 0?this.JN:e:n.prototype.get.call(this,h,e)};a.prototype.TVa=function(h){this.Jb!=h&&(this.Jb=h,h=n.prototype.get.call(this,"frames")||[],this.Jb&&(h.length==0&&h.push(new k),h[0].set("sphere",this.eza(this.Jb))),n.prototype.set.call(this,"frames",h.slice()))};a.prototype.UVa=function(h){this.JN!=h&&(this.JN=h,h=n.prototype.get.call(this,
"frames")||[],this.JN&&(h.length==0&&h.push(new k),h[0].set("stereoSphere",this.eza(this.JN))),n.prototype.set.call(this,"frames",h.slice()))};a.prototype.eza=function(h){if(Array.isArray(h)){if(h.length==0)return;if(h.length==1&&l.Qa("Video360Resource",h[0]))return h[0];var e=[];h.forEach(function(b){e=e.concat(b.get("levels")||[b])});h=new g;h.set("levels",e)}return h};return a});
define("tdv/player/script/Video360Player",["require","tdv/player/parser/ClassInfo","tdv/player/script/PanoramaPlayer"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/PanoramaPlayer");return l.define("Video360Player",k,function(){k.call(this)})});
define("tdv/player/script/Video360PlayListItem",["require","tdv/player/parser/ClassInfo","tdv/player/script/MediaPlayer","tdv/player/script/PlayListItem"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/MediaPlayer"),n=a("tdv/player/script/PlayListItem");a=l.define("Video360PlayListItem",n,function(){n.call(this)});a.prototype.start=function(){n.prototype.start.call(this);var g=this.get("player");g&&(g.bind(k.ai,this.$o,this),g.set("video",this.get("media")),g.set("camera",
this.get("camera")),g.set("startTime",this.get("startTime")))};a.prototype.stop=function(){var g=this.get("player");g&&(g.h(k.ai,this.$o,this),g.get("video")==this.get("media")&&g.set("video",null));n.prototype.stop.call(this)};a.prototype.$o=function(g){g.data.media==this.get("media")&&(this.get("player").h(k.ai,this.$o,this),this.get("player").bind(k.lo,this.Fs,this),this.CD())};a.prototype.Fs=function(g){g.data.media==this.get("media")&&(this.get("player").h(k.lo,this.Fs,this),this.stop(),this.end())};
return a});define("tdv/player/script/Video360ResourceLevel",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("Video360ResourceLevel",l,function(){l.call(this)})});define("tdv/player/script/VideoCue",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("VideoCue",l,function(){l.call(this)})});
define("tdv/player/script/VideoPanoramaOverlay","require tdv/binding/Bindable tdv/constants/EventName tdv/constants/PlaybackState tdv/events/Event tdv/player/parser/ClassInfo tdv/player/script/helper/PlaybackPositionHelper".split(" "),function(a){var l=a("tdv/binding/Bindable"),k=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/events/Event"),h=a("tdv/player/parser/ClassInfo"),e=a("tdv/player/script/helper/PlaybackPositionHelper");a=h.define("VideoPanoramaOverlay",l,function(){l.call(this);
this.Ed=void 0});a.prototype.play=a.prototype.play=function(){this.set("state",n.PLAYING)};a.prototype.pause=a.prototype.pause=function(){this.set("state",n.Yb)};a.prototype.stop=a.prototype.stop=function(){this.set("state",n.ca)};a.prototype.set=function(b,c){var d=!1;switch(b){case "state":var f=this.get("state")||n.ca;f==n.ca&&c==n.PLAYING&&this.m(k.Np);f!=c&&this.m(new g(k.$e,{oldState:f,state:c}));break;case "enabledInCardboard":this.set("enabledInVR",c);break;case "distance":case "hfov":case "opacity":case "pitch":case "rotationX":case "rotationY":case "roll":case "vfov":case "yaw":case "playbackPositions":this.Ed=
void 0,d=!0}l.prototype.set.call(this,b,c);d&&b!="playbackPositions"&&this.m(k.N("playbackPositions"))};a.prototype.get=function(b,c){switch(b){case "playbackPositions":return this.Ed===void 0&&(this.Ed=e.Wma(this)),this.Ed}return l.prototype.get.call(this,b,c)};return a});
define("tdv/player/script/VideoPlaneModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/PlaneModel3DObject"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/PlaneModel3DObject");return l.define("VideoPlaneModel3DObject",k,function(){k.call(this)})});
define("tdv/player/view/video/control/CueController","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/constants/PlaybackState".split(" "),function(a){function l(b,c,d){this.time=b;this.cue=c;this.action=d}var k=a("tdv/utils"),n=a("tdv/constants/EventName"),g=a("tdv/events/Event"),h=a("tdv/events/EventDispatcher"),e=a("tdv/constants/PlaybackState");a=k.extend(h,function(b){h.call(this);this.o=b;this.hd=null;this.Zl=!1;this.hk=[];this.Co=void 0;this.nf=[]});
a.prototype.clear=function(){this.o=null;this.rG();this.hk=[];this.nf=[]};a.prototype.start=function(b){this.end();this.Hia(b);this.Bca();this.jja();this.yI()};a.prototype.Hia=function(b){this.rG();this.hd=b;this.hd.bind(n.N("currentTime"),this.yI,this,!0);this.hd.bind(n.N("state"),this.jja,this,!0);this.hd.bind(n.Sb,this.hV,this,!0)};a.prototype.rG=function(){this.hd&&(this.hd.h(n.N("currentTime"),this.yI,this),this.hd.h(n.N("state"),this.jja,this),this.hd.h(n.Sb,this.hV,this),this.hd=null)};a.prototype.end=
function(){this.OQ();this.rG();this.Zl=!1};a.prototype.jja=function(b){b=b!=e.ca;this.Zl!=b&&((this.Zl=b)?this.X3():this.OQ())};a.prototype.hV=function(){this.yI()};a.prototype.X3=function(){this.Co=this.wL=0};a.prototype.yI=function(){if(this.hd&&this.Zl){var b=this.nf.slice(),c=this.hd.get("currentTime",0),d=c-this.wL;d<0&&(this.nf=[],this.Co=0);d=d>=0&&d<2;this.wL=c;var f;for(f=this.Co;f<this.hk.length&&!(this.hk[f].time>c);f++);for(;this.Co<f;this.Co++)c=this.hk[this.Co],c.action=="start"?(this.nf=
k.union(this.nf,[c.cue]),d&&c.cue.m(new g(n.vr))):(this.nf=k.union(this.nf,[c.cue]),d&&c.cue.m(new g(n.Sb)));b.length==this.nf.length&&k.intersection(b,this.nf).length==this.nf.length||this.QU()}};a.prototype.OQ=function(){this.nf.length>0&&(this.nf=[],this.QU())};a.prototype.QU=function(){this.hd.m(new g(n.zl,{activeCues:this.nf.slice()}))};a.prototype.Bca=function(){this.hk=[];this.hd.get("cues",[]).forEach(b=>{this.hk.push(new l(b.get("startTime",0),b,"start"));this.hk.push(new l(b.get("endTime",
Number.POSITIVE_INFINITY),b,"end"))});this.hk.sort(function(b,c){return b.time==c.time?b.action==c.start?0:b.action=="start"?-1:1:b.time-c.time})};return a});
define("tdv/player/view/video/control/DisplayController","require tdv/utils tdv/view/util/Animation tdv/events/Event tdv/events/EventDispatcher tdv/constants/EventName tdv/view/constants/ScaleMode".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/view/util/Animation"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher");a("tdv/constants/EventName");a("tdv/view/constants/ScaleMode");var h=l.extend(g,function(e,b){g.call(this);this.R=e;this.o=b;this.JH=[];this.Oa=h.Oi;this.wj=null;this.bda=
void 0;this.ik=null;this.zn=this.Zf=void 0});h.prototype.display=function(e,b){this.jca();if(this.ik!=e||this.Oa!=h.Oi)this.JH.push({video:e,startTime:b}),this.BAa()};h.prototype.Qe=function(){this.jca();this.JH.push({video:null,startTime:void 0});this.BAa()};h.prototype.clear=function(){this.Oa=h.Oi;this.jca();this.t4a();this.iCa();this.o=null};h.prototype.Ch=function(e){this.Oa==h.Oi||this.Oa!=h.rj&&this.Oa!=h.Eu&&this.Oa!=h.Ex||(this.zn+=e,e=Math.min(1,this.zn/this.Zf),this.Oa==h.rj?(this.wj.set("opacity",
e),this.R.Kc().RJ(e)):this.Oa==h.Ex?(this.wj.set("opacity",Math.min(1,e*2)),this.ik.set("opacity",Math.min(1,(1-e)*2))):this.R.Kc().CE(e),this.zn<this.Zf?this.Sa():this.nC())};h.prototype.BAa=function(){this.JH.length>0&&this.Oa==h.Oi&&this.Xr()};h.prototype.Xr=function(){this.ik&&this.m(new n(h.wF,{video:this.ik}));if(this.R.get("transitionMode","blending")=="fade_out_fade_in"&&this.ik)this.RB();else{var e=this.JH.shift();this.wj=e.video;this.bda=e.startTime;this.wj?this.wj.get("chromaColor")&&this.ik?
this.Mba():this.dG():this.ik&&this.RB()}};h.prototype.dG=function(){this.Sta();this.zn=0;this.Zf=this.R.get("transitionDuration");this.Oa=h.rj;this.R.Kc().cK();this.o.Ua(!0);this.Sa()};h.prototype.Mba=function(){this.Sta();this.zn=0;this.Zf=this.R.get("transitionDuration")*2;this.Oa=h.Ex;this.Sa()};h.prototype.RB=function(){this.wj=null;this.zn=0;this.Zf=this.R.get("transitionDuration");this.Oa=h.Eu;this.R.Kc().PE();this.ik.set("opacity",0);this.o.Ua(!1);this.Sa()};h.prototype.nC=function(){this.iCa();
this.ik=this.wj;this.wj=null;this.Oa==h.Eu?this.R.Kc().ID():this.Oa==h.rj&&this.R.Kc().WI();this.Oa=h.Oi;this.ik?this.m(new n(h.xF,{video:this.ik})):this.JH.length==0&&this.m(new n(h.Era));this.JH.length!=0&&this.Xr()};h.prototype.Sa=function(){k.requestFrame(this.Ch,this)};h.prototype.jca=function(){this.JH=[]};h.prototype.Sta=function(){this.wj&&(this.wj.set("opacity",0),this.wj.set("zIndex",1),this.ik&&this.ik.set("zIndex",0),this.wj.set("currentTime",this.bda||0),this.o.y$a(this.wj),this.m(new n(h.eaa,
{video:this.wj,startTime:this.bda})))};h.prototype.iCa=function(){this.ik&&(this.o.gOa(this.ik),this.m(new n(h.gZ,{video:this.ik})),this.ik=null)};h.prototype.t4a=function(){this.wj&&(this.o.gOa(this.wj),this.m(new n(h.gZ,{video:this.wj})),this.wj=null)};h.Oi="stopped";h.rj="blending";h.Ex="double blending";h.Eu="disolving";h.oc="request frame";h.eaa="video added";h.gZ="video removed";h.xF="video show";h.wF="video hide";h.Era="all pending videos hidden";return h});
define("tdv/player/view/video/control/PlaybackController","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/constants/PlaybackState".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),h=a("tdv/constants/PlaybackState"),e=l.extend(g,function(){g.call(this);this.hd=null;this.Ef=!1;this.Nca=h.ca});e.prototype.start=function(b){this.end();this.Hia(b)};e.prototype.end=function(){this.stop();
this.rG()};e.prototype.clear=function(){this.rG()};e.prototype.play=function(){this.hd&&this.hd.set("state",h.PLAYING)};e.prototype.pause=function(){this.hd&&this.hd.set("state",h.Yb)};e.prototype.Hqa=function(){this.hd&&(this.hd.get("state")==h.PLAYING?this.pause():this.play())};e.prototype.stop=function(){this.hd&&this.hd.set("state",h.ca)};e.prototype.Ag=function(b){this.Ef=b;this.hd&&this.hd.set("mute",this.Ef)};e.prototype.setTime=function(b){this.hd&&this.hd.set("currentTime",b)};e.prototype.getTime=
function(){if(this.hd)return this.hd.get("currentTime")};e.prototype.Hia=function(b){this.rG();this.hd=b;this.hd.set("mute",this.Ef);this.hd.bind(k.N("state"),this.pN,this,!0);this.hd.bind(k.N("currentTime"),this.zI,this,!0);this.hd.bind(k.Sb,this.hV,this,!0)};e.prototype.rG=function(){this.hd&&(this.hd.h(k.N("state"),this.pN,this),this.hd.h(k.N("currentTime"),this.zI,this),this.hd.h(k.Sb,this.hV,this),this.hd=null)};e.prototype.zI=function(){this.m(new n(e.yF,{video:this.hd,time:this.hd.get("currentTime"),
duration:this.hd.get("duration")}))};e.prototype.hV=function(){this.m(new n(e.gQ,{video:this.hd}))};e.prototype.pN=function(){var b=this.hd.get("state");this.Nca!=b&&(this.Nca=b,this.m(new n(e.gd,{state:this.Nca})))};e.gd="playback state change";e.gQ="video end";e.yF="video time change";return e});
define("tdv/player/view/video/control/Controller","require tdv/utils tdv/constants/PlaybackState tdv/events/Event tdv/events/EventDispatcher tdv/player/view/video/control/CueController tdv/player/view/video/control/DisplayController tdv/player/view/video/control/PlaybackController".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/PlaybackState"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),h=a("tdv/player/view/video/control/CueController"),e=a("tdv/player/view/video/control/DisplayController"),
b=a("tdv/player/view/video/control/PlaybackController"),c=l.extend(g,function(d,f){g.call(this);this.R=d;this.o=f;this.o.set("visible",!1);this.Wa=new e(this.R,this.o);this.Ta=new b(this.o);this.bs=new h(this.o);this.Wa.bind(e.wF,this.Fs,this,!0);this.Wa.bind(e.xF,this.$o,this,!0);this.Wa.bind(e.eaa,this.kBa,this,!0);this.Wa.bind(e.gZ,this.mBa,this,!0);this.Wa.bind(e.Era,this.m2a,this,!0);this.Ta.bind(b.gd,this.Kf,this,!0);this.Ta.bind(b.gQ,this.SC,this,!0);this.Ta.bind(b.yF,this.sT,this,!0)});c.prototype.clear=
function(){this.Wa.clear();this.Ta.clear();this.bs.clear();this.Wa.h(e.wF,this.Fs,this);this.Wa.h(e.xF,this.$o,this);this.Wa.h(e.eaa,this.kBa,this);this.Wa.h(e.gZ,this.mBa,this);this.Ta.h(b.gd,this.Kf,this);this.Ta.h(b.gQ,this.SC,this);this.Ta.h(b.yF,this.sT,this);this.R=this.o=this.bs=this.Ta=this.Wa=null};c.prototype.i9=function(d,f){this.o.set("visible",!0);this.Wa.display(d,f)};c.prototype.MA=function(){this.Wa.Qe();this.Ta.end();this.bs.end()};c.prototype.play=function(){this.Ta.play()};c.prototype.stop=
function(){this.Ta.stop()};c.prototype.pause=function(){this.Ta.pause()};c.prototype.Ag=function(d){this.Ta.Ag(d)};c.prototype.setTime=function(d){this.Ta.setTime(d)};c.prototype.getTime=function(){return this.Ta.getTime()};c.prototype.Hqa=function(){this.Ta.Hqa()};c.prototype.kBa=function(d){var f=d.data.video;this.Ta.start(f,d.data.startTime);this.bs.start(f)};c.prototype.mBa=function(){};c.prototype.$o=function(d){d=d.data.video;d.get("autoplay")&&d.get("state")!=k.PLAYING&&d.get("state")!=k.Yb&&
d.set("state",k.PLAYING);this.m(new n(c.xF,{video:d}))};c.prototype.Fs=function(d){this.m(new n(c.wF,{video:d.data.video}))};c.prototype.m2a=function(){this.o.set("visible",!1)};c.prototype.SC=function(d){this.m(new n(c.gQ,{video:d.data.video}))};c.prototype.sT=function(d){this.m(new n(c.yF,{video:d.data.video,time:d.data.time,duration:d.data.duration}))};c.prototype.Kf=function(d){this.m(new n(c.gd,{state:d.data.state}))};c.xF="videoShow";c.wF="videoHide";c.gQ="videoEnd";c.yF="videoTimeChange";c.gd=
"playbackStateChange";return c});
define("tdv/player/view/video/renderer/RendererOverlay","require exports tdv/constants/EventName tdv/view/constants/Cursor tdv/view/core/UIComponent tdv/player/view/UserInteractionWindow".split(" "),function(a,l,k,n,g,h){return function(e){function b(){var c=e.call(this)||this;c.set("toolTipDisabled",!0);c.set("cursor",n.wB);c.bind(k.Zb,c.kd,c,!0);c.KH=new h.Csa;c.KH.Fpa(h.Csa.jaa);c.KH.gg(c.L2=!1);[c.KH.bc()].forEach(function(d,f){d.style.position="absolute";d.style.left="0";d.style.top="0";d.style.right=
"0";d.style.bottom="0";d.style.overflow="hidden";d.style.zIndex=f}.bind(c));return c}O(b,e);b.prototype.Ib=function(){e.prototype.Ib.call(this);[this.KH.bc()].forEach(function(c){c.parentElement||this.va().vk(c)}.bind(this))};b.prototype.Opa=function(c,d){this.L2!=c&&(this.L2=c,this.KH.IOa(d),this.KH.gg(c))};b.prototype.kd=function(){this.KH.setSize(this.gb(),this.Kb())};return b}(g)});
define("tdv/player/view/video/renderer/adapters/VideoAdapter","require exports tdv/constants/EventName tdv/view/constants/ScaleMode tdv/binding/BindingsHandler tdv/player/view/webgl/components tdv/view/av/VideoPlayer tdv/player/view/renderer2d/adapters/CameraAdapter tdv/player/view/util/XR".split(" "),function(a,l,k,n,g,h,e,b,c){return function(){function d(f,m,p,q){this.video=f;this.yg=m;this.renderer=p;this.cb=q;this.Q7=this.Q7.bind(this);this.DA=this.DA.bind(this);this.Rn=this.Rn.bind(this);this.c8=
this.c8.bind(this);g.ba(this.video,["video.levels.url","video.levels.srcObject","video.levels.width","video.levels.height"],this.Q7,!0);g.ba(this.video,["zIndex"],this.DA,!0);g.ba(this.cb,["distance"],this.Rn,!0);g.ba(this.video,["scaleMode"],this.c8,!0);this.renderer.bind(k.Zb,this.It,this,!0);c.M.bind(k.V,this.Ya,this,!0);this.It();this.au()}d.prototype.dispose=function(){g.da(this.video,["video.levels.url","video.levels.srcObject","video.levels.width","video.levels.height"],this.Q7);g.da(this.video,
["zIndex"],this.DA);g.da(this.cb,["distance"],this.Rn);g.da(this.video,["scaleMode"],this.c8);this.renderer.h(k.Zb,this.It,this);c.M.h(k.V,this.Ya,this);this.Ca()};d.prototype.Q7=function(){var f,m,p=e.Ak(this.video.get("video"));this.level!==p&&(this.level=p,this.videoWidth=((f=this.level)===null||f===void 0?void 0:f.get("width"))||100,this.videoHeight=((m=this.level)===null||m===void 0?void 0:m.get("height"))||100,this.fo(),this.hg())};d.prototype.DA=function(){var f=this.video.get("zIndex");this.zIndex!==
f&&(this.zIndex=f,this.hg())};d.prototype.Rn=function(){var f=this.cb.get("distance");this.distance!==f&&(this.distance=f,this.hg())};d.prototype.c8=function(){var f=this.video.get("scaleMode");this.zE!==f&&(this.zE=f,this.hg())};d.prototype.It=function(){var f=this.renderer.Uh()||1,m=this.renderer.Th()||1;if(this.Ew!==f||this.Dw!==m)this.Ew=f,this.Dw=m,this.hg()};d.prototype.Ya=function(){this.hg()};d.prototype.hg=function(){if(this.F){var f=this.distance-.001*this.zIndex,m=c.isPresenting?2048:this.Ew,
p=c.isPresenting?1024:this.Dw,q=2*Math.tan(Math.PI/180*b.qu*.5)*f,r=q*p/m;switch(this.zE){case n.NONE:m=this.videoWidth*q/m;p=this.videoHeight*r/p;break;case n.Lp:m=q;p=this.videoHeight*q/this.videoWidth;break;case n.Qk:m=this.videoWidth*r/this.videoHeight;p=r;break;case n.Dr:this.videoWidth*r>this.videoHeight*q?(m=this.videoWidth*r/this.videoHeight,p=r):(m=q,p=this.videoHeight*q/this.videoWidth);break;default:this.videoWidth*r>this.videoHeight*q?(m=q,p=this.videoHeight*q/this.videoWidth):(p=r,m=
this.videoWidth*r/this.videoHeight)}r=this.F.O(h.sa);r.Ge=m;r.We=p;r.positionZ=-f}};d.prototype.fo=function(){if(this.F){var f=this.F.O(h.qo);f.properties=this.video;f.M=this.video;f.ira=this.video.get("video")}};d.prototype.bra=function(){if(this.F){var f=this.F.O(h.vd,!0);f.bB=!0;f.SE=!0;f.M=this.video;f.kt=!0;f.Tt=!0}};d.prototype.au=function(){var f=this.yg.T.rc("Video");f.K(h.pb).F=this.yg;f.K(h.Plane);f.K(h.sa);f.K(h.qo);f.K(h.vd);this.F=f;this.hg();this.fo();this.bra()};d.prototype.Ca=function(){this.F&&
(this.F.T.dd(this.F),this.F=null)};return d}()});
define("tdv/player/view/video/renderer/adapters/PlayAdapter","require exports tdv/binding/Bindable tdv/constants/EventName tdv/view/util/Assets tdv/binding/BindingsHandler tdv/player/view/webgl/components tdv/player/script/ImageResourceLevel tdv/player/script/ImageResource tdv/player/view/util/XR".split(" "),function(a,l,k,n,g,h,e,b,c,d){return function(){function f(m,p){this.yg=m;this.cb=p;this.visible=!1;this.Rn=this.Rn.bind(this);h.ba(this.cb,["distance"],this.Rn,!0);d.M.bind(n.V,this.Ya,this,
!0)}f.prototype.dispose=function(){h.da(this.cb,["distance"],this.Rn);d.M.h(n.V,this.Ya,this);this.Ca()};f.prototype.gg=function(m){this.visible!=m&&(this.visible=m,this.fo())};f.prototype.Rn=function(){var m=this.cb.get("distance");this.distance!==m&&(this.distance=m,this.hg())};f.prototype.Ya=function(){this.Rw()};f.prototype.Rw=function(){d.isPresenting!=!!this.F&&(d.isPresenting?this.au():this.Ca())};f.prototype.hg=function(){if(this.F){var m=this.distance-.005,p=2*Math.tan(Math.PI/180*f.qu*.5)*
m,q=p*g.qZ/g.NK,r=this.F.O(e.sa);r.Ge=p;r.We=q;r.positionZ=-m}};f.prototype.fo=function(){if(this.F){if(!this.lw){var m=new c,p=new b;p.set("url",g.tx);p.set("width",g.NK);p.set("height",g.qZ);m.set("levels",[p]);this.lw=m}this.properties||(m=new k,m.set("width",g.NK),m.set("height",g.qZ),m.set("opacity",1),this.properties=m);m=this.F.O(e.Mi);m.properties=this.properties;m.M=this.lw;m.lw=this.lw;this.properties.set("enabled",this.visible)}};f.prototype.au=function(){if(!this.F){var m=this.yg.T.rc("VideoPlay");
m.K(e.pb).F=this.yg;m.K(e.Plane);m.K(e.sa);m.K(e.Mi);this.F=m;this.hg();this.fo()}};f.prototype.Ca=function(){this.F&&(this.F.T.dd(this.F),this.F=null)};f.qu=10;return f}()});
define("tdv/player/view/video/renderer/adapters/PlaybackBarAdapter",["require","exports","tdv/constants/EventName"],function(a,l,k){return function(){function n(g){this.cb=g;this.ag=this.cb.get("application");this.enabled=!1;this.container=this.uE=this.ig=null}n.prototype.dispose=function(){this.Ua(!1)};n.prototype.Ua=function(g){this.enabled!==g&&((this.enabled=g)?this.tbb():this.Lbb())};n.prototype.tbb=function(){if(!this.ig){this.Mab();this.ig=this.ag.yi("XRPanel");this.ig.set("content",this.container);
this.ig.set("autoCenter",!1);this.ig.set("modal",!1);this.ig.set("yaw",0);this.ig.set("pitch",-45);this.ig.set("distance",1);this.ig.set("draggable",!1);var g=Math.PI/180;g=2*this.ig.get("distance")*Math.tan(n.qu/2*g)/n.jta;this.ig.set("pixelScale",g);this.ig.vpa(this.cb.get("application"));this.ig.PHa()}};n.prototype.Lbb=function(){this.ig&&(this.ig.Xla(),this.Ebb(),this.ag.Yv(this.ig),this.ig=null)};n.prototype.Mab=function(){if(!this.uE){var g=this.ag.yi("PlaybackBar");g.set("left",25);g.set("top",
22);g.set("right",25);g.set("height",4);g.set("backgroundColor",["#FFFFFF"]);g.set("backgroundOpacity",1);g.set("borderColor","#FFFFFF");g.set("borderRadius",0);g.set("borderSize",0);g.set("liveDragging",!0);g.set("playheadBackgroundColor",["#3399FF"]);g.set("playheadBorderRadius",0);g.set("playheadBorderColor","#ffffff");g.set("playheadBorderSize",2);g.set("playheadBorderRadius",10);g.set("playheadHeight",20);g.set("playheadWidth",20);g.set("playheadShadow",!1);g.set("barBackgroundColor",["#3399FF"]);
g.set("barBackgroundColorRatios",[0]);g.set("barBorderColor","#000000");g.set("barBorderSize",0);g.set("barBorderRadius",0);this.uE=g}if(!this.container){g=this.ag.yi("Container");g.set("width",n.jta);g.set("height",50);g.set("backgroundColor","#ffffff");g.set("backgroundOpacity",.2);g.set("borderRadius",25);g.set("children",[this.uE]);g.set("opacity",.3);var h=this.ag.yi("FadeInEffect");h.set("duration",500);h.set("easing","cubic_in");g.set("showEffect",h);h=this.ag.yi("FadeOutEffect");h.set("duration",
500);h.set("easing","cubic_out");g.set("hideEffect",h);g.bind(k.tc,this.EHa,this,!0);g.bind(k.Eb,this.DHa,this,!1);this.container=g}this.Jt||(this.Jt=this.ag.yi("Effect"),this.Jt.set("duration",300),this.Jt.set("easing","cubic_in"),this.Jt.bind(k.me,this.UMa,this,!0));this.I$a()};n.prototype.UMa=function(){this.container.set("opacity",.2+.8*this.Jt.wm())};n.prototype.Ebb=function(){this.mhb();this.uE&&(this.ag.Yv(this.uE),this.uE=null);this.Jt&&(this.Jt.h(k.me,this.UMa,this),this.ag.Yv(this.Jt),this.Jt=
null);this.container&&(this.container.h(k.tc,this.EHa,this),this.container.h(k.Eb,this.DHa,this),this.ag.Yv(this.container),this.container=null)};n.prototype.I$a=function(){this.aNa=this.cb.get("externalPlaybackBar");this.cb.set("externalPlaybackBar",this.uE)};n.prototype.mhb=function(){this.cb.get("externalPlaybackBar")===this.uE&&(this.cb.set("externalPlaybackBar",this.aNa),this.aNa=null)};n.prototype.EHa=function(){this.Jt.play()};n.prototype.DHa=function(){this.Jt.reverse()};n.jta=500;n.qu=40;
return n}()});
define("tdv/player/view/video/renderer/Renderer","require exports tdv/binding/BindingsHandler tdv/player/view/renderer2d/Renderer tdv/player/view/video/renderer/RendererOverlay tdv/player/view/video/renderer/adapters/VideoAdapter tdv/player/view/video/renderer/adapters/PlayAdapter tdv/player/view/video/renderer/adapters/PlaybackBarAdapter tdv/player/view/util/XR".split(" "),function(a,l,k,n,g,h,e,b,c){return function(d){function f(m,p,q){m=d.call(this,m,p,q)||this;m.qoa=m.qoa.bind(m);m.Cc=null;m.P4=
[];m.xI=[];m.Q9();k.ba(m.HC,["displayPlaybackBarInXR","displayPlaybackBar"],m.qoa,!0);return m}O(f,d);f.prototype.Ib=function(){d.prototype.Ib.call(this);this.Cc==null&&(this.Cc=new g,this.Cc.wa({left:0,top:0,right:0,bottom:0}),this.mb(this.Cc),this.Q9())};f.prototype.lX=function(){var m=this;d.prototype.lX.call(this);this.ef.O8(this.HC.get("useVideoFrameRate")?2:void 0);this.abb();this.$ab();this.P4.forEach(function(p){m.QHa(p)})};f.prototype.soa=function(){d.prototype.soa.call(this);this.Q9();this.Xqa()};
f.prototype.y$a=function(m){this.P4.push(m);this.ef&&this.QHa(m)};f.prototype.abb=function(){this.Q3a=new b(this.R)};f.prototype.QHa=function(m){var p=new h(m,this.k0.ij(),this,this.R);this.xI.push(p);this.ef.O8(this.HC.get("useVideoFrameRate")&&this.xdb(m)<45?2:void 0);this.Q8(this.xI.length>0)};f.prototype.$ab=function(){this.HBa=new e(this.k0.ij(),this.R)};f.prototype.gOa=function(m){m=this.P4.indexOf(m);m<0||(this.P4.splice(m,1),this.ef&&this.Kbb(this.xI[m]))};f.prototype.Kbb=function(m){var p=
this.xI.indexOf(m);p<0||(this.xI.splice(p,1),m.dispose(),this.Q8(this.xI.length>0))};f.prototype.Opa=function(m){this.L2=m;this.Q9()};f.prototype.Q9=function(){var m=this.L2&&this.xI.length>0;this.Cc&&this.Cc.Opa(m);this.HBa&&this.HBa.gg(m)};f.prototype.xdb=function(m){m=m.get("video");return(m&&m.get("levels")||[]).reduce(function(p,q){return Math.max(p,q.get("framerate"))},0)||30};f.prototype.Ya=function(){d.prototype.Ya.call(this);this.Xqa()};f.prototype.qoa=function(){this.Xqa()};f.prototype.Xqa=
function(){var m,p=c.isPresenting&&this.ER&&this.HC.get("displayPlaybackBarInXR",this.HC.get("displayPlaybackBar"));(m=this.Q3a)===null||m===void 0||m.Ua(p)};return f}(n)});
define("tdv/player/script/VideoPlayer","require tdv/utils tdv/constants/EventName tdv/constants/Key tdv/player/parser/ClassInfo tdv/player/script/PlaybackMediaPlayer tdv/constants/PlaybackState tdv/player/view/video/control/Controller tdv/player/view/video/renderer/Renderer tdv/view/util/KeyboardControl".split(" "),function(a){var l=a("tdv/utils"),k=a("tdv/constants/EventName"),n=a("tdv/constants/Key"),g=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/PlaybackMediaPlayer"),e=a("tdv/constants/PlaybackState"),
b=a("tdv/player/view/video/control/Controller"),c=a("tdv/player/view/video/renderer/Renderer"),d=a("tdv/view/util/KeyboardControl");a=g.define("VideoPlayer",h,function(){h.call(this,"video");this.AH=this.AH.bind(this);this.ds=this.W3=this.zI=this.ej=!1;this.U=this.o=null;this.$b=this.tf=0;this.No=!1;this.Zd=l.ar(this.Qh,this)});a.prototype.seek=function(f){this.$H(f)};a.prototype.play=function(){this.FH()};a.prototype.pause=function(){this.EH()};a.prototype.stop=function(){this.QC()};a.prototype.restart=
function(){this.PC()};a.prototype.set=function(f,m){if(this.get(f)!=m){switch(f){case "startTime":this.W3=!0;this.Zd();break;case "video":this.zI=!0;this.Zd();break;case "viewerArea":this.ej=!0;this.Zd();break;case "displayPlaybackBar":this.ds=!0,this.Zd()}h.prototype.set.call(this,f,m)}};a.prototype.get=function(f,m){switch(f){case "currentTime":return this.U&&this.U.getTime()||0}return h.prototype.get.call(this,f,m)};a.prototype.ir=function(f){this.No!==f&&((this.No=f)?document.addEventListener("keydown",
this.AH,!0):document.removeEventListener("keydown",this.AH,!0))};a.prototype.AH=function(f){d.rp()||(f.code==n.ta.OK||f.code==n.ta.$Y)&&this.U&&this.U.Hqa()};a.prototype.Qh=function(){this.ej&&(this.ej=!1,this.Yx(),this.get("viewerArea")&&this.Xx(),this.lU(this.get("viewerArea")),this.zI=!0);var f=!1;if(this.o&&(this.zI||this.W3)){var m=this.get("video"),p=this.get("startTime")||0;if(m&&!this.o.Vb()){this.Zd();return}this.W3=this.zI=!1;this.$b=this.tf=0;f=!0;m?(this.get("viewerArea").Kc().Ijb(),this.MJ(),
this.U.i9(m,p)):this.U.MA()}this.ds&&(this.ds=!1,f=!0);f&&this.Jz()};a.prototype.rN=function(){this.set("video",null)};a.prototype.Xx=function(){var f=this.get("application"),m=this.get("viewerArea");this.o=new c(f,m,this);this.o.wa({left:0,top:0,bottom:0,right:0});m.mb(this.o);m.bind(k.la,this.qBa,this,!0);this.U=new b(m,this.o);this.U.bind(b.xF,this.$o,this);this.U.bind(b.wF,this.Fs,this);this.U.bind(b.yF,this.sT,this,!0);this.U.bind(b.gd,this.Kf,this);f.bind(k.N("mute"),this.ZS,this);this.U.Ag(f.get("mute",
!1));this.kD(!0)};a.prototype.Yx=function(){if(this.o){this.U.h(b.xF,this.$o,this);this.U.h(b.wF,this.Fs,this);this.U.h(b.yF,this.sT,this);this.U.h(b.gd,this.Kf,this);this.U.clear();this.get("application").h(k.N("mute"),this.ZS,this);var f=this.o.getParent();f.removeChild(this.o);f.h(k.la,this.qBa,this,!0);this.o=null;this.kD(!1)}};a.prototype.ZS=function(){this.o&&this.U.Ag(this.get("application").get("mute",!1))};a.prototype.Kf=function(f){f=f.data.state;this.o&&this.o.Opa(this.get("displayPlayOverlay")&&
f!=e.PLAYING,this.tf<.5);this.Id(f)};a.prototype.$o=function(f){var m=this.get("viewerArea");(this.te=m&&m.te)&&this.te.bind(k.la,this.rBa,this,!0);this.wha=!1;f=f.data.video;f.bind(k.la,this.lBa,this,!0);this.qS(f)};a.prototype.Fs=function(f){this.te&&this.te.h(k.la,this.rBa,this,!0);this.te=null;f=f.data.video;f.h(k.la,this.lBa,this);this.pS(f)};a.prototype.sT=function(f){this.tf=f.data.time;this.$b=f.data.duration;this.Jz()};a.prototype.qBa=function(){this.wha?this.wha=!1:this.Eza()};a.prototype.lBa=
function(){this.Eza()};a.prototype.Eza=function(){switch(this.get("clickAction")){case "play_pause":this.get("state")!=e.PLAYING?this.U.play():this.U.pause()}};a.prototype.rBa=function(){this.wha=!0};a.prototype.BT=function(f){this.$H(f.data.position)};a.prototype.Xl=function(){this.U.play()};a.prototype.Dq=function(){this.U.stop()};a.prototype.Is=function(){this.U.pause()};a.prototype.$H=function(f){this.U&&this.U.setTime(f)};a.prototype.Jz=function(){if(this.o){var f=this.o.getParent();this.$b>
0&&this.get("displayPlaybackBar")?f.wa({playbackBarPosition:this.tf,playbackBarDuration:this.$b,playbackBarVisible:!0}):f.set("playbackBarVisible",!1)}};return a});
define("tdv/player/script/VideoPlayListItem",["require","tdv/player/parser/ClassInfo","tdv/player/script/MediaPlayer","tdv/player/script/PlayListItem"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/MediaPlayer"),n=a("tdv/player/script/PlayListItem");a=l.define("VideoPlayListItem",n,function(){n.call(this)});a.prototype.start=function(){n.prototype.start.call(this);var g=this.get("player");g&&(g.bind(k.ai,this.$o,this),g.set("video",this.get("media")),g.set("startTime",
this.get("startTime")))};a.prototype.stop=function(){var g=this.get("player");g&&(g.h(k.ai,this.$o,this),g.get("video")==this.get("media")&&g.set("video",null));n.prototype.stop.call(this)};a.prototype.$o=function(g){g.data.media==this.get("media")&&(this.get("player").h(k.ai,this.$o,this),this.get("player").bind(k.lo,this.Fs,this),this.CD())};a.prototype.Fs=function(g){g.data.media==this.get("media")&&(this.get("player").h(k.lo,this.Fs,this),this.stop(),this.end())};return a});
define("tdv/player/script/VideoResourceLevel",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("VideoResourceLevel",l,function(){l.call(this)})});
define("tdv/player/script/VideoResource",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo","tdv/player/view/util/Capabilities","tdv/player/script/VideoResourceLevel"],function(a){var l=a("tdv/binding/Bindable"),k=a("tdv/player/parser/ClassInfo"),n=a("tdv/player/view/util/Capabilities"),g=a("tdv/player/script/VideoResourceLevel");a=k.define("VideoResource",l,function(){l.call(this);this.rga=new g;this.rga.set("type","video/mp4");this.vga=new g;this.vga.set("type","video/ogg");this.Vka=
new g;this.Vka.set("type","video/webm")});a.prototype.get=function(h,e){switch(h){case "levels":e=[];var b=this.get("mp4Url");b&&(this.rga.set("url",b),e.push(this.rga));if(b=this.get("oggUrl"))this.vga.set("url",b),e.push(this.vga);if(b=this.get("webmUrl"))this.Vka.set("url",b),e.push(this.Vka);e.forEach(function(c){c.set("width",this.get("width"));c.set("height",this.get("height"))}.bind(this))}return l.prototype.get.call(this,h,e)};a.prototype.ql=function(){var h=this.get("webmUrl"),e=this.get("oggUrl"),
b=this.get("mp4Url");return b&&n.L6?b:h&&n.ena?h:e&&n.dna?e:b||h||e};return a});define("tdv/player/script/VignetteModel3DPostprocessing",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DPostprocessing"],function(a){var l=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/Model3DPostprocessing");return l.define("VignetteModel3DPostprocessing",k,function(){k.call(this)})});
define("tdv/view/html/WebFrame","require exports tdv/constants/EventName tdv/player/view/util/Device tdv/player/view/util/URL tdv/view/core/UIComponent tdv/view/helpers/DOMUpdateQueue tdv/view/core/visuals/VisualsType".split(" "),function(a,l,k,n,g,h,e,b){return function(c){function d(){var f=c.call(this)||this;f.df("WebFrame");f.Ld=null;f.Pc=null;f.yj=null;f.iS=null;f.Oga=f.Oga.bind(f);f.O1=f.O1.bind(f);f.bind(k.od,f.z3a,f,!0);f.bind(k.jd,f.y3a,f,!0);return f}O(d,c);d.prototype.Ob=function(){c.prototype.Ob.call(this);
this.j("url");this.j("allowTopNavigation",!0);this.j("backgroundColor","#ffffff");this.j("insetBorder",!1);this.j("scrollEnabled",!0);this.j("unloadWhenHidden",!0)};d.prototype.Z6=function(f,m){return f.getType()!==b.DOM?!1:c.prototype.Z6.call(this,f,m)};d.prototype.z3a=function(){this.lD("url")};d.prototype.y3a=function(){this.lD("url")};d.prototype.Ib=function(){c.prototype.Ib.call(this);this.Ld||(this.Ld=document.createElement("div"),this.Ld.style.position="absolute",this.Ld.style.left="0",this.Ld.style.top=
"0",this.Ld.style.width="100%",this.Ld.style.height="100%",this.va().vk(this.Ld));this.Pc||(this.Pc=document.createElement("iframe"),this.Pc.style.position="absolute",this.Pc.style.left="0",this.Pc.style.top="0",this.Pc.setAttribute("allowfullscreen","true"),this.Pc.setAttribute("allow","accelerometer; autoplay; camera; display-capture; fullscreen; geolocation; gyroscope; magnetometer; microphone; vr; xr-spatial-tracking"),this.Ld.appendChild(this.Pc));this.yj||(this.yj=document.createElement("div"),
this.yj.style.textShadow="0 0 5px rgba(255,255,255,0.5)",this.yj.style.display="none",this.yj.style.color="#000000",this.yj.style.fontWeight="300",this.yj.style.fontFamily="Tahoma, Geneva, sans-serif",this.yj.style.fontSize=n.ub()?"5vmin":"20px",this.yj.style.position="absolute",this.yj.style.top="50%",this.yj.style.left="50%",this.yj.style.textAlign="center",this.yj.style.transform="translate(-50%, -50%)",this.yj.style.width="90%",this.Ld.appendChild(this.yj))};d.prototype.jb=function(){if(this.S("url")){var f=
this.G("url");f&&this.zy?this.aDa(f):(!f||this.get("unloadWhenHidden"))&&this.aDa("");this.$("url")}this.S("insetBorder")&&(f=this.G("insetBorder"),this.Pc.setAttribute("frameborder",f?"1":"0"),this.$("insetBorder"));this.S("allowTopNavigation")&&(this.G("allowTopNavigation")?this.Pc.removeAttribute("sandbox"):this.Pc.setAttribute("sandbox","allow-downloads allow-forms allow-modals allow-orientation-lock allow-pointer-lock allow-popups allow-popups-to-escape-sandbox allow-presentation allow-same-origin allow-scripts allow-storage-access-by-user-activation"),
this.$("allowTopNavigation"));this.S("scrollEnabled")&&(f=this.G("scrollEnabled"),this.Pc.setAttribute("scrolling",f?"auto":"no"),this.Ld.style.overflow=f?"auto":"hidden",this.Ld.style["-webkit-overflow-scrolling"]=f?"touch":"auto",this.$("scrollEnabled"));c.prototype.jb.call(this)};d.prototype.ju=function(){this.Pc&&e.vbb(this.Pc,{width:this.gb()+"px",height:this.Kb()+"px"});c.prototype.ju.call(this)};d.prototype.refresh=function(){this.G("url")&&this.zy&&(this.Rea(),this.$B(),this.Sja(),this.Pc.setAttribute("src",
""),setTimeout(function(){this.KDa();this.uua();this.Pc.setAttribute("src",this.G("url"))}.bind(this),30))};d.prototype.aDa=function(f){this.Pc.getAttribute("src")!=f&&(this.Rea(),f?(this.KDa(),this.uua()):(this.$B(),this.Sja()),this.Pc.setAttribute("src",f))};d.prototype.Oga=function(){this.iS=null;this.s1a()&&this.V6a()};d.prototype.O1=function(){this.Rea();this.$B();this.Sja()};d.prototype.uua=function(){this.Pc.addEventListener("load",this.O1)};d.prototype.Sja=function(){this.Pc.removeEventListener("load",
this.O1)};d.prototype.$B=function(){this.iS&&(clearTimeout(this.iS),this.iS=null)};d.prototype.KDa=function(){this.$B();this.iS=setTimeout(this.Oga,d.VSa)};d.prototype.s1a=function(){if(window.location.protocol=="https:"){var f=this.Pc.getAttribute("src");if(g.parse(f).protocol!="https:")return!0}return!1};d.prototype.V6a=function(){this.yj.textContent="A secure web page served over HTTPS can not display insecure content served over HTTP.";this.yj.style.display="block"};d.prototype.Rea=function(){this.yj.style.display=
"none"};d.VSa=3E3;return d}(h)});define("tdv/player/script/WebFrame",["require","tdv/view/html/WebFrame","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/view/html/WebFrame");a=a("tdv/player/parser/ClassInfo").define("WebFrame",l,function(){l.call(this)});a.prototype.refresh=function(){l.prototype.refresh.call(this)};return a});
define("tdv/view/containers/windows/Window","require exports tdv/utils tdv/constants/EventName tdv/events/Event tdv/view/containers/Container tdv/view/containers/windows/BaseWindow".split(" "),function(a,l,k,n,g,h,e){return function(b){function c(){var d=b.call(this)||this;d.df("Window");d.Jea=0;d.Kea=0;d.zDa=!1;d.Yia=!1;d.bind(n.Zb,d.T9a,d,!1);d.bind(n.la,d.Q9a,d,!1);d.bind(n.EK,d.R9a,d,!1);d.bind(n.nQ,d.U9a,d,!1);d.K4=0;d.tg=new h;d.tg.wa({visible:!1,includeInLayout:!1,layout:"absolute",height:"100%",
width:"100%",backgroundOpacity:0,contentOpaque:!1});d.tg.bind(n.Zb,d.EFa,d,!1);d.tg.bind(n.nQ,d.K9a,d,!1);d.tg.bind(n.EK,d.J9a,d,!1);d.tg.bind(n.la,d.I9a,d,!1);d.tg.mb(d);return d}O(c,b);c.prototype.set=function(d,f){switch(d){case "maxWidth":this.Xka=f;this.C4();break;case "maxHeight":this.Wka=f;this.C4();break;case "shadow":this.zDa=f;this.zFa();break;default:b.prototype.set.call(this,d,f)}};c.prototype.show=function(d,f){this.p5(d);f&&this.kab();f=d.get("children");d.set("children",f.concat([this.tg]));
k.defer(function(){this.tg.set("visible",!0)}.bind(this))};c.prototype.Qe=function(){this.o5();this.set("visible",!1)};c.prototype.p5=function(d){b.prototype.p5.call(this);this.C4(d);this.tg.set("visible",!1);this.SVa()};c.prototype.o5=function(){b.prototype.o5.call(this);this.K4=0;this.I3(!1)};c.prototype.SVa=function(){var d=this.G("modal"),f=this.G("veilShowEffect"),m=this.G("veilHideEffect");d&&f?this.tg.set("showEffect",f):this.tg.set("showEffect",null);d&&m?this.tg.set("hideEffect",m):this.tg.set("hideEffect",
null)};c.prototype.kab=function(){this.set("centerX",0);this.set("centerY",0)};c.prototype.Ob=function(){this.Gl(c.bd)};c.prototype.I9a=function(){this.K4++;setTimeout(function(){this.K4>0&&this.Qe()}.bind(this),100)};c.prototype.Q9a=function(){this.K4--};c.prototype.Ixa=function(d){this.Jea=d.pageX;this.Kea=d.pageY;this.Vb().bind(n.fb,this.PFa,this,!0);this.Vb().bind(n.ab,this.QFa,this,!0)};c.prototype.PFa=function(d){this.set("centerX",this.get("centerX")+(d.pageX-this.Jea));this.set("centerY",
this.get("centerY")+(d.pageY-this.Kea));this.Jea=d.pageX;this.Kea=d.pageY;this.yFa()};c.prototype.QFa=function(){this.Vb().h(n.fb,this.PFa,this);this.Vb().h(n.ab,this.QFa,this)};c.prototype.EFa=function(){this.C4()};c.prototype.K9a=function(){this.set("visible",!0)};c.prototype.J9a=function(){this.tg.h(n.Zb,this.EFa,this);var d=this.tg.getParent();d&&d.removeChild(this.tg);this.m(new g(n.nB))};c.prototype.T9a=function(){this.yFa()};c.prototype.U9a=function(){this.I3(!0)};c.prototype.R9a=function(){this.tg.set("visible",
!1)};c.prototype.I3=function(d){this.Yia=d;this.zFa()};c.prototype.zFa=function(){b.prototype.set.call(this,"shadow",this.Yia&&this.zDa)};c.prototype.Cdb=function(d){if(this.Xka!==void 0)return this.Xka;if(d)return d.gb()};c.prototype.Bdb=function(d){if(this.Wka!==void 0)return this.Wka;if(d)return d.Kb()};c.prototype.C4=function(d){d||(d=this.getParent());b.prototype.set.call(this,"maxWidth",this.Cdb(d));b.prototype.set.call(this,"maxHeight",this.Bdb(d))};c.prototype.yFa=function(){var d=this.tg.gb(),
f=this.gb(),m=this.get("centerX");f=d*.5+m-f*.5;var p=this.Ym.u.Bd,q=this.Ym.gb(),r=Math.min(q,30);d=d-p-r;p=-(p+q-r);f<p?this.set("centerX",m+(p-f)):f>d&&this.set("centerX",m-(f-d));d=this.tg.Kb();f=this.Kb();m=this.get("centerY");f=d*.5+m-f*.5;p=this.Ym.u.ee;q=this.Ym.Kb();r=Math.min(q,5);d=d-p-r;p=-(p+q-r);f<p?this.set("centerY",m+(p-f)):f>d&&this.set("centerY",m-(f-d))};c.prototype.jb=function(){this.G("modal")?(this.Qc(c.fba,c.GZ,[this.tg],!0,!0),this.tg.set("contentOpaque",!0)):(this.tg.set("backgroundOpacity",
0),this.tg.set("contentOpaque",!1));b.prototype.jb.call(this)};c.GZ={veilOpacity:"backgroundOpacity",veilColor:"backgroundColor",veilColorRatios:"backgroundColorRatios",veilColorDirection:"backgroundColorDirection"};c.fba=Object.keys(c.GZ);c.bd=Object.assign({},e.bd,function(){for(var d=Object.assign({},e.bd,{centerX:0,centerY:0,veilShowEffect:void 0,veilHideEffect:void 0}),f=[].concat(c.fba),m=0;m<f.length;m++)d[f[m]]=void 0;return d}());return c}(e)});
define("tdv/player/script/Window",["require","tdv/view/containers/windows/Window","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/view/containers/windows/Window");a=a("tdv/player/parser/ClassInfo").define("Window",l,function(){l.call(this)});a.prototype.show=a.prototype.show;a.prototype.hide=a.prototype.Qe;return a});
define("tdv/view/core/visuals/canvas/Layer",["require","exports","tdv/events/EventDispatcher"],function(a,l,k){return function(){function n(g){this.canvas=g.canvas||null;this.rect=g.rect;this.visibleRect=g.visibleRect||g.rect;this.opacity=g.opacity===void 0?1:g.opacity;this.layers=g.layers||[];this.tag=g.tag||"";this.HA=g.HA||n.DB;this.ED=g.ED||!1;this.M=g.M||new k;this.i8=g.i8||this;this.cursor=g.cursor||void 0}n.prototype.tOa=function(g,h,e){e===void 0&&(e=null);var b=this.rect.KQa(g,h),c=this.visibleRect.KQa(g,
h);if(e!==null&&!e.contains(c))if(e.qna(c))c=c.intersection(e);else return null;return new n({canvas:this.canvas||void 0,rect:b,visibleRect:c,opacity:this.opacity,tag:this.tag,layers:this.layers.map(function(d){return d.tOa(g,h,e)}).filter(function(d){return d!==null}),M:this.M,HA:this.HA,ED:this.ED,cursor:this.cursor,i8:this.i8})};n.DB=0;n.Hsa=1;n.lQ=2;return n}()});
define("tdv/view/core/visuals/canvas/Rect",["require","exports"],function(){return function(){function a(l,k,n,g){this.left=l;this.top=k;this.width=n;this.height=g;this.right=l+n;this.bottom=k+g}a.prototype.equals=function(l){return this.left===l.left&&this.top===l.top&&this.width===l.width&&this.height===l.height};a.prototype.qna=function(l){return this.left<l.right&&this.top<l.bottom&&this.right>l.left&&this.bottom>l.top};a.prototype.containsPoint=function(l,k){return this.left<=l&&l<=this.right&&
this.top<=k&&k<=this.bottom};a.prototype.contains=function(l){return this.left<=l.left&&this.top<=l.top&&this.right>=l.right&&this.bottom>=l.bottom};a.prototype.intersection=function(l){var k=this.left>l.left?this.left:l.left,n=this.top>l.top?this.top:l.top;return new a(k,n,(this.right<l.right?this.right:l.right)-k,(this.bottom<l.bottom?this.bottom:l.bottom)-n)};a.prototype.union=function(l){var k=this.left<l.left?this.left:l.left,n=this.top<l.top?this.top:l.top;return new a(k,n,(this.right>l.right?
this.right:l.right)-k,(this.bottom>l.bottom?this.bottom:l.bottom)-n)};a.prototype.KQa=function(l,k){return new a(this.left+l,this.top+k,this.width,this.height)};a.union=function(l){if(l.length===0)return new a(0,0,0,0);for(var k=l[0].left,n=l[0].top,g=l[0].right,h=l[0].bottom,e=1;e<l.length;e++)k=Math.min(k,l[e].left),n=Math.min(n,l[e].top),g=Math.max(g,l[e].right),h=Math.max(h,l[e].bottom);return new a(k,n,g-k,h-n)};a.merge=function(l){for(var k=0;k<l.length;){for(var n=k+1;n<l.length;){if(l[k].qna(l[n])){l=
[l[k].union(l[n])].concat(l.slice(0,k)).concat(l.slice(k+1,n)).concat(l.slice(n+1));k=-1;break}n++}k++}return l};return a}()});
define("tdv/view/core/visuals/canvas/LayerComposer",["require","exports","tdv/view/core/visuals/canvas/Layer","tdv/view/core/visuals/canvas/Rect"],function(a,l,k,n){return function(){function g(){this.PO=!1;this.CV=this.canvas=this.MI=null;this.layers=[]}g.prototype.clear=function(){this.canvas&&(this.canvas.width=0,this.canvas.height=0);this.CV=null;this.layers=[]};g.prototype.compose=function(h,e,b){var c=this;this.canvas||(this.canvas=document.createElement("canvas"));var d=n.union(h.map(function(p){return p.visibleRect}));
if(b){b=Math.pow(2,Math.ceil(Math.log(d.width)/Math.log(2)));var f=Math.pow(2,Math.ceil(Math.log(d.height)/Math.log(2)));d=new n(Math.floor(d.left-(b-d.width)/2),Math.floor(d.top-(f-d.height)/2),b,f)}b=[];if(this.CV&&this.CV.equals(d)){b=h.filter(function(p){return!c.layers.includes(p)});f=this.layers.filter(function(p){return!h.includes(p)});if(b.length==0&&f.length==0)return new k({canvas:this.canvas,rect:d,opacity:e,tag:"composed",layers:h});b=n.merge(b.map(function(p){return p.visibleRect}).concat(f.map(function(p){return p.visibleRect})))}else this.CV=
d,this.canvas.width=d.width,this.canvas.height=d.height,b.push(d);this.layers=h;if(b){var m=this.canvas.getContext("2d");b.forEach(function(p){m.clearRect(p.left-d.left,p.top-d.top,p.width,p.height);h.forEach(function(q){if(q.canvas&&p.qna(q.visibleRect)&&q.visibleRect.width!=0&&q.visibleRect.height!=0){var r=q.visibleRect.intersection(p);m.globalAlpha=q.opacity;m.drawImage(q.canvas,r.left-q.rect.left,r.top-q.rect.top,r.width,r.height,r.left-d.left,r.top-d.top,r.width,r.height)}})})}return new k({canvas:this.canvas,
rect:this.CV,opacity:e,tag:"composed",layers:h})};return g}()});
define("tdv/view/core/visuals/canvas/CanvasUIBaseVisuals","require exports tdv/view/constants/GradientDirection tdv/view/core/visuals/Visuals tdv/view/core/visualprops/UIBaseVisualProperties tdv/view/core/visuals/util tdv/constants/EventName tdv/view/core/visuals/canvas/Layer tdv/view/core/visuals/canvas/Rect tdv/view/core/visuals/canvas/LayerComposer tdv/events/EventDispatcher tdv/player/view/util/Color".split(" "),function(a,l,k,n,g,h,e,b,c,d,f,m){return function(p){function q(){var r=p.call(this)||
this;r.PO=!1;r.opacity=1;r.visible=!1;r.vOa=0;r.wOa=0;r.ARa=null;r.jLa=new d;r.MI=null;r.layers=null;r.yV=null;r.Pq=null;r.VI=null;r.N5=null;r.pO=new f;r.children=[];r.iO=new Map;r.vY=new Map;r.hma=b.lQ;r.gma=!0;r.cursor=void 0;return r}O(q,p);q.prototype.np=function(){return new g};q.prototype.fib=function(){this.PO!=1&&(this.PO=!0,this.PO||(this.jLa.clear(),this.MI=null))};q.prototype.vk=function(){throw Error("Invalid call to CanvasUIBaseVisuals.appendContent");};q.prototype.z8=function(){throw Error("Invalid call to CanvasUIBaseVisuals.removeContent");
};q.prototype.bc=function(){throw Error("Invalid call to CanvasUIBaseVisuals.getElement");};q.prototype.xcb=function(){var r=this.getLayers();return r.length===1?r[0]:null};q.prototype.getLayers=function(){if(this.opacity<=0||!this.visible)return[];if(this.MI)return[this.MI];if(this.layers)return this.layers;this.layers=this.nt();return this.PO||this.opacity<1?(this.MI=this.jLa.compose(this.layers,this.opacity,this.PO),[this.MI]):this.layers};q.prototype.BJa=function(r){return this.xIa(r,this.getLayers())};
q.prototype.EJa=function(r){var t=this.VI&&r.BJa(this.VI);r=r.VI;return t&&r?{left:t.rect.left-r.rect.left,top:t.rect.top-r.rect.top}:{left:0,top:0}};q.prototype.appendChild=function(r){this.children.push(r);r.bind(e.V,this.G7,this,!0);this.FE()};q.prototype.GKa=function(r,t){t=this.children.indexOf(t);t===-1?this.children.push(r):this.children.splice(t+1,0,r);r.bind(e.V,this.G7,this,!0);this.FE()};q.prototype.HKa=function(r,t){t=this.children.indexOf(t);t===-1?this.children.push(r):this.children.splice(t,
0,r);r.bind(e.V,this.G7,this,!0);this.FE()};q.prototype.removeChild=function(r){var t=this.children.indexOf(r);t!==-1&&(r.h(e.V,this.G7,this),this.children.splice(t,1),this.jHa(r),this.FE())};q.prototype.N8=function(r,t){if(this.hma!==r||this.gma!==t)this.hma=r,this.gma=t,this.L9(),this.FE()};q.prototype.G7=function(r){this.jHa(r.source);this.FE()};q.prototype.jHa=function(r){var t=this;if(this.iO.has(r)){var u=this.iO.get(r);this.iO.delete(r);u.forEach(function(v){t.vY.delete(v)})}};q.prototype.update=
function(r){var t=this.nh(r);this.iQa(r);t&&this.FE()};q.prototype.nt=function(){var r=this,t=[];this.VI&&t.push(this.VI);this.yV&&t.push(this.yV);this.children.forEach(function(u){if(r.iO.has(u))var v=r.iO.get(u);else v=u.getLayers(),r.iO.set(u,v);v.forEach(function(w){if(r.vY.has(w))var y=r.vY.get(w);else y=r.LX(w),r.vY.set(w,y);y!==null&&t.push(y)})});return t};q.prototype.LX=function(r){return r.tOa(Math.round(this.vOa),Math.round(this.wOa),this.ARa)};q.prototype.FE=function(){this.MI=this.layers=
null;this.m(e.V)};q.prototype.xIa=function(r,t){for(var u=null,v=0;v<t.length&&!u;v++)t[v].i8===r&&(u=t[v]);for(v=0;v<t.length&&!u;v++)u=this.xIa(r,t[v].layers);return u};q.prototype.nh=function(r){var t=!1;t=this.Gkb(r)||t;(t=this.Ekb(r)||t)&&this.Fkb();var u=this.fra(r);u&&this.vY.clear();var v=this.xlb(r);(r=this.Qkb(r))&&this.L9();return t||u||v||r};q.prototype.fra=function(r){if(this.L.x!==r.x||this.L.y!==r.y||this.L.width!==r.width||this.L.height!==r.height||this.L.offsetX!==r.offsetX||this.L.offsetY!==
r.offsetY||this.L.yw!==r.yw||this.L.Bd!==r.Bd||this.L.ee!==r.ee||this.L.ze!==r.ze||this.L.Cf!==r.Cf||this.L.Mc!==r.Mc||this.L.Nc!==r.Nc){var t=(r.x||0)+r.offsetX,u=(r.y||0)+r.offsetY,v=r.width,w=r.height;this.ARa=r.yw?null:new c(t+r.Bd,u+r.ee,v-r.ze-r.Bd,w-r.Cf-r.ee);this.vOa=t+r.Bd-r.Mc;this.wOa=u+r.ee-r.Nc;return!0}return!1};q.prototype.Gkb=function(r){if(this.L.x!==r.x||this.L.y!==r.y||this.L.offsetX!==r.offsetX||this.L.offsetY!==r.offsetY){var t=r.VA&&r.Ow>0,u=t?Math.max(0,-r.cu+r.bo):0;this.N$a=
(r.x||0)+r.offsetX-(t?Math.max(0,-r.bu+r.bo):0);this.O$a=(r.y||0)+r.offsetY-u;return!0}return!1};q.prototype.Ekb=function(r){var t=r.wk&&r.wk.length>0,u=!!r.Pv,v=r.om>0&&(r.Oe>0&&r.borderLeftColor||r.Pe>0&&r.borderTopColor||r.vf>0&&r.borderRightColor||r.uf>0&&r.borderBottomColor),w=t||u||v;if(!r.visible||!w){if(this.L.visible&&w)return this.Pq&&(this.Pq.width=0,this.Pq.height=0,this.yV=null),!0}else if(this.L.visible!==r.visible||this.L.width!==r.width||this.L.height!==r.height||this.L.wk!==r.wk||
this.L.BD!==r.BD||this.L.om!==r.om||this.L.Oe!==r.Oe||this.L.borderLeftColor!==r.borderLeftColor||this.L.Pe!==r.Pe||this.L.borderTopColor!==r.borderTopColor||this.L.vf!==r.vf||this.L.borderRightColor!==r.borderRightColor||this.L.uf!==r.uf||this.L.borderBottomColor!==r.borderBottomColor||this.L.Pv!==r.Pv||this.L.VA!==r.VA||this.L.bu!==r.bu||this.L.cu!==r.cu||this.L.bo!==r.bo||this.L.$J!==r.$J||this.L.shadowColor!==r.shadowColor||this.L.Ow!==r.Ow){this.Pq||(this.Pq=document.createElement("canvas"));
var y=this.Pq,x=r.VA&&r.Ow>0;w=x?Math.max(0,-r.bu+r.bo):0;var z=x?Math.max(0,-r.cu+r.bo):0,A=x?Math.max(0,r.cu+r.bo):0;y.width=r.width+w+(x?Math.max(0,r.bu+r.bo):0);y.height=r.height+z+A;A=y.getContext("2d");A.clearRect(0,0,y.width,y.height);var D=Math.min(Math.floor(r.width/2),Math.floor(r.height/2));y=Math.min(D,r.borderTopLeftRadius);var E=Math.min(D,r.borderTopRightRadius),B=Math.min(D,r.borderBottomRightRadius);D=Math.min(D,r.borderBottomLeftRadius);var C=[Math.max(0,y-Math.max(r.Pe,r.Oe)),Math.max(0,
E-Math.max(r.Pe,r.vf)),Math.max(0,B-Math.max(r.uf,r.vf)),Math.max(0,D-Math.max(r.uf,r.Oe))],F=[y,E,B,D];if(x){x=A.globalAlpha;A.globalAlpha=r.Ow;A.fillStyle=r.shadowColor;A.shadowColor=r.shadowColor;A.shadowBlur=r.bo;A.shadowOffsetX=r.bu;A.shadowOffsetY=r.cu;A.beginPath();A.roundRect(w,z,r.width,r.height,F);A.fill();A.shadowColor="rgba(0, 0, 0, 0)";var G=A.globalCompositeOperation;A.globalCompositeOperation="destination-out";A.globalAlpha=1;A.fillStyle="#ffffff";A.beginPath();A.roundRect(w,z,r.width,
r.height,F);A.fill();A.globalCompositeOperation=G;A.globalAlpha=x}A.translate(w,z);G=C.some(function(Q){return Q>0});if(t||u){x=A.globalAlpha;A.globalAlpha=r.om;A.translate(r.Oe,r.Pe);var I=Math.max(0,r.width-(r.Oe+r.vf)),N=Math.max(0,r.height-(r.Pe+r.uf));if(t){var P=r.BD==k.kZ?A.createLinearGradient(0,0,I,0):A.createLinearGradient(0,0,0,N);h.TGa(r).forEach(function(Q){P.addColorStop(Q.ratio,Q.color)});A.fillStyle=P;A.roundRect(0,0,I,N,C);A.fill()}u&&(G&&(A.save(),A.roundRect(0,0,I,N,C),A.clip()),
A.drawImage(r.Pv,0,0,I,N),G&&A.restore());A.translate(-r.Oe,-r.Pe);A.globalAlpha=x}v&&(t=[[0,y],[y,0],[r.width-E,0],[r.width,E],[r.width,r.height-B],[r.width-B,r.height],[D,r.height],[0,r.height-D]],u=[[r.Oe,r.Pe+C[0]],[r.Oe+C[0],r.Pe],[r.width-r.vf-C[1],r.Pe],[r.width-r.vf,r.Pe+C[1]],[r.width-r.vf,r.height-r.uf-C[2]],[r.width-r.vf-C[2],r.height-r.uf],[r.Oe+C[3],r.height-r.uf],[r.Oe,r.height-r.uf-C[3]]],v=[[0,0],[r.width,0],[r.width,r.height],[0,r.height]],x=[[r.Oe,r.Pe],[r.width-r.vf,r.Pe],[r.width-
r.vf,r.height-r.uf],[r.Oe,r.height-r.uf]],r.Pe>0&&(A.beginPath(),A.moveTo(t[1][0],t[1][1]),A.lineTo(t[2][0],t[2][1]),A.lineTo(u[2][0],u[2][1]),A.lineTo(u[1][0],u[1][1]),A.fillStyle=m.F9(r.borderTopColor,r.om),A.fill()),E>0&&(A.beginPath(),A.moveTo(t[2][0],t[2][1]),A.arcTo(v[1][0],v[1][1],t[3][0],t[3][1],F[1]),A.lineTo(u[3][0],u[3][1]),C[1]>0?A.arcTo(x[1][0],x[1][1],u[2][0],u[2][1],C[1]):A.lineTo(u[2][0],u[2][1]),A.fillStyle=r.borderTopColor||r.borderRightColor,A.fill()),r.vf>0&&(A.beginPath(),A.moveTo(t[3][0],
t[3][1]),A.lineTo(t[4][0],t[4][1]),A.lineTo(u[4][0],u[4][1]),A.lineTo(u[3][0],u[3][1]),A.fillStyle=m.F9(r.borderRightColor,r.om),A.fill()),B>0&&(A.beginPath(),A.moveTo(t[4][0],t[4][1]),A.arcTo(v[2][0],v[2][1],t[5][0],t[5][1],F[2]),A.lineTo(u[5][0],u[5][1]),C[2]>0?A.arcTo(x[2][0],x[2][1],u[4][0],u[4][1],C[2]):A.lineTo(u[4][0],u[4][1]),A.fillStyle=r.borderBottomColor||r.borderRightColor,A.fill()),r.uf>0&&(A.beginPath(),A.moveTo(t[5][0],t[5][1]),A.lineTo(t[6][0],t[6][1]),A.lineTo(u[6][0],u[6][1]),A.lineTo(u[5][0],
u[5][1]),A.fillStyle=m.F9(r.borderBottomColor,r.om),A.fill()),D>0&&(A.beginPath(),A.moveTo(t[6][0],t[6][1]),A.arcTo(v[3][0],v[3][1],t[7][0],t[7][1],F[3]),A.lineTo(u[7][0],u[7][1]),C[3]>0?A.arcTo(x[3][0],x[3][1],u[6][0],u[6][1],C[3]):A.lineTo(u[6][0],u[6][1]),A.fillStyle=r.borderBottomColor||r.borderLeftColor,A.fill()),r.Oe>0&&(A.beginPath(),A.moveTo(t[7][0],t[7][1]),A.lineTo(t[0][0],t[0][1]),A.lineTo(u[0][0],u[0][1]),A.lineTo(u[7][0],u[7][1]),A.fillStyle=m.F9(r.borderLeftColor,r.om),A.fill()),y>0&&
(A.beginPath(),A.moveTo(t[0][0],t[0][1]),A.arcTo(v[0][0],v[0][1],t[1][0],t[1][1],F[0]),A.lineTo(u[1][0],u[1][1]),C[0]>0?A.arcTo(x[0][0],x[0][1],u[0][0],u[0][1],C[0]):A.lineTo(u[0][0],u[0][1]),A.fillStyle=r.borderTopColor||r.borderLeftColor,A.fill()));A.translate(-w,-z);return!0}return!1};q.prototype.Qkb=function(r){return this.L.visible!==r.visible||this.L.x!==r.x||this.L.y!==r.y||this.L.width!==r.width||this.L.height!==r.height||this.L.offsetX!==r.offsetX||this.L.offsetY!==r.offsetY||this.L.cursor!==
r.cursor?(r.visible?(this.N5=new c((r.x||0)+r.offsetX||0,(r.y||0)+r.offsetY||0,r.width||0,r.height||0),this.cursor=r.cursor):(this.N5=null,this.cursor="inherit"),!0):!1};q.prototype.xlb=function(r){return this.L.opacity!==r.opacity||this.L.visible!==r.visible?(this.opacity=r.opacity,this.visible=r.visible,!0):!1};q.prototype.Fkb=function(){if(this.Pq&&this.Pq.width>0&&this.Pq.height>0){var r=new c(this.N$a,this.O$a,this.Pq.width,this.Pq.height);this.yV=new b({canvas:this.Pq,rect:r,tag:"background"})}else this.yV=
null};q.prototype.L9=function(){this.VI=this.N5?new b({rect:this.N5,tag:"element",HA:this.hma,ED:this.gma,M:this.pO,cursor:this.cursor}):null};return q}(n)});
define("tdv/view/core/visuals/canvas/CanvasCanvasVisuals","require exports tdv/view/core/visuals/canvas/CanvasUIBaseVisuals tdv/view/core/visualprops/CanvasVisualProperties tdv/view/core/visuals/canvas/Layer tdv/view/core/visuals/canvas/Rect".split(" "),function(a,l,k,n,g,h){return function(e){function b(){return e.call(this)||this}O(b,e);b.prototype.np=function(){return new n};b.prototype.nt=function(){var c=e.prototype.nt.call(this);if(this.xla){var d=this.LX(this.xla);d&&c.push(d)}return c};b.prototype.nh=
function(c){var d=e.prototype.nh.call(this,c);this.Ep(c)&&(d=!0,this.canvas&&this.canvas.width>0&&this.canvas.height>0?(c=new h(this.gab,this.hab,this.canvas.width,this.canvas.height),this.xla=new g({canvas:this.canvas,rect:c,tag:"canvas"})):this.xla=null);return d};b.prototype.Ep=function(c){if(!c.visible||!c.canvas){if(this.L.visible&&this.L.canvas&&this.L.canvas.width>0&&this.L.canvas.height>0)return this.canvas=null,!0}else if(c.visible!==this.L.visible||c.canvas!==this.L.canvas||c.w5!==this.L.w5)return this.hab=
this.gab=0,this.canvas=c.canvas,!0;return!1};return b}(k)});
define("tdv/view/core/visuals/canvas/CanvasContainerVisuals","require exports tdv/view/core/visuals/canvas/CanvasUIBaseVisuals tdv/view/core/visualprops/ContainerVisualProperties tdv/view/core/visuals/canvas/Layer tdv/view/core/visuals/canvas/Rect tdv/events/EventDispatcher".split(" "),function(a,l,k,n,g,h,e){return function(b){function c(){var d=b.call(this)||this;d.G6=null;d.T9=null;d.Vq=null;d.qr=null;d.fKa=new e;d.xRa=new e;d.Idb=g.lQ;d.Hdb=!1;d.Blb=g.lQ;d.Alb=!1;d.eKa=100;d.wRa=100;return d}
O(c,b);c.prototype.np=function(){return new n};c.prototype.o6=function(){throw Error("Invalid call to CanvasContainerVisuals.getHScrollBarElement");};c.prototype.C6=function(){throw Error("Invalid call to CanvasContainerVisuals.getVScrollBarElement");};c.prototype.nt=function(){var d=b.prototype.nt.call(this);this.G6&&d.push(this.G6);this.T9&&d.push(this.T9);return d};c.prototype.nh=function(d){var f=b.prototype.nh.call(this,d);this.Vkb(d)&&(f=!0,this.Wkb());this.vlb(d)&&(f=!0,this.wlb());return f};
c.prototype.Vkb=function(d){if(!d.Dk){if(this.L.Dk)return this.Vq&&(this.Vq.width=0,this.Vq.height=0),!0}else if(d.Dk!==this.L.Dk||d.x!==this.L.x||d.y!==this.L.y||d.offsetX!==this.L.offsetX||d.offsetY!==this.L.offsetY||d.width!==this.L.width||d.height!==this.L.height||d.contentWidth!==this.L.contentWidth||d.contentHeight!==this.L.contentHeight||d.Dk!==this.L.Dk||d.Mc!==this.L.Mc||d.zf!==this.L.zf||d.Wt!==this.L.Wt||d.Vt!==this.L.Vt||d.mh!==this.L.mh||d.Vn!==this.L.Vn||d.Wn!==this.L.Wn||d.Mk!==this.L.Mk||
d.Nc!==this.L.Nc){var f=d.Dk&&d.Mk;this.Vq||(this.Vq=document.createElement("canvas"));var m=this.Vq;f=d.width-d.Vn-((f?d.mh:0)+d.Vn);this.Jdb=(d.x||0)+d.offsetX+d.Vn+Math.round(d.Mc*f/d.contentWidth);this.Kdb=(d.y||0)+d.offsetY+d.height-d.Wn-d.mh;this.eKa=f;var p=Math.round(d.zf*f/d.contentWidth),q=d.mh;f=m.getContext("2d");m.width=p;m.height=q;f&&(f.clearRect(0,0,m.width,m.height),f.fillStyle=d.Vt,p=f.globalAlpha,f.beginPath(),f.globalAlpha=d.Wt,f.roundRect(0,0,m.width,m.height,d.mh/2),f.fill(),
f.globalAlpha=p);return!0}return!1};c.prototype.vlb=function(d){if(!d.Mk){if(this.L.Mk)return this.qr&&(this.qr.width=0,this.qr.height=0),!0}else if(d.Mk!==this.L.Mk||d.x!==this.L.x||d.y!==this.L.y||d.offsetX!==this.L.offsetX||d.offsetY!==this.L.offsetY||d.width!==this.L.width||d.height!==this.L.height||d.contentWidth!==this.L.contentWidth||d.contentHeight!==this.L.contentHeight||d.Dk!==this.L.Dk||d.Mc!==this.L.Mc||d.zf!==this.L.zf||d.Wt!==this.L.Wt||d.Vt!==this.L.Vt||d.mh!==this.L.mh||d.Vn!==this.L.Vn||
d.Wn!==this.L.Wn||d.Mk!==this.L.Mk||d.Nc!==this.L.Nc){var f=d.Dk&&d.Mk;this.qr||(this.qr=document.createElement("canvas"));var m=this.qr,p=d.height-d.Wn-((f?d.mh:0)+d.Wn);this.Dlb=(d.y||0)+d.offsetY+d.Wn+Math.round(d.Nc*p/d.contentHeight);this.Clb=(d.x||0)+d.offsetX+d.width-d.Vn-d.mh;this.wRa=p;f=d.mh;var q=Math.round(d.Ug*p/d.contentHeight);p=m.getContext("2d");m.width=f;m.height=q;p&&(p.clearRect(0,0,m.width,m.height),p.fillStyle=d.Vt,f=p.globalAlpha,p.beginPath(),p.globalAlpha=d.Wt,p.roundRect(0,
0,m.width,m.height,d.mh/2),p.fill(),p.globalAlpha=f);return!0}return!1};c.prototype.Wkb=function(){if(this.Vq&&this.Vq.width>0&&this.Vq.height>0){var d=new h(this.Jdb,this.Kdb,this.Vq.width,this.Vq.height);this.G6=new g({canvas:this.Vq,rect:d,HA:this.Idb,ED:this.Hdb,tag:"hscroll",M:this.fKa})}else this.G6=null};c.prototype.wlb=function(){if(this.qr&&this.qr.width>0&&this.qr.height>0){var d=new h(this.Clb,this.Dlb,this.qr.width,this.qr.height);this.T9=new g({canvas:this.qr,rect:d,HA:this.Blb,ED:this.Alb,
tag:"vscroll",M:this.xRa})}else this.T9=null};return c}(k)});
define("tdv/view/core/visuals/canvas/CanvasImageVisuals","require exports tdv/view/core/visuals/canvas/CanvasUIBaseVisuals tdv/view/core/visualprops/ImageVisualProperties tdv/view/core/visuals/canvas/Layer tdv/view/core/visuals/canvas/Rect tdv/view/constants/Alignment tdv/events/EventDispatcher".split(" "),function(a,l,k,n,g,h,e,b){return function(c){function d(){var f=c.call(this)||this;f.lna=g.DB;f.jna=!1;f.N6=new b;return f}O(d,c);d.prototype.Gpa=function(f,m){if(this.lna!==f||this.jna!==m)this.lna=
f,this.jna=m,this.Sqa()};d.prototype.np=function(){return new n};d.prototype.nt=function(){var f=c.prototype.nt.call(this);if(this.kna){var m=this.LX(this.kna);m&&f.push(m)}return f};d.prototype.nh=function(f){var m=c.prototype.nh.call(this,f);this.Rqa(f)&&(m=!0,this.Sqa());return m};d.prototype.L9=function(){c.prototype.L9.call(this);this.Sqa()};d.prototype.Sqa=function(){if(this.Ct&&this.Ct.width>0&&this.Ct.height>0){var f=new h(this.peb,this.qeb,this.Ct.width,this.Ct.height);this.kna=new g({canvas:this.Ct,
rect:f,opacity:1,HA:this.lna,ED:this.jna,M:this.N6,tag:"image",cursor:this.reb})}else this.kna=null};d.prototype.Rqa=function(f){if(!f.visible||!f.image){if(this.L.visible&&this.L.image)return this.Ct&&(this.Ct.width=0,this.Ct.height=0),!0}else if(f.visible!==this.L.visible||f.image!==this.L.image||f.cursor!==this.L.cursor||f.contentWidth!==this.L.contentWidth||f.contentHeight!==this.L.contentHeight||f.width!==this.L.width||f.height!==this.L.height||f.Bd!==this.L.Bd||f.ze!==this.L.ze||f.ee!==this.L.ee||
f.Cf!==this.L.Cf||f.borderTopLeftRadius!==this.L.borderTopLeftRadius||f.borderTopRightRadius!==this.L.borderTopRightRadius||f.borderBottomRightRadius!==this.L.borderBottomRightRadius||f.borderBottomLeftRadius!==this.L.borderBottomLeftRadius||f.Pe!==this.L.Pe||f.vf!==this.L.vf||f.uf!==this.L.uf||f.Oe!==this.L.Oe||f.Vh!==this.L.Vh||f.verticalAlign!==this.L.verticalAlign){this.qeb=this.peb=0;this.Ct||(this.Ct=document.createElement("canvas"));var m=Math.min(Math.floor(f.width/2),Math.floor(f.height/
2));m=[Math.max(0,Math.min(m,f.borderTopLeftRadius)-Math.max(f.Pe,f.Oe)),Math.max(0,Math.min(m,f.borderTopRightRadius)-Math.max(f.Pe,f.vf)),Math.max(0,Math.min(m,f.borderBottomRightRadius)-Math.max(f.uf,f.vf)),Math.max(0,Math.min(m,f.borderBottomLeftRadius)-Math.max(f.uf,f.Oe))];var p=f.width-f.Bd-f.ze,q=f.height-f.ee-f.Cf,r=this.Ct;r.width=p;r.height=q;var t=r.getContext("2d");t.clearRect(0,0,r.width,r.height);switch(f.Vh){default:p=0;break;case e.Db:p-=f.contentWidth;break;case e.Ye:p=Math.floor((p-
f.contentWidth)*.5)}switch(f.verticalAlign){default:q=0;break;case e.Fc:q-=f.contentHeight;break;case e.Xd:q=Math.floor((q-f.contentHeight)*.5)}t.drawImage(f.image,p,q,f.contentWidth,f.contentHeight);t.fillStyle="#ffffff";t.globalCompositeOperation="destination-in";t.roundRect(0,0,r.width,r.height,m);t.fill();t.globalCompositeOperation="source-over";this.reb=f.cursor;return!0}return!1};return d}(k)});
define("tdv/view/core/visuals/canvas/CanvasLabelVisuals","require exports tdv/view/core/visuals/canvas/CanvasUIBaseVisuals tdv/view/core/visualprops/LabelVisualProperties tdv/view/core/visuals/canvas/Layer tdv/view/core/visuals/canvas/Rect tdv/view/util/Font tdv/view/util/MeasureText tdv/player/view/util/Color tdv/view/constants/Alignment".split(" "),function(a,l,k,n,g,h,e,b,c,d){return function(f){function m(){var p=f.call(this)||this;p.QE=document.createElement("canvas");p.hu=0;p.eu=0;return p}
O(m,f);m.prototype.np=function(){return new n};m.prototype.fJ=function(){return this.hu};m.prototype.eJ=function(){return this.eu};m.prototype.nt=function(){var p=f.prototype.nt.call(this);if(this.Eqa){var q=this.LX(this.Eqa);q&&p.push(q)}return p};m.prototype.nh=function(p){var q=f.prototype.nh.call(this,p);this.cra(p)&&(q=!0,this.QE&&this.QE.width>0&&this.QE.height>0?(p=new h(this.HP,this.IP,this.vQa,this.uQa),this.Eqa=new g({canvas:this.QE,rect:p,opacity:1,tag:"text"})):this.Eqa=null);return q};
m.prototype.cra=function(p){if(p.visible&&p.text){var q=!1;if(p.visible!==this.L.visible||p.text!==this.L.text||p.direction!==this.L.direction||p.Z5!==this.L.Z5||p.tt!==this.L.tt||p.fontSize!==this.L.fontSize||p.fontFamily!==this.L.fontFamily||p.fontWeight!==this.L.fontWeight||p.fontStyle!==this.L.fontStyle||p.fu!==this.L.fu||p.gu!==this.L.gu||p.co!==this.L.co||p.Qw!==this.L.Qw||p.Pw!==this.L.Pw){var r=this.QE,t=p.Qw>0;q=t?Math.max(0,-p.fu+p.co):0;var u=t?Math.max(0,-p.gu+p.co):0,v=t?Math.max(0,p.fu+
p.co):0,w=t?Math.max(0,p.gu+p.co):0,y=r.getContext("2d"),x=b(p.text,{fontSize:p.fontSize,fontFamily:p.fontFamily,fontWeight:p.fontWeight,fontStyle:p.fontStyle},y);this.hu=Math.round(x.width);this.eu=Math.round(x.height);this.vQa=this.hu+q+v;this.uQa=this.eu+u+w;r.width=this.vQa;r.height=this.uQa;y.clearRect(0,0,r.width,r.height);y.fillStyle=p.tt||"#000000";y.font=e.A6({fontSize:p.fontSize,fontFamily:p.fontFamily,fontWeight:p.fontWeight,fontStyle:p.fontStyle});y.textAlign="center";y.textBaseline="middle";
t?(y.shadowColor="rgba("+c.xp(p.Pw).concat([p.Qw]).join(",")+")",y.shadowBlur=p.co,y.shadowOffsetX=p.fu,y.shadowOffsetY=p.gu):y.shadowColor="rgba(0, 0, 0, 0)";y.fillText(p.text,q+Math.round(this.hu*.5),u+Math.round(this.eu*.5));q=!0}if(q||p.width!==this.L.width||p.height!==this.L.height||p.Bd!==this.L.Bd||p.ee!==this.L.ee||p.ze!==this.L.ze||p.Cf!==this.L.Cf||p.Vh!==this.L.Vh||p.verticalAlign!==this.L.verticalAlign){q=(t=p.Qw>0)?Math.max(0,-p.fu+p.co):0;u=t?Math.max(0,-p.gu+p.co):0;r=p.width-p.Bd-
p.ze;t=p.height-p.ee-p.Cf;if(r<this.hu)this.HP=0;else switch(p.Vh){case d.eb:this.HP=0;break;case d.Db:this.HP=r-this.hu;break;case d.Ye:this.HP=Math.round(r-this.hu)*.5}this.HP=Math.round(this.HP-q);if(t<this.eu)this.IP=0;else switch(p.verticalAlign){case d.Tc:this.IP=0;break;case d.Fc:this.IP=t-this.eu;break;case d.Xd:this.IP=Math.round(t-this.eu)*.5}this.IP=Math.round(this.IP-u);q=!0}return q}return this.L.visible&&this.L.text?(this.QE&&(this.QE.width=0,this.eu=this.hu=this.QE.height=0),!0):!1};
return m}(k)});
define("tdv/view/core/visuals/canvas/FontInliner",["require","exports"],function(){function a(){var c=l();return Promise.all(c.map(n)).then(function(d){return d.join("\n")})}function l(){var c=[];Array.from(document.styleSheets).forEach(function(d){try{k(Array.from(d.cssRules),c)}catch(f){}});return c}function k(c,d){var f=this;c.forEach(function(m){m.type===CSSRule.FONT_FACE_RULE&&d.push(m);(m===null||m===void 0?0:m.cssRules)&&f.Dnb(Array.from(m.cssRules),d)})}function n(c){var d=c.style.getPropertyValue("src"),
f=/url\(\s*(['"]?)([^'")]+)\1\s*\)/gi.exec(d);if(!f)return Promise.resolve(c.cssText);var m=f[2];return g(m).then(function(p){if(!p)return c.cssText;p=d.replace(m,p);return c.cssText.replace(d,p)})}function g(c){return b.has(c)?Promise.resolve(b.get(c)||null):fetch(c,{mode:"cors",credentials:"omit"}).then(function(d){return d.ok?d.blob().then(function(f){return new Promise(function(m,p){var q=new FileReader;q.onerror=function(){return p(Error("FileReader failed"))};q.onload=function(){m(q.result);
b.set(c,q.result)};q.readAsDataURL(f)})}):Promise.resolve(null)})}var h=null,e=null,b=new Map;return{getStyle:function(){return h?Promise.resolve(h):e?e:e=a().then(function(c){return h=c})}}});
define("tdv/view/core/visuals/canvas/Rasterizer","require exports tdv/utils tdv/events/EventDispatcher tdv/constants/EventName tdv/view/core/visuals/canvas/FontInliner".split(" "),function(a,l,k,n,g,h){a=function(c){function d(f,m){var p=c.call(this)||this;p.canvas=m;p.loa=new b(p.onChange.bind(p));p.loa.observe(f);p.Nbb=new e(f);p.Ioa=!1;p.Voa=!1;p.onChange();return p}O(d,c);d.prototype.dispose=function(){var f;(f=this.loa)===null||f===void 0||f.disconnect();this.loa=null};d.prototype.onChange=function(){var f=
this;this.Voa?this.Ioa=!0:(this.Ioa=!1,this.Voa=!0,this.Nbb.Jgb(this.canvas).then(function(){f.Voa=!1;if(f.Ioa)f.onChange();else f.m(g.V)}))};return d}(n);var e=function(){function c(d){this.element=d}c.prototype.Jgb=function(d){var f=this,m=this.Tab(),p=this.bbb(this.element);m.appendChild(p);p.querySelectorAll("img, canvas, video").forEach(function(v){v.remove()});var q=new Set;p.querySelectorAll("*").forEach(function(v){v.style&&(v=getComputedStyle(v),v.font&&q.add(v.font))});var r=p.getBoundingClientRect(),
t=this.zhb(p);this.Ula(p);var u=document.createElement("img");m.appendChild(u);return function(){return Promise.all(Array.from(q).map(function(v){return document.fonts.load(v)}))}().then(function(){return f.dbb(t,r.width,r.height)}).then(function(v){return f.lfb(u,v)}).then(function(){d.width=r.width;d.height=r.height;var v=d.getContext("2d");v.clearRect(0,0,d.width,d.height);v.drawImage(u,0,0);u.src="";f.Ula(u);f.Ula(m);return d})};c.prototype.lfb=function(d,f){return new Promise(function(m){d.onload=
function(){m()};d.src=f})};c.prototype.Tab=function(){var d=document.createElement("div");d.style.position="absolute";d.style.top="-9999px";d.style.left="-9999px";document.body.appendChild(d);return d};c.prototype.bbb=function(d){d=d.cloneNode(!0);d.style.position="absolute";d.style.top="0px";d.style.left="0px";return d};c.prototype.Ula=function(d){var f;(f=d.parentElement)===null||f===void 0||f.removeChild(d);d.innerHTML=""};c.prototype.zhb=function(d){d=(new XMLSerializer).serializeToString(d);
return this.Rbb(d)};c.prototype.dbb=function(d,f,m){return h.getStyle().then(function(p){return'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="'+f+'" height="'+m+'"><style>'+p+'</style><foreignObject x="0" y="0" width="100%" height="100%">'+d+"</foreignObject></svg>"})};c.prototype.Rbb=function(d){return d.replace(/#/g,"%23").replace(/\n/g,"%0A")};return c}(),b=function(){function c(d){var f=this;this.element=null;this.onChange=k.Fqa(d,1);this.O7=this.O7.bind(this);
this.nna=[];this.HLa=new MutationObserver(function(){f.Rfb()});this.WNa=new ResizeObserver(function(){f.rl()})}c.prototype.observe=function(d){this.element=d;this.Tqa();this.HLa.observe(d,{subtree:!0,childList:!0,attributes:!0});this.WNa.observe(d)};c.prototype.disconnect=function(){this.HLa.disconnect();this.WNa.disconnect();this.element=null;this.Tqa()};c.prototype.Rfb=function(){this.Tqa();this.onChange()};c.prototype.rl=function(){this.onChange()};c.prototype.O7=function(){this.onChange()};c.prototype.Tqa=
function(){var d=this,f=this.element?Array.from(this.element.querySelectorAll("img")):[],m=f.filter(function(q){return!d.nna.includes(q)}),p=this.nna.filter(function(q){return!f.includes(q)});m.forEach(function(q){q.addEventListener("load",d.O7)});p.forEach(function(q){q.removeEventListener("load",d.O7)});this.nna=f};return c}();return a});
define("tdv/view/core/visuals/canvas/CanvasHTMLVisuals","require exports tdv/constants/EventName tdv/view/core/visuals/canvas/CanvasUIBaseVisuals tdv/view/core/visualprops/HTMLVisualProperties tdv/view/core/visuals/canvas/Layer tdv/view/core/visuals/canvas/Rect tdv/view/core/visuals/canvas/Rasterizer".split(" "),function(a,l,k,n,g,h,e,b){return function(c){function d(){return c.call(this)||this}O(d,c);d.prototype.Hma=function(){return this.pp?this.pp.width:0};d.prototype.Gma=function(){return this.pp?
this.pp.height:0};d.prototype.np=function(){return new g};d.prototype.nt=function(){var f=c.prototype.nt.call(this);if(this.hna){var m=this.LX(this.hna);m&&f.push(m)}return f};d.prototype.nh=function(f){var m=c.prototype.nh.call(this,f);this.Qqa(f)&&(m=!0,this.KHa());return m};d.prototype.Qqa=function(f){if(!f.visible||!f.td){if(this.L.visible&&this.L.td)return this.pp=null,!0}else if(f.visible!==this.L.visible||f.td!==this.L.td){this.pp||(this.pp=document.createElement("canvas"));var m=this.pp;this.yX&&
(this.yX.h(k.V,this.LMa,this),this.yX.dispose(),m.width=0,m.height=0,this.yX=null);this.yX=new b(f.td,m);this.yX.bind(k.V,this.LMa,this,!0);return!0}return!1};d.prototype.KHa=function(){if(this.pp&&this.pp.width>0&&this.pp.height>0){var f=new e(0,0,this.pp.width,this.pp.height);this.hna=new h({canvas:this.pp,rect:f,tag:"html"})}else this.hna=null};d.prototype.LMa=function(){this.KHa();this.FE()};return d}(n)});
define("tdv/view/core/visuals/canvas/CanvasVisualsFactory","require exports tdv/view/core/visuals/canvas/CanvasUIBaseVisuals tdv/view/core/visuals/canvas/CanvasCanvasVisuals tdv/view/core/visuals/canvas/CanvasContainerVisuals tdv/view/core/visuals/canvas/CanvasImageVisuals tdv/view/core/visuals/canvas/CanvasLabelVisuals tdv/view/core/visuals/canvas/CanvasHTMLVisuals tdv/view/core/UIComponent tdv/view/canvas/Canvas tdv/view/containers/Container tdv/view/html/HTML tdv/view/images/Image tdv/view/text/Label tdv/view/core/visuals/VisualsType".split(" "),function(a,
l,k,n,g,h,e,b,c,d,f,m,p,q,r){return function(){function t(){}t.prototype.create=function(u){if(u instanceof m)return new b;if(u instanceof d)return new n;if(u instanceof p)return new h;if(u instanceof q)return new e;if(u instanceof f)return new g;if(u instanceof c)return new k;throw Error("Invalid UI instance");};t.prototype.getType=function(){return r.eSa};t.bJ=function(){t.Ll||(t.Ll=new t);return t.Ll};return t}()});
define("tdv/view/core/eventmanager/xrinput/XRInputEventManager","require exports tdv/constants/EventName tdv/view/core/visuals/canvas/Layer tdv/view/events/MouseEvent tdv/view/util/UserInitiatedAction".split(" "),function(a,l,k,n,g,h){return function(){function e(b,c){this.RLa=0;this.component=b;this.oJ=void 0;this.aB=c;this.eE=h.ora(this.eE.bind(this));this.aP=h.ora(this.aP.bind(this));this.gE=h.ora(this.gE.bind(this),!0)}e.prototype.aPa=function(b){this.oJ!==b&&((this.oJ=b)?this.jma():this.XHa(),
this.Zqa())};e.prototype.Zqa=function(){this.va().N8(this.oJ?n.lQ:n.DB,this.oJ?!0:!1)};e.prototype.nJa=function(){return this.oJ||!1};e.prototype.rkb=function(b){this.component.m(new g(k.Ra,b.x,b.y,b.pageX,b.pageY))};e.prototype.skb=function(b){this.component.m(new g(k.fb,b.x,b.y,b.pageX,b.pageY))};e.prototype.tkb=function(b){this.component.m(new g(k.ab,b.x,b.y,b.pageX,b.pageY))};e.prototype.ukb=function(b,c){this.component.m(new g(k.Rk,b.x,b.y,b.pageX,b.pageY,c.delta,c.Wz))};e.prototype.okb=function(b){this.component.m(new g(k.la,
b.x,b.y,b.pageX,b.pageY))};e.prototype.pkb=function(b){this.component.m(new g(k.di,b.x,b.y,b.pageX,b.pageY))};e.prototype.eE=function(b){this.va().pO.bind(k.ab,this.gE,this,!0);this.RNa(b)};e.prototype.RNa=function(b,c){var d;c===void 0&&(c=!0);var f=this.iW(b);f!==null&&(c&&this.xab(f),this.rkb(f),(d=this.vm())===null||d===void 0||d.RNa(b,c&&this.component.get("propagateClick")))};e.prototype.aP=function(b){this.component.Vb().BE(this.component);this.SNa(b)};e.prototype.SNa=function(b){var c,d=this.iW(b);
d!==null&&(this.wab(d),this.skb(d),(c=this.vm())===null||c===void 0||c.SNa(b))};e.prototype.gE=function(b){this.va().pO.h(k.ab,this.gE,this);var c=this.iW(b);c!==null&&(this.TNa(b,this.Meb(c)),this.Beb(c))};e.prototype.TNa=function(b,c){var d,f=this.iW(b);f!==null&&(this.tkb(f),this.vab(c),(d=this.vm())===null||d===void 0||d.TNa(b,c))};e.prototype.xab=function(b){this.component.bind(k.Eb,this.pHa,this,!0);this.KI=b};e.prototype.wab=function(b){this.KI&&this.WIa(this.KI,b)>20&&this.Ela()};e.prototype.vab=
function(b){this.KI&&(this.okb(this.KI),b&&this.pkb(this.KI),this.Ela())};e.prototype.Ela=function(){this.KI&&(this.component.h(k.Eb,this.pHa,this),this.KI=void 0)};e.prototype.pHa=function(){this.Ela()};e.prototype.dHa=function(){return!1};e.prototype.SLa=function(b){this.component.Vb().mga&&this.UNa(b)};e.prototype.UNa=function(b){var c,d=this.iW(b);if(d!==null){var f=this.$cb(b);this.ukb(d,f);this.dHa(f)||(c=this.vm())===null||c===void 0||c.UNa(b)}};e.prototype.iW=function(b){var c=this.aB.Ucb(b.pageX,
b.pageY,this.va().VI);return c?{x:c.x,y:c.y,pageX:b.pageX,pageY:b.pageY}:null};e.prototype.$cb=function(b){var c={};c.delta=Math.max(-1,Math.min(1,-b.delta));c.Wz=c.delta;return c};e.prototype.va=function(){return this.component.va()};e.prototype.vm=function(){var b=this.component.getParent();if(b)return b.lJa()};e.prototype.jma=function(){var b=this.va().pO;b.bind(k.Ra,this.eE,this,!0);b.bind(k.fb,this.aP,this,!0);b.bind(k.Rk,this.SLa,this,!0)};e.prototype.XHa=function(){var b=this.va().pO;b.h(k.Ra,
this.eE,this);b.h(k.fb,this.aP,this);b.h(k.Rk,this.SLa,this)};e.prototype.Beb=function(b){this.RLa=Date.now();this.QLa=b};e.prototype.Meb=function(b){return Date.now()-this.RLa>500||!this.QLa?!1:this.WIa(this.QLa,b)<=20};e.prototype.WIa=function(b,c){var d=b.pageX-c.pageX;b=b.pageY-c.pageY;return Math.sqrt(d*d+b*b)};return e}()});
define("tdv/view/core/eventmanager/xrinput/IconButtonXRInputEventManager",["require","exports","tdv/view/core/eventmanager/xrinput/XRInputEventManager","tdv/view/core/visuals/canvas/Layer","tdv/constants/EventName"],function(a,l,k,n,g){return function(h){function e(b,c){b=h.call(this,b,c)||this;b.JKa=!1;return b}O(e,h);e.prototype.va=function(){return h.prototype.va.call(this)};e.prototype.bPa=function(b){this.JKa=b;this.Zqa()};e.prototype.eE=function(b){this.va().N6.bind(g.ab,this.gE,this,!0);h.prototype.eE.call(this,
b)};e.prototype.gE=function(b){this.va().N6.h(g.ab,this.gE,this);h.prototype.gE.call(this,b)};e.prototype.Zqa=function(){this.oJ?this.JKa?(this.va().N8(n.lQ,!0),this.va().Gpa(n.DB,!1)):(this.va().N8(n.DB,!1),this.va().Gpa(n.Hsa,!0)):(this.va().N8(n.DB,!1),this.va().Gpa(n.DB,!1))};e.prototype.jma=function(){h.prototype.jma.call(this);var b=this.va().N6;b.bind(g.Ra,this.eE,this,!0);b.bind(g.fb,this.aP,this,!0)};e.prototype.XHa=function(){var b=this.va().pO;b.h(g.Ra,this.eE,this);b.h(g.fb,this.aP,this)};
return e}(k)});
define("tdv/view/core/eventmanager/xrinput/ScrollableContainerXRInputEventManager",["require","exports","tdv/constants/EventName","tdv/view/core/eventmanager/xrinput/XRInputEventManager","tdv/player/view/util/Device"],function(a,l,k,n,g){return function(h){function e(b,c){b=h.call(this,b,c)||this;b.Qz=0;b.Rz=0;b.$mb=void 0;b.anb=void 0;b.iE=!1;b.jE=!1;b.uHa=0;b.sC=b.sC.bind(b);b.vD=b.vD.bind(b);b.ima();return b}O(e,h);e.prototype.ima=function(){this.va().fKa.bind(k.Ra,this.sC,this,!1);this.va().xRa.bind(k.Ra,
this.vD,this,!1);this.component.bind(k.Ra,this.Hab,this,!1);this.component.bind(k.tc,this.qca,this,!1);this.component.bind(k.Eb,this.pca,this,!1);this.component.bind(k.Rk,this.Iab,this,!1)};e.prototype.va=function(){return this.component.va()};e.prototype.sC=function(){this.component.Kw(!0);this.iE=!0};e.prototype.vD=function(){this.component.Lw(!0);this.jE=!0};e.prototype.qca=function(){this.component.ME(!0)};e.prototype.pca=function(){this.component.ME(!1)};e.prototype.Hab=function(b){this.component.hn||
this.component.jn?(this.aB.bind(k.fb,this.BHa,this,!1),this.aB.bind(k.ab,this.CHa,this,!1),this.Qz=b.pageX,this.Rz=b.pageY):this.Gab(b)};e.prototype.BHa=function(b){var c=0,d=0;this.iE&&(c=(b.pageX-this.Qz)/this.va().eKa);this.jE&&(d=(b.pageY-this.Rz)/this.va().wRa);this.Qz=b.pageX;this.Rz=b.pageY;c==0&&d==0||this.component.$O(c,d,"content")};e.prototype.CHa=function(){this.aB.h(k.fb,this.BHa,this);this.aB.h(k.ab,this.CHa,this);this.component.Kw(!1);this.component.Lw(!1);this.jE=this.iE=!1};e.prototype.dHa=
function(b){return b.delta>0&&this.component.fO()||b.delta<0&&this.component.dO()?!0:!1};e.prototype.Iab=function(b){b=(g.Md()==g.lZ?b.Wz*.1:b.delta)*.3;this.component.$O(0,-b,"page")};e.prototype.Gab=function(b){if(this.component.eO()||this.component.gO())this.aB.bind(k.fb,this.zHa,this,!1),this.aB.bind(k.ab,this.AHa,this,!1),this.component.ME(!0),this.Qz=b.pageX,this.Rz=b.pageY,this.yeb()};e.prototype.zHa=function(b){var c=b.pageX-this.Qz,d=b.pageY-this.Rz;!this.iE&&!this.jE&&c*c+d*d>25&&(this.iE=
this.component.eO(),this.jE=this.component.gO(),this.component.Kw(this.iE),this.component.Lw(this.jE));if(this.iE||this.jE)this.component.$O(this.iE?-c:0,this.jE?-d:0),this.Qz=b.pageX,this.Rz=b.pageY,this.Ikb()};e.prototype.AHa=function(){this.aB.h(k.fb,this.zHa,this);this.aB.h(k.ab,this.AHa,this);this.component.ME(!1);var b=Math.max(Math.abs(this.xHa/.001),Math.abs(this.yHa/.001));this.component.mGa(-.5*this.xHa*b,-.5*this.yHa*b,b)};e.prototype.yeb=function(){this.vHa=this.Qz;this.wHa=this.Rz};e.prototype.Ikb=
function(){var b=(new Date).getTime(),c=b-this.uHa;c>10&&(this.uHa=b,this.xHa=(this.Qz-this.vHa)/c,this.yHa=(this.Rz-this.wHa)/c,this.vHa=this.Qz,this.wHa=this.Rz)};return e}(n)});
define("tdv/view/core/eventmanager/xrinput/XRInputEventManagerFactory","require exports tdv/view/core/UIComponent tdv/view/core/eventmanager/xrinput/XRInputEventManager tdv/view/core/eventmanager/xrinput/IconButtonXRInputEventManager tdv/view/core/eventmanager/xrinput/ScrollableContainerXRInputEventManager tdv/view/buttons/IconButton tdv/view/containers/ScrollableContainer".split(" "),function(a,l,k,n,g,h,e,b){return function(){function c(){}c.prototype.create=function(d,f){if(d instanceof e)return new g(d,
f[0]);if(d instanceof b)return new h(d,f[0]);if(d instanceof k)return new n(d,f[0]);throw Error("Invalid UI instance");};c.bJ=function(){c.Ll||(c.Ll=new c);return c.Ll};return c}()});
define("tdv/view/core/eventmanager/xrinput/UIPanelEventAdapter","require exports tdv/view/core/visuals/canvas/Layer tdv/view/events/MouseEvent tdv/player/view/util/xr/ui/UIPointerState tdv/player/view/util/XR tdv/events/EventDispatcher tdv/constants/EventName tdv/view/util/Animation".split(" "),function(a,l,k,n,g,h,e,b,c){a=function(d){function f(){var m=d.call(this)||this;m.jK=null;m.content=null;m.gna=null;m.f7=!1;m.Jna=0;m.Kna=0;m.x7=[];m.Yq=!1;m.a7=!1;return m}O(f,d);f.prototype.xpa=function(m){this.content=
m};f.prototype.g9=function(m){this.jK!==m&&(this.jK&&(h.M.h(b.V,this.Ya,this),h.M.h(b.me,this.Kg,this)),(this.jK=m)?(h.M.bind(b.V,this.Ya,this,!0),this.Ya()):this.hY(null))};f.prototype.Ya=function(){h.isPresenting?(h.M.bind(b.me,this.Kg,this,!0),this.Kg()):h.M.h(b.me,this.Kg,this)};f.prototype.Kg=function(){this.onChange()};f.prototype.onChange=function(){var m,p;this.jK?(this.hY(this.jK.Bg),(m=this.jK)===null||m===void 0||m.KE(this.Yq,this.a7)):this.gna&&(this.hY(this.gna.Bg),(p=this.gna)===null||
p===void 0||p.hY(this.Yq,this.a7))};f.prototype.hY=function(m){var p;(p=this.content)!==null&&p!==void 0&&p.va()&&(m?this.GGa(m.kNa,m.lNa,m.pressed,m.jkb,m.kkb):this.GGa(void 0,void 0,!1,0,0))};f.prototype.GGa=function(m,p,q,r,t){if(m!==this.Jna||p!==this.Kna||this.f7!==q){var u=m===void 0?this.Jna:m,v=p===void 0?this.Kna:p;this.Wj(m,p);this.f7!==q&&((this.f7=q)?this.Xh(u,v):this.hf(u,v));this.Jna=u;this.Kna=v}r===0&&t===0||this.Qfb(m,p,t)};f.prototype.Wj=function(m,p){var q,r,t=m!==void 0&&p!==void 0;
t&&this.m(new n(b.fb,m,p,m,p));t=t?this.Nma(m,p):[];t.length>0?(this.a7=t[0].cursor=="pointer",t.forEach(function(u){u.M.m(new n(b.fb,m-u.left,p-u.top,m,p))}),this.Yq=!0):(this.Yq&&((r=(q=this.content)===null||q===void 0?void 0:q.Vb())===null||r===void 0||r.BE(null)),this.Yq=this.a7=!1)};f.prototype.Xh=function(m,p){this.m(new n(b.Ra,m,p,m,p));this.x7=this.Nma(m,p);this.x7.forEach(function(q){q.M.m(new n(b.Ra,m-q.left,p-q.top,m,p))})};f.prototype.hf=function(m,p){this.m(new n(b.ab,m,p,m,p));this.x7.forEach(function(q){q.M.m(new n(b.ab,
m-q.left,p-q.top,m,p))});this.x7=[]};f.prototype.Qfb=function(m,p,q){var r=m!==void 0&&p!==void 0,t=q*c.bW/1E3*5;r&&this.m(new n(b.Rk,m,p,m,p,t));q=r?this.Nma(m,p):[];q.length>0&&q.forEach(function(u){u.M.m(new n(b.Rk,m-u.left,p-u.top,m,p,t))})};f.prototype.Nma=function(m,p){var q,r=(q=this.content)===null||q===void 0?void 0:q.va();if(!r)return[];q=r.xcb();if(!q)return[];var t=q.rect;return this.wIa(m+t.left,p+t.top,q.layers).reduce(function(u,v){u.length!=0&&u[u.length-1].ED||u.push(v);return u},
[]).reduce(function(u,v){u.find(function(w){return w.M===v.M})||u.push(v);return u},[]).map(function(u){return{M:u.M,cursor:u.cursor,left:u.rect.left-t.left,top:u.rect.top-t.top}})};f.prototype.wIa=function(m,p,q){for(var r=[],t=q.length-1;t>=0;t--){var u=q[t];r=r.concat(this.wIa(m,p,u.layers));u.opacity>0&&u.HA!==k.DB&&u.visibleRect.containsPoint(m,p)&&(u.HA===k.Hsa&&u.canvas?u.canvas.getContext("2d").getImageData(m-u.rect.left,p-u.rect.top,1,1).data[3]>0&&r.push(u):r.push(u))}return r};f.prototype.Ucb=
function(m,p,q){var r,t=(r=this.content)===null||r===void 0?void 0:r.va();return t?(q=t.BJa(q))?{x:m-q.rect.left,y:p-q.rect.top}:null:null};return f}(e);(function(d){function f(m){var p=d.call(this)||this;p.fna=m;p.Bg=null;p.Wj=p.Wj.bind(p);p.Xh=p.Xh.bind(p);p.hf=p.hf.bind(p);document.addEventListener("mousemove",p.Wj,!0);document.addEventListener("mousedown",p.Xh,!0);document.addEventListener("mouseup",p.hf,!0);return p}O(f,d);f.prototype.bc=function(){return this.fna};f.prototype.dispose=function(){document.removeEventListener("mousemove",
this.Wj,!0);document.removeEventListener("mousedown",this.Xh,!0);document.removeEventListener("mouseup",this.hf,!0)};f.prototype.hY=function(m,p){this.fna.style.cursor=p?"pointer":"default"};f.prototype.Wj=function(m){this.dra(m);m.preventDefault();m.stopPropagation()};f.prototype.Xh=function(m){this.pressed=!0;this.dra(m);m.preventDefault();m.stopPropagation()};f.prototype.hf=function(m){this.pressed=!1;this.dra(m);m.preventDefault();m.stopPropagation()};f.prototype.dra=function(m){var p=this.fna.getBoundingClientRect(),
q=m.clientX-p.left;m=m.clientY-p.top;var r=p.width;p=p.height;q>=0&&q<=r&&m>=0&&m<=p?(this.Bg||(this.Bg=new g),this.Bg.kNa=q,this.Bg.lNa=m,this.Bg.distance=1,this.Bg.pressed=this.pressed):this.Bg=null;this.m(b.V)};return f})(e);return a});
define("tdv/player/script/XRPanel","require exports tdv/binding/Bindable tdv/constants/EventName tdv/player/parser/ClassInfo tdv/view/core/visuals/canvas/CanvasVisualsFactory tdv/view/core/eventmanager/xrinput/XRInputEventManagerFactory tdv/view/core/eventmanager/xrinput/UIPanelEventAdapter tdv/player/view/util/xr/ui/UI".split(" "),function(a,l,k,n,g,h,e,b,c){a=function(f){function m(){var p=f.call(this)||this;d.jla(p);p.Qja=new b;p.Ne=null;p.WL=!1;return p}O(m,f);m.prototype.set=function(p,q){f.prototype.set.call(this,
p,q);switch(p){case "content":this.xpa(q);break;case "autoCenter":this.J8(q);break;case "hud":this.P8(q);break;case "draggable":this.QX(q);break;case "modal":this.Lpa(q);break;case "yaw":this.mj(q);break;case "pitch":this.Yn(q);break;case "distance":this.Ap(q);break;case "pixelScale":this.fY(q)}return this};m.prototype.get=function(p,q){switch(p){case "yaw":return this.Ga=this.Ne?this.Ne.Lc():this.Ga;case "pitch":return this.sb=this.Ne?this.Ne.Jc():this.sb;default:return f.prototype.get.call(this,
p,q)}};m.prototype.vpa=function(p){this.Fb!==p&&(this.Fb=p,this.ao())};m.prototype.PHa=function(){if(!this.Ne){var p=c.Zab();this.g9(p)}};m.prototype.Xla=function(){if(this.Ne){var p=this.Ne;this.g9(null);c.ybb(p)}};m.prototype.g9=function(p){if(this.Ne!==p&&(this.Ne&&(this.Ga=this.Ne.Lc(),this.sb=this.Ne.Jc()),this.Ne=p,this.Qja.g9(p),this.Ne&&(this.Ne.Ap(this.AG),this.Ne.fY(this.sha),this.Ne.P8(this.Uea),this.Ne.J8(this.eL),this.lK(),this.N9(),this.eL||(this.Ne.mj(this.Ga),this.Ne.Yn(this.sb)),
this.WL)))this.onChange()};m.prototype.xpa=function(p){this.lg!==p&&(this.lg&&(this.lg.h(n.Zb,this.rl,this),this.lg.h(n.INIT,this.qMa,this),this.lg.h(n.od,this.PMa,this),this.lg.h(n.jd,this.N7,this),this.lg.va().h(n.V,this.onChange,this)),this.FD(),this.lg=p)&&(this.lg.getParent()&&this.lg.getParent().removeChild(this.lg),this.lg.bind(n.Zb,this.rl,this,!0),this.lg.bind(n.INIT,this.qMa,this,!0),this.lg.bind(n.od,this.PMa,this,!0),this.lg.bind(n.jd,this.N7,this,!0),this.Qja.xpa(p),this.ao())};m.prototype.J8=
function(p){var q;this.eL!==p&&(this.eL=p,(q=this.Ne)===null||q===void 0||q.J8(this.eL))};m.prototype.P8=function(p){var q;this.Uea!==p&&(this.Uea=p,(q=this.Ne)===null||q===void 0||q.P8(this.Uea))};m.prototype.QX=function(p){var q;this.oda!==p&&(this.oda=p,this.lK(),(q=this.Ne)===null||q===void 0||q.QX(this.oda))};m.prototype.Lpa=function(p){this.Jya!==p&&(this.Jya=p,this.N9())};m.prototype.mj=function(p){var q;this.eL||(this.Ga=p,(q=this.Ne)===null||q===void 0||q.mj(this.Ga))};m.prototype.Yn=function(p){var q;
this.eL||(this.sb=p,(q=this.Ne)===null||q===void 0||q.Yn(this.sb))};m.prototype.Ap=function(p){var q;this.AG!==p&&(this.AG=p,(q=this.Ne)===null||q===void 0||q.Ap(this.AG))};m.prototype.fY=function(p){var q;this.sha!==p&&(this.sha=p,(q=this.Ne)===null||q===void 0||q.fY(this.sha))};m.prototype.rl=function(){};m.prototype.PMa=function(){this.N9();this.lK()};m.prototype.N7=function(){this.N9();this.lK()};m.prototype.qMa=function(){this.WL=!0;var p=this.lg.va();p.bind(n.V,this.onChange,this,!0);p.fib();
this.onChange()};m.prototype.onChange=function(){var p,q,r,t;if(this.lg){var u=this.lg.va();u=(u===null||u===void 0?void 0:u.getLayers())||[];u.length==0?(p=this.Ne)===null||p===void 0||p.rab():(p=u[0],p.canvas.width>0&&p.canvas.height>0&&((q=this.Ne)===null||q===void 0||q.qRa(p.canvas),(r=this.Ne)===null||r===void 0||r.Xn(p.opacity),q=this.lg.get("actualHeight"),r=this.lg.get("actualWidth"),(t=this.Ne)===null||t===void 0||t.Nhb(r*.5-p.rect.left,q-p.rect.top+20)))}};m.prototype.N9=function(){var p;
(p=this.Ne)===null||p===void 0||p.Lpa(this.Jya&&(this.lg?this.lg.get("visible"):!1))};m.prototype.lK=function(){var p;(p=this.Ne)===null||p===void 0||p.QX(this.oda&&(this.lg?this.lg.get("visible"):!1))};m.prototype.ao=function(){var p;(p=this.lg)===null||p===void 0||p.ao(this.Fb,h.bJ(),e.bJ(),[this.Qja])};m.prototype.FD=function(){var p;(p=this.lg)===null||p===void 0||p.FD()};return m}(k);var d=g.create("XRPanel",a);return a});
define("tdv/view/containers/windows/XRWindow","require exports tdv/view/containers/windows/BaseWindow tdv/player/script/XRPanel tdv/player/view/util/XR three.mod tdv/constants/EventName".split(" "),function(a,l,k,n,g,h,e){a=function(d){function f(){var m=d.call(this)||this;m.lGa=!1;m.df("XRWindow");m.ig=new n;m.ig.set("content",m);m.bind(e.EK,m.Jfb,m,!1);return m}O(f,d);f.prototype.set=function(m,p){switch(m){case "modal":this.ig.set("modal",p);break;case "autoCenter":this.ig.set("autoCenter",p);
break;case "draggable":this.ig.set("draggable",p);break;default:d.prototype.set.call(this,m,p)}};f.prototype.show=function(m){var p=this;this.p5();!m&&this.lGa||this.get("autoCenter")||(this.ig.set("yaw",g.isPresenting?-b.setFromQuaternion(g.xl,"YXZ").y*c:0),this.ig.set("pitch",g.isPresenting?b.setFromQuaternion(g.xl,"YXZ").x*c:0));m=this.get("application");var q=m.get("xrPanels")||[];m.set("xrPanels",q.filter(function(r){return r!==p.ig}).concat([this.ig]));this.lGa=!0;setTimeout(function(){p.set("visible",
!0)},0)};f.prototype.Qe=function(){this.o5();this.set("visible",!1)};f.prototype.Jfb=function(){var m=this,p=this.get("application"),q=p.get("xrPanels")||[];p.set("xrPanels",q.filter(function(r){return r!==m.ig}))};return f}(k);var b=new h.Euler,c=180/Math.PI;return a});
define("tdv/player/script/XRWindow",["require","exports","tdv/player/parser/ClassInfo","tdv/view/containers/windows/XRWindow"],function(a,l,k,n){a=function(h){function e(){var b=h.call(this)||this;g.jla(b);b.show=b.show;b.hide=b.Qe;return b}O(e,h);return e}(n);var g=k.create("XRWindow",a);return a});
define("tdv/player/view/zoomimage/Renderer","require tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/Priority tdv/events/Event tdv/events/EventDispatcher tdv/view/util/Animation tdv/view/util/Ease tdv/view/util/EaseDimension tdv/view/images/ImageLoader tdv/view/constants/ScaleMode tdv/player/view/util/Device tdv/utils".split(" "),function(a){function l(t){this.source=t;this.width=this.source.get("width");this.height=this.source.get("height");this.url=this.source.get("url");this.FO=
this.source.get("grayscale");this.sA=new f(g.Mp)}var k=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/constants/Priority"),h=a("tdv/events/Event"),e=a("tdv/events/EventDispatcher"),b=a("tdv/view/util/Animation"),c=a("tdv/view/util/Ease"),d=a("tdv/view/util/EaseDimension"),f=a("tdv/view/images/ImageLoader"),m=a("tdv/view/constants/ScaleMode"),p=a("tdv/player/view/util/Device"),q=a("tdv/utils"),r=q.extend(e,function(){e.call(this);this.N1=this.N1.bind(this);this.Ih=null;this.qe=
[];this.To=[];this.gk=this.ii=this.Mg=this.Ng=100;this.Lj=1;this.ZB=this.YB=.5;this.Vc=1;this.Xk=this.nk=null;this.E2=!1;this.Eca={};this.vL={};this.vL.low={};this.vL.hight={};p.YN()==p.WP&&(this.vL.low.transform="translateZ(0)",this.vL.hight.transform="");this.ha=!1;this.Si="inherit";this.oa=document.createElement("div");this.oa.style.position="absolute";this.oa.style.left="0";this.oa.style.top="0";this.oa.style.right="0";this.oa.style.bottom="0";this.oa.style.overflow="hidden";this.IR=null;this.rh=
q.ar(this.ya,this)});r.prototype.bc=function(){return this.oa};r.prototype.yP=function(t){this.ri!=t&&(this.ri=t,this.Hba(1),this.rh())};r.prototype.L8=function(t){this.Si!=t&&(this.Si=t,this.Xk&&(this.Xk.style.cursor=this.Si),this.nk&&(this.nk.style.cursor=this.Si))};r.prototype.aib=function(t){this.qe!=t&&(this.qe&&k.da(this.qe,["levels.url"],this.N1),(this.qe=t)&&k.ba(this.qe,["levels.url"],this.N1,!0))};r.prototype.N1=function(){this.hca();this.Ih=null;this.nk&&(this.oa.removeChild(this.nk),this.nk=
null);this.Xk&&(this.oa.removeChild(this.Xk),this.Xk=null);this.Zg&&(this.Zg=null);this.hca();this.E2=!1;this.To.forEach(u=>{u.sA.cancel();u.sA.h(n.ia,this.uya,this)});this.To=(this.qe&&this.qe.get("levels")||[]).filter(function(u){return u.get("url")}).map(u=>{u=new l(u);u.sA.bind(n.ia,this.uya,this);return u});var t=this.D_a();t?(this.ii=t.width,this.gk=t.height):this.gk=this.ii=100;this.ZB=this.YB=.5;this.Hba(1);this.rh()};r.prototype.K8=function(t,u){if(this.Ng!=t||this.Mg!=u)this.Ng=t,this.Mg=
u,this.rh()};r.prototype.Ihb=function(t,u){if(this.Gva!=t||this.Fva!=u)this.Gva=t,this.Fva=u,this.rh()};r.prototype.Ua=function(t){this.ha!=t&&(this.ha=t,this.rh())};r.prototype.move=function(t,u){var v=this.Lj*this.Vc;this.YB+=t/(this.ii*v);this.ZB+=u/(this.gk*v);this.g3()};r.prototype.kA=function(){return this.Vc};r.prototype.setScale=function(t){this.Hba(Math.max(1,Math.min(1/this.Lj,t)));this.Ih&&this.Ih.width<this.Vc*this.Lj*this.ii&&this.Ih.width<this.ii?this.ya():this.g3()};r.prototype.VKa=
function(t){if(!this.nk)return!1;var u=q.offset(this.nk),v=t.pageX-u.left;t=t.pageY-u.top;return v>=0&&t>=0&&v<this.nk.clientWidth&&t<this.nk.clientHeight};r.prototype.ya=function(){if(this.ha){this.v9a();var t=this.M_a();t&&t.sA.kj()?(t!=this.Ih&&(this.Ih||(this.rh(),this.E2=!0),this.BYa(t),this.Ih=t),this.fDa(null)):this.fDa(t);this.g3()}};r.prototype.v9a=function(){switch(this.ri){case m.Lp:var t=this.Ng/this.ii;break;case m.Qk:t=this.Mg/this.gk;break;case m.Dr:t=this.ii*this.Mg>this.gk*this.Ng?
this.Mg/this.gk:this.Ng/this.ii;break;case m.bSa:t=Math.min(this.Gva/this.ii,this.Fva/this.gk);break;default:t=this.ii*this.Mg>this.gk*this.Ng?this.Ng/this.ii:this.Mg/this.gk}this.NVa(t)};r.prototype.uya=function(){this.rh()};r.prototype.BYa=function(t){this.Xk&&(this.Kia(this.Xk,1),this.nk&&this.oa.removeChild(this.nk),this.nk=this.Xk);this.Xk=this.VXa(t);this.Kia(this.Xk,0);this.oa.appendChild(this.Xk);this.Zg=this.MXa();this.Eca={}};r.prototype.M_a=function(){return this.Ih?this.TZa(this.Vc*this.Lj*
this.ii):this.j0a()};r.prototype.fDa=function(t){this.To.forEach(u=>{u==t?u.sA.ql()!=u.url&&u.sA.load(u.url):u.sA.kj()||u.sA.cancel()})};r.prototype.D_a=function(){return this.To.reduce((t,u)=>{t||(t=u);if(u.width>t.width||u.width==t.width&&!u.FO&&t.FO)t=u;return t},null)};r.prototype.j0a=function(){return this.To.reduce((t,u)=>{t||(t=u);if(u.width<t.width||u.width==t.width&&u.FO&&!t.FO)t=u;return t},null)};r.prototype.TZa=function(t){return this.To.reduce((u,v)=>{u||(u=v);if(v.width>=t&&u.width<
t||v.width>=t&&v.width<u.width||v.width<t&&v.width>u.width||!v.FO&&u.FO)u=v;return u},null)};r.prototype.VXa=function(t){t=t.sA.xg(!0);t.style.position="absolute";t.style.cursor=this.Si;t.style.pointerEvents="none";return t};r.prototype.MXa=function(){return new c("linear",[new d("alpha",0,1)],200)};r.prototype.g3=function(){b.requestFrame(function(t){this.b3(t,"low")},this)};r.prototype.Jma=function(){return this.Vc*this.Lj*this.ii};r.prototype.Ima=function(){return this.Vc*this.Lj*this.gk};r.prototype.iJa=
function(){var t=this.Jma();return t>this.Ng?Math.max(this.Ng-t,Math.min(0,this.Ng*.5-t*this.YB)):(this.Ng-t)*.5};r.prototype.jJa=function(){var t=this.Ima();return t>this.Mg?Math.max(this.Mg-t,Math.min(0,this.Mg*.5-t*this.ZB)):(this.Mg-t)*.5};r.prototype.b3=function(t,u){u=u||"low";var v=this.Jma(),w=this.iJa(),y=this.Ima(),x=this.jJa();this.YB=(this.Ng*.5-w)/v;this.ZB=(this.Mg*.5-x)/y;v={left:Math.round(w)+"px",top:Math.round(x)+"px",width:Math.round(v)+"px",height:Math.round(y)+"px",display:"block"};
for(var z in this.vL[u])v[z]=this.vL[u][z];if(this.Eca!=v){if(this.nk)for(z in v)this.nk.style[z]=v[z];if(this.Xk)for(z in v)this.Xk.style[z]=v[z];this.Eca=v}this.hca();this.Zg?(this.Zg.Lb(t),this.Kia(this.Xk,this.Zg.nb("alpha")),this.Zg.Re()&&(this.Zg=null,this.nk&&this.oa.removeChild(this.nk),this.nk=this.Xk,this.Xk=null),this.g3()):u=="low"&&this.e7a();!this.Zg&&this.E2&&(this.E2=!1,this.m(new h(n.ia)))};r.prototype.Kia=function(t,u){t.style.opacity=u};r.prototype.hca=function(){this.IR!=null&&
(clearTimeout(this.IR),this.IR=null)};r.prototype.e7a=function(){var t=this;this.IR=setTimeout(function(){t.IR=null;t.b3(50,"hight")},50)};r.prototype.Hba=function(t){this.Vc!=t&&(this.Vc=t,this.m8a())};r.prototype.NVa=function(t){this.Lj!=t&&(this.Lj=t)};r.prototype.m8a=function(){this.m(new h(r.fZ,{scale:this.Vc}))};r.fZ="scaleChange";return r});
define("tdv/player/view/zoomimage/ZoomImage","require tdv/constants/EventName tdv/events/Event tdv/player/view/zoomimage/Renderer tdv/utils tdv/view/core/UIComponent tdv/view/core/UIComponent".split(" "),function(a){var l=a("tdv/constants/EventName"),k=a("tdv/events/Event"),n=a("tdv/player/view/zoomimage/Renderer"),g=a("tdv/utils"),h=a("tdv/view/core/UIComponent");h=a("tdv/view/core/UIComponent");var e=g.extend(h,function(){h.call(this);this.df("ZoomImage");this.cz=this.gp=void 0;this.$l=!1;this.NBa=
void 0;this.Vxa=this.Vc=1;this.fV=null;this.o=new n;this.o.bind(l.ia,this.f3a,this);this.o.bind(n.fZ,this.g3a,this);this.bind(l.Zb,this.kd,this,!0);this.bind(l.od,this.Zo,this,!0);this.bind(l.jd,this.Xo,this,!0);this.bind(l.Ra,this.re,this,!0);this.bind(l.fb,this.cl,this,!0);this.bind(l.ab,this.dl,this,!0);this.bind(l.Rk,this.tH,this,!0);this.bind(l.CK,this.MG,this,!0)});e.prototype.Ib=function(){h.prototype.Ib.call(this);this.o.bc().parentElement||this.va().vk(this.o.bc())};e.prototype.set=function(b,
c){switch(b){case "scale":this.o.setScale(c);c=this.o.kA();break;case "imageLeft":case "imageTop":case "imageWidth":case "imageHeight":return}h.prototype.set.call(this,b,c)};e.prototype.get=function(b,c){switch(b){case "scale":return this.o.kA();case "imageLeft":return this.o.iJa();case "imageTop":return this.o.jJa();case "imageWidth":return this.o.Jma();case "imageHeight":return this.o.Ima()}return h.prototype.get.call(this,b,c)};e.prototype.Ob=function(){h.prototype.Ob.call(this);this.j("image");
this.j("scaleMode");this.j("customHeight");this.j("customWidth");this.j("imageCursor");this.j("imageLeft");this.j("imageTop");this.j("imageWidth");this.j("imageHeight")};e.prototype.jb=function(){this.S("scaleMode")&&(this.o.yP(this.G("scaleMode")),this.$("scaleMode"));this.S("image")&&(this.o.aib(this.G("image")),this.$("image"),this.Vxa=this.Vc);if(this.S("customHeight")||this.S("customWidth"))this.$("customHeight"),this.$("customWidth"),this.kd();this.S("imageCursor")&&(this.$("imageCursor"),this.o.L8(this.Fb.Tca.VIa(this.get("imageCursor"))));
h.prototype.jb.call(this)};e.prototype.kd=function(){var b=this.gb(),c=this.Kb(),d=this.get("customWidth","100%"),f=h.wp(d);d=f!==void 0?b*f/100:d;f=this.get("customHeight","100%");var m=h.wp(f);this.o.Ihb(d,m!==void 0?c*m/100:f);this.o.K8(b,c)};e.prototype.Zo=function(){this.o.Ua(!0)};e.prototype.Xo=function(){this.o.Ua(!1)};e.prototype.re=function(b){this.gp=b.x;this.cz=b.y;this.$l=!0;this.NBa=this.o.VKa(b)};e.prototype.cl=function(b){this.$l&&(this.Ika(),this.o.move(-(b.x-this.gp),-(b.y-this.cz)),
this.gp=b.x,this.cz=b.y)};e.prototype.dl=function(b){this.$l=!1;this.NBa||this.o.VKa(b)||this.m(new k(e.nSa))};e.prototype.tH=function(b){this.Ika();this.o.setScale((1+b.delta/20)*this.o.kA())};e.prototype.MG=function(b){this.Ika();this.o.setScale(b.scale/this.Vxa)};e.prototype.f3a=function(){this.m(new k(l.ia))};e.prototype.g3a=function(){h.prototype.set.call(this,"scale",this.o.kA());this.m(new k(e.fZ))};e.prototype.Ika=function(){this.fV?(clearTimeout(this.fV),this.fV=null):this.m(new k(e.ak));
this.fV=setTimeout(function(){this.fV=null;this.m(new k(e.$j))}.bind(this),300)};e.nSa="backgroundClick";e.fZ="scaleChange";e.ak="userInteractionStart";e.$j="userInteractionEnd";return e});define("tdv/player/script/ZoomImage",["require","tdv/player/view/zoomimage/ZoomImage","tdv/player/parser/ClassInfo"],function(a){var l=a("tdv/player/view/zoomimage/ZoomImage");return a("tdv/player/parser/ClassInfo").define("ZoomImage",l,function(){l.call(this)})});
define("tdv/player/script/classes","require tdv/player/parser/ClassInfo tdv/player/script/AdjacentPanorama tdv/player/script/AmbientLight tdv/player/script/AmbientOcclusionModel3DPostprocessing tdv/player/script/AnimatedImageResource tdv/player/script/AntialiasModel3DPostprocessing tdv/player/script/AreaHotspotMapOverlay tdv/player/script/AudioResource tdv/player/script/BaseButton tdv/player/script/BaseObject tdv/player/script/BaseWindow tdv/player/script/BoxModel3DObject tdv/player/script/Button tdv/player/script/CanvasPlaneModel3DObject tdv/player/script/CeilingCapPanoramaOverlay tdv/player/script/ChildModel3DObject tdv/player/script/CloseButton tdv/player/script/CookiesPolicy tdv/player/script/Container tdv/player/script/CubicPanoramaFrame tdv/player/script/DirectionalPanoramaAudio tdv/player/script/DistanceModel3DCameraMovement tdv/player/script/DistancePanoramaCameraMovement tdv/player/script/DistanceRotationalCameraMovement tdv/player/script/DropDown tdv/player/script/DustPanoramaOverlay tdv/player/script/Effect tdv/player/script/ExternalModel3DObject tdv/player/script/FadeInEffect tdv/player/script/FadeOutEffect tdv/player/script/FirstPersonModel3DCamera tdv/player/script/FlatHotspotPanoramaOverlay tdv/player/script/FlatHotspotPanoramaOverlayArea tdv/player/script/FlatHotspotPanoramaOverlayImage tdv/player/script/FlatHotspotPanoramaOverlayImageBase tdv/player/script/FlatHotspotPanoramaOverlayMap tdv/player/script/FlatPanoramaOverlayPlaybackPosition tdv/player/script/FlyOverModel3DCamera tdv/player/script/FramePanoramaOverlay tdv/player/script/GoogleMaps3DTilesModel3DResource tdv/player/script/GridContainer tdv/player/script/HDRPanorama tdv/player/script/HorizonGridModel3DObject tdv/player/script/HotspotMapOverlay tdv/player/script/HotspotMapOverlayArea tdv/player/script/HotspotMapOverlayImage tdv/player/script/HotspotMapOverlayMap tdv/player/script/HotspotPanoramaOverlay tdv/player/script/HotspotPanoramaOverlayArea tdv/player/script/HotspotPanoramaOverlayImage tdv/player/script/HotspotPanoramaOverlayImageBase tdv/player/script/HotspotPanoramaOverlayMap tdv/player/script/HTML tdv/player/script/HTMLText tdv/player/script/IconButton tdv/player/script/IconHotspotMapOverlay tdv/player/script/Image tdv/player/script/ImagePlaneModel3DObject tdv/player/script/ImageResource tdv/player/script/ImageResourceLevel tdv/player/script/InnerModel3DObject tdv/player/script/Label tdv/player/script/LensFlarePanoramaOverlay tdv/player/script/LineModel3DObject tdv/player/script/LivePanorama tdv/player/script/Light tdv/player/script/Map tdv/player/script/MapOverlay tdv/player/script/MapPlayer tdv/player/script/MapPlayListItem tdv/player/script/MeasureModel3DObject tdv/player/script/MeasureModel3DObjectPoint tdv/player/script/Media tdv/player/script/MediaAudio tdv/player/script/Model3D tdv/player/script/Model3DAnimation tdv/player/script/Model3DCamera tdv/player/script/Model3DCameraMovement tdv/player/script/Model3DCameraSequence tdv/player/script/Model3DDisplayEffect tdv/player/script/Model3DObject tdv/player/script/Model3DPlayer tdv/player/script/Model3DPlayListItem tdv/player/script/Model3DPointer tdv/player/script/Model3DPostprocessing tdv/player/script/Model3DResource tdv/player/script/Model3DResourceLevel tdv/player/script/Menu tdv/player/script/MenuItem tdv/player/script/MotionBlurModel3DPostprocessing tdv/player/script/MovementPhotoCamera tdv/player/script/Object3D tdv/player/script/OrbitLight tdv/player/script/OrbitModel3DCamera tdv/player/script/Panorama tdv/player/script/PanoramaAudio tdv/player/script/PanoramaCamera tdv/player/script/PanoramaCameraDisplayPosition tdv/player/script/PanoramaCameraMovement tdv/player/script/PanoramaCameraPosition tdv/player/script/PanoramaCameraSequence tdv/player/script/PanoramaFrame tdv/player/script/PanoramaMapLocation tdv/player/script/PanoramaModel3DLocation tdv/player/script/PanoramaOverlay tdv/player/script/PanoramaOverlayPlaybackPosition tdv/player/script/PanoramaPlayer tdv/player/script/PanoramaPlayListItem tdv/player/script/PanoramaPoint tdv/player/script/PanoramaSnapshot tdv/player/script/Photo tdv/player/script/PhotoAlbum tdv/player/script/PhotoAlbumAudio tdv/player/script/PhotoAlbumPlayer tdv/player/script/PhotoAlbumPlayListItem tdv/player/script/PhotoAudio tdv/player/script/PhotoCamera tdv/player/script/PhotoCameraPosition tdv/player/script/PhotoPlayList tdv/player/script/PhotoPlayListItem tdv/player/script/PlaneModel3DObject tdv/player/script/PlaybackBar tdv/player/script/Player tdv/player/script/PlayerMenuItem tdv/player/script/PlayList tdv/player/script/PlayListItem tdv/player/script/PopupPanoramaOverlay tdv/player/script/ProgressBar tdv/player/script/ProjectedMaterialModel3DObject tdv/player/script/QuadFramePanoramaOverlay tdv/player/script/QuadHotspotPanoramaOverlay tdv/player/script/QuadHotspotPanoramaOverlayArea tdv/player/script/QuadHotspotPanoramaOverlayImage tdv/player/script/QuadHotspotPanoramaOverlayImageBase tdv/player/script/QuadHotspotPanoramaOverlayMap tdv/player/script/QuadVideoPanoramaOverlay tdv/player/script/RadialModel3DDisplayEffect tdv/player/script/RainPanoramaOverlay tdv/player/script/RotationalCameraDisplayPosition tdv/player/script/RotationalCameraMovement tdv/player/script/RotationalCameraPosition tdv/player/script/RotationalCameraSequence tdv/player/script/SlideInEffect tdv/player/script/SlideOutEffect tdv/player/script/SnowPanoramaOverlay tdv/player/script/SphericPanoramaFrame tdv/player/script/SphereModel3DObject tdv/player/script/SpotLight tdv/player/script/SpriteModel3DObject tdv/player/script/SurfaceReticleModel3DObject tdv/player/script/TabPanel tdv/player/script/TabPanelPage tdv/player/script/TargetModel3DCameraMovement tdv/player/script/TargetPanoramaCameraMovement tdv/player/script/TargetRotationalCameraDisplayMovement tdv/player/script/TargetRotationalCameraMovement tdv/player/script/TDTilesModel3DResource tdv/player/script/TiledImageResourceLevel tdv/player/script/TripodCapPanoramaOverlay tdv/player/script/ThumbnailGrid tdv/player/script/ThumbnailList tdv/player/script/UIComponent tdv/player/script/Video tdv/player/script/Video360 tdv/player/script/Video360Player tdv/player/script/Video360PlayListItem tdv/player/script/Video360Resource tdv/player/script/Video360ResourceLevel tdv/player/script/VideoCue tdv/player/script/VideoPanorama tdv/player/script/VideoPanoramaOverlay tdv/player/script/VideoPlaneModel3DObject tdv/player/script/VideoPlayer tdv/player/script/VideoPlayListItem tdv/player/script/VideoResource tdv/player/script/VideoResourceLevel tdv/player/script/VignetteModel3DPostprocessing tdv/player/script/ViewerArea tdv/player/script/WebFrame tdv/player/script/Window tdv/player/script/XRPanel tdv/player/script/XRWindow tdv/player/script/ZoomImage".split(" "),function(a){a("tdv/player/parser/ClassInfo");
a("tdv/player/script/AdjacentPanorama");a("tdv/player/script/AmbientLight");a("tdv/player/script/AmbientOcclusionModel3DPostprocessing");a("tdv/player/script/AnimatedImageResource");a("tdv/player/script/AntialiasModel3DPostprocessing");a("tdv/player/script/AreaHotspotMapOverlay");a("tdv/player/script/AudioResource");a("tdv/player/script/BaseButton");a("tdv/player/script/BaseObject");a("tdv/player/script/BaseWindow");a("tdv/player/script/BoxModel3DObject");a("tdv/player/script/Button");a("tdv/player/script/CanvasPlaneModel3DObject");
a("tdv/player/script/CeilingCapPanoramaOverlay");a("tdv/player/script/ChildModel3DObject");a("tdv/player/script/CloseButton");a("tdv/player/script/CookiesPolicy");a("tdv/player/script/Container");a("tdv/player/script/CubicPanoramaFrame");a("tdv/player/script/DirectionalPanoramaAudio");a("tdv/player/script/DistanceModel3DCameraMovement");a("tdv/player/script/DistancePanoramaCameraMovement");a("tdv/player/script/DistanceRotationalCameraMovement");a("tdv/player/script/DropDown");a("tdv/player/script/DustPanoramaOverlay");
a("tdv/player/script/Effect");a("tdv/player/script/ExternalModel3DObject");a("tdv/player/script/FadeInEffect");a("tdv/player/script/FadeOutEffect");a("tdv/player/script/FirstPersonModel3DCamera");a("tdv/player/script/FlatHotspotPanoramaOverlay");a("tdv/player/script/FlatHotspotPanoramaOverlayArea");a("tdv/player/script/FlatHotspotPanoramaOverlayImage");a("tdv/player/script/FlatHotspotPanoramaOverlayImageBase");a("tdv/player/script/FlatHotspotPanoramaOverlayMap");a("tdv/player/script/FlatPanoramaOverlayPlaybackPosition");
a("tdv/player/script/FlyOverModel3DCamera");a("tdv/player/script/FramePanoramaOverlay");a("tdv/player/script/GoogleMaps3DTilesModel3DResource");a("tdv/player/script/GridContainer");a("tdv/player/script/HDRPanorama");a("tdv/player/script/HorizonGridModel3DObject");a("tdv/player/script/HotspotMapOverlay");a("tdv/player/script/HotspotMapOverlayArea");a("tdv/player/script/HotspotMapOverlayImage");a("tdv/player/script/HotspotMapOverlayMap");a("tdv/player/script/HotspotPanoramaOverlay");a("tdv/player/script/HotspotPanoramaOverlayArea");
a("tdv/player/script/HotspotPanoramaOverlayImage");a("tdv/player/script/HotspotPanoramaOverlayImageBase");a("tdv/player/script/HotspotPanoramaOverlayMap");a("tdv/player/script/HTML");a("tdv/player/script/HTMLText");a("tdv/player/script/IconButton");a("tdv/player/script/IconHotspotMapOverlay");a("tdv/player/script/Image");a("tdv/player/script/ImagePlaneModel3DObject");a("tdv/player/script/ImageResource");a("tdv/player/script/ImageResourceLevel");a("tdv/player/script/InnerModel3DObject");a("tdv/player/script/Label");
a("tdv/player/script/LensFlarePanoramaOverlay");a("tdv/player/script/LineModel3DObject");a("tdv/player/script/LivePanorama");a("tdv/player/script/Light");a("tdv/player/script/Map");a("tdv/player/script/MapOverlay");a("tdv/player/script/MapPlayer");a("tdv/player/script/MapPlayListItem");a("tdv/player/script/MeasureModel3DObject");a("tdv/player/script/MeasureModel3DObjectPoint");a("tdv/player/script/Media");a("tdv/player/script/MediaAudio");a("tdv/player/script/Model3D");a("tdv/player/script/Model3DAnimation");
a("tdv/player/script/Model3DCamera");a("tdv/player/script/Model3DCameraMovement");a("tdv/player/script/Model3DCameraSequence");a("tdv/player/script/Model3DDisplayEffect");a("tdv/player/script/Model3DObject");a("tdv/player/script/Model3DPlayer");a("tdv/player/script/Model3DPlayListItem");a("tdv/player/script/Model3DPointer");a("tdv/player/script/Model3DPostprocessing");a("tdv/player/script/Model3DResource");a("tdv/player/script/Model3DResourceLevel");a("tdv/player/script/Menu");a("tdv/player/script/MenuItem");
a("tdv/player/script/MotionBlurModel3DPostprocessing");a("tdv/player/script/MovementPhotoCamera");a("tdv/player/script/Object3D");a("tdv/player/script/OrbitLight");a("tdv/player/script/OrbitModel3DCamera");a("tdv/player/script/Panorama");a("tdv/player/script/PanoramaAudio");a("tdv/player/script/PanoramaCamera");a("tdv/player/script/PanoramaCameraDisplayPosition");a("tdv/player/script/PanoramaCameraMovement");a("tdv/player/script/PanoramaCameraPosition");a("tdv/player/script/PanoramaCameraSequence");
a("tdv/player/script/PanoramaFrame");a("tdv/player/script/PanoramaMapLocation");a("tdv/player/script/PanoramaModel3DLocation");a("tdv/player/script/PanoramaOverlay");a("tdv/player/script/PanoramaOverlayPlaybackPosition");a("tdv/player/script/PanoramaPlayer");a("tdv/player/script/PanoramaPlayListItem");a("tdv/player/script/PanoramaPoint");a("tdv/player/script/PanoramaSnapshot");a("tdv/player/script/Photo");a("tdv/player/script/PhotoAlbum");a("tdv/player/script/PhotoAlbumAudio");a("tdv/player/script/PhotoAlbumPlayer");
a("tdv/player/script/PhotoAlbumPlayListItem");a("tdv/player/script/PhotoAudio");a("tdv/player/script/PhotoCamera");a("tdv/player/script/PhotoCameraPosition");a("tdv/player/script/PhotoPlayList");a("tdv/player/script/PhotoPlayListItem");a("tdv/player/script/PlaneModel3DObject");a("tdv/player/script/PlaybackBar");a("tdv/player/script/Player");a("tdv/player/script/PlayerMenuItem");a("tdv/player/script/PlayList");a("tdv/player/script/PlayListItem");a("tdv/player/script/PopupPanoramaOverlay");a("tdv/player/script/ProgressBar");
a("tdv/player/script/ProjectedMaterialModel3DObject");a("tdv/player/script/QuadFramePanoramaOverlay");a("tdv/player/script/QuadHotspotPanoramaOverlay");a("tdv/player/script/QuadHotspotPanoramaOverlayArea");a("tdv/player/script/QuadHotspotPanoramaOverlayImage");a("tdv/player/script/QuadHotspotPanoramaOverlayImageBase");a("tdv/player/script/QuadHotspotPanoramaOverlayMap");a("tdv/player/script/QuadVideoPanoramaOverlay");a("tdv/player/script/RadialModel3DDisplayEffect");a("tdv/player/script/RainPanoramaOverlay");
a("tdv/player/script/RotationalCameraDisplayPosition");a("tdv/player/script/RotationalCameraMovement");a("tdv/player/script/RotationalCameraPosition");a("tdv/player/script/RotationalCameraSequence");a("tdv/player/script/SlideInEffect");a("tdv/player/script/SlideOutEffect");a("tdv/player/script/SnowPanoramaOverlay");a("tdv/player/script/SphericPanoramaFrame");a("tdv/player/script/SphereModel3DObject");a("tdv/player/script/SpotLight");a("tdv/player/script/SpriteModel3DObject");a("tdv/player/script/SurfaceReticleModel3DObject");
a("tdv/player/script/TabPanel");a("tdv/player/script/TabPanelPage");a("tdv/player/script/TargetModel3DCameraMovement");a("tdv/player/script/TargetPanoramaCameraMovement");a("tdv/player/script/TargetRotationalCameraDisplayMovement");a("tdv/player/script/TargetRotationalCameraMovement");a("tdv/player/script/TDTilesModel3DResource");a("tdv/player/script/TiledImageResourceLevel");a("tdv/player/script/TripodCapPanoramaOverlay");a("tdv/player/script/ThumbnailGrid");a("tdv/player/script/ThumbnailList");
a("tdv/player/script/UIComponent");a("tdv/player/script/Video");a("tdv/player/script/Video360");a("tdv/player/script/Video360Player");a("tdv/player/script/Video360PlayListItem");a("tdv/player/script/Video360Resource");a("tdv/player/script/Video360ResourceLevel");a("tdv/player/script/VideoCue");a("tdv/player/script/VideoPanorama");a("tdv/player/script/VideoPanoramaOverlay");a("tdv/player/script/VideoPlaneModel3DObject");a("tdv/player/script/VideoPlayer");a("tdv/player/script/VideoPlayListItem");a("tdv/player/script/VideoResource");
a("tdv/player/script/VideoResourceLevel");a("tdv/player/script/VignetteModel3DPostprocessing");a("tdv/player/script/ViewerArea");a("tdv/player/script/WebFrame");a("tdv/player/script/Window");a("tdv/player/script/XRPanel");a("tdv/player/script/XRWindow");a("tdv/player/script/ZoomImage");return!0});
define("tdv/player/parser/Parser","require tdv/utils tdv/player/parser/ClassInfo tdv/player/parser/Sign tdv/player/script/classes tdv/player/view/util/URL".split(" "),function(a){function l(m,p){this.type=m;this.stack=p}function k(){}var n=a("tdv/utils"),g=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/parser/Sign");a("tdv/player/script/classes");a("tdv/player/view/util/URL");k.prototype.pgb=function(m,p,q,r){this.Fda=[];this.fD=this.WM(m);this.dH=void 0;this.fD.Tv.oJa()?(this.J4=h.validate(m),
this.dH=this.Ewa(this.fD,e.TYPE),this.YXa(this.dH,this.fD,p,q,r),this.IVa(this.fD),this.GVa(this.fD,this.dH),this.JVa(this.dH,this.fD),this.gWa(this.dH,this.fD)):this.Vp("Invalid root class",[]);return this.Fda.length==0};k.prototype.Vb=function(){return this.fD.instance};k.prototype.WM=function(m,p){p=p||[];return Array.isArray(m)?this.j4a(m,p):n.Bna(m)&&m["class"]?this.m4a(m,p):n.Bna(m)?this.k4a(m,p):n.QKa(m)?this.l4a(m,p):this.n4a(m,p)};k.prototype.j4a=function(m,p){for(var q=[],r=0;r<m.length;r++)p.push("Item["+
r+"]"),q.push(this.WM(m[r],p)),p.pop();return new b(p.slice(),q)};k.prototype.m4a=function(m,p){var q=m["class"],r=g.Bi(m["class"]);if(r){q={};var t={},u;for(u in m){p.push(u);var v=m[u];switch(u){case "class":break;case "scripts":var w=this.WM(v,p);break;default:r.hasAttribute(u)?q[u]=this.WM(v,p):r.hKa(u)||r.iKa(u)?t[u]=this.WM(v,p):this.Vp(r.gA()+" object doesn't have any attribute named "+u,p)}p.pop()}return new e(p.slice(),r,m.id,q,t,w)}this.Vp("Undefined class name: "+q,p.slice());return new f(p.slice(),
null)};k.prototype.k4a=function(m,p){var q={},r;for(r in m)p.push(r),q[r]=this.WM(m[r],p),p.pop();return new c(p.slice(),q)};k.prototype.l4a=function(m,p){return new d(p.slice(),m)};k.prototype.n4a=function(m,p){return new f(p.slice(),m)};k.prototype.Ewa=function(m,p){var q=p&&m.type!=p?[]:[m],r=0;for(m=m.Cb();r<m.length;r++)q=q.concat(this.Ewa(m[r],p));return q};k.prototype.YXa=function(m,p,q,r,t){p.instance=p.Tv.yi(null,r,t,[q,this.J4]);p.instance.set("application",p.instance);for(q=0;q<m.length;q++){var u=
m[q];u!=p&&(u.instance=u.Tv.yi(p.instance,r,t))}};k.prototype.IVa=function(m){if(m.scripts)if(m.scripts.type==c.TYPE)for(var p in m.scripts.value)this.HVa(m,p);else this.Vp("Invalid content.",m.scripts.stack)};k.prototype.HVa=function(m,p){var q=m.instance,r=m.scripts.value[p];q[p]!==void 0?this.Vp("Identifier: "+p+" is already in use",r.stack):r&&r.type==d.TYPE?q[p]=function(){return r.kw().apply(q,arguments)}:this.Vp("Invalid content.",r.stack)};k.prototype.GVa=function(m,p){m=m.instance;for(var q=
0;q<p.length;q++){var r=p[q],t=r.id;t&&(m[t]===void 0?m[t]=r.instance:this.Vp("Identifier: "+t+" is arleady in use",r.stack))}};k.prototype.JVa=function(m,p){for(var q=0;q<m.length;q++){var r=m[q],t=r.attributes,u;for(u in t)this.FVa(r,u,p)}};k.prototype.FVa=function(m,p,q){var r=m.Tv;if(r.hasAttribute(p)){try{var t=m.attributes[p].kw()}catch(u){this.Vp("Invalid value for property "+p+" of "+r.gA()+" instance",m.stack)}try{t=r.xma(p)(t,q.instance),m.instance.set(p,t)}catch(u){this.Vp("Invalid value for property "+
p+" of "+r.gA()+" instance",m.stack)}}else this.Vp(r.gA()+" object doesn't have any property named "+p,m.stack)};k.prototype.gWa=function(m,p){for(var q=0;q<m.length;q++){var r=m[q],t;for(t in r.XI)this.fWa(r,t,p)}};k.prototype.fWa=function(m,p,q){var r=m.Tv,t=m.instance,u=r.hKa(p),v=r.iKa(p);if(u||v){m=m.XI[p];var w=m.kw();n.QKa(w)?t.bind(p,w,q.instance,v,w,!0):typeof w=="string"?t.bind(p,function(){try{eval("var event = arguments[0];"+w)}catch(y){throw y;}},q.instance,v,w,!0):this.Vp("Invalid value.",
m.stack)}else this.Vp(r.gA()+" object doesn't have any event named "+p,m.stack)};k.prototype.Vp=function(m,p){this.Fda.push("In "+p.join(" >> ")+": "+m)};l.prototype.Cb=function(){return[]};l.prototype.kw=function(){};var e=n.extend(l,function(m,p,q,r,t,u){l.call(this,e.TYPE,m);this.Tv=p;this.id=q;this.attributes=r;this.XI=t;this.scripts=u;this.instance=null});e.prototype.Cb=function(){var m=this.Tv.AJa(),p=[],q=Object.assign({},this.attributes);if(m)for(var r=0;r<m.length;r++){var t=m[r];q[t]!=void 0&&
(p.push(q[t]),delete q[t])}return p=p.concat(Object.values(q))};e.prototype.kw=function(){return this.instance};e.TYPE="instance";var b=n.extend(l,function(m,p){l.call(this,b.TYPE,m);this.items=p});b.prototype.Cb=function(){return this.items.slice()};b.prototype.kw=function(){for(var m=[],p=0;p<this.items.length;p++)m.push(this.items[p].kw());return m};b.TYPE="array";var c=n.extend(l,function(m,p){l.call(this,c.TYPE,m);this.value=p});c.prototype.Cb=function(){return Object.values(this.value)};c.prototype.kw=
function(){var m={},p;for(p in this.value)m[p]=this.value[p].kw();return m};c.TYPE="dict";var d=n.extend(l,function(m,p){l.call(this,d.TYPE,m);this.value=p});d.prototype.kw=function(){return this.value};d.TYPE="function";var f=n.extend(l,function(m,p){l.call(this,f.TYPE,m);this.value=p});f.prototype.kw=function(){return this.value};f.TYPE="simple";return k});
define("tdv/player/Main","require tdv/constants/EventName tdv/events/Event tdv/player/parser/ClassInfo tdv/player/parser/Parser tdv/player/view/util/Device tdv/player/view/util/Installer tdv/player/view/util/URL tdv/player/view/util/XR tdv/player/view/panorama/renderer/3d/util/Util tdv/player/AppInfo tdv/player/l10n tdv/view/util/Fullscreen tdv/utils".split(" "),function(a){function l(u,v){this.DU=u;this.Bi=this.Bi.bind(this);this.yi=this.yi.bind(this);this.Yv=this.Yv.bind(this);this.Qa=this.Qa.bind(this);
this.f6=this.f6.bind(this);e.ub()&&!e.gf()&&q.tm();this.u_=[];u=m.name;var w=[];u&&w.push(u);m.RW>0?w.push("v:"+m.RW+"."+m.XW):w.push("v:"+m.XW);r.log(w.join(" "));this.kr=v;c.Jeb()||[e.tK,e.dF].indexOf(e.Ub())>=0?(this.Vl=new h,(v=this.kr.get(TDV.PlayerSettings.BASE_DIR_URL))?(v=c.YA(v),v[v.length-1]!="/"&&(v+="/")):v=c.getDirectory(this.kr.get(TDV.PlayerSettings.SELECTED_SCRIPT_URL)),this.Woa=this.kr.get(TDV.PlayerSettings.QUERY_STRING_PARAMETERS),b.Ggb(v,function(y){this.ola=y;this.I3a()}.bind(this))):
window.alert(p("web-server-required"))}var k=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/parser/Parser"),e=a("tdv/player/view/util/Device"),b=a("tdv/player/view/util/Installer"),c=a("tdv/player/view/util/URL"),d=a("tdv/player/view/util/XR"),f=a("tdv/player/view/panorama/renderer/3d/util/Util"),m=a("tdv/player/AppInfo"),p=a("tdv/player/l10n"),q=a("tdv/view/util/Fullscreen"),r=a("tdv/utils");l.prototype.I3a=function(){this.DU.m(new TDV.tZ(k.CTa,
{},[],void 0));r.defer(function(){if(!this.Vl.pgb(this.kr.get(TDV.PlayerSettings.SCRIPT_DATA),this.kr.get(TDV.PlayerSettings.CONTAINER),this.ola,this.Woa)){if(m.Ljb!="false"){window.alert(this.rxa());return}r.log(this.rxa())}this.eWa();this.xVa(this.kr);this.LVa();d.FJ=this.Vl.Vb();d.initialize(function(){this.o8a()}.bind(this))}.bind(this))};l.prototype.clear=function(){this.Vl&&(this.dxa().forEach(function(u){u.instance.Nqa();u.Tv.hW().forEach(function(v){switch(v){case "VideoPlayer":u.instance.stop();
case "MapPlayer":case "Model3DPlayer":case "PanoramaPlayer":case "PhotoAlbumPlayer":u.instance.set("viewerArea",null);break;case "ZoomImage":u.instance.set("image",null);break;case "Audio":u.instance.stop();break;case "Effect":u.instance.end();break;case "Media":u.instance.Zgb()}})}),f.wgb(),this.Vl.Vb().clear(),t={},this.kr=this.Vl=null)};l.prototype.mdb=function(u){return this.Vl.Vb()[u]};l.prototype.Bi=function(u){if(u in t)return t[u].slice();var v=[];this.dxa().forEach(function(w){w.Tv.hW().includes(u)&&
v.push(w.instance)});t[u]=v;return v.slice()};l.prototype.dxa=function(){return this.Vl?this.Vl.dH.concat(this.u_):[]};var t={};l.prototype.yi=function(u){var v=g.Bi(u);if(!v)throw"Invalid className: "+u;t={};u=this.Vl.Vb();var w={};w.Tv=v;w.instance=v.yi(u,this.ola,this.Woa);this.u_.push(w);this.tua(v,w.instance);this.c8a(u,w.instance);return w.instance};l.prototype.Yv=function(u){var v=this.u_.findIndex(function(w){return w.instance==u});v<0||(t={},this.u_.splice(v,1),u.Nqa(),u.dispose&&u.dispose())};
l.prototype.rxa=function(){for(var u=this.Vl.Fda,v=["Errors parsing script file:"],w=0;w<u.length;w++)v.push(u[w]);return v.join("\n")};l.prototype.eWa=function(){this.Vl.dH.forEach(function(v){this.tua(v.Tv,v.instance,v.id)}.bind(this));var u=this.Vl.Vb().q_;u.bind(k.AK,function(){u.xkb(k.AK);this.DU.cookiesEnabled=this.DU.Kab=!0;this.DU.m(new TDV.tZ(k.AK,{},[],void 0))},this,!0)};l.prototype.tua=function(u,v,w){var y=u.hW();r.union(u.Cma(),u.Kma()).forEach(function(x){v.bind(x,function(z){this.DU.m(new TDV.tZ(x,
z,y,w))}.bind(this),this,!0)}.bind(this))};l.prototype.c8a=function(u,v){u.m(new n(k.TSa,{instance:v}))};l.prototype.xVa=function(u){this.Vl.Vb().set("settings",u)};l.prototype.Qa=function(){return g.Qa.apply(g,arguments)};l.prototype.f6=function(u){!u||c.WD(u)||c.W6(u)||(u=c.zD(c.YA(u,this.ola),this.Woa));return u};l.prototype.LVa=function(){var u=this.Vl.Vb();u.getByClassName=u.Bi=this.Bi;u.createInstance=u.yi=this.yi;u.disposeInstance=u.Yv=this.Yv;u.isInstanceOfClass=u.Qa=this.Qa;u.getAbsoluteURL=
u.f6=this.f6};l.prototype.o8a=function(){this.Vl.Vb().start()};l.qkb=function(u){u.m(new TDV.tZ(k.USa,{},[],void 0))};return l});define("main",["require","tdv/utils","tdv/player/Main"],function(a){var l=a("tdv/utils"),k=a("tdv/player/Main");l.Mbb(function(){TDV.qb.Cib(k)})});
(function(global,factory){factory(global.THREE={})})(this,function(exports){"use strict";const REVISION="182";const MOUSE={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2};const TOUCH={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3};const CullFaceNone=0;const CullFaceBack=1;const CullFaceFront=2;const CullFaceFrontBack=3;const BasicShadowMap=0;const PCFShadowMap=1;const PCFSoftShadowMap=2;const VSMShadowMap=3;const FrontSide=0;const BackSide=1;const DoubleSide=2;const NoBlending=0;const NormalBlending=1;const AdditiveBlending=2;const SubtractiveBlending=3;const MultiplyBlending=4;const CustomBlending=5;const AddEquation=100;const SubtractEquation=101;const ReverseSubtractEquation=102;const MinEquation=103;const MaxEquation=104;const ZeroFactor=200;const OneFactor=201;const SrcColorFactor=202;const OneMinusSrcColorFactor=203;const SrcAlphaFactor=204;const OneMinusSrcAlphaFactor=205;const DstAlphaFactor=206;const OneMinusDstAlphaFactor=207;const DstColorFactor=208;const OneMinusDstColorFactor=209;const SrcAlphaSaturateFactor=210;const ConstantColorFactor=211;const OneMinusConstantColorFactor=212;const ConstantAlphaFactor=213;const OneMinusConstantAlphaFactor=214;const NeverDepth=0;const AlwaysDepth=1;const LessDepth=2;const LessEqualDepth=3;const EqualDepth=4;const GreaterEqualDepth=5;const GreaterDepth=6;const NotEqualDepth=7;const MultiplyOperation=0;const MixOperation=1;const AddOperation=2;const NoToneMapping=0;const LinearToneMapping=1;const ReinhardToneMapping=2;const CineonToneMapping=3;const ACESFilmicToneMapping=4;const CustomToneMapping=5;const AgXToneMapping=6;const NeutralToneMapping=7;const AttachedBindMode="attached";const DetachedBindMode="detached";const UVMapping=300;const CubeReflectionMapping=301;const CubeRefractionMapping=302;const EquirectangularReflectionMapping=303;const EquirectangularRefractionMapping=304;const CubeUVReflectionMapping=306;const RepeatWrapping=1000;const ClampToEdgeWrapping=1001;const MirroredRepeatWrapping=1002;const NearestFilter=1003;const NearestMipmapNearestFilter=1004;const NearestMipMapNearestFilter=1004;const NearestMipmapLinearFilter=1005;const NearestMipMapLinearFilter=1005;const LinearFilter=1006;const LinearMipmapNearestFilter=1007;const LinearMipMapNearestFilter=1007;const LinearMipmapLinearFilter=1008;const LinearMipMapLinearFilter=1008;const UnsignedByteType=1009;const ByteType=1010;const ShortType=1011;const UnsignedShortType=1012;const IntType=1013;const UnsignedIntType=1014;const FloatType=1015;const HalfFloatType=1016;const UnsignedShort4444Type=1017;const UnsignedShort5551Type=1018;const UnsignedInt248Type=1020;const UnsignedInt5999Type=35902;const UnsignedInt101111Type=35899;const AlphaFormat=1021;const RGBFormat=1022;const RGBAFormat=1023;const DepthFormat=1026;const DepthStencilFormat=1027;const RedFormat=1028;const RedIntegerFormat=1029;const RGFormat=1030;const RGIntegerFormat=1031;const RGBIntegerFormat=1032;const RGBAIntegerFormat=1033;const RGB_S3TC_DXT1_Format=33776;const RGBA_S3TC_DXT1_Format=33777;const RGBA_S3TC_DXT3_Format=33778;const RGBA_S3TC_DXT5_Format=33779;const RGB_PVRTC_4BPPV1_Format=35840;const RGB_PVRTC_2BPPV1_Format=35841;const RGBA_PVRTC_4BPPV1_Format=35842;const RGBA_PVRTC_2BPPV1_Format=35843;const RGB_ETC1_Format=36196;const RGB_ETC2_Format=37492;const RGBA_ETC2_EAC_Format=37496;const R11_EAC_Format=37488;const SIGNED_R11_EAC_Format=37489;const RG11_EAC_Format=37490;const SIGNED_RG11_EAC_Format=37491;const RGBA_ASTC_4x4_Format=37808;const RGBA_ASTC_5x4_Format=37809;const RGBA_ASTC_5x5_Format=37810;const RGBA_ASTC_6x5_Format=37811;const RGBA_ASTC_6x6_Format=37812;const RGBA_ASTC_8x5_Format=37813;const RGBA_ASTC_8x6_Format=37814;const RGBA_ASTC_8x8_Format=37815;const RGBA_ASTC_10x5_Format=37816;const RGBA_ASTC_10x6_Format=37817;const RGBA_ASTC_10x8_Format=37818;const RGBA_ASTC_10x10_Format=37819;const RGBA_ASTC_12x10_Format=37820;const RGBA_ASTC_12x12_Format=37821;const RGBA_BPTC_Format=36492;const RGB_BPTC_SIGNED_Format=36494;const RGB_BPTC_UNSIGNED_Format=36495;const RED_RGTC1_Format=36283;const SIGNED_RED_RGTC1_Format=36284;const RED_GREEN_RGTC2_Format=36285;const SIGNED_RED_GREEN_RGTC2_Format=36286;const LoopOnce=2200;const LoopRepeat=2201;const LoopPingPong=2202;const InterpolateDiscrete=2300;const InterpolateLinear=2301;const InterpolateSmooth=2302;const ZeroCurvatureEnding=2400;const ZeroSlopeEnding=2401;const WrapAroundEnding=2402;const NormalAnimationBlendMode=2500;const AdditiveAnimationBlendMode=2501;const TrianglesDrawMode=0;const TriangleStripDrawMode=1;const TriangleFanDrawMode=2;const BasicDepthPacking=3200;const RGBADepthPacking=3201;const RGBDepthPacking=3202;const RGDepthPacking=3203;const TangentSpaceNormalMap=0;const ObjectSpaceNormalMap=1;const NoColorSpace="";const SRGBColorSpace="srgb";const LinearSRGBColorSpace="srgb-linear";const LinearTransfer="linear";const SRGBTransfer="srgb";const NoNormalPacking="";const NormalRGPacking="rg";const NormalGAPacking="ga";const ZeroStencilOp=0;const KeepStencilOp=7680;const ReplaceStencilOp=7681;const IncrementStencilOp=7682;const DecrementStencilOp=7683;const IncrementWrapStencilOp=34055;const DecrementWrapStencilOp=34056;const InvertStencilOp=5386;const NeverStencilFunc=512;const LessStencilFunc=513;const EqualStencilFunc=514;const LessEqualStencilFunc=515;const GreaterStencilFunc=516;const NotEqualStencilFunc=517;const GreaterEqualStencilFunc=518;const AlwaysStencilFunc=519;const NeverCompare=512;const LessCompare=513;const EqualCompare=514;const LessEqualCompare=515;const GreaterCompare=516;const NotEqualCompare=517;const GreaterEqualCompare=518;const AlwaysCompare=519;const StaticDrawUsage=35044;const DynamicDrawUsage=35048;const StreamDrawUsage=35040;const StaticReadUsage=35045;const DynamicReadUsage=35049;const StreamReadUsage=35041;const StaticCopyUsage=35046;const DynamicCopyUsage=35050;const StreamCopyUsage=35042;const GLSL1="100";const GLSL3="300 es";const WebGLCoordinateSystem=2000;const WebGPUCoordinateSystem=2001;const TimestampQuery={COMPUTE:"compute",RENDER:"render"};const InterpolationSamplingType={PERSPECTIVE:"perspective",LINEAR:"linear",FLAT:"flat"};const InterpolationSamplingMode={NORMAL:"normal",CENTROID:"centroid",SAMPLE:"sample",FIRST:"first",EITHER:"either"};function arrayNeedsUint32(array){for(let i=array.length-1;i>=0;--i){if(array[i]>=65535)return true}return false}const TYPED_ARRAYS={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function getTypedArray(type,buffer){return new TYPED_ARRAYS[type](buffer)}function isTypedArray(array){return ArrayBuffer.isView(array)&&!(array instanceof DataView)}function createElementNS(name){return document.createElementNS("http://www.w3.org/1999/xhtml",name)}function createCanvasElement(){const canvas=createElementNS("canvas");canvas.style.display="block";return canvas}const _cache={};let _setConsoleFunction=null;function setConsoleFunction(fn){_setConsoleFunction=fn}function getConsoleFunction(){return _setConsoleFunction}function log(...params){const message="THREE."+params.shift();if(_setConsoleFunction){_setConsoleFunction("log",message,...params)}else{console.log(message,...params)}}function warn(...params){const message="THREE."+params.shift();if(_setConsoleFunction){_setConsoleFunction("warn",message,...params)}else{console.warn(message,...params)}}function error(...params){const message="THREE."+params.shift();if(_setConsoleFunction){_setConsoleFunction("error",message,...params)}else{console.error(message,...params)}}function warnOnce(...params){const message=params.join(" ");if(message in _cache)return;_cache[message]=true;warn(...params)}function probeAsync(gl,sync,interval){return new Promise(function(resolve,reject){function probe(){switch(gl.clientWaitSync(sync,gl.SYNC_FLUSH_COMMANDS_BIT,0)){case gl.WAIT_FAILED:reject();break;case gl.TIMEOUT_EXPIRED:setTimeout(probe,interval);break;default:resolve();}}setTimeout(probe,interval)})}class EventDispatcher{addEventListener(type,listener){if(this._listeners===undefined)this._listeners={};const listeners=this._listeners;if(listeners[type]===undefined){listeners[type]=[]}if(listeners[type].indexOf(listener)===-1){listeners[type].push(listener)}}hasEventListener(type,listener){const listeners=this._listeners;if(listeners===undefined)return false;return listeners[type]!==undefined&&listeners[type].indexOf(listener)!==-1}removeEventListener(type,listener){const listeners=this._listeners;if(listeners===undefined)return;const listenerArray=listeners[type];if(listenerArray!==undefined){const index=listenerArray.indexOf(listener);if(index!==-1){listenerArray.splice(index,1)}}}dispatchEvent(event){const listeners=this._listeners;if(listeners===undefined)return;const listenerArray=listeners[event.type];if(listenerArray!==undefined){event.target=this;const array=listenerArray.slice(0);for(let i=0,l=array.length;i<l;i++){array[i].call(this,event)}event.target=null}}}const _lut=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let _seed=1234567;const DEG2RAD=Math.PI/180;const RAD2DEG=180/Math.PI;function generateUUID(){const d0=Math.random()*4294967295|0;const d1=Math.random()*4294967295|0;const d2=Math.random()*4294967295|0;const d3=Math.random()*4294967295|0;const uuid=_lut[d0&255]+_lut[d0>>8&255]+_lut[d0>>16&255]+_lut[d0>>24&255]+"-"+_lut[d1&255]+_lut[d1>>8&255]+"-"+_lut[d1>>16&15|64]+_lut[d1>>24&255]+"-"+_lut[d2&63|128]+_lut[d2>>8&255]+"-"+_lut[d2>>16&255]+_lut[d2>>24&255]+_lut[d3&255]+_lut[d3>>8&255]+_lut[d3>>16&255]+_lut[d3>>24&255];return uuid.toLowerCase()}function clamp(value,min,max){return Math.max(min,Math.min(max,value))}function euclideanModulo(n,m){return(n%m+m)%m}function mapLinear(x,a1,a2,b1,b2){return b1+(x-a1)*(b2-b1)/(a2-a1)}function inverseLerp(x,y,value){if(x!==y){return(value-x)/(y-x)}else{return 0}}function lerp(x,y,t){return(1-t)*x+t*y}function damp(x,y,lambda,dt){return lerp(x,y,1-Math.exp(-lambda*dt))}function pingpong(x,length=1){return length-Math.abs(euclideanModulo(x,length*2)-length)}function smoothstep(x,min,max){if(x<=min)return 0;if(x>=max)return 1;x=(x-min)/(max-min);return x*x*(3-2*x)}function smootherstep(x,min,max){if(x<=min)return 0;if(x>=max)return 1;x=(x-min)/(max-min);return x*x*x*(x*(x*6-15)+10)}function randInt(low,high){return low+Math.floor(Math.random()*(high-low+1))}function randFloat(low,high){return low+Math.random()*(high-low)}function randFloatSpread(range){return range*(0.5-Math.random())}function seededRandom(s){if(s!==undefined)_seed=s;let t=_seed+=1831565813;t=Math.imul(t^t>>>15,t|1);t^=t+Math.imul(t^t>>>7,t|61);return((t^t>>>14)>>>0)/4294967296}function degToRad(degrees){return degrees*DEG2RAD}function radToDeg(radians){return radians*RAD2DEG}function isPowerOfTwo(value){return(value&value-1)===0&&value!==0}function ceilPowerOfTwo(value){return Math.pow(2,Math.ceil(Math.log(value)/Math.LN2))}function floorPowerOfTwo(value){return Math.pow(2,Math.floor(Math.log(value)/Math.LN2))}function setQuaternionFromProperEuler(q,a,b,c,order){const cos=Math.cos;const sin=Math.sin;const c2=cos(b/2);const s2=sin(b/2);const c13=cos((a+c)/2);const s13=sin((a+c)/2);const c1_3=cos((a-c)/2);const s1_3=sin((a-c)/2);const c3_1=cos((c-a)/2);const s3_1=sin((c-a)/2);switch(order){case"XYX":q.set(c2*s13,s2*c1_3,s2*s1_3,c2*c13);break;case"YZY":q.set(s2*s1_3,c2*s13,s2*c1_3,c2*c13);break;case"ZXZ":q.set(s2*c1_3,s2*s1_3,c2*s13,c2*c13);break;case"XZX":q.set(c2*s13,s2*s3_1,s2*c3_1,c2*c13);break;case"YXY":q.set(s2*c3_1,c2*s13,s2*s3_1,c2*c13);break;case"ZYZ":q.set(s2*s3_1,s2*c3_1,c2*s13,c2*c13);break;default:warn("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+order);}}function denormalize(value,array){switch(array.constructor){case Float32Array:return value;case Uint32Array:return value/4294967295;case Uint16Array:return value/65535;case Uint8Array:return value/255;case Int32Array:return Math.max(value/2147483647,-1);case Int16Array:return Math.max(value/32767,-1);case Int8Array:return Math.max(value/127,-1);default:throw new Error("Invalid component type.");}}function normalize(value,array){switch(array.constructor){case Float32Array:return value;case Uint32Array:return Math.round(value*4294967295);case Uint16Array:return Math.round(value*65535);case Uint8Array:return Math.round(value*255);case Int32Array:return Math.round(value*2147483647);case Int16Array:return Math.round(value*32767);case Int8Array:return Math.round(value*127);default:throw new Error("Invalid component type.");}}const MathUtils={DEG2RAD:DEG2RAD,RAD2DEG:RAD2DEG,generateUUID:generateUUID,clamp:clamp,euclideanModulo:euclideanModulo,mapLinear:mapLinear,inverseLerp:inverseLerp,lerp:lerp,damp:damp,pingpong:pingpong,smoothstep:smoothstep,smootherstep:smootherstep,randInt:randInt,randFloat:randFloat,randFloatSpread:randFloatSpread,seededRandom:seededRandom,degToRad:degToRad,radToDeg:radToDeg,isPowerOfTwo:isPowerOfTwo,ceilPowerOfTwo:ceilPowerOfTwo,floorPowerOfTwo:floorPowerOfTwo,setQuaternionFromProperEuler:setQuaternionFromProperEuler,normalize:normalize,denormalize:denormalize};class Vector2{constructor(x=0,y=0){Vector2.prototype.isVector2=true;this.x=x;this.y=y}get width(){return this.x}set width(value){this.x=value}get height(){return this.y}set height(value){this.y=value}set(x,y){this.x=x;this.y=y;return this}setScalar(scalar){this.x=scalar;this.y=scalar;return this}setX(x){this.x=x;return this}setY(y){this.y=y;return this}setComponent(index,value){switch(index){case 0:this.x=value;break;case 1:this.y=value;break;default:throw new Error("index is out of range: "+index);}return this}getComponent(index){switch(index){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+index);}}clone(){return new this.constructor(this.x,this.y)}copy(v){this.x=v.x;this.y=v.y;return this}add(v){this.x+=v.x;this.y+=v.y;return this}addScalar(s){this.x+=s;this.y+=s;return this}addVectors(a,b){this.x=a.x+b.x;this.y=a.y+b.y;return this}addScaledVector(v,s){this.x+=v.x*s;this.y+=v.y*s;return this}sub(v){this.x-=v.x;this.y-=v.y;return this}subScalar(s){this.x-=s;this.y-=s;return this}subVectors(a,b){this.x=a.x-b.x;this.y=a.y-b.y;return this}multiply(v){this.x*=v.x;this.y*=v.y;return this}multiplyScalar(scalar){this.x*=scalar;this.y*=scalar;return this}divide(v){this.x/=v.x;this.y/=v.y;return this}divideScalar(scalar){return this.multiplyScalar(1/scalar)}applyMatrix3(m){const x=this.x,y=this.y;const e=m.elements;this.x=e[0]*x+e[3]*y+e[6];this.y=e[1]*x+e[4]*y+e[7];return this}min(v){this.x=Math.min(this.x,v.x);this.y=Math.min(this.y,v.y);return this}max(v){this.x=Math.max(this.x,v.x);this.y=Math.max(this.y,v.y);return this}clamp(min,max){this.x=clamp(this.x,min.x,max.x);this.y=clamp(this.y,min.y,max.y);return this}clampScalar(minVal,maxVal){this.x=clamp(this.x,minVal,maxVal);this.y=clamp(this.y,minVal,maxVal);return this}clampLength(min,max){const length=this.length();return this.divideScalar(length||1).multiplyScalar(clamp(length,min,max))}floor(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this}ceil(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this}round(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this}roundToZero(){this.x=Math.trunc(this.x);this.y=Math.trunc(this.y);return this}negate(){this.x=-this.x;this.y=-this.y;return this}dot(v){return this.x*v.x+this.y*v.y}cross(v){return this.x*v.y-this.y*v.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){const angle=Math.atan2(-this.y,-this.x)+Math.PI;return angle}angleTo(v){const denominator=Math.sqrt(this.lengthSq()*v.lengthSq());if(denominator===0)return Math.PI/2;const theta=this.dot(v)/denominator;return Math.acos(clamp(theta,-1,1))}distanceTo(v){return Math.sqrt(this.distanceToSquared(v))}distanceToSquared(v){const dx=this.x-v.x,dy=this.y-v.y;return dx*dx+dy*dy}manhattanDistanceTo(v){return Math.abs(this.x-v.x)+Math.abs(this.y-v.y)}setLength(length){return this.normalize().multiplyScalar(length)}lerp(v,alpha){this.x+=(v.x-this.x)*alpha;this.y+=(v.y-this.y)*alpha;return this}lerpVectors(v1,v2,alpha){this.x=v1.x+(v2.x-v1.x)*alpha;this.y=v1.y+(v2.y-v1.y)*alpha;return this}equals(v){return v.x===this.x&&v.y===this.y}fromArray(array,offset=0){this.x=array[offset];this.y=array[offset+1];return this}toArray(array=[],offset=0){array[offset]=this.x;array[offset+1]=this.y;return array}fromBufferAttribute(attribute,index){this.x=attribute.getX(index);this.y=attribute.getY(index);return this}rotateAround(center,angle){const c=Math.cos(angle),s=Math.sin(angle);const x=this.x-center.x;const y=this.y-center.y;this.x=x*c-y*s+center.x;this.y=x*s+y*c+center.y;return this}random(){this.x=Math.random();this.y=Math.random();return this}*[Symbol.iterator](){yield this.x;yield this.y}}class Quaternion{constructor(x=0,y=0,z=0,w=1){this.isQuaternion=true;this._x=x;this._y=y;this._z=z;this._w=w}static slerpFlat(dst,dstOffset,src0,srcOffset0,src1,srcOffset1,t){let x0=src0[srcOffset0+0],y0=src0[srcOffset0+1],z0=src0[srcOffset0+2],w0=src0[srcOffset0+3];let x1=src1[srcOffset1+0],y1=src1[srcOffset1+1],z1=src1[srcOffset1+2],w1=src1[srcOffset1+3];if(t<=0){dst[dstOffset+0]=x0;dst[dstOffset+1]=y0;dst[dstOffset+2]=z0;dst[dstOffset+3]=w0;return}if(t>=1){dst[dstOffset+0]=x1;dst[dstOffset+1]=y1;dst[dstOffset+2]=z1;dst[dstOffset+3]=w1;return}if(w0!==w1||x0!==x1||y0!==y1||z0!==z1){let dot=x0*x1+y0*y1+z0*z1+w0*w1;if(dot<0){x1=-x1;y1=-y1;z1=-z1;w1=-w1;dot=-dot}let s=1-t;if(dot<0.9995){const theta=Math.acos(dot);const sin=Math.sin(theta);s=Math.sin(s*theta)/sin;t=Math.sin(t*theta)/sin;x0=x0*s+x1*t;y0=y0*s+y1*t;z0=z0*s+z1*t;w0=w0*s+w1*t}else{x0=x0*s+x1*t;y0=y0*s+y1*t;z0=z0*s+z1*t;w0=w0*s+w1*t;const f=1/Math.sqrt(x0*x0+y0*y0+z0*z0+w0*w0);x0*=f;y0*=f;z0*=f;w0*=f}}dst[dstOffset]=x0;dst[dstOffset+1]=y0;dst[dstOffset+2]=z0;dst[dstOffset+3]=w0}static multiplyQuaternionsFlat(dst,dstOffset,src0,srcOffset0,src1,srcOffset1){const x0=src0[srcOffset0];const y0=src0[srcOffset0+1];const z0=src0[srcOffset0+2];const w0=src0[srcOffset0+3];const x1=src1[srcOffset1];const y1=src1[srcOffset1+1];const z1=src1[srcOffset1+2];const w1=src1[srcOffset1+3];dst[dstOffset]=x0*w1+w0*x1+y0*z1-z0*y1;dst[dstOffset+1]=y0*w1+w0*y1+z0*x1-x0*z1;dst[dstOffset+2]=z0*w1+w0*z1+x0*y1-y0*x1;dst[dstOffset+3]=w0*w1-x0*x1-y0*y1-z0*z1;return dst}get x(){return this._x}set x(value){this._x=value;this._onChangeCallback()}get y(){return this._y}set y(value){this._y=value;this._onChangeCallback()}get z(){return this._z}set z(value){this._z=value;this._onChangeCallback()}get w(){return this._w}set w(value){this._w=value;this._onChangeCallback()}set(x,y,z,w){this._x=x;this._y=y;this._z=z;this._w=w;this._onChangeCallback();return this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(quaternion){this._x=quaternion.x;this._y=quaternion.y;this._z=quaternion.z;this._w=quaternion.w;this._onChangeCallback();return this}setFromEuler(euler,update=true){const x=euler._x,y=euler._y,z=euler._z,order=euler._order;const cos=Math.cos;const sin=Math.sin;const c1=cos(x/2);const c2=cos(y/2);const c3=cos(z/2);const s1=sin(x/2);const s2=sin(y/2);const s3=sin(z/2);switch(order){case"XYZ":this._x=s1*c2*c3+c1*s2*s3;this._y=c1*s2*c3-s1*c2*s3;this._z=c1*c2*s3+s1*s2*c3;this._w=c1*c2*c3-s1*s2*s3;break;case"YXZ":this._x=s1*c2*c3+c1*s2*s3;this._y=c1*s2*c3-s1*c2*s3;this._z=c1*c2*s3-s1*s2*c3;this._w=c1*c2*c3+s1*s2*s3;break;case"ZXY":this._x=s1*c2*c3-c1*s2*s3;this._y=c1*s2*c3+s1*c2*s3;this._z=c1*c2*s3+s1*s2*c3;this._w=c1*c2*c3-s1*s2*s3;break;case"ZYX":this._x=s1*c2*c3-c1*s2*s3;this._y=c1*s2*c3+s1*c2*s3;this._z=c1*c2*s3-s1*s2*c3;this._w=c1*c2*c3+s1*s2*s3;break;case"YZX":this._x=s1*c2*c3+c1*s2*s3;this._y=c1*s2*c3+s1*c2*s3;this._z=c1*c2*s3-s1*s2*c3;this._w=c1*c2*c3-s1*s2*s3;break;case"XZY":this._x=s1*c2*c3-c1*s2*s3;this._y=c1*s2*c3-s1*c2*s3;this._z=c1*c2*s3+s1*s2*c3;this._w=c1*c2*c3+s1*s2*s3;break;default:warn("Quaternion: .setFromEuler() encountered an unknown order: "+order);}if(update===true)this._onChangeCallback();return this}setFromAxisAngle(axis,angle){const halfAngle=angle/2,s=Math.sin(halfAngle);this._x=axis.x*s;this._y=axis.y*s;this._z=axis.z*s;this._w=Math.cos(halfAngle);this._onChangeCallback();return this}setFromRotationMatrix(m){const te=m.elements,m11=te[0],m12=te[4],m13=te[8],m21=te[1],m22=te[5],m23=te[9],m31=te[2],m32=te[6],m33=te[10],trace=m11+m22+m33;if(trace>0){const s=0.5/Math.sqrt(trace+1);this._w=0.25/s;this._x=(m32-m23)*s;this._y=(m13-m31)*s;this._z=(m21-m12)*s}else if(m11>m22&&m11>m33){const s=2*Math.sqrt(1+m11-m22-m33);this._w=(m32-m23)/s;this._x=0.25*s;this._y=(m12+m21)/s;this._z=(m13+m31)/s}else if(m22>m33){const s=2*Math.sqrt(1+m22-m11-m33);this._w=(m13-m31)/s;this._x=(m12+m21)/s;this._y=0.25*s;this._z=(m23+m32)/s}else{const s=2*Math.sqrt(1+m33-m11-m22);this._w=(m21-m12)/s;this._x=(m13+m31)/s;this._y=(m23+m32)/s;this._z=0.25*s}this._onChangeCallback();return this}setFromUnitVectors(vFrom,vTo){let r=vFrom.dot(vTo)+1;if(r<1e-8){r=0;if(Math.abs(vFrom.x)>Math.abs(vFrom.z)){this._x=-vFrom.y;this._y=vFrom.x;this._z=0;this._w=r}else{this._x=0;this._y=-vFrom.z;this._z=vFrom.y;this._w=r}}else{this._x=vFrom.y*vTo.z-vFrom.z*vTo.y;this._y=vFrom.z*vTo.x-vFrom.x*vTo.z;this._z=vFrom.x*vTo.y-vFrom.y*vTo.x;this._w=r}return this.normalize()}angleTo(q){return 2*Math.acos(Math.abs(clamp(this.dot(q),-1,1)))}rotateTowards(q,step){const angle=this.angleTo(q);if(angle===0)return this;const t=Math.min(1,step/angle);this.slerp(q,t);return this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){this._x*=-1;this._y*=-1;this._z*=-1;this._onChangeCallback();return this}dot(v){return this._x*v._x+this._y*v._y+this._z*v._z+this._w*v._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let l=this.length();if(l===0){this._x=0;this._y=0;this._z=0;this._w=1}else{l=1/l;this._x=this._x*l;this._y=this._y*l;this._z=this._z*l;this._w=this._w*l}this._onChangeCallback();return this}multiply(q){return this.multiplyQuaternions(this,q)}premultiply(q){return this.multiplyQuaternions(q,this)}multiplyQuaternions(a,b){const qax=a._x,qay=a._y,qaz=a._z,qaw=a._w;const qbx=b._x,qby=b._y,qbz=b._z,qbw=b._w;this._x=qax*qbw+qaw*qbx+qay*qbz-qaz*qby;this._y=qay*qbw+qaw*qby+qaz*qbx-qax*qbz;this._z=qaz*qbw+qaw*qbz+qax*qby-qay*qbx;this._w=qaw*qbw-qax*qbx-qay*qby-qaz*qbz;this._onChangeCallback();return this}slerp(qb,t){if(t<=0)return this;if(t>=1)return this.copy(qb);let x=qb._x,y=qb._y,z=qb._z,w=qb._w;let dot=this.dot(qb);if(dot<0){x=-x;y=-y;z=-z;w=-w;dot=-dot}let s=1-t;if(dot<0.9995){const theta=Math.acos(dot);const sin=Math.sin(theta);s=Math.sin(s*theta)/sin;t=Math.sin(t*theta)/sin;this._x=this._x*s+x*t;this._y=this._y*s+y*t;this._z=this._z*s+z*t;this._w=this._w*s+w*t;this._onChangeCallback()}else{this._x=this._x*s+x*t;this._y=this._y*s+y*t;this._z=this._z*s+z*t;this._w=this._w*s+w*t;this.normalize()}return this}slerpQuaternions(qa,qb,t){return this.copy(qa).slerp(qb,t)}random(){const theta1=2*Math.PI*Math.random();const theta2=2*Math.PI*Math.random();const x0=Math.random();const r1=Math.sqrt(1-x0);const r2=Math.sqrt(x0);return this.set(r1*Math.sin(theta1),r1*Math.cos(theta1),r2*Math.sin(theta2),r2*Math.cos(theta2))}equals(quaternion){return quaternion._x===this._x&&quaternion._y===this._y&&quaternion._z===this._z&&quaternion._w===this._w}fromArray(array,offset=0){this._x=array[offset];this._y=array[offset+1];this._z=array[offset+2];this._w=array[offset+3];this._onChangeCallback();return this}toArray(array=[],offset=0){array[offset]=this._x;array[offset+1]=this._y;array[offset+2]=this._z;array[offset+3]=this._w;return array}fromBufferAttribute(attribute,index){this._x=attribute.getX(index);this._y=attribute.getY(index);this._z=attribute.getZ(index);this._w=attribute.getW(index);this._onChangeCallback();return this}toJSON(){return this.toArray()}_onChange(callback){this._onChangeCallback=callback;return this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x;yield this._y;yield this._z;yield this._w}}class Vector3{constructor(x=0,y=0,z=0){Vector3.prototype.isVector3=true;this.x=x;this.y=y;this.z=z}set(x,y,z){if(z===undefined)z=this.z;this.x=x;this.y=y;this.z=z;return this}setScalar(scalar){this.x=scalar;this.y=scalar;this.z=scalar;return this}setX(x){this.x=x;return this}setY(y){this.y=y;return this}setZ(z){this.z=z;return this}setComponent(index,value){switch(index){case 0:this.x=value;break;case 1:this.y=value;break;case 2:this.z=value;break;default:throw new Error("index is out of range: "+index);}return this}getComponent(index){switch(index){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+index);}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(v){this.x=v.x;this.y=v.y;this.z=v.z;return this}add(v){this.x+=v.x;this.y+=v.y;this.z+=v.z;return this}addScalar(s){this.x+=s;this.y+=s;this.z+=s;return this}addVectors(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z;return this}addScaledVector(v,s){this.x+=v.x*s;this.y+=v.y*s;this.z+=v.z*s;return this}sub(v){this.x-=v.x;this.y-=v.y;this.z-=v.z;return this}subScalar(s){this.x-=s;this.y-=s;this.z-=s;return this}subVectors(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z;return this}multiply(v){this.x*=v.x;this.y*=v.y;this.z*=v.z;return this}multiplyScalar(scalar){this.x*=scalar;this.y*=scalar;this.z*=scalar;return this}multiplyVectors(a,b){this.x=a.x*b.x;this.y=a.y*b.y;this.z=a.z*b.z;return this}applyEuler(euler){return this.applyQuaternion(_quaternion$4.setFromEuler(euler))}applyAxisAngle(axis,angle){return this.applyQuaternion(_quaternion$4.setFromAxisAngle(axis,angle))}applyMatrix3(m){const x=this.x,y=this.y,z=this.z;const e=m.elements;this.x=e[0]*x+e[3]*y+e[6]*z;this.y=e[1]*x+e[4]*y+e[7]*z;this.z=e[2]*x+e[5]*y+e[8]*z;return this}applyNormalMatrix(m){return this.applyMatrix3(m).normalize()}applyMatrix4(m){const x=this.x,y=this.y,z=this.z;const e=m.elements;const w=1/(e[3]*x+e[7]*y+e[11]*z+e[15]);this.x=(e[0]*x+e[4]*y+e[8]*z+e[12])*w;this.y=(e[1]*x+e[5]*y+e[9]*z+e[13])*w;this.z=(e[2]*x+e[6]*y+e[10]*z+e[14])*w;return this}applyQuaternion(q){const vx=this.x,vy=this.y,vz=this.z;const qx=q.x,qy=q.y,qz=q.z,qw=q.w;const tx=2*(qy*vz-qz*vy);const ty=2*(qz*vx-qx*vz);const tz=2*(qx*vy-qy*vx);this.x=vx+qw*tx+qy*tz-qz*ty;this.y=vy+qw*ty+qz*tx-qx*tz;this.z=vz+qw*tz+qx*ty-qy*tx;return this}project(camera){return this.applyMatrix4(camera.matrixWorldInverse).applyMatrix4(camera.projectionMatrix)}unproject(camera){return this.applyMatrix4(camera.projectionMatrixInverse).applyMatrix4(camera.matrixWorld)}transformDirection(m){const x=this.x,y=this.y,z=this.z;const e=m.elements;this.x=e[0]*x+e[4]*y+e[8]*z;this.y=e[1]*x+e[5]*y+e[9]*z;this.z=e[2]*x+e[6]*y+e[10]*z;return this.normalize()}divide(v){this.x/=v.x;this.y/=v.y;this.z/=v.z;return this}divideScalar(scalar){return this.multiplyScalar(1/scalar)}min(v){this.x=Math.min(this.x,v.x);this.y=Math.min(this.y,v.y);this.z=Math.min(this.z,v.z);return this}max(v){this.x=Math.max(this.x,v.x);this.y=Math.max(this.y,v.y);this.z=Math.max(this.z,v.z);return this}clamp(min,max){this.x=clamp(this.x,min.x,max.x);this.y=clamp(this.y,min.y,max.y);this.z=clamp(this.z,min.z,max.z);return this}clampScalar(minVal,maxVal){this.x=clamp(this.x,minVal,maxVal);this.y=clamp(this.y,minVal,maxVal);this.z=clamp(this.z,minVal,maxVal);return this}clampLength(min,max){const length=this.length();return this.divideScalar(length||1).multiplyScalar(clamp(length,min,max))}floor(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);this.z=Math.floor(this.z);return this}ceil(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);this.z=Math.ceil(this.z);return this}round(){this.x=Math.round(this.x);this.y=Math.round(this.y);this.z=Math.round(this.z);return this}roundToZero(){this.x=Math.trunc(this.x);this.y=Math.trunc(this.y);this.z=Math.trunc(this.z);return this}negate(){this.x=-this.x;this.y=-this.y;this.z=-this.z;return this}dot(v){return this.x*v.x+this.y*v.y+this.z*v.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(length){return this.normalize().multiplyScalar(length)}lerp(v,alpha){this.x+=(v.x-this.x)*alpha;this.y+=(v.y-this.y)*alpha;this.z+=(v.z-this.z)*alpha;return this}lerpVectors(v1,v2,alpha){this.x=v1.x+(v2.x-v1.x)*alpha;this.y=v1.y+(v2.y-v1.y)*alpha;this.z=v1.z+(v2.z-v1.z)*alpha;return this}cross(v){return this.crossVectors(this,v)}crossVectors(a,b){const ax=a.x,ay=a.y,az=a.z;const bx=b.x,by=b.y,bz=b.z;this.x=ay*bz-az*by;this.y=az*bx-ax*bz;this.z=ax*by-ay*bx;return this}projectOnVector(v){const denominator=v.lengthSq();if(denominator===0)return this.set(0,0,0);const scalar=v.dot(this)/denominator;return this.copy(v).multiplyScalar(scalar)}projectOnPlane(planeNormal){_vector$c.copy(this).projectOnVector(planeNormal);return this.sub(_vector$c)}reflect(normal){return this.sub(_vector$c.copy(normal).multiplyScalar(2*this.dot(normal)))}angleTo(v){const denominator=Math.sqrt(this.lengthSq()*v.lengthSq());if(denominator===0)return Math.PI/2;const theta=this.dot(v)/denominator;return Math.acos(clamp(theta,-1,1))}distanceTo(v){return Math.sqrt(this.distanceToSquared(v))}distanceToSquared(v){const dx=this.x-v.x,dy=this.y-v.y,dz=this.z-v.z;return dx*dx+dy*dy+dz*dz}manhattanDistanceTo(v){return Math.abs(this.x-v.x)+Math.abs(this.y-v.y)+Math.abs(this.z-v.z)}setFromSpherical(s){return this.setFromSphericalCoords(s.radius,s.phi,s.theta)}setFromSphericalCoords(radius,phi,theta){const sinPhiRadius=Math.sin(phi)*radius;this.x=sinPhiRadius*Math.sin(theta);this.y=Math.cos(phi)*radius;this.z=sinPhiRadius*Math.cos(theta);return this}setFromCylindrical(c){return this.setFromCylindricalCoords(c.radius,c.theta,c.y)}setFromCylindricalCoords(radius,theta,y){this.x=radius*Math.sin(theta);this.y=y;this.z=radius*Math.cos(theta);return this}setFromMatrixPosition(m){const e=m.elements;this.x=e[12];this.y=e[13];this.z=e[14];return this}setFromMatrixScale(m){const sx=this.setFromMatrixColumn(m,0).length();const sy=this.setFromMatrixColumn(m,1).length();const sz=this.setFromMatrixColumn(m,2).length();this.x=sx;this.y=sy;this.z=sz;return this}setFromMatrixColumn(m,index){return this.fromArray(m.elements,index*4)}setFromMatrix3Column(m,index){return this.fromArray(m.elements,index*3)}setFromEuler(e){this.x=e._x;this.y=e._y;this.z=e._z;return this}setFromColor(c){this.x=c.r;this.y=c.g;this.z=c.b;return this}equals(v){return v.x===this.x&&v.y===this.y&&v.z===this.z}fromArray(array,offset=0){this.x=array[offset];this.y=array[offset+1];this.z=array[offset+2];return this}toArray(array=[],offset=0){array[offset]=this.x;array[offset+1]=this.y;array[offset+2]=this.z;return array}fromBufferAttribute(attribute,index){this.x=attribute.getX(index);this.y=attribute.getY(index);this.z=attribute.getZ(index);return this}random(){this.x=Math.random();this.y=Math.random();this.z=Math.random();return this}randomDirection(){const theta=Math.random()*Math.PI*2;const u=Math.random()*2-1;const c=Math.sqrt(1-u*u);this.x=c*Math.cos(theta);this.y=u;this.z=c*Math.sin(theta);return this}*[Symbol.iterator](){yield this.x;yield this.y;yield this.z}}const _vector$c=new Vector3;const _quaternion$4=new Quaternion;class Matrix3{constructor(n11,n12,n13,n21,n22,n23,n31,n32,n33){Matrix3.prototype.isMatrix3=true;this.elements=[1,0,0,0,1,0,0,0,1];if(n11!==undefined){this.set(n11,n12,n13,n21,n22,n23,n31,n32,n33)}}set(n11,n12,n13,n21,n22,n23,n31,n32,n33){const te=this.elements;te[0]=n11;te[1]=n21;te[2]=n31;te[3]=n12;te[4]=n22;te[5]=n32;te[6]=n13;te[7]=n23;te[8]=n33;return this}identity(){this.set(1,0,0,0,1,0,0,0,1);return this}copy(m){const te=this.elements;const me=m.elements;te[0]=me[0];te[1]=me[1];te[2]=me[2];te[3]=me[3];te[4]=me[4];te[5]=me[5];te[6]=me[6];te[7]=me[7];te[8]=me[8];return this}extractBasis(xAxis,yAxis,zAxis){xAxis.setFromMatrix3Column(this,0);yAxis.setFromMatrix3Column(this,1);zAxis.setFromMatrix3Column(this,2);return this}setFromMatrix4(m){const me=m.elements;this.set(me[0],me[4],me[8],me[1],me[5],me[9],me[2],me[6],me[10]);return this}multiply(m){return this.multiplyMatrices(this,m)}premultiply(m){return this.multiplyMatrices(m,this)}multiplyMatrices(a,b){const ae=a.elements;const be=b.elements;const te=this.elements;const a11=ae[0],a12=ae[3],a13=ae[6];const a21=ae[1],a22=ae[4],a23=ae[7];const a31=ae[2],a32=ae[5],a33=ae[8];const b11=be[0],b12=be[3],b13=be[6];const b21=be[1],b22=be[4],b23=be[7];const b31=be[2],b32=be[5],b33=be[8];te[0]=a11*b11+a12*b21+a13*b31;te[3]=a11*b12+a12*b22+a13*b32;te[6]=a11*b13+a12*b23+a13*b33;te[1]=a21*b11+a22*b21+a23*b31;te[4]=a21*b12+a22*b22+a23*b32;te[7]=a21*b13+a22*b23+a23*b33;te[2]=a31*b11+a32*b21+a33*b31;te[5]=a31*b12+a32*b22+a33*b32;te[8]=a31*b13+a32*b23+a33*b33;return this}multiplyScalar(s){const te=this.elements;te[0]*=s;te[3]*=s;te[6]*=s;te[1]*=s;te[4]*=s;te[7]*=s;te[2]*=s;te[5]*=s;te[8]*=s;return this}determinant(){const te=this.elements;const a=te[0],b=te[1],c=te[2],d=te[3],e=te[4],f=te[5],g=te[6],h=te[7],i=te[8];return a*e*i-a*f*h-b*d*i+b*f*g+c*d*h-c*e*g}invert(){const te=this.elements,n11=te[0],n21=te[1],n31=te[2],n12=te[3],n22=te[4],n32=te[5],n13=te[6],n23=te[7],n33=te[8],t11=n33*n22-n32*n23,t12=n32*n13-n33*n12,t13=n23*n12-n22*n13,det=n11*t11+n21*t12+n31*t13;if(det===0)return this.set(0,0,0,0,0,0,0,0,0);const detInv=1/det;te[0]=t11*detInv;te[1]=(n31*n23-n33*n21)*detInv;te[2]=(n32*n21-n31*n22)*detInv;te[3]=t12*detInv;te[4]=(n33*n11-n31*n13)*detInv;te[5]=(n31*n12-n32*n11)*detInv;te[6]=t13*detInv;te[7]=(n21*n13-n23*n11)*detInv;te[8]=(n22*n11-n21*n12)*detInv;return this}transpose(){let tmp;const m=this.elements;tmp=m[1];m[1]=m[3];m[3]=tmp;tmp=m[2];m[2]=m[6];m[6]=tmp;tmp=m[5];m[5]=m[7];m[7]=tmp;return this}getNormalMatrix(matrix4){return this.setFromMatrix4(matrix4).invert().transpose()}transposeIntoArray(r){const m=this.elements;r[0]=m[0];r[1]=m[3];r[2]=m[6];r[3]=m[1];r[4]=m[4];r[5]=m[7];r[6]=m[2];r[7]=m[5];r[8]=m[8];return this}setUvTransform(tx,ty,sx,sy,rotation,cx,cy){const c=Math.cos(rotation);const s=Math.sin(rotation);this.set(sx*c,sx*s,-sx*(c*cx+s*cy)+cx+tx,-sy*s,sy*c,-sy*(-s*cx+c*cy)+cy+ty,0,0,1);return this}scale(sx,sy){this.premultiply(_m3.makeScale(sx,sy));return this}rotate(theta){this.premultiply(_m3.makeRotation(-theta));return this}translate(tx,ty){this.premultiply(_m3.makeTranslation(tx,ty));return this}makeTranslation(x,y){if(x.isVector2){this.set(1,0,x.x,0,1,x.y,0,0,1)}else{this.set(1,0,x,0,1,y,0,0,1)}return this}makeRotation(theta){const c=Math.cos(theta);const s=Math.sin(theta);this.set(c,-s,0,s,c,0,0,0,1);return this}makeScale(x,y){this.set(x,0,0,0,y,0,0,0,1);return this}equals(matrix){const te=this.elements;const me=matrix.elements;for(let i=0;i<9;i++){if(te[i]!==me[i])return false}return true}fromArray(array,offset=0){for(let i=0;i<9;i++){this.elements[i]=array[i+offset]}return this}toArray(array=[],offset=0){const te=this.elements;array[offset]=te[0];array[offset+1]=te[1];array[offset+2]=te[2];array[offset+3]=te[3];array[offset+4]=te[4];array[offset+5]=te[5];array[offset+6]=te[6];array[offset+7]=te[7];array[offset+8]=te[8];return array}clone(){return new this.constructor().fromArray(this.elements)}}const _m3=new Matrix3;const LINEAR_REC709_TO_XYZ=new Matrix3().set(0.4123908,0.3575843,0.1804808,0.212639,0.7151687,0.0721923,0.0193308,0.1191948,0.9505322);const XYZ_TO_LINEAR_REC709=new Matrix3().set(3.2409699,-1.5373832,-0.4986108,-0.9692436,1.8759675,0.0415551,0.0556301,-0.203977,1.0569715);function createColorManagement(){const ColorManagement={enabled:true,workingColorSpace:LinearSRGBColorSpace,spaces:{},convert:function(color,sourceColorSpace,targetColorSpace){if(this.enabled===false||sourceColorSpace===targetColorSpace||!sourceColorSpace||!targetColorSpace){return color}if(this.spaces[sourceColorSpace].transfer===SRGBTransfer){color.r=SRGBToLinear(color.r);color.g=SRGBToLinear(color.g);color.b=SRGBToLinear(color.b)}if(this.spaces[sourceColorSpace].primaries!==this.spaces[targetColorSpace].primaries){color.applyMatrix3(this.spaces[sourceColorSpace].toXYZ);color.applyMatrix3(this.spaces[targetColorSpace].fromXYZ)}if(this.spaces[targetColorSpace].transfer===SRGBTransfer){color.r=LinearToSRGB(color.r);color.g=LinearToSRGB(color.g);color.b=LinearToSRGB(color.b)}return color},workingToColorSpace:function(color,targetColorSpace){return this.convert(color,this.workingColorSpace,targetColorSpace)},colorSpaceToWorking:function(color,sourceColorSpace){return this.convert(color,sourceColorSpace,this.workingColorSpace)},getPrimaries:function(colorSpace){return this.spaces[colorSpace].primaries},getTransfer:function(colorSpace){if(colorSpace===NoColorSpace)return LinearTransfer;return this.spaces[colorSpace].transfer},getToneMappingMode:function(colorSpace){return this.spaces[colorSpace].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(target,colorSpace=this.workingColorSpace){return target.fromArray(this.spaces[colorSpace].luminanceCoefficients)},define:function(colorSpaces){Object.assign(this.spaces,colorSpaces)},_getMatrix:function(targetMatrix,sourceColorSpace,targetColorSpace){return targetMatrix.copy(this.spaces[sourceColorSpace].toXYZ).multiply(this.spaces[targetColorSpace].fromXYZ)},_getDrawingBufferColorSpace:function(colorSpace){return this.spaces[colorSpace].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(colorSpace=this.workingColorSpace){return this.spaces[colorSpace].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(color,targetColorSpace){warnOnce("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace().");return ColorManagement.workingToColorSpace(color,targetColorSpace)},toWorkingColorSpace:function(color,sourceColorSpace){warnOnce("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking().");return ColorManagement.colorSpaceToWorking(color,sourceColorSpace)}};const REC709_PRIMARIES=[0.64,0.33,0.3,0.6,0.15,0.06];const REC709_LUMINANCE_COEFFICIENTS=[0.2126,0.7152,0.0722];const D65=[0.3127,0.329];ColorManagement.define({[LinearSRGBColorSpace]:{primaries:REC709_PRIMARIES,whitePoint:D65,transfer:LinearTransfer,toXYZ:LINEAR_REC709_TO_XYZ,fromXYZ:XYZ_TO_LINEAR_REC709,luminanceCoefficients:REC709_LUMINANCE_COEFFICIENTS,workingColorSpaceConfig:{unpackColorSpace:SRGBColorSpace},outputColorSpaceConfig:{drawingBufferColorSpace:SRGBColorSpace}},[SRGBColorSpace]:{primaries:REC709_PRIMARIES,whitePoint:D65,transfer:SRGBTransfer,toXYZ:LINEAR_REC709_TO_XYZ,fromXYZ:XYZ_TO_LINEAR_REC709,luminanceCoefficients:REC709_LUMINANCE_COEFFICIENTS,outputColorSpaceConfig:{drawingBufferColorSpace:SRGBColorSpace}}});return ColorManagement}const ColorManagement=createColorManagement();function SRGBToLinear(c){return c<0.04045?c*0.0773993808:Math.pow(c*0.9478672986+0.0521327014,2.4)}function LinearToSRGB(c){return c<0.0031308?c*12.92:1.055*Math.pow(c,0.41666)-0.055}let _canvas;class ImageUtils{static getDataURL(image,type="image/png"){if(/^data:/i.test(image.src)){return image.src}if(typeof HTMLCanvasElement==="undefined"){return image.src}let canvas;if(image instanceof HTMLCanvasElement){canvas=image}else{if(_canvas===undefined)_canvas=createElementNS("canvas");_canvas.width=image.width;_canvas.height=image.height;const context=_canvas.getContext("2d");if(image instanceof ImageData){context.putImageData(image,0,0)}else{context.drawImage(image,0,0,image.width,image.height)}canvas=_canvas}return canvas.toDataURL(type)}static sRGBToLinear(image){if(typeof HTMLImageElement!=="undefined"&&image instanceof HTMLImageElement||typeof HTMLCanvasElement!=="undefined"&&image instanceof HTMLCanvasElement||typeof ImageBitmap!=="undefined"&&image instanceof ImageBitmap){const canvas=createElementNS("canvas");canvas.width=image.width;canvas.height=image.height;const context=canvas.getContext("2d");context.drawImage(image,0,0,image.width,image.height);const imageData=context.getImageData(0,0,image.width,image.height);const data=imageData.data;for(let i=0;i<data.length;i++){data[i]=SRGBToLinear(data[i]/255)*255}context.putImageData(imageData,0,0);return canvas}else if(image.data){const data=image.data.slice(0);for(let i=0;i<data.length;i++){if(data instanceof Uint8Array||data instanceof Uint8ClampedArray){data[i]=Math.floor(SRGBToLinear(data[i]/255)*255)}else{data[i]=SRGBToLinear(data[i])}}return{data:data,width:image.width,height:image.height}}else{warn("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied.");return image}}}let _sourceId=0;class Source{constructor(data=null){this.isSource=true;Object.defineProperty(this,"id",{value:_sourceId++});this.uuid=generateUUID();this.data=data;this.dataReady=true;this.version=0}getSize(target){const data=this.data;if(typeof HTMLVideoElement!=="undefined"&&data instanceof HTMLVideoElement){target.set(data.videoWidth,data.videoHeight,0)}else if(typeof VideoFrame!=="undefined"&&data instanceof VideoFrame){target.set(data.displayHeight,data.displayWidth,0)}else if(data!==null){target.set(data.width,data.height,data.depth||0)}else{target.set(0,0,0)}return target}set needsUpdate(value){if(value===true)this.version++}toJSON(meta){const isRootObject=meta===undefined||typeof meta==="string";if(!isRootObject&&meta.images[this.uuid]!==undefined){return meta.images[this.uuid]}const output={uuid:this.uuid,url:""};const data=this.data;if(data!==null){let url;if(Array.isArray(data)){url=[];for(let i=0,l=data.length;i<l;i++){if(data[i].isDataTexture){url.push(serializeImage(data[i].image))}else{url.push(serializeImage(data[i]))}}}else{url=serializeImage(data)}output.url=url}if(!isRootObject){meta.images[this.uuid]=output}return output}}function serializeImage(image){if(typeof HTMLImageElement!=="undefined"&&image instanceof HTMLImageElement||typeof HTMLCanvasElement!=="undefined"&&image instanceof HTMLCanvasElement||typeof ImageBitmap!=="undefined"&&image instanceof ImageBitmap){return ImageUtils.getDataURL(image)}else{if(image.data){return{data:Array.from(image.data),width:image.width,height:image.height,type:image.data.constructor.name}}else{warn("Texture: Unable to serialize Texture.");return{}}}}let _textureId=0;const _tempVec3=new Vector3;class Texture extends EventDispatcher{constructor(image=Texture.DEFAULT_IMAGE,mapping=Texture.DEFAULT_MAPPING,wrapS=ClampToEdgeWrapping,wrapT=ClampToEdgeWrapping,magFilter=LinearFilter,minFilter=LinearMipmapLinearFilter,format=RGBAFormat,type=UnsignedByteType,anisotropy=Texture.DEFAULT_ANISOTROPY,colorSpace=NoColorSpace){super();this.isTexture=true;Object.defineProperty(this,"id",{value:_textureId++});this.uuid=generateUUID();this.name="";this.source=new Source(image);this.mipmaps=[];this.mapping=mapping;this.channel=0;this.wrapS=wrapS;this.wrapT=wrapT;this.magFilter=magFilter;this.minFilter=minFilter;this.anisotropy=anisotropy;this.format=format;this.internalFormat=null;this.type=type;this.offset=new Vector2(0,0);this.repeat=new Vector2(1,1);this.center=new Vector2(0,0);this.rotation=0;this.matrixAutoUpdate=true;this.matrix=new Matrix3;this.generateMipmaps=true;this.premultiplyAlpha=false;this.flipY=true;this.unpackAlignment=4;this.colorSpace=colorSpace;this.userData={};this.updateRanges=[];this.version=0;this.onUpdate=null;this.renderTarget=null;this.isRenderTargetTexture=false;this.isArrayTexture=image&&image.depth&&image.depth>1?true:false;this.pmremVersion=0}get width(){return this.source.getSize(_tempVec3).x}get height(){return this.source.getSize(_tempVec3).y}get depth(){return this.source.getSize(_tempVec3).z}get image(){return this.source.data}set image(value=null){this.source.data=value}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(start,count){this.updateRanges.push({start,count})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(source){this.name=source.name;this.source=source.source;this.mipmaps=source.mipmaps.slice(0);this.mapping=source.mapping;this.channel=source.channel;this.wrapS=source.wrapS;this.wrapT=source.wrapT;this.magFilter=source.magFilter;this.minFilter=source.minFilter;this.anisotropy=source.anisotropy;this.format=source.format;this.internalFormat=source.internalFormat;this.type=source.type;this.offset.copy(source.offset);this.repeat.copy(source.repeat);this.center.copy(source.center);this.rotation=source.rotation;this.matrixAutoUpdate=source.matrixAutoUpdate;this.matrix.copy(source.matrix);this.generateMipmaps=source.generateMipmaps;this.premultiplyAlpha=source.premultiplyAlpha;this.flipY=source.flipY;this.unpackAlignment=source.unpackAlignment;this.colorSpace=source.colorSpace;this.renderTarget=source.renderTarget;this.isRenderTargetTexture=source.isRenderTargetTexture;this.isArrayTexture=source.isArrayTexture;this.userData=JSON.parse(JSON.stringify(source.userData));this.needsUpdate=true;return this}setValues(values){for(const key in values){const newValue=values[key];if(newValue===undefined){warn(`Texture.setValues(): parameter '${key}' has value of undefined.`);continue}const currentValue=this[key];if(currentValue===undefined){warn(`Texture.setValues(): property '${key}' does not exist.`);continue}if(currentValue&&newValue&&currentValue.isVector2&&newValue.isVector2){currentValue.copy(newValue)}else if(currentValue&&newValue&&currentValue.isVector3&&newValue.isVector3){currentValue.copy(newValue)}else if(currentValue&&newValue&&currentValue.isMatrix3&&newValue.isMatrix3){currentValue.copy(newValue)}else{this[key]=newValue}}}toJSON(meta){const isRootObject=meta===undefined||typeof meta==="string";if(!isRootObject&&meta.textures[this.uuid]!==undefined){return meta.textures[this.uuid]}const output={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(meta).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(Object.keys(this.userData).length>0)output.userData=this.userData;if(!isRootObject){meta.textures[this.uuid]=output}return output}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(uv){if(this.mapping!==UVMapping)return uv;uv.applyMatrix3(this.matrix);if(uv.x<0||uv.x>1){switch(this.wrapS){case RepeatWrapping:uv.x=uv.x-Math.floor(uv.x);break;case ClampToEdgeWrapping:uv.x=uv.x<0?0:1;break;case MirroredRepeatWrapping:if(Math.abs(Math.floor(uv.x)%2)===1){uv.x=Math.ceil(uv.x)-uv.x}else{uv.x=uv.x-Math.floor(uv.x)}break;}}if(uv.y<0||uv.y>1){switch(this.wrapT){case RepeatWrapping:uv.y=uv.y-Math.floor(uv.y);break;case ClampToEdgeWrapping:uv.y=uv.y<0?0:1;break;case MirroredRepeatWrapping:if(Math.abs(Math.floor(uv.y)%2)===1){uv.y=Math.ceil(uv.y)-uv.y}else{uv.y=uv.y-Math.floor(uv.y)}break;}}if(this.flipY){uv.y=1-uv.y}return uv}set needsUpdate(value){if(value===true){this.version++;this.source.needsUpdate=true}}set needsPMREMUpdate(value){if(value===true){this.pmremVersion++}}}Texture.DEFAULT_IMAGE=null;Texture.DEFAULT_MAPPING=UVMapping;Texture.DEFAULT_ANISOTROPY=1;class Vector4{constructor(x=0,y=0,z=0,w=1){Vector4.prototype.isVector4=true;this.x=x;this.y=y;this.z=z;this.w=w}get width(){return this.z}set width(value){this.z=value}get height(){return this.w}set height(value){this.w=value}set(x,y,z,w){this.x=x;this.y=y;this.z=z;this.w=w;return this}setScalar(scalar){this.x=scalar;this.y=scalar;this.z=scalar;this.w=scalar;return this}setX(x){this.x=x;return this}setY(y){this.y=y;return this}setZ(z){this.z=z;return this}setW(w){this.w=w;return this}setComponent(index,value){switch(index){case 0:this.x=value;break;case 1:this.y=value;break;case 2:this.z=value;break;case 3:this.w=value;break;default:throw new Error("index is out of range: "+index);}return this}getComponent(index){switch(index){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+index);}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(v){this.x=v.x;this.y=v.y;this.z=v.z;this.w=v.w!==undefined?v.w:1;return this}add(v){this.x+=v.x;this.y+=v.y;this.z+=v.z;this.w+=v.w;return this}addScalar(s){this.x+=s;this.y+=s;this.z+=s;this.w+=s;return this}addVectors(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z;this.w=a.w+b.w;return this}addScaledVector(v,s){this.x+=v.x*s;this.y+=v.y*s;this.z+=v.z*s;this.w+=v.w*s;return this}sub(v){this.x-=v.x;this.y-=v.y;this.z-=v.z;this.w-=v.w;return this}subScalar(s){this.x-=s;this.y-=s;this.z-=s;this.w-=s;return this}subVectors(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z;this.w=a.w-b.w;return this}multiply(v){this.x*=v.x;this.y*=v.y;this.z*=v.z;this.w*=v.w;return this}multiplyScalar(scalar){this.x*=scalar;this.y*=scalar;this.z*=scalar;this.w*=scalar;return this}applyMatrix4(m){const x=this.x,y=this.y,z=this.z,w=this.w;const e=m.elements;this.x=e[0]*x+e[4]*y+e[8]*z+e[12]*w;this.y=e[1]*x+e[5]*y+e[9]*z+e[13]*w;this.z=e[2]*x+e[6]*y+e[10]*z+e[14]*w;this.w=e[3]*x+e[7]*y+e[11]*z+e[15]*w;return this}divide(v){this.x/=v.x;this.y/=v.y;this.z/=v.z;this.w/=v.w;return this}divideScalar(scalar){return this.multiplyScalar(1/scalar)}setAxisAngleFromQuaternion(q){this.w=2*Math.acos(q.w);const s=Math.sqrt(1-q.w*q.w);if(s<0.0001){this.x=1;this.y=0;this.z=0}else{this.x=q.x/s;this.y=q.y/s;this.z=q.z/s}return this}setAxisAngleFromRotationMatrix(m){let angle,x,y,z;const epsilon=0.01,epsilon2=0.1,te=m.elements,m11=te[0],m12=te[4],m13=te[8],m21=te[1],m22=te[5],m23=te[9],m31=te[2],m32=te[6],m33=te[10];if(Math.abs(m12-m21)<epsilon&&Math.abs(m13-m31)<epsilon&&Math.abs(m23-m32)<epsilon){if(Math.abs(m12+m21)<epsilon2&&Math.abs(m13+m31)<epsilon2&&Math.abs(m23+m32)<epsilon2&&Math.abs(m11+m22+m33-3)<epsilon2){this.set(1,0,0,0);return this}angle=Math.PI;const xx=(m11+1)/2;const yy=(m22+1)/2;const zz=(m33+1)/2;const xy=(m12+m21)/4;const xz=(m13+m31)/4;const yz=(m23+m32)/4;if(xx>yy&&xx>zz){if(xx<epsilon){x=0;y=0.707106781;z=0.707106781}else{x=Math.sqrt(xx);y=xy/x;z=xz/x}}else if(yy>zz){if(yy<epsilon){x=0.707106781;y=0;z=0.707106781}else{y=Math.sqrt(yy);x=xy/y;z=yz/y}}else{if(zz<epsilon){x=0.707106781;y=0.707106781;z=0}else{z=Math.sqrt(zz);x=xz/z;y=yz/z}}this.set(x,y,z,angle);return this}let s=Math.sqrt((m32-m23)*(m32-m23)+(m13-m31)*(m13-m31)+(m21-m12)*(m21-m12));if(Math.abs(s)<0.001)s=1;this.x=(m32-m23)/s;this.y=(m13-m31)/s;this.z=(m21-m12)/s;this.w=Math.acos((m11+m22+m33-1)/2);return this}setFromMatrixPosition(m){const e=m.elements;this.x=e[12];this.y=e[13];this.z=e[14];this.w=e[15];return this}min(v){this.x=Math.min(this.x,v.x);this.y=Math.min(this.y,v.y);this.z=Math.min(this.z,v.z);this.w=Math.min(this.w,v.w);return this}max(v){this.x=Math.max(this.x,v.x);this.y=Math.max(this.y,v.y);this.z=Math.max(this.z,v.z);this.w=Math.max(this.w,v.w);return this}clamp(min,max){this.x=clamp(this.x,min.x,max.x);this.y=clamp(this.y,min.y,max.y);this.z=clamp(this.z,min.z,max.z);this.w=clamp(this.w,min.w,max.w);return this}clampScalar(minVal,maxVal){this.x=clamp(this.x,minVal,maxVal);this.y=clamp(this.y,minVal,maxVal);this.z=clamp(this.z,minVal,maxVal);this.w=clamp(this.w,minVal,maxVal);return this}clampLength(min,max){const length=this.length();return this.divideScalar(length||1).multiplyScalar(clamp(length,min,max))}floor(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);this.z=Math.floor(this.z);this.w=Math.floor(this.w);return this}ceil(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);this.z=Math.ceil(this.z);this.w=Math.ceil(this.w);return this}round(){this.x=Math.round(this.x);this.y=Math.round(this.y);this.z=Math.round(this.z);this.w=Math.round(this.w);return this}roundToZero(){this.x=Math.trunc(this.x);this.y=Math.trunc(this.y);this.z=Math.trunc(this.z);this.w=Math.trunc(this.w);return this}negate(){this.x=-this.x;this.y=-this.y;this.z=-this.z;this.w=-this.w;return this}dot(v){return this.x*v.x+this.y*v.y+this.z*v.z+this.w*v.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(length){return this.normalize().multiplyScalar(length)}lerp(v,alpha){this.x+=(v.x-this.x)*alpha;this.y+=(v.y-this.y)*alpha;this.z+=(v.z-this.z)*alpha;this.w+=(v.w-this.w)*alpha;return this}lerpVectors(v1,v2,alpha){this.x=v1.x+(v2.x-v1.x)*alpha;this.y=v1.y+(v2.y-v1.y)*alpha;this.z=v1.z+(v2.z-v1.z)*alpha;this.w=v1.w+(v2.w-v1.w)*alpha;return this}equals(v){return v.x===this.x&&v.y===this.y&&v.z===this.z&&v.w===this.w}fromArray(array,offset=0){this.x=array[offset];this.y=array[offset+1];this.z=array[offset+2];this.w=array[offset+3];return this}toArray(array=[],offset=0){array[offset]=this.x;array[offset+1]=this.y;array[offset+2]=this.z;array[offset+3]=this.w;return array}fromBufferAttribute(attribute,index){this.x=attribute.getX(index);this.y=attribute.getY(index);this.z=attribute.getZ(index);this.w=attribute.getW(index);return this}random(){this.x=Math.random();this.y=Math.random();this.z=Math.random();this.w=Math.random();return this}*[Symbol.iterator](){yield this.x;yield this.y;yield this.z;yield this.w}}class RenderTarget extends EventDispatcher{constructor(width=1,height=1,options={}){super();options=Object.assign({generateMipmaps:false,internalFormat:null,minFilter:LinearFilter,depthBuffer:true,stencilBuffer:false,resolveDepthBuffer:true,resolveStencilBuffer:true,depthTexture:null,samples:0,count:1,depth:1,multiview:false},options);this.isRenderTarget=true;this.width=width;this.height=height;this.depth=options.depth;this.scissor=new Vector4(0,0,width,height);this.scissorTest=false;this.viewport=new Vector4(0,0,width,height);const image={width:width,height:height,depth:options.depth};const texture=new Texture(image);this.textures=[];const count=options.count;for(let i=0;i<count;i++){this.textures[i]=texture.clone();this.textures[i].isRenderTargetTexture=true;this.textures[i].renderTarget=this}this._setTextureOptions(options);this.depthBuffer=options.depthBuffer;this.stencilBuffer=options.stencilBuffer;this.resolveDepthBuffer=options.resolveDepthBuffer;this.resolveStencilBuffer=options.resolveStencilBuffer;this._depthTexture=null;this.depthTexture=options.depthTexture;this.samples=options.samples;this.multiview=options.multiview}_setTextureOptions(options={}){const values={minFilter:LinearFilter,generateMipmaps:false,flipY:false,internalFormat:null};if(options.mapping!==undefined)values.mapping=options.mapping;if(options.wrapS!==undefined)values.wrapS=options.wrapS;if(options.wrapT!==undefined)values.wrapT=options.wrapT;if(options.wrapR!==undefined)values.wrapR=options.wrapR;if(options.magFilter!==undefined)values.magFilter=options.magFilter;if(options.minFilter!==undefined)values.minFilter=options.minFilter;if(options.format!==undefined)values.format=options.format;if(options.type!==undefined)values.type=options.type;if(options.anisotropy!==undefined)values.anisotropy=options.anisotropy;if(options.colorSpace!==undefined)values.colorSpace=options.colorSpace;if(options.flipY!==undefined)values.flipY=options.flipY;if(options.generateMipmaps!==undefined)values.generateMipmaps=options.generateMipmaps;if(options.internalFormat!==undefined)values.internalFormat=options.internalFormat;for(let i=0;i<this.textures.length;i++){const texture=this.textures[i];texture.setValues(values)}}get texture(){return this.textures[0]}set texture(value){this.textures[0]=value}set depthTexture(current){if(this._depthTexture!==null)this._depthTexture.renderTarget=null;if(current!==null)current.renderTarget=this;this._depthTexture=current}get depthTexture(){return this._depthTexture}setSize(width,height,depth=1){if(this.width!==width||this.height!==height||this.depth!==depth){this.width=width;this.height=height;this.depth=depth;for(let i=0,il=this.textures.length;i<il;i++){this.textures[i].image.width=width;this.textures[i].image.height=height;this.textures[i].image.depth=depth;if(this.textures[i].isData3DTexture!==true){this.textures[i].isArrayTexture=this.textures[i].image.depth>1}}this.dispose()}this.viewport.set(0,0,width,height);this.scissor.set(0,0,width,height)}clone(){return new this.constructor().copy(this)}copy(source){this.width=source.width;this.height=source.height;this.depth=source.depth;this.scissor.copy(source.scissor);this.scissorTest=source.scissorTest;this.viewport.copy(source.viewport);this.textures.length=0;for(let i=0,il=source.textures.length;i<il;i++){this.textures[i]=source.textures[i].clone();this.textures[i].isRenderTargetTexture=true;this.textures[i].renderTarget=this;const image=Object.assign({},source.textures[i].image);this.textures[i].source=new Source(image)}this.depthBuffer=source.depthBuffer;this.stencilBuffer=source.stencilBuffer;this.resolveDepthBuffer=source.resolveDepthBuffer;this.resolveStencilBuffer=source.resolveStencilBuffer;if(source.depthTexture!==null)this.depthTexture=source.depthTexture.clone();this.samples=source.samples;return this}dispose(){this.dispatchEvent({type:"dispose"})}}class WebGLRenderTarget extends RenderTarget{constructor(width=1,height=1,options={}){super(width,height,options);this.isWebGLRenderTarget=true}}class DataArrayTexture extends Texture{constructor(data=null,width=1,height=1,depth=1){super(null);this.isDataArrayTexture=true;this.image={data,width,height,depth};this.magFilter=NearestFilter;this.minFilter=NearestFilter;this.wrapR=ClampToEdgeWrapping;this.generateMipmaps=false;this.flipY=false;this.unpackAlignment=1;this.layerUpdates=new Set}addLayerUpdate(layerIndex){this.layerUpdates.add(layerIndex)}clearLayerUpdates(){this.layerUpdates.clear()}}class WebGLArrayRenderTarget extends WebGLRenderTarget{constructor(width=1,height=1,depth=1,options={}){super(width,height,options);this.isWebGLArrayRenderTarget=true;this.depth=depth;this.texture=new DataArrayTexture(null,width,height,depth);this._setTextureOptions(options);this.texture.isRenderTargetTexture=true}}class Data3DTexture extends Texture{constructor(data=null,width=1,height=1,depth=1){super(null);this.isData3DTexture=true;this.image={data,width,height,depth};this.magFilter=NearestFilter;this.minFilter=NearestFilter;this.wrapR=ClampToEdgeWrapping;this.generateMipmaps=false;this.flipY=false;this.unpackAlignment=1}}class WebGL3DRenderTarget extends WebGLRenderTarget{constructor(width=1,height=1,depth=1,options={}){super(width,height,options);this.isWebGL3DRenderTarget=true;this.depth=depth;this.texture=new Data3DTexture(null,width,height,depth);this._setTextureOptions(options);this.texture.isRenderTargetTexture=true}}class Box3{constructor(min=new Vector3(+Infinity,+Infinity,+Infinity),max=new Vector3(-Infinity,-Infinity,-Infinity)){this.isBox3=true;this.min=min;this.max=max}set(min,max){this.min.copy(min);this.max.copy(max);return this}setFromArray(array){this.makeEmpty();for(let i=0,il=array.length;i<il;i+=3){this.expandByPoint(_vector$b.fromArray(array,i))}return this}setFromBufferAttribute(attribute){this.makeEmpty();for(let i=0,il=attribute.count;i<il;i++){this.expandByPoint(_vector$b.fromBufferAttribute(attribute,i))}return this}setFromPoints(points){this.makeEmpty();for(let i=0,il=points.length;i<il;i++){this.expandByPoint(points[i])}return this}setFromCenterAndSize(center,size){const halfSize=_vector$b.copy(size).multiplyScalar(0.5);this.min.copy(center).sub(halfSize);this.max.copy(center).add(halfSize);return this}setFromObject(object,precise=false){this.makeEmpty();return this.expandByObject(object,precise)}clone(){return new this.constructor().copy(this)}copy(box){this.min.copy(box.min);this.max.copy(box.max);return this}makeEmpty(){this.min.x=this.min.y=this.min.z=+Infinity;this.max.x=this.max.y=this.max.z=-Infinity;return this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(target){return this.isEmpty()?target.set(0,0,0):target.addVectors(this.min,this.max).multiplyScalar(0.5)}getSize(target){return this.isEmpty()?target.set(0,0,0):target.subVectors(this.max,this.min)}expandByPoint(point){this.min.min(point);this.max.max(point);return this}expandByVector(vector){this.min.sub(vector);this.max.add(vector);return this}expandByScalar(scalar){this.min.addScalar(-scalar);this.max.addScalar(scalar);return this}expandByObject(object,precise=false){object.updateWorldMatrix(false,false);const geometry=object.geometry;if(geometry!==undefined){const positionAttribute=geometry.getAttribute("position");if(precise===true&&positionAttribute!==undefined&&object.isInstancedMesh!==true){for(let i=0,l=positionAttribute.count;i<l;i++){if(object.isMesh===true){object.getVertexPosition(i,_vector$b)}else{_vector$b.fromBufferAttribute(positionAttribute,i)}_vector$b.applyMatrix4(object.matrixWorld);this.expandByPoint(_vector$b)}}else{if(object.boundingBox!==undefined){if(object.boundingBox===null){object.computeBoundingBox()}_box$4.copy(object.boundingBox)}else{if(geometry.boundingBox===null){geometry.computeBoundingBox()}_box$4.copy(geometry.boundingBox)}_box$4.applyMatrix4(object.matrixWorld);this.union(_box$4)}}const children=object.children;for(let i=0,l=children.length;i<l;i++){this.expandByObject(children[i],precise)}return this}containsPoint(point){return point.x>=this.min.x&&point.x<=this.max.x&&point.y>=this.min.y&&point.y<=this.max.y&&point.z>=this.min.z&&point.z<=this.max.z}containsBox(box){return this.min.x<=box.min.x&&box.max.x<=this.max.x&&this.min.y<=box.min.y&&box.max.y<=this.max.y&&this.min.z<=box.min.z&&box.max.z<=this.max.z}getParameter(point,target){return target.set((point.x-this.min.x)/(this.max.x-this.min.x),(point.y-this.min.y)/(this.max.y-this.min.y),(point.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(box){return box.max.x>=this.min.x&&box.min.x<=this.max.x&&box.max.y>=this.min.y&&box.min.y<=this.max.y&&box.max.z>=this.min.z&&box.min.z<=this.max.z}intersectsSphere(sphere){this.clampPoint(sphere.center,_vector$b);return _vector$b.distanceToSquared(sphere.center)<=sphere.radius*sphere.radius}intersectsPlane(plane){let min,max;if(plane.normal.x>0){min=plane.normal.x*this.min.x;max=plane.normal.x*this.max.x}else{min=plane.normal.x*this.max.x;max=plane.normal.x*this.min.x}if(plane.normal.y>0){min+=plane.normal.y*this.min.y;max+=plane.normal.y*this.max.y}else{min+=plane.normal.y*this.max.y;max+=plane.normal.y*this.min.y}if(plane.normal.z>0){min+=plane.normal.z*this.min.z;max+=plane.normal.z*this.max.z}else{min+=plane.normal.z*this.max.z;max+=plane.normal.z*this.min.z}return min<=-plane.constant&&max>=-plane.constant}intersectsTriangle(triangle){if(this.isEmpty()){return false}this.getCenter(_center);_extents.subVectors(this.max,_center);_v0$3.subVectors(triangle.a,_center);_v1$7.subVectors(triangle.b,_center);_v2$4.subVectors(triangle.c,_center);_f0.subVectors(_v1$7,_v0$3);_f1.subVectors(_v2$4,_v1$7);_f2.subVectors(_v0$3,_v2$4);let axes=[0,-_f0.z,_f0.y,0,-_f1.z,_f1.y,0,-_f2.z,_f2.y,_f0.z,0,-_f0.x,_f1.z,0,-_f1.x,_f2.z,0,-_f2.x,-_f0.y,_f0.x,0,-_f1.y,_f1.x,0,-_f2.y,_f2.x,0];if(!satForAxes(axes,_v0$3,_v1$7,_v2$4,_extents)){return false}axes=[1,0,0,0,1,0,0,0,1];if(!satForAxes(axes,_v0$3,_v1$7,_v2$4,_extents)){return false}_triangleNormal.crossVectors(_f0,_f1);axes=[_triangleNormal.x,_triangleNormal.y,_triangleNormal.z];return satForAxes(axes,_v0$3,_v1$7,_v2$4,_extents)}clampPoint(point,target){return target.copy(point).clamp(this.min,this.max)}distanceToPoint(point){return this.clampPoint(point,_vector$b).distanceTo(point)}getBoundingSphere(target){if(this.isEmpty()){target.makeEmpty()}else{this.getCenter(target.center);target.radius=this.getSize(_vector$b).length()*0.5}return target}intersect(box){this.min.max(box.min);this.max.min(box.max);if(this.isEmpty())this.makeEmpty();return this}union(box){this.min.min(box.min);this.max.max(box.max);return this}applyMatrix4(matrix){if(this.isEmpty())return this;_points[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(matrix);_points[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(matrix);_points[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(matrix);_points[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(matrix);_points[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(matrix);_points[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(matrix);_points[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(matrix);_points[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(matrix);this.setFromPoints(_points);return this}translate(offset){this.min.add(offset);this.max.add(offset);return this}equals(box){return box.min.equals(this.min)&&box.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(json){this.min.fromArray(json.min);this.max.fromArray(json.max);return this}}const _points=[new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3];const _vector$b=new Vector3;const _box$4=new Box3;const _v0$3=new Vector3;const _v1$7=new Vector3;const _v2$4=new Vector3;const _f0=new Vector3;const _f1=new Vector3;const _f2=new Vector3;const _center=new Vector3;const _extents=new Vector3;const _triangleNormal=new Vector3;const _testAxis=new Vector3;function satForAxes(axes,v0,v1,v2,extents){for(let i=0,j=axes.length-3;i<=j;i+=3){_testAxis.fromArray(axes,i);const r=extents.x*Math.abs(_testAxis.x)+extents.y*Math.abs(_testAxis.y)+extents.z*Math.abs(_testAxis.z);const p0=v0.dot(_testAxis);const p1=v1.dot(_testAxis);const p2=v2.dot(_testAxis);if(Math.max(-Math.max(p0,p1,p2),Math.min(p0,p1,p2))>r){return false}}return true}const _box$3=new Box3;const _v1$6=new Vector3;const _v2$3=new Vector3;class Sphere{constructor(center=new Vector3,radius=-1){this.isSphere=true;this.center=center;this.radius=radius}set(center,radius){this.center.copy(center);this.radius=radius;return this}setFromPoints(points,optionalCenter){const center=this.center;if(optionalCenter!==undefined){center.copy(optionalCenter)}else{_box$3.setFromPoints(points).getCenter(center)}let maxRadiusSq=0;for(let i=0,il=points.length;i<il;i++){maxRadiusSq=Math.max(maxRadiusSq,center.distanceToSquared(points[i]))}this.radius=Math.sqrt(maxRadiusSq);return this}copy(sphere){this.center.copy(sphere.center);this.radius=sphere.radius;return this}isEmpty(){return this.radius<0}makeEmpty(){this.center.set(0,0,0);this.radius=-1;return this}containsPoint(point){return point.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(point){return point.distanceTo(this.center)-this.radius}intersectsSphere(sphere){const radiusSum=this.radius+sphere.radius;return sphere.center.distanceToSquared(this.center)<=radiusSum*radiusSum}intersectsBox(box){return box.intersectsSphere(this)}intersectsPlane(plane){return Math.abs(plane.distanceToPoint(this.center))<=this.radius}clampPoint(point,target){const deltaLengthSq=this.center.distanceToSquared(point);target.copy(point);if(deltaLengthSq>this.radius*this.radius){target.sub(this.center).normalize();target.multiplyScalar(this.radius).add(this.center)}return target}getBoundingBox(target){if(this.isEmpty()){target.makeEmpty();return target}target.set(this.center,this.center);target.expandByScalar(this.radius);return target}applyMatrix4(matrix){this.center.applyMatrix4(matrix);this.radius=this.radius*matrix.getMaxScaleOnAxis();return this}translate(offset){this.center.add(offset);return this}expandByPoint(point){if(this.isEmpty()){this.center.copy(point);this.radius=0;return this}_v1$6.subVectors(point,this.center);const lengthSq=_v1$6.lengthSq();if(lengthSq>this.radius*this.radius){const length=Math.sqrt(lengthSq);const delta=(length-this.radius)*0.5;this.center.addScaledVector(_v1$6,delta/length);this.radius+=delta}return this}union(sphere){if(sphere.isEmpty()){return this}if(this.isEmpty()){this.copy(sphere);return this}if(this.center.equals(sphere.center)===true){this.radius=Math.max(this.radius,sphere.radius)}else{_v2$3.subVectors(sphere.center,this.center).setLength(sphere.radius);this.expandByPoint(_v1$6.copy(sphere.center).add(_v2$3));this.expandByPoint(_v1$6.copy(sphere.center).sub(_v2$3))}return this}equals(sphere){return sphere.center.equals(this.center)&&sphere.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(json){this.radius=json.radius;this.center.fromArray(json.center);return this}}const _vector$a=new Vector3;const _segCenter=new Vector3;const _segDir=new Vector3;const _diff=new Vector3;const _edge1=new Vector3;const _edge2=new Vector3;const _normal$1=new Vector3;class Ray{constructor(origin=new Vector3,direction=new Vector3(0,0,-1)){this.origin=origin;this.direction=direction}set(origin,direction){this.origin.copy(origin);this.direction.copy(direction);return this}copy(ray){this.origin.copy(ray.origin);this.direction.copy(ray.direction);return this}at(t,target){return target.copy(this.origin).addScaledVector(this.direction,t)}lookAt(v){this.direction.copy(v).sub(this.origin).normalize();return this}recast(t){this.origin.copy(this.at(t,_vector$a));return this}closestPointToPoint(point,target){target.subVectors(point,this.origin);const directionDistance=target.dot(this.direction);if(directionDistance<0){return target.copy(this.origin)}return target.copy(this.origin).addScaledVector(this.direction,directionDistance)}distanceToPoint(point){return Math.sqrt(this.distanceSqToPoint(point))}distanceSqToPoint(point){const directionDistance=_vector$a.subVectors(point,this.origin).dot(this.direction);if(directionDistance<0){return this.origin.distanceToSquared(point)}_vector$a.copy(this.origin).addScaledVector(this.direction,directionDistance);return _vector$a.distanceToSquared(point)}distanceSqToSegment(v0,v1,optionalPointOnRay,optionalPointOnSegment){_segCenter.copy(v0).add(v1).multiplyScalar(0.5);_segDir.copy(v1).sub(v0).normalize();_diff.copy(this.origin).sub(_segCenter);const segExtent=v0.distanceTo(v1)*0.5;const a01=-this.direction.dot(_segDir);const b0=_diff.dot(this.direction);const b1=-_diff.dot(_segDir);const c=_diff.lengthSq();const det=Math.abs(1-a01*a01);let s0,s1,sqrDist,extDet;if(det>0){s0=a01*b1-b0;s1=a01*b0-b1;extDet=segExtent*det;if(s0>=0){if(s1>=-extDet){if(s1<=extDet){const invDet=1/det;s0*=invDet;s1*=invDet;sqrDist=s0*(s0+a01*s1+2*b0)+s1*(a01*s0+s1+2*b1)+c}else{s1=segExtent;s0=Math.max(0,-(a01*s1+b0));sqrDist=-s0*s0+s1*(s1+2*b1)+c}}else{s1=-segExtent;s0=Math.max(0,-(a01*s1+b0));sqrDist=-s0*s0+s1*(s1+2*b1)+c}}else{if(s1<=-extDet){s0=Math.max(0,-(-a01*segExtent+b0));s1=s0>0?-segExtent:Math.min(Math.max(-segExtent,-b1),segExtent);sqrDist=-s0*s0+s1*(s1+2*b1)+c}else if(s1<=extDet){s0=0;s1=Math.min(Math.max(-segExtent,-b1),segExtent);sqrDist=s1*(s1+2*b1)+c}else{s0=Math.max(0,-(a01*segExtent+b0));s1=s0>0?segExtent:Math.min(Math.max(-segExtent,-b1),segExtent);sqrDist=-s0*s0+s1*(s1+2*b1)+c}}}else{s1=a01>0?-segExtent:segExtent;s0=Math.max(0,-(a01*s1+b0));sqrDist=-s0*s0+s1*(s1+2*b1)+c}if(optionalPointOnRay){optionalPointOnRay.copy(this.origin).addScaledVector(this.direction,s0)}if(optionalPointOnSegment){optionalPointOnSegment.copy(_segCenter).addScaledVector(_segDir,s1)}return sqrDist}intersectSphere(sphere,target){_vector$a.subVectors(sphere.center,this.origin);const tca=_vector$a.dot(this.direction);const d2=_vector$a.dot(_vector$a)-tca*tca;const radius2=sphere.radius*sphere.radius;if(d2>radius2)return null;const thc=Math.sqrt(radius2-d2);const t0=tca-thc;const t1=tca+thc;if(t1<0)return null;if(t0<0)return this.at(t1,target);return this.at(t0,target)}intersectsSphere(sphere){if(sphere.radius<0)return false;return this.distanceSqToPoint(sphere.center)<=sphere.radius*sphere.radius}distanceToPlane(plane){const denominator=plane.normal.dot(this.direction);if(denominator===0){if(plane.distanceToPoint(this.origin)===0){return 0}return null}const t=-(this.origin.dot(plane.normal)+plane.constant)/denominator;return t>=0?t:null}intersectPlane(plane,target){const t=this.distanceToPlane(plane);if(t===null){return null}return this.at(t,target)}intersectsPlane(plane){const distToPoint=plane.distanceToPoint(this.origin);if(distToPoint===0){return true}const denominator=plane.normal.dot(this.direction);if(denominator*distToPoint<0){return true}return false}intersectBox(box,target){let tmin,tmax,tymin,tymax,tzmin,tzmax;const invdirx=1/this.direction.x,invdiry=1/this.direction.y,invdirz=1/this.direction.z;const origin=this.origin;if(invdirx>=0){tmin=(box.min.x-origin.x)*invdirx;tmax=(box.max.x-origin.x)*invdirx}else{tmin=(box.max.x-origin.x)*invdirx;tmax=(box.min.x-origin.x)*invdirx}if(invdiry>=0){tymin=(box.min.y-origin.y)*invdiry;tymax=(box.max.y-origin.y)*invdiry}else{tymin=(box.max.y-origin.y)*invdiry;tymax=(box.min.y-origin.y)*invdiry}if(tmin>tymax||tymin>tmax)return null;if(tymin>tmin||isNaN(tmin))tmin=tymin;if(tymax<tmax||isNaN(tmax))tmax=tymax;if(invdirz>=0){tzmin=(box.min.z-origin.z)*invdirz;tzmax=(box.max.z-origin.z)*invdirz}else{tzmin=(box.max.z-origin.z)*invdirz;tzmax=(box.min.z-origin.z)*invdirz}if(tmin>tzmax||tzmin>tmax)return null;if(tzmin>tmin||tmin!==tmin)tmin=tzmin;if(tzmax<tmax||tmax!==tmax)tmax=tzmax;if(tmax<0)return null;return this.at(tmin>=0?tmin:tmax,target)}intersectsBox(box){return this.intersectBox(box,_vector$a)!==null}intersectTriangle(a,b,c,backfaceCulling,target){_edge1.subVectors(b,a);_edge2.subVectors(c,a);_normal$1.crossVectors(_edge1,_edge2);let DdN=this.direction.dot(_normal$1);let sign;if(DdN>0){if(backfaceCulling)return null;sign=1}else if(DdN<0){sign=-1;DdN=-DdN}else{return null}_diff.subVectors(this.origin,a);const DdQxE2=sign*this.direction.dot(_edge2.crossVectors(_diff,_edge2));if(DdQxE2<0){return null}const DdE1xQ=sign*this.direction.dot(_edge1.cross(_diff));if(DdE1xQ<0){return null}if(DdQxE2+DdE1xQ>DdN){return null}const QdN=-sign*_diff.dot(_normal$1);if(QdN<0){return null}return this.at(QdN/DdN,target)}applyMatrix4(matrix4){this.origin.applyMatrix4(matrix4);this.direction.transformDirection(matrix4);return this}equals(ray){return ray.origin.equals(this.origin)&&ray.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Matrix4{constructor(n11,n12,n13,n14,n21,n22,n23,n24,n31,n32,n33,n34,n41,n42,n43,n44){Matrix4.prototype.isMatrix4=true;this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];if(n11!==undefined){this.set(n11,n12,n13,n14,n21,n22,n23,n24,n31,n32,n33,n34,n41,n42,n43,n44)}}set(n11,n12,n13,n14,n21,n22,n23,n24,n31,n32,n33,n34,n41,n42,n43,n44){const te=this.elements;te[0]=n11;te[4]=n12;te[8]=n13;te[12]=n14;te[1]=n21;te[5]=n22;te[9]=n23;te[13]=n24;te[2]=n31;te[6]=n32;te[10]=n33;te[14]=n34;te[3]=n41;te[7]=n42;te[11]=n43;te[15]=n44;return this}identity(){this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);return this}clone(){return new Matrix4().fromArray(this.elements)}copy(m){const te=this.elements;const me=m.elements;te[0]=me[0];te[1]=me[1];te[2]=me[2];te[3]=me[3];te[4]=me[4];te[5]=me[5];te[6]=me[6];te[7]=me[7];te[8]=me[8];te[9]=me[9];te[10]=me[10];te[11]=me[11];te[12]=me[12];te[13]=me[13];te[14]=me[14];te[15]=me[15];return this}copyPosition(m){const te=this.elements,me=m.elements;te[12]=me[12];te[13]=me[13];te[14]=me[14];return this}setFromMatrix3(m){const me=m.elements;this.set(me[0],me[3],me[6],0,me[1],me[4],me[7],0,me[2],me[5],me[8],0,0,0,0,1);return this}extractBasis(xAxis,yAxis,zAxis){if(this.determinant()===0){xAxis.set(1,0,0);yAxis.set(0,1,0);zAxis.set(0,0,1);return this}xAxis.setFromMatrixColumn(this,0);yAxis.setFromMatrixColumn(this,1);zAxis.setFromMatrixColumn(this,2);return this}makeBasis(xAxis,yAxis,zAxis){this.set(xAxis.x,yAxis.x,zAxis.x,0,xAxis.y,yAxis.y,zAxis.y,0,xAxis.z,yAxis.z,zAxis.z,0,0,0,0,1);return this}extractRotation(m){if(m.determinant()===0){return this.identity()}const te=this.elements;const me=m.elements;const scaleX=1/_v1$5.setFromMatrixColumn(m,0).length();const scaleY=1/_v1$5.setFromMatrixColumn(m,1).length();const scaleZ=1/_v1$5.setFromMatrixColumn(m,2).length();te[0]=me[0]*scaleX;te[1]=me[1]*scaleX;te[2]=me[2]*scaleX;te[3]=0;te[4]=me[4]*scaleY;te[5]=me[5]*scaleY;te[6]=me[6]*scaleY;te[7]=0;te[8]=me[8]*scaleZ;te[9]=me[9]*scaleZ;te[10]=me[10]*scaleZ;te[11]=0;te[12]=0;te[13]=0;te[14]=0;te[15]=1;return this}makeRotationFromEuler(euler){const te=this.elements;const x=euler.x,y=euler.y,z=euler.z;const a=Math.cos(x),b=Math.sin(x);const c=Math.cos(y),d=Math.sin(y);const e=Math.cos(z),f=Math.sin(z);if(euler.order==="XYZ"){const ae=a*e,af=a*f,be=b*e,bf=b*f;te[0]=c*e;te[4]=-c*f;te[8]=d;te[1]=af+be*d;te[5]=ae-bf*d;te[9]=-b*c;te[2]=bf-ae*d;te[6]=be+af*d;te[10]=a*c}else if(euler.order==="YXZ"){const ce=c*e,cf=c*f,de=d*e,df=d*f;te[0]=ce+df*b;te[4]=de*b-cf;te[8]=a*d;te[1]=a*f;te[5]=a*e;te[9]=-b;te[2]=cf*b-de;te[6]=df+ce*b;te[10]=a*c}else if(euler.order==="ZXY"){const ce=c*e,cf=c*f,de=d*e,df=d*f;te[0]=ce-df*b;te[4]=-a*f;te[8]=de+cf*b;te[1]=cf+de*b;te[5]=a*e;te[9]=df-ce*b;te[2]=-a*d;te[6]=b;te[10]=a*c}else if(euler.order==="ZYX"){const ae=a*e,af=a*f,be=b*e,bf=b*f;te[0]=c*e;te[4]=be*d-af;te[8]=ae*d+bf;te[1]=c*f;te[5]=bf*d+ae;te[9]=af*d-be;te[2]=-d;te[6]=b*c;te[10]=a*c}else if(euler.order==="YZX"){const ac=a*c,ad=a*d,bc=b*c,bd=b*d;te[0]=c*e;te[4]=bd-ac*f;te[8]=bc*f+ad;te[1]=f;te[5]=a*e;te[9]=-b*e;te[2]=-d*e;te[6]=ad*f+bc;te[10]=ac-bd*f}else if(euler.order==="XZY"){const ac=a*c,ad=a*d,bc=b*c,bd=b*d;te[0]=c*e;te[4]=-f;te[8]=d*e;te[1]=ac*f+bd;te[5]=a*e;te[9]=ad*f-bc;te[2]=bc*f-ad;te[6]=b*e;te[10]=bd*f+ac}te[3]=0;te[7]=0;te[11]=0;te[12]=0;te[13]=0;te[14]=0;te[15]=1;return this}makeRotationFromQuaternion(q){return this.compose(_zero,q,_one)}lookAt(eye,target,up){const te=this.elements;_z.subVectors(eye,target);if(_z.lengthSq()===0){_z.z=1}_z.normalize();_x.crossVectors(up,_z);if(_x.lengthSq()===0){if(Math.abs(up.z)===1){_z.x+=0.0001}else{_z.z+=0.0001}_z.normalize();_x.crossVectors(up,_z)}_x.normalize();_y.crossVectors(_z,_x);te[0]=_x.x;te[4]=_y.x;te[8]=_z.x;te[1]=_x.y;te[5]=_y.y;te[9]=_z.y;te[2]=_x.z;te[6]=_y.z;te[10]=_z.z;return this}multiply(m){return this.multiplyMatrices(this,m)}premultiply(m){return this.multiplyMatrices(m,this)}multiplyMatrices(a,b){const ae=a.elements;const be=b.elements;const te=this.elements;const a11=ae[0],a12=ae[4],a13=ae[8],a14=ae[12];const a21=ae[1],a22=ae[5],a23=ae[9],a24=ae[13];const a31=ae[2],a32=ae[6],a33=ae[10],a34=ae[14];const a41=ae[3],a42=ae[7],a43=ae[11],a44=ae[15];const b11=be[0],b12=be[4],b13=be[8],b14=be[12];const b21=be[1],b22=be[5],b23=be[9],b24=be[13];const b31=be[2],b32=be[6],b33=be[10],b34=be[14];const b41=be[3],b42=be[7],b43=be[11],b44=be[15];te[0]=a11*b11+a12*b21+a13*b31+a14*b41;te[4]=a11*b12+a12*b22+a13*b32+a14*b42;te[8]=a11*b13+a12*b23+a13*b33+a14*b43;te[12]=a11*b14+a12*b24+a13*b34+a14*b44;te[1]=a21*b11+a22*b21+a23*b31+a24*b41;te[5]=a21*b12+a22*b22+a23*b32+a24*b42;te[9]=a21*b13+a22*b23+a23*b33+a24*b43;te[13]=a21*b14+a22*b24+a23*b34+a24*b44;te[2]=a31*b11+a32*b21+a33*b31+a34*b41;te[6]=a31*b12+a32*b22+a33*b32+a34*b42;te[10]=a31*b13+a32*b23+a33*b33+a34*b43;te[14]=a31*b14+a32*b24+a33*b34+a34*b44;te[3]=a41*b11+a42*b21+a43*b31+a44*b41;te[7]=a41*b12+a42*b22+a43*b32+a44*b42;te[11]=a41*b13+a42*b23+a43*b33+a44*b43;te[15]=a41*b14+a42*b24+a43*b34+a44*b44;return this}multiplyScalar(s){const te=this.elements;te[0]*=s;te[4]*=s;te[8]*=s;te[12]*=s;te[1]*=s;te[5]*=s;te[9]*=s;te[13]*=s;te[2]*=s;te[6]*=s;te[10]*=s;te[14]*=s;te[3]*=s;te[7]*=s;te[11]*=s;te[15]*=s;return this}determinant(){const te=this.elements;const n11=te[0],n12=te[4],n13=te[8],n14=te[12];const n21=te[1],n22=te[5],n23=te[9],n24=te[13];const n31=te[2],n32=te[6],n33=te[10],n34=te[14];const n41=te[3],n42=te[7],n43=te[11],n44=te[15];const t11=n23*n34-n24*n33;const t12=n22*n34-n24*n32;const t13=n22*n33-n23*n32;const t21=n21*n34-n24*n31;const t22=n21*n33-n23*n31;const t23=n21*n32-n22*n31;return n11*(n42*t11-n43*t12+n44*t13)-n12*(n41*t11-n43*t21+n44*t22)+n13*(n41*t12-n42*t21+n44*t23)-n14*(n41*t13-n42*t22+n43*t23)}transpose(){const te=this.elements;let tmp;tmp=te[1];te[1]=te[4];te[4]=tmp;tmp=te[2];te[2]=te[8];te[8]=tmp;tmp=te[6];te[6]=te[9];te[9]=tmp;tmp=te[3];te[3]=te[12];te[12]=tmp;tmp=te[7];te[7]=te[13];te[13]=tmp;tmp=te[11];te[11]=te[14];te[14]=tmp;return this}setPosition(x,y,z){const te=this.elements;if(x.isVector3){te[12]=x.x;te[13]=x.y;te[14]=x.z}else{te[12]=x;te[13]=y;te[14]=z}return this}invert(){const te=this.elements,n11=te[0],n21=te[1],n31=te[2],n41=te[3],n12=te[4],n22=te[5],n32=te[6],n42=te[7],n13=te[8],n23=te[9],n33=te[10],n43=te[11],n14=te[12],n24=te[13],n34=te[14],n44=te[15],t11=n23*n34*n42-n24*n33*n42+n24*n32*n43-n22*n34*n43-n23*n32*n44+n22*n33*n44,t12=n14*n33*n42-n13*n34*n42-n14*n32*n43+n12*n34*n43+n13*n32*n44-n12*n33*n44,t13=n13*n24*n42-n14*n23*n42+n14*n22*n43-n12*n24*n43-n13*n22*n44+n12*n23*n44,t14=n14*n23*n32-n13*n24*n32-n14*n22*n33+n12*n24*n33+n13*n22*n34-n12*n23*n34;const det=n11*t11+n21*t12+n31*t13+n41*t14;if(det===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const detInv=1/det;te[0]=t11*detInv;te[1]=(n24*n33*n41-n23*n34*n41-n24*n31*n43+n21*n34*n43+n23*n31*n44-n21*n33*n44)*detInv;te[2]=(n22*n34*n41-n24*n32*n41+n24*n31*n42-n21*n34*n42-n22*n31*n44+n21*n32*n44)*detInv;te[3]=(n23*n32*n41-n22*n33*n41-n23*n31*n42+n21*n33*n42+n22*n31*n43-n21*n32*n43)*detInv;te[4]=t12*detInv;te[5]=(n13*n34*n41-n14*n33*n41+n14*n31*n43-n11*n34*n43-n13*n31*n44+n11*n33*n44)*detInv;te[6]=(n14*n32*n41-n12*n34*n41-n14*n31*n42+n11*n34*n42+n12*n31*n44-n11*n32*n44)*detInv;te[7]=(n12*n33*n41-n13*n32*n41+n13*n31*n42-n11*n33*n42-n12*n31*n43+n11*n32*n43)*detInv;te[8]=t13*detInv;te[9]=(n14*n23*n41-n13*n24*n41-n14*n21*n43+n11*n24*n43+n13*n21*n44-n11*n23*n44)*detInv;te[10]=(n12*n24*n41-n14*n22*n41+n14*n21*n42-n11*n24*n42-n12*n21*n44+n11*n22*n44)*detInv;te[11]=(n13*n22*n41-n12*n23*n41-n13*n21*n42+n11*n23*n42+n12*n21*n43-n11*n22*n43)*detInv;te[12]=t14*detInv;te[13]=(n13*n24*n31-n14*n23*n31+n14*n21*n33-n11*n24*n33-n13*n21*n34+n11*n23*n34)*detInv;te[14]=(n14*n22*n31-n12*n24*n31-n14*n21*n32+n11*n24*n32+n12*n21*n34-n11*n22*n34)*detInv;te[15]=(n12*n23*n31-n13*n22*n31+n13*n21*n32-n11*n23*n32-n12*n21*n33+n11*n22*n33)*detInv;return this}scale(v){const te=this.elements;const x=v.x,y=v.y,z=v.z;te[0]*=x;te[4]*=y;te[8]*=z;te[1]*=x;te[5]*=y;te[9]*=z;te[2]*=x;te[6]*=y;te[10]*=z;te[3]*=x;te[7]*=y;te[11]*=z;return this}getMaxScaleOnAxis(){const te=this.elements;const scaleXSq=te[0]*te[0]+te[1]*te[1]+te[2]*te[2];const scaleYSq=te[4]*te[4]+te[5]*te[5]+te[6]*te[6];const scaleZSq=te[8]*te[8]+te[9]*te[9]+te[10]*te[10];return Math.sqrt(Math.max(scaleXSq,scaleYSq,scaleZSq))}makeTranslation(x,y,z){if(x.isVector3){this.set(1,0,0,x.x,0,1,0,x.y,0,0,1,x.z,0,0,0,1)}else{this.set(1,0,0,x,0,1,0,y,0,0,1,z,0,0,0,1)}return this}makeRotationX(theta){const c=Math.cos(theta),s=Math.sin(theta);this.set(1,0,0,0,0,c,-s,0,0,s,c,0,0,0,0,1);return this}makeRotationY(theta){const c=Math.cos(theta),s=Math.sin(theta);this.set(c,0,s,0,0,1,0,0,-s,0,c,0,0,0,0,1);return this}makeRotationZ(theta){const c=Math.cos(theta),s=Math.sin(theta);this.set(c,-s,0,0,s,c,0,0,0,0,1,0,0,0,0,1);return this}makeRotationAxis(axis,angle){const c=Math.cos(angle);const s=Math.sin(angle);const t=1-c;const x=axis.x,y=axis.y,z=axis.z;const tx=t*x,ty=t*y;this.set(tx*x+c,tx*y-s*z,tx*z+s*y,0,tx*y+s*z,ty*y+c,ty*z-s*x,0,tx*z-s*y,ty*z+s*x,t*z*z+c,0,0,0,0,1);return this}makeScale(x,y,z){this.set(x,0,0,0,0,y,0,0,0,0,z,0,0,0,0,1);return this}makeShear(xy,xz,yx,yz,zx,zy){this.set(1,yx,zx,0,xy,1,zy,0,xz,yz,1,0,0,0,0,1);return this}compose(position,quaternion,scale){const te=this.elements;const x=quaternion._x,y=quaternion._y,z=quaternion._z,w=quaternion._w;const x2=x+x,y2=y+y,z2=z+z;const xx=x*x2,xy=x*y2,xz=x*z2;const yy=y*y2,yz=y*z2,zz=z*z2;const wx=w*x2,wy=w*y2,wz=w*z2;const sx=scale.x,sy=scale.y,sz=scale.z;te[0]=(1-(yy+zz))*sx;te[1]=(xy+wz)*sx;te[2]=(xz-wy)*sx;te[3]=0;te[4]=(xy-wz)*sy;te[5]=(1-(xx+zz))*sy;te[6]=(yz+wx)*sy;te[7]=0;te[8]=(xz+wy)*sz;te[9]=(yz-wx)*sz;te[10]=(1-(xx+yy))*sz;te[11]=0;te[12]=position.x;te[13]=position.y;te[14]=position.z;te[15]=1;return this}decompose(position,quaternion,scale){const te=this.elements;position.x=te[12];position.y=te[13];position.z=te[14];if(this.determinant()===0){scale.set(1,1,1);quaternion.identity();return this}let sx=_v1$5.set(te[0],te[1],te[2]).length();const sy=_v1$5.set(te[4],te[5],te[6]).length();const sz=_v1$5.set(te[8],te[9],te[10]).length();const det=this.determinant();if(det<0)sx=-sx;_m1$4.copy(this);const invSX=1/sx;const invSY=1/sy;const invSZ=1/sz;_m1$4.elements[0]*=invSX;_m1$4.elements[1]*=invSX;_m1$4.elements[2]*=invSX;_m1$4.elements[4]*=invSY;_m1$4.elements[5]*=invSY;_m1$4.elements[6]*=invSY;_m1$4.elements[8]*=invSZ;_m1$4.elements[9]*=invSZ;_m1$4.elements[10]*=invSZ;quaternion.setFromRotationMatrix(_m1$4);scale.x=sx;scale.y=sy;scale.z=sz;return this}makePerspective(left,right,top,bottom,near,far,coordinateSystem=WebGLCoordinateSystem,reversedDepth=false){const te=this.elements;const x=2*near/(right-left);const y=2*near/(top-bottom);const a=(right+left)/(right-left);const b=(top+bottom)/(top-bottom);let c,d;if(reversedDepth){c=near/(far-near);d=far*near/(far-near)}else{if(coordinateSystem===WebGLCoordinateSystem){c=-(far+near)/(far-near);d=-2*far*near/(far-near)}else if(coordinateSystem===WebGPUCoordinateSystem){c=-far/(far-near);d=-far*near/(far-near)}else{throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+coordinateSystem)}}te[0]=x;te[4]=0;te[8]=a;te[12]=0;te[1]=0;te[5]=y;te[9]=b;te[13]=0;te[2]=0;te[6]=0;te[10]=c;te[14]=d;te[3]=0;te[7]=0;te[11]=-1;te[15]=0;return this}makeOrthographic(left,right,top,bottom,near,far,coordinateSystem=WebGLCoordinateSystem,reversedDepth=false){const te=this.elements;const x=2/(right-left);const y=2/(top-bottom);const a=-(right+left)/(right-left);const b=-(top+bottom)/(top-bottom);let c,d;if(reversedDepth){c=1/(far-near);d=far/(far-near)}else{if(coordinateSystem===WebGLCoordinateSystem){c=-2/(far-near);d=-(far+near)/(far-near)}else if(coordinateSystem===WebGPUCoordinateSystem){c=-1/(far-near);d=-near/(far-near)}else{throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+coordinateSystem)}}te[0]=x;te[4]=0;te[8]=0;te[12]=a;te[1]=0;te[5]=y;te[9]=0;te[13]=b;te[2]=0;te[6]=0;te[10]=c;te[14]=d;te[3]=0;te[7]=0;te[11]=0;te[15]=1;return this}equals(matrix){const te=this.elements;const me=matrix.elements;for(let i=0;i<16;i++){if(te[i]!==me[i])return false}return true}fromArray(array,offset=0){for(let i=0;i<16;i++){this.elements[i]=array[i+offset]}return this}toArray(array=[],offset=0){const te=this.elements;array[offset]=te[0];array[offset+1]=te[1];array[offset+2]=te[2];array[offset+3]=te[3];array[offset+4]=te[4];array[offset+5]=te[5];array[offset+6]=te[6];array[offset+7]=te[7];array[offset+8]=te[8];array[offset+9]=te[9];array[offset+10]=te[10];array[offset+11]=te[11];array[offset+12]=te[12];array[offset+13]=te[13];array[offset+14]=te[14];array[offset+15]=te[15];return array}}const _v1$5=new Vector3;const _m1$4=new Matrix4;const _zero=new Vector3(0,0,0);const _one=new Vector3(1,1,1);const _x=new Vector3;const _y=new Vector3;const _z=new Vector3;const _matrix$2=new Matrix4;const _quaternion$3=new Quaternion;class Euler{constructor(x=0,y=0,z=0,order=Euler.DEFAULT_ORDER){this.isEuler=true;this._x=x;this._y=y;this._z=z;this._order=order}get x(){return this._x}set x(value){this._x=value;this._onChangeCallback()}get y(){return this._y}set y(value){this._y=value;this._onChangeCallback()}get z(){return this._z}set z(value){this._z=value;this._onChangeCallback()}get order(){return this._order}set order(value){this._order=value;this._onChangeCallback()}set(x,y,z,order=this._order){this._x=x;this._y=y;this._z=z;this._order=order;this._onChangeCallback();return this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(euler){this._x=euler._x;this._y=euler._y;this._z=euler._z;this._order=euler._order;this._onChangeCallback();return this}setFromRotationMatrix(m,order=this._order,update=true){const te=m.elements;const m11=te[0],m12=te[4],m13=te[8];const m21=te[1],m22=te[5],m23=te[9];const m31=te[2],m32=te[6],m33=te[10];switch(order){case"XYZ":this._y=Math.asin(clamp(m13,-1,1));if(Math.abs(m13)<0.9999999){this._x=Math.atan2(-m23,m33);this._z=Math.atan2(-m12,m11)}else{this._x=Math.atan2(m32,m22);this._z=0}break;case"YXZ":this._x=Math.asin(-clamp(m23,-1,1));if(Math.abs(m23)<0.9999999){this._y=Math.atan2(m13,m33);this._z=Math.atan2(m21,m22)}else{this._y=Math.atan2(-m31,m11);this._z=0}break;case"ZXY":this._x=Math.asin(clamp(m32,-1,1));if(Math.abs(m32)<0.9999999){this._y=Math.atan2(-m31,m33);this._z=Math.atan2(-m12,m22)}else{this._y=0;this._z=Math.atan2(m21,m11)}break;case"ZYX":this._y=Math.asin(-clamp(m31,-1,1));if(Math.abs(m31)<0.9999999){this._x=Math.atan2(m32,m33);this._z=Math.atan2(m21,m11)}else{this._x=0;this._z=Math.atan2(-m12,m22)}break;case"YZX":this._z=Math.asin(clamp(m21,-1,1));if(Math.abs(m21)<0.9999999){this._x=Math.atan2(-m23,m22);this._y=Math.atan2(-m31,m11)}else{this._x=0;this._y=Math.atan2(m13,m33)}break;case"XZY":this._z=Math.asin(-clamp(m12,-1,1));if(Math.abs(m12)<0.9999999){this._x=Math.atan2(m32,m22);this._y=Math.atan2(m13,m11)}else{this._x=Math.atan2(-m23,m33);this._y=0}break;default:warn("Euler: .setFromRotationMatrix() encountered an unknown order: "+order);}this._order=order;if(update===true)this._onChangeCallback();return this}setFromQuaternion(q,order,update){_matrix$2.makeRotationFromQuaternion(q);return this.setFromRotationMatrix(_matrix$2,order,update)}setFromVector3(v,order=this._order){return this.set(v.x,v.y,v.z,order)}reorder(newOrder){_quaternion$3.setFromEuler(this);return this.setFromQuaternion(_quaternion$3,newOrder)}equals(euler){return euler._x===this._x&&euler._y===this._y&&euler._z===this._z&&euler._order===this._order}fromArray(array){this._x=array[0];this._y=array[1];this._z=array[2];if(array[3]!==undefined)this._order=array[3];this._onChangeCallback();return this}toArray(array=[],offset=0){array[offset]=this._x;array[offset+1]=this._y;array[offset+2]=this._z;array[offset+3]=this._order;return array}_onChange(callback){this._onChangeCallback=callback;return this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x;yield this._y;yield this._z;yield this._order}}Euler.DEFAULT_ORDER="XYZ";class Layers{constructor(){this.mask=1|0}set(layer){this.mask=(1<<layer|0)>>>0}enable(layer){this.mask|=1<<layer|0}enableAll(){this.mask=4294967295|0}toggle(layer){this.mask^=1<<layer|0}disable(layer){this.mask&=~(1<<layer|0)}disableAll(){this.mask=0}test(layers){return(this.mask&layers.mask)!==0}isEnabled(layer){return(this.mask&(1<<layer|0))!==0}}let _object3DId=0;const _v1$4=new Vector3;const _q1=new Quaternion;const _m1$3=new Matrix4;const _target=new Vector3;const _position$3=new Vector3;const _scale$2=new Vector3;const _quaternion$2=new Quaternion;const _xAxis=new Vector3(1,0,0);const _yAxis=new Vector3(0,1,0);const _zAxis=new Vector3(0,0,1);const _addedEvent={type:"added"};const _removedEvent={type:"removed"};const _childaddedEvent={type:"childadded",child:null};const _childremovedEvent={type:"childremoved",child:null};class Object3D extends EventDispatcher{constructor(){super();this.isObject3D=true;Object.defineProperty(this,"id",{value:_object3DId++});this.uuid=generateUUID();this.name="";this.type="Object3D";this.parent=null;this.children=[];this.up=Object3D.DEFAULT_UP.clone();const position=new Vector3;const rotation=new Euler;const quaternion=new Quaternion;const scale=new Vector3(1,1,1);function onRotationChange(){quaternion.setFromEuler(rotation,false)}function onQuaternionChange(){rotation.setFromQuaternion(quaternion,undefined,false)}rotation._onChange(onRotationChange);quaternion._onChange(onQuaternionChange);Object.defineProperties(this,{position:{configurable:true,enumerable:true,value:position},rotation:{configurable:true,enumerable:true,value:rotation},quaternion:{configurable:true,enumerable:true,value:quaternion},scale:{configurable:true,enumerable:true,value:scale},modelViewMatrix:{value:new Matrix4},normalMatrix:{value:new Matrix3}});this.matrix=new Matrix4;this.matrixWorld=new Matrix4;this.matrixAutoUpdate=Object3D.DEFAULT_MATRIX_AUTO_UPDATE;this.matrixWorldAutoUpdate=Object3D.DEFAULT_MATRIX_WORLD_AUTO_UPDATE;this.matrixWorldNeedsUpdate=false;this.layers=new Layers;this.visible=true;this.castShadow=false;this.receiveShadow=false;this.frustumCulled=true;this.renderOrder=0;this.animations=[];this.customDepthMaterial=undefined;this.customDistanceMaterial=undefined;this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(matrix){if(this.matrixAutoUpdate)this.updateMatrix();this.matrix.premultiply(matrix);this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(q){this.quaternion.premultiply(q);return this}setRotationFromAxisAngle(axis,angle){this.quaternion.setFromAxisAngle(axis,angle)}setRotationFromEuler(euler){this.quaternion.setFromEuler(euler,true)}setRotationFromMatrix(m){this.quaternion.setFromRotationMatrix(m)}setRotationFromQuaternion(q){this.quaternion.copy(q)}rotateOnAxis(axis,angle){_q1.setFromAxisAngle(axis,angle);this.quaternion.multiply(_q1);return this}rotateOnWorldAxis(axis,angle){_q1.setFromAxisAngle(axis,angle);this.quaternion.premultiply(_q1);return this}rotateX(angle){return this.rotateOnAxis(_xAxis,angle)}rotateY(angle){return this.rotateOnAxis(_yAxis,angle)}rotateZ(angle){return this.rotateOnAxis(_zAxis,angle)}translateOnAxis(axis,distance){_v1$4.copy(axis).applyQuaternion(this.quaternion);this.position.add(_v1$4.multiplyScalar(distance));return this}translateX(distance){return this.translateOnAxis(_xAxis,distance)}translateY(distance){return this.translateOnAxis(_yAxis,distance)}translateZ(distance){return this.translateOnAxis(_zAxis,distance)}localToWorld(vector){this.updateWorldMatrix(true,false);return vector.applyMatrix4(this.matrixWorld)}worldToLocal(vector){this.updateWorldMatrix(true,false);return vector.applyMatrix4(_m1$3.copy(this.matrixWorld).invert())}lookAt(x,y,z){if(x.isVector3){_target.copy(x)}else{_target.set(x,y,z)}const parent=this.parent;this.updateWorldMatrix(true,false);_position$3.setFromMatrixPosition(this.matrixWorld);if(this.isCamera||this.isLight){_m1$3.lookAt(_position$3,_target,this.up)}else{_m1$3.lookAt(_target,_position$3,this.up)}this.quaternion.setFromRotationMatrix(_m1$3);if(parent){_m1$3.extractRotation(parent.matrixWorld);_q1.setFromRotationMatrix(_m1$3);this.quaternion.premultiply(_q1.invert())}}add(object){if(arguments.length>1){for(let i=0;i<arguments.length;i++){this.add(arguments[i])}return this}if(object===this){error("Object3D.add: object can't be added as a child of itself.",object);return this}if(object&&object.isObject3D){object.removeFromParent();object.parent=this;this.children.push(object);object.dispatchEvent(_addedEvent);_childaddedEvent.child=object;this.dispatchEvent(_childaddedEvent);_childaddedEvent.child=null}else{error("Object3D.add: object not an instance of THREE.Object3D.",object)}return this}remove(object){if(arguments.length>1){for(let i=0;i<arguments.length;i++){this.remove(arguments[i])}return this}const index=this.children.indexOf(object);if(index!==-1){object.parent=null;this.children.splice(index,1);object.dispatchEvent(_removedEvent);_childremovedEvent.child=object;this.dispatchEvent(_childremovedEvent);_childremovedEvent.child=null}return this}removeFromParent(){const parent=this.parent;if(parent!==null){parent.remove(this)}return this}clear(){return this.remove(...this.children)}attach(object){this.updateWorldMatrix(true,false);_m1$3.copy(this.matrixWorld).invert();if(object.parent!==null){object.parent.updateWorldMatrix(true,false);_m1$3.multiply(object.parent.matrixWorld)}object.applyMatrix4(_m1$3);object.removeFromParent();object.parent=this;this.children.push(object);object.updateWorldMatrix(false,true);object.dispatchEvent(_addedEvent);_childaddedEvent.child=object;this.dispatchEvent(_childaddedEvent);_childaddedEvent.child=null;return this}getObjectById(id){return this.getObjectByProperty("id",id)}getObjectByName(name){return this.getObjectByProperty("name",name)}getObjectByProperty(name,value){if(this[name]===value)return this;for(let i=0,l=this.children.length;i<l;i++){const child=this.children[i];const object=child.getObjectByProperty(name,value);if(object!==undefined){return object}}return undefined}getObjectsByProperty(name,value,result=[]){if(this[name]===value)result.push(this);const children=this.children;for(let i=0,l=children.length;i<l;i++){children[i].getObjectsByProperty(name,value,result)}return result}getWorldPosition(target){this.updateWorldMatrix(true,false);return target.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(target){this.updateWorldMatrix(true,false);this.matrixWorld.decompose(_position$3,target,_scale$2);return target}getWorldScale(target){this.updateWorldMatrix(true,false);this.matrixWorld.decompose(_position$3,_quaternion$2,target);return target}getWorldDirection(target){this.updateWorldMatrix(true,false);const e=this.matrixWorld.elements;return target.set(e[8],e[9],e[10]).normalize()}raycast(){}traverse(callback){callback(this);const children=this.children;for(let i=0,l=children.length;i<l;i++){children[i].traverse(callback)}}traverseVisible(callback){if(this.visible===false)return;callback(this);const children=this.children;for(let i=0,l=children.length;i<l;i++){children[i].traverseVisible(callback)}}traverseAncestors(callback){const parent=this.parent;if(parent!==null){callback(parent);parent.traverseAncestors(callback)}}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale);this.matrixWorldNeedsUpdate=true}updateMatrixWorld(force){if(this.matrixAutoUpdate)this.updateMatrix();if(this.matrixWorldNeedsUpdate||force){if(this.matrixWorldAutoUpdate===true){if(this.parent===null){this.matrixWorld.copy(this.matrix)}else{this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)}}this.matrixWorldNeedsUpdate=false;force=true}const children=this.children;for(let i=0,l=children.length;i<l;i++){const child=children[i];child.updateMatrixWorld(force)}}updateWorldMatrix(updateParents,updateChildren){const parent=this.parent;if(updateParents===true&&parent!==null){parent.updateWorldMatrix(true,false)}if(this.matrixAutoUpdate)this.updateMatrix();if(this.matrixWorldAutoUpdate===true){if(this.parent===null){this.matrixWorld.copy(this.matrix)}else{this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)}}if(updateChildren===true){const children=this.children;for(let i=0,l=children.length;i<l;i++){const child=children[i];child.updateWorldMatrix(false,true)}}}toJSON(meta){const isRootObject=meta===undefined||typeof meta==="string";const output={};if(isRootObject){meta={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}};output.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"}}const object={};object.uuid=this.uuid;object.type=this.type;if(this.name!=="")object.name=this.name;if(this.castShadow===true)object.castShadow=true;if(this.receiveShadow===true)object.receiveShadow=true;if(this.visible===false)object.visible=false;if(this.frustumCulled===false)object.frustumCulled=false;if(this.renderOrder!==0)object.renderOrder=this.renderOrder;if(Object.keys(this.userData).length>0)object.userData=this.userData;object.layers=this.layers.mask;object.matrix=this.matrix.toArray();object.up=this.up.toArray();if(this.matrixAutoUpdate===false)object.matrixAutoUpdate=false;if(this.isInstancedMesh){object.type="InstancedMesh";object.count=this.count;object.instanceMatrix=this.instanceMatrix.toJSON();if(this.instanceColor!==null)object.instanceColor=this.instanceColor.toJSON()}if(this.isBatchedMesh){object.type="BatchedMesh";object.perObjectFrustumCulled=this.perObjectFrustumCulled;object.sortObjects=this.sortObjects;object.drawRanges=this._drawRanges;object.reservedRanges=this._reservedRanges;object.geometryInfo=this._geometryInfo.map(info=>({...info,boundingBox:info.boundingBox?info.boundingBox.toJSON():undefined,boundingSphere:info.boundingSphere?info.boundingSphere.toJSON():undefined}));object.instanceInfo=this._instanceInfo.map(info=>({...info}));object.availableInstanceIds=this._availableInstanceIds.slice();object.availableGeometryIds=this._availableGeometryIds.slice();object.nextIndexStart=this._nextIndexStart;object.nextVertexStart=this._nextVertexStart;object.geometryCount=this._geometryCount;object.maxInstanceCount=this._maxInstanceCount;object.maxVertexCount=this._maxVertexCount;object.maxIndexCount=this._maxIndexCount;object.geometryInitialized=this._geometryInitialized;object.matricesTexture=this._matricesTexture.toJSON(meta);object.indirectTexture=this._indirectTexture.toJSON(meta);if(this._colorsTexture!==null){object.colorsTexture=this._colorsTexture.toJSON(meta)}if(this.boundingSphere!==null){object.boundingSphere=this.boundingSphere.toJSON()}if(this.boundingBox!==null){object.boundingBox=this.boundingBox.toJSON()}}function serialize(library,element){if(library[element.uuid]===undefined){library[element.uuid]=element.toJSON(meta)}return element.uuid}if(this.isScene){if(this.background){if(this.background.isColor){object.background=this.background.toJSON()}else if(this.background.isTexture){object.background=this.background.toJSON(meta).uuid}}if(this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==true){object.environment=this.environment.toJSON(meta).uuid}}else if(this.isMesh||this.isLine||this.isPoints){object.geometry=serialize(meta.geometries,this.geometry);const parameters=this.geometry.parameters;if(parameters!==undefined&&parameters.shapes!==undefined){const shapes=parameters.shapes;if(Array.isArray(shapes)){for(let i=0,l=shapes.length;i<l;i++){const shape=shapes[i];serialize(meta.shapes,shape)}}else{serialize(meta.shapes,shapes)}}}if(this.isSkinnedMesh){object.bindMode=this.bindMode;object.bindMatrix=this.bindMatrix.toArray();if(this.skeleton!==undefined){serialize(meta.skeletons,this.skeleton);object.skeleton=this.skeleton.uuid}}if(this.material!==undefined){if(Array.isArray(this.material)){const uuids=[];for(let i=0,l=this.material.length;i<l;i++){uuids.push(serialize(meta.materials,this.material[i]))}object.material=uuids}else{object.material=serialize(meta.materials,this.material)}}if(this.children.length>0){object.children=[];for(let i=0;i<this.children.length;i++){object.children.push(this.children[i].toJSON(meta).object)}}if(this.animations.length>0){object.animations=[];for(let i=0;i<this.animations.length;i++){const animation=this.animations[i];object.animations.push(serialize(meta.animations,animation))}}if(isRootObject){const geometries=extractFromCache(meta.geometries);const materials=extractFromCache(meta.materials);const textures=extractFromCache(meta.textures);const images=extractFromCache(meta.images);const shapes=extractFromCache(meta.shapes);const skeletons=extractFromCache(meta.skeletons);const animations=extractFromCache(meta.animations);const nodes=extractFromCache(meta.nodes);if(geometries.length>0)output.geometries=geometries;if(materials.length>0)output.materials=materials;if(textures.length>0)output.textures=textures;if(images.length>0)output.images=images;if(shapes.length>0)output.shapes=shapes;if(skeletons.length>0)output.skeletons=skeletons;if(animations.length>0)output.animations=animations;if(nodes.length>0)output.nodes=nodes}output.object=object;return output;function extractFromCache(cache){const values=[];for(const key in cache){const data=cache[key];delete data.metadata;values.push(data)}return values}}clone(recursive){return new this.constructor().copy(this,recursive)}copy(source,recursive=true){this.name=source.name;this.up.copy(source.up);this.position.copy(source.position);this.rotation.order=source.rotation.order;this.quaternion.copy(source.quaternion);this.scale.copy(source.scale);this.matrix.copy(source.matrix);this.matrixWorld.copy(source.matrixWorld);this.matrixAutoUpdate=source.matrixAutoUpdate;this.matrixWorldAutoUpdate=source.matrixWorldAutoUpdate;this.matrixWorldNeedsUpdate=source.matrixWorldNeedsUpdate;this.layers.mask=source.layers.mask;this.visible=source.visible;this.castShadow=source.castShadow;this.receiveShadow=source.receiveShadow;this.frustumCulled=source.frustumCulled;this.renderOrder=source.renderOrder;this.animations=source.animations.slice();this.userData=JSON.parse(JSON.stringify(source.userData));if(recursive===true){for(let i=0;i<source.children.length;i++){const child=source.children[i];this.add(child.clone())}}return this}}Object3D.DEFAULT_UP=new Vector3(0,1,0);Object3D.DEFAULT_MATRIX_AUTO_UPDATE=true;Object3D.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=true;const _v0$2=new Vector3;const _v1$3=new Vector3;const _v2$2=new Vector3;const _v3$2=new Vector3;const _vab=new Vector3;const _vac=new Vector3;const _vbc=new Vector3;const _vap=new Vector3;const _vbp=new Vector3;const _vcp=new Vector3;const _v40=new Vector4;const _v41=new Vector4;const _v42=new Vector4;class Triangle{constructor(a=new Vector3,b=new Vector3,c=new Vector3){this.a=a;this.b=b;this.c=c}static getNormal(a,b,c,target){target.subVectors(c,b);_v0$2.subVectors(a,b);target.cross(_v0$2);const targetLengthSq=target.lengthSq();if(targetLengthSq>0){return target.multiplyScalar(1/Math.sqrt(targetLengthSq))}return target.set(0,0,0)}static getBarycoord(point,a,b,c,target){_v0$2.subVectors(c,a);_v1$3.subVectors(b,a);_v2$2.subVectors(point,a);const dot00=_v0$2.dot(_v0$2);const dot01=_v0$2.dot(_v1$3);const dot02=_v0$2.dot(_v2$2);const dot11=_v1$3.dot(_v1$3);const dot12=_v1$3.dot(_v2$2);const denom=dot00*dot11-dot01*dot01;if(denom===0){target.set(0,0,0);return null}const invDenom=1/denom;const u=(dot11*dot02-dot01*dot12)*invDenom;const v=(dot00*dot12-dot01*dot02)*invDenom;return target.set(1-u-v,v,u)}static containsPoint(point,a,b,c){if(this.getBarycoord(point,a,b,c,_v3$2)===null){return false}return _v3$2.x>=0&&_v3$2.y>=0&&_v3$2.x+_v3$2.y<=1}static getInterpolation(point,p1,p2,p3,v1,v2,v3,target){if(this.getBarycoord(point,p1,p2,p3,_v3$2)===null){target.x=0;target.y=0;if("z"in target)target.z=0;if("w"in target)target.w=0;return null}target.setScalar(0);target.addScaledVector(v1,_v3$2.x);target.addScaledVector(v2,_v3$2.y);target.addScaledVector(v3,_v3$2.z);return target}static getInterpolatedAttribute(attr,i1,i2,i3,barycoord,target){_v40.setScalar(0);_v41.setScalar(0);_v42.setScalar(0);_v40.fromBufferAttribute(attr,i1);_v41.fromBufferAttribute(attr,i2);_v42.fromBufferAttribute(attr,i3);target.setScalar(0);target.addScaledVector(_v40,barycoord.x);target.addScaledVector(_v41,barycoord.y);target.addScaledVector(_v42,barycoord.z);return target}static isFrontFacing(a,b,c,direction){_v0$2.subVectors(c,b);_v1$3.subVectors(a,b);return _v0$2.cross(_v1$3).dot(direction)<0?true:false}set(a,b,c){this.a.copy(a);this.b.copy(b);this.c.copy(c);return this}setFromPointsAndIndices(points,i0,i1,i2){this.a.copy(points[i0]);this.b.copy(points[i1]);this.c.copy(points[i2]);return this}setFromAttributeAndIndices(attribute,i0,i1,i2){this.a.fromBufferAttribute(attribute,i0);this.b.fromBufferAttribute(attribute,i1);this.c.fromBufferAttribute(attribute,i2);return this}clone(){return new this.constructor().copy(this)}copy(triangle){this.a.copy(triangle.a);this.b.copy(triangle.b);this.c.copy(triangle.c);return this}getArea(){_v0$2.subVectors(this.c,this.b);_v1$3.subVectors(this.a,this.b);return _v0$2.cross(_v1$3).length()*0.5}getMidpoint(target){return target.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(target){return Triangle.getNormal(this.a,this.b,this.c,target)}getPlane(target){return target.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(point,target){return Triangle.getBarycoord(point,this.a,this.b,this.c,target)}getInterpolation(point,v1,v2,v3,target){return Triangle.getInterpolation(point,this.a,this.b,this.c,v1,v2,v3,target)}containsPoint(point){return Triangle.containsPoint(point,this.a,this.b,this.c)}isFrontFacing(direction){return Triangle.isFrontFacing(this.a,this.b,this.c,direction)}intersectsBox(box){return box.intersectsTriangle(this)}closestPointToPoint(p,target){const a=this.a,b=this.b,c=this.c;let v,w;_vab.subVectors(b,a);_vac.subVectors(c,a);_vap.subVectors(p,a);const d1=_vab.dot(_vap);const d2=_vac.dot(_vap);if(d1<=0&&d2<=0){return target.copy(a)}_vbp.subVectors(p,b);const d3=_vab.dot(_vbp);const d4=_vac.dot(_vbp);if(d3>=0&&d4<=d3){return target.copy(b)}const vc=d1*d4-d3*d2;if(vc<=0&&d1>=0&&d3<=0){v=d1/(d1-d3);return target.copy(a).addScaledVector(_vab,v)}_vcp.subVectors(p,c);const d5=_vab.dot(_vcp);const d6=_vac.dot(_vcp);if(d6>=0&&d5<=d6){return target.copy(c)}const vb=d5*d2-d1*d6;if(vb<=0&&d2>=0&&d6<=0){w=d2/(d2-d6);return target.copy(a).addScaledVector(_vac,w)}const va=d3*d6-d5*d4;if(va<=0&&d4-d3>=0&&d5-d6>=0){_vbc.subVectors(c,b);w=(d4-d3)/(d4-d3+(d5-d6));return target.copy(b).addScaledVector(_vbc,w)}const denom=1/(va+vb+vc);v=vb*denom;w=vc*denom;return target.copy(a).addScaledVector(_vab,v).addScaledVector(_vac,w)}equals(triangle){return triangle.a.equals(this.a)&&triangle.b.equals(this.b)&&triangle.c.equals(this.c)}}const _colorKeywords={"aliceblue":15792383,"antiquewhite":16444375,"aqua":65535,"aquamarine":8388564,"azure":15794175,"beige":16119260,"bisque":16770244,"black":0,"blanchedalmond":16772045,"blue":255,"blueviolet":9055202,"brown":10824234,"burlywood":14596231,"cadetblue":6266528,"chartreuse":8388352,"chocolate":13789470,"coral":16744272,"cornflowerblue":6591981,"cornsilk":16775388,"crimson":14423100,"cyan":65535,"darkblue":139,"darkcyan":35723,"darkgoldenrod":12092939,"darkgray":11119017,"darkgreen":25600,"darkgrey":11119017,"darkkhaki":12433259,"darkmagenta":9109643,"darkolivegreen":5597999,"darkorange":16747520,"darkorchid":10040012,"darkred":9109504,"darksalmon":15308410,"darkseagreen":9419919,"darkslateblue":4734347,"darkslategray":3100495,"darkslategrey":3100495,"darkturquoise":52945,"darkviolet":9699539,"deeppink":16716947,"deepskyblue":49151,"dimgray":6908265,"dimgrey":6908265,"dodgerblue":2003199,"firebrick":11674146,"floralwhite":16775920,"forestgreen":2263842,"fuchsia":16711935,"gainsboro":14474460,"ghostwhite":16316671,"gold":16766720,"goldenrod":14329120,"gray":8421504,"green":32768,"greenyellow":11403055,"grey":8421504,"honeydew":15794160,"hotpink":16738740,"indianred":13458524,"indigo":4915330,"ivory":16777200,"khaki":15787660,"lavender":15132410,"lavenderblush":16773365,"lawngreen":8190976,"lemonchiffon":16775885,"lightblue":11393254,"lightcoral":15761536,"lightcyan":14745599,"lightgoldenrodyellow":16448210,"lightgray":13882323,"lightgreen":9498256,"lightgrey":13882323,"lightpink":16758465,"lightsalmon":16752762,"lightseagreen":2142890,"lightskyblue":8900346,"lightslategray":7833753,"lightslategrey":7833753,"lightsteelblue":11584734,"lightyellow":16777184,"lime":65280,"limegreen":3329330,"linen":16445670,"magenta":16711935,"maroon":8388608,"mediumaquamarine":6737322,"mediumblue":205,"mediumorchid":12211667,"mediumpurple":9662683,"mediumseagreen":3978097,"mediumslateblue":8087790,"mediumspringgreen":64154,"mediumturquoise":4772300,"mediumvioletred":13047173,"midnightblue":1644912,"mintcream":16121850,"mistyrose":16770273,"moccasin":16770229,"navajowhite":16768685,"navy":128,"oldlace":16643558,"olive":8421376,"olivedrab":7048739,"orange":16753920,"orangered":16729344,"orchid":14315734,"palegoldenrod":15657130,"palegreen":10025880,"paleturquoise":11529966,"palevioletred":14381203,"papayawhip":16773077,"peachpuff":16767673,"peru":13468991,"pink":16761035,"plum":14524637,"powderblue":11591910,"purple":8388736,"rebeccapurple":6697881,"red":16711680,"rosybrown":12357519,"royalblue":4286945,"saddlebrown":9127187,"salmon":16416882,"sandybrown":16032864,"seagreen":3050327,"seashell":16774638,"sienna":10506797,"silver":12632256,"skyblue":8900331,"slateblue":6970061,"slategray":7372944,"slategrey":7372944,"snow":16775930,"springgreen":65407,"steelblue":4620980,"tan":13808780,"teal":32896,"thistle":14204888,"tomato":16737095,"turquoise":4251856,"violet":15631086,"wheat":16113331,"white":16777215,"whitesmoke":16119285,"yellow":16776960,"yellowgreen":10145074};const _hslA={h:0,s:0,l:0};const _hslB={h:0,s:0,l:0};function hue2rgb(p,q,t){if(t<0)t+=1;if(t>1)t-=1;if(t<1/6)return p+(q-p)*6*t;if(t<1/2)return q;if(t<2/3)return p+(q-p)*6*(2/3-t);return p}class Color{constructor(r,g,b){this.isColor=true;this.r=1;this.g=1;this.b=1;return this.set(r,g,b)}set(r,g,b){if(g===undefined&&b===undefined){const value=r;if(value&&value.isColor){this.copy(value)}else if(typeof value==="number"){this.setHex(value)}else if(typeof value==="string"){this.setStyle(value)}}else{this.setRGB(r,g,b)}return this}setScalar(scalar){this.r=scalar;this.g=scalar;this.b=scalar;return this}setHex(hex,colorSpace=SRGBColorSpace){hex=Math.floor(hex);this.r=(hex>>16&255)/255;this.g=(hex>>8&255)/255;this.b=(hex&255)/255;ColorManagement.colorSpaceToWorking(this,colorSpace);return this}setRGB(r,g,b,colorSpace=ColorManagement.workingColorSpace){this.r=r;this.g=g;this.b=b;ColorManagement.colorSpaceToWorking(this,colorSpace);return this}setHSL(h,s,l,colorSpace=ColorManagement.workingColorSpace){h=euclideanModulo(h,1);s=clamp(s,0,1);l=clamp(l,0,1);if(s===0){this.r=this.g=this.b=l}else{const p=l<=0.5?l*(1+s):l+s-l*s;const q=2*l-p;this.r=hue2rgb(q,p,h+1/3);this.g=hue2rgb(q,p,h);this.b=hue2rgb(q,p,h-1/3)}ColorManagement.colorSpaceToWorking(this,colorSpace);return this}setStyle(style,colorSpace=SRGBColorSpace){function handleAlpha(string){if(string===undefined)return;if(parseFloat(string)<1){warn("Color: Alpha component of "+style+" will be ignored.")}}let m;if(m=/^(\w+)\(([^\)]*)\)/.exec(style)){let color;const name=m[1];const components=m[2];switch(name){case"rgb":case"rgba":if(color=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(components)){handleAlpha(color[4]);return this.setRGB(Math.min(255,parseInt(color[1],10))/255,Math.min(255,parseInt(color[2],10))/255,Math.min(255,parseInt(color[3],10))/255,colorSpace)}if(color=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(components)){handleAlpha(color[4]);return this.setRGB(Math.min(100,parseInt(color[1],10))/100,Math.min(100,parseInt(color[2],10))/100,Math.min(100,parseInt(color[3],10))/100,colorSpace)}break;case"hsl":case"hsla":if(color=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(components)){handleAlpha(color[4]);return this.setHSL(parseFloat(color[1])/360,parseFloat(color[2])/100,parseFloat(color[3])/100,colorSpace)}break;default:warn("Color: Unknown color model "+style);}}else if(m=/^\#([A-Fa-f\d]+)$/.exec(style)){const hex=m[1];const size=hex.length;if(size===3){return this.setRGB(parseInt(hex.charAt(0),16)/15,parseInt(hex.charAt(1),16)/15,parseInt(hex.charAt(2),16)/15,colorSpace)}else if(size===6){return this.setHex(parseInt(hex,16),colorSpace)}else{warn("Color: Invalid hex color "+style)}}else if(style&&style.length>0){return this.setColorName(style,colorSpace)}return this}setColorName(style,colorSpace=SRGBColorSpace){const hex=_colorKeywords[style.toLowerCase()];if(hex!==undefined){this.setHex(hex,colorSpace)}else{warn("Color: Unknown color "+style)}return this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(color){this.r=color.r;this.g=color.g;this.b=color.b;return this}copySRGBToLinear(color){this.r=SRGBToLinear(color.r);this.g=SRGBToLinear(color.g);this.b=SRGBToLinear(color.b);return this}copyLinearToSRGB(color){this.r=LinearToSRGB(color.r);this.g=LinearToSRGB(color.g);this.b=LinearToSRGB(color.b);return this}convertSRGBToLinear(){this.copySRGBToLinear(this);return this}convertLinearToSRGB(){this.copyLinearToSRGB(this);return this}getHex(colorSpace=SRGBColorSpace){ColorManagement.workingToColorSpace(_color.copy(this),colorSpace);return Math.round(clamp(_color.r*255,0,255))*65536+Math.round(clamp(_color.g*255,0,255))*256+Math.round(clamp(_color.b*255,0,255))}getHexString(colorSpace=SRGBColorSpace){return("000000"+this.getHex(colorSpace).toString(16)).slice(-6)}getHSL(target,colorSpace=ColorManagement.workingColorSpace){ColorManagement.workingToColorSpace(_color.copy(this),colorSpace);const r=_color.r,g=_color.g,b=_color.b;const max=Math.max(r,g,b);const min=Math.min(r,g,b);let hue,saturation;const lightness=(min+max)/2;if(min===max){hue=0;saturation=0}else{const delta=max-min;saturation=lightness<=0.5?delta/(max+min):delta/(2-max-min);switch(max){case r:hue=(g-b)/delta+(g<b?6:0);break;case g:hue=(b-r)/delta+2;break;case b:hue=(r-g)/delta+4;break;}hue/=6}target.h=hue;target.s=saturation;target.l=lightness;return target}getRGB(target,colorSpace=ColorManagement.workingColorSpace){ColorManagement.workingToColorSpace(_color.copy(this),colorSpace);target.r=_color.r;target.g=_color.g;target.b=_color.b;return target}getStyle(colorSpace=SRGBColorSpace){ColorManagement.workingToColorSpace(_color.copy(this),colorSpace);const r=_color.r,g=_color.g,b=_color.b;if(colorSpace!==SRGBColorSpace){return`color(${colorSpace} ${r.toFixed(3)} ${g.toFixed(3)} ${b.toFixed(3)})`}return`rgb(${Math.round(r*255)},${Math.round(g*255)},${Math.round(b*255)})`}offsetHSL(h,s,l){this.getHSL(_hslA);return this.setHSL(_hslA.h+h,_hslA.s+s,_hslA.l+l)}add(color){this.r+=color.r;this.g+=color.g;this.b+=color.b;return this}addColors(color1,color2){this.r=color1.r+color2.r;this.g=color1.g+color2.g;this.b=color1.b+color2.b;return this}addScalar(s){this.r+=s;this.g+=s;this.b+=s;return this}sub(color){this.r=Math.max(0,this.r-color.r);this.g=Math.max(0,this.g-color.g);this.b=Math.max(0,this.b-color.b);return this}multiply(color){this.r*=color.r;this.g*=color.g;this.b*=color.b;return this}multiplyScalar(s){this.r*=s;this.g*=s;this.b*=s;return this}lerp(color,alpha){this.r+=(color.r-this.r)*alpha;this.g+=(color.g-this.g)*alpha;this.b+=(color.b-this.b)*alpha;return this}lerpColors(color1,color2,alpha){this.r=color1.r+(color2.r-color1.r)*alpha;this.g=color1.g+(color2.g-color1.g)*alpha;this.b=color1.b+(color2.b-color1.b)*alpha;return this}lerpHSL(color,alpha){this.getHSL(_hslA);color.getHSL(_hslB);const h=lerp(_hslA.h,_hslB.h,alpha);const s=lerp(_hslA.s,_hslB.s,alpha);const l=lerp(_hslA.l,_hslB.l,alpha);this.setHSL(h,s,l);return this}setFromVector3(v){this.r=v.x;this.g=v.y;this.b=v.z;return this}applyMatrix3(m){const r=this.r,g=this.g,b=this.b;const e=m.elements;this.r=e[0]*r+e[3]*g+e[6]*b;this.g=e[1]*r+e[4]*g+e[7]*b;this.b=e[2]*r+e[5]*g+e[8]*b;return this}equals(c){return c.r===this.r&&c.g===this.g&&c.b===this.b}fromArray(array,offset=0){this.r=array[offset];this.g=array[offset+1];this.b=array[offset+2];return this}toArray(array=[],offset=0){array[offset]=this.r;array[offset+1]=this.g;array[offset+2]=this.b;return array}fromBufferAttribute(attribute,index){this.r=attribute.getX(index);this.g=attribute.getY(index);this.b=attribute.getZ(index);return this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r;yield this.g;yield this.b}}const _color=new Color;Color.NAMES=_colorKeywords;let _materialId=0;class Material extends EventDispatcher{constructor(){super();this.isMaterial=true;Object.defineProperty(this,"id",{value:_materialId++});this.uuid=generateUUID();this.name="";this.type="Material";this.blending=NormalBlending;this.side=FrontSide;this.vertexColors=false;this.opacity=1;this.transparent=false;this.alphaHash=false;this.blendSrc=SrcAlphaFactor;this.blendDst=OneMinusSrcAlphaFactor;this.blendEquation=AddEquation;this.blendSrcAlpha=null;this.blendDstAlpha=null;this.blendEquationAlpha=null;this.blendColor=new Color(0,0,0);this.blendAlpha=0;this.depthFunc=LessEqualDepth;this.depthTest=true;this.depthWrite=true;this.stencilWriteMask=255;this.stencilFunc=AlwaysStencilFunc;this.stencilRef=0;this.stencilFuncMask=255;this.stencilFail=KeepStencilOp;this.stencilZFail=KeepStencilOp;this.stencilZPass=KeepStencilOp;this.stencilWrite=false;this.clippingPlanes=null;this.clipIntersection=false;this.clipShadows=false;this.shadowSide=null;this.colorWrite=true;this.precision=null;this.polygonOffset=false;this.polygonOffsetFactor=0;this.polygonOffsetUnits=0;this.dithering=false;this.alphaToCoverage=false;this.premultipliedAlpha=false;this.forceSinglePass=false;this.allowOverride=true;this.visible=true;this.toneMapped=true;this.userData={};this.version=0;this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(value){if(this._alphaTest>0!==value>0){this.version++}this._alphaTest=value}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(values){if(values===undefined)return;for(const key in values){const newValue=values[key];if(newValue===undefined){warn(`Material: parameter '${key}' has value of undefined.`);continue}const currentValue=this[key];if(currentValue===undefined){warn(`Material: '${key}' is not a property of THREE.${this.type}.`);continue}if(currentValue&&currentValue.isColor){currentValue.set(newValue)}else if(currentValue&&currentValue.isVector3&&newValue&&newValue.isVector3){currentValue.copy(newValue)}else{this[key]=newValue}}}toJSON(meta){const isRootObject=meta===undefined||typeof meta==="string";if(isRootObject){meta={textures:{},images:{}}}const data={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};data.uuid=this.uuid;data.type=this.type;if(this.name!=="")data.name=this.name;if(this.color&&this.color.isColor)data.color=this.color.getHex();if(this.roughness!==undefined)data.roughness=this.roughness;if(this.metalness!==undefined)data.metalness=this.metalness;if(this.sheen!==undefined)data.sheen=this.sheen;if(this.sheenColor&&this.sheenColor.isColor)data.sheenColor=this.sheenColor.getHex();if(this.sheenRoughness!==undefined)data.sheenRoughness=this.sheenRoughness;if(this.emissive&&this.emissive.isColor)data.emissive=this.emissive.getHex();if(this.emissiveIntensity!==undefined&&this.emissiveIntensity!==1)data.emissiveIntensity=this.emissiveIntensity;if(this.specular&&this.specular.isColor)data.specular=this.specular.getHex();if(this.specularIntensity!==undefined)data.specularIntensity=this.specularIntensity;if(this.specularColor&&this.specularColor.isColor)data.specularColor=this.specularColor.getHex();if(this.shininess!==undefined)data.shininess=this.shininess;if(this.clearcoat!==undefined)data.clearcoat=this.clearcoat;if(this.clearcoatRoughness!==undefined)data.clearcoatRoughness=this.clearcoatRoughness;if(this.clearcoatMap&&this.clearcoatMap.isTexture){data.clearcoatMap=this.clearcoatMap.toJSON(meta).uuid}if(this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture){data.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(meta).uuid}if(this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture){data.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(meta).uuid;data.clearcoatNormalScale=this.clearcoatNormalScale.toArray()}if(this.sheenColorMap&&this.sheenColorMap.isTexture){data.sheenColorMap=this.sheenColorMap.toJSON(meta).uuid}if(this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture){data.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(meta).uuid}if(this.dispersion!==undefined)data.dispersion=this.dispersion;if(this.iridescence!==undefined)data.iridescence=this.iridescence;if(this.iridescenceIOR!==undefined)data.iridescenceIOR=this.iridescenceIOR;if(this.iridescenceThicknessRange!==undefined)data.iridescenceThicknessRange=this.iridescenceThicknessRange;if(this.iridescenceMap&&this.iridescenceMap.isTexture){data.iridescenceMap=this.iridescenceMap.toJSON(meta).uuid}if(this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture){data.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(meta).uuid}if(this.anisotropy!==undefined)data.anisotropy=this.anisotropy;if(this.anisotropyRotation!==undefined)data.anisotropyRotation=this.anisotropyRotation;if(this.anisotropyMap&&this.anisotropyMap.isTexture){data.anisotropyMap=this.anisotropyMap.toJSON(meta).uuid}if(this.map&&this.map.isTexture)data.map=this.map.toJSON(meta).uuid;if(this.matcap&&this.matcap.isTexture)data.matcap=this.matcap.toJSON(meta).uuid;if(this.alphaMap&&this.alphaMap.isTexture)data.alphaMap=this.alphaMap.toJSON(meta).uuid;if(this.lightMap&&this.lightMap.isTexture){data.lightMap=this.lightMap.toJSON(meta).uuid;data.lightMapIntensity=this.lightMapIntensity}if(this.aoMap&&this.aoMap.isTexture){data.aoMap=this.aoMap.toJSON(meta).uuid;data.aoMapIntensity=this.aoMapIntensity}if(this.bumpMap&&this.bumpMap.isTexture){data.bumpMap=this.bumpMap.toJSON(meta).uuid;data.bumpScale=this.bumpScale}if(this.normalMap&&this.normalMap.isTexture){data.normalMap=this.normalMap.toJSON(meta).uuid;data.normalMapType=this.normalMapType;data.normalScale=this.normalScale.toArray()}if(this.displacementMap&&this.displacementMap.isTexture){data.displacementMap=this.displacementMap.toJSON(meta).uuid;data.displacementScale=this.displacementScale;data.displacementBias=this.displacementBias}if(this.roughnessMap&&this.roughnessMap.isTexture)data.roughnessMap=this.roughnessMap.toJSON(meta).uuid;if(this.metalnessMap&&this.metalnessMap.isTexture)data.metalnessMap=this.metalnessMap.toJSON(meta).uuid;if(this.emissiveMap&&this.emissiveMap.isTexture)data.emissiveMap=this.emissiveMap.toJSON(meta).uuid;if(this.specularMap&&this.specularMap.isTexture)data.specularMap=this.specularMap.toJSON(meta).uuid;if(this.specularIntensityMap&&this.specularIntensityMap.isTexture)data.specularIntensityMap=this.specularIntensityMap.toJSON(meta).uuid;if(this.specularColorMap&&this.specularColorMap.isTexture)data.specularColorMap=this.specularColorMap.toJSON(meta).uuid;if(this.envMap&&this.envMap.isTexture){data.envMap=this.envMap.toJSON(meta).uuid;if(this.combine!==undefined)data.combine=this.combine}if(this.envMapRotation!==undefined)data.envMapRotation=this.envMapRotation.toArray();if(this.envMapIntensity!==undefined)data.envMapIntensity=this.envMapIntensity;if(this.reflectivity!==undefined)data.reflectivity=this.reflectivity;if(this.refractionRatio!==undefined)data.refractionRatio=this.refractionRatio;if(this.gradientMap&&this.gradientMap.isTexture){data.gradientMap=this.gradientMap.toJSON(meta).uuid}if(this.transmission!==undefined)data.transmission=this.transmission;if(this.transmissionMap&&this.transmissionMap.isTexture)data.transmissionMap=this.transmissionMap.toJSON(meta).uuid;if(this.thickness!==undefined)data.thickness=this.thickness;if(this.thicknessMap&&this.thicknessMap.isTexture)data.thicknessMap=this.thicknessMap.toJSON(meta).uuid;if(this.attenuationDistance!==undefined&&this.attenuationDistance!==Infinity)data.attenuationDistance=this.attenuationDistance;if(this.attenuationColor!==undefined)data.attenuationColor=this.attenuationColor.getHex();if(this.size!==undefined)data.size=this.size;if(this.shadowSide!==null)data.shadowSide=this.shadowSide;if(this.sizeAttenuation!==undefined)data.sizeAttenuation=this.sizeAttenuation;if(this.blending!==NormalBlending)data.blending=this.blending;if(this.side!==FrontSide)data.side=this.side;if(this.vertexColors===true)data.vertexColors=true;if(this.opacity<1)data.opacity=this.opacity;if(this.transparent===true)data.transparent=true;if(this.blendSrc!==SrcAlphaFactor)data.blendSrc=this.blendSrc;if(this.blendDst!==OneMinusSrcAlphaFactor)data.blendDst=this.blendDst;if(this.blendEquation!==AddEquation)data.blendEquation=this.blendEquation;if(this.blendSrcAlpha!==null)data.blendSrcAlpha=this.blendSrcAlpha;if(this.blendDstAlpha!==null)data.blendDstAlpha=this.blendDstAlpha;if(this.blendEquationAlpha!==null)data.blendEquationAlpha=this.blendEquationAlpha;if(this.blendColor&&this.blendColor.isColor)data.blendColor=this.blendColor.getHex();if(this.blendAlpha!==0)data.blendAlpha=this.blendAlpha;if(this.depthFunc!==LessEqualDepth)data.depthFunc=this.depthFunc;if(this.depthTest===false)data.depthTest=this.depthTest;if(this.depthWrite===false)data.depthWrite=this.depthWrite;if(this.colorWrite===false)data.colorWrite=this.colorWrite;if(this.stencilWriteMask!==255)data.stencilWriteMask=this.stencilWriteMask;if(this.stencilFunc!==AlwaysStencilFunc)data.stencilFunc=this.stencilFunc;if(this.stencilRef!==0)data.stencilRef=this.stencilRef;if(this.stencilFuncMask!==255)data.stencilFuncMask=this.stencilFuncMask;if(this.stencilFail!==KeepStencilOp)data.stencilFail=this.stencilFail;if(this.stencilZFail!==KeepStencilOp)data.stencilZFail=this.stencilZFail;if(this.stencilZPass!==KeepStencilOp)data.stencilZPass=this.stencilZPass;if(this.stencilWrite===true)data.stencilWrite=this.stencilWrite;if(this.rotation!==undefined&&this.rotation!==0)data.rotation=this.rotation;if(this.polygonOffset===true)data.polygonOffset=true;if(this.polygonOffsetFactor!==0)data.polygonOffsetFactor=this.polygonOffsetFactor;if(this.polygonOffsetUnits!==0)data.polygonOffsetUnits=this.polygonOffsetUnits;if(this.linewidth!==undefined&&this.linewidth!==1)data.linewidth=this.linewidth;if(this.dashSize!==undefined)data.dashSize=this.dashSize;if(this.gapSize!==undefined)data.gapSize=this.gapSize;if(this.scale!==undefined)data.scale=this.scale;if(this.dithering===true)data.dithering=true;if(this.alphaTest>0)data.alphaTest=this.alphaTest;if(this.alphaHash===true)data.alphaHash=true;if(this.alphaToCoverage===true)data.alphaToCoverage=true;if(this.premultipliedAlpha===true)data.premultipliedAlpha=true;if(this.forceSinglePass===true)data.forceSinglePass=true;if(this.allowOverride===false)data.allowOverride=false;if(this.wireframe===true)data.wireframe=true;if(this.wireframeLinewidth>1)data.wireframeLinewidth=this.wireframeLinewidth;if(this.wireframeLinecap!=="round")data.wireframeLinecap=this.wireframeLinecap;if(this.wireframeLinejoin!=="round")data.wireframeLinejoin=this.wireframeLinejoin;if(this.flatShading===true)data.flatShading=true;if(this.visible===false)data.visible=false;if(this.toneMapped===false)data.toneMapped=false;if(this.fog===false)data.fog=false;if(Object.keys(this.userData).length>0)data.userData=this.userData;function extractFromCache(cache){const values=[];for(const key in cache){const data=cache[key];delete data.metadata;values.push(data)}return values}if(isRootObject){const textures=extractFromCache(meta.textures);const images=extractFromCache(meta.images);if(textures.length>0)data.textures=textures;if(images.length>0)data.images=images}return data}clone(){return new this.constructor().copy(this)}copy(source){this.name=source.name;this.blending=source.blending;this.side=source.side;this.vertexColors=source.vertexColors;this.opacity=source.opacity;this.transparent=source.transparent;this.blendSrc=source.blendSrc;this.blendDst=source.blendDst;this.blendEquation=source.blendEquation;this.blendSrcAlpha=source.blendSrcAlpha;this.blendDstAlpha=source.blendDstAlpha;this.blendEquationAlpha=source.blendEquationAlpha;this.blendColor.copy(source.blendColor);this.blendAlpha=source.blendAlpha;this.depthFunc=source.depthFunc;this.depthTest=source.depthTest;this.depthWrite=source.depthWrite;this.stencilWriteMask=source.stencilWriteMask;this.stencilFunc=source.stencilFunc;this.stencilRef=source.stencilRef;this.stencilFuncMask=source.stencilFuncMask;this.stencilFail=source.stencilFail;this.stencilZFail=source.stencilZFail;this.stencilZPass=source.stencilZPass;this.stencilWrite=source.stencilWrite;const srcPlanes=source.clippingPlanes;let dstPlanes=null;if(srcPlanes!==null){const n=srcPlanes.length;dstPlanes=new Array(n);for(let i=0;i!==n;++i){dstPlanes[i]=srcPlanes[i].clone()}}this.clippingPlanes=dstPlanes;this.clipIntersection=source.clipIntersection;this.clipShadows=source.clipShadows;this.shadowSide=source.shadowSide;this.colorWrite=source.colorWrite;this.precision=source.precision;this.polygonOffset=source.polygonOffset;this.polygonOffsetFactor=source.polygonOffsetFactor;this.polygonOffsetUnits=source.polygonOffsetUnits;this.dithering=source.dithering;this.alphaTest=source.alphaTest;this.alphaHash=source.alphaHash;this.alphaToCoverage=source.alphaToCoverage;this.premultipliedAlpha=source.premultipliedAlpha;this.forceSinglePass=source.forceSinglePass;this.allowOverride=source.allowOverride;this.visible=source.visible;this.toneMapped=source.toneMapped;this.userData=JSON.parse(JSON.stringify(source.userData));return this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(value){if(value===true)this.version++}}class MeshBasicMaterial extends Material{constructor(parameters){super();this.isMeshBasicMaterial=true;this.type="MeshBasicMaterial";this.color=new Color(16777215);this.map=null;this.lightMap=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.specularMap=null;this.alphaMap=null;this.envMap=null;this.envMapRotation=new Euler;this.combine=MultiplyOperation;this.reflectivity=1;this.refractionRatio=0.98;this.wireframe=false;this.wireframeLinewidth=1;this.wireframeLinecap="round";this.wireframeLinejoin="round";this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.color.copy(source.color);this.map=source.map;this.lightMap=source.lightMap;this.lightMapIntensity=source.lightMapIntensity;this.aoMap=source.aoMap;this.aoMapIntensity=source.aoMapIntensity;this.specularMap=source.specularMap;this.alphaMap=source.alphaMap;this.envMap=source.envMap;this.envMapRotation.copy(source.envMapRotation);this.combine=source.combine;this.reflectivity=source.reflectivity;this.refractionRatio=source.refractionRatio;this.wireframe=source.wireframe;this.wireframeLinewidth=source.wireframeLinewidth;this.wireframeLinecap=source.wireframeLinecap;this.wireframeLinejoin=source.wireframeLinejoin;this.fog=source.fog;return this}}const _tables=_generateTables();function _generateTables(){const buffer=new ArrayBuffer(4);const floatView=new Float32Array(buffer);const uint32View=new Uint32Array(buffer);const baseTable=new Uint32Array(512);const shiftTable=new Uint32Array(512);for(let i=0;i<256;++i){const e=i-127;if(e<-27){baseTable[i]=0;baseTable[i|256]=32768;shiftTable[i]=24;shiftTable[i|256]=24}else if(e<-14){baseTable[i]=1024>>-e-14;baseTable[i|256]=1024>>-e-14|32768;shiftTable[i]=-e-1;shiftTable[i|256]=-e-1}else if(e<=15){baseTable[i]=e+15<<10;baseTable[i|256]=e+15<<10|32768;shiftTable[i]=13;shiftTable[i|256]=13}else if(e<128){baseTable[i]=31744;baseTable[i|256]=64512;shiftTable[i]=24;shiftTable[i|256]=24}else{baseTable[i]=31744;baseTable[i|256]=64512;shiftTable[i]=13;shiftTable[i|256]=13}}const mantissaTable=new Uint32Array(2048);const exponentTable=new Uint32Array(64);const offsetTable=new Uint32Array(64);for(let i=1;i<1024;++i){let m=i<<13;let e=0;while((m&8388608)===0){m<<=1;e-=8388608}m&=-8388609;e+=947912704;mantissaTable[i]=m|e}for(let i=1024;i<2048;++i){mantissaTable[i]=939524096+(i-1024<<13)}for(let i=1;i<31;++i){exponentTable[i]=i<<23}exponentTable[31]=1199570944;exponentTable[32]=2147483648;for(let i=33;i<63;++i){exponentTable[i]=2147483648+(i-32<<23)}exponentTable[63]=3347054592;for(let i=1;i<64;++i){if(i!==32){offsetTable[i]=1024}}return{floatView:floatView,uint32View:uint32View,baseTable:baseTable,shiftTable:shiftTable,mantissaTable:mantissaTable,exponentTable:exponentTable,offsetTable:offsetTable}}function toHalfFloat(val){if(Math.abs(val)>65504)warn("DataUtils.toHalfFloat(): Value out of range.");val=clamp(val,-65504,65504);_tables.floatView[0]=val;const f=_tables.uint32View[0];const e=f>>23&511;return _tables.baseTable[e]+((f&8388607)>>_tables.shiftTable[e])}function fromHalfFloat(val){const m=val>>10;_tables.uint32View[0]=_tables.mantissaTable[_tables.offsetTable[m]+(val&1023)]+_tables.exponentTable[m];return _tables.floatView[0]}class DataUtils{static toHalfFloat(val){return toHalfFloat(val)}static fromHalfFloat(val){return fromHalfFloat(val)}}const _vector$9=new Vector3;const _vector2$1=new Vector2;let _id$3=0;class BufferAttribute{constructor(array,itemSize,normalized=false){if(Array.isArray(array)){throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.")}this.isBufferAttribute=true;Object.defineProperty(this,"id",{value:_id$3++});this.name="";this.array=array;this.itemSize=itemSize;this.count=array!==undefined?array.length/itemSize:0;this.normalized=normalized;this.usage=StaticDrawUsage;this.updateRanges=[];this.gpuType=FloatType;this.version=0}onUploadCallback(){}set needsUpdate(value){if(value===true)this.version++}setUsage(value){this.usage=value;return this}addUpdateRange(start,count){this.updateRanges.push({start,count})}clearUpdateRanges(){this.updateRanges.length=0}copy(source){this.name=source.name;this.array=new source.array.constructor(source.array);this.itemSize=source.itemSize;this.count=source.count;this.normalized=source.normalized;this.usage=source.usage;this.gpuType=source.gpuType;return this}copyAt(index1,attribute,index2){index1*=this.itemSize;index2*=attribute.itemSize;for(let i=0,l=this.itemSize;i<l;i++){this.array[index1+i]=attribute.array[index2+i]}return this}copyArray(array){this.array.set(array);return this}applyMatrix3(m){if(this.itemSize===2){for(let i=0,l=this.count;i<l;i++){_vector2$1.fromBufferAttribute(this,i);_vector2$1.applyMatrix3(m);this.setXY(i,_vector2$1.x,_vector2$1.y)}}else if(this.itemSize===3){for(let i=0,l=this.count;i<l;i++){_vector$9.fromBufferAttribute(this,i);_vector$9.applyMatrix3(m);this.setXYZ(i,_vector$9.x,_vector$9.y,_vector$9.z)}}return this}applyMatrix4(m){for(let i=0,l=this.count;i<l;i++){_vector$9.fromBufferAttribute(this,i);_vector$9.applyMatrix4(m);this.setXYZ(i,_vector$9.x,_vector$9.y,_vector$9.z)}return this}applyNormalMatrix(m){for(let i=0,l=this.count;i<l;i++){_vector$9.fromBufferAttribute(this,i);_vector$9.applyNormalMatrix(m);this.setXYZ(i,_vector$9.x,_vector$9.y,_vector$9.z)}return this}transformDirection(m){for(let i=0,l=this.count;i<l;i++){_vector$9.fromBufferAttribute(this,i);_vector$9.transformDirection(m);this.setXYZ(i,_vector$9.x,_vector$9.y,_vector$9.z)}return this}set(value,offset=0){this.array.set(value,offset);return this}getComponent(index,component){let value=this.array[index*this.itemSize+component];if(this.normalized)value=denormalize(value,this.array);return value}setComponent(index,component,value){if(this.normalized)value=normalize(value,this.array);this.array[index*this.itemSize+component]=value;return this}getX(index){let x=this.array[index*this.itemSize];if(this.normalized)x=denormalize(x,this.array);return x}setX(index,x){if(this.normalized)x=normalize(x,this.array);this.array[index*this.itemSize]=x;return this}getY(index){let y=this.array[index*this.itemSize+1];if(this.normalized)y=denormalize(y,this.array);return y}setY(index,y){if(this.normalized)y=normalize(y,this.array);this.array[index*this.itemSize+1]=y;return this}getZ(index){let z=this.array[index*this.itemSize+2];if(this.normalized)z=denormalize(z,this.array);return z}setZ(index,z){if(this.normalized)z=normalize(z,this.array);this.array[index*this.itemSize+2]=z;return this}getW(index){let w=this.array[index*this.itemSize+3];if(this.normalized)w=denormalize(w,this.array);return w}setW(index,w){if(this.normalized)w=normalize(w,this.array);this.array[index*this.itemSize+3]=w;return this}setXY(index,x,y){index*=this.itemSize;if(this.normalized){x=normalize(x,this.array);y=normalize(y,this.array)}this.array[index+0]=x;this.array[index+1]=y;return this}setXYZ(index,x,y,z){index*=this.itemSize;if(this.normalized){x=normalize(x,this.array);y=normalize(y,this.array);z=normalize(z,this.array)}this.array[index+0]=x;this.array[index+1]=y;this.array[index+2]=z;return this}setXYZW(index,x,y,z,w){index*=this.itemSize;if(this.normalized){x=normalize(x,this.array);y=normalize(y,this.array);z=normalize(z,this.array);w=normalize(w,this.array)}this.array[index+0]=x;this.array[index+1]=y;this.array[index+2]=z;this.array[index+3]=w;return this}onUpload(callback){this.onUploadCallback=callback;return this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const data={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};if(this.name!=="")data.name=this.name;if(this.usage!==StaticDrawUsage)data.usage=this.usage;return data}}class Int8BufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized){super(new Int8Array(array),itemSize,normalized)}}class Uint8BufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized){super(new Uint8Array(array),itemSize,normalized)}}class Uint8ClampedBufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized){super(new Uint8ClampedArray(array),itemSize,normalized)}}class Int16BufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized){super(new Int16Array(array),itemSize,normalized)}}class Uint16BufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized){super(new Uint16Array(array),itemSize,normalized)}}class Int32BufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized){super(new Int32Array(array),itemSize,normalized)}}class Uint32BufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized){super(new Uint32Array(array),itemSize,normalized)}}class Float16BufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized){super(new Uint16Array(array),itemSize,normalized);this.isFloat16BufferAttribute=true}getX(index){let x=fromHalfFloat(this.array[index*this.itemSize]);if(this.normalized)x=denormalize(x,this.array);return x}setX(index,x){if(this.normalized)x=normalize(x,this.array);this.array[index*this.itemSize]=toHalfFloat(x);return this}getY(index){let y=fromHalfFloat(this.array[index*this.itemSize+1]);if(this.normalized)y=denormalize(y,this.array);return y}setY(index,y){if(this.normalized)y=normalize(y,this.array);this.array[index*this.itemSize+1]=toHalfFloat(y);return this}getZ(index){let z=fromHalfFloat(this.array[index*this.itemSize+2]);if(this.normalized)z=denormalize(z,this.array);return z}setZ(index,z){if(this.normalized)z=normalize(z,this.array);this.array[index*this.itemSize+2]=toHalfFloat(z);return this}getW(index){let w=fromHalfFloat(this.array[index*this.itemSize+3]);if(this.normalized)w=denormalize(w,this.array);return w}setW(index,w){if(this.normalized)w=normalize(w,this.array);this.array[index*this.itemSize+3]=toHalfFloat(w);return this}setXY(index,x,y){index*=this.itemSize;if(this.normalized){x=normalize(x,this.array);y=normalize(y,this.array)}this.array[index+0]=toHalfFloat(x);this.array[index+1]=toHalfFloat(y);return this}setXYZ(index,x,y,z){index*=this.itemSize;if(this.normalized){x=normalize(x,this.array);y=normalize(y,this.array);z=normalize(z,this.array)}this.array[index+0]=toHalfFloat(x);this.array[index+1]=toHalfFloat(y);this.array[index+2]=toHalfFloat(z);return this}setXYZW(index,x,y,z,w){index*=this.itemSize;if(this.normalized){x=normalize(x,this.array);y=normalize(y,this.array);z=normalize(z,this.array);w=normalize(w,this.array)}this.array[index+0]=toHalfFloat(x);this.array[index+1]=toHalfFloat(y);this.array[index+2]=toHalfFloat(z);this.array[index+3]=toHalfFloat(w);return this}}class Float32BufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized){super(new Float32Array(array),itemSize,normalized)}}let _id$2=0;const _m1$2=new Matrix4;const _obj=new Object3D;const _offset=new Vector3;const _box$2=new Box3;const _boxMorphTargets=new Box3;const _vector$8=new Vector3;class BufferGeometry extends EventDispatcher{constructor(){super();this.isBufferGeometry=true;Object.defineProperty(this,"id",{value:_id$2++});this.uuid=generateUUID();this.name="";this.type="BufferGeometry";this.index=null;this.indirect=null;this.indirectOffset=0;this.attributes={};this.morphAttributes={};this.morphTargetsRelative=false;this.groups=[];this.boundingBox=null;this.boundingSphere=null;this.drawRange={start:0,count:Infinity};this.userData={}}getIndex(){return this.index}setIndex(index){if(Array.isArray(index)){this.index=new(arrayNeedsUint32(index)?Uint32BufferAttribute:Uint16BufferAttribute)(index,1)}else{this.index=index}return this}setIndirect(indirect,indirectOffset=0){this.indirect=indirect;this.indirectOffset=indirectOffset;return this}getIndirect(){return this.indirect}getAttribute(name){return this.attributes[name]}setAttribute(name,attribute){this.attributes[name]=attribute;return this}deleteAttribute(name){delete this.attributes[name];return this}hasAttribute(name){return this.attributes[name]!==undefined}addGroup(start,count,materialIndex=0){this.groups.push({start:start,count:count,materialIndex:materialIndex})}clearGroups(){this.groups=[]}setDrawRange(start,count){this.drawRange.start=start;this.drawRange.count=count}applyMatrix4(matrix){const position=this.attributes.position;if(position!==undefined){position.applyMatrix4(matrix);position.needsUpdate=true}const normal=this.attributes.normal;if(normal!==undefined){const normalMatrix=new Matrix3().getNormalMatrix(matrix);normal.applyNormalMatrix(normalMatrix);normal.needsUpdate=true}const tangent=this.attributes.tangent;if(tangent!==undefined){tangent.transformDirection(matrix);tangent.needsUpdate=true}if(this.boundingBox!==null){this.computeBoundingBox()}if(this.boundingSphere!==null){this.computeBoundingSphere()}return this}applyQuaternion(q){_m1$2.makeRotationFromQuaternion(q);this.applyMatrix4(_m1$2);return this}rotateX(angle){_m1$2.makeRotationX(angle);this.applyMatrix4(_m1$2);return this}rotateY(angle){_m1$2.makeRotationY(angle);this.applyMatrix4(_m1$2);return this}rotateZ(angle){_m1$2.makeRotationZ(angle);this.applyMatrix4(_m1$2);return this}translate(x,y,z){_m1$2.makeTranslation(x,y,z);this.applyMatrix4(_m1$2);return this}scale(x,y,z){_m1$2.makeScale(x,y,z);this.applyMatrix4(_m1$2);return this}lookAt(vector){_obj.lookAt(vector);_obj.updateMatrix();this.applyMatrix4(_obj.matrix);return this}center(){this.computeBoundingBox();this.boundingBox.getCenter(_offset).negate();this.translate(_offset.x,_offset.y,_offset.z);return this}setFromPoints(points){const positionAttribute=this.getAttribute("position");if(positionAttribute===undefined){const position=[];for(let i=0,l=points.length;i<l;i++){const point=points[i];position.push(point.x,point.y,point.z||0)}this.setAttribute("position",new Float32BufferAttribute(position,3))}else{const l=Math.min(points.length,positionAttribute.count);for(let i=0;i<l;i++){const point=points[i];positionAttribute.setXYZ(i,point.x,point.y,point.z||0)}if(points.length>positionAttribute.count){warn("BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry.")}positionAttribute.needsUpdate=true}return this}computeBoundingBox(){if(this.boundingBox===null){this.boundingBox=new Box3}const position=this.attributes.position;const morphAttributesPosition=this.morphAttributes.position;if(position&&position.isGLBufferAttribute){error("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this);this.boundingBox.set(new Vector3(-Infinity,-Infinity,-Infinity),new Vector3(+Infinity,+Infinity,+Infinity));return}if(position!==undefined){this.boundingBox.setFromBufferAttribute(position);if(morphAttributesPosition){for(let i=0,il=morphAttributesPosition.length;i<il;i++){const morphAttribute=morphAttributesPosition[i];_box$2.setFromBufferAttribute(morphAttribute);if(this.morphTargetsRelative){_vector$8.addVectors(this.boundingBox.min,_box$2.min);this.boundingBox.expandByPoint(_vector$8);_vector$8.addVectors(this.boundingBox.max,_box$2.max);this.boundingBox.expandByPoint(_vector$8)}else{this.boundingBox.expandByPoint(_box$2.min);this.boundingBox.expandByPoint(_box$2.max)}}}}else{this.boundingBox.makeEmpty()}if(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z)){error("BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The \"position\" attribute is likely to have NaN values.",this)}}computeBoundingSphere(){if(this.boundingSphere===null){this.boundingSphere=new Sphere}const position=this.attributes.position;const morphAttributesPosition=this.morphAttributes.position;if(position&&position.isGLBufferAttribute){error("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this);this.boundingSphere.set(new Vector3,Infinity);return}if(position){const center=this.boundingSphere.center;_box$2.setFromBufferAttribute(position);if(morphAttributesPosition){for(let i=0,il=morphAttributesPosition.length;i<il;i++){const morphAttribute=morphAttributesPosition[i];_boxMorphTargets.setFromBufferAttribute(morphAttribute);if(this.morphTargetsRelative){_vector$8.addVectors(_box$2.min,_boxMorphTargets.min);_box$2.expandByPoint(_vector$8);_vector$8.addVectors(_box$2.max,_boxMorphTargets.max);_box$2.expandByPoint(_vector$8)}else{_box$2.expandByPoint(_boxMorphTargets.min);_box$2.expandByPoint(_boxMorphTargets.max)}}}_box$2.getCenter(center);let maxRadiusSq=0;for(let i=0,il=position.count;i<il;i++){_vector$8.fromBufferAttribute(position,i);maxRadiusSq=Math.max(maxRadiusSq,center.distanceToSquared(_vector$8))}if(morphAttributesPosition){for(let i=0,il=morphAttributesPosition.length;i<il;i++){const morphAttribute=morphAttributesPosition[i];const morphTargetsRelative=this.morphTargetsRelative;for(let j=0,jl=morphAttribute.count;j<jl;j++){_vector$8.fromBufferAttribute(morphAttribute,j);if(morphTargetsRelative){_offset.fromBufferAttribute(position,j);_vector$8.add(_offset)}maxRadiusSq=Math.max(maxRadiusSq,center.distanceToSquared(_vector$8))}}}this.boundingSphere.radius=Math.sqrt(maxRadiusSq);if(isNaN(this.boundingSphere.radius)){error("BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The \"position\" attribute is likely to have NaN values.",this)}}}computeTangents(){const index=this.index;const attributes=this.attributes;if(index===null||attributes.position===undefined||attributes.normal===undefined||attributes.uv===undefined){error("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const positionAttribute=attributes.position;const normalAttribute=attributes.normal;const uvAttribute=attributes.uv;if(this.hasAttribute("tangent")===false){this.setAttribute("tangent",new BufferAttribute(new Float32Array(4*positionAttribute.count),4))}const tangentAttribute=this.getAttribute("tangent");const tan1=[],tan2=[];for(let i=0;i<positionAttribute.count;i++){tan1[i]=new Vector3;tan2[i]=new Vector3}const vA=new Vector3,vB=new Vector3,vC=new Vector3,uvA=new Vector2,uvB=new Vector2,uvC=new Vector2,sdir=new Vector3,tdir=new Vector3;function handleTriangle(a,b,c){vA.fromBufferAttribute(positionAttribute,a);vB.fromBufferAttribute(positionAttribute,b);vC.fromBufferAttribute(positionAttribute,c);uvA.fromBufferAttribute(uvAttribute,a);uvB.fromBufferAttribute(uvAttribute,b);uvC.fromBufferAttribute(uvAttribute,c);vB.sub(vA);vC.sub(vA);uvB.sub(uvA);uvC.sub(uvA);const r=1/(uvB.x*uvC.y-uvC.x*uvB.y);if(!isFinite(r))return;sdir.copy(vB).multiplyScalar(uvC.y).addScaledVector(vC,-uvB.y).multiplyScalar(r);tdir.copy(vC).multiplyScalar(uvB.x).addScaledVector(vB,-uvC.x).multiplyScalar(r);tan1[a].add(sdir);tan1[b].add(sdir);tan1[c].add(sdir);tan2[a].add(tdir);tan2[b].add(tdir);tan2[c].add(tdir)}let groups=this.groups;if(groups.length===0){groups=[{start:0,count:index.count}]}for(let i=0,il=groups.length;i<il;++i){const group=groups[i];const start=group.start;const count=group.count;for(let j=start,jl=start+count;j<jl;j+=3){handleTriangle(index.getX(j+0),index.getX(j+1),index.getX(j+2))}}const tmp=new Vector3,tmp2=new Vector3;const n=new Vector3,n2=new Vector3;function handleVertex(v){n.fromBufferAttribute(normalAttribute,v);n2.copy(n);const t=tan1[v];tmp.copy(t);tmp.sub(n.multiplyScalar(n.dot(t))).normalize();tmp2.crossVectors(n2,t);const test=tmp2.dot(tan2[v]);const w=test<0?-1:1;tangentAttribute.setXYZW(v,tmp.x,tmp.y,tmp.z,w)}for(let i=0,il=groups.length;i<il;++i){const group=groups[i];const start=group.start;const count=group.count;for(let j=start,jl=start+count;j<jl;j+=3){handleVertex(index.getX(j+0));handleVertex(index.getX(j+1));handleVertex(index.getX(j+2))}}}computeVertexNormals(){const index=this.index;const positionAttribute=this.getAttribute("position");if(positionAttribute!==undefined){let normalAttribute=this.getAttribute("normal");if(normalAttribute===undefined){normalAttribute=new BufferAttribute(new Float32Array(positionAttribute.count*3),3);this.setAttribute("normal",normalAttribute)}else{for(let i=0,il=normalAttribute.count;i<il;i++){normalAttribute.setXYZ(i,0,0,0)}}const pA=new Vector3,pB=new Vector3,pC=new Vector3;const nA=new Vector3,nB=new Vector3,nC=new Vector3;const cb=new Vector3,ab=new Vector3;if(index){for(let i=0,il=index.count;i<il;i+=3){const vA=index.getX(i+0);const vB=index.getX(i+1);const vC=index.getX(i+2);pA.fromBufferAttribute(positionAttribute,vA);pB.fromBufferAttribute(positionAttribute,vB);pC.fromBufferAttribute(positionAttribute,vC);cb.subVectors(pC,pB);ab.subVectors(pA,pB);cb.cross(ab);nA.fromBufferAttribute(normalAttribute,vA);nB.fromBufferAttribute(normalAttribute,vB);nC.fromBufferAttribute(normalAttribute,vC);nA.add(cb);nB.add(cb);nC.add(cb);normalAttribute.setXYZ(vA,nA.x,nA.y,nA.z);normalAttribute.setXYZ(vB,nB.x,nB.y,nB.z);normalAttribute.setXYZ(vC,nC.x,nC.y,nC.z)}}else{for(let i=0,il=positionAttribute.count;i<il;i+=3){pA.fromBufferAttribute(positionAttribute,i+0);pB.fromBufferAttribute(positionAttribute,i+1);pC.fromBufferAttribute(positionAttribute,i+2);cb.subVectors(pC,pB);ab.subVectors(pA,pB);cb.cross(ab);normalAttribute.setXYZ(i+0,cb.x,cb.y,cb.z);normalAttribute.setXYZ(i+1,cb.x,cb.y,cb.z);normalAttribute.setXYZ(i+2,cb.x,cb.y,cb.z)}}this.normalizeNormals();normalAttribute.needsUpdate=true}}normalizeNormals(){const normals=this.attributes.normal;for(let i=0,il=normals.count;i<il;i++){_vector$8.fromBufferAttribute(normals,i);_vector$8.normalize();normals.setXYZ(i,_vector$8.x,_vector$8.y,_vector$8.z)}}toNonIndexed(){function convertBufferAttribute(attribute,indices){const array=attribute.array;const itemSize=attribute.itemSize;const normalized=attribute.normalized;const array2=new array.constructor(indices.length*itemSize);let index=0,index2=0;for(let i=0,l=indices.length;i<l;i++){if(attribute.isInterleavedBufferAttribute){index=indices[i]*attribute.data.stride+attribute.offset}else{index=indices[i]*itemSize}for(let j=0;j<itemSize;j++){array2[index2++]=array[index++]}}return new BufferAttribute(array2,itemSize,normalized)}if(this.index===null){warn("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed.");return this}const geometry2=new BufferGeometry;const indices=this.index.array;const attributes=this.attributes;for(const name in attributes){const attribute=attributes[name];const newAttribute=convertBufferAttribute(attribute,indices);geometry2.setAttribute(name,newAttribute)}const morphAttributes=this.morphAttributes;for(const name in morphAttributes){const morphArray=[];const morphAttribute=morphAttributes[name];for(let i=0,il=morphAttribute.length;i<il;i++){const attribute=morphAttribute[i];const newAttribute=convertBufferAttribute(attribute,indices);morphArray.push(newAttribute)}geometry2.morphAttributes[name]=morphArray}geometry2.morphTargetsRelative=this.morphTargetsRelative;const groups=this.groups;for(let i=0,l=groups.length;i<l;i++){const group=groups[i];geometry2.addGroup(group.start,group.count,group.materialIndex)}return geometry2}toJSON(){const data={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};data.uuid=this.uuid;data.type=this.type;if(this.name!=="")data.name=this.name;if(Object.keys(this.userData).length>0)data.userData=this.userData;if(this.parameters!==undefined){const parameters=this.parameters;for(const key in parameters){if(parameters[key]!==undefined)data[key]=parameters[key]}return data}data.data={attributes:{}};const index=this.index;if(index!==null){data.data.index={type:index.array.constructor.name,array:Array.prototype.slice.call(index.array)}}const attributes=this.attributes;for(const key in attributes){const attribute=attributes[key];data.data.attributes[key]=attribute.toJSON(data.data)}const morphAttributes={};let hasMorphAttributes=false;for(const key in this.morphAttributes){const attributeArray=this.morphAttributes[key];const array=[];for(let i=0,il=attributeArray.length;i<il;i++){const attribute=attributeArray[i];array.push(attribute.toJSON(data.data))}if(array.length>0){morphAttributes[key]=array;hasMorphAttributes=true}}if(hasMorphAttributes){data.data.morphAttributes=morphAttributes;data.data.morphTargetsRelative=this.morphTargetsRelative}const groups=this.groups;if(groups.length>0){data.data.groups=JSON.parse(JSON.stringify(groups))}const boundingSphere=this.boundingSphere;if(boundingSphere!==null){data.data.boundingSphere=boundingSphere.toJSON()}return data}clone(){return new this.constructor().copy(this)}copy(source){this.index=null;this.attributes={};this.morphAttributes={};this.groups=[];this.boundingBox=null;this.boundingSphere=null;const data={};this.name=source.name;const index=source.index;if(index!==null){this.setIndex(index.clone())}const attributes=source.attributes;for(const name in attributes){const attribute=attributes[name];this.setAttribute(name,attribute.clone(data))}const morphAttributes=source.morphAttributes;for(const name in morphAttributes){const array=[];const morphAttribute=morphAttributes[name];for(let i=0,l=morphAttribute.length;i<l;i++){array.push(morphAttribute[i].clone(data))}this.morphAttributes[name]=array}this.morphTargetsRelative=source.morphTargetsRelative;const groups=source.groups;for(let i=0,l=groups.length;i<l;i++){const group=groups[i];this.addGroup(group.start,group.count,group.materialIndex)}const boundingBox=source.boundingBox;if(boundingBox!==null){this.boundingBox=boundingBox.clone()}const boundingSphere=source.boundingSphere;if(boundingSphere!==null){this.boundingSphere=boundingSphere.clone()}this.drawRange.start=source.drawRange.start;this.drawRange.count=source.drawRange.count;this.userData=source.userData;return this}dispose(){this.dispatchEvent({type:"dispose"})}}const _inverseMatrix$3=new Matrix4;const _ray$3=new Ray;const _sphere$6=new Sphere;const _sphereHitAt=new Vector3;const _vA$1=new Vector3;const _vB$1=new Vector3;const _vC$1=new Vector3;const _tempA=new Vector3;const _morphA=new Vector3;const _intersectionPoint=new Vector3;const _intersectionPointWorld=new Vector3;class Mesh extends Object3D{constructor(geometry=new BufferGeometry,material=new MeshBasicMaterial){super();this.isMesh=true;this.type="Mesh";this.geometry=geometry;this.material=material;this.morphTargetDictionary=undefined;this.morphTargetInfluences=undefined;this.count=1;this.updateMorphTargets()}copy(source,recursive){super.copy(source,recursive);if(source.morphTargetInfluences!==undefined){this.morphTargetInfluences=source.morphTargetInfluences.slice()}if(source.morphTargetDictionary!==undefined){this.morphTargetDictionary=Object.assign({},source.morphTargetDictionary)}this.material=Array.isArray(source.material)?source.material.slice():source.material;this.geometry=source.geometry;return this}updateMorphTargets(){const geometry=this.geometry;const morphAttributes=geometry.morphAttributes;const keys=Object.keys(morphAttributes);if(keys.length>0){const morphAttribute=morphAttributes[keys[0]];if(morphAttribute!==undefined){this.morphTargetInfluences=[];this.morphTargetDictionary={};for(let m=0,ml=morphAttribute.length;m<ml;m++){const name=morphAttribute[m].name||String(m);this.morphTargetInfluences.push(0);this.morphTargetDictionary[name]=m}}}}getVertexPosition(index,target){const geometry=this.geometry;const position=geometry.attributes.position;const morphPosition=geometry.morphAttributes.position;const morphTargetsRelative=geometry.morphTargetsRelative;target.fromBufferAttribute(position,index);const morphInfluences=this.morphTargetInfluences;if(morphPosition&&morphInfluences){_morphA.set(0,0,0);for(let i=0,il=morphPosition.length;i<il;i++){const influence=morphInfluences[i];const morphAttribute=morphPosition[i];if(influence===0)continue;_tempA.fromBufferAttribute(morphAttribute,index);if(morphTargetsRelative){_morphA.addScaledVector(_tempA,influence)}else{_morphA.addScaledVector(_tempA.sub(target),influence)}}target.add(_morphA)}return target}raycast(raycaster,intersects){const geometry=this.geometry;const material=this.material;const matrixWorld=this.matrixWorld;if(material===undefined)return;if(geometry.boundingSphere===null)geometry.computeBoundingSphere();_sphere$6.copy(geometry.boundingSphere);_sphere$6.applyMatrix4(matrixWorld);_ray$3.copy(raycaster.ray).recast(raycaster.near);if(_sphere$6.containsPoint(_ray$3.origin)===false){if(_ray$3.intersectSphere(_sphere$6,_sphereHitAt)===null)return;if(_ray$3.origin.distanceToSquared(_sphereHitAt)>(raycaster.far-raycaster.near)**2)return}_inverseMatrix$3.copy(matrixWorld).invert();_ray$3.copy(raycaster.ray).applyMatrix4(_inverseMatrix$3);if(geometry.boundingBox!==null){if(_ray$3.intersectsBox(geometry.boundingBox)===false)return}this._computeIntersections(raycaster,intersects,_ray$3)}_computeIntersections(raycaster,intersects,rayLocalSpace){let intersection;const geometry=this.geometry;const material=this.material;const index=geometry.index;const position=geometry.attributes.position;const uv=geometry.attributes.uv;const uv1=geometry.attributes.uv1;const normal=geometry.attributes.normal;const groups=geometry.groups;const drawRange=geometry.drawRange;if(index!==null){if(Array.isArray(material)){for(let i=0,il=groups.length;i<il;i++){const group=groups[i];const groupMaterial=material[group.materialIndex];const start=Math.max(group.start,drawRange.start);const end=Math.min(index.count,Math.min(group.start+group.count,drawRange.start+drawRange.count));for(let j=start,jl=end;j<jl;j+=3){const a=index.getX(j);const b=index.getX(j+1);const c=index.getX(j+2);intersection=checkGeometryIntersection(this,groupMaterial,raycaster,rayLocalSpace,uv,uv1,normal,a,b,c);if(intersection){intersection.faceIndex=Math.floor(j/3);intersection.face.materialIndex=group.materialIndex;intersects.push(intersection)}}}}else{const start=Math.max(0,drawRange.start);const end=Math.min(index.count,drawRange.start+drawRange.count);for(let i=start,il=end;i<il;i+=3){const a=index.getX(i);const b=index.getX(i+1);const c=index.getX(i+2);intersection=checkGeometryIntersection(this,material,raycaster,rayLocalSpace,uv,uv1,normal,a,b,c);if(intersection){intersection.faceIndex=Math.floor(i/3);intersects.push(intersection)}}}}else if(position!==undefined){if(Array.isArray(material)){for(let i=0,il=groups.length;i<il;i++){const group=groups[i];const groupMaterial=material[group.materialIndex];const start=Math.max(group.start,drawRange.start);const end=Math.min(position.count,Math.min(group.start+group.count,drawRange.start+drawRange.count));for(let j=start,jl=end;j<jl;j+=3){const a=j;const b=j+1;const c=j+2;intersection=checkGeometryIntersection(this,groupMaterial,raycaster,rayLocalSpace,uv,uv1,normal,a,b,c);if(intersection){intersection.faceIndex=Math.floor(j/3);intersection.face.materialIndex=group.materialIndex;intersects.push(intersection)}}}}else{const start=Math.max(0,drawRange.start);const end=Math.min(position.count,drawRange.start+drawRange.count);for(let i=start,il=end;i<il;i+=3){const a=i;const b=i+1;const c=i+2;intersection=checkGeometryIntersection(this,material,raycaster,rayLocalSpace,uv,uv1,normal,a,b,c);if(intersection){intersection.faceIndex=Math.floor(i/3);intersects.push(intersection)}}}}}}function checkIntersection$1(object,material,raycaster,ray,pA,pB,pC,point){let intersect;if(material.side===BackSide){intersect=ray.intersectTriangle(pC,pB,pA,true,point)}else{intersect=ray.intersectTriangle(pA,pB,pC,material.side===FrontSide,point)}if(intersect===null)return null;_intersectionPointWorld.copy(point);_intersectionPointWorld.applyMatrix4(object.matrixWorld);const distance=raycaster.ray.origin.distanceTo(_intersectionPointWorld);if(distance<raycaster.near||distance>raycaster.far)return null;return{distance:distance,point:_intersectionPointWorld.clone(),object:object}}function checkGeometryIntersection(object,material,raycaster,ray,uv,uv1,normal,a,b,c){object.getVertexPosition(a,_vA$1);object.getVertexPosition(b,_vB$1);object.getVertexPosition(c,_vC$1);const intersection=checkIntersection$1(object,material,raycaster,ray,_vA$1,_vB$1,_vC$1,_intersectionPoint);if(intersection){const barycoord=new Vector3;Triangle.getBarycoord(_intersectionPoint,_vA$1,_vB$1,_vC$1,barycoord);if(uv){intersection.uv=Triangle.getInterpolatedAttribute(uv,a,b,c,barycoord,new Vector2)}if(uv1){intersection.uv1=Triangle.getInterpolatedAttribute(uv1,a,b,c,barycoord,new Vector2)}if(normal){intersection.normal=Triangle.getInterpolatedAttribute(normal,a,b,c,barycoord,new Vector3);if(intersection.normal.dot(ray.direction)>0){intersection.normal.multiplyScalar(-1)}}const face={a:a,b:b,c:c,normal:new Vector3,materialIndex:0};Triangle.getNormal(_vA$1,_vB$1,_vC$1,face.normal);intersection.face=face;intersection.barycoord=barycoord}return intersection}class BoxGeometry extends BufferGeometry{constructor(width=1,height=1,depth=1,widthSegments=1,heightSegments=1,depthSegments=1){super();this.type="BoxGeometry";this.parameters={width:width,height:height,depth:depth,widthSegments:widthSegments,heightSegments:heightSegments,depthSegments:depthSegments};const scope=this;widthSegments=Math.floor(widthSegments);heightSegments=Math.floor(heightSegments);depthSegments=Math.floor(depthSegments);const indices=[];const vertices=[];const normals=[];const uvs=[];let numberOfVertices=0;let groupStart=0;buildPlane("z","y","x",-1,-1,depth,height,width,depthSegments,heightSegments,0);buildPlane("z","y","x",1,-1,depth,height,-width,depthSegments,heightSegments,1);buildPlane("x","z","y",1,1,width,depth,height,widthSegments,depthSegments,2);buildPlane("x","z","y",1,-1,width,depth,-height,widthSegments,depthSegments,3);buildPlane("x","y","z",1,-1,width,height,depth,widthSegments,heightSegments,4);buildPlane("x","y","z",-1,-1,width,height,-depth,widthSegments,heightSegments,5);this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2));function buildPlane(u,v,w,udir,vdir,width,height,depth,gridX,gridY,materialIndex){const segmentWidth=width/gridX;const segmentHeight=height/gridY;const widthHalf=width/2;const heightHalf=height/2;const depthHalf=depth/2;const gridX1=gridX+1;const gridY1=gridY+1;let vertexCounter=0;let groupCount=0;const vector=new Vector3;for(let iy=0;iy<gridY1;iy++){const y=iy*segmentHeight-heightHalf;for(let ix=0;ix<gridX1;ix++){const x=ix*segmentWidth-widthHalf;vector[u]=x*udir;vector[v]=y*vdir;vector[w]=depthHalf;vertices.push(vector.x,vector.y,vector.z);vector[u]=0;vector[v]=0;vector[w]=depth>0?1:-1;normals.push(vector.x,vector.y,vector.z);uvs.push(ix/gridX);uvs.push(1-iy/gridY);vertexCounter+=1}}for(let iy=0;iy<gridY;iy++){for(let ix=0;ix<gridX;ix++){const a=numberOfVertices+ix+gridX1*iy;const b=numberOfVertices+ix+gridX1*(iy+1);const c=numberOfVertices+(ix+1)+gridX1*(iy+1);const d=numberOfVertices+(ix+1)+gridX1*iy;indices.push(a,b,d);indices.push(b,c,d);groupCount+=6}}scope.addGroup(groupStart,groupCount,materialIndex);groupStart+=groupCount;numberOfVertices+=vertexCounter}}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new BoxGeometry(data.width,data.height,data.depth,data.widthSegments,data.heightSegments,data.depthSegments)}}function cloneUniforms(src){const dst={};for(const u in src){dst[u]={};for(const p in src[u]){const property=src[u][p];if(property&&(property.isColor||property.isMatrix3||property.isMatrix4||property.isVector2||property.isVector3||property.isVector4||property.isTexture||property.isQuaternion)){if(property.isRenderTargetTexture){warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms().");dst[u][p]=null}else{dst[u][p]=property.clone()}}else if(Array.isArray(property)){dst[u][p]=property.slice()}else{dst[u][p]=property}}}return dst}function mergeUniforms(uniforms){const merged={};for(let u=0;u<uniforms.length;u++){const tmp=cloneUniforms(uniforms[u]);for(const p in tmp){merged[p]=tmp[p]}}return merged}function cloneUniformsGroups(src){const dst=[];for(let u=0;u<src.length;u++){dst.push(src[u].clone())}return dst}function getUnlitUniformColorSpace(renderer){const currentRenderTarget=renderer.getRenderTarget();if(currentRenderTarget===null){return renderer.outputColorSpace}if(currentRenderTarget.isXRRenderTarget===true){return currentRenderTarget.texture.colorSpace}return ColorManagement.workingColorSpace}const UniformsUtils={clone:cloneUniforms,merge:mergeUniforms};var default_vertex="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}";var default_fragment="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}";class ShaderMaterial extends Material{constructor(parameters){super();this.isShaderMaterial=true;this.type="ShaderMaterial";this.defines={};this.uniforms={};this.uniformsGroups=[];this.vertexShader=default_vertex;this.fragmentShader=default_fragment;this.linewidth=1;this.wireframe=false;this.wireframeLinewidth=1;this.fog=false;this.lights=false;this.clipping=false;this.forceSinglePass=true;this.extensions={clipCullDistance:false,multiDraw:false};this.defaultAttributeValues={"color":[1,1,1],"uv":[0,0],"uv1":[0,0]};this.index0AttributeName=undefined;this.uniformsNeedUpdate=false;this.glslVersion=null;if(parameters!==undefined){this.setValues(parameters)}}copy(source){super.copy(source);this.fragmentShader=source.fragmentShader;this.vertexShader=source.vertexShader;this.uniforms=cloneUniforms(source.uniforms);this.uniformsGroups=cloneUniformsGroups(source.uniformsGroups);this.defines=Object.assign({},source.defines);this.wireframe=source.wireframe;this.wireframeLinewidth=source.wireframeLinewidth;this.fog=source.fog;this.lights=source.lights;this.clipping=source.clipping;this.extensions=Object.assign({},source.extensions);this.glslVersion=source.glslVersion;this.defaultAttributeValues=Object.assign({},source.defaultAttributeValues);this.index0AttributeName=source.index0AttributeName;this.uniformsNeedUpdate=source.uniformsNeedUpdate;return this}toJSON(meta){const data=super.toJSON(meta);data.glslVersion=this.glslVersion;data.uniforms={};for(const name in this.uniforms){const uniform=this.uniforms[name];const value=uniform.value;if(value&&value.isTexture){data.uniforms[name]={type:"t",value:value.toJSON(meta).uuid}}else if(value&&value.isColor){data.uniforms[name]={type:"c",value:value.getHex()}}else if(value&&value.isVector2){data.uniforms[name]={type:"v2",value:value.toArray()}}else if(value&&value.isVector3){data.uniforms[name]={type:"v3",value:value.toArray()}}else if(value&&value.isVector4){data.uniforms[name]={type:"v4",value:value.toArray()}}else if(value&&value.isMatrix3){data.uniforms[name]={type:"m3",value:value.toArray()}}else if(value&&value.isMatrix4){data.uniforms[name]={type:"m4",value:value.toArray()}}else{data.uniforms[name]={value:value}}}if(Object.keys(this.defines).length>0)data.defines=this.defines;data.vertexShader=this.vertexShader;data.fragmentShader=this.fragmentShader;data.lights=this.lights;data.clipping=this.clipping;const extensions={};for(const key in this.extensions){if(this.extensions[key]===true)extensions[key]=true}if(Object.keys(extensions).length>0)data.extensions=extensions;return data}}class Camera extends Object3D{constructor(){super();this.isCamera=true;this.type="Camera";this.matrixWorldInverse=new Matrix4;this.projectionMatrix=new Matrix4;this.projectionMatrixInverse=new Matrix4;this.coordinateSystem=WebGLCoordinateSystem;this._reversedDepth=false}get reversedDepth(){return this._reversedDepth}copy(source,recursive){super.copy(source,recursive);this.matrixWorldInverse.copy(source.matrixWorldInverse);this.projectionMatrix.copy(source.projectionMatrix);this.projectionMatrixInverse.copy(source.projectionMatrixInverse);this.coordinateSystem=source.coordinateSystem;return this}getWorldDirection(target){return super.getWorldDirection(target).negate()}updateMatrixWorld(force){super.updateMatrixWorld(force);this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(updateParents,updateChildren){super.updateWorldMatrix(updateParents,updateChildren);this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const _v3$1=new Vector3;const _minTarget=new Vector2;const _maxTarget=new Vector2;class PerspectiveCamera extends Camera{constructor(fov=50,aspect=1,near=0.1,far=2000){super();this.isPerspectiveCamera=true;this.type="PerspectiveCamera";this.fov=fov;this.zoom=1;this.near=near;this.far=far;this.focus=10;this.aspect=aspect;this.view=null;this.filmGauge=35;this.filmOffset=0;this.updateProjectionMatrix()}copy(source,recursive){super.copy(source,recursive);this.fov=source.fov;this.zoom=source.zoom;this.near=source.near;this.far=source.far;this.focus=source.focus;this.aspect=source.aspect;this.view=source.view===null?null:Object.assign({},source.view);this.filmGauge=source.filmGauge;this.filmOffset=source.filmOffset;return this}setFocalLength(focalLength){const vExtentSlope=0.5*this.getFilmHeight()/focalLength;this.fov=RAD2DEG*2*Math.atan(vExtentSlope);this.updateProjectionMatrix()}getFocalLength(){const vExtentSlope=Math.tan(DEG2RAD*0.5*this.fov);return 0.5*this.getFilmHeight()/vExtentSlope}getEffectiveFOV(){return RAD2DEG*2*Math.atan(Math.tan(DEG2RAD*0.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(distance,minTarget,maxTarget){_v3$1.set(-1,-1,0.5).applyMatrix4(this.projectionMatrixInverse);minTarget.set(_v3$1.x,_v3$1.y).multiplyScalar(-distance/_v3$1.z);_v3$1.set(1,1,0.5).applyMatrix4(this.projectionMatrixInverse);maxTarget.set(_v3$1.x,_v3$1.y).multiplyScalar(-distance/_v3$1.z)}getViewSize(distance,target){this.getViewBounds(distance,_minTarget,_maxTarget);return target.subVectors(_maxTarget,_minTarget)}setViewOffset(fullWidth,fullHeight,x,y,width,height){this.aspect=fullWidth/fullHeight;if(this.view===null){this.view={enabled:true,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}}this.view.enabled=true;this.view.fullWidth=fullWidth;this.view.fullHeight=fullHeight;this.view.offsetX=x;this.view.offsetY=y;this.view.width=width;this.view.height=height;this.updateProjectionMatrix()}clearViewOffset(){if(this.view!==null){this.view.enabled=false}this.updateProjectionMatrix()}updateProjectionMatrix(){const near=this.near;let top=near*Math.tan(DEG2RAD*0.5*this.fov)/this.zoom;let height=2*top;let width=this.aspect*height;let left=-0.5*width;const view=this.view;if(this.view!==null&&this.view.enabled){const fullWidth=view.fullWidth,fullHeight=view.fullHeight;left+=view.offsetX*width/fullWidth;top-=view.offsetY*height/fullHeight;width*=view.width/fullWidth;height*=view.height/fullHeight}const skew=this.filmOffset;if(skew!==0)left+=near*skew/this.getFilmWidth();this.projectionMatrix.makePerspective(left,left+width,top,top-height,near,this.far,this.coordinateSystem,this.reversedDepth);this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(meta){const data=super.toJSON(meta);data.object.fov=this.fov;data.object.zoom=this.zoom;data.object.near=this.near;data.object.far=this.far;data.object.focus=this.focus;data.object.aspect=this.aspect;if(this.view!==null)data.object.view=Object.assign({},this.view);data.object.filmGauge=this.filmGauge;data.object.filmOffset=this.filmOffset;return data}}const fov=-90;const aspect=1;class CubeCamera extends Object3D{constructor(near,far,renderTarget){super();this.type="CubeCamera";this.renderTarget=renderTarget;this.coordinateSystem=null;this.activeMipmapLevel=0;const cameraPX=new PerspectiveCamera(fov,aspect,near,far);cameraPX.layers=this.layers;this.add(cameraPX);const cameraNX=new PerspectiveCamera(fov,aspect,near,far);cameraNX.layers=this.layers;this.add(cameraNX);const cameraPY=new PerspectiveCamera(fov,aspect,near,far);cameraPY.layers=this.layers;this.add(cameraPY);const cameraNY=new PerspectiveCamera(fov,aspect,near,far);cameraNY.layers=this.layers;this.add(cameraNY);const cameraPZ=new PerspectiveCamera(fov,aspect,near,far);cameraPZ.layers=this.layers;this.add(cameraPZ);const cameraNZ=new PerspectiveCamera(fov,aspect,near,far);cameraNZ.layers=this.layers;this.add(cameraNZ)}updateCoordinateSystem(){const coordinateSystem=this.coordinateSystem;const cameras=this.children.concat();const[cameraPX,cameraNX,cameraPY,cameraNY,cameraPZ,cameraNZ]=cameras;for(const camera of cameras)this.remove(camera);if(coordinateSystem===WebGLCoordinateSystem){cameraPX.up.set(0,1,0);cameraPX.lookAt(1,0,0);cameraNX.up.set(0,1,0);cameraNX.lookAt(-1,0,0);cameraPY.up.set(0,0,-1);cameraPY.lookAt(0,1,0);cameraNY.up.set(0,0,1);cameraNY.lookAt(0,-1,0);cameraPZ.up.set(0,1,0);cameraPZ.lookAt(0,0,1);cameraNZ.up.set(0,1,0);cameraNZ.lookAt(0,0,-1)}else if(coordinateSystem===WebGPUCoordinateSystem){cameraPX.up.set(0,-1,0);cameraPX.lookAt(-1,0,0);cameraNX.up.set(0,-1,0);cameraNX.lookAt(1,0,0);cameraPY.up.set(0,0,1);cameraPY.lookAt(0,1,0);cameraNY.up.set(0,0,-1);cameraNY.lookAt(0,-1,0);cameraPZ.up.set(0,-1,0);cameraPZ.lookAt(0,0,1);cameraNZ.up.set(0,-1,0);cameraNZ.lookAt(0,0,-1)}else{throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+coordinateSystem)}for(const camera of cameras){this.add(camera);camera.updateMatrixWorld()}}update(renderer,scene){if(this.parent===null)this.updateMatrixWorld();const{renderTarget,activeMipmapLevel}=this;if(this.coordinateSystem!==renderer.coordinateSystem){this.coordinateSystem=renderer.coordinateSystem;this.updateCoordinateSystem()}const[cameraPX,cameraNX,cameraPY,cameraNY,cameraPZ,cameraNZ]=this.children;const currentRenderTarget=renderer.getRenderTarget();const currentActiveCubeFace=renderer.getActiveCubeFace();const currentActiveMipmapLevel=renderer.getActiveMipmapLevel();const currentXrEnabled=renderer.xr.enabled;renderer.xr.enabled=false;const generateMipmaps=renderTarget.texture.generateMipmaps;renderTarget.texture.generateMipmaps=false;renderer.setRenderTarget(renderTarget,0,activeMipmapLevel);renderer.render(scene,cameraPX);renderer.setRenderTarget(renderTarget,1,activeMipmapLevel);renderer.render(scene,cameraNX);renderer.setRenderTarget(renderTarget,2,activeMipmapLevel);renderer.render(scene,cameraPY);renderer.setRenderTarget(renderTarget,3,activeMipmapLevel);renderer.render(scene,cameraNY);renderer.setRenderTarget(renderTarget,4,activeMipmapLevel);renderer.render(scene,cameraPZ);renderTarget.texture.generateMipmaps=generateMipmaps;renderer.setRenderTarget(renderTarget,5,activeMipmapLevel);renderer.render(scene,cameraNZ);renderer.setRenderTarget(currentRenderTarget,currentActiveCubeFace,currentActiveMipmapLevel);renderer.xr.enabled=currentXrEnabled;renderTarget.texture.needsPMREMUpdate=true}}class CubeTexture extends Texture{constructor(images=[],mapping=CubeReflectionMapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy,colorSpace){super(images,mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy,colorSpace);this.isCubeTexture=true;this.flipY=false}get images(){return this.image}set images(value){this.image=value}}class WebGLCubeRenderTarget extends WebGLRenderTarget{constructor(size=1,options={}){super(size,size,options);this.isWebGLCubeRenderTarget=true;const image={width:size,height:size,depth:1};const images=[image,image,image,image,image,image];this.texture=new CubeTexture(images);this._setTextureOptions(options);this.texture.isRenderTargetTexture=true}fromEquirectangularTexture(renderer,texture){this.texture.type=texture.type;this.texture.colorSpace=texture.colorSpace;this.texture.generateMipmaps=texture.generateMipmaps;this.texture.minFilter=texture.minFilter;this.texture.magFilter=texture.magFilter;const shader={uniforms:{tEquirect:{value:null}},vertexShader:`

				varying vec3 vWorldDirection;

				vec3 transformDirection( in vec3 dir, in mat4 matrix ) {

					return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );

				}

				void main() {

					vWorldDirection = transformDirection( position, modelMatrix );

					#include <begin_vertex>
					#include <project_vertex>

				}
			`,fragmentShader:`

				uniform sampler2D tEquirect;

				varying vec3 vWorldDirection;

				#include <common>

				void main() {

					vec3 direction = normalize( vWorldDirection );

					vec2 sampleUV = equirectUv( direction );

					gl_FragColor = texture2D( tEquirect, sampleUV );

				}
			`};const geometry=new BoxGeometry(5,5,5);const material=new ShaderMaterial({name:"CubemapFromEquirect",uniforms:cloneUniforms(shader.uniforms),vertexShader:shader.vertexShader,fragmentShader:shader.fragmentShader,side:BackSide,blending:NoBlending});material.uniforms.tEquirect.value=texture;const mesh=new Mesh(geometry,material);const currentMinFilter=texture.minFilter;if(texture.minFilter===LinearMipmapLinearFilter)texture.minFilter=LinearFilter;const camera=new CubeCamera(1,10,this);camera.update(renderer,mesh);texture.minFilter=currentMinFilter;mesh.geometry.dispose();mesh.material.dispose();return this}clear(renderer,color=true,depth=true,stencil=true){const currentRenderTarget=renderer.getRenderTarget();for(let i=0;i<6;i++){renderer.setRenderTarget(this,i);renderer.clear(color,depth,stencil)}renderer.setRenderTarget(currentRenderTarget)}}class Group extends Object3D{constructor(){super();this.isGroup=true;this.type="Group"}}const _moveEvent={type:"move"};class WebXRController{constructor(){this._targetRay=null;this._grip=null;this._hand=null}getHandSpace(){if(this._hand===null){this._hand=new Group;this._hand.matrixAutoUpdate=false;this._hand.visible=false;this._hand.joints={};this._hand.inputState={pinching:false}}return this._hand}getTargetRaySpace(){if(this._targetRay===null){this._targetRay=new Group;this._targetRay.matrixAutoUpdate=false;this._targetRay.visible=false;this._targetRay.hasLinearVelocity=false;this._targetRay.linearVelocity=new Vector3;this._targetRay.hasAngularVelocity=false;this._targetRay.angularVelocity=new Vector3}return this._targetRay}getGripSpace(){if(this._grip===null){this._grip=new Group;this._grip.matrixAutoUpdate=false;this._grip.visible=false;this._grip.hasLinearVelocity=false;this._grip.linearVelocity=new Vector3;this._grip.hasAngularVelocity=false;this._grip.angularVelocity=new Vector3}return this._grip}dispatchEvent(event){if(this._targetRay!==null){this._targetRay.dispatchEvent(event)}if(this._grip!==null){this._grip.dispatchEvent(event)}if(this._hand!==null){this._hand.dispatchEvent(event)}return this}connect(inputSource){if(inputSource&&inputSource.hand){const hand=this._hand;if(hand){for(const inputjoint of inputSource.hand.values()){this._getHandJoint(hand,inputjoint)}}}this.dispatchEvent({type:"connected",data:inputSource});return this}disconnect(inputSource){this.dispatchEvent({type:"disconnected",data:inputSource});if(this._targetRay!==null){this._targetRay.visible=false}if(this._grip!==null){this._grip.visible=false}if(this._hand!==null){this._hand.visible=false}return this}update(inputSource,frame,referenceSpace){let inputPose=null;let gripPose=null;let handPose=null;const targetRay=this._targetRay;const grip=this._grip;const hand=this._hand;if(inputSource&&frame.session.visibilityState!=="visible-blurred"){if(hand&&inputSource.hand){handPose=true;for(const inputjoint of inputSource.hand.values()){const jointPose=frame.getJointPose(inputjoint,referenceSpace);const joint=this._getHandJoint(hand,inputjoint);if(jointPose!==null){joint.matrix.fromArray(jointPose.transform.matrix);joint.matrix.decompose(joint.position,joint.rotation,joint.scale);joint.matrixWorldNeedsUpdate=true;joint.jointRadius=jointPose.radius}joint.visible=jointPose!==null}const indexTip=hand.joints["index-finger-tip"];const thumbTip=hand.joints["thumb-tip"];const distance=indexTip.position.distanceTo(thumbTip.position);const distanceToPinch=0.02;const threshold=0.005;if(hand.inputState.pinching&&distance>distanceToPinch+threshold){hand.inputState.pinching=false;this.dispatchEvent({type:"pinchend",handedness:inputSource.handedness,target:this})}else if(!hand.inputState.pinching&&distance<=distanceToPinch-threshold){hand.inputState.pinching=true;this.dispatchEvent({type:"pinchstart",handedness:inputSource.handedness,target:this})}}else{if(grip!==null&&inputSource.gripSpace){gripPose=frame.getPose(inputSource.gripSpace,referenceSpace);if(gripPose!==null){grip.matrix.fromArray(gripPose.transform.matrix);grip.matrix.decompose(grip.position,grip.rotation,grip.scale);grip.matrixWorldNeedsUpdate=true;if(gripPose.linearVelocity){grip.hasLinearVelocity=true;grip.linearVelocity.copy(gripPose.linearVelocity)}else{grip.hasLinearVelocity=false}if(gripPose.angularVelocity){grip.hasAngularVelocity=true;grip.angularVelocity.copy(gripPose.angularVelocity)}else{grip.hasAngularVelocity=false}}}}if(targetRay!==null){inputPose=frame.getPose(inputSource.targetRaySpace,referenceSpace);if(inputPose===null&&gripPose!==null){inputPose=gripPose}if(inputPose!==null){targetRay.matrix.fromArray(inputPose.transform.matrix);targetRay.matrix.decompose(targetRay.position,targetRay.rotation,targetRay.scale);targetRay.matrixWorldNeedsUpdate=true;if(inputPose.linearVelocity){targetRay.hasLinearVelocity=true;targetRay.linearVelocity.copy(inputPose.linearVelocity)}else{targetRay.hasLinearVelocity=false}if(inputPose.angularVelocity){targetRay.hasAngularVelocity=true;targetRay.angularVelocity.copy(inputPose.angularVelocity)}else{targetRay.hasAngularVelocity=false}this.dispatchEvent(_moveEvent)}}}if(targetRay!==null){targetRay.visible=inputPose!==null}if(grip!==null){grip.visible=gripPose!==null}if(hand!==null){hand.visible=handPose!==null}return this}_getHandJoint(hand,inputjoint){if(hand.joints[inputjoint.jointName]===undefined){const joint=new Group;joint.matrixAutoUpdate=false;joint.visible=false;hand.joints[inputjoint.jointName]=joint;hand.add(joint)}return hand.joints[inputjoint.jointName]}}class FogExp2{constructor(color,density=0.00025){this.isFogExp2=true;this.name="";this.color=new Color(color);this.density=density}clone(){return new FogExp2(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class Fog{constructor(color,near=1,far=1000){this.isFog=true;this.name="";this.color=new Color(color);this.near=near;this.far=far}clone(){return new Fog(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class Scene extends Object3D{constructor(){super();this.isScene=true;this.type="Scene";this.background=null;this.environment=null;this.fog=null;this.backgroundBlurriness=0;this.backgroundIntensity=1;this.backgroundRotation=new Euler;this.environmentIntensity=1;this.environmentRotation=new Euler;this.overrideMaterial=null;if(typeof __THREE_DEVTOOLS__!=="undefined"){__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}}copy(source,recursive){super.copy(source,recursive);if(source.background!==null)this.background=source.background.clone();if(source.environment!==null)this.environment=source.environment.clone();if(source.fog!==null)this.fog=source.fog.clone();this.backgroundBlurriness=source.backgroundBlurriness;this.backgroundIntensity=source.backgroundIntensity;this.backgroundRotation.copy(source.backgroundRotation);this.environmentIntensity=source.environmentIntensity;this.environmentRotation.copy(source.environmentRotation);if(source.overrideMaterial!==null)this.overrideMaterial=source.overrideMaterial.clone();this.matrixAutoUpdate=source.matrixAutoUpdate;return this}toJSON(meta){const data=super.toJSON(meta);if(this.fog!==null)data.object.fog=this.fog.toJSON();if(this.backgroundBlurriness>0)data.object.backgroundBlurriness=this.backgroundBlurriness;if(this.backgroundIntensity!==1)data.object.backgroundIntensity=this.backgroundIntensity;data.object.backgroundRotation=this.backgroundRotation.toArray();if(this.environmentIntensity!==1)data.object.environmentIntensity=this.environmentIntensity;data.object.environmentRotation=this.environmentRotation.toArray();return data}}class InterleavedBuffer{constructor(array,stride){this.isInterleavedBuffer=true;this.array=array;this.stride=stride;this.count=array!==undefined?array.length/stride:0;this.usage=StaticDrawUsage;this.updateRanges=[];this.version=0;this.uuid=generateUUID()}onUploadCallback(){}set needsUpdate(value){if(value===true)this.version++}setUsage(value){this.usage=value;return this}addUpdateRange(start,count){this.updateRanges.push({start,count})}clearUpdateRanges(){this.updateRanges.length=0}copy(source){this.array=new source.array.constructor(source.array);this.count=source.count;this.stride=source.stride;this.usage=source.usage;return this}copyAt(index1,interleavedBuffer,index2){index1*=this.stride;index2*=interleavedBuffer.stride;for(let i=0,l=this.stride;i<l;i++){this.array[index1+i]=interleavedBuffer.array[index2+i]}return this}set(value,offset=0){this.array.set(value,offset);return this}clone(data){if(data.arrayBuffers===undefined){data.arrayBuffers={}}if(this.array.buffer._uuid===undefined){this.array.buffer._uuid=generateUUID()}if(data.arrayBuffers[this.array.buffer._uuid]===undefined){data.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer}const array=new this.array.constructor(data.arrayBuffers[this.array.buffer._uuid]);const ib=new this.constructor(array,this.stride);ib.setUsage(this.usage);return ib}onUpload(callback){this.onUploadCallback=callback;return this}toJSON(data){if(data.arrayBuffers===undefined){data.arrayBuffers={}}if(this.array.buffer._uuid===undefined){this.array.buffer._uuid=generateUUID()}if(data.arrayBuffers[this.array.buffer._uuid]===undefined){data.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))}return{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const _vector$7=new Vector3;class InterleavedBufferAttribute{constructor(interleavedBuffer,itemSize,offset,normalized=false){this.isInterleavedBufferAttribute=true;this.name="";this.data=interleavedBuffer;this.itemSize=itemSize;this.offset=offset;this.normalized=normalized}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(value){this.data.needsUpdate=value}applyMatrix4(m){for(let i=0,l=this.data.count;i<l;i++){_vector$7.fromBufferAttribute(this,i);_vector$7.applyMatrix4(m);this.setXYZ(i,_vector$7.x,_vector$7.y,_vector$7.z)}return this}applyNormalMatrix(m){for(let i=0,l=this.count;i<l;i++){_vector$7.fromBufferAttribute(this,i);_vector$7.applyNormalMatrix(m);this.setXYZ(i,_vector$7.x,_vector$7.y,_vector$7.z)}return this}transformDirection(m){for(let i=0,l=this.count;i<l;i++){_vector$7.fromBufferAttribute(this,i);_vector$7.transformDirection(m);this.setXYZ(i,_vector$7.x,_vector$7.y,_vector$7.z)}return this}getComponent(index,component){let value=this.array[index*this.data.stride+this.offset+component];if(this.normalized)value=denormalize(value,this.array);return value}setComponent(index,component,value){if(this.normalized)value=normalize(value,this.array);this.data.array[index*this.data.stride+this.offset+component]=value;return this}setX(index,x){if(this.normalized)x=normalize(x,this.array);this.data.array[index*this.data.stride+this.offset]=x;return this}setY(index,y){if(this.normalized)y=normalize(y,this.array);this.data.array[index*this.data.stride+this.offset+1]=y;return this}setZ(index,z){if(this.normalized)z=normalize(z,this.array);this.data.array[index*this.data.stride+this.offset+2]=z;return this}setW(index,w){if(this.normalized)w=normalize(w,this.array);this.data.array[index*this.data.stride+this.offset+3]=w;return this}getX(index){let x=this.data.array[index*this.data.stride+this.offset];if(this.normalized)x=denormalize(x,this.array);return x}getY(index){let y=this.data.array[index*this.data.stride+this.offset+1];if(this.normalized)y=denormalize(y,this.array);return y}getZ(index){let z=this.data.array[index*this.data.stride+this.offset+2];if(this.normalized)z=denormalize(z,this.array);return z}getW(index){let w=this.data.array[index*this.data.stride+this.offset+3];if(this.normalized)w=denormalize(w,this.array);return w}setXY(index,x,y){index=index*this.data.stride+this.offset;if(this.normalized){x=normalize(x,this.array);y=normalize(y,this.array)}this.data.array[index+0]=x;this.data.array[index+1]=y;return this}setXYZ(index,x,y,z){index=index*this.data.stride+this.offset;if(this.normalized){x=normalize(x,this.array);y=normalize(y,this.array);z=normalize(z,this.array)}this.data.array[index+0]=x;this.data.array[index+1]=y;this.data.array[index+2]=z;return this}setXYZW(index,x,y,z,w){index=index*this.data.stride+this.offset;if(this.normalized){x=normalize(x,this.array);y=normalize(y,this.array);z=normalize(z,this.array);w=normalize(w,this.array)}this.data.array[index+0]=x;this.data.array[index+1]=y;this.data.array[index+2]=z;this.data.array[index+3]=w;return this}clone(data){if(data===undefined){log("InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const array=[];for(let i=0;i<this.count;i++){const index=i*this.data.stride+this.offset;for(let j=0;j<this.itemSize;j++){array.push(this.data.array[index+j])}}return new BufferAttribute(new this.array.constructor(array),this.itemSize,this.normalized)}else{if(data.interleavedBuffers===undefined){data.interleavedBuffers={}}if(data.interleavedBuffers[this.data.uuid]===undefined){data.interleavedBuffers[this.data.uuid]=this.data.clone(data)}return new InterleavedBufferAttribute(data.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}}toJSON(data){if(data===undefined){log("InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const array=[];for(let i=0;i<this.count;i++){const index=i*this.data.stride+this.offset;for(let j=0;j<this.itemSize;j++){array.push(this.data.array[index+j])}}return{itemSize:this.itemSize,type:this.array.constructor.name,array:array,normalized:this.normalized}}else{if(data.interleavedBuffers===undefined){data.interleavedBuffers={}}if(data.interleavedBuffers[this.data.uuid]===undefined){data.interleavedBuffers[this.data.uuid]=this.data.toJSON(data)}return{isInterleavedBufferAttribute:true,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}}class SpriteMaterial extends Material{constructor(parameters){super();this.isSpriteMaterial=true;this.type="SpriteMaterial";this.color=new Color(16777215);this.map=null;this.alphaMap=null;this.rotation=0;this.sizeAttenuation=true;this.transparent=true;this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.color.copy(source.color);this.map=source.map;this.alphaMap=source.alphaMap;this.rotation=source.rotation;this.sizeAttenuation=source.sizeAttenuation;this.fog=source.fog;return this}}let _geometry;const _intersectPoint=new Vector3;const _worldScale=new Vector3;const _mvPosition=new Vector3;const _alignedPosition=new Vector2;const _rotatedPosition=new Vector2;const _viewWorldMatrix=new Matrix4;const _vA=new Vector3;const _vB=new Vector3;const _vC=new Vector3;const _uvA=new Vector2;const _uvB=new Vector2;const _uvC=new Vector2;class Sprite extends Object3D{constructor(material=new SpriteMaterial){super();this.isSprite=true;this.type="Sprite";if(_geometry===undefined){_geometry=new BufferGeometry;const float32Array=new Float32Array([-0.5,-0.5,0,0,0,0.5,-0.5,0,1,0,0.5,0.5,0,1,1,-0.5,0.5,0,0,1]);const interleavedBuffer=new InterleavedBuffer(float32Array,5);_geometry.setIndex([0,1,2,0,2,3]);_geometry.setAttribute("position",new InterleavedBufferAttribute(interleavedBuffer,3,0,false));_geometry.setAttribute("uv",new InterleavedBufferAttribute(interleavedBuffer,2,3,false))}this.geometry=_geometry;this.material=material;this.center=new Vector2(0.5,0.5);this.count=1}raycast(raycaster,intersects){if(raycaster.camera===null){error("Sprite: \"Raycaster.camera\" needs to be set in order to raycast against sprites.")}_worldScale.setFromMatrixScale(this.matrixWorld);_viewWorldMatrix.copy(raycaster.camera.matrixWorld);this.modelViewMatrix.multiplyMatrices(raycaster.camera.matrixWorldInverse,this.matrixWorld);_mvPosition.setFromMatrixPosition(this.modelViewMatrix);if(raycaster.camera.isPerspectiveCamera&&this.material.sizeAttenuation===false){_worldScale.multiplyScalar(-_mvPosition.z)}const rotation=this.material.rotation;let sin,cos;if(rotation!==0){cos=Math.cos(rotation);sin=Math.sin(rotation)}const center=this.center;transformVertex(_vA.set(-0.5,-0.5,0),_mvPosition,center,_worldScale,sin,cos);transformVertex(_vB.set(0.5,-0.5,0),_mvPosition,center,_worldScale,sin,cos);transformVertex(_vC.set(0.5,0.5,0),_mvPosition,center,_worldScale,sin,cos);_uvA.set(0,0);_uvB.set(1,0);_uvC.set(1,1);let intersect=raycaster.ray.intersectTriangle(_vA,_vB,_vC,false,_intersectPoint);if(intersect===null){transformVertex(_vB.set(-0.5,0.5,0),_mvPosition,center,_worldScale,sin,cos);_uvB.set(0,1);intersect=raycaster.ray.intersectTriangle(_vA,_vC,_vB,false,_intersectPoint);if(intersect===null){return}}const distance=raycaster.ray.origin.distanceTo(_intersectPoint);if(distance<raycaster.near||distance>raycaster.far)return;intersects.push({distance:distance,point:_intersectPoint.clone(),uv:Triangle.getInterpolation(_intersectPoint,_vA,_vB,_vC,_uvA,_uvB,_uvC,new Vector2),face:null,object:this})}copy(source,recursive){super.copy(source,recursive);if(source.center!==undefined)this.center.copy(source.center);this.material=source.material;return this}}function transformVertex(vertexPosition,mvPosition,center,scale,sin,cos){_alignedPosition.subVectors(vertexPosition,center).addScalar(0.5).multiply(scale);if(sin!==undefined){_rotatedPosition.x=cos*_alignedPosition.x-sin*_alignedPosition.y;_rotatedPosition.y=sin*_alignedPosition.x+cos*_alignedPosition.y}else{_rotatedPosition.copy(_alignedPosition)}vertexPosition.copy(mvPosition);vertexPosition.x+=_rotatedPosition.x;vertexPosition.y+=_rotatedPosition.y;vertexPosition.applyMatrix4(_viewWorldMatrix)}const _v1$2=new Vector3;const _v2$1=new Vector3;class LOD extends Object3D{constructor(){super();this.isLOD=true;this._currentLevel=0;this.type="LOD";Object.defineProperties(this,{levels:{enumerable:true,value:[]}});this.autoUpdate=true}copy(source){super.copy(source,false);const levels=source.levels;for(let i=0,l=levels.length;i<l;i++){const level=levels[i];this.addLevel(level.object.clone(),level.distance,level.hysteresis)}this.autoUpdate=source.autoUpdate;return this}addLevel(object,distance=0,hysteresis=0){distance=Math.abs(distance);const levels=this.levels;let l;for(l=0;l<levels.length;l++){if(distance<levels[l].distance){break}}levels.splice(l,0,{distance:distance,hysteresis:hysteresis,object:object});this.add(object);return this}removeLevel(distance){const levels=this.levels;for(let i=0;i<levels.length;i++){if(levels[i].distance===distance){const removedElements=levels.splice(i,1);this.remove(removedElements[0].object);return true}}return false}getCurrentLevel(){return this._currentLevel}getObjectForDistance(distance){const levels=this.levels;if(levels.length>0){let i,l;for(i=1,l=levels.length;i<l;i++){let levelDistance=levels[i].distance;if(levels[i].object.visible){levelDistance-=levelDistance*levels[i].hysteresis}if(distance<levelDistance){break}}return levels[i-1].object}return null}raycast(raycaster,intersects){const levels=this.levels;if(levels.length>0){_v1$2.setFromMatrixPosition(this.matrixWorld);const distance=raycaster.ray.origin.distanceTo(_v1$2);this.getObjectForDistance(distance).raycast(raycaster,intersects)}}update(camera){const levels=this.levels;if(levels.length>1){_v1$2.setFromMatrixPosition(camera.matrixWorld);_v2$1.setFromMatrixPosition(this.matrixWorld);const distance=_v1$2.distanceTo(_v2$1)/camera.zoom;levels[0].object.visible=true;let i,l;for(i=1,l=levels.length;i<l;i++){let levelDistance=levels[i].distance;if(levels[i].object.visible){levelDistance-=levelDistance*levels[i].hysteresis}if(distance>=levelDistance){levels[i-1].object.visible=false;levels[i].object.visible=true}else{break}}this._currentLevel=i-1;for(;i<l;i++){levels[i].object.visible=false}}}toJSON(meta){const data=super.toJSON(meta);if(this.autoUpdate===false)data.object.autoUpdate=false;data.object.levels=[];const levels=this.levels;for(let i=0,l=levels.length;i<l;i++){const level=levels[i];data.object.levels.push({object:level.object.uuid,distance:level.distance,hysteresis:level.hysteresis})}return data}}const _basePosition=new Vector3;const _skinIndex=new Vector4;const _skinWeight=new Vector4;const _vector3=new Vector3;const _matrix4=new Matrix4;const _vertex=new Vector3;const _sphere$5=new Sphere;const _inverseMatrix$2=new Matrix4;const _ray$2=new Ray;class SkinnedMesh extends Mesh{constructor(geometry,material){super(geometry,material);this.isSkinnedMesh=true;this.type="SkinnedMesh";this.bindMode=AttachedBindMode;this.bindMatrix=new Matrix4;this.bindMatrixInverse=new Matrix4;this.boundingBox=null;this.boundingSphere=null}computeBoundingBox(){const geometry=this.geometry;if(this.boundingBox===null){this.boundingBox=new Box3}this.boundingBox.makeEmpty();const positionAttribute=geometry.getAttribute("position");for(let i=0;i<positionAttribute.count;i++){this.getVertexPosition(i,_vertex);this.boundingBox.expandByPoint(_vertex)}}computeBoundingSphere(){const geometry=this.geometry;if(this.boundingSphere===null){this.boundingSphere=new Sphere}this.boundingSphere.makeEmpty();const positionAttribute=geometry.getAttribute("position");for(let i=0;i<positionAttribute.count;i++){this.getVertexPosition(i,_vertex);this.boundingSphere.expandByPoint(_vertex)}}copy(source,recursive){super.copy(source,recursive);this.bindMode=source.bindMode;this.bindMatrix.copy(source.bindMatrix);this.bindMatrixInverse.copy(source.bindMatrixInverse);this.skeleton=source.skeleton;if(source.boundingBox!==null)this.boundingBox=source.boundingBox.clone();if(source.boundingSphere!==null)this.boundingSphere=source.boundingSphere.clone();return this}raycast(raycaster,intersects){const material=this.material;const matrixWorld=this.matrixWorld;if(material===undefined)return;if(this.boundingSphere===null)this.computeBoundingSphere();_sphere$5.copy(this.boundingSphere);_sphere$5.applyMatrix4(matrixWorld);if(raycaster.ray.intersectsSphere(_sphere$5)===false)return;_inverseMatrix$2.copy(matrixWorld).invert();_ray$2.copy(raycaster.ray).applyMatrix4(_inverseMatrix$2);if(this.boundingBox!==null){if(_ray$2.intersectsBox(this.boundingBox)===false)return}this._computeIntersections(raycaster,intersects,_ray$2)}getVertexPosition(index,target){super.getVertexPosition(index,target);this.applyBoneTransform(index,target);return target}bind(skeleton,bindMatrix){this.skeleton=skeleton;if(bindMatrix===undefined){this.updateMatrixWorld(true);this.skeleton.calculateInverses();bindMatrix=this.matrixWorld}this.bindMatrix.copy(bindMatrix);this.bindMatrixInverse.copy(bindMatrix).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const vector=new Vector4;const skinWeight=this.geometry.attributes.skinWeight;for(let i=0,l=skinWeight.count;i<l;i++){vector.fromBufferAttribute(skinWeight,i);const scale=1/vector.manhattanLength();if(scale!==Infinity){vector.multiplyScalar(scale)}else{vector.set(1,0,0,0)}skinWeight.setXYZW(i,vector.x,vector.y,vector.z,vector.w)}}updateMatrixWorld(force){super.updateMatrixWorld(force);if(this.bindMode===AttachedBindMode){this.bindMatrixInverse.copy(this.matrixWorld).invert()}else if(this.bindMode===DetachedBindMode){this.bindMatrixInverse.copy(this.bindMatrix).invert()}else{warn("SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}}applyBoneTransform(index,target){const skeleton=this.skeleton;const geometry=this.geometry;_skinIndex.fromBufferAttribute(geometry.attributes.skinIndex,index);_skinWeight.fromBufferAttribute(geometry.attributes.skinWeight,index);_basePosition.copy(target).applyMatrix4(this.bindMatrix);target.set(0,0,0);for(let i=0;i<4;i++){const weight=_skinWeight.getComponent(i);if(weight!==0){const boneIndex=_skinIndex.getComponent(i);_matrix4.multiplyMatrices(skeleton.bones[boneIndex].matrixWorld,skeleton.boneInverses[boneIndex]);target.addScaledVector(_vector3.copy(_basePosition).applyMatrix4(_matrix4),weight)}}return target.applyMatrix4(this.bindMatrixInverse)}}class Bone extends Object3D{constructor(){super();this.isBone=true;this.type="Bone"}}class DataTexture extends Texture{constructor(data=null,width=1,height=1,format,type,mapping,wrapS,wrapT,magFilter=NearestFilter,minFilter=NearestFilter,anisotropy,colorSpace){super(null,mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy,colorSpace);this.isDataTexture=true;this.image={data:data,width:width,height:height};this.generateMipmaps=false;this.flipY=false;this.unpackAlignment=1}}const _offsetMatrix=new Matrix4;const _identityMatrix=new Matrix4;class Skeleton{constructor(bones=[],boneInverses=[]){this.uuid=generateUUID();this.bones=bones.slice(0);this.boneInverses=boneInverses;this.boneMatrices=null;this.previousBoneMatrices=null;this.boneTexture=null;this.init()}init(){const bones=this.bones;const boneInverses=this.boneInverses;this.boneMatrices=new Float32Array(bones.length*16);if(boneInverses.length===0){this.calculateInverses()}else{if(bones.length!==boneInverses.length){warn("Skeleton: Number of inverse bone matrices does not match amount of bones.");this.boneInverses=[];for(let i=0,il=this.bones.length;i<il;i++){this.boneInverses.push(new Matrix4)}}}}calculateInverses(){this.boneInverses.length=0;for(let i=0,il=this.bones.length;i<il;i++){const inverse=new Matrix4;if(this.bones[i]){inverse.copy(this.bones[i].matrixWorld).invert()}this.boneInverses.push(inverse)}}pose(){for(let i=0,il=this.bones.length;i<il;i++){const bone=this.bones[i];if(bone){bone.matrixWorld.copy(this.boneInverses[i]).invert()}}for(let i=0,il=this.bones.length;i<il;i++){const bone=this.bones[i];if(bone){if(bone.parent&&bone.parent.isBone){bone.matrix.copy(bone.parent.matrixWorld).invert();bone.matrix.multiply(bone.matrixWorld)}else{bone.matrix.copy(bone.matrixWorld)}bone.matrix.decompose(bone.position,bone.quaternion,bone.scale)}}}update(){const bones=this.bones;const boneInverses=this.boneInverses;const boneMatrices=this.boneMatrices;const boneTexture=this.boneTexture;for(let i=0,il=bones.length;i<il;i++){const matrix=bones[i]?bones[i].matrixWorld:_identityMatrix;_offsetMatrix.multiplyMatrices(matrix,boneInverses[i]);_offsetMatrix.toArray(boneMatrices,i*16)}if(boneTexture!==null){boneTexture.needsUpdate=true}}clone(){return new Skeleton(this.bones,this.boneInverses)}computeBoneTexture(){let size=Math.sqrt(this.bones.length*4);size=Math.ceil(size/4)*4;size=Math.max(size,4);const boneMatrices=new Float32Array(size*size*4);boneMatrices.set(this.boneMatrices);const boneTexture=new DataTexture(boneMatrices,size,size,RGBAFormat,FloatType);boneTexture.needsUpdate=true;this.boneMatrices=boneMatrices;this.boneTexture=boneTexture;return this}getBoneByName(name){for(let i=0,il=this.bones.length;i<il;i++){const bone=this.bones[i];if(bone.name===name){return bone}}return undefined}dispose(){if(this.boneTexture!==null){this.boneTexture.dispose();this.boneTexture=null}}fromJSON(json,bones){this.uuid=json.uuid;for(let i=0,l=json.bones.length;i<l;i++){const uuid=json.bones[i];let bone=bones[uuid];if(bone===undefined){warn("Skeleton: No bone found with UUID:",uuid);bone=new Bone}this.bones.push(bone);this.boneInverses.push(new Matrix4().fromArray(json.boneInverses[i]))}this.init();return this}toJSON(){const data={metadata:{version:4.7,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};data.uuid=this.uuid;const bones=this.bones;const boneInverses=this.boneInverses;for(let i=0,l=bones.length;i<l;i++){const bone=bones[i];data.bones.push(bone.uuid);const boneInverse=boneInverses[i];data.boneInverses.push(boneInverse.toArray())}return data}}class InstancedBufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized,meshPerAttribute=1){super(array,itemSize,normalized);this.isInstancedBufferAttribute=true;this.meshPerAttribute=meshPerAttribute}copy(source){super.copy(source);this.meshPerAttribute=source.meshPerAttribute;return this}toJSON(){const data=super.toJSON();data.meshPerAttribute=this.meshPerAttribute;data.isInstancedBufferAttribute=true;return data}}const _instanceLocalMatrix=new Matrix4;const _instanceWorldMatrix=new Matrix4;const _instanceIntersects=[];const _box3=new Box3;const _identity=new Matrix4;const _mesh$1=new Mesh;const _sphere$4=new Sphere;class InstancedMesh extends Mesh{constructor(geometry,material,count){super(geometry,material);this.isInstancedMesh=true;this.instanceMatrix=new InstancedBufferAttribute(new Float32Array(count*16),16);this.instanceColor=null;this.morphTexture=null;this.count=count;this.boundingBox=null;this.boundingSphere=null;for(let i=0;i<count;i++){this.setMatrixAt(i,_identity)}}computeBoundingBox(){const geometry=this.geometry;const count=this.count;if(this.boundingBox===null){this.boundingBox=new Box3}if(geometry.boundingBox===null){geometry.computeBoundingBox()}this.boundingBox.makeEmpty();for(let i=0;i<count;i++){this.getMatrixAt(i,_instanceLocalMatrix);_box3.copy(geometry.boundingBox).applyMatrix4(_instanceLocalMatrix);this.boundingBox.union(_box3)}}computeBoundingSphere(){const geometry=this.geometry;const count=this.count;if(this.boundingSphere===null){this.boundingSphere=new Sphere}if(geometry.boundingSphere===null){geometry.computeBoundingSphere()}this.boundingSphere.makeEmpty();for(let i=0;i<count;i++){this.getMatrixAt(i,_instanceLocalMatrix);_sphere$4.copy(geometry.boundingSphere).applyMatrix4(_instanceLocalMatrix);this.boundingSphere.union(_sphere$4)}}copy(source,recursive){super.copy(source,recursive);this.instanceMatrix.copy(source.instanceMatrix);if(source.morphTexture!==null)this.morphTexture=source.morphTexture.clone();if(source.instanceColor!==null)this.instanceColor=source.instanceColor.clone();this.count=source.count;if(source.boundingBox!==null)this.boundingBox=source.boundingBox.clone();if(source.boundingSphere!==null)this.boundingSphere=source.boundingSphere.clone();return this}getColorAt(index,color){color.fromArray(this.instanceColor.array,index*3)}getMatrixAt(index,matrix){matrix.fromArray(this.instanceMatrix.array,index*16)}getMorphAt(index,object){const objectInfluences=object.morphTargetInfluences;const array=this.morphTexture.source.data.data;const len=objectInfluences.length+1;const dataIndex=index*len+1;for(let i=0;i<objectInfluences.length;i++){objectInfluences[i]=array[dataIndex+i]}}raycast(raycaster,intersects){const matrixWorld=this.matrixWorld;const raycastTimes=this.count;_mesh$1.geometry=this.geometry;_mesh$1.material=this.material;if(_mesh$1.material===undefined)return;if(this.boundingSphere===null)this.computeBoundingSphere();_sphere$4.copy(this.boundingSphere);_sphere$4.applyMatrix4(matrixWorld);if(raycaster.ray.intersectsSphere(_sphere$4)===false)return;for(let instanceId=0;instanceId<raycastTimes;instanceId++){this.getMatrixAt(instanceId,_instanceLocalMatrix);_instanceWorldMatrix.multiplyMatrices(matrixWorld,_instanceLocalMatrix);_mesh$1.matrixWorld=_instanceWorldMatrix;_mesh$1.raycast(raycaster,_instanceIntersects);for(let i=0,l=_instanceIntersects.length;i<l;i++){const intersect=_instanceIntersects[i];intersect.instanceId=instanceId;intersect.object=this;intersects.push(intersect)}_instanceIntersects.length=0}}setColorAt(index,color){if(this.instanceColor===null){this.instanceColor=new InstancedBufferAttribute(new Float32Array(this.instanceMatrix.count*3).fill(1),3)}color.toArray(this.instanceColor.array,index*3)}setMatrixAt(index,matrix){matrix.toArray(this.instanceMatrix.array,index*16)}setMorphAt(index,object){const objectInfluences=object.morphTargetInfluences;const len=objectInfluences.length+1;if(this.morphTexture===null){this.morphTexture=new DataTexture(new Float32Array(len*this.count),len,this.count,RedFormat,FloatType)}const array=this.morphTexture.source.data.data;let morphInfluencesSum=0;for(let i=0;i<objectInfluences.length;i++){morphInfluencesSum+=objectInfluences[i]}const morphBaseInfluence=this.geometry.morphTargetsRelative?1:1-morphInfluencesSum;const dataIndex=len*index;array[dataIndex]=morphBaseInfluence;array.set(objectInfluences,dataIndex+1)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"});if(this.morphTexture!==null){this.morphTexture.dispose();this.morphTexture=null}}}const _vector1=new Vector3;const _vector2=new Vector3;const _normalMatrix=new Matrix3;class Plane{constructor(normal=new Vector3(1,0,0),constant=0){this.isPlane=true;this.normal=normal;this.constant=constant}set(normal,constant){this.normal.copy(normal);this.constant=constant;return this}setComponents(x,y,z,w){this.normal.set(x,y,z);this.constant=w;return this}setFromNormalAndCoplanarPoint(normal,point){this.normal.copy(normal);this.constant=-point.dot(this.normal);return this}setFromCoplanarPoints(a,b,c){const normal=_vector1.subVectors(c,b).cross(_vector2.subVectors(a,b)).normalize();this.setFromNormalAndCoplanarPoint(normal,a);return this}copy(plane){this.normal.copy(plane.normal);this.constant=plane.constant;return this}normalize(){const inverseNormalLength=1/this.normal.length();this.normal.multiplyScalar(inverseNormalLength);this.constant*=inverseNormalLength;return this}negate(){this.constant*=-1;this.normal.negate();return this}distanceToPoint(point){return this.normal.dot(point)+this.constant}distanceToSphere(sphere){return this.distanceToPoint(sphere.center)-sphere.radius}projectPoint(point,target){return target.copy(point).addScaledVector(this.normal,-this.distanceToPoint(point))}intersectLine(line,target){const direction=line.delta(_vector1);const denominator=this.normal.dot(direction);if(denominator===0){if(this.distanceToPoint(line.start)===0){return target.copy(line.start)}return null}const t=-(line.start.dot(this.normal)+this.constant)/denominator;if(t<0||t>1){return null}return target.copy(line.start).addScaledVector(direction,t)}intersectsLine(line){const startSign=this.distanceToPoint(line.start);const endSign=this.distanceToPoint(line.end);return startSign<0&&endSign>0||endSign<0&&startSign>0}intersectsBox(box){return box.intersectsPlane(this)}intersectsSphere(sphere){return sphere.intersectsPlane(this)}coplanarPoint(target){return target.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(matrix,optionalNormalMatrix){const normalMatrix=optionalNormalMatrix||_normalMatrix.getNormalMatrix(matrix);const referencePoint=this.coplanarPoint(_vector1).applyMatrix4(matrix);const normal=this.normal.applyMatrix3(normalMatrix).normalize();this.constant=-referencePoint.dot(normal);return this}translate(offset){this.constant-=offset.dot(this.normal);return this}equals(plane){return plane.normal.equals(this.normal)&&plane.constant===this.constant}clone(){return new this.constructor().copy(this)}}const _sphere$3=new Sphere;const _defaultSpriteCenter=new Vector2(0.5,0.5);const _vector$6=new Vector3;class Frustum{constructor(p0=new Plane,p1=new Plane,p2=new Plane,p3=new Plane,p4=new Plane,p5=new Plane){this.planes=[p0,p1,p2,p3,p4,p5]}set(p0,p1,p2,p3,p4,p5){const planes=this.planes;planes[0].copy(p0);planes[1].copy(p1);planes[2].copy(p2);planes[3].copy(p3);planes[4].copy(p4);planes[5].copy(p5);return this}copy(frustum){const planes=this.planes;for(let i=0;i<6;i++){planes[i].copy(frustum.planes[i])}return this}setFromProjectionMatrix(m,coordinateSystem=WebGLCoordinateSystem,reversedDepth=false){const planes=this.planes;const me=m.elements;const me0=me[0],me1=me[1],me2=me[2],me3=me[3];const me4=me[4],me5=me[5],me6=me[6],me7=me[7];const me8=me[8],me9=me[9],me10=me[10],me11=me[11];const me12=me[12],me13=me[13],me14=me[14],me15=me[15];planes[0].setComponents(me3-me0,me7-me4,me11-me8,me15-me12).normalize();planes[1].setComponents(me3+me0,me7+me4,me11+me8,me15+me12).normalize();planes[2].setComponents(me3+me1,me7+me5,me11+me9,me15+me13).normalize();planes[3].setComponents(me3-me1,me7-me5,me11-me9,me15-me13).normalize();if(reversedDepth){planes[4].setComponents(me2,me6,me10,me14).normalize();planes[5].setComponents(me3-me2,me7-me6,me11-me10,me15-me14).normalize()}else{planes[4].setComponents(me3-me2,me7-me6,me11-me10,me15-me14).normalize();if(coordinateSystem===WebGLCoordinateSystem){planes[5].setComponents(me3+me2,me7+me6,me11+me10,me15+me14).normalize()}else if(coordinateSystem===WebGPUCoordinateSystem){planes[5].setComponents(me2,me6,me10,me14).normalize()}else{throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+coordinateSystem)}}return this}intersectsObject(object){if(object.boundingSphere!==undefined){if(object.boundingSphere===null)object.computeBoundingSphere();_sphere$3.copy(object.boundingSphere).applyMatrix4(object.matrixWorld)}else{const geometry=object.geometry;if(geometry.boundingSphere===null)geometry.computeBoundingSphere();_sphere$3.copy(geometry.boundingSphere).applyMatrix4(object.matrixWorld)}return this.intersectsSphere(_sphere$3)}intersectsSprite(sprite){_sphere$3.center.set(0,0,0);const offset=_defaultSpriteCenter.distanceTo(sprite.center);_sphere$3.radius=0.7071067811865476+offset;_sphere$3.applyMatrix4(sprite.matrixWorld);return this.intersectsSphere(_sphere$3)}intersectsSphere(sphere){const planes=this.planes;const center=sphere.center;const negRadius=-sphere.radius;for(let i=0;i<6;i++){const distance=planes[i].distanceToPoint(center);if(distance<negRadius){return false}}return true}intersectsBox(box){const planes=this.planes;for(let i=0;i<6;i++){const plane=planes[i];_vector$6.x=plane.normal.x>0?box.max.x:box.min.x;_vector$6.y=plane.normal.y>0?box.max.y:box.min.y;_vector$6.z=plane.normal.z>0?box.max.z:box.min.z;if(plane.distanceToPoint(_vector$6)<0){return false}}return true}containsPoint(point){const planes=this.planes;for(let i=0;i<6;i++){if(planes[i].distanceToPoint(point)<0){return false}}return true}clone(){return new this.constructor().copy(this)}}const _projScreenMatrix$2=new Matrix4;const _frustum$1=new Frustum;class FrustumArray{constructor(){this.coordinateSystem=WebGLCoordinateSystem}intersectsObject(object,cameraArray){if(!cameraArray.isArrayCamera||cameraArray.cameras.length===0){return false}for(let i=0;i<cameraArray.cameras.length;i++){const camera=cameraArray.cameras[i];_projScreenMatrix$2.multiplyMatrices(camera.projectionMatrix,camera.matrixWorldInverse);_frustum$1.setFromProjectionMatrix(_projScreenMatrix$2,camera.coordinateSystem,camera.reversedDepth);if(_frustum$1.intersectsObject(object)){return true}}return false}intersectsSprite(sprite,cameraArray){if(!cameraArray||!cameraArray.cameras||cameraArray.cameras.length===0){return false}for(let i=0;i<cameraArray.cameras.length;i++){const camera=cameraArray.cameras[i];_projScreenMatrix$2.multiplyMatrices(camera.projectionMatrix,camera.matrixWorldInverse);_frustum$1.setFromProjectionMatrix(_projScreenMatrix$2,camera.coordinateSystem,camera.reversedDepth);if(_frustum$1.intersectsSprite(sprite)){return true}}return false}intersectsSphere(sphere,cameraArray){if(!cameraArray||!cameraArray.cameras||cameraArray.cameras.length===0){return false}for(let i=0;i<cameraArray.cameras.length;i++){const camera=cameraArray.cameras[i];_projScreenMatrix$2.multiplyMatrices(camera.projectionMatrix,camera.matrixWorldInverse);_frustum$1.setFromProjectionMatrix(_projScreenMatrix$2,camera.coordinateSystem,camera.reversedDepth);if(_frustum$1.intersectsSphere(sphere)){return true}}return false}intersectsBox(box,cameraArray){if(!cameraArray||!cameraArray.cameras||cameraArray.cameras.length===0){return false}for(let i=0;i<cameraArray.cameras.length;i++){const camera=cameraArray.cameras[i];_projScreenMatrix$2.multiplyMatrices(camera.projectionMatrix,camera.matrixWorldInverse);_frustum$1.setFromProjectionMatrix(_projScreenMatrix$2,camera.coordinateSystem,camera.reversedDepth);if(_frustum$1.intersectsBox(box)){return true}}return false}containsPoint(point,cameraArray){if(!cameraArray||!cameraArray.cameras||cameraArray.cameras.length===0){return false}for(let i=0;i<cameraArray.cameras.length;i++){const camera=cameraArray.cameras[i];_projScreenMatrix$2.multiplyMatrices(camera.projectionMatrix,camera.matrixWorldInverse);_frustum$1.setFromProjectionMatrix(_projScreenMatrix$2,camera.coordinateSystem,camera.reversedDepth);if(_frustum$1.containsPoint(point)){return true}}return false}clone(){return new FrustumArray}}function ascIdSort(a,b){return a-b}function sortOpaque(a,b){return a.z-b.z}function sortTransparent(a,b){return b.z-a.z}class MultiDrawRenderList{constructor(){this.index=0;this.pool=[];this.list=[]}push(start,count,z,index){const pool=this.pool;const list=this.list;if(this.index>=pool.length){pool.push({start:-1,count:-1,z:-1,index:-1})}const item=pool[this.index];list.push(item);this.index++;item.start=start;item.count=count;item.z=z;item.index=index}reset(){this.list.length=0;this.index=0}}const _matrix$1=new Matrix4;const _whiteColor=new Color(1,1,1);const _frustum=new Frustum;const _frustumArray=new FrustumArray;const _box$1=new Box3;const _sphere$2=new Sphere;const _vector$5=new Vector3;const _forward$1=new Vector3;const _temp=new Vector3;const _renderList=new MultiDrawRenderList;const _mesh=new Mesh;const _batchIntersects=[];function copyAttributeData(src,target,targetOffset=0){const itemSize=target.itemSize;if(src.isInterleavedBufferAttribute||src.array.constructor!==target.array.constructor){const vertexCount=src.count;for(let i=0;i<vertexCount;i++){for(let c=0;c<itemSize;c++){target.setComponent(i+targetOffset,c,src.getComponent(i,c))}}}else{target.array.set(src.array,targetOffset*itemSize)}target.needsUpdate=true}function copyArrayContents(src,target){if(src.constructor!==target.constructor){const len=Math.min(src.length,target.length);for(let i=0;i<len;i++){target[i]=src[i]}}else{const len=Math.min(src.length,target.length);target.set(new src.constructor(src.buffer,0,len))}}class BatchedMesh extends Mesh{constructor(maxInstanceCount,maxVertexCount,maxIndexCount=maxVertexCount*2,material){super(new BufferGeometry,material);this.isBatchedMesh=true;this.perObjectFrustumCulled=true;this.sortObjects=true;this.boundingBox=null;this.boundingSphere=null;this.customSort=null;this._instanceInfo=[];this._geometryInfo=[];this._availableInstanceIds=[];this._availableGeometryIds=[];this._nextIndexStart=0;this._nextVertexStart=0;this._geometryCount=0;this._visibilityChanged=true;this._geometryInitialized=false;this._maxInstanceCount=maxInstanceCount;this._maxVertexCount=maxVertexCount;this._maxIndexCount=maxIndexCount;this._multiDrawCounts=new Int32Array(maxInstanceCount);this._multiDrawStarts=new Int32Array(maxInstanceCount);this._multiDrawCount=0;this._multiDrawInstances=null;this._matricesTexture=null;this._indirectTexture=null;this._colorsTexture=null;this._initMatricesTexture();this._initIndirectTexture()}get maxInstanceCount(){return this._maxInstanceCount}get instanceCount(){return this._instanceInfo.length-this._availableInstanceIds.length}get unusedVertexCount(){return this._maxVertexCount-this._nextVertexStart}get unusedIndexCount(){return this._maxIndexCount-this._nextIndexStart}_initMatricesTexture(){let size=Math.sqrt(this._maxInstanceCount*4);size=Math.ceil(size/4)*4;size=Math.max(size,4);const matricesArray=new Float32Array(size*size*4);const matricesTexture=new DataTexture(matricesArray,size,size,RGBAFormat,FloatType);this._matricesTexture=matricesTexture}_initIndirectTexture(){let size=Math.sqrt(this._maxInstanceCount);size=Math.ceil(size);const indirectArray=new Uint32Array(size*size);const indirectTexture=new DataTexture(indirectArray,size,size,RedIntegerFormat,UnsignedIntType);this._indirectTexture=indirectTexture}_initColorsTexture(){let size=Math.sqrt(this._maxInstanceCount);size=Math.ceil(size);const colorsArray=new Float32Array(size*size*4).fill(1);const colorsTexture=new DataTexture(colorsArray,size,size,RGBAFormat,FloatType);colorsTexture.colorSpace=ColorManagement.workingColorSpace;this._colorsTexture=colorsTexture}_initializeGeometry(reference){const geometry=this.geometry;const maxVertexCount=this._maxVertexCount;const maxIndexCount=this._maxIndexCount;if(this._geometryInitialized===false){for(const attributeName in reference.attributes){const srcAttribute=reference.getAttribute(attributeName);const{array,itemSize,normalized}=srcAttribute;const dstArray=new array.constructor(maxVertexCount*itemSize);const dstAttribute=new BufferAttribute(dstArray,itemSize,normalized);geometry.setAttribute(attributeName,dstAttribute)}if(reference.getIndex()!==null){const indexArray=maxVertexCount>65535?new Uint32Array(maxIndexCount):new Uint16Array(maxIndexCount);geometry.setIndex(new BufferAttribute(indexArray,1))}this._geometryInitialized=true}}_validateGeometry(geometry){const batchGeometry=this.geometry;if(Boolean(geometry.getIndex())!==Boolean(batchGeometry.getIndex())){throw new Error("THREE.BatchedMesh: All geometries must consistently have \"index\".")}for(const attributeName in batchGeometry.attributes){if(!geometry.hasAttribute(attributeName)){throw new Error(`THREE.BatchedMesh: Added geometry missing "${attributeName}". All geometries must have consistent attributes.`)}const srcAttribute=geometry.getAttribute(attributeName);const dstAttribute=batchGeometry.getAttribute(attributeName);if(srcAttribute.itemSize!==dstAttribute.itemSize||srcAttribute.normalized!==dstAttribute.normalized){throw new Error("THREE.BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}}validateInstanceId(instanceId){const instanceInfo=this._instanceInfo;if(instanceId<0||instanceId>=instanceInfo.length||instanceInfo[instanceId].active===false){throw new Error(`THREE.BatchedMesh: Invalid instanceId ${instanceId}. Instance is either out of range or has been deleted.`)}}validateGeometryId(geometryId){const geometryInfoList=this._geometryInfo;if(geometryId<0||geometryId>=geometryInfoList.length||geometryInfoList[geometryId].active===false){throw new Error(`THREE.BatchedMesh: Invalid geometryId ${geometryId}. Geometry is either out of range or has been deleted.`)}}setCustomSort(func){this.customSort=func;return this}computeBoundingBox(){if(this.boundingBox===null){this.boundingBox=new Box3}const boundingBox=this.boundingBox;const instanceInfo=this._instanceInfo;boundingBox.makeEmpty();for(let i=0,l=instanceInfo.length;i<l;i++){if(instanceInfo[i].active===false)continue;const geometryId=instanceInfo[i].geometryIndex;this.getMatrixAt(i,_matrix$1);this.getBoundingBoxAt(geometryId,_box$1).applyMatrix4(_matrix$1);boundingBox.union(_box$1)}}computeBoundingSphere(){if(this.boundingSphere===null){this.boundingSphere=new Sphere}const boundingSphere=this.boundingSphere;const instanceInfo=this._instanceInfo;boundingSphere.makeEmpty();for(let i=0,l=instanceInfo.length;i<l;i++){if(instanceInfo[i].active===false)continue;const geometryId=instanceInfo[i].geometryIndex;this.getMatrixAt(i,_matrix$1);this.getBoundingSphereAt(geometryId,_sphere$2).applyMatrix4(_matrix$1);boundingSphere.union(_sphere$2)}}addInstance(geometryId){const atCapacity=this._instanceInfo.length>=this.maxInstanceCount;if(atCapacity&&this._availableInstanceIds.length===0){throw new Error("THREE.BatchedMesh: Maximum item count reached.")}const instanceInfo={visible:true,active:true,geometryIndex:geometryId};let drawId=null;if(this._availableInstanceIds.length>0){this._availableInstanceIds.sort(ascIdSort);drawId=this._availableInstanceIds.shift();this._instanceInfo[drawId]=instanceInfo}else{drawId=this._instanceInfo.length;this._instanceInfo.push(instanceInfo)}const matricesTexture=this._matricesTexture;_matrix$1.identity().toArray(matricesTexture.image.data,drawId*16);matricesTexture.needsUpdate=true;const colorsTexture=this._colorsTexture;if(colorsTexture){_whiteColor.toArray(colorsTexture.image.data,drawId*4);colorsTexture.needsUpdate=true}this._visibilityChanged=true;return drawId}addGeometry(geometry,reservedVertexCount=-1,reservedIndexCount=-1){this._initializeGeometry(geometry);this._validateGeometry(geometry);const geometryInfo={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:true};const geometryInfoList=this._geometryInfo;geometryInfo.vertexStart=this._nextVertexStart;geometryInfo.reservedVertexCount=reservedVertexCount===-1?geometry.getAttribute("position").count:reservedVertexCount;const index=geometry.getIndex();const hasIndex=index!==null;if(hasIndex){geometryInfo.indexStart=this._nextIndexStart;geometryInfo.reservedIndexCount=reservedIndexCount===-1?index.count:reservedIndexCount}if(geometryInfo.indexStart!==-1&&geometryInfo.indexStart+geometryInfo.reservedIndexCount>this._maxIndexCount||geometryInfo.vertexStart+geometryInfo.reservedVertexCount>this._maxVertexCount){throw new Error("THREE.BatchedMesh: Reserved space request exceeds the maximum buffer size.")}let geometryId;if(this._availableGeometryIds.length>0){this._availableGeometryIds.sort(ascIdSort);geometryId=this._availableGeometryIds.shift();geometryInfoList[geometryId]=geometryInfo}else{geometryId=this._geometryCount;this._geometryCount++;geometryInfoList.push(geometryInfo)}this.setGeometryAt(geometryId,geometry);this._nextIndexStart=geometryInfo.indexStart+geometryInfo.reservedIndexCount;this._nextVertexStart=geometryInfo.vertexStart+geometryInfo.reservedVertexCount;return geometryId}setGeometryAt(geometryId,geometry){if(geometryId>=this._geometryCount){throw new Error("THREE.BatchedMesh: Maximum geometry count reached.")}this._validateGeometry(geometry);const batchGeometry=this.geometry;const hasIndex=batchGeometry.getIndex()!==null;const dstIndex=batchGeometry.getIndex();const srcIndex=geometry.getIndex();const geometryInfo=this._geometryInfo[geometryId];if(hasIndex&&srcIndex.count>geometryInfo.reservedIndexCount||geometry.attributes.position.count>geometryInfo.reservedVertexCount){throw new Error("THREE.BatchedMesh: Reserved space not large enough for provided geometry.")}const vertexStart=geometryInfo.vertexStart;const reservedVertexCount=geometryInfo.reservedVertexCount;geometryInfo.vertexCount=geometry.getAttribute("position").count;for(const attributeName in batchGeometry.attributes){const srcAttribute=geometry.getAttribute(attributeName);const dstAttribute=batchGeometry.getAttribute(attributeName);copyAttributeData(srcAttribute,dstAttribute,vertexStart);const itemSize=srcAttribute.itemSize;for(let i=srcAttribute.count,l=reservedVertexCount;i<l;i++){const index=vertexStart+i;for(let c=0;c<itemSize;c++){dstAttribute.setComponent(index,c,0)}}dstAttribute.needsUpdate=true;dstAttribute.addUpdateRange(vertexStart*itemSize,reservedVertexCount*itemSize)}if(hasIndex){const indexStart=geometryInfo.indexStart;const reservedIndexCount=geometryInfo.reservedIndexCount;geometryInfo.indexCount=geometry.getIndex().count;for(let i=0;i<srcIndex.count;i++){dstIndex.setX(indexStart+i,vertexStart+srcIndex.getX(i))}for(let i=srcIndex.count,l=reservedIndexCount;i<l;i++){dstIndex.setX(indexStart+i,vertexStart)}dstIndex.needsUpdate=true;dstIndex.addUpdateRange(indexStart,geometryInfo.reservedIndexCount)}geometryInfo.start=hasIndex?geometryInfo.indexStart:geometryInfo.vertexStart;geometryInfo.count=hasIndex?geometryInfo.indexCount:geometryInfo.vertexCount;geometryInfo.boundingBox=null;if(geometry.boundingBox!==null){geometryInfo.boundingBox=geometry.boundingBox.clone()}geometryInfo.boundingSphere=null;if(geometry.boundingSphere!==null){geometryInfo.boundingSphere=geometry.boundingSphere.clone()}this._visibilityChanged=true;return geometryId}deleteGeometry(geometryId){const geometryInfoList=this._geometryInfo;if(geometryId>=geometryInfoList.length||geometryInfoList[geometryId].active===false){return this}const instanceInfo=this._instanceInfo;for(let i=0,l=instanceInfo.length;i<l;i++){if(instanceInfo[i].active&&instanceInfo[i].geometryIndex===geometryId){this.deleteInstance(i)}}geometryInfoList[geometryId].active=false;this._availableGeometryIds.push(geometryId);this._visibilityChanged=true;return this}deleteInstance(instanceId){this.validateInstanceId(instanceId);this._instanceInfo[instanceId].active=false;this._availableInstanceIds.push(instanceId);this._visibilityChanged=true;return this}optimize(){let nextVertexStart=0;let nextIndexStart=0;const geometryInfoList=this._geometryInfo;const indices=geometryInfoList.map((e,i)=>i).sort((a,b)=>{return geometryInfoList[a].vertexStart-geometryInfoList[b].vertexStart});const geometry=this.geometry;for(let i=0,l=geometryInfoList.length;i<l;i++){const index=indices[i];const geometryInfo=geometryInfoList[index];if(geometryInfo.active===false){continue}if(geometry.index!==null){if(geometryInfo.indexStart!==nextIndexStart){const{indexStart,vertexStart,reservedIndexCount}=geometryInfo;const index=geometry.index;const array=index.array;const elementDelta=nextVertexStart-vertexStart;for(let j=indexStart;j<indexStart+reservedIndexCount;j++){array[j]=array[j]+elementDelta}index.array.copyWithin(nextIndexStart,indexStart,indexStart+reservedIndexCount);index.addUpdateRange(nextIndexStart,reservedIndexCount);index.needsUpdate=true;geometryInfo.indexStart=nextIndexStart}nextIndexStart+=geometryInfo.reservedIndexCount}if(geometryInfo.vertexStart!==nextVertexStart){const{vertexStart,reservedVertexCount}=geometryInfo;const attributes=geometry.attributes;for(const key in attributes){const attribute=attributes[key];const{array,itemSize}=attribute;array.copyWithin(nextVertexStart*itemSize,vertexStart*itemSize,(vertexStart+reservedVertexCount)*itemSize);attribute.addUpdateRange(nextVertexStart*itemSize,reservedVertexCount*itemSize);attribute.needsUpdate=true}geometryInfo.vertexStart=nextVertexStart}nextVertexStart+=geometryInfo.reservedVertexCount;geometryInfo.start=geometry.index?geometryInfo.indexStart:geometryInfo.vertexStart;this._nextIndexStart=geometry.index?geometryInfo.indexStart+geometryInfo.reservedIndexCount:0;this._nextVertexStart=geometryInfo.vertexStart+geometryInfo.reservedVertexCount}this._visibilityChanged=true;return this}getBoundingBoxAt(geometryId,target){if(geometryId>=this._geometryCount){return null}const geometry=this.geometry;const geometryInfo=this._geometryInfo[geometryId];if(geometryInfo.boundingBox===null){const box=new Box3;const index=geometry.index;const position=geometry.attributes.position;for(let i=geometryInfo.start,l=geometryInfo.start+geometryInfo.count;i<l;i++){let iv=i;if(index){iv=index.getX(iv)}box.expandByPoint(_vector$5.fromBufferAttribute(position,iv))}geometryInfo.boundingBox=box}target.copy(geometryInfo.boundingBox);return target}getBoundingSphereAt(geometryId,target){if(geometryId>=this._geometryCount){return null}const geometry=this.geometry;const geometryInfo=this._geometryInfo[geometryId];if(geometryInfo.boundingSphere===null){const sphere=new Sphere;this.getBoundingBoxAt(geometryId,_box$1);_box$1.getCenter(sphere.center);const index=geometry.index;const position=geometry.attributes.position;let maxRadiusSq=0;for(let i=geometryInfo.start,l=geometryInfo.start+geometryInfo.count;i<l;i++){let iv=i;if(index){iv=index.getX(iv)}_vector$5.fromBufferAttribute(position,iv);maxRadiusSq=Math.max(maxRadiusSq,sphere.center.distanceToSquared(_vector$5))}sphere.radius=Math.sqrt(maxRadiusSq);geometryInfo.boundingSphere=sphere}target.copy(geometryInfo.boundingSphere);return target}setMatrixAt(instanceId,matrix){this.validateInstanceId(instanceId);const matricesTexture=this._matricesTexture;const matricesArray=this._matricesTexture.image.data;matrix.toArray(matricesArray,instanceId*16);matricesTexture.needsUpdate=true;return this}getMatrixAt(instanceId,matrix){this.validateInstanceId(instanceId);return matrix.fromArray(this._matricesTexture.image.data,instanceId*16)}setColorAt(instanceId,color){this.validateInstanceId(instanceId);if(this._colorsTexture===null){this._initColorsTexture()}color.toArray(this._colorsTexture.image.data,instanceId*4);this._colorsTexture.needsUpdate=true;return this}getColorAt(instanceId,color){this.validateInstanceId(instanceId);return color.fromArray(this._colorsTexture.image.data,instanceId*4)}setVisibleAt(instanceId,visible){this.validateInstanceId(instanceId);if(this._instanceInfo[instanceId].visible===visible){return this}this._instanceInfo[instanceId].visible=visible;this._visibilityChanged=true;return this}getVisibleAt(instanceId){this.validateInstanceId(instanceId);return this._instanceInfo[instanceId].visible}setGeometryIdAt(instanceId,geometryId){this.validateInstanceId(instanceId);this.validateGeometryId(geometryId);this._instanceInfo[instanceId].geometryIndex=geometryId;return this}getGeometryIdAt(instanceId){this.validateInstanceId(instanceId);return this._instanceInfo[instanceId].geometryIndex}getGeometryRangeAt(geometryId,target={}){this.validateGeometryId(geometryId);const geometryInfo=this._geometryInfo[geometryId];target.vertexStart=geometryInfo.vertexStart;target.vertexCount=geometryInfo.vertexCount;target.reservedVertexCount=geometryInfo.reservedVertexCount;target.indexStart=geometryInfo.indexStart;target.indexCount=geometryInfo.indexCount;target.reservedIndexCount=geometryInfo.reservedIndexCount;target.start=geometryInfo.start;target.count=geometryInfo.count;return target}setInstanceCount(maxInstanceCount){const availableInstanceIds=this._availableInstanceIds;const instanceInfo=this._instanceInfo;availableInstanceIds.sort(ascIdSort);while(availableInstanceIds[availableInstanceIds.length-1]===instanceInfo.length-1){instanceInfo.pop();availableInstanceIds.pop()}if(maxInstanceCount<instanceInfo.length){throw new Error(`BatchedMesh: Instance ids outside the range ${maxInstanceCount} are being used. Cannot shrink instance count.`)}const multiDrawCounts=new Int32Array(maxInstanceCount);const multiDrawStarts=new Int32Array(maxInstanceCount);copyArrayContents(this._multiDrawCounts,multiDrawCounts);copyArrayContents(this._multiDrawStarts,multiDrawStarts);this._multiDrawCounts=multiDrawCounts;this._multiDrawStarts=multiDrawStarts;this._maxInstanceCount=maxInstanceCount;const indirectTexture=this._indirectTexture;const matricesTexture=this._matricesTexture;const colorsTexture=this._colorsTexture;indirectTexture.dispose();this._initIndirectTexture();copyArrayContents(indirectTexture.image.data,this._indirectTexture.image.data);matricesTexture.dispose();this._initMatricesTexture();copyArrayContents(matricesTexture.image.data,this._matricesTexture.image.data);if(colorsTexture){colorsTexture.dispose();this._initColorsTexture();copyArrayContents(colorsTexture.image.data,this._colorsTexture.image.data)}}setGeometrySize(maxVertexCount,maxIndexCount){const validRanges=[...this._geometryInfo].filter(info=>info.active);const requiredVertexLength=Math.max(...validRanges.map(range=>range.vertexStart+range.reservedVertexCount));if(requiredVertexLength>maxVertexCount){throw new Error(`BatchedMesh: Geometry vertex values are being used outside the range ${maxIndexCount}. Cannot shrink further.`)}if(this.geometry.index){const requiredIndexLength=Math.max(...validRanges.map(range=>range.indexStart+range.reservedIndexCount));if(requiredIndexLength>maxIndexCount){throw new Error(`BatchedMesh: Geometry index values are being used outside the range ${maxIndexCount}. Cannot shrink further.`)}}const oldGeometry=this.geometry;oldGeometry.dispose();this._maxVertexCount=maxVertexCount;this._maxIndexCount=maxIndexCount;if(this._geometryInitialized){this._geometryInitialized=false;this.geometry=new BufferGeometry;this._initializeGeometry(oldGeometry)}const geometry=this.geometry;if(oldGeometry.index){copyArrayContents(oldGeometry.index.array,geometry.index.array)}for(const key in oldGeometry.attributes){copyArrayContents(oldGeometry.attributes[key].array,geometry.attributes[key].array)}}raycast(raycaster,intersects){const instanceInfo=this._instanceInfo;const geometryInfoList=this._geometryInfo;const matrixWorld=this.matrixWorld;const batchGeometry=this.geometry;_mesh.material=this.material;_mesh.geometry.index=batchGeometry.index;_mesh.geometry.attributes=batchGeometry.attributes;if(_mesh.geometry.boundingBox===null){_mesh.geometry.boundingBox=new Box3}if(_mesh.geometry.boundingSphere===null){_mesh.geometry.boundingSphere=new Sphere}for(let i=0,l=instanceInfo.length;i<l;i++){if(!instanceInfo[i].visible||!instanceInfo[i].active){continue}const geometryId=instanceInfo[i].geometryIndex;const geometryInfo=geometryInfoList[geometryId];_mesh.geometry.setDrawRange(geometryInfo.start,geometryInfo.count);this.getMatrixAt(i,_mesh.matrixWorld).premultiply(matrixWorld);this.getBoundingBoxAt(geometryId,_mesh.geometry.boundingBox);this.getBoundingSphereAt(geometryId,_mesh.geometry.boundingSphere);_mesh.raycast(raycaster,_batchIntersects);for(let j=0,l=_batchIntersects.length;j<l;j++){const intersect=_batchIntersects[j];intersect.object=this;intersect.batchId=i;intersects.push(intersect)}_batchIntersects.length=0}_mesh.material=null;_mesh.geometry.index=null;_mesh.geometry.attributes={};_mesh.geometry.setDrawRange(0,Infinity)}copy(source){super.copy(source);this.geometry=source.geometry.clone();this.perObjectFrustumCulled=source.perObjectFrustumCulled;this.sortObjects=source.sortObjects;this.boundingBox=source.boundingBox!==null?source.boundingBox.clone():null;this.boundingSphere=source.boundingSphere!==null?source.boundingSphere.clone():null;this._geometryInfo=source._geometryInfo.map(info=>({...info,boundingBox:info.boundingBox!==null?info.boundingBox.clone():null,boundingSphere:info.boundingSphere!==null?info.boundingSphere.clone():null}));this._instanceInfo=source._instanceInfo.map(info=>({...info}));this._availableInstanceIds=source._availableInstanceIds.slice();this._availableGeometryIds=source._availableGeometryIds.slice();this._nextIndexStart=source._nextIndexStart;this._nextVertexStart=source._nextVertexStart;this._geometryCount=source._geometryCount;this._maxInstanceCount=source._maxInstanceCount;this._maxVertexCount=source._maxVertexCount;this._maxIndexCount=source._maxIndexCount;this._geometryInitialized=source._geometryInitialized;this._multiDrawCounts=source._multiDrawCounts.slice();this._multiDrawStarts=source._multiDrawStarts.slice();this._indirectTexture=source._indirectTexture.clone();this._indirectTexture.image.data=this._indirectTexture.image.data.slice();this._matricesTexture=source._matricesTexture.clone();this._matricesTexture.image.data=this._matricesTexture.image.data.slice();if(this._colorsTexture!==null){this._colorsTexture=source._colorsTexture.clone();this._colorsTexture.image.data=this._colorsTexture.image.data.slice()}return this}dispose(){this.geometry.dispose();this._matricesTexture.dispose();this._matricesTexture=null;this._indirectTexture.dispose();this._indirectTexture=null;if(this._colorsTexture!==null){this._colorsTexture.dispose();this._colorsTexture=null}}onBeforeRender(renderer,scene,camera,geometry,material){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects){return}const index=geometry.getIndex();const bytesPerElement=index===null?1:index.array.BYTES_PER_ELEMENT;const instanceInfo=this._instanceInfo;const multiDrawStarts=this._multiDrawStarts;const multiDrawCounts=this._multiDrawCounts;const geometryInfoList=this._geometryInfo;const perObjectFrustumCulled=this.perObjectFrustumCulled;const indirectTexture=this._indirectTexture;const indirectArray=indirectTexture.image.data;const frustum=camera.isArrayCamera?_frustumArray:_frustum;if(perObjectFrustumCulled&&!camera.isArrayCamera){_matrix$1.multiplyMatrices(camera.projectionMatrix,camera.matrixWorldInverse).multiply(this.matrixWorld);_frustum.setFromProjectionMatrix(_matrix$1,camera.coordinateSystem,camera.reversedDepth)}let multiDrawCount=0;if(this.sortObjects){_matrix$1.copy(this.matrixWorld).invert();_vector$5.setFromMatrixPosition(camera.matrixWorld).applyMatrix4(_matrix$1);_forward$1.set(0,0,-1).transformDirection(camera.matrixWorld).transformDirection(_matrix$1);for(let i=0,l=instanceInfo.length;i<l;i++){if(instanceInfo[i].visible&&instanceInfo[i].active){const geometryId=instanceInfo[i].geometryIndex;this.getMatrixAt(i,_matrix$1);this.getBoundingSphereAt(geometryId,_sphere$2).applyMatrix4(_matrix$1);let culled=false;if(perObjectFrustumCulled){culled=!frustum.intersectsSphere(_sphere$2,camera)}if(!culled){const geometryInfo=geometryInfoList[geometryId];const z=_temp.subVectors(_sphere$2.center,_vector$5).dot(_forward$1);_renderList.push(geometryInfo.start,geometryInfo.count,z,i)}}}const list=_renderList.list;const customSort=this.customSort;if(customSort===null){list.sort(material.transparent?sortTransparent:sortOpaque)}else{customSort.call(this,list,camera)}for(let i=0,l=list.length;i<l;i++){const item=list[i];multiDrawStarts[multiDrawCount]=item.start*bytesPerElement;multiDrawCounts[multiDrawCount]=item.count;indirectArray[multiDrawCount]=item.index;multiDrawCount++}_renderList.reset()}else{for(let i=0,l=instanceInfo.length;i<l;i++){if(instanceInfo[i].visible&&instanceInfo[i].active){const geometryId=instanceInfo[i].geometryIndex;let culled=false;if(perObjectFrustumCulled){this.getMatrixAt(i,_matrix$1);this.getBoundingSphereAt(geometryId,_sphere$2).applyMatrix4(_matrix$1);culled=!frustum.intersectsSphere(_sphere$2,camera)}if(!culled){const geometryInfo=geometryInfoList[geometryId];multiDrawStarts[multiDrawCount]=geometryInfo.start*bytesPerElement;multiDrawCounts[multiDrawCount]=geometryInfo.count;indirectArray[multiDrawCount]=i;multiDrawCount++}}}}indirectTexture.needsUpdate=true;this._multiDrawCount=multiDrawCount;this._visibilityChanged=false}onBeforeShadow(renderer,object,camera,shadowCamera,geometry,depthMaterial){this.onBeforeRender(renderer,null,shadowCamera,geometry,depthMaterial)}}class LineBasicMaterial extends Material{constructor(parameters){super();this.isLineBasicMaterial=true;this.type="LineBasicMaterial";this.color=new Color(16777215);this.map=null;this.linewidth=1;this.linecap="round";this.linejoin="round";this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.color.copy(source.color);this.map=source.map;this.linewidth=source.linewidth;this.linecap=source.linecap;this.linejoin=source.linejoin;this.fog=source.fog;return this}}const _vStart=new Vector3;const _vEnd=new Vector3;const _inverseMatrix$1=new Matrix4;const _ray$1=new Ray;const _sphere$1=new Sphere;const _intersectPointOnRay=new Vector3;const _intersectPointOnSegment=new Vector3;class Line extends Object3D{constructor(geometry=new BufferGeometry,material=new LineBasicMaterial){super();this.isLine=true;this.type="Line";this.geometry=geometry;this.material=material;this.morphTargetDictionary=undefined;this.morphTargetInfluences=undefined;this.updateMorphTargets()}copy(source,recursive){super.copy(source,recursive);this.material=Array.isArray(source.material)?source.material.slice():source.material;this.geometry=source.geometry;return this}computeLineDistances(){const geometry=this.geometry;if(geometry.index===null){const positionAttribute=geometry.attributes.position;const lineDistances=[0];for(let i=1,l=positionAttribute.count;i<l;i++){_vStart.fromBufferAttribute(positionAttribute,i-1);_vEnd.fromBufferAttribute(positionAttribute,i);lineDistances[i]=lineDistances[i-1];lineDistances[i]+=_vStart.distanceTo(_vEnd)}geometry.setAttribute("lineDistance",new Float32BufferAttribute(lineDistances,1))}else{warn("Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.")}return this}raycast(raycaster,intersects){const geometry=this.geometry;const matrixWorld=this.matrixWorld;const threshold=raycaster.params.Line.threshold;const drawRange=geometry.drawRange;if(geometry.boundingSphere===null)geometry.computeBoundingSphere();_sphere$1.copy(geometry.boundingSphere);_sphere$1.applyMatrix4(matrixWorld);_sphere$1.radius+=threshold;if(raycaster.ray.intersectsSphere(_sphere$1)===false)return;_inverseMatrix$1.copy(matrixWorld).invert();_ray$1.copy(raycaster.ray).applyMatrix4(_inverseMatrix$1);const localThreshold=threshold/((this.scale.x+this.scale.y+this.scale.z)/3);const localThresholdSq=localThreshold*localThreshold;const step=this.isLineSegments?2:1;const index=geometry.index;const attributes=geometry.attributes;const positionAttribute=attributes.position;if(index!==null){const start=Math.max(0,drawRange.start);const end=Math.min(index.count,drawRange.start+drawRange.count);for(let i=start,l=end-1;i<l;i+=step){const a=index.getX(i);const b=index.getX(i+1);const intersect=checkIntersection(this,raycaster,_ray$1,localThresholdSq,a,b,i);if(intersect){intersects.push(intersect)}}if(this.isLineLoop){const a=index.getX(end-1);const b=index.getX(start);const intersect=checkIntersection(this,raycaster,_ray$1,localThresholdSq,a,b,end-1);if(intersect){intersects.push(intersect)}}}else{const start=Math.max(0,drawRange.start);const end=Math.min(positionAttribute.count,drawRange.start+drawRange.count);for(let i=start,l=end-1;i<l;i+=step){const intersect=checkIntersection(this,raycaster,_ray$1,localThresholdSq,i,i+1,i);if(intersect){intersects.push(intersect)}}if(this.isLineLoop){const intersect=checkIntersection(this,raycaster,_ray$1,localThresholdSq,end-1,start,end-1);if(intersect){intersects.push(intersect)}}}}updateMorphTargets(){const geometry=this.geometry;const morphAttributes=geometry.morphAttributes;const keys=Object.keys(morphAttributes);if(keys.length>0){const morphAttribute=morphAttributes[keys[0]];if(morphAttribute!==undefined){this.morphTargetInfluences=[];this.morphTargetDictionary={};for(let m=0,ml=morphAttribute.length;m<ml;m++){const name=morphAttribute[m].name||String(m);this.morphTargetInfluences.push(0);this.morphTargetDictionary[name]=m}}}}}function checkIntersection(object,raycaster,ray,thresholdSq,a,b,i){const positionAttribute=object.geometry.attributes.position;_vStart.fromBufferAttribute(positionAttribute,a);_vEnd.fromBufferAttribute(positionAttribute,b);const distSq=ray.distanceSqToSegment(_vStart,_vEnd,_intersectPointOnRay,_intersectPointOnSegment);if(distSq>thresholdSq)return;_intersectPointOnRay.applyMatrix4(object.matrixWorld);const distance=raycaster.ray.origin.distanceTo(_intersectPointOnRay);if(distance<raycaster.near||distance>raycaster.far)return;return{distance:distance,point:_intersectPointOnSegment.clone().applyMatrix4(object.matrixWorld),index:i,face:null,faceIndex:null,barycoord:null,object:object}}const _start=new Vector3;const _end=new Vector3;class LineSegments extends Line{constructor(geometry,material){super(geometry,material);this.isLineSegments=true;this.type="LineSegments"}computeLineDistances(){const geometry=this.geometry;if(geometry.index===null){const positionAttribute=geometry.attributes.position;const lineDistances=[];for(let i=0,l=positionAttribute.count;i<l;i+=2){_start.fromBufferAttribute(positionAttribute,i);_end.fromBufferAttribute(positionAttribute,i+1);lineDistances[i]=i===0?0:lineDistances[i-1];lineDistances[i+1]=lineDistances[i]+_start.distanceTo(_end)}geometry.setAttribute("lineDistance",new Float32BufferAttribute(lineDistances,1))}else{warn("LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.")}return this}}class LineLoop extends Line{constructor(geometry,material){super(geometry,material);this.isLineLoop=true;this.type="LineLoop"}}class PointsMaterial extends Material{constructor(parameters){super();this.isPointsMaterial=true;this.type="PointsMaterial";this.color=new Color(16777215);this.map=null;this.alphaMap=null;this.size=1;this.sizeAttenuation=true;this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.color.copy(source.color);this.map=source.map;this.alphaMap=source.alphaMap;this.size=source.size;this.sizeAttenuation=source.sizeAttenuation;this.fog=source.fog;return this}}const _inverseMatrix=new Matrix4;const _ray=new Ray;const _sphere=new Sphere;const _position$2=new Vector3;class Points extends Object3D{constructor(geometry=new BufferGeometry,material=new PointsMaterial){super();this.isPoints=true;this.type="Points";this.geometry=geometry;this.material=material;this.morphTargetDictionary=undefined;this.morphTargetInfluences=undefined;this.updateMorphTargets()}copy(source,recursive){super.copy(source,recursive);this.material=Array.isArray(source.material)?source.material.slice():source.material;this.geometry=source.geometry;return this}raycast(raycaster,intersects){const geometry=this.geometry;const matrixWorld=this.matrixWorld;const threshold=raycaster.params.Points.threshold;const drawRange=geometry.drawRange;if(geometry.boundingSphere===null)geometry.computeBoundingSphere();_sphere.copy(geometry.boundingSphere);_sphere.applyMatrix4(matrixWorld);_sphere.radius+=threshold;if(raycaster.ray.intersectsSphere(_sphere)===false)return;_inverseMatrix.copy(matrixWorld).invert();_ray.copy(raycaster.ray).applyMatrix4(_inverseMatrix);const localThreshold=threshold/((this.scale.x+this.scale.y+this.scale.z)/3);const localThresholdSq=localThreshold*localThreshold;const index=geometry.index;const attributes=geometry.attributes;const positionAttribute=attributes.position;if(index!==null){const start=Math.max(0,drawRange.start);const end=Math.min(index.count,drawRange.start+drawRange.count);for(let i=start,il=end;i<il;i++){const a=index.getX(i);_position$2.fromBufferAttribute(positionAttribute,a);testPoint(_position$2,a,localThresholdSq,matrixWorld,raycaster,intersects,this)}}else{const start=Math.max(0,drawRange.start);const end=Math.min(positionAttribute.count,drawRange.start+drawRange.count);for(let i=start,l=end;i<l;i++){_position$2.fromBufferAttribute(positionAttribute,i);testPoint(_position$2,i,localThresholdSq,matrixWorld,raycaster,intersects,this)}}}updateMorphTargets(){const geometry=this.geometry;const morphAttributes=geometry.morphAttributes;const keys=Object.keys(morphAttributes);if(keys.length>0){const morphAttribute=morphAttributes[keys[0]];if(morphAttribute!==undefined){this.morphTargetInfluences=[];this.morphTargetDictionary={};for(let m=0,ml=morphAttribute.length;m<ml;m++){const name=morphAttribute[m].name||String(m);this.morphTargetInfluences.push(0);this.morphTargetDictionary[name]=m}}}}}function testPoint(point,index,localThresholdSq,matrixWorld,raycaster,intersects,object){const rayPointDistanceSq=_ray.distanceSqToPoint(point);if(rayPointDistanceSq<localThresholdSq){const intersectPoint=new Vector3;_ray.closestPointToPoint(point,intersectPoint);intersectPoint.applyMatrix4(matrixWorld);const distance=raycaster.ray.origin.distanceTo(intersectPoint);if(distance<raycaster.near||distance>raycaster.far)return;intersects.push({distance:distance,distanceToRay:Math.sqrt(rayPointDistanceSq),point:intersectPoint,index:index,face:null,faceIndex:null,barycoord:null,object:object})}}class VideoTexture extends Texture{constructor(video,mapping,wrapS,wrapT,magFilter=LinearFilter,minFilter=LinearFilter,format,type,anisotropy){super(video,mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy);this.isVideoTexture=true;this.generateMipmaps=false;this._requestVideoFrameCallbackId=0;const scope=this;function updateVideo(){scope.needsUpdate=true;scope._requestVideoFrameCallbackId=video.requestVideoFrameCallback(updateVideo)}if("requestVideoFrameCallback"in video){this._requestVideoFrameCallbackId=video.requestVideoFrameCallback(updateVideo)}}clone(){return new this.constructor(this.image).copy(this)}update(){const video=this.image;const hasVideoFrameCallback=("requestVideoFrameCallback"in video);if(hasVideoFrameCallback===false&&video.readyState>=video.HAVE_CURRENT_DATA){this.needsUpdate=true}}dispose(){if(this._requestVideoFrameCallbackId!==0){this.source.data.cancelVideoFrameCallback(this._requestVideoFrameCallbackId);this._requestVideoFrameCallbackId=0}super.dispose()}}class VideoFrameTexture extends VideoTexture{constructor(mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy){super({},mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy);this.isVideoFrameTexture=true}update(){}clone(){return new this.constructor().copy(this)}setFrame(frame){this.image=frame;this.needsUpdate=true}}class FramebufferTexture extends Texture{constructor(width,height){super({width,height});this.isFramebufferTexture=true;this.magFilter=NearestFilter;this.minFilter=NearestFilter;this.generateMipmaps=false;this.needsUpdate=true}}class CompressedTexture extends Texture{constructor(mipmaps,width,height,format,type,mapping,wrapS,wrapT,magFilter,minFilter,anisotropy,colorSpace){super(null,mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy,colorSpace);this.isCompressedTexture=true;this.image={width:width,height:height};this.mipmaps=mipmaps;this.flipY=false;this.generateMipmaps=false}}class CompressedArrayTexture extends CompressedTexture{constructor(mipmaps,width,height,depth,format,type){super(mipmaps,width,height,format,type);this.isCompressedArrayTexture=true;this.image.depth=depth;this.wrapR=ClampToEdgeWrapping;this.layerUpdates=new Set}addLayerUpdate(layerIndex){this.layerUpdates.add(layerIndex)}clearLayerUpdates(){this.layerUpdates.clear()}}class CompressedCubeTexture extends CompressedTexture{constructor(images,format,type){super(undefined,images[0].width,images[0].height,format,type,CubeReflectionMapping);this.isCompressedCubeTexture=true;this.isCubeTexture=true;this.image=images}}class CanvasTexture extends Texture{constructor(canvas,mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy){super(canvas,mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy);this.isCanvasTexture=true;this.needsUpdate=true}}class DepthTexture extends Texture{constructor(width,height,type=UnsignedIntType,mapping,wrapS,wrapT,magFilter=NearestFilter,minFilter=NearestFilter,anisotropy,format=DepthFormat,depth=1){if(format!==DepthFormat&&format!==DepthStencilFormat){throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat")}const image={width:width,height:height,depth:depth};super(image,mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy);this.isDepthTexture=true;this.flipY=false;this.generateMipmaps=false;this.compareFunction=null}copy(source){super.copy(source);this.source=new Source(Object.assign({},source.image));this.compareFunction=source.compareFunction;return this}toJSON(meta){const data=super.toJSON(meta);if(this.compareFunction!==null)data.compareFunction=this.compareFunction;return data}}class CubeDepthTexture extends DepthTexture{constructor(size,type=UnsignedIntType,mapping=CubeReflectionMapping,wrapS,wrapT,magFilter=NearestFilter,minFilter=NearestFilter,anisotropy,format=DepthFormat){const image={width:size,height:size,depth:1};const images=[image,image,image,image,image,image];super(size,size,type,mapping,wrapS,wrapT,magFilter,minFilter,anisotropy,format);this.image=images;this.isCubeDepthTexture=true;this.isCubeTexture=true}get images(){return this.image}set images(value){this.image=value}}class ExternalTexture extends Texture{constructor(sourceTexture=null){super();this.sourceTexture=sourceTexture;this.isExternalTexture=true}copy(source){super.copy(source);this.sourceTexture=source.sourceTexture;return this}}class CapsuleGeometry extends BufferGeometry{constructor(radius=1,height=1,capSegments=4,radialSegments=8,heightSegments=1){super();this.type="CapsuleGeometry";this.parameters={radius:radius,height:height,capSegments:capSegments,radialSegments:radialSegments,heightSegments:heightSegments};height=Math.max(0,height);capSegments=Math.max(1,Math.floor(capSegments));radialSegments=Math.max(3,Math.floor(radialSegments));heightSegments=Math.max(1,Math.floor(heightSegments));const indices=[];const vertices=[];const normals=[];const uvs=[];const halfHeight=height/2;const capArcLength=Math.PI/2*radius;const cylinderPartLength=height;const totalArcLength=2*capArcLength+cylinderPartLength;const numVerticalSegments=capSegments*2+heightSegments;const verticesPerRow=radialSegments+1;const normal=new Vector3;const vertex=new Vector3;for(let iy=0;iy<=numVerticalSegments;iy++){let currentArcLength=0;let profileY=0;let profileRadius=0;let normalYComponent=0;if(iy<=capSegments){const segmentProgress=iy/capSegments;const angle=segmentProgress*Math.PI/2;profileY=-halfHeight-radius*Math.cos(angle);profileRadius=radius*Math.sin(angle);normalYComponent=-radius*Math.cos(angle);currentArcLength=segmentProgress*capArcLength}else if(iy<=capSegments+heightSegments){const segmentProgress=(iy-capSegments)/heightSegments;profileY=-halfHeight+segmentProgress*height;profileRadius=radius;normalYComponent=0;currentArcLength=capArcLength+segmentProgress*cylinderPartLength}else{const segmentProgress=(iy-capSegments-heightSegments)/capSegments;const angle=segmentProgress*Math.PI/2;profileY=halfHeight+radius*Math.sin(angle);profileRadius=radius*Math.cos(angle);normalYComponent=radius*Math.sin(angle);currentArcLength=capArcLength+cylinderPartLength+segmentProgress*capArcLength}const v=Math.max(0,Math.min(1,currentArcLength/totalArcLength));let uOffset=0;if(iy===0){uOffset=0.5/radialSegments}else if(iy===numVerticalSegments){uOffset=-0.5/radialSegments}for(let ix=0;ix<=radialSegments;ix++){const u=ix/radialSegments;const theta=u*Math.PI*2;const sinTheta=Math.sin(theta);const cosTheta=Math.cos(theta);vertex.x=-profileRadius*cosTheta;vertex.y=profileY;vertex.z=profileRadius*sinTheta;vertices.push(vertex.x,vertex.y,vertex.z);normal.set(-profileRadius*cosTheta,normalYComponent,profileRadius*sinTheta);normal.normalize();normals.push(normal.x,normal.y,normal.z);uvs.push(u+uOffset,v)}if(iy>0){const prevIndexRow=(iy-1)*verticesPerRow;for(let ix=0;ix<radialSegments;ix++){const i1=prevIndexRow+ix;const i2=prevIndexRow+ix+1;const i3=iy*verticesPerRow+ix;const i4=iy*verticesPerRow+ix+1;indices.push(i1,i2,i3);indices.push(i2,i4,i3)}}}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2))}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new CapsuleGeometry(data.radius,data.height,data.capSegments,data.radialSegments,data.heightSegments)}}class CircleGeometry extends BufferGeometry{constructor(radius=1,segments=32,thetaStart=0,thetaLength=Math.PI*2){super();this.type="CircleGeometry";this.parameters={radius:radius,segments:segments,thetaStart:thetaStart,thetaLength:thetaLength};segments=Math.max(3,segments);const indices=[];const vertices=[];const normals=[];const uvs=[];const vertex=new Vector3;const uv=new Vector2;vertices.push(0,0,0);normals.push(0,0,1);uvs.push(0.5,0.5);for(let s=0,i=3;s<=segments;s++,i+=3){const segment=thetaStart+s/segments*thetaLength;vertex.x=radius*Math.cos(segment);vertex.y=radius*Math.sin(segment);vertices.push(vertex.x,vertex.y,vertex.z);normals.push(0,0,1);uv.x=(vertices[i]/radius+1)/2;uv.y=(vertices[i+1]/radius+1)/2;uvs.push(uv.x,uv.y)}for(let i=1;i<=segments;i++){indices.push(i,i+1,0)}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2))}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new CircleGeometry(data.radius,data.segments,data.thetaStart,data.thetaLength)}}class CylinderGeometry extends BufferGeometry{constructor(radiusTop=1,radiusBottom=1,height=1,radialSegments=32,heightSegments=1,openEnded=false,thetaStart=0,thetaLength=Math.PI*2){super();this.type="CylinderGeometry";this.parameters={radiusTop:radiusTop,radiusBottom:radiusBottom,height:height,radialSegments:radialSegments,heightSegments:heightSegments,openEnded:openEnded,thetaStart:thetaStart,thetaLength:thetaLength};const scope=this;radialSegments=Math.floor(radialSegments);heightSegments=Math.floor(heightSegments);const indices=[];const vertices=[];const normals=[];const uvs=[];let index=0;const indexArray=[];const halfHeight=height/2;let groupStart=0;generateTorso();if(openEnded===false){if(radiusTop>0)generateCap(true);if(radiusBottom>0)generateCap(false)}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2));function generateTorso(){const normal=new Vector3;const vertex=new Vector3;let groupCount=0;const slope=(radiusBottom-radiusTop)/height;for(let y=0;y<=heightSegments;y++){const indexRow=[];const v=y/heightSegments;const radius=v*(radiusBottom-radiusTop)+radiusTop;for(let x=0;x<=radialSegments;x++){const u=x/radialSegments;const theta=u*thetaLength+thetaStart;const sinTheta=Math.sin(theta);const cosTheta=Math.cos(theta);vertex.x=radius*sinTheta;vertex.y=-v*height+halfHeight;vertex.z=radius*cosTheta;vertices.push(vertex.x,vertex.y,vertex.z);normal.set(sinTheta,slope,cosTheta).normalize();normals.push(normal.x,normal.y,normal.z);uvs.push(u,1-v);indexRow.push(index++)}indexArray.push(indexRow)}for(let x=0;x<radialSegments;x++){for(let y=0;y<heightSegments;y++){const a=indexArray[y][x];const b=indexArray[y+1][x];const c=indexArray[y+1][x+1];const d=indexArray[y][x+1];if(radiusTop>0||y!==0){indices.push(a,b,d);groupCount+=3}if(radiusBottom>0||y!==heightSegments-1){indices.push(b,c,d);groupCount+=3}}}scope.addGroup(groupStart,groupCount,0);groupStart+=groupCount}function generateCap(top){const centerIndexStart=index;const uv=new Vector2;const vertex=new Vector3;let groupCount=0;const radius=top===true?radiusTop:radiusBottom;const sign=top===true?1:-1;for(let x=1;x<=radialSegments;x++){vertices.push(0,halfHeight*sign,0);normals.push(0,sign,0);uvs.push(0.5,0.5);index++}const centerIndexEnd=index;for(let x=0;x<=radialSegments;x++){const u=x/radialSegments;const theta=u*thetaLength+thetaStart;const cosTheta=Math.cos(theta);const sinTheta=Math.sin(theta);vertex.x=radius*sinTheta;vertex.y=halfHeight*sign;vertex.z=radius*cosTheta;vertices.push(vertex.x,vertex.y,vertex.z);normals.push(0,sign,0);uv.x=cosTheta*0.5+0.5;uv.y=sinTheta*0.5*sign+0.5;uvs.push(uv.x,uv.y);index++}for(let x=0;x<radialSegments;x++){const c=centerIndexStart+x;const i=centerIndexEnd+x;if(top===true){indices.push(i,i+1,c)}else{indices.push(i+1,i,c)}groupCount+=3}scope.addGroup(groupStart,groupCount,top===true?1:2);groupStart+=groupCount}}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new CylinderGeometry(data.radiusTop,data.radiusBottom,data.height,data.radialSegments,data.heightSegments,data.openEnded,data.thetaStart,data.thetaLength)}}class ConeGeometry extends CylinderGeometry{constructor(radius=1,height=1,radialSegments=32,heightSegments=1,openEnded=false,thetaStart=0,thetaLength=Math.PI*2){super(0,radius,height,radialSegments,heightSegments,openEnded,thetaStart,thetaLength);this.type="ConeGeometry";this.parameters={radius:radius,height:height,radialSegments:radialSegments,heightSegments:heightSegments,openEnded:openEnded,thetaStart:thetaStart,thetaLength:thetaLength}}static fromJSON(data){return new ConeGeometry(data.radius,data.height,data.radialSegments,data.heightSegments,data.openEnded,data.thetaStart,data.thetaLength)}}class PolyhedronGeometry extends BufferGeometry{constructor(vertices=[],indices=[],radius=1,detail=0){super();this.type="PolyhedronGeometry";this.parameters={vertices:vertices,indices:indices,radius:radius,detail:detail};const vertexBuffer=[];const uvBuffer=[];subdivide(detail);applyRadius(radius);generateUVs();this.setAttribute("position",new Float32BufferAttribute(vertexBuffer,3));this.setAttribute("normal",new Float32BufferAttribute(vertexBuffer.slice(),3));this.setAttribute("uv",new Float32BufferAttribute(uvBuffer,2));if(detail===0){this.computeVertexNormals()}else{this.normalizeNormals()}function subdivide(detail){const a=new Vector3;const b=new Vector3;const c=new Vector3;for(let i=0;i<indices.length;i+=3){getVertexByIndex(indices[i+0],a);getVertexByIndex(indices[i+1],b);getVertexByIndex(indices[i+2],c);subdivideFace(a,b,c,detail)}}function subdivideFace(a,b,c,detail){const cols=detail+1;const v=[];for(let i=0;i<=cols;i++){v[i]=[];const aj=a.clone().lerp(c,i/cols);const bj=b.clone().lerp(c,i/cols);const rows=cols-i;for(let j=0;j<=rows;j++){if(j===0&&i===cols){v[i][j]=aj}else{v[i][j]=aj.clone().lerp(bj,j/rows)}}}for(let i=0;i<cols;i++){for(let j=0;j<2*(cols-i)-1;j++){const k=Math.floor(j/2);if(j%2===0){pushVertex(v[i][k+1]);pushVertex(v[i+1][k]);pushVertex(v[i][k])}else{pushVertex(v[i][k+1]);pushVertex(v[i+1][k+1]);pushVertex(v[i+1][k])}}}}function applyRadius(radius){const vertex=new Vector3;for(let i=0;i<vertexBuffer.length;i+=3){vertex.x=vertexBuffer[i+0];vertex.y=vertexBuffer[i+1];vertex.z=vertexBuffer[i+2];vertex.normalize().multiplyScalar(radius);vertexBuffer[i+0]=vertex.x;vertexBuffer[i+1]=vertex.y;vertexBuffer[i+2]=vertex.z}}function generateUVs(){const vertex=new Vector3;for(let i=0;i<vertexBuffer.length;i+=3){vertex.x=vertexBuffer[i+0];vertex.y=vertexBuffer[i+1];vertex.z=vertexBuffer[i+2];const u=azimuth(vertex)/2/Math.PI+0.5;const v=inclination(vertex)/Math.PI+0.5;uvBuffer.push(u,1-v)}correctUVs();correctSeam()}function correctSeam(){for(let i=0;i<uvBuffer.length;i+=6){const x0=uvBuffer[i+0];const x1=uvBuffer[i+2];const x2=uvBuffer[i+4];const max=Math.max(x0,x1,x2);const min=Math.min(x0,x1,x2);if(max>0.9&&min<0.1){if(x0<0.2)uvBuffer[i+0]+=1;if(x1<0.2)uvBuffer[i+2]+=1;if(x2<0.2)uvBuffer[i+4]+=1}}}function pushVertex(vertex){vertexBuffer.push(vertex.x,vertex.y,vertex.z)}function getVertexByIndex(index,vertex){const stride=index*3;vertex.x=vertices[stride+0];vertex.y=vertices[stride+1];vertex.z=vertices[stride+2]}function correctUVs(){const a=new Vector3;const b=new Vector3;const c=new Vector3;const centroid=new Vector3;const uvA=new Vector2;const uvB=new Vector2;const uvC=new Vector2;for(let i=0,j=0;i<vertexBuffer.length;i+=9,j+=6){a.set(vertexBuffer[i+0],vertexBuffer[i+1],vertexBuffer[i+2]);b.set(vertexBuffer[i+3],vertexBuffer[i+4],vertexBuffer[i+5]);c.set(vertexBuffer[i+6],vertexBuffer[i+7],vertexBuffer[i+8]);uvA.set(uvBuffer[j+0],uvBuffer[j+1]);uvB.set(uvBuffer[j+2],uvBuffer[j+3]);uvC.set(uvBuffer[j+4],uvBuffer[j+5]);centroid.copy(a).add(b).add(c).divideScalar(3);const azi=azimuth(centroid);correctUV(uvA,j+0,a,azi);correctUV(uvB,j+2,b,azi);correctUV(uvC,j+4,c,azi)}}function correctUV(uv,stride,vector,azimuth){if(azimuth<0&&uv.x===1){uvBuffer[stride]=uv.x-1}if(vector.x===0&&vector.z===0){uvBuffer[stride]=azimuth/2/Math.PI+0.5}}function azimuth(vector){return Math.atan2(vector.z,-vector.x)}function inclination(vector){return Math.atan2(-vector.y,Math.sqrt(vector.x*vector.x+vector.z*vector.z))}}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new PolyhedronGeometry(data.vertices,data.indices,data.radius,data.detail)}}class DodecahedronGeometry extends PolyhedronGeometry{constructor(radius=1,detail=0){const t=(1+Math.sqrt(5))/2;const r=1/t;const vertices=[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-r,-t,0,-r,t,0,r,-t,0,r,t,-r,-t,0,-r,t,0,r,-t,0,r,t,0,-t,0,-r,t,0,-r,-t,0,r,t,0,r];const indices=[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9];super(vertices,indices,radius,detail);this.type="DodecahedronGeometry";this.parameters={radius:radius,detail:detail}}static fromJSON(data){return new DodecahedronGeometry(data.radius,data.detail)}}const _v0$1=new Vector3;const _v1$1=new Vector3;const _normal=new Vector3;const _triangle=new Triangle;class EdgesGeometry extends BufferGeometry{constructor(geometry=null,thresholdAngle=1){super();this.type="EdgesGeometry";this.parameters={geometry:geometry,thresholdAngle:thresholdAngle};if(geometry!==null){const precisionPoints=4;const precision=Math.pow(10,precisionPoints);const thresholdDot=Math.cos(DEG2RAD*thresholdAngle);const indexAttr=geometry.getIndex();const positionAttr=geometry.getAttribute("position");const indexCount=indexAttr?indexAttr.count:positionAttr.count;const indexArr=[0,0,0];const vertKeys=["a","b","c"];const hashes=new Array(3);const edgeData={};const vertices=[];for(let i=0;i<indexCount;i+=3){if(indexAttr){indexArr[0]=indexAttr.getX(i);indexArr[1]=indexAttr.getX(i+1);indexArr[2]=indexAttr.getX(i+2)}else{indexArr[0]=i;indexArr[1]=i+1;indexArr[2]=i+2}const{a,b,c}=_triangle;a.fromBufferAttribute(positionAttr,indexArr[0]);b.fromBufferAttribute(positionAttr,indexArr[1]);c.fromBufferAttribute(positionAttr,indexArr[2]);_triangle.getNormal(_normal);hashes[0]=`${Math.round(a.x*precision)},${Math.round(a.y*precision)},${Math.round(a.z*precision)}`;hashes[1]=`${Math.round(b.x*precision)},${Math.round(b.y*precision)},${Math.round(b.z*precision)}`;hashes[2]=`${Math.round(c.x*precision)},${Math.round(c.y*precision)},${Math.round(c.z*precision)}`;if(hashes[0]===hashes[1]||hashes[1]===hashes[2]||hashes[2]===hashes[0]){continue}for(let j=0;j<3;j++){const jNext=(j+1)%3;const vecHash0=hashes[j];const vecHash1=hashes[jNext];const v0=_triangle[vertKeys[j]];const v1=_triangle[vertKeys[jNext]];const hash=`${vecHash0}_${vecHash1}`;const reverseHash=`${vecHash1}_${vecHash0}`;if(reverseHash in edgeData&&edgeData[reverseHash]){if(_normal.dot(edgeData[reverseHash].normal)<=thresholdDot){vertices.push(v0.x,v0.y,v0.z);vertices.push(v1.x,v1.y,v1.z)}edgeData[reverseHash]=null}else if(!(hash in edgeData)){edgeData[hash]={index0:indexArr[j],index1:indexArr[jNext],normal:_normal.clone()}}}}for(const key in edgeData){if(edgeData[key]){const{index0,index1}=edgeData[key];_v0$1.fromBufferAttribute(positionAttr,index0);_v1$1.fromBufferAttribute(positionAttr,index1);vertices.push(_v0$1.x,_v0$1.y,_v0$1.z);vertices.push(_v1$1.x,_v1$1.y,_v1$1.z)}}this.setAttribute("position",new Float32BufferAttribute(vertices,3))}}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}}class Curve{constructor(){this.type="Curve";this.arcLengthDivisions=200;this.needsUpdate=false;this.cacheArcLengths=null}getPoint(){warn("Curve: .getPoint() not implemented.")}getPointAt(u,optionalTarget){const t=this.getUtoTmapping(u);return this.getPoint(t,optionalTarget)}getPoints(divisions=5){const points=[];for(let d=0;d<=divisions;d++){points.push(this.getPoint(d/divisions))}return points}getSpacedPoints(divisions=5){const points=[];for(let d=0;d<=divisions;d++){points.push(this.getPointAt(d/divisions))}return points}getLength(){const lengths=this.getLengths();return lengths[lengths.length-1]}getLengths(divisions=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===divisions+1&&!this.needsUpdate){return this.cacheArcLengths}this.needsUpdate=false;const cache=[];let current,last=this.getPoint(0);let sum=0;cache.push(0);for(let p=1;p<=divisions;p++){current=this.getPoint(p/divisions);sum+=current.distanceTo(last);cache.push(sum);last=current}this.cacheArcLengths=cache;return cache}updateArcLengths(){this.needsUpdate=true;this.getLengths()}getUtoTmapping(u,distance=null){const arcLengths=this.getLengths();let i=0;const il=arcLengths.length;let targetArcLength;if(distance){targetArcLength=distance}else{targetArcLength=u*arcLengths[il-1]}let low=0,high=il-1,comparison;while(low<=high){i=Math.floor(low+(high-low)/2);comparison=arcLengths[i]-targetArcLength;if(comparison<0){low=i+1}else if(comparison>0){high=i-1}else{high=i;break}}i=high;if(arcLengths[i]===targetArcLength){return i/(il-1)}const lengthBefore=arcLengths[i];const lengthAfter=arcLengths[i+1];const segmentLength=lengthAfter-lengthBefore;const segmentFraction=(targetArcLength-lengthBefore)/segmentLength;const t=(i+segmentFraction)/(il-1);return t}getTangent(t,optionalTarget){const delta=0.0001;let t1=t-delta;let t2=t+delta;if(t1<0)t1=0;if(t2>1)t2=1;const pt1=this.getPoint(t1);const pt2=this.getPoint(t2);const tangent=optionalTarget||(pt1.isVector2?new Vector2:new Vector3);tangent.copy(pt2).sub(pt1).normalize();return tangent}getTangentAt(u,optionalTarget){const t=this.getUtoTmapping(u);return this.getTangent(t,optionalTarget)}computeFrenetFrames(segments,closed=false){const normal=new Vector3;const tangents=[];const normals=[];const binormals=[];const vec=new Vector3;const mat=new Matrix4;for(let i=0;i<=segments;i++){const u=i/segments;tangents[i]=this.getTangentAt(u,new Vector3)}normals[0]=new Vector3;binormals[0]=new Vector3;let min=Number.MAX_VALUE;const tx=Math.abs(tangents[0].x);const ty=Math.abs(tangents[0].y);const tz=Math.abs(tangents[0].z);if(tx<=min){min=tx;normal.set(1,0,0)}if(ty<=min){min=ty;normal.set(0,1,0)}if(tz<=min){normal.set(0,0,1)}vec.crossVectors(tangents[0],normal).normalize();normals[0].crossVectors(tangents[0],vec);binormals[0].crossVectors(tangents[0],normals[0]);for(let i=1;i<=segments;i++){normals[i]=normals[i-1].clone();binormals[i]=binormals[i-1].clone();vec.crossVectors(tangents[i-1],tangents[i]);if(vec.length()>Number.EPSILON){vec.normalize();const theta=Math.acos(clamp(tangents[i-1].dot(tangents[i]),-1,1));normals[i].applyMatrix4(mat.makeRotationAxis(vec,theta))}binormals[i].crossVectors(tangents[i],normals[i])}if(closed===true){let theta=Math.acos(clamp(normals[0].dot(normals[segments]),-1,1));theta/=segments;if(tangents[0].dot(vec.crossVectors(normals[0],normals[segments]))>0){theta=-theta}for(let i=1;i<=segments;i++){normals[i].applyMatrix4(mat.makeRotationAxis(tangents[i],theta*i));binormals[i].crossVectors(tangents[i],normals[i])}}return{tangents:tangents,normals:normals,binormals:binormals}}clone(){return new this.constructor().copy(this)}copy(source){this.arcLengthDivisions=source.arcLengthDivisions;return this}toJSON(){const data={metadata:{version:4.7,type:"Curve",generator:"Curve.toJSON"}};data.arcLengthDivisions=this.arcLengthDivisions;data.type=this.type;return data}fromJSON(json){this.arcLengthDivisions=json.arcLengthDivisions;return this}}class EllipseCurve extends Curve{constructor(aX=0,aY=0,xRadius=1,yRadius=1,aStartAngle=0,aEndAngle=Math.PI*2,aClockwise=false,aRotation=0){super();this.isEllipseCurve=true;this.type="EllipseCurve";this.aX=aX;this.aY=aY;this.xRadius=xRadius;this.yRadius=yRadius;this.aStartAngle=aStartAngle;this.aEndAngle=aEndAngle;this.aClockwise=aClockwise;this.aRotation=aRotation}getPoint(t,optionalTarget=new Vector2){const point=optionalTarget;const twoPi=Math.PI*2;let deltaAngle=this.aEndAngle-this.aStartAngle;const samePoints=Math.abs(deltaAngle)<Number.EPSILON;while(deltaAngle<0)deltaAngle+=twoPi;while(deltaAngle>twoPi)deltaAngle-=twoPi;if(deltaAngle<Number.EPSILON){if(samePoints){deltaAngle=0}else{deltaAngle=twoPi}}if(this.aClockwise===true&&!samePoints){if(deltaAngle===twoPi){deltaAngle=-twoPi}else{deltaAngle=deltaAngle-twoPi}}const angle=this.aStartAngle+t*deltaAngle;let x=this.aX+this.xRadius*Math.cos(angle);let y=this.aY+this.yRadius*Math.sin(angle);if(this.aRotation!==0){const cos=Math.cos(this.aRotation);const sin=Math.sin(this.aRotation);const tx=x-this.aX;const ty=y-this.aY;x=tx*cos-ty*sin+this.aX;y=tx*sin+ty*cos+this.aY}return point.set(x,y)}copy(source){super.copy(source);this.aX=source.aX;this.aY=source.aY;this.xRadius=source.xRadius;this.yRadius=source.yRadius;this.aStartAngle=source.aStartAngle;this.aEndAngle=source.aEndAngle;this.aClockwise=source.aClockwise;this.aRotation=source.aRotation;return this}toJSON(){const data=super.toJSON();data.aX=this.aX;data.aY=this.aY;data.xRadius=this.xRadius;data.yRadius=this.yRadius;data.aStartAngle=this.aStartAngle;data.aEndAngle=this.aEndAngle;data.aClockwise=this.aClockwise;data.aRotation=this.aRotation;return data}fromJSON(json){super.fromJSON(json);this.aX=json.aX;this.aY=json.aY;this.xRadius=json.xRadius;this.yRadius=json.yRadius;this.aStartAngle=json.aStartAngle;this.aEndAngle=json.aEndAngle;this.aClockwise=json.aClockwise;this.aRotation=json.aRotation;return this}}class ArcCurve extends EllipseCurve{constructor(aX,aY,aRadius,aStartAngle,aEndAngle,aClockwise){super(aX,aY,aRadius,aRadius,aStartAngle,aEndAngle,aClockwise);this.isArcCurve=true;this.type="ArcCurve"}}function CubicPoly(){let c0=0,c1=0,c2=0,c3=0;function init(x0,x1,t0,t1){c0=x0;c1=t0;c2=-3*x0+3*x1-2*t0-t1;c3=2*x0-2*x1+t0+t1}return{initCatmullRom:function(x0,x1,x2,x3,tension){init(x1,x2,tension*(x2-x0),tension*(x3-x1))},initNonuniformCatmullRom:function(x0,x1,x2,x3,dt0,dt1,dt2){let t1=(x1-x0)/dt0-(x2-x0)/(dt0+dt1)+(x2-x1)/dt1;let t2=(x2-x1)/dt1-(x3-x1)/(dt1+dt2)+(x3-x2)/dt2;t1*=dt1;t2*=dt1;init(x1,x2,t1,t2)},calc:function(t){const t2=t*t;const t3=t2*t;return c0+c1*t+c2*t2+c3*t3}}}const tmp=new Vector3;const px=new CubicPoly;const py=new CubicPoly;const pz=new CubicPoly;class CatmullRomCurve3 extends Curve{constructor(points=[],closed=false,curveType="centripetal",tension=0.5){super();this.isCatmullRomCurve3=true;this.type="CatmullRomCurve3";this.points=points;this.closed=closed;this.curveType=curveType;this.tension=tension}getPoint(t,optionalTarget=new Vector3){const point=optionalTarget;const points=this.points;const l=points.length;const p=(l-(this.closed?0:1))*t;let intPoint=Math.floor(p);let weight=p-intPoint;if(this.closed){intPoint+=intPoint>0?0:(Math.floor(Math.abs(intPoint)/l)+1)*l}else if(weight===0&&intPoint===l-1){intPoint=l-2;weight=1}let p0,p3;if(this.closed||intPoint>0){p0=points[(intPoint-1)%l]}else{tmp.subVectors(points[0],points[1]).add(points[0]);p0=tmp}const p1=points[intPoint%l];const p2=points[(intPoint+1)%l];if(this.closed||intPoint+2<l){p3=points[(intPoint+2)%l]}else{tmp.subVectors(points[l-1],points[l-2]).add(points[l-1]);p3=tmp}if(this.curveType==="centripetal"||this.curveType==="chordal"){const pow=this.curveType==="chordal"?0.5:0.25;let dt0=Math.pow(p0.distanceToSquared(p1),pow);let dt1=Math.pow(p1.distanceToSquared(p2),pow);let dt2=Math.pow(p2.distanceToSquared(p3),pow);if(dt1<1e-4)dt1=1;if(dt0<1e-4)dt0=dt1;if(dt2<1e-4)dt2=dt1;px.initNonuniformCatmullRom(p0.x,p1.x,p2.x,p3.x,dt0,dt1,dt2);py.initNonuniformCatmullRom(p0.y,p1.y,p2.y,p3.y,dt0,dt1,dt2);pz.initNonuniformCatmullRom(p0.z,p1.z,p2.z,p3.z,dt0,dt1,dt2)}else if(this.curveType==="catmullrom"){px.initCatmullRom(p0.x,p1.x,p2.x,p3.x,this.tension);py.initCatmullRom(p0.y,p1.y,p2.y,p3.y,this.tension);pz.initCatmullRom(p0.z,p1.z,p2.z,p3.z,this.tension)}point.set(px.calc(weight),py.calc(weight),pz.calc(weight));return point}copy(source){super.copy(source);this.points=[];for(let i=0,l=source.points.length;i<l;i++){const point=source.points[i];this.points.push(point.clone())}this.closed=source.closed;this.curveType=source.curveType;this.tension=source.tension;return this}toJSON(){const data=super.toJSON();data.points=[];for(let i=0,l=this.points.length;i<l;i++){const point=this.points[i];data.points.push(point.toArray())}data.closed=this.closed;data.curveType=this.curveType;data.tension=this.tension;return data}fromJSON(json){super.fromJSON(json);this.points=[];for(let i=0,l=json.points.length;i<l;i++){const point=json.points[i];this.points.push(new Vector3().fromArray(point))}this.closed=json.closed;this.curveType=json.curveType;this.tension=json.tension;return this}}function CatmullRom(t,p0,p1,p2,p3){const v0=(p2-p0)*0.5;const v1=(p3-p1)*0.5;const t2=t*t;const t3=t*t2;return(2*p1-2*p2+v0+v1)*t3+(-3*p1+3*p2-2*v0-v1)*t2+v0*t+p1}function QuadraticBezierP0(t,p){const k=1-t;return k*k*p}function QuadraticBezierP1(t,p){return 2*(1-t)*t*p}function QuadraticBezierP2(t,p){return t*t*p}function QuadraticBezier(t,p0,p1,p2){return QuadraticBezierP0(t,p0)+QuadraticBezierP1(t,p1)+QuadraticBezierP2(t,p2)}function CubicBezierP0(t,p){const k=1-t;return k*k*k*p}function CubicBezierP1(t,p){const k=1-t;return 3*k*k*t*p}function CubicBezierP2(t,p){return 3*(1-t)*t*t*p}function CubicBezierP3(t,p){return t*t*t*p}function CubicBezier(t,p0,p1,p2,p3){return CubicBezierP0(t,p0)+CubicBezierP1(t,p1)+CubicBezierP2(t,p2)+CubicBezierP3(t,p3)}class CubicBezierCurve extends Curve{constructor(v0=new Vector2,v1=new Vector2,v2=new Vector2,v3=new Vector2){super();this.isCubicBezierCurve=true;this.type="CubicBezierCurve";this.v0=v0;this.v1=v1;this.v2=v2;this.v3=v3}getPoint(t,optionalTarget=new Vector2){const point=optionalTarget;const v0=this.v0,v1=this.v1,v2=this.v2,v3=this.v3;point.set(CubicBezier(t,v0.x,v1.x,v2.x,v3.x),CubicBezier(t,v0.y,v1.y,v2.y,v3.y));return point}copy(source){super.copy(source);this.v0.copy(source.v0);this.v1.copy(source.v1);this.v2.copy(source.v2);this.v3.copy(source.v3);return this}toJSON(){const data=super.toJSON();data.v0=this.v0.toArray();data.v1=this.v1.toArray();data.v2=this.v2.toArray();data.v3=this.v3.toArray();return data}fromJSON(json){super.fromJSON(json);this.v0.fromArray(json.v0);this.v1.fromArray(json.v1);this.v2.fromArray(json.v2);this.v3.fromArray(json.v3);return this}}class CubicBezierCurve3 extends Curve{constructor(v0=new Vector3,v1=new Vector3,v2=new Vector3,v3=new Vector3){super();this.isCubicBezierCurve3=true;this.type="CubicBezierCurve3";this.v0=v0;this.v1=v1;this.v2=v2;this.v3=v3}getPoint(t,optionalTarget=new Vector3){const point=optionalTarget;const v0=this.v0,v1=this.v1,v2=this.v2,v3=this.v3;point.set(CubicBezier(t,v0.x,v1.x,v2.x,v3.x),CubicBezier(t,v0.y,v1.y,v2.y,v3.y),CubicBezier(t,v0.z,v1.z,v2.z,v3.z));return point}copy(source){super.copy(source);this.v0.copy(source.v0);this.v1.copy(source.v1);this.v2.copy(source.v2);this.v3.copy(source.v3);return this}toJSON(){const data=super.toJSON();data.v0=this.v0.toArray();data.v1=this.v1.toArray();data.v2=this.v2.toArray();data.v3=this.v3.toArray();return data}fromJSON(json){super.fromJSON(json);this.v0.fromArray(json.v0);this.v1.fromArray(json.v1);this.v2.fromArray(json.v2);this.v3.fromArray(json.v3);return this}}class LineCurve extends Curve{constructor(v1=new Vector2,v2=new Vector2){super();this.isLineCurve=true;this.type="LineCurve";this.v1=v1;this.v2=v2}getPoint(t,optionalTarget=new Vector2){const point=optionalTarget;if(t===1){point.copy(this.v2)}else{point.copy(this.v2).sub(this.v1);point.multiplyScalar(t).add(this.v1)}return point}getPointAt(u,optionalTarget){return this.getPoint(u,optionalTarget)}getTangent(t,optionalTarget=new Vector2){return optionalTarget.subVectors(this.v2,this.v1).normalize()}getTangentAt(u,optionalTarget){return this.getTangent(u,optionalTarget)}copy(source){super.copy(source);this.v1.copy(source.v1);this.v2.copy(source.v2);return this}toJSON(){const data=super.toJSON();data.v1=this.v1.toArray();data.v2=this.v2.toArray();return data}fromJSON(json){super.fromJSON(json);this.v1.fromArray(json.v1);this.v2.fromArray(json.v2);return this}}class LineCurve3 extends Curve{constructor(v1=new Vector3,v2=new Vector3){super();this.isLineCurve3=true;this.type="LineCurve3";this.v1=v1;this.v2=v2}getPoint(t,optionalTarget=new Vector3){const point=optionalTarget;if(t===1){point.copy(this.v2)}else{point.copy(this.v2).sub(this.v1);point.multiplyScalar(t).add(this.v1)}return point}getPointAt(u,optionalTarget){return this.getPoint(u,optionalTarget)}getTangent(t,optionalTarget=new Vector3){return optionalTarget.subVectors(this.v2,this.v1).normalize()}getTangentAt(u,optionalTarget){return this.getTangent(u,optionalTarget)}copy(source){super.copy(source);this.v1.copy(source.v1);this.v2.copy(source.v2);return this}toJSON(){const data=super.toJSON();data.v1=this.v1.toArray();data.v2=this.v2.toArray();return data}fromJSON(json){super.fromJSON(json);this.v1.fromArray(json.v1);this.v2.fromArray(json.v2);return this}}class QuadraticBezierCurve extends Curve{constructor(v0=new Vector2,v1=new Vector2,v2=new Vector2){super();this.isQuadraticBezierCurve=true;this.type="QuadraticBezierCurve";this.v0=v0;this.v1=v1;this.v2=v2}getPoint(t,optionalTarget=new Vector2){const point=optionalTarget;const v0=this.v0,v1=this.v1,v2=this.v2;point.set(QuadraticBezier(t,v0.x,v1.x,v2.x),QuadraticBezier(t,v0.y,v1.y,v2.y));return point}copy(source){super.copy(source);this.v0.copy(source.v0);this.v1.copy(source.v1);this.v2.copy(source.v2);return this}toJSON(){const data=super.toJSON();data.v0=this.v0.toArray();data.v1=this.v1.toArray();data.v2=this.v2.toArray();return data}fromJSON(json){super.fromJSON(json);this.v0.fromArray(json.v0);this.v1.fromArray(json.v1);this.v2.fromArray(json.v2);return this}}class QuadraticBezierCurve3 extends Curve{constructor(v0=new Vector3,v1=new Vector3,v2=new Vector3){super();this.isQuadraticBezierCurve3=true;this.type="QuadraticBezierCurve3";this.v0=v0;this.v1=v1;this.v2=v2}getPoint(t,optionalTarget=new Vector3){const point=optionalTarget;const v0=this.v0,v1=this.v1,v2=this.v2;point.set(QuadraticBezier(t,v0.x,v1.x,v2.x),QuadraticBezier(t,v0.y,v1.y,v2.y),QuadraticBezier(t,v0.z,v1.z,v2.z));return point}copy(source){super.copy(source);this.v0.copy(source.v0);this.v1.copy(source.v1);this.v2.copy(source.v2);return this}toJSON(){const data=super.toJSON();data.v0=this.v0.toArray();data.v1=this.v1.toArray();data.v2=this.v2.toArray();return data}fromJSON(json){super.fromJSON(json);this.v0.fromArray(json.v0);this.v1.fromArray(json.v1);this.v2.fromArray(json.v2);return this}}class SplineCurve extends Curve{constructor(points=[]){super();this.isSplineCurve=true;this.type="SplineCurve";this.points=points}getPoint(t,optionalTarget=new Vector2){const point=optionalTarget;const points=this.points;const p=(points.length-1)*t;const intPoint=Math.floor(p);const weight=p-intPoint;const p0=points[intPoint===0?intPoint:intPoint-1];const p1=points[intPoint];const p2=points[intPoint>points.length-2?points.length-1:intPoint+1];const p3=points[intPoint>points.length-3?points.length-1:intPoint+2];point.set(CatmullRom(weight,p0.x,p1.x,p2.x,p3.x),CatmullRom(weight,p0.y,p1.y,p2.y,p3.y));return point}copy(source){super.copy(source);this.points=[];for(let i=0,l=source.points.length;i<l;i++){const point=source.points[i];this.points.push(point.clone())}return this}toJSON(){const data=super.toJSON();data.points=[];for(let i=0,l=this.points.length;i<l;i++){const point=this.points[i];data.points.push(point.toArray())}return data}fromJSON(json){super.fromJSON(json);this.points=[];for(let i=0,l=json.points.length;i<l;i++){const point=json.points[i];this.points.push(new Vector2().fromArray(point))}return this}}var Curves=Object.freeze({__proto__:null,ArcCurve:ArcCurve,CatmullRomCurve3:CatmullRomCurve3,CubicBezierCurve:CubicBezierCurve,CubicBezierCurve3:CubicBezierCurve3,EllipseCurve:EllipseCurve,LineCurve:LineCurve,LineCurve3:LineCurve3,QuadraticBezierCurve:QuadraticBezierCurve,QuadraticBezierCurve3:QuadraticBezierCurve3,SplineCurve:SplineCurve});class CurvePath extends Curve{constructor(){super();this.type="CurvePath";this.curves=[];this.autoClose=false}add(curve){this.curves.push(curve)}closePath(){const startPoint=this.curves[0].getPoint(0);const endPoint=this.curves[this.curves.length-1].getPoint(1);if(!startPoint.equals(endPoint)){const lineType=startPoint.isVector2===true?"LineCurve":"LineCurve3";this.curves.push(new Curves[lineType](endPoint,startPoint))}return this}getPoint(t,optionalTarget){const d=t*this.getLength();const curveLengths=this.getCurveLengths();let i=0;while(i<curveLengths.length){if(curveLengths[i]>=d){const diff=curveLengths[i]-d;const curve=this.curves[i];const segmentLength=curve.getLength();const u=segmentLength===0?0:1-diff/segmentLength;return curve.getPointAt(u,optionalTarget)}i++}return null}getLength(){const lens=this.getCurveLengths();return lens[lens.length-1]}updateArcLengths(){this.needsUpdate=true;this.cacheLengths=null;this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length){return this.cacheLengths}const lengths=[];let sums=0;for(let i=0,l=this.curves.length;i<l;i++){sums+=this.curves[i].getLength();lengths.push(sums)}this.cacheLengths=lengths;return lengths}getSpacedPoints(divisions=40){const points=[];for(let i=0;i<=divisions;i++){points.push(this.getPoint(i/divisions))}if(this.autoClose){points.push(points[0])}return points}getPoints(divisions=12){const points=[];let last;for(let i=0,curves=this.curves;i<curves.length;i++){const curve=curves[i];const resolution=curve.isEllipseCurve?divisions*2:curve.isLineCurve||curve.isLineCurve3?1:curve.isSplineCurve?divisions*curve.points.length:divisions;const pts=curve.getPoints(resolution);for(let j=0;j<pts.length;j++){const point=pts[j];if(last&&last.equals(point))continue;points.push(point);last=point}}if(this.autoClose&&points.length>1&&!points[points.length-1].equals(points[0])){points.push(points[0])}return points}copy(source){super.copy(source);this.curves=[];for(let i=0,l=source.curves.length;i<l;i++){const curve=source.curves[i];this.curves.push(curve.clone())}this.autoClose=source.autoClose;return this}toJSON(){const data=super.toJSON();data.autoClose=this.autoClose;data.curves=[];for(let i=0,l=this.curves.length;i<l;i++){const curve=this.curves[i];data.curves.push(curve.toJSON())}return data}fromJSON(json){super.fromJSON(json);this.autoClose=json.autoClose;this.curves=[];for(let i=0,l=json.curves.length;i<l;i++){const curve=json.curves[i];this.curves.push(new Curves[curve.type]().fromJSON(curve))}return this}}class Path extends CurvePath{constructor(points){super();this.type="Path";this.currentPoint=new Vector2;if(points){this.setFromPoints(points)}}setFromPoints(points){this.moveTo(points[0].x,points[0].y);for(let i=1,l=points.length;i<l;i++){this.lineTo(points[i].x,points[i].y)}return this}moveTo(x,y){this.currentPoint.set(x,y);return this}lineTo(x,y){const curve=new LineCurve(this.currentPoint.clone(),new Vector2(x,y));this.curves.push(curve);this.currentPoint.set(x,y);return this}quadraticCurveTo(aCPx,aCPy,aX,aY){const curve=new QuadraticBezierCurve(this.currentPoint.clone(),new Vector2(aCPx,aCPy),new Vector2(aX,aY));this.curves.push(curve);this.currentPoint.set(aX,aY);return this}bezierCurveTo(aCP1x,aCP1y,aCP2x,aCP2y,aX,aY){const curve=new CubicBezierCurve(this.currentPoint.clone(),new Vector2(aCP1x,aCP1y),new Vector2(aCP2x,aCP2y),new Vector2(aX,aY));this.curves.push(curve);this.currentPoint.set(aX,aY);return this}splineThru(pts){const npts=[this.currentPoint.clone()].concat(pts);const curve=new SplineCurve(npts);this.curves.push(curve);this.currentPoint.copy(pts[pts.length-1]);return this}arc(aX,aY,aRadius,aStartAngle,aEndAngle,aClockwise){const x0=this.currentPoint.x;const y0=this.currentPoint.y;this.absarc(aX+x0,aY+y0,aRadius,aStartAngle,aEndAngle,aClockwise);return this}absarc(aX,aY,aRadius,aStartAngle,aEndAngle,aClockwise){this.absellipse(aX,aY,aRadius,aRadius,aStartAngle,aEndAngle,aClockwise);return this}ellipse(aX,aY,xRadius,yRadius,aStartAngle,aEndAngle,aClockwise,aRotation){const x0=this.currentPoint.x;const y0=this.currentPoint.y;this.absellipse(aX+x0,aY+y0,xRadius,yRadius,aStartAngle,aEndAngle,aClockwise,aRotation);return this}absellipse(aX,aY,xRadius,yRadius,aStartAngle,aEndAngle,aClockwise,aRotation){const curve=new EllipseCurve(aX,aY,xRadius,yRadius,aStartAngle,aEndAngle,aClockwise,aRotation);if(this.curves.length>0){const firstPoint=curve.getPoint(0);if(!firstPoint.equals(this.currentPoint)){this.lineTo(firstPoint.x,firstPoint.y)}}this.curves.push(curve);const lastPoint=curve.getPoint(1);this.currentPoint.copy(lastPoint);return this}copy(source){super.copy(source);this.currentPoint.copy(source.currentPoint);return this}toJSON(){const data=super.toJSON();data.currentPoint=this.currentPoint.toArray();return data}fromJSON(json){super.fromJSON(json);this.currentPoint.fromArray(json.currentPoint);return this}}class Shape extends Path{constructor(points){super(points);this.uuid=generateUUID();this.type="Shape";this.holes=[]}getPointsHoles(divisions){const holesPts=[];for(let i=0,l=this.holes.length;i<l;i++){holesPts[i]=this.holes[i].getPoints(divisions)}return holesPts}extractPoints(divisions){return{shape:this.getPoints(divisions),holes:this.getPointsHoles(divisions)}}copy(source){super.copy(source);this.holes=[];for(let i=0,l=source.holes.length;i<l;i++){const hole=source.holes[i];this.holes.push(hole.clone())}return this}toJSON(){const data=super.toJSON();data.uuid=this.uuid;data.holes=[];for(let i=0,l=this.holes.length;i<l;i++){const hole=this.holes[i];data.holes.push(hole.toJSON())}return data}fromJSON(json){super.fromJSON(json);this.uuid=json.uuid;this.holes=[];for(let i=0,l=json.holes.length;i<l;i++){const hole=json.holes[i];this.holes.push(new Path().fromJSON(hole))}return this}}function earcut(data,holeIndices,dim=2){const hasHoles=holeIndices&&holeIndices.length;const outerLen=hasHoles?holeIndices[0]*dim:data.length;let outerNode=linkedList(data,0,outerLen,dim,true);const triangles=[];if(!outerNode||outerNode.next===outerNode.prev)return triangles;let minX,minY,invSize;if(hasHoles)outerNode=eliminateHoles(data,holeIndices,outerNode,dim);if(data.length>80*dim){minX=data[0];minY=data[1];let maxX=minX;let maxY=minY;for(let i=dim;i<outerLen;i+=dim){const x=data[i];const y=data[i+1];if(x<minX)minX=x;if(y<minY)minY=y;if(x>maxX)maxX=x;if(y>maxY)maxY=y}invSize=Math.max(maxX-minX,maxY-minY);invSize=invSize!==0?32767/invSize:0}earcutLinked(outerNode,triangles,dim,minX,minY,invSize,0);return triangles}function linkedList(data,start,end,dim,clockwise){let last;if(clockwise===signedArea(data,start,end,dim)>0){for(let i=start;i<end;i+=dim)last=insertNode(i/dim|0,data[i],data[i+1],last)}else{for(let i=end-dim;i>=start;i-=dim)last=insertNode(i/dim|0,data[i],data[i+1],last)}if(last&&equals(last,last.next)){removeNode(last);last=last.next}return last}function filterPoints(start,end){if(!start)return start;if(!end)end=start;let p=start,again;do{again=false;if(!p.steiner&&(equals(p,p.next)||area(p.prev,p,p.next)===0)){removeNode(p);p=end=p.prev;if(p===p.next)break;again=true}else{p=p.next}}while(again||p!==end);return end}function earcutLinked(ear,triangles,dim,minX,minY,invSize,pass){if(!ear)return;if(!pass&&invSize)indexCurve(ear,minX,minY,invSize);let stop=ear;while(ear.prev!==ear.next){const prev=ear.prev;const next=ear.next;if(invSize?isEarHashed(ear,minX,minY,invSize):isEar(ear)){triangles.push(prev.i,ear.i,next.i);removeNode(ear);ear=next.next;stop=next.next;continue}ear=next;if(ear===stop){if(!pass){earcutLinked(filterPoints(ear),triangles,dim,minX,minY,invSize,1)}else if(pass===1){ear=cureLocalIntersections(filterPoints(ear),triangles);earcutLinked(ear,triangles,dim,minX,minY,invSize,2)}else if(pass===2){splitEarcut(ear,triangles,dim,minX,minY,invSize)}break}}}function isEar(ear){const a=ear.prev,b=ear,c=ear.next;if(area(a,b,c)>=0)return false;const ax=a.x,bx=b.x,cx=c.x,ay=a.y,by=b.y,cy=c.y;const x0=Math.min(ax,bx,cx),y0=Math.min(ay,by,cy),x1=Math.max(ax,bx,cx),y1=Math.max(ay,by,cy);let p=c.next;while(p!==a){if(p.x>=x0&&p.x<=x1&&p.y>=y0&&p.y<=y1&&pointInTriangleExceptFirst(ax,ay,bx,by,cx,cy,p.x,p.y)&&area(p.prev,p,p.next)>=0)return false;p=p.next}return true}function isEarHashed(ear,minX,minY,invSize){const a=ear.prev,b=ear,c=ear.next;if(area(a,b,c)>=0)return false;const ax=a.x,bx=b.x,cx=c.x,ay=a.y,by=b.y,cy=c.y;const x0=Math.min(ax,bx,cx),y0=Math.min(ay,by,cy),x1=Math.max(ax,bx,cx),y1=Math.max(ay,by,cy);const minZ=zOrder(x0,y0,minX,minY,invSize),maxZ=zOrder(x1,y1,minX,minY,invSize);let p=ear.prevZ,n=ear.nextZ;while(p&&p.z>=minZ&&n&&n.z<=maxZ){if(p.x>=x0&&p.x<=x1&&p.y>=y0&&p.y<=y1&&p!==a&&p!==c&&pointInTriangleExceptFirst(ax,ay,bx,by,cx,cy,p.x,p.y)&&area(p.prev,p,p.next)>=0)return false;p=p.prevZ;if(n.x>=x0&&n.x<=x1&&n.y>=y0&&n.y<=y1&&n!==a&&n!==c&&pointInTriangleExceptFirst(ax,ay,bx,by,cx,cy,n.x,n.y)&&area(n.prev,n,n.next)>=0)return false;n=n.nextZ}while(p&&p.z>=minZ){if(p.x>=x0&&p.x<=x1&&p.y>=y0&&p.y<=y1&&p!==a&&p!==c&&pointInTriangleExceptFirst(ax,ay,bx,by,cx,cy,p.x,p.y)&&area(p.prev,p,p.next)>=0)return false;p=p.prevZ}while(n&&n.z<=maxZ){if(n.x>=x0&&n.x<=x1&&n.y>=y0&&n.y<=y1&&n!==a&&n!==c&&pointInTriangleExceptFirst(ax,ay,bx,by,cx,cy,n.x,n.y)&&area(n.prev,n,n.next)>=0)return false;n=n.nextZ}return true}function cureLocalIntersections(start,triangles){let p=start;do{const a=p.prev,b=p.next.next;if(!equals(a,b)&&intersects(a,p,p.next,b)&&locallyInside(a,b)&&locallyInside(b,a)){triangles.push(a.i,p.i,b.i);removeNode(p);removeNode(p.next);p=start=b}p=p.next}while(p!==start);return filterPoints(p)}function splitEarcut(start,triangles,dim,minX,minY,invSize){let a=start;do{let b=a.next.next;while(b!==a.prev){if(a.i!==b.i&&isValidDiagonal(a,b)){let c=splitPolygon(a,b);a=filterPoints(a,a.next);c=filterPoints(c,c.next);earcutLinked(a,triangles,dim,minX,minY,invSize,0);earcutLinked(c,triangles,dim,minX,minY,invSize,0);return}b=b.next}a=a.next}while(a!==start)}function eliminateHoles(data,holeIndices,outerNode,dim){const queue=[];for(let i=0,len=holeIndices.length;i<len;i++){const start=holeIndices[i]*dim;const end=i<len-1?holeIndices[i+1]*dim:data.length;const list=linkedList(data,start,end,dim,false);if(list===list.next)list.steiner=true;queue.push(getLeftmost(list))}queue.sort(compareXYSlope);for(let i=0;i<queue.length;i++){outerNode=eliminateHole(queue[i],outerNode)}return outerNode}function compareXYSlope(a,b){let result=a.x-b.x;if(result===0){result=a.y-b.y;if(result===0){const aSlope=(a.next.y-a.y)/(a.next.x-a.x);const bSlope=(b.next.y-b.y)/(b.next.x-b.x);result=aSlope-bSlope}}return result}function eliminateHole(hole,outerNode){const bridge=findHoleBridge(hole,outerNode);if(!bridge){return outerNode}const bridgeReverse=splitPolygon(bridge,hole);filterPoints(bridgeReverse,bridgeReverse.next);return filterPoints(bridge,bridge.next)}function findHoleBridge(hole,outerNode){let p=outerNode;const hx=hole.x;const hy=hole.y;let qx=-Infinity;let m;if(equals(hole,p))return p;do{if(equals(hole,p.next))return p.next;else if(hy<=p.y&&hy>=p.next.y&&p.next.y!==p.y){const x=p.x+(hy-p.y)*(p.next.x-p.x)/(p.next.y-p.y);if(x<=hx&&x>qx){qx=x;m=p.x<p.next.x?p:p.next;if(x===hx)return m}}p=p.next}while(p!==outerNode);if(!m)return null;const stop=m;const mx=m.x;const my=m.y;let tanMin=Infinity;p=m;do{if(hx>=p.x&&p.x>=mx&&hx!==p.x&&pointInTriangle(hy<my?hx:qx,hy,mx,my,hy<my?qx:hx,hy,p.x,p.y)){const tan=Math.abs(hy-p.y)/(hx-p.x);if(locallyInside(p,hole)&&(tan<tanMin||tan===tanMin&&(p.x>m.x||p.x===m.x&&sectorContainsSector(m,p)))){m=p;tanMin=tan}}p=p.next}while(p!==stop);return m}function sectorContainsSector(m,p){return area(m.prev,m,p.prev)<0&&area(p.next,m,m.next)<0}function indexCurve(start,minX,minY,invSize){let p=start;do{if(p.z===0)p.z=zOrder(p.x,p.y,minX,minY,invSize);p.prevZ=p.prev;p.nextZ=p.next;p=p.next}while(p!==start);p.prevZ.nextZ=null;p.prevZ=null;sortLinked(p)}function sortLinked(list){let numMerges;let inSize=1;do{let p=list;let e;list=null;let tail=null;numMerges=0;while(p){numMerges++;let q=p;let pSize=0;for(let i=0;i<inSize;i++){pSize++;q=q.nextZ;if(!q)break}let qSize=inSize;while(pSize>0||qSize>0&&q){if(pSize!==0&&(qSize===0||!q||p.z<=q.z)){e=p;p=p.nextZ;pSize--}else{e=q;q=q.nextZ;qSize--}if(tail)tail.nextZ=e;else list=e;e.prevZ=tail;tail=e}p=q}tail.nextZ=null;inSize*=2}while(numMerges>1);return list}function zOrder(x,y,minX,minY,invSize){x=(x-minX)*invSize|0;y=(y-minY)*invSize|0;x=(x|x<<8)&16711935;x=(x|x<<4)&252645135;x=(x|x<<2)&858993459;x=(x|x<<1)&1431655765;y=(y|y<<8)&16711935;y=(y|y<<4)&252645135;y=(y|y<<2)&858993459;y=(y|y<<1)&1431655765;return x|y<<1}function getLeftmost(start){let p=start,leftmost=start;do{if(p.x<leftmost.x||p.x===leftmost.x&&p.y<leftmost.y)leftmost=p;p=p.next}while(p!==start);return leftmost}function pointInTriangle(ax,ay,bx,by,cx,cy,px,py){return(cx-px)*(ay-py)>=(ax-px)*(cy-py)&&(ax-px)*(by-py)>=(bx-px)*(ay-py)&&(bx-px)*(cy-py)>=(cx-px)*(by-py)}function pointInTriangleExceptFirst(ax,ay,bx,by,cx,cy,px,py){return!(ax===px&&ay===py)&&pointInTriangle(ax,ay,bx,by,cx,cy,px,py)}function isValidDiagonal(a,b){return a.next.i!==b.i&&a.prev.i!==b.i&&!intersectsPolygon(a,b)&&(locallyInside(a,b)&&locallyInside(b,a)&&middleInside(a,b)&&(area(a.prev,a,b.prev)||area(a,b.prev,b))||equals(a,b)&&area(a.prev,a,a.next)>0&&area(b.prev,b,b.next)>0)}function area(p,q,r){return(q.y-p.y)*(r.x-q.x)-(q.x-p.x)*(r.y-q.y)}function equals(p1,p2){return p1.x===p2.x&&p1.y===p2.y}function intersects(p1,q1,p2,q2){const o1=sign(area(p1,q1,p2));const o2=sign(area(p1,q1,q2));const o3=sign(area(p2,q2,p1));const o4=sign(area(p2,q2,q1));if(o1!==o2&&o3!==o4)return true;if(o1===0&&onSegment(p1,p2,q1))return true;if(o2===0&&onSegment(p1,q2,q1))return true;if(o3===0&&onSegment(p2,p1,q2))return true;if(o4===0&&onSegment(p2,q1,q2))return true;return false}function onSegment(p,q,r){return q.x<=Math.max(p.x,r.x)&&q.x>=Math.min(p.x,r.x)&&q.y<=Math.max(p.y,r.y)&&q.y>=Math.min(p.y,r.y)}function sign(num){return num>0?1:num<0?-1:0}function intersectsPolygon(a,b){let p=a;do{if(p.i!==a.i&&p.next.i!==a.i&&p.i!==b.i&&p.next.i!==b.i&&intersects(p,p.next,a,b))return true;p=p.next}while(p!==a);return false}function locallyInside(a,b){return area(a.prev,a,a.next)<0?area(a,b,a.next)>=0&&area(a,a.prev,b)>=0:area(a,b,a.prev)<0||area(a,a.next,b)<0}function middleInside(a,b){let p=a;let inside=false;const px=(a.x+b.x)/2;const py=(a.y+b.y)/2;do{if(p.y>py!==p.next.y>py&&p.next.y!==p.y&&px<(p.next.x-p.x)*(py-p.y)/(p.next.y-p.y)+p.x)inside=!inside;p=p.next}while(p!==a);return inside}function splitPolygon(a,b){const a2=createNode(a.i,a.x,a.y),b2=createNode(b.i,b.x,b.y),an=a.next,bp=b.prev;a.next=b;b.prev=a;a2.next=an;an.prev=a2;b2.next=a2;a2.prev=b2;bp.next=b2;b2.prev=bp;return b2}function insertNode(i,x,y,last){const p=createNode(i,x,y);if(!last){p.prev=p;p.next=p}else{p.next=last.next;p.prev=last;last.next.prev=p;last.next=p}return p}function removeNode(p){p.next.prev=p.prev;p.prev.next=p.next;if(p.prevZ)p.prevZ.nextZ=p.nextZ;if(p.nextZ)p.nextZ.prevZ=p.prevZ}function createNode(i,x,y){return{i,x,y,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:false}}function signedArea(data,start,end,dim){let sum=0;for(let i=start,j=end-dim;i<end;i+=dim){sum+=(data[j]-data[i])*(data[i+1]+data[j+1]);j=i}return sum}class Earcut{static triangulate(data,holeIndices,dim=2){return earcut(data,holeIndices,dim)}}class ShapeUtils{static area(contour){const n=contour.length;let a=0;for(let p=n-1,q=0;q<n;p=q++){a+=contour[p].x*contour[q].y-contour[q].x*contour[p].y}return a*0.5}static isClockWise(pts){return ShapeUtils.area(pts)<0}static triangulateShape(contour,holes){const vertices=[];const holeIndices=[];const faces=[];removeDupEndPts(contour);addContour(vertices,contour);let holeIndex=contour.length;holes.forEach(removeDupEndPts);for(let i=0;i<holes.length;i++){holeIndices.push(holeIndex);holeIndex+=holes[i].length;addContour(vertices,holes[i])}const triangles=Earcut.triangulate(vertices,holeIndices);for(let i=0;i<triangles.length;i+=3){faces.push(triangles.slice(i,i+3))}return faces}}function removeDupEndPts(points){const l=points.length;if(l>2&&points[l-1].equals(points[0])){points.pop()}}function addContour(vertices,contour){for(let i=0;i<contour.length;i++){vertices.push(contour[i].x);vertices.push(contour[i].y)}}class ExtrudeGeometry extends BufferGeometry{constructor(shapes=new Shape([new Vector2(0.5,0.5),new Vector2(-0.5,0.5),new Vector2(-0.5,-0.5),new Vector2(0.5,-0.5)]),options={}){super();this.type="ExtrudeGeometry";this.parameters={shapes:shapes,options:options};shapes=Array.isArray(shapes)?shapes:[shapes];const scope=this;const verticesArray=[];const uvArray=[];for(let i=0,l=shapes.length;i<l;i++){const shape=shapes[i];addShape(shape)}this.setAttribute("position",new Float32BufferAttribute(verticesArray,3));this.setAttribute("uv",new Float32BufferAttribute(uvArray,2));this.computeVertexNormals();function addShape(shape){const placeholder=[];const curveSegments=options.curveSegments!==undefined?options.curveSegments:12;const steps=options.steps!==undefined?options.steps:1;const depth=options.depth!==undefined?options.depth:1;let bevelEnabled=options.bevelEnabled!==undefined?options.bevelEnabled:true;let bevelThickness=options.bevelThickness!==undefined?options.bevelThickness:0.2;let bevelSize=options.bevelSize!==undefined?options.bevelSize:bevelThickness-0.1;let bevelOffset=options.bevelOffset!==undefined?options.bevelOffset:0;let bevelSegments=options.bevelSegments!==undefined?options.bevelSegments:3;const extrudePath=options.extrudePath;const uvgen=options.UVGenerator!==undefined?options.UVGenerator:WorldUVGenerator;let extrudePts,extrudeByPath=false;let splineTube,binormal,normal,position2;if(extrudePath){extrudePts=extrudePath.getSpacedPoints(steps);extrudeByPath=true;bevelEnabled=false;const isClosed=extrudePath.isCatmullRomCurve3?extrudePath.closed:false;splineTube=extrudePath.computeFrenetFrames(steps,isClosed);binormal=new Vector3;normal=new Vector3;position2=new Vector3}if(!bevelEnabled){bevelSegments=0;bevelThickness=0;bevelSize=0;bevelOffset=0}const shapePoints=shape.extractPoints(curveSegments);let vertices=shapePoints.shape;const holes=shapePoints.holes;const reverse=!ShapeUtils.isClockWise(vertices);if(reverse){vertices=vertices.reverse();for(let h=0,hl=holes.length;h<hl;h++){const ahole=holes[h];if(ShapeUtils.isClockWise(ahole)){holes[h]=ahole.reverse()}}}function mergeOverlappingPoints(points){const THRESHOLD=1e-10;const THRESHOLD_SQ=THRESHOLD*THRESHOLD;let prevPos=points[0];for(let i=1;i<=points.length;i++){const currentIndex=i%points.length;const currentPos=points[currentIndex];const dx=currentPos.x-prevPos.x;const dy=currentPos.y-prevPos.y;const distSq=dx*dx+dy*dy;const scalingFactorSqrt=Math.max(Math.abs(currentPos.x),Math.abs(currentPos.y),Math.abs(prevPos.x),Math.abs(prevPos.y));const thresholdSqScaled=THRESHOLD_SQ*scalingFactorSqrt*scalingFactorSqrt;if(distSq<=thresholdSqScaled){points.splice(currentIndex,1);i--;continue}prevPos=currentPos}}mergeOverlappingPoints(vertices);holes.forEach(mergeOverlappingPoints);const numHoles=holes.length;const contour=vertices;for(let h=0;h<numHoles;h++){const ahole=holes[h];vertices=vertices.concat(ahole)}function scalePt2(pt,vec,size){if(!vec)error("ExtrudeGeometry: vec does not exist");return pt.clone().addScaledVector(vec,size)}const vlen=vertices.length;function getBevelVec(inPt,inPrev,inNext){let v_trans_x,v_trans_y,shrink_by;const v_prev_x=inPt.x-inPrev.x,v_prev_y=inPt.y-inPrev.y;const v_next_x=inNext.x-inPt.x,v_next_y=inNext.y-inPt.y;const v_prev_lensq=v_prev_x*v_prev_x+v_prev_y*v_prev_y;const collinear0=v_prev_x*v_next_y-v_prev_y*v_next_x;if(Math.abs(collinear0)>Number.EPSILON){const v_prev_len=Math.sqrt(v_prev_lensq);const v_next_len=Math.sqrt(v_next_x*v_next_x+v_next_y*v_next_y);const ptPrevShift_x=inPrev.x-v_prev_y/v_prev_len;const ptPrevShift_y=inPrev.y+v_prev_x/v_prev_len;const ptNextShift_x=inNext.x-v_next_y/v_next_len;const ptNextShift_y=inNext.y+v_next_x/v_next_len;const sf=((ptNextShift_x-ptPrevShift_x)*v_next_y-(ptNextShift_y-ptPrevShift_y)*v_next_x)/(v_prev_x*v_next_y-v_prev_y*v_next_x);v_trans_x=ptPrevShift_x+v_prev_x*sf-inPt.x;v_trans_y=ptPrevShift_y+v_prev_y*sf-inPt.y;const v_trans_lensq=v_trans_x*v_trans_x+v_trans_y*v_trans_y;if(v_trans_lensq<=2){return new Vector2(v_trans_x,v_trans_y)}else{shrink_by=Math.sqrt(v_trans_lensq/2)}}else{let direction_eq=false;if(v_prev_x>Number.EPSILON){if(v_next_x>Number.EPSILON){direction_eq=true}}else{if(v_prev_x<-Number.EPSILON){if(v_next_x<-Number.EPSILON){direction_eq=true}}else{if(Math.sign(v_prev_y)===Math.sign(v_next_y)){direction_eq=true}}}if(direction_eq){v_trans_x=-v_prev_y;v_trans_y=v_prev_x;shrink_by=Math.sqrt(v_prev_lensq)}else{v_trans_x=v_prev_x;v_trans_y=v_prev_y;shrink_by=Math.sqrt(v_prev_lensq/2)}}return new Vector2(v_trans_x/shrink_by,v_trans_y/shrink_by)}const contourMovements=[];for(let i=0,il=contour.length,j=il-1,k=i+1;i<il;i++,j++,k++){if(j===il)j=0;if(k===il)k=0;contourMovements[i]=getBevelVec(contour[i],contour[j],contour[k])}const holesMovements=[];let oneHoleMovements,verticesMovements=contourMovements.concat();for(let h=0,hl=numHoles;h<hl;h++){const ahole=holes[h];oneHoleMovements=[];for(let i=0,il=ahole.length,j=il-1,k=i+1;i<il;i++,j++,k++){if(j===il)j=0;if(k===il)k=0;oneHoleMovements[i]=getBevelVec(ahole[i],ahole[j],ahole[k])}holesMovements.push(oneHoleMovements);verticesMovements=verticesMovements.concat(oneHoleMovements)}let faces;if(bevelSegments===0){faces=ShapeUtils.triangulateShape(contour,holes)}else{const contractedContourVertices=[];const expandedHoleVertices=[];for(let b=0;b<bevelSegments;b++){const t=b/bevelSegments;const z=bevelThickness*Math.cos(t*Math.PI/2);const bs=bevelSize*Math.sin(t*Math.PI/2)+bevelOffset;for(let i=0,il=contour.length;i<il;i++){const vert=scalePt2(contour[i],contourMovements[i],bs);v(vert.x,vert.y,-z);if(t===0)contractedContourVertices.push(vert)}for(let h=0,hl=numHoles;h<hl;h++){const ahole=holes[h];oneHoleMovements=holesMovements[h];const oneHoleVertices=[];for(let i=0,il=ahole.length;i<il;i++){const vert=scalePt2(ahole[i],oneHoleMovements[i],bs);v(vert.x,vert.y,-z);if(t===0)oneHoleVertices.push(vert)}if(t===0)expandedHoleVertices.push(oneHoleVertices)}}faces=ShapeUtils.triangulateShape(contractedContourVertices,expandedHoleVertices)}const flen=faces.length;const bs=bevelSize+bevelOffset;for(let i=0;i<vlen;i++){const vert=bevelEnabled?scalePt2(vertices[i],verticesMovements[i],bs):vertices[i];if(!extrudeByPath){v(vert.x,vert.y,0)}else{normal.copy(splineTube.normals[0]).multiplyScalar(vert.x);binormal.copy(splineTube.binormals[0]).multiplyScalar(vert.y);position2.copy(extrudePts[0]).add(normal).add(binormal);v(position2.x,position2.y,position2.z)}}for(let s=1;s<=steps;s++){for(let i=0;i<vlen;i++){const vert=bevelEnabled?scalePt2(vertices[i],verticesMovements[i],bs):vertices[i];if(!extrudeByPath){v(vert.x,vert.y,depth/steps*s)}else{normal.copy(splineTube.normals[s]).multiplyScalar(vert.x);binormal.copy(splineTube.binormals[s]).multiplyScalar(vert.y);position2.copy(extrudePts[s]).add(normal).add(binormal);v(position2.x,position2.y,position2.z)}}}for(let b=bevelSegments-1;b>=0;b--){const t=b/bevelSegments;const z=bevelThickness*Math.cos(t*Math.PI/2);const bs=bevelSize*Math.sin(t*Math.PI/2)+bevelOffset;for(let i=0,il=contour.length;i<il;i++){const vert=scalePt2(contour[i],contourMovements[i],bs);v(vert.x,vert.y,depth+z)}for(let h=0,hl=holes.length;h<hl;h++){const ahole=holes[h];oneHoleMovements=holesMovements[h];for(let i=0,il=ahole.length;i<il;i++){const vert=scalePt2(ahole[i],oneHoleMovements[i],bs);if(!extrudeByPath){v(vert.x,vert.y,depth+z)}else{v(vert.x,vert.y+extrudePts[steps-1].y,extrudePts[steps-1].x+z)}}}}buildLidFaces();buildSideFaces();function buildLidFaces(){const start=verticesArray.length/3;if(bevelEnabled){let layer=0;let offset=vlen*layer;for(let i=0;i<flen;i++){const face=faces[i];f3(face[2]+offset,face[1]+offset,face[0]+offset)}layer=steps+bevelSegments*2;offset=vlen*layer;for(let i=0;i<flen;i++){const face=faces[i];f3(face[0]+offset,face[1]+offset,face[2]+offset)}}else{for(let i=0;i<flen;i++){const face=faces[i];f3(face[2],face[1],face[0])}for(let i=0;i<flen;i++){const face=faces[i];f3(face[0]+vlen*steps,face[1]+vlen*steps,face[2]+vlen*steps)}}scope.addGroup(start,verticesArray.length/3-start,0)}function buildSideFaces(){const start=verticesArray.length/3;let layeroffset=0;sidewalls(contour,layeroffset);layeroffset+=contour.length;for(let h=0,hl=holes.length;h<hl;h++){const ahole=holes[h];sidewalls(ahole,layeroffset);layeroffset+=ahole.length}scope.addGroup(start,verticesArray.length/3-start,1)}function sidewalls(contour,layeroffset){let i=contour.length;while(--i>=0){const j=i;let k=i-1;if(k<0)k=contour.length-1;for(let s=0,sl=steps+bevelSegments*2;s<sl;s++){const slen1=vlen*s;const slen2=vlen*(s+1);const a=layeroffset+j+slen1,b=layeroffset+k+slen1,c=layeroffset+k+slen2,d=layeroffset+j+slen2;f4(a,b,c,d)}}}function v(x,y,z){placeholder.push(x);placeholder.push(y);placeholder.push(z)}function f3(a,b,c){addVertex(a);addVertex(b);addVertex(c);const nextIndex=verticesArray.length/3;const uvs=uvgen.generateTopUV(scope,verticesArray,nextIndex-3,nextIndex-2,nextIndex-1);addUV(uvs[0]);addUV(uvs[1]);addUV(uvs[2])}function f4(a,b,c,d){addVertex(a);addVertex(b);addVertex(d);addVertex(b);addVertex(c);addVertex(d);const nextIndex=verticesArray.length/3;const uvs=uvgen.generateSideWallUV(scope,verticesArray,nextIndex-6,nextIndex-3,nextIndex-2,nextIndex-1);addUV(uvs[0]);addUV(uvs[1]);addUV(uvs[3]);addUV(uvs[1]);addUV(uvs[2]);addUV(uvs[3])}function addVertex(index){verticesArray.push(placeholder[index*3+0]);verticesArray.push(placeholder[index*3+1]);verticesArray.push(placeholder[index*3+2])}function addUV(vector2){uvArray.push(vector2.x);uvArray.push(vector2.y)}}}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}toJSON(){const data=super.toJSON();const shapes=this.parameters.shapes;const options=this.parameters.options;return toJSON$1(shapes,options,data)}static fromJSON(data,shapes){const geometryShapes=[];for(let j=0,jl=data.shapes.length;j<jl;j++){const shape=shapes[data.shapes[j]];geometryShapes.push(shape)}const extrudePath=data.options.extrudePath;if(extrudePath!==undefined){data.options.extrudePath=new Curves[extrudePath.type]().fromJSON(extrudePath)}return new ExtrudeGeometry(geometryShapes,data.options)}}const WorldUVGenerator={generateTopUV:function(geometry,vertices,indexA,indexB,indexC){const a_x=vertices[indexA*3];const a_y=vertices[indexA*3+1];const b_x=vertices[indexB*3];const b_y=vertices[indexB*3+1];const c_x=vertices[indexC*3];const c_y=vertices[indexC*3+1];return[new Vector2(a_x,a_y),new Vector2(b_x,b_y),new Vector2(c_x,c_y)]},generateSideWallUV:function(geometry,vertices,indexA,indexB,indexC,indexD){const a_x=vertices[indexA*3];const a_y=vertices[indexA*3+1];const a_z=vertices[indexA*3+2];const b_x=vertices[indexB*3];const b_y=vertices[indexB*3+1];const b_z=vertices[indexB*3+2];const c_x=vertices[indexC*3];const c_y=vertices[indexC*3+1];const c_z=vertices[indexC*3+2];const d_x=vertices[indexD*3];const d_y=vertices[indexD*3+1];const d_z=vertices[indexD*3+2];if(Math.abs(a_y-b_y)<Math.abs(a_x-b_x)){return[new Vector2(a_x,1-a_z),new Vector2(b_x,1-b_z),new Vector2(c_x,1-c_z),new Vector2(d_x,1-d_z)]}else{return[new Vector2(a_y,1-a_z),new Vector2(b_y,1-b_z),new Vector2(c_y,1-c_z),new Vector2(d_y,1-d_z)]}}};function toJSON$1(shapes,options,data){data.shapes=[];if(Array.isArray(shapes)){for(let i=0,l=shapes.length;i<l;i++){const shape=shapes[i];data.shapes.push(shape.uuid)}}else{data.shapes.push(shapes.uuid)}data.options=Object.assign({},options);if(options.extrudePath!==undefined)data.options.extrudePath=options.extrudePath.toJSON();return data}class IcosahedronGeometry extends PolyhedronGeometry{constructor(radius=1,detail=0){const t=(1+Math.sqrt(5))/2;const vertices=[-1,t,0,1,t,0,-1,-t,0,1,-t,0,0,-1,t,0,1,t,0,-1,-t,0,1,-t,t,0,-1,t,0,1,-t,0,-1,-t,0,1];const indices=[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1];super(vertices,indices,radius,detail);this.type="IcosahedronGeometry";this.parameters={radius:radius,detail:detail}}static fromJSON(data){return new IcosahedronGeometry(data.radius,data.detail)}}class LatheGeometry extends BufferGeometry{constructor(points=[new Vector2(0,-0.5),new Vector2(0.5,0),new Vector2(0,0.5)],segments=12,phiStart=0,phiLength=Math.PI*2){super();this.type="LatheGeometry";this.parameters={points:points,segments:segments,phiStart:phiStart,phiLength:phiLength};segments=Math.floor(segments);phiLength=clamp(phiLength,0,Math.PI*2);const indices=[];const vertices=[];const uvs=[];const initNormals=[];const normals=[];const inverseSegments=1/segments;const vertex=new Vector3;const uv=new Vector2;const normal=new Vector3;const curNormal=new Vector3;const prevNormal=new Vector3;let dx=0;let dy=0;for(let j=0;j<=points.length-1;j++){switch(j){case 0:dx=points[j+1].x-points[j].x;dy=points[j+1].y-points[j].y;normal.x=dy*1;normal.y=-dx;normal.z=dy*0;prevNormal.copy(normal);normal.normalize();initNormals.push(normal.x,normal.y,normal.z);break;case points.length-1:initNormals.push(prevNormal.x,prevNormal.y,prevNormal.z);break;default:dx=points[j+1].x-points[j].x;dy=points[j+1].y-points[j].y;normal.x=dy*1;normal.y=-dx;normal.z=dy*0;curNormal.copy(normal);normal.x+=prevNormal.x;normal.y+=prevNormal.y;normal.z+=prevNormal.z;normal.normalize();initNormals.push(normal.x,normal.y,normal.z);prevNormal.copy(curNormal);}}for(let i=0;i<=segments;i++){const phi=phiStart+i*inverseSegments*phiLength;const sin=Math.sin(phi);const cos=Math.cos(phi);for(let j=0;j<=points.length-1;j++){vertex.x=points[j].x*sin;vertex.y=points[j].y;vertex.z=points[j].x*cos;vertices.push(vertex.x,vertex.y,vertex.z);uv.x=i/segments;uv.y=j/(points.length-1);uvs.push(uv.x,uv.y);const x=initNormals[3*j+0]*sin;const y=initNormals[3*j+1];const z=initNormals[3*j+0]*cos;normals.push(x,y,z)}}for(let i=0;i<segments;i++){for(let j=0;j<points.length-1;j++){const base=j+i*points.length;const a=base;const b=base+points.length;const c=base+points.length+1;const d=base+1;indices.push(a,b,d);indices.push(c,d,b)}}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2));this.setAttribute("normal",new Float32BufferAttribute(normals,3))}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new LatheGeometry(data.points,data.segments,data.phiStart,data.phiLength)}}class OctahedronGeometry extends PolyhedronGeometry{constructor(radius=1,detail=0){const vertices=[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1];const indices=[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2];super(vertices,indices,radius,detail);this.type="OctahedronGeometry";this.parameters={radius:radius,detail:detail}}static fromJSON(data){return new OctahedronGeometry(data.radius,data.detail)}}class PlaneGeometry extends BufferGeometry{constructor(width=1,height=1,widthSegments=1,heightSegments=1){super();this.type="PlaneGeometry";this.parameters={width:width,height:height,widthSegments:widthSegments,heightSegments:heightSegments};const width_half=width/2;const height_half=height/2;const gridX=Math.floor(widthSegments);const gridY=Math.floor(heightSegments);const gridX1=gridX+1;const gridY1=gridY+1;const segment_width=width/gridX;const segment_height=height/gridY;const indices=[];const vertices=[];const normals=[];const uvs=[];for(let iy=0;iy<gridY1;iy++){const y=iy*segment_height-height_half;for(let ix=0;ix<gridX1;ix++){const x=ix*segment_width-width_half;vertices.push(x,-y,0);normals.push(0,0,1);uvs.push(ix/gridX);uvs.push(1-iy/gridY)}}for(let iy=0;iy<gridY;iy++){for(let ix=0;ix<gridX;ix++){const a=ix+gridX1*iy;const b=ix+gridX1*(iy+1);const c=ix+1+gridX1*(iy+1);const d=ix+1+gridX1*iy;indices.push(a,b,d);indices.push(b,c,d)}}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2))}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new PlaneGeometry(data.width,data.height,data.widthSegments,data.heightSegments)}}class RingGeometry extends BufferGeometry{constructor(innerRadius=0.5,outerRadius=1,thetaSegments=32,phiSegments=1,thetaStart=0,thetaLength=Math.PI*2){super();this.type="RingGeometry";this.parameters={innerRadius:innerRadius,outerRadius:outerRadius,thetaSegments:thetaSegments,phiSegments:phiSegments,thetaStart:thetaStart,thetaLength:thetaLength};thetaSegments=Math.max(3,thetaSegments);phiSegments=Math.max(1,phiSegments);const indices=[];const vertices=[];const normals=[];const uvs=[];let radius=innerRadius;const radiusStep=(outerRadius-innerRadius)/phiSegments;const vertex=new Vector3;const uv=new Vector2;for(let j=0;j<=phiSegments;j++){for(let i=0;i<=thetaSegments;i++){const segment=thetaStart+i/thetaSegments*thetaLength;vertex.x=radius*Math.cos(segment);vertex.y=radius*Math.sin(segment);vertices.push(vertex.x,vertex.y,vertex.z);normals.push(0,0,1);uv.x=(vertex.x/outerRadius+1)/2;uv.y=(vertex.y/outerRadius+1)/2;uvs.push(uv.x,uv.y)}radius+=radiusStep}for(let j=0;j<phiSegments;j++){const thetaSegmentLevel=j*(thetaSegments+1);for(let i=0;i<thetaSegments;i++){const segment=i+thetaSegmentLevel;const a=segment;const b=segment+thetaSegments+1;const c=segment+thetaSegments+2;const d=segment+1;indices.push(a,b,d);indices.push(b,c,d)}}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2))}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new RingGeometry(data.innerRadius,data.outerRadius,data.thetaSegments,data.phiSegments,data.thetaStart,data.thetaLength)}}class ShapeGeometry extends BufferGeometry{constructor(shapes=new Shape([new Vector2(0,0.5),new Vector2(-0.5,-0.5),new Vector2(0.5,-0.5)]),curveSegments=12){super();this.type="ShapeGeometry";this.parameters={shapes:shapes,curveSegments:curveSegments};const indices=[];const vertices=[];const normals=[];const uvs=[];let groupStart=0;let groupCount=0;if(Array.isArray(shapes)===false){addShape(shapes)}else{for(let i=0;i<shapes.length;i++){addShape(shapes[i]);this.addGroup(groupStart,groupCount,i);groupStart+=groupCount;groupCount=0}}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2));function addShape(shape){const indexOffset=vertices.length/3;const points=shape.extractPoints(curveSegments);let shapeVertices=points.shape;const shapeHoles=points.holes;if(ShapeUtils.isClockWise(shapeVertices)===false){shapeVertices=shapeVertices.reverse()}for(let i=0,l=shapeHoles.length;i<l;i++){const shapeHole=shapeHoles[i];if(ShapeUtils.isClockWise(shapeHole)===true){shapeHoles[i]=shapeHole.reverse()}}const faces=ShapeUtils.triangulateShape(shapeVertices,shapeHoles);for(let i=0,l=shapeHoles.length;i<l;i++){const shapeHole=shapeHoles[i];shapeVertices=shapeVertices.concat(shapeHole)}for(let i=0,l=shapeVertices.length;i<l;i++){const vertex=shapeVertices[i];vertices.push(vertex.x,vertex.y,0);normals.push(0,0,1);uvs.push(vertex.x,vertex.y)}for(let i=0,l=faces.length;i<l;i++){const face=faces[i];const a=face[0]+indexOffset;const b=face[1]+indexOffset;const c=face[2]+indexOffset;indices.push(a,b,c);groupCount+=3}}}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}toJSON(){const data=super.toJSON();const shapes=this.parameters.shapes;return toJSON(shapes,data)}static fromJSON(data,shapes){const geometryShapes=[];for(let j=0,jl=data.shapes.length;j<jl;j++){const shape=shapes[data.shapes[j]];geometryShapes.push(shape)}return new ShapeGeometry(geometryShapes,data.curveSegments)}}function toJSON(shapes,data){data.shapes=[];if(Array.isArray(shapes)){for(let i=0,l=shapes.length;i<l;i++){const shape=shapes[i];data.shapes.push(shape.uuid)}}else{data.shapes.push(shapes.uuid)}return data}class SphereGeometry extends BufferGeometry{constructor(radius=1,widthSegments=32,heightSegments=16,phiStart=0,phiLength=Math.PI*2,thetaStart=0,thetaLength=Math.PI){super();this.type="SphereGeometry";this.parameters={radius:radius,widthSegments:widthSegments,heightSegments:heightSegments,phiStart:phiStart,phiLength:phiLength,thetaStart:thetaStart,thetaLength:thetaLength};widthSegments=Math.max(3,Math.floor(widthSegments));heightSegments=Math.max(2,Math.floor(heightSegments));const thetaEnd=Math.min(thetaStart+thetaLength,Math.PI);let index=0;const grid=[];const vertex=new Vector3;const normal=new Vector3;const indices=[];const vertices=[];const normals=[];const uvs=[];for(let iy=0;iy<=heightSegments;iy++){const verticesRow=[];const v=iy/heightSegments;let uOffset=0;if(iy===0&&thetaStart===0){uOffset=0.5/widthSegments}else if(iy===heightSegments&&thetaEnd===Math.PI){uOffset=-0.5/widthSegments}for(let ix=0;ix<=widthSegments;ix++){const u=ix/widthSegments;vertex.x=-radius*Math.cos(phiStart+u*phiLength)*Math.sin(thetaStart+v*thetaLength);vertex.y=radius*Math.cos(thetaStart+v*thetaLength);vertex.z=radius*Math.sin(phiStart+u*phiLength)*Math.sin(thetaStart+v*thetaLength);vertices.push(vertex.x,vertex.y,vertex.z);normal.copy(vertex).normalize();normals.push(normal.x,normal.y,normal.z);uvs.push(u+uOffset,1-v);verticesRow.push(index++)}grid.push(verticesRow)}for(let iy=0;iy<heightSegments;iy++){for(let ix=0;ix<widthSegments;ix++){const a=grid[iy][ix+1];const b=grid[iy][ix];const c=grid[iy+1][ix];const d=grid[iy+1][ix+1];if(iy!==0||thetaStart>0)indices.push(a,b,d);if(iy!==heightSegments-1||thetaEnd<Math.PI)indices.push(b,c,d)}}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2))}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new SphereGeometry(data.radius,data.widthSegments,data.heightSegments,data.phiStart,data.phiLength,data.thetaStart,data.thetaLength)}}class TetrahedronGeometry extends PolyhedronGeometry{constructor(radius=1,detail=0){const vertices=[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1];const indices=[2,1,0,0,3,2,1,3,0,2,3,1];super(vertices,indices,radius,detail);this.type="TetrahedronGeometry";this.parameters={radius:radius,detail:detail}}static fromJSON(data){return new TetrahedronGeometry(data.radius,data.detail)}}class TorusGeometry extends BufferGeometry{constructor(radius=1,tube=0.4,radialSegments=12,tubularSegments=48,arc=Math.PI*2){super();this.type="TorusGeometry";this.parameters={radius:radius,tube:tube,radialSegments:radialSegments,tubularSegments:tubularSegments,arc:arc};radialSegments=Math.floor(radialSegments);tubularSegments=Math.floor(tubularSegments);const indices=[];const vertices=[];const normals=[];const uvs=[];const center=new Vector3;const vertex=new Vector3;const normal=new Vector3;for(let j=0;j<=radialSegments;j++){for(let i=0;i<=tubularSegments;i++){const u=i/tubularSegments*arc;const v=j/radialSegments*Math.PI*2;vertex.x=(radius+tube*Math.cos(v))*Math.cos(u);vertex.y=(radius+tube*Math.cos(v))*Math.sin(u);vertex.z=tube*Math.sin(v);vertices.push(vertex.x,vertex.y,vertex.z);center.x=radius*Math.cos(u);center.y=radius*Math.sin(u);normal.subVectors(vertex,center).normalize();normals.push(normal.x,normal.y,normal.z);uvs.push(i/tubularSegments);uvs.push(j/radialSegments)}}for(let j=1;j<=radialSegments;j++){for(let i=1;i<=tubularSegments;i++){const a=(tubularSegments+1)*j+i-1;const b=(tubularSegments+1)*(j-1)+i-1;const c=(tubularSegments+1)*(j-1)+i;const d=(tubularSegments+1)*j+i;indices.push(a,b,d);indices.push(b,c,d)}}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2))}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new TorusGeometry(data.radius,data.tube,data.radialSegments,data.tubularSegments,data.arc)}}class TorusKnotGeometry extends BufferGeometry{constructor(radius=1,tube=0.4,tubularSegments=64,radialSegments=8,p=2,q=3){super();this.type="TorusKnotGeometry";this.parameters={radius:radius,tube:tube,tubularSegments:tubularSegments,radialSegments:radialSegments,p:p,q:q};tubularSegments=Math.floor(tubularSegments);radialSegments=Math.floor(radialSegments);const indices=[];const vertices=[];const normals=[];const uvs=[];const vertex=new Vector3;const normal=new Vector3;const P1=new Vector3;const P2=new Vector3;const B=new Vector3;const T=new Vector3;const N=new Vector3;for(let i=0;i<=tubularSegments;++i){const u=i/tubularSegments*p*Math.PI*2;calculatePositionOnCurve(u,p,q,radius,P1);calculatePositionOnCurve(u+0.01,p,q,radius,P2);T.subVectors(P2,P1);N.addVectors(P2,P1);B.crossVectors(T,N);N.crossVectors(B,T);B.normalize();N.normalize();for(let j=0;j<=radialSegments;++j){const v=j/radialSegments*Math.PI*2;const cx=-tube*Math.cos(v);const cy=tube*Math.sin(v);vertex.x=P1.x+(cx*N.x+cy*B.x);vertex.y=P1.y+(cx*N.y+cy*B.y);vertex.z=P1.z+(cx*N.z+cy*B.z);vertices.push(vertex.x,vertex.y,vertex.z);normal.subVectors(vertex,P1).normalize();normals.push(normal.x,normal.y,normal.z);uvs.push(i/tubularSegments);uvs.push(j/radialSegments)}}for(let j=1;j<=tubularSegments;j++){for(let i=1;i<=radialSegments;i++){const a=(radialSegments+1)*(j-1)+(i-1);const b=(radialSegments+1)*j+(i-1);const c=(radialSegments+1)*j+i;const d=(radialSegments+1)*(j-1)+i;indices.push(a,b,d);indices.push(b,c,d)}}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2));function calculatePositionOnCurve(u,p,q,radius,position){const cu=Math.cos(u);const su=Math.sin(u);const quOverP=q/p*u;const cs=Math.cos(quOverP);position.x=radius*(2+cs)*0.5*cu;position.y=radius*(2+cs)*su*0.5;position.z=radius*Math.sin(quOverP)*0.5}}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new TorusKnotGeometry(data.radius,data.tube,data.tubularSegments,data.radialSegments,data.p,data.q)}}class TubeGeometry extends BufferGeometry{constructor(path=new QuadraticBezierCurve3(new Vector3(-1,-1,0),new Vector3(-1,1,0),new Vector3(1,1,0)),tubularSegments=64,radius=1,radialSegments=8,closed=false){super();this.type="TubeGeometry";this.parameters={path:path,tubularSegments:tubularSegments,radius:radius,radialSegments:radialSegments,closed:closed};const frames=path.computeFrenetFrames(tubularSegments,closed);this.tangents=frames.tangents;this.normals=frames.normals;this.binormals=frames.binormals;const vertex=new Vector3;const normal=new Vector3;const uv=new Vector2;let P=new Vector3;const vertices=[];const normals=[];const uvs=[];const indices=[];generateBufferData();this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2));function generateBufferData(){for(let i=0;i<tubularSegments;i++){generateSegment(i)}generateSegment(closed===false?tubularSegments:0);generateUVs();generateIndices()}function generateSegment(i){P=path.getPointAt(i/tubularSegments,P);const N=frames.normals[i];const B=frames.binormals[i];for(let j=0;j<=radialSegments;j++){const v=j/radialSegments*Math.PI*2;const sin=Math.sin(v);const cos=-Math.cos(v);normal.x=cos*N.x+sin*B.x;normal.y=cos*N.y+sin*B.y;normal.z=cos*N.z+sin*B.z;normal.normalize();normals.push(normal.x,normal.y,normal.z);vertex.x=P.x+radius*normal.x;vertex.y=P.y+radius*normal.y;vertex.z=P.z+radius*normal.z;vertices.push(vertex.x,vertex.y,vertex.z)}}function generateIndices(){for(let j=1;j<=tubularSegments;j++){for(let i=1;i<=radialSegments;i++){const a=(radialSegments+1)*(j-1)+(i-1);const b=(radialSegments+1)*j+(i-1);const c=(radialSegments+1)*j+i;const d=(radialSegments+1)*(j-1)+i;indices.push(a,b,d);indices.push(b,c,d)}}}function generateUVs(){for(let i=0;i<=tubularSegments;i++){for(let j=0;j<=radialSegments;j++){uv.x=i/tubularSegments;uv.y=j/radialSegments;uvs.push(uv.x,uv.y)}}}}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}toJSON(){const data=super.toJSON();data.path=this.parameters.path.toJSON();return data}static fromJSON(data){return new TubeGeometry(new Curves[data.path.type]().fromJSON(data.path),data.tubularSegments,data.radius,data.radialSegments,data.closed)}}class WireframeGeometry extends BufferGeometry{constructor(geometry=null){super();this.type="WireframeGeometry";this.parameters={geometry:geometry};if(geometry!==null){const vertices=[];const edges=new Set;const start=new Vector3;const end=new Vector3;if(geometry.index!==null){const position=geometry.attributes.position;const indices=geometry.index;let groups=geometry.groups;if(groups.length===0){groups=[{start:0,count:indices.count,materialIndex:0}]}for(let o=0,ol=groups.length;o<ol;++o){const group=groups[o];const groupStart=group.start;const groupCount=group.count;for(let i=groupStart,l=groupStart+groupCount;i<l;i+=3){for(let j=0;j<3;j++){const index1=indices.getX(i+j);const index2=indices.getX(i+(j+1)%3);start.fromBufferAttribute(position,index1);end.fromBufferAttribute(position,index2);if(isUniqueEdge(start,end,edges)===true){vertices.push(start.x,start.y,start.z);vertices.push(end.x,end.y,end.z)}}}}}else{const position=geometry.attributes.position;for(let i=0,l=position.count/3;i<l;i++){for(let j=0;j<3;j++){const index1=3*i+j;const index2=3*i+(j+1)%3;start.fromBufferAttribute(position,index1);end.fromBufferAttribute(position,index2);if(isUniqueEdge(start,end,edges)===true){vertices.push(start.x,start.y,start.z);vertices.push(end.x,end.y,end.z)}}}}this.setAttribute("position",new Float32BufferAttribute(vertices,3))}}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}}function isUniqueEdge(start,end,edges){const hash1=`${start.x},${start.y},${start.z}-${end.x},${end.y},${end.z}`;const hash2=`${end.x},${end.y},${end.z}-${start.x},${start.y},${start.z}`;if(edges.has(hash1)===true||edges.has(hash2)===true){return false}else{edges.add(hash1);edges.add(hash2);return true}}var Geometries=Object.freeze({__proto__:null,BoxGeometry:BoxGeometry,CapsuleGeometry:CapsuleGeometry,CircleGeometry:CircleGeometry,ConeGeometry:ConeGeometry,CylinderGeometry:CylinderGeometry,DodecahedronGeometry:DodecahedronGeometry,EdgesGeometry:EdgesGeometry,ExtrudeGeometry:ExtrudeGeometry,IcosahedronGeometry:IcosahedronGeometry,LatheGeometry:LatheGeometry,OctahedronGeometry:OctahedronGeometry,PlaneGeometry:PlaneGeometry,PolyhedronGeometry:PolyhedronGeometry,RingGeometry:RingGeometry,ShapeGeometry:ShapeGeometry,SphereGeometry:SphereGeometry,TetrahedronGeometry:TetrahedronGeometry,TorusGeometry:TorusGeometry,TorusKnotGeometry:TorusKnotGeometry,TubeGeometry:TubeGeometry,WireframeGeometry:WireframeGeometry});class ShadowMaterial extends Material{constructor(parameters){super();this.isShadowMaterial=true;this.type="ShadowMaterial";this.color=new Color(0);this.transparent=true;this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.color.copy(source.color);this.fog=source.fog;return this}}class RawShaderMaterial extends ShaderMaterial{constructor(parameters){super(parameters);this.isRawShaderMaterial=true;this.type="RawShaderMaterial"}}class MeshStandardMaterial extends Material{constructor(parameters){super();this.isMeshStandardMaterial=true;this.type="MeshStandardMaterial";this.defines={"STANDARD":""};this.color=new Color(16777215);this.roughness=1;this.metalness=0;this.map=null;this.lightMap=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new Color(0);this.emissiveIntensity=1;this.emissiveMap=null;this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=TangentSpaceNormalMap;this.normalScale=new Vector2(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.roughnessMap=null;this.metalnessMap=null;this.alphaMap=null;this.envMap=null;this.envMapRotation=new Euler;this.envMapIntensity=1;this.wireframe=false;this.wireframeLinewidth=1;this.wireframeLinecap="round";this.wireframeLinejoin="round";this.flatShading=false;this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.defines={"STANDARD":""};this.color.copy(source.color);this.roughness=source.roughness;this.metalness=source.metalness;this.map=source.map;this.lightMap=source.lightMap;this.lightMapIntensity=source.lightMapIntensity;this.aoMap=source.aoMap;this.aoMapIntensity=source.aoMapIntensity;this.emissive.copy(source.emissive);this.emissiveMap=source.emissiveMap;this.emissiveIntensity=source.emissiveIntensity;this.bumpMap=source.bumpMap;this.bumpScale=source.bumpScale;this.normalMap=source.normalMap;this.normalMapType=source.normalMapType;this.normalScale.copy(source.normalScale);this.displacementMap=source.displacementMap;this.displacementScale=source.displacementScale;this.displacementBias=source.displacementBias;this.roughnessMap=source.roughnessMap;this.metalnessMap=source.metalnessMap;this.alphaMap=source.alphaMap;this.envMap=source.envMap;this.envMapRotation.copy(source.envMapRotation);this.envMapIntensity=source.envMapIntensity;this.wireframe=source.wireframe;this.wireframeLinewidth=source.wireframeLinewidth;this.wireframeLinecap=source.wireframeLinecap;this.wireframeLinejoin=source.wireframeLinejoin;this.flatShading=source.flatShading;this.fog=source.fog;return this}}class MeshPhysicalMaterial extends MeshStandardMaterial{constructor(parameters){super();this.isMeshPhysicalMaterial=true;this.defines={"STANDARD":"","PHYSICAL":""};this.type="MeshPhysicalMaterial";this.anisotropyRotation=0;this.anisotropyMap=null;this.clearcoatMap=null;this.clearcoatRoughness=0;this.clearcoatRoughnessMap=null;this.clearcoatNormalScale=new Vector2(1,1);this.clearcoatNormalMap=null;this.ior=1.5;Object.defineProperty(this,"reflectivity",{get:function(){return clamp(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(reflectivity){this.ior=(1+0.4*reflectivity)/(1-0.4*reflectivity)}});this.iridescenceMap=null;this.iridescenceIOR=1.3;this.iridescenceThicknessRange=[100,400];this.iridescenceThicknessMap=null;this.sheenColor=new Color(0);this.sheenColorMap=null;this.sheenRoughness=1;this.sheenRoughnessMap=null;this.transmissionMap=null;this.thickness=0;this.thicknessMap=null;this.attenuationDistance=Infinity;this.attenuationColor=new Color(1,1,1);this.specularIntensity=1;this.specularIntensityMap=null;this.specularColor=new Color(1,1,1);this.specularColorMap=null;this._anisotropy=0;this._clearcoat=0;this._dispersion=0;this._iridescence=0;this._sheen=0;this._transmission=0;this.setValues(parameters)}get anisotropy(){return this._anisotropy}set anisotropy(value){if(this._anisotropy>0!==value>0){this.version++}this._anisotropy=value}get clearcoat(){return this._clearcoat}set clearcoat(value){if(this._clearcoat>0!==value>0){this.version++}this._clearcoat=value}get iridescence(){return this._iridescence}set iridescence(value){if(this._iridescence>0!==value>0){this.version++}this._iridescence=value}get dispersion(){return this._dispersion}set dispersion(value){if(this._dispersion>0!==value>0){this.version++}this._dispersion=value}get sheen(){return this._sheen}set sheen(value){if(this._sheen>0!==value>0){this.version++}this._sheen=value}get transmission(){return this._transmission}set transmission(value){if(this._transmission>0!==value>0){this.version++}this._transmission=value}copy(source){super.copy(source);this.defines={"STANDARD":"","PHYSICAL":""};this.anisotropy=source.anisotropy;this.anisotropyRotation=source.anisotropyRotation;this.anisotropyMap=source.anisotropyMap;this.clearcoat=source.clearcoat;this.clearcoatMap=source.clearcoatMap;this.clearcoatRoughness=source.clearcoatRoughness;this.clearcoatRoughnessMap=source.clearcoatRoughnessMap;this.clearcoatNormalMap=source.clearcoatNormalMap;this.clearcoatNormalScale.copy(source.clearcoatNormalScale);this.dispersion=source.dispersion;this.ior=source.ior;this.iridescence=source.iridescence;this.iridescenceMap=source.iridescenceMap;this.iridescenceIOR=source.iridescenceIOR;this.iridescenceThicknessRange=[...source.iridescenceThicknessRange];this.iridescenceThicknessMap=source.iridescenceThicknessMap;this.sheen=source.sheen;this.sheenColor.copy(source.sheenColor);this.sheenColorMap=source.sheenColorMap;this.sheenRoughness=source.sheenRoughness;this.sheenRoughnessMap=source.sheenRoughnessMap;this.transmission=source.transmission;this.transmissionMap=source.transmissionMap;this.thickness=source.thickness;this.thicknessMap=source.thicknessMap;this.attenuationDistance=source.attenuationDistance;this.attenuationColor.copy(source.attenuationColor);this.specularIntensity=source.specularIntensity;this.specularIntensityMap=source.specularIntensityMap;this.specularColor.copy(source.specularColor);this.specularColorMap=source.specularColorMap;return this}}class MeshPhongMaterial extends Material{constructor(parameters){super();this.isMeshPhongMaterial=true;this.type="MeshPhongMaterial";this.color=new Color(16777215);this.specular=new Color(1118481);this.shininess=30;this.map=null;this.lightMap=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new Color(0);this.emissiveIntensity=1;this.emissiveMap=null;this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=TangentSpaceNormalMap;this.normalScale=new Vector2(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.specularMap=null;this.alphaMap=null;this.envMap=null;this.envMapRotation=new Euler;this.combine=MultiplyOperation;this.reflectivity=1;this.refractionRatio=0.98;this.wireframe=false;this.wireframeLinewidth=1;this.wireframeLinecap="round";this.wireframeLinejoin="round";this.flatShading=false;this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.color.copy(source.color);this.specular.copy(source.specular);this.shininess=source.shininess;this.map=source.map;this.lightMap=source.lightMap;this.lightMapIntensity=source.lightMapIntensity;this.aoMap=source.aoMap;this.aoMapIntensity=source.aoMapIntensity;this.emissive.copy(source.emissive);this.emissiveMap=source.emissiveMap;this.emissiveIntensity=source.emissiveIntensity;this.bumpMap=source.bumpMap;this.bumpScale=source.bumpScale;this.normalMap=source.normalMap;this.normalMapType=source.normalMapType;this.normalScale.copy(source.normalScale);this.displacementMap=source.displacementMap;this.displacementScale=source.displacementScale;this.displacementBias=source.displacementBias;this.specularMap=source.specularMap;this.alphaMap=source.alphaMap;this.envMap=source.envMap;this.envMapRotation.copy(source.envMapRotation);this.combine=source.combine;this.reflectivity=source.reflectivity;this.refractionRatio=source.refractionRatio;this.wireframe=source.wireframe;this.wireframeLinewidth=source.wireframeLinewidth;this.wireframeLinecap=source.wireframeLinecap;this.wireframeLinejoin=source.wireframeLinejoin;this.flatShading=source.flatShading;this.fog=source.fog;return this}}class MeshToonMaterial extends Material{constructor(parameters){super();this.isMeshToonMaterial=true;this.defines={"TOON":""};this.type="MeshToonMaterial";this.color=new Color(16777215);this.map=null;this.gradientMap=null;this.lightMap=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new Color(0);this.emissiveIntensity=1;this.emissiveMap=null;this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=TangentSpaceNormalMap;this.normalScale=new Vector2(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.alphaMap=null;this.wireframe=false;this.wireframeLinewidth=1;this.wireframeLinecap="round";this.wireframeLinejoin="round";this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.color.copy(source.color);this.map=source.map;this.gradientMap=source.gradientMap;this.lightMap=source.lightMap;this.lightMapIntensity=source.lightMapIntensity;this.aoMap=source.aoMap;this.aoMapIntensity=source.aoMapIntensity;this.emissive.copy(source.emissive);this.emissiveMap=source.emissiveMap;this.emissiveIntensity=source.emissiveIntensity;this.bumpMap=source.bumpMap;this.bumpScale=source.bumpScale;this.normalMap=source.normalMap;this.normalMapType=source.normalMapType;this.normalScale.copy(source.normalScale);this.displacementMap=source.displacementMap;this.displacementScale=source.displacementScale;this.displacementBias=source.displacementBias;this.alphaMap=source.alphaMap;this.wireframe=source.wireframe;this.wireframeLinewidth=source.wireframeLinewidth;this.wireframeLinecap=source.wireframeLinecap;this.wireframeLinejoin=source.wireframeLinejoin;this.fog=source.fog;return this}}class MeshNormalMaterial extends Material{constructor(parameters){super();this.isMeshNormalMaterial=true;this.type="MeshNormalMaterial";this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=TangentSpaceNormalMap;this.normalScale=new Vector2(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.wireframe=false;this.wireframeLinewidth=1;this.flatShading=false;this.setValues(parameters)}copy(source){super.copy(source);this.bumpMap=source.bumpMap;this.bumpScale=source.bumpScale;this.normalMap=source.normalMap;this.normalMapType=source.normalMapType;this.normalScale.copy(source.normalScale);this.displacementMap=source.displacementMap;this.displacementScale=source.displacementScale;this.displacementBias=source.displacementBias;this.wireframe=source.wireframe;this.wireframeLinewidth=source.wireframeLinewidth;this.flatShading=source.flatShading;return this}}class MeshLambertMaterial extends Material{constructor(parameters){super();this.isMeshLambertMaterial=true;this.type="MeshLambertMaterial";this.color=new Color(16777215);this.map=null;this.lightMap=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new Color(0);this.emissiveIntensity=1;this.emissiveMap=null;this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=TangentSpaceNormalMap;this.normalScale=new Vector2(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.specularMap=null;this.alphaMap=null;this.envMap=null;this.envMapRotation=new Euler;this.combine=MultiplyOperation;this.reflectivity=1;this.refractionRatio=0.98;this.wireframe=false;this.wireframeLinewidth=1;this.wireframeLinecap="round";this.wireframeLinejoin="round";this.flatShading=false;this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.color.copy(source.color);this.map=source.map;this.lightMap=source.lightMap;this.lightMapIntensity=source.lightMapIntensity;this.aoMap=source.aoMap;this.aoMapIntensity=source.aoMapIntensity;this.emissive.copy(source.emissive);this.emissiveMap=source.emissiveMap;this.emissiveIntensity=source.emissiveIntensity;this.bumpMap=source.bumpMap;this.bumpScale=source.bumpScale;this.normalMap=source.normalMap;this.normalMapType=source.normalMapType;this.normalScale.copy(source.normalScale);this.displacementMap=source.displacementMap;this.displacementScale=source.displacementScale;this.displacementBias=source.displacementBias;this.specularMap=source.specularMap;this.alphaMap=source.alphaMap;this.envMap=source.envMap;this.envMapRotation.copy(source.envMapRotation);this.combine=source.combine;this.reflectivity=source.reflectivity;this.refractionRatio=source.refractionRatio;this.wireframe=source.wireframe;this.wireframeLinewidth=source.wireframeLinewidth;this.wireframeLinecap=source.wireframeLinecap;this.wireframeLinejoin=source.wireframeLinejoin;this.flatShading=source.flatShading;this.fog=source.fog;return this}}class MeshDepthMaterial extends Material{constructor(parameters){super();this.isMeshDepthMaterial=true;this.type="MeshDepthMaterial";this.depthPacking=BasicDepthPacking;this.map=null;this.alphaMap=null;this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.wireframe=false;this.wireframeLinewidth=1;this.setValues(parameters)}copy(source){super.copy(source);this.depthPacking=source.depthPacking;this.map=source.map;this.alphaMap=source.alphaMap;this.displacementMap=source.displacementMap;this.displacementScale=source.displacementScale;this.displacementBias=source.displacementBias;this.wireframe=source.wireframe;this.wireframeLinewidth=source.wireframeLinewidth;return this}}class MeshDistanceMaterial extends Material{constructor(parameters){super();this.isMeshDistanceMaterial=true;this.type="MeshDistanceMaterial";this.map=null;this.alphaMap=null;this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.setValues(parameters)}copy(source){super.copy(source);this.map=source.map;this.alphaMap=source.alphaMap;this.displacementMap=source.displacementMap;this.displacementScale=source.displacementScale;this.displacementBias=source.displacementBias;return this}}class MeshMatcapMaterial extends Material{constructor(parameters){super();this.isMeshMatcapMaterial=true;this.defines={"MATCAP":""};this.type="MeshMatcapMaterial";this.color=new Color(16777215);this.matcap=null;this.map=null;this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=TangentSpaceNormalMap;this.normalScale=new Vector2(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.alphaMap=null;this.wireframe=false;this.wireframeLinewidth=1;this.flatShading=false;this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.defines={"MATCAP":""};this.color.copy(source.color);this.matcap=source.matcap;this.map=source.map;this.bumpMap=source.bumpMap;this.bumpScale=source.bumpScale;this.normalMap=source.normalMap;this.normalMapType=source.normalMapType;this.normalScale.copy(source.normalScale);this.displacementMap=source.displacementMap;this.displacementScale=source.displacementScale;this.displacementBias=source.displacementBias;this.alphaMap=source.alphaMap;this.wireframe=source.wireframe;this.wireframeLinewidth=source.wireframeLinewidth;this.flatShading=source.flatShading;this.fog=source.fog;return this}}class LineDashedMaterial extends LineBasicMaterial{constructor(parameters){super();this.isLineDashedMaterial=true;this.type="LineDashedMaterial";this.scale=1;this.dashSize=3;this.gapSize=1;this.setValues(parameters)}copy(source){super.copy(source);this.scale=source.scale;this.dashSize=source.dashSize;this.gapSize=source.gapSize;return this}}function convertArray(array,type){if(!array||array.constructor===type)return array;if(typeof type.BYTES_PER_ELEMENT==="number"){return new type(array)}return Array.prototype.slice.call(array)}function getKeyframeOrder(times){function compareTime(i,j){return times[i]-times[j]}const n=times.length;const result=new Array(n);for(let i=0;i!==n;++i)result[i]=i;result.sort(compareTime);return result}function sortedArray(values,stride,order){const nValues=values.length;const result=new values.constructor(nValues);for(let i=0,dstOffset=0;dstOffset!==nValues;++i){const srcOffset=order[i]*stride;for(let j=0;j!==stride;++j){result[dstOffset++]=values[srcOffset+j]}}return result}function flattenJSON(jsonKeys,times,values,valuePropertyName){let i=1,key=jsonKeys[0];while(key!==undefined&&key[valuePropertyName]===undefined){key=jsonKeys[i++]}if(key===undefined)return;let value=key[valuePropertyName];if(value===undefined)return;if(Array.isArray(value)){do{value=key[valuePropertyName];if(value!==undefined){times.push(key.time);values.push(...value)}key=jsonKeys[i++]}while(key!==undefined)}else if(value.toArray!==undefined){do{value=key[valuePropertyName];if(value!==undefined){times.push(key.time);value.toArray(values,values.length)}key=jsonKeys[i++]}while(key!==undefined)}else{do{value=key[valuePropertyName];if(value!==undefined){times.push(key.time);values.push(value)}key=jsonKeys[i++]}while(key!==undefined)}}function subclip(sourceClip,name,startFrame,endFrame,fps=30){const clip=sourceClip.clone();clip.name=name;const tracks=[];for(let i=0;i<clip.tracks.length;++i){const track=clip.tracks[i];const valueSize=track.getValueSize();const times=[];const values=[];for(let j=0;j<track.times.length;++j){const frame=track.times[j]*fps;if(frame<startFrame||frame>=endFrame)continue;times.push(track.times[j]);for(let k=0;k<valueSize;++k){values.push(track.values[j*valueSize+k])}}if(times.length===0)continue;track.times=convertArray(times,track.times.constructor);track.values=convertArray(values,track.values.constructor);tracks.push(track)}clip.tracks=tracks;let minStartTime=Infinity;for(let i=0;i<clip.tracks.length;++i){if(minStartTime>clip.tracks[i].times[0]){minStartTime=clip.tracks[i].times[0]}}for(let i=0;i<clip.tracks.length;++i){clip.tracks[i].shift(-1*minStartTime)}clip.resetDuration();return clip}function makeClipAdditive(targetClip,referenceFrame=0,referenceClip=targetClip,fps=30){if(fps<=0)fps=30;const numTracks=referenceClip.tracks.length;const referenceTime=referenceFrame/fps;for(let i=0;i<numTracks;++i){const referenceTrack=referenceClip.tracks[i];const referenceTrackType=referenceTrack.ValueTypeName;if(referenceTrackType==="bool"||referenceTrackType==="string")continue;const targetTrack=targetClip.tracks.find(function(track){return track.name===referenceTrack.name&&track.ValueTypeName===referenceTrackType});if(targetTrack===undefined)continue;let referenceOffset=0;const referenceValueSize=referenceTrack.getValueSize();if(referenceTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline){referenceOffset=referenceValueSize/3}let targetOffset=0;const targetValueSize=targetTrack.getValueSize();if(targetTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline){targetOffset=targetValueSize/3}const lastIndex=referenceTrack.times.length-1;let referenceValue;if(referenceTime<=referenceTrack.times[0]){const startIndex=referenceOffset;const endIndex=referenceValueSize-referenceOffset;referenceValue=referenceTrack.values.slice(startIndex,endIndex)}else if(referenceTime>=referenceTrack.times[lastIndex]){const startIndex=lastIndex*referenceValueSize+referenceOffset;const endIndex=startIndex+referenceValueSize-referenceOffset;referenceValue=referenceTrack.values.slice(startIndex,endIndex)}else{const interpolant=referenceTrack.createInterpolant();const startIndex=referenceOffset;const endIndex=referenceValueSize-referenceOffset;interpolant.evaluate(referenceTime);referenceValue=interpolant.resultBuffer.slice(startIndex,endIndex)}if(referenceTrackType==="quaternion"){const referenceQuat=new Quaternion().fromArray(referenceValue).normalize().conjugate();referenceQuat.toArray(referenceValue)}const numTimes=targetTrack.times.length;for(let j=0;j<numTimes;++j){const valueStart=j*targetValueSize+targetOffset;if(referenceTrackType==="quaternion"){Quaternion.multiplyQuaternionsFlat(targetTrack.values,valueStart,referenceValue,0,targetTrack.values,valueStart)}else{const valueEnd=targetValueSize-targetOffset*2;for(let k=0;k<valueEnd;++k){targetTrack.values[valueStart+k]-=referenceValue[k]}}}}targetClip.blendMode=AdditiveAnimationBlendMode;return targetClip}class AnimationUtils{static convertArray(array,type){return convertArray(array,type)}static isTypedArray(object){return isTypedArray(object)}static getKeyframeOrder(times){return getKeyframeOrder(times)}static sortedArray(values,stride,order){return sortedArray(values,stride,order)}static flattenJSON(jsonKeys,times,values,valuePropertyName){flattenJSON(jsonKeys,times,values,valuePropertyName)}static subclip(sourceClip,name,startFrame,endFrame,fps=30){return subclip(sourceClip,name,startFrame,endFrame,fps)}static makeClipAdditive(targetClip,referenceFrame=0,referenceClip=targetClip,fps=30){return makeClipAdditive(targetClip,referenceFrame,referenceClip,fps)}}class Interpolant{constructor(parameterPositions,sampleValues,sampleSize,resultBuffer){this.parameterPositions=parameterPositions;this._cachedIndex=0;this.resultBuffer=resultBuffer!==undefined?resultBuffer:new sampleValues.constructor(sampleSize);this.sampleValues=sampleValues;this.valueSize=sampleSize;this.settings=null;this.DefaultSettings_={}}evaluate(t){const pp=this.parameterPositions;let i1=this._cachedIndex,t1=pp[i1],t0=pp[i1-1];validate_interval:{seek:{let right;linear_scan:{forward_scan:if(!(t<t1)){for(let giveUpAt=i1+2;;){if(t1===undefined){if(t<t0)break forward_scan;i1=pp.length;this._cachedIndex=i1;return this.copySampleValue_(i1-1)}if(i1===giveUpAt)break;t0=t1;t1=pp[++i1];if(t<t1){break seek}}right=pp.length;break linear_scan}if(!(t>=t0)){const t1global=pp[1];if(t<t1global){i1=2;t0=t1global}for(let giveUpAt=i1-2;;){if(t0===undefined){this._cachedIndex=0;return this.copySampleValue_(0)}if(i1===giveUpAt)break;t1=t0;t0=pp[--i1-1];if(t>=t0){break seek}}right=i1;i1=0;break linear_scan}break validate_interval}while(i1<right){const mid=i1+right>>>1;if(t<pp[mid]){right=mid}else{i1=mid+1}}t1=pp[i1];t0=pp[i1-1];if(t0===undefined){this._cachedIndex=0;return this.copySampleValue_(0)}if(t1===undefined){i1=pp.length;this._cachedIndex=i1;return this.copySampleValue_(i1-1)}}this._cachedIndex=i1;this.intervalChanged_(i1,t0,t1)}return this.interpolate_(i1,t0,t,t1)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(index){const result=this.resultBuffer,values=this.sampleValues,stride=this.valueSize,offset=index*stride;for(let i=0;i!==stride;++i){result[i]=values[offset+i]}return result}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class CubicInterpolant extends Interpolant{constructor(parameterPositions,sampleValues,sampleSize,resultBuffer){super(parameterPositions,sampleValues,sampleSize,resultBuffer);this._weightPrev=-0;this._offsetPrev=-0;this._weightNext=-0;this._offsetNext=-0;this.DefaultSettings_={endingStart:ZeroCurvatureEnding,endingEnd:ZeroCurvatureEnding}}intervalChanged_(i1,t0,t1){const pp=this.parameterPositions;let iPrev=i1-2,iNext=i1+1,tPrev=pp[iPrev],tNext=pp[iNext];if(tPrev===undefined){switch(this.getSettings_().endingStart){case ZeroSlopeEnding:iPrev=i1;tPrev=2*t0-t1;break;case WrapAroundEnding:iPrev=pp.length-2;tPrev=t0+pp[iPrev]-pp[iPrev+1];break;default:iPrev=i1;tPrev=t1;}}if(tNext===undefined){switch(this.getSettings_().endingEnd){case ZeroSlopeEnding:iNext=i1;tNext=2*t1-t0;break;case WrapAroundEnding:iNext=1;tNext=t1+pp[1]-pp[0];break;default:iNext=i1-1;tNext=t0;}}const halfDt=(t1-t0)*0.5,stride=this.valueSize;this._weightPrev=halfDt/(t0-tPrev);this._weightNext=halfDt/(tNext-t1);this._offsetPrev=iPrev*stride;this._offsetNext=iNext*stride}interpolate_(i1,t0,t,t1){const result=this.resultBuffer,values=this.sampleValues,stride=this.valueSize,o1=i1*stride,o0=o1-stride,oP=this._offsetPrev,oN=this._offsetNext,wP=this._weightPrev,wN=this._weightNext,p=(t-t0)/(t1-t0),pp=p*p,ppp=pp*p;const sP=-wP*ppp+2*wP*pp-wP*p;const s0=(1+wP)*ppp+(-1.5-2*wP)*pp+(-0.5+wP)*p+1;const s1=(-1-wN)*ppp+(1.5+wN)*pp+0.5*p;const sN=wN*ppp-wN*pp;for(let i=0;i!==stride;++i){result[i]=sP*values[oP+i]+s0*values[o0+i]+s1*values[o1+i]+sN*values[oN+i]}return result}}class LinearInterpolant extends Interpolant{constructor(parameterPositions,sampleValues,sampleSize,resultBuffer){super(parameterPositions,sampleValues,sampleSize,resultBuffer)}interpolate_(i1,t0,t,t1){const result=this.resultBuffer,values=this.sampleValues,stride=this.valueSize,offset1=i1*stride,offset0=offset1-stride,weight1=(t-t0)/(t1-t0),weight0=1-weight1;for(let i=0;i!==stride;++i){result[i]=values[offset0+i]*weight0+values[offset1+i]*weight1}return result}}class DiscreteInterpolant extends Interpolant{constructor(parameterPositions,sampleValues,sampleSize,resultBuffer){super(parameterPositions,sampleValues,sampleSize,resultBuffer)}interpolate_(i1){return this.copySampleValue_(i1-1)}}class KeyframeTrack{constructor(name,times,values,interpolation){if(name===undefined)throw new Error("THREE.KeyframeTrack: track name is undefined");if(times===undefined||times.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+name);this.name=name;this.times=convertArray(times,this.TimeBufferType);this.values=convertArray(values,this.ValueBufferType);this.setInterpolation(interpolation||this.DefaultInterpolation)}static toJSON(track){const trackType=track.constructor;let json;if(trackType.toJSON!==this.toJSON){json=trackType.toJSON(track)}else{json={"name":track.name,"times":convertArray(track.times,Array),"values":convertArray(track.values,Array)};const interpolation=track.getInterpolation();if(interpolation!==track.DefaultInterpolation){json.interpolation=interpolation}}json.type=track.ValueTypeName;return json}InterpolantFactoryMethodDiscrete(result){return new DiscreteInterpolant(this.times,this.values,this.getValueSize(),result)}InterpolantFactoryMethodLinear(result){return new LinearInterpolant(this.times,this.values,this.getValueSize(),result)}InterpolantFactoryMethodSmooth(result){return new CubicInterpolant(this.times,this.values,this.getValueSize(),result)}setInterpolation(interpolation){let factoryMethod;switch(interpolation){case InterpolateDiscrete:factoryMethod=this.InterpolantFactoryMethodDiscrete;break;case InterpolateLinear:factoryMethod=this.InterpolantFactoryMethodLinear;break;case InterpolateSmooth:factoryMethod=this.InterpolantFactoryMethodSmooth;break;}if(factoryMethod===undefined){const message="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===undefined){if(interpolation!==this.DefaultInterpolation){this.setInterpolation(this.DefaultInterpolation)}else{throw new Error(message)}}warn("KeyframeTrack:",message);return this}this.createInterpolant=factoryMethod;return this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return InterpolateDiscrete;case this.InterpolantFactoryMethodLinear:return InterpolateLinear;case this.InterpolantFactoryMethodSmooth:return InterpolateSmooth;}}getValueSize(){return this.values.length/this.times.length}shift(timeOffset){if(timeOffset!==0){const times=this.times;for(let i=0,n=times.length;i!==n;++i){times[i]+=timeOffset}}return this}scale(timeScale){if(timeScale!==1){const times=this.times;for(let i=0,n=times.length;i!==n;++i){times[i]*=timeScale}}return this}trim(startTime,endTime){const times=this.times,nKeys=times.length;let from=0,to=nKeys-1;while(from!==nKeys&&times[from]<startTime){++from}while(to!==-1&&times[to]>endTime){--to}++to;if(from!==0||to!==nKeys){if(from>=to){to=Math.max(to,1);from=to-1}const stride=this.getValueSize();this.times=times.slice(from,to);this.values=this.values.slice(from*stride,to*stride)}return this}validate(){let valid=true;const valueSize=this.getValueSize();if(valueSize-Math.floor(valueSize)!==0){error("KeyframeTrack: Invalid value size in track.",this);valid=false}const times=this.times,values=this.values,nKeys=times.length;if(nKeys===0){error("KeyframeTrack: Track is empty.",this);valid=false}let prevTime=null;for(let i=0;i!==nKeys;i++){const currTime=times[i];if(typeof currTime==="number"&&isNaN(currTime)){error("KeyframeTrack: Time is not a valid number.",this,i,currTime);valid=false;break}if(prevTime!==null&&prevTime>currTime){error("KeyframeTrack: Out of order keys.",this,i,currTime,prevTime);valid=false;break}prevTime=currTime}if(values!==undefined){if(isTypedArray(values)){for(let i=0,n=values.length;i!==n;++i){const value=values[i];if(isNaN(value)){error("KeyframeTrack: Value is not a valid number.",this,i,value);valid=false;break}}}}return valid}optimize(){const times=this.times.slice(),values=this.values.slice(),stride=this.getValueSize(),smoothInterpolation=this.getInterpolation()===InterpolateSmooth,lastIndex=times.length-1;let writeIndex=1;for(let i=1;i<lastIndex;++i){let keep=false;const time=times[i];const timeNext=times[i+1];if(time!==timeNext&&(i!==1||time!==times[0])){if(!smoothInterpolation){const offset=i*stride,offsetP=offset-stride,offsetN=offset+stride;for(let j=0;j!==stride;++j){const value=values[offset+j];if(value!==values[offsetP+j]||value!==values[offsetN+j]){keep=true;break}}}else{keep=true}}if(keep){if(i!==writeIndex){times[writeIndex]=times[i];const readOffset=i*stride,writeOffset=writeIndex*stride;for(let j=0;j!==stride;++j){values[writeOffset+j]=values[readOffset+j]}}++writeIndex}}if(lastIndex>0){times[writeIndex]=times[lastIndex];for(let readOffset=lastIndex*stride,writeOffset=writeIndex*stride,j=0;j!==stride;++j){values[writeOffset+j]=values[readOffset+j]}++writeIndex}if(writeIndex!==times.length){this.times=times.slice(0,writeIndex);this.values=values.slice(0,writeIndex*stride)}else{this.times=times;this.values=values}return this}clone(){const times=this.times.slice();const values=this.values.slice();const TypedKeyframeTrack=this.constructor;const track=new TypedKeyframeTrack(this.name,times,values);track.createInterpolant=this.createInterpolant;return track}}KeyframeTrack.prototype.ValueTypeName="";KeyframeTrack.prototype.TimeBufferType=Float32Array;KeyframeTrack.prototype.ValueBufferType=Float32Array;KeyframeTrack.prototype.DefaultInterpolation=InterpolateLinear;class BooleanKeyframeTrack extends KeyframeTrack{constructor(name,times,values){super(name,times,values)}}BooleanKeyframeTrack.prototype.ValueTypeName="bool";BooleanKeyframeTrack.prototype.ValueBufferType=Array;BooleanKeyframeTrack.prototype.DefaultInterpolation=InterpolateDiscrete;BooleanKeyframeTrack.prototype.InterpolantFactoryMethodLinear=undefined;BooleanKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=undefined;class ColorKeyframeTrack extends KeyframeTrack{constructor(name,times,values,interpolation){super(name,times,values,interpolation)}}ColorKeyframeTrack.prototype.ValueTypeName="color";class NumberKeyframeTrack extends KeyframeTrack{constructor(name,times,values,interpolation){super(name,times,values,interpolation)}}NumberKeyframeTrack.prototype.ValueTypeName="number";class QuaternionLinearInterpolant extends Interpolant{constructor(parameterPositions,sampleValues,sampleSize,resultBuffer){super(parameterPositions,sampleValues,sampleSize,resultBuffer)}interpolate_(i1,t0,t,t1){const result=this.resultBuffer,values=this.sampleValues,stride=this.valueSize,alpha=(t-t0)/(t1-t0);let offset=i1*stride;for(let end=offset+stride;offset!==end;offset+=4){Quaternion.slerpFlat(result,0,values,offset-stride,values,offset,alpha)}return result}}class QuaternionKeyframeTrack extends KeyframeTrack{constructor(name,times,values,interpolation){super(name,times,values,interpolation)}InterpolantFactoryMethodLinear(result){return new QuaternionLinearInterpolant(this.times,this.values,this.getValueSize(),result)}}QuaternionKeyframeTrack.prototype.ValueTypeName="quaternion";QuaternionKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=undefined;class StringKeyframeTrack extends KeyframeTrack{constructor(name,times,values){super(name,times,values)}}StringKeyframeTrack.prototype.ValueTypeName="string";StringKeyframeTrack.prototype.ValueBufferType=Array;StringKeyframeTrack.prototype.DefaultInterpolation=InterpolateDiscrete;StringKeyframeTrack.prototype.InterpolantFactoryMethodLinear=undefined;StringKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=undefined;class VectorKeyframeTrack extends KeyframeTrack{constructor(name,times,values,interpolation){super(name,times,values,interpolation)}}VectorKeyframeTrack.prototype.ValueTypeName="vector";class AnimationClip{constructor(name="",duration=-1,tracks=[],blendMode=NormalAnimationBlendMode){this.name=name;this.tracks=tracks;this.duration=duration;this.blendMode=blendMode;this.uuid=generateUUID();this.userData={};if(this.duration<0){this.resetDuration()}}static parse(json){const tracks=[],jsonTracks=json.tracks,frameTime=1/(json.fps||1);for(let i=0,n=jsonTracks.length;i!==n;++i){tracks.push(parseKeyframeTrack(jsonTracks[i]).scale(frameTime))}const clip=new this(json.name,json.duration,tracks,json.blendMode);clip.uuid=json.uuid;clip.userData=JSON.parse(json.userData||"{}");return clip}static toJSON(clip){const tracks=[],clipTracks=clip.tracks;const json={"name":clip.name,"duration":clip.duration,"tracks":tracks,"uuid":clip.uuid,"blendMode":clip.blendMode,"userData":JSON.stringify(clip.userData)};for(let i=0,n=clipTracks.length;i!==n;++i){tracks.push(KeyframeTrack.toJSON(clipTracks[i]))}return json}static CreateFromMorphTargetSequence(name,morphTargetSequence,fps,noLoop){const numMorphTargets=morphTargetSequence.length;const tracks=[];for(let i=0;i<numMorphTargets;i++){let times=[];let values=[];times.push((i+numMorphTargets-1)%numMorphTargets,i,(i+1)%numMorphTargets);values.push(0,1,0);const order=getKeyframeOrder(times);times=sortedArray(times,1,order);values=sortedArray(values,1,order);if(!noLoop&&times[0]===0){times.push(numMorphTargets);values.push(values[0])}tracks.push(new NumberKeyframeTrack(".morphTargetInfluences["+morphTargetSequence[i].name+"]",times,values).scale(1/fps))}return new this(name,-1,tracks)}static findByName(objectOrClipArray,name){let clipArray=objectOrClipArray;if(!Array.isArray(objectOrClipArray)){const o=objectOrClipArray;clipArray=o.geometry&&o.geometry.animations||o.animations}for(let i=0;i<clipArray.length;i++){if(clipArray[i].name===name){return clipArray[i]}}return null}static CreateClipsFromMorphTargetSequences(morphTargets,fps,noLoop){const animationToMorphTargets={};const pattern=/^([\w-]*?)([\d]+)$/;for(let i=0,il=morphTargets.length;i<il;i++){const morphTarget=morphTargets[i];const parts=morphTarget.name.match(pattern);if(parts&&parts.length>1){const name=parts[1];let animationMorphTargets=animationToMorphTargets[name];if(!animationMorphTargets){animationToMorphTargets[name]=animationMorphTargets=[]}animationMorphTargets.push(morphTarget)}}const clips=[];for(const name in animationToMorphTargets){clips.push(this.CreateFromMorphTargetSequence(name,animationToMorphTargets[name],fps,noLoop))}return clips}static parseAnimation(animation,bones){warn("AnimationClip: parseAnimation() is deprecated and will be removed with r185");if(!animation){error("AnimationClip: No animation in JSONLoader data.");return null}const addNonemptyTrack=function(trackType,trackName,animationKeys,propertyName,destTracks){if(animationKeys.length!==0){const times=[];const values=[];flattenJSON(animationKeys,times,values,propertyName);if(times.length!==0){destTracks.push(new trackType(trackName,times,values))}}};const tracks=[];const clipName=animation.name||"default";const fps=animation.fps||30;const blendMode=animation.blendMode;let duration=animation.length||-1;const hierarchyTracks=animation.hierarchy||[];for(let h=0;h<hierarchyTracks.length;h++){const animationKeys=hierarchyTracks[h].keys;if(!animationKeys||animationKeys.length===0)continue;if(animationKeys[0].morphTargets){const morphTargetNames={};let k;for(k=0;k<animationKeys.length;k++){if(animationKeys[k].morphTargets){for(let m=0;m<animationKeys[k].morphTargets.length;m++){morphTargetNames[animationKeys[k].morphTargets[m]]=-1}}}for(const morphTargetName in morphTargetNames){const times=[];const values=[];for(let m=0;m!==animationKeys[k].morphTargets.length;++m){const animationKey=animationKeys[k];times.push(animationKey.time);values.push(animationKey.morphTarget===morphTargetName?1:0)}tracks.push(new NumberKeyframeTrack(".morphTargetInfluence["+morphTargetName+"]",times,values))}duration=morphTargetNames.length*fps}else{const boneName=".bones["+bones[h].name+"]";addNonemptyTrack(VectorKeyframeTrack,boneName+".position",animationKeys,"pos",tracks);addNonemptyTrack(QuaternionKeyframeTrack,boneName+".quaternion",animationKeys,"rot",tracks);addNonemptyTrack(VectorKeyframeTrack,boneName+".scale",animationKeys,"scl",tracks)}}if(tracks.length===0){return null}const clip=new this(clipName,duration,tracks,blendMode);return clip}resetDuration(){const tracks=this.tracks;let duration=0;for(let i=0,n=tracks.length;i!==n;++i){const track=this.tracks[i];duration=Math.max(duration,track.times[track.times.length-1])}this.duration=duration;return this}trim(){for(let i=0;i<this.tracks.length;i++){this.tracks[i].trim(0,this.duration)}return this}validate(){let valid=true;for(let i=0;i<this.tracks.length;i++){valid=valid&&this.tracks[i].validate()}return valid}optimize(){for(let i=0;i<this.tracks.length;i++){this.tracks[i].optimize()}return this}clone(){const tracks=[];for(let i=0;i<this.tracks.length;i++){tracks.push(this.tracks[i].clone())}const clip=new this.constructor(this.name,this.duration,tracks,this.blendMode);clip.userData=JSON.parse(JSON.stringify(this.userData));return clip}toJSON(){return this.constructor.toJSON(this)}}function getTrackTypeForValueTypeName(typeName){switch(typeName.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return NumberKeyframeTrack;case"vector":case"vector2":case"vector3":case"vector4":return VectorKeyframeTrack;case"color":return ColorKeyframeTrack;case"quaternion":return QuaternionKeyframeTrack;case"bool":case"boolean":return BooleanKeyframeTrack;case"string":return StringKeyframeTrack;}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+typeName)}function parseKeyframeTrack(json){if(json.type===undefined){throw new Error("THREE.KeyframeTrack: track type undefined, can not parse")}const trackType=getTrackTypeForValueTypeName(json.type);if(json.times===undefined){const times=[],values=[];flattenJSON(json.keys,times,values,"value");json.times=times;json.values=values}if(trackType.parse!==undefined){return trackType.parse(json)}else{return new trackType(json.name,json.times,json.values,json.interpolation)}}const Cache={enabled:false,files:{},add:function(key,file){if(this.enabled===false)return;this.files[key]=file},get:function(key){if(this.enabled===false)return;return this.files[key]},remove:function(key){delete this.files[key]},clear:function(){this.files={}}};class LoadingManager{constructor(onLoad,onProgress,onError){const scope=this;let isLoading=false;let itemsLoaded=0;let itemsTotal=0;let urlModifier=undefined;const handlers=[];this.onStart=undefined;this.onLoad=onLoad;this.onProgress=onProgress;this.onError=onError;this._abortController=null;this.itemStart=function(url){itemsTotal++;if(isLoading===false){if(scope.onStart!==undefined){scope.onStart(url,itemsLoaded,itemsTotal)}}isLoading=true};this.itemEnd=function(url){itemsLoaded++;if(scope.onProgress!==undefined){scope.onProgress(url,itemsLoaded,itemsTotal)}if(itemsLoaded===itemsTotal){isLoading=false;if(scope.onLoad!==undefined){scope.onLoad()}}};this.itemError=function(url){if(scope.onError!==undefined){scope.onError(url)}};this.resolveURL=function(url){if(urlModifier){return urlModifier(url)}return url};this.setURLModifier=function(transform){urlModifier=transform;return this};this.addHandler=function(regex,loader){handlers.push(regex,loader);return this};this.removeHandler=function(regex){const index=handlers.indexOf(regex);if(index!==-1){handlers.splice(index,2)}return this};this.getHandler=function(file){for(let i=0,l=handlers.length;i<l;i+=2){const regex=handlers[i];const loader=handlers[i+1];if(regex.global)regex.lastIndex=0;if(regex.test(file)){return loader}}return null};this.abort=function(){this.abortController.abort();this._abortController=null;return this}}get abortController(){if(!this._abortController){this._abortController=new AbortController}return this._abortController}}const DefaultLoadingManager=new LoadingManager;class Loader{constructor(manager){this.manager=manager!==undefined?manager:DefaultLoadingManager;this.crossOrigin="anonymous";this.withCredentials=false;this.path="";this.resourcePath="";this.requestHeader={}}load(){}loadAsync(url,onProgress){const scope=this;return new Promise(function(resolve,reject){scope.load(url,resolve,onProgress,reject)})}parse(){}setCrossOrigin(crossOrigin){this.crossOrigin=crossOrigin;return this}setWithCredentials(value){this.withCredentials=value;return this}setPath(path){this.path=path;return this}setResourcePath(resourcePath){this.resourcePath=resourcePath;return this}setRequestHeader(requestHeader){this.requestHeader=requestHeader;return this}abort(){return this}}Loader.DEFAULT_MATERIAL_NAME="__DEFAULT";const loading={};class HttpError extends Error{constructor(message,response){super(message);this.response=response}}class FileLoader extends Loader{constructor(manager){super(manager);this.mimeType="";this.responseType="";this._abortController=new AbortController}load(url,onLoad,onProgress,onError){if(url===undefined)url="";if(this.path!==undefined)url=this.path+url;url=this.manager.resolveURL(url);const cached=Cache.get(`file:${url}`);if(cached!==undefined){this.manager.itemStart(url);setTimeout(()=>{if(onLoad)onLoad(cached);this.manager.itemEnd(url)},0);return cached}if(loading[url]!==undefined){loading[url].push({onLoad:onLoad,onProgress:onProgress,onError:onError});return}loading[url]=[];loading[url].push({onLoad:onLoad,onProgress:onProgress,onError:onError});const req=new Request(url,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin",signal:typeof AbortSignal.any==="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal});const mimeType=this.mimeType;const responseType=this.responseType;fetch(req).then(response=>{if(response.status===200||response.status===0){if(response.status===0){warn("FileLoader: HTTP Status 0 received.")}if(typeof ReadableStream==="undefined"||response.body===undefined||response.body.getReader===undefined){return response}const callbacks=loading[url];const reader=response.body.getReader();const contentLength=response.headers.get("X-File-Size")||response.headers.get("Content-Length");const total=contentLength?parseInt(contentLength):0;const lengthComputable=total!==0;let loaded=0;const stream=new ReadableStream({start(controller){readData();function readData(){reader.read().then(({done,value})=>{if(done){controller.close()}else{loaded+=value.byteLength;const event=new ProgressEvent("progress",{lengthComputable,loaded,total});for(let i=0,il=callbacks.length;i<il;i++){const callback=callbacks[i];if(callback.onProgress)callback.onProgress(event)}controller.enqueue(value);readData()}},e=>{controller.error(e)})}}});return new Response(stream)}else{throw new HttpError(`fetch for "${response.url}" responded with ${response.status}: ${response.statusText}`,response)}}).then(response=>{switch(responseType){case"arraybuffer":return response.arrayBuffer();case"blob":return response.blob();case"document":return response.text().then(text=>{const parser=new DOMParser;return parser.parseFromString(text,mimeType)});case"json":return response.json();default:if(mimeType===""){return response.text()}else{const re=/charset="?([^;"\s]*)"?/i;const exec=re.exec(mimeType);const label=exec&&exec[1]?exec[1].toLowerCase():undefined;const decoder=new TextDecoder(label);return response.arrayBuffer().then(ab=>decoder.decode(ab))}}}).then(data=>{Cache.add(`file:${url}`,data);const callbacks=loading[url];delete loading[url];for(let i=0,il=callbacks.length;i<il;i++){const callback=callbacks[i];if(callback.onLoad)callback.onLoad(data)}}).catch(err=>{const callbacks=loading[url];if(callbacks===undefined){this.manager.itemError(url);throw err}delete loading[url];for(let i=0,il=callbacks.length;i<il;i++){const callback=callbacks[i];if(callback.onError)callback.onError(err)}this.manager.itemError(url)}).finally(()=>{this.manager.itemEnd(url)});this.manager.itemStart(url)}setResponseType(value){this.responseType=value;return this}setMimeType(value){this.mimeType=value;return this}abort(){this._abortController.abort();this._abortController=new AbortController;return this}}class AnimationLoader extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){const scope=this;const loader=new FileLoader(this.manager);loader.setPath(this.path);loader.setRequestHeader(this.requestHeader);loader.setWithCredentials(this.withCredentials);loader.load(url,function(text){try{onLoad(scope.parse(JSON.parse(text)))}catch(e){if(onError){onError(e)}else{error(e)}scope.manager.itemError(url)}},onProgress,onError)}parse(json){const animations=[];for(let i=0;i<json.length;i++){const clip=AnimationClip.parse(json[i]);animations.push(clip)}return animations}}class CompressedTextureLoader extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){const scope=this;const images=[];const texture=new CompressedTexture;const loader=new FileLoader(this.manager);loader.setPath(this.path);loader.setResponseType("arraybuffer");loader.setRequestHeader(this.requestHeader);loader.setWithCredentials(scope.withCredentials);let loaded=0;function loadTexture(i){loader.load(url[i],function(buffer){const texDatas=scope.parse(buffer,true);images[i]={width:texDatas.width,height:texDatas.height,format:texDatas.format,mipmaps:texDatas.mipmaps};loaded+=1;if(loaded===6){if(texDatas.mipmapCount===1)texture.minFilter=LinearFilter;texture.image=images;texture.format=texDatas.format;texture.needsUpdate=true;if(onLoad)onLoad(texture)}},onProgress,onError)}if(Array.isArray(url)){for(let i=0,il=url.length;i<il;++i){loadTexture(i)}}else{loader.load(url,function(buffer){const texDatas=scope.parse(buffer,true);if(texDatas.isCubemap){const faces=texDatas.mipmaps.length/texDatas.mipmapCount;for(let f=0;f<faces;f++){images[f]={mipmaps:[]};for(let i=0;i<texDatas.mipmapCount;i++){images[f].mipmaps.push(texDatas.mipmaps[f*texDatas.mipmapCount+i]);images[f].format=texDatas.format;images[f].width=texDatas.width;images[f].height=texDatas.height}}texture.image=images}else{texture.image.width=texDatas.width;texture.image.height=texDatas.height;texture.mipmaps=texDatas.mipmaps}if(texDatas.mipmapCount===1){texture.minFilter=LinearFilter}texture.format=texDatas.format;texture.needsUpdate=true;if(onLoad)onLoad(texture)},onProgress,onError)}return texture}}const _loading=new WeakMap;class ImageLoader extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){if(this.path!==undefined)url=this.path+url;url=this.manager.resolveURL(url);const scope=this;const cached=Cache.get(`image:${url}`);if(cached!==undefined){if(cached.complete===true){scope.manager.itemStart(url);setTimeout(function(){if(onLoad)onLoad(cached);scope.manager.itemEnd(url)},0)}else{let arr=_loading.get(cached);if(arr===undefined){arr=[];_loading.set(cached,arr)}arr.push({onLoad,onError})}return cached}const image=createElementNS("img");function onImageLoad(){removeEventListeners();if(onLoad)onLoad(this);const callbacks=_loading.get(this)||[];for(let i=0;i<callbacks.length;i++){const callback=callbacks[i];if(callback.onLoad)callback.onLoad(this)}_loading.delete(this);scope.manager.itemEnd(url)}function onImageError(event){removeEventListeners();if(onError)onError(event);Cache.remove(`image:${url}`);const callbacks=_loading.get(this)||[];for(let i=0;i<callbacks.length;i++){const callback=callbacks[i];if(callback.onError)callback.onError(event)}_loading.delete(this);scope.manager.itemError(url);scope.manager.itemEnd(url)}function removeEventListeners(){image.removeEventListener("load",onImageLoad,false);image.removeEventListener("error",onImageError,false)}image.addEventListener("load",onImageLoad,false);image.addEventListener("error",onImageError,false);if(url.slice(0,5)!=="data:"){if(this.crossOrigin!==undefined)image.crossOrigin=this.crossOrigin}Cache.add(`image:${url}`,image);scope.manager.itemStart(url);image.src=url;return image}}class CubeTextureLoader extends Loader{constructor(manager){super(manager)}load(urls,onLoad,onProgress,onError){const texture=new CubeTexture;texture.colorSpace=SRGBColorSpace;const loader=new ImageLoader(this.manager);loader.setCrossOrigin(this.crossOrigin);loader.setPath(this.path);let loaded=0;function loadTexture(i){loader.load(urls[i],function(image){texture.images[i]=image;loaded++;if(loaded===6){texture.needsUpdate=true;if(onLoad)onLoad(texture)}},undefined,onError)}for(let i=0;i<urls.length;++i){loadTexture(i)}return texture}}class DataTextureLoader extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){const scope=this;const texture=new DataTexture;const loader=new FileLoader(this.manager);loader.setResponseType("arraybuffer");loader.setRequestHeader(this.requestHeader);loader.setPath(this.path);loader.setWithCredentials(scope.withCredentials);loader.load(url,function(buffer){let texData;try{texData=scope.parse(buffer)}catch(error){if(onError!==undefined){onError(error)}else{error(error);return}}if(texData.image!==undefined){texture.image=texData.image}else if(texData.data!==undefined){texture.image.width=texData.width;texture.image.height=texData.height;texture.image.data=texData.data}texture.wrapS=texData.wrapS!==undefined?texData.wrapS:ClampToEdgeWrapping;texture.wrapT=texData.wrapT!==undefined?texData.wrapT:ClampToEdgeWrapping;texture.magFilter=texData.magFilter!==undefined?texData.magFilter:LinearFilter;texture.minFilter=texData.minFilter!==undefined?texData.minFilter:LinearFilter;texture.anisotropy=texData.anisotropy!==undefined?texData.anisotropy:1;if(texData.colorSpace!==undefined){texture.colorSpace=texData.colorSpace}if(texData.flipY!==undefined){texture.flipY=texData.flipY}if(texData.format!==undefined){texture.format=texData.format}if(texData.type!==undefined){texture.type=texData.type}if(texData.mipmaps!==undefined){texture.mipmaps=texData.mipmaps;texture.minFilter=LinearMipmapLinearFilter}if(texData.mipmapCount===1){texture.minFilter=LinearFilter}if(texData.generateMipmaps!==undefined){texture.generateMipmaps=texData.generateMipmaps}texture.needsUpdate=true;if(onLoad)onLoad(texture,texData)},onProgress,onError);return texture}}class TextureLoader extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){const texture=new Texture;const loader=new ImageLoader(this.manager);loader.setCrossOrigin(this.crossOrigin);loader.setPath(this.path);loader.load(url,function(image){texture.image=image;texture.needsUpdate=true;if(onLoad!==undefined){onLoad(texture)}},onProgress,onError);return texture}}class Light extends Object3D{constructor(color,intensity=1){super();this.isLight=true;this.type="Light";this.color=new Color(color);this.intensity=intensity}dispose(){this.dispatchEvent({type:"dispose"})}copy(source,recursive){super.copy(source,recursive);this.color.copy(source.color);this.intensity=source.intensity;return this}toJSON(meta){const data=super.toJSON(meta);data.object.color=this.color.getHex();data.object.intensity=this.intensity;return data}}class HemisphereLight extends Light{constructor(skyColor,groundColor,intensity){super(skyColor,intensity);this.isHemisphereLight=true;this.type="HemisphereLight";this.position.copy(Object3D.DEFAULT_UP);this.updateMatrix();this.groundColor=new Color(groundColor)}copy(source,recursive){super.copy(source,recursive);this.groundColor.copy(source.groundColor);return this}toJSON(meta){const data=super.toJSON(meta);data.object.groundColor=this.groundColor.getHex();return data}}const _projScreenMatrix$1=new Matrix4;const _lightPositionWorld$1=new Vector3;const _lookTarget$1=new Vector3;class LightShadow{constructor(camera){this.camera=camera;this.intensity=1;this.bias=0;this.normalBias=0;this.radius=1;this.blurSamples=8;this.mapSize=new Vector2(512,512);this.mapType=UnsignedByteType;this.map=null;this.mapPass=null;this.matrix=new Matrix4;this.autoUpdate=true;this.needsUpdate=false;this._frustum=new Frustum;this._frameExtents=new Vector2(1,1);this._viewportCount=1;this._viewports=[new Vector4(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(light){const shadowCamera=this.camera;const shadowMatrix=this.matrix;_lightPositionWorld$1.setFromMatrixPosition(light.matrixWorld);shadowCamera.position.copy(_lightPositionWorld$1);_lookTarget$1.setFromMatrixPosition(light.target.matrixWorld);shadowCamera.lookAt(_lookTarget$1);shadowCamera.updateMatrixWorld();_projScreenMatrix$1.multiplyMatrices(shadowCamera.projectionMatrix,shadowCamera.matrixWorldInverse);this._frustum.setFromProjectionMatrix(_projScreenMatrix$1,shadowCamera.coordinateSystem,shadowCamera.reversedDepth);if(shadowCamera.reversedDepth){shadowMatrix.set(0.5,0,0,0.5,0,0.5,0,0.5,0,0,1,0,0,0,0,1)}else{shadowMatrix.set(0.5,0,0,0.5,0,0.5,0,0.5,0,0,0.5,0.5,0,0,0,1)}shadowMatrix.multiply(_projScreenMatrix$1)}getViewport(viewportIndex){return this._viewports[viewportIndex]}getFrameExtents(){return this._frameExtents}dispose(){if(this.map){this.map.dispose()}if(this.mapPass){this.mapPass.dispose()}}copy(source){this.camera=source.camera.clone();this.intensity=source.intensity;this.bias=source.bias;this.radius=source.radius;this.autoUpdate=source.autoUpdate;this.needsUpdate=source.needsUpdate;this.normalBias=source.normalBias;this.blurSamples=source.blurSamples;this.mapSize.copy(source.mapSize);return this}clone(){return new this.constructor().copy(this)}toJSON(){const object={};if(this.intensity!==1)object.intensity=this.intensity;if(this.bias!==0)object.bias=this.bias;if(this.normalBias!==0)object.normalBias=this.normalBias;if(this.radius!==1)object.radius=this.radius;if(this.mapSize.x!==512||this.mapSize.y!==512)object.mapSize=this.mapSize.toArray();object.camera=this.camera.toJSON(false).object;delete object.camera.matrix;return object}}class SpotLightShadow extends LightShadow{constructor(){super(new PerspectiveCamera(50,1,0.5,500));this.isSpotLightShadow=true;this.focus=1;this.aspect=1}updateMatrices(light){const camera=this.camera;const fov=RAD2DEG*2*light.angle*this.focus;const aspect=this.mapSize.width/this.mapSize.height*this.aspect;const far=light.distance||camera.far;if(fov!==camera.fov||aspect!==camera.aspect||far!==camera.far){camera.fov=fov;camera.aspect=aspect;camera.far=far;camera.updateProjectionMatrix()}super.updateMatrices(light)}copy(source){super.copy(source);this.focus=source.focus;return this}}class SpotLight extends Light{constructor(color,intensity,distance=0,angle=Math.PI/3,penumbra=0,decay=2){super(color,intensity);this.isSpotLight=true;this.type="SpotLight";this.position.copy(Object3D.DEFAULT_UP);this.updateMatrix();this.target=new Object3D;this.distance=distance;this.angle=angle;this.penumbra=penumbra;this.decay=decay;this.map=null;this.shadow=new SpotLightShadow}get power(){return this.intensity*Math.PI}set power(power){this.intensity=power/Math.PI}dispose(){super.dispose();this.shadow.dispose()}copy(source,recursive){super.copy(source,recursive);this.distance=source.distance;this.angle=source.angle;this.penumbra=source.penumbra;this.decay=source.decay;this.target=source.target.clone();this.map=source.map;this.shadow=source.shadow.clone();return this}toJSON(meta){const data=super.toJSON(meta);data.object.distance=this.distance;data.object.angle=this.angle;data.object.decay=this.decay;data.object.penumbra=this.penumbra;data.object.target=this.target.uuid;if(this.map&&this.map.isTexture)data.object.map=this.map.toJSON(meta).uuid;data.object.shadow=this.shadow.toJSON();return data}}class PointLightShadow extends LightShadow{constructor(){super(new PerspectiveCamera(90,1,0.5,500));this.isPointLightShadow=true}}class PointLight extends Light{constructor(color,intensity,distance=0,decay=2){super(color,intensity);this.isPointLight=true;this.type="PointLight";this.distance=distance;this.decay=decay;this.shadow=new PointLightShadow}get power(){return this.intensity*4*Math.PI}set power(power){this.intensity=power/(4*Math.PI)}dispose(){super.dispose();this.shadow.dispose()}copy(source,recursive){super.copy(source,recursive);this.distance=source.distance;this.decay=source.decay;this.shadow=source.shadow.clone();return this}toJSON(meta){const data=super.toJSON(meta);data.object.distance=this.distance;data.object.decay=this.decay;data.object.shadow=this.shadow.toJSON();return data}}class OrthographicCamera extends Camera{constructor(left=-1,right=1,top=1,bottom=-1,near=0.1,far=2000){super();this.isOrthographicCamera=true;this.type="OrthographicCamera";this.zoom=1;this.view=null;this.left=left;this.right=right;this.top=top;this.bottom=bottom;this.near=near;this.far=far;this.updateProjectionMatrix()}copy(source,recursive){super.copy(source,recursive);this.left=source.left;this.right=source.right;this.top=source.top;this.bottom=source.bottom;this.near=source.near;this.far=source.far;this.zoom=source.zoom;this.view=source.view===null?null:Object.assign({},source.view);return this}setViewOffset(fullWidth,fullHeight,x,y,width,height){if(this.view===null){this.view={enabled:true,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}}this.view.enabled=true;this.view.fullWidth=fullWidth;this.view.fullHeight=fullHeight;this.view.offsetX=x;this.view.offsetY=y;this.view.width=width;this.view.height=height;this.updateProjectionMatrix()}clearViewOffset(){if(this.view!==null){this.view.enabled=false}this.updateProjectionMatrix()}updateProjectionMatrix(){const dx=(this.right-this.left)/(2*this.zoom);const dy=(this.top-this.bottom)/(2*this.zoom);const cx=(this.right+this.left)/2;const cy=(this.top+this.bottom)/2;let left=cx-dx;let right=cx+dx;let top=cy+dy;let bottom=cy-dy;if(this.view!==null&&this.view.enabled){const scaleW=(this.right-this.left)/this.view.fullWidth/this.zoom;const scaleH=(this.top-this.bottom)/this.view.fullHeight/this.zoom;left+=scaleW*this.view.offsetX;right=left+scaleW*this.view.width;top-=scaleH*this.view.offsetY;bottom=top-scaleH*this.view.height}this.projectionMatrix.makeOrthographic(left,right,top,bottom,this.near,this.far,this.coordinateSystem,this.reversedDepth);this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(meta){const data=super.toJSON(meta);data.object.zoom=this.zoom;data.object.left=this.left;data.object.right=this.right;data.object.top=this.top;data.object.bottom=this.bottom;data.object.near=this.near;data.object.far=this.far;if(this.view!==null)data.object.view=Object.assign({},this.view);return data}}class DirectionalLightShadow extends LightShadow{constructor(){super(new OrthographicCamera(-5,5,5,-5,0.5,500));this.isDirectionalLightShadow=true}}class DirectionalLight extends Light{constructor(color,intensity){super(color,intensity);this.isDirectionalLight=true;this.type="DirectionalLight";this.position.copy(Object3D.DEFAULT_UP);this.updateMatrix();this.target=new Object3D;this.shadow=new DirectionalLightShadow}dispose(){super.dispose();this.shadow.dispose()}copy(source){super.copy(source);this.target=source.target.clone();this.shadow=source.shadow.clone();return this}toJSON(meta){const data=super.toJSON(meta);data.object.shadow=this.shadow.toJSON();data.object.target=this.target.uuid;return data}}class AmbientLight extends Light{constructor(color,intensity){super(color,intensity);this.isAmbientLight=true;this.type="AmbientLight"}}class RectAreaLight extends Light{constructor(color,intensity,width=10,height=10){super(color,intensity);this.isRectAreaLight=true;this.type="RectAreaLight";this.width=width;this.height=height}get power(){return this.intensity*this.width*this.height*Math.PI}set power(power){this.intensity=power/(this.width*this.height*Math.PI)}copy(source){super.copy(source);this.width=source.width;this.height=source.height;return this}toJSON(meta){const data=super.toJSON(meta);data.object.width=this.width;data.object.height=this.height;return data}}class SphericalHarmonics3{constructor(){this.isSphericalHarmonics3=true;this.coefficients=[];for(let i=0;i<9;i++){this.coefficients.push(new Vector3)}}set(coefficients){for(let i=0;i<9;i++){this.coefficients[i].copy(coefficients[i])}return this}zero(){for(let i=0;i<9;i++){this.coefficients[i].set(0,0,0)}return this}getAt(normal,target){const x=normal.x,y=normal.y,z=normal.z;const coeff=this.coefficients;target.copy(coeff[0]).multiplyScalar(0.282095);target.addScaledVector(coeff[1],0.488603*y);target.addScaledVector(coeff[2],0.488603*z);target.addScaledVector(coeff[3],0.488603*x);target.addScaledVector(coeff[4],1.092548*(x*y));target.addScaledVector(coeff[5],1.092548*(y*z));target.addScaledVector(coeff[6],0.315392*(3*z*z-1));target.addScaledVector(coeff[7],1.092548*(x*z));target.addScaledVector(coeff[8],0.546274*(x*x-y*y));return target}getIrradianceAt(normal,target){const x=normal.x,y=normal.y,z=normal.z;const coeff=this.coefficients;target.copy(coeff[0]).multiplyScalar(0.886227);target.addScaledVector(coeff[1],2*0.511664*y);target.addScaledVector(coeff[2],2*0.511664*z);target.addScaledVector(coeff[3],2*0.511664*x);target.addScaledVector(coeff[4],2*0.429043*x*y);target.addScaledVector(coeff[5],2*0.429043*y*z);target.addScaledVector(coeff[6],0.743125*z*z-0.247708);target.addScaledVector(coeff[7],2*0.429043*x*z);target.addScaledVector(coeff[8],0.429043*(x*x-y*y));return target}add(sh){for(let i=0;i<9;i++){this.coefficients[i].add(sh.coefficients[i])}return this}addScaledSH(sh,s){for(let i=0;i<9;i++){this.coefficients[i].addScaledVector(sh.coefficients[i],s)}return this}scale(s){for(let i=0;i<9;i++){this.coefficients[i].multiplyScalar(s)}return this}lerp(sh,alpha){for(let i=0;i<9;i++){this.coefficients[i].lerp(sh.coefficients[i],alpha)}return this}equals(sh){for(let i=0;i<9;i++){if(!this.coefficients[i].equals(sh.coefficients[i])){return false}}return true}copy(sh){return this.set(sh.coefficients)}clone(){return new this.constructor().copy(this)}fromArray(array,offset=0){const coefficients=this.coefficients;for(let i=0;i<9;i++){coefficients[i].fromArray(array,offset+i*3)}return this}toArray(array=[],offset=0){const coefficients=this.coefficients;for(let i=0;i<9;i++){coefficients[i].toArray(array,offset+i*3)}return array}static getBasisAt(normal,shBasis){const x=normal.x,y=normal.y,z=normal.z;shBasis[0]=0.282095;shBasis[1]=0.488603*y;shBasis[2]=0.488603*z;shBasis[3]=0.488603*x;shBasis[4]=1.092548*x*y;shBasis[5]=1.092548*y*z;shBasis[6]=0.315392*(3*z*z-1);shBasis[7]=1.092548*x*z;shBasis[8]=0.546274*(x*x-y*y)}}class LightProbe extends Light{constructor(sh=new SphericalHarmonics3,intensity=1){super(undefined,intensity);this.isLightProbe=true;this.sh=sh}copy(source){super.copy(source);this.sh.copy(source.sh);return this}toJSON(meta){const data=super.toJSON(meta);data.object.sh=this.sh.toArray();return data}}class MaterialLoader extends Loader{constructor(manager){super(manager);this.textures={}}load(url,onLoad,onProgress,onError){const scope=this;const loader=new FileLoader(scope.manager);loader.setPath(scope.path);loader.setRequestHeader(scope.requestHeader);loader.setWithCredentials(scope.withCredentials);loader.load(url,function(text){try{onLoad(scope.parse(JSON.parse(text)))}catch(e){if(onError){onError(e)}else{error(e)}scope.manager.itemError(url)}},onProgress,onError)}parse(json){const textures=this.textures;function getTexture(name){if(textures[name]===undefined){warn("MaterialLoader: Undefined texture",name)}return textures[name]}const material=this.createMaterialFromType(json.type);if(json.uuid!==undefined)material.uuid=json.uuid;if(json.name!==undefined)material.name=json.name;if(json.color!==undefined&&material.color!==undefined)material.color.setHex(json.color);if(json.roughness!==undefined)material.roughness=json.roughness;if(json.metalness!==undefined)material.metalness=json.metalness;if(json.sheen!==undefined)material.sheen=json.sheen;if(json.sheenColor!==undefined)material.sheenColor=new Color().setHex(json.sheenColor);if(json.sheenRoughness!==undefined)material.sheenRoughness=json.sheenRoughness;if(json.emissive!==undefined&&material.emissive!==undefined)material.emissive.setHex(json.emissive);if(json.specular!==undefined&&material.specular!==undefined)material.specular.setHex(json.specular);if(json.specularIntensity!==undefined)material.specularIntensity=json.specularIntensity;if(json.specularColor!==undefined&&material.specularColor!==undefined)material.specularColor.setHex(json.specularColor);if(json.shininess!==undefined)material.shininess=json.shininess;if(json.clearcoat!==undefined)material.clearcoat=json.clearcoat;if(json.clearcoatRoughness!==undefined)material.clearcoatRoughness=json.clearcoatRoughness;if(json.dispersion!==undefined)material.dispersion=json.dispersion;if(json.iridescence!==undefined)material.iridescence=json.iridescence;if(json.iridescenceIOR!==undefined)material.iridescenceIOR=json.iridescenceIOR;if(json.iridescenceThicknessRange!==undefined)material.iridescenceThicknessRange=json.iridescenceThicknessRange;if(json.transmission!==undefined)material.transmission=json.transmission;if(json.thickness!==undefined)material.thickness=json.thickness;if(json.attenuationDistance!==undefined)material.attenuationDistance=json.attenuationDistance;if(json.attenuationColor!==undefined&&material.attenuationColor!==undefined)material.attenuationColor.setHex(json.attenuationColor);if(json.anisotropy!==undefined)material.anisotropy=json.anisotropy;if(json.anisotropyRotation!==undefined)material.anisotropyRotation=json.anisotropyRotation;if(json.fog!==undefined)material.fog=json.fog;if(json.flatShading!==undefined)material.flatShading=json.flatShading;if(json.blending!==undefined)material.blending=json.blending;if(json.combine!==undefined)material.combine=json.combine;if(json.side!==undefined)material.side=json.side;if(json.shadowSide!==undefined)material.shadowSide=json.shadowSide;if(json.opacity!==undefined)material.opacity=json.opacity;if(json.transparent!==undefined)material.transparent=json.transparent;if(json.alphaTest!==undefined)material.alphaTest=json.alphaTest;if(json.alphaHash!==undefined)material.alphaHash=json.alphaHash;if(json.depthFunc!==undefined)material.depthFunc=json.depthFunc;if(json.depthTest!==undefined)material.depthTest=json.depthTest;if(json.depthWrite!==undefined)material.depthWrite=json.depthWrite;if(json.colorWrite!==undefined)material.colorWrite=json.colorWrite;if(json.blendSrc!==undefined)material.blendSrc=json.blendSrc;if(json.blendDst!==undefined)material.blendDst=json.blendDst;if(json.blendEquation!==undefined)material.blendEquation=json.blendEquation;if(json.blendSrcAlpha!==undefined)material.blendSrcAlpha=json.blendSrcAlpha;if(json.blendDstAlpha!==undefined)material.blendDstAlpha=json.blendDstAlpha;if(json.blendEquationAlpha!==undefined)material.blendEquationAlpha=json.blendEquationAlpha;if(json.blendColor!==undefined&&material.blendColor!==undefined)material.blendColor.setHex(json.blendColor);if(json.blendAlpha!==undefined)material.blendAlpha=json.blendAlpha;if(json.stencilWriteMask!==undefined)material.stencilWriteMask=json.stencilWriteMask;if(json.stencilFunc!==undefined)material.stencilFunc=json.stencilFunc;if(json.stencilRef!==undefined)material.stencilRef=json.stencilRef;if(json.stencilFuncMask!==undefined)material.stencilFuncMask=json.stencilFuncMask;if(json.stencilFail!==undefined)material.stencilFail=json.stencilFail;if(json.stencilZFail!==undefined)material.stencilZFail=json.stencilZFail;if(json.stencilZPass!==undefined)material.stencilZPass=json.stencilZPass;if(json.stencilWrite!==undefined)material.stencilWrite=json.stencilWrite;if(json.wireframe!==undefined)material.wireframe=json.wireframe;if(json.wireframeLinewidth!==undefined)material.wireframeLinewidth=json.wireframeLinewidth;if(json.wireframeLinecap!==undefined)material.wireframeLinecap=json.wireframeLinecap;if(json.wireframeLinejoin!==undefined)material.wireframeLinejoin=json.wireframeLinejoin;if(json.rotation!==undefined)material.rotation=json.rotation;if(json.linewidth!==undefined)material.linewidth=json.linewidth;if(json.dashSize!==undefined)material.dashSize=json.dashSize;if(json.gapSize!==undefined)material.gapSize=json.gapSize;if(json.scale!==undefined)material.scale=json.scale;if(json.polygonOffset!==undefined)material.polygonOffset=json.polygonOffset;if(json.polygonOffsetFactor!==undefined)material.polygonOffsetFactor=json.polygonOffsetFactor;if(json.polygonOffsetUnits!==undefined)material.polygonOffsetUnits=json.polygonOffsetUnits;if(json.dithering!==undefined)material.dithering=json.dithering;if(json.alphaToCoverage!==undefined)material.alphaToCoverage=json.alphaToCoverage;if(json.premultipliedAlpha!==undefined)material.premultipliedAlpha=json.premultipliedAlpha;if(json.forceSinglePass!==undefined)material.forceSinglePass=json.forceSinglePass;if(json.allowOverride!==undefined)material.allowOverride=json.allowOverride;if(json.visible!==undefined)material.visible=json.visible;if(json.toneMapped!==undefined)material.toneMapped=json.toneMapped;if(json.userData!==undefined)material.userData=json.userData;if(json.vertexColors!==undefined){if(typeof json.vertexColors==="number"){material.vertexColors=json.vertexColors>0?true:false}else{material.vertexColors=json.vertexColors}}if(json.uniforms!==undefined){for(const name in json.uniforms){const uniform=json.uniforms[name];material.uniforms[name]={};switch(uniform.type){case"t":material.uniforms[name].value=getTexture(uniform.value);break;case"c":material.uniforms[name].value=new Color().setHex(uniform.value);break;case"v2":material.uniforms[name].value=new Vector2().fromArray(uniform.value);break;case"v3":material.uniforms[name].value=new Vector3().fromArray(uniform.value);break;case"v4":material.uniforms[name].value=new Vector4().fromArray(uniform.value);break;case"m3":material.uniforms[name].value=new Matrix3().fromArray(uniform.value);break;case"m4":material.uniforms[name].value=new Matrix4().fromArray(uniform.value);break;default:material.uniforms[name].value=uniform.value;}}}if(json.defines!==undefined)material.defines=json.defines;if(json.vertexShader!==undefined)material.vertexShader=json.vertexShader;if(json.fragmentShader!==undefined)material.fragmentShader=json.fragmentShader;if(json.glslVersion!==undefined)material.glslVersion=json.glslVersion;if(json.extensions!==undefined){for(const key in json.extensions){material.extensions[key]=json.extensions[key]}}if(json.lights!==undefined)material.lights=json.lights;if(json.clipping!==undefined)material.clipping=json.clipping;if(json.size!==undefined)material.size=json.size;if(json.sizeAttenuation!==undefined)material.sizeAttenuation=json.sizeAttenuation;if(json.map!==undefined)material.map=getTexture(json.map);if(json.matcap!==undefined)material.matcap=getTexture(json.matcap);if(json.alphaMap!==undefined)material.alphaMap=getTexture(json.alphaMap);if(json.bumpMap!==undefined)material.bumpMap=getTexture(json.bumpMap);if(json.bumpScale!==undefined)material.bumpScale=json.bumpScale;if(json.normalMap!==undefined)material.normalMap=getTexture(json.normalMap);if(json.normalMapType!==undefined)material.normalMapType=json.normalMapType;if(json.normalScale!==undefined){let normalScale=json.normalScale;if(Array.isArray(normalScale)===false){normalScale=[normalScale,normalScale]}material.normalScale=new Vector2().fromArray(normalScale)}if(json.displacementMap!==undefined)material.displacementMap=getTexture(json.displacementMap);if(json.displacementScale!==undefined)material.displacementScale=json.displacementScale;if(json.displacementBias!==undefined)material.displacementBias=json.displacementBias;if(json.roughnessMap!==undefined)material.roughnessMap=getTexture(json.roughnessMap);if(json.metalnessMap!==undefined)material.metalnessMap=getTexture(json.metalnessMap);if(json.emissiveMap!==undefined)material.emissiveMap=getTexture(json.emissiveMap);if(json.emissiveIntensity!==undefined)material.emissiveIntensity=json.emissiveIntensity;if(json.specularMap!==undefined)material.specularMap=getTexture(json.specularMap);if(json.specularIntensityMap!==undefined)material.specularIntensityMap=getTexture(json.specularIntensityMap);if(json.specularColorMap!==undefined)material.specularColorMap=getTexture(json.specularColorMap);if(json.envMap!==undefined)material.envMap=getTexture(json.envMap);if(json.envMapRotation!==undefined)material.envMapRotation.fromArray(json.envMapRotation);if(json.envMapIntensity!==undefined)material.envMapIntensity=json.envMapIntensity;if(json.reflectivity!==undefined)material.reflectivity=json.reflectivity;if(json.refractionRatio!==undefined)material.refractionRatio=json.refractionRatio;if(json.lightMap!==undefined)material.lightMap=getTexture(json.lightMap);if(json.lightMapIntensity!==undefined)material.lightMapIntensity=json.lightMapIntensity;if(json.aoMap!==undefined)material.aoMap=getTexture(json.aoMap);if(json.aoMapIntensity!==undefined)material.aoMapIntensity=json.aoMapIntensity;if(json.gradientMap!==undefined)material.gradientMap=getTexture(json.gradientMap);if(json.clearcoatMap!==undefined)material.clearcoatMap=getTexture(json.clearcoatMap);if(json.clearcoatRoughnessMap!==undefined)material.clearcoatRoughnessMap=getTexture(json.clearcoatRoughnessMap);if(json.clearcoatNormalMap!==undefined)material.clearcoatNormalMap=getTexture(json.clearcoatNormalMap);if(json.clearcoatNormalScale!==undefined)material.clearcoatNormalScale=new Vector2().fromArray(json.clearcoatNormalScale);if(json.iridescenceMap!==undefined)material.iridescenceMap=getTexture(json.iridescenceMap);if(json.iridescenceThicknessMap!==undefined)material.iridescenceThicknessMap=getTexture(json.iridescenceThicknessMap);if(json.transmissionMap!==undefined)material.transmissionMap=getTexture(json.transmissionMap);if(json.thicknessMap!==undefined)material.thicknessMap=getTexture(json.thicknessMap);if(json.anisotropyMap!==undefined)material.anisotropyMap=getTexture(json.anisotropyMap);if(json.sheenColorMap!==undefined)material.sheenColorMap=getTexture(json.sheenColorMap);if(json.sheenRoughnessMap!==undefined)material.sheenRoughnessMap=getTexture(json.sheenRoughnessMap);return material}setTextures(value){this.textures=value;return this}createMaterialFromType(type){return MaterialLoader.createMaterialFromType(type)}static createMaterialFromType(type){const materialLib={ShadowMaterial,SpriteMaterial,RawShaderMaterial,ShaderMaterial,PointsMaterial,MeshPhysicalMaterial,MeshStandardMaterial,MeshPhongMaterial,MeshToonMaterial,MeshNormalMaterial,MeshLambertMaterial,MeshDepthMaterial,MeshDistanceMaterial,MeshBasicMaterial,MeshMatcapMaterial,LineDashedMaterial,LineBasicMaterial,Material};return new materialLib[type]}}class LoaderUtils{static extractUrlBase(url){const index=url.lastIndexOf("/");if(index===-1)return"./";return url.slice(0,index+1)}static resolveURL(url,path){if(typeof url!=="string"||url==="")return"";if(/^https?:\/\//i.test(path)&&/^\//.test(url)){path=path.replace(/(^https?:\/\/[^\/]+).*/i,"$1")}if(/^(https?:)?\/\//i.test(url))return url;if(/^data:.*,.*$/i.test(url))return url;if(/^blob:.*$/i.test(url))return url;return path+url}}class InstancedBufferGeometry extends BufferGeometry{constructor(){super();this.isInstancedBufferGeometry=true;this.type="InstancedBufferGeometry";this.instanceCount=Infinity}copy(source){super.copy(source);this.instanceCount=source.instanceCount;return this}toJSON(){const data=super.toJSON();data.instanceCount=this.instanceCount;data.isInstancedBufferGeometry=true;return data}}class BufferGeometryLoader extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){const scope=this;const loader=new FileLoader(scope.manager);loader.setPath(scope.path);loader.setRequestHeader(scope.requestHeader);loader.setWithCredentials(scope.withCredentials);loader.load(url,function(text){try{onLoad(scope.parse(JSON.parse(text)))}catch(e){if(onError){onError(e)}else{error(e)}scope.manager.itemError(url)}},onProgress,onError)}parse(json){const interleavedBufferMap={};const arrayBufferMap={};function getInterleavedBuffer(json,uuid){if(interleavedBufferMap[uuid]!==undefined)return interleavedBufferMap[uuid];const interleavedBuffers=json.interleavedBuffers;const interleavedBuffer=interleavedBuffers[uuid];const buffer=getArrayBuffer(json,interleavedBuffer.buffer);const array=getTypedArray(interleavedBuffer.type,buffer);const ib=new InterleavedBuffer(array,interleavedBuffer.stride);ib.uuid=interleavedBuffer.uuid;interleavedBufferMap[uuid]=ib;return ib}function getArrayBuffer(json,uuid){if(arrayBufferMap[uuid]!==undefined)return arrayBufferMap[uuid];const arrayBuffers=json.arrayBuffers;const arrayBuffer=arrayBuffers[uuid];const ab=new Uint32Array(arrayBuffer).buffer;arrayBufferMap[uuid]=ab;return ab}const geometry=json.isInstancedBufferGeometry?new InstancedBufferGeometry:new BufferGeometry;const index=json.data.index;if(index!==undefined){const typedArray=getTypedArray(index.type,index.array);geometry.setIndex(new BufferAttribute(typedArray,1))}const attributes=json.data.attributes;for(const key in attributes){const attribute=attributes[key];let bufferAttribute;if(attribute.isInterleavedBufferAttribute){const interleavedBuffer=getInterleavedBuffer(json.data,attribute.data);bufferAttribute=new InterleavedBufferAttribute(interleavedBuffer,attribute.itemSize,attribute.offset,attribute.normalized)}else{const typedArray=getTypedArray(attribute.type,attribute.array);const bufferAttributeConstr=attribute.isInstancedBufferAttribute?InstancedBufferAttribute:BufferAttribute;bufferAttribute=new bufferAttributeConstr(typedArray,attribute.itemSize,attribute.normalized)}if(attribute.name!==undefined)bufferAttribute.name=attribute.name;if(attribute.usage!==undefined)bufferAttribute.setUsage(attribute.usage);geometry.setAttribute(key,bufferAttribute)}const morphAttributes=json.data.morphAttributes;if(morphAttributes){for(const key in morphAttributes){const attributeArray=morphAttributes[key];const array=[];for(let i=0,il=attributeArray.length;i<il;i++){const attribute=attributeArray[i];let bufferAttribute;if(attribute.isInterleavedBufferAttribute){const interleavedBuffer=getInterleavedBuffer(json.data,attribute.data);bufferAttribute=new InterleavedBufferAttribute(interleavedBuffer,attribute.itemSize,attribute.offset,attribute.normalized)}else{const typedArray=getTypedArray(attribute.type,attribute.array);bufferAttribute=new BufferAttribute(typedArray,attribute.itemSize,attribute.normalized)}if(attribute.name!==undefined)bufferAttribute.name=attribute.name;array.push(bufferAttribute)}geometry.morphAttributes[key]=array}}const morphTargetsRelative=json.data.morphTargetsRelative;if(morphTargetsRelative){geometry.morphTargetsRelative=true}const groups=json.data.groups||json.data.drawcalls||json.data.offsets;if(groups!==undefined){for(let i=0,n=groups.length;i!==n;++i){const group=groups[i];geometry.addGroup(group.start,group.count,group.materialIndex)}}const boundingSphere=json.data.boundingSphere;if(boundingSphere!==undefined){geometry.boundingSphere=new Sphere().fromJSON(boundingSphere)}if(json.name)geometry.name=json.name;if(json.userData)geometry.userData=json.userData;return geometry}}class ObjectLoader extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){const scope=this;const path=this.path===""?LoaderUtils.extractUrlBase(url):this.path;this.resourcePath=this.resourcePath||path;const loader=new FileLoader(this.manager);loader.setPath(this.path);loader.setRequestHeader(this.requestHeader);loader.setWithCredentials(this.withCredentials);loader.load(url,function(text){let json=null;try{json=JSON.parse(text)}catch(error){if(onError!==undefined)onError(error);error("ObjectLoader: Can't parse "+url+".",error.message);return}const metadata=json.metadata;if(metadata===undefined||metadata.type===undefined||metadata.type.toLowerCase()==="geometry"){if(onError!==undefined)onError(new Error("THREE.ObjectLoader: Can't load "+url));error("ObjectLoader: Can't load "+url);return}scope.parse(json,onLoad)},onProgress,onError)}async loadAsync(url,onProgress){const scope=this;const path=this.path===""?LoaderUtils.extractUrlBase(url):this.path;this.resourcePath=this.resourcePath||path;const loader=new FileLoader(this.manager);loader.setPath(this.path);loader.setRequestHeader(this.requestHeader);loader.setWithCredentials(this.withCredentials);const text=await loader.loadAsync(url,onProgress);const json=JSON.parse(text);const metadata=json.metadata;if(metadata===undefined||metadata.type===undefined||metadata.type.toLowerCase()==="geometry"){throw new Error("THREE.ObjectLoader: Can't load "+url)}return await scope.parseAsync(json)}parse(json,onLoad){const animations=this.parseAnimations(json.animations);const shapes=this.parseShapes(json.shapes);const geometries=this.parseGeometries(json.geometries,shapes);const images=this.parseImages(json.images,function(){if(onLoad!==undefined)onLoad(object)});const textures=this.parseTextures(json.textures,images);const materials=this.parseMaterials(json.materials,textures);const object=this.parseObject(json.object,geometries,materials,textures,animations);const skeletons=this.parseSkeletons(json.skeletons,object);this.bindSkeletons(object,skeletons);this.bindLightTargets(object);if(onLoad!==undefined){let hasImages=false;for(const uuid in images){if(images[uuid].data instanceof HTMLImageElement){hasImages=true;break}}if(hasImages===false)onLoad(object)}return object}async parseAsync(json){const animations=this.parseAnimations(json.animations);const shapes=this.parseShapes(json.shapes);const geometries=this.parseGeometries(json.geometries,shapes);const images=await this.parseImagesAsync(json.images);const textures=this.parseTextures(json.textures,images);const materials=this.parseMaterials(json.materials,textures);const object=this.parseObject(json.object,geometries,materials,textures,animations);const skeletons=this.parseSkeletons(json.skeletons,object);this.bindSkeletons(object,skeletons);this.bindLightTargets(object);return object}parseShapes(json){const shapes={};if(json!==undefined){for(let i=0,l=json.length;i<l;i++){const shape=new Shape().fromJSON(json[i]);shapes[shape.uuid]=shape}}return shapes}parseSkeletons(json,object){const skeletons={};const bones={};object.traverse(function(child){if(child.isBone)bones[child.uuid]=child});if(json!==undefined){for(let i=0,l=json.length;i<l;i++){const skeleton=new Skeleton().fromJSON(json[i],bones);skeletons[skeleton.uuid]=skeleton}}return skeletons}parseGeometries(json,shapes){const geometries={};if(json!==undefined){const bufferGeometryLoader=new BufferGeometryLoader;for(let i=0,l=json.length;i<l;i++){let geometry;const data=json[i];switch(data.type){case"BufferGeometry":case"InstancedBufferGeometry":geometry=bufferGeometryLoader.parse(data);break;default:if(data.type in Geometries){geometry=Geometries[data.type].fromJSON(data,shapes)}else{warn(`ObjectLoader: Unsupported geometry type "${data.type}"`)}}geometry.uuid=data.uuid;if(data.name!==undefined)geometry.name=data.name;if(data.userData!==undefined)geometry.userData=data.userData;geometries[data.uuid]=geometry}}return geometries}parseMaterials(json,textures){const cache={};const materials={};if(json!==undefined){const loader=new MaterialLoader;loader.setTextures(textures);for(let i=0,l=json.length;i<l;i++){const data=json[i];if(cache[data.uuid]===undefined){cache[data.uuid]=loader.parse(data)}materials[data.uuid]=cache[data.uuid]}}return materials}parseAnimations(json){const animations={};if(json!==undefined){for(let i=0;i<json.length;i++){const data=json[i];const clip=AnimationClip.parse(data);animations[clip.uuid]=clip}}return animations}parseImages(json,onLoad){const scope=this;const images={};let loader;function loadImage(url){scope.manager.itemStart(url);return loader.load(url,function(){scope.manager.itemEnd(url)},undefined,function(){scope.manager.itemError(url);scope.manager.itemEnd(url)})}function deserializeImage(image){if(typeof image==="string"){const url=image;const path=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(url)?url:scope.resourcePath+url;return loadImage(path)}else{if(image.data){return{data:getTypedArray(image.type,image.data),width:image.width,height:image.height}}else{return null}}}if(json!==undefined&&json.length>0){const manager=new LoadingManager(onLoad);loader=new ImageLoader(manager);loader.setCrossOrigin(this.crossOrigin);for(let i=0,il=json.length;i<il;i++){const image=json[i];const url=image.url;if(Array.isArray(url)){const imageArray=[];for(let j=0,jl=url.length;j<jl;j++){const currentUrl=url[j];const deserializedImage=deserializeImage(currentUrl);if(deserializedImage!==null){if(deserializedImage instanceof HTMLImageElement){imageArray.push(deserializedImage)}else{imageArray.push(new DataTexture(deserializedImage.data,deserializedImage.width,deserializedImage.height))}}}images[image.uuid]=new Source(imageArray)}else{const deserializedImage=deserializeImage(image.url);images[image.uuid]=new Source(deserializedImage)}}}return images}async parseImagesAsync(json){const scope=this;const images={};let loader;async function deserializeImage(image){if(typeof image==="string"){const url=image;const path=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(url)?url:scope.resourcePath+url;return await loader.loadAsync(path)}else{if(image.data){return{data:getTypedArray(image.type,image.data),width:image.width,height:image.height}}else{return null}}}if(json!==undefined&&json.length>0){loader=new ImageLoader(this.manager);loader.setCrossOrigin(this.crossOrigin);for(let i=0,il=json.length;i<il;i++){const image=json[i];const url=image.url;if(Array.isArray(url)){const imageArray=[];for(let j=0,jl=url.length;j<jl;j++){const currentUrl=url[j];const deserializedImage=await deserializeImage(currentUrl);if(deserializedImage!==null){if(deserializedImage instanceof HTMLImageElement){imageArray.push(deserializedImage)}else{imageArray.push(new DataTexture(deserializedImage.data,deserializedImage.width,deserializedImage.height))}}}images[image.uuid]=new Source(imageArray)}else{const deserializedImage=await deserializeImage(image.url);images[image.uuid]=new Source(deserializedImage)}}}return images}parseTextures(json,images){function parseConstant(value,type){if(typeof value==="number")return value;warn("ObjectLoader.parseTexture: Constant should be in numeric form.",value);return type[value]}const textures={};if(json!==undefined){for(let i=0,l=json.length;i<l;i++){const data=json[i];if(data.image===undefined){warn("ObjectLoader: No \"image\" specified for",data.uuid)}if(images[data.image]===undefined){warn("ObjectLoader: Undefined image",data.image)}const source=images[data.image];const image=source.data;let texture;if(Array.isArray(image)){texture=new CubeTexture;if(image.length===6)texture.needsUpdate=true}else{if(image&&image.data){texture=new DataTexture}else{texture=new Texture}if(image)texture.needsUpdate=true}texture.source=source;texture.uuid=data.uuid;if(data.name!==undefined)texture.name=data.name;if(data.mapping!==undefined)texture.mapping=parseConstant(data.mapping,TEXTURE_MAPPING);if(data.channel!==undefined)texture.channel=data.channel;if(data.offset!==undefined)texture.offset.fromArray(data.offset);if(data.repeat!==undefined)texture.repeat.fromArray(data.repeat);if(data.center!==undefined)texture.center.fromArray(data.center);if(data.rotation!==undefined)texture.rotation=data.rotation;if(data.wrap!==undefined){texture.wrapS=parseConstant(data.wrap[0],TEXTURE_WRAPPING);texture.wrapT=parseConstant(data.wrap[1],TEXTURE_WRAPPING)}if(data.format!==undefined)texture.format=data.format;if(data.internalFormat!==undefined)texture.internalFormat=data.internalFormat;if(data.type!==undefined)texture.type=data.type;if(data.colorSpace!==undefined)texture.colorSpace=data.colorSpace;if(data.minFilter!==undefined)texture.minFilter=parseConstant(data.minFilter,TEXTURE_FILTER);if(data.magFilter!==undefined)texture.magFilter=parseConstant(data.magFilter,TEXTURE_FILTER);if(data.anisotropy!==undefined)texture.anisotropy=data.anisotropy;if(data.flipY!==undefined)texture.flipY=data.flipY;if(data.generateMipmaps!==undefined)texture.generateMipmaps=data.generateMipmaps;if(data.premultiplyAlpha!==undefined)texture.premultiplyAlpha=data.premultiplyAlpha;if(data.unpackAlignment!==undefined)texture.unpackAlignment=data.unpackAlignment;if(data.compareFunction!==undefined)texture.compareFunction=data.compareFunction;if(data.userData!==undefined)texture.userData=data.userData;textures[data.uuid]=texture}}return textures}parseObject(data,geometries,materials,textures,animations){let object;function getGeometry(name){if(geometries[name]===undefined){warn("ObjectLoader: Undefined geometry",name)}return geometries[name]}function getMaterial(name){if(name===undefined)return undefined;if(Array.isArray(name)){const array=[];for(let i=0,l=name.length;i<l;i++){const uuid=name[i];if(materials[uuid]===undefined){warn("ObjectLoader: Undefined material",uuid)}array.push(materials[uuid])}return array}if(materials[name]===undefined){warn("ObjectLoader: Undefined material",name)}return materials[name]}function getTexture(uuid){if(textures[uuid]===undefined){warn("ObjectLoader: Undefined texture",uuid)}return textures[uuid]}let geometry,material;switch(data.type){case"Scene":object=new Scene;if(data.background!==undefined){if(Number.isInteger(data.background)){object.background=new Color(data.background)}else{object.background=getTexture(data.background)}}if(data.environment!==undefined){object.environment=getTexture(data.environment)}if(data.fog!==undefined){if(data.fog.type==="Fog"){object.fog=new Fog(data.fog.color,data.fog.near,data.fog.far)}else if(data.fog.type==="FogExp2"){object.fog=new FogExp2(data.fog.color,data.fog.density)}if(data.fog.name!==""){object.fog.name=data.fog.name}}if(data.backgroundBlurriness!==undefined)object.backgroundBlurriness=data.backgroundBlurriness;if(data.backgroundIntensity!==undefined)object.backgroundIntensity=data.backgroundIntensity;if(data.backgroundRotation!==undefined)object.backgroundRotation.fromArray(data.backgroundRotation);if(data.environmentIntensity!==undefined)object.environmentIntensity=data.environmentIntensity;if(data.environmentRotation!==undefined)object.environmentRotation.fromArray(data.environmentRotation);break;case"PerspectiveCamera":object=new PerspectiveCamera(data.fov,data.aspect,data.near,data.far);if(data.focus!==undefined)object.focus=data.focus;if(data.zoom!==undefined)object.zoom=data.zoom;if(data.filmGauge!==undefined)object.filmGauge=data.filmGauge;if(data.filmOffset!==undefined)object.filmOffset=data.filmOffset;if(data.view!==undefined)object.view=Object.assign({},data.view);break;case"OrthographicCamera":object=new OrthographicCamera(data.left,data.right,data.top,data.bottom,data.near,data.far);if(data.zoom!==undefined)object.zoom=data.zoom;if(data.view!==undefined)object.view=Object.assign({},data.view);break;case"AmbientLight":object=new AmbientLight(data.color,data.intensity);break;case"DirectionalLight":object=new DirectionalLight(data.color,data.intensity);object.target=data.target||"";break;case"PointLight":object=new PointLight(data.color,data.intensity,data.distance,data.decay);break;case"RectAreaLight":object=new RectAreaLight(data.color,data.intensity,data.width,data.height);break;case"SpotLight":object=new SpotLight(data.color,data.intensity,data.distance,data.angle,data.penumbra,data.decay);object.target=data.target||"";break;case"HemisphereLight":object=new HemisphereLight(data.color,data.groundColor,data.intensity);break;case"LightProbe":const sh=new SphericalHarmonics3().fromArray(data.sh);object=new LightProbe(sh,data.intensity);break;case"SkinnedMesh":geometry=getGeometry(data.geometry);material=getMaterial(data.material);object=new SkinnedMesh(geometry,material);if(data.bindMode!==undefined)object.bindMode=data.bindMode;if(data.bindMatrix!==undefined)object.bindMatrix.fromArray(data.bindMatrix);if(data.skeleton!==undefined)object.skeleton=data.skeleton;break;case"Mesh":geometry=getGeometry(data.geometry);material=getMaterial(data.material);object=new Mesh(geometry,material);break;case"InstancedMesh":geometry=getGeometry(data.geometry);material=getMaterial(data.material);const count=data.count;const instanceMatrix=data.instanceMatrix;const instanceColor=data.instanceColor;object=new InstancedMesh(geometry,material,count);object.instanceMatrix=new InstancedBufferAttribute(new Float32Array(instanceMatrix.array),16);if(instanceColor!==undefined)object.instanceColor=new InstancedBufferAttribute(new Float32Array(instanceColor.array),instanceColor.itemSize);break;case"BatchedMesh":geometry=getGeometry(data.geometry);material=getMaterial(data.material);object=new BatchedMesh(data.maxInstanceCount,data.maxVertexCount,data.maxIndexCount,material);object.geometry=geometry;object.perObjectFrustumCulled=data.perObjectFrustumCulled;object.sortObjects=data.sortObjects;object._drawRanges=data.drawRanges;object._reservedRanges=data.reservedRanges;object._geometryInfo=data.geometryInfo.map(info=>{let box=null;let sphere=null;if(info.boundingBox!==undefined){box=new Box3().fromJSON(info.boundingBox)}if(info.boundingSphere!==undefined){sphere=new Sphere().fromJSON(info.boundingSphere)}return{...info,boundingBox:box,boundingSphere:sphere}});object._instanceInfo=data.instanceInfo;object._availableInstanceIds=data._availableInstanceIds;object._availableGeometryIds=data._availableGeometryIds;object._nextIndexStart=data.nextIndexStart;object._nextVertexStart=data.nextVertexStart;object._geometryCount=data.geometryCount;object._maxInstanceCount=data.maxInstanceCount;object._maxVertexCount=data.maxVertexCount;object._maxIndexCount=data.maxIndexCount;object._geometryInitialized=data.geometryInitialized;object._matricesTexture=getTexture(data.matricesTexture.uuid);object._indirectTexture=getTexture(data.indirectTexture.uuid);if(data.colorsTexture!==undefined){object._colorsTexture=getTexture(data.colorsTexture.uuid)}if(data.boundingSphere!==undefined){object.boundingSphere=new Sphere().fromJSON(data.boundingSphere)}if(data.boundingBox!==undefined){object.boundingBox=new Box3().fromJSON(data.boundingBox)}break;case"LOD":object=new LOD;break;case"Line":object=new Line(getGeometry(data.geometry),getMaterial(data.material));break;case"LineLoop":object=new LineLoop(getGeometry(data.geometry),getMaterial(data.material));break;case"LineSegments":object=new LineSegments(getGeometry(data.geometry),getMaterial(data.material));break;case"PointCloud":case"Points":object=new Points(getGeometry(data.geometry),getMaterial(data.material));break;case"Sprite":object=new Sprite(getMaterial(data.material));break;case"Group":object=new Group;break;case"Bone":object=new Bone;break;default:object=new Object3D;}object.uuid=data.uuid;if(data.name!==undefined)object.name=data.name;if(data.matrix!==undefined){object.matrix.fromArray(data.matrix);if(data.matrixAutoUpdate!==undefined)object.matrixAutoUpdate=data.matrixAutoUpdate;if(object.matrixAutoUpdate)object.matrix.decompose(object.position,object.quaternion,object.scale)}else{if(data.position!==undefined)object.position.fromArray(data.position);if(data.rotation!==undefined)object.rotation.fromArray(data.rotation);if(data.quaternion!==undefined)object.quaternion.fromArray(data.quaternion);if(data.scale!==undefined)object.scale.fromArray(data.scale)}if(data.up!==undefined)object.up.fromArray(data.up);if(data.castShadow!==undefined)object.castShadow=data.castShadow;if(data.receiveShadow!==undefined)object.receiveShadow=data.receiveShadow;if(data.shadow){if(data.shadow.intensity!==undefined)object.shadow.intensity=data.shadow.intensity;if(data.shadow.bias!==undefined)object.shadow.bias=data.shadow.bias;if(data.shadow.normalBias!==undefined)object.shadow.normalBias=data.shadow.normalBias;if(data.shadow.radius!==undefined)object.shadow.radius=data.shadow.radius;if(data.shadow.mapSize!==undefined)object.shadow.mapSize.fromArray(data.shadow.mapSize);if(data.shadow.camera!==undefined)object.shadow.camera=this.parseObject(data.shadow.camera)}if(data.visible!==undefined)object.visible=data.visible;if(data.frustumCulled!==undefined)object.frustumCulled=data.frustumCulled;if(data.renderOrder!==undefined)object.renderOrder=data.renderOrder;if(data.userData!==undefined)object.userData=data.userData;if(data.layers!==undefined)object.layers.mask=data.layers;if(data.children!==undefined){const children=data.children;for(let i=0;i<children.length;i++){object.add(this.parseObject(children[i],geometries,materials,textures,animations))}}if(data.animations!==undefined){const objectAnimations=data.animations;for(let i=0;i<objectAnimations.length;i++){const uuid=objectAnimations[i];object.animations.push(animations[uuid])}}if(data.type==="LOD"){if(data.autoUpdate!==undefined)object.autoUpdate=data.autoUpdate;const levels=data.levels;for(let l=0;l<levels.length;l++){const level=levels[l];const child=object.getObjectByProperty("uuid",level.object);if(child!==undefined){object.addLevel(child,level.distance,level.hysteresis)}}}return object}bindSkeletons(object,skeletons){if(Object.keys(skeletons).length===0)return;object.traverse(function(child){if(child.isSkinnedMesh===true&&child.skeleton!==undefined){const skeleton=skeletons[child.skeleton];if(skeleton===undefined){warn("ObjectLoader: No skeleton found with UUID:",child.skeleton)}else{child.bind(skeleton,child.bindMatrix)}}})}bindLightTargets(object){object.traverse(function(child){if(child.isDirectionalLight||child.isSpotLight){const uuid=child.target;const target=object.getObjectByProperty("uuid",uuid);if(target!==undefined){child.target=target}else{child.target=new Object3D}}})}}const TEXTURE_MAPPING={UVMapping:UVMapping,CubeReflectionMapping:CubeReflectionMapping,CubeRefractionMapping:CubeRefractionMapping,EquirectangularReflectionMapping:EquirectangularReflectionMapping,EquirectangularRefractionMapping:EquirectangularRefractionMapping,CubeUVReflectionMapping:CubeUVReflectionMapping};const TEXTURE_WRAPPING={RepeatWrapping:RepeatWrapping,ClampToEdgeWrapping:ClampToEdgeWrapping,MirroredRepeatWrapping:MirroredRepeatWrapping};const TEXTURE_FILTER={NearestFilter:NearestFilter,NearestMipmapNearestFilter:NearestMipmapNearestFilter,NearestMipmapLinearFilter:NearestMipmapLinearFilter,LinearFilter:LinearFilter,LinearMipmapNearestFilter:LinearMipmapNearestFilter,LinearMipmapLinearFilter:LinearMipmapLinearFilter};const _errorMap=new WeakMap;class ImageBitmapLoader extends Loader{constructor(manager){super(manager);this.isImageBitmapLoader=true;if(typeof createImageBitmap==="undefined"){warn("ImageBitmapLoader: createImageBitmap() not supported.")}if(typeof fetch==="undefined"){warn("ImageBitmapLoader: fetch() not supported.")}this.options={premultiplyAlpha:"none"};this._abortController=new AbortController}setOptions(options){this.options=options;return this}load(url,onLoad,onProgress,onError){if(url===undefined)url="";if(this.path!==undefined)url=this.path+url;url=this.manager.resolveURL(url);const scope=this;const cached=Cache.get(`image-bitmap:${url}`);if(cached!==undefined){scope.manager.itemStart(url);if(cached.then){cached.then(imageBitmap=>{if(_errorMap.has(cached)===true){if(onError)onError(_errorMap.get(cached));scope.manager.itemError(url);scope.manager.itemEnd(url)}else{if(onLoad)onLoad(imageBitmap);scope.manager.itemEnd(url);return imageBitmap}});return}setTimeout(function(){if(onLoad)onLoad(cached);scope.manager.itemEnd(url)},0);return cached}const fetchOptions={};fetchOptions.credentials=this.crossOrigin==="anonymous"?"same-origin":"include";fetchOptions.headers=this.requestHeader;fetchOptions.signal=typeof AbortSignal.any==="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal;const promise=fetch(url,fetchOptions).then(function(res){return res.blob()}).then(function(blob){return createImageBitmap(blob,Object.assign(scope.options,{colorSpaceConversion:"none"}))}).then(function(imageBitmap){Cache.add(`image-bitmap:${url}`,imageBitmap);if(onLoad)onLoad(imageBitmap);scope.manager.itemEnd(url);return imageBitmap}).catch(function(e){if(onError)onError(e);_errorMap.set(promise,e);Cache.remove(`image-bitmap:${url}`);scope.manager.itemError(url);scope.manager.itemEnd(url)});Cache.add(`image-bitmap:${url}`,promise);scope.manager.itemStart(url)}abort(){this._abortController.abort();this._abortController=new AbortController;return this}}let _context;class AudioContext{static getContext(){if(_context===undefined){_context=new(window.AudioContext||window.webkitAudioContext)}return _context}static setContext(value){_context=value}}class AudioLoader extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){const scope=this;const loader=new FileLoader(this.manager);loader.setResponseType("arraybuffer");loader.setPath(this.path);loader.setRequestHeader(this.requestHeader);loader.setWithCredentials(this.withCredentials);loader.load(url,function(buffer){try{const bufferCopy=buffer.slice(0);const context=AudioContext.getContext();context.decodeAudioData(bufferCopy,function(audioBuffer){onLoad(audioBuffer)}).catch(handleError)}catch(e){handleError(e)}},onProgress,onError);function handleError(e){if(onError){onError(e)}else{error(e)}scope.manager.itemError(url)}}}const _eyeRight=new Matrix4;const _eyeLeft=new Matrix4;const _projectionMatrix=new Matrix4;class StereoCamera{constructor(){this.type="StereoCamera";this.aspect=1;this.eyeSep=0.064;this.cameraL=new PerspectiveCamera;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=false;this.cameraR=new PerspectiveCamera;this.cameraR.layers.enable(2);this.cameraR.matrixAutoUpdate=false;this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(camera){const cache=this._cache;const needsUpdate=cache.focus!==camera.focus||cache.fov!==camera.fov||cache.aspect!==camera.aspect*this.aspect||cache.near!==camera.near||cache.far!==camera.far||cache.zoom!==camera.zoom||cache.eyeSep!==this.eyeSep;if(needsUpdate){cache.focus=camera.focus;cache.fov=camera.fov;cache.aspect=camera.aspect*this.aspect;cache.near=camera.near;cache.far=camera.far;cache.zoom=camera.zoom;cache.eyeSep=this.eyeSep;_projectionMatrix.copy(camera.projectionMatrix);const eyeSepHalf=cache.eyeSep/2;const eyeSepOnProjection=eyeSepHalf*cache.near/cache.focus;const ymax=cache.near*Math.tan(DEG2RAD*cache.fov*0.5)/cache.zoom;let xmin,xmax;_eyeLeft.elements[12]=-eyeSepHalf;_eyeRight.elements[12]=eyeSepHalf;xmin=-ymax*cache.aspect+eyeSepOnProjection;xmax=ymax*cache.aspect+eyeSepOnProjection;_projectionMatrix.elements[0]=2*cache.near/(xmax-xmin);_projectionMatrix.elements[8]=(xmax+xmin)/(xmax-xmin);this.cameraL.projectionMatrix.copy(_projectionMatrix);xmin=-ymax*cache.aspect-eyeSepOnProjection;xmax=ymax*cache.aspect-eyeSepOnProjection;_projectionMatrix.elements[0]=2*cache.near/(xmax-xmin);_projectionMatrix.elements[8]=(xmax+xmin)/(xmax-xmin);this.cameraR.projectionMatrix.copy(_projectionMatrix)}this.cameraL.matrixWorld.copy(camera.matrixWorld).multiply(_eyeLeft);this.cameraR.matrixWorld.copy(camera.matrixWorld).multiply(_eyeRight)}}class ArrayCamera extends PerspectiveCamera{constructor(array=[]){super();this.isArrayCamera=true;this.isMultiViewCamera=false;this.cameras=array}}class Clock{constructor(autoStart=true){this.autoStart=autoStart;this.startTime=0;this.oldTime=0;this.elapsedTime=0;this.running=false}start(){this.startTime=performance.now();this.oldTime=this.startTime;this.elapsedTime=0;this.running=true}stop(){this.getElapsedTime();this.running=false;this.autoStart=false}getElapsedTime(){this.getDelta();return this.elapsedTime}getDelta(){let diff=0;if(this.autoStart&&!this.running){this.start();return 0}if(this.running){const newTime=performance.now();diff=(newTime-this.oldTime)/1000;this.oldTime=newTime;this.elapsedTime+=diff}return diff}}const _position$1=new Vector3;const _quaternion$1=new Quaternion;const _scale$1=new Vector3;const _forward=new Vector3;const _up=new Vector3;class AudioListener extends Object3D{constructor(){super();this.type="AudioListener";this.context=AudioContext.getContext();this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null;this.timeDelta=0;this._clock=new Clock}getInput(){return this.gain}removeFilter(){if(this.filter!==null){this.gain.disconnect(this.filter);this.filter.disconnect(this.context.destination);this.gain.connect(this.context.destination);this.filter=null}return this}getFilter(){return this.filter}setFilter(value){if(this.filter!==null){this.gain.disconnect(this.filter);this.filter.disconnect(this.context.destination)}else{this.gain.disconnect(this.context.destination)}this.filter=value;this.gain.connect(this.filter);this.filter.connect(this.context.destination);return this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(value){this.gain.gain.setTargetAtTime(value,this.context.currentTime,0.01);return this}updateMatrixWorld(force){super.updateMatrixWorld(force);const listener=this.context.listener;this.timeDelta=this._clock.getDelta();this.matrixWorld.decompose(_position$1,_quaternion$1,_scale$1);_forward.set(0,0,-1).applyQuaternion(_quaternion$1);_up.set(0,1,0).applyQuaternion(_quaternion$1);if(listener.positionX){const endTime=this.context.currentTime+this.timeDelta;listener.positionX.linearRampToValueAtTime(_position$1.x,endTime);listener.positionY.linearRampToValueAtTime(_position$1.y,endTime);listener.positionZ.linearRampToValueAtTime(_position$1.z,endTime);listener.forwardX.linearRampToValueAtTime(_forward.x,endTime);listener.forwardY.linearRampToValueAtTime(_forward.y,endTime);listener.forwardZ.linearRampToValueAtTime(_forward.z,endTime);listener.upX.linearRampToValueAtTime(_up.x,endTime);listener.upY.linearRampToValueAtTime(_up.y,endTime);listener.upZ.linearRampToValueAtTime(_up.z,endTime)}else{listener.setPosition(_position$1.x,_position$1.y,_position$1.z);listener.setOrientation(_forward.x,_forward.y,_forward.z,_up.x,_up.y,_up.z)}}}class Audio extends Object3D{constructor(listener){super();this.type="Audio";this.listener=listener;this.context=listener.context;this.gain=this.context.createGain();this.gain.connect(listener.getInput());this.autoplay=false;this.buffer=null;this.detune=0;this.loop=false;this.loopStart=0;this.loopEnd=0;this.offset=0;this.duration=undefined;this.playbackRate=1;this.isPlaying=false;this.hasPlaybackControl=true;this.source=null;this.sourceType="empty";this._startedAt=0;this._progress=0;this._connected=false;this.filters=[]}getOutput(){return this.gain}setNodeSource(audioNode){this.hasPlaybackControl=false;this.sourceType="audioNode";this.source=audioNode;this.connect();return this}setMediaElementSource(mediaElement){this.hasPlaybackControl=false;this.sourceType="mediaNode";this.source=this.context.createMediaElementSource(mediaElement);this.connect();return this}setMediaStreamSource(mediaStream){this.hasPlaybackControl=false;this.sourceType="mediaStreamNode";this.source=this.context.createMediaStreamSource(mediaStream);this.connect();return this}setBuffer(audioBuffer){this.buffer=audioBuffer;this.sourceType="buffer";if(this.autoplay)this.play();return this}play(delay=0){if(this.isPlaying===true){warn("Audio: Audio is already playing.");return}if(this.hasPlaybackControl===false){warn("Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+delay;const source=this.context.createBufferSource();source.buffer=this.buffer;source.loop=this.loop;source.loopStart=this.loopStart;source.loopEnd=this.loopEnd;source.onended=this.onEnded.bind(this);source.start(this._startedAt,this._progress+this.offset,this.duration);this.isPlaying=true;this.source=source;this.setDetune(this.detune);this.setPlaybackRate(this.playbackRate);return this.connect()}pause(){if(this.hasPlaybackControl===false){warn("Audio: this Audio has no playback control.");return}if(this.isPlaying===true){this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate;if(this.loop===true){this._progress=this._progress%(this.duration||this.buffer.duration)}this.source.stop();this.source.onended=null;this.isPlaying=false}return this}stop(delay=0){if(this.hasPlaybackControl===false){warn("Audio: this Audio has no playback control.");return}this._progress=0;if(this.source!==null){this.source.stop(this.context.currentTime+delay);this.source.onended=null}this.isPlaying=false;return this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let i=1,l=this.filters.length;i<l;i++){this.filters[i-1].connect(this.filters[i])}this.filters[this.filters.length-1].connect(this.getOutput())}else{this.source.connect(this.getOutput())}this._connected=true;return this}disconnect(){if(this._connected===false){return}if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let i=1,l=this.filters.length;i<l;i++){this.filters[i-1].disconnect(this.filters[i])}this.filters[this.filters.length-1].disconnect(this.getOutput())}else{this.source.disconnect(this.getOutput())}this._connected=false;return this}getFilters(){return this.filters}setFilters(value){if(!value)value=[];if(this._connected===true){this.disconnect();this.filters=value.slice();this.connect()}else{this.filters=value.slice()}return this}setDetune(value){this.detune=value;if(this.isPlaying===true&&this.source.detune!==undefined){this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,0.01)}return this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(filter){return this.setFilters(filter?[filter]:[])}setPlaybackRate(value){if(this.hasPlaybackControl===false){warn("Audio: this Audio has no playback control.");return}this.playbackRate=value;if(this.isPlaying===true){this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,0.01)}return this}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=false;this._progress=0}getLoop(){if(this.hasPlaybackControl===false){warn("Audio: this Audio has no playback control.");return false}return this.loop}setLoop(value){if(this.hasPlaybackControl===false){warn("Audio: this Audio has no playback control.");return}this.loop=value;if(this.isPlaying===true){this.source.loop=this.loop}return this}setLoopStart(value){this.loopStart=value;return this}setLoopEnd(value){this.loopEnd=value;return this}getVolume(){return this.gain.gain.value}setVolume(value){this.gain.gain.setTargetAtTime(value,this.context.currentTime,0.01);return this}copy(source,recursive){super.copy(source,recursive);if(source.sourceType!=="buffer"){warn("Audio: Audio source type cannot be copied.");return this}this.autoplay=source.autoplay;this.buffer=source.buffer;this.detune=source.detune;this.loop=source.loop;this.loopStart=source.loopStart;this.loopEnd=source.loopEnd;this.offset=source.offset;this.duration=source.duration;this.playbackRate=source.playbackRate;this.hasPlaybackControl=source.hasPlaybackControl;this.sourceType=source.sourceType;this.filters=source.filters.slice();return this}clone(recursive){return new this.constructor(this.listener).copy(this,recursive)}}const _position=new Vector3;const _quaternion=new Quaternion;const _scale=new Vector3;const _orientation=new Vector3;class PositionalAudio extends Audio{constructor(listener){super(listener);this.panner=this.context.createPanner();this.panner.panningModel="HRTF";this.panner.connect(this.gain)}connect(){super.connect();this.panner.connect(this.gain);return this}disconnect(){super.disconnect();this.panner.disconnect(this.gain);return this}getOutput(){return this.panner}getRefDistance(){return this.panner.refDistance}setRefDistance(value){this.panner.refDistance=value;return this}getRolloffFactor(){return this.panner.rolloffFactor}setRolloffFactor(value){this.panner.rolloffFactor=value;return this}getDistanceModel(){return this.panner.distanceModel}setDistanceModel(value){this.panner.distanceModel=value;return this}getMaxDistance(){return this.panner.maxDistance}setMaxDistance(value){this.panner.maxDistance=value;return this}setDirectionalCone(coneInnerAngle,coneOuterAngle,coneOuterGain){this.panner.coneInnerAngle=coneInnerAngle;this.panner.coneOuterAngle=coneOuterAngle;this.panner.coneOuterGain=coneOuterGain;return this}updateMatrixWorld(force){super.updateMatrixWorld(force);if(this.hasPlaybackControl===true&&this.isPlaying===false)return;this.matrixWorld.decompose(_position,_quaternion,_scale);_orientation.set(0,0,1).applyQuaternion(_quaternion);const panner=this.panner;if(panner.positionX){const endTime=this.context.currentTime+this.listener.timeDelta;panner.positionX.linearRampToValueAtTime(_position.x,endTime);panner.positionY.linearRampToValueAtTime(_position.y,endTime);panner.positionZ.linearRampToValueAtTime(_position.z,endTime);panner.orientationX.linearRampToValueAtTime(_orientation.x,endTime);panner.orientationY.linearRampToValueAtTime(_orientation.y,endTime);panner.orientationZ.linearRampToValueAtTime(_orientation.z,endTime)}else{panner.setPosition(_position.x,_position.y,_position.z);panner.setOrientation(_orientation.x,_orientation.y,_orientation.z)}}}class AudioAnalyser{constructor(audio,fftSize=2048){this.analyser=audio.context.createAnalyser();this.analyser.fftSize=fftSize;this.data=new Uint8Array(this.analyser.frequencyBinCount);audio.getOutput().connect(this.analyser)}getFrequencyData(){this.analyser.getByteFrequencyData(this.data);return this.data}getAverageFrequency(){let value=0;const data=this.getFrequencyData();for(let i=0;i<data.length;i++){value+=data[i]}return value/data.length}}class PropertyMixer{constructor(binding,typeName,valueSize){this.binding=binding;this.valueSize=valueSize;let mixFunction,mixFunctionAdditive,setIdentity;switch(typeName){case"quaternion":mixFunction=this._slerp;mixFunctionAdditive=this._slerpAdditive;setIdentity=this._setAdditiveIdentityQuaternion;this.buffer=new Float64Array(valueSize*6);this._workIndex=5;break;case"string":case"bool":mixFunction=this._select;mixFunctionAdditive=this._select;setIdentity=this._setAdditiveIdentityOther;this.buffer=new Array(valueSize*5);break;default:mixFunction=this._lerp;mixFunctionAdditive=this._lerpAdditive;setIdentity=this._setAdditiveIdentityNumeric;this.buffer=new Float64Array(valueSize*5);}this._mixBufferRegion=mixFunction;this._mixBufferRegionAdditive=mixFunctionAdditive;this._setIdentity=setIdentity;this._origIndex=3;this._addIndex=4;this.cumulativeWeight=0;this.cumulativeWeightAdditive=0;this.useCount=0;this.referenceCount=0}accumulate(accuIndex,weight){const buffer=this.buffer,stride=this.valueSize,offset=accuIndex*stride+stride;let currentWeight=this.cumulativeWeight;if(currentWeight===0){for(let i=0;i!==stride;++i){buffer[offset+i]=buffer[i]}currentWeight=weight}else{currentWeight+=weight;const mix=weight/currentWeight;this._mixBufferRegion(buffer,offset,0,mix,stride)}this.cumulativeWeight=currentWeight}accumulateAdditive(weight){const buffer=this.buffer,stride=this.valueSize,offset=stride*this._addIndex;if(this.cumulativeWeightAdditive===0){this._setIdentity()}this._mixBufferRegionAdditive(buffer,offset,0,weight,stride);this.cumulativeWeightAdditive+=weight}apply(accuIndex){const stride=this.valueSize,buffer=this.buffer,offset=accuIndex*stride+stride,weight=this.cumulativeWeight,weightAdditive=this.cumulativeWeightAdditive,binding=this.binding;this.cumulativeWeight=0;this.cumulativeWeightAdditive=0;if(weight<1){const originalValueOffset=stride*this._origIndex;this._mixBufferRegion(buffer,offset,originalValueOffset,1-weight,stride)}if(weightAdditive>0){this._mixBufferRegionAdditive(buffer,offset,this._addIndex*stride,1,stride)}for(let i=stride,e=stride+stride;i!==e;++i){if(buffer[i]!==buffer[i+stride]){binding.setValue(buffer,offset);break}}}saveOriginalState(){const binding=this.binding;const buffer=this.buffer,stride=this.valueSize,originalValueOffset=stride*this._origIndex;binding.getValue(buffer,originalValueOffset);for(let i=stride,e=originalValueOffset;i!==e;++i){buffer[i]=buffer[originalValueOffset+i%stride]}this._setIdentity();this.cumulativeWeight=0;this.cumulativeWeightAdditive=0}restoreOriginalState(){const originalValueOffset=this.valueSize*3;this.binding.setValue(this.buffer,originalValueOffset)}_setAdditiveIdentityNumeric(){const startIndex=this._addIndex*this.valueSize;const endIndex=startIndex+this.valueSize;for(let i=startIndex;i<endIndex;i++){this.buffer[i]=0}}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric();this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const startIndex=this._origIndex*this.valueSize;const targetIndex=this._addIndex*this.valueSize;for(let i=0;i<this.valueSize;i++){this.buffer[targetIndex+i]=this.buffer[startIndex+i]}}_select(buffer,dstOffset,srcOffset,t,stride){if(t>=0.5){for(let i=0;i!==stride;++i){buffer[dstOffset+i]=buffer[srcOffset+i]}}}_slerp(buffer,dstOffset,srcOffset,t){Quaternion.slerpFlat(buffer,dstOffset,buffer,dstOffset,buffer,srcOffset,t)}_slerpAdditive(buffer,dstOffset,srcOffset,t,stride){const workOffset=this._workIndex*stride;Quaternion.multiplyQuaternionsFlat(buffer,workOffset,buffer,dstOffset,buffer,srcOffset);Quaternion.slerpFlat(buffer,dstOffset,buffer,dstOffset,buffer,workOffset,t)}_lerp(buffer,dstOffset,srcOffset,t,stride){const s=1-t;for(let i=0;i!==stride;++i){const j=dstOffset+i;buffer[j]=buffer[j]*s+buffer[srcOffset+i]*t}}_lerpAdditive(buffer,dstOffset,srcOffset,t,stride){for(let i=0;i!==stride;++i){const j=dstOffset+i;buffer[j]=buffer[j]+buffer[srcOffset+i]*t}}}const _RESERVED_CHARS_RE="\\[\\]\\.:\\/";const _reservedRe=new RegExp("["+_RESERVED_CHARS_RE+"]","g");const _wordChar="[^"+_RESERVED_CHARS_RE+"]";const _wordCharOrDot="[^"+_RESERVED_CHARS_RE.replace("\\.","")+"]";const _directoryRe=/((?:WC+[\/:])*)/.source.replace("WC",_wordChar);const _nodeRe=/(WCOD+)?/.source.replace("WCOD",_wordCharOrDot);const _objectRe=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",_wordChar);const _propertyRe=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",_wordChar);const _trackRe=new RegExp(""+"^"+_directoryRe+_nodeRe+_objectRe+_propertyRe+"$");const _supportedObjectNames=["material","materials","bones","map"];class Composite{constructor(targetGroup,path,optionalParsedPath){const parsedPath=optionalParsedPath||PropertyBinding.parseTrackName(path);this._targetGroup=targetGroup;this._bindings=targetGroup.subscribe_(path,parsedPath)}getValue(array,offset){this.bind();const firstValidIndex=this._targetGroup.nCachedObjects_,binding=this._bindings[firstValidIndex];if(binding!==undefined)binding.getValue(array,offset)}setValue(array,offset){const bindings=this._bindings;for(let i=this._targetGroup.nCachedObjects_,n=bindings.length;i!==n;++i){bindings[i].setValue(array,offset)}}bind(){const bindings=this._bindings;for(let i=this._targetGroup.nCachedObjects_,n=bindings.length;i!==n;++i){bindings[i].bind()}}unbind(){const bindings=this._bindings;for(let i=this._targetGroup.nCachedObjects_,n=bindings.length;i!==n;++i){bindings[i].unbind()}}}class PropertyBinding{constructor(rootNode,path,parsedPath){this.path=path;this.parsedPath=parsedPath||PropertyBinding.parseTrackName(path);this.node=PropertyBinding.findNode(rootNode,this.parsedPath.nodeName);this.rootNode=rootNode;this.getValue=this._getValue_unbound;this.setValue=this._setValue_unbound}static create(root,path,parsedPath){if(!(root&&root.isAnimationObjectGroup)){return new PropertyBinding(root,path,parsedPath)}else{return new PropertyBinding.Composite(root,path,parsedPath)}}static sanitizeNodeName(name){return name.replace(/\s/g,"_").replace(_reservedRe,"")}static parseTrackName(trackName){const matches=_trackRe.exec(trackName);if(matches===null){throw new Error("PropertyBinding: Cannot parse trackName: "+trackName)}const results={nodeName:matches[2],objectName:matches[3],objectIndex:matches[4],propertyName:matches[5],propertyIndex:matches[6]};const lastDot=results.nodeName&&results.nodeName.lastIndexOf(".");if(lastDot!==undefined&&lastDot!==-1){const objectName=results.nodeName.substring(lastDot+1);if(_supportedObjectNames.indexOf(objectName)!==-1){results.nodeName=results.nodeName.substring(0,lastDot);results.objectName=objectName}}if(results.propertyName===null||results.propertyName.length===0){throw new Error("PropertyBinding: can not parse propertyName from trackName: "+trackName)}return results}static findNode(root,nodeName){if(nodeName===undefined||nodeName===""||nodeName==="."||nodeName===-1||nodeName===root.name||nodeName===root.uuid){return root}if(root.skeleton){const bone=root.skeleton.getBoneByName(nodeName);if(bone!==undefined){return bone}}if(root.children){const searchNodeSubtree=function(children){for(let i=0;i<children.length;i++){const childNode=children[i];if(childNode.name===nodeName||childNode.uuid===nodeName){return childNode}const result=searchNodeSubtree(childNode.children);if(result)return result}return null};const subTreeNode=searchNodeSubtree(root.children);if(subTreeNode){return subTreeNode}}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(buffer,offset){buffer[offset]=this.targetObject[this.propertyName]}_getValue_array(buffer,offset){const source=this.resolvedProperty;for(let i=0,n=source.length;i!==n;++i){buffer[offset++]=source[i]}}_getValue_arrayElement(buffer,offset){buffer[offset]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(buffer,offset){this.resolvedProperty.toArray(buffer,offset)}_setValue_direct(buffer,offset){this.targetObject[this.propertyName]=buffer[offset]}_setValue_direct_setNeedsUpdate(buffer,offset){this.targetObject[this.propertyName]=buffer[offset];this.targetObject.needsUpdate=true}_setValue_direct_setMatrixWorldNeedsUpdate(buffer,offset){this.targetObject[this.propertyName]=buffer[offset];this.targetObject.matrixWorldNeedsUpdate=true}_setValue_array(buffer,offset){const dest=this.resolvedProperty;for(let i=0,n=dest.length;i!==n;++i){dest[i]=buffer[offset++]}}_setValue_array_setNeedsUpdate(buffer,offset){const dest=this.resolvedProperty;for(let i=0,n=dest.length;i!==n;++i){dest[i]=buffer[offset++]}this.targetObject.needsUpdate=true}_setValue_array_setMatrixWorldNeedsUpdate(buffer,offset){const dest=this.resolvedProperty;for(let i=0,n=dest.length;i!==n;++i){dest[i]=buffer[offset++]}this.targetObject.matrixWorldNeedsUpdate=true}_setValue_arrayElement(buffer,offset){this.resolvedProperty[this.propertyIndex]=buffer[offset]}_setValue_arrayElement_setNeedsUpdate(buffer,offset){this.resolvedProperty[this.propertyIndex]=buffer[offset];this.targetObject.needsUpdate=true}_setValue_arrayElement_setMatrixWorldNeedsUpdate(buffer,offset){this.resolvedProperty[this.propertyIndex]=buffer[offset];this.targetObject.matrixWorldNeedsUpdate=true}_setValue_fromArray(buffer,offset){this.resolvedProperty.fromArray(buffer,offset)}_setValue_fromArray_setNeedsUpdate(buffer,offset){this.resolvedProperty.fromArray(buffer,offset);this.targetObject.needsUpdate=true}_setValue_fromArray_setMatrixWorldNeedsUpdate(buffer,offset){this.resolvedProperty.fromArray(buffer,offset);this.targetObject.matrixWorldNeedsUpdate=true}_getValue_unbound(targetArray,offset){this.bind();this.getValue(targetArray,offset)}_setValue_unbound(sourceArray,offset){this.bind();this.setValue(sourceArray,offset)}bind(){let targetObject=this.node;const parsedPath=this.parsedPath;const objectName=parsedPath.objectName;const propertyName=parsedPath.propertyName;let propertyIndex=parsedPath.propertyIndex;if(!targetObject){targetObject=PropertyBinding.findNode(this.rootNode,parsedPath.nodeName);this.node=targetObject}this.getValue=this._getValue_unavailable;this.setValue=this._setValue_unavailable;if(!targetObject){warn("PropertyBinding: No target node found for track: "+this.path+".");return}if(objectName){let objectIndex=parsedPath.objectIndex;switch(objectName){case"materials":if(!targetObject.material){error("PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!targetObject.material.materials){error("PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}targetObject=targetObject.material.materials;break;case"bones":if(!targetObject.skeleton){error("PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}targetObject=targetObject.skeleton.bones;for(let i=0;i<targetObject.length;i++){if(targetObject[i].name===objectIndex){objectIndex=i;break}}break;case"map":if("map"in targetObject){targetObject=targetObject.map;break}if(!targetObject.material){error("PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!targetObject.material.map){error("PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);return}targetObject=targetObject.material.map;break;default:if(targetObject[objectName]===undefined){error("PropertyBinding: Can not bind to objectName of node undefined.",this);return}targetObject=targetObject[objectName];}if(objectIndex!==undefined){if(targetObject[objectIndex]===undefined){error("PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,targetObject);return}targetObject=targetObject[objectIndex]}}const nodeProperty=targetObject[propertyName];if(nodeProperty===undefined){const nodeName=parsedPath.nodeName;error("PropertyBinding: Trying to update property for track: "+nodeName+"."+propertyName+" but it wasn't found.",targetObject);return}let versioning=this.Versioning.None;this.targetObject=targetObject;if(targetObject.isMaterial===true){versioning=this.Versioning.NeedsUpdate}else if(targetObject.isObject3D===true){versioning=this.Versioning.MatrixWorldNeedsUpdate}let bindingType=this.BindingType.Direct;if(propertyIndex!==undefined){if(propertyName==="morphTargetInfluences"){if(!targetObject.geometry){error("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(!targetObject.geometry.morphAttributes){error("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}if(targetObject.morphTargetDictionary[propertyIndex]!==undefined){propertyIndex=targetObject.morphTargetDictionary[propertyIndex]}}bindingType=this.BindingType.ArrayElement;this.resolvedProperty=nodeProperty;this.propertyIndex=propertyIndex}else if(nodeProperty.fromArray!==undefined&&nodeProperty.toArray!==undefined){bindingType=this.BindingType.HasFromToArray;this.resolvedProperty=nodeProperty}else if(Array.isArray(nodeProperty)){bindingType=this.BindingType.EntireArray;this.resolvedProperty=nodeProperty}else{this.propertyName=propertyName}this.getValue=this.GetterByBindingType[bindingType];this.setValue=this.SetterByBindingTypeAndVersioning[bindingType][versioning]}unbind(){this.node=null;this.getValue=this._getValue_unbound;this.setValue=this._setValue_unbound}}PropertyBinding.Composite=Composite;PropertyBinding.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};PropertyBinding.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};PropertyBinding.prototype.GetterByBindingType=[PropertyBinding.prototype._getValue_direct,PropertyBinding.prototype._getValue_array,PropertyBinding.prototype._getValue_arrayElement,PropertyBinding.prototype._getValue_toArray];PropertyBinding.prototype.SetterByBindingTypeAndVersioning=[[PropertyBinding.prototype._setValue_direct,PropertyBinding.prototype._setValue_direct_setNeedsUpdate,PropertyBinding.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[PropertyBinding.prototype._setValue_array,PropertyBinding.prototype._setValue_array_setNeedsUpdate,PropertyBinding.prototype._setValue_array_setMatrixWorldNeedsUpdate],[PropertyBinding.prototype._setValue_arrayElement,PropertyBinding.prototype._setValue_arrayElement_setNeedsUpdate,PropertyBinding.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[PropertyBinding.prototype._setValue_fromArray,PropertyBinding.prototype._setValue_fromArray_setNeedsUpdate,PropertyBinding.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class AnimationObjectGroup{constructor(){this.isAnimationObjectGroup=true;this.uuid=generateUUID();this._objects=Array.prototype.slice.call(arguments);this.nCachedObjects_=0;const indices={};this._indicesByUUID=indices;for(let i=0,n=arguments.length;i!==n;++i){indices[arguments[i].uuid]=i}this._paths=[];this._parsedPaths=[];this._bindings=[];this._bindingsIndicesByPath={};const scope=this;this.stats={objects:{get total(){return scope._objects.length},get inUse(){return this.total-scope.nCachedObjects_}},get bindingsPerObject(){return scope._bindings.length}}}add(){const objects=this._objects,indicesByUUID=this._indicesByUUID,paths=this._paths,parsedPaths=this._parsedPaths,bindings=this._bindings,nBindings=bindings.length;let knownObject=undefined,nObjects=objects.length,nCachedObjects=this.nCachedObjects_;for(let i=0,n=arguments.length;i!==n;++i){const object=arguments[i],uuid=object.uuid;let index=indicesByUUID[uuid];if(index===undefined){index=nObjects++;indicesByUUID[uuid]=index;objects.push(object);for(let j=0,m=nBindings;j!==m;++j){bindings[j].push(new PropertyBinding(object,paths[j],parsedPaths[j]))}}else if(index<nCachedObjects){knownObject=objects[index];const firstActiveIndex=--nCachedObjects,lastCachedObject=objects[firstActiveIndex];indicesByUUID[lastCachedObject.uuid]=index;objects[index]=lastCachedObject;indicesByUUID[uuid]=firstActiveIndex;objects[firstActiveIndex]=object;for(let j=0,m=nBindings;j!==m;++j){const bindingsForPath=bindings[j],lastCached=bindingsForPath[firstActiveIndex];let binding=bindingsForPath[index];bindingsForPath[index]=lastCached;if(binding===undefined){binding=new PropertyBinding(object,paths[j],parsedPaths[j])}bindingsForPath[firstActiveIndex]=binding}}else if(objects[index]!==knownObject){error("AnimationObjectGroup: Different objects with the same UUID "+"detected. Clean the caches or recreate your infrastructure when reloading scenes.")}}this.nCachedObjects_=nCachedObjects}remove(){const objects=this._objects,indicesByUUID=this._indicesByUUID,bindings=this._bindings,nBindings=bindings.length;let nCachedObjects=this.nCachedObjects_;for(let i=0,n=arguments.length;i!==n;++i){const object=arguments[i],uuid=object.uuid,index=indicesByUUID[uuid];if(index!==undefined&&index>=nCachedObjects){const lastCachedIndex=nCachedObjects++,firstActiveObject=objects[lastCachedIndex];indicesByUUID[firstActiveObject.uuid]=index;objects[index]=firstActiveObject;indicesByUUID[uuid]=lastCachedIndex;objects[lastCachedIndex]=object;for(let j=0,m=nBindings;j!==m;++j){const bindingsForPath=bindings[j],firstActive=bindingsForPath[lastCachedIndex],binding=bindingsForPath[index];bindingsForPath[index]=firstActive;bindingsForPath[lastCachedIndex]=binding}}}this.nCachedObjects_=nCachedObjects}uncache(){const objects=this._objects,indicesByUUID=this._indicesByUUID,bindings=this._bindings,nBindings=bindings.length;let nCachedObjects=this.nCachedObjects_,nObjects=objects.length;for(let i=0,n=arguments.length;i!==n;++i){const object=arguments[i],uuid=object.uuid,index=indicesByUUID[uuid];if(index!==undefined){delete indicesByUUID[uuid];if(index<nCachedObjects){const firstActiveIndex=--nCachedObjects,lastCachedObject=objects[firstActiveIndex],lastIndex=--nObjects,lastObject=objects[lastIndex];indicesByUUID[lastCachedObject.uuid]=index;objects[index]=lastCachedObject;indicesByUUID[lastObject.uuid]=firstActiveIndex;objects[firstActiveIndex]=lastObject;objects.pop();for(let j=0,m=nBindings;j!==m;++j){const bindingsForPath=bindings[j],lastCached=bindingsForPath[firstActiveIndex],last=bindingsForPath[lastIndex];bindingsForPath[index]=lastCached;bindingsForPath[firstActiveIndex]=last;bindingsForPath.pop()}}else{const lastIndex=--nObjects,lastObject=objects[lastIndex];if(lastIndex>0){indicesByUUID[lastObject.uuid]=index}objects[index]=lastObject;objects.pop();for(let j=0,m=nBindings;j!==m;++j){const bindingsForPath=bindings[j];bindingsForPath[index]=bindingsForPath[lastIndex];bindingsForPath.pop()}}}}this.nCachedObjects_=nCachedObjects}subscribe_(path,parsedPath){const indicesByPath=this._bindingsIndicesByPath;let index=indicesByPath[path];const bindings=this._bindings;if(index!==undefined)return bindings[index];const paths=this._paths,parsedPaths=this._parsedPaths,objects=this._objects,nObjects=objects.length,nCachedObjects=this.nCachedObjects_,bindingsForPath=new Array(nObjects);index=bindings.length;indicesByPath[path]=index;paths.push(path);parsedPaths.push(parsedPath);bindings.push(bindingsForPath);for(let i=nCachedObjects,n=objects.length;i!==n;++i){const object=objects[i];bindingsForPath[i]=new PropertyBinding(object,path,parsedPath)}return bindingsForPath}unsubscribe_(path){const indicesByPath=this._bindingsIndicesByPath,index=indicesByPath[path];if(index!==undefined){const paths=this._paths,parsedPaths=this._parsedPaths,bindings=this._bindings,lastBindingsIndex=bindings.length-1,lastBindings=bindings[lastBindingsIndex],lastBindingsPath=path[lastBindingsIndex];indicesByPath[lastBindingsPath]=index;bindings[index]=lastBindings;bindings.pop();parsedPaths[index]=parsedPaths[lastBindingsIndex];parsedPaths.pop();paths[index]=paths[lastBindingsIndex];paths.pop()}}}class AnimationAction{constructor(mixer,clip,localRoot=null,blendMode=clip.blendMode){this._mixer=mixer;this._clip=clip;this._localRoot=localRoot;this.blendMode=blendMode;const tracks=clip.tracks,nTracks=tracks.length,interpolants=new Array(nTracks);const interpolantSettings={endingStart:ZeroCurvatureEnding,endingEnd:ZeroCurvatureEnding};for(let i=0;i!==nTracks;++i){const interpolant=tracks[i].createInterpolant(null);interpolants[i]=interpolant;interpolant.settings=interpolantSettings}this._interpolantSettings=interpolantSettings;this._interpolants=interpolants;this._propertyBindings=new Array(nTracks);this._cacheIndex=null;this._byClipCacheIndex=null;this._timeScaleInterpolant=null;this._weightInterpolant=null;this.loop=LoopRepeat;this._loopCount=-1;this._startTime=null;this.time=0;this.timeScale=1;this._effectiveTimeScale=1;this.weight=1;this._effectiveWeight=1;this.repetitions=Infinity;this.paused=false;this.enabled=true;this.clampWhenFinished=false;this.zeroSlopeAtStart=true;this.zeroSlopeAtEnd=true}play(){this._mixer._activateAction(this);return this}stop(){this._mixer._deactivateAction(this);return this.reset()}reset(){this.paused=false;this.enabled=true;this.time=0;this._loopCount=-1;this._startTime=null;return this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(time){this._startTime=time;return this}setLoop(mode,repetitions){this.loop=mode;this.repetitions=repetitions;return this}setEffectiveWeight(weight){this.weight=weight;this._effectiveWeight=this.enabled?weight:0;return this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(duration){return this._scheduleFading(duration,0,1)}fadeOut(duration){return this._scheduleFading(duration,1,0)}crossFadeFrom(fadeOutAction,duration,warp=false){fadeOutAction.fadeOut(duration);this.fadeIn(duration);if(warp===true){const fadeInDuration=this._clip.duration,fadeOutDuration=fadeOutAction._clip.duration,startEndRatio=fadeOutDuration/fadeInDuration,endStartRatio=fadeInDuration/fadeOutDuration;fadeOutAction.warp(1,startEndRatio,duration);this.warp(endStartRatio,1,duration)}return this}crossFadeTo(fadeInAction,duration,warp=false){return fadeInAction.crossFadeFrom(this,duration,warp)}stopFading(){const weightInterpolant=this._weightInterpolant;if(weightInterpolant!==null){this._weightInterpolant=null;this._mixer._takeBackControlInterpolant(weightInterpolant)}return this}setEffectiveTimeScale(timeScale){this.timeScale=timeScale;this._effectiveTimeScale=this.paused?0:timeScale;return this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(duration){this.timeScale=this._clip.duration/duration;return this.stopWarping()}syncWith(action){this.time=action.time;this.timeScale=action.timeScale;return this.stopWarping()}halt(duration){return this.warp(this._effectiveTimeScale,0,duration)}warp(startTimeScale,endTimeScale,duration){const mixer=this._mixer,now=mixer.time,timeScale=this.timeScale;let interpolant=this._timeScaleInterpolant;if(interpolant===null){interpolant=mixer._lendControlInterpolant();this._timeScaleInterpolant=interpolant}const times=interpolant.parameterPositions,values=interpolant.sampleValues;times[0]=now;times[1]=now+duration;values[0]=startTimeScale/timeScale;values[1]=endTimeScale/timeScale;return this}stopWarping(){const timeScaleInterpolant=this._timeScaleInterpolant;if(timeScaleInterpolant!==null){this._timeScaleInterpolant=null;this._mixer._takeBackControlInterpolant(timeScaleInterpolant)}return this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(time,deltaTime,timeDirection,accuIndex){if(!this.enabled){this._updateWeight(time);return}const startTime=this._startTime;if(startTime!==null){const timeRunning=(time-startTime)*timeDirection;if(timeRunning<0||timeDirection===0){deltaTime=0}else{this._startTime=null;deltaTime=timeDirection*timeRunning}}deltaTime*=this._updateTimeScale(time);const clipTime=this._updateTime(deltaTime);const weight=this._updateWeight(time);if(weight>0){const interpolants=this._interpolants;const propertyMixers=this._propertyBindings;switch(this.blendMode){case AdditiveAnimationBlendMode:for(let j=0,m=interpolants.length;j!==m;++j){interpolants[j].evaluate(clipTime);propertyMixers[j].accumulateAdditive(weight)}break;case NormalAnimationBlendMode:default:for(let j=0,m=interpolants.length;j!==m;++j){interpolants[j].evaluate(clipTime);propertyMixers[j].accumulate(accuIndex,weight)}}}}_updateWeight(time){let weight=0;if(this.enabled){weight=this.weight;const interpolant=this._weightInterpolant;if(interpolant!==null){const interpolantValue=interpolant.evaluate(time)[0];weight*=interpolantValue;if(time>interpolant.parameterPositions[1]){this.stopFading();if(interpolantValue===0){this.enabled=false}}}}this._effectiveWeight=weight;return weight}_updateTimeScale(time){let timeScale=0;if(!this.paused){timeScale=this.timeScale;const interpolant=this._timeScaleInterpolant;if(interpolant!==null){const interpolantValue=interpolant.evaluate(time)[0];timeScale*=interpolantValue;if(time>interpolant.parameterPositions[1]){this.stopWarping();if(timeScale===0){this.paused=true}else{this.timeScale=timeScale}}}}this._effectiveTimeScale=timeScale;return timeScale}_updateTime(deltaTime){const duration=this._clip.duration;const loop=this.loop;let time=this.time+deltaTime;let loopCount=this._loopCount;const pingPong=loop===LoopPingPong;if(deltaTime===0){if(loopCount===-1)return time;return pingPong&&(loopCount&1)===1?duration-time:time}if(loop===LoopOnce){if(loopCount===-1){this._loopCount=0;this._setEndings(true,true,false)}handle_stop:{if(time>=duration){time=duration}else if(time<0){time=0}else{this.time=time;break handle_stop}if(this.clampWhenFinished)this.paused=true;else this.enabled=false;this.time=time;this._mixer.dispatchEvent({type:"finished",action:this,direction:deltaTime<0?-1:1})}}else{if(loopCount===-1){if(deltaTime>=0){loopCount=0;this._setEndings(true,this.repetitions===0,pingPong)}else{this._setEndings(this.repetitions===0,true,pingPong)}}if(time>=duration||time<0){const loopDelta=Math.floor(time/duration);time-=duration*loopDelta;loopCount+=Math.abs(loopDelta);const pending=this.repetitions-loopCount;if(pending<=0){if(this.clampWhenFinished)this.paused=true;else this.enabled=false;time=deltaTime>0?duration:0;this.time=time;this._mixer.dispatchEvent({type:"finished",action:this,direction:deltaTime>0?1:-1})}else{if(pending===1){const atStart=deltaTime<0;this._setEndings(atStart,!atStart,pingPong)}else{this._setEndings(false,false,pingPong)}this._loopCount=loopCount;this.time=time;this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:loopDelta})}}else{this.time=time}if(pingPong&&(loopCount&1)===1){return duration-time}}return time}_setEndings(atStart,atEnd,pingPong){const settings=this._interpolantSettings;if(pingPong){settings.endingStart=ZeroSlopeEnding;settings.endingEnd=ZeroSlopeEnding}else{if(atStart){settings.endingStart=this.zeroSlopeAtStart?ZeroSlopeEnding:ZeroCurvatureEnding}else{settings.endingStart=WrapAroundEnding}if(atEnd){settings.endingEnd=this.zeroSlopeAtEnd?ZeroSlopeEnding:ZeroCurvatureEnding}else{settings.endingEnd=WrapAroundEnding}}}_scheduleFading(duration,weightNow,weightThen){const mixer=this._mixer,now=mixer.time;let interpolant=this._weightInterpolant;if(interpolant===null){interpolant=mixer._lendControlInterpolant();this._weightInterpolant=interpolant}const times=interpolant.parameterPositions,values=interpolant.sampleValues;times[0]=now;values[0]=weightNow;times[1]=now+duration;values[1]=weightThen;return this}}const _controlInterpolantsResultBuffer=new Float32Array(1);class AnimationMixer extends EventDispatcher{constructor(root){super();this._root=root;this._initMemoryManager();this._accuIndex=0;this.time=0;this.timeScale=1}_bindAction(action,prototypeAction){const root=action._localRoot||this._root,tracks=action._clip.tracks,nTracks=tracks.length,bindings=action._propertyBindings,interpolants=action._interpolants,rootUuid=root.uuid,bindingsByRoot=this._bindingsByRootAndName;let bindingsByName=bindingsByRoot[rootUuid];if(bindingsByName===undefined){bindingsByName={};bindingsByRoot[rootUuid]=bindingsByName}for(let i=0;i!==nTracks;++i){const track=tracks[i],trackName=track.name;let binding=bindingsByName[trackName];if(binding!==undefined){++binding.referenceCount;bindings[i]=binding}else{binding=bindings[i];if(binding!==undefined){if(binding._cacheIndex===null){++binding.referenceCount;this._addInactiveBinding(binding,rootUuid,trackName)}continue}const path=prototypeAction&&prototypeAction._propertyBindings[i].binding.parsedPath;binding=new PropertyMixer(PropertyBinding.create(root,trackName,path),track.ValueTypeName,track.getValueSize());++binding.referenceCount;this._addInactiveBinding(binding,rootUuid,trackName);bindings[i]=binding}interpolants[i].resultBuffer=binding.buffer}}_activateAction(action){if(!this._isActiveAction(action)){if(action._cacheIndex===null){const rootUuid=(action._localRoot||this._root).uuid,clipUuid=action._clip.uuid,actionsForClip=this._actionsByClip[clipUuid];this._bindAction(action,actionsForClip&&actionsForClip.knownActions[0]);this._addInactiveAction(action,clipUuid,rootUuid)}const bindings=action._propertyBindings;for(let i=0,n=bindings.length;i!==n;++i){const binding=bindings[i];if(binding.useCount++===0){this._lendBinding(binding);binding.saveOriginalState()}}this._lendAction(action)}}_deactivateAction(action){if(this._isActiveAction(action)){const bindings=action._propertyBindings;for(let i=0,n=bindings.length;i!==n;++i){const binding=bindings[i];if(--binding.useCount===0){binding.restoreOriginalState();this._takeBackBinding(binding)}}this._takeBackAction(action)}}_initMemoryManager(){this._actions=[];this._nActiveActions=0;this._actionsByClip={};this._bindings=[];this._nActiveBindings=0;this._bindingsByRootAndName={};this._controlInterpolants=[];this._nActiveControlInterpolants=0;const scope=this;this.stats={actions:{get total(){return scope._actions.length},get inUse(){return scope._nActiveActions}},bindings:{get total(){return scope._bindings.length},get inUse(){return scope._nActiveBindings}},controlInterpolants:{get total(){return scope._controlInterpolants.length},get inUse(){return scope._nActiveControlInterpolants}}}}_isActiveAction(action){const index=action._cacheIndex;return index!==null&&index<this._nActiveActions}_addInactiveAction(action,clipUuid,rootUuid){const actions=this._actions,actionsByClip=this._actionsByClip;let actionsForClip=actionsByClip[clipUuid];if(actionsForClip===undefined){actionsForClip={knownActions:[action],actionByRoot:{}};action._byClipCacheIndex=0;actionsByClip[clipUuid]=actionsForClip}else{const knownActions=actionsForClip.knownActions;action._byClipCacheIndex=knownActions.length;knownActions.push(action)}action._cacheIndex=actions.length;actions.push(action);actionsForClip.actionByRoot[rootUuid]=action}_removeInactiveAction(action){const actions=this._actions,lastInactiveAction=actions[actions.length-1],cacheIndex=action._cacheIndex;lastInactiveAction._cacheIndex=cacheIndex;actions[cacheIndex]=lastInactiveAction;actions.pop();action._cacheIndex=null;const clipUuid=action._clip.uuid,actionsByClip=this._actionsByClip,actionsForClip=actionsByClip[clipUuid],knownActionsForClip=actionsForClip.knownActions,lastKnownAction=knownActionsForClip[knownActionsForClip.length-1],byClipCacheIndex=action._byClipCacheIndex;lastKnownAction._byClipCacheIndex=byClipCacheIndex;knownActionsForClip[byClipCacheIndex]=lastKnownAction;knownActionsForClip.pop();action._byClipCacheIndex=null;const actionByRoot=actionsForClip.actionByRoot,rootUuid=(action._localRoot||this._root).uuid;delete actionByRoot[rootUuid];if(knownActionsForClip.length===0){delete actionsByClip[clipUuid]}this._removeInactiveBindingsForAction(action)}_removeInactiveBindingsForAction(action){const bindings=action._propertyBindings;for(let i=0,n=bindings.length;i!==n;++i){const binding=bindings[i];if(--binding.referenceCount===0){this._removeInactiveBinding(binding)}}}_lendAction(action){const actions=this._actions,prevIndex=action._cacheIndex,lastActiveIndex=this._nActiveActions++,firstInactiveAction=actions[lastActiveIndex];action._cacheIndex=lastActiveIndex;actions[lastActiveIndex]=action;firstInactiveAction._cacheIndex=prevIndex;actions[prevIndex]=firstInactiveAction}_takeBackAction(action){const actions=this._actions,prevIndex=action._cacheIndex,firstInactiveIndex=--this._nActiveActions,lastActiveAction=actions[firstInactiveIndex];action._cacheIndex=firstInactiveIndex;actions[firstInactiveIndex]=action;lastActiveAction._cacheIndex=prevIndex;actions[prevIndex]=lastActiveAction}_addInactiveBinding(binding,rootUuid,trackName){const bindingsByRoot=this._bindingsByRootAndName,bindings=this._bindings;let bindingByName=bindingsByRoot[rootUuid];if(bindingByName===undefined){bindingByName={};bindingsByRoot[rootUuid]=bindingByName}bindingByName[trackName]=binding;binding._cacheIndex=bindings.length;bindings.push(binding)}_removeInactiveBinding(binding){const bindings=this._bindings,propBinding=binding.binding,rootUuid=propBinding.rootNode.uuid,trackName=propBinding.path,bindingsByRoot=this._bindingsByRootAndName,bindingByName=bindingsByRoot[rootUuid],lastInactiveBinding=bindings[bindings.length-1],cacheIndex=binding._cacheIndex;lastInactiveBinding._cacheIndex=cacheIndex;bindings[cacheIndex]=lastInactiveBinding;bindings.pop();delete bindingByName[trackName];if(Object.keys(bindingByName).length===0){delete bindingsByRoot[rootUuid]}}_lendBinding(binding){const bindings=this._bindings,prevIndex=binding._cacheIndex,lastActiveIndex=this._nActiveBindings++,firstInactiveBinding=bindings[lastActiveIndex];binding._cacheIndex=lastActiveIndex;bindings[lastActiveIndex]=binding;firstInactiveBinding._cacheIndex=prevIndex;bindings[prevIndex]=firstInactiveBinding}_takeBackBinding(binding){const bindings=this._bindings,prevIndex=binding._cacheIndex,firstInactiveIndex=--this._nActiveBindings,lastActiveBinding=bindings[firstInactiveIndex];binding._cacheIndex=firstInactiveIndex;bindings[firstInactiveIndex]=binding;lastActiveBinding._cacheIndex=prevIndex;bindings[prevIndex]=lastActiveBinding}_lendControlInterpolant(){const interpolants=this._controlInterpolants,lastActiveIndex=this._nActiveControlInterpolants++;let interpolant=interpolants[lastActiveIndex];if(interpolant===undefined){interpolant=new LinearInterpolant(new Float32Array(2),new Float32Array(2),1,_controlInterpolantsResultBuffer);interpolant.__cacheIndex=lastActiveIndex;interpolants[lastActiveIndex]=interpolant}return interpolant}_takeBackControlInterpolant(interpolant){const interpolants=this._controlInterpolants,prevIndex=interpolant.__cacheIndex,firstInactiveIndex=--this._nActiveControlInterpolants,lastActiveInterpolant=interpolants[firstInactiveIndex];interpolant.__cacheIndex=firstInactiveIndex;interpolants[firstInactiveIndex]=interpolant;lastActiveInterpolant.__cacheIndex=prevIndex;interpolants[prevIndex]=lastActiveInterpolant}clipAction(clip,optionalRoot,blendMode){const root=optionalRoot||this._root,rootUuid=root.uuid;let clipObject=typeof clip==="string"?AnimationClip.findByName(root,clip):clip;const clipUuid=clipObject!==null?clipObject.uuid:clip;const actionsForClip=this._actionsByClip[clipUuid];let prototypeAction=null;if(blendMode===undefined){if(clipObject!==null){blendMode=clipObject.blendMode}else{blendMode=NormalAnimationBlendMode}}if(actionsForClip!==undefined){const existingAction=actionsForClip.actionByRoot[rootUuid];if(existingAction!==undefined&&existingAction.blendMode===blendMode){return existingAction}prototypeAction=actionsForClip.knownActions[0];if(clipObject===null)clipObject=prototypeAction._clip}if(clipObject===null)return null;const newAction=new AnimationAction(this,clipObject,optionalRoot,blendMode);this._bindAction(newAction,prototypeAction);this._addInactiveAction(newAction,clipUuid,rootUuid);return newAction}existingAction(clip,optionalRoot){const root=optionalRoot||this._root,rootUuid=root.uuid,clipObject=typeof clip==="string"?AnimationClip.findByName(root,clip):clip,clipUuid=clipObject?clipObject.uuid:clip,actionsForClip=this._actionsByClip[clipUuid];if(actionsForClip!==undefined){return actionsForClip.actionByRoot[rootUuid]||null}return null}stopAllAction(){const actions=this._actions,nActions=this._nActiveActions;for(let i=nActions-1;i>=0;--i){actions[i].stop()}return this}update(deltaTime){deltaTime*=this.timeScale;const actions=this._actions,nActions=this._nActiveActions,time=this.time+=deltaTime,timeDirection=Math.sign(deltaTime),accuIndex=this._accuIndex^=1;for(let i=0;i!==nActions;++i){const action=actions[i];action._update(time,deltaTime,timeDirection,accuIndex)}const bindings=this._bindings,nBindings=this._nActiveBindings;for(let i=0;i!==nBindings;++i){bindings[i].apply(accuIndex)}return this}setTime(time){this.time=0;for(let i=0;i<this._actions.length;i++){this._actions[i].time=0}return this.update(time)}getRoot(){return this._root}uncacheClip(clip){const actions=this._actions,clipUuid=clip.uuid,actionsByClip=this._actionsByClip,actionsForClip=actionsByClip[clipUuid];if(actionsForClip!==undefined){const actionsToRemove=actionsForClip.knownActions;for(let i=0,n=actionsToRemove.length;i!==n;++i){const action=actionsToRemove[i];this._deactivateAction(action);const cacheIndex=action._cacheIndex,lastInactiveAction=actions[actions.length-1];action._cacheIndex=null;action._byClipCacheIndex=null;lastInactiveAction._cacheIndex=cacheIndex;actions[cacheIndex]=lastInactiveAction;actions.pop();this._removeInactiveBindingsForAction(action)}delete actionsByClip[clipUuid]}}uncacheRoot(root){const rootUuid=root.uuid,actionsByClip=this._actionsByClip;for(const clipUuid in actionsByClip){const actionByRoot=actionsByClip[clipUuid].actionByRoot,action=actionByRoot[rootUuid];if(action!==undefined){this._deactivateAction(action);this._removeInactiveAction(action)}}const bindingsByRoot=this._bindingsByRootAndName,bindingByName=bindingsByRoot[rootUuid];if(bindingByName!==undefined){for(const trackName in bindingByName){const binding=bindingByName[trackName];binding.restoreOriginalState();this._removeInactiveBinding(binding)}}}uncacheAction(clip,optionalRoot){const action=this.existingAction(clip,optionalRoot);if(action!==null){this._deactivateAction(action);this._removeInactiveAction(action)}}}class RenderTarget3D extends RenderTarget{constructor(width=1,height=1,depth=1,options={}){super(width,height,options);this.isRenderTarget3D=true;this.depth=depth;this.texture=new Data3DTexture(null,width,height,depth);this._setTextureOptions(options);this.texture.isRenderTargetTexture=true}}class Uniform{constructor(value){this.value=value}clone(){return new Uniform(this.value.clone===undefined?this.value:this.value.clone())}}let _id$1=0;class UniformsGroup extends EventDispatcher{constructor(){super();this.isUniformsGroup=true;Object.defineProperty(this,"id",{value:_id$1++});this.name="";this.usage=StaticDrawUsage;this.uniforms=[]}add(uniform){this.uniforms.push(uniform);return this}remove(uniform){const index=this.uniforms.indexOf(uniform);if(index!==-1)this.uniforms.splice(index,1);return this}setName(name){this.name=name;return this}setUsage(value){this.usage=value;return this}dispose(){this.dispatchEvent({type:"dispose"})}copy(source){this.name=source.name;this.usage=source.usage;const uniformsSource=source.uniforms;this.uniforms.length=0;for(let i=0,l=uniformsSource.length;i<l;i++){const uniforms=Array.isArray(uniformsSource[i])?uniformsSource[i]:[uniformsSource[i]];for(let j=0;j<uniforms.length;j++){this.uniforms.push(uniforms[j].clone())}}return this}clone(){return new this.constructor().copy(this)}}class InstancedInterleavedBuffer extends InterleavedBuffer{constructor(array,stride,meshPerAttribute=1){super(array,stride);this.isInstancedInterleavedBuffer=true;this.meshPerAttribute=meshPerAttribute}copy(source){super.copy(source);this.meshPerAttribute=source.meshPerAttribute;return this}clone(data){const ib=super.clone(data);ib.meshPerAttribute=this.meshPerAttribute;return ib}toJSON(data){const json=super.toJSON(data);json.isInstancedInterleavedBuffer=true;json.meshPerAttribute=this.meshPerAttribute;return json}}class GLBufferAttribute{constructor(buffer,type,itemSize,elementSize,count,normalized=false){this.isGLBufferAttribute=true;this.name="";this.buffer=buffer;this.type=type;this.itemSize=itemSize;this.elementSize=elementSize;this.count=count;this.normalized=normalized;this.version=0}set needsUpdate(value){if(value===true)this.version++}setBuffer(buffer){this.buffer=buffer;return this}setType(type,elementSize){this.type=type;this.elementSize=elementSize;return this}setItemSize(itemSize){this.itemSize=itemSize;return this}setCount(count){this.count=count;return this}}const _matrix=new Matrix4;class Raycaster{constructor(origin,direction,near=0,far=Infinity){this.ray=new Ray(origin,direction);this.near=near;this.far=far;this.camera=null;this.layers=new Layers;this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(origin,direction){this.ray.set(origin,direction)}setFromCamera(coords,camera){if(camera.isPerspectiveCamera){this.ray.origin.setFromMatrixPosition(camera.matrixWorld);this.ray.direction.set(coords.x,coords.y,0.5).unproject(camera).sub(this.ray.origin).normalize();this.camera=camera}else if(camera.isOrthographicCamera){this.ray.origin.set(coords.x,coords.y,(camera.near+camera.far)/(camera.near-camera.far)).unproject(camera);this.ray.direction.set(0,0,-1).transformDirection(camera.matrixWorld);this.camera=camera}else{error("Raycaster: Unsupported camera type: "+camera.type)}}setFromXRController(controller){_matrix.identity().extractRotation(controller.matrixWorld);this.ray.origin.setFromMatrixPosition(controller.matrixWorld);this.ray.direction.set(0,0,-1).applyMatrix4(_matrix);return this}intersectObject(object,recursive=true,intersects=[]){intersect(object,this,intersects,recursive);intersects.sort(ascSort);return intersects}intersectObjects(objects,recursive=true,intersects=[]){for(let i=0,l=objects.length;i<l;i++){intersect(objects[i],this,intersects,recursive)}intersects.sort(ascSort);return intersects}}function ascSort(a,b){return a.distance-b.distance}function intersect(object,raycaster,intersects,recursive){let propagate=true;if(object.layers.test(raycaster.layers)){const result=object.raycast(raycaster,intersects);if(result===false)propagate=false}if(propagate===true&&recursive===true){const children=object.children;for(let i=0,l=children.length;i<l;i++){intersect(children[i],raycaster,intersects,true)}}}class Timer{constructor(){this._previousTime=0;this._currentTime=0;this._startTime=performance.now();this._delta=0;this._elapsed=0;this._timescale=1;this._document=null;this._pageVisibilityHandler=null}connect(document){this._document=document;if(document.hidden!==undefined){this._pageVisibilityHandler=handleVisibilityChange.bind(this);document.addEventListener("visibilitychange",this._pageVisibilityHandler,false)}}disconnect(){if(this._pageVisibilityHandler!==null){this._document.removeEventListener("visibilitychange",this._pageVisibilityHandler);this._pageVisibilityHandler=null}this._document=null}getDelta(){return this._delta/1000}getElapsed(){return this._elapsed/1000}getTimescale(){return this._timescale}setTimescale(timescale){this._timescale=timescale;return this}reset(){this._currentTime=performance.now()-this._startTime;return this}dispose(){this.disconnect()}update(timestamp){if(this._pageVisibilityHandler!==null&&this._document.hidden===true){this._delta=0}else{this._previousTime=this._currentTime;this._currentTime=(timestamp!==undefined?timestamp:performance.now())-this._startTime;this._delta=(this._currentTime-this._previousTime)*this._timescale;this._elapsed+=this._delta}return this}}function handleVisibilityChange(){if(this._document.hidden===false)this.reset()}class Spherical{constructor(radius=1,phi=0,theta=0){this.radius=radius;this.phi=phi;this.theta=theta}set(radius,phi,theta){this.radius=radius;this.phi=phi;this.theta=theta;return this}copy(other){this.radius=other.radius;this.phi=other.phi;this.theta=other.theta;return this}makeSafe(){const EPS=0.000001;this.phi=clamp(this.phi,EPS,Math.PI-EPS);return this}setFromVector3(v){return this.setFromCartesianCoords(v.x,v.y,v.z)}setFromCartesianCoords(x,y,z){this.radius=Math.sqrt(x*x+y*y+z*z);if(this.radius===0){this.theta=0;this.phi=0}else{this.theta=Math.atan2(x,z);this.phi=Math.acos(clamp(y/this.radius,-1,1))}return this}clone(){return new this.constructor().copy(this)}}class Cylindrical{constructor(radius=1,theta=0,y=0){this.radius=radius;this.theta=theta;this.y=y}set(radius,theta,y){this.radius=radius;this.theta=theta;this.y=y;return this}copy(other){this.radius=other.radius;this.theta=other.theta;this.y=other.y;return this}setFromVector3(v){return this.setFromCartesianCoords(v.x,v.y,v.z)}setFromCartesianCoords(x,y,z){this.radius=Math.sqrt(x*x+z*z);this.theta=Math.atan2(x,z);this.y=y;return this}clone(){return new this.constructor().copy(this)}}class Matrix2{constructor(n11,n12,n21,n22){Matrix2.prototype.isMatrix2=true;this.elements=[1,0,0,1];if(n11!==undefined){this.set(n11,n12,n21,n22)}}identity(){this.set(1,0,0,1);return this}fromArray(array,offset=0){for(let i=0;i<4;i++){this.elements[i]=array[i+offset]}return this}set(n11,n12,n21,n22){const te=this.elements;te[0]=n11;te[2]=n12;te[1]=n21;te[3]=n22;return this}}const _vector$4=new Vector2;class Box2{constructor(min=new Vector2(+Infinity,+Infinity),max=new Vector2(-Infinity,-Infinity)){this.isBox2=true;this.min=min;this.max=max}set(min,max){this.min.copy(min);this.max.copy(max);return this}setFromPoints(points){this.makeEmpty();for(let i=0,il=points.length;i<il;i++){this.expandByPoint(points[i])}return this}setFromCenterAndSize(center,size){const halfSize=_vector$4.copy(size).multiplyScalar(0.5);this.min.copy(center).sub(halfSize);this.max.copy(center).add(halfSize);return this}clone(){return new this.constructor().copy(this)}copy(box){this.min.copy(box.min);this.max.copy(box.max);return this}makeEmpty(){this.min.x=this.min.y=+Infinity;this.max.x=this.max.y=-Infinity;return this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(target){return this.isEmpty()?target.set(0,0):target.addVectors(this.min,this.max).multiplyScalar(0.5)}getSize(target){return this.isEmpty()?target.set(0,0):target.subVectors(this.max,this.min)}expandByPoint(point){this.min.min(point);this.max.max(point);return this}expandByVector(vector){this.min.sub(vector);this.max.add(vector);return this}expandByScalar(scalar){this.min.addScalar(-scalar);this.max.addScalar(scalar);return this}containsPoint(point){return point.x>=this.min.x&&point.x<=this.max.x&&point.y>=this.min.y&&point.y<=this.max.y}containsBox(box){return this.min.x<=box.min.x&&box.max.x<=this.max.x&&this.min.y<=box.min.y&&box.max.y<=this.max.y}getParameter(point,target){return target.set((point.x-this.min.x)/(this.max.x-this.min.x),(point.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(box){return box.max.x>=this.min.x&&box.min.x<=this.max.x&&box.max.y>=this.min.y&&box.min.y<=this.max.y}clampPoint(point,target){return target.copy(point).clamp(this.min,this.max)}distanceToPoint(point){return this.clampPoint(point,_vector$4).distanceTo(point)}intersect(box){this.min.max(box.min);this.max.min(box.max);if(this.isEmpty())this.makeEmpty();return this}union(box){this.min.min(box.min);this.max.max(box.max);return this}translate(offset){this.min.add(offset);this.max.add(offset);return this}equals(box){return box.min.equals(this.min)&&box.max.equals(this.max)}}const _startP=new Vector3;const _startEnd=new Vector3;const _d1=new Vector3;const _d2=new Vector3;const _r=new Vector3;const _c1=new Vector3;const _c2=new Vector3;class Line3{constructor(start=new Vector3,end=new Vector3){this.start=start;this.end=end}set(start,end){this.start.copy(start);this.end.copy(end);return this}copy(line){this.start.copy(line.start);this.end.copy(line.end);return this}getCenter(target){return target.addVectors(this.start,this.end).multiplyScalar(0.5)}delta(target){return target.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(t,target){return this.delta(target).multiplyScalar(t).add(this.start)}closestPointToPointParameter(point,clampToLine){_startP.subVectors(point,this.start);_startEnd.subVectors(this.end,this.start);const startEnd2=_startEnd.dot(_startEnd);const startEnd_startP=_startEnd.dot(_startP);let t=startEnd_startP/startEnd2;if(clampToLine){t=clamp(t,0,1)}return t}closestPointToPoint(point,clampToLine,target){const t=this.closestPointToPointParameter(point,clampToLine);return this.delta(target).multiplyScalar(t).add(this.start)}distanceSqToLine3(line,c1=_c1,c2=_c2){const EPSILON=1e-8*1e-8;let s,t;const p1=this.start;const p2=line.start;const q1=this.end;const q2=line.end;_d1.subVectors(q1,p1);_d2.subVectors(q2,p2);_r.subVectors(p1,p2);const a=_d1.dot(_d1);const e=_d2.dot(_d2);const f=_d2.dot(_r);if(a<=EPSILON&&e<=EPSILON){c1.copy(p1);c2.copy(p2);c1.sub(c2);return c1.dot(c1)}if(a<=EPSILON){s=0;t=f/e;t=clamp(t,0,1)}else{const c=_d1.dot(_r);if(e<=EPSILON){t=0;s=clamp(-c/a,0,1)}else{const b=_d1.dot(_d2);const denom=a*e-b*b;if(denom!==0){s=clamp((b*f-c*e)/denom,0,1)}else{s=0}t=(b*s+f)/e;if(t<0){t=0;s=clamp(-c/a,0,1)}else if(t>1){t=1;s=clamp((b-c)/a,0,1)}}}c1.copy(p1).add(_d1.multiplyScalar(s));c2.copy(p2).add(_d2.multiplyScalar(t));c1.sub(c2);return c1.dot(c1)}applyMatrix4(matrix){this.start.applyMatrix4(matrix);this.end.applyMatrix4(matrix);return this}equals(line){return line.start.equals(this.start)&&line.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const _vector$3=new Vector3;class SpotLightHelper extends Object3D{constructor(light,color){super();this.light=light;this.matrixAutoUpdate=false;this.color=color;this.type="SpotLightHelper";const geometry=new BufferGeometry;const positions=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let i=0,j=1,l=32;i<l;i++,j++){const p1=i/l*Math.PI*2;const p2=j/l*Math.PI*2;positions.push(Math.cos(p1),Math.sin(p1),1,Math.cos(p2),Math.sin(p2),1)}geometry.setAttribute("position",new Float32BufferAttribute(positions,3));const material=new LineBasicMaterial({fog:false,toneMapped:false});this.cone=new LineSegments(geometry,material);this.add(this.cone);this.update()}dispose(){this.cone.geometry.dispose();this.cone.material.dispose()}update(){this.light.updateWorldMatrix(true,false);this.light.target.updateWorldMatrix(true,false);if(this.parent){this.parent.updateWorldMatrix(true);this.matrix.copy(this.parent.matrixWorld).invert().multiply(this.light.matrixWorld)}else{this.matrix.copy(this.light.matrixWorld)}this.matrixWorld.copy(this.light.matrixWorld);const coneLength=this.light.distance?this.light.distance:1000;const coneWidth=coneLength*Math.tan(this.light.angle);this.cone.scale.set(coneWidth,coneWidth,coneLength);_vector$3.setFromMatrixPosition(this.light.target.matrixWorld);this.cone.lookAt(_vector$3);if(this.color!==undefined){this.cone.material.color.set(this.color)}else{this.cone.material.color.copy(this.light.color)}}}const _vector$2=new Vector3;const _boneMatrix=new Matrix4;const _matrixWorldInv=new Matrix4;class SkeletonHelper extends LineSegments{constructor(object){const bones=getBoneList(object);const geometry=new BufferGeometry;const vertices=[];const colors=[];for(let i=0;i<bones.length;i++){const bone=bones[i];if(bone.parent&&bone.parent.isBone){vertices.push(0,0,0);vertices.push(0,0,0);colors.push(0,0,0);colors.push(0,0,0)}}geometry.setAttribute("position",new Float32BufferAttribute(vertices,3));geometry.setAttribute("color",new Float32BufferAttribute(colors,3));const material=new LineBasicMaterial({vertexColors:true,depthTest:false,depthWrite:false,toneMapped:false,transparent:true});super(geometry,material);this.isSkeletonHelper=true;this.type="SkeletonHelper";this.root=object;this.bones=bones;this.matrix=object.matrixWorld;this.matrixAutoUpdate=false;const color1=new Color(255);const color2=new Color(65280);this.setColors(color1,color2)}updateMatrixWorld(force){const bones=this.bones;const geometry=this.geometry;const position=geometry.getAttribute("position");_matrixWorldInv.copy(this.root.matrixWorld).invert();for(let i=0,j=0;i<bones.length;i++){const bone=bones[i];if(bone.parent&&bone.parent.isBone){_boneMatrix.multiplyMatrices(_matrixWorldInv,bone.matrixWorld);_vector$2.setFromMatrixPosition(_boneMatrix);position.setXYZ(j,_vector$2.x,_vector$2.y,_vector$2.z);_boneMatrix.multiplyMatrices(_matrixWorldInv,bone.parent.matrixWorld);_vector$2.setFromMatrixPosition(_boneMatrix);position.setXYZ(j+1,_vector$2.x,_vector$2.y,_vector$2.z);j+=2}}geometry.getAttribute("position").needsUpdate=true;super.updateMatrixWorld(force)}setColors(color1,color2){const geometry=this.geometry;const colorAttribute=geometry.getAttribute("color");for(let i=0;i<colorAttribute.count;i+=2){colorAttribute.setXYZ(i,color1.r,color1.g,color1.b);colorAttribute.setXYZ(i+1,color2.r,color2.g,color2.b)}colorAttribute.needsUpdate=true;return this}dispose(){this.geometry.dispose();this.material.dispose()}}function getBoneList(object){const boneList=[];if(object.isBone===true){boneList.push(object)}for(let i=0;i<object.children.length;i++){boneList.push(...getBoneList(object.children[i]))}return boneList}class PointLightHelper extends Mesh{constructor(light,sphereSize,color){const geometry=new SphereGeometry(sphereSize,4,2);const material=new MeshBasicMaterial({wireframe:true,fog:false,toneMapped:false});super(geometry,material);this.light=light;this.color=color;this.type="PointLightHelper";this.matrix=this.light.matrixWorld;this.matrixAutoUpdate=false;this.update()}dispose(){this.geometry.dispose();this.material.dispose()}update(){this.light.updateWorldMatrix(true,false);if(this.color!==undefined){this.material.color.set(this.color)}else{this.material.color.copy(this.light.color)}}}const _vector$1=new Vector3;const _color1=new Color;const _color2=new Color;class HemisphereLightHelper extends Object3D{constructor(light,size,color){super();this.light=light;this.matrix=light.matrixWorld;this.matrixAutoUpdate=false;this.color=color;this.type="HemisphereLightHelper";const geometry=new OctahedronGeometry(size);geometry.rotateY(Math.PI*0.5);this.material=new MeshBasicMaterial({wireframe:true,fog:false,toneMapped:false});if(this.color===undefined)this.material.vertexColors=true;const position=geometry.getAttribute("position");const colors=new Float32Array(position.count*3);geometry.setAttribute("color",new BufferAttribute(colors,3));this.add(new Mesh(geometry,this.material));this.update()}dispose(){this.children[0].geometry.dispose();this.children[0].material.dispose()}update(){const mesh=this.children[0];if(this.color!==undefined){this.material.color.set(this.color)}else{const colors=mesh.geometry.getAttribute("color");_color1.copy(this.light.color);_color2.copy(this.light.groundColor);for(let i=0,l=colors.count;i<l;i++){const color=i<l/2?_color1:_color2;colors.setXYZ(i,color.r,color.g,color.b)}colors.needsUpdate=true}this.light.updateWorldMatrix(true,false);mesh.lookAt(_vector$1.setFromMatrixPosition(this.light.matrixWorld).negate())}}class GridHelper extends LineSegments{constructor(size=10,divisions=10,color1=4473924,color2=8947848){color1=new Color(color1);color2=new Color(color2);const center=divisions/2;const step=size/divisions;const halfSize=size/2;const vertices=[],colors=[];for(let i=0,j=0,k=-halfSize;i<=divisions;i++,k+=step){vertices.push(-halfSize,0,k,halfSize,0,k);vertices.push(k,0,-halfSize,k,0,halfSize);const color=i===center?color1:color2;color.toArray(colors,j);j+=3;color.toArray(colors,j);j+=3;color.toArray(colors,j);j+=3;color.toArray(colors,j);j+=3}const geometry=new BufferGeometry;geometry.setAttribute("position",new Float32BufferAttribute(vertices,3));geometry.setAttribute("color",new Float32BufferAttribute(colors,3));const material=new LineBasicMaterial({vertexColors:true,toneMapped:false});super(geometry,material);this.type="GridHelper"}dispose(){this.geometry.dispose();this.material.dispose()}}class PolarGridHelper extends LineSegments{constructor(radius=10,sectors=16,rings=8,divisions=64,color1=4473924,color2=8947848){color1=new Color(color1);color2=new Color(color2);const vertices=[];const colors=[];if(sectors>1){for(let i=0;i<sectors;i++){const v=i/sectors*(Math.PI*2);const x=Math.sin(v)*radius;const z=Math.cos(v)*radius;vertices.push(0,0,0);vertices.push(x,0,z);const color=i&1?color1:color2;colors.push(color.r,color.g,color.b);colors.push(color.r,color.g,color.b)}}for(let i=0;i<rings;i++){const color=i&1?color1:color2;const r=radius-radius/rings*i;for(let j=0;j<divisions;j++){let v=j/divisions*(Math.PI*2);let x=Math.sin(v)*r;let z=Math.cos(v)*r;vertices.push(x,0,z);colors.push(color.r,color.g,color.b);v=(j+1)/divisions*(Math.PI*2);x=Math.sin(v)*r;z=Math.cos(v)*r;vertices.push(x,0,z);colors.push(color.r,color.g,color.b)}}const geometry=new BufferGeometry;geometry.setAttribute("position",new Float32BufferAttribute(vertices,3));geometry.setAttribute("color",new Float32BufferAttribute(colors,3));const material=new LineBasicMaterial({vertexColors:true,toneMapped:false});super(geometry,material);this.type="PolarGridHelper"}dispose(){this.geometry.dispose();this.material.dispose()}}const _v1=new Vector3;const _v2=new Vector3;const _v3=new Vector3;class DirectionalLightHelper extends Object3D{constructor(light,size,color){super();this.light=light;this.matrix=light.matrixWorld;this.matrixAutoUpdate=false;this.color=color;this.type="DirectionalLightHelper";if(size===undefined)size=1;let geometry=new BufferGeometry;geometry.setAttribute("position",new Float32BufferAttribute([-size,size,0,size,size,0,size,-size,0,-size,-size,0,-size,size,0],3));const material=new LineBasicMaterial({fog:false,toneMapped:false});this.lightPlane=new Line(geometry,material);this.add(this.lightPlane);geometry=new BufferGeometry;geometry.setAttribute("position",new Float32BufferAttribute([0,0,0,0,0,1],3));this.targetLine=new Line(geometry,material);this.add(this.targetLine);this.update()}dispose(){this.lightPlane.geometry.dispose();this.lightPlane.material.dispose();this.targetLine.geometry.dispose();this.targetLine.material.dispose()}update(){this.light.updateWorldMatrix(true,false);this.light.target.updateWorldMatrix(true,false);_v1.setFromMatrixPosition(this.light.matrixWorld);_v2.setFromMatrixPosition(this.light.target.matrixWorld);_v3.subVectors(_v2,_v1);this.lightPlane.lookAt(_v2);if(this.color!==undefined){this.lightPlane.material.color.set(this.color);this.targetLine.material.color.set(this.color)}else{this.lightPlane.material.color.copy(this.light.color);this.targetLine.material.color.copy(this.light.color)}this.targetLine.lookAt(_v2);this.targetLine.scale.z=_v3.length()}}const _vector=new Vector3;const _camera=new Camera;class CameraHelper extends LineSegments{constructor(camera){const geometry=new BufferGeometry;const material=new LineBasicMaterial({color:16777215,vertexColors:true,toneMapped:false});const vertices=[];const colors=[];const pointMap={};addLine("n1","n2");addLine("n2","n4");addLine("n4","n3");addLine("n3","n1");addLine("f1","f2");addLine("f2","f4");addLine("f4","f3");addLine("f3","f1");addLine("n1","f1");addLine("n2","f2");addLine("n3","f3");addLine("n4","f4");addLine("p","n1");addLine("p","n2");addLine("p","n3");addLine("p","n4");addLine("u1","u2");addLine("u2","u3");addLine("u3","u1");addLine("c","t");addLine("p","c");addLine("cn1","cn2");addLine("cn3","cn4");addLine("cf1","cf2");addLine("cf3","cf4");function addLine(a,b){addPoint(a);addPoint(b)}function addPoint(id){vertices.push(0,0,0);colors.push(0,0,0);if(pointMap[id]===undefined){pointMap[id]=[]}pointMap[id].push(vertices.length/3-1)}geometry.setAttribute("position",new Float32BufferAttribute(vertices,3));geometry.setAttribute("color",new Float32BufferAttribute(colors,3));super(geometry,material);this.type="CameraHelper";this.camera=camera;if(this.camera.updateProjectionMatrix)this.camera.updateProjectionMatrix();this.matrix=camera.matrixWorld;this.matrixAutoUpdate=false;this.pointMap=pointMap;this.update();const colorFrustum=new Color(16755200);const colorCone=new Color(16711680);const colorUp=new Color(43775);const colorTarget=new Color(16777215);const colorCross=new Color(3355443);this.setColors(colorFrustum,colorCone,colorUp,colorTarget,colorCross)}setColors(frustum,cone,up,target,cross){const geometry=this.geometry;const colorAttribute=geometry.getAttribute("color");colorAttribute.setXYZ(0,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(1,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(2,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(3,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(4,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(5,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(6,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(7,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(8,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(9,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(10,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(11,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(12,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(13,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(14,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(15,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(16,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(17,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(18,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(19,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(20,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(21,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(22,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(23,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(24,cone.r,cone.g,cone.b);colorAttribute.setXYZ(25,cone.r,cone.g,cone.b);colorAttribute.setXYZ(26,cone.r,cone.g,cone.b);colorAttribute.setXYZ(27,cone.r,cone.g,cone.b);colorAttribute.setXYZ(28,cone.r,cone.g,cone.b);colorAttribute.setXYZ(29,cone.r,cone.g,cone.b);colorAttribute.setXYZ(30,cone.r,cone.g,cone.b);colorAttribute.setXYZ(31,cone.r,cone.g,cone.b);colorAttribute.setXYZ(32,up.r,up.g,up.b);colorAttribute.setXYZ(33,up.r,up.g,up.b);colorAttribute.setXYZ(34,up.r,up.g,up.b);colorAttribute.setXYZ(35,up.r,up.g,up.b);colorAttribute.setXYZ(36,up.r,up.g,up.b);colorAttribute.setXYZ(37,up.r,up.g,up.b);colorAttribute.setXYZ(38,target.r,target.g,target.b);colorAttribute.setXYZ(39,target.r,target.g,target.b);colorAttribute.setXYZ(40,cross.r,cross.g,cross.b);colorAttribute.setXYZ(41,cross.r,cross.g,cross.b);colorAttribute.setXYZ(42,cross.r,cross.g,cross.b);colorAttribute.setXYZ(43,cross.r,cross.g,cross.b);colorAttribute.setXYZ(44,cross.r,cross.g,cross.b);colorAttribute.setXYZ(45,cross.r,cross.g,cross.b);colorAttribute.setXYZ(46,cross.r,cross.g,cross.b);colorAttribute.setXYZ(47,cross.r,cross.g,cross.b);colorAttribute.setXYZ(48,cross.r,cross.g,cross.b);colorAttribute.setXYZ(49,cross.r,cross.g,cross.b);colorAttribute.needsUpdate=true;return this}update(){const geometry=this.geometry;const pointMap=this.pointMap;const w=1,h=1;let nearZ,farZ;_camera.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse);if(this.camera.reversedDepth===true){nearZ=1;farZ=0}else{if(this.camera.coordinateSystem===WebGLCoordinateSystem){nearZ=-1;farZ=1}else if(this.camera.coordinateSystem===WebGPUCoordinateSystem){nearZ=0;farZ=1}else{throw new Error("THREE.CameraHelper.update(): Invalid coordinate system: "+this.camera.coordinateSystem)}}setPoint("c",pointMap,geometry,_camera,0,0,nearZ);setPoint("t",pointMap,geometry,_camera,0,0,farZ);setPoint("n1",pointMap,geometry,_camera,-w,-h,nearZ);setPoint("n2",pointMap,geometry,_camera,w,-h,nearZ);setPoint("n3",pointMap,geometry,_camera,-w,h,nearZ);setPoint("n4",pointMap,geometry,_camera,w,h,nearZ);setPoint("f1",pointMap,geometry,_camera,-w,-h,farZ);setPoint("f2",pointMap,geometry,_camera,w,-h,farZ);setPoint("f3",pointMap,geometry,_camera,-w,h,farZ);setPoint("f4",pointMap,geometry,_camera,w,h,farZ);setPoint("u1",pointMap,geometry,_camera,w*0.7,h*1.1,nearZ);setPoint("u2",pointMap,geometry,_camera,-w*0.7,h*1.1,nearZ);setPoint("u3",pointMap,geometry,_camera,0,h*2,nearZ);setPoint("cf1",pointMap,geometry,_camera,-w,0,farZ);setPoint("cf2",pointMap,geometry,_camera,w,0,farZ);setPoint("cf3",pointMap,geometry,_camera,0,-h,farZ);setPoint("cf4",pointMap,geometry,_camera,0,h,farZ);setPoint("cn1",pointMap,geometry,_camera,-w,0,nearZ);setPoint("cn2",pointMap,geometry,_camera,w,0,nearZ);setPoint("cn3",pointMap,geometry,_camera,0,-h,nearZ);setPoint("cn4",pointMap,geometry,_camera,0,h,nearZ);geometry.getAttribute("position").needsUpdate=true}dispose(){this.geometry.dispose();this.material.dispose()}}function setPoint(point,pointMap,geometry,camera,x,y,z){_vector.set(x,y,z).unproject(camera);const points=pointMap[point];if(points!==undefined){const position=geometry.getAttribute("position");for(let i=0,l=points.length;i<l;i++){position.setXYZ(points[i],_vector.x,_vector.y,_vector.z)}}}const _box=new Box3;class BoxHelper extends LineSegments{constructor(object,color=16776960){const indices=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);const positions=new Float32Array(8*3);const geometry=new BufferGeometry;geometry.setIndex(new BufferAttribute(indices,1));geometry.setAttribute("position",new BufferAttribute(positions,3));super(geometry,new LineBasicMaterial({color:color,toneMapped:false}));this.object=object;this.type="BoxHelper";this.matrixAutoUpdate=false;this.update()}update(){if(this.object!==undefined){_box.setFromObject(this.object)}if(_box.isEmpty())return;const min=_box.min;const max=_box.max;const position=this.geometry.attributes.position;const array=position.array;array[0]=max.x;array[1]=max.y;array[2]=max.z;array[3]=min.x;array[4]=max.y;array[5]=max.z;array[6]=min.x;array[7]=min.y;array[8]=max.z;array[9]=max.x;array[10]=min.y;array[11]=max.z;array[12]=max.x;array[13]=max.y;array[14]=min.z;array[15]=min.x;array[16]=max.y;array[17]=min.z;array[18]=min.x;array[19]=min.y;array[20]=min.z;array[21]=max.x;array[22]=min.y;array[23]=min.z;position.needsUpdate=true;this.geometry.computeBoundingSphere()}setFromObject(object){this.object=object;this.update();return this}copy(source,recursive){super.copy(source,recursive);this.object=source.object;return this}dispose(){this.geometry.dispose();this.material.dispose()}}class Box3Helper extends LineSegments{constructor(box,color=16776960){const indices=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);const positions=[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1];const geometry=new BufferGeometry;geometry.setIndex(new BufferAttribute(indices,1));geometry.setAttribute("position",new Float32BufferAttribute(positions,3));super(geometry,new LineBasicMaterial({color:color,toneMapped:false}));this.box=box;this.type="Box3Helper";this.geometry.computeBoundingSphere()}updateMatrixWorld(force){const box=this.box;if(box.isEmpty())return;box.getCenter(this.position);box.getSize(this.scale);this.scale.multiplyScalar(0.5);super.updateMatrixWorld(force)}dispose(){this.geometry.dispose();this.material.dispose()}}class PlaneHelper extends Line{constructor(plane,size=1,hex=16776960){const color=hex;const positions=[1,-1,0,-1,1,0,-1,-1,0,1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0];const geometry=new BufferGeometry;geometry.setAttribute("position",new Float32BufferAttribute(positions,3));geometry.computeBoundingSphere();super(geometry,new LineBasicMaterial({color:color,toneMapped:false}));this.type="PlaneHelper";this.plane=plane;this.size=size;const positions2=[1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0];const geometry2=new BufferGeometry;geometry2.setAttribute("position",new Float32BufferAttribute(positions2,3));geometry2.computeBoundingSphere();this.add(new Mesh(geometry2,new MeshBasicMaterial({color:color,opacity:0.2,transparent:true,depthWrite:false,toneMapped:false})))}updateMatrixWorld(force){this.position.set(0,0,0);this.scale.set(0.5*this.size,0.5*this.size,1);this.lookAt(this.plane.normal);this.translateZ(-this.plane.constant);super.updateMatrixWorld(force)}dispose(){this.geometry.dispose();this.material.dispose();this.children[0].geometry.dispose();this.children[0].material.dispose()}}const _axis=new Vector3;let _lineGeometry,_coneGeometry;class ArrowHelper extends Object3D{constructor(dir=new Vector3(0,0,1),origin=new Vector3(0,0,0),length=1,color=16776960,headLength=length*0.2,headWidth=headLength*0.2){super();this.type="ArrowHelper";if(_lineGeometry===undefined){_lineGeometry=new BufferGeometry;_lineGeometry.setAttribute("position",new Float32BufferAttribute([0,0,0,0,1,0],3));_coneGeometry=new ConeGeometry(0.5,1,5,1);_coneGeometry.translate(0,-0.5,0)}this.position.copy(origin);this.line=new Line(_lineGeometry,new LineBasicMaterial({color:color,toneMapped:false}));this.line.matrixAutoUpdate=false;this.add(this.line);this.cone=new Mesh(_coneGeometry,new MeshBasicMaterial({color:color,toneMapped:false}));this.cone.matrixAutoUpdate=false;this.add(this.cone);this.setDirection(dir);this.setLength(length,headLength,headWidth)}setDirection(dir){if(dir.y>0.99999){this.quaternion.set(0,0,0,1)}else if(dir.y<-0.99999){this.quaternion.set(1,0,0,0)}else{_axis.set(dir.z,0,-dir.x).normalize();const radians=Math.acos(dir.y);this.quaternion.setFromAxisAngle(_axis,radians)}}setLength(length,headLength=length*0.2,headWidth=headLength*0.2){this.line.scale.set(1,Math.max(0.0001,length-headLength),1);this.line.updateMatrix();this.cone.scale.set(headWidth,headLength,headWidth);this.cone.position.y=length;this.cone.updateMatrix()}setColor(color){this.line.material.color.set(color);this.cone.material.color.set(color)}copy(source){super.copy(source,false);this.line.copy(source.line);this.cone.copy(source.cone);return this}dispose(){this.line.geometry.dispose();this.line.material.dispose();this.cone.geometry.dispose();this.cone.material.dispose()}}class AxesHelper extends LineSegments{constructor(size=1){const vertices=[0,0,0,size,0,0,0,0,0,0,size,0,0,0,0,0,0,size];const colors=[1,0,0,1,0.6,0,0,1,0,0.6,1,0,0,0,1,0,0.6,1];const geometry=new BufferGeometry;geometry.setAttribute("position",new Float32BufferAttribute(vertices,3));geometry.setAttribute("color",new Float32BufferAttribute(colors,3));const material=new LineBasicMaterial({vertexColors:true,toneMapped:false});super(geometry,material);this.type="AxesHelper"}setColors(xAxisColor,yAxisColor,zAxisColor){const color=new Color;const array=this.geometry.attributes.color.array;color.set(xAxisColor);color.toArray(array,0);color.toArray(array,3);color.set(yAxisColor);color.toArray(array,6);color.toArray(array,9);color.set(zAxisColor);color.toArray(array,12);color.toArray(array,15);this.geometry.attributes.color.needsUpdate=true;return this}dispose(){this.geometry.dispose();this.material.dispose()}}class ShapePath{constructor(){this.type="ShapePath";this.color=new Color;this.subPaths=[];this.currentPath=null}moveTo(x,y){this.currentPath=new Path;this.subPaths.push(this.currentPath);this.currentPath.moveTo(x,y);return this}lineTo(x,y){this.currentPath.lineTo(x,y);return this}quadraticCurveTo(aCPx,aCPy,aX,aY){this.currentPath.quadraticCurveTo(aCPx,aCPy,aX,aY);return this}bezierCurveTo(aCP1x,aCP1y,aCP2x,aCP2y,aX,aY){this.currentPath.bezierCurveTo(aCP1x,aCP1y,aCP2x,aCP2y,aX,aY);return this}splineThru(pts){this.currentPath.splineThru(pts);return this}toShapes(isCCW){function toShapesNoHoles(inSubpaths){const shapes=[];for(let i=0,l=inSubpaths.length;i<l;i++){const tmpPath=inSubpaths[i];const tmpShape=new Shape;tmpShape.curves=tmpPath.curves;shapes.push(tmpShape)}return shapes}function isPointInsidePolygon(inPt,inPolygon){const polyLen=inPolygon.length;let inside=false;for(let p=polyLen-1,q=0;q<polyLen;p=q++){let edgeLowPt=inPolygon[p];let edgeHighPt=inPolygon[q];let edgeDx=edgeHighPt.x-edgeLowPt.x;let edgeDy=edgeHighPt.y-edgeLowPt.y;if(Math.abs(edgeDy)>Number.EPSILON){if(edgeDy<0){edgeLowPt=inPolygon[q];edgeDx=-edgeDx;edgeHighPt=inPolygon[p];edgeDy=-edgeDy}if(inPt.y<edgeLowPt.y||inPt.y>edgeHighPt.y)continue;if(inPt.y===edgeLowPt.y){if(inPt.x===edgeLowPt.x)return true}else{const perpEdge=edgeDy*(inPt.x-edgeLowPt.x)-edgeDx*(inPt.y-edgeLowPt.y);if(perpEdge===0)return true;if(perpEdge<0)continue;inside=!inside}}else{if(inPt.y!==edgeLowPt.y)continue;if(edgeHighPt.x<=inPt.x&&inPt.x<=edgeLowPt.x||edgeLowPt.x<=inPt.x&&inPt.x<=edgeHighPt.x)return true}}return inside}const isClockWise=ShapeUtils.isClockWise;const subPaths=this.subPaths;if(subPaths.length===0)return[];let solid,tmpPath,tmpShape;const shapes=[];if(subPaths.length===1){tmpPath=subPaths[0];tmpShape=new Shape;tmpShape.curves=tmpPath.curves;shapes.push(tmpShape);return shapes}let holesFirst=!isClockWise(subPaths[0].getPoints());holesFirst=isCCW?!holesFirst:holesFirst;const betterShapeHoles=[];const newShapes=[];let newShapeHoles=[];let mainIdx=0;let tmpPoints;newShapes[mainIdx]=undefined;newShapeHoles[mainIdx]=[];for(let i=0,l=subPaths.length;i<l;i++){tmpPath=subPaths[i];tmpPoints=tmpPath.getPoints();solid=isClockWise(tmpPoints);solid=isCCW?!solid:solid;if(solid){if(!holesFirst&&newShapes[mainIdx])mainIdx++;newShapes[mainIdx]={s:new Shape,p:tmpPoints};newShapes[mainIdx].s.curves=tmpPath.curves;if(holesFirst)mainIdx++;newShapeHoles[mainIdx]=[]}else{newShapeHoles[mainIdx].push({h:tmpPath,p:tmpPoints[0]})}}if(!newShapes[0])return toShapesNoHoles(subPaths);if(newShapes.length>1){let ambiguous=false;let toChange=0;for(let sIdx=0,sLen=newShapes.length;sIdx<sLen;sIdx++){betterShapeHoles[sIdx]=[]}for(let sIdx=0,sLen=newShapes.length;sIdx<sLen;sIdx++){const sho=newShapeHoles[sIdx];for(let hIdx=0;hIdx<sho.length;hIdx++){const ho=sho[hIdx];let hole_unassigned=true;for(let s2Idx=0;s2Idx<newShapes.length;s2Idx++){if(isPointInsidePolygon(ho.p,newShapes[s2Idx].p)){if(sIdx!==s2Idx)toChange++;if(hole_unassigned){hole_unassigned=false;betterShapeHoles[s2Idx].push(ho)}else{ambiguous=true}}}if(hole_unassigned){betterShapeHoles[sIdx].push(ho)}}}if(toChange>0&&ambiguous===false){newShapeHoles=betterShapeHoles}}let tmpHoles;for(let i=0,il=newShapes.length;i<il;i++){tmpShape=newShapes[i].s;shapes.push(tmpShape);tmpHoles=newShapeHoles[i];for(let j=0,jl=tmpHoles.length;j<jl;j++){tmpShape.holes.push(tmpHoles[j].h)}}return shapes}}class Controls extends EventDispatcher{constructor(object,domElement=null){super();this.object=object;this.domElement=domElement;this.enabled=true;this.state=-1;this.keys={};this.mouseButtons={LEFT:null,MIDDLE:null,RIGHT:null};this.touches={ONE:null,TWO:null}}connect(element){if(element===undefined){warn("Controls: connect() now requires an element.");return}if(this.domElement!==null)this.disconnect();this.domElement=element}disconnect(){}dispose(){}update(){}}function contain(texture,aspect){const imageAspect=texture.image&&texture.image.width?texture.image.width/texture.image.height:1;if(imageAspect>aspect){texture.repeat.x=1;texture.repeat.y=imageAspect/aspect;texture.offset.x=0;texture.offset.y=(1-texture.repeat.y)/2}else{texture.repeat.x=aspect/imageAspect;texture.repeat.y=1;texture.offset.x=(1-texture.repeat.x)/2;texture.offset.y=0}return texture}function cover(texture,aspect){const imageAspect=texture.image&&texture.image.width?texture.image.width/texture.image.height:1;if(imageAspect>aspect){texture.repeat.x=aspect/imageAspect;texture.repeat.y=1;texture.offset.x=(1-texture.repeat.x)/2;texture.offset.y=0}else{texture.repeat.x=1;texture.repeat.y=imageAspect/aspect;texture.offset.x=0;texture.offset.y=(1-texture.repeat.y)/2}return texture}function fill(texture){texture.repeat.x=1;texture.repeat.y=1;texture.offset.x=0;texture.offset.y=0;return texture}function getByteLength(width,height,format,type){const typeByteLength=getTextureTypeByteLength(type);switch(format){case AlphaFormat:return width*height;case RedFormat:return width*height/typeByteLength.components*typeByteLength.byteLength;case RedIntegerFormat:return width*height/typeByteLength.components*typeByteLength.byteLength;case RGFormat:return width*height*2/typeByteLength.components*typeByteLength.byteLength;case RGIntegerFormat:return width*height*2/typeByteLength.components*typeByteLength.byteLength;case RGBFormat:return width*height*3/typeByteLength.components*typeByteLength.byteLength;case RGBAFormat:return width*height*4/typeByteLength.components*typeByteLength.byteLength;case RGBAIntegerFormat:return width*height*4/typeByteLength.components*typeByteLength.byteLength;case RGB_S3TC_DXT1_Format:case RGBA_S3TC_DXT1_Format:return Math.floor((width+3)/4)*Math.floor((height+3)/4)*8;case RGBA_S3TC_DXT3_Format:case RGBA_S3TC_DXT5_Format:return Math.floor((width+3)/4)*Math.floor((height+3)/4)*16;case RGB_PVRTC_2BPPV1_Format:case RGBA_PVRTC_2BPPV1_Format:return Math.max(width,16)*Math.max(height,8)/4;case RGB_PVRTC_4BPPV1_Format:case RGBA_PVRTC_4BPPV1_Format:return Math.max(width,8)*Math.max(height,8)/2;case RGB_ETC1_Format:case RGB_ETC2_Format:case R11_EAC_Format:case SIGNED_R11_EAC_Format:return Math.floor((width+3)/4)*Math.floor((height+3)/4)*8;case RGBA_ETC2_EAC_Format:case RG11_EAC_Format:case SIGNED_RG11_EAC_Format:return Math.floor((width+3)/4)*Math.floor((height+3)/4)*16;case RGBA_ASTC_4x4_Format:return Math.floor((width+3)/4)*Math.floor((height+3)/4)*16;case RGBA_ASTC_5x4_Format:return Math.floor((width+4)/5)*Math.floor((height+3)/4)*16;case RGBA_ASTC_5x5_Format:return Math.floor((width+4)/5)*Math.floor((height+4)/5)*16;case RGBA_ASTC_6x5_Format:return Math.floor((width+5)/6)*Math.floor((height+4)/5)*16;case RGBA_ASTC_6x6_Format:return Math.floor((width+5)/6)*Math.floor((height+5)/6)*16;case RGBA_ASTC_8x5_Format:return Math.floor((width+7)/8)*Math.floor((height+4)/5)*16;case RGBA_ASTC_8x6_Format:return Math.floor((width+7)/8)*Math.floor((height+5)/6)*16;case RGBA_ASTC_8x8_Format:return Math.floor((width+7)/8)*Math.floor((height+7)/8)*16;case RGBA_ASTC_10x5_Format:return Math.floor((width+9)/10)*Math.floor((height+4)/5)*16;case RGBA_ASTC_10x6_Format:return Math.floor((width+9)/10)*Math.floor((height+5)/6)*16;case RGBA_ASTC_10x8_Format:return Math.floor((width+9)/10)*Math.floor((height+7)/8)*16;case RGBA_ASTC_10x10_Format:return Math.floor((width+9)/10)*Math.floor((height+9)/10)*16;case RGBA_ASTC_12x10_Format:return Math.floor((width+11)/12)*Math.floor((height+9)/10)*16;case RGBA_ASTC_12x12_Format:return Math.floor((width+11)/12)*Math.floor((height+11)/12)*16;case RGBA_BPTC_Format:case RGB_BPTC_SIGNED_Format:case RGB_BPTC_UNSIGNED_Format:return Math.ceil(width/4)*Math.ceil(height/4)*16;case RED_RGTC1_Format:case SIGNED_RED_RGTC1_Format:return Math.ceil(width/4)*Math.ceil(height/4)*8;case RED_GREEN_RGTC2_Format:case SIGNED_RED_GREEN_RGTC2_Format:return Math.ceil(width/4)*Math.ceil(height/4)*16;}throw new Error(`Unable to determine texture byte length for ${format} format.`)}function getTextureTypeByteLength(type){switch(type){case UnsignedByteType:case ByteType:return{byteLength:1,components:1};case UnsignedShortType:case ShortType:case HalfFloatType:return{byteLength:2,components:1};case UnsignedShort4444Type:case UnsignedShort5551Type:return{byteLength:2,components:4};case UnsignedIntType:case IntType:case FloatType:return{byteLength:4,components:1};case UnsignedInt5999Type:case UnsignedInt101111Type:return{byteLength:4,components:3};}throw new Error(`Unknown texture type ${type}.`)}class TextureUtils{static contain(texture,aspect){return contain(texture,aspect)}static cover(texture,aspect){return cover(texture,aspect)}static fill(texture){return fill(texture)}static getByteLength(width,height,format,type){return getByteLength(width,height,format,type)}}if(typeof __THREE_DEVTOOLS__!=="undefined"){__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:REVISION}}))}if(typeof window!=="undefined"){if(window.__THREE__){warn("WARNING: Multiple instances of Three.js being imported.")}else{window.__THREE__=REVISION}}function WebGLAnimation(){let context=null;let isAnimating=false;let animationLoop=null;let requestId=null;function onAnimationFrame(time,frame){animationLoop(time,frame);requestId=context.requestAnimationFrame(onAnimationFrame)}return{start:function(){if(isAnimating===true)return;if(animationLoop===null)return;requestId=context.requestAnimationFrame(onAnimationFrame);isAnimating=true},stop:function(){context.cancelAnimationFrame(requestId);isAnimating=false},setAnimationLoop:function(callback){animationLoop=callback},setContext:function(value){context=value}}}function WebGLAttributes(gl){const buffers=new WeakMap;function createBuffer(attribute,bufferType){const array=attribute.array;const usage=attribute.usage;const size=array.byteLength;const buffer=gl.createBuffer();gl.bindBuffer(bufferType,buffer);gl.bufferData(bufferType,array,usage);attribute.onUploadCallback();let type;if(array instanceof Float32Array){type=gl.FLOAT}else if(typeof Float16Array!=="undefined"&&array instanceof Float16Array){type=gl.HALF_FLOAT}else if(array instanceof Uint16Array){if(attribute.isFloat16BufferAttribute){type=gl.HALF_FLOAT}else{type=gl.UNSIGNED_SHORT}}else if(array instanceof Int16Array){type=gl.SHORT}else if(array instanceof Uint32Array){type=gl.UNSIGNED_INT}else if(array instanceof Int32Array){type=gl.INT}else if(array instanceof Int8Array){type=gl.BYTE}else if(array instanceof Uint8Array){type=gl.UNSIGNED_BYTE}else if(array instanceof Uint8ClampedArray){type=gl.UNSIGNED_BYTE}else{throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+array)}return{buffer:buffer,type:type,bytesPerElement:array.BYTES_PER_ELEMENT,version:attribute.version,size:size}}function updateBuffer(buffer,attribute,bufferType){const array=attribute.array;const updateRanges=attribute.updateRanges;gl.bindBuffer(bufferType,buffer);if(updateRanges.length===0){gl.bufferSubData(bufferType,0,array)}else{updateRanges.sort((a,b)=>a.start-b.start);let mergeIndex=0;for(let i=1;i<updateRanges.length;i++){const previousRange=updateRanges[mergeIndex];const range=updateRanges[i];if(range.start<=previousRange.start+previousRange.count+1){previousRange.count=Math.max(previousRange.count,range.start+range.count-previousRange.start)}else{++mergeIndex;updateRanges[mergeIndex]=range}}updateRanges.length=mergeIndex+1;for(let i=0,l=updateRanges.length;i<l;i++){const range=updateRanges[i];gl.bufferSubData(bufferType,range.start*array.BYTES_PER_ELEMENT,array,range.start,range.count)}attribute.clearUpdateRanges()}attribute.onUploadCallback()}function get(attribute){if(attribute.isInterleavedBufferAttribute)attribute=attribute.data;return buffers.get(attribute)}function remove(attribute){if(attribute.isInterleavedBufferAttribute)attribute=attribute.data;const data=buffers.get(attribute);if(data){gl.deleteBuffer(data.buffer);buffers.delete(attribute)}}function update(attribute,bufferType){if(attribute.isInterleavedBufferAttribute)attribute=attribute.data;if(attribute.isGLBufferAttribute){const cached=buffers.get(attribute);if(!cached||cached.version<attribute.version){buffers.set(attribute,{buffer:attribute.buffer,type:attribute.type,bytesPerElement:attribute.elementSize,version:attribute.version})}return}const data=buffers.get(attribute);if(data===undefined){buffers.set(attribute,createBuffer(attribute,bufferType))}else if(data.version<attribute.version){if(data.size!==attribute.array.byteLength){throw new Error("THREE.WebGLAttributes: The size of the buffer attribute's array buffer does not match the original size. Resizing buffer attributes is not supported.")}updateBuffer(data.buffer,attribute,bufferType);data.version=attribute.version}}return{get:get,remove:remove,update:update}}var alphahash_fragment="#ifdef USE_ALPHAHASH\n\tif ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;\n#endif";var alphahash_pars_fragment="#ifdef USE_ALPHAHASH\n\tconst float ALPHA_HASH_SCALE = 0.05;\n\tfloat hash2D( vec2 value ) {\n\t\treturn fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );\n\t}\n\tfloat hash3D( vec3 value ) {\n\t\treturn hash2D( vec2( hash2D( value.xy ), value.z ) );\n\t}\n\tfloat getAlphaHashThreshold( vec3 position ) {\n\t\tfloat maxDeriv = max(\n\t\t\tlength( dFdx( position.xyz ) ),\n\t\t\tlength( dFdy( position.xyz ) )\n\t\t);\n\t\tfloat pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );\n\t\tvec2 pixScales = vec2(\n\t\t\texp2( floor( log2( pixScale ) ) ),\n\t\t\texp2( ceil( log2( pixScale ) ) )\n\t\t);\n\t\tvec2 alpha = vec2(\n\t\t\thash3D( floor( pixScales.x * position.xyz ) ),\n\t\t\thash3D( floor( pixScales.y * position.xyz ) )\n\t\t);\n\t\tfloat lerpFactor = fract( log2( pixScale ) );\n\t\tfloat x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;\n\t\tfloat a = min( lerpFactor, 1.0 - lerpFactor );\n\t\tvec3 cases = vec3(\n\t\t\tx * x / ( 2.0 * a * ( 1.0 - a ) ),\n\t\t\t( x - 0.5 * a ) / ( 1.0 - a ),\n\t\t\t1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )\n\t\t);\n\t\tfloat threshold = ( x < ( 1.0 - a ) )\n\t\t\t? ( ( x < a ) ? cases.x : cases.y )\n\t\t\t: cases.z;\n\t\treturn clamp( threshold , 1.0e-6, 1.0 );\n\t}\n#endif";var alphamap_fragment="#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;\n#endif";var alphamap_pars_fragment="#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif";var alphatest_fragment="#ifdef USE_ALPHATEST\n\t#ifdef ALPHA_TO_COVERAGE\n\tdiffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );\n\tif ( diffuseColor.a == 0.0 ) discard;\n\t#else\n\tif ( diffuseColor.a < alphaTest ) discard;\n\t#endif\n#endif";var alphatest_pars_fragment="#ifdef USE_ALPHATEST\n\tuniform float alphaTest;\n#endif";var aomap_fragment="#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_CLEARCOAT ) \n\t\tclearcoatSpecularIndirect *= ambientOcclusion;\n\t#endif\n\t#if defined( USE_SHEEN ) \n\t\tsheenSpecularIndirect *= ambientOcclusion;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometryNormal, geometryViewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n\t#endif\n#endif";var aomap_pars_fragment="#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif";var batching_pars_vertex="#ifdef USE_BATCHING\n\t#if ! defined( GL_ANGLE_multi_draw )\n\t#define gl_DrawID _gl_DrawID\n\tuniform int _gl_DrawID;\n\t#endif\n\tuniform highp sampler2D batchingTexture;\n\tuniform highp usampler2D batchingIdTexture;\n\tmat4 getBatchingMatrix( const in float i ) {\n\t\tint size = textureSize( batchingTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n\tfloat getIndirectIndex( const in int i ) {\n\t\tint size = textureSize( batchingIdTexture, 0 ).x;\n\t\tint x = i % size;\n\t\tint y = i / size;\n\t\treturn float( texelFetch( batchingIdTexture, ivec2( x, y ), 0 ).r );\n\t}\n#endif\n#ifdef USE_BATCHING_COLOR\n\tuniform sampler2D batchingColorTexture;\n\tvec3 getBatchingColor( const in float i ) {\n\t\tint size = textureSize( batchingColorTexture, 0 ).x;\n\t\tint j = int( i );\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\treturn texelFetch( batchingColorTexture, ivec2( x, y ), 0 ).rgb;\n\t}\n#endif";var batching_vertex="#ifdef USE_BATCHING\n\tmat4 batchingMatrix = getBatchingMatrix( getIndirectIndex( gl_DrawID ) );\n#endif";var begin_vertex="vec3 transformed = vec3( position );\n#ifdef USE_ALPHAHASH\n\tvPosition = vec3( position );\n#endif";var beginnormal_vertex="vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif";var bsdfs="float G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n} // validated";var iridescence_fragment="#ifdef USE_IRIDESCENCE\n\tconst mat3 XYZ_TO_REC709 = mat3(\n\t\t 3.2404542, -0.9692660,  0.0556434,\n\t\t-1.5371385,  1.8760108, -0.2040259,\n\t\t-0.4985314,  0.0415560,  1.0572252\n\t);\n\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\n\t\tvec3 sqrtF0 = sqrt( fresnel0 );\n\t\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n\t}\n\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n\t}\n\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n\t}\n\tvec3 evalSensitivity( float OPD, vec3 shift ) {\n\t\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\n\t\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n\t\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n\t\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n\t\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n\t\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\n\t\txyz /= 1.0685e-7;\n\t\tvec3 rgb = XYZ_TO_REC709 * xyz;\n\t\treturn rgb;\n\t}\n\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n\t\tvec3 I;\n\t\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n\t\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n\t\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\n\t\tif ( cosTheta2Sq < 0.0 ) {\n\t\t\treturn vec3( 1.0 );\n\t\t}\n\t\tfloat cosTheta2 = sqrt( cosTheta2Sq );\n\t\tfloat R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\n\t\tfloat R12 = F_Schlick( R0, 1.0, cosTheta1 );\n\t\tfloat T121 = 1.0 - R12;\n\t\tfloat phi12 = 0.0;\n\t\tif ( iridescenceIOR < outsideIOR ) phi12 = PI;\n\t\tfloat phi21 = PI - phi12;\n\t\tvec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );\t\tvec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\n\t\tvec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n\t\tvec3 phi23 = vec3( 0.0 );\n\t\tif ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\n\t\tif ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\n\t\tif ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\n\t\tfloat OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n\t\tvec3 phi = vec3( phi21 ) + phi23;\n\t\tvec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n\t\tvec3 r123 = sqrt( R123 );\n\t\tvec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n\t\tvec3 C0 = R12 + Rs;\n\t\tI = C0;\n\t\tvec3 Cm = Rs - T121;\n\t\tfor ( int m = 1; m <= 2; ++ m ) {\n\t\t\tCm *= r123;\n\t\t\tvec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n\t\t\tI += Cm * Sm;\n\t\t}\n\t\treturn max( I, vec3( 0.0 ) );\n\t}\n#endif";var bumpmap_pars_fragment="#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vBumpMapUv );\n\t\tvec2 dSTdy = dFdy( vBumpMapUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );\n\t\tvec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif";var clipping_planes_fragment="#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#ifdef ALPHA_TO_COVERAGE\n\t\tfloat distanceToPlane, distanceGradient;\n\t\tfloat clipOpacity = 1.0;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\tclipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\tif ( clipOpacity == 0.0 ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\t\tfloat unionClipOpacity = 1.0;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\t\tunionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tclipOpacity *= 1.0 - unionClipOpacity;\n\t\t#endif\n\t\tdiffuseColor.a *= clipOpacity;\n\t\tif ( diffuseColor.a == 0.0 ) discard;\n\t#else\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\t\tbool clipped = true;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tif ( clipped ) discard;\n\t\t#endif\n\t#endif\n#endif";var clipping_planes_pars_fragment="#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif";var clipping_planes_pars_vertex="#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif";var clipping_planes_vertex="#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif";var color_fragment="#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif";var color_pars_fragment="#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif";var color_pars_vertex="#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n\tvarying vec3 vColor;\n#endif";var color_vertex="#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif\n#ifdef USE_BATCHING_COLOR\n\tvec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );\n\tvColor.xyz *= batchingColor.xyz;\n#endif";var common="#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n\tvarying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated";var cube_uv_reflection_fragment="#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif";var defaultnormal_vertex="vec3 transformedNormal = objectNormal;\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = objectTangent;\n#endif\n#ifdef USE_BATCHING\n\tmat3 bm = mat3( batchingMatrix );\n\ttransformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );\n\ttransformedNormal = bm * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = bm * transformedTangent;\n\t#endif\n#endif\n#ifdef USE_INSTANCING\n\tmat3 im = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );\n\ttransformedNormal = im * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = im * transformedTangent;\n\t#endif\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\ttransformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif";var displacementmap_pars_vertex="#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif";var displacementmap_vertex="#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif";var emissivemap_fragment="#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\t#ifdef DECODE_VIDEO_TEXTURE_EMISSIVE\n\t\temissiveColor = sRGBTransferEOTF( emissiveColor );\n\t#endif\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif";var emissivemap_pars_fragment="#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif";var colorspace_fragment="gl_FragColor = linearToOutputTexel( gl_FragColor );";var colorspace_pars_fragment="vec4 LinearTransferOETF( in vec4 value ) {\n\treturn value;\n}\nvec4 sRGBTransferEOTF( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}";var envmap_fragment="#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif";var envmap_common_pars_fragment="#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform mat3 envMapRotation;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n#endif";var envmap_pars_fragment="#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif";var envmap_pars_vertex="#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif";var envmap_vertex="#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif";var fog_vertex="#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif";var fog_pars_vertex="#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif";var fog_fragment="#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif";var fog_pars_fragment="#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif";var gradientmap_pars_fragment="#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}";var lightmap_pars_fragment="#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif";var lights_lambert_fragment="LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;";var lights_lambert_pars_fragment="varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert";var lights_pars_begin="uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n\tuniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif ( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif";var envmap_physical_pars_fragment="#ifdef USE_ENVMAP\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, pow4( roughness ) ) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\t#ifdef USE_ANISOTROPY\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\t\t\t#else\n\t\t\t\treturn vec3( 0.0 );\n\t\t\t#endif\n\t\t}\n\t#endif\n#endif";var lights_toon_fragment="ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;";var lights_toon_pars_fragment="varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon";var lights_phong_fragment="BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;";var lights_phong_pars_fragment="varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong";var lights_physical_fragment="PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.diffuseContribution = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nmaterial.metalness = metalnessFactor;\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor;\n\tmaterial.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = vec3( 0.04 );\n\tmaterial.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_DISPERSION\n\tmaterial.dispersion = dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.0001, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\t#ifdef USE_ANISOTROPYMAP\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\t#else\n\t\tvec2 anisotropyV = anisotropyVector;\n\t#endif\n\tmaterial.anisotropy = length( anisotropyV );\n\tif( material.anisotropy == 0.0 ) {\n\t\tanisotropyV = vec2( 1.0, 0.0 );\n\t} else {\n\t\tanisotropyV /= material.anisotropy;\n\t\tmaterial.anisotropy = saturate( material.anisotropy );\n\t}\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;\n#endif";var lights_physical_pars_fragment="uniform sampler2D dfgLUT;\nstruct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tvec3 diffuseContribution;\n\tvec3 specularColor;\n\tvec3 specularColorBlended;\n\tfloat roughness;\n\tfloat metalness;\n\tfloat specularF90;\n\tfloat dispersion;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t\tvec3 iridescenceFresnelDielectric;\n\t\tvec3 iridescenceFresnelMetallic;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n    float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n    float x2 = x * x;\n    float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n    return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n\tfloat V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\tfloat v = 0.5 / ( gv + gl );\n\t\treturn v;\n\t}\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\t}\n#endif\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColorBlended;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\t#else\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t#endif\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transpose( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat rInv = 1.0 / ( roughness + 0.1 );\n\tfloat a = -1.9362 + 1.0678 * roughness + 0.4573 * r2 - 0.8469 * rInv;\n\tfloat b = -0.6014 + 0.5538 * roughness - 0.4670 * r2 - 0.1255 * rInv;\n\tfloat DG = exp( a * dotNV + b );\n\treturn saturate( DG );\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg;\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg;\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\nvec3 BRDF_GGX_Multiscatter( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 singleScatter = BRDF_GGX( lightDir, viewDir, normal, material );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 dfgV = texture2D( dfgLUT, vec2( material.roughness, dotNV ) ).rg;\n\tvec2 dfgL = texture2D( dfgLUT, vec2( material.roughness, dotNL ) ).rg;\n\tvec3 FssEss_V = material.specularColorBlended * dfgV.x + material.specularF90 * dfgV.y;\n\tvec3 FssEss_L = material.specularColorBlended * dfgL.x + material.specularF90 * dfgL.y;\n\tfloat Ess_V = dfgV.x + dfgV.y;\n\tfloat Ess_L = dfgL.x + dfgL.y;\n\tfloat Ems_V = 1.0 - Ess_V;\n\tfloat Ems_L = 1.0 - Ess_L;\n\tvec3 Favg = material.specularColorBlended + ( 1.0 - material.specularColorBlended ) * 0.047619;\n\tvec3 Fms = FssEss_V * FssEss_L * Favg / ( 1.0 - Ems_V * Ems_L * Favg + EPSILON );\n\tfloat compensationFactor = Ems_V * Ems_L;\n\tvec3 multiScatter = Fms * compensationFactor;\n\treturn singleScatter + multiScatter;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometryNormal;\n\t\tvec3 viewDir = geometryViewDir;\n\t\tvec3 position = geometryPosition;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3(    0, 1,    0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColorBlended * t2.x + ( vec3( 1.0 ) - material.specularColorBlended ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseContribution * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n \n \t\tsheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n \n \t\tfloat sheenAlbedoV = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n \t\tfloat sheenAlbedoL = IBLSheenBRDF( geometryNormal, directLight.direction, material.sheenRoughness );\n \n \t\tfloat sheenEnergyComp = 1.0 - max3( material.sheenColor ) * max( sheenAlbedoV, sheenAlbedoL );\n \n \t\tirradiance *= sheenEnergyComp;\n \n \t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX_Multiscatter( directLight.direction, geometryViewDir, geometryNormal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseContribution );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 diffuse = irradiance * BRDF_Lambert( material.diffuseContribution );\n\t#ifdef USE_SHEEN\n\t\tfloat sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\t\tfloat sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo;\n\t\tdiffuse *= sheenEnergyComp;\n\t#endif\n\treflectedLight.indirectDiffuse += diffuse;\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ) * RECIPROCAL_PI;\n \t#endif\n\tvec3 singleScatteringDielectric = vec3( 0.0 );\n\tvec3 multiScatteringDielectric = vec3( 0.0 );\n\tvec3 singleScatteringMetallic = vec3( 0.0 );\n\tvec3 multiScatteringMetallic = vec3( 0.0 );\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnelDielectric, material.roughness, singleScatteringDielectric, multiScatteringDielectric );\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.diffuseColor, material.specularF90, material.iridescence, material.iridescenceFresnelMetallic, material.roughness, singleScatteringMetallic, multiScatteringMetallic );\n\t#else\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScatteringDielectric, multiScatteringDielectric );\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.diffuseColor, material.specularF90, material.roughness, singleScatteringMetallic, multiScatteringMetallic );\n\t#endif\n\tvec3 singleScattering = mix( singleScatteringDielectric, singleScatteringMetallic, material.metalness );\n\tvec3 multiScattering = mix( multiScatteringDielectric, multiScatteringMetallic, material.metalness );\n\tvec3 totalScatteringDielectric = singleScatteringDielectric + multiScatteringDielectric;\n\tvec3 diffuse = material.diffuseContribution * ( 1.0 - totalScatteringDielectric );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tvec3 indirectSpecular = radiance * singleScattering;\n\tindirectSpecular += multiScattering * cosineWeightedIrradiance;\n\tvec3 indirectDiffuse = diffuse * cosineWeightedIrradiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\t\tfloat sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo;\n\t\tindirectSpecular *= sheenEnergyComp;\n\t\tindirectDiffuse *= sheenEnergyComp;\n\t#endif\n\treflectedLight.indirectSpecular += indirectSpecular;\n\treflectedLight.indirectDiffuse += indirectDiffuse;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}";var lights_fragment_begin="\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n\tgeometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometryViewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnelDielectric = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceFresnelMetallic = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.diffuseColor );\n\t\tmaterial.iridescenceFresnel = mix( material.iridescenceFresnelDielectric, material.iridescenceFresnelMetallic, material.metalness );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometryPosition, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometryPosition, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if defined( USE_LIGHT_PROBES )\n\t\tirradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif";var lights_fragment_maps="#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometryNormal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\t#ifdef USE_ANISOTROPY\n\t\tradiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n\t#else\n\t\tradiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif";var lights_fragment_end="#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif";var logdepthbuf_fragment="#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )\n\tgl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif";var logdepthbuf_pars_fragment="#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif";var logdepthbuf_pars_vertex="#ifdef USE_LOGARITHMIC_DEPTH_BUFFER\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif";var logdepthbuf_vertex="#ifdef USE_LOGARITHMIC_DEPTH_BUFFER\n\tvFragDepth = 1.0 + gl_Position.w;\n\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n#endif";var map_fragment="#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vMapUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor );\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif";var map_pars_fragment="#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif";var map_particle_fragment="#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif";var map_particle_pars_fragment="#if defined( USE_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif";var metalnessmap_fragment="float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif";var metalnessmap_pars_fragment="#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif";var morphinstance_vertex="#ifdef USE_INSTANCING_MORPH\n\tfloat morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\tfloat morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tmorphTargetInfluences[i] =  texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;\n\t}\n#endif";var morphcolor_vertex="#if defined( USE_MORPHCOLORS )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif";var morphnormal_vertex="#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif";var morphtarget_pars_vertex="#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t#endif\n\tuniform sampler2DArray morphTargetsTexture;\n\tuniform ivec2 morphTargetsTextureSize;\n\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t}\n#endif";var morphtarget_vertex="#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif";var normal_fragment_begin="float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal *= faceDirection;\n\t#endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 nonPerturbedNormal = normal;";var normal_fragment_maps="#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif";var normal_pars_fragment="#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif";var normal_pars_vertex="#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif";var normal_vertex="#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif";var normalmap_pars_fragment="#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif";var clearcoat_normal_fragment_begin="#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = nonPerturbedNormal;\n#endif";var clearcoat_normal_fragment_maps="#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif";var clearcoat_pars_fragment="#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif";var iridescence_pars_fragment="#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif";var opaque_fragment="#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );";var packing="vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\nvec4 packDepthToRGBA( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec4( 0., 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec4( 1., 1., 1., 1. );\n\tfloat vuf;\n\tfloat af = modf( v * PackFactors.a, vuf );\n\tfloat bf = modf( vuf * ShiftRight8, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\nvec3 packDepthToRGB( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec3( 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec3( 1., 1., 1. );\n\tfloat vuf;\n\tfloat bf = modf( v * PackFactors.b, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\nvec2 packDepthToRG( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec2( 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec2( 1., 1. );\n\tfloat vuf;\n\tfloat gf = modf( v * 256., vuf );\n\treturn vec2( vuf * Inv255, gf );\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors4 );\n}\nfloat unpackRGBToDepth( const in vec3 v ) {\n\treturn dot( v, UnpackFactors3 );\n}\nfloat unpackRGToDepth( const in vec2 v ) {\n\treturn v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\nvec4 pack2HalfToRGBA( const in vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( const in vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\n}";var premultiplied_alpha_fragment="#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif";var project_vertex="vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_BATCHING\n\tmvPosition = batchingMatrix * mvPosition;\n#endif\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;";var dithering_fragment="#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif";var dithering_pars_fragment="#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif";var roughnessmap_fragment="float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\troughnessFactor *= texelRoughness.g;\n#endif";var roughnessmap_pars_fragment="#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif";var shadowmap_pars_fragment="#if NUM_SPOT_LIGHT_COORDS > 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tuniform sampler2DShadow directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\t#else\n\t\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\t#endif\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tuniform sampler2DShadow spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\t#else\n\t\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\t#endif\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tuniform samplerCubeShadow pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\t#elif defined( SHADOWMAP_TYPE_BASIC )\n\t\t\tuniform samplerCube pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\t#endif\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\tfloat interleavedGradientNoise( vec2 position ) {\n\t\t\treturn fract( 52.9829189 * fract( dot( position, vec2( 0.06711056, 0.00583715 ) ) ) );\n\t\t}\n\t\tvec2 vogelDiskSample( int sampleIndex, int samplesCount, float phi ) {\n\t\t\tconst float goldenAngle = 2.399963229728653;\n\t\t\tfloat r = sqrt( ( float( sampleIndex ) + 0.5 ) / float( samplesCount ) );\n\t\t\tfloat theta = float( sampleIndex ) * goldenAngle + phi;\n\t\t\treturn vec2( cos( theta ), sin( theta ) ) * r;\n\t\t}\n\t#endif\n\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\tfloat getShadow( sampler2DShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\t\tfloat shadow = 1.0;\n\t\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\t\tshadowCoord.z += shadowBias;\n\t\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\t\tif ( frustumTest ) {\n\t\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\t\tfloat radius = shadowRadius * texelSize.x;\n\t\t\t\tfloat phi = interleavedGradientNoise( gl_FragCoord.xy ) * 6.28318530718;\n\t\t\t\tshadow = (\n\t\t\t\t\ttexture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 0, 5, phi ) * radius, shadowCoord.z ) ) +\n\t\t\t\t\ttexture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 1, 5, phi ) * radius, shadowCoord.z ) ) +\n\t\t\t\t\ttexture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 2, 5, phi ) * radius, shadowCoord.z ) ) +\n\t\t\t\t\ttexture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 3, 5, phi ) * radius, shadowCoord.z ) ) +\n\t\t\t\t\ttexture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 4, 5, phi ) * radius, shadowCoord.z ) )\n\t\t\t\t) * 0.2;\n\t\t\t}\n\t\t\treturn mix( 1.0, shadow, shadowIntensity );\n\t\t}\n\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\t\tfloat shadow = 1.0;\n\t\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\t\tshadowCoord.z += shadowBias;\n\t\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\t\tif ( frustumTest ) {\n\t\t\t\tvec2 distribution = texture2D( shadowMap, shadowCoord.xy ).rg;\n\t\t\t\tfloat mean = distribution.x;\n\t\t\t\tfloat variance = distribution.y * distribution.y;\n\t\t\t\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\t\t\t\t\tfloat hard_shadow = step( mean, shadowCoord.z );\n\t\t\t\t#else\n\t\t\t\t\tfloat hard_shadow = step( shadowCoord.z, mean );\n\t\t\t\t#endif\n\t\t\t\tif ( hard_shadow == 1.0 ) {\n\t\t\t\t\tshadow = 1.0;\n\t\t\t\t} else {\n\t\t\t\t\tvariance = max( variance, 0.0000001 );\n\t\t\t\t\tfloat d = shadowCoord.z - mean;\n\t\t\t\t\tfloat p_max = variance / ( variance + d * d );\n\t\t\t\t\tp_max = clamp( ( p_max - 0.3 ) / 0.65, 0.0, 1.0 );\n\t\t\t\t\tshadow = max( hard_shadow, p_max );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn mix( 1.0, shadow, shadowIntensity );\n\t\t}\n\t#else\n\t\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\t\tfloat shadow = 1.0;\n\t\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\t\tshadowCoord.z += shadowBias;\n\t\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\t\tif ( frustumTest ) {\n\t\t\t\tfloat depth = texture2D( shadowMap, shadowCoord.xy ).r;\n\t\t\t\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\t\t\t\t\tshadow = step( depth, shadowCoord.z );\n\t\t\t\t#else\n\t\t\t\t\tshadow = step( shadowCoord.z, depth );\n\t\t\t\t#endif\n\t\t\t}\n\t\t\treturn mix( 1.0, shadow, shadowIntensity );\n\t\t}\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#if defined( SHADOWMAP_TYPE_PCF )\n\tfloat getPointShadow( samplerCubeShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tfloat shadow = 1.0;\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\tvec3 absVec = abs( lightToPosition );\n\t\tfloat viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z );\n\t\tif ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) {\n\t\t\tfloat dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) );\n\t\t\tdp += shadowBias;\n\t\t\tfloat texelSize = shadowRadius / shadowMapSize.x;\n\t\t\tvec3 absDir = abs( bd3D );\n\t\t\tvec3 tangent = absDir.x > absDir.z ? vec3( 0.0, 1.0, 0.0 ) : vec3( 1.0, 0.0, 0.0 );\n\t\t\ttangent = normalize( cross( bd3D, tangent ) );\n\t\t\tvec3 bitangent = cross( bd3D, tangent );\n\t\t\tfloat phi = interleavedGradientNoise( gl_FragCoord.xy ) * 6.28318530718;\n\t\t\tshadow = (\n\t\t\t\ttexture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 0, 5, phi ).x + bitangent * vogelDiskSample( 0, 5, phi ).y ) * texelSize, dp ) ) +\n\t\t\t\ttexture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 1, 5, phi ).x + bitangent * vogelDiskSample( 1, 5, phi ).y ) * texelSize, dp ) ) +\n\t\t\t\ttexture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 2, 5, phi ).x + bitangent * vogelDiskSample( 2, 5, phi ).y ) * texelSize, dp ) ) +\n\t\t\t\ttexture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 3, 5, phi ).x + bitangent * vogelDiskSample( 3, 5, phi ).y ) * texelSize, dp ) ) +\n\t\t\t\ttexture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 4, 5, phi ).x + bitangent * vogelDiskSample( 4, 5, phi ).y ) * texelSize, dp ) )\n\t\t\t) * 0.2;\n\t\t}\n\t\treturn mix( 1.0, shadow, shadowIntensity );\n\t}\n\t#elif defined( SHADOWMAP_TYPE_BASIC )\n\tfloat getPointShadow( samplerCube shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tfloat shadow = 1.0;\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\tvec3 absVec = abs( lightToPosition );\n\t\tfloat viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z );\n\t\tif ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) {\n\t\t\tfloat dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) );\n\t\t\tdp += shadowBias;\n\t\t\tfloat depth = textureCube( shadowMap, bd3D ).r;\n\t\t\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\t\t\t\tshadow = step( depth, dp );\n\t\t\t#else\n\t\t\t\tshadow = step( dp, depth );\n\t\t\t#endif\n\t\t}\n\t\treturn mix( 1.0, shadow, shadowIntensity );\n\t}\n\t#endif\n\t#endif\n#endif";var shadowmap_pars_vertex="#if NUM_SPOT_LIGHT_COORDS > 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif";var shadowmap_vertex="#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif";var shadowmask_pars_fragment="float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0 && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) )\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}";var skinbase_vertex="#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif";var skinning_pars_vertex="#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tint size = textureSize( boneTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n#endif";var skinning_vertex="#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif";var skinnormal_vertex="#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif";var specularmap_fragment="float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif";var specularmap_pars_fragment="#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif";var tonemapping_fragment="#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif";var tonemapping_pars_fragment="#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 CineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3(  1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108,  1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605,  1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nconst mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.6605, - 0.1246, - 0.0182 ),\n\tvec3( - 0.5876, 1.1329, - 0.1006 ),\n\tvec3( - 0.0728, - 0.0083, 1.1187 )\n);\nconst mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(\n\tvec3( 0.6274, 0.0691, 0.0164 ),\n\tvec3( 0.3293, 0.9195, 0.0880 ),\n\tvec3( 0.0433, 0.0113, 0.8956 )\n);\nvec3 agxDefaultContrastApprox( vec3 x ) {\n\tvec3 x2 = x * x;\n\tvec3 x4 = x2 * x2;\n\treturn + 15.5 * x4 * x2\n\t\t- 40.14 * x4 * x\n\t\t+ 31.96 * x4\n\t\t- 6.868 * x2 * x\n\t\t+ 0.4298 * x2\n\t\t+ 0.1191 * x\n\t\t- 0.00232;\n}\nvec3 AgXToneMapping( vec3 color ) {\n\tconst mat3 AgXInsetMatrix = mat3(\n\t\tvec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),\n\t\tvec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),\n\t\tvec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )\n\t);\n\tconst mat3 AgXOutsetMatrix = mat3(\n\t\tvec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),\n\t\tvec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),\n\t\tvec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )\n\t);\n\tconst float AgxMinEv = - 12.47393;\tconst float AgxMaxEv = 4.026069;\n\tcolor *= toneMappingExposure;\n\tcolor = LINEAR_SRGB_TO_LINEAR_REC2020 * color;\n\tcolor = AgXInsetMatrix * color;\n\tcolor = max( color, 1e-10 );\tcolor = log2( color );\n\tcolor = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );\n\tcolor = clamp( color, 0.0, 1.0 );\n\tcolor = agxDefaultContrastApprox( color );\n\tcolor = AgXOutsetMatrix * color;\n\tcolor = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );\n\tcolor = LINEAR_REC2020_TO_LINEAR_SRGB * color;\n\tcolor = clamp( color, 0.0, 1.0 );\n\treturn color;\n}\nvec3 NeutralToneMapping( vec3 color ) {\n\tconst float StartCompression = 0.8 - 0.04;\n\tconst float Desaturation = 0.15;\n\tcolor *= toneMappingExposure;\n\tfloat x = min( color.r, min( color.g, color.b ) );\n\tfloat offset = x < 0.08 ? x - 6.25 * x * x : 0.04;\n\tcolor -= offset;\n\tfloat peak = max( color.r, max( color.g, color.b ) );\n\tif ( peak < StartCompression ) return color;\n\tfloat d = 1. - StartCompression;\n\tfloat newPeak = 1. - d * d / ( peak + d - StartCompression );\n\tcolor *= newPeak / peak;\n\tfloat g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. );\n\treturn mix( color, vec3( newPeak ), g );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }";var transmission_fragment="#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmitted = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseContribution, material.specularColorBlended, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif";var transmission_pars_fragment="#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a *  a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn vec3( 1.0 );\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\t\t#ifdef USE_DISPERSION\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\t\t\tfor ( int i = 0; i < 3; i ++ ) {\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\t\t\t}\n\t\t\ttransmittedLight.a /= 3.0;\n\t\t#else\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\t#endif\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\t}\n#endif";var uv_pars_fragment="#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif";var uv_pars_vertex="#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif";var uv_vertex="#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif";var worldpos_vertex="#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_BATCHING\n\t\tworldPosition = batchingMatrix * worldPosition;\n\t#endif\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif";const vertex$h="varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}";const fragment$h="uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}";const vertex$g="varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}";const fragment$g="#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nuniform mat3 backgroundRotation;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}";const vertex$f="varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}";const fragment$f="uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}";const vertex$e="#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#include <morphinstance_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}";const fragment$e="#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <clipping_planes_fragment>\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <logdepthbuf_fragment>\n\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\t\tfloat fragCoordZ = vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ];\n\t#else\n\t\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ] + 0.5;\n\t#endif\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#elif DEPTH_PACKING == 3202\n\t\tgl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n\t#elif DEPTH_PACKING == 3203\n\t\tgl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\n\t#endif\n}";const vertex$d="#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#include <morphinstance_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}";const fragment$d="#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <clipping_planes_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = vec4( dist, 0.0, 0.0, 1.0 );\n}";const vertex$c="varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}";const fragment$c="uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}";const vertex$b="uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}";const fragment$b="uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}";const vertex$a="#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinbase_vertex>\n\t\t#include <skinnormal_vertex>\n\t\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}";const fragment$a="uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";const vertex$9="#define LAMBERT\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}";const fragment$9="#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_lambert_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_lambert_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";const vertex$8="#define MATCAP\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}";const fragment$8="#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";const vertex$7="#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}";const fragment$7="#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include <uv_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( normalize( normal ) * 0.5 + 0.5, diffuseColor.a );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}";const vertex$6="#define PHONG\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}";const fragment$6="#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";const vertex$5="#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}";const fragment$5="#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_DISPERSION\n\tuniform float dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n \n\t\toutgoingLight = outgoingLight + sheenSpecularDirect + sheenSpecularIndirect;\n \n \t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";const vertex$4="#define TOON\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}";const fragment$4="#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";const vertex$3="uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}";const fragment$3="uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}";const vertex$2="#include <common>\n#include <batching_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}";const fragment$2="uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <logdepthbuf_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\t#include <logdepthbuf_fragment>\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n}";const vertex$1="uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix[ 3 ];\n\tvec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}";const fragment$1="uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n}";const ShaderChunk={alphahash_fragment:alphahash_fragment,alphahash_pars_fragment:alphahash_pars_fragment,alphamap_fragment:alphamap_fragment,alphamap_pars_fragment:alphamap_pars_fragment,alphatest_fragment:alphatest_fragment,alphatest_pars_fragment:alphatest_pars_fragment,aomap_fragment:aomap_fragment,aomap_pars_fragment:aomap_pars_fragment,batching_pars_vertex:batching_pars_vertex,batching_vertex:batching_vertex,begin_vertex:begin_vertex,beginnormal_vertex:beginnormal_vertex,bsdfs:bsdfs,iridescence_fragment:iridescence_fragment,bumpmap_pars_fragment:bumpmap_pars_fragment,clipping_planes_fragment:clipping_planes_fragment,clipping_planes_pars_fragment:clipping_planes_pars_fragment,clipping_planes_pars_vertex:clipping_planes_pars_vertex,clipping_planes_vertex:clipping_planes_vertex,color_fragment:color_fragment,color_pars_fragment:color_pars_fragment,color_pars_vertex:color_pars_vertex,color_vertex:color_vertex,common:common,cube_uv_reflection_fragment:cube_uv_reflection_fragment,defaultnormal_vertex:defaultnormal_vertex,displacementmap_pars_vertex:displacementmap_pars_vertex,displacementmap_vertex:displacementmap_vertex,emissivemap_fragment:emissivemap_fragment,emissivemap_pars_fragment:emissivemap_pars_fragment,colorspace_fragment:colorspace_fragment,colorspace_pars_fragment:colorspace_pars_fragment,envmap_fragment:envmap_fragment,envmap_common_pars_fragment:envmap_common_pars_fragment,envmap_pars_fragment:envmap_pars_fragment,envmap_pars_vertex:envmap_pars_vertex,envmap_physical_pars_fragment:envmap_physical_pars_fragment,envmap_vertex:envmap_vertex,fog_vertex:fog_vertex,fog_pars_vertex:fog_pars_vertex,fog_fragment:fog_fragment,fog_pars_fragment:fog_pars_fragment,gradientmap_pars_fragment:gradientmap_pars_fragment,lightmap_pars_fragment:lightmap_pars_fragment,lights_lambert_fragment:lights_lambert_fragment,lights_lambert_pars_fragment:lights_lambert_pars_fragment,lights_pars_begin:lights_pars_begin,lights_toon_fragment:lights_toon_fragment,lights_toon_pars_fragment:lights_toon_pars_fragment,lights_phong_fragment:lights_phong_fragment,lights_phong_pars_fragment:lights_phong_pars_fragment,lights_physical_fragment:lights_physical_fragment,lights_physical_pars_fragment:lights_physical_pars_fragment,lights_fragment_begin:lights_fragment_begin,lights_fragment_maps:lights_fragment_maps,lights_fragment_end:lights_fragment_end,logdepthbuf_fragment:logdepthbuf_fragment,logdepthbuf_pars_fragment:logdepthbuf_pars_fragment,logdepthbuf_pars_vertex:logdepthbuf_pars_vertex,logdepthbuf_vertex:logdepthbuf_vertex,map_fragment:map_fragment,map_pars_fragment:map_pars_fragment,map_particle_fragment:map_particle_fragment,map_particle_pars_fragment:map_particle_pars_fragment,metalnessmap_fragment:metalnessmap_fragment,metalnessmap_pars_fragment:metalnessmap_pars_fragment,morphinstance_vertex:morphinstance_vertex,morphcolor_vertex:morphcolor_vertex,morphnormal_vertex:morphnormal_vertex,morphtarget_pars_vertex:morphtarget_pars_vertex,morphtarget_vertex:morphtarget_vertex,normal_fragment_begin:normal_fragment_begin,normal_fragment_maps:normal_fragment_maps,normal_pars_fragment:normal_pars_fragment,normal_pars_vertex:normal_pars_vertex,normal_vertex:normal_vertex,normalmap_pars_fragment:normalmap_pars_fragment,clearcoat_normal_fragment_begin:clearcoat_normal_fragment_begin,clearcoat_normal_fragment_maps:clearcoat_normal_fragment_maps,clearcoat_pars_fragment:clearcoat_pars_fragment,iridescence_pars_fragment:iridescence_pars_fragment,opaque_fragment:opaque_fragment,packing:packing,premultiplied_alpha_fragment:premultiplied_alpha_fragment,project_vertex:project_vertex,dithering_fragment:dithering_fragment,dithering_pars_fragment:dithering_pars_fragment,roughnessmap_fragment:roughnessmap_fragment,roughnessmap_pars_fragment:roughnessmap_pars_fragment,shadowmap_pars_fragment:shadowmap_pars_fragment,shadowmap_pars_vertex:shadowmap_pars_vertex,shadowmap_vertex:shadowmap_vertex,shadowmask_pars_fragment:shadowmask_pars_fragment,skinbase_vertex:skinbase_vertex,skinning_pars_vertex:skinning_pars_vertex,skinning_vertex:skinning_vertex,skinnormal_vertex:skinnormal_vertex,specularmap_fragment:specularmap_fragment,specularmap_pars_fragment:specularmap_pars_fragment,tonemapping_fragment:tonemapping_fragment,tonemapping_pars_fragment:tonemapping_pars_fragment,transmission_fragment:transmission_fragment,transmission_pars_fragment:transmission_pars_fragment,uv_pars_fragment:uv_pars_fragment,uv_pars_vertex:uv_pars_vertex,uv_vertex:uv_vertex,worldpos_vertex:worldpos_vertex,background_vert:vertex$h,background_frag:fragment$h,backgroundCube_vert:vertex$g,backgroundCube_frag:fragment$g,cube_vert:vertex$f,cube_frag:fragment$f,depth_vert:vertex$e,depth_frag:fragment$e,distance_vert:vertex$d,distance_frag:fragment$d,equirect_vert:vertex$c,equirect_frag:fragment$c,linedashed_vert:vertex$b,linedashed_frag:fragment$b,meshbasic_vert:vertex$a,meshbasic_frag:fragment$a,meshlambert_vert:vertex$9,meshlambert_frag:fragment$9,meshmatcap_vert:vertex$8,meshmatcap_frag:fragment$8,meshnormal_vert:vertex$7,meshnormal_frag:fragment$7,meshphong_vert:vertex$6,meshphong_frag:fragment$6,meshphysical_vert:vertex$5,meshphysical_frag:fragment$5,meshtoon_vert:vertex$4,meshtoon_frag:fragment$4,points_vert:vertex$3,points_frag:fragment$3,shadow_vert:vertex$2,shadow_frag:fragment$2,sprite_vert:vertex$1,sprite_frag:fragment$1};const UniformsLib={common:{diffuse:{value:new Color(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Matrix3},alphaMap:{value:null},alphaMapTransform:{value:new Matrix3},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Matrix3}},envmap:{envMap:{value:null},envMapRotation:{value:new Matrix3},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:0.98},dfgLUT:{value:null}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Matrix3}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Matrix3}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Matrix3},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Matrix3},normalScale:{value:new Vector2(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Matrix3},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Matrix3}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Matrix3}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Matrix3}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:0.00025},fogNear:{value:1},fogFar:{value:2000},fogColor:{value:new Color(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Color(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Matrix3},alphaTest:{value:0},uvTransform:{value:new Matrix3}},sprite:{diffuse:{value:new Color(16777215)},opacity:{value:1},center:{value:new Vector2(0.5,0.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Matrix3},alphaMap:{value:null},alphaMapTransform:{value:new Matrix3},alphaTest:{value:0}}};const ShaderLib={basic:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.specularmap,UniformsLib.envmap,UniformsLib.aomap,UniformsLib.lightmap,UniformsLib.fog]),vertexShader:ShaderChunk.meshbasic_vert,fragmentShader:ShaderChunk.meshbasic_frag},lambert:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.specularmap,UniformsLib.envmap,UniformsLib.aomap,UniformsLib.lightmap,UniformsLib.emissivemap,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,UniformsLib.fog,UniformsLib.lights,{emissive:{value:new Color(0)}}]),vertexShader:ShaderChunk.meshlambert_vert,fragmentShader:ShaderChunk.meshlambert_frag},phong:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.specularmap,UniformsLib.envmap,UniformsLib.aomap,UniformsLib.lightmap,UniformsLib.emissivemap,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,UniformsLib.fog,UniformsLib.lights,{emissive:{value:new Color(0)},specular:{value:new Color(1118481)},shininess:{value:30}}]),vertexShader:ShaderChunk.meshphong_vert,fragmentShader:ShaderChunk.meshphong_frag},standard:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.envmap,UniformsLib.aomap,UniformsLib.lightmap,UniformsLib.emissivemap,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,UniformsLib.roughnessmap,UniformsLib.metalnessmap,UniformsLib.fog,UniformsLib.lights,{emissive:{value:new Color(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:ShaderChunk.meshphysical_vert,fragmentShader:ShaderChunk.meshphysical_frag},toon:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.aomap,UniformsLib.lightmap,UniformsLib.emissivemap,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,UniformsLib.gradientmap,UniformsLib.fog,UniformsLib.lights,{emissive:{value:new Color(0)}}]),vertexShader:ShaderChunk.meshtoon_vert,fragmentShader:ShaderChunk.meshtoon_frag},matcap:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,UniformsLib.fog,{matcap:{value:null}}]),vertexShader:ShaderChunk.meshmatcap_vert,fragmentShader:ShaderChunk.meshmatcap_frag},points:{uniforms:mergeUniforms([UniformsLib.points,UniformsLib.fog]),vertexShader:ShaderChunk.points_vert,fragmentShader:ShaderChunk.points_frag},dashed:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:ShaderChunk.linedashed_vert,fragmentShader:ShaderChunk.linedashed_frag},depth:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.displacementmap]),vertexShader:ShaderChunk.depth_vert,fragmentShader:ShaderChunk.depth_frag},normal:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,{opacity:{value:1}}]),vertexShader:ShaderChunk.meshnormal_vert,fragmentShader:ShaderChunk.meshnormal_frag},sprite:{uniforms:mergeUniforms([UniformsLib.sprite,UniformsLib.fog]),vertexShader:ShaderChunk.sprite_vert,fragmentShader:ShaderChunk.sprite_frag},background:{uniforms:{uvTransform:{value:new Matrix3},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:ShaderChunk.background_vert,fragmentShader:ShaderChunk.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Matrix3}},vertexShader:ShaderChunk.backgroundCube_vert,fragmentShader:ShaderChunk.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:ShaderChunk.cube_vert,fragmentShader:ShaderChunk.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:ShaderChunk.equirect_vert,fragmentShader:ShaderChunk.equirect_frag},distance:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.displacementmap,{referencePosition:{value:new Vector3},nearDistance:{value:1},farDistance:{value:1000}}]),vertexShader:ShaderChunk.distance_vert,fragmentShader:ShaderChunk.distance_frag},shadow:{uniforms:mergeUniforms([UniformsLib.lights,UniformsLib.fog,{color:{value:new Color(0)},opacity:{value:1}}]),vertexShader:ShaderChunk.shadow_vert,fragmentShader:ShaderChunk.shadow_frag}};ShaderLib.physical={uniforms:mergeUniforms([ShaderLib.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Matrix3},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Matrix3},clearcoatNormalScale:{value:new Vector2(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Matrix3},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Matrix3},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Matrix3},sheen:{value:0},sheenColor:{value:new Color(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Matrix3},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Matrix3},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Matrix3},transmissionSamplerSize:{value:new Vector2},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Matrix3},attenuationDistance:{value:0},attenuationColor:{value:new Color(0)},specularColor:{value:new Color(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Matrix3},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Matrix3},anisotropyVector:{value:new Vector2},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Matrix3}}]),vertexShader:ShaderChunk.meshphysical_vert,fragmentShader:ShaderChunk.meshphysical_frag};const _rgb={r:0,b:0,g:0};const _e1$1=new Euler;const _m1$1=new Matrix4;function WebGLBackground(renderer,cubemaps,cubeuvmaps,state,objects,alpha,premultipliedAlpha){const clearColor=new Color(0);let clearAlpha=alpha===true?0:1;let planeMesh;let boxMesh;let currentBackground=null;let currentBackgroundVersion=0;let currentTonemapping=null;function getBackground(scene){let background=scene.isScene===true?scene.background:null;if(background&&background.isTexture){const usePMREM=scene.backgroundBlurriness>0;background=(usePMREM?cubeuvmaps:cubemaps).get(background)}return background}function render(scene){let forceClear=false;const background=getBackground(scene);if(background===null){setClear(clearColor,clearAlpha)}else if(background&&background.isColor){setClear(background,1);forceClear=true}const environmentBlendMode=renderer.xr.getEnvironmentBlendMode();if(environmentBlendMode==="additive"){state.buffers.color.setClear(0,0,0,1,premultipliedAlpha)}else if(environmentBlendMode==="alpha-blend"){state.buffers.color.setClear(0,0,0,0,premultipliedAlpha)}if(renderer.autoClear||forceClear){state.buffers.depth.setTest(true);state.buffers.depth.setMask(true);state.buffers.color.setMask(true);renderer.clear(renderer.autoClearColor,renderer.autoClearDepth,renderer.autoClearStencil)}}function addToRenderList(renderList,scene){const background=getBackground(scene);if(background&&(background.isCubeTexture||background.mapping===CubeUVReflectionMapping)){if(boxMesh===undefined){boxMesh=new Mesh(new BoxGeometry(1,1,1),new ShaderMaterial({name:"BackgroundCubeMaterial",uniforms:cloneUniforms(ShaderLib.backgroundCube.uniforms),vertexShader:ShaderLib.backgroundCube.vertexShader,fragmentShader:ShaderLib.backgroundCube.fragmentShader,side:BackSide,depthTest:false,depthWrite:false,fog:false,allowOverride:false}));boxMesh.geometry.deleteAttribute("normal");boxMesh.geometry.deleteAttribute("uv");boxMesh.onBeforeRender=function(renderer,scene,camera){this.matrixWorld.copyPosition(camera.matrixWorld)};Object.defineProperty(boxMesh.material,"envMap",{get:function(){return this.uniforms.envMap.value}});objects.update(boxMesh)}_e1$1.copy(scene.backgroundRotation);_e1$1.x*=-1;_e1$1.y*=-1;_e1$1.z*=-1;if(background.isCubeTexture&&background.isRenderTargetTexture===false){_e1$1.y*=-1;_e1$1.z*=-1}boxMesh.material.uniforms.envMap.value=background;boxMesh.material.uniforms.flipEnvMap.value=background.isCubeTexture&&background.isRenderTargetTexture===false?-1:1;boxMesh.material.uniforms.backgroundBlurriness.value=scene.backgroundBlurriness;boxMesh.material.uniforms.backgroundIntensity.value=scene.backgroundIntensity;boxMesh.material.uniforms.backgroundRotation.value.setFromMatrix4(_m1$1.makeRotationFromEuler(_e1$1));boxMesh.material.toneMapped=ColorManagement.getTransfer(background.colorSpace)!==SRGBTransfer;if(currentBackground!==background||currentBackgroundVersion!==background.version||currentTonemapping!==renderer.toneMapping){boxMesh.material.needsUpdate=true;currentBackground=background;currentBackgroundVersion=background.version;currentTonemapping=renderer.toneMapping}boxMesh.layers.enableAll();renderList.unshift(boxMesh,boxMesh.geometry,boxMesh.material,0,0,null)}else if(background&&background.isTexture){if(planeMesh===undefined){planeMesh=new Mesh(new PlaneGeometry(2,2),new ShaderMaterial({name:"BackgroundMaterial",uniforms:cloneUniforms(ShaderLib.background.uniforms),vertexShader:ShaderLib.background.vertexShader,fragmentShader:ShaderLib.background.fragmentShader,side:FrontSide,depthTest:false,depthWrite:false,fog:false,allowOverride:false}));planeMesh.geometry.deleteAttribute("normal");Object.defineProperty(planeMesh.material,"map",{get:function(){return this.uniforms.t2D.value}});objects.update(planeMesh)}planeMesh.material.uniforms.t2D.value=background;planeMesh.material.uniforms.backgroundIntensity.value=scene.backgroundIntensity;planeMesh.material.toneMapped=ColorManagement.getTransfer(background.colorSpace)!==SRGBTransfer;if(background.matrixAutoUpdate===true){background.updateMatrix()}planeMesh.material.uniforms.uvTransform.value.copy(background.matrix);if(currentBackground!==background||currentBackgroundVersion!==background.version||currentTonemapping!==renderer.toneMapping){planeMesh.material.needsUpdate=true;currentBackground=background;currentBackgroundVersion=background.version;currentTonemapping=renderer.toneMapping}planeMesh.layers.enableAll();renderList.unshift(planeMesh,planeMesh.geometry,planeMesh.material,0,0,null)}}function setClear(color,alpha){color.getRGB(_rgb,getUnlitUniformColorSpace(renderer));state.buffers.color.setClear(_rgb.r,_rgb.g,_rgb.b,alpha,premultipliedAlpha)}function dispose(){if(boxMesh!==undefined){boxMesh.geometry.dispose();boxMesh.material.dispose();boxMesh=undefined}if(planeMesh!==undefined){planeMesh.geometry.dispose();planeMesh.material.dispose();planeMesh=undefined}}return{getClearColor:function(){return clearColor},setClearColor:function(color,alpha=1){clearColor.set(color);clearAlpha=alpha;setClear(clearColor,clearAlpha)},getClearAlpha:function(){return clearAlpha},setClearAlpha:function(alpha){clearAlpha=alpha;setClear(clearColor,clearAlpha)},render:render,addToRenderList:addToRenderList,dispose:dispose}}function WebGLBindingStates(gl,attributes){const maxVertexAttributes=gl.getParameter(gl.MAX_VERTEX_ATTRIBS);const bindingStates={};const defaultState=createBindingState(null);let currentState=defaultState;let forceUpdate=false;function setup(object,material,program,geometry,index){let updateBuffers=false;const state=getBindingState(geometry,program,material);if(currentState!==state){currentState=state;bindVertexArrayObject(currentState.object)}updateBuffers=needsUpdate(object,geometry,program,index);if(updateBuffers)saveCache(object,geometry,program,index);if(index!==null){attributes.update(index,gl.ELEMENT_ARRAY_BUFFER)}if(updateBuffers||forceUpdate){forceUpdate=false;setupVertexAttributes(object,material,program,geometry);if(index!==null){gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER,attributes.get(index).buffer)}}}function createVertexArrayObject(){return gl.createVertexArray()}function bindVertexArrayObject(vao){return gl.bindVertexArray(vao)}function deleteVertexArrayObject(vao){return gl.deleteVertexArray(vao)}function getBindingState(geometry,program,material){const wireframe=material.wireframe===true;let programMap=bindingStates[geometry.id];if(programMap===undefined){programMap={};bindingStates[geometry.id]=programMap}let stateMap=programMap[program.id];if(stateMap===undefined){stateMap={};programMap[program.id]=stateMap}let state=stateMap[wireframe];if(state===undefined){state=createBindingState(createVertexArrayObject());stateMap[wireframe]=state}return state}function createBindingState(vao){const newAttributes=[];const enabledAttributes=[];const attributeDivisors=[];for(let i=0;i<maxVertexAttributes;i++){newAttributes[i]=0;enabledAttributes[i]=0;attributeDivisors[i]=0}return{geometry:null,program:null,wireframe:false,newAttributes:newAttributes,enabledAttributes:enabledAttributes,attributeDivisors:attributeDivisors,object:vao,attributes:{},index:null}}function needsUpdate(object,geometry,program,index){const cachedAttributes=currentState.attributes;const geometryAttributes=geometry.attributes;let attributesNum=0;const programAttributes=program.getAttributes();for(const name in programAttributes){const programAttribute=programAttributes[name];if(programAttribute.location>=0){const cachedAttribute=cachedAttributes[name];let geometryAttribute=geometryAttributes[name];if(geometryAttribute===undefined){if(name==="instanceMatrix"&&object.instanceMatrix)geometryAttribute=object.instanceMatrix;if(name==="instanceColor"&&object.instanceColor)geometryAttribute=object.instanceColor}if(cachedAttribute===undefined)return true;if(cachedAttribute.attribute!==geometryAttribute)return true;if(geometryAttribute&&cachedAttribute.data!==geometryAttribute.data)return true;attributesNum++}}if(currentState.attributesNum!==attributesNum)return true;if(currentState.index!==index)return true;return false}function saveCache(object,geometry,program,index){const cache={};const attributes=geometry.attributes;let attributesNum=0;const programAttributes=program.getAttributes();for(const name in programAttributes){const programAttribute=programAttributes[name];if(programAttribute.location>=0){let attribute=attributes[name];if(attribute===undefined){if(name==="instanceMatrix"&&object.instanceMatrix)attribute=object.instanceMatrix;if(name==="instanceColor"&&object.instanceColor)attribute=object.instanceColor}const data={};data.attribute=attribute;if(attribute&&attribute.data){data.data=attribute.data}cache[name]=data;attributesNum++}}currentState.attributes=cache;currentState.attributesNum=attributesNum;currentState.index=index}function initAttributes(){const newAttributes=currentState.newAttributes;for(let i=0,il=newAttributes.length;i<il;i++){newAttributes[i]=0}}function enableAttribute(attribute){enableAttributeAndDivisor(attribute,0)}function enableAttributeAndDivisor(attribute,meshPerAttribute){const newAttributes=currentState.newAttributes;const enabledAttributes=currentState.enabledAttributes;const attributeDivisors=currentState.attributeDivisors;newAttributes[attribute]=1;if(enabledAttributes[attribute]===0){gl.enableVertexAttribArray(attribute);enabledAttributes[attribute]=1}if(attributeDivisors[attribute]!==meshPerAttribute){gl.vertexAttribDivisor(attribute,meshPerAttribute);attributeDivisors[attribute]=meshPerAttribute}}function disableUnusedAttributes(){const newAttributes=currentState.newAttributes;const enabledAttributes=currentState.enabledAttributes;for(let i=0,il=enabledAttributes.length;i<il;i++){if(enabledAttributes[i]!==newAttributes[i]){gl.disableVertexAttribArray(i);enabledAttributes[i]=0}}}function vertexAttribPointer(index,size,type,normalized,stride,offset,integer){if(integer===true){gl.vertexAttribIPointer(index,size,type,stride,offset)}else{gl.vertexAttribPointer(index,size,type,normalized,stride,offset)}}function setupVertexAttributes(object,material,program,geometry){initAttributes();const geometryAttributes=geometry.attributes;const programAttributes=program.getAttributes();const materialDefaultAttributeValues=material.defaultAttributeValues;for(const name in programAttributes){const programAttribute=programAttributes[name];if(programAttribute.location>=0){let geometryAttribute=geometryAttributes[name];if(geometryAttribute===undefined){if(name==="instanceMatrix"&&object.instanceMatrix)geometryAttribute=object.instanceMatrix;if(name==="instanceColor"&&object.instanceColor)geometryAttribute=object.instanceColor}if(geometryAttribute!==undefined){const normalized=geometryAttribute.normalized;const size=geometryAttribute.itemSize;const attribute=attributes.get(geometryAttribute);if(attribute===undefined)continue;const buffer=attribute.buffer;const type=attribute.type;const bytesPerElement=attribute.bytesPerElement;const integer=type===gl.INT||type===gl.UNSIGNED_INT||geometryAttribute.gpuType===IntType;if(geometryAttribute.isInterleavedBufferAttribute){const data=geometryAttribute.data;const stride=data.stride;const offset=geometryAttribute.offset;if(data.isInstancedInterleavedBuffer){for(let i=0;i<programAttribute.locationSize;i++){enableAttributeAndDivisor(programAttribute.location+i,data.meshPerAttribute)}if(object.isInstancedMesh!==true&&geometry._maxInstanceCount===undefined){geometry._maxInstanceCount=data.meshPerAttribute*data.count}}else{for(let i=0;i<programAttribute.locationSize;i++){enableAttribute(programAttribute.location+i)}}gl.bindBuffer(gl.ARRAY_BUFFER,buffer);for(let i=0;i<programAttribute.locationSize;i++){vertexAttribPointer(programAttribute.location+i,size/programAttribute.locationSize,type,normalized,stride*bytesPerElement,(offset+size/programAttribute.locationSize*i)*bytesPerElement,integer)}}else{if(geometryAttribute.isInstancedBufferAttribute){for(let i=0;i<programAttribute.locationSize;i++){enableAttributeAndDivisor(programAttribute.location+i,geometryAttribute.meshPerAttribute)}if(object.isInstancedMesh!==true&&geometry._maxInstanceCount===undefined){geometry._maxInstanceCount=geometryAttribute.meshPerAttribute*geometryAttribute.count}}else{for(let i=0;i<programAttribute.locationSize;i++){enableAttribute(programAttribute.location+i)}}gl.bindBuffer(gl.ARRAY_BUFFER,buffer);for(let i=0;i<programAttribute.locationSize;i++){vertexAttribPointer(programAttribute.location+i,size/programAttribute.locationSize,type,normalized,size*bytesPerElement,size/programAttribute.locationSize*i*bytesPerElement,integer)}}}else if(materialDefaultAttributeValues!==undefined){const value=materialDefaultAttributeValues[name];if(value!==undefined){switch(value.length){case 2:gl.vertexAttrib2fv(programAttribute.location,value);break;case 3:gl.vertexAttrib3fv(programAttribute.location,value);break;case 4:gl.vertexAttrib4fv(programAttribute.location,value);break;default:gl.vertexAttrib1fv(programAttribute.location,value);}}}}}disableUnusedAttributes()}function dispose(){reset();for(const geometryId in bindingStates){const programMap=bindingStates[geometryId];for(const programId in programMap){const stateMap=programMap[programId];for(const wireframe in stateMap){deleteVertexArrayObject(stateMap[wireframe].object);delete stateMap[wireframe]}delete programMap[programId]}delete bindingStates[geometryId]}}function releaseStatesOfGeometry(geometry){if(bindingStates[geometry.id]===undefined)return;const programMap=bindingStates[geometry.id];for(const programId in programMap){const stateMap=programMap[programId];for(const wireframe in stateMap){deleteVertexArrayObject(stateMap[wireframe].object);delete stateMap[wireframe]}delete programMap[programId]}delete bindingStates[geometry.id]}function releaseStatesOfProgram(program){for(const geometryId in bindingStates){const programMap=bindingStates[geometryId];if(programMap[program.id]===undefined)continue;const stateMap=programMap[program.id];for(const wireframe in stateMap){deleteVertexArrayObject(stateMap[wireframe].object);delete stateMap[wireframe]}delete programMap[program.id]}}function reset(){resetDefaultState();forceUpdate=true;if(currentState===defaultState)return;currentState=defaultState;bindVertexArrayObject(currentState.object)}function resetDefaultState(){defaultState.geometry=null;defaultState.program=null;defaultState.wireframe=false}return{setup:setup,reset:reset,resetDefaultState:resetDefaultState,dispose:dispose,releaseStatesOfGeometry:releaseStatesOfGeometry,releaseStatesOfProgram:releaseStatesOfProgram,initAttributes:initAttributes,enableAttribute:enableAttribute,disableUnusedAttributes:disableUnusedAttributes}}function WebGLBufferRenderer(gl,extensions,info){let mode;function setMode(value){mode=value}function render(start,count){gl.drawArrays(mode,start,count);info.update(count,mode,1)}function renderInstances(start,count,primcount){if(primcount===0)return;gl.drawArraysInstanced(mode,start,count,primcount);info.update(count,mode,primcount)}function renderMultiDraw(starts,counts,drawCount){if(drawCount===0)return;const extension=extensions.get("WEBGL_multi_draw");extension.multiDrawArraysWEBGL(mode,starts,0,counts,0,drawCount);let elementCount=0;for(let i=0;i<drawCount;i++){elementCount+=counts[i]}info.update(elementCount,mode,1)}function renderMultiDrawInstances(starts,counts,drawCount,primcount){if(drawCount===0)return;const extension=extensions.get("WEBGL_multi_draw");if(extension===null){for(let i=0;i<starts.length;i++){renderInstances(starts[i],counts[i],primcount[i])}}else{extension.multiDrawArraysInstancedWEBGL(mode,starts,0,counts,0,primcount,0,drawCount);let elementCount=0;for(let i=0;i<drawCount;i++){elementCount+=counts[i]*primcount[i]}info.update(elementCount,mode,1)}}this.setMode=setMode;this.render=render;this.renderInstances=renderInstances;this.renderMultiDraw=renderMultiDraw;this.renderMultiDrawInstances=renderMultiDrawInstances}function WebGLCapabilities(gl,extensions,parameters,utils){let maxAnisotropy;function getMaxAnisotropy(){if(maxAnisotropy!==undefined)return maxAnisotropy;if(extensions.has("EXT_texture_filter_anisotropic")===true){const extension=extensions.get("EXT_texture_filter_anisotropic");maxAnisotropy=gl.getParameter(extension.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else{maxAnisotropy=0}return maxAnisotropy}function textureFormatReadable(textureFormat){if(textureFormat!==RGBAFormat&&utils.convert(textureFormat)!==gl.getParameter(gl.IMPLEMENTATION_COLOR_READ_FORMAT)){return false}return true}function textureTypeReadable(textureType){const halfFloatSupportedByExt=textureType===HalfFloatType&&(extensions.has("EXT_color_buffer_half_float")||extensions.has("EXT_color_buffer_float"));if(textureType!==UnsignedByteType&&utils.convert(textureType)!==gl.getParameter(gl.IMPLEMENTATION_COLOR_READ_TYPE)&&textureType!==FloatType&&!halfFloatSupportedByExt){return false}return true}function getMaxPrecision(precision){if(precision==="highp"){if(gl.getShaderPrecisionFormat(gl.VERTEX_SHADER,gl.HIGH_FLOAT).precision>0&&gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER,gl.HIGH_FLOAT).precision>0){return"highp"}precision="mediump"}if(precision==="mediump"){if(gl.getShaderPrecisionFormat(gl.VERTEX_SHADER,gl.MEDIUM_FLOAT).precision>0&&gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER,gl.MEDIUM_FLOAT).precision>0){return"mediump"}}return"lowp"}let precision=parameters.precision!==undefined?parameters.precision:"highp";const maxPrecision=getMaxPrecision(precision);if(maxPrecision!==precision){warn("WebGLRenderer:",precision,"not supported, using",maxPrecision,"instead.");precision=maxPrecision}const logarithmicDepthBuffer=parameters.logarithmicDepthBuffer===true;const reversedDepthBuffer=parameters.reversedDepthBuffer===true&&extensions.has("EXT_clip_control");const maxTextures=gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS);const maxVertexTextures=gl.getParameter(gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS);const maxTextureSize=gl.getParameter(gl.MAX_TEXTURE_SIZE);const maxCubemapSize=gl.getParameter(gl.MAX_CUBE_MAP_TEXTURE_SIZE);const maxAttributes=gl.getParameter(gl.MAX_VERTEX_ATTRIBS);const maxVertexUniforms=gl.getParameter(gl.MAX_VERTEX_UNIFORM_VECTORS);const maxVaryings=gl.getParameter(gl.MAX_VARYING_VECTORS);const maxFragmentUniforms=gl.getParameter(gl.MAX_FRAGMENT_UNIFORM_VECTORS);const maxSamples=gl.getParameter(gl.MAX_SAMPLES);const samples=gl.getParameter(gl.SAMPLES);return{isWebGL2:true,getMaxAnisotropy:getMaxAnisotropy,getMaxPrecision:getMaxPrecision,textureFormatReadable:textureFormatReadable,textureTypeReadable:textureTypeReadable,precision:precision,logarithmicDepthBuffer:logarithmicDepthBuffer,reversedDepthBuffer:reversedDepthBuffer,maxTextures:maxTextures,maxVertexTextures:maxVertexTextures,maxTextureSize:maxTextureSize,maxCubemapSize:maxCubemapSize,maxAttributes:maxAttributes,maxVertexUniforms:maxVertexUniforms,maxVaryings:maxVaryings,maxFragmentUniforms:maxFragmentUniforms,maxSamples:maxSamples,samples:samples}}function WebGLClipping(properties){const scope=this;let globalState=null,numGlobalPlanes=0,localClippingEnabled=false,renderingShadows=false;const plane=new Plane,viewNormalMatrix=new Matrix3,uniform={value:null,needsUpdate:false};this.uniform=uniform;this.numPlanes=0;this.numIntersection=0;this.init=function(planes,enableLocalClipping){const enabled=planes.length!==0||enableLocalClipping||numGlobalPlanes!==0||localClippingEnabled;localClippingEnabled=enableLocalClipping;numGlobalPlanes=planes.length;return enabled};this.beginShadows=function(){renderingShadows=true;projectPlanes(null)};this.endShadows=function(){renderingShadows=false};this.setGlobalState=function(planes,camera){globalState=projectPlanes(planes,camera,0)};this.setState=function(material,camera,useCache){const planes=material.clippingPlanes,clipIntersection=material.clipIntersection,clipShadows=material.clipShadows;const materialProperties=properties.get(material);if(!localClippingEnabled||planes===null||planes.length===0||renderingShadows&&!clipShadows){if(renderingShadows){projectPlanes(null)}else{resetGlobalState()}}else{const nGlobal=renderingShadows?0:numGlobalPlanes,lGlobal=nGlobal*4;let dstArray=materialProperties.clippingState||null;uniform.value=dstArray;dstArray=projectPlanes(planes,camera,lGlobal,useCache);for(let i=0;i!==lGlobal;++i){dstArray[i]=globalState[i]}materialProperties.clippingState=dstArray;this.numIntersection=clipIntersection?this.numPlanes:0;this.numPlanes+=nGlobal}};function resetGlobalState(){if(uniform.value!==globalState){uniform.value=globalState;uniform.needsUpdate=numGlobalPlanes>0}scope.numPlanes=numGlobalPlanes;scope.numIntersection=0}function projectPlanes(planes,camera,dstOffset,skipTransform){const nPlanes=planes!==null?planes.length:0;let dstArray=null;if(nPlanes!==0){dstArray=uniform.value;if(skipTransform!==true||dstArray===null){const flatSize=dstOffset+nPlanes*4,viewMatrix=camera.matrixWorldInverse;viewNormalMatrix.getNormalMatrix(viewMatrix);if(dstArray===null||dstArray.length<flatSize){dstArray=new Float32Array(flatSize)}for(let i=0,i4=dstOffset;i!==nPlanes;++i,i4+=4){plane.copy(planes[i]).applyMatrix4(viewMatrix,viewNormalMatrix);plane.normal.toArray(dstArray,i4);dstArray[i4+3]=plane.constant}}uniform.value=dstArray;uniform.needsUpdate=true}scope.numPlanes=nPlanes;scope.numIntersection=0;return dstArray}}function WebGLCubeMaps(renderer){let cubemaps=new WeakMap;function mapTextureMapping(texture,mapping){if(mapping===EquirectangularReflectionMapping){texture.mapping=CubeReflectionMapping}else if(mapping===EquirectangularRefractionMapping){texture.mapping=CubeRefractionMapping}return texture}function get(texture){if(texture&&texture.isTexture){const mapping=texture.mapping;if(mapping===EquirectangularReflectionMapping||mapping===EquirectangularRefractionMapping){if(cubemaps.has(texture)){const cubemap=cubemaps.get(texture).texture;return mapTextureMapping(cubemap,texture.mapping)}else{const image=texture.image;if(image&&image.height>0){const renderTarget=new WebGLCubeRenderTarget(image.height);renderTarget.fromEquirectangularTexture(renderer,texture);cubemaps.set(texture,renderTarget);texture.addEventListener("dispose",onTextureDispose);return mapTextureMapping(renderTarget.texture,texture.mapping)}else{return null}}}}return texture}function onTextureDispose(event){const texture=event.target;texture.removeEventListener("dispose",onTextureDispose);const cubemap=cubemaps.get(texture);if(cubemap!==undefined){cubemaps.delete(texture);cubemap.dispose()}}function dispose(){cubemaps=new WeakMap}return{get:get,dispose:dispose}}const LOD_MIN=4;const EXTRA_LOD_SIGMA=[0.125,0.215,0.35,0.446,0.526,0.582];const MAX_SAMPLES=20;const GGX_SAMPLES=256;const _flatCamera=new OrthographicCamera;const _clearColor=new Color;let _oldTarget=null;let _oldActiveCubeFace=0;let _oldActiveMipmapLevel=0;let _oldXrEnabled=false;const _origin=new Vector3;class PMREMGenerator{constructor(renderer){this._renderer=renderer;this._pingPongRenderTarget=null;this._lodMax=0;this._cubeSize=0;this._sizeLods=[];this._sigmas=[];this._lodMeshes=[];this._backgroundBox=null;this._cubemapMaterial=null;this._equirectMaterial=null;this._blurMaterial=null;this._ggxMaterial=null}fromScene(scene,sigma=0,near=0.1,far=100,options={}){const{size=256,position=_origin}=options;_oldTarget=this._renderer.getRenderTarget();_oldActiveCubeFace=this._renderer.getActiveCubeFace();_oldActiveMipmapLevel=this._renderer.getActiveMipmapLevel();_oldXrEnabled=this._renderer.xr.enabled;this._renderer.xr.enabled=false;this._setSize(size);const cubeUVRenderTarget=this._allocateTargets();cubeUVRenderTarget.depthBuffer=true;this._sceneToCubeUV(scene,near,far,cubeUVRenderTarget,position);if(sigma>0){this._blur(cubeUVRenderTarget,0,0,sigma)}this._applyPMREM(cubeUVRenderTarget);this._cleanup(cubeUVRenderTarget);return cubeUVRenderTarget}fromEquirectangular(equirectangular,renderTarget=null){return this._fromTexture(equirectangular,renderTarget)}fromCubemap(cubemap,renderTarget=null){return this._fromTexture(cubemap,renderTarget)}compileCubemapShader(){if(this._cubemapMaterial===null){this._cubemapMaterial=_getCubemapMaterial();this._compileMaterial(this._cubemapMaterial)}}compileEquirectangularShader(){if(this._equirectMaterial===null){this._equirectMaterial=_getEquirectMaterial();this._compileMaterial(this._equirectMaterial)}}dispose(){this._dispose();if(this._cubemapMaterial!==null)this._cubemapMaterial.dispose();if(this._equirectMaterial!==null)this._equirectMaterial.dispose();if(this._backgroundBox!==null){this._backgroundBox.geometry.dispose();this._backgroundBox.material.dispose()}}_setSize(cubeSize){this._lodMax=Math.floor(Math.log2(cubeSize));this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){if(this._blurMaterial!==null)this._blurMaterial.dispose();if(this._ggxMaterial!==null)this._ggxMaterial.dispose();if(this._pingPongRenderTarget!==null)this._pingPongRenderTarget.dispose();for(let i=0;i<this._lodMeshes.length;i++){this._lodMeshes[i].geometry.dispose()}}_cleanup(outputTarget){this._renderer.setRenderTarget(_oldTarget,_oldActiveCubeFace,_oldActiveMipmapLevel);this._renderer.xr.enabled=_oldXrEnabled;outputTarget.scissorTest=false;_setViewport(outputTarget,0,0,outputTarget.width,outputTarget.height)}_fromTexture(texture,renderTarget){if(texture.mapping===CubeReflectionMapping||texture.mapping===CubeRefractionMapping){this._setSize(texture.image.length===0?16:texture.image[0].width||texture.image[0].image.width)}else{this._setSize(texture.image.width/4)}_oldTarget=this._renderer.getRenderTarget();_oldActiveCubeFace=this._renderer.getActiveCubeFace();_oldActiveMipmapLevel=this._renderer.getActiveMipmapLevel();_oldXrEnabled=this._renderer.xr.enabled;this._renderer.xr.enabled=false;const cubeUVRenderTarget=renderTarget||this._allocateTargets();this._textureToCubeUV(texture,cubeUVRenderTarget);this._applyPMREM(cubeUVRenderTarget);this._cleanup(cubeUVRenderTarget);return cubeUVRenderTarget}_allocateTargets(){const width=3*Math.max(this._cubeSize,16*7);const height=4*this._cubeSize;const params={magFilter:LinearFilter,minFilter:LinearFilter,generateMipmaps:false,type:HalfFloatType,format:RGBAFormat,colorSpace:LinearSRGBColorSpace,depthBuffer:false};const cubeUVRenderTarget=_createRenderTarget(width,height,params);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==width||this._pingPongRenderTarget.height!==height){if(this._pingPongRenderTarget!==null){this._dispose()}this._pingPongRenderTarget=_createRenderTarget(width,height,params);const{_lodMax}=this;({lodMeshes:this._lodMeshes,sizeLods:this._sizeLods,sigmas:this._sigmas}=_createPlanes(_lodMax));this._blurMaterial=_getBlurShader(_lodMax,width,height);this._ggxMaterial=_getGGXShader(_lodMax,width,height)}return cubeUVRenderTarget}_compileMaterial(material){const mesh=new Mesh(new BufferGeometry(),material);this._renderer.compile(mesh,_flatCamera)}_sceneToCubeUV(scene,near,far,cubeUVRenderTarget,position){const fov=90;const aspect=1;const cubeCamera=new PerspectiveCamera(fov,aspect,near,far);const upSign=[1,-1,1,1,1,1];const forwardSign=[1,1,1,-1,-1,-1];const renderer=this._renderer;const originalAutoClear=renderer.autoClear;const toneMapping=renderer.toneMapping;renderer.getClearColor(_clearColor);renderer.toneMapping=NoToneMapping;renderer.autoClear=false;const reversedDepthBuffer=renderer.state.buffers.depth.getReversed();if(reversedDepthBuffer){renderer.setRenderTarget(cubeUVRenderTarget);renderer.clearDepth();renderer.setRenderTarget(null)}if(this._backgroundBox===null){this._backgroundBox=new Mesh(new BoxGeometry(),new MeshBasicMaterial({name:"PMREM.Background",side:BackSide,depthWrite:false,depthTest:false}))}const backgroundBox=this._backgroundBox;const backgroundMaterial=backgroundBox.material;let useSolidColor=false;const background=scene.background;if(background){if(background.isColor){backgroundMaterial.color.copy(background);scene.background=null;useSolidColor=true}}else{backgroundMaterial.color.copy(_clearColor);useSolidColor=true}for(let i=0;i<6;i++){const col=i%3;if(col===0){cubeCamera.up.set(0,upSign[i],0);cubeCamera.position.set(position.x,position.y,position.z);cubeCamera.lookAt(position.x+forwardSign[i],position.y,position.z)}else if(col===1){cubeCamera.up.set(0,0,upSign[i]);cubeCamera.position.set(position.x,position.y,position.z);cubeCamera.lookAt(position.x,position.y+forwardSign[i],position.z)}else{cubeCamera.up.set(0,upSign[i],0);cubeCamera.position.set(position.x,position.y,position.z);cubeCamera.lookAt(position.x,position.y,position.z+forwardSign[i])}const size=this._cubeSize;_setViewport(cubeUVRenderTarget,col*size,i>2?size:0,size,size);renderer.setRenderTarget(cubeUVRenderTarget);if(useSolidColor){renderer.render(backgroundBox,cubeCamera)}renderer.render(scene,cubeCamera)}renderer.toneMapping=toneMapping;renderer.autoClear=originalAutoClear;scene.background=background}_textureToCubeUV(texture,cubeUVRenderTarget){const renderer=this._renderer;const isCubeTexture=texture.mapping===CubeReflectionMapping||texture.mapping===CubeRefractionMapping;if(isCubeTexture){if(this._cubemapMaterial===null){this._cubemapMaterial=_getCubemapMaterial()}this._cubemapMaterial.uniforms.flipEnvMap.value=texture.isRenderTargetTexture===false?-1:1}else{if(this._equirectMaterial===null){this._equirectMaterial=_getEquirectMaterial()}}const material=isCubeTexture?this._cubemapMaterial:this._equirectMaterial;const mesh=this._lodMeshes[0];mesh.material=material;const uniforms=material.uniforms;uniforms["envMap"].value=texture;const size=this._cubeSize;_setViewport(cubeUVRenderTarget,0,0,3*size,2*size);renderer.setRenderTarget(cubeUVRenderTarget);renderer.render(mesh,_flatCamera)}_applyPMREM(cubeUVRenderTarget){const renderer=this._renderer;const autoClear=renderer.autoClear;renderer.autoClear=false;const n=this._lodMeshes.length;for(let i=1;i<n;i++){this._applyGGXFilter(cubeUVRenderTarget,i-1,i)}renderer.autoClear=autoClear}_applyGGXFilter(cubeUVRenderTarget,lodIn,lodOut){const renderer=this._renderer;const pingPongRenderTarget=this._pingPongRenderTarget;const ggxMaterial=this._ggxMaterial;const ggxMesh=this._lodMeshes[lodOut];ggxMesh.material=ggxMaterial;const ggxUniforms=ggxMaterial.uniforms;const targetRoughness=lodOut/(this._lodMeshes.length-1);const sourceRoughness=lodIn/(this._lodMeshes.length-1);const incrementalRoughness=Math.sqrt(targetRoughness*targetRoughness-sourceRoughness*sourceRoughness);const blurStrength=0+targetRoughness*1.25;const adjustedRoughness=incrementalRoughness*blurStrength;const{_lodMax}=this;const outputSize=this._sizeLods[lodOut];const x=3*outputSize*(lodOut>_lodMax-LOD_MIN?lodOut-_lodMax+LOD_MIN:0);const y=4*(this._cubeSize-outputSize);ggxUniforms["envMap"].value=cubeUVRenderTarget.texture;ggxUniforms["roughness"].value=adjustedRoughness;ggxUniforms["mipInt"].value=_lodMax-lodIn;_setViewport(pingPongRenderTarget,x,y,3*outputSize,2*outputSize);renderer.setRenderTarget(pingPongRenderTarget);renderer.render(ggxMesh,_flatCamera);ggxUniforms["envMap"].value=pingPongRenderTarget.texture;ggxUniforms["roughness"].value=0;ggxUniforms["mipInt"].value=_lodMax-lodOut;_setViewport(cubeUVRenderTarget,x,y,3*outputSize,2*outputSize);renderer.setRenderTarget(cubeUVRenderTarget);renderer.render(ggxMesh,_flatCamera)}_blur(cubeUVRenderTarget,lodIn,lodOut,sigma,poleAxis){const pingPongRenderTarget=this._pingPongRenderTarget;this._halfBlur(cubeUVRenderTarget,pingPongRenderTarget,lodIn,lodOut,sigma,"latitudinal",poleAxis);this._halfBlur(pingPongRenderTarget,cubeUVRenderTarget,lodOut,lodOut,sigma,"longitudinal",poleAxis)}_halfBlur(targetIn,targetOut,lodIn,lodOut,sigmaRadians,direction,poleAxis){const renderer=this._renderer;const blurMaterial=this._blurMaterial;if(direction!=="latitudinal"&&direction!=="longitudinal"){error("blur direction must be either latitudinal or longitudinal!")}const STANDARD_DEVIATIONS=3;const blurMesh=this._lodMeshes[lodOut];blurMesh.material=blurMaterial;const blurUniforms=blurMaterial.uniforms;const pixels=this._sizeLods[lodIn]-1;const radiansPerPixel=isFinite(sigmaRadians)?Math.PI/(2*pixels):2*Math.PI/(2*MAX_SAMPLES-1);const sigmaPixels=sigmaRadians/radiansPerPixel;const samples=isFinite(sigmaRadians)?1+Math.floor(STANDARD_DEVIATIONS*sigmaPixels):MAX_SAMPLES;if(samples>MAX_SAMPLES){warn(`sigmaRadians, ${sigmaRadians}, is too large and will clip, as it requested ${samples} samples when the maximum is set to ${MAX_SAMPLES}`)}const weights=[];let sum=0;for(let i=0;i<MAX_SAMPLES;++i){const x=i/sigmaPixels;const weight=Math.exp(-x*x/2);weights.push(weight);if(i===0){sum+=weight}else if(i<samples){sum+=2*weight}}for(let i=0;i<weights.length;i++){weights[i]=weights[i]/sum}blurUniforms["envMap"].value=targetIn.texture;blurUniforms["samples"].value=samples;blurUniforms["weights"].value=weights;blurUniforms["latitudinal"].value=direction==="latitudinal";if(poleAxis){blurUniforms["poleAxis"].value=poleAxis}const{_lodMax}=this;blurUniforms["dTheta"].value=radiansPerPixel;blurUniforms["mipInt"].value=_lodMax-lodIn;const outputSize=this._sizeLods[lodOut];const x=3*outputSize*(lodOut>_lodMax-LOD_MIN?lodOut-_lodMax+LOD_MIN:0);const y=4*(this._cubeSize-outputSize);_setViewport(targetOut,x,y,3*outputSize,2*outputSize);renderer.setRenderTarget(targetOut);renderer.render(blurMesh,_flatCamera)}}function _createPlanes(lodMax){const sizeLods=[];const sigmas=[];const lodMeshes=[];let lod=lodMax;const totalLods=lodMax-LOD_MIN+1+EXTRA_LOD_SIGMA.length;for(let i=0;i<totalLods;i++){const sizeLod=Math.pow(2,lod);sizeLods.push(sizeLod);let sigma=1/sizeLod;if(i>lodMax-LOD_MIN){sigma=EXTRA_LOD_SIGMA[i-lodMax+LOD_MIN-1]}else if(i===0){sigma=0}sigmas.push(sigma);const texelSize=1/(sizeLod-2);const min=-texelSize;const max=1+texelSize;const uv1=[min,min,max,min,max,max,min,min,max,max,min,max];const cubeFaces=6;const vertices=6;const positionSize=3;const uvSize=2;const faceIndexSize=1;const position=new Float32Array(positionSize*vertices*cubeFaces);const uv=new Float32Array(uvSize*vertices*cubeFaces);const faceIndex=new Float32Array(faceIndexSize*vertices*cubeFaces);for(let face=0;face<cubeFaces;face++){const x=face%3*2/3-1;const y=face>2?0:-1;const coordinates=[x,y,0,x+2/3,y,0,x+2/3,y+1,0,x,y,0,x+2/3,y+1,0,x,y+1,0];position.set(coordinates,positionSize*vertices*face);uv.set(uv1,uvSize*vertices*face);const fill=[face,face,face,face,face,face];faceIndex.set(fill,faceIndexSize*vertices*face)}const planes=new BufferGeometry;planes.setAttribute("position",new BufferAttribute(position,positionSize));planes.setAttribute("uv",new BufferAttribute(uv,uvSize));planes.setAttribute("faceIndex",new BufferAttribute(faceIndex,faceIndexSize));lodMeshes.push(new Mesh(planes,null));if(lod>LOD_MIN){lod--}}return{lodMeshes,sizeLods,sigmas}}function _createRenderTarget(width,height,params){const cubeUVRenderTarget=new WebGLRenderTarget(width,height,params);cubeUVRenderTarget.texture.mapping=CubeUVReflectionMapping;cubeUVRenderTarget.texture.name="PMREM.cubeUv";cubeUVRenderTarget.scissorTest=true;return cubeUVRenderTarget}function _setViewport(target,x,y,width,height){target.viewport.set(x,y,width,height);target.scissor.set(x,y,width,height)}function _getGGXShader(lodMax,width,height){const shaderMaterial=new ShaderMaterial({name:"PMREMGGXConvolution",defines:{"GGX_SAMPLES":GGX_SAMPLES,"CUBEUV_TEXEL_WIDTH":1/width,"CUBEUV_TEXEL_HEIGHT":1/height,"CUBEUV_MAX_MIP":`${lodMax}.0`},uniforms:{"envMap":{value:null},"roughness":{value:0},"mipInt":{value:0}},vertexShader:_getCommonVertexShader(),fragmentShader:`

			precision highp float;
			precision highp int;

			varying vec3 vOutputDirection;

			uniform sampler2D envMap;
			uniform float roughness;
			uniform float mipInt;

			#define ENVMAP_TYPE_CUBE_UV
			#include <cube_uv_reflection_fragment>

			#define PI 3.14159265359

			// Van der Corput radical inverse
			float radicalInverse_VdC(uint bits) {
				bits = (bits << 16u) | (bits >> 16u);
				bits = ((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u);
				bits = ((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u);
				bits = ((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u);
				bits = ((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u);
				return float(bits) * 2.3283064365386963e-10; // / 0x100000000
			}

			// Hammersley sequence
			vec2 hammersley(uint i, uint N) {
				return vec2(float(i) / float(N), radicalInverse_VdC(i));
			}

			// GGX VNDF importance sampling (Eric Heitz 2018)
			// "Sampling the GGX Distribution of Visible Normals"
			// https://jcgt.org/published/0007/04/01/
			vec3 importanceSampleGGX_VNDF(vec2 Xi, vec3 V, float roughness) {
				float alpha = roughness * roughness;

				// Section 3.2: Transform view direction to hemisphere configuration
				vec3 Vh = normalize(vec3(alpha * V.x, alpha * V.y, V.z));

				// Section 4.1: Orthonormal basis
				float lensq = Vh.x * Vh.x + Vh.y * Vh.y;
				vec3 T1 = lensq > 0.0 ? vec3(-Vh.y, Vh.x, 0.0) / sqrt(lensq) : vec3(1.0, 0.0, 0.0);
				vec3 T2 = cross(Vh, T1);

				// Section 4.2: Parameterization of projected area
				float r = sqrt(Xi.x);
				float phi = 2.0 * PI * Xi.y;
				float t1 = r * cos(phi);
				float t2 = r * sin(phi);
				float s = 0.5 * (1.0 + Vh.z);
				t2 = (1.0 - s) * sqrt(1.0 - t1 * t1) + s * t2;

				// Section 4.3: Reprojection onto hemisphere
				vec3 Nh = t1 * T1 + t2 * T2 + sqrt(max(0.0, 1.0 - t1 * t1 - t2 * t2)) * Vh;

				// Section 3.4: Transform back to ellipsoid configuration
				return normalize(vec3(alpha * Nh.x, alpha * Nh.y, max(0.0, Nh.z)));
			}

			void main() {
				vec3 N = normalize(vOutputDirection);
				vec3 V = N; // Assume view direction equals normal for pre-filtering

				vec3 prefilteredColor = vec3(0.0);
				float totalWeight = 0.0;

				// For very low roughness, just sample the environment directly
				if (roughness < 0.001) {
					gl_FragColor = vec4(bilinearCubeUV(envMap, N, mipInt), 1.0);
					return;
				}

				// Tangent space basis for VNDF sampling
				vec3 up = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);
				vec3 tangent = normalize(cross(up, N));
				vec3 bitangent = cross(N, tangent);

				for(uint i = 0u; i < uint(GGX_SAMPLES); i++) {
					vec2 Xi = hammersley(i, uint(GGX_SAMPLES));

					// For PMREM, V = N, so in tangent space V is always (0, 0, 1)
					vec3 H_tangent = importanceSampleGGX_VNDF(Xi, vec3(0.0, 0.0, 1.0), roughness);

					// Transform H back to world space
					vec3 H = normalize(tangent * H_tangent.x + bitangent * H_tangent.y + N * H_tangent.z);
					vec3 L = normalize(2.0 * dot(V, H) * H - V);

					float NdotL = max(dot(N, L), 0.0);

					if(NdotL > 0.0) {
						// Sample environment at fixed mip level
						// VNDF importance sampling handles the distribution filtering
						vec3 sampleColor = bilinearCubeUV(envMap, L, mipInt);

						// Weight by NdotL for the split-sum approximation
						// VNDF PDF naturally accounts for the visible microfacet distribution
						prefilteredColor += sampleColor * NdotL;
						totalWeight += NdotL;
					}
				}

				if (totalWeight > 0.0) {
					prefilteredColor = prefilteredColor / totalWeight;
				}

				gl_FragColor = vec4(prefilteredColor, 1.0);
			}
		`,blending:NoBlending,depthTest:false,depthWrite:false});return shaderMaterial}function _getBlurShader(lodMax,width,height){const weights=new Float32Array(MAX_SAMPLES);const poleAxis=new Vector3(0,1,0);const shaderMaterial=new ShaderMaterial({name:"SphericalGaussianBlur",defines:{"n":MAX_SAMPLES,"CUBEUV_TEXEL_WIDTH":1/width,"CUBEUV_TEXEL_HEIGHT":1/height,"CUBEUV_MAX_MIP":`${lodMax}.0`},uniforms:{"envMap":{value:null},"samples":{value:1},"weights":{value:weights},"latitudinal":{value:false},"dTheta":{value:0},"mipInt":{value:0},"poleAxis":{value:poleAxis}},vertexShader:_getCommonVertexShader(),fragmentShader:`

			precision mediump float;
			precision mediump int;

			varying vec3 vOutputDirection;

			uniform sampler2D envMap;
			uniform int samples;
			uniform float weights[ n ];
			uniform bool latitudinal;
			uniform float dTheta;
			uniform float mipInt;
			uniform vec3 poleAxis;

			#define ENVMAP_TYPE_CUBE_UV
			#include <cube_uv_reflection_fragment>

			vec3 getSample( float theta, vec3 axis ) {

				float cosTheta = cos( theta );
				// Rodrigues' axis-angle rotation
				vec3 sampleDirection = vOutputDirection * cosTheta
					+ cross( axis, vOutputDirection ) * sin( theta )
					+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );

				return bilinearCubeUV( envMap, sampleDirection, mipInt );

			}

			void main() {

				vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );

				if ( all( equal( axis, vec3( 0.0 ) ) ) ) {

					axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );

				}

				axis = normalize( axis );

				gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );
				gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );

				for ( int i = 1; i < n; i++ ) {

					if ( i >= samples ) {

						break;

					}

					float theta = dTheta * float( i );
					gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );
					gl_FragColor.rgb += weights[ i ] * getSample( theta, axis );

				}

			}
		`,blending:NoBlending,depthTest:false,depthWrite:false});return shaderMaterial}function _getEquirectMaterial(){return new ShaderMaterial({name:"EquirectangularToCubeUV",uniforms:{"envMap":{value:null}},vertexShader:_getCommonVertexShader(),fragmentShader:`

			precision mediump float;
			precision mediump int;

			varying vec3 vOutputDirection;

			uniform sampler2D envMap;

			#include <common>

			void main() {

				vec3 outputDirection = normalize( vOutputDirection );
				vec2 uv = equirectUv( outputDirection );

				gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );

			}
		`,blending:NoBlending,depthTest:false,depthWrite:false})}function _getCubemapMaterial(){return new ShaderMaterial({name:"CubemapToCubeUV",uniforms:{"envMap":{value:null},"flipEnvMap":{value:-1}},vertexShader:_getCommonVertexShader(),fragmentShader:`

			precision mediump float;
			precision mediump int;

			uniform float flipEnvMap;

			varying vec3 vOutputDirection;

			uniform samplerCube envMap;

			void main() {

				gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );

			}
		`,blending:NoBlending,depthTest:false,depthWrite:false})}function _getCommonVertexShader(){return`

		precision mediump float;
		precision mediump int;

		attribute float faceIndex;

		varying vec3 vOutputDirection;

		// RH coordinate system; PMREM face-indexing convention
		vec3 getDirection( vec2 uv, float face ) {

			uv = 2.0 * uv - 1.0;

			vec3 direction = vec3( uv, 1.0 );

			if ( face == 0.0 ) {

				direction = direction.zyx; // ( 1, v, u ) pos x

			} else if ( face == 1.0 ) {

				direction = direction.xzy;
				direction.xz *= -1.0; // ( -u, 1, -v ) pos y

			} else if ( face == 2.0 ) {

				direction.x *= -1.0; // ( -u, v, 1 ) pos z

			} else if ( face == 3.0 ) {

				direction = direction.zyx;
				direction.xz *= -1.0; // ( -1, v, -u ) neg x

			} else if ( face == 4.0 ) {

				direction = direction.xzy;
				direction.xy *= -1.0; // ( -u, -1, v ) neg y

			} else if ( face == 5.0 ) {

				direction.z *= -1.0; // ( u, v, -1 ) neg z

			}

			return direction;

		}

		void main() {

			vOutputDirection = getDirection( uv, faceIndex );
			gl_Position = vec4( position, 1.0 );

		}
	`}function WebGLCubeUVMaps(renderer){let cubeUVmaps=new WeakMap;let pmremGenerator=null;function get(texture){if(texture&&texture.isTexture){const mapping=texture.mapping;const isEquirectMap=mapping===EquirectangularReflectionMapping||mapping===EquirectangularRefractionMapping;const isCubeMap=mapping===CubeReflectionMapping||mapping===CubeRefractionMapping;if(isEquirectMap||isCubeMap){let renderTarget=cubeUVmaps.get(texture);const currentPMREMVersion=renderTarget!==undefined?renderTarget.texture.pmremVersion:0;if(texture.isRenderTargetTexture&&texture.pmremVersion!==currentPMREMVersion){if(pmremGenerator===null)pmremGenerator=new PMREMGenerator(renderer);renderTarget=isEquirectMap?pmremGenerator.fromEquirectangular(texture,renderTarget):pmremGenerator.fromCubemap(texture,renderTarget);renderTarget.texture.pmremVersion=texture.pmremVersion;cubeUVmaps.set(texture,renderTarget);return renderTarget.texture}else{if(renderTarget!==undefined){return renderTarget.texture}else{const image=texture.image;if(isEquirectMap&&image&&image.height>0||isCubeMap&&image&&isCubeTextureComplete(image)){if(pmremGenerator===null)pmremGenerator=new PMREMGenerator(renderer);renderTarget=isEquirectMap?pmremGenerator.fromEquirectangular(texture):pmremGenerator.fromCubemap(texture);renderTarget.texture.pmremVersion=texture.pmremVersion;cubeUVmaps.set(texture,renderTarget);texture.addEventListener("dispose",onTextureDispose);return renderTarget.texture}else{return null}}}}}return texture}function isCubeTextureComplete(image){let count=0;const length=6;for(let i=0;i<length;i++){if(image[i]!==undefined)count++}return count===length}function onTextureDispose(event){const texture=event.target;texture.removeEventListener("dispose",onTextureDispose);const cubemapUV=cubeUVmaps.get(texture);if(cubemapUV!==undefined){cubeUVmaps.delete(texture);cubemapUV.dispose()}}function dispose(){cubeUVmaps=new WeakMap;if(pmremGenerator!==null){pmremGenerator.dispose();pmremGenerator=null}}return{get:get,dispose:dispose}}function WebGLExtensions(gl){const extensions={};function getExtension(name){if(extensions[name]!==undefined){return extensions[name]}const extension=gl.getExtension(name);extensions[name]=extension;return extension}return{has:function(name){return getExtension(name)!==null},init:function(){getExtension("EXT_color_buffer_float");getExtension("WEBGL_clip_cull_distance");getExtension("OES_texture_float_linear");getExtension("EXT_color_buffer_half_float");getExtension("WEBGL_multisampled_render_to_texture");getExtension("WEBGL_render_shared_exponent")},get:function(name){const extension=getExtension(name);if(extension===null){warnOnce("WebGLRenderer: "+name+" extension not supported.")}return extension}}}function WebGLGeometries(gl,attributes,info,bindingStates){const geometries={};const wireframeAttributes=new WeakMap;function onGeometryDispose(event){const geometry=event.target;if(geometry.index!==null){attributes.remove(geometry.index)}for(const name in geometry.attributes){attributes.remove(geometry.attributes[name])}geometry.removeEventListener("dispose",onGeometryDispose);delete geometries[geometry.id];const attribute=wireframeAttributes.get(geometry);if(attribute){attributes.remove(attribute);wireframeAttributes.delete(geometry)}bindingStates.releaseStatesOfGeometry(geometry);if(geometry.isInstancedBufferGeometry===true){delete geometry._maxInstanceCount}info.memory.geometries--}function get(object,geometry){if(geometries[geometry.id]===true)return geometry;geometry.addEventListener("dispose",onGeometryDispose);geometries[geometry.id]=true;info.memory.geometries++;return geometry}function update(geometry){const geometryAttributes=geometry.attributes;for(const name in geometryAttributes){attributes.update(geometryAttributes[name],gl.ARRAY_BUFFER)}}function updateWireframeAttribute(geometry){const indices=[];const geometryIndex=geometry.index;const geometryPosition=geometry.attributes.position;let version=0;if(geometryIndex!==null){const array=geometryIndex.array;version=geometryIndex.version;for(let i=0,l=array.length;i<l;i+=3){const a=array[i+0];const b=array[i+1];const c=array[i+2];indices.push(a,b,b,c,c,a)}}else if(geometryPosition!==undefined){const array=geometryPosition.array;version=geometryPosition.version;for(let i=0,l=array.length/3-1;i<l;i+=3){const a=i+0;const b=i+1;const c=i+2;indices.push(a,b,b,c,c,a)}}else{return}const attribute=new(arrayNeedsUint32(indices)?Uint32BufferAttribute:Uint16BufferAttribute)(indices,1);attribute.version=version;const previousAttribute=wireframeAttributes.get(geometry);if(previousAttribute)attributes.remove(previousAttribute);wireframeAttributes.set(geometry,attribute)}function getWireframeAttribute(geometry){const currentAttribute=wireframeAttributes.get(geometry);if(currentAttribute){const geometryIndex=geometry.index;if(geometryIndex!==null){if(currentAttribute.version<geometryIndex.version){updateWireframeAttribute(geometry)}}}else{updateWireframeAttribute(geometry)}return wireframeAttributes.get(geometry)}return{get:get,update:update,getWireframeAttribute:getWireframeAttribute}}function WebGLIndexedBufferRenderer(gl,extensions,info){let mode;function setMode(value){mode=value}let type,bytesPerElement;function setIndex(value){type=value.type;bytesPerElement=value.bytesPerElement}function render(start,count){gl.drawElements(mode,count,type,start*bytesPerElement);info.update(count,mode,1)}function renderInstances(start,count,primcount){if(primcount===0)return;gl.drawElementsInstanced(mode,count,type,start*bytesPerElement,primcount);info.update(count,mode,primcount)}function renderMultiDraw(starts,counts,drawCount){if(drawCount===0)return;const extension=extensions.get("WEBGL_multi_draw");extension.multiDrawElementsWEBGL(mode,counts,0,type,starts,0,drawCount);let elementCount=0;for(let i=0;i<drawCount;i++){elementCount+=counts[i]}info.update(elementCount,mode,1)}function renderMultiDrawInstances(starts,counts,drawCount,primcount){if(drawCount===0)return;const extension=extensions.get("WEBGL_multi_draw");if(extension===null){for(let i=0;i<starts.length;i++){renderInstances(starts[i]/bytesPerElement,counts[i],primcount[i])}}else{extension.multiDrawElementsInstancedWEBGL(mode,counts,0,type,starts,0,primcount,0,drawCount);let elementCount=0;for(let i=0;i<drawCount;i++){elementCount+=counts[i]*primcount[i]}info.update(elementCount,mode,1)}}this.setMode=setMode;this.setIndex=setIndex;this.render=render;this.renderInstances=renderInstances;this.renderMultiDraw=renderMultiDraw;this.renderMultiDrawInstances=renderMultiDrawInstances}function WebGLInfo(gl){const memory={geometries:0,textures:0};const render={frame:0,calls:0,triangles:0,points:0,lines:0};function update(count,mode,instanceCount){render.calls++;switch(mode){case gl.TRIANGLES:render.triangles+=instanceCount*(count/3);break;case gl.LINES:render.lines+=instanceCount*(count/2);break;case gl.LINE_STRIP:render.lines+=instanceCount*(count-1);break;case gl.LINE_LOOP:render.lines+=instanceCount*count;break;case gl.POINTS:render.points+=instanceCount*count;break;default:error("WebGLInfo: Unknown draw mode:",mode);break;}}function reset(){render.calls=0;render.triangles=0;render.points=0;render.lines=0}return{memory:memory,render:render,programs:null,autoReset:true,reset:reset,update:update}}function WebGLMorphtargets(gl,capabilities,textures){const morphTextures=new WeakMap;const morph=new Vector4;function update(object,geometry,program){const objectInfluences=object.morphTargetInfluences;const morphAttribute=geometry.morphAttributes.position||geometry.morphAttributes.normal||geometry.morphAttributes.color;const morphTargetsCount=morphAttribute!==undefined?morphAttribute.length:0;let entry=morphTextures.get(geometry);if(entry===undefined||entry.count!==morphTargetsCount){if(entry!==undefined)entry.texture.dispose();const hasMorphPosition=geometry.morphAttributes.position!==undefined;const hasMorphNormals=geometry.morphAttributes.normal!==undefined;const hasMorphColors=geometry.morphAttributes.color!==undefined;const morphTargets=geometry.morphAttributes.position||[];const morphNormals=geometry.morphAttributes.normal||[];const morphColors=geometry.morphAttributes.color||[];let vertexDataCount=0;if(hasMorphPosition===true)vertexDataCount=1;if(hasMorphNormals===true)vertexDataCount=2;if(hasMorphColors===true)vertexDataCount=3;let width=geometry.attributes.position.count*vertexDataCount;let height=1;if(width>capabilities.maxTextureSize){height=Math.ceil(width/capabilities.maxTextureSize);width=capabilities.maxTextureSize}const buffer=new Float32Array(width*height*4*morphTargetsCount);const texture=new DataArrayTexture(buffer,width,height,morphTargetsCount);texture.type=FloatType;texture.needsUpdate=true;const vertexDataStride=vertexDataCount*4;for(let i=0;i<morphTargetsCount;i++){const morphTarget=morphTargets[i];const morphNormal=morphNormals[i];const morphColor=morphColors[i];const offset=width*height*4*i;for(let j=0;j<morphTarget.count;j++){const stride=j*vertexDataStride;if(hasMorphPosition===true){morph.fromBufferAttribute(morphTarget,j);buffer[offset+stride+0]=morph.x;buffer[offset+stride+1]=morph.y;buffer[offset+stride+2]=morph.z;buffer[offset+stride+3]=0}if(hasMorphNormals===true){morph.fromBufferAttribute(morphNormal,j);buffer[offset+stride+4]=morph.x;buffer[offset+stride+5]=morph.y;buffer[offset+stride+6]=morph.z;buffer[offset+stride+7]=0}if(hasMorphColors===true){morph.fromBufferAttribute(morphColor,j);buffer[offset+stride+8]=morph.x;buffer[offset+stride+9]=morph.y;buffer[offset+stride+10]=morph.z;buffer[offset+stride+11]=morphColor.itemSize===4?morph.w:1}}}entry={count:morphTargetsCount,texture:texture,size:new Vector2(width,height)};morphTextures.set(geometry,entry);function disposeTexture(){texture.dispose();morphTextures.delete(geometry);geometry.removeEventListener("dispose",disposeTexture)}geometry.addEventListener("dispose",disposeTexture)}if(object.isInstancedMesh===true&&object.morphTexture!==null){program.getUniforms().setValue(gl,"morphTexture",object.morphTexture,textures)}else{let morphInfluencesSum=0;for(let i=0;i<objectInfluences.length;i++){morphInfluencesSum+=objectInfluences[i]}const morphBaseInfluence=geometry.morphTargetsRelative?1:1-morphInfluencesSum;program.getUniforms().setValue(gl,"morphTargetBaseInfluence",morphBaseInfluence);program.getUniforms().setValue(gl,"morphTargetInfluences",objectInfluences)}program.getUniforms().setValue(gl,"morphTargetsTexture",entry.texture,textures);program.getUniforms().setValue(gl,"morphTargetsTextureSize",entry.size)}return{update:update}}function WebGLObjects(gl,geometries,attributes,info){let updateMap=new WeakMap;function update(object){const frame=info.render.frame;const geometry=object.geometry;const buffergeometry=geometries.get(object,geometry);if(updateMap.get(buffergeometry)!==frame){geometries.update(buffergeometry);updateMap.set(buffergeometry,frame)}if(object.isInstancedMesh){if(object.hasEventListener("dispose",onInstancedMeshDispose)===false){object.addEventListener("dispose",onInstancedMeshDispose)}if(updateMap.get(object)!==frame){attributes.update(object.instanceMatrix,gl.ARRAY_BUFFER);if(object.instanceColor!==null){attributes.update(object.instanceColor,gl.ARRAY_BUFFER)}updateMap.set(object,frame)}}if(object.isSkinnedMesh){const skeleton=object.skeleton;if(updateMap.get(skeleton)!==frame){skeleton.update();updateMap.set(skeleton,frame)}}return buffergeometry}function dispose(){updateMap=new WeakMap}function onInstancedMeshDispose(event){const instancedMesh=event.target;instancedMesh.removeEventListener("dispose",onInstancedMeshDispose);attributes.remove(instancedMesh.instanceMatrix);if(instancedMesh.instanceColor!==null)attributes.remove(instancedMesh.instanceColor)}return{update:update,dispose:dispose}}const toneMappingMap={[LinearToneMapping]:"LINEAR_TONE_MAPPING",[ReinhardToneMapping]:"REINHARD_TONE_MAPPING",[CineonToneMapping]:"CINEON_TONE_MAPPING",[ACESFilmicToneMapping]:"ACES_FILMIC_TONE_MAPPING",[AgXToneMapping]:"AGX_TONE_MAPPING",[NeutralToneMapping]:"NEUTRAL_TONE_MAPPING",[CustomToneMapping]:"CUSTOM_TONE_MAPPING"};function WebGLOutput(type,width,height,depth,stencil){const targetA=new WebGLRenderTarget(width,height,{type:type,depthBuffer:depth,stencilBuffer:stencil});const targetB=new WebGLRenderTarget(width,height,{type:HalfFloatType,depthBuffer:false,stencilBuffer:false});const geometry=new BufferGeometry;geometry.setAttribute("position",new Float32BufferAttribute([-1,3,0,-1,-1,0,3,-1,0],3));geometry.setAttribute("uv",new Float32BufferAttribute([0,2,0,0,2,0],2));const material=new RawShaderMaterial({uniforms:{tDiffuse:{value:null}},vertexShader:`
			precision highp float;

			uniform mat4 modelViewMatrix;
			uniform mat4 projectionMatrix;

			attribute vec3 position;
			attribute vec2 uv;

			varying vec2 vUv;

			void main() {
				vUv = uv;
				gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
			}`,fragmentShader:`
			precision highp float;

			uniform sampler2D tDiffuse;

			varying vec2 vUv;

			#include <tonemapping_pars_fragment>
			#include <colorspace_pars_fragment>

			void main() {
				gl_FragColor = texture2D( tDiffuse, vUv );

				#ifdef LINEAR_TONE_MAPPING
					gl_FragColor.rgb = LinearToneMapping( gl_FragColor.rgb );
				#elif defined( REINHARD_TONE_MAPPING )
					gl_FragColor.rgb = ReinhardToneMapping( gl_FragColor.rgb );
				#elif defined( CINEON_TONE_MAPPING )
					gl_FragColor.rgb = CineonToneMapping( gl_FragColor.rgb );
				#elif defined( ACES_FILMIC_TONE_MAPPING )
					gl_FragColor.rgb = ACESFilmicToneMapping( gl_FragColor.rgb );
				#elif defined( AGX_TONE_MAPPING )
					gl_FragColor.rgb = AgXToneMapping( gl_FragColor.rgb );
				#elif defined( NEUTRAL_TONE_MAPPING )
					gl_FragColor.rgb = NeutralToneMapping( gl_FragColor.rgb );
				#elif defined( CUSTOM_TONE_MAPPING )
					gl_FragColor.rgb = CustomToneMapping( gl_FragColor.rgb );
				#endif

				#ifdef SRGB_TRANSFER
					gl_FragColor = sRGBTransferOETF( gl_FragColor );
				#endif
			}`,depthTest:false,depthWrite:false});const mesh=new Mesh(geometry,material);const camera=new OrthographicCamera(-1,1,1,-1,0,1);let _outputColorSpace=null;let _outputToneMapping=null;let _isCompositing=false;let _savedToneMapping;let _savedRenderTarget=null;let _effects=[];let _hasRenderPass=false;this.setSize=function(width,height){targetA.setSize(width,height);targetB.setSize(width,height);for(let i=0;i<_effects.length;i++){const effect=_effects[i];if(effect.setSize)effect.setSize(width,height)}};this.setEffects=function(effects){_effects=effects;_hasRenderPass=_effects.length>0&&_effects[0].isRenderPass===true;const width=targetA.width;const height=targetA.height;for(let i=0;i<_effects.length;i++){const effect=_effects[i];if(effect.setSize)effect.setSize(width,height)}};this.begin=function(renderer,renderTarget){if(_isCompositing)return false;if(renderer.toneMapping===NoToneMapping&&_effects.length===0)return false;_savedRenderTarget=renderTarget;if(renderTarget!==null){const width=renderTarget.width;const height=renderTarget.height;if(targetA.width!==width||targetA.height!==height){this.setSize(width,height)}}if(_hasRenderPass===false){renderer.setRenderTarget(targetA)}_savedToneMapping=renderer.toneMapping;renderer.toneMapping=NoToneMapping;return true};this.hasRenderPass=function(){return _hasRenderPass};this.end=function(renderer,deltaTime){renderer.toneMapping=_savedToneMapping;_isCompositing=true;let readBuffer=targetA;let writeBuffer=targetB;for(let i=0;i<_effects.length;i++){const effect=_effects[i];if(effect.enabled===false)continue;effect.render(renderer,writeBuffer,readBuffer,deltaTime);if(effect.needsSwap!==false){const temp=readBuffer;readBuffer=writeBuffer;writeBuffer=temp}}if(_outputColorSpace!==renderer.outputColorSpace||_outputToneMapping!==renderer.toneMapping){_outputColorSpace=renderer.outputColorSpace;_outputToneMapping=renderer.toneMapping;material.defines={};if(ColorManagement.getTransfer(_outputColorSpace)===SRGBTransfer)material.defines.SRGB_TRANSFER="";const toneMapping=toneMappingMap[_outputToneMapping];if(toneMapping)material.defines[toneMapping]="";material.needsUpdate=true}material.uniforms.tDiffuse.value=readBuffer.texture;renderer.setRenderTarget(_savedRenderTarget);renderer.render(mesh,camera);_savedRenderTarget=null;_isCompositing=false};this.isCompositing=function(){return _isCompositing};this.dispose=function(){targetA.dispose();targetB.dispose();geometry.dispose();material.dispose()}}const emptyTexture=new Texture;const emptyShadowTexture=new DepthTexture(1,1);const emptyArrayTexture=new DataArrayTexture;const empty3dTexture=new Data3DTexture;const emptyCubeTexture=new CubeTexture;const arrayCacheF32=[];const arrayCacheI32=[];const mat4array=new Float32Array(16);const mat3array=new Float32Array(9);const mat2array=new Float32Array(4);function flatten(array,nBlocks,blockSize){const firstElem=array[0];if(firstElem<=0||firstElem>0)return array;const n=nBlocks*blockSize;let r=arrayCacheF32[n];if(r===undefined){r=new Float32Array(n);arrayCacheF32[n]=r}if(nBlocks!==0){firstElem.toArray(r,0);for(let i=1,offset=0;i!==nBlocks;++i){offset+=blockSize;array[i].toArray(r,offset)}}return r}function arraysEqual(a,b){if(a.length!==b.length)return false;for(let i=0,l=a.length;i<l;i++){if(a[i]!==b[i])return false}return true}function copyArray(a,b){for(let i=0,l=b.length;i<l;i++){a[i]=b[i]}}function allocTexUnits(textures,n){let r=arrayCacheI32[n];if(r===undefined){r=new Int32Array(n);arrayCacheI32[n]=r}for(let i=0;i!==n;++i){r[i]=textures.allocateTextureUnit()}return r}function setValueV1f(gl,v){const cache=this.cache;if(cache[0]===v)return;gl.uniform1f(this.addr,v);cache[0]=v}function setValueV2f(gl,v){const cache=this.cache;if(v.x!==undefined){if(cache[0]!==v.x||cache[1]!==v.y){gl.uniform2f(this.addr,v.x,v.y);cache[0]=v.x;cache[1]=v.y}}else{if(arraysEqual(cache,v))return;gl.uniform2fv(this.addr,v);copyArray(cache,v)}}function setValueV3f(gl,v){const cache=this.cache;if(v.x!==undefined){if(cache[0]!==v.x||cache[1]!==v.y||cache[2]!==v.z){gl.uniform3f(this.addr,v.x,v.y,v.z);cache[0]=v.x;cache[1]=v.y;cache[2]=v.z}}else if(v.r!==undefined){if(cache[0]!==v.r||cache[1]!==v.g||cache[2]!==v.b){gl.uniform3f(this.addr,v.r,v.g,v.b);cache[0]=v.r;cache[1]=v.g;cache[2]=v.b}}else{if(arraysEqual(cache,v))return;gl.uniform3fv(this.addr,v);copyArray(cache,v)}}function setValueV4f(gl,v){const cache=this.cache;if(v.x!==undefined){if(cache[0]!==v.x||cache[1]!==v.y||cache[2]!==v.z||cache[3]!==v.w){gl.uniform4f(this.addr,v.x,v.y,v.z,v.w);cache[0]=v.x;cache[1]=v.y;cache[2]=v.z;cache[3]=v.w}}else{if(arraysEqual(cache,v))return;gl.uniform4fv(this.addr,v);copyArray(cache,v)}}function setValueM2(gl,v){const cache=this.cache;const elements=v.elements;if(elements===undefined){if(arraysEqual(cache,v))return;gl.uniformMatrix2fv(this.addr,false,v);copyArray(cache,v)}else{if(arraysEqual(cache,elements))return;mat2array.set(elements);gl.uniformMatrix2fv(this.addr,false,mat2array);copyArray(cache,elements)}}function setValueM3(gl,v){const cache=this.cache;const elements=v.elements;if(elements===undefined){if(arraysEqual(cache,v))return;gl.uniformMatrix3fv(this.addr,false,v);copyArray(cache,v)}else{if(arraysEqual(cache,elements))return;mat3array.set(elements);gl.uniformMatrix3fv(this.addr,false,mat3array);copyArray(cache,elements)}}function setValueM4(gl,v){const cache=this.cache;const elements=v.elements;if(elements===undefined){if(arraysEqual(cache,v))return;gl.uniformMatrix4fv(this.addr,false,v);copyArray(cache,v)}else{if(arraysEqual(cache,elements))return;mat4array.set(elements);gl.uniformMatrix4fv(this.addr,false,mat4array);copyArray(cache,elements)}}function setValueV1i(gl,v){const cache=this.cache;if(cache[0]===v)return;gl.uniform1i(this.addr,v);cache[0]=v}function setValueV2i(gl,v){const cache=this.cache;if(v.x!==undefined){if(cache[0]!==v.x||cache[1]!==v.y){gl.uniform2i(this.addr,v.x,v.y);cache[0]=v.x;cache[1]=v.y}}else{if(arraysEqual(cache,v))return;gl.uniform2iv(this.addr,v);copyArray(cache,v)}}function setValueV3i(gl,v){const cache=this.cache;if(v.x!==undefined){if(cache[0]!==v.x||cache[1]!==v.y||cache[2]!==v.z){gl.uniform3i(this.addr,v.x,v.y,v.z);cache[0]=v.x;cache[1]=v.y;cache[2]=v.z}}else{if(arraysEqual(cache,v))return;gl.uniform3iv(this.addr,v);copyArray(cache,v)}}function setValueV4i(gl,v){const cache=this.cache;if(v.x!==undefined){if(cache[0]!==v.x||cache[1]!==v.y||cache[2]!==v.z||cache[3]!==v.w){gl.uniform4i(this.addr,v.x,v.y,v.z,v.w);cache[0]=v.x;cache[1]=v.y;cache[2]=v.z;cache[3]=v.w}}else{if(arraysEqual(cache,v))return;gl.uniform4iv(this.addr,v);copyArray(cache,v)}}function setValueV1ui(gl,v){const cache=this.cache;if(cache[0]===v)return;gl.uniform1ui(this.addr,v);cache[0]=v}function setValueV2ui(gl,v){const cache=this.cache;if(v.x!==undefined){if(cache[0]!==v.x||cache[1]!==v.y){gl.uniform2ui(this.addr,v.x,v.y);cache[0]=v.x;cache[1]=v.y}}else{if(arraysEqual(cache,v))return;gl.uniform2uiv(this.addr,v);copyArray(cache,v)}}function setValueV3ui(gl,v){const cache=this.cache;if(v.x!==undefined){if(cache[0]!==v.x||cache[1]!==v.y||cache[2]!==v.z){gl.uniform3ui(this.addr,v.x,v.y,v.z);cache[0]=v.x;cache[1]=v.y;cache[2]=v.z}}else{if(arraysEqual(cache,v))return;gl.uniform3uiv(this.addr,v);copyArray(cache,v)}}function setValueV4ui(gl,v){const cache=this.cache;if(v.x!==undefined){if(cache[0]!==v.x||cache[1]!==v.y||cache[2]!==v.z||cache[3]!==v.w){gl.uniform4ui(this.addr,v.x,v.y,v.z,v.w);cache[0]=v.x;cache[1]=v.y;cache[2]=v.z;cache[3]=v.w}}else{if(arraysEqual(cache,v))return;gl.uniform4uiv(this.addr,v);copyArray(cache,v)}}function setValueT1(gl,v,textures){const cache=this.cache;const unit=textures.allocateTextureUnit();if(cache[0]!==unit){gl.uniform1i(this.addr,unit);cache[0]=unit}let emptyTexture2D;if(this.type===gl.SAMPLER_2D_SHADOW){emptyShadowTexture.compareFunction=textures.isReversedDepthBuffer()?GreaterEqualCompare:LessEqualCompare;emptyTexture2D=emptyShadowTexture}else{emptyTexture2D=emptyTexture}textures.setTexture2D(v||emptyTexture2D,unit)}function setValueT3D1(gl,v,textures){const cache=this.cache;const unit=textures.allocateTextureUnit();if(cache[0]!==unit){gl.uniform1i(this.addr,unit);cache[0]=unit}textures.setTexture3D(v||empty3dTexture,unit)}function setValueT6(gl,v,textures){const cache=this.cache;const unit=textures.allocateTextureUnit();if(cache[0]!==unit){gl.uniform1i(this.addr,unit);cache[0]=unit}textures.setTextureCube(v||emptyCubeTexture,unit)}function setValueT2DArray1(gl,v,textures){const cache=this.cache;const unit=textures.allocateTextureUnit();if(cache[0]!==unit){gl.uniform1i(this.addr,unit);cache[0]=unit}textures.setTexture2DArray(v||emptyArrayTexture,unit)}function getSingularSetter(type){switch(type){case 5126:return setValueV1f;case 35664:return setValueV2f;case 35665:return setValueV3f;case 35666:return setValueV4f;case 35674:return setValueM2;case 35675:return setValueM3;case 35676:return setValueM4;case 5124:case 35670:return setValueV1i;case 35667:case 35671:return setValueV2i;case 35668:case 35672:return setValueV3i;case 35669:case 35673:return setValueV4i;case 5125:return setValueV1ui;case 36294:return setValueV2ui;case 36295:return setValueV3ui;case 36296:return setValueV4ui;case 35678:case 36198:case 36298:case 36306:case 35682:return setValueT1;case 35679:case 36299:case 36307:return setValueT3D1;case 35680:case 36300:case 36308:case 36293:return setValueT6;case 36289:case 36303:case 36311:case 36292:return setValueT2DArray1;}}function setValueV1fArray(gl,v){gl.uniform1fv(this.addr,v)}function setValueV2fArray(gl,v){const data=flatten(v,this.size,2);gl.uniform2fv(this.addr,data)}function setValueV3fArray(gl,v){const data=flatten(v,this.size,3);gl.uniform3fv(this.addr,data)}function setValueV4fArray(gl,v){const data=flatten(v,this.size,4);gl.uniform4fv(this.addr,data)}function setValueM2Array(gl,v){const data=flatten(v,this.size,4);gl.uniformMatrix2fv(this.addr,false,data)}function setValueM3Array(gl,v){const data=flatten(v,this.size,9);gl.uniformMatrix3fv(this.addr,false,data)}function setValueM4Array(gl,v){const data=flatten(v,this.size,16);gl.uniformMatrix4fv(this.addr,false,data)}function setValueV1iArray(gl,v){gl.uniform1iv(this.addr,v)}function setValueV2iArray(gl,v){gl.uniform2iv(this.addr,v)}function setValueV3iArray(gl,v){gl.uniform3iv(this.addr,v)}function setValueV4iArray(gl,v){gl.uniform4iv(this.addr,v)}function setValueV1uiArray(gl,v){gl.uniform1uiv(this.addr,v)}function setValueV2uiArray(gl,v){gl.uniform2uiv(this.addr,v)}function setValueV3uiArray(gl,v){gl.uniform3uiv(this.addr,v)}function setValueV4uiArray(gl,v){gl.uniform4uiv(this.addr,v)}function setValueT1Array(gl,v,textures){const cache=this.cache;const n=v.length;const units=allocTexUnits(textures,n);if(!arraysEqual(cache,units)){gl.uniform1iv(this.addr,units);copyArray(cache,units)}let emptyTexture2D;if(this.type===gl.SAMPLER_2D_SHADOW){emptyTexture2D=emptyShadowTexture}else{emptyTexture2D=emptyTexture}for(let i=0;i!==n;++i){textures.setTexture2D(v[i]||emptyTexture2D,units[i])}}function setValueT3DArray(gl,v,textures){const cache=this.cache;const n=v.length;const units=allocTexUnits(textures,n);if(!arraysEqual(cache,units)){gl.uniform1iv(this.addr,units);copyArray(cache,units)}for(let i=0;i!==n;++i){textures.setTexture3D(v[i]||empty3dTexture,units[i])}}function setValueT6Array(gl,v,textures){const cache=this.cache;const n=v.length;const units=allocTexUnits(textures,n);if(!arraysEqual(cache,units)){gl.uniform1iv(this.addr,units);copyArray(cache,units)}for(let i=0;i!==n;++i){textures.setTextureCube(v[i]||emptyCubeTexture,units[i])}}function setValueT2DArrayArray(gl,v,textures){const cache=this.cache;const n=v.length;const units=allocTexUnits(textures,n);if(!arraysEqual(cache,units)){gl.uniform1iv(this.addr,units);copyArray(cache,units)}for(let i=0;i!==n;++i){textures.setTexture2DArray(v[i]||emptyArrayTexture,units[i])}}function getPureArraySetter(type){switch(type){case 5126:return setValueV1fArray;case 35664:return setValueV2fArray;case 35665:return setValueV3fArray;case 35666:return setValueV4fArray;case 35674:return setValueM2Array;case 35675:return setValueM3Array;case 35676:return setValueM4Array;case 5124:case 35670:return setValueV1iArray;case 35667:case 35671:return setValueV2iArray;case 35668:case 35672:return setValueV3iArray;case 35669:case 35673:return setValueV4iArray;case 5125:return setValueV1uiArray;case 36294:return setValueV2uiArray;case 36295:return setValueV3uiArray;case 36296:return setValueV4uiArray;case 35678:case 36198:case 36298:case 36306:case 35682:return setValueT1Array;case 35679:case 36299:case 36307:return setValueT3DArray;case 35680:case 36300:case 36308:case 36293:return setValueT6Array;case 36289:case 36303:case 36311:case 36292:return setValueT2DArrayArray;}}class SingleUniform{constructor(id,activeInfo,addr){this.id=id;this.addr=addr;this.cache=[];this.type=activeInfo.type;this.setValue=getSingularSetter(activeInfo.type)}}class PureArrayUniform{constructor(id,activeInfo,addr){this.id=id;this.addr=addr;this.cache=[];this.type=activeInfo.type;this.size=activeInfo.size;this.setValue=getPureArraySetter(activeInfo.type)}}class StructuredUniform{constructor(id){this.id=id;this.seq=[];this.map={}}setValue(gl,value,textures){const seq=this.seq;for(let i=0,n=seq.length;i!==n;++i){const u=seq[i];u.setValue(gl,value[u.id],textures)}}}const RePathPart=/(\w+)(\])?(\[|\.)?/g;function addUniform(container,uniformObject){container.seq.push(uniformObject);container.map[uniformObject.id]=uniformObject}function parseUniform(activeInfo,addr,container){const path=activeInfo.name,pathLength=path.length;RePathPart.lastIndex=0;while(true){const match=RePathPart.exec(path),matchEnd=RePathPart.lastIndex;let id=match[1];const idIsIndex=match[2]==="]",subscript=match[3];if(idIsIndex)id=id|0;if(subscript===undefined||subscript==="["&&matchEnd+2===pathLength){addUniform(container,subscript===undefined?new SingleUniform(id,activeInfo,addr):new PureArrayUniform(id,activeInfo,addr));break}else{const map=container.map;let next=map[id];if(next===undefined){next=new StructuredUniform(id);addUniform(container,next)}container=next}}}class WebGLUniforms{constructor(gl,program){this.seq=[];this.map={};const n=gl.getProgramParameter(program,gl.ACTIVE_UNIFORMS);for(let i=0;i<n;++i){const info=gl.getActiveUniform(program,i),addr=gl.getUniformLocation(program,info.name);parseUniform(info,addr,this)}const shadowSamplers=[];const otherUniforms=[];for(const u of this.seq){if(u.type===gl.SAMPLER_2D_SHADOW||u.type===gl.SAMPLER_CUBE_SHADOW||u.type===gl.SAMPLER_2D_ARRAY_SHADOW){shadowSamplers.push(u)}else{otherUniforms.push(u)}}if(shadowSamplers.length>0){this.seq=shadowSamplers.concat(otherUniforms)}}setValue(gl,name,value,textures){const u=this.map[name];if(u!==undefined)u.setValue(gl,value,textures)}setOptional(gl,object,name){const v=object[name];if(v!==undefined)this.setValue(gl,name,v)}static upload(gl,seq,values,textures){for(let i=0,n=seq.length;i!==n;++i){const u=seq[i],v=values[u.id];if(v.needsUpdate!==false){u.setValue(gl,v.value,textures)}}}static seqWithValue(seq,values){const r=[];for(let i=0,n=seq.length;i!==n;++i){const u=seq[i];if(u.id in values)r.push(u)}return r}}function WebGLShader(gl,type,string){const shader=gl.createShader(type);gl.shaderSource(shader,string);gl.compileShader(shader);return shader}const COMPLETION_STATUS_KHR=37297;let programIdCount=0;function handleSource(string,errorLine){const lines=string.split("\n");const lines2=[];const from=Math.max(errorLine-6,0);const to=Math.min(errorLine+6,lines.length);for(let i=from;i<to;i++){const line=i+1;lines2.push(`${line===errorLine?">":" "} ${line}: ${lines[i]}`)}return lines2.join("\n")}const _m0=new Matrix3;function getEncodingComponents(colorSpace){ColorManagement._getMatrix(_m0,ColorManagement.workingColorSpace,colorSpace);const encodingMatrix=`mat3( ${_m0.elements.map(v=>v.toFixed(4))} )`;switch(ColorManagement.getTransfer(colorSpace)){case LinearTransfer:return[encodingMatrix,"LinearTransferOETF"];case SRGBTransfer:return[encodingMatrix,"sRGBTransferOETF"];default:warn("WebGLProgram: Unsupported color space: ",colorSpace);return[encodingMatrix,"LinearTransferOETF"];}}function getShaderErrors(gl,shader,type){const status=gl.getShaderParameter(shader,gl.COMPILE_STATUS);const shaderInfoLog=gl.getShaderInfoLog(shader)||"";const errors=shaderInfoLog.trim();if(status&&errors==="")return"";const errorMatches=/ERROR: 0:(\d+)/.exec(errors);if(errorMatches){const errorLine=parseInt(errorMatches[1]);return type.toUpperCase()+"\n\n"+errors+"\n\n"+handleSource(gl.getShaderSource(shader),errorLine)}else{return errors}}function getTexelEncodingFunction(functionName,colorSpace){const components=getEncodingComponents(colorSpace);return[`vec4 ${functionName}( vec4 value ) {`,`	return ${components[1]}( vec4( value.rgb * ${components[0]}, value.a ) );`,"}"].join("\n")}const toneMappingFunctions={[LinearToneMapping]:"Linear",[ReinhardToneMapping]:"Reinhard",[CineonToneMapping]:"Cineon",[ACESFilmicToneMapping]:"ACESFilmic",[AgXToneMapping]:"AgX",[NeutralToneMapping]:"Neutral",[CustomToneMapping]:"Custom"};function getToneMappingFunction(functionName,toneMapping){const toneMappingName=toneMappingFunctions[toneMapping];if(toneMappingName===undefined){warn("WebGLProgram: Unsupported toneMapping:",toneMapping);return"vec3 "+functionName+"( vec3 color ) { return LinearToneMapping( color ); }"}return"vec3 "+functionName+"( vec3 color ) { return "+toneMappingName+"ToneMapping( color ); }"}const _v0=new Vector3;function getLuminanceFunction(){ColorManagement.getLuminanceCoefficients(_v0);const r=_v0.x.toFixed(4);const g=_v0.y.toFixed(4);const b=_v0.z.toFixed(4);return["float luminance( const in vec3 rgb ) {",`	const vec3 weights = vec3( ${r}, ${g}, ${b} );`,"\treturn dot( weights, rgb );","}"].join("\n")}function generateVertexExtensions(parameters){const chunks=[parameters.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",parameters.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""];return chunks.filter(filterEmptyLine).join("\n")}function generateDefines(defines){const chunks=[];for(const name in defines){const value=defines[name];if(value===false)continue;chunks.push("#define "+name+" "+value)}return chunks.join("\n")}function fetchAttributeLocations(gl,program){const attributes={};const n=gl.getProgramParameter(program,gl.ACTIVE_ATTRIBUTES);for(let i=0;i<n;i++){const info=gl.getActiveAttrib(program,i);const name=info.name;let locationSize=1;if(info.type===gl.FLOAT_MAT2)locationSize=2;if(info.type===gl.FLOAT_MAT3)locationSize=3;if(info.type===gl.FLOAT_MAT4)locationSize=4;attributes[name]={type:info.type,location:gl.getAttribLocation(program,name),locationSize:locationSize}}return attributes}function filterEmptyLine(string){return string!==""}function replaceLightNums(string,parameters){const numSpotLightCoords=parameters.numSpotLightShadows+parameters.numSpotLightMaps-parameters.numSpotLightShadowsWithMaps;return string.replace(/NUM_DIR_LIGHTS/g,parameters.numDirLights).replace(/NUM_SPOT_LIGHTS/g,parameters.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,parameters.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,numSpotLightCoords).replace(/NUM_RECT_AREA_LIGHTS/g,parameters.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,parameters.numPointLights).replace(/NUM_HEMI_LIGHTS/g,parameters.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,parameters.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,parameters.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,parameters.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,parameters.numPointLightShadows)}function replaceClippingPlaneNums(string,parameters){return string.replace(/NUM_CLIPPING_PLANES/g,parameters.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,parameters.numClippingPlanes-parameters.numClipIntersection)}const includePattern=/^[ \t]*#include +<([\w\d./]+)>/gm;function resolveIncludes(string){return string.replace(includePattern,includeReplacer)}const shaderChunkMap=new Map;function includeReplacer(match,include){let string=ShaderChunk[include];if(string===undefined){const newInclude=shaderChunkMap.get(include);if(newInclude!==undefined){string=ShaderChunk[newInclude];warn("WebGLRenderer: Shader chunk \"%s\" has been deprecated. Use \"%s\" instead.",include,newInclude)}else{throw new Error("Can not resolve #include <"+include+">")}}return resolveIncludes(string)}const unrollLoopPattern=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function unrollLoops(string){return string.replace(unrollLoopPattern,loopReplacer)}function loopReplacer(match,start,end,snippet){let string="";for(let i=parseInt(start);i<parseInt(end);i++){string+=snippet.replace(/\[\s*i\s*\]/g,"[ "+i+" ]").replace(/UNROLLED_LOOP_INDEX/g,i)}return string}function generatePrecision(parameters){let precisionstring=`precision ${parameters.precision} float;
	precision ${parameters.precision} int;
	precision ${parameters.precision} sampler2D;
	precision ${parameters.precision} samplerCube;
	precision ${parameters.precision} sampler3D;
	precision ${parameters.precision} sampler2DArray;
	precision ${parameters.precision} sampler2DShadow;
	precision ${parameters.precision} samplerCubeShadow;
	precision ${parameters.precision} sampler2DArrayShadow;
	precision ${parameters.precision} isampler2D;
	precision ${parameters.precision} isampler3D;
	precision ${parameters.precision} isamplerCube;
	precision ${parameters.precision} isampler2DArray;
	precision ${parameters.precision} usampler2D;
	precision ${parameters.precision} usampler3D;
	precision ${parameters.precision} usamplerCube;
	precision ${parameters.precision} usampler2DArray;
	`;if(parameters.precision==="highp"){precisionstring+="\n#define HIGH_PRECISION"}else if(parameters.precision==="mediump"){precisionstring+="\n#define MEDIUM_PRECISION"}else if(parameters.precision==="lowp"){precisionstring+="\n#define LOW_PRECISION"}return precisionstring}const shadowMapTypeDefines={[PCFShadowMap]:"SHADOWMAP_TYPE_PCF",[VSMShadowMap]:"SHADOWMAP_TYPE_VSM"};function generateShadowMapTypeDefine(parameters){return shadowMapTypeDefines[parameters.shadowMapType]||"SHADOWMAP_TYPE_BASIC"}const envMapTypeDefines={[CubeReflectionMapping]:"ENVMAP_TYPE_CUBE",[CubeRefractionMapping]:"ENVMAP_TYPE_CUBE",[CubeUVReflectionMapping]:"ENVMAP_TYPE_CUBE_UV"};function generateEnvMapTypeDefine(parameters){if(parameters.envMap===false)return"ENVMAP_TYPE_CUBE";return envMapTypeDefines[parameters.envMapMode]||"ENVMAP_TYPE_CUBE"}const envMapModeDefines={[CubeRefractionMapping]:"ENVMAP_MODE_REFRACTION"};function generateEnvMapModeDefine(parameters){if(parameters.envMap===false)return"ENVMAP_MODE_REFLECTION";return envMapModeDefines[parameters.envMapMode]||"ENVMAP_MODE_REFLECTION"}const envMapBlendingDefines={[MultiplyOperation]:"ENVMAP_BLENDING_MULTIPLY",[MixOperation]:"ENVMAP_BLENDING_MIX",[AddOperation]:"ENVMAP_BLENDING_ADD"};function generateEnvMapBlendingDefine(parameters){if(parameters.envMap===false)return"ENVMAP_BLENDING_NONE";return envMapBlendingDefines[parameters.combine]||"ENVMAP_BLENDING_NONE"}function generateCubeUVSize(parameters){const imageHeight=parameters.envMapCubeUVHeight;if(imageHeight===null)return null;const maxMip=Math.log2(imageHeight)-2;const texelHeight=1/imageHeight;const texelWidth=1/(3*Math.max(Math.pow(2,maxMip),7*16));return{texelWidth,texelHeight,maxMip}}function WebGLProgram(renderer,cacheKey,parameters,bindingStates){const gl=renderer.getContext();const defines=parameters.defines;let vertexShader=parameters.vertexShader;let fragmentShader=parameters.fragmentShader;const shadowMapTypeDefine=generateShadowMapTypeDefine(parameters);const envMapTypeDefine=generateEnvMapTypeDefine(parameters);const envMapModeDefine=generateEnvMapModeDefine(parameters);const envMapBlendingDefine=generateEnvMapBlendingDefine(parameters);const envMapCubeUVSize=generateCubeUVSize(parameters);const customVertexExtensions=generateVertexExtensions(parameters);const customDefines=generateDefines(defines);const program=gl.createProgram();let prefixVertex,prefixFragment;let versionString=parameters.glslVersion?"#version "+parameters.glslVersion+"\n":"";if(parameters.isRawShaderMaterial){prefixVertex=["#define SHADER_TYPE "+parameters.shaderType,"#define SHADER_NAME "+parameters.shaderName,customDefines].filter(filterEmptyLine).join("\n");if(prefixVertex.length>0){prefixVertex+="\n"}prefixFragment=["#define SHADER_TYPE "+parameters.shaderType,"#define SHADER_NAME "+parameters.shaderName,customDefines].filter(filterEmptyLine).join("\n");if(prefixFragment.length>0){prefixFragment+="\n"}}else{prefixVertex=[generatePrecision(parameters),"#define SHADER_TYPE "+parameters.shaderType,"#define SHADER_NAME "+parameters.shaderName,customDefines,parameters.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",parameters.batching?"#define USE_BATCHING":"",parameters.batchingColor?"#define USE_BATCHING_COLOR":"",parameters.instancing?"#define USE_INSTANCING":"",parameters.instancingColor?"#define USE_INSTANCING_COLOR":"",parameters.instancingMorph?"#define USE_INSTANCING_MORPH":"",parameters.useFog&&parameters.fog?"#define USE_FOG":"",parameters.useFog&&parameters.fogExp2?"#define FOG_EXP2":"",parameters.map?"#define USE_MAP":"",parameters.envMap?"#define USE_ENVMAP":"",parameters.envMap?"#define "+envMapModeDefine:"",parameters.lightMap?"#define USE_LIGHTMAP":"",parameters.aoMap?"#define USE_AOMAP":"",parameters.bumpMap?"#define USE_BUMPMAP":"",parameters.normalMap?"#define USE_NORMALMAP":"",parameters.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",parameters.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",parameters.displacementMap?"#define USE_DISPLACEMENTMAP":"",parameters.emissiveMap?"#define USE_EMISSIVEMAP":"",parameters.anisotropy?"#define USE_ANISOTROPY":"",parameters.anisotropyMap?"#define USE_ANISOTROPYMAP":"",parameters.clearcoatMap?"#define USE_CLEARCOATMAP":"",parameters.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",parameters.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",parameters.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",parameters.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",parameters.specularMap?"#define USE_SPECULARMAP":"",parameters.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",parameters.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",parameters.roughnessMap?"#define USE_ROUGHNESSMAP":"",parameters.metalnessMap?"#define USE_METALNESSMAP":"",parameters.alphaMap?"#define USE_ALPHAMAP":"",parameters.alphaHash?"#define USE_ALPHAHASH":"",parameters.transmission?"#define USE_TRANSMISSION":"",parameters.transmissionMap?"#define USE_TRANSMISSIONMAP":"",parameters.thicknessMap?"#define USE_THICKNESSMAP":"",parameters.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",parameters.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",parameters.mapUv?"#define MAP_UV "+parameters.mapUv:"",parameters.alphaMapUv?"#define ALPHAMAP_UV "+parameters.alphaMapUv:"",parameters.lightMapUv?"#define LIGHTMAP_UV "+parameters.lightMapUv:"",parameters.aoMapUv?"#define AOMAP_UV "+parameters.aoMapUv:"",parameters.emissiveMapUv?"#define EMISSIVEMAP_UV "+parameters.emissiveMapUv:"",parameters.bumpMapUv?"#define BUMPMAP_UV "+parameters.bumpMapUv:"",parameters.normalMapUv?"#define NORMALMAP_UV "+parameters.normalMapUv:"",parameters.displacementMapUv?"#define DISPLACEMENTMAP_UV "+parameters.displacementMapUv:"",parameters.metalnessMapUv?"#define METALNESSMAP_UV "+parameters.metalnessMapUv:"",parameters.roughnessMapUv?"#define ROUGHNESSMAP_UV "+parameters.roughnessMapUv:"",parameters.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+parameters.anisotropyMapUv:"",parameters.clearcoatMapUv?"#define CLEARCOATMAP_UV "+parameters.clearcoatMapUv:"",parameters.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+parameters.clearcoatNormalMapUv:"",parameters.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+parameters.clearcoatRoughnessMapUv:"",parameters.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+parameters.iridescenceMapUv:"",parameters.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+parameters.iridescenceThicknessMapUv:"",parameters.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+parameters.sheenColorMapUv:"",parameters.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+parameters.sheenRoughnessMapUv:"",parameters.specularMapUv?"#define SPECULARMAP_UV "+parameters.specularMapUv:"",parameters.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+parameters.specularColorMapUv:"",parameters.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+parameters.specularIntensityMapUv:"",parameters.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+parameters.transmissionMapUv:"",parameters.thicknessMapUv?"#define THICKNESSMAP_UV "+parameters.thicknessMapUv:"",parameters.vertexTangents&&parameters.flatShading===false?"#define USE_TANGENT":"",parameters.vertexColors?"#define USE_COLOR":"",parameters.vertexAlphas?"#define USE_COLOR_ALPHA":"",parameters.vertexUv1s?"#define USE_UV1":"",parameters.vertexUv2s?"#define USE_UV2":"",parameters.vertexUv3s?"#define USE_UV3":"",parameters.pointsUvs?"#define USE_POINTS_UV":"",parameters.flatShading?"#define FLAT_SHADED":"",parameters.skinning?"#define USE_SKINNING":"",parameters.morphTargets?"#define USE_MORPHTARGETS":"",parameters.morphNormals&&parameters.flatShading===false?"#define USE_MORPHNORMALS":"",parameters.morphColors?"#define USE_MORPHCOLORS":"",parameters.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+parameters.morphTextureStride:"",parameters.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+parameters.morphTargetsCount:"",parameters.doubleSided?"#define DOUBLE_SIDED":"",parameters.flipSided?"#define FLIP_SIDED":"",parameters.shadowMapEnabled?"#define USE_SHADOWMAP":"",parameters.shadowMapEnabled?"#define "+shadowMapTypeDefine:"",parameters.sizeAttenuation?"#define USE_SIZEATTENUATION":"",parameters.numLightProbes>0?"#define USE_LIGHT_PROBES":"",parameters.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",parameters.reversedDepthBuffer?"#define USE_REVERSED_DEPTH_BUFFER":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH","\tuniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1","\tattribute vec2 uv1;","#endif","#ifdef USE_UV2","\tattribute vec2 uv2;","#endif","#ifdef USE_UV3","\tattribute vec2 uv3;","#endif","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(filterEmptyLine).join("\n");prefixFragment=[generatePrecision(parameters),"#define SHADER_TYPE "+parameters.shaderType,"#define SHADER_NAME "+parameters.shaderName,customDefines,parameters.useFog&&parameters.fog?"#define USE_FOG":"",parameters.useFog&&parameters.fogExp2?"#define FOG_EXP2":"",parameters.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",parameters.map?"#define USE_MAP":"",parameters.matcap?"#define USE_MATCAP":"",parameters.envMap?"#define USE_ENVMAP":"",parameters.envMap?"#define "+envMapTypeDefine:"",parameters.envMap?"#define "+envMapModeDefine:"",parameters.envMap?"#define "+envMapBlendingDefine:"",envMapCubeUVSize?"#define CUBEUV_TEXEL_WIDTH "+envMapCubeUVSize.texelWidth:"",envMapCubeUVSize?"#define CUBEUV_TEXEL_HEIGHT "+envMapCubeUVSize.texelHeight:"",envMapCubeUVSize?"#define CUBEUV_MAX_MIP "+envMapCubeUVSize.maxMip+".0":"",parameters.lightMap?"#define USE_LIGHTMAP":"",parameters.aoMap?"#define USE_AOMAP":"",parameters.bumpMap?"#define USE_BUMPMAP":"",parameters.normalMap?"#define USE_NORMALMAP":"",parameters.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",parameters.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",parameters.emissiveMap?"#define USE_EMISSIVEMAP":"",parameters.anisotropy?"#define USE_ANISOTROPY":"",parameters.anisotropyMap?"#define USE_ANISOTROPYMAP":"",parameters.clearcoat?"#define USE_CLEARCOAT":"",parameters.clearcoatMap?"#define USE_CLEARCOATMAP":"",parameters.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",parameters.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",parameters.dispersion?"#define USE_DISPERSION":"",parameters.iridescence?"#define USE_IRIDESCENCE":"",parameters.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",parameters.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",parameters.specularMap?"#define USE_SPECULARMAP":"",parameters.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",parameters.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",parameters.roughnessMap?"#define USE_ROUGHNESSMAP":"",parameters.metalnessMap?"#define USE_METALNESSMAP":"",parameters.alphaMap?"#define USE_ALPHAMAP":"",parameters.alphaTest?"#define USE_ALPHATEST":"",parameters.alphaHash?"#define USE_ALPHAHASH":"",parameters.sheen?"#define USE_SHEEN":"",parameters.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",parameters.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",parameters.transmission?"#define USE_TRANSMISSION":"",parameters.transmissionMap?"#define USE_TRANSMISSIONMAP":"",parameters.thicknessMap?"#define USE_THICKNESSMAP":"",parameters.vertexTangents&&parameters.flatShading===false?"#define USE_TANGENT":"",parameters.vertexColors||parameters.instancingColor||parameters.batchingColor?"#define USE_COLOR":"",parameters.vertexAlphas?"#define USE_COLOR_ALPHA":"",parameters.vertexUv1s?"#define USE_UV1":"",parameters.vertexUv2s?"#define USE_UV2":"",parameters.vertexUv3s?"#define USE_UV3":"",parameters.pointsUvs?"#define USE_POINTS_UV":"",parameters.gradientMap?"#define USE_GRADIENTMAP":"",parameters.flatShading?"#define FLAT_SHADED":"",parameters.doubleSided?"#define DOUBLE_SIDED":"",parameters.flipSided?"#define FLIP_SIDED":"",parameters.shadowMapEnabled?"#define USE_SHADOWMAP":"",parameters.shadowMapEnabled?"#define "+shadowMapTypeDefine:"",parameters.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",parameters.numLightProbes>0?"#define USE_LIGHT_PROBES":"",parameters.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",parameters.decodeVideoTextureEmissive?"#define DECODE_VIDEO_TEXTURE_EMISSIVE":"",parameters.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",parameters.reversedDepthBuffer?"#define USE_REVERSED_DEPTH_BUFFER":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",parameters.toneMapping!==NoToneMapping?"#define TONE_MAPPING":"",parameters.toneMapping!==NoToneMapping?ShaderChunk["tonemapping_pars_fragment"]:"",parameters.toneMapping!==NoToneMapping?getToneMappingFunction("toneMapping",parameters.toneMapping):"",parameters.dithering?"#define DITHERING":"",parameters.opaque?"#define OPAQUE":"",ShaderChunk["colorspace_pars_fragment"],getTexelEncodingFunction("linearToOutputTexel",parameters.outputColorSpace),getLuminanceFunction(),parameters.useDepthPacking?"#define DEPTH_PACKING "+parameters.depthPacking:"","\n"].filter(filterEmptyLine).join("\n")}vertexShader=resolveIncludes(vertexShader);vertexShader=replaceLightNums(vertexShader,parameters);vertexShader=replaceClippingPlaneNums(vertexShader,parameters);fragmentShader=resolveIncludes(fragmentShader);fragmentShader=replaceLightNums(fragmentShader,parameters);fragmentShader=replaceClippingPlaneNums(fragmentShader,parameters);vertexShader=unrollLoops(vertexShader);fragmentShader=unrollLoops(fragmentShader);if(parameters.isRawShaderMaterial!==true){versionString="#version 300 es\n";prefixVertex=[customVertexExtensions,"#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+prefixVertex;prefixFragment=["#define varying in",parameters.glslVersion===GLSL3?"":"layout(location = 0) out highp vec4 pc_fragColor;",parameters.glslVersion===GLSL3?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+prefixFragment}const vertexGlsl=versionString+prefixVertex+vertexShader;const fragmentGlsl=versionString+prefixFragment+fragmentShader;const glVertexShader=WebGLShader(gl,gl.VERTEX_SHADER,vertexGlsl);const glFragmentShader=WebGLShader(gl,gl.FRAGMENT_SHADER,fragmentGlsl);gl.attachShader(program,glVertexShader);gl.attachShader(program,glFragmentShader);if(parameters.index0AttributeName!==undefined){gl.bindAttribLocation(program,0,parameters.index0AttributeName)}else if(parameters.morphTargets===true){gl.bindAttribLocation(program,0,"position")}gl.linkProgram(program);function onFirstUse(self){if(renderer.debug.checkShaderErrors){const programInfoLog=gl.getProgramInfoLog(program)||"";const vertexShaderInfoLog=gl.getShaderInfoLog(glVertexShader)||"";const fragmentShaderInfoLog=gl.getShaderInfoLog(glFragmentShader)||"";const programLog=programInfoLog.trim();const vertexLog=vertexShaderInfoLog.trim();const fragmentLog=fragmentShaderInfoLog.trim();let runnable=true;let haveDiagnostics=true;if(gl.getProgramParameter(program,gl.LINK_STATUS)===false){runnable=false;if(typeof renderer.debug.onShaderError==="function"){renderer.debug.onShaderError(gl,program,glVertexShader,glFragmentShader)}else{const vertexErrors=getShaderErrors(gl,glVertexShader,"vertex");const fragmentErrors=getShaderErrors(gl,glFragmentShader,"fragment");error("THREE.WebGLProgram: Shader Error "+gl.getError()+" - "+"VALIDATE_STATUS "+gl.getProgramParameter(program,gl.VALIDATE_STATUS)+"\n\n"+"Material Name: "+self.name+"\n"+"Material Type: "+self.type+"\n\n"+"Program Info Log: "+programLog+"\n"+vertexErrors+"\n"+fragmentErrors)}}else if(programLog!==""){warn("WebGLProgram: Program Info Log:",programLog)}else if(vertexLog===""||fragmentLog===""){haveDiagnostics=false}if(haveDiagnostics){self.diagnostics={runnable:runnable,programLog:programLog,vertexShader:{log:vertexLog,prefix:prefixVertex},fragmentShader:{log:fragmentLog,prefix:prefixFragment}}}}gl.deleteShader(glVertexShader);gl.deleteShader(glFragmentShader);cachedUniforms=new WebGLUniforms(gl,program);cachedAttributes=fetchAttributeLocations(gl,program)}let cachedUniforms;this.getUniforms=function(){if(cachedUniforms===undefined){onFirstUse(this)}return cachedUniforms};let cachedAttributes;this.getAttributes=function(){if(cachedAttributes===undefined){onFirstUse(this)}return cachedAttributes};let programReady=parameters.rendererExtensionParallelShaderCompile===false;this.isReady=function(){if(programReady===false){programReady=gl.getProgramParameter(program,COMPLETION_STATUS_KHR)}return programReady};this.destroy=function(){bindingStates.releaseStatesOfProgram(this);gl.deleteProgram(program);this.program=undefined};this.type=parameters.shaderType;this.name=parameters.shaderName;this.id=programIdCount++;this.cacheKey=cacheKey;this.usedTimes=1;this.program=program;this.vertexShader=glVertexShader;this.fragmentShader=glFragmentShader;return this}let _id=0;class WebGLShaderCache{constructor(){this.shaderCache=new Map;this.materialCache=new Map}update(material){const vertexShader=material.vertexShader;const fragmentShader=material.fragmentShader;const vertexShaderStage=this._getShaderStage(vertexShader);const fragmentShaderStage=this._getShaderStage(fragmentShader);const materialShaders=this._getShaderCacheForMaterial(material);if(materialShaders.has(vertexShaderStage)===false){materialShaders.add(vertexShaderStage);vertexShaderStage.usedTimes++}if(materialShaders.has(fragmentShaderStage)===false){materialShaders.add(fragmentShaderStage);fragmentShaderStage.usedTimes++}return this}remove(material){const materialShaders=this.materialCache.get(material);for(const shaderStage of materialShaders){shaderStage.usedTimes--;if(shaderStage.usedTimes===0)this.shaderCache.delete(shaderStage.code)}this.materialCache.delete(material);return this}getVertexShaderID(material){return this._getShaderStage(material.vertexShader).id}getFragmentShaderID(material){return this._getShaderStage(material.fragmentShader).id}dispose(){this.shaderCache.clear();this.materialCache.clear()}_getShaderCacheForMaterial(material){const cache=this.materialCache;let set=cache.get(material);if(set===undefined){set=new Set;cache.set(material,set)}return set}_getShaderStage(code){const cache=this.shaderCache;let stage=cache.get(code);if(stage===undefined){stage=new WebGLShaderStage(code);cache.set(code,stage)}return stage}}class WebGLShaderStage{constructor(code){this.id=_id++;this.code=code;this.usedTimes=0}}function WebGLPrograms(renderer,cubemaps,cubeuvmaps,extensions,capabilities,bindingStates,clipping){const _programLayers=new Layers;const _customShaders=new WebGLShaderCache;const _activeChannels=new Set;const programs=[];const programsMap=new Map;const logarithmicDepthBuffer=capabilities.logarithmicDepthBuffer;let precision=capabilities.precision;const shaderIDs={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distance",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function getChannel(value){_activeChannels.add(value);if(value===0)return"uv";return`uv${value}`}function getParameters(material,lights,shadows,scene,object){const fog=scene.fog;const geometry=object.geometry;const environment=material.isMeshStandardMaterial?scene.environment:null;const envMap=(material.isMeshStandardMaterial?cubeuvmaps:cubemaps).get(material.envMap||environment);const envMapCubeUVHeight=!!envMap&&envMap.mapping===CubeUVReflectionMapping?envMap.image.height:null;const shaderID=shaderIDs[material.type];if(material.precision!==null){precision=capabilities.getMaxPrecision(material.precision);if(precision!==material.precision){warn("WebGLProgram.getParameters:",material.precision,"not supported, using",precision,"instead.")}}const morphAttribute=geometry.morphAttributes.position||geometry.morphAttributes.normal||geometry.morphAttributes.color;const morphTargetsCount=morphAttribute!==undefined?morphAttribute.length:0;let morphTextureStride=0;if(geometry.morphAttributes.position!==undefined)morphTextureStride=1;if(geometry.morphAttributes.normal!==undefined)morphTextureStride=2;if(geometry.morphAttributes.color!==undefined)morphTextureStride=3;let vertexShader,fragmentShader;let customVertexShaderID,customFragmentShaderID;if(shaderID){const shader=ShaderLib[shaderID];vertexShader=shader.vertexShader;fragmentShader=shader.fragmentShader}else{vertexShader=material.vertexShader;fragmentShader=material.fragmentShader;_customShaders.update(material);customVertexShaderID=_customShaders.getVertexShaderID(material);customFragmentShaderID=_customShaders.getFragmentShaderID(material)}const currentRenderTarget=renderer.getRenderTarget();const reversedDepthBuffer=renderer.state.buffers.depth.getReversed();const IS_INSTANCEDMESH=object.isInstancedMesh===true;const IS_BATCHEDMESH=object.isBatchedMesh===true;const HAS_MAP=!!material.map;const HAS_MATCAP=!!material.matcap;const HAS_ENVMAP=!!envMap;const HAS_AOMAP=!!material.aoMap;const HAS_LIGHTMAP=!!material.lightMap;const HAS_BUMPMAP=!!material.bumpMap;const HAS_NORMALMAP=!!material.normalMap;const HAS_DISPLACEMENTMAP=!!material.displacementMap;const HAS_EMISSIVEMAP=!!material.emissiveMap;const HAS_METALNESSMAP=!!material.metalnessMap;const HAS_ROUGHNESSMAP=!!material.roughnessMap;const HAS_ANISOTROPY=material.anisotropy>0;const HAS_CLEARCOAT=material.clearcoat>0;const HAS_DISPERSION=material.dispersion>0;const HAS_IRIDESCENCE=material.iridescence>0;const HAS_SHEEN=material.sheen>0;const HAS_TRANSMISSION=material.transmission>0;const HAS_ANISOTROPYMAP=HAS_ANISOTROPY&&!!material.anisotropyMap;const HAS_CLEARCOATMAP=HAS_CLEARCOAT&&!!material.clearcoatMap;const HAS_CLEARCOAT_NORMALMAP=HAS_CLEARCOAT&&!!material.clearcoatNormalMap;const HAS_CLEARCOAT_ROUGHNESSMAP=HAS_CLEARCOAT&&!!material.clearcoatRoughnessMap;const HAS_IRIDESCENCEMAP=HAS_IRIDESCENCE&&!!material.iridescenceMap;const HAS_IRIDESCENCE_THICKNESSMAP=HAS_IRIDESCENCE&&!!material.iridescenceThicknessMap;const HAS_SHEEN_COLORMAP=HAS_SHEEN&&!!material.sheenColorMap;const HAS_SHEEN_ROUGHNESSMAP=HAS_SHEEN&&!!material.sheenRoughnessMap;const HAS_SPECULARMAP=!!material.specularMap;const HAS_SPECULAR_COLORMAP=!!material.specularColorMap;const HAS_SPECULAR_INTENSITYMAP=!!material.specularIntensityMap;const HAS_TRANSMISSIONMAP=HAS_TRANSMISSION&&!!material.transmissionMap;const HAS_THICKNESSMAP=HAS_TRANSMISSION&&!!material.thicknessMap;const HAS_GRADIENTMAP=!!material.gradientMap;const HAS_ALPHAMAP=!!material.alphaMap;const HAS_ALPHATEST=material.alphaTest>0;const HAS_ALPHAHASH=!!material.alphaHash;const HAS_EXTENSIONS=!!material.extensions;let toneMapping=NoToneMapping;if(material.toneMapped){if(currentRenderTarget===null||currentRenderTarget.isXRRenderTarget===true){toneMapping=renderer.toneMapping}}const parameters={shaderID:shaderID,shaderType:material.type,shaderName:material.name,vertexShader:vertexShader,fragmentShader:fragmentShader,defines:material.defines,customVertexShaderID:customVertexShaderID,customFragmentShaderID:customFragmentShaderID,isRawShaderMaterial:material.isRawShaderMaterial===true,glslVersion:material.glslVersion,precision:precision,batching:IS_BATCHEDMESH,batchingColor:IS_BATCHEDMESH&&object._colorsTexture!==null,instancing:IS_INSTANCEDMESH,instancingColor:IS_INSTANCEDMESH&&object.instanceColor!==null,instancingMorph:IS_INSTANCEDMESH&&object.morphTexture!==null,outputColorSpace:currentRenderTarget===null?renderer.outputColorSpace:currentRenderTarget.isXRRenderTarget===true?currentRenderTarget.texture.colorSpace:LinearSRGBColorSpace,alphaToCoverage:!!material.alphaToCoverage,map:HAS_MAP,matcap:HAS_MATCAP,envMap:HAS_ENVMAP,envMapMode:HAS_ENVMAP&&envMap.mapping,envMapCubeUVHeight:envMapCubeUVHeight,aoMap:HAS_AOMAP,lightMap:HAS_LIGHTMAP,bumpMap:HAS_BUMPMAP,normalMap:HAS_NORMALMAP,displacementMap:HAS_DISPLACEMENTMAP,emissiveMap:HAS_EMISSIVEMAP,normalMapObjectSpace:HAS_NORMALMAP&&material.normalMapType===ObjectSpaceNormalMap,normalMapTangentSpace:HAS_NORMALMAP&&material.normalMapType===TangentSpaceNormalMap,metalnessMap:HAS_METALNESSMAP,roughnessMap:HAS_ROUGHNESSMAP,anisotropy:HAS_ANISOTROPY,anisotropyMap:HAS_ANISOTROPYMAP,clearcoat:HAS_CLEARCOAT,clearcoatMap:HAS_CLEARCOATMAP,clearcoatNormalMap:HAS_CLEARCOAT_NORMALMAP,clearcoatRoughnessMap:HAS_CLEARCOAT_ROUGHNESSMAP,dispersion:HAS_DISPERSION,iridescence:HAS_IRIDESCENCE,iridescenceMap:HAS_IRIDESCENCEMAP,iridescenceThicknessMap:HAS_IRIDESCENCE_THICKNESSMAP,sheen:HAS_SHEEN,sheenColorMap:HAS_SHEEN_COLORMAP,sheenRoughnessMap:HAS_SHEEN_ROUGHNESSMAP,specularMap:HAS_SPECULARMAP,specularColorMap:HAS_SPECULAR_COLORMAP,specularIntensityMap:HAS_SPECULAR_INTENSITYMAP,transmission:HAS_TRANSMISSION,transmissionMap:HAS_TRANSMISSIONMAP,thicknessMap:HAS_THICKNESSMAP,gradientMap:HAS_GRADIENTMAP,opaque:material.transparent===false&&material.blending===NormalBlending&&material.alphaToCoverage===false,alphaMap:HAS_ALPHAMAP,alphaTest:HAS_ALPHATEST,alphaHash:HAS_ALPHAHASH,combine:material.combine,mapUv:HAS_MAP&&getChannel(material.map.channel),aoMapUv:HAS_AOMAP&&getChannel(material.aoMap.channel),lightMapUv:HAS_LIGHTMAP&&getChannel(material.lightMap.channel),bumpMapUv:HAS_BUMPMAP&&getChannel(material.bumpMap.channel),normalMapUv:HAS_NORMALMAP&&getChannel(material.normalMap.channel),displacementMapUv:HAS_DISPLACEMENTMAP&&getChannel(material.displacementMap.channel),emissiveMapUv:HAS_EMISSIVEMAP&&getChannel(material.emissiveMap.channel),metalnessMapUv:HAS_METALNESSMAP&&getChannel(material.metalnessMap.channel),roughnessMapUv:HAS_ROUGHNESSMAP&&getChannel(material.roughnessMap.channel),anisotropyMapUv:HAS_ANISOTROPYMAP&&getChannel(material.anisotropyMap.channel),clearcoatMapUv:HAS_CLEARCOATMAP&&getChannel(material.clearcoatMap.channel),clearcoatNormalMapUv:HAS_CLEARCOAT_NORMALMAP&&getChannel(material.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:HAS_CLEARCOAT_ROUGHNESSMAP&&getChannel(material.clearcoatRoughnessMap.channel),iridescenceMapUv:HAS_IRIDESCENCEMAP&&getChannel(material.iridescenceMap.channel),iridescenceThicknessMapUv:HAS_IRIDESCENCE_THICKNESSMAP&&getChannel(material.iridescenceThicknessMap.channel),sheenColorMapUv:HAS_SHEEN_COLORMAP&&getChannel(material.sheenColorMap.channel),sheenRoughnessMapUv:HAS_SHEEN_ROUGHNESSMAP&&getChannel(material.sheenRoughnessMap.channel),specularMapUv:HAS_SPECULARMAP&&getChannel(material.specularMap.channel),specularColorMapUv:HAS_SPECULAR_COLORMAP&&getChannel(material.specularColorMap.channel),specularIntensityMapUv:HAS_SPECULAR_INTENSITYMAP&&getChannel(material.specularIntensityMap.channel),transmissionMapUv:HAS_TRANSMISSIONMAP&&getChannel(material.transmissionMap.channel),thicknessMapUv:HAS_THICKNESSMAP&&getChannel(material.thicknessMap.channel),alphaMapUv:HAS_ALPHAMAP&&getChannel(material.alphaMap.channel),vertexTangents:!!geometry.attributes.tangent&&(HAS_NORMALMAP||HAS_ANISOTROPY),vertexColors:material.vertexColors,vertexAlphas:material.vertexColors===true&&!!geometry.attributes.color&&geometry.attributes.color.itemSize===4,pointsUvs:object.isPoints===true&&!!geometry.attributes.uv&&(HAS_MAP||HAS_ALPHAMAP),fog:!!fog,useFog:material.fog===true,fogExp2:!!fog&&fog.isFogExp2,flatShading:material.flatShading===true&&material.wireframe===false,sizeAttenuation:material.sizeAttenuation===true,logarithmicDepthBuffer:logarithmicDepthBuffer,reversedDepthBuffer:reversedDepthBuffer,skinning:object.isSkinnedMesh===true,morphTargets:geometry.morphAttributes.position!==undefined,morphNormals:geometry.morphAttributes.normal!==undefined,morphColors:geometry.morphAttributes.color!==undefined,morphTargetsCount:morphTargetsCount,morphTextureStride:morphTextureStride,numDirLights:lights.directional.length,numPointLights:lights.point.length,numSpotLights:lights.spot.length,numSpotLightMaps:lights.spotLightMap.length,numRectAreaLights:lights.rectArea.length,numHemiLights:lights.hemi.length,numDirLightShadows:lights.directionalShadowMap.length,numPointLightShadows:lights.pointShadowMap.length,numSpotLightShadows:lights.spotShadowMap.length,numSpotLightShadowsWithMaps:lights.numSpotLightShadowsWithMaps,numLightProbes:lights.numLightProbes,numClippingPlanes:clipping.numPlanes,numClipIntersection:clipping.numIntersection,dithering:material.dithering,shadowMapEnabled:renderer.shadowMap.enabled&&shadows.length>0,shadowMapType:renderer.shadowMap.type,toneMapping:toneMapping,decodeVideoTexture:HAS_MAP&&material.map.isVideoTexture===true&&ColorManagement.getTransfer(material.map.colorSpace)===SRGBTransfer,decodeVideoTextureEmissive:HAS_EMISSIVEMAP&&material.emissiveMap.isVideoTexture===true&&ColorManagement.getTransfer(material.emissiveMap.colorSpace)===SRGBTransfer,premultipliedAlpha:material.premultipliedAlpha,doubleSided:material.side===DoubleSide,flipSided:material.side===BackSide,useDepthPacking:material.depthPacking>=0,depthPacking:material.depthPacking||0,index0AttributeName:material.index0AttributeName,extensionClipCullDistance:HAS_EXTENSIONS&&material.extensions.clipCullDistance===true&&extensions.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(HAS_EXTENSIONS&&material.extensions.multiDraw===true||IS_BATCHEDMESH)&&extensions.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:extensions.has("KHR_parallel_shader_compile"),customProgramCacheKey:material.customProgramCacheKey()};parameters.vertexUv1s=_activeChannels.has(1);parameters.vertexUv2s=_activeChannels.has(2);parameters.vertexUv3s=_activeChannels.has(3);_activeChannels.clear();return parameters}function getProgramCacheKey(parameters){const array=[];if(parameters.shaderID){array.push(parameters.shaderID)}else{array.push(parameters.customVertexShaderID);array.push(parameters.customFragmentShaderID)}if(parameters.defines!==undefined){for(const name in parameters.defines){array.push(name);array.push(parameters.defines[name])}}if(parameters.isRawShaderMaterial===false){getProgramCacheKeyParameters(array,parameters);getProgramCacheKeyBooleans(array,parameters);array.push(renderer.outputColorSpace)}array.push(parameters.customProgramCacheKey);return array.join()}function getProgramCacheKeyParameters(array,parameters){array.push(parameters.precision);array.push(parameters.outputColorSpace);array.push(parameters.envMapMode);array.push(parameters.envMapCubeUVHeight);array.push(parameters.mapUv);array.push(parameters.alphaMapUv);array.push(parameters.lightMapUv);array.push(parameters.aoMapUv);array.push(parameters.bumpMapUv);array.push(parameters.normalMapUv);array.push(parameters.displacementMapUv);array.push(parameters.emissiveMapUv);array.push(parameters.metalnessMapUv);array.push(parameters.roughnessMapUv);array.push(parameters.anisotropyMapUv);array.push(parameters.clearcoatMapUv);array.push(parameters.clearcoatNormalMapUv);array.push(parameters.clearcoatRoughnessMapUv);array.push(parameters.iridescenceMapUv);array.push(parameters.iridescenceThicknessMapUv);array.push(parameters.sheenColorMapUv);array.push(parameters.sheenRoughnessMapUv);array.push(parameters.specularMapUv);array.push(parameters.specularColorMapUv);array.push(parameters.specularIntensityMapUv);array.push(parameters.transmissionMapUv);array.push(parameters.thicknessMapUv);array.push(parameters.combine);array.push(parameters.fogExp2);array.push(parameters.sizeAttenuation);array.push(parameters.morphTargetsCount);array.push(parameters.morphAttributeCount);array.push(parameters.numDirLights);array.push(parameters.numPointLights);array.push(parameters.numSpotLights);array.push(parameters.numSpotLightMaps);array.push(parameters.numHemiLights);array.push(parameters.numRectAreaLights);array.push(parameters.numDirLightShadows);array.push(parameters.numPointLightShadows);array.push(parameters.numSpotLightShadows);array.push(parameters.numSpotLightShadowsWithMaps);array.push(parameters.numLightProbes);array.push(parameters.shadowMapType);array.push(parameters.toneMapping);array.push(parameters.numClippingPlanes);array.push(parameters.numClipIntersection);array.push(parameters.depthPacking)}function getProgramCacheKeyBooleans(array,parameters){_programLayers.disableAll();if(parameters.instancing)_programLayers.enable(0);if(parameters.instancingColor)_programLayers.enable(1);if(parameters.instancingMorph)_programLayers.enable(2);if(parameters.matcap)_programLayers.enable(3);if(parameters.envMap)_programLayers.enable(4);if(parameters.normalMapObjectSpace)_programLayers.enable(5);if(parameters.normalMapTangentSpace)_programLayers.enable(6);if(parameters.clearcoat)_programLayers.enable(7);if(parameters.iridescence)_programLayers.enable(8);if(parameters.alphaTest)_programLayers.enable(9);if(parameters.vertexColors)_programLayers.enable(10);if(parameters.vertexAlphas)_programLayers.enable(11);if(parameters.vertexUv1s)_programLayers.enable(12);if(parameters.vertexUv2s)_programLayers.enable(13);if(parameters.vertexUv3s)_programLayers.enable(14);if(parameters.vertexTangents)_programLayers.enable(15);if(parameters.anisotropy)_programLayers.enable(16);if(parameters.alphaHash)_programLayers.enable(17);if(parameters.batching)_programLayers.enable(18);if(parameters.dispersion)_programLayers.enable(19);if(parameters.batchingColor)_programLayers.enable(20);if(parameters.gradientMap)_programLayers.enable(21);array.push(_programLayers.mask);_programLayers.disableAll();if(parameters.fog)_programLayers.enable(0);if(parameters.useFog)_programLayers.enable(1);if(parameters.flatShading)_programLayers.enable(2);if(parameters.logarithmicDepthBuffer)_programLayers.enable(3);if(parameters.reversedDepthBuffer)_programLayers.enable(4);if(parameters.skinning)_programLayers.enable(5);if(parameters.morphTargets)_programLayers.enable(6);if(parameters.morphNormals)_programLayers.enable(7);if(parameters.morphColors)_programLayers.enable(8);if(parameters.premultipliedAlpha)_programLayers.enable(9);if(parameters.shadowMapEnabled)_programLayers.enable(10);if(parameters.doubleSided)_programLayers.enable(11);if(parameters.flipSided)_programLayers.enable(12);if(parameters.useDepthPacking)_programLayers.enable(13);if(parameters.dithering)_programLayers.enable(14);if(parameters.transmission)_programLayers.enable(15);if(parameters.sheen)_programLayers.enable(16);if(parameters.opaque)_programLayers.enable(17);if(parameters.pointsUvs)_programLayers.enable(18);if(parameters.decodeVideoTexture)_programLayers.enable(19);if(parameters.decodeVideoTextureEmissive)_programLayers.enable(20);if(parameters.alphaToCoverage)_programLayers.enable(21);array.push(_programLayers.mask)}function getUniforms(material){const shaderID=shaderIDs[material.type];let uniforms;if(shaderID){const shader=ShaderLib[shaderID];uniforms=UniformsUtils.clone(shader.uniforms)}else{uniforms=material.uniforms}return uniforms}function acquireProgram(parameters,cacheKey){let program=programsMap.get(cacheKey);if(program!==undefined){++program.usedTimes}else{program=new WebGLProgram(renderer,cacheKey,parameters,bindingStates);programs.push(program);programsMap.set(cacheKey,program)}return program}function releaseProgram(program){if(--program.usedTimes===0){const i=programs.indexOf(program);programs[i]=programs[programs.length-1];programs.pop();programsMap.delete(program.cacheKey);program.destroy()}}function releaseShaderCache(material){_customShaders.remove(material)}function dispose(){_customShaders.dispose()}return{getParameters:getParameters,getProgramCacheKey:getProgramCacheKey,getUniforms:getUniforms,acquireProgram:acquireProgram,releaseProgram:releaseProgram,releaseShaderCache:releaseShaderCache,programs:programs,dispose:dispose}}function WebGLProperties(){let properties=new WeakMap;function has(object){return properties.has(object)}function get(object){let map=properties.get(object);if(map===undefined){map={};properties.set(object,map)}return map}function remove(object){properties.delete(object)}function update(object,key,value){properties.get(object)[key]=value}function dispose(){properties=new WeakMap}return{has:has,get:get,remove:remove,update:update,dispose:dispose}}function painterSortStable(a,b){if(a.groupOrder!==b.groupOrder){return a.groupOrder-b.groupOrder}else if(a.renderOrder!==b.renderOrder){return a.renderOrder-b.renderOrder}else if(a.material.id!==b.material.id){return a.material.id-b.material.id}else if(a.z!==b.z){return a.z-b.z}else{return a.id-b.id}}function reversePainterSortStable(a,b){if(a.groupOrder!==b.groupOrder){return a.groupOrder-b.groupOrder}else if(a.renderOrder!==b.renderOrder){return a.renderOrder-b.renderOrder}else if(a.z!==b.z){return b.z-a.z}else{return a.id-b.id}}function WebGLRenderList(){const renderItems=[];let renderItemsIndex=0;const opaque=[];const transmissive=[];const transparent=[];function init(){renderItemsIndex=0;opaque.length=0;transmissive.length=0;transparent.length=0}function getNextRenderItem(object,geometry,material,groupOrder,z,group){let renderItem=renderItems[renderItemsIndex];if(renderItem===undefined){renderItem={id:object.id,object:object,geometry:geometry,material:material,groupOrder:groupOrder,renderOrder:object.renderOrder,z:z,group:group};renderItems[renderItemsIndex]=renderItem}else{renderItem.id=object.id;renderItem.object=object;renderItem.geometry=geometry;renderItem.material=material;renderItem.groupOrder=groupOrder;renderItem.renderOrder=object.renderOrder;renderItem.z=z;renderItem.group=group}renderItemsIndex++;return renderItem}function push(object,geometry,material,groupOrder,z,group){const renderItem=getNextRenderItem(object,geometry,material,groupOrder,z,group);if(material.transmission>0){transmissive.push(renderItem)}else if(material.transparent===true){transparent.push(renderItem)}else{opaque.push(renderItem)}}function unshift(object,geometry,material,groupOrder,z,group){const renderItem=getNextRenderItem(object,geometry,material,groupOrder,z,group);if(material.transmission>0){transmissive.unshift(renderItem)}else if(material.transparent===true){transparent.unshift(renderItem)}else{opaque.unshift(renderItem)}}function sort(customOpaqueSort,customTransparentSort){if(opaque.length>1)opaque.sort(customOpaqueSort||painterSortStable);if(transmissive.length>1)transmissive.sort(customTransparentSort||reversePainterSortStable);if(transparent.length>1)transparent.sort(customTransparentSort||reversePainterSortStable)}function finish(){for(let i=renderItemsIndex,il=renderItems.length;i<il;i++){const renderItem=renderItems[i];if(renderItem.id===null)break;renderItem.id=null;renderItem.object=null;renderItem.geometry=null;renderItem.material=null;renderItem.group=null}}return{opaque:opaque,transmissive:transmissive,transparent:transparent,init:init,push:push,unshift:unshift,finish:finish,sort:sort}}function WebGLRenderLists(){let lists=new WeakMap;function get(scene,renderCallDepth){const listArray=lists.get(scene);let list;if(listArray===undefined){list=new WebGLRenderList;lists.set(scene,[list])}else{if(renderCallDepth>=listArray.length){list=new WebGLRenderList;listArray.push(list)}else{list=listArray[renderCallDepth]}}return list}function dispose(){lists=new WeakMap}return{get:get,dispose:dispose}}function UniformsCache(){const lights={};return{get:function(light){if(lights[light.id]!==undefined){return lights[light.id]}let uniforms;switch(light.type){case"DirectionalLight":uniforms={direction:new Vector3,color:new Color};break;case"SpotLight":uniforms={position:new Vector3,direction:new Vector3,color:new Color,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":uniforms={position:new Vector3,color:new Color,distance:0,decay:0};break;case"HemisphereLight":uniforms={direction:new Vector3,skyColor:new Color,groundColor:new Color};break;case"RectAreaLight":uniforms={color:new Color,position:new Vector3,halfWidth:new Vector3,halfHeight:new Vector3};break;}lights[light.id]=uniforms;return uniforms}}}function ShadowUniformsCache(){const lights={};return{get:function(light){if(lights[light.id]!==undefined){return lights[light.id]}let uniforms;switch(light.type){case"DirectionalLight":uniforms={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Vector2};break;case"SpotLight":uniforms={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Vector2};break;case"PointLight":uniforms={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Vector2,shadowCameraNear:1,shadowCameraFar:1000};break;}lights[light.id]=uniforms;return uniforms}}}let nextVersion=0;function shadowCastingAndTexturingLightsFirst(lightA,lightB){return(lightB.castShadow?2:0)-(lightA.castShadow?2:0)+(lightB.map?1:0)-(lightA.map?1:0)}function WebGLLights(extensions){const cache=new UniformsCache;const shadowCache=ShadowUniformsCache();const state={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let i=0;i<9;i++)state.probe.push(new Vector3);const vector3=new Vector3;const matrix4=new Matrix4;const matrix42=new Matrix4;function setup(lights){let r=0,g=0,b=0;for(let i=0;i<9;i++)state.probe[i].set(0,0,0);let directionalLength=0;let pointLength=0;let spotLength=0;let rectAreaLength=0;let hemiLength=0;let numDirectionalShadows=0;let numPointShadows=0;let numSpotShadows=0;let numSpotMaps=0;let numSpotShadowsWithMaps=0;let numLightProbes=0;lights.sort(shadowCastingAndTexturingLightsFirst);for(let i=0,l=lights.length;i<l;i++){const light=lights[i];const color=light.color;const intensity=light.intensity;const distance=light.distance;let shadowMap=null;if(light.shadow&&light.shadow.map){if(light.shadow.map.texture.format===RGFormat){shadowMap=light.shadow.map.texture}else{shadowMap=light.shadow.map.depthTexture||light.shadow.map.texture}}if(light.isAmbientLight){r+=color.r*intensity;g+=color.g*intensity;b+=color.b*intensity}else if(light.isLightProbe){for(let j=0;j<9;j++){state.probe[j].addScaledVector(light.sh.coefficients[j],intensity)}numLightProbes++}else if(light.isDirectionalLight){const uniforms=cache.get(light);uniforms.color.copy(light.color).multiplyScalar(light.intensity);if(light.castShadow){const shadow=light.shadow;const shadowUniforms=shadowCache.get(light);shadowUniforms.shadowIntensity=shadow.intensity;shadowUniforms.shadowBias=shadow.bias;shadowUniforms.shadowNormalBias=shadow.normalBias;shadowUniforms.shadowRadius=shadow.radius;shadowUniforms.shadowMapSize=shadow.mapSize;state.directionalShadow[directionalLength]=shadowUniforms;state.directionalShadowMap[directionalLength]=shadowMap;state.directionalShadowMatrix[directionalLength]=light.shadow.matrix;numDirectionalShadows++}state.directional[directionalLength]=uniforms;directionalLength++}else if(light.isSpotLight){const uniforms=cache.get(light);uniforms.position.setFromMatrixPosition(light.matrixWorld);uniforms.color.copy(color).multiplyScalar(intensity);uniforms.distance=distance;uniforms.coneCos=Math.cos(light.angle);uniforms.penumbraCos=Math.cos(light.angle*(1-light.penumbra));uniforms.decay=light.decay;state.spot[spotLength]=uniforms;const shadow=light.shadow;if(light.map){state.spotLightMap[numSpotMaps]=light.map;numSpotMaps++;shadow.updateMatrices(light);if(light.castShadow)numSpotShadowsWithMaps++}state.spotLightMatrix[spotLength]=shadow.matrix;if(light.castShadow){const shadowUniforms=shadowCache.get(light);shadowUniforms.shadowIntensity=shadow.intensity;shadowUniforms.shadowBias=shadow.bias;shadowUniforms.shadowNormalBias=shadow.normalBias;shadowUniforms.shadowRadius=shadow.radius;shadowUniforms.shadowMapSize=shadow.mapSize;state.spotShadow[spotLength]=shadowUniforms;state.spotShadowMap[spotLength]=shadowMap;numSpotShadows++}spotLength++}else if(light.isRectAreaLight){const uniforms=cache.get(light);uniforms.color.copy(color).multiplyScalar(intensity);uniforms.halfWidth.set(light.width*0.5,0,0);uniforms.halfHeight.set(0,light.height*0.5,0);state.rectArea[rectAreaLength]=uniforms;rectAreaLength++}else if(light.isPointLight){const uniforms=cache.get(light);uniforms.color.copy(light.color).multiplyScalar(light.intensity);uniforms.distance=light.distance;uniforms.decay=light.decay;if(light.castShadow){const shadow=light.shadow;const shadowUniforms=shadowCache.get(light);shadowUniforms.shadowIntensity=shadow.intensity;shadowUniforms.shadowBias=shadow.bias;shadowUniforms.shadowNormalBias=shadow.normalBias;shadowUniforms.shadowRadius=shadow.radius;shadowUniforms.shadowMapSize=shadow.mapSize;shadowUniforms.shadowCameraNear=shadow.camera.near;shadowUniforms.shadowCameraFar=shadow.camera.far;state.pointShadow[pointLength]=shadowUniforms;state.pointShadowMap[pointLength]=shadowMap;state.pointShadowMatrix[pointLength]=light.shadow.matrix;numPointShadows++}state.point[pointLength]=uniforms;pointLength++}else if(light.isHemisphereLight){const uniforms=cache.get(light);uniforms.skyColor.copy(light.color).multiplyScalar(intensity);uniforms.groundColor.copy(light.groundColor).multiplyScalar(intensity);state.hemi[hemiLength]=uniforms;hemiLength++}}if(rectAreaLength>0){if(extensions.has("OES_texture_float_linear")===true){state.rectAreaLTC1=UniformsLib.LTC_FLOAT_1;state.rectAreaLTC2=UniformsLib.LTC_FLOAT_2}else{state.rectAreaLTC1=UniformsLib.LTC_HALF_1;state.rectAreaLTC2=UniformsLib.LTC_HALF_2}}state.ambient[0]=r;state.ambient[1]=g;state.ambient[2]=b;const hash=state.hash;if(hash.directionalLength!==directionalLength||hash.pointLength!==pointLength||hash.spotLength!==spotLength||hash.rectAreaLength!==rectAreaLength||hash.hemiLength!==hemiLength||hash.numDirectionalShadows!==numDirectionalShadows||hash.numPointShadows!==numPointShadows||hash.numSpotShadows!==numSpotShadows||hash.numSpotMaps!==numSpotMaps||hash.numLightProbes!==numLightProbes){state.directional.length=directionalLength;state.spot.length=spotLength;state.rectArea.length=rectAreaLength;state.point.length=pointLength;state.hemi.length=hemiLength;state.directionalShadow.length=numDirectionalShadows;state.directionalShadowMap.length=numDirectionalShadows;state.pointShadow.length=numPointShadows;state.pointShadowMap.length=numPointShadows;state.spotShadow.length=numSpotShadows;state.spotShadowMap.length=numSpotShadows;state.directionalShadowMatrix.length=numDirectionalShadows;state.pointShadowMatrix.length=numPointShadows;state.spotLightMatrix.length=numSpotShadows+numSpotMaps-numSpotShadowsWithMaps;state.spotLightMap.length=numSpotMaps;state.numSpotLightShadowsWithMaps=numSpotShadowsWithMaps;state.numLightProbes=numLightProbes;hash.directionalLength=directionalLength;hash.pointLength=pointLength;hash.spotLength=spotLength;hash.rectAreaLength=rectAreaLength;hash.hemiLength=hemiLength;hash.numDirectionalShadows=numDirectionalShadows;hash.numPointShadows=numPointShadows;hash.numSpotShadows=numSpotShadows;hash.numSpotMaps=numSpotMaps;hash.numLightProbes=numLightProbes;state.version=nextVersion++}}function setupView(lights,camera){let directionalLength=0;let pointLength=0;let spotLength=0;let rectAreaLength=0;let hemiLength=0;const viewMatrix=camera.matrixWorldInverse;for(let i=0,l=lights.length;i<l;i++){const light=lights[i];if(light.isDirectionalLight){const uniforms=state.directional[directionalLength];uniforms.direction.setFromMatrixPosition(light.matrixWorld);vector3.setFromMatrixPosition(light.target.matrixWorld);uniforms.direction.sub(vector3);uniforms.direction.transformDirection(viewMatrix);directionalLength++}else if(light.isSpotLight){const uniforms=state.spot[spotLength];uniforms.position.setFromMatrixPosition(light.matrixWorld);uniforms.position.applyMatrix4(viewMatrix);uniforms.direction.setFromMatrixPosition(light.matrixWorld);vector3.setFromMatrixPosition(light.target.matrixWorld);uniforms.direction.sub(vector3);uniforms.direction.transformDirection(viewMatrix);spotLength++}else if(light.isRectAreaLight){const uniforms=state.rectArea[rectAreaLength];uniforms.position.setFromMatrixPosition(light.matrixWorld);uniforms.position.applyMatrix4(viewMatrix);matrix42.identity();matrix4.copy(light.matrixWorld);matrix4.premultiply(viewMatrix);matrix42.extractRotation(matrix4);uniforms.halfWidth.set(light.width*0.5,0,0);uniforms.halfHeight.set(0,light.height*0.5,0);uniforms.halfWidth.applyMatrix4(matrix42);uniforms.halfHeight.applyMatrix4(matrix42);rectAreaLength++}else if(light.isPointLight){const uniforms=state.point[pointLength];uniforms.position.setFromMatrixPosition(light.matrixWorld);uniforms.position.applyMatrix4(viewMatrix);pointLength++}else if(light.isHemisphereLight){const uniforms=state.hemi[hemiLength];uniforms.direction.setFromMatrixPosition(light.matrixWorld);uniforms.direction.transformDirection(viewMatrix);hemiLength++}}}return{setup:setup,setupView:setupView,state:state}}function WebGLRenderState(extensions){const lights=new WebGLLights(extensions);const lightsArray=[];const shadowsArray=[];function init(camera){state.camera=camera;lightsArray.length=0;shadowsArray.length=0}function pushLight(light){lightsArray.push(light)}function pushShadow(shadowLight){shadowsArray.push(shadowLight)}function setupLights(){lights.setup(lightsArray)}function setupLightsView(camera){lights.setupView(lightsArray,camera)}const state={lightsArray:lightsArray,shadowsArray:shadowsArray,camera:null,lights:lights,transmissionRenderTarget:{}};return{init:init,state:state,setupLights:setupLights,setupLightsView:setupLightsView,pushLight:pushLight,pushShadow:pushShadow}}function WebGLRenderStates(extensions){let renderStates=new WeakMap;function get(scene,renderCallDepth=0){const renderStateArray=renderStates.get(scene);let renderState;if(renderStateArray===undefined){renderState=new WebGLRenderState(extensions);renderStates.set(scene,[renderState])}else{if(renderCallDepth>=renderStateArray.length){renderState=new WebGLRenderState(extensions);renderStateArray.push(renderState)}else{renderState=renderStateArray[renderCallDepth]}}return renderState}function dispose(){renderStates=new WeakMap}return{get:get,dispose:dispose}}const vertex="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}";const fragment="uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ).rg;\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ).r;\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( max( 0.0, squared_mean - mean * mean ) );\n\tgl_FragColor = vec4( mean, std_dev, 0.0, 1.0 );\n}";const _cubeDirections=[new Vector3(1,0,0),new Vector3(-1,0,0),new Vector3(0,1,0),new Vector3(0,-1,0),new Vector3(0,0,1),new Vector3(0,0,-1)];const _cubeUps=[new Vector3(0,-1,0),new Vector3(0,-1,0),new Vector3(0,0,1),new Vector3(0,0,-1),new Vector3(0,-1,0),new Vector3(0,-1,0)];const _projScreenMatrix=new Matrix4;const _lightPositionWorld=new Vector3;const _lookTarget=new Vector3;function WebGLShadowMap(renderer,objects,capabilities){let _frustum=new Frustum;const _shadowMapSize=new Vector2,_viewportSize=new Vector2,_viewport=new Vector4,_depthMaterial=new MeshDepthMaterial,_distanceMaterial=new MeshDistanceMaterial,_materialCache={},_maxTextureSize=capabilities.maxTextureSize;const shadowSide={[FrontSide]:BackSide,[BackSide]:FrontSide,[DoubleSide]:DoubleSide};const shadowMaterialVertical=new ShaderMaterial({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Vector2},radius:{value:4}},vertexShader:vertex,fragmentShader:fragment});const shadowMaterialHorizontal=shadowMaterialVertical.clone();shadowMaterialHorizontal.defines.HORIZONTAL_PASS=1;const fullScreenTri=new BufferGeometry;fullScreenTri.setAttribute("position",new BufferAttribute(new Float32Array([-1,-1,0.5,3,-1,0.5,-1,3,0.5]),3));const fullScreenMesh=new Mesh(fullScreenTri,shadowMaterialVertical);const scope=this;this.enabled=false;this.autoUpdate=true;this.needsUpdate=false;this.type=PCFShadowMap;let _previousType=this.type;this.render=function(lights,scene,camera){if(scope.enabled===false)return;if(scope.autoUpdate===false&&scope.needsUpdate===false)return;if(lights.length===0)return;if(lights.type===PCFSoftShadowMap){warn("WebGLShadowMap: PCFSoftShadowMap has been deprecated. Using PCFShadowMap instead.");lights.type=PCFShadowMap}const currentRenderTarget=renderer.getRenderTarget();const activeCubeFace=renderer.getActiveCubeFace();const activeMipmapLevel=renderer.getActiveMipmapLevel();const _state=renderer.state;_state.setBlending(NoBlending);if(_state.buffers.depth.getReversed()===true){_state.buffers.color.setClear(0,0,0,0)}else{_state.buffers.color.setClear(1,1,1,1)}_state.buffers.depth.setTest(true);_state.setScissorTest(false);const typeChanged=_previousType!==this.type;if(typeChanged){scene.traverse(function(object){if(object.material){if(Array.isArray(object.material)){object.material.forEach(mat=>mat.needsUpdate=true)}else{object.material.needsUpdate=true}}})}for(let i=0,il=lights.length;i<il;i++){const light=lights[i];const shadow=light.shadow;if(shadow===undefined){warn("WebGLShadowMap:",light,"has no shadow.");continue}if(shadow.autoUpdate===false&&shadow.needsUpdate===false)continue;_shadowMapSize.copy(shadow.mapSize);const shadowFrameExtents=shadow.getFrameExtents();_shadowMapSize.multiply(shadowFrameExtents);_viewportSize.copy(shadow.mapSize);if(_shadowMapSize.x>_maxTextureSize||_shadowMapSize.y>_maxTextureSize){if(_shadowMapSize.x>_maxTextureSize){_viewportSize.x=Math.floor(_maxTextureSize/shadowFrameExtents.x);_shadowMapSize.x=_viewportSize.x*shadowFrameExtents.x;shadow.mapSize.x=_viewportSize.x}if(_shadowMapSize.y>_maxTextureSize){_viewportSize.y=Math.floor(_maxTextureSize/shadowFrameExtents.y);_shadowMapSize.y=_viewportSize.y*shadowFrameExtents.y;shadow.mapSize.y=_viewportSize.y}}if(shadow.map===null||typeChanged===true){if(shadow.map!==null){if(shadow.map.depthTexture!==null){shadow.map.depthTexture.dispose();shadow.map.depthTexture=null}shadow.map.dispose()}if(this.type===VSMShadowMap){if(light.isPointLight){warn("WebGLShadowMap: VSM shadow maps are not supported for PointLights. Use PCF or BasicShadowMap instead.");continue}shadow.map=new WebGLRenderTarget(_shadowMapSize.x,_shadowMapSize.y,{format:RGFormat,type:HalfFloatType,minFilter:LinearFilter,magFilter:LinearFilter,generateMipmaps:false});shadow.map.texture.name=light.name+".shadowMap";shadow.map.depthTexture=new DepthTexture(_shadowMapSize.x,_shadowMapSize.y,FloatType);shadow.map.depthTexture.name=light.name+".shadowMapDepth";shadow.map.depthTexture.format=DepthFormat;shadow.map.depthTexture.compareFunction=null;shadow.map.depthTexture.minFilter=NearestFilter;shadow.map.depthTexture.magFilter=NearestFilter}else{if(light.isPointLight){shadow.map=new WebGLCubeRenderTarget(_shadowMapSize.x);shadow.map.depthTexture=new CubeDepthTexture(_shadowMapSize.x,UnsignedIntType)}else{shadow.map=new WebGLRenderTarget(_shadowMapSize.x,_shadowMapSize.y);shadow.map.depthTexture=new DepthTexture(_shadowMapSize.x,_shadowMapSize.y,UnsignedIntType)}shadow.map.depthTexture.name=light.name+".shadowMap";shadow.map.depthTexture.format=DepthFormat;const reversedDepthBuffer=renderer.state.buffers.depth.getReversed();if(this.type===PCFShadowMap){shadow.map.depthTexture.compareFunction=reversedDepthBuffer?GreaterEqualCompare:LessEqualCompare;shadow.map.depthTexture.minFilter=LinearFilter;shadow.map.depthTexture.magFilter=LinearFilter}else{shadow.map.depthTexture.compareFunction=null;shadow.map.depthTexture.minFilter=NearestFilter;shadow.map.depthTexture.magFilter=NearestFilter}}shadow.camera.updateProjectionMatrix()}const faceCount=shadow.map.isWebGLCubeRenderTarget?6:1;for(let face=0;face<faceCount;face++){if(shadow.map.isWebGLCubeRenderTarget){renderer.setRenderTarget(shadow.map,face);renderer.clear()}else{if(face===0){renderer.setRenderTarget(shadow.map);renderer.clear()}const viewport=shadow.getViewport(face);_viewport.set(_viewportSize.x*viewport.x,_viewportSize.y*viewport.y,_viewportSize.x*viewport.z,_viewportSize.y*viewport.w);_state.viewport(_viewport)}if(light.isPointLight){const camera=shadow.camera;const shadowMatrix=shadow.matrix;const far=light.distance||camera.far;if(far!==camera.far){camera.far=far;camera.updateProjectionMatrix()}_lightPositionWorld.setFromMatrixPosition(light.matrixWorld);camera.position.copy(_lightPositionWorld);_lookTarget.copy(camera.position);_lookTarget.add(_cubeDirections[face]);camera.up.copy(_cubeUps[face]);camera.lookAt(_lookTarget);camera.updateMatrixWorld();shadowMatrix.makeTranslation(-_lightPositionWorld.x,-_lightPositionWorld.y,-_lightPositionWorld.z);_projScreenMatrix.multiplyMatrices(camera.projectionMatrix,camera.matrixWorldInverse);shadow._frustum.setFromProjectionMatrix(_projScreenMatrix,camera.coordinateSystem,camera.reversedDepth)}else{shadow.updateMatrices(light)}_frustum=shadow.getFrustum();renderObject(scene,camera,shadow.camera,light,this.type)}if(shadow.isPointLightShadow!==true&&this.type===VSMShadowMap){VSMPass(shadow,camera)}shadow.needsUpdate=false}_previousType=this.type;scope.needsUpdate=false;renderer.setRenderTarget(currentRenderTarget,activeCubeFace,activeMipmapLevel)};function VSMPass(shadow,camera){const geometry=objects.update(fullScreenMesh);if(shadowMaterialVertical.defines.VSM_SAMPLES!==shadow.blurSamples){shadowMaterialVertical.defines.VSM_SAMPLES=shadow.blurSamples;shadowMaterialHorizontal.defines.VSM_SAMPLES=shadow.blurSamples;shadowMaterialVertical.needsUpdate=true;shadowMaterialHorizontal.needsUpdate=true}if(shadow.mapPass===null){shadow.mapPass=new WebGLRenderTarget(_shadowMapSize.x,_shadowMapSize.y,{format:RGFormat,type:HalfFloatType})}shadowMaterialVertical.uniforms.shadow_pass.value=shadow.map.depthTexture;shadowMaterialVertical.uniforms.resolution.value=shadow.mapSize;shadowMaterialVertical.uniforms.radius.value=shadow.radius;renderer.setRenderTarget(shadow.mapPass);renderer.clear();renderer.renderBufferDirect(camera,null,geometry,shadowMaterialVertical,fullScreenMesh,null);shadowMaterialHorizontal.uniforms.shadow_pass.value=shadow.mapPass.texture;shadowMaterialHorizontal.uniforms.resolution.value=shadow.mapSize;shadowMaterialHorizontal.uniforms.radius.value=shadow.radius;renderer.setRenderTarget(shadow.map);renderer.clear();renderer.renderBufferDirect(camera,null,geometry,shadowMaterialHorizontal,fullScreenMesh,null)}function getDepthMaterial(object,material,light,type){let result=null;const customMaterial=light.isPointLight===true?object.customDistanceMaterial:object.customDepthMaterial;if(customMaterial!==undefined){result=customMaterial}else{result=light.isPointLight===true?_distanceMaterial:_depthMaterial;if(renderer.localClippingEnabled&&material.clipShadows===true&&Array.isArray(material.clippingPlanes)&&material.clippingPlanes.length!==0||material.displacementMap&&material.displacementScale!==0||material.alphaMap&&material.alphaTest>0||material.map&&material.alphaTest>0||material.alphaToCoverage===true){const keyA=result.uuid,keyB=material.uuid;let materialsForVariant=_materialCache[keyA];if(materialsForVariant===undefined){materialsForVariant={};_materialCache[keyA]=materialsForVariant}let cachedMaterial=materialsForVariant[keyB];if(cachedMaterial===undefined){cachedMaterial=result.clone();materialsForVariant[keyB]=cachedMaterial;material.addEventListener("dispose",onMaterialDispose)}result=cachedMaterial}}result.visible=material.visible;result.wireframe=material.wireframe;if(type===VSMShadowMap){result.side=material.shadowSide!==null?material.shadowSide:material.side}else{result.side=material.shadowSide!==null?material.shadowSide:shadowSide[material.side]}result.alphaMap=material.alphaMap;result.alphaTest=material.alphaToCoverage===true?0.5:material.alphaTest;result.map=material.map;result.clipShadows=material.clipShadows;result.clippingPlanes=material.clippingPlanes;result.clipIntersection=material.clipIntersection;result.displacementMap=material.displacementMap;result.displacementScale=material.displacementScale;result.displacementBias=material.displacementBias;result.wireframeLinewidth=material.wireframeLinewidth;result.linewidth=material.linewidth;if(light.isPointLight===true&&result.isMeshDistanceMaterial===true){const materialProperties=renderer.properties.get(result);materialProperties.light=light}return result}function renderObject(object,camera,shadowCamera,light,type){if(object.visible===false)return;const visible=object.layers.test(camera.layers);if(visible&&(object.isMesh||object.isLine||object.isPoints)){if((object.castShadow||object.receiveShadow&&type===VSMShadowMap)&&(!object.frustumCulled||_frustum.intersectsObject(object))){object.modelViewMatrix.multiplyMatrices(shadowCamera.matrixWorldInverse,object.matrixWorld);const geometry=objects.update(object);const material=object.material;if(Array.isArray(material)){const groups=geometry.groups;for(let k=0,kl=groups.length;k<kl;k++){const group=groups[k];const groupMaterial=material[group.materialIndex];if(groupMaterial&&groupMaterial.visible){const depthMaterial=getDepthMaterial(object,groupMaterial,light,type);object.onBeforeShadow(renderer,object,camera,shadowCamera,geometry,depthMaterial,group);renderer.renderBufferDirect(shadowCamera,null,geometry,depthMaterial,object,group);object.onAfterShadow(renderer,object,camera,shadowCamera,geometry,depthMaterial,group)}}}else if(material.visible){const depthMaterial=getDepthMaterial(object,material,light,type);object.onBeforeShadow(renderer,object,camera,shadowCamera,geometry,depthMaterial,null);renderer.renderBufferDirect(shadowCamera,null,geometry,depthMaterial,object,null);object.onAfterShadow(renderer,object,camera,shadowCamera,geometry,depthMaterial,null)}}}const children=object.children;for(let i=0,l=children.length;i<l;i++){renderObject(children[i],camera,shadowCamera,light,type)}}function onMaterialDispose(event){const material=event.target;material.removeEventListener("dispose",onMaterialDispose);for(const id in _materialCache){const cache=_materialCache[id];const uuid=event.target.uuid;if(uuid in cache){const shadowMaterial=cache[uuid];shadowMaterial.dispose();delete cache[uuid]}}}}const reversedFuncs={[NeverDepth]:AlwaysDepth,[LessDepth]:GreaterDepth,[EqualDepth]:NotEqualDepth,[LessEqualDepth]:GreaterEqualDepth,[AlwaysDepth]:NeverDepth,[GreaterDepth]:LessDepth,[NotEqualDepth]:EqualDepth,[GreaterEqualDepth]:LessEqualDepth};function WebGLState(gl,extensions){function ColorBuffer(){let locked=false;const color=new Vector4;let currentColorMask=null;const currentColorClear=new Vector4(0,0,0,0);return{setMask:function(colorMask){if(currentColorMask!==colorMask&&!locked){gl.colorMask(colorMask,colorMask,colorMask,colorMask);currentColorMask=colorMask}},setLocked:function(lock){locked=lock},setClear:function(r,g,b,a,premultipliedAlpha){if(premultipliedAlpha===true){r*=a;g*=a;b*=a}color.set(r,g,b,a);if(currentColorClear.equals(color)===false){gl.clearColor(r,g,b,a);currentColorClear.copy(color)}},reset:function(){locked=false;currentColorMask=null;currentColorClear.set(-1,0,0,0)}}}function DepthBuffer(){let locked=false;let currentReversed=false;let currentDepthMask=null;let currentDepthFunc=null;let currentDepthClear=null;return{setReversed:function(reversed){if(currentReversed!==reversed){const ext=extensions.get("EXT_clip_control");if(reversed){ext.clipControlEXT(ext.LOWER_LEFT_EXT,ext.ZERO_TO_ONE_EXT)}else{ext.clipControlEXT(ext.LOWER_LEFT_EXT,ext.NEGATIVE_ONE_TO_ONE_EXT)}currentReversed=reversed;const oldDepth=currentDepthClear;currentDepthClear=null;this.setClear(oldDepth)}},getReversed:function(){return currentReversed},setTest:function(depthTest){if(depthTest){enable(gl.DEPTH_TEST)}else{disable(gl.DEPTH_TEST)}},setMask:function(depthMask){if(currentDepthMask!==depthMask&&!locked){gl.depthMask(depthMask);currentDepthMask=depthMask}},setFunc:function(depthFunc){if(currentReversed)depthFunc=reversedFuncs[depthFunc];if(currentDepthFunc!==depthFunc){switch(depthFunc){case NeverDepth:gl.depthFunc(gl.NEVER);break;case AlwaysDepth:gl.depthFunc(gl.ALWAYS);break;case LessDepth:gl.depthFunc(gl.LESS);break;case LessEqualDepth:gl.depthFunc(gl.LEQUAL);break;case EqualDepth:gl.depthFunc(gl.EQUAL);break;case GreaterEqualDepth:gl.depthFunc(gl.GEQUAL);break;case GreaterDepth:gl.depthFunc(gl.GREATER);break;case NotEqualDepth:gl.depthFunc(gl.NOTEQUAL);break;default:gl.depthFunc(gl.LEQUAL);}currentDepthFunc=depthFunc}},setLocked:function(lock){locked=lock},setClear:function(depth){if(currentDepthClear!==depth){if(currentReversed){depth=1-depth}gl.clearDepth(depth);currentDepthClear=depth}},reset:function(){locked=false;currentDepthMask=null;currentDepthFunc=null;currentDepthClear=null;currentReversed=false}}}function StencilBuffer(){let locked=false;let currentStencilMask=null;let currentStencilFunc=null;let currentStencilRef=null;let currentStencilFuncMask=null;let currentStencilFail=null;let currentStencilZFail=null;let currentStencilZPass=null;let currentStencilClear=null;return{setTest:function(stencilTest){if(!locked){if(stencilTest){enable(gl.STENCIL_TEST)}else{disable(gl.STENCIL_TEST)}}},setMask:function(stencilMask){if(currentStencilMask!==stencilMask&&!locked){gl.stencilMask(stencilMask);currentStencilMask=stencilMask}},setFunc:function(stencilFunc,stencilRef,stencilMask){if(currentStencilFunc!==stencilFunc||currentStencilRef!==stencilRef||currentStencilFuncMask!==stencilMask){gl.stencilFunc(stencilFunc,stencilRef,stencilMask);currentStencilFunc=stencilFunc;currentStencilRef=stencilRef;currentStencilFuncMask=stencilMask}},setOp:function(stencilFail,stencilZFail,stencilZPass){if(currentStencilFail!==stencilFail||currentStencilZFail!==stencilZFail||currentStencilZPass!==stencilZPass){gl.stencilOp(stencilFail,stencilZFail,stencilZPass);currentStencilFail=stencilFail;currentStencilZFail=stencilZFail;currentStencilZPass=stencilZPass}},setLocked:function(lock){locked=lock},setClear:function(stencil){if(currentStencilClear!==stencil){gl.clearStencil(stencil);currentStencilClear=stencil}},reset:function(){locked=false;currentStencilMask=null;currentStencilFunc=null;currentStencilRef=null;currentStencilFuncMask=null;currentStencilFail=null;currentStencilZFail=null;currentStencilZPass=null;currentStencilClear=null}}}const colorBuffer=new ColorBuffer;const depthBuffer=new DepthBuffer;const stencilBuffer=new StencilBuffer;const uboBindings=new WeakMap;const uboProgramMap=new WeakMap;let enabledCapabilities={};let currentBoundFramebuffers={};let currentDrawbuffers=new WeakMap;let defaultDrawbuffers=[];let currentProgram=null;let currentBlendingEnabled=false;let currentBlending=null;let currentBlendEquation=null;let currentBlendSrc=null;let currentBlendDst=null;let currentBlendEquationAlpha=null;let currentBlendSrcAlpha=null;let currentBlendDstAlpha=null;let currentBlendColor=new Color(0,0,0);let currentBlendAlpha=0;let currentPremultipledAlpha=false;let currentFlipSided=null;let currentCullFace=null;let currentLineWidth=null;let currentPolygonOffsetFactor=null;let currentPolygonOffsetUnits=null;const maxTextures=gl.getParameter(gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let lineWidthAvailable=false;let version=0;const glVersion=gl.getParameter(gl.VERSION);if(glVersion.indexOf("WebGL")!==-1){version=parseFloat(/^WebGL (\d)/.exec(glVersion)[1]);lineWidthAvailable=version>=1}else if(glVersion.indexOf("OpenGL ES")!==-1){version=parseFloat(/^OpenGL ES (\d)/.exec(glVersion)[1]);lineWidthAvailable=version>=2}let currentTextureSlot=null;let currentBoundTextures={};const scissorParam=gl.getParameter(gl.SCISSOR_BOX);const viewportParam=gl.getParameter(gl.VIEWPORT);const currentScissor=new Vector4().fromArray(scissorParam);const currentViewport=new Vector4().fromArray(viewportParam);function createTexture(type,target,count,dimensions){const data=new Uint8Array(4);const texture=gl.createTexture();gl.bindTexture(type,texture);gl.texParameteri(type,gl.TEXTURE_MIN_FILTER,gl.NEAREST);gl.texParameteri(type,gl.TEXTURE_MAG_FILTER,gl.NEAREST);for(let i=0;i<count;i++){if(type===gl.TEXTURE_3D||type===gl.TEXTURE_2D_ARRAY){gl.texImage3D(target,0,gl.RGBA,1,1,dimensions,0,gl.RGBA,gl.UNSIGNED_BYTE,data)}else{gl.texImage2D(target+i,0,gl.RGBA,1,1,0,gl.RGBA,gl.UNSIGNED_BYTE,data)}}return texture}const emptyTextures={};emptyTextures[gl.TEXTURE_2D]=createTexture(gl.TEXTURE_2D,gl.TEXTURE_2D,1);emptyTextures[gl.TEXTURE_CUBE_MAP]=createTexture(gl.TEXTURE_CUBE_MAP,gl.TEXTURE_CUBE_MAP_POSITIVE_X,6);emptyTextures[gl.TEXTURE_2D_ARRAY]=createTexture(gl.TEXTURE_2D_ARRAY,gl.TEXTURE_2D_ARRAY,1,1);emptyTextures[gl.TEXTURE_3D]=createTexture(gl.TEXTURE_3D,gl.TEXTURE_3D,1,1);colorBuffer.setClear(0,0,0,1);depthBuffer.setClear(1);stencilBuffer.setClear(0);enable(gl.DEPTH_TEST);depthBuffer.setFunc(LessEqualDepth);setFlipSided(false);setCullFace(CullFaceBack);enable(gl.CULL_FACE);setBlending(NoBlending);function enable(id){if(enabledCapabilities[id]!==true){gl.enable(id);enabledCapabilities[id]=true}}function disable(id){if(enabledCapabilities[id]!==false){gl.disable(id);enabledCapabilities[id]=false}}function bindFramebuffer(target,framebuffer){if(currentBoundFramebuffers[target]!==framebuffer){gl.bindFramebuffer(target,framebuffer);currentBoundFramebuffers[target]=framebuffer;if(target===gl.DRAW_FRAMEBUFFER){currentBoundFramebuffers[gl.FRAMEBUFFER]=framebuffer}if(target===gl.FRAMEBUFFER){currentBoundFramebuffers[gl.DRAW_FRAMEBUFFER]=framebuffer}return true}return false}function drawBuffers(renderTarget,framebuffer){let drawBuffers=defaultDrawbuffers;let needsUpdate=false;if(renderTarget){drawBuffers=currentDrawbuffers.get(framebuffer);if(drawBuffers===undefined){drawBuffers=[];currentDrawbuffers.set(framebuffer,drawBuffers)}const textures=renderTarget.textures;if(drawBuffers.length!==textures.length||drawBuffers[0]!==gl.COLOR_ATTACHMENT0){for(let i=0,il=textures.length;i<il;i++){drawBuffers[i]=gl.COLOR_ATTACHMENT0+i}drawBuffers.length=textures.length;needsUpdate=true}}else{if(drawBuffers[0]!==gl.BACK){drawBuffers[0]=gl.BACK;needsUpdate=true}}if(needsUpdate){gl.drawBuffers(drawBuffers)}}function useProgram(program){if(currentProgram!==program){gl.useProgram(program);currentProgram=program;return true}return false}const equationToGL={[AddEquation]:gl.FUNC_ADD,[SubtractEquation]:gl.FUNC_SUBTRACT,[ReverseSubtractEquation]:gl.FUNC_REVERSE_SUBTRACT};equationToGL[MinEquation]=gl.MIN;equationToGL[MaxEquation]=gl.MAX;const factorToGL={[ZeroFactor]:gl.ZERO,[OneFactor]:gl.ONE,[SrcColorFactor]:gl.SRC_COLOR,[SrcAlphaFactor]:gl.SRC_ALPHA,[SrcAlphaSaturateFactor]:gl.SRC_ALPHA_SATURATE,[DstColorFactor]:gl.DST_COLOR,[DstAlphaFactor]:gl.DST_ALPHA,[OneMinusSrcColorFactor]:gl.ONE_MINUS_SRC_COLOR,[OneMinusSrcAlphaFactor]:gl.ONE_MINUS_SRC_ALPHA,[OneMinusDstColorFactor]:gl.ONE_MINUS_DST_COLOR,[OneMinusDstAlphaFactor]:gl.ONE_MINUS_DST_ALPHA,[ConstantColorFactor]:gl.CONSTANT_COLOR,[OneMinusConstantColorFactor]:gl.ONE_MINUS_CONSTANT_COLOR,[ConstantAlphaFactor]:gl.CONSTANT_ALPHA,[OneMinusConstantAlphaFactor]:gl.ONE_MINUS_CONSTANT_ALPHA};function setBlending(blending,blendEquation,blendSrc,blendDst,blendEquationAlpha,blendSrcAlpha,blendDstAlpha,blendColor,blendAlpha,premultipliedAlpha){if(blending===NoBlending){if(currentBlendingEnabled===true){disable(gl.BLEND);currentBlendingEnabled=false}return}if(currentBlendingEnabled===false){enable(gl.BLEND);currentBlendingEnabled=true}if(blending!==CustomBlending){if(blending!==currentBlending||premultipliedAlpha!==currentPremultipledAlpha){if(currentBlendEquation!==AddEquation||currentBlendEquationAlpha!==AddEquation){gl.blendEquation(gl.FUNC_ADD);currentBlendEquation=AddEquation;currentBlendEquationAlpha=AddEquation}if(premultipliedAlpha){switch(blending){case NormalBlending:gl.blendFuncSeparate(gl.ONE,gl.ONE_MINUS_SRC_ALPHA,gl.ONE,gl.ONE_MINUS_SRC_ALPHA);break;case AdditiveBlending:gl.blendFunc(gl.ONE,gl.ONE);break;case SubtractiveBlending:gl.blendFuncSeparate(gl.ZERO,gl.ONE_MINUS_SRC_COLOR,gl.ZERO,gl.ONE);break;case MultiplyBlending:gl.blendFuncSeparate(gl.DST_COLOR,gl.ONE_MINUS_SRC_ALPHA,gl.ZERO,gl.ONE);break;default:error("WebGLState: Invalid blending: ",blending);break;}}else{switch(blending){case NormalBlending:gl.blendFuncSeparate(gl.SRC_ALPHA,gl.ONE_MINUS_SRC_ALPHA,gl.ONE,gl.ONE_MINUS_SRC_ALPHA);break;case AdditiveBlending:gl.blendFuncSeparate(gl.SRC_ALPHA,gl.ONE,gl.ONE,gl.ONE);break;case SubtractiveBlending:error("WebGLState: SubtractiveBlending requires material.premultipliedAlpha = true");break;case MultiplyBlending:error("WebGLState: MultiplyBlending requires material.premultipliedAlpha = true");break;default:error("WebGLState: Invalid blending: ",blending);break;}}currentBlendSrc=null;currentBlendDst=null;currentBlendSrcAlpha=null;currentBlendDstAlpha=null;currentBlendColor.set(0,0,0);currentBlendAlpha=0;currentBlending=blending;currentPremultipledAlpha=premultipliedAlpha}return}blendEquationAlpha=blendEquationAlpha||blendEquation;blendSrcAlpha=blendSrcAlpha||blendSrc;blendDstAlpha=blendDstAlpha||blendDst;if(blendEquation!==currentBlendEquation||blendEquationAlpha!==currentBlendEquationAlpha){gl.blendEquationSeparate(equationToGL[blendEquation],equationToGL[blendEquationAlpha]);currentBlendEquation=blendEquation;currentBlendEquationAlpha=blendEquationAlpha}if(blendSrc!==currentBlendSrc||blendDst!==currentBlendDst||blendSrcAlpha!==currentBlendSrcAlpha||blendDstAlpha!==currentBlendDstAlpha){gl.blendFuncSeparate(factorToGL[blendSrc],factorToGL[blendDst],factorToGL[blendSrcAlpha],factorToGL[blendDstAlpha]);currentBlendSrc=blendSrc;currentBlendDst=blendDst;currentBlendSrcAlpha=blendSrcAlpha;currentBlendDstAlpha=blendDstAlpha}if(blendColor.equals(currentBlendColor)===false||blendAlpha!==currentBlendAlpha){gl.blendColor(blendColor.r,blendColor.g,blendColor.b,blendAlpha);currentBlendColor.copy(blendColor);currentBlendAlpha=blendAlpha}currentBlending=blending;currentPremultipledAlpha=false}function setMaterial(material,frontFaceCW){material.side===DoubleSide?disable(gl.CULL_FACE):enable(gl.CULL_FACE);let flipSided=material.side===BackSide;if(frontFaceCW)flipSided=!flipSided;setFlipSided(flipSided);material.blending===NormalBlending&&material.transparent===false?setBlending(NoBlending):setBlending(material.blending,material.blendEquation,material.blendSrc,material.blendDst,material.blendEquationAlpha,material.blendSrcAlpha,material.blendDstAlpha,material.blendColor,material.blendAlpha,material.premultipliedAlpha);depthBuffer.setFunc(material.depthFunc);depthBuffer.setTest(material.depthTest);depthBuffer.setMask(material.depthWrite);colorBuffer.setMask(material.colorWrite);const stencilWrite=material.stencilWrite;stencilBuffer.setTest(stencilWrite);if(stencilWrite){stencilBuffer.setMask(material.stencilWriteMask);stencilBuffer.setFunc(material.stencilFunc,material.stencilRef,material.stencilFuncMask);stencilBuffer.setOp(material.stencilFail,material.stencilZFail,material.stencilZPass)}setPolygonOffset(material.polygonOffset,material.polygonOffsetFactor,material.polygonOffsetUnits);material.alphaToCoverage===true?enable(gl.SAMPLE_ALPHA_TO_COVERAGE):disable(gl.SAMPLE_ALPHA_TO_COVERAGE)}function setFlipSided(flipSided){if(currentFlipSided!==flipSided){if(flipSided){gl.frontFace(gl.CW)}else{gl.frontFace(gl.CCW)}currentFlipSided=flipSided}}function setCullFace(cullFace){if(cullFace!==CullFaceNone){enable(gl.CULL_FACE);if(cullFace!==currentCullFace){if(cullFace===CullFaceBack){gl.cullFace(gl.BACK)}else if(cullFace===CullFaceFront){gl.cullFace(gl.FRONT)}else{gl.cullFace(gl.FRONT_AND_BACK)}}}else{disable(gl.CULL_FACE)}currentCullFace=cullFace}function setLineWidth(width){if(width!==currentLineWidth){if(lineWidthAvailable)gl.lineWidth(width);currentLineWidth=width}}function setPolygonOffset(polygonOffset,factor,units){if(polygonOffset){enable(gl.POLYGON_OFFSET_FILL);if(currentPolygonOffsetFactor!==factor||currentPolygonOffsetUnits!==units){gl.polygonOffset(factor,units);currentPolygonOffsetFactor=factor;currentPolygonOffsetUnits=units}}else{disable(gl.POLYGON_OFFSET_FILL)}}function setScissorTest(scissorTest){if(scissorTest){enable(gl.SCISSOR_TEST)}else{disable(gl.SCISSOR_TEST)}}function activeTexture(webglSlot){if(webglSlot===undefined)webglSlot=gl.TEXTURE0+maxTextures-1;if(currentTextureSlot!==webglSlot){gl.activeTexture(webglSlot);currentTextureSlot=webglSlot}}function bindTexture(webglType,webglTexture,webglSlot){if(webglSlot===undefined){if(currentTextureSlot===null){webglSlot=gl.TEXTURE0+maxTextures-1}else{webglSlot=currentTextureSlot}}let boundTexture=currentBoundTextures[webglSlot];if(boundTexture===undefined){boundTexture={type:undefined,texture:undefined};currentBoundTextures[webglSlot]=boundTexture}if(boundTexture.type!==webglType||boundTexture.texture!==webglTexture){if(currentTextureSlot!==webglSlot){gl.activeTexture(webglSlot);currentTextureSlot=webglSlot}gl.bindTexture(webglType,webglTexture||emptyTextures[webglType]);boundTexture.type=webglType;boundTexture.texture=webglTexture}}function unbindTexture(){const boundTexture=currentBoundTextures[currentTextureSlot];if(boundTexture!==undefined&&boundTexture.type!==undefined){gl.bindTexture(boundTexture.type,null);boundTexture.type=undefined;boundTexture.texture=undefined}}function compressedTexImage2D(){try{gl.compressedTexImage2D(...arguments)}catch(e){error("WebGLState:",e)}}function compressedTexImage3D(){try{gl.compressedTexImage3D(...arguments)}catch(e){error("WebGLState:",e)}}function texSubImage2D(){try{gl.texSubImage2D(...arguments)}catch(e){error("WebGLState:",e)}}function texSubImage3D(){try{gl.texSubImage3D(...arguments)}catch(e){error("WebGLState:",e)}}function compressedTexSubImage2D(){try{gl.compressedTexSubImage2D(...arguments)}catch(e){error("WebGLState:",e)}}function compressedTexSubImage3D(){try{gl.compressedTexSubImage3D(...arguments)}catch(e){error("WebGLState:",e)}}function texStorage2D(){try{gl.texStorage2D(...arguments)}catch(e){error("WebGLState:",e)}}function texStorage3D(){try{gl.texStorage3D(...arguments)}catch(e){error("WebGLState:",e)}}function texImage2D(){try{gl.texImage2D(...arguments)}catch(e){error("WebGLState:",e)}}function texImage3D(){try{gl.texImage3D(...arguments)}catch(e){error("WebGLState:",e)}}function scissor(scissor){if(currentScissor.equals(scissor)===false){gl.scissor(scissor.x,scissor.y,scissor.z,scissor.w);currentScissor.copy(scissor)}}function viewport(viewport){if(currentViewport.equals(viewport)===false){gl.viewport(viewport.x,viewport.y,viewport.z,viewport.w);currentViewport.copy(viewport)}}function updateUBOMapping(uniformsGroup,program){let mapping=uboProgramMap.get(program);if(mapping===undefined){mapping=new WeakMap;uboProgramMap.set(program,mapping)}let blockIndex=mapping.get(uniformsGroup);if(blockIndex===undefined){blockIndex=gl.getUniformBlockIndex(program,uniformsGroup.name);mapping.set(uniformsGroup,blockIndex)}}function uniformBlockBinding(uniformsGroup,program){const mapping=uboProgramMap.get(program);const blockIndex=mapping.get(uniformsGroup);if(uboBindings.get(program)!==blockIndex){gl.uniformBlockBinding(program,blockIndex,uniformsGroup.__bindingPointIndex);uboBindings.set(program,blockIndex)}}function reset(){gl.disable(gl.BLEND);gl.disable(gl.CULL_FACE);gl.disable(gl.DEPTH_TEST);gl.disable(gl.POLYGON_OFFSET_FILL);gl.disable(gl.SCISSOR_TEST);gl.disable(gl.STENCIL_TEST);gl.disable(gl.SAMPLE_ALPHA_TO_COVERAGE);gl.blendEquation(gl.FUNC_ADD);gl.blendFunc(gl.ONE,gl.ZERO);gl.blendFuncSeparate(gl.ONE,gl.ZERO,gl.ONE,gl.ZERO);gl.blendColor(0,0,0,0);gl.colorMask(true,true,true,true);gl.clearColor(0,0,0,0);gl.depthMask(true);gl.depthFunc(gl.LESS);depthBuffer.setReversed(false);gl.clearDepth(1);gl.stencilMask(4294967295);gl.stencilFunc(gl.ALWAYS,0,4294967295);gl.stencilOp(gl.KEEP,gl.KEEP,gl.KEEP);gl.clearStencil(0);gl.cullFace(gl.BACK);gl.frontFace(gl.CCW);gl.polygonOffset(0,0);gl.activeTexture(gl.TEXTURE0);gl.bindFramebuffer(gl.FRAMEBUFFER,null);gl.bindFramebuffer(gl.DRAW_FRAMEBUFFER,null);gl.bindFramebuffer(gl.READ_FRAMEBUFFER,null);gl.useProgram(null);gl.lineWidth(1);gl.scissor(0,0,gl.canvas.width,gl.canvas.height);gl.viewport(0,0,gl.canvas.width,gl.canvas.height);enabledCapabilities={};currentTextureSlot=null;currentBoundTextures={};currentBoundFramebuffers={};currentDrawbuffers=new WeakMap;defaultDrawbuffers=[];currentProgram=null;currentBlendingEnabled=false;currentBlending=null;currentBlendEquation=null;currentBlendSrc=null;currentBlendDst=null;currentBlendEquationAlpha=null;currentBlendSrcAlpha=null;currentBlendDstAlpha=null;currentBlendColor=new Color(0,0,0);currentBlendAlpha=0;currentPremultipledAlpha=false;currentFlipSided=null;currentCullFace=null;currentLineWidth=null;currentPolygonOffsetFactor=null;currentPolygonOffsetUnits=null;currentScissor.set(0,0,gl.canvas.width,gl.canvas.height);currentViewport.set(0,0,gl.canvas.width,gl.canvas.height);colorBuffer.reset();depthBuffer.reset();stencilBuffer.reset()}return{buffers:{color:colorBuffer,depth:depthBuffer,stencil:stencilBuffer},enable:enable,disable:disable,bindFramebuffer:bindFramebuffer,drawBuffers:drawBuffers,useProgram:useProgram,setBlending:setBlending,setMaterial:setMaterial,setFlipSided:setFlipSided,setCullFace:setCullFace,setLineWidth:setLineWidth,setPolygonOffset:setPolygonOffset,setScissorTest:setScissorTest,activeTexture:activeTexture,bindTexture:bindTexture,unbindTexture:unbindTexture,compressedTexImage2D:compressedTexImage2D,compressedTexImage3D:compressedTexImage3D,texImage2D:texImage2D,texImage3D:texImage3D,updateUBOMapping:updateUBOMapping,uniformBlockBinding:uniformBlockBinding,texStorage2D:texStorage2D,texStorage3D:texStorage3D,texSubImage2D:texSubImage2D,texSubImage3D:texSubImage3D,compressedTexSubImage2D:compressedTexSubImage2D,compressedTexSubImage3D:compressedTexSubImage3D,scissor:scissor,viewport:viewport,reset:reset}}function WebGLTextures(_gl,extensions,state,properties,capabilities,utils,info){const multisampledRTTExt=extensions.has("WEBGL_multisampled_render_to_texture")?extensions.get("WEBGL_multisampled_render_to_texture"):null;const supportsInvalidateFramebuffer=typeof navigator==="undefined"?false:/OculusBrowser/g.test(navigator.userAgent);const _imageDimensions=new Vector2;const _videoTextures=new WeakMap;let _canvas;const _sources=new WeakMap;let useOffscreenCanvas=false;try{useOffscreenCanvas=typeof OffscreenCanvas!=="undefined"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch(err){}function createCanvas(width,height){return useOffscreenCanvas?new OffscreenCanvas(width,height):createElementNS("canvas")}function resizeImage(image,needsNewCanvas,maxSize){let scale=1;const dimensions=getDimensions(image);if(dimensions.width>maxSize||dimensions.height>maxSize){scale=maxSize/Math.max(dimensions.width,dimensions.height)}if(scale<1){if(typeof HTMLImageElement!=="undefined"&&image instanceof HTMLImageElement||typeof HTMLCanvasElement!=="undefined"&&image instanceof HTMLCanvasElement||typeof ImageBitmap!=="undefined"&&image instanceof ImageBitmap||typeof VideoFrame!=="undefined"&&image instanceof VideoFrame){const width=Math.floor(scale*dimensions.width);const height=Math.floor(scale*dimensions.height);if(_canvas===undefined)_canvas=createCanvas(width,height);const canvas=needsNewCanvas?createCanvas(width,height):_canvas;canvas.width=width;canvas.height=height;const context=canvas.getContext("2d");context.drawImage(image,0,0,width,height);warn("WebGLRenderer: Texture has been resized from ("+dimensions.width+"x"+dimensions.height+") to ("+width+"x"+height+").");return canvas}else{if("data"in image){warn("WebGLRenderer: Image in DataTexture is too big ("+dimensions.width+"x"+dimensions.height+").")}return image}}return image}function textureNeedsGenerateMipmaps(texture){return texture.generateMipmaps}function generateMipmap(target){_gl.generateMipmap(target)}function getTargetType(texture){if(texture.isWebGLCubeRenderTarget)return _gl.TEXTURE_CUBE_MAP;if(texture.isWebGL3DRenderTarget)return _gl.TEXTURE_3D;if(texture.isWebGLArrayRenderTarget||texture.isCompressedArrayTexture)return _gl.TEXTURE_2D_ARRAY;return _gl.TEXTURE_2D}function getInternalFormat(internalFormatName,glFormat,glType,colorSpace,forceLinearTransfer=false){if(internalFormatName!==null){if(_gl[internalFormatName]!==undefined)return _gl[internalFormatName];warn("WebGLRenderer: Attempt to use non-existing WebGL internal format '"+internalFormatName+"'")}let internalFormat=glFormat;if(glFormat===_gl.RED){if(glType===_gl.FLOAT)internalFormat=_gl.R32F;if(glType===_gl.HALF_FLOAT)internalFormat=_gl.R16F;if(glType===_gl.UNSIGNED_BYTE)internalFormat=_gl.R8}if(glFormat===_gl.RED_INTEGER){if(glType===_gl.UNSIGNED_BYTE)internalFormat=_gl.R8UI;if(glType===_gl.UNSIGNED_SHORT)internalFormat=_gl.R16UI;if(glType===_gl.UNSIGNED_INT)internalFormat=_gl.R32UI;if(glType===_gl.BYTE)internalFormat=_gl.R8I;if(glType===_gl.SHORT)internalFormat=_gl.R16I;if(glType===_gl.INT)internalFormat=_gl.R32I}if(glFormat===_gl.RG){if(glType===_gl.FLOAT)internalFormat=_gl.RG32F;if(glType===_gl.HALF_FLOAT)internalFormat=_gl.RG16F;if(glType===_gl.UNSIGNED_BYTE)internalFormat=_gl.RG8}if(glFormat===_gl.RG_INTEGER){if(glType===_gl.UNSIGNED_BYTE)internalFormat=_gl.RG8UI;if(glType===_gl.UNSIGNED_SHORT)internalFormat=_gl.RG16UI;if(glType===_gl.UNSIGNED_INT)internalFormat=_gl.RG32UI;if(glType===_gl.BYTE)internalFormat=_gl.RG8I;if(glType===_gl.SHORT)internalFormat=_gl.RG16I;if(glType===_gl.INT)internalFormat=_gl.RG32I}if(glFormat===_gl.RGB_INTEGER){if(glType===_gl.UNSIGNED_BYTE)internalFormat=_gl.RGB8UI;if(glType===_gl.UNSIGNED_SHORT)internalFormat=_gl.RGB16UI;if(glType===_gl.UNSIGNED_INT)internalFormat=_gl.RGB32UI;if(glType===_gl.BYTE)internalFormat=_gl.RGB8I;if(glType===_gl.SHORT)internalFormat=_gl.RGB16I;if(glType===_gl.INT)internalFormat=_gl.RGB32I}if(glFormat===_gl.RGBA_INTEGER){if(glType===_gl.UNSIGNED_BYTE)internalFormat=_gl.RGBA8UI;if(glType===_gl.UNSIGNED_SHORT)internalFormat=_gl.RGBA16UI;if(glType===_gl.UNSIGNED_INT)internalFormat=_gl.RGBA32UI;if(glType===_gl.BYTE)internalFormat=_gl.RGBA8I;if(glType===_gl.SHORT)internalFormat=_gl.RGBA16I;if(glType===_gl.INT)internalFormat=_gl.RGBA32I}if(glFormat===_gl.RGB){if(glType===_gl.UNSIGNED_INT_5_9_9_9_REV)internalFormat=_gl.RGB9_E5;if(glType===_gl.UNSIGNED_INT_10F_11F_11F_REV)internalFormat=_gl.R11F_G11F_B10F}if(glFormat===_gl.RGBA){const transfer=forceLinearTransfer?LinearTransfer:ColorManagement.getTransfer(colorSpace);if(glType===_gl.FLOAT)internalFormat=_gl.RGBA32F;if(glType===_gl.HALF_FLOAT)internalFormat=_gl.RGBA16F;if(glType===_gl.UNSIGNED_BYTE)internalFormat=transfer===SRGBTransfer?_gl.SRGB8_ALPHA8:_gl.RGBA8;if(glType===_gl.UNSIGNED_SHORT_4_4_4_4)internalFormat=_gl.RGBA4;if(glType===_gl.UNSIGNED_SHORT_5_5_5_1)internalFormat=_gl.RGB5_A1}if(internalFormat===_gl.R16F||internalFormat===_gl.R32F||internalFormat===_gl.RG16F||internalFormat===_gl.RG32F||internalFormat===_gl.RGBA16F||internalFormat===_gl.RGBA32F){extensions.get("EXT_color_buffer_float")}return internalFormat}function getInternalDepthFormat(useStencil,depthType){let glInternalFormat;if(useStencil){if(depthType===null||depthType===UnsignedIntType||depthType===UnsignedInt248Type){glInternalFormat=_gl.DEPTH24_STENCIL8}else if(depthType===FloatType){glInternalFormat=_gl.DEPTH32F_STENCIL8}else if(depthType===UnsignedShortType){glInternalFormat=_gl.DEPTH24_STENCIL8;warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")}}else{if(depthType===null||depthType===UnsignedIntType||depthType===UnsignedInt248Type){glInternalFormat=_gl.DEPTH_COMPONENT24}else if(depthType===FloatType){glInternalFormat=_gl.DEPTH_COMPONENT32F}else if(depthType===UnsignedShortType){glInternalFormat=_gl.DEPTH_COMPONENT16}}return glInternalFormat}function getMipLevels(texture,image){if(textureNeedsGenerateMipmaps(texture)===true||texture.isFramebufferTexture&&texture.minFilter!==NearestFilter&&texture.minFilter!==LinearFilter){return Math.log2(Math.max(image.width,image.height))+1}else if(texture.mipmaps!==undefined&&texture.mipmaps.length>0){return texture.mipmaps.length}else if(texture.isCompressedTexture&&Array.isArray(texture.image)){return image.mipmaps.length}else{return 1}}function onTextureDispose(event){const texture=event.target;texture.removeEventListener("dispose",onTextureDispose);deallocateTexture(texture);if(texture.isVideoTexture){_videoTextures.delete(texture)}}function onRenderTargetDispose(event){const renderTarget=event.target;renderTarget.removeEventListener("dispose",onRenderTargetDispose);deallocateRenderTarget(renderTarget)}function deallocateTexture(texture){const textureProperties=properties.get(texture);if(textureProperties.__webglInit===undefined)return;const source=texture.source;const webglTextures=_sources.get(source);if(webglTextures){const webglTexture=webglTextures[textureProperties.__cacheKey];webglTexture.usedTimes--;if(webglTexture.usedTimes===0){deleteTexture(texture)}if(Object.keys(webglTextures).length===0){_sources.delete(source)}}properties.remove(texture)}function deleteTexture(texture){const textureProperties=properties.get(texture);_gl.deleteTexture(textureProperties.__webglTexture);const source=texture.source;const webglTextures=_sources.get(source);delete webglTextures[textureProperties.__cacheKey];info.memory.textures--}function deallocateRenderTarget(renderTarget){const renderTargetProperties=properties.get(renderTarget);if(renderTarget.depthTexture){renderTarget.depthTexture.dispose();properties.remove(renderTarget.depthTexture)}if(renderTarget.isWebGLCubeRenderTarget){for(let i=0;i<6;i++){if(Array.isArray(renderTargetProperties.__webglFramebuffer[i])){for(let level=0;level<renderTargetProperties.__webglFramebuffer[i].length;level++)_gl.deleteFramebuffer(renderTargetProperties.__webglFramebuffer[i][level])}else{_gl.deleteFramebuffer(renderTargetProperties.__webglFramebuffer[i])}if(renderTargetProperties.__webglDepthbuffer)_gl.deleteRenderbuffer(renderTargetProperties.__webglDepthbuffer[i])}}else{if(Array.isArray(renderTargetProperties.__webglFramebuffer)){for(let level=0;level<renderTargetProperties.__webglFramebuffer.length;level++)_gl.deleteFramebuffer(renderTargetProperties.__webglFramebuffer[level])}else{_gl.deleteFramebuffer(renderTargetProperties.__webglFramebuffer)}if(renderTargetProperties.__webglDepthbuffer)_gl.deleteRenderbuffer(renderTargetProperties.__webglDepthbuffer);if(renderTargetProperties.__webglMultisampledFramebuffer)_gl.deleteFramebuffer(renderTargetProperties.__webglMultisampledFramebuffer);if(renderTargetProperties.__webglColorRenderbuffer){for(let i=0;i<renderTargetProperties.__webglColorRenderbuffer.length;i++){if(renderTargetProperties.__webglColorRenderbuffer[i])_gl.deleteRenderbuffer(renderTargetProperties.__webglColorRenderbuffer[i])}}if(renderTargetProperties.__webglDepthRenderbuffer)_gl.deleteRenderbuffer(renderTargetProperties.__webglDepthRenderbuffer)}const textures=renderTarget.textures;for(let i=0,il=textures.length;i<il;i++){const attachmentProperties=properties.get(textures[i]);if(attachmentProperties.__webglTexture){_gl.deleteTexture(attachmentProperties.__webglTexture);info.memory.textures--}properties.remove(textures[i])}properties.remove(renderTarget)}let textureUnits=0;function resetTextureUnits(){textureUnits=0}function allocateTextureUnit(){const textureUnit=textureUnits;if(textureUnit>=capabilities.maxTextures){warn("WebGLTextures: Trying to use "+textureUnit+" texture units while this GPU supports only "+capabilities.maxTextures)}textureUnits+=1;return textureUnit}function getTextureCacheKey(texture){const array=[];array.push(texture.wrapS);array.push(texture.wrapT);array.push(texture.wrapR||0);array.push(texture.magFilter);array.push(texture.minFilter);array.push(texture.anisotropy);array.push(texture.internalFormat);array.push(texture.format);array.push(texture.type);array.push(texture.generateMipmaps);array.push(texture.premultiplyAlpha);array.push(texture.flipY);array.push(texture.unpackAlignment);array.push(texture.colorSpace);return array.join()}function setTexture2D(texture,slot){const textureProperties=properties.get(texture);if(texture.isVideoTexture)updateVideoTexture(texture);if(texture.isRenderTargetTexture===false&&texture.isExternalTexture!==true&&texture.version>0&&textureProperties.__version!==texture.version){const image=texture.image;if(image===null){warn("WebGLRenderer: Texture marked for update but no image data found.")}else if(image.complete===false){warn("WebGLRenderer: Texture marked for update but image is incomplete")}else{uploadTexture(textureProperties,texture,slot);return}}else if(texture.isExternalTexture){textureProperties.__webglTexture=texture.sourceTexture?texture.sourceTexture:null}state.bindTexture(_gl.TEXTURE_2D,textureProperties.__webglTexture,_gl.TEXTURE0+slot)}function setTexture2DArray(texture,slot){const textureProperties=properties.get(texture);if(texture.isRenderTargetTexture===false&&texture.version>0&&textureProperties.__version!==texture.version){uploadTexture(textureProperties,texture,slot);return}else if(texture.isExternalTexture){textureProperties.__webglTexture=texture.sourceTexture?texture.sourceTexture:null}state.bindTexture(_gl.TEXTURE_2D_ARRAY,textureProperties.__webglTexture,_gl.TEXTURE0+slot)}function setTexture3D(texture,slot){const textureProperties=properties.get(texture);if(texture.isRenderTargetTexture===false&&texture.version>0&&textureProperties.__version!==texture.version){uploadTexture(textureProperties,texture,slot);return}state.bindTexture(_gl.TEXTURE_3D,textureProperties.__webglTexture,_gl.TEXTURE0+slot)}function setTextureCube(texture,slot){const textureProperties=properties.get(texture);if(texture.isCubeDepthTexture!==true&&texture.version>0&&textureProperties.__version!==texture.version){uploadCubeTexture(textureProperties,texture,slot);return}state.bindTexture(_gl.TEXTURE_CUBE_MAP,textureProperties.__webglTexture,_gl.TEXTURE0+slot)}const wrappingToGL={[RepeatWrapping]:_gl.REPEAT,[ClampToEdgeWrapping]:_gl.CLAMP_TO_EDGE,[MirroredRepeatWrapping]:_gl.MIRRORED_REPEAT};const filterToGL={[NearestFilter]:_gl.NEAREST,[NearestMipmapNearestFilter]:_gl.NEAREST_MIPMAP_NEAREST,[NearestMipmapLinearFilter]:_gl.NEAREST_MIPMAP_LINEAR,[LinearFilter]:_gl.LINEAR,[LinearMipmapNearestFilter]:_gl.LINEAR_MIPMAP_NEAREST,[LinearMipmapLinearFilter]:_gl.LINEAR_MIPMAP_LINEAR};const compareToGL={[NeverCompare]:_gl.NEVER,[AlwaysCompare]:_gl.ALWAYS,[LessCompare]:_gl.LESS,[LessEqualCompare]:_gl.LEQUAL,[EqualCompare]:_gl.EQUAL,[GreaterEqualCompare]:_gl.GEQUAL,[GreaterCompare]:_gl.GREATER,[NotEqualCompare]:_gl.NOTEQUAL};function setTextureParameters(textureType,texture){if(texture.type===FloatType&&extensions.has("OES_texture_float_linear")===false&&(texture.magFilter===LinearFilter||texture.magFilter===LinearMipmapNearestFilter||texture.magFilter===NearestMipmapLinearFilter||texture.magFilter===LinearMipmapLinearFilter||texture.minFilter===LinearFilter||texture.minFilter===LinearMipmapNearestFilter||texture.minFilter===NearestMipmapLinearFilter||texture.minFilter===LinearMipmapLinearFilter)){warn("WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device.")}_gl.texParameteri(textureType,_gl.TEXTURE_WRAP_S,wrappingToGL[texture.wrapS]);_gl.texParameteri(textureType,_gl.TEXTURE_WRAP_T,wrappingToGL[texture.wrapT]);if(textureType===_gl.TEXTURE_3D||textureType===_gl.TEXTURE_2D_ARRAY){_gl.texParameteri(textureType,_gl.TEXTURE_WRAP_R,wrappingToGL[texture.wrapR])}_gl.texParameteri(textureType,_gl.TEXTURE_MAG_FILTER,filterToGL[texture.magFilter]);_gl.texParameteri(textureType,_gl.TEXTURE_MIN_FILTER,filterToGL[texture.minFilter]);if(texture.compareFunction){_gl.texParameteri(textureType,_gl.TEXTURE_COMPARE_MODE,_gl.COMPARE_REF_TO_TEXTURE);_gl.texParameteri(textureType,_gl.TEXTURE_COMPARE_FUNC,compareToGL[texture.compareFunction])}if(extensions.has("EXT_texture_filter_anisotropic")===true){if(texture.magFilter===NearestFilter)return;if(texture.minFilter!==NearestMipmapLinearFilter&&texture.minFilter!==LinearMipmapLinearFilter)return;if(texture.type===FloatType&&extensions.has("OES_texture_float_linear")===false)return;if(texture.anisotropy>1||properties.get(texture).__currentAnisotropy){const extension=extensions.get("EXT_texture_filter_anisotropic");_gl.texParameterf(textureType,extension.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(texture.anisotropy,capabilities.getMaxAnisotropy()));properties.get(texture).__currentAnisotropy=texture.anisotropy}}}function initTexture(textureProperties,texture){let forceUpload=false;if(textureProperties.__webglInit===undefined){textureProperties.__webglInit=true;texture.addEventListener("dispose",onTextureDispose)}const source=texture.source;let webglTextures=_sources.get(source);if(webglTextures===undefined){webglTextures={};_sources.set(source,webglTextures)}const textureCacheKey=getTextureCacheKey(texture);if(textureCacheKey!==textureProperties.__cacheKey){if(webglTextures[textureCacheKey]===undefined){webglTextures[textureCacheKey]={texture:_gl.createTexture(),usedTimes:0};info.memory.textures++;forceUpload=true}webglTextures[textureCacheKey].usedTimes++;const webglTexture=webglTextures[textureProperties.__cacheKey];if(webglTexture!==undefined){webglTextures[textureProperties.__cacheKey].usedTimes--;if(webglTexture.usedTimes===0){deleteTexture(texture)}}textureProperties.__cacheKey=textureCacheKey;textureProperties.__webglTexture=webglTextures[textureCacheKey].texture}return forceUpload}function getRow(index,rowLength,componentStride){return Math.floor(Math.floor(index/componentStride)/rowLength)}function updateTexture(texture,image,glFormat,glType){const componentStride=4;const updateRanges=texture.updateRanges;if(updateRanges.length===0){state.texSubImage2D(_gl.TEXTURE_2D,0,0,0,image.width,image.height,glFormat,glType,image.data)}else{updateRanges.sort((a,b)=>a.start-b.start);let mergeIndex=0;for(let i=1;i<updateRanges.length;i++){const previousRange=updateRanges[mergeIndex];const range=updateRanges[i];const previousEnd=previousRange.start+previousRange.count;const currentRow=getRow(range.start,image.width,componentStride);const previousRow=getRow(previousRange.start,image.width,componentStride);if(range.start<=previousEnd+1&&currentRow===previousRow&&getRow(range.start+range.count-1,image.width,componentStride)===currentRow){previousRange.count=Math.max(previousRange.count,range.start+range.count-previousRange.start)}else{++mergeIndex;updateRanges[mergeIndex]=range}}updateRanges.length=mergeIndex+1;const currentUnpackRowLen=_gl.getParameter(_gl.UNPACK_ROW_LENGTH);const currentUnpackSkipPixels=_gl.getParameter(_gl.UNPACK_SKIP_PIXELS);const currentUnpackSkipRows=_gl.getParameter(_gl.UNPACK_SKIP_ROWS);_gl.pixelStorei(_gl.UNPACK_ROW_LENGTH,image.width);for(let i=0,l=updateRanges.length;i<l;i++){const range=updateRanges[i];const pixelStart=Math.floor(range.start/componentStride);const pixelCount=Math.ceil(range.count/componentStride);const x=pixelStart%image.width;const y=Math.floor(pixelStart/image.width);const width=pixelCount;const height=1;_gl.pixelStorei(_gl.UNPACK_SKIP_PIXELS,x);_gl.pixelStorei(_gl.UNPACK_SKIP_ROWS,y);state.texSubImage2D(_gl.TEXTURE_2D,0,x,y,width,height,glFormat,glType,image.data)}texture.clearUpdateRanges();_gl.pixelStorei(_gl.UNPACK_ROW_LENGTH,currentUnpackRowLen);_gl.pixelStorei(_gl.UNPACK_SKIP_PIXELS,currentUnpackSkipPixels);_gl.pixelStorei(_gl.UNPACK_SKIP_ROWS,currentUnpackSkipRows)}}function uploadTexture(textureProperties,texture,slot){let textureType=_gl.TEXTURE_2D;if(texture.isDataArrayTexture||texture.isCompressedArrayTexture)textureType=_gl.TEXTURE_2D_ARRAY;if(texture.isData3DTexture)textureType=_gl.TEXTURE_3D;const forceUpload=initTexture(textureProperties,texture);const source=texture.source;state.bindTexture(textureType,textureProperties.__webglTexture,_gl.TEXTURE0+slot);const sourceProperties=properties.get(source);if(source.version!==sourceProperties.__version||forceUpload===true){state.activeTexture(_gl.TEXTURE0+slot);const workingPrimaries=ColorManagement.getPrimaries(ColorManagement.workingColorSpace);const texturePrimaries=texture.colorSpace===NoColorSpace?null:ColorManagement.getPrimaries(texture.colorSpace);const unpackConversion=texture.colorSpace===NoColorSpace||workingPrimaries===texturePrimaries?_gl.NONE:_gl.BROWSER_DEFAULT_WEBGL;_gl.pixelStorei(_gl.UNPACK_FLIP_Y_WEBGL,texture.flipY);_gl.pixelStorei(_gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL,texture.premultiplyAlpha);_gl.pixelStorei(_gl.UNPACK_ALIGNMENT,texture.unpackAlignment);_gl.pixelStorei(_gl.UNPACK_COLORSPACE_CONVERSION_WEBGL,unpackConversion);let image=resizeImage(texture.image,false,capabilities.maxTextureSize);image=verifyColorSpace(texture,image);const glFormat=utils.convert(texture.format,texture.colorSpace);const glType=utils.convert(texture.type);let glInternalFormat=getInternalFormat(texture.internalFormat,glFormat,glType,texture.colorSpace,texture.isVideoTexture);setTextureParameters(textureType,texture);let mipmap;const mipmaps=texture.mipmaps;const useTexStorage=texture.isVideoTexture!==true;const allocateMemory=sourceProperties.__version===undefined||forceUpload===true;const dataReady=source.dataReady;const levels=getMipLevels(texture,image);if(texture.isDepthTexture){glInternalFormat=getInternalDepthFormat(texture.format===DepthStencilFormat,texture.type);if(allocateMemory){if(useTexStorage){state.texStorage2D(_gl.TEXTURE_2D,1,glInternalFormat,image.width,image.height)}else{state.texImage2D(_gl.TEXTURE_2D,0,glInternalFormat,image.width,image.height,0,glFormat,glType,null)}}}else if(texture.isDataTexture){if(mipmaps.length>0){if(useTexStorage&&allocateMemory){state.texStorage2D(_gl.TEXTURE_2D,levels,glInternalFormat,mipmaps[0].width,mipmaps[0].height)}for(let i=0,il=mipmaps.length;i<il;i++){mipmap=mipmaps[i];if(useTexStorage){if(dataReady){state.texSubImage2D(_gl.TEXTURE_2D,i,0,0,mipmap.width,mipmap.height,glFormat,glType,mipmap.data)}}else{state.texImage2D(_gl.TEXTURE_2D,i,glInternalFormat,mipmap.width,mipmap.height,0,glFormat,glType,mipmap.data)}}texture.generateMipmaps=false}else{if(useTexStorage){if(allocateMemory){state.texStorage2D(_gl.TEXTURE_2D,levels,glInternalFormat,image.width,image.height)}if(dataReady){updateTexture(texture,image,glFormat,glType)}}else{state.texImage2D(_gl.TEXTURE_2D,0,glInternalFormat,image.width,image.height,0,glFormat,glType,image.data)}}}else if(texture.isCompressedTexture){if(texture.isCompressedArrayTexture){if(useTexStorage&&allocateMemory){state.texStorage3D(_gl.TEXTURE_2D_ARRAY,levels,glInternalFormat,mipmaps[0].width,mipmaps[0].height,image.depth)}for(let i=0,il=mipmaps.length;i<il;i++){mipmap=mipmaps[i];if(texture.format!==RGBAFormat){if(glFormat!==null){if(useTexStorage){if(dataReady){if(texture.layerUpdates.size>0){const layerByteLength=getByteLength(mipmap.width,mipmap.height,texture.format,texture.type);for(const layerIndex of texture.layerUpdates){const layerData=mipmap.data.subarray(layerIndex*layerByteLength/mipmap.data.BYTES_PER_ELEMENT,(layerIndex+1)*layerByteLength/mipmap.data.BYTES_PER_ELEMENT);state.compressedTexSubImage3D(_gl.TEXTURE_2D_ARRAY,i,0,0,layerIndex,mipmap.width,mipmap.height,1,glFormat,layerData)}texture.clearLayerUpdates()}else{state.compressedTexSubImage3D(_gl.TEXTURE_2D_ARRAY,i,0,0,0,mipmap.width,mipmap.height,image.depth,glFormat,mipmap.data)}}}else{state.compressedTexImage3D(_gl.TEXTURE_2D_ARRAY,i,glInternalFormat,mipmap.width,mipmap.height,image.depth,0,mipmap.data,0,0)}}else{warn("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()")}}else{if(useTexStorage){if(dataReady){state.texSubImage3D(_gl.TEXTURE_2D_ARRAY,i,0,0,0,mipmap.width,mipmap.height,image.depth,glFormat,glType,mipmap.data)}}else{state.texImage3D(_gl.TEXTURE_2D_ARRAY,i,glInternalFormat,mipmap.width,mipmap.height,image.depth,0,glFormat,glType,mipmap.data)}}}}else{if(useTexStorage&&allocateMemory){state.texStorage2D(_gl.TEXTURE_2D,levels,glInternalFormat,mipmaps[0].width,mipmaps[0].height)}for(let i=0,il=mipmaps.length;i<il;i++){mipmap=mipmaps[i];if(texture.format!==RGBAFormat){if(glFormat!==null){if(useTexStorage){if(dataReady){state.compressedTexSubImage2D(_gl.TEXTURE_2D,i,0,0,mipmap.width,mipmap.height,glFormat,mipmap.data)}}else{state.compressedTexImage2D(_gl.TEXTURE_2D,i,glInternalFormat,mipmap.width,mipmap.height,0,mipmap.data)}}else{warn("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()")}}else{if(useTexStorage){if(dataReady){state.texSubImage2D(_gl.TEXTURE_2D,i,0,0,mipmap.width,mipmap.height,glFormat,glType,mipmap.data)}}else{state.texImage2D(_gl.TEXTURE_2D,i,glInternalFormat,mipmap.width,mipmap.height,0,glFormat,glType,mipmap.data)}}}}}else if(texture.isDataArrayTexture){if(useTexStorage){if(allocateMemory){state.texStorage3D(_gl.TEXTURE_2D_ARRAY,levels,glInternalFormat,image.width,image.height,image.depth)}if(dataReady){if(texture.layerUpdates.size>0){const layerByteLength=getByteLength(image.width,image.height,texture.format,texture.type);for(const layerIndex of texture.layerUpdates){const layerData=image.data.subarray(layerIndex*layerByteLength/image.data.BYTES_PER_ELEMENT,(layerIndex+1)*layerByteLength/image.data.BYTES_PER_ELEMENT);state.texSubImage3D(_gl.TEXTURE_2D_ARRAY,0,0,0,layerIndex,image.width,image.height,1,glFormat,glType,layerData)}texture.clearLayerUpdates()}else{state.texSubImage3D(_gl.TEXTURE_2D_ARRAY,0,0,0,0,image.width,image.height,image.depth,glFormat,glType,image.data)}}}else{state.texImage3D(_gl.TEXTURE_2D_ARRAY,0,glInternalFormat,image.width,image.height,image.depth,0,glFormat,glType,image.data)}}else if(texture.isData3DTexture){if(useTexStorage){if(allocateMemory){state.texStorage3D(_gl.TEXTURE_3D,levels,glInternalFormat,image.width,image.height,image.depth)}if(dataReady){state.texSubImage3D(_gl.TEXTURE_3D,0,0,0,0,image.width,image.height,image.depth,glFormat,glType,image.data)}}else{state.texImage3D(_gl.TEXTURE_3D,0,glInternalFormat,image.width,image.height,image.depth,0,glFormat,glType,image.data)}}else if(texture.isFramebufferTexture){if(allocateMemory){if(useTexStorage){state.texStorage2D(_gl.TEXTURE_2D,levels,glInternalFormat,image.width,image.height)}else{let width=image.width,height=image.height;for(let i=0;i<levels;i++){state.texImage2D(_gl.TEXTURE_2D,i,glInternalFormat,width,height,0,glFormat,glType,null);width>>=1;height>>=1}}}}else{if(mipmaps.length>0){if(useTexStorage&&allocateMemory){const dimensions=getDimensions(mipmaps[0]);state.texStorage2D(_gl.TEXTURE_2D,levels,glInternalFormat,dimensions.width,dimensions.height)}for(let i=0,il=mipmaps.length;i<il;i++){mipmap=mipmaps[i];if(useTexStorage){if(dataReady){state.texSubImage2D(_gl.TEXTURE_2D,i,0,0,glFormat,glType,mipmap)}}else{state.texImage2D(_gl.TEXTURE_2D,i,glInternalFormat,glFormat,glType,mipmap)}}texture.generateMipmaps=false}else{if(useTexStorage){if(allocateMemory){const dimensions=getDimensions(image);state.texStorage2D(_gl.TEXTURE_2D,levels,glInternalFormat,dimensions.width,dimensions.height)}if(dataReady){state.texSubImage2D(_gl.TEXTURE_2D,0,0,0,glFormat,glType,image)}}else{state.texImage2D(_gl.TEXTURE_2D,0,glInternalFormat,glFormat,glType,image)}}}if(textureNeedsGenerateMipmaps(texture)){generateMipmap(textureType)}sourceProperties.__version=source.version;if(texture.onUpdate)texture.onUpdate(texture)}textureProperties.__version=texture.version}function uploadCubeTexture(textureProperties,texture,slot){if(texture.image.length!==6)return;const forceUpload=initTexture(textureProperties,texture);const source=texture.source;state.bindTexture(_gl.TEXTURE_CUBE_MAP,textureProperties.__webglTexture,_gl.TEXTURE0+slot);const sourceProperties=properties.get(source);if(source.version!==sourceProperties.__version||forceUpload===true){state.activeTexture(_gl.TEXTURE0+slot);const workingPrimaries=ColorManagement.getPrimaries(ColorManagement.workingColorSpace);const texturePrimaries=texture.colorSpace===NoColorSpace?null:ColorManagement.getPrimaries(texture.colorSpace);const unpackConversion=texture.colorSpace===NoColorSpace||workingPrimaries===texturePrimaries?_gl.NONE:_gl.BROWSER_DEFAULT_WEBGL;_gl.pixelStorei(_gl.UNPACK_FLIP_Y_WEBGL,texture.flipY);_gl.pixelStorei(_gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL,texture.premultiplyAlpha);_gl.pixelStorei(_gl.UNPACK_ALIGNMENT,texture.unpackAlignment);_gl.pixelStorei(_gl.UNPACK_COLORSPACE_CONVERSION_WEBGL,unpackConversion);const isCompressed=texture.isCompressedTexture||texture.image[0].isCompressedTexture;const isDataTexture=texture.image[0]&&texture.image[0].isDataTexture;const cubeImage=[];for(let i=0;i<6;i++){if(!isCompressed&&!isDataTexture){cubeImage[i]=resizeImage(texture.image[i],true,capabilities.maxCubemapSize)}else{cubeImage[i]=isDataTexture?texture.image[i].image:texture.image[i]}cubeImage[i]=verifyColorSpace(texture,cubeImage[i])}const image=cubeImage[0],glFormat=utils.convert(texture.format,texture.colorSpace),glType=utils.convert(texture.type),glInternalFormat=getInternalFormat(texture.internalFormat,glFormat,glType,texture.colorSpace);const useTexStorage=texture.isVideoTexture!==true;const allocateMemory=sourceProperties.__version===undefined||forceUpload===true;const dataReady=source.dataReady;let levels=getMipLevels(texture,image);setTextureParameters(_gl.TEXTURE_CUBE_MAP,texture);let mipmaps;if(isCompressed){if(useTexStorage&&allocateMemory){state.texStorage2D(_gl.TEXTURE_CUBE_MAP,levels,glInternalFormat,image.width,image.height)}for(let i=0;i<6;i++){mipmaps=cubeImage[i].mipmaps;for(let j=0;j<mipmaps.length;j++){const mipmap=mipmaps[j];if(texture.format!==RGBAFormat){if(glFormat!==null){if(useTexStorage){if(dataReady){state.compressedTexSubImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X+i,j,0,0,mipmap.width,mipmap.height,glFormat,mipmap.data)}}else{state.compressedTexImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X+i,j,glInternalFormat,mipmap.width,mipmap.height,0,mipmap.data)}}else{warn("WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()")}}else{if(useTexStorage){if(dataReady){state.texSubImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X+i,j,0,0,mipmap.width,mipmap.height,glFormat,glType,mipmap.data)}}else{state.texImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X+i,j,glInternalFormat,mipmap.width,mipmap.height,0,glFormat,glType,mipmap.data)}}}}}else{mipmaps=texture.mipmaps;if(useTexStorage&&allocateMemory){if(mipmaps.length>0)levels++;const dimensions=getDimensions(cubeImage[0]);state.texStorage2D(_gl.TEXTURE_CUBE_MAP,levels,glInternalFormat,dimensions.width,dimensions.height)}for(let i=0;i<6;i++){if(isDataTexture){if(useTexStorage){if(dataReady){state.texSubImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,0,0,cubeImage[i].width,cubeImage[i].height,glFormat,glType,cubeImage[i].data)}}else{state.texImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,glInternalFormat,cubeImage[i].width,cubeImage[i].height,0,glFormat,glType,cubeImage[i].data)}for(let j=0;j<mipmaps.length;j++){const mipmap=mipmaps[j];const mipmapImage=mipmap.image[i].image;if(useTexStorage){if(dataReady){state.texSubImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X+i,j+1,0,0,mipmapImage.width,mipmapImage.height,glFormat,glType,mipmapImage.data)}}else{state.texImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X+i,j+1,glInternalFormat,mipmapImage.width,mipmapImage.height,0,glFormat,glType,mipmapImage.data)}}}else{if(useTexStorage){if(dataReady){state.texSubImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,0,0,glFormat,glType,cubeImage[i])}}else{state.texImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,glInternalFormat,glFormat,glType,cubeImage[i])}for(let j=0;j<mipmaps.length;j++){const mipmap=mipmaps[j];if(useTexStorage){if(dataReady){state.texSubImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X+i,j+1,0,0,glFormat,glType,mipmap.image[i])}}else{state.texImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X+i,j+1,glInternalFormat,glFormat,glType,mipmap.image[i])}}}}}if(textureNeedsGenerateMipmaps(texture)){generateMipmap(_gl.TEXTURE_CUBE_MAP)}sourceProperties.__version=source.version;if(texture.onUpdate)texture.onUpdate(texture)}textureProperties.__version=texture.version}function setupFrameBufferTexture(framebuffer,renderTarget,texture,attachment,textureTarget,level){const glFormat=utils.convert(texture.format,texture.colorSpace);const glType=utils.convert(texture.type);const glInternalFormat=getInternalFormat(texture.internalFormat,glFormat,glType,texture.colorSpace);const renderTargetProperties=properties.get(renderTarget);const textureProperties=properties.get(texture);textureProperties.__renderTarget=renderTarget;if(!renderTargetProperties.__hasExternalTextures){const width=Math.max(1,renderTarget.width>>level);const height=Math.max(1,renderTarget.height>>level);if(textureTarget===_gl.TEXTURE_3D||textureTarget===_gl.TEXTURE_2D_ARRAY){state.texImage3D(textureTarget,level,glInternalFormat,width,height,renderTarget.depth,0,glFormat,glType,null)}else{state.texImage2D(textureTarget,level,glInternalFormat,width,height,0,glFormat,glType,null)}}state.bindFramebuffer(_gl.FRAMEBUFFER,framebuffer);if(useMultisampledRTT(renderTarget)){multisampledRTTExt.framebufferTexture2DMultisampleEXT(_gl.FRAMEBUFFER,attachment,textureTarget,textureProperties.__webglTexture,0,getRenderTargetSamples(renderTarget))}else if(textureTarget===_gl.TEXTURE_2D||textureTarget>=_gl.TEXTURE_CUBE_MAP_POSITIVE_X&&textureTarget<=_gl.TEXTURE_CUBE_MAP_NEGATIVE_Z){_gl.framebufferTexture2D(_gl.FRAMEBUFFER,attachment,textureTarget,textureProperties.__webglTexture,level)}state.bindFramebuffer(_gl.FRAMEBUFFER,null)}function setupRenderBufferStorage(renderbuffer,renderTarget,useMultisample){_gl.bindRenderbuffer(_gl.RENDERBUFFER,renderbuffer);if(renderTarget.depthBuffer){const depthTexture=renderTarget.depthTexture;const depthType=depthTexture&&depthTexture.isDepthTexture?depthTexture.type:null;const glInternalFormat=getInternalDepthFormat(renderTarget.stencilBuffer,depthType);const glAttachmentType=renderTarget.stencilBuffer?_gl.DEPTH_STENCIL_ATTACHMENT:_gl.DEPTH_ATTACHMENT;if(useMultisampledRTT(renderTarget)){multisampledRTTExt.renderbufferStorageMultisampleEXT(_gl.RENDERBUFFER,getRenderTargetSamples(renderTarget),glInternalFormat,renderTarget.width,renderTarget.height)}else if(useMultisample){_gl.renderbufferStorageMultisample(_gl.RENDERBUFFER,getRenderTargetSamples(renderTarget),glInternalFormat,renderTarget.width,renderTarget.height)}else{_gl.renderbufferStorage(_gl.RENDERBUFFER,glInternalFormat,renderTarget.width,renderTarget.height)}_gl.framebufferRenderbuffer(_gl.FRAMEBUFFER,glAttachmentType,_gl.RENDERBUFFER,renderbuffer)}else{const textures=renderTarget.textures;for(let i=0;i<textures.length;i++){const texture=textures[i];const glFormat=utils.convert(texture.format,texture.colorSpace);const glType=utils.convert(texture.type);const glInternalFormat=getInternalFormat(texture.internalFormat,glFormat,glType,texture.colorSpace);if(useMultisampledRTT(renderTarget)){multisampledRTTExt.renderbufferStorageMultisampleEXT(_gl.RENDERBUFFER,getRenderTargetSamples(renderTarget),glInternalFormat,renderTarget.width,renderTarget.height)}else if(useMultisample){_gl.renderbufferStorageMultisample(_gl.RENDERBUFFER,getRenderTargetSamples(renderTarget),glInternalFormat,renderTarget.width,renderTarget.height)}else{_gl.renderbufferStorage(_gl.RENDERBUFFER,glInternalFormat,renderTarget.width,renderTarget.height)}}}_gl.bindRenderbuffer(_gl.RENDERBUFFER,null)}function setupDepthTexture(framebuffer,renderTarget,cubeFace){const isCube=renderTarget.isWebGLCubeRenderTarget===true;state.bindFramebuffer(_gl.FRAMEBUFFER,framebuffer);if(!(renderTarget.depthTexture&&renderTarget.depthTexture.isDepthTexture)){throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture")}const textureProperties=properties.get(renderTarget.depthTexture);textureProperties.__renderTarget=renderTarget;if(!textureProperties.__webglTexture||renderTarget.depthTexture.image.width!==renderTarget.width||renderTarget.depthTexture.image.height!==renderTarget.height){renderTarget.depthTexture.image.width=renderTarget.width;renderTarget.depthTexture.image.height=renderTarget.height;renderTarget.depthTexture.needsUpdate=true}if(isCube){if(textureProperties.__webglInit===undefined){textureProperties.__webglInit=true;renderTarget.depthTexture.addEventListener("dispose",onTextureDispose)}if(textureProperties.__webglTexture===undefined){textureProperties.__webglTexture=_gl.createTexture();state.bindTexture(_gl.TEXTURE_CUBE_MAP,textureProperties.__webglTexture);setTextureParameters(_gl.TEXTURE_CUBE_MAP,renderTarget.depthTexture);const glFormat=utils.convert(renderTarget.depthTexture.format);const glType=utils.convert(renderTarget.depthTexture.type);let glInternalFormat;if(renderTarget.depthTexture.format===DepthFormat){glInternalFormat=_gl.DEPTH_COMPONENT24}else if(renderTarget.depthTexture.format===DepthStencilFormat){glInternalFormat=_gl.DEPTH24_STENCIL8}for(let i=0;i<6;i++){_gl.texImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,glInternalFormat,renderTarget.width,renderTarget.height,0,glFormat,glType,null)}}}else{setTexture2D(renderTarget.depthTexture,0)}const webglDepthTexture=textureProperties.__webglTexture;const samples=getRenderTargetSamples(renderTarget);const glTextureType=isCube?_gl.TEXTURE_CUBE_MAP_POSITIVE_X+cubeFace:_gl.TEXTURE_2D;const glAttachmentType=renderTarget.depthTexture.format===DepthStencilFormat?_gl.DEPTH_STENCIL_ATTACHMENT:_gl.DEPTH_ATTACHMENT;if(renderTarget.depthTexture.format===DepthFormat){if(useMultisampledRTT(renderTarget)){multisampledRTTExt.framebufferTexture2DMultisampleEXT(_gl.FRAMEBUFFER,glAttachmentType,glTextureType,webglDepthTexture,0,samples)}else{_gl.framebufferTexture2D(_gl.FRAMEBUFFER,glAttachmentType,glTextureType,webglDepthTexture,0)}}else if(renderTarget.depthTexture.format===DepthStencilFormat){if(useMultisampledRTT(renderTarget)){multisampledRTTExt.framebufferTexture2DMultisampleEXT(_gl.FRAMEBUFFER,glAttachmentType,glTextureType,webglDepthTexture,0,samples)}else{_gl.framebufferTexture2D(_gl.FRAMEBUFFER,glAttachmentType,glTextureType,webglDepthTexture,0)}}else{throw new Error("Unknown depthTexture format")}}function setupDepthRenderbuffer(renderTarget){const renderTargetProperties=properties.get(renderTarget);const isCube=renderTarget.isWebGLCubeRenderTarget===true;if(renderTargetProperties.__boundDepthTexture!==renderTarget.depthTexture){const depthTexture=renderTarget.depthTexture;if(renderTargetProperties.__depthDisposeCallback){renderTargetProperties.__depthDisposeCallback()}if(depthTexture){const disposeEvent=()=>{delete renderTargetProperties.__boundDepthTexture;delete renderTargetProperties.__depthDisposeCallback;depthTexture.removeEventListener("dispose",disposeEvent)};depthTexture.addEventListener("dispose",disposeEvent);renderTargetProperties.__depthDisposeCallback=disposeEvent}renderTargetProperties.__boundDepthTexture=depthTexture}if(renderTarget.depthTexture&&!renderTargetProperties.__autoAllocateDepthBuffer){if(isCube){for(let i=0;i<6;i++){setupDepthTexture(renderTargetProperties.__webglFramebuffer[i],renderTarget,i)}}else{const mipmaps=renderTarget.texture.mipmaps;if(mipmaps&&mipmaps.length>0){setupDepthTexture(renderTargetProperties.__webglFramebuffer[0],renderTarget,0)}else{setupDepthTexture(renderTargetProperties.__webglFramebuffer,renderTarget,0)}}}else{if(isCube){renderTargetProperties.__webglDepthbuffer=[];for(let i=0;i<6;i++){state.bindFramebuffer(_gl.FRAMEBUFFER,renderTargetProperties.__webglFramebuffer[i]);if(renderTargetProperties.__webglDepthbuffer[i]===undefined){renderTargetProperties.__webglDepthbuffer[i]=_gl.createRenderbuffer();setupRenderBufferStorage(renderTargetProperties.__webglDepthbuffer[i],renderTarget,false)}else{const glAttachmentType=renderTarget.stencilBuffer?_gl.DEPTH_STENCIL_ATTACHMENT:_gl.DEPTH_ATTACHMENT;const renderbuffer=renderTargetProperties.__webglDepthbuffer[i];_gl.bindRenderbuffer(_gl.RENDERBUFFER,renderbuffer);_gl.framebufferRenderbuffer(_gl.FRAMEBUFFER,glAttachmentType,_gl.RENDERBUFFER,renderbuffer)}}}else{const mipmaps=renderTarget.texture.mipmaps;if(mipmaps&&mipmaps.length>0){state.bindFramebuffer(_gl.FRAMEBUFFER,renderTargetProperties.__webglFramebuffer[0])}else{state.bindFramebuffer(_gl.FRAMEBUFFER,renderTargetProperties.__webglFramebuffer)}if(renderTargetProperties.__webglDepthbuffer===undefined){renderTargetProperties.__webglDepthbuffer=_gl.createRenderbuffer();setupRenderBufferStorage(renderTargetProperties.__webglDepthbuffer,renderTarget,false)}else{const glAttachmentType=renderTarget.stencilBuffer?_gl.DEPTH_STENCIL_ATTACHMENT:_gl.DEPTH_ATTACHMENT;const renderbuffer=renderTargetProperties.__webglDepthbuffer;_gl.bindRenderbuffer(_gl.RENDERBUFFER,renderbuffer);_gl.framebufferRenderbuffer(_gl.FRAMEBUFFER,glAttachmentType,_gl.RENDERBUFFER,renderbuffer)}}}state.bindFramebuffer(_gl.FRAMEBUFFER,null)}function rebindTextures(renderTarget,colorTexture,depthTexture){const renderTargetProperties=properties.get(renderTarget);if(colorTexture!==undefined){setupFrameBufferTexture(renderTargetProperties.__webglFramebuffer,renderTarget,renderTarget.texture,_gl.COLOR_ATTACHMENT0,_gl.TEXTURE_2D,0)}if(depthTexture!==undefined){setupDepthRenderbuffer(renderTarget)}}function setupRenderTarget(renderTarget){const texture=renderTarget.texture;const renderTargetProperties=properties.get(renderTarget);const textureProperties=properties.get(texture);renderTarget.addEventListener("dispose",onRenderTargetDispose);const textures=renderTarget.textures;const isCube=renderTarget.isWebGLCubeRenderTarget===true;const isMultipleRenderTargets=textures.length>1;if(!isMultipleRenderTargets){if(textureProperties.__webglTexture===undefined){textureProperties.__webglTexture=_gl.createTexture()}textureProperties.__version=texture.version;info.memory.textures++}if(isCube){renderTargetProperties.__webglFramebuffer=[];for(let i=0;i<6;i++){if(texture.mipmaps&&texture.mipmaps.length>0){renderTargetProperties.__webglFramebuffer[i]=[];for(let level=0;level<texture.mipmaps.length;level++){renderTargetProperties.__webglFramebuffer[i][level]=_gl.createFramebuffer()}}else{renderTargetProperties.__webglFramebuffer[i]=_gl.createFramebuffer()}}}else{if(texture.mipmaps&&texture.mipmaps.length>0){renderTargetProperties.__webglFramebuffer=[];for(let level=0;level<texture.mipmaps.length;level++){renderTargetProperties.__webglFramebuffer[level]=_gl.createFramebuffer()}}else{renderTargetProperties.__webglFramebuffer=_gl.createFramebuffer()}if(isMultipleRenderTargets){for(let i=0,il=textures.length;i<il;i++){const attachmentProperties=properties.get(textures[i]);if(attachmentProperties.__webglTexture===undefined){attachmentProperties.__webglTexture=_gl.createTexture();info.memory.textures++}}}if(renderTarget.samples>0&&useMultisampledRTT(renderTarget)===false){renderTargetProperties.__webglMultisampledFramebuffer=_gl.createFramebuffer();renderTargetProperties.__webglColorRenderbuffer=[];state.bindFramebuffer(_gl.FRAMEBUFFER,renderTargetProperties.__webglMultisampledFramebuffer);for(let i=0;i<textures.length;i++){const texture=textures[i];renderTargetProperties.__webglColorRenderbuffer[i]=_gl.createRenderbuffer();_gl.bindRenderbuffer(_gl.RENDERBUFFER,renderTargetProperties.__webglColorRenderbuffer[i]);const glFormat=utils.convert(texture.format,texture.colorSpace);const glType=utils.convert(texture.type);const glInternalFormat=getInternalFormat(texture.internalFormat,glFormat,glType,texture.colorSpace,renderTarget.isXRRenderTarget===true);const samples=getRenderTargetSamples(renderTarget);_gl.renderbufferStorageMultisample(_gl.RENDERBUFFER,samples,glInternalFormat,renderTarget.width,renderTarget.height);_gl.framebufferRenderbuffer(_gl.FRAMEBUFFER,_gl.COLOR_ATTACHMENT0+i,_gl.RENDERBUFFER,renderTargetProperties.__webglColorRenderbuffer[i])}_gl.bindRenderbuffer(_gl.RENDERBUFFER,null);if(renderTarget.depthBuffer){renderTargetProperties.__webglDepthRenderbuffer=_gl.createRenderbuffer();setupRenderBufferStorage(renderTargetProperties.__webglDepthRenderbuffer,renderTarget,true)}state.bindFramebuffer(_gl.FRAMEBUFFER,null)}}if(isCube){state.bindTexture(_gl.TEXTURE_CUBE_MAP,textureProperties.__webglTexture);setTextureParameters(_gl.TEXTURE_CUBE_MAP,texture);for(let i=0;i<6;i++){if(texture.mipmaps&&texture.mipmaps.length>0){for(let level=0;level<texture.mipmaps.length;level++){setupFrameBufferTexture(renderTargetProperties.__webglFramebuffer[i][level],renderTarget,texture,_gl.COLOR_ATTACHMENT0,_gl.TEXTURE_CUBE_MAP_POSITIVE_X+i,level)}}else{setupFrameBufferTexture(renderTargetProperties.__webglFramebuffer[i],renderTarget,texture,_gl.COLOR_ATTACHMENT0,_gl.TEXTURE_CUBE_MAP_POSITIVE_X+i,0)}}if(textureNeedsGenerateMipmaps(texture)){generateMipmap(_gl.TEXTURE_CUBE_MAP)}state.unbindTexture()}else if(isMultipleRenderTargets){for(let i=0,il=textures.length;i<il;i++){const attachment=textures[i];const attachmentProperties=properties.get(attachment);let glTextureType=_gl.TEXTURE_2D;if(renderTarget.isWebGL3DRenderTarget||renderTarget.isWebGLArrayRenderTarget){glTextureType=renderTarget.isWebGL3DRenderTarget?_gl.TEXTURE_3D:_gl.TEXTURE_2D_ARRAY}state.bindTexture(glTextureType,attachmentProperties.__webglTexture);setTextureParameters(glTextureType,attachment);setupFrameBufferTexture(renderTargetProperties.__webglFramebuffer,renderTarget,attachment,_gl.COLOR_ATTACHMENT0+i,glTextureType,0);if(textureNeedsGenerateMipmaps(attachment)){generateMipmap(glTextureType)}}state.unbindTexture()}else{let glTextureType=_gl.TEXTURE_2D;if(renderTarget.isWebGL3DRenderTarget||renderTarget.isWebGLArrayRenderTarget){glTextureType=renderTarget.isWebGL3DRenderTarget?_gl.TEXTURE_3D:_gl.TEXTURE_2D_ARRAY}state.bindTexture(glTextureType,textureProperties.__webglTexture);setTextureParameters(glTextureType,texture);if(texture.mipmaps&&texture.mipmaps.length>0){for(let level=0;level<texture.mipmaps.length;level++){setupFrameBufferTexture(renderTargetProperties.__webglFramebuffer[level],renderTarget,texture,_gl.COLOR_ATTACHMENT0,glTextureType,level)}}else{setupFrameBufferTexture(renderTargetProperties.__webglFramebuffer,renderTarget,texture,_gl.COLOR_ATTACHMENT0,glTextureType,0)}if(textureNeedsGenerateMipmaps(texture)){generateMipmap(glTextureType)}state.unbindTexture()}if(renderTarget.depthBuffer){setupDepthRenderbuffer(renderTarget)}}function updateRenderTargetMipmap(renderTarget){const textures=renderTarget.textures;for(let i=0,il=textures.length;i<il;i++){const texture=textures[i];if(textureNeedsGenerateMipmaps(texture)){const targetType=getTargetType(renderTarget);const webglTexture=properties.get(texture).__webglTexture;state.bindTexture(targetType,webglTexture);generateMipmap(targetType);state.unbindTexture()}}}const invalidationArrayRead=[];const invalidationArrayDraw=[];function updateMultisampleRenderTarget(renderTarget){if(renderTarget.samples>0){if(useMultisampledRTT(renderTarget)===false){const textures=renderTarget.textures;const width=renderTarget.width;const height=renderTarget.height;let mask=_gl.COLOR_BUFFER_BIT;const depthStyle=renderTarget.stencilBuffer?_gl.DEPTH_STENCIL_ATTACHMENT:_gl.DEPTH_ATTACHMENT;const renderTargetProperties=properties.get(renderTarget);const isMultipleRenderTargets=textures.length>1;if(isMultipleRenderTargets){for(let i=0;i<textures.length;i++){state.bindFramebuffer(_gl.FRAMEBUFFER,renderTargetProperties.__webglMultisampledFramebuffer);_gl.framebufferRenderbuffer(_gl.FRAMEBUFFER,_gl.COLOR_ATTACHMENT0+i,_gl.RENDERBUFFER,null);state.bindFramebuffer(_gl.FRAMEBUFFER,renderTargetProperties.__webglFramebuffer);_gl.framebufferTexture2D(_gl.DRAW_FRAMEBUFFER,_gl.COLOR_ATTACHMENT0+i,_gl.TEXTURE_2D,null,0)}}state.bindFramebuffer(_gl.READ_FRAMEBUFFER,renderTargetProperties.__webglMultisampledFramebuffer);const mipmaps=renderTarget.texture.mipmaps;if(mipmaps&&mipmaps.length>0){state.bindFramebuffer(_gl.DRAW_FRAMEBUFFER,renderTargetProperties.__webglFramebuffer[0])}else{state.bindFramebuffer(_gl.DRAW_FRAMEBUFFER,renderTargetProperties.__webglFramebuffer)}for(let i=0;i<textures.length;i++){if(renderTarget.resolveDepthBuffer){if(renderTarget.depthBuffer)mask|=_gl.DEPTH_BUFFER_BIT;if(renderTarget.stencilBuffer&&renderTarget.resolveStencilBuffer)mask|=_gl.STENCIL_BUFFER_BIT}if(isMultipleRenderTargets){_gl.framebufferRenderbuffer(_gl.READ_FRAMEBUFFER,_gl.COLOR_ATTACHMENT0,_gl.RENDERBUFFER,renderTargetProperties.__webglColorRenderbuffer[i]);const webglTexture=properties.get(textures[i]).__webglTexture;_gl.framebufferTexture2D(_gl.DRAW_FRAMEBUFFER,_gl.COLOR_ATTACHMENT0,_gl.TEXTURE_2D,webglTexture,0)}_gl.blitFramebuffer(0,0,width,height,0,0,width,height,mask,_gl.NEAREST);if(supportsInvalidateFramebuffer===true){invalidationArrayRead.length=0;invalidationArrayDraw.length=0;invalidationArrayRead.push(_gl.COLOR_ATTACHMENT0+i);if(renderTarget.depthBuffer&&renderTarget.resolveDepthBuffer===false){invalidationArrayRead.push(depthStyle);invalidationArrayDraw.push(depthStyle);_gl.invalidateFramebuffer(_gl.DRAW_FRAMEBUFFER,invalidationArrayDraw)}_gl.invalidateFramebuffer(_gl.READ_FRAMEBUFFER,invalidationArrayRead)}}state.bindFramebuffer(_gl.READ_FRAMEBUFFER,null);state.bindFramebuffer(_gl.DRAW_FRAMEBUFFER,null);if(isMultipleRenderTargets){for(let i=0;i<textures.length;i++){state.bindFramebuffer(_gl.FRAMEBUFFER,renderTargetProperties.__webglMultisampledFramebuffer);_gl.framebufferRenderbuffer(_gl.FRAMEBUFFER,_gl.COLOR_ATTACHMENT0+i,_gl.RENDERBUFFER,renderTargetProperties.__webglColorRenderbuffer[i]);const webglTexture=properties.get(textures[i]).__webglTexture;state.bindFramebuffer(_gl.FRAMEBUFFER,renderTargetProperties.__webglFramebuffer);_gl.framebufferTexture2D(_gl.DRAW_FRAMEBUFFER,_gl.COLOR_ATTACHMENT0+i,_gl.TEXTURE_2D,webglTexture,0)}}state.bindFramebuffer(_gl.DRAW_FRAMEBUFFER,renderTargetProperties.__webglMultisampledFramebuffer)}else{if(renderTarget.depthBuffer&&renderTarget.resolveDepthBuffer===false&&supportsInvalidateFramebuffer){const depthStyle=renderTarget.stencilBuffer?_gl.DEPTH_STENCIL_ATTACHMENT:_gl.DEPTH_ATTACHMENT;_gl.invalidateFramebuffer(_gl.DRAW_FRAMEBUFFER,[depthStyle])}}}}function getRenderTargetSamples(renderTarget){return Math.min(capabilities.maxSamples,renderTarget.samples)}function useMultisampledRTT(renderTarget){const renderTargetProperties=properties.get(renderTarget);return renderTarget.samples>0&&extensions.has("WEBGL_multisampled_render_to_texture")===true&&renderTargetProperties.__useRenderToTexture!==false}function updateVideoTexture(texture){const frame=info.render.frame;if(_videoTextures.get(texture)!==frame){_videoTextures.set(texture,frame);texture.update()}}function verifyColorSpace(texture,image){const colorSpace=texture.colorSpace;const format=texture.format;const type=texture.type;if(texture.isCompressedTexture===true||texture.isVideoTexture===true)return image;if(colorSpace!==LinearSRGBColorSpace&&colorSpace!==NoColorSpace){if(ColorManagement.getTransfer(colorSpace)===SRGBTransfer){if(format!==RGBAFormat||type!==UnsignedByteType){warn("WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.")}}else{error("WebGLTextures: Unsupported texture color space:",colorSpace)}}return image}function getDimensions(image){if(typeof HTMLImageElement!=="undefined"&&image instanceof HTMLImageElement){_imageDimensions.width=image.naturalWidth||image.width;_imageDimensions.height=image.naturalHeight||image.height}else if(typeof VideoFrame!=="undefined"&&image instanceof VideoFrame){_imageDimensions.width=image.displayWidth;_imageDimensions.height=image.displayHeight}else{_imageDimensions.width=image.width;_imageDimensions.height=image.height}return _imageDimensions}this.allocateTextureUnit=allocateTextureUnit;this.resetTextureUnits=resetTextureUnits;this.setTexture2D=setTexture2D;this.setTexture2DArray=setTexture2DArray;this.setTexture3D=setTexture3D;this.setTextureCube=setTextureCube;this.rebindTextures=rebindTextures;this.setupRenderTarget=setupRenderTarget;this.updateRenderTargetMipmap=updateRenderTargetMipmap;this.updateMultisampleRenderTarget=updateMultisampleRenderTarget;this.setupDepthRenderbuffer=setupDepthRenderbuffer;this.setupFrameBufferTexture=setupFrameBufferTexture;this.useMultisampledRTT=useMultisampledRTT;this.isReversedDepthBuffer=function(){return state.buffers.depth.getReversed()}}function WebGLUtils(gl,extensions){function convert(p,colorSpace=NoColorSpace){let extension;const transfer=ColorManagement.getTransfer(colorSpace);if(p===UnsignedByteType)return gl.UNSIGNED_BYTE;if(p===UnsignedShort4444Type)return gl.UNSIGNED_SHORT_4_4_4_4;if(p===UnsignedShort5551Type)return gl.UNSIGNED_SHORT_5_5_5_1;if(p===UnsignedInt5999Type)return gl.UNSIGNED_INT_5_9_9_9_REV;if(p===UnsignedInt101111Type)return gl.UNSIGNED_INT_10F_11F_11F_REV;if(p===ByteType)return gl.BYTE;if(p===ShortType)return gl.SHORT;if(p===UnsignedShortType)return gl.UNSIGNED_SHORT;if(p===IntType)return gl.INT;if(p===UnsignedIntType)return gl.UNSIGNED_INT;if(p===FloatType)return gl.FLOAT;if(p===HalfFloatType)return gl.HALF_FLOAT;if(p===AlphaFormat)return gl.ALPHA;if(p===RGBFormat)return gl.RGB;if(p===RGBAFormat)return gl.RGBA;if(p===DepthFormat)return gl.DEPTH_COMPONENT;if(p===DepthStencilFormat)return gl.DEPTH_STENCIL;if(p===RedFormat)return gl.RED;if(p===RedIntegerFormat)return gl.RED_INTEGER;if(p===RGFormat)return gl.RG;if(p===RGIntegerFormat)return gl.RG_INTEGER;if(p===RGBAIntegerFormat)return gl.RGBA_INTEGER;if(p===RGB_S3TC_DXT1_Format||p===RGBA_S3TC_DXT1_Format||p===RGBA_S3TC_DXT3_Format||p===RGBA_S3TC_DXT5_Format){if(transfer===SRGBTransfer){extension=extensions.get("WEBGL_compressed_texture_s3tc_srgb");if(extension!==null){if(p===RGB_S3TC_DXT1_Format)return extension.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(p===RGBA_S3TC_DXT1_Format)return extension.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(p===RGBA_S3TC_DXT3_Format)return extension.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(p===RGBA_S3TC_DXT5_Format)return extension.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else{return null}}else{extension=extensions.get("WEBGL_compressed_texture_s3tc");if(extension!==null){if(p===RGB_S3TC_DXT1_Format)return extension.COMPRESSED_RGB_S3TC_DXT1_EXT;if(p===RGBA_S3TC_DXT1_Format)return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(p===RGBA_S3TC_DXT3_Format)return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(p===RGBA_S3TC_DXT5_Format)return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT}else{return null}}}if(p===RGB_PVRTC_4BPPV1_Format||p===RGB_PVRTC_2BPPV1_Format||p===RGBA_PVRTC_4BPPV1_Format||p===RGBA_PVRTC_2BPPV1_Format){extension=extensions.get("WEBGL_compressed_texture_pvrtc");if(extension!==null){if(p===RGB_PVRTC_4BPPV1_Format)return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(p===RGB_PVRTC_2BPPV1_Format)return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(p===RGBA_PVRTC_4BPPV1_Format)return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(p===RGBA_PVRTC_2BPPV1_Format)return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else{return null}}if(p===RGB_ETC1_Format||p===RGB_ETC2_Format||p===RGBA_ETC2_EAC_Format||p===R11_EAC_Format||p===SIGNED_R11_EAC_Format||p===RG11_EAC_Format||p===SIGNED_RG11_EAC_Format){extension=extensions.get("WEBGL_compressed_texture_etc");if(extension!==null){if(p===RGB_ETC1_Format||p===RGB_ETC2_Format)return transfer===SRGBTransfer?extension.COMPRESSED_SRGB8_ETC2:extension.COMPRESSED_RGB8_ETC2;if(p===RGBA_ETC2_EAC_Format)return transfer===SRGBTransfer?extension.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:extension.COMPRESSED_RGBA8_ETC2_EAC;if(p===R11_EAC_Format)return extension.COMPRESSED_R11_EAC;if(p===SIGNED_R11_EAC_Format)return extension.COMPRESSED_SIGNED_R11_EAC;if(p===RG11_EAC_Format)return extension.COMPRESSED_RG11_EAC;if(p===SIGNED_RG11_EAC_Format)return extension.COMPRESSED_SIGNED_RG11_EAC}else{return null}}if(p===RGBA_ASTC_4x4_Format||p===RGBA_ASTC_5x4_Format||p===RGBA_ASTC_5x5_Format||p===RGBA_ASTC_6x5_Format||p===RGBA_ASTC_6x6_Format||p===RGBA_ASTC_8x5_Format||p===RGBA_ASTC_8x6_Format||p===RGBA_ASTC_8x8_Format||p===RGBA_ASTC_10x5_Format||p===RGBA_ASTC_10x6_Format||p===RGBA_ASTC_10x8_Format||p===RGBA_ASTC_10x10_Format||p===RGBA_ASTC_12x10_Format||p===RGBA_ASTC_12x12_Format){extension=extensions.get("WEBGL_compressed_texture_astc");if(extension!==null){if(p===RGBA_ASTC_4x4_Format)return transfer===SRGBTransfer?extension.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:extension.COMPRESSED_RGBA_ASTC_4x4_KHR;if(p===RGBA_ASTC_5x4_Format)return transfer===SRGBTransfer?extension.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:extension.COMPRESSED_RGBA_ASTC_5x4_KHR;if(p===RGBA_ASTC_5x5_Format)return transfer===SRGBTransfer?extension.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:extension.COMPRESSED_RGBA_ASTC_5x5_KHR;if(p===RGBA_ASTC_6x5_Format)return transfer===SRGBTransfer?extension.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:extension.COMPRESSED_RGBA_ASTC_6x5_KHR;if(p===RGBA_ASTC_6x6_Format)return transfer===SRGBTransfer?extension.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:extension.COMPRESSED_RGBA_ASTC_6x6_KHR;if(p===RGBA_ASTC_8x5_Format)return transfer===SRGBTransfer?extension.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:extension.COMPRESSED_RGBA_ASTC_8x5_KHR;if(p===RGBA_ASTC_8x6_Format)return transfer===SRGBTransfer?extension.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:extension.COMPRESSED_RGBA_ASTC_8x6_KHR;if(p===RGBA_ASTC_8x8_Format)return transfer===SRGBTransfer?extension.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:extension.COMPRESSED_RGBA_ASTC_8x8_KHR;if(p===RGBA_ASTC_10x5_Format)return transfer===SRGBTransfer?extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:extension.COMPRESSED_RGBA_ASTC_10x5_KHR;if(p===RGBA_ASTC_10x6_Format)return transfer===SRGBTransfer?extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:extension.COMPRESSED_RGBA_ASTC_10x6_KHR;if(p===RGBA_ASTC_10x8_Format)return transfer===SRGBTransfer?extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:extension.COMPRESSED_RGBA_ASTC_10x8_KHR;if(p===RGBA_ASTC_10x10_Format)return transfer===SRGBTransfer?extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:extension.COMPRESSED_RGBA_ASTC_10x10_KHR;if(p===RGBA_ASTC_12x10_Format)return transfer===SRGBTransfer?extension.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:extension.COMPRESSED_RGBA_ASTC_12x10_KHR;if(p===RGBA_ASTC_12x12_Format)return transfer===SRGBTransfer?extension.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:extension.COMPRESSED_RGBA_ASTC_12x12_KHR}else{return null}}if(p===RGBA_BPTC_Format||p===RGB_BPTC_SIGNED_Format||p===RGB_BPTC_UNSIGNED_Format){extension=extensions.get("EXT_texture_compression_bptc");if(extension!==null){if(p===RGBA_BPTC_Format)return transfer===SRGBTransfer?extension.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:extension.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(p===RGB_BPTC_SIGNED_Format)return extension.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(p===RGB_BPTC_UNSIGNED_Format)return extension.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else{return null}}if(p===RED_RGTC1_Format||p===SIGNED_RED_RGTC1_Format||p===RED_GREEN_RGTC2_Format||p===SIGNED_RED_GREEN_RGTC2_Format){extension=extensions.get("EXT_texture_compression_rgtc");if(extension!==null){if(p===RED_RGTC1_Format)return extension.COMPRESSED_RED_RGTC1_EXT;if(p===SIGNED_RED_RGTC1_Format)return extension.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(p===RED_GREEN_RGTC2_Format)return extension.COMPRESSED_RED_GREEN_RGTC2_EXT;if(p===SIGNED_RED_GREEN_RGTC2_Format)return extension.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else{return null}}if(p===UnsignedInt248Type)return gl.UNSIGNED_INT_24_8;return gl[p]!==undefined?gl[p]:null}return{convert:convert}}const _occlusion_vertex=`
void main() {

	gl_Position = vec4( position, 1.0 );

}`;const _occlusion_fragment=`
uniform sampler2DArray depthColor;
uniform float depthWidth;
uniform float depthHeight;

void main() {

	vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight );

	if ( coord.x >= 1.0 ) {

		gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r;

	} else {

		gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r;

	}

}`;class WebXRDepthSensing{constructor(){this.texture=null;this.mesh=null;this.depthNear=0;this.depthFar=0}init(depthData,renderState){if(this.texture===null){const texture=new ExternalTexture(depthData.texture);if(depthData.depthNear!==renderState.depthNear||depthData.depthFar!==renderState.depthFar){this.depthNear=depthData.depthNear;this.depthFar=depthData.depthFar}this.texture=texture}}getMesh(cameraXR){if(this.texture!==null){if(this.mesh===null){const viewport=cameraXR.cameras[0].viewport;const material=new ShaderMaterial({vertexShader:_occlusion_vertex,fragmentShader:_occlusion_fragment,uniforms:{depthColor:{value:this.texture},depthWidth:{value:viewport.z},depthHeight:{value:viewport.w}}});this.mesh=new Mesh(new PlaneGeometry(20,20),material)}}return this.mesh}reset(){this.texture=null;this.mesh=null}getDepthTexture(){return this.texture}}class WebXRManager extends EventDispatcher{constructor(renderer,gl){super();const scope=this;let session=null;let framebufferScaleFactor=1;let referenceSpace=null;let referenceSpaceType="local-floor";let foveation=1;let customReferenceSpace=null;let pose=null;let glBinding=null;let glProjLayer=null;let glBaseLayer=null;let xrFrame=null;const supportsGlBinding=typeof XRWebGLBinding!=="undefined";const depthSensing=new WebXRDepthSensing;const cameraAccessTextures={};const attributes=gl.getContextAttributes();let initialRenderTarget=null;let newRenderTarget=null;const controllers=[];const controllerInputSources=[];const currentSize=new Vector2;let currentPixelRatio=null;const cameraL=new PerspectiveCamera;cameraL.viewport=new Vector4;const cameraR=new PerspectiveCamera;cameraR.viewport=new Vector4;const cameras=[cameraL,cameraR];const cameraXR=new ArrayCamera;let _currentDepthNear=null;let _currentDepthFar=null;this.cameraAutoUpdate=true;this.enabled=false;this.isPresenting=false;this.getController=function(index){let controller=controllers[index];if(controller===undefined){controller=new WebXRController;controllers[index]=controller}return controller.getTargetRaySpace()};this.getControllerGrip=function(index){let controller=controllers[index];if(controller===undefined){controller=new WebXRController;controllers[index]=controller}return controller.getGripSpace()};this.getHand=function(index){let controller=controllers[index];if(controller===undefined){controller=new WebXRController;controllers[index]=controller}return controller.getHandSpace()};function onSessionEvent(event){const controllerIndex=controllerInputSources.indexOf(event.inputSource);if(controllerIndex===-1){return}const controller=controllers[controllerIndex];if(controller!==undefined){controller.update(event.inputSource,event.frame,customReferenceSpace||referenceSpace);controller.dispatchEvent({type:event.type,data:event.inputSource})}}function onSessionEnd(){session.removeEventListener("select",onSessionEvent);session.removeEventListener("selectstart",onSessionEvent);session.removeEventListener("selectend",onSessionEvent);session.removeEventListener("squeeze",onSessionEvent);session.removeEventListener("squeezestart",onSessionEvent);session.removeEventListener("squeezeend",onSessionEvent);session.removeEventListener("end",onSessionEnd);session.removeEventListener("inputsourceschange",onInputSourcesChange);for(let i=0;i<controllers.length;i++){const inputSource=controllerInputSources[i];if(inputSource===null)continue;controllerInputSources[i]=null;controllers[i].disconnect(inputSource)}_currentDepthNear=null;_currentDepthFar=null;depthSensing.reset();for(const key in cameraAccessTextures){delete cameraAccessTextures[key]}renderer.setRenderTarget(initialRenderTarget);glBaseLayer=null;glProjLayer=null;glBinding=null;session=null;newRenderTarget=null;animation.stop();scope.isPresenting=false;renderer.setPixelRatio(currentPixelRatio);renderer.setSize(currentSize.width,currentSize.height,false);scope.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(value){framebufferScaleFactor=value;if(scope.isPresenting===true){warn("WebXRManager: Cannot change framebuffer scale while presenting.")}};this.setReferenceSpaceType=function(value){referenceSpaceType=value;if(scope.isPresenting===true){warn("WebXRManager: Cannot change reference space type while presenting.")}};this.getReferenceSpace=function(){return customReferenceSpace||referenceSpace};this.setReferenceSpace=function(space){customReferenceSpace=space};this.getBaseLayer=function(){return glProjLayer!==null?glProjLayer:glBaseLayer};this.getBinding=function(){if(glBinding===null&&supportsGlBinding){glBinding=new XRWebGLBinding(session,gl)}return glBinding};this.getFrame=function(){return xrFrame};this.getSession=function(){return session};this.setSession=async function(value){session=value;if(session!==null){initialRenderTarget=renderer.getRenderTarget();session.addEventListener("select",onSessionEvent);session.addEventListener("selectstart",onSessionEvent);session.addEventListener("selectend",onSessionEvent);session.addEventListener("squeeze",onSessionEvent);session.addEventListener("squeezestart",onSessionEvent);session.addEventListener("squeezeend",onSessionEvent);session.addEventListener("end",onSessionEnd);session.addEventListener("inputsourceschange",onInputSourcesChange);if(attributes.xrCompatible!==true){await gl.makeXRCompatible()}currentPixelRatio=renderer.getPixelRatio();renderer.getSize(currentSize);const supportsLayers=supportsGlBinding&&"createProjectionLayer"in XRWebGLBinding.prototype;if(!supportsLayers){const layerInit={antialias:attributes.antialias,alpha:true,depth:attributes.depth,stencil:attributes.stencil,framebufferScaleFactor:framebufferScaleFactor};glBaseLayer=new XRWebGLLayer(session,gl,layerInit);session.updateRenderState({baseLayer:glBaseLayer});renderer.setPixelRatio(1);renderer.setSize(glBaseLayer.framebufferWidth,glBaseLayer.framebufferHeight,false);newRenderTarget=new WebGLRenderTarget(glBaseLayer.framebufferWidth,glBaseLayer.framebufferHeight,{format:RGBAFormat,type:UnsignedByteType,colorSpace:renderer.outputColorSpace,stencilBuffer:attributes.stencil,resolveDepthBuffer:glBaseLayer.ignoreDepthValues===false,resolveStencilBuffer:glBaseLayer.ignoreDepthValues===false})}else{let depthFormat=null;let depthType=null;let glDepthFormat=null;if(attributes.depth){glDepthFormat=attributes.stencil?gl.DEPTH24_STENCIL8:gl.DEPTH_COMPONENT24;depthFormat=attributes.stencil?DepthStencilFormat:DepthFormat;depthType=attributes.stencil?UnsignedInt248Type:UnsignedIntType}const projectionlayerInit={colorFormat:gl.RGBA8,depthFormat:glDepthFormat,scaleFactor:framebufferScaleFactor};glBinding=this.getBinding();glProjLayer=glBinding.createProjectionLayer(projectionlayerInit);session.updateRenderState({layers:[glProjLayer]});renderer.setPixelRatio(1);renderer.setSize(glProjLayer.textureWidth,glProjLayer.textureHeight,false);newRenderTarget=new WebGLRenderTarget(glProjLayer.textureWidth,glProjLayer.textureHeight,{format:RGBAFormat,type:UnsignedByteType,depthTexture:new DepthTexture(glProjLayer.textureWidth,glProjLayer.textureHeight,depthType,undefined,undefined,undefined,undefined,undefined,undefined,depthFormat),stencilBuffer:attributes.stencil,colorSpace:renderer.outputColorSpace,samples:attributes.antialias?4:0,resolveDepthBuffer:glProjLayer.ignoreDepthValues===false,resolveStencilBuffer:glProjLayer.ignoreDepthValues===false})}newRenderTarget.isXRRenderTarget=true;this.setFoveation(foveation);customReferenceSpace=null;referenceSpace=await session.requestReferenceSpace(referenceSpaceType);animation.setContext(session);animation.start();scope.isPresenting=true;scope.dispatchEvent({type:"sessionstart"})}};this.getEnvironmentBlendMode=function(){if(session!==null){return session.environmentBlendMode}};this.getDepthTexture=function(){return depthSensing.getDepthTexture()};function onInputSourcesChange(event){for(let i=0;i<event.removed.length;i++){const inputSource=event.removed[i];const index=controllerInputSources.indexOf(inputSource);if(index>=0){controllerInputSources[index]=null;controllers[index].disconnect(inputSource)}}for(let i=0;i<event.added.length;i++){const inputSource=event.added[i];let controllerIndex=controllerInputSources.indexOf(inputSource);if(controllerIndex===-1){for(let i=0;i<controllers.length;i++){if(i>=controllerInputSources.length){controllerInputSources.push(inputSource);controllerIndex=i;break}else if(controllerInputSources[i]===null){controllerInputSources[i]=inputSource;controllerIndex=i;break}}if(controllerIndex===-1)break}const controller=controllers[controllerIndex];if(controller){controller.connect(inputSource)}}}const cameraLPos=new Vector3;const cameraRPos=new Vector3;function setProjectionFromUnion(camera,cameraL,cameraR){cameraLPos.setFromMatrixPosition(cameraL.matrixWorld);cameraRPos.setFromMatrixPosition(cameraR.matrixWorld);const ipd=cameraLPos.distanceTo(cameraRPos);const projL=cameraL.projectionMatrix.elements;const projR=cameraR.projectionMatrix.elements;const near=projL[14]/(projL[10]-1);const far=projL[14]/(projL[10]+1);const topFov=(projL[9]+1)/projL[5];const bottomFov=(projL[9]-1)/projL[5];const leftFov=(projL[8]-1)/projL[0];const rightFov=(projR[8]+1)/projR[0];const left=near*leftFov;const right=near*rightFov;const zOffset=ipd/(-leftFov+rightFov);const xOffset=zOffset*-leftFov;cameraL.matrixWorld.decompose(camera.position,camera.quaternion,camera.scale);camera.translateX(xOffset);camera.translateZ(zOffset);camera.matrixWorld.compose(camera.position,camera.quaternion,camera.scale);camera.matrixWorldInverse.copy(camera.matrixWorld).invert();if(projL[10]===-1){camera.projectionMatrix.copy(cameraL.projectionMatrix);camera.projectionMatrixInverse.copy(cameraL.projectionMatrixInverse)}else{const near2=near+zOffset;const far2=far+zOffset;const left2=left-xOffset;const right2=right+(ipd-xOffset);const top2=topFov*far/far2*near2;const bottom2=bottomFov*far/far2*near2;camera.projectionMatrix.makePerspective(left2,right2,top2,bottom2,near2,far2);camera.projectionMatrixInverse.copy(camera.projectionMatrix).invert()}}function updateCamera(camera,parent){if(parent===null){camera.matrixWorld.copy(camera.matrix)}else{camera.matrixWorld.multiplyMatrices(parent.matrixWorld,camera.matrix)}camera.matrixWorldInverse.copy(camera.matrixWorld).invert()}this.updateCamera=function(camera){if(session===null)return;let depthNear=camera.near;let depthFar=camera.far;if(depthSensing.texture!==null){if(depthSensing.depthNear>0)depthNear=depthSensing.depthNear;if(depthSensing.depthFar>0)depthFar=depthSensing.depthFar}cameraXR.near=cameraR.near=cameraL.near=depthNear;cameraXR.far=cameraR.far=cameraL.far=depthFar;if(_currentDepthNear!==cameraXR.near||_currentDepthFar!==cameraXR.far){session.updateRenderState({depthNear:cameraXR.near,depthFar:cameraXR.far});_currentDepthNear=cameraXR.near;_currentDepthFar=cameraXR.far}cameraXR.layers.mask=camera.layers.mask|6;cameraL.layers.mask=cameraXR.layers.mask&3;cameraR.layers.mask=cameraXR.layers.mask&5;const parent=camera.parent;const cameras=cameraXR.cameras;updateCamera(cameraXR,parent);for(let i=0;i<cameras.length;i++){updateCamera(cameras[i],parent)}if(cameras.length===2){setProjectionFromUnion(cameraXR,cameraL,cameraR)}else{cameraXR.projectionMatrix.copy(cameraL.projectionMatrix)}updateUserCamera(camera,cameraXR,parent)};function updateUserCamera(camera,cameraXR,parent){if(parent===null){camera.matrix.copy(cameraXR.matrixWorld)}else{camera.matrix.copy(parent.matrixWorld);camera.matrix.invert();camera.matrix.multiply(cameraXR.matrixWorld)}camera.matrix.decompose(camera.position,camera.quaternion,camera.scale);camera.updateMatrixWorld(true);camera.projectionMatrix.copy(cameraXR.projectionMatrix);camera.projectionMatrixInverse.copy(cameraXR.projectionMatrixInverse);if(camera.isPerspectiveCamera){camera.fov=RAD2DEG*2*Math.atan(1/camera.projectionMatrix.elements[5]);camera.zoom=1}}this.getCamera=function(){return cameraXR};this.getFoveation=function(){if(glProjLayer===null&&glBaseLayer===null){return undefined}return foveation};this.setFoveation=function(value){foveation=value;if(glProjLayer!==null){glProjLayer.fixedFoveation=value}if(glBaseLayer!==null&&glBaseLayer.fixedFoveation!==undefined){glBaseLayer.fixedFoveation=value}};this.hasDepthSensing=function(){return depthSensing.texture!==null};this.getDepthSensingMesh=function(){return depthSensing.getMesh(cameraXR)};this.getCameraTexture=function(xrCamera){return cameraAccessTextures[xrCamera]};let onAnimationFrameCallback=null;function onAnimationFrame(time,frame){pose=frame.getViewerPose(customReferenceSpace||referenceSpace);xrFrame=frame;if(pose!==null){const views=pose.views;if(glBaseLayer!==null){renderer.setRenderTargetFramebuffer(newRenderTarget,glBaseLayer.framebuffer);renderer.setRenderTarget(newRenderTarget)}let cameraXRNeedsUpdate=false;if(views.length!==cameraXR.cameras.length){cameraXR.cameras.length=0;cameraXRNeedsUpdate=true}for(let i=0;i<views.length;i++){const view=views[i];let viewport=null;if(glBaseLayer!==null){viewport=glBaseLayer.getViewport(view)}else{const glSubImage=glBinding.getViewSubImage(glProjLayer,view);viewport=glSubImage.viewport;if(i===0){renderer.setRenderTargetTextures(newRenderTarget,glSubImage.colorTexture,glSubImage.depthStencilTexture);renderer.setRenderTarget(newRenderTarget)}}let camera=cameras[i];if(camera===undefined){camera=new PerspectiveCamera;camera.layers.enable(i);camera.viewport=new Vector4;cameras[i]=camera}camera.matrix.fromArray(view.transform.matrix);camera.matrix.decompose(camera.position,camera.quaternion,camera.scale);camera.projectionMatrix.fromArray(view.projectionMatrix);camera.projectionMatrixInverse.copy(camera.projectionMatrix).invert();camera.viewport.set(viewport.x,viewport.y,viewport.width,viewport.height);if(i===0){cameraXR.matrix.copy(camera.matrix);cameraXR.matrix.decompose(cameraXR.position,cameraXR.quaternion,cameraXR.scale)}if(cameraXRNeedsUpdate===true){cameraXR.cameras.push(camera)}}const enabledFeatures=session.enabledFeatures;const gpuDepthSensingEnabled=enabledFeatures&&enabledFeatures.includes("depth-sensing")&&session.depthUsage=="gpu-optimized";if(gpuDepthSensingEnabled&&supportsGlBinding){glBinding=scope.getBinding();const depthData=glBinding.getDepthInformation(views[0]);if(depthData&&depthData.isValid&&depthData.texture){depthSensing.init(depthData,session.renderState)}}const cameraAccessEnabled=enabledFeatures&&enabledFeatures.includes("camera-access");if(cameraAccessEnabled&&supportsGlBinding){renderer.state.unbindTexture();glBinding=scope.getBinding();for(let i=0;i<views.length;i++){const camera=views[i].camera;if(camera){let cameraTex=cameraAccessTextures[camera];if(!cameraTex){cameraTex=new ExternalTexture;cameraAccessTextures[camera]=cameraTex}const glTexture=glBinding.getCameraImage(camera);cameraTex.sourceTexture=glTexture}}}}for(let i=0;i<controllers.length;i++){const inputSource=controllerInputSources[i];const controller=controllers[i];if(inputSource!==null&&controller!==undefined){controller.update(inputSource,frame,customReferenceSpace||referenceSpace)}}if(onAnimationFrameCallback)onAnimationFrameCallback(time,frame);if(frame.detectedPlanes){scope.dispatchEvent({type:"planesdetected",data:frame})}xrFrame=null}const animation=new WebGLAnimation;animation.setAnimationLoop(onAnimationFrame);this.setAnimationLoop=function(callback){onAnimationFrameCallback=callback};this.dispose=function(){}}}const _e1=new Euler;const _m1=new Matrix4;function WebGLMaterials(renderer,properties){function refreshTransformUniform(map,uniform){if(map.matrixAutoUpdate===true){map.updateMatrix()}uniform.value.copy(map.matrix)}function refreshFogUniforms(uniforms,fog){fog.color.getRGB(uniforms.fogColor.value,getUnlitUniformColorSpace(renderer));if(fog.isFog){uniforms.fogNear.value=fog.near;uniforms.fogFar.value=fog.far}else if(fog.isFogExp2){uniforms.fogDensity.value=fog.density}}function refreshMaterialUniforms(uniforms,material,pixelRatio,height,transmissionRenderTarget){if(material.isMeshBasicMaterial){refreshUniformsCommon(uniforms,material)}else if(material.isMeshLambertMaterial){refreshUniformsCommon(uniforms,material)}else if(material.isMeshToonMaterial){refreshUniformsCommon(uniforms,material);refreshUniformsToon(uniforms,material)}else if(material.isMeshPhongMaterial){refreshUniformsCommon(uniforms,material);refreshUniformsPhong(uniforms,material)}else if(material.isMeshStandardMaterial){refreshUniformsCommon(uniforms,material);refreshUniformsStandard(uniforms,material);if(material.isMeshPhysicalMaterial){refreshUniformsPhysical(uniforms,material,transmissionRenderTarget)}}else if(material.isMeshMatcapMaterial){refreshUniformsCommon(uniforms,material);refreshUniformsMatcap(uniforms,material)}else if(material.isMeshDepthMaterial){refreshUniformsCommon(uniforms,material)}else if(material.isMeshDistanceMaterial){refreshUniformsCommon(uniforms,material);refreshUniformsDistance(uniforms,material)}else if(material.isMeshNormalMaterial){refreshUniformsCommon(uniforms,material)}else if(material.isLineBasicMaterial){refreshUniformsLine(uniforms,material);if(material.isLineDashedMaterial){refreshUniformsDash(uniforms,material)}}else if(material.isPointsMaterial){refreshUniformsPoints(uniforms,material,pixelRatio,height)}else if(material.isSpriteMaterial){refreshUniformsSprites(uniforms,material)}else if(material.isShadowMaterial){uniforms.color.value.copy(material.color);uniforms.opacity.value=material.opacity}else if(material.isShaderMaterial){material.uniformsNeedUpdate=false}}function refreshUniformsCommon(uniforms,material){uniforms.opacity.value=material.opacity;if(material.color){uniforms.diffuse.value.copy(material.color)}if(material.emissive){uniforms.emissive.value.copy(material.emissive).multiplyScalar(material.emissiveIntensity)}if(material.map){uniforms.map.value=material.map;refreshTransformUniform(material.map,uniforms.mapTransform)}if(material.alphaMap){uniforms.alphaMap.value=material.alphaMap;refreshTransformUniform(material.alphaMap,uniforms.alphaMapTransform)}if(material.bumpMap){uniforms.bumpMap.value=material.bumpMap;refreshTransformUniform(material.bumpMap,uniforms.bumpMapTransform);uniforms.bumpScale.value=material.bumpScale;if(material.side===BackSide){uniforms.bumpScale.value*=-1}}if(material.normalMap){uniforms.normalMap.value=material.normalMap;refreshTransformUniform(material.normalMap,uniforms.normalMapTransform);uniforms.normalScale.value.copy(material.normalScale);if(material.side===BackSide){uniforms.normalScale.value.negate()}}if(material.displacementMap){uniforms.displacementMap.value=material.displacementMap;refreshTransformUniform(material.displacementMap,uniforms.displacementMapTransform);uniforms.displacementScale.value=material.displacementScale;uniforms.displacementBias.value=material.displacementBias}if(material.emissiveMap){uniforms.emissiveMap.value=material.emissiveMap;refreshTransformUniform(material.emissiveMap,uniforms.emissiveMapTransform)}if(material.specularMap){uniforms.specularMap.value=material.specularMap;refreshTransformUniform(material.specularMap,uniforms.specularMapTransform)}if(material.alphaTest>0){uniforms.alphaTest.value=material.alphaTest}const materialProperties=properties.get(material);const envMap=materialProperties.envMap;const envMapRotation=materialProperties.envMapRotation;if(envMap){uniforms.envMap.value=envMap;_e1.copy(envMapRotation);_e1.x*=-1;_e1.y*=-1;_e1.z*=-1;if(envMap.isCubeTexture&&envMap.isRenderTargetTexture===false){_e1.y*=-1;_e1.z*=-1}uniforms.envMapRotation.value.setFromMatrix4(_m1.makeRotationFromEuler(_e1));uniforms.flipEnvMap.value=envMap.isCubeTexture&&envMap.isRenderTargetTexture===false?-1:1;uniforms.reflectivity.value=material.reflectivity;uniforms.ior.value=material.ior;uniforms.refractionRatio.value=material.refractionRatio}if(material.lightMap){uniforms.lightMap.value=material.lightMap;uniforms.lightMapIntensity.value=material.lightMapIntensity;refreshTransformUniform(material.lightMap,uniforms.lightMapTransform)}if(material.aoMap){uniforms.aoMap.value=material.aoMap;uniforms.aoMapIntensity.value=material.aoMapIntensity;refreshTransformUniform(material.aoMap,uniforms.aoMapTransform)}}function refreshUniformsLine(uniforms,material){uniforms.diffuse.value.copy(material.color);uniforms.opacity.value=material.opacity;if(material.map){uniforms.map.value=material.map;refreshTransformUniform(material.map,uniforms.mapTransform)}}function refreshUniformsDash(uniforms,material){uniforms.dashSize.value=material.dashSize;uniforms.totalSize.value=material.dashSize+material.gapSize;uniforms.scale.value=material.scale}function refreshUniformsPoints(uniforms,material,pixelRatio,height){uniforms.diffuse.value.copy(material.color);uniforms.opacity.value=material.opacity;uniforms.size.value=material.size*pixelRatio;uniforms.scale.value=height*0.5;if(material.map){uniforms.map.value=material.map;refreshTransformUniform(material.map,uniforms.uvTransform)}if(material.alphaMap){uniforms.alphaMap.value=material.alphaMap;refreshTransformUniform(material.alphaMap,uniforms.alphaMapTransform)}if(material.alphaTest>0){uniforms.alphaTest.value=material.alphaTest}}function refreshUniformsSprites(uniforms,material){uniforms.diffuse.value.copy(material.color);uniforms.opacity.value=material.opacity;uniforms.rotation.value=material.rotation;if(material.map){uniforms.map.value=material.map;refreshTransformUniform(material.map,uniforms.mapTransform)}if(material.alphaMap){uniforms.alphaMap.value=material.alphaMap;refreshTransformUniform(material.alphaMap,uniforms.alphaMapTransform)}if(material.alphaTest>0){uniforms.alphaTest.value=material.alphaTest}}function refreshUniformsPhong(uniforms,material){uniforms.specular.value.copy(material.specular);uniforms.shininess.value=Math.max(material.shininess,1e-4)}function refreshUniformsToon(uniforms,material){if(material.gradientMap){uniforms.gradientMap.value=material.gradientMap}}function refreshUniformsStandard(uniforms,material){uniforms.metalness.value=material.metalness;if(material.metalnessMap){uniforms.metalnessMap.value=material.metalnessMap;refreshTransformUniform(material.metalnessMap,uniforms.metalnessMapTransform)}uniforms.roughness.value=material.roughness;if(material.roughnessMap){uniforms.roughnessMap.value=material.roughnessMap;refreshTransformUniform(material.roughnessMap,uniforms.roughnessMapTransform)}if(material.envMap){uniforms.envMapIntensity.value=material.envMapIntensity}}function refreshUniformsPhysical(uniforms,material,transmissionRenderTarget){uniforms.ior.value=material.ior;if(material.sheen>0){uniforms.sheenColor.value.copy(material.sheenColor).multiplyScalar(material.sheen);uniforms.sheenRoughness.value=material.sheenRoughness;if(material.sheenColorMap){uniforms.sheenColorMap.value=material.sheenColorMap;refreshTransformUniform(material.sheenColorMap,uniforms.sheenColorMapTransform)}if(material.sheenRoughnessMap){uniforms.sheenRoughnessMap.value=material.sheenRoughnessMap;refreshTransformUniform(material.sheenRoughnessMap,uniforms.sheenRoughnessMapTransform)}}if(material.clearcoat>0){uniforms.clearcoat.value=material.clearcoat;uniforms.clearcoatRoughness.value=material.clearcoatRoughness;if(material.clearcoatMap){uniforms.clearcoatMap.value=material.clearcoatMap;refreshTransformUniform(material.clearcoatMap,uniforms.clearcoatMapTransform)}if(material.clearcoatRoughnessMap){uniforms.clearcoatRoughnessMap.value=material.clearcoatRoughnessMap;refreshTransformUniform(material.clearcoatRoughnessMap,uniforms.clearcoatRoughnessMapTransform)}if(material.clearcoatNormalMap){uniforms.clearcoatNormalMap.value=material.clearcoatNormalMap;refreshTransformUniform(material.clearcoatNormalMap,uniforms.clearcoatNormalMapTransform);uniforms.clearcoatNormalScale.value.copy(material.clearcoatNormalScale);if(material.side===BackSide){uniforms.clearcoatNormalScale.value.negate()}}}if(material.dispersion>0){uniforms.dispersion.value=material.dispersion}if(material.iridescence>0){uniforms.iridescence.value=material.iridescence;uniforms.iridescenceIOR.value=material.iridescenceIOR;uniforms.iridescenceThicknessMinimum.value=material.iridescenceThicknessRange[0];uniforms.iridescenceThicknessMaximum.value=material.iridescenceThicknessRange[1];if(material.iridescenceMap){uniforms.iridescenceMap.value=material.iridescenceMap;refreshTransformUniform(material.iridescenceMap,uniforms.iridescenceMapTransform)}if(material.iridescenceThicknessMap){uniforms.iridescenceThicknessMap.value=material.iridescenceThicknessMap;refreshTransformUniform(material.iridescenceThicknessMap,uniforms.iridescenceThicknessMapTransform)}}if(material.transmission>0){uniforms.transmission.value=material.transmission;uniforms.transmissionSamplerMap.value=transmissionRenderTarget.texture;uniforms.transmissionSamplerSize.value.set(transmissionRenderTarget.width,transmissionRenderTarget.height);if(material.transmissionMap){uniforms.transmissionMap.value=material.transmissionMap;refreshTransformUniform(material.transmissionMap,uniforms.transmissionMapTransform)}uniforms.thickness.value=material.thickness;if(material.thicknessMap){uniforms.thicknessMap.value=material.thicknessMap;refreshTransformUniform(material.thicknessMap,uniforms.thicknessMapTransform)}uniforms.attenuationDistance.value=material.attenuationDistance;uniforms.attenuationColor.value.copy(material.attenuationColor)}if(material.anisotropy>0){uniforms.anisotropyVector.value.set(material.anisotropy*Math.cos(material.anisotropyRotation),material.anisotropy*Math.sin(material.anisotropyRotation));if(material.anisotropyMap){uniforms.anisotropyMap.value=material.anisotropyMap;refreshTransformUniform(material.anisotropyMap,uniforms.anisotropyMapTransform)}}uniforms.specularIntensity.value=material.specularIntensity;uniforms.specularColor.value.copy(material.specularColor);if(material.specularColorMap){uniforms.specularColorMap.value=material.specularColorMap;refreshTransformUniform(material.specularColorMap,uniforms.specularColorMapTransform)}if(material.specularIntensityMap){uniforms.specularIntensityMap.value=material.specularIntensityMap;refreshTransformUniform(material.specularIntensityMap,uniforms.specularIntensityMapTransform)}}function refreshUniformsMatcap(uniforms,material){if(material.matcap){uniforms.matcap.value=material.matcap}}function refreshUniformsDistance(uniforms,material){const light=properties.get(material).light;uniforms.referencePosition.value.setFromMatrixPosition(light.matrixWorld);uniforms.nearDistance.value=light.shadow.camera.near;uniforms.farDistance.value=light.shadow.camera.far}return{refreshFogUniforms:refreshFogUniforms,refreshMaterialUniforms:refreshMaterialUniforms}}function WebGLUniformsGroups(gl,info,capabilities,state){let buffers={};let updateList={};let allocatedBindingPoints=[];const maxBindingPoints=gl.getParameter(gl.MAX_UNIFORM_BUFFER_BINDINGS);function bind(uniformsGroup,program){const webglProgram=program.program;state.uniformBlockBinding(uniformsGroup,webglProgram)}function update(uniformsGroup,program){let buffer=buffers[uniformsGroup.id];if(buffer===undefined){prepareUniformsGroup(uniformsGroup);buffer=createBuffer(uniformsGroup);buffers[uniformsGroup.id]=buffer;uniformsGroup.addEventListener("dispose",onUniformsGroupsDispose)}const webglProgram=program.program;state.updateUBOMapping(uniformsGroup,webglProgram);const frame=info.render.frame;if(updateList[uniformsGroup.id]!==frame){updateBufferData(uniformsGroup);updateList[uniformsGroup.id]=frame}}function createBuffer(uniformsGroup){const bindingPointIndex=allocateBindingPointIndex();uniformsGroup.__bindingPointIndex=bindingPointIndex;const buffer=gl.createBuffer();const size=uniformsGroup.__size;const usage=uniformsGroup.usage;gl.bindBuffer(gl.UNIFORM_BUFFER,buffer);gl.bufferData(gl.UNIFORM_BUFFER,size,usage);gl.bindBuffer(gl.UNIFORM_BUFFER,null);gl.bindBufferBase(gl.UNIFORM_BUFFER,bindingPointIndex,buffer);return buffer}function allocateBindingPointIndex(){for(let i=0;i<maxBindingPoints;i++){if(allocatedBindingPoints.indexOf(i)===-1){allocatedBindingPoints.push(i);return i}}error("WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached.");return 0}function updateBufferData(uniformsGroup){const buffer=buffers[uniformsGroup.id];const uniforms=uniformsGroup.uniforms;const cache=uniformsGroup.__cache;gl.bindBuffer(gl.UNIFORM_BUFFER,buffer);for(let i=0,il=uniforms.length;i<il;i++){const uniformArray=Array.isArray(uniforms[i])?uniforms[i]:[uniforms[i]];for(let j=0,jl=uniformArray.length;j<jl;j++){const uniform=uniformArray[j];if(hasUniformChanged(uniform,i,j,cache)===true){const offset=uniform.__offset;const values=Array.isArray(uniform.value)?uniform.value:[uniform.value];let arrayOffset=0;for(let k=0;k<values.length;k++){const value=values[k];const info=getUniformSize(value);if(typeof value==="number"||typeof value==="boolean"){uniform.__data[0]=value;gl.bufferSubData(gl.UNIFORM_BUFFER,offset+arrayOffset,uniform.__data)}else if(value.isMatrix3){uniform.__data[0]=value.elements[0];uniform.__data[1]=value.elements[1];uniform.__data[2]=value.elements[2];uniform.__data[3]=0;uniform.__data[4]=value.elements[3];uniform.__data[5]=value.elements[4];uniform.__data[6]=value.elements[5];uniform.__data[7]=0;uniform.__data[8]=value.elements[6];uniform.__data[9]=value.elements[7];uniform.__data[10]=value.elements[8];uniform.__data[11]=0}else{value.toArray(uniform.__data,arrayOffset);arrayOffset+=info.storage/Float32Array.BYTES_PER_ELEMENT}}gl.bufferSubData(gl.UNIFORM_BUFFER,offset,uniform.__data)}}}gl.bindBuffer(gl.UNIFORM_BUFFER,null)}function hasUniformChanged(uniform,index,indexArray,cache){const value=uniform.value;const indexString=index+"_"+indexArray;if(cache[indexString]===undefined){if(typeof value==="number"||typeof value==="boolean"){cache[indexString]=value}else{cache[indexString]=value.clone()}return true}else{const cachedObject=cache[indexString];if(typeof value==="number"||typeof value==="boolean"){if(cachedObject!==value){cache[indexString]=value;return true}}else{if(cachedObject.equals(value)===false){cachedObject.copy(value);return true}}}return false}function prepareUniformsGroup(uniformsGroup){const uniforms=uniformsGroup.uniforms;let offset=0;const chunkSize=16;for(let i=0,l=uniforms.length;i<l;i++){const uniformArray=Array.isArray(uniforms[i])?uniforms[i]:[uniforms[i]];for(let j=0,jl=uniformArray.length;j<jl;j++){const uniform=uniformArray[j];const values=Array.isArray(uniform.value)?uniform.value:[uniform.value];for(let k=0,kl=values.length;k<kl;k++){const value=values[k];const info=getUniformSize(value);const chunkOffset=offset%chunkSize;const chunkPadding=chunkOffset%info.boundary;const chunkStart=chunkOffset+chunkPadding;offset+=chunkPadding;if(chunkStart!==0&&chunkSize-chunkStart<info.storage){offset+=chunkSize-chunkStart}uniform.__data=new Float32Array(info.storage/Float32Array.BYTES_PER_ELEMENT);uniform.__offset=offset;offset+=info.storage}}}const chunkOffset=offset%chunkSize;if(chunkOffset>0)offset+=chunkSize-chunkOffset;uniformsGroup.__size=offset;uniformsGroup.__cache={};return this}function getUniformSize(value){const info={boundary:0,storage:0};if(typeof value==="number"||typeof value==="boolean"){info.boundary=4;info.storage=4}else if(value.isVector2){info.boundary=8;info.storage=8}else if(value.isVector3||value.isColor){info.boundary=16;info.storage=12}else if(value.isVector4){info.boundary=16;info.storage=16}else if(value.isMatrix3){info.boundary=48;info.storage=48}else if(value.isMatrix4){info.boundary=64;info.storage=64}else if(value.isTexture){warn("WebGLRenderer: Texture samplers can not be part of an uniforms group.")}else{warn("WebGLRenderer: Unsupported uniform value type.",value)}return info}function onUniformsGroupsDispose(event){const uniformsGroup=event.target;uniformsGroup.removeEventListener("dispose",onUniformsGroupsDispose);const index=allocatedBindingPoints.indexOf(uniformsGroup.__bindingPointIndex);allocatedBindingPoints.splice(index,1);gl.deleteBuffer(buffers[uniformsGroup.id]);delete buffers[uniformsGroup.id];delete updateList[uniformsGroup.id]}function dispose(){for(const id in buffers){gl.deleteBuffer(buffers[id])}allocatedBindingPoints=[];buffers={};updateList={}}return{bind:bind,update:update,dispose:dispose}}const DATA=new Uint16Array([12469,15057,12620,14925,13266,14620,13807,14376,14323,13990,14545,13625,14713,13328,14840,12882,14931,12528,14996,12233,15039,11829,15066,11525,15080,11295,15085,10976,15082,10705,15073,10495,13880,14564,13898,14542,13977,14430,14158,14124,14393,13732,14556,13410,14702,12996,14814,12596,14891,12291,14937,11834,14957,11489,14958,11194,14943,10803,14921,10506,14893,10278,14858,9960,14484,14039,14487,14025,14499,13941,14524,13740,14574,13468,14654,13106,14743,12678,14818,12344,14867,11893,14889,11509,14893,11180,14881,10751,14852,10428,14812,10128,14765,9754,14712,9466,14764,13480,14764,13475,14766,13440,14766,13347,14769,13070,14786,12713,14816,12387,14844,11957,14860,11549,14868,11215,14855,10751,14825,10403,14782,10044,14729,9651,14666,9352,14599,9029,14967,12835,14966,12831,14963,12804,14954,12723,14936,12564,14917,12347,14900,11958,14886,11569,14878,11247,14859,10765,14828,10401,14784,10011,14727,9600,14660,9289,14586,8893,14508,8533,15111,12234,15110,12234,15104,12216,15092,12156,15067,12010,15028,11776,14981,11500,14942,11205,14902,10752,14861,10393,14812,9991,14752,9570,14682,9252,14603,8808,14519,8445,14431,8145,15209,11449,15208,11451,15202,11451,15190,11438,15163,11384,15117,11274,15055,10979,14994,10648,14932,10343,14871,9936,14803,9532,14729,9218,14645,8742,14556,8381,14461,8020,14365,7603,15273,10603,15272,10607,15267,10619,15256,10631,15231,10614,15182,10535,15118,10389,15042,10167,14963,9787,14883,9447,14800,9115,14710,8665,14615,8318,14514,7911,14411,7507,14279,7198,15314,9675,15313,9683,15309,9712,15298,9759,15277,9797,15229,9773,15166,9668,15084,9487,14995,9274,14898,8910,14800,8539,14697,8234,14590,7790,14479,7409,14367,7067,14178,6621,15337,8619,15337,8631,15333,8677,15325,8769,15305,8871,15264,8940,15202,8909,15119,8775,15022,8565,14916,8328,14804,8009,14688,7614,14569,7287,14448,6888,14321,6483,14088,6171,15350,7402,15350,7419,15347,7480,15340,7613,15322,7804,15287,7973,15229,8057,15148,8012,15046,7846,14933,7611,14810,7357,14682,7069,14552,6656,14421,6316,14251,5948,14007,5528,15356,5942,15356,5977,15353,6119,15348,6294,15332,6551,15302,6824,15249,7044,15171,7122,15070,7050,14949,6861,14818,6611,14679,6349,14538,6067,14398,5651,14189,5311,13935,4958,15359,4123,15359,4153,15356,4296,15353,4646,15338,5160,15311,5508,15263,5829,15188,6042,15088,6094,14966,6001,14826,5796,14678,5543,14527,5287,14377,4985,14133,4586,13869,4257,15360,1563,15360,1642,15358,2076,15354,2636,15341,3350,15317,4019,15273,4429,15203,4732,15105,4911,14981,4932,14836,4818,14679,4621,14517,4386,14359,4156,14083,3795,13808,3437,15360,122,15360,137,15358,285,15355,636,15344,1274,15322,2177,15281,2765,15215,3223,15120,3451,14995,3569,14846,3567,14681,3466,14511,3305,14344,3121,14037,2800,13753,2467,15360,0,15360,1,15359,21,15355,89,15346,253,15325,479,15287,796,15225,1148,15133,1492,15008,1749,14856,1882,14685,1886,14506,1783,14324,1608,13996,1398,13702,1183]);let lut=null;function getDFGLUT(){if(lut===null){lut=new DataTexture(DATA,16,16,RGFormat,HalfFloatType);lut.name="DFG_LUT";lut.minFilter=LinearFilter;lut.magFilter=LinearFilter;lut.wrapS=ClampToEdgeWrapping;lut.wrapT=ClampToEdgeWrapping;lut.generateMipmaps=false;lut.needsUpdate=true}return lut}class WebGLRenderer{constructor(parameters={}){const{canvas=createCanvasElement(),context=null,depth=true,stencil=false,alpha=false,antialias=false,premultipliedAlpha=true,preserveDrawingBuffer=false,powerPreference="default",failIfMajorPerformanceCaveat=false,reversedDepthBuffer=false,outputBufferType=UnsignedByteType}=parameters;this.isWebGLRenderer=true;let _alpha;if(context!==null){if(typeof WebGLRenderingContext!=="undefined"&&context instanceof WebGLRenderingContext){throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.")}_alpha=context.getContextAttributes().alpha}else{_alpha=alpha}const _outputBufferType=outputBufferType;const INTEGER_FORMATS=new Set([RGBAIntegerFormat,RGIntegerFormat,RedIntegerFormat]);const UNSIGNED_TYPES=new Set([UnsignedByteType,UnsignedIntType,UnsignedShortType,UnsignedInt248Type,UnsignedShort4444Type,UnsignedShort5551Type]);const uintClearColor=new Uint32Array(4);const intClearColor=new Int32Array(4);let currentRenderList=null;let currentRenderState=null;const renderListStack=[];const renderStateStack=[];let output=null;this.domElement=canvas;this.debug={checkShaderErrors:true,onShaderError:null};this.autoClear=true;this.autoClearColor=true;this.autoClearDepth=true;this.autoClearStencil=true;this.sortObjects=true;this.clippingPlanes=[];this.localClippingEnabled=false;this.toneMapping=NoToneMapping;this.toneMappingExposure=1;this.transmissionResolutionScale=1;const _this=this;let _isContextLost=false;this._outputColorSpace=SRGBColorSpace;let _currentActiveCubeFace=0;let _currentActiveMipmapLevel=0;let _currentRenderTarget=null;let _currentMaterialId=-1;let _currentCamera=null;const _currentViewport=new Vector4;const _currentScissor=new Vector4;let _currentScissorTest=null;const _currentClearColor=new Color(0);let _currentClearAlpha=0;let _width=canvas.width;let _height=canvas.height;let _pixelRatio=1;let _opaqueSort=null;let _transparentSort=null;const _viewport=new Vector4(0,0,_width,_height);const _scissor=new Vector4(0,0,_width,_height);let _scissorTest=false;const _frustum=new Frustum;let _clippingEnabled=false;let _localClippingEnabled=false;const _projScreenMatrix=new Matrix4;const _vector3=new Vector3;const _vector4=new Vector4;const _emptyScene={background:null,fog:null,environment:null,overrideMaterial:null,isScene:true};let _renderBackground=false;function getTargetPixelRatio(){return _currentRenderTarget===null?_pixelRatio:1}let _gl=context;function getContext(contextName,contextAttributes){return canvas.getContext(contextName,contextAttributes)}try{const contextAttributes={alpha:true,depth,stencil,antialias,premultipliedAlpha,preserveDrawingBuffer,powerPreference,failIfMajorPerformanceCaveat};if("setAttribute"in canvas)canvas.setAttribute("data-engine",`three.js r${REVISION}`);canvas.addEventListener("webglcontextlost",onContextLost,false);canvas.addEventListener("webglcontextrestored",onContextRestore,false);canvas.addEventListener("webglcontextcreationerror",onContextCreationError,false);if(_gl===null){const contextName="webgl2";_gl=getContext(contextName,contextAttributes);if(_gl===null){if(getContext(contextName)){throw new Error("Error creating WebGL context with your selected attributes.")}else{throw new Error("Error creating WebGL context.")}}}}catch(e){error("WebGLRenderer: "+e.message);throw e}let extensions,capabilities,state,info;let properties,textures,cubemaps,cubeuvmaps,attributes,geometries,objects;let programCache,materials,renderLists,renderStates,clipping,shadowMap;let background,morphtargets,bufferRenderer,indexedBufferRenderer;let utils,bindingStates,uniformsGroups;function initGLContext(){extensions=new WebGLExtensions(_gl);extensions.init();utils=new WebGLUtils(_gl,extensions);capabilities=new WebGLCapabilities(_gl,extensions,parameters,utils);state=new WebGLState(_gl,extensions);if(capabilities.reversedDepthBuffer&&reversedDepthBuffer){state.buffers.depth.setReversed(true)}info=new WebGLInfo(_gl);properties=new WebGLProperties;textures=new WebGLTextures(_gl,extensions,state,properties,capabilities,utils,info);cubemaps=new WebGLCubeMaps(_this);cubeuvmaps=new WebGLCubeUVMaps(_this);attributes=new WebGLAttributes(_gl);bindingStates=new WebGLBindingStates(_gl,attributes);geometries=new WebGLGeometries(_gl,attributes,info,bindingStates);objects=new WebGLObjects(_gl,geometries,attributes,info);morphtargets=new WebGLMorphtargets(_gl,capabilities,textures);clipping=new WebGLClipping(properties);programCache=new WebGLPrograms(_this,cubemaps,cubeuvmaps,extensions,capabilities,bindingStates,clipping);materials=new WebGLMaterials(_this,properties);renderLists=new WebGLRenderLists;renderStates=new WebGLRenderStates(extensions);background=new WebGLBackground(_this,cubemaps,cubeuvmaps,state,objects,_alpha,premultipliedAlpha);shadowMap=new WebGLShadowMap(_this,objects,capabilities);uniformsGroups=new WebGLUniformsGroups(_gl,info,capabilities,state);bufferRenderer=new WebGLBufferRenderer(_gl,extensions,info);indexedBufferRenderer=new WebGLIndexedBufferRenderer(_gl,extensions,info);info.programs=programCache.programs;_this.capabilities=capabilities;_this.extensions=extensions;_this.properties=properties;_this.renderLists=renderLists;_this.shadowMap=shadowMap;_this.state=state;_this.info=info}initGLContext();if(_outputBufferType!==UnsignedByteType){output=new WebGLOutput(_outputBufferType,canvas.width,canvas.height,depth,stencil)}const xr=new WebXRManager(_this,_gl);this.xr=xr;this.getContext=function(){return _gl};this.getContextAttributes=function(){return _gl.getContextAttributes()};this.forceContextLoss=function(){const extension=extensions.get("WEBGL_lose_context");if(extension)extension.loseContext()};this.forceContextRestore=function(){const extension=extensions.get("WEBGL_lose_context");if(extension)extension.restoreContext()};this.getPixelRatio=function(){return _pixelRatio};this.setPixelRatio=function(value){if(value===undefined)return;_pixelRatio=value;this.setSize(_width,_height,false)};this.getSize=function(target){return target.set(_width,_height)};this.setSize=function(width,height,updateStyle=true){if(xr.isPresenting){warn("WebGLRenderer: Can't change size while VR device is presenting.");return}_width=width;_height=height;canvas.width=Math.floor(width*_pixelRatio);canvas.height=Math.floor(height*_pixelRatio);if(updateStyle===true){canvas.style.width=width+"px";canvas.style.height=height+"px"}if(output!==null){output.setSize(canvas.width,canvas.height)}this.setViewport(0,0,width,height)};this.getDrawingBufferSize=function(target){return target.set(_width*_pixelRatio,_height*_pixelRatio).floor()};this.setDrawingBufferSize=function(width,height,pixelRatio){_width=width;_height=height;_pixelRatio=pixelRatio;canvas.width=Math.floor(width*pixelRatio);canvas.height=Math.floor(height*pixelRatio);this.setViewport(0,0,width,height)};this.setEffects=function(effects){if(_outputBufferType===UnsignedByteType){console.error("THREE.WebGLRenderer: setEffects() requires outputBufferType set to HalfFloatType or FloatType.");return}if(effects){for(let i=0;i<effects.length;i++){if(effects[i].isOutputPass===true){console.warn("THREE.WebGLRenderer: OutputPass is not needed in setEffects(). Tone mapping and color space conversion are applied automatically.");break}}}output.setEffects(effects||[])};this.getCurrentViewport=function(target){return target.copy(_currentViewport)};this.getViewport=function(target){return target.copy(_viewport)};this.setViewport=function(x,y,width,height){if(x.isVector4){_viewport.set(x.x,x.y,x.z,x.w)}else{_viewport.set(x,y,width,height)}state.viewport(_currentViewport.copy(_viewport).multiplyScalar(_pixelRatio).round())};this.getScissor=function(target){return target.copy(_scissor)};this.setScissor=function(x,y,width,height){if(x.isVector4){_scissor.set(x.x,x.y,x.z,x.w)}else{_scissor.set(x,y,width,height)}state.scissor(_currentScissor.copy(_scissor).multiplyScalar(_pixelRatio).round())};this.getScissorTest=function(){return _scissorTest};this.setScissorTest=function(boolean){state.setScissorTest(_scissorTest=boolean)};this.setOpaqueSort=function(method){_opaqueSort=method};this.setTransparentSort=function(method){_transparentSort=method};this.getClearColor=function(target){return target.copy(background.getClearColor())};this.setClearColor=function(){background.setClearColor(...arguments)};this.getClearAlpha=function(){return background.getClearAlpha()};this.setClearAlpha=function(){background.setClearAlpha(...arguments)};this.clear=function(color=true,depth=true,stencil=true){let bits=0;if(color){let isIntegerFormat=false;if(_currentRenderTarget!==null){const targetFormat=_currentRenderTarget.texture.format;isIntegerFormat=INTEGER_FORMATS.has(targetFormat)}if(isIntegerFormat){const targetType=_currentRenderTarget.texture.type;const isUnsignedType=UNSIGNED_TYPES.has(targetType);const clearColor=background.getClearColor();const a=background.getClearAlpha();const r=clearColor.r;const g=clearColor.g;const b=clearColor.b;if(isUnsignedType){uintClearColor[0]=r;uintClearColor[1]=g;uintClearColor[2]=b;uintClearColor[3]=a;_gl.clearBufferuiv(_gl.COLOR,0,uintClearColor)}else{intClearColor[0]=r;intClearColor[1]=g;intClearColor[2]=b;intClearColor[3]=a;_gl.clearBufferiv(_gl.COLOR,0,intClearColor)}}else{bits|=_gl.COLOR_BUFFER_BIT}}if(depth){bits|=_gl.DEPTH_BUFFER_BIT}if(stencil){bits|=_gl.STENCIL_BUFFER_BIT;this.state.buffers.stencil.setMask(4294967295)}_gl.clear(bits)};this.clearColor=function(){this.clear(true,false,false)};this.clearDepth=function(){this.clear(false,true,false)};this.clearStencil=function(){this.clear(false,false,true)};this.dispose=function(){canvas.removeEventListener("webglcontextlost",onContextLost,false);canvas.removeEventListener("webglcontextrestored",onContextRestore,false);canvas.removeEventListener("webglcontextcreationerror",onContextCreationError,false);background.dispose();renderLists.dispose();renderStates.dispose();properties.dispose();cubemaps.dispose();cubeuvmaps.dispose();objects.dispose();bindingStates.dispose();uniformsGroups.dispose();programCache.dispose();xr.dispose();xr.removeEventListener("sessionstart",onXRSessionStart);xr.removeEventListener("sessionend",onXRSessionEnd);animation.stop()};function onContextLost(event){event.preventDefault();log("WebGLRenderer: Context Lost.");_isContextLost=true}function onContextRestore(){log("WebGLRenderer: Context Restored.");_isContextLost=false;const infoAutoReset=info.autoReset;const shadowMapEnabled=shadowMap.enabled;const shadowMapAutoUpdate=shadowMap.autoUpdate;const shadowMapNeedsUpdate=shadowMap.needsUpdate;const shadowMapType=shadowMap.type;initGLContext();info.autoReset=infoAutoReset;shadowMap.enabled=shadowMapEnabled;shadowMap.autoUpdate=shadowMapAutoUpdate;shadowMap.needsUpdate=shadowMapNeedsUpdate;shadowMap.type=shadowMapType}function onContextCreationError(event){error("WebGLRenderer: A WebGL context could not be created. Reason: ",event.statusMessage)}function onMaterialDispose(event){const material=event.target;material.removeEventListener("dispose",onMaterialDispose);deallocateMaterial(material)}function deallocateMaterial(material){releaseMaterialProgramReferences(material);properties.remove(material)}function releaseMaterialProgramReferences(material){const programs=properties.get(material).programs;if(programs!==undefined){programs.forEach(function(program){programCache.releaseProgram(program)});if(material.isShaderMaterial){programCache.releaseShaderCache(material)}}}this.renderBufferDirect=function(camera,scene,geometry,material,object,group){if(scene===null)scene=_emptyScene;const frontFaceCW=object.isMesh&&object.matrixWorld.determinant()<0;const program=setProgram(camera,scene,geometry,material,object);state.setMaterial(material,frontFaceCW);let index=geometry.index;let rangeFactor=1;if(material.wireframe===true){index=geometries.getWireframeAttribute(geometry);if(index===undefined)return;rangeFactor=2}const drawRange=geometry.drawRange;const position=geometry.attributes.position;let drawStart=drawRange.start*rangeFactor;let drawEnd=(drawRange.start+drawRange.count)*rangeFactor;if(group!==null){drawStart=Math.max(drawStart,group.start*rangeFactor);drawEnd=Math.min(drawEnd,(group.start+group.count)*rangeFactor)}if(index!==null){drawStart=Math.max(drawStart,0);drawEnd=Math.min(drawEnd,index.count)}else if(position!==undefined&&position!==null){drawStart=Math.max(drawStart,0);drawEnd=Math.min(drawEnd,position.count)}const drawCount=drawEnd-drawStart;if(drawCount<0||drawCount===Infinity)return;bindingStates.setup(object,material,program,geometry,index);let attribute;let renderer=bufferRenderer;if(index!==null){attribute=attributes.get(index);renderer=indexedBufferRenderer;renderer.setIndex(attribute)}if(object.isMesh){if(material.wireframe===true){state.setLineWidth(material.wireframeLinewidth*getTargetPixelRatio());renderer.setMode(_gl.LINES)}else{renderer.setMode(_gl.TRIANGLES)}}else if(object.isLine){let lineWidth=material.linewidth;if(lineWidth===undefined)lineWidth=1;state.setLineWidth(lineWidth*getTargetPixelRatio());if(object.isLineSegments){renderer.setMode(_gl.LINES)}else if(object.isLineLoop){renderer.setMode(_gl.LINE_LOOP)}else{renderer.setMode(_gl.LINE_STRIP)}}else if(object.isPoints){renderer.setMode(_gl.POINTS)}else if(object.isSprite){renderer.setMode(_gl.TRIANGLES)}if(object.isBatchedMesh){if(object._multiDrawInstances!==null){warnOnce("WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection.");renderer.renderMultiDrawInstances(object._multiDrawStarts,object._multiDrawCounts,object._multiDrawCount,object._multiDrawInstances)}else{if(!extensions.get("WEBGL_multi_draw")){const starts=object._multiDrawStarts;const counts=object._multiDrawCounts;const drawCount=object._multiDrawCount;const bytesPerElement=index?attributes.get(index).bytesPerElement:1;const uniforms=properties.get(material).currentProgram.getUniforms();for(let i=0;i<drawCount;i++){uniforms.setValue(_gl,"_gl_DrawID",i);renderer.render(starts[i]/bytesPerElement,counts[i])}}else{renderer.renderMultiDraw(object._multiDrawStarts,object._multiDrawCounts,object._multiDrawCount)}}}else if(object.isInstancedMesh){renderer.renderInstances(drawStart,drawCount,object.count)}else if(geometry.isInstancedBufferGeometry){const maxInstanceCount=geometry._maxInstanceCount!==undefined?geometry._maxInstanceCount:Infinity;const instanceCount=Math.min(geometry.instanceCount,maxInstanceCount);renderer.renderInstances(drawStart,drawCount,instanceCount)}else{renderer.render(drawStart,drawCount)}};function prepareMaterial(material,scene,object){if(material.transparent===true&&material.side===DoubleSide&&material.forceSinglePass===false){material.side=BackSide;material.needsUpdate=true;getProgram(material,scene,object);material.side=FrontSide;material.needsUpdate=true;getProgram(material,scene,object);material.side=DoubleSide}else{getProgram(material,scene,object)}}this.compile=function(scene,camera,targetScene=null){if(targetScene===null)targetScene=scene;currentRenderState=renderStates.get(targetScene);currentRenderState.init(camera);renderStateStack.push(currentRenderState);targetScene.traverseVisible(function(object){if(object.isLight&&object.layers.test(camera.layers)){currentRenderState.pushLight(object);if(object.castShadow){currentRenderState.pushShadow(object)}}});if(scene!==targetScene){scene.traverseVisible(function(object){if(object.isLight&&object.layers.test(camera.layers)){currentRenderState.pushLight(object);if(object.castShadow){currentRenderState.pushShadow(object)}}})}currentRenderState.setupLights();const materials=new Set;scene.traverse(function(object){if(!(object.isMesh||object.isPoints||object.isLine||object.isSprite)){return}const material=object.material;if(material){if(Array.isArray(material)){for(let i=0;i<material.length;i++){const material2=material[i];prepareMaterial(material2,targetScene,object);materials.add(material2)}}else{prepareMaterial(material,targetScene,object);materials.add(material)}}});currentRenderState=renderStateStack.pop();return materials};this.compileAsync=function(scene,camera,targetScene=null){const materials=this.compile(scene,camera,targetScene);return new Promise(resolve=>{function checkMaterialsReady(){materials.forEach(function(material){const materialProperties=properties.get(material);const program=materialProperties.currentProgram;if(program.isReady()){materials.delete(material)}});if(materials.size===0){resolve(scene);return}setTimeout(checkMaterialsReady,10)}if(extensions.get("KHR_parallel_shader_compile")!==null){checkMaterialsReady()}else{setTimeout(checkMaterialsReady,10)}})};let onAnimationFrameCallback=null;function onAnimationFrame(time){if(onAnimationFrameCallback)onAnimationFrameCallback(time)}function onXRSessionStart(){animation.stop()}function onXRSessionEnd(){animation.start()}const animation=new WebGLAnimation;animation.setAnimationLoop(onAnimationFrame);if(typeof self!=="undefined")animation.setContext(self);this.setAnimationLoop=function(callback){onAnimationFrameCallback=callback;xr.setAnimationLoop(callback);callback===null?animation.stop():animation.start()};xr.addEventListener("sessionstart",onXRSessionStart);xr.addEventListener("sessionend",onXRSessionEnd);this.render=function(scene,camera){if(camera!==undefined&&camera.isCamera!==true){error("WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(_isContextLost===true)return;const isXRPresenting=xr.enabled===true&&xr.isPresenting===true;const useOutput=output!==null&&(_currentRenderTarget===null||isXRPresenting)&&output.begin(_this,_currentRenderTarget);if(scene.matrixWorldAutoUpdate===true)scene.updateMatrixWorld();if(camera.parent===null&&camera.matrixWorldAutoUpdate===true)camera.updateMatrixWorld();if(xr.enabled===true&&xr.isPresenting===true&&(output===null||output.isCompositing()===false)){if(xr.cameraAutoUpdate===true)xr.updateCamera(camera);camera=xr.getCamera()}if(scene.isScene===true)scene.onBeforeRender(_this,scene,camera,_currentRenderTarget);currentRenderState=renderStates.get(scene,renderStateStack.length);currentRenderState.init(camera);renderStateStack.push(currentRenderState);_projScreenMatrix.multiplyMatrices(camera.projectionMatrix,camera.matrixWorldInverse);_frustum.setFromProjectionMatrix(_projScreenMatrix,WebGLCoordinateSystem,camera.reversedDepth);_localClippingEnabled=this.localClippingEnabled;_clippingEnabled=clipping.init(this.clippingPlanes,_localClippingEnabled);currentRenderList=renderLists.get(scene,renderListStack.length);currentRenderList.init();renderListStack.push(currentRenderList);if(xr.enabled===true&&xr.isPresenting===true){const depthSensingMesh=_this.xr.getDepthSensingMesh();if(depthSensingMesh!==null){projectObject(depthSensingMesh,camera,-Infinity,_this.sortObjects)}}projectObject(scene,camera,0,_this.sortObjects);currentRenderList.finish();if(_this.sortObjects===true){currentRenderList.sort(_opaqueSort,_transparentSort)}_renderBackground=xr.enabled===false||xr.isPresenting===false||xr.hasDepthSensing()===false;if(_renderBackground){background.addToRenderList(currentRenderList,scene)}this.info.render.frame++;if(_clippingEnabled===true)clipping.beginShadows();const shadowsArray=currentRenderState.state.shadowsArray;shadowMap.render(shadowsArray,scene,camera);if(_clippingEnabled===true)clipping.endShadows();if(this.info.autoReset===true)this.info.reset();const skipSceneRender=useOutput&&output.hasRenderPass();if(skipSceneRender===false){const opaqueObjects=currentRenderList.opaque;const transmissiveObjects=currentRenderList.transmissive;currentRenderState.setupLights();if(camera.isArrayCamera){const cameras=camera.cameras;if(transmissiveObjects.length>0){for(let i=0,l=cameras.length;i<l;i++){const camera2=cameras[i];renderTransmissionPass(opaqueObjects,transmissiveObjects,scene,camera2)}}if(_renderBackground)background.render(scene);for(let i=0,l=cameras.length;i<l;i++){const camera2=cameras[i];renderScene(currentRenderList,scene,camera2,camera2.viewport)}}else{if(transmissiveObjects.length>0)renderTransmissionPass(opaqueObjects,transmissiveObjects,scene,camera);if(_renderBackground)background.render(scene);renderScene(currentRenderList,scene,camera)}}if(_currentRenderTarget!==null&&_currentActiveMipmapLevel===0){textures.updateMultisampleRenderTarget(_currentRenderTarget);textures.updateRenderTargetMipmap(_currentRenderTarget)}if(useOutput){output.end(_this)}if(scene.isScene===true)scene.onAfterRender(_this,scene,camera);bindingStates.resetDefaultState();_currentMaterialId=-1;_currentCamera=null;renderStateStack.pop();if(renderStateStack.length>0){currentRenderState=renderStateStack[renderStateStack.length-1];if(_clippingEnabled===true)clipping.setGlobalState(_this.clippingPlanes,currentRenderState.state.camera)}else{currentRenderState=null}renderListStack.pop();if(renderListStack.length>0){currentRenderList=renderListStack[renderListStack.length-1]}else{currentRenderList=null}};function projectObject(object,camera,groupOrder,sortObjects){if(object.visible===false)return;const visible=object.layers.test(camera.layers);if(visible){if(object.isGroup){groupOrder=object.renderOrder}else if(object.isLOD){if(object.autoUpdate===true)object.update(camera)}else if(object.isLight){currentRenderState.pushLight(object);if(object.castShadow){currentRenderState.pushShadow(object)}}else if(object.isSprite){if(!object.frustumCulled||_frustum.intersectsSprite(object)){if(sortObjects){_vector4.setFromMatrixPosition(object.matrixWorld).applyMatrix4(_projScreenMatrix)}const geometry=objects.update(object);const material=object.material;if(material.visible){currentRenderList.push(object,geometry,material,groupOrder,_vector4.z,null)}}}else if(object.isMesh||object.isLine||object.isPoints){if(!object.frustumCulled||_frustum.intersectsObject(object)){const geometry=objects.update(object);const material=object.material;if(sortObjects){if(object.boundingSphere!==undefined){if(object.boundingSphere===null)object.computeBoundingSphere();_vector4.copy(object.boundingSphere.center)}else{if(geometry.boundingSphere===null)geometry.computeBoundingSphere();_vector4.copy(geometry.boundingSphere.center)}_vector4.applyMatrix4(object.matrixWorld).applyMatrix4(_projScreenMatrix)}if(Array.isArray(material)){const groups=geometry.groups;for(let i=0,l=groups.length;i<l;i++){const group=groups[i];const groupMaterial=material[group.materialIndex];if(groupMaterial&&groupMaterial.visible){currentRenderList.push(object,geometry,groupMaterial,groupOrder,_vector4.z,group)}}}else if(material.visible){currentRenderList.push(object,geometry,material,groupOrder,_vector4.z,null)}}}}const children=object.children;for(let i=0,l=children.length;i<l;i++){projectObject(children[i],camera,groupOrder,sortObjects)}}function renderScene(currentRenderList,scene,camera,viewport){const{opaque:opaqueObjects,transmissive:transmissiveObjects,transparent:transparentObjects}=currentRenderList;currentRenderState.setupLightsView(camera);if(_clippingEnabled===true)clipping.setGlobalState(_this.clippingPlanes,camera);if(viewport)state.viewport(_currentViewport.copy(viewport));if(opaqueObjects.length>0)renderObjects(opaqueObjects,scene,camera);if(transmissiveObjects.length>0)renderObjects(transmissiveObjects,scene,camera);if(transparentObjects.length>0)renderObjects(transparentObjects,scene,camera);state.buffers.depth.setTest(true);state.buffers.depth.setMask(true);state.buffers.color.setMask(true);state.setPolygonOffset(false)}function renderTransmissionPass(opaqueObjects,transmissiveObjects,scene,camera){const overrideMaterial=scene.isScene===true?scene.overrideMaterial:null;if(overrideMaterial!==null){return}if(currentRenderState.state.transmissionRenderTarget[camera.id]===undefined){const hasHalfFloatSupport=extensions.has("EXT_color_buffer_half_float")||extensions.has("EXT_color_buffer_float");currentRenderState.state.transmissionRenderTarget[camera.id]=new WebGLRenderTarget(1,1,{generateMipmaps:true,type:hasHalfFloatSupport?HalfFloatType:UnsignedByteType,minFilter:LinearMipmapLinearFilter,samples:capabilities.samples,stencilBuffer:stencil,resolveDepthBuffer:false,resolveStencilBuffer:false,colorSpace:ColorManagement.workingColorSpace})}const transmissionRenderTarget=currentRenderState.state.transmissionRenderTarget[camera.id];const activeViewport=camera.viewport||_currentViewport;transmissionRenderTarget.setSize(activeViewport.z*_this.transmissionResolutionScale,activeViewport.w*_this.transmissionResolutionScale);const currentRenderTarget=_this.getRenderTarget();const currentActiveCubeFace=_this.getActiveCubeFace();const currentActiveMipmapLevel=_this.getActiveMipmapLevel();_this.setRenderTarget(transmissionRenderTarget);_this.getClearColor(_currentClearColor);_currentClearAlpha=_this.getClearAlpha();if(_currentClearAlpha<1)_this.setClearColor(16777215,0.5);_this.clear();if(_renderBackground)background.render(scene);const currentToneMapping=_this.toneMapping;_this.toneMapping=NoToneMapping;const currentCameraViewport=camera.viewport;if(camera.viewport!==undefined)camera.viewport=undefined;currentRenderState.setupLightsView(camera);if(_clippingEnabled===true)clipping.setGlobalState(_this.clippingPlanes,camera);renderObjects(opaqueObjects,scene,camera);textures.updateMultisampleRenderTarget(transmissionRenderTarget);textures.updateRenderTargetMipmap(transmissionRenderTarget);if(extensions.has("WEBGL_multisampled_render_to_texture")===false){let renderTargetNeedsUpdate=false;for(let i=0,l=transmissiveObjects.length;i<l;i++){const renderItem=transmissiveObjects[i];const{object,geometry,material,group}=renderItem;if(material.side===DoubleSide&&object.layers.test(camera.layers)){const currentSide=material.side;material.side=BackSide;material.needsUpdate=true;renderObject(object,scene,camera,geometry,material,group);material.side=currentSide;material.needsUpdate=true;renderTargetNeedsUpdate=true}}if(renderTargetNeedsUpdate===true){textures.updateMultisampleRenderTarget(transmissionRenderTarget);textures.updateRenderTargetMipmap(transmissionRenderTarget)}}_this.setRenderTarget(currentRenderTarget,currentActiveCubeFace,currentActiveMipmapLevel);_this.setClearColor(_currentClearColor,_currentClearAlpha);if(currentCameraViewport!==undefined)camera.viewport=currentCameraViewport;_this.toneMapping=currentToneMapping}function renderObjects(renderList,scene,camera){const overrideMaterial=scene.isScene===true?scene.overrideMaterial:null;for(let i=0,l=renderList.length;i<l;i++){const renderItem=renderList[i];const{object,geometry,group}=renderItem;let material=renderItem.material;if(material.allowOverride===true&&overrideMaterial!==null){material=overrideMaterial}if(object.layers.test(camera.layers)){renderObject(object,scene,camera,geometry,material,group)}}}function renderObject(object,scene,camera,geometry,material,group){object.onBeforeRender(_this,scene,camera,geometry,material,group);object.modelViewMatrix.multiplyMatrices(camera.matrixWorldInverse,object.matrixWorld);object.normalMatrix.getNormalMatrix(object.modelViewMatrix);material.onBeforeRender(_this,scene,camera,geometry,object,group);if(material.transparent===true&&material.side===DoubleSide&&material.forceSinglePass===false){material.side=BackSide;material.needsUpdate=true;_this.renderBufferDirect(camera,scene,geometry,material,object,group);material.side=FrontSide;material.needsUpdate=true;_this.renderBufferDirect(camera,scene,geometry,material,object,group);material.side=DoubleSide}else{_this.renderBufferDirect(camera,scene,geometry,material,object,group)}object.onAfterRender(_this,scene,camera,geometry,material,group)}function getProgram(material,scene,object){if(scene.isScene!==true)scene=_emptyScene;const materialProperties=properties.get(material);const lights=currentRenderState.state.lights;const shadowsArray=currentRenderState.state.shadowsArray;const lightsStateVersion=lights.state.version;const parameters=programCache.getParameters(material,lights.state,shadowsArray,scene,object);const programCacheKey=programCache.getProgramCacheKey(parameters);let programs=materialProperties.programs;materialProperties.environment=material.isMeshStandardMaterial?scene.environment:null;materialProperties.fog=scene.fog;materialProperties.envMap=(material.isMeshStandardMaterial?cubeuvmaps:cubemaps).get(material.envMap||materialProperties.environment);materialProperties.envMapRotation=materialProperties.environment!==null&&material.envMap===null?scene.environmentRotation:material.envMapRotation;if(programs===undefined){material.addEventListener("dispose",onMaterialDispose);programs=new Map;materialProperties.programs=programs}let program=programs.get(programCacheKey);if(program!==undefined){if(materialProperties.currentProgram===program&&materialProperties.lightsStateVersion===lightsStateVersion){updateCommonMaterialProperties(material,parameters);return program}}else{parameters.uniforms=programCache.getUniforms(material);material.onBeforeCompile(parameters,_this);program=programCache.acquireProgram(parameters,programCacheKey);programs.set(programCacheKey,program);materialProperties.uniforms=parameters.uniforms}const uniforms=materialProperties.uniforms;if(!material.isShaderMaterial&&!material.isRawShaderMaterial||material.clipping===true){uniforms.clippingPlanes=clipping.uniform}updateCommonMaterialProperties(material,parameters);materialProperties.needsLights=materialNeedsLights(material);materialProperties.lightsStateVersion=lightsStateVersion;if(materialProperties.needsLights){uniforms.ambientLightColor.value=lights.state.ambient;uniforms.lightProbe.value=lights.state.probe;uniforms.directionalLights.value=lights.state.directional;uniforms.directionalLightShadows.value=lights.state.directionalShadow;uniforms.spotLights.value=lights.state.spot;uniforms.spotLightShadows.value=lights.state.spotShadow;uniforms.rectAreaLights.value=lights.state.rectArea;uniforms.ltc_1.value=lights.state.rectAreaLTC1;uniforms.ltc_2.value=lights.state.rectAreaLTC2;uniforms.pointLights.value=lights.state.point;uniforms.pointLightShadows.value=lights.state.pointShadow;uniforms.hemisphereLights.value=lights.state.hemi;uniforms.directionalShadowMap.value=lights.state.directionalShadowMap;uniforms.directionalShadowMatrix.value=lights.state.directionalShadowMatrix;uniforms.spotShadowMap.value=lights.state.spotShadowMap;uniforms.spotLightMatrix.value=lights.state.spotLightMatrix;uniforms.spotLightMap.value=lights.state.spotLightMap;uniforms.pointShadowMap.value=lights.state.pointShadowMap;uniforms.pointShadowMatrix.value=lights.state.pointShadowMatrix}materialProperties.currentProgram=program;materialProperties.uniformsList=null;return program}function getUniformList(materialProperties){if(materialProperties.uniformsList===null){const progUniforms=materialProperties.currentProgram.getUniforms();materialProperties.uniformsList=WebGLUniforms.seqWithValue(progUniforms.seq,materialProperties.uniforms)}return materialProperties.uniformsList}function updateCommonMaterialProperties(material,parameters){const materialProperties=properties.get(material);materialProperties.outputColorSpace=parameters.outputColorSpace;materialProperties.batching=parameters.batching;materialProperties.batchingColor=parameters.batchingColor;materialProperties.instancing=parameters.instancing;materialProperties.instancingColor=parameters.instancingColor;materialProperties.instancingMorph=parameters.instancingMorph;materialProperties.skinning=parameters.skinning;materialProperties.morphTargets=parameters.morphTargets;materialProperties.morphNormals=parameters.morphNormals;materialProperties.morphColors=parameters.morphColors;materialProperties.morphTargetsCount=parameters.morphTargetsCount;materialProperties.numClippingPlanes=parameters.numClippingPlanes;materialProperties.numIntersection=parameters.numClipIntersection;materialProperties.vertexAlphas=parameters.vertexAlphas;materialProperties.vertexTangents=parameters.vertexTangents;materialProperties.toneMapping=parameters.toneMapping}function setProgram(camera,scene,geometry,material,object){if(scene.isScene!==true)scene=_emptyScene;textures.resetTextureUnits();const fog=scene.fog;const environment=material.isMeshStandardMaterial?scene.environment:null;const colorSpace=_currentRenderTarget===null?_this.outputColorSpace:_currentRenderTarget.isXRRenderTarget===true?_currentRenderTarget.texture.colorSpace:LinearSRGBColorSpace;const envMap=(material.isMeshStandardMaterial?cubeuvmaps:cubemaps).get(material.envMap||environment);const vertexAlphas=material.vertexColors===true&&!!geometry.attributes.color&&geometry.attributes.color.itemSize===4;const vertexTangents=!!geometry.attributes.tangent&&(!!material.normalMap||material.anisotropy>0);const morphTargets=!!geometry.morphAttributes.position;const morphNormals=!!geometry.morphAttributes.normal;const morphColors=!!geometry.morphAttributes.color;let toneMapping=NoToneMapping;if(material.toneMapped){if(_currentRenderTarget===null||_currentRenderTarget.isXRRenderTarget===true){toneMapping=_this.toneMapping}}const morphAttribute=geometry.morphAttributes.position||geometry.morphAttributes.normal||geometry.morphAttributes.color;const morphTargetsCount=morphAttribute!==undefined?morphAttribute.length:0;const materialProperties=properties.get(material);const lights=currentRenderState.state.lights;if(_clippingEnabled===true){if(_localClippingEnabled===true||camera!==_currentCamera){const useCache=camera===_currentCamera&&material.id===_currentMaterialId;clipping.setState(material,camera,useCache)}}let needsProgramChange=false;if(material.version===materialProperties.__version){if(materialProperties.needsLights&&materialProperties.lightsStateVersion!==lights.state.version){needsProgramChange=true}else if(materialProperties.outputColorSpace!==colorSpace){needsProgramChange=true}else if(object.isBatchedMesh&&materialProperties.batching===false){needsProgramChange=true}else if(!object.isBatchedMesh&&materialProperties.batching===true){needsProgramChange=true}else if(object.isBatchedMesh&&materialProperties.batchingColor===true&&object.colorTexture===null){needsProgramChange=true}else if(object.isBatchedMesh&&materialProperties.batchingColor===false&&object.colorTexture!==null){needsProgramChange=true}else if(object.isInstancedMesh&&materialProperties.instancing===false){needsProgramChange=true}else if(!object.isInstancedMesh&&materialProperties.instancing===true){needsProgramChange=true}else if(object.isSkinnedMesh&&materialProperties.skinning===false){needsProgramChange=true}else if(!object.isSkinnedMesh&&materialProperties.skinning===true){needsProgramChange=true}else if(object.isInstancedMesh&&materialProperties.instancingColor===true&&object.instanceColor===null){needsProgramChange=true}else if(object.isInstancedMesh&&materialProperties.instancingColor===false&&object.instanceColor!==null){needsProgramChange=true}else if(object.isInstancedMesh&&materialProperties.instancingMorph===true&&object.morphTexture===null){needsProgramChange=true}else if(object.isInstancedMesh&&materialProperties.instancingMorph===false&&object.morphTexture!==null){needsProgramChange=true}else if(materialProperties.envMap!==envMap){needsProgramChange=true}else if(material.fog===true&&materialProperties.fog!==fog){needsProgramChange=true}else if(materialProperties.numClippingPlanes!==undefined&&(materialProperties.numClippingPlanes!==clipping.numPlanes||materialProperties.numIntersection!==clipping.numIntersection)){needsProgramChange=true}else if(materialProperties.vertexAlphas!==vertexAlphas){needsProgramChange=true}else if(materialProperties.vertexTangents!==vertexTangents){needsProgramChange=true}else if(materialProperties.morphTargets!==morphTargets){needsProgramChange=true}else if(materialProperties.morphNormals!==morphNormals){needsProgramChange=true}else if(materialProperties.morphColors!==morphColors){needsProgramChange=true}else if(materialProperties.toneMapping!==toneMapping){needsProgramChange=true}else if(materialProperties.morphTargetsCount!==morphTargetsCount){needsProgramChange=true}}else{needsProgramChange=true;materialProperties.__version=material.version}let program=materialProperties.currentProgram;if(needsProgramChange===true){program=getProgram(material,scene,object)}let refreshProgram=false;let refreshMaterial=false;let refreshLights=false;const p_uniforms=program.getUniforms(),m_uniforms=materialProperties.uniforms;if(state.useProgram(program.program)){refreshProgram=true;refreshMaterial=true;refreshLights=true}if(material.id!==_currentMaterialId){_currentMaterialId=material.id;refreshMaterial=true}if(refreshProgram||_currentCamera!==camera){const reversedDepthBuffer=state.buffers.depth.getReversed();if(reversedDepthBuffer&&camera.reversedDepth!==true){camera._reversedDepth=true;camera.updateProjectionMatrix()}p_uniforms.setValue(_gl,"projectionMatrix",camera.projectionMatrix);p_uniforms.setValue(_gl,"viewMatrix",camera.matrixWorldInverse);const uCamPos=p_uniforms.map.cameraPosition;if(uCamPos!==undefined){uCamPos.setValue(_gl,_vector3.setFromMatrixPosition(camera.matrixWorld))}if(capabilities.logarithmicDepthBuffer){p_uniforms.setValue(_gl,"logDepthBufFC",2/(Math.log(camera.far+1)/Math.LN2))}if(material.isMeshPhongMaterial||material.isMeshToonMaterial||material.isMeshLambertMaterial||material.isMeshBasicMaterial||material.isMeshStandardMaterial||material.isShaderMaterial){p_uniforms.setValue(_gl,"isOrthographic",camera.isOrthographicCamera===true)}if(_currentCamera!==camera){_currentCamera=camera;refreshMaterial=true;refreshLights=true}}if(materialProperties.needsLights){if(lights.state.directionalShadowMap.length>0){p_uniforms.setValue(_gl,"directionalShadowMap",lights.state.directionalShadowMap,textures)}if(lights.state.spotShadowMap.length>0){p_uniforms.setValue(_gl,"spotShadowMap",lights.state.spotShadowMap,textures)}if(lights.state.pointShadowMap.length>0){p_uniforms.setValue(_gl,"pointShadowMap",lights.state.pointShadowMap,textures)}}if(object.isSkinnedMesh){p_uniforms.setOptional(_gl,object,"bindMatrix");p_uniforms.setOptional(_gl,object,"bindMatrixInverse");const skeleton=object.skeleton;if(skeleton){if(skeleton.boneTexture===null)skeleton.computeBoneTexture();p_uniforms.setValue(_gl,"boneTexture",skeleton.boneTexture,textures)}}if(object.isBatchedMesh){p_uniforms.setOptional(_gl,object,"batchingTexture");p_uniforms.setValue(_gl,"batchingTexture",object._matricesTexture,textures);p_uniforms.setOptional(_gl,object,"batchingIdTexture");p_uniforms.setValue(_gl,"batchingIdTexture",object._indirectTexture,textures);p_uniforms.setOptional(_gl,object,"batchingColorTexture");if(object._colorsTexture!==null){p_uniforms.setValue(_gl,"batchingColorTexture",object._colorsTexture,textures)}}const morphAttributes=geometry.morphAttributes;if(morphAttributes.position!==undefined||morphAttributes.normal!==undefined||morphAttributes.color!==undefined){morphtargets.update(object,geometry,program)}if(refreshMaterial||materialProperties.receiveShadow!==object.receiveShadow){materialProperties.receiveShadow=object.receiveShadow;p_uniforms.setValue(_gl,"receiveShadow",object.receiveShadow)}if(material.isMeshGouraudMaterial&&material.envMap!==null){m_uniforms.envMap.value=envMap;m_uniforms.flipEnvMap.value=envMap.isCubeTexture&&envMap.isRenderTargetTexture===false?-1:1}if(material.isMeshStandardMaterial&&material.envMap===null&&scene.environment!==null){m_uniforms.envMapIntensity.value=scene.environmentIntensity}if(m_uniforms.dfgLUT!==undefined){m_uniforms.dfgLUT.value=getDFGLUT()}if(refreshMaterial){p_uniforms.setValue(_gl,"toneMappingExposure",_this.toneMappingExposure);if(materialProperties.needsLights){markUniformsLightsNeedsUpdate(m_uniforms,refreshLights)}if(fog&&material.fog===true){materials.refreshFogUniforms(m_uniforms,fog)}materials.refreshMaterialUniforms(m_uniforms,material,_pixelRatio,_height,currentRenderState.state.transmissionRenderTarget[camera.id]);WebGLUniforms.upload(_gl,getUniformList(materialProperties),m_uniforms,textures)}if(material.isShaderMaterial&&material.uniformsNeedUpdate===true){WebGLUniforms.upload(_gl,getUniformList(materialProperties),m_uniforms,textures);material.uniformsNeedUpdate=false}if(material.isSpriteMaterial){p_uniforms.setValue(_gl,"center",object.center)}p_uniforms.setValue(_gl,"modelViewMatrix",object.modelViewMatrix);p_uniforms.setValue(_gl,"normalMatrix",object.normalMatrix);p_uniforms.setValue(_gl,"modelMatrix",object.matrixWorld);if(material.isShaderMaterial||material.isRawShaderMaterial){const groups=material.uniformsGroups;for(let i=0,l=groups.length;i<l;i++){const group=groups[i];uniformsGroups.update(group,program);uniformsGroups.bind(group,program)}}return program}function markUniformsLightsNeedsUpdate(uniforms,value){uniforms.ambientLightColor.needsUpdate=value;uniforms.lightProbe.needsUpdate=value;uniforms.directionalLights.needsUpdate=value;uniforms.directionalLightShadows.needsUpdate=value;uniforms.pointLights.needsUpdate=value;uniforms.pointLightShadows.needsUpdate=value;uniforms.spotLights.needsUpdate=value;uniforms.spotLightShadows.needsUpdate=value;uniforms.rectAreaLights.needsUpdate=value;uniforms.hemisphereLights.needsUpdate=value}function materialNeedsLights(material){return material.isMeshLambertMaterial||material.isMeshToonMaterial||material.isMeshPhongMaterial||material.isMeshStandardMaterial||material.isShadowMaterial||material.isShaderMaterial&&material.lights===true}this.getActiveCubeFace=function(){return _currentActiveCubeFace};this.getActiveMipmapLevel=function(){return _currentActiveMipmapLevel};this.getRenderTarget=function(){return _currentRenderTarget};this.setRenderTargetTextures=function(renderTarget,colorTexture,depthTexture){const renderTargetProperties=properties.get(renderTarget);renderTargetProperties.__autoAllocateDepthBuffer=renderTarget.resolveDepthBuffer===false;if(renderTargetProperties.__autoAllocateDepthBuffer===false){renderTargetProperties.__useRenderToTexture=false}properties.get(renderTarget.texture).__webglTexture=colorTexture;properties.get(renderTarget.depthTexture).__webglTexture=renderTargetProperties.__autoAllocateDepthBuffer?undefined:depthTexture;renderTargetProperties.__hasExternalTextures=true};this.setRenderTargetFramebuffer=function(renderTarget,defaultFramebuffer){const renderTargetProperties=properties.get(renderTarget);renderTargetProperties.__webglFramebuffer=defaultFramebuffer;renderTargetProperties.__useDefaultFramebuffer=defaultFramebuffer===undefined};const _scratchFrameBuffer=_gl.createFramebuffer();this.setRenderTarget=function(renderTarget,activeCubeFace=0,activeMipmapLevel=0){_currentRenderTarget=renderTarget;_currentActiveCubeFace=activeCubeFace;_currentActiveMipmapLevel=activeMipmapLevel;let framebuffer=null;let isCube=false;let isRenderTarget3D=false;if(renderTarget){const renderTargetProperties=properties.get(renderTarget);if(renderTargetProperties.__useDefaultFramebuffer!==undefined){state.bindFramebuffer(_gl.FRAMEBUFFER,renderTargetProperties.__webglFramebuffer);_currentViewport.copy(renderTarget.viewport);_currentScissor.copy(renderTarget.scissor);_currentScissorTest=renderTarget.scissorTest;state.viewport(_currentViewport);state.scissor(_currentScissor);state.setScissorTest(_currentScissorTest);_currentMaterialId=-1;return}else if(renderTargetProperties.__webglFramebuffer===undefined){textures.setupRenderTarget(renderTarget)}else if(renderTargetProperties.__hasExternalTextures){textures.rebindTextures(renderTarget,properties.get(renderTarget.texture).__webglTexture,properties.get(renderTarget.depthTexture).__webglTexture)}else if(renderTarget.depthBuffer){const depthTexture=renderTarget.depthTexture;if(renderTargetProperties.__boundDepthTexture!==depthTexture){if(depthTexture!==null&&properties.has(depthTexture)&&(renderTarget.width!==depthTexture.image.width||renderTarget.height!==depthTexture.image.height)){throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.")}textures.setupDepthRenderbuffer(renderTarget)}}const texture=renderTarget.texture;if(texture.isData3DTexture||texture.isDataArrayTexture||texture.isCompressedArrayTexture){isRenderTarget3D=true}const __webglFramebuffer=properties.get(renderTarget).__webglFramebuffer;if(renderTarget.isWebGLCubeRenderTarget){if(Array.isArray(__webglFramebuffer[activeCubeFace])){framebuffer=__webglFramebuffer[activeCubeFace][activeMipmapLevel]}else{framebuffer=__webglFramebuffer[activeCubeFace]}isCube=true}else if(renderTarget.samples>0&&textures.useMultisampledRTT(renderTarget)===false){framebuffer=properties.get(renderTarget).__webglMultisampledFramebuffer}else{if(Array.isArray(__webglFramebuffer)){framebuffer=__webglFramebuffer[activeMipmapLevel]}else{framebuffer=__webglFramebuffer}}_currentViewport.copy(renderTarget.viewport);_currentScissor.copy(renderTarget.scissor);_currentScissorTest=renderTarget.scissorTest}else{_currentViewport.copy(_viewport).multiplyScalar(_pixelRatio).floor();_currentScissor.copy(_scissor).multiplyScalar(_pixelRatio).floor();_currentScissorTest=_scissorTest}if(activeMipmapLevel!==0){framebuffer=_scratchFrameBuffer}const framebufferBound=state.bindFramebuffer(_gl.FRAMEBUFFER,framebuffer);if(framebufferBound){state.drawBuffers(renderTarget,framebuffer)}state.viewport(_currentViewport);state.scissor(_currentScissor);state.setScissorTest(_currentScissorTest);if(isCube){const textureProperties=properties.get(renderTarget.texture);_gl.framebufferTexture2D(_gl.FRAMEBUFFER,_gl.COLOR_ATTACHMENT0,_gl.TEXTURE_CUBE_MAP_POSITIVE_X+activeCubeFace,textureProperties.__webglTexture,activeMipmapLevel)}else if(isRenderTarget3D){const layer=activeCubeFace;for(let i=0;i<renderTarget.textures.length;i++){const textureProperties=properties.get(renderTarget.textures[i]);_gl.framebufferTextureLayer(_gl.FRAMEBUFFER,_gl.COLOR_ATTACHMENT0+i,textureProperties.__webglTexture,activeMipmapLevel,layer)}}else if(renderTarget!==null&&activeMipmapLevel!==0){const textureProperties=properties.get(renderTarget.texture);_gl.framebufferTexture2D(_gl.FRAMEBUFFER,_gl.COLOR_ATTACHMENT0,_gl.TEXTURE_2D,textureProperties.__webglTexture,activeMipmapLevel)}_currentMaterialId=-1};this.readRenderTargetPixels=function(renderTarget,x,y,width,height,buffer,activeCubeFaceIndex,textureIndex=0){if(!(renderTarget&&renderTarget.isWebGLRenderTarget)){error("WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let framebuffer=properties.get(renderTarget).__webglFramebuffer;if(renderTarget.isWebGLCubeRenderTarget&&activeCubeFaceIndex!==undefined){framebuffer=framebuffer[activeCubeFaceIndex]}if(framebuffer){state.bindFramebuffer(_gl.FRAMEBUFFER,framebuffer);try{const texture=renderTarget.textures[textureIndex];const textureFormat=texture.format;const textureType=texture.type;if(!capabilities.textureFormatReadable(textureFormat)){error("WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!capabilities.textureTypeReadable(textureType)){error("WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}if(x>=0&&x<=renderTarget.width-width&&y>=0&&y<=renderTarget.height-height){if(renderTarget.textures.length>1)_gl.readBuffer(_gl.COLOR_ATTACHMENT0+textureIndex);_gl.readPixels(x,y,width,height,utils.convert(textureFormat),utils.convert(textureType),buffer)}}finally{const framebuffer=_currentRenderTarget!==null?properties.get(_currentRenderTarget).__webglFramebuffer:null;state.bindFramebuffer(_gl.FRAMEBUFFER,framebuffer)}}};this.readRenderTargetPixelsAsync=async function(renderTarget,x,y,width,height,buffer,activeCubeFaceIndex,textureIndex=0){if(!(renderTarget&&renderTarget.isWebGLRenderTarget)){throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")}let framebuffer=properties.get(renderTarget).__webglFramebuffer;if(renderTarget.isWebGLCubeRenderTarget&&activeCubeFaceIndex!==undefined){framebuffer=framebuffer[activeCubeFaceIndex]}if(framebuffer){if(x>=0&&x<=renderTarget.width-width&&y>=0&&y<=renderTarget.height-height){state.bindFramebuffer(_gl.FRAMEBUFFER,framebuffer);const texture=renderTarget.textures[textureIndex];const textureFormat=texture.format;const textureType=texture.type;if(!capabilities.textureFormatReadable(textureFormat)){throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.")}if(!capabilities.textureTypeReadable(textureType)){throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.")}const glBuffer=_gl.createBuffer();_gl.bindBuffer(_gl.PIXEL_PACK_BUFFER,glBuffer);_gl.bufferData(_gl.PIXEL_PACK_BUFFER,buffer.byteLength,_gl.STREAM_READ);if(renderTarget.textures.length>1)_gl.readBuffer(_gl.COLOR_ATTACHMENT0+textureIndex);_gl.readPixels(x,y,width,height,utils.convert(textureFormat),utils.convert(textureType),0);const currFramebuffer=_currentRenderTarget!==null?properties.get(_currentRenderTarget).__webglFramebuffer:null;state.bindFramebuffer(_gl.FRAMEBUFFER,currFramebuffer);const sync=_gl.fenceSync(_gl.SYNC_GPU_COMMANDS_COMPLETE,0);_gl.flush();await probeAsync(_gl,sync,4);_gl.bindBuffer(_gl.PIXEL_PACK_BUFFER,glBuffer);_gl.getBufferSubData(_gl.PIXEL_PACK_BUFFER,0,buffer);_gl.deleteBuffer(glBuffer);_gl.deleteSync(sync);return buffer}else{throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")}}};this.copyFramebufferToTexture=function(texture,position=null,level=0){const levelScale=Math.pow(2,-level);const width=Math.floor(texture.image.width*levelScale);const height=Math.floor(texture.image.height*levelScale);const x=position!==null?position.x:0;const y=position!==null?position.y:0;textures.setTexture2D(texture,0);_gl.copyTexSubImage2D(_gl.TEXTURE_2D,level,0,0,x,y,width,height);state.unbindTexture()};const _srcFramebuffer=_gl.createFramebuffer();const _dstFramebuffer=_gl.createFramebuffer();this.copyTextureToTexture=function(srcTexture,dstTexture,srcRegion=null,dstPosition=null,srcLevel=0,dstLevel=null){if(dstLevel===null){if(srcLevel!==0){warnOnce("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels.");dstLevel=srcLevel;srcLevel=0}else{dstLevel=0}}let width,height,depth,minX,minY,minZ;let dstX,dstY,dstZ;const image=srcTexture.isCompressedTexture?srcTexture.mipmaps[dstLevel]:srcTexture.image;if(srcRegion!==null){width=srcRegion.max.x-srcRegion.min.x;height=srcRegion.max.y-srcRegion.min.y;depth=srcRegion.isBox3?srcRegion.max.z-srcRegion.min.z:1;minX=srcRegion.min.x;minY=srcRegion.min.y;minZ=srcRegion.isBox3?srcRegion.min.z:0}else{const levelScale=Math.pow(2,-srcLevel);width=Math.floor(image.width*levelScale);height=Math.floor(image.height*levelScale);if(srcTexture.isDataArrayTexture){depth=image.depth}else if(srcTexture.isData3DTexture){depth=Math.floor(image.depth*levelScale)}else{depth=1}minX=0;minY=0;minZ=0}if(dstPosition!==null){dstX=dstPosition.x;dstY=dstPosition.y;dstZ=dstPosition.z}else{dstX=0;dstY=0;dstZ=0}const glFormat=utils.convert(dstTexture.format);const glType=utils.convert(dstTexture.type);let glTarget;if(dstTexture.isData3DTexture){textures.setTexture3D(dstTexture,0);glTarget=_gl.TEXTURE_3D}else if(dstTexture.isDataArrayTexture||dstTexture.isCompressedArrayTexture){textures.setTexture2DArray(dstTexture,0);glTarget=_gl.TEXTURE_2D_ARRAY}else{textures.setTexture2D(dstTexture,0);glTarget=_gl.TEXTURE_2D}_gl.pixelStorei(_gl.UNPACK_FLIP_Y_WEBGL,dstTexture.flipY);_gl.pixelStorei(_gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL,dstTexture.premultiplyAlpha);_gl.pixelStorei(_gl.UNPACK_ALIGNMENT,dstTexture.unpackAlignment);const currentUnpackRowLen=_gl.getParameter(_gl.UNPACK_ROW_LENGTH);const currentUnpackImageHeight=_gl.getParameter(_gl.UNPACK_IMAGE_HEIGHT);const currentUnpackSkipPixels=_gl.getParameter(_gl.UNPACK_SKIP_PIXELS);const currentUnpackSkipRows=_gl.getParameter(_gl.UNPACK_SKIP_ROWS);const currentUnpackSkipImages=_gl.getParameter(_gl.UNPACK_SKIP_IMAGES);_gl.pixelStorei(_gl.UNPACK_ROW_LENGTH,image.width);_gl.pixelStorei(_gl.UNPACK_IMAGE_HEIGHT,image.height);_gl.pixelStorei(_gl.UNPACK_SKIP_PIXELS,minX);_gl.pixelStorei(_gl.UNPACK_SKIP_ROWS,minY);_gl.pixelStorei(_gl.UNPACK_SKIP_IMAGES,minZ);const isSrc3D=srcTexture.isDataArrayTexture||srcTexture.isData3DTexture;const isDst3D=dstTexture.isDataArrayTexture||dstTexture.isData3DTexture;if(srcTexture.isDepthTexture){const srcTextureProperties=properties.get(srcTexture);const dstTextureProperties=properties.get(dstTexture);const srcRenderTargetProperties=properties.get(srcTextureProperties.__renderTarget);const dstRenderTargetProperties=properties.get(dstTextureProperties.__renderTarget);state.bindFramebuffer(_gl.READ_FRAMEBUFFER,srcRenderTargetProperties.__webglFramebuffer);state.bindFramebuffer(_gl.DRAW_FRAMEBUFFER,dstRenderTargetProperties.__webglFramebuffer);for(let i=0;i<depth;i++){if(isSrc3D){_gl.framebufferTextureLayer(_gl.READ_FRAMEBUFFER,_gl.COLOR_ATTACHMENT0,properties.get(srcTexture).__webglTexture,srcLevel,minZ+i);_gl.framebufferTextureLayer(_gl.DRAW_FRAMEBUFFER,_gl.COLOR_ATTACHMENT0,properties.get(dstTexture).__webglTexture,dstLevel,dstZ+i)}_gl.blitFramebuffer(minX,minY,width,height,dstX,dstY,width,height,_gl.DEPTH_BUFFER_BIT,_gl.NEAREST)}state.bindFramebuffer(_gl.READ_FRAMEBUFFER,null);state.bindFramebuffer(_gl.DRAW_FRAMEBUFFER,null)}else if(srcLevel!==0||srcTexture.isRenderTargetTexture||properties.has(srcTexture)){const srcTextureProperties=properties.get(srcTexture);const dstTextureProperties=properties.get(dstTexture);state.bindFramebuffer(_gl.READ_FRAMEBUFFER,_srcFramebuffer);state.bindFramebuffer(_gl.DRAW_FRAMEBUFFER,_dstFramebuffer);for(let i=0;i<depth;i++){if(isSrc3D){_gl.framebufferTextureLayer(_gl.READ_FRAMEBUFFER,_gl.COLOR_ATTACHMENT0,srcTextureProperties.__webglTexture,srcLevel,minZ+i)}else{_gl.framebufferTexture2D(_gl.READ_FRAMEBUFFER,_gl.COLOR_ATTACHMENT0,_gl.TEXTURE_2D,srcTextureProperties.__webglTexture,srcLevel)}if(isDst3D){_gl.framebufferTextureLayer(_gl.DRAW_FRAMEBUFFER,_gl.COLOR_ATTACHMENT0,dstTextureProperties.__webglTexture,dstLevel,dstZ+i)}else{_gl.framebufferTexture2D(_gl.DRAW_FRAMEBUFFER,_gl.COLOR_ATTACHMENT0,_gl.TEXTURE_2D,dstTextureProperties.__webglTexture,dstLevel)}if(srcLevel!==0){_gl.blitFramebuffer(minX,minY,width,height,dstX,dstY,width,height,_gl.COLOR_BUFFER_BIT,_gl.NEAREST)}else if(isDst3D){_gl.copyTexSubImage3D(glTarget,dstLevel,dstX,dstY,dstZ+i,minX,minY,width,height)}else{_gl.copyTexSubImage2D(glTarget,dstLevel,dstX,dstY,minX,minY,width,height)}}state.bindFramebuffer(_gl.READ_FRAMEBUFFER,null);state.bindFramebuffer(_gl.DRAW_FRAMEBUFFER,null)}else{if(isDst3D){if(srcTexture.isDataTexture||srcTexture.isData3DTexture){_gl.texSubImage3D(glTarget,dstLevel,dstX,dstY,dstZ,width,height,depth,glFormat,glType,image.data)}else if(dstTexture.isCompressedArrayTexture){_gl.compressedTexSubImage3D(glTarget,dstLevel,dstX,dstY,dstZ,width,height,depth,glFormat,image.data)}else{_gl.texSubImage3D(glTarget,dstLevel,dstX,dstY,dstZ,width,height,depth,glFormat,glType,image)}}else{if(srcTexture.isDataTexture){_gl.texSubImage2D(_gl.TEXTURE_2D,dstLevel,dstX,dstY,width,height,glFormat,glType,image.data)}else if(srcTexture.isCompressedTexture){_gl.compressedTexSubImage2D(_gl.TEXTURE_2D,dstLevel,dstX,dstY,image.width,image.height,glFormat,image.data)}else{_gl.texSubImage2D(_gl.TEXTURE_2D,dstLevel,dstX,dstY,width,height,glFormat,glType,image)}}}_gl.pixelStorei(_gl.UNPACK_ROW_LENGTH,currentUnpackRowLen);_gl.pixelStorei(_gl.UNPACK_IMAGE_HEIGHT,currentUnpackImageHeight);_gl.pixelStorei(_gl.UNPACK_SKIP_PIXELS,currentUnpackSkipPixels);_gl.pixelStorei(_gl.UNPACK_SKIP_ROWS,currentUnpackSkipRows);_gl.pixelStorei(_gl.UNPACK_SKIP_IMAGES,currentUnpackSkipImages);if(dstLevel===0&&dstTexture.generateMipmaps){_gl.generateMipmap(glTarget)}state.unbindTexture()};this.initRenderTarget=function(target){if(properties.get(target).__webglFramebuffer===undefined){textures.setupRenderTarget(target)}};this.initTexture=function(texture){if(texture.isCubeTexture){textures.setTextureCube(texture,0)}else if(texture.isData3DTexture){textures.setTexture3D(texture,0)}else if(texture.isDataArrayTexture||texture.isCompressedArrayTexture){textures.setTexture2DArray(texture,0)}else{textures.setTexture2D(texture,0)}state.unbindTexture()};this.resetState=function(){_currentActiveCubeFace=0;_currentActiveMipmapLevel=0;_currentRenderTarget=null;state.reset();bindingStates.reset()};if(typeof __THREE_DEVTOOLS__!=="undefined"){__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}}get coordinateSystem(){return WebGLCoordinateSystem}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(colorSpace){this._outputColorSpace=colorSpace;const gl=this.getContext();gl.drawingBufferColorSpace=ColorManagement._getDrawingBufferColorSpace(colorSpace);gl.unpackColorSpace=ColorManagement._getUnpackColorSpace()}}exports.ACESFilmicToneMapping=ACESFilmicToneMapping;exports.AddEquation=AddEquation;exports.AddOperation=AddOperation;exports.AdditiveAnimationBlendMode=AdditiveAnimationBlendMode;exports.AdditiveBlending=AdditiveBlending;exports.AgXToneMapping=AgXToneMapping;exports.AlphaFormat=AlphaFormat;exports.AlwaysCompare=AlwaysCompare;exports.AlwaysDepth=AlwaysDepth;exports.AlwaysStencilFunc=AlwaysStencilFunc;exports.AmbientLight=AmbientLight;exports.AnimationAction=AnimationAction;exports.AnimationClip=AnimationClip;exports.AnimationLoader=AnimationLoader;exports.AnimationMixer=AnimationMixer;exports.AnimationObjectGroup=AnimationObjectGroup;exports.AnimationUtils=AnimationUtils;exports.ArcCurve=ArcCurve;exports.ArrayCamera=ArrayCamera;exports.ArrowHelper=ArrowHelper;exports.AttachedBindMode=AttachedBindMode;exports.Audio=Audio;exports.AudioAnalyser=AudioAnalyser;exports.AudioContext=AudioContext;exports.AudioListener=AudioListener;exports.AudioLoader=AudioLoader;exports.AxesHelper=AxesHelper;exports.BackSide=BackSide;exports.BasicDepthPacking=BasicDepthPacking;exports.BasicShadowMap=BasicShadowMap;exports.BatchedMesh=BatchedMesh;exports.Bone=Bone;exports.BooleanKeyframeTrack=BooleanKeyframeTrack;exports.Box2=Box2;exports.Box3=Box3;exports.Box3Helper=Box3Helper;exports.BoxGeometry=BoxGeometry;exports.BoxHelper=BoxHelper;exports.BufferAttribute=BufferAttribute;exports.BufferGeometry=BufferGeometry;exports.BufferGeometryLoader=BufferGeometryLoader;exports.ByteType=ByteType;exports.Cache=Cache;exports.Camera=Camera;exports.CameraHelper=CameraHelper;exports.CanvasTexture=CanvasTexture;exports.CapsuleGeometry=CapsuleGeometry;exports.CatmullRomCurve3=CatmullRomCurve3;exports.CineonToneMapping=CineonToneMapping;exports.CircleGeometry=CircleGeometry;exports.ClampToEdgeWrapping=ClampToEdgeWrapping;exports.Clock=Clock;exports.Color=Color;exports.ColorKeyframeTrack=ColorKeyframeTrack;exports.ColorManagement=ColorManagement;exports.CompressedArrayTexture=CompressedArrayTexture;exports.CompressedCubeTexture=CompressedCubeTexture;exports.CompressedTexture=CompressedTexture;exports.CompressedTextureLoader=CompressedTextureLoader;exports.ConeGeometry=ConeGeometry;exports.ConstantAlphaFactor=ConstantAlphaFactor;exports.ConstantColorFactor=ConstantColorFactor;exports.Controls=Controls;exports.CubeCamera=CubeCamera;exports.CubeDepthTexture=CubeDepthTexture;exports.CubeReflectionMapping=CubeReflectionMapping;exports.CubeRefractionMapping=CubeRefractionMapping;exports.CubeTexture=CubeTexture;exports.CubeTextureLoader=CubeTextureLoader;exports.CubeUVReflectionMapping=CubeUVReflectionMapping;exports.CubicBezierCurve=CubicBezierCurve;exports.CubicBezierCurve3=CubicBezierCurve3;exports.CubicInterpolant=CubicInterpolant;exports.CullFaceBack=CullFaceBack;exports.CullFaceFront=CullFaceFront;exports.CullFaceFrontBack=CullFaceFrontBack;exports.CullFaceNone=CullFaceNone;exports.Curve=Curve;exports.CurvePath=CurvePath;exports.CustomBlending=CustomBlending;exports.CustomToneMapping=CustomToneMapping;exports.CylinderGeometry=CylinderGeometry;exports.Cylindrical=Cylindrical;exports.Data3DTexture=Data3DTexture;exports.DataArrayTexture=DataArrayTexture;exports.DataTexture=DataTexture;exports.DataTextureLoader=DataTextureLoader;exports.DataUtils=DataUtils;exports.DecrementStencilOp=DecrementStencilOp;exports.DecrementWrapStencilOp=DecrementWrapStencilOp;exports.DefaultLoadingManager=DefaultLoadingManager;exports.DepthFormat=DepthFormat;exports.DepthStencilFormat=DepthStencilFormat;exports.DepthTexture=DepthTexture;exports.DetachedBindMode=DetachedBindMode;exports.DirectionalLight=DirectionalLight;exports.DirectionalLightHelper=DirectionalLightHelper;exports.DiscreteInterpolant=DiscreteInterpolant;exports.DodecahedronGeometry=DodecahedronGeometry;exports.DoubleSide=DoubleSide;exports.DstAlphaFactor=DstAlphaFactor;exports.DstColorFactor=DstColorFactor;exports.DynamicCopyUsage=DynamicCopyUsage;exports.DynamicDrawUsage=DynamicDrawUsage;exports.DynamicReadUsage=DynamicReadUsage;exports.EdgesGeometry=EdgesGeometry;exports.EllipseCurve=EllipseCurve;exports.EqualCompare=EqualCompare;exports.EqualDepth=EqualDepth;exports.EqualStencilFunc=EqualStencilFunc;exports.EquirectangularReflectionMapping=EquirectangularReflectionMapping;exports.EquirectangularRefractionMapping=EquirectangularRefractionMapping;exports.Euler=Euler;exports.EventDispatcher=EventDispatcher;exports.ExternalTexture=ExternalTexture;exports.ExtrudeGeometry=ExtrudeGeometry;exports.FileLoader=FileLoader;exports.Float16BufferAttribute=Float16BufferAttribute;exports.Float32BufferAttribute=Float32BufferAttribute;exports.FloatType=FloatType;exports.Fog=Fog;exports.FogExp2=FogExp2;exports.FramebufferTexture=FramebufferTexture;exports.FrontSide=FrontSide;exports.Frustum=Frustum;exports.FrustumArray=FrustumArray;exports.GLBufferAttribute=GLBufferAttribute;exports.GLSL1=GLSL1;exports.GLSL3=GLSL3;exports.GreaterCompare=GreaterCompare;exports.GreaterDepth=GreaterDepth;exports.GreaterEqualCompare=GreaterEqualCompare;exports.GreaterEqualDepth=GreaterEqualDepth;exports.GreaterEqualStencilFunc=GreaterEqualStencilFunc;exports.GreaterStencilFunc=GreaterStencilFunc;exports.GridHelper=GridHelper;exports.Group=Group;exports.HalfFloatType=HalfFloatType;exports.HemisphereLight=HemisphereLight;exports.HemisphereLightHelper=HemisphereLightHelper;exports.IcosahedronGeometry=IcosahedronGeometry;exports.ImageBitmapLoader=ImageBitmapLoader;exports.ImageLoader=ImageLoader;exports.ImageUtils=ImageUtils;exports.IncrementStencilOp=IncrementStencilOp;exports.IncrementWrapStencilOp=IncrementWrapStencilOp;exports.InstancedBufferAttribute=InstancedBufferAttribute;exports.InstancedBufferGeometry=InstancedBufferGeometry;exports.InstancedInterleavedBuffer=InstancedInterleavedBuffer;exports.InstancedMesh=InstancedMesh;exports.Int16BufferAttribute=Int16BufferAttribute;exports.Int32BufferAttribute=Int32BufferAttribute;exports.Int8BufferAttribute=Int8BufferAttribute;exports.IntType=IntType;exports.InterleavedBuffer=InterleavedBuffer;exports.InterleavedBufferAttribute=InterleavedBufferAttribute;exports.Interpolant=Interpolant;exports.InterpolateDiscrete=InterpolateDiscrete;exports.InterpolateLinear=InterpolateLinear;exports.InterpolateSmooth=InterpolateSmooth;exports.InterpolationSamplingMode=InterpolationSamplingMode;exports.InterpolationSamplingType=InterpolationSamplingType;exports.InvertStencilOp=InvertStencilOp;exports.KeepStencilOp=KeepStencilOp;exports.KeyframeTrack=KeyframeTrack;exports.LOD=LOD;exports.LatheGeometry=LatheGeometry;exports.Layers=Layers;exports.LessCompare=LessCompare;exports.LessDepth=LessDepth;exports.LessEqualCompare=LessEqualCompare;exports.LessEqualDepth=LessEqualDepth;exports.LessEqualStencilFunc=LessEqualStencilFunc;exports.LessStencilFunc=LessStencilFunc;exports.Light=Light;exports.LightProbe=LightProbe;exports.Line=Line;exports.Line3=Line3;exports.LineBasicMaterial=LineBasicMaterial;exports.LineCurve=LineCurve;exports.LineCurve3=LineCurve3;exports.LineDashedMaterial=LineDashedMaterial;exports.LineLoop=LineLoop;exports.LineSegments=LineSegments;exports.LinearFilter=LinearFilter;exports.LinearInterpolant=LinearInterpolant;exports.LinearMipMapLinearFilter=LinearMipMapLinearFilter;exports.LinearMipMapNearestFilter=LinearMipMapNearestFilter;exports.LinearMipmapLinearFilter=LinearMipmapLinearFilter;exports.LinearMipmapNearestFilter=LinearMipmapNearestFilter;exports.LinearSRGBColorSpace=LinearSRGBColorSpace;exports.LinearToneMapping=LinearToneMapping;exports.LinearTransfer=LinearTransfer;exports.Loader=Loader;exports.LoaderUtils=LoaderUtils;exports.LoadingManager=LoadingManager;exports.LoopOnce=LoopOnce;exports.LoopPingPong=LoopPingPong;exports.LoopRepeat=LoopRepeat;exports.MOUSE=MOUSE;exports.Material=Material;exports.MaterialLoader=MaterialLoader;exports.MathUtils=MathUtils;exports.Matrix2=Matrix2;exports.Matrix3=Matrix3;exports.Matrix4=Matrix4;exports.MaxEquation=MaxEquation;exports.Mesh=Mesh;exports.MeshBasicMaterial=MeshBasicMaterial;exports.MeshDepthMaterial=MeshDepthMaterial;exports.MeshDistanceMaterial=MeshDistanceMaterial;exports.MeshLambertMaterial=MeshLambertMaterial;exports.MeshMatcapMaterial=MeshMatcapMaterial;exports.MeshNormalMaterial=MeshNormalMaterial;exports.MeshPhongMaterial=MeshPhongMaterial;exports.MeshPhysicalMaterial=MeshPhysicalMaterial;exports.MeshStandardMaterial=MeshStandardMaterial;exports.MeshToonMaterial=MeshToonMaterial;exports.MinEquation=MinEquation;exports.MirroredRepeatWrapping=MirroredRepeatWrapping;exports.MixOperation=MixOperation;exports.MultiplyBlending=MultiplyBlending;exports.MultiplyOperation=MultiplyOperation;exports.NearestFilter=NearestFilter;exports.NearestMipMapLinearFilter=NearestMipMapLinearFilter;exports.NearestMipMapNearestFilter=NearestMipMapNearestFilter;exports.NearestMipmapLinearFilter=NearestMipmapLinearFilter;exports.NearestMipmapNearestFilter=NearestMipmapNearestFilter;exports.NeutralToneMapping=NeutralToneMapping;exports.NeverCompare=NeverCompare;exports.NeverDepth=NeverDepth;exports.NeverStencilFunc=NeverStencilFunc;exports.NoBlending=NoBlending;exports.NoColorSpace=NoColorSpace;exports.NoNormalPacking=NoNormalPacking;exports.NoToneMapping=NoToneMapping;exports.NormalAnimationBlendMode=NormalAnimationBlendMode;exports.NormalBlending=NormalBlending;exports.NormalGAPacking=NormalGAPacking;exports.NormalRGPacking=NormalRGPacking;exports.NotEqualCompare=NotEqualCompare;exports.NotEqualDepth=NotEqualDepth;exports.NotEqualStencilFunc=NotEqualStencilFunc;exports.NumberKeyframeTrack=NumberKeyframeTrack;exports.Object3D=Object3D;exports.ObjectLoader=ObjectLoader;exports.ObjectSpaceNormalMap=ObjectSpaceNormalMap;exports.OctahedronGeometry=OctahedronGeometry;exports.OneFactor=OneFactor;exports.OneMinusConstantAlphaFactor=OneMinusConstantAlphaFactor;exports.OneMinusConstantColorFactor=OneMinusConstantColorFactor;exports.OneMinusDstAlphaFactor=OneMinusDstAlphaFactor;exports.OneMinusDstColorFactor=OneMinusDstColorFactor;exports.OneMinusSrcAlphaFactor=OneMinusSrcAlphaFactor;exports.OneMinusSrcColorFactor=OneMinusSrcColorFactor;exports.OrthographicCamera=OrthographicCamera;exports.PCFShadowMap=PCFShadowMap;exports.PCFSoftShadowMap=PCFSoftShadowMap;exports.PMREMGenerator=PMREMGenerator;exports.Path=Path;exports.PerspectiveCamera=PerspectiveCamera;exports.Plane=Plane;exports.PlaneGeometry=PlaneGeometry;exports.PlaneHelper=PlaneHelper;exports.PointLight=PointLight;exports.PointLightHelper=PointLightHelper;exports.Points=Points;exports.PointsMaterial=PointsMaterial;exports.PolarGridHelper=PolarGridHelper;exports.PolyhedronGeometry=PolyhedronGeometry;exports.PositionalAudio=PositionalAudio;exports.PropertyBinding=PropertyBinding;exports.PropertyMixer=PropertyMixer;exports.QuadraticBezierCurve=QuadraticBezierCurve;exports.QuadraticBezierCurve3=QuadraticBezierCurve3;exports.Quaternion=Quaternion;exports.QuaternionKeyframeTrack=QuaternionKeyframeTrack;exports.QuaternionLinearInterpolant=QuaternionLinearInterpolant;exports.R11_EAC_Format=R11_EAC_Format;exports.RED_GREEN_RGTC2_Format=RED_GREEN_RGTC2_Format;exports.RED_RGTC1_Format=RED_RGTC1_Format;exports.REVISION=REVISION;exports.RG11_EAC_Format=RG11_EAC_Format;exports.RGBADepthPacking=RGBADepthPacking;exports.RGBAFormat=RGBAFormat;exports.RGBAIntegerFormat=RGBAIntegerFormat;exports.RGBA_ASTC_10x10_Format=RGBA_ASTC_10x10_Format;exports.RGBA_ASTC_10x5_Format=RGBA_ASTC_10x5_Format;exports.RGBA_ASTC_10x6_Format=RGBA_ASTC_10x6_Format;exports.RGBA_ASTC_10x8_Format=RGBA_ASTC_10x8_Format;exports.RGBA_ASTC_12x10_Format=RGBA_ASTC_12x10_Format;exports.RGBA_ASTC_12x12_Format=RGBA_ASTC_12x12_Format;exports.RGBA_ASTC_4x4_Format=RGBA_ASTC_4x4_Format;exports.RGBA_ASTC_5x4_Format=RGBA_ASTC_5x4_Format;exports.RGBA_ASTC_5x5_Format=RGBA_ASTC_5x5_Format;exports.RGBA_ASTC_6x5_Format=RGBA_ASTC_6x5_Format;exports.RGBA_ASTC_6x6_Format=RGBA_ASTC_6x6_Format;exports.RGBA_ASTC_8x5_Format=RGBA_ASTC_8x5_Format;exports.RGBA_ASTC_8x6_Format=RGBA_ASTC_8x6_Format;exports.RGBA_ASTC_8x8_Format=RGBA_ASTC_8x8_Format;exports.RGBA_BPTC_Format=RGBA_BPTC_Format;exports.RGBA_ETC2_EAC_Format=RGBA_ETC2_EAC_Format;exports.RGBA_PVRTC_2BPPV1_Format=RGBA_PVRTC_2BPPV1_Format;exports.RGBA_PVRTC_4BPPV1_Format=RGBA_PVRTC_4BPPV1_Format;exports.RGBA_S3TC_DXT1_Format=RGBA_S3TC_DXT1_Format;exports.RGBA_S3TC_DXT3_Format=RGBA_S3TC_DXT3_Format;exports.RGBA_S3TC_DXT5_Format=RGBA_S3TC_DXT5_Format;exports.RGBDepthPacking=RGBDepthPacking;exports.RGBFormat=RGBFormat;exports.RGBIntegerFormat=RGBIntegerFormat;exports.RGB_BPTC_SIGNED_Format=RGB_BPTC_SIGNED_Format;exports.RGB_BPTC_UNSIGNED_Format=RGB_BPTC_UNSIGNED_Format;exports.RGB_ETC1_Format=RGB_ETC1_Format;exports.RGB_ETC2_Format=RGB_ETC2_Format;exports.RGB_PVRTC_2BPPV1_Format=RGB_PVRTC_2BPPV1_Format;exports.RGB_PVRTC_4BPPV1_Format=RGB_PVRTC_4BPPV1_Format;exports.RGB_S3TC_DXT1_Format=RGB_S3TC_DXT1_Format;exports.RGDepthPacking=RGDepthPacking;exports.RGFormat=RGFormat;exports.RGIntegerFormat=RGIntegerFormat;exports.RawShaderMaterial=RawShaderMaterial;exports.Ray=Ray;exports.Raycaster=Raycaster;exports.RectAreaLight=RectAreaLight;exports.RedFormat=RedFormat;exports.RedIntegerFormat=RedIntegerFormat;exports.ReinhardToneMapping=ReinhardToneMapping;exports.RenderTarget=RenderTarget;exports.RenderTarget3D=RenderTarget3D;exports.RepeatWrapping=RepeatWrapping;exports.ReplaceStencilOp=ReplaceStencilOp;exports.ReverseSubtractEquation=ReverseSubtractEquation;exports.RingGeometry=RingGeometry;exports.SIGNED_R11_EAC_Format=SIGNED_R11_EAC_Format;exports.SIGNED_RED_GREEN_RGTC2_Format=SIGNED_RED_GREEN_RGTC2_Format;exports.SIGNED_RED_RGTC1_Format=SIGNED_RED_RGTC1_Format;exports.SIGNED_RG11_EAC_Format=SIGNED_RG11_EAC_Format;exports.SRGBColorSpace=SRGBColorSpace;exports.SRGBTransfer=SRGBTransfer;exports.Scene=Scene;exports.ShaderChunk=ShaderChunk;exports.ShaderLib=ShaderLib;exports.ShaderMaterial=ShaderMaterial;exports.ShadowMaterial=ShadowMaterial;exports.Shape=Shape;exports.ShapeGeometry=ShapeGeometry;exports.ShapePath=ShapePath;exports.ShapeUtils=ShapeUtils;exports.ShortType=ShortType;exports.Skeleton=Skeleton;exports.SkeletonHelper=SkeletonHelper;exports.SkinnedMesh=SkinnedMesh;exports.Source=Source;exports.Sphere=Sphere;exports.SphereGeometry=SphereGeometry;exports.Spherical=Spherical;exports.SphericalHarmonics3=SphericalHarmonics3;exports.SplineCurve=SplineCurve;exports.SpotLight=SpotLight;exports.SpotLightHelper=SpotLightHelper;exports.Sprite=Sprite;exports.SpriteMaterial=SpriteMaterial;exports.SrcAlphaFactor=SrcAlphaFactor;exports.SrcAlphaSaturateFactor=SrcAlphaSaturateFactor;exports.SrcColorFactor=SrcColorFactor;exports.StaticCopyUsage=StaticCopyUsage;exports.StaticDrawUsage=StaticDrawUsage;exports.StaticReadUsage=StaticReadUsage;exports.StereoCamera=StereoCamera;exports.StreamCopyUsage=StreamCopyUsage;exports.StreamDrawUsage=StreamDrawUsage;exports.StreamReadUsage=StreamReadUsage;exports.StringKeyframeTrack=StringKeyframeTrack;exports.SubtractEquation=SubtractEquation;exports.SubtractiveBlending=SubtractiveBlending;exports.TOUCH=TOUCH;exports.TangentSpaceNormalMap=TangentSpaceNormalMap;exports.TetrahedronGeometry=TetrahedronGeometry;exports.Texture=Texture;exports.TextureLoader=TextureLoader;exports.TextureUtils=TextureUtils;exports.Timer=Timer;exports.TimestampQuery=TimestampQuery;exports.TorusGeometry=TorusGeometry;exports.TorusKnotGeometry=TorusKnotGeometry;exports.Triangle=Triangle;exports.TriangleFanDrawMode=TriangleFanDrawMode;exports.TriangleStripDrawMode=TriangleStripDrawMode;exports.TrianglesDrawMode=TrianglesDrawMode;exports.TubeGeometry=TubeGeometry;exports.UVMapping=UVMapping;exports.Uint16BufferAttribute=Uint16BufferAttribute;exports.Uint32BufferAttribute=Uint32BufferAttribute;exports.Uint8BufferAttribute=Uint8BufferAttribute;exports.Uint8ClampedBufferAttribute=Uint8ClampedBufferAttribute;exports.Uniform=Uniform;exports.UniformsGroup=UniformsGroup;exports.UniformsLib=UniformsLib;exports.UniformsUtils=UniformsUtils;exports.UnsignedByteType=UnsignedByteType;exports.UnsignedInt101111Type=UnsignedInt101111Type;exports.UnsignedInt248Type=UnsignedInt248Type;exports.UnsignedInt5999Type=UnsignedInt5999Type;exports.UnsignedIntType=UnsignedIntType;exports.UnsignedShort4444Type=UnsignedShort4444Type;exports.UnsignedShort5551Type=UnsignedShort5551Type;exports.UnsignedShortType=UnsignedShortType;exports.VSMShadowMap=VSMShadowMap;exports.Vector2=Vector2;exports.Vector3=Vector3;exports.Vector4=Vector4;exports.VectorKeyframeTrack=VectorKeyframeTrack;exports.VideoFrameTexture=VideoFrameTexture;exports.VideoTexture=VideoTexture;exports.WebGL3DRenderTarget=WebGL3DRenderTarget;exports.WebGLArrayRenderTarget=WebGLArrayRenderTarget;exports.WebGLCoordinateSystem=WebGLCoordinateSystem;exports.WebGLCubeRenderTarget=WebGLCubeRenderTarget;exports.WebGLRenderTarget=WebGLRenderTarget;exports.WebGLRenderer=WebGLRenderer;exports.WebGLUtils=WebGLUtils;exports.WebGPUCoordinateSystem=WebGPUCoordinateSystem;exports.WebXRController=WebXRController;exports.WireframeGeometry=WireframeGeometry;exports.WrapAroundEnding=WrapAroundEnding;exports.ZeroCurvatureEnding=ZeroCurvatureEnding;exports.ZeroFactor=ZeroFactor;exports.ZeroSlopeEnding=ZeroSlopeEnding;exports.ZeroStencilOp=ZeroStencilOp;exports.createCanvasElement=createCanvasElement;exports.error=error;exports.getConsoleFunction=getConsoleFunction;exports.log=log;exports.setConsoleFunction=setConsoleFunction;exports.warn=warn;exports.warnOnce=warnOnce});(function(t,e){e(t.MeshBVHLib=t.MeshBVHLib||{},t.THREE=t.THREE||{})})(this,function(exports,three){const CENTER=0;const AVERAGE=1;const SAH=2;const NOT_INTERSECTED=0;const INTERSECTED=1;const CONTAINED=2;const TRIANGLE_INTERSECT_COST=1.25;const TRAVERSAL_COST=1;const BYTES_PER_NODE=6*4+4+4;const IS_LEAFNODE_FLAG=65535;const FLOAT32_EPSILON=Math.pow(2,-24);const SKIP_GENERATION=Symbol("SKIP_GENERATION");function getVertexCount(geo){return geo.index?geo.index.count:geo.attributes.position.count}function getTriCount(geo){return getVertexCount(geo)/3}function getIndexArray(vertexCount,BufferConstructor=ArrayBuffer){if(vertexCount>65535){return new Uint32Array(new BufferConstructor(4*vertexCount))}else{return new Uint16Array(new BufferConstructor(2*vertexCount))}}function ensureIndex(geo,options){if(!geo.index){const vertexCount=geo.attributes.position.count;const BufferConstructor=options.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer;const index=getIndexArray(vertexCount,BufferConstructor);geo.setIndex(new three.BufferAttribute(index,1));for(let i=0;i<vertexCount;i++){index[i]=i}}}function getFullGeometryRange(geo){const triCount=getTriCount(geo);const drawRange=geo.drawRange;const start=drawRange.start/3;const end=(drawRange.start+drawRange.count)/3;const offset=Math.max(0,start);const count=Math.min(triCount,end)-offset;return[{offset:Math.floor(offset),count:Math.floor(count)}]}function getRootIndexRanges(geo){if(!geo.groups||!geo.groups.length){return getFullGeometryRange(geo)}const ranges=[];const rangeBoundaries=new Set;const drawRange=geo.drawRange;const drawRangeStart=drawRange.start/3;const drawRangeEnd=(drawRange.start+drawRange.count)/3;for(const group of geo.groups){const groupStart=group.start/3;const groupEnd=(group.start+group.count)/3;rangeBoundaries.add(Math.max(drawRangeStart,groupStart));rangeBoundaries.add(Math.min(drawRangeEnd,groupEnd))}const sortedBoundaries=Array.from(rangeBoundaries.values()).sort((a,b)=>a-b);for(let i=0;i<sortedBoundaries.length-1;i++){const start=sortedBoundaries[i];const end=sortedBoundaries[i+1];ranges.push({offset:Math.floor(start),count:Math.floor(end-start)})}return ranges}function hasGroupGaps(geometry){if(geometry.groups.length===0){return false}const vertexCount=getTriCount(geometry);const groups=getRootIndexRanges(geometry).sort((a,b)=>a.offset-b.offset);const finalGroup=groups[groups.length-1];finalGroup.count=Math.min(vertexCount-finalGroup.offset,finalGroup.count);let total=0;groups.forEach(({count})=>total+=count);return vertexCount!==total}function getBounds(triangleBounds,offset,count,target,centroidTarget){let minx=Infinity;let miny=Infinity;let minz=Infinity;let maxx=-Infinity;let maxy=-Infinity;let maxz=-Infinity;let cminx=Infinity;let cminy=Infinity;let cminz=Infinity;let cmaxx=-Infinity;let cmaxy=-Infinity;let cmaxz=-Infinity;for(let i=offset*6,end=(offset+count)*6;i<end;i+=6){const cx=triangleBounds[i+0];const hx=triangleBounds[i+1];const lx=cx-hx;const rx=cx+hx;if(lx<minx)minx=lx;if(rx>maxx)maxx=rx;if(cx<cminx)cminx=cx;if(cx>cmaxx)cmaxx=cx;const cy=triangleBounds[i+2];const hy=triangleBounds[i+3];const ly=cy-hy;const ry=cy+hy;if(ly<miny)miny=ly;if(ry>maxy)maxy=ry;if(cy<cminy)cminy=cy;if(cy>cmaxy)cmaxy=cy;const cz=triangleBounds[i+4];const hz=triangleBounds[i+5];const lz=cz-hz;const rz=cz+hz;if(lz<minz)minz=lz;if(rz>maxz)maxz=rz;if(cz<cminz)cminz=cz;if(cz>cmaxz)cmaxz=cz}target[0]=minx;target[1]=miny;target[2]=minz;target[3]=maxx;target[4]=maxy;target[5]=maxz;centroidTarget[0]=cminx;centroidTarget[1]=cminy;centroidTarget[2]=cminz;centroidTarget[3]=cmaxx;centroidTarget[4]=cmaxy;centroidTarget[5]=cmaxz}function computeTriangleBounds(geo,target=null,offset=null,count=null){const posAttr=geo.attributes.position;const index=geo.index?geo.index.array:null;const triCount=getTriCount(geo);const normalized=posAttr.normalized;let triangleBounds;if(target===null){triangleBounds=new Float32Array(triCount*6*4);offset=0;count=triCount}else{triangleBounds=target;offset=offset||0;count=count||triCount}const posArr=posAttr.array;const bufferOffset=posAttr.offset||0;let stride=3;if(posAttr.isInterleavedBufferAttribute){stride=posAttr.data.stride}const getters=["getX","getY","getZ"];for(let tri=offset;tri<offset+count;tri++){const tri3=tri*3;const tri6=tri*6;let ai=tri3+0;let bi=tri3+1;let ci=tri3+2;if(index){ai=index[ai];bi=index[bi];ci=index[ci]}if(!normalized){ai=ai*stride+bufferOffset;bi=bi*stride+bufferOffset;ci=ci*stride+bufferOffset}for(let el=0;el<3;el++){let a,b,c;if(normalized){a=posAttr[getters[el]](ai);b=posAttr[getters[el]](bi);c=posAttr[getters[el]](ci)}else{a=posArr[ai+el];b=posArr[bi+el];c=posArr[ci+el]}let min=a;if(b<min)min=b;if(c<min)min=c;let max=a;if(b>max)max=b;if(c>max)max=c;const halfExtents=(max-min)/2;const el2=el*2;triangleBounds[tri6+el2+0]=min+halfExtents;triangleBounds[tri6+el2+1]=halfExtents+(Math.abs(min)+halfExtents)*FLOAT32_EPSILON}}return triangleBounds}function arrayToBox(nodeIndex32,array,target){target.min.x=array[nodeIndex32];target.min.y=array[nodeIndex32+1];target.min.z=array[nodeIndex32+2];target.max.x=array[nodeIndex32+3];target.max.y=array[nodeIndex32+4];target.max.z=array[nodeIndex32+5];return target}function makeEmptyBounds(target){target[0]=target[1]=target[2]=Infinity;target[3]=target[4]=target[5]=-Infinity}function getLongestEdgeIndex(bounds){let splitDimIdx=-1;let splitDist=-Infinity;for(let i=0;i<3;i++){const dist=bounds[i+3]-bounds[i];if(dist>splitDist){splitDist=dist;splitDimIdx=i}}return splitDimIdx}function copyBounds(source,target){target.set(source)}function unionBounds(a,b,target){let aVal,bVal;for(let d=0;d<3;d++){const d3=d+3;aVal=a[d];bVal=b[d];target[d]=aVal<bVal?aVal:bVal;aVal=a[d3];bVal=b[d3];target[d3]=aVal>bVal?aVal:bVal}}function expandByTriangleBounds(startIndex,triangleBounds,bounds){for(let d=0;d<3;d++){const tCenter=triangleBounds[startIndex+2*d];const tHalf=triangleBounds[startIndex+2*d+1];const tMin=tCenter-tHalf;const tMax=tCenter+tHalf;if(tMin<bounds[d]){bounds[d]=tMin}if(tMax>bounds[d+3]){bounds[d+3]=tMax}}}function computeSurfaceArea(bounds){const d0=bounds[3]-bounds[0];const d1=bounds[4]-bounds[1];const d2=bounds[5]-bounds[2];return 2*(d0*d1+d1*d2+d2*d0)}const BIN_COUNT=32;const binsSort=(a,b)=>a.candidate-b.candidate;const sahBins=new Array(BIN_COUNT).fill().map(()=>{return{count:0,bounds:new Float32Array(6),rightCacheBounds:new Float32Array(6),leftCacheBounds:new Float32Array(6),candidate:0}});const leftBounds=new Float32Array(6);function getOptimalSplit(nodeBoundingData,centroidBoundingData,triangleBounds,offset,count,strategy){let axis=-1;let pos=0;if(strategy===CENTER){axis=getLongestEdgeIndex(centroidBoundingData);if(axis!==-1){pos=(centroidBoundingData[axis]+centroidBoundingData[axis+3])/2}}else if(strategy===AVERAGE){axis=getLongestEdgeIndex(nodeBoundingData);if(axis!==-1){pos=getAverage(triangleBounds,offset,count,axis)}}else if(strategy===SAH){const rootSurfaceArea=computeSurfaceArea(nodeBoundingData);let bestCost=TRIANGLE_INTERSECT_COST*count;const cStart=offset*6;const cEnd=(offset+count)*6;for(let a=0;a<3;a++){const axisLeft=centroidBoundingData[a];const axisRight=centroidBoundingData[a+3];const axisLength=axisRight-axisLeft;const binWidth=axisLength/BIN_COUNT;if(count<BIN_COUNT/4){const truncatedBins=[...sahBins];truncatedBins.length=count;let b=0;for(let c=cStart;c<cEnd;c+=6,b++){const bin=truncatedBins[b];bin.candidate=triangleBounds[c+2*a];bin.count=0;const{bounds,leftCacheBounds,rightCacheBounds}=bin;for(let d=0;d<3;d++){rightCacheBounds[d]=Infinity;rightCacheBounds[d+3]=-Infinity;leftCacheBounds[d]=Infinity;leftCacheBounds[d+3]=-Infinity;bounds[d]=Infinity;bounds[d+3]=-Infinity}expandByTriangleBounds(c,triangleBounds,bounds)}truncatedBins.sort(binsSort);let splitCount=count;for(let bi=0;bi<splitCount;bi++){const bin=truncatedBins[bi];while(bi+1<splitCount&&truncatedBins[bi+1].candidate===bin.candidate){truncatedBins.splice(bi+1,1);splitCount--}}for(let c=cStart;c<cEnd;c+=6){const center=triangleBounds[c+2*a];for(let bi=0;bi<splitCount;bi++){const bin=truncatedBins[bi];if(center>=bin.candidate){expandByTriangleBounds(c,triangleBounds,bin.rightCacheBounds)}else{expandByTriangleBounds(c,triangleBounds,bin.leftCacheBounds);bin.count++}}}for(let bi=0;bi<splitCount;bi++){const bin=truncatedBins[bi];const leftCount=bin.count;const rightCount=count-bin.count;const leftBounds=bin.leftCacheBounds;const rightBounds=bin.rightCacheBounds;let leftProb=0;if(leftCount!==0){leftProb=computeSurfaceArea(leftBounds)/rootSurfaceArea}let rightProb=0;if(rightCount!==0){rightProb=computeSurfaceArea(rightBounds)/rootSurfaceArea}const cost=TRAVERSAL_COST+TRIANGLE_INTERSECT_COST*(leftProb*leftCount+rightProb*rightCount);if(cost<bestCost){axis=a;bestCost=cost;pos=bin.candidate}}}else{for(let i=0;i<BIN_COUNT;i++){const bin=sahBins[i];bin.count=0;bin.candidate=axisLeft+binWidth+i*binWidth;const bounds=bin.bounds;for(let d=0;d<3;d++){bounds[d]=Infinity;bounds[d+3]=-Infinity}}for(let c=cStart;c<cEnd;c+=6){const triCenter=triangleBounds[c+2*a];const relativeCenter=triCenter-axisLeft;let binIndex=~~(relativeCenter/binWidth);if(binIndex>=BIN_COUNT)binIndex=BIN_COUNT-1;const bin=sahBins[binIndex];bin.count++;expandByTriangleBounds(c,triangleBounds,bin.bounds)}const lastBin=sahBins[BIN_COUNT-1];copyBounds(lastBin.bounds,lastBin.rightCacheBounds);for(let i=BIN_COUNT-2;i>=0;i--){const bin=sahBins[i];const nextBin=sahBins[i+1];unionBounds(bin.bounds,nextBin.rightCacheBounds,bin.rightCacheBounds)}let leftCount=0;for(let i=0;i<BIN_COUNT-1;i++){const bin=sahBins[i];const binCount=bin.count;const bounds=bin.bounds;const nextBin=sahBins[i+1];const rightBounds=nextBin.rightCacheBounds;if(binCount!==0){if(leftCount===0){copyBounds(bounds,leftBounds)}else{unionBounds(bounds,leftBounds,leftBounds)}}leftCount+=binCount;let leftProb=0;let rightProb=0;if(leftCount!==0){leftProb=computeSurfaceArea(leftBounds)/rootSurfaceArea}const rightCount=count-leftCount;if(rightCount!==0){rightProb=computeSurfaceArea(rightBounds)/rootSurfaceArea}const cost=TRAVERSAL_COST+TRIANGLE_INTERSECT_COST*(leftProb*leftCount+rightProb*rightCount);if(cost<bestCost){axis=a;bestCost=cost;pos=bin.candidate}}}}}else{console.warn(`MeshBVH: Invalid build strategy value ${strategy} used.`)}return{axis,pos}}function getAverage(triangleBounds,offset,count,axis){let avg=0;for(let i=offset,end=offset+count;i<end;i++){avg+=triangleBounds[i*6+axis*2]}return avg/count}class MeshBVHNode{constructor(){this.boundingData=new Float32Array(6)}}function partition(indirectBuffer,index,triangleBounds,offset,count,split){let left=offset;let right=offset+count-1;const pos=split.pos;const axisOffset=split.axis*2;while(true){while(left<=right&&triangleBounds[left*6+axisOffset]<pos){left++}while(left<=right&&triangleBounds[right*6+axisOffset]>=pos){right--}if(left<right){for(let i=0;i<3;i++){let t0=index[left*3+i];index[left*3+i]=index[right*3+i];index[right*3+i]=t0}for(let i=0;i<6;i++){let tb=triangleBounds[left*6+i];triangleBounds[left*6+i]=triangleBounds[right*6+i];triangleBounds[right*6+i]=tb}left++;right--}else{return left}}}function partition_indirect(indirectBuffer,index,triangleBounds,offset,count,split){let left=offset;let right=offset+count-1;const pos=split.pos;const axisOffset=split.axis*2;while(true){while(left<=right&&triangleBounds[left*6+axisOffset]<pos){left++}while(left<=right&&triangleBounds[right*6+axisOffset]>=pos){right--}if(left<right){let t=indirectBuffer[left];indirectBuffer[left]=indirectBuffer[right];indirectBuffer[right]=t;for(let i=0;i<6;i++){let tb=triangleBounds[left*6+i];triangleBounds[left*6+i]=triangleBounds[right*6+i];triangleBounds[right*6+i]=tb}left++;right--}else{return left}}}function IS_LEAF(n16,uint16Array){return uint16Array[n16+15]===65535}function OFFSET(n32,uint32Array){return uint32Array[n32+6]}function COUNT(n16,uint16Array){return uint16Array[n16+14]}function LEFT_NODE(n32){return n32+8}function RIGHT_NODE(n32,uint32Array){return uint32Array[n32+6]}function SPLIT_AXIS(n32,uint32Array){return uint32Array[n32+7]}function BOUNDING_DATA_INDEX(n32){return n32}let float32Array,uint32Array,uint16Array,uint8Array;const MAX_POINTER=Math.pow(2,32);function countNodes(node){if("count"in node){return 1}else{return 1+countNodes(node.left)+countNodes(node.right)}}function populateBuffer(byteOffset,node,buffer){float32Array=new Float32Array(buffer);uint32Array=new Uint32Array(buffer);uint16Array=new Uint16Array(buffer);uint8Array=new Uint8Array(buffer);return _populateBuffer(byteOffset,node)}function _populateBuffer(byteOffset,node){const stride4Offset=byteOffset/4;const stride2Offset=byteOffset/2;const isLeaf=("count"in node);const boundingData=node.boundingData;for(let i=0;i<6;i++){float32Array[stride4Offset+i]=boundingData[i]}if(isLeaf){if(node.buffer){const buffer=node.buffer;uint8Array.set(new Uint8Array(buffer),byteOffset);for(let offset=byteOffset,l=byteOffset+buffer.byteLength;offset<l;offset+=BYTES_PER_NODE){const offset2=offset/2;if(!IS_LEAF(offset2,uint16Array)){uint32Array[offset/4+6]+=stride4Offset}}return byteOffset+buffer.byteLength}else{const offset=node.offset;const count=node.count;uint32Array[stride4Offset+6]=offset;uint16Array[stride2Offset+14]=count;uint16Array[stride2Offset+15]=IS_LEAFNODE_FLAG;return byteOffset+BYTES_PER_NODE}}else{const left=node.left;const right=node.right;const splitAxis=node.splitAxis;let nextUnusedPointer;nextUnusedPointer=_populateBuffer(byteOffset+BYTES_PER_NODE,left);if(nextUnusedPointer/4>MAX_POINTER){throw new Error("MeshBVH: Cannot store child pointer greater than 32 bits.")}uint32Array[stride4Offset+6]=nextUnusedPointer/4;nextUnusedPointer=_populateBuffer(nextUnusedPointer,right);uint32Array[stride4Offset+7]=splitAxis;return nextUnusedPointer}}function generateIndirectBuffer(geometry,useSharedArrayBuffer){const triCount=(geometry.index?geometry.index.count:geometry.attributes.position.count)/3;const useUint32=triCount>2**16;const byteCount=useUint32?4:2;const buffer=useSharedArrayBuffer?new SharedArrayBuffer(triCount*byteCount):new ArrayBuffer(triCount*byteCount);const indirectBuffer=useUint32?new Uint32Array(buffer):new Uint16Array(buffer);for(let i=0,l=indirectBuffer.length;i<l;i++){indirectBuffer[i]=i}return indirectBuffer}function buildTree(bvh,triangleBounds,offset,count,options){const{maxDepth,verbose,maxLeafTris,strategy,onProgress,indirect}=options;const indirectBuffer=bvh._indirectBuffer;const geometry=bvh.geometry;const indexArray=geometry.index?geometry.index.array:null;const partionFunc=indirect?partition_indirect:partition;const totalTriangles=getTriCount(geometry);const cacheCentroidBoundingData=new Float32Array(6);let reachedMaxDepth=false;const root=new MeshBVHNode;getBounds(triangleBounds,offset,count,root.boundingData,cacheCentroidBoundingData);splitNode(root,offset,count,cacheCentroidBoundingData);return root;function triggerProgress(trianglesProcessed){if(onProgress){onProgress(trianglesProcessed/totalTriangles)}}function splitNode(node,offset,count,centroidBoundingData=null,depth=0){if(!reachedMaxDepth&&depth>=maxDepth){reachedMaxDepth=true;if(verbose){console.warn(`MeshBVH: Max depth of ${maxDepth} reached when generating BVH. Consider increasing maxDepth.`);console.warn(geometry)}}if(count<=maxLeafTris||depth>=maxDepth){triggerProgress(offset+count);node.offset=offset;node.count=count;return node}const split=getOptimalSplit(node.boundingData,centroidBoundingData,triangleBounds,offset,count,strategy);if(split.axis===-1){triggerProgress(offset+count);node.offset=offset;node.count=count;return node}const splitOffset=partionFunc(indirectBuffer,indexArray,triangleBounds,offset,count,split);if(splitOffset===offset||splitOffset===offset+count){triggerProgress(offset+count);node.offset=offset;node.count=count}else{node.splitAxis=split.axis;const left=new MeshBVHNode;const lstart=offset;const lcount=splitOffset-offset;node.left=left;getBounds(triangleBounds,lstart,lcount,left.boundingData,cacheCentroidBoundingData);splitNode(left,lstart,lcount,cacheCentroidBoundingData,depth+1);const right=new MeshBVHNode;const rstart=splitOffset;const rcount=count-lcount;node.right=right;getBounds(triangleBounds,rstart,rcount,right.boundingData,cacheCentroidBoundingData);splitNode(right,rstart,rcount,cacheCentroidBoundingData,depth+1)}return node}}function buildPackedTree(bvh,options){const geometry=bvh.geometry;if(options.indirect){bvh._indirectBuffer=generateIndirectBuffer(geometry,options.useSharedArrayBuffer);if(hasGroupGaps(geometry)&&!options.verbose){console.warn("MeshBVH: Provided geometry contains groups that do not fully span the vertex contents while using the \"indirect\" option. "+"BVH may incorrectly report intersections on unrendered portions of the geometry.")}}if(!bvh._indirectBuffer){ensureIndex(geometry,options)}const BufferConstructor=options.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer;const triangleBounds=computeTriangleBounds(geometry);const geometryRanges=options.indirect?getFullGeometryRange(geometry):getRootIndexRanges(geometry);bvh._roots=geometryRanges.map(range=>{const root=buildTree(bvh,triangleBounds,range.offset,range.count,options);const nodeCount=countNodes(root);const buffer=new BufferConstructor(BYTES_PER_NODE*nodeCount);populateBuffer(0,root,buffer);return buffer})}class SeparatingAxisBounds{constructor(){this.min=Infinity;this.max=-Infinity}setFromPointsField(points,field){let min=Infinity;let max=-Infinity;for(let i=0,l=points.length;i<l;i++){const p=points[i];const val=p[field];min=val<min?val:min;max=val>max?val:max}this.min=min;this.max=max}setFromPoints(axis,points){let min=Infinity;let max=-Infinity;for(let i=0,l=points.length;i<l;i++){const p=points[i];const val=axis.dot(p);min=val<min?val:min;max=val>max?val:max}this.min=min;this.max=max}isSeparated(other){return this.min>other.max||other.min>this.max}}SeparatingAxisBounds.prototype.setFromBox=function(){const p=new three.Vector3;return function setFromBox(axis,box){const boxMin=box.min;const boxMax=box.max;let min=Infinity;let max=-Infinity;for(let x=0;x<=1;x++){for(let y=0;y<=1;y++){for(let z=0;z<=1;z++){p.x=boxMin.x*x+boxMax.x*(1-x);p.y=boxMin.y*y+boxMax.y*(1-y);p.z=boxMin.z*z+boxMax.z*(1-z);const val=axis.dot(p);min=Math.min(val,min);max=Math.max(val,max)}}}this.min=min;this.max=max}}();const areIntersecting=function(){const cacheSatBounds=new SeparatingAxisBounds;return function areIntersecting(shape1,shape2){const points1=shape1.points;const satAxes1=shape1.satAxes;const satBounds1=shape1.satBounds;const points2=shape2.points;const satAxes2=shape2.satAxes;const satBounds2=shape2.satBounds;for(let i=0;i<3;i++){const sb=satBounds1[i];const sa=satAxes1[i];cacheSatBounds.setFromPoints(sa,points2);if(sb.isSeparated(cacheSatBounds))return false}for(let i=0;i<3;i++){const sb=satBounds2[i];const sa=satAxes2[i];cacheSatBounds.setFromPoints(sa,points1);if(sb.isSeparated(cacheSatBounds))return false}}}();const closestPointLineToLine=function(){const dir1=new three.Vector3;const dir2=new three.Vector3;const v02=new three.Vector3;return function closestPointLineToLine(l1,l2,result){const v0=l1.start;const v10=dir1;const v2=l2.start;const v32=dir2;v02.subVectors(v0,v2);dir1.subVectors(l1.end,l1.start);dir2.subVectors(l2.end,l2.start);const d0232=v02.dot(v32);const d3210=v32.dot(v10);const d3232=v32.dot(v32);const d0210=v02.dot(v10);const d1010=v10.dot(v10);const denom=d1010*d3232-d3210*d3210;let d,d2;if(denom!==0){d=(d0232*d3210-d0210*d3232)/denom}else{d=0}d2=(d0232+d*d3210)/d3232;result.x=d;result.y=d2}}();const closestPointsSegmentToSegment=function(){const paramResult=new three.Vector2;const temp1=new three.Vector3;const temp2=new three.Vector3;return function closestPointsSegmentToSegment(l1,l2,target1,target2){closestPointLineToLine(l1,l2,paramResult);let d=paramResult.x;let d2=paramResult.y;if(d>=0&&d<=1&&d2>=0&&d2<=1){l1.at(d,target1);l2.at(d2,target2);return}else if(d>=0&&d<=1){if(d2<0){l2.at(0,target2)}else{l2.at(1,target2)}l1.closestPointToPoint(target2,true,target1);return}else if(d2>=0&&d2<=1){if(d<0){l1.at(0,target1)}else{l1.at(1,target1)}l2.closestPointToPoint(target1,true,target2);return}else{let p;if(d<0){p=l1.start}else{p=l1.end}let p2;if(d2<0){p2=l2.start}else{p2=l2.end}const closestPoint=temp1;const closestPoint2=temp2;l1.closestPointToPoint(p2,true,temp1);l2.closestPointToPoint(p,true,temp2);if(closestPoint.distanceToSquared(p2)<=closestPoint2.distanceToSquared(p)){target1.copy(closestPoint);target2.copy(p2);return}else{target1.copy(p);target2.copy(closestPoint2);return}}}}();const sphereIntersectTriangle=function(){const closestPointTemp=new three.Vector3;const projectedPointTemp=new three.Vector3;const planeTemp=new three.Plane;const lineTemp=new three.Line3;return function sphereIntersectTriangle(sphere,triangle){const{radius,center}=sphere;const{a,b,c}=triangle;lineTemp.start=a;lineTemp.end=b;const closestPoint1=lineTemp.closestPointToPoint(center,true,closestPointTemp);if(closestPoint1.distanceTo(center)<=radius)return true;lineTemp.start=a;lineTemp.end=c;const closestPoint2=lineTemp.closestPointToPoint(center,true,closestPointTemp);if(closestPoint2.distanceTo(center)<=radius)return true;lineTemp.start=b;lineTemp.end=c;const closestPoint3=lineTemp.closestPointToPoint(center,true,closestPointTemp);if(closestPoint3.distanceTo(center)<=radius)return true;const plane=triangle.getPlane(planeTemp);const dp=Math.abs(plane.distanceToPoint(center));if(dp<=radius){const pp=plane.projectPoint(center,projectedPointTemp);const cp=triangle.containsPoint(pp);if(cp)return true}return false}}();const ZERO_EPSILON=1e-15;function isNearZero(value){return Math.abs(value)<ZERO_EPSILON}class ExtendedTriangle extends three.Triangle{constructor(...args){super(...args);this.isExtendedTriangle=true;this.satAxes=new Array(4).fill().map(()=>new three.Vector3);this.satBounds=new Array(4).fill().map(()=>new SeparatingAxisBounds);this.points=[this.a,this.b,this.c];this.sphere=new three.Sphere;this.plane=new three.Plane;this.needsUpdate=true}intersectsSphere(sphere){return sphereIntersectTriangle(sphere,this)}update(){const a=this.a;const b=this.b;const c=this.c;const points=this.points;const satAxes=this.satAxes;const satBounds=this.satBounds;const axis0=satAxes[0];const sab0=satBounds[0];this.getNormal(axis0);sab0.setFromPoints(axis0,points);const axis1=satAxes[1];const sab1=satBounds[1];axis1.subVectors(a,b);sab1.setFromPoints(axis1,points);const axis2=satAxes[2];const sab2=satBounds[2];axis2.subVectors(b,c);sab2.setFromPoints(axis2,points);const axis3=satAxes[3];const sab3=satBounds[3];axis3.subVectors(c,a);sab3.setFromPoints(axis3,points);this.sphere.setFromPoints(this.points);this.plane.setFromNormalAndCoplanarPoint(axis0,a);this.needsUpdate=false}}ExtendedTriangle.prototype.closestPointToSegment=function(){const point1=new three.Vector3;const point2=new three.Vector3;const edge=new three.Line3;return function distanceToSegment(segment,target1=null,target2=null){const{start,end}=segment;const points=this.points;let distSq;let closestDistanceSq=Infinity;for(let i=0;i<3;i++){const nexti=(i+1)%3;edge.start.copy(points[i]);edge.end.copy(points[nexti]);closestPointsSegmentToSegment(edge,segment,point1,point2);distSq=point1.distanceToSquared(point2);if(distSq<closestDistanceSq){closestDistanceSq=distSq;if(target1)target1.copy(point1);if(target2)target2.copy(point2)}}this.closestPointToPoint(start,point1);distSq=start.distanceToSquared(point1);if(distSq<closestDistanceSq){closestDistanceSq=distSq;if(target1)target1.copy(point1);if(target2)target2.copy(start)}this.closestPointToPoint(end,point1);distSq=end.distanceToSquared(point1);if(distSq<closestDistanceSq){closestDistanceSq=distSq;if(target1)target1.copy(point1);if(target2)target2.copy(end)}return Math.sqrt(closestDistanceSq)}}();ExtendedTriangle.prototype.intersectsTriangle=function(){const saTri2=new ExtendedTriangle;const arr1=new Array(3);const arr2=new Array(3);const cachedSatBounds=new SeparatingAxisBounds;const cachedSatBounds2=new SeparatingAxisBounds;const cachedAxis=new three.Vector3;const dir=new three.Vector3;const dir1=new three.Vector3;const dir2=new three.Vector3;const tempDir=new three.Vector3;const edge=new three.Line3;const edge1=new three.Line3;const edge2=new three.Line3;const tempPoint=new three.Vector3;function triIntersectPlane(tri,plane,targetEdge){const points=tri.points;let count=0;let startPointIntersection=-1;for(let i=0;i<3;i++){const{start,end}=edge;start.copy(points[i]);end.copy(points[(i+1)%3]);edge.delta(dir);const startIntersects=isNearZero(plane.distanceToPoint(start));if(isNearZero(plane.normal.dot(dir))&&startIntersects){targetEdge.copy(edge);count=2;break}const doesIntersect=plane.intersectLine(edge,tempPoint);if(!doesIntersect&&startIntersects){tempPoint.copy(start)}if((doesIntersect||startIntersects)&&!isNearZero(tempPoint.distanceTo(end))){if(count<=1){const point=count===1?targetEdge.start:targetEdge.end;point.copy(tempPoint);if(startIntersects){startPointIntersection=count}}else if(count>=2){const point=startPointIntersection===1?targetEdge.start:targetEdge.end;point.copy(tempPoint);count=2;break}count++;if(count===2&&startPointIntersection===-1){break}}}return count}return function intersectsTriangle(other,target=null,suppressLog=false){if(this.needsUpdate){this.update()}if(!other.isExtendedTriangle){saTri2.copy(other);saTri2.update();other=saTri2}else if(other.needsUpdate){other.update()}const plane1=this.plane;const plane2=other.plane;if(Math.abs(plane1.normal.dot(plane2.normal))>1-1e-10){const satBounds1=this.satBounds;const satAxes1=this.satAxes;arr2[0]=other.a;arr2[1]=other.b;arr2[2]=other.c;for(let i=0;i<4;i++){const sb=satBounds1[i];const sa=satAxes1[i];cachedSatBounds.setFromPoints(sa,arr2);if(sb.isSeparated(cachedSatBounds))return false}const satBounds2=other.satBounds;const satAxes2=other.satAxes;arr1[0]=this.a;arr1[1]=this.b;arr1[2]=this.c;for(let i=0;i<4;i++){const sb=satBounds2[i];const sa=satAxes2[i];cachedSatBounds.setFromPoints(sa,arr1);if(sb.isSeparated(cachedSatBounds))return false}for(let i=0;i<4;i++){const sa1=satAxes1[i];for(let i2=0;i2<4;i2++){const sa2=satAxes2[i2];cachedAxis.crossVectors(sa1,sa2);cachedSatBounds.setFromPoints(cachedAxis,arr1);cachedSatBounds2.setFromPoints(cachedAxis,arr2);if(cachedSatBounds.isSeparated(cachedSatBounds2))return false}}if(target){if(!suppressLog){console.warn("ExtendedTriangle.intersectsTriangle: Triangles are coplanar which does not support an output edge. Setting edge to 0, 0, 0.")}target.start.set(0,0,0);target.end.set(0,0,0)}return true}else{const count1=triIntersectPlane(this,plane2,edge1);if(count1===1&&other.containsPoint(edge1.end)){if(target){target.start.copy(edge1.end);target.end.copy(edge1.end)}return true}else if(count1!==2){return false}const count2=triIntersectPlane(other,plane1,edge2);if(count2===1&&this.containsPoint(edge2.end)){if(target){target.start.copy(edge2.end);target.end.copy(edge2.end)}return true}else if(count2!==2){return false}edge1.delta(dir1);edge2.delta(dir2);if(dir1.dot(dir2)<0){let tmp=edge2.start;edge2.start=edge2.end;edge2.end=tmp}const s1=edge1.start.dot(dir1);const e1=edge1.end.dot(dir1);const s2=edge2.start.dot(dir1);const e2=edge2.end.dot(dir1);const separated1=e1<s2;const separated2=s1<e2;if(s1!==e2&&s2!==e1&&separated1===separated2){return false}if(target){tempDir.subVectors(edge1.start,edge2.start);if(tempDir.dot(dir1)>0){target.start.copy(edge1.start)}else{target.start.copy(edge2.start)}tempDir.subVectors(edge1.end,edge2.end);if(tempDir.dot(dir1)<0){target.end.copy(edge1.end)}else{target.end.copy(edge2.end)}}return true}}}();ExtendedTriangle.prototype.distanceToPoint=function(){const target=new three.Vector3;return function distanceToPoint(point){this.closestPointToPoint(point,target);return point.distanceTo(target)}}();ExtendedTriangle.prototype.distanceToTriangle=function(){const point=new three.Vector3;const point2=new three.Vector3;const cornerFields=["a","b","c"];const line1=new three.Line3;const line2=new three.Line3;return function distanceToTriangle(other,target1=null,target2=null){const lineTarget=target1||target2?line1:null;if(this.intersectsTriangle(other,lineTarget)){if(target1||target2){if(target1)lineTarget.getCenter(target1);if(target2)lineTarget.getCenter(target2)}return 0}let closestDistanceSq=Infinity;for(let i=0;i<3;i++){let dist;const field=cornerFields[i];const otherVec=other[field];this.closestPointToPoint(otherVec,point);dist=otherVec.distanceToSquared(point);if(dist<closestDistanceSq){closestDistanceSq=dist;if(target1)target1.copy(point);if(target2)target2.copy(otherVec)}const thisVec=this[field];other.closestPointToPoint(thisVec,point);dist=thisVec.distanceToSquared(point);if(dist<closestDistanceSq){closestDistanceSq=dist;if(target1)target1.copy(thisVec);if(target2)target2.copy(point)}}for(let i=0;i<3;i++){const f11=cornerFields[i];const f12=cornerFields[(i+1)%3];line1.set(this[f11],this[f12]);for(let i2=0;i2<3;i2++){const f21=cornerFields[i2];const f22=cornerFields[(i2+1)%3];line2.set(other[f21],other[f22]);closestPointsSegmentToSegment(line1,line2,point,point2);const dist=point.distanceToSquared(point2);if(dist<closestDistanceSq){closestDistanceSq=dist;if(target1)target1.copy(point);if(target2)target2.copy(point2)}}}return Math.sqrt(closestDistanceSq)}}();class OrientedBox{constructor(min,max,matrix){this.isOrientedBox=true;this.min=new three.Vector3;this.max=new three.Vector3;this.matrix=new three.Matrix4;this.invMatrix=new three.Matrix4;this.points=new Array(8).fill().map(()=>new three.Vector3);this.satAxes=new Array(3).fill().map(()=>new three.Vector3);this.satBounds=new Array(3).fill().map(()=>new SeparatingAxisBounds);this.alignedSatBounds=new Array(3).fill().map(()=>new SeparatingAxisBounds);this.needsUpdate=false;if(min)this.min.copy(min);if(max)this.max.copy(max);if(matrix)this.matrix.copy(matrix)}set(min,max,matrix){this.min.copy(min);this.max.copy(max);this.matrix.copy(matrix);this.needsUpdate=true}copy(other){this.min.copy(other.min);this.max.copy(other.max);this.matrix.copy(other.matrix);this.needsUpdate=true}}OrientedBox.prototype.update=function(){return function update(){const matrix=this.matrix;const min=this.min;const max=this.max;const points=this.points;for(let x=0;x<=1;x++){for(let y=0;y<=1;y++){for(let z=0;z<=1;z++){const i=(1<<0)*x|(1<<1)*y|(1<<2)*z;const v=points[i];v.x=x?max.x:min.x;v.y=y?max.y:min.y;v.z=z?max.z:min.z;v.applyMatrix4(matrix)}}}const satBounds=this.satBounds;const satAxes=this.satAxes;const minVec=points[0];for(let i=0;i<3;i++){const axis=satAxes[i];const sb=satBounds[i];const index=1<<i;const pi=points[index];axis.subVectors(minVec,pi);sb.setFromPoints(axis,points)}const alignedSatBounds=this.alignedSatBounds;alignedSatBounds[0].setFromPointsField(points,"x");alignedSatBounds[1].setFromPointsField(points,"y");alignedSatBounds[2].setFromPointsField(points,"z");this.invMatrix.copy(this.matrix).invert();this.needsUpdate=false}}();OrientedBox.prototype.intersectsBox=function(){const aabbBounds=new SeparatingAxisBounds;return function intersectsBox(box){if(this.needsUpdate){this.update()}const min=box.min;const max=box.max;const satBounds=this.satBounds;const satAxes=this.satAxes;const alignedSatBounds=this.alignedSatBounds;aabbBounds.min=min.x;aabbBounds.max=max.x;if(alignedSatBounds[0].isSeparated(aabbBounds))return false;aabbBounds.min=min.y;aabbBounds.max=max.y;if(alignedSatBounds[1].isSeparated(aabbBounds))return false;aabbBounds.min=min.z;aabbBounds.max=max.z;if(alignedSatBounds[2].isSeparated(aabbBounds))return false;for(let i=0;i<3;i++){const axis=satAxes[i];const sb=satBounds[i];aabbBounds.setFromBox(axis,box);if(sb.isSeparated(aabbBounds))return false}return true}}();OrientedBox.prototype.intersectsTriangle=function(){const saTri=new ExtendedTriangle;const pointsArr=new Array(3);const cachedSatBounds=new SeparatingAxisBounds;const cachedSatBounds2=new SeparatingAxisBounds;const cachedAxis=new three.Vector3;return function intersectsTriangle(triangle){if(this.needsUpdate){this.update()}if(!triangle.isExtendedTriangle){saTri.copy(triangle);saTri.update();triangle=saTri}else if(triangle.needsUpdate){triangle.update()}const satBounds=this.satBounds;const satAxes=this.satAxes;pointsArr[0]=triangle.a;pointsArr[1]=triangle.b;pointsArr[2]=triangle.c;for(let i=0;i<3;i++){const sb=satBounds[i];const sa=satAxes[i];cachedSatBounds.setFromPoints(sa,pointsArr);if(sb.isSeparated(cachedSatBounds))return false}const triSatBounds=triangle.satBounds;const triSatAxes=triangle.satAxes;const points=this.points;for(let i=0;i<3;i++){const sb=triSatBounds[i];const sa=triSatAxes[i];cachedSatBounds.setFromPoints(sa,points);if(sb.isSeparated(cachedSatBounds))return false}for(let i=0;i<3;i++){const sa1=satAxes[i];for(let i2=0;i2<4;i2++){const sa2=triSatAxes[i2];cachedAxis.crossVectors(sa1,sa2);cachedSatBounds.setFromPoints(cachedAxis,pointsArr);cachedSatBounds2.setFromPoints(cachedAxis,points);if(cachedSatBounds.isSeparated(cachedSatBounds2))return false}}return true}}();OrientedBox.prototype.closestPointToPoint=function(){return function closestPointToPoint(point,target1){if(this.needsUpdate){this.update()}target1.copy(point).applyMatrix4(this.invMatrix).clamp(this.min,this.max).applyMatrix4(this.matrix);return target1}}();OrientedBox.prototype.distanceToPoint=function(){const target=new three.Vector3;return function distanceToPoint(point){this.closestPointToPoint(point,target);return point.distanceTo(target)}}();OrientedBox.prototype.distanceToBox=function(){const xyzFields=["x","y","z"];const segments1=new Array(12).fill().map(()=>new three.Line3);const segments2=new Array(12).fill().map(()=>new three.Line3);const point1=new three.Vector3;const point2=new three.Vector3;return function distanceToBox(box,threshold=0,target1=null,target2=null){if(this.needsUpdate){this.update()}if(this.intersectsBox(box)){if(target1||target2){box.getCenter(point2);this.closestPointToPoint(point2,point1);box.closestPointToPoint(point1,point2);if(target1)target1.copy(point1);if(target2)target2.copy(point2)}return 0}const threshold2=threshold*threshold;const min=box.min;const max=box.max;const points=this.points;let closestDistanceSq=Infinity;for(let i=0;i<8;i++){const p=points[i];point2.copy(p).clamp(min,max);const dist=p.distanceToSquared(point2);if(dist<closestDistanceSq){closestDistanceSq=dist;if(target1)target1.copy(p);if(target2)target2.copy(point2);if(dist<threshold2)return Math.sqrt(dist)}}let count=0;for(let i=0;i<3;i++){for(let i1=0;i1<=1;i1++){for(let i2=0;i2<=1;i2++){const nextIndex=(i+1)%3;const nextIndex2=(i+2)%3;const index=i1<<nextIndex|i2<<nextIndex2;const index2=1<<i|i1<<nextIndex|i2<<nextIndex2;const p1=points[index];const p2=points[index2];const line1=segments1[count];line1.set(p1,p2);const f1=xyzFields[i];const f2=xyzFields[nextIndex];const f3=xyzFields[nextIndex2];const line2=segments2[count];const start=line2.start;const end=line2.end;start[f1]=min[f1];start[f2]=i1?min[f2]:max[f2];start[f3]=i2?min[f3]:max[f2];end[f1]=max[f1];end[f2]=i1?min[f2]:max[f2];end[f3]=i2?min[f3]:max[f2];count++}}}for(let x=0;x<=1;x++){for(let y=0;y<=1;y++){for(let z=0;z<=1;z++){point2.x=x?max.x:min.x;point2.y=y?max.y:min.y;point2.z=z?max.z:min.z;this.closestPointToPoint(point2,point1);const dist=point2.distanceToSquared(point1);if(dist<closestDistanceSq){closestDistanceSq=dist;if(target1)target1.copy(point1);if(target2)target2.copy(point2);if(dist<threshold2)return Math.sqrt(dist)}}}}for(let i=0;i<12;i++){const l1=segments1[i];for(let i2=0;i2<12;i2++){const l2=segments2[i2];closestPointsSegmentToSegment(l1,l2,point1,point2);const dist=point1.distanceToSquared(point2);if(dist<closestDistanceSq){closestDistanceSq=dist;if(target1)target1.copy(point1);if(target2)target2.copy(point2);if(dist<threshold2)return Math.sqrt(dist)}}}return Math.sqrt(closestDistanceSq)}}();class PrimitivePool{constructor(getNewPrimitive){this._getNewPrimitive=getNewPrimitive;this._primitives=[]}getPrimitive(){const primitives=this._primitives;if(primitives.length===0){return this._getNewPrimitive()}else{return primitives.pop()}}releasePrimitive(primitive){this._primitives.push(primitive)}}class ExtendedTrianglePoolBase extends PrimitivePool{constructor(){super(()=>new ExtendedTriangle)}}const ExtendedTrianglePool=new ExtendedTrianglePoolBase;class _BufferStack{constructor(){this.float32Array=null;this.uint16Array=null;this.uint32Array=null;const stack=[];let prevBuffer=null;this.setBuffer=buffer=>{if(prevBuffer){stack.push(prevBuffer)}prevBuffer=buffer;this.float32Array=new Float32Array(buffer);this.uint16Array=new Uint16Array(buffer);this.uint32Array=new Uint32Array(buffer)};this.clearBuffer=()=>{prevBuffer=null;this.float32Array=null;this.uint16Array=null;this.uint32Array=null;if(stack.length!==0){this.setBuffer(stack.pop())}}}}const BufferStack=new _BufferStack;let _box1$1,_box2$1;const boxStack=[];const boxPool=new PrimitivePool(()=>new three.Box3);function shapecast(bvh,root,intersectsBounds,intersectsRange,boundsTraverseOrder,byteOffset){_box1$1=boxPool.getPrimitive();_box2$1=boxPool.getPrimitive();boxStack.push(_box1$1,_box2$1);BufferStack.setBuffer(bvh._roots[root]);const result=shapecastTraverse(0,bvh.geometry,intersectsBounds,intersectsRange,boundsTraverseOrder,byteOffset);BufferStack.clearBuffer();boxPool.releasePrimitive(_box1$1);boxPool.releasePrimitive(_box2$1);boxStack.pop();boxStack.pop();const length=boxStack.length;if(length>0){_box2$1=boxStack[length-1];_box1$1=boxStack[length-2]}return result}function shapecastTraverse(nodeIndex32,geometry,intersectsBoundsFunc,intersectsRangeFunc,nodeScoreFunc=null,nodeIndexByteOffset=0,depth=0){const{float32Array,uint16Array,uint32Array}=BufferStack;let nodeIndex16=nodeIndex32*2;const isLeaf=IS_LEAF(nodeIndex16,uint16Array);if(isLeaf){const offset=OFFSET(nodeIndex32,uint32Array);const count=COUNT(nodeIndex16,uint16Array);arrayToBox(BOUNDING_DATA_INDEX(nodeIndex32),float32Array,_box1$1);return intersectsRangeFunc(offset,count,false,depth,nodeIndexByteOffset+nodeIndex32,_box1$1)}else{const left=LEFT_NODE(nodeIndex32);const right=RIGHT_NODE(nodeIndex32,uint32Array);let c1=left;let c2=right;let score1,score2;let box1,box2;if(nodeScoreFunc){box1=_box1$1;box2=_box2$1;arrayToBox(BOUNDING_DATA_INDEX(c1),float32Array,box1);arrayToBox(BOUNDING_DATA_INDEX(c2),float32Array,box2);score1=nodeScoreFunc(box1);score2=nodeScoreFunc(box2);if(score2<score1){c1=right;c2=left;const temp=score1;score1=score2;score2=temp;box1=box2}}if(!box1){box1=_box1$1;arrayToBox(BOUNDING_DATA_INDEX(c1),float32Array,box1)}const isC1Leaf=IS_LEAF(c1*2,uint16Array);const c1Intersection=intersectsBoundsFunc(box1,isC1Leaf,score1,depth+1,nodeIndexByteOffset+c1);let c1StopTraversal;if(c1Intersection===CONTAINED){const offset=getLeftOffset(c1);const end=getRightEndOffset(c1);const count=end-offset;c1StopTraversal=intersectsRangeFunc(offset,count,true,depth+1,nodeIndexByteOffset+c1,box1)}else{c1StopTraversal=c1Intersection&&shapecastTraverse(c1,geometry,intersectsBoundsFunc,intersectsRangeFunc,nodeScoreFunc,nodeIndexByteOffset,depth+1)}if(c1StopTraversal)return true;box2=_box2$1;arrayToBox(BOUNDING_DATA_INDEX(c2),float32Array,box2);const isC2Leaf=IS_LEAF(c2*2,uint16Array);const c2Intersection=intersectsBoundsFunc(box2,isC2Leaf,score2,depth+1,nodeIndexByteOffset+c2);let c2StopTraversal;if(c2Intersection===CONTAINED){const offset=getLeftOffset(c2);const end=getRightEndOffset(c2);const count=end-offset;c2StopTraversal=intersectsRangeFunc(offset,count,true,depth+1,nodeIndexByteOffset+c2,box2)}else{c2StopTraversal=c2Intersection&&shapecastTraverse(c2,geometry,intersectsBoundsFunc,intersectsRangeFunc,nodeScoreFunc,nodeIndexByteOffset,depth+1)}if(c2StopTraversal)return true;return false;function getLeftOffset(nodeIndex32){const{uint16Array,uint32Array}=BufferStack;let nodeIndex16=nodeIndex32*2;while(!IS_LEAF(nodeIndex16,uint16Array)){nodeIndex32=LEFT_NODE(nodeIndex32);nodeIndex16=nodeIndex32*2}return OFFSET(nodeIndex32,uint32Array)}function getRightEndOffset(nodeIndex32){const{uint16Array,uint32Array}=BufferStack;let nodeIndex16=nodeIndex32*2;while(!IS_LEAF(nodeIndex16,uint16Array)){nodeIndex32=RIGHT_NODE(nodeIndex32,uint32Array);nodeIndex16=nodeIndex32*2}return OFFSET(nodeIndex32,uint32Array)+COUNT(nodeIndex16,uint16Array)}}}const temp=new three.Vector3;const temp1$2=new three.Vector3;function closestPointToPoint(bvh,point,target={},minThreshold=0,maxThreshold=Infinity){const minThresholdSq=minThreshold*minThreshold;const maxThresholdSq=maxThreshold*maxThreshold;let closestDistanceSq=Infinity;let closestDistanceTriIndex=null;bvh.shapecast({boundsTraverseOrder:box=>{temp.copy(point).clamp(box.min,box.max);return temp.distanceToSquared(point)},intersectsBounds:(box,isLeaf,score)=>{return score<closestDistanceSq&&score<maxThresholdSq},intersectsTriangle:(tri,triIndex)=>{tri.closestPointToPoint(point,temp);const distSq=point.distanceToSquared(temp);if(distSq<closestDistanceSq){temp1$2.copy(temp);closestDistanceSq=distSq;closestDistanceTriIndex=triIndex}if(distSq<minThresholdSq){return true}else{return false}}});if(closestDistanceSq===Infinity)return null;const closestDistance=Math.sqrt(closestDistanceSq);if(!target.point)target.point=temp1$2.clone();else target.point.copy(temp1$2);target.distance=closestDistance,target.faceIndex=closestDistanceTriIndex;return target}const _vA=new three.Vector3;const _vB=new three.Vector3;const _vC=new three.Vector3;const _uvA=new three.Vector2;const _uvB=new three.Vector2;const _uvC=new three.Vector2;const _normalA=new three.Vector3;const _normalB=new three.Vector3;const _normalC=new three.Vector3;const _intersectionPoint=new three.Vector3;function checkIntersection(ray,pA,pB,pC,point,side){let intersect;if(side===three.BackSide){intersect=ray.intersectTriangle(pC,pB,pA,true,point)}else{intersect=ray.intersectTriangle(pA,pB,pC,side!==three.DoubleSide,point)}if(intersect===null)return null;const distance=ray.origin.distanceTo(point);return{distance:distance,point:point.clone()}}function checkBufferGeometryIntersection(ray,position,normal,uv,uv1,a,b,c,side){_vA.fromBufferAttribute(position,a);_vB.fromBufferAttribute(position,b);_vC.fromBufferAttribute(position,c);const intersection=checkIntersection(ray,_vA,_vB,_vC,_intersectionPoint,side);if(intersection){if(uv){_uvA.fromBufferAttribute(uv,a);_uvB.fromBufferAttribute(uv,b);_uvC.fromBufferAttribute(uv,c);intersection.uv=three.Triangle.getInterpolation(_intersectionPoint,_vA,_vB,_vC,_uvA,_uvB,_uvC,new three.Vector2)}if(uv1){_uvA.fromBufferAttribute(uv1,a);_uvB.fromBufferAttribute(uv1,b);_uvC.fromBufferAttribute(uv1,c);intersection.uv1=three.Triangle.getInterpolation(_intersectionPoint,_vA,_vB,_vC,_uvA,_uvB,_uvC,new three.Vector2)}if(normal){_normalA.fromBufferAttribute(normal,a);_normalB.fromBufferAttribute(normal,b);_normalC.fromBufferAttribute(normal,c);intersection.normal=three.Triangle.getInterpolation(_intersectionPoint,_vA,_vB,_vC,_normalA,_normalB,_normalC,new three.Vector3);if(intersection.normal.dot(ray.direction)>0){intersection.normal.multiplyScalar(-1)}}const face={a:a,b:b,c:c,normal:new three.Vector3,materialIndex:0};three.Triangle.getNormal(_vA,_vB,_vC,face.normal);intersection.face=face;intersection.faceIndex=a}return intersection}function intersectTri(geo,side,ray,tri,intersections){const triOffset=tri*3;let a=triOffset+0;let b=triOffset+1;let c=triOffset+2;const index=geo.index;if(geo.index){a=index.getX(a);b=index.getX(b);c=index.getX(c)}const{position,normal,uv,uv1}=geo.attributes;const intersection=checkBufferGeometryIntersection(ray,position,normal,uv,uv1,a,b,c,side);if(intersection){intersection.faceIndex=tri;if(intersections)intersections.push(intersection);return intersection}return null}function setTriangle(tri,i,index,pos){const ta=tri.a;const tb=tri.b;const tc=tri.c;let i0=i;let i1=i+1;let i2=i+2;if(index){i0=index.getX(i0);i1=index.getX(i1);i2=index.getX(i2)}ta.x=pos.getX(i0);ta.y=pos.getY(i0);ta.z=pos.getZ(i0);tb.x=pos.getX(i1);tb.y=pos.getY(i1);tb.z=pos.getZ(i1);tc.x=pos.getX(i2);tc.y=pos.getY(i2);tc.z=pos.getZ(i2)}const tempV1=new three.Vector3;const tempV2=new three.Vector3;const tempV3=new three.Vector3;const tempUV1=new three.Vector2;const tempUV2=new three.Vector2;const tempUV3=new three.Vector2;function getTriangleHitPointInfo(point,geometry,triangleIndex,target){const indices=geometry.getIndex().array;const positions=geometry.getAttribute("position");const uvs=geometry.getAttribute("uv");const a=indices[triangleIndex*3];const b=indices[triangleIndex*3+1];const c=indices[triangleIndex*3+2];tempV1.fromBufferAttribute(positions,a);tempV2.fromBufferAttribute(positions,b);tempV3.fromBufferAttribute(positions,c);let materialIndex=0;const groups=geometry.groups;const firstVertexIndex=triangleIndex*3;for(let i=0,l=groups.length;i<l;i++){const group=groups[i];const{start,count}=group;if(firstVertexIndex>=start&&firstVertexIndex<start+count){materialIndex=group.materialIndex;break}}let uv=null;if(uvs){tempUV1.fromBufferAttribute(uvs,a);tempUV2.fromBufferAttribute(uvs,b);tempUV3.fromBufferAttribute(uvs,c);if(target&&target.uv)uv=target.uv;else uv=new three.Vector2;three.Triangle.getInterpolation(point,tempV1,tempV2,tempV3,tempUV1,tempUV2,tempUV3,uv)}if(target){if(!target.face)target.face={};target.face.a=a;target.face.b=b;target.face.c=c;target.face.materialIndex=materialIndex;if(!target.face.normal)target.face.normal=new three.Vector3;three.Triangle.getNormal(tempV1,tempV2,tempV3,target.face.normal);if(uv)target.uv=uv;return target}else{return{face:{a:a,b:b,c:c,materialIndex:materialIndex,normal:three.Triangle.getNormal(tempV1,tempV2,tempV3,new three.Vector3)},uv:uv}}}function intersectTris(bvh,side,ray,offset,count,intersections){const{geometry,_indirectBuffer}=bvh;for(let i=offset,end=offset+count;i<end;i++){intersectTri(geometry,side,ray,i,intersections)}}function intersectClosestTri(bvh,side,ray,offset,count){const{geometry,_indirectBuffer}=bvh;let dist=Infinity;let res=null;for(let i=offset,end=offset+count;i<end;i++){let intersection;intersection=intersectTri(geometry,side,ray,i);if(intersection&&intersection.distance<dist){res=intersection;dist=intersection.distance}}return res}function iterateOverTriangles(offset,count,bvh,intersectsTriangleFunc,contained,depth,triangle){const{geometry}=bvh;const{index}=geometry;const pos=geometry.attributes.position;for(let i=offset,l=count+offset;i<l;i++){let tri;tri=i;setTriangle(triangle,tri*3,index,pos);triangle.needsUpdate=true;if(intersectsTriangleFunc(triangle,tri,contained,depth)){return true}}return false}function refit(bvh,nodeIndices=null){if(nodeIndices&&Array.isArray(nodeIndices)){nodeIndices=new Set(nodeIndices)}const geometry=bvh.geometry;const indexArr=geometry.index?geometry.index.array:null;const posAttr=geometry.attributes.position;let buffer,uint32Array,uint16Array,float32Array;let byteOffset=0;const roots=bvh._roots;for(let i=0,l=roots.length;i<l;i++){buffer=roots[i];uint32Array=new Uint32Array(buffer);uint16Array=new Uint16Array(buffer);float32Array=new Float32Array(buffer);_traverse(0,byteOffset);byteOffset+=buffer.byteLength}function _traverse(node32Index,byteOffset,force=false){const node16Index=node32Index*2;const isLeaf=uint16Array[node16Index+15]===IS_LEAFNODE_FLAG;if(isLeaf){const offset=uint32Array[node32Index+6];const count=uint16Array[node16Index+14];let minx=Infinity;let miny=Infinity;let minz=Infinity;let maxx=-Infinity;let maxy=-Infinity;let maxz=-Infinity;for(let i=3*offset,l=3*(offset+count);i<l;i++){let index=indexArr[i];const x=posAttr.getX(index);const y=posAttr.getY(index);const z=posAttr.getZ(index);if(x<minx)minx=x;if(x>maxx)maxx=x;if(y<miny)miny=y;if(y>maxy)maxy=y;if(z<minz)minz=z;if(z>maxz)maxz=z}if(float32Array[node32Index+0]!==minx||float32Array[node32Index+1]!==miny||float32Array[node32Index+2]!==minz||float32Array[node32Index+3]!==maxx||float32Array[node32Index+4]!==maxy||float32Array[node32Index+5]!==maxz){float32Array[node32Index+0]=minx;float32Array[node32Index+1]=miny;float32Array[node32Index+2]=minz;float32Array[node32Index+3]=maxx;float32Array[node32Index+4]=maxy;float32Array[node32Index+5]=maxz;return true}else{return false}}else{const left=node32Index+8;const right=uint32Array[node32Index+6];const offsetLeft=left+byteOffset;const offsetRight=right+byteOffset;let forceChildren=force;let includesLeft=false;let includesRight=false;if(nodeIndices){if(!forceChildren){includesLeft=nodeIndices.has(offsetLeft);includesRight=nodeIndices.has(offsetRight);forceChildren=!includesLeft&&!includesRight}}else{includesLeft=true;includesRight=true}const traverseLeft=forceChildren||includesLeft;const traverseRight=forceChildren||includesRight;let leftChange=false;if(traverseLeft){leftChange=_traverse(left,byteOffset,forceChildren)}let rightChange=false;if(traverseRight){rightChange=_traverse(right,byteOffset,forceChildren)}const didChange=leftChange||rightChange;if(didChange){for(let i=0;i<3;i++){const lefti=left+i;const righti=right+i;const minLeftValue=float32Array[lefti];const maxLeftValue=float32Array[lefti+3];const minRightValue=float32Array[righti];const maxRightValue=float32Array[righti+3];float32Array[node32Index+i]=minLeftValue<minRightValue?minLeftValue:minRightValue;float32Array[node32Index+i+3]=maxLeftValue>maxRightValue?maxLeftValue:maxRightValue}}return didChange}}}function intersectRay(nodeIndex32,array,ray){let tmin,tmax,tymin,tymax,tzmin,tzmax;const invdirx=1/ray.direction.x,invdiry=1/ray.direction.y,invdirz=1/ray.direction.z;const ox=ray.origin.x;const oy=ray.origin.y;const oz=ray.origin.z;let minx=array[nodeIndex32];let maxx=array[nodeIndex32+3];let miny=array[nodeIndex32+1];let maxy=array[nodeIndex32+3+1];let minz=array[nodeIndex32+2];let maxz=array[nodeIndex32+3+2];if(invdirx>=0){tmin=(minx-ox)*invdirx;tmax=(maxx-ox)*invdirx}else{tmin=(maxx-ox)*invdirx;tmax=(minx-ox)*invdirx}if(invdiry>=0){tymin=(miny-oy)*invdiry;tymax=(maxy-oy)*invdiry}else{tymin=(maxy-oy)*invdiry;tymax=(miny-oy)*invdiry}if(tmin>tymax||tymin>tmax)return false;if(tymin>tmin||isNaN(tmin))tmin=tymin;if(tymax<tmax||isNaN(tmax))tmax=tymax;if(invdirz>=0){tzmin=(minz-oz)*invdirz;tzmax=(maxz-oz)*invdirz}else{tzmin=(maxz-oz)*invdirz;tzmax=(minz-oz)*invdirz}if(tmin>tzmax||tzmin>tmax)return false;if(tzmax<tmax||tmax!==tmax)tmax=tzmax;if(tmax<0)return false;return true}function intersectTris_indirect(bvh,side,ray,offset,count,intersections){const{geometry,_indirectBuffer}=bvh;for(let i=offset,end=offset+count;i<end;i++){let vi=_indirectBuffer?_indirectBuffer[i]:i;intersectTri(geometry,side,ray,vi,intersections)}}function intersectClosestTri_indirect(bvh,side,ray,offset,count){const{geometry,_indirectBuffer}=bvh;let dist=Infinity;let res=null;for(let i=offset,end=offset+count;i<end;i++){let intersection;intersection=intersectTri(geometry,side,ray,_indirectBuffer?_indirectBuffer[i]:i);if(intersection&&intersection.distance<dist){res=intersection;dist=intersection.distance}}return res}function iterateOverTriangles_indirect(offset,count,bvh,intersectsTriangleFunc,contained,depth,triangle){const{geometry}=bvh;const{index}=geometry;const pos=geometry.attributes.position;for(let i=offset,l=count+offset;i<l;i++){let tri;tri=bvh.resolveTriangleIndex(i);setTriangle(triangle,tri*3,index,pos);triangle.needsUpdate=true;if(intersectsTriangleFunc(triangle,tri,contained,depth)){return true}}return false}function raycast(bvh,root,side,ray,intersects){BufferStack.setBuffer(bvh._roots[root]);_raycast$1(0,bvh,side,ray,intersects);BufferStack.clearBuffer()}function _raycast$1(nodeIndex32,bvh,side,ray,intersects){const{float32Array,uint16Array,uint32Array}=BufferStack;const nodeIndex16=nodeIndex32*2;const isLeaf=IS_LEAF(nodeIndex16,uint16Array);if(isLeaf){const offset=OFFSET(nodeIndex32,uint32Array);const count=COUNT(nodeIndex16,uint16Array);intersectTris(bvh,side,ray,offset,count,intersects)}else{const leftIndex=LEFT_NODE(nodeIndex32);if(intersectRay(leftIndex,float32Array,ray)){_raycast$1(leftIndex,bvh,side,ray,intersects)}const rightIndex=RIGHT_NODE(nodeIndex32,uint32Array);if(intersectRay(rightIndex,float32Array,ray)){_raycast$1(rightIndex,bvh,side,ray,intersects)}}}const _xyzFields$1=["x","y","z"];function raycastFirst(bvh,root,side,ray){BufferStack.setBuffer(bvh._roots[root]);const result=_raycastFirst$1(0,bvh,side,ray);BufferStack.clearBuffer();return result}function _raycastFirst$1(nodeIndex32,bvh,side,ray){const{float32Array,uint16Array,uint32Array}=BufferStack;let nodeIndex16=nodeIndex32*2;const isLeaf=IS_LEAF(nodeIndex16,uint16Array);if(isLeaf){const offset=OFFSET(nodeIndex32,uint32Array);const count=COUNT(nodeIndex16,uint16Array);return intersectClosestTri(bvh,side,ray,offset,count)}else{const splitAxis=SPLIT_AXIS(nodeIndex32,uint32Array);const xyzAxis=_xyzFields$1[splitAxis];const rayDir=ray.direction[xyzAxis];const leftToRight=rayDir>=0;let c1,c2;if(leftToRight){c1=LEFT_NODE(nodeIndex32);c2=RIGHT_NODE(nodeIndex32,uint32Array)}else{c1=RIGHT_NODE(nodeIndex32,uint32Array);c2=LEFT_NODE(nodeIndex32)}const c1Intersection=intersectRay(c1,float32Array,ray);const c1Result=c1Intersection?_raycastFirst$1(c1,bvh,side,ray):null;if(c1Result){const point=c1Result.point[xyzAxis];const isOutside=leftToRight?point<=float32Array[c2+splitAxis]:point>=float32Array[c2+splitAxis+3];if(isOutside){return c1Result}}const c2Intersection=intersectRay(c2,float32Array,ray);const c2Result=c2Intersection?_raycastFirst$1(c2,bvh,side,ray):null;if(c1Result&&c2Result){return c1Result.distance<=c2Result.distance?c1Result:c2Result}else{return c1Result||c2Result||null}}}const boundingBox$2=new three.Box3;const triangle$1=new ExtendedTriangle;const triangle2$1=new ExtendedTriangle;const invertedMat$1=new three.Matrix4;const obb$4=new OrientedBox;const obb2$3=new OrientedBox;function intersectsGeometry(bvh,root,otherGeometry,geometryToBvh){BufferStack.setBuffer(bvh._roots[root]);const result=_intersectsGeometry$1(0,bvh,otherGeometry,geometryToBvh);BufferStack.clearBuffer();return result}function _intersectsGeometry$1(nodeIndex32,bvh,otherGeometry,geometryToBvh,cachedObb=null){const{float32Array,uint16Array,uint32Array}=BufferStack;let nodeIndex16=nodeIndex32*2;if(cachedObb===null){if(!otherGeometry.boundingBox){otherGeometry.computeBoundingBox()}obb$4.set(otherGeometry.boundingBox.min,otherGeometry.boundingBox.max,geometryToBvh);cachedObb=obb$4}const isLeaf=IS_LEAF(nodeIndex16,uint16Array);if(isLeaf){const thisGeometry=bvh.geometry;const thisIndex=thisGeometry.index;const thisPos=thisGeometry.attributes.position;const index=otherGeometry.index;const pos=otherGeometry.attributes.position;const offset=OFFSET(nodeIndex32,uint32Array);const count=COUNT(nodeIndex16,uint16Array);invertedMat$1.copy(geometryToBvh).invert();if(otherGeometry.boundsTree){arrayToBox(BOUNDING_DATA_INDEX(nodeIndex32),float32Array,obb2$3);obb2$3.matrix.copy(invertedMat$1);obb2$3.needsUpdate=true;const res=otherGeometry.boundsTree.shapecast({intersectsBounds:box=>obb2$3.intersectsBox(box),intersectsTriangle:tri=>{tri.a.applyMatrix4(geometryToBvh);tri.b.applyMatrix4(geometryToBvh);tri.c.applyMatrix4(geometryToBvh);tri.needsUpdate=true;for(let i=offset*3,l=(count+offset)*3;i<l;i+=3){setTriangle(triangle2$1,i,thisIndex,thisPos);triangle2$1.needsUpdate=true;if(tri.intersectsTriangle(triangle2$1)){return true}}return false}});return res}else{for(let i=offset*3,l=(count+offset)*3;i<l;i+=3){setTriangle(triangle$1,i,thisIndex,thisPos);triangle$1.a.applyMatrix4(invertedMat$1);triangle$1.b.applyMatrix4(invertedMat$1);triangle$1.c.applyMatrix4(invertedMat$1);triangle$1.needsUpdate=true;for(let i2=0,l2=index.count;i2<l2;i2+=3){setTriangle(triangle2$1,i2,index,pos);triangle2$1.needsUpdate=true;if(triangle$1.intersectsTriangle(triangle2$1)){return true}}}}}else{const left=nodeIndex32+8;const right=uint32Array[nodeIndex32+6];arrayToBox(BOUNDING_DATA_INDEX(left),float32Array,boundingBox$2);const leftIntersection=cachedObb.intersectsBox(boundingBox$2)&&_intersectsGeometry$1(left,bvh,otherGeometry,geometryToBvh,cachedObb);if(leftIntersection)return true;arrayToBox(BOUNDING_DATA_INDEX(right),float32Array,boundingBox$2);const rightIntersection=cachedObb.intersectsBox(boundingBox$2)&&_intersectsGeometry$1(right,bvh,otherGeometry,geometryToBvh,cachedObb);if(rightIntersection)return true;return false}}const tempMatrix$1=new three.Matrix4;const obb$3=new OrientedBox;const obb2$2=new OrientedBox;const temp1$1=new three.Vector3;const temp2$1=new three.Vector3;const temp3$1=new three.Vector3;const temp4$1=new three.Vector3;function closestPointToGeometry(bvh,otherGeometry,geometryToBvh,target1={},target2={},minThreshold=0,maxThreshold=Infinity){if(!otherGeometry.boundingBox){otherGeometry.computeBoundingBox()}obb$3.set(otherGeometry.boundingBox.min,otherGeometry.boundingBox.max,geometryToBvh);obb$3.needsUpdate=true;const geometry=bvh.geometry;const pos=geometry.attributes.position;const index=geometry.index;const otherPos=otherGeometry.attributes.position;const otherIndex=otherGeometry.index;const triangle=ExtendedTrianglePool.getPrimitive();const triangle2=ExtendedTrianglePool.getPrimitive();let tempTarget1=temp1$1;let tempTargetDest1=temp2$1;let tempTarget2=null;let tempTargetDest2=null;if(target2){tempTarget2=temp3$1;tempTargetDest2=temp4$1}let closestDistance=Infinity;let closestDistanceTriIndex=null;let closestDistanceOtherTriIndex=null;tempMatrix$1.copy(geometryToBvh).invert();obb2$2.matrix.copy(tempMatrix$1);bvh.shapecast({boundsTraverseOrder:box=>{return obb$3.distanceToBox(box)},intersectsBounds:(box,isLeaf,score)=>{if(score<closestDistance&&score<maxThreshold){if(isLeaf){obb2$2.min.copy(box.min);obb2$2.max.copy(box.max);obb2$2.needsUpdate=true}return true}return false},intersectsRange:(offset,count)=>{if(otherGeometry.boundsTree){const otherBvh=otherGeometry.boundsTree;return otherBvh.shapecast({boundsTraverseOrder:box=>{return obb2$2.distanceToBox(box)},intersectsBounds:(box,isLeaf,score)=>{return score<closestDistance&&score<maxThreshold},intersectsRange:(otherOffset,otherCount)=>{for(let i2=otherOffset,l2=otherOffset+otherCount;i2<l2;i2++){setTriangle(triangle2,3*i2,otherIndex,otherPos);triangle2.a.applyMatrix4(geometryToBvh);triangle2.b.applyMatrix4(geometryToBvh);triangle2.c.applyMatrix4(geometryToBvh);triangle2.needsUpdate=true;for(let i=offset,l=offset+count;i<l;i++){setTriangle(triangle,3*i,index,pos);triangle.needsUpdate=true;const dist=triangle.distanceToTriangle(triangle2,tempTarget1,tempTarget2);if(dist<closestDistance){tempTargetDest1.copy(tempTarget1);if(tempTargetDest2){tempTargetDest2.copy(tempTarget2)}closestDistance=dist;closestDistanceTriIndex=i;closestDistanceOtherTriIndex=i2}if(dist<minThreshold){return true}}}}})}else{const triCount=getTriCount(otherGeometry);for(let i2=0,l2=triCount;i2<l2;i2++){setTriangle(triangle2,3*i2,otherIndex,otherPos);triangle2.a.applyMatrix4(geometryToBvh);triangle2.b.applyMatrix4(geometryToBvh);triangle2.c.applyMatrix4(geometryToBvh);triangle2.needsUpdate=true;for(let i=offset,l=offset+count;i<l;i++){setTriangle(triangle,3*i,index,pos);triangle.needsUpdate=true;const dist=triangle.distanceToTriangle(triangle2,tempTarget1,tempTarget2);if(dist<closestDistance){tempTargetDest1.copy(tempTarget1);if(tempTargetDest2){tempTargetDest2.copy(tempTarget2)}closestDistance=dist;closestDistanceTriIndex=i;closestDistanceOtherTriIndex=i2}if(dist<minThreshold){return true}}}}}});ExtendedTrianglePool.releasePrimitive(triangle);ExtendedTrianglePool.releasePrimitive(triangle2);if(closestDistance===Infinity){return null}if(!target1.point){target1.point=tempTargetDest1.clone()}else{target1.point.copy(tempTargetDest1)}target1.distance=closestDistance,target1.faceIndex=closestDistanceTriIndex;if(target2){if(!target2.point)target2.point=tempTargetDest2.clone();else target2.point.copy(tempTargetDest2);target2.point.applyMatrix4(tempMatrix$1);tempTargetDest1.applyMatrix4(tempMatrix$1);target2.distance=tempTargetDest1.sub(target2.point).length();target2.faceIndex=closestDistanceOtherTriIndex}return target1}function refit_indirect(bvh,nodeIndices=null){if(nodeIndices&&Array.isArray(nodeIndices)){nodeIndices=new Set(nodeIndices)}const geometry=bvh.geometry;const indexArr=geometry.index?geometry.index.array:null;const posAttr=geometry.attributes.position;let buffer,uint32Array,uint16Array,float32Array;let byteOffset=0;const roots=bvh._roots;for(let i=0,l=roots.length;i<l;i++){buffer=roots[i];uint32Array=new Uint32Array(buffer);uint16Array=new Uint16Array(buffer);float32Array=new Float32Array(buffer);_traverse(0,byteOffset);byteOffset+=buffer.byteLength}function _traverse(node32Index,byteOffset,force=false){const node16Index=node32Index*2;const isLeaf=uint16Array[node16Index+15]===IS_LEAFNODE_FLAG;if(isLeaf){const offset=uint32Array[node32Index+6];const count=uint16Array[node16Index+14];let minx=Infinity;let miny=Infinity;let minz=Infinity;let maxx=-Infinity;let maxy=-Infinity;let maxz=-Infinity;for(let i=offset,l=offset+count;i<l;i++){const t=3*bvh.resolveTriangleIndex(i);for(let j=0;j<3;j++){let index=t+j;index=indexArr?indexArr[index]:index;const x=posAttr.getX(index);const y=posAttr.getY(index);const z=posAttr.getZ(index);if(x<minx)minx=x;if(x>maxx)maxx=x;if(y<miny)miny=y;if(y>maxy)maxy=y;if(z<minz)minz=z;if(z>maxz)maxz=z}}if(float32Array[node32Index+0]!==minx||float32Array[node32Index+1]!==miny||float32Array[node32Index+2]!==minz||float32Array[node32Index+3]!==maxx||float32Array[node32Index+4]!==maxy||float32Array[node32Index+5]!==maxz){float32Array[node32Index+0]=minx;float32Array[node32Index+1]=miny;float32Array[node32Index+2]=minz;float32Array[node32Index+3]=maxx;float32Array[node32Index+4]=maxy;float32Array[node32Index+5]=maxz;return true}else{return false}}else{const left=node32Index+8;const right=uint32Array[node32Index+6];const offsetLeft=left+byteOffset;const offsetRight=right+byteOffset;let forceChildren=force;let includesLeft=false;let includesRight=false;if(nodeIndices){if(!forceChildren){includesLeft=nodeIndices.has(offsetLeft);includesRight=nodeIndices.has(offsetRight);forceChildren=!includesLeft&&!includesRight}}else{includesLeft=true;includesRight=true}const traverseLeft=forceChildren||includesLeft;const traverseRight=forceChildren||includesRight;let leftChange=false;if(traverseLeft){leftChange=_traverse(left,byteOffset,forceChildren)}let rightChange=false;if(traverseRight){rightChange=_traverse(right,byteOffset,forceChildren)}const didChange=leftChange||rightChange;if(didChange){for(let i=0;i<3;i++){const lefti=left+i;const righti=right+i;const minLeftValue=float32Array[lefti];const maxLeftValue=float32Array[lefti+3];const minRightValue=float32Array[righti];const maxRightValue=float32Array[righti+3];float32Array[node32Index+i]=minLeftValue<minRightValue?minLeftValue:minRightValue;float32Array[node32Index+i+3]=maxLeftValue>maxRightValue?maxLeftValue:maxRightValue}}return didChange}}}function raycast_indirect(bvh,root,side,ray,intersects){BufferStack.setBuffer(bvh._roots[root]);_raycast(0,bvh,side,ray,intersects);BufferStack.clearBuffer()}function _raycast(nodeIndex32,bvh,side,ray,intersects){const{float32Array,uint16Array,uint32Array}=BufferStack;const nodeIndex16=nodeIndex32*2;const isLeaf=IS_LEAF(nodeIndex16,uint16Array);if(isLeaf){const offset=OFFSET(nodeIndex32,uint32Array);const count=COUNT(nodeIndex16,uint16Array);intersectTris_indirect(bvh,side,ray,offset,count,intersects)}else{const leftIndex=LEFT_NODE(nodeIndex32);if(intersectRay(leftIndex,float32Array,ray)){_raycast(leftIndex,bvh,side,ray,intersects)}const rightIndex=RIGHT_NODE(nodeIndex32,uint32Array);if(intersectRay(rightIndex,float32Array,ray)){_raycast(rightIndex,bvh,side,ray,intersects)}}}const _xyzFields=["x","y","z"];function raycastFirst_indirect(bvh,root,side,ray){BufferStack.setBuffer(bvh._roots[root]);const result=_raycastFirst(0,bvh,side,ray);BufferStack.clearBuffer();return result}function _raycastFirst(nodeIndex32,bvh,side,ray){const{float32Array,uint16Array,uint32Array}=BufferStack;let nodeIndex16=nodeIndex32*2;const isLeaf=IS_LEAF(nodeIndex16,uint16Array);if(isLeaf){const offset=OFFSET(nodeIndex32,uint32Array);const count=COUNT(nodeIndex16,uint16Array);return intersectClosestTri_indirect(bvh,side,ray,offset,count)}else{const splitAxis=SPLIT_AXIS(nodeIndex32,uint32Array);const xyzAxis=_xyzFields[splitAxis];const rayDir=ray.direction[xyzAxis];const leftToRight=rayDir>=0;let c1,c2;if(leftToRight){c1=LEFT_NODE(nodeIndex32);c2=RIGHT_NODE(nodeIndex32,uint32Array)}else{c1=RIGHT_NODE(nodeIndex32,uint32Array);c2=LEFT_NODE(nodeIndex32)}const c1Intersection=intersectRay(c1,float32Array,ray);const c1Result=c1Intersection?_raycastFirst(c1,bvh,side,ray):null;if(c1Result){const point=c1Result.point[xyzAxis];const isOutside=leftToRight?point<=float32Array[c2+splitAxis]:point>=float32Array[c2+splitAxis+3];if(isOutside){return c1Result}}const c2Intersection=intersectRay(c2,float32Array,ray);const c2Result=c2Intersection?_raycastFirst(c2,bvh,side,ray):null;if(c1Result&&c2Result){return c1Result.distance<=c2Result.distance?c1Result:c2Result}else{return c1Result||c2Result||null}}}const boundingBox$1=new three.Box3;const triangle=new ExtendedTriangle;const triangle2=new ExtendedTriangle;const invertedMat=new three.Matrix4;const obb$2=new OrientedBox;const obb2$1=new OrientedBox;function intersectsGeometry_indirect(bvh,root,otherGeometry,geometryToBvh){BufferStack.setBuffer(bvh._roots[root]);const result=_intersectsGeometry(0,bvh,otherGeometry,geometryToBvh);BufferStack.clearBuffer();return result}function _intersectsGeometry(nodeIndex32,bvh,otherGeometry,geometryToBvh,cachedObb=null){const{float32Array,uint16Array,uint32Array}=BufferStack;let nodeIndex16=nodeIndex32*2;if(cachedObb===null){if(!otherGeometry.boundingBox){otherGeometry.computeBoundingBox()}obb$2.set(otherGeometry.boundingBox.min,otherGeometry.boundingBox.max,geometryToBvh);cachedObb=obb$2}const isLeaf=IS_LEAF(nodeIndex16,uint16Array);if(isLeaf){const thisGeometry=bvh.geometry;const thisIndex=thisGeometry.index;const thisPos=thisGeometry.attributes.position;const index=otherGeometry.index;const pos=otherGeometry.attributes.position;const offset=OFFSET(nodeIndex32,uint32Array);const count=COUNT(nodeIndex16,uint16Array);invertedMat.copy(geometryToBvh).invert();if(otherGeometry.boundsTree){arrayToBox(BOUNDING_DATA_INDEX(nodeIndex32),float32Array,obb2$1);obb2$1.matrix.copy(invertedMat);obb2$1.needsUpdate=true;const res=otherGeometry.boundsTree.shapecast({intersectsBounds:box=>obb2$1.intersectsBox(box),intersectsTriangle:tri=>{tri.a.applyMatrix4(geometryToBvh);tri.b.applyMatrix4(geometryToBvh);tri.c.applyMatrix4(geometryToBvh);tri.needsUpdate=true;for(let i=offset,l=count+offset;i<l;i++){setTriangle(triangle2,3*bvh.resolveTriangleIndex(i),thisIndex,thisPos);triangle2.needsUpdate=true;if(tri.intersectsTriangle(triangle2)){return true}}return false}});return res}else{for(let i=offset,l=count+offset;i<l;i++){const ti=bvh.resolveTriangleIndex(i);setTriangle(triangle,3*ti,thisIndex,thisPos);triangle.a.applyMatrix4(invertedMat);triangle.b.applyMatrix4(invertedMat);triangle.c.applyMatrix4(invertedMat);triangle.needsUpdate=true;for(let i2=0,l2=index.count;i2<l2;i2+=3){setTriangle(triangle2,i2,index,pos);triangle2.needsUpdate=true;if(triangle.intersectsTriangle(triangle2)){return true}}}}}else{const left=nodeIndex32+8;const right=uint32Array[nodeIndex32+6];arrayToBox(BOUNDING_DATA_INDEX(left),float32Array,boundingBox$1);const leftIntersection=cachedObb.intersectsBox(boundingBox$1)&&_intersectsGeometry(left,bvh,otherGeometry,geometryToBvh,cachedObb);if(leftIntersection)return true;arrayToBox(BOUNDING_DATA_INDEX(right),float32Array,boundingBox$1);const rightIntersection=cachedObb.intersectsBox(boundingBox$1)&&_intersectsGeometry(right,bvh,otherGeometry,geometryToBvh,cachedObb);if(rightIntersection)return true;return false}}const tempMatrix=new three.Matrix4;const obb$1=new OrientedBox;const obb2=new OrientedBox;const temp1=new three.Vector3;const temp2=new three.Vector3;const temp3=new three.Vector3;const temp4=new three.Vector3;function closestPointToGeometry_indirect(bvh,otherGeometry,geometryToBvh,target1={},target2={},minThreshold=0,maxThreshold=Infinity){if(!otherGeometry.boundingBox){otherGeometry.computeBoundingBox()}obb$1.set(otherGeometry.boundingBox.min,otherGeometry.boundingBox.max,geometryToBvh);obb$1.needsUpdate=true;const geometry=bvh.geometry;const pos=geometry.attributes.position;const index=geometry.index;const otherPos=otherGeometry.attributes.position;const otherIndex=otherGeometry.index;const triangle=ExtendedTrianglePool.getPrimitive();const triangle2=ExtendedTrianglePool.getPrimitive();let tempTarget1=temp1;let tempTargetDest1=temp2;let tempTarget2=null;let tempTargetDest2=null;if(target2){tempTarget2=temp3;tempTargetDest2=temp4}let closestDistance=Infinity;let closestDistanceTriIndex=null;let closestDistanceOtherTriIndex=null;tempMatrix.copy(geometryToBvh).invert();obb2.matrix.copy(tempMatrix);bvh.shapecast({boundsTraverseOrder:box=>{return obb$1.distanceToBox(box)},intersectsBounds:(box,isLeaf,score)=>{if(score<closestDistance&&score<maxThreshold){if(isLeaf){obb2.min.copy(box.min);obb2.max.copy(box.max);obb2.needsUpdate=true}return true}return false},intersectsRange:(offset,count)=>{if(otherGeometry.boundsTree){const otherBvh=otherGeometry.boundsTree;return otherBvh.shapecast({boundsTraverseOrder:box=>{return obb2.distanceToBox(box)},intersectsBounds:(box,isLeaf,score)=>{return score<closestDistance&&score<maxThreshold},intersectsRange:(otherOffset,otherCount)=>{for(let i2=otherOffset,l2=otherOffset+otherCount;i2<l2;i2++){const ti2=otherBvh.resolveTriangleIndex(i2);setTriangle(triangle2,3*ti2,otherIndex,otherPos);triangle2.a.applyMatrix4(geometryToBvh);triangle2.b.applyMatrix4(geometryToBvh);triangle2.c.applyMatrix4(geometryToBvh);triangle2.needsUpdate=true;for(let i=offset,l=offset+count;i<l;i++){const ti=bvh.resolveTriangleIndex(i);setTriangle(triangle,3*ti,index,pos);triangle.needsUpdate=true;const dist=triangle.distanceToTriangle(triangle2,tempTarget1,tempTarget2);if(dist<closestDistance){tempTargetDest1.copy(tempTarget1);if(tempTargetDest2){tempTargetDest2.copy(tempTarget2)}closestDistance=dist;closestDistanceTriIndex=i;closestDistanceOtherTriIndex=i2}if(dist<minThreshold){return true}}}}})}else{const triCount=getTriCount(otherGeometry);for(let i2=0,l2=triCount;i2<l2;i2++){setTriangle(triangle2,3*i2,otherIndex,otherPos);triangle2.a.applyMatrix4(geometryToBvh);triangle2.b.applyMatrix4(geometryToBvh);triangle2.c.applyMatrix4(geometryToBvh);triangle2.needsUpdate=true;for(let i=offset,l=offset+count;i<l;i++){const ti=bvh.resolveTriangleIndex(i);setTriangle(triangle,3*ti,index,pos);triangle.needsUpdate=true;const dist=triangle.distanceToTriangle(triangle2,tempTarget1,tempTarget2);if(dist<closestDistance){tempTargetDest1.copy(tempTarget1);if(tempTargetDest2){tempTargetDest2.copy(tempTarget2)}closestDistance=dist;closestDistanceTriIndex=i;closestDistanceOtherTriIndex=i2}if(dist<minThreshold){return true}}}}}});ExtendedTrianglePool.releasePrimitive(triangle);ExtendedTrianglePool.releasePrimitive(triangle2);if(closestDistance===Infinity){return null}if(!target1.point){target1.point=tempTargetDest1.clone()}else{target1.point.copy(tempTargetDest1)}target1.distance=closestDistance,target1.faceIndex=closestDistanceTriIndex;if(target2){if(!target2.point)target2.point=tempTargetDest2.clone();else target2.point.copy(tempTargetDest2);target2.point.applyMatrix4(tempMatrix);tempTargetDest1.applyMatrix4(tempMatrix);target2.distance=tempTargetDest1.sub(target2.point).length();target2.faceIndex=closestDistanceOtherTriIndex}return target1}function isSharedArrayBufferSupported(){return typeof SharedArrayBuffer!=="undefined"}function convertToBufferType(array,BufferConstructor){if(array===null){return array}else if(array.buffer){const buffer=array.buffer;if(buffer.constructor===BufferConstructor){return array}const ArrayConstructor=array.constructor;const result=new ArrayConstructor(new BufferConstructor(buffer.byteLength));result.set(array);return result}else{if(array.constructor===BufferConstructor){return array}const result=new BufferConstructor(array.byteLength);new Uint8Array(result).set(new Uint8Array(array));return result}}const _bufferStack1=new BufferStack.constructor;const _bufferStack2=new BufferStack.constructor;const _boxPool=new PrimitivePool(()=>new three.Box3);const _leftBox1=new three.Box3;const _rightBox1=new three.Box3;const _leftBox2=new three.Box3;const _rightBox2=new three.Box3;let _active=false;function bvhcast(bvh,otherBvh,matrixToLocal,intersectsRanges){if(_active){throw new Error("MeshBVH: Recursive calls to bvhcast not supported.")}_active=true;const roots=bvh._roots;const otherRoots=otherBvh._roots;let result;let offset1=0;let offset2=0;const invMat=new three.Matrix4().copy(matrixToLocal).invert();for(let i=0,il=roots.length;i<il;i++){_bufferStack1.setBuffer(roots[i]);offset2=0;const localBox=_boxPool.getPrimitive();arrayToBox(BOUNDING_DATA_INDEX(0),_bufferStack1.float32Array,localBox);localBox.applyMatrix4(invMat);for(let j=0,jl=otherRoots.length;j<jl;j++){_bufferStack2.setBuffer(otherRoots[i]);result=_traverse(0,0,matrixToLocal,invMat,intersectsRanges,offset1,offset2,0,0,localBox);_bufferStack2.clearBuffer();offset2+=otherRoots[j].length;if(result){break}}_boxPool.releasePrimitive(localBox);_bufferStack1.clearBuffer();offset1+=roots[i].length;if(result){break}}_active=false;return result}function _traverse(node1Index32,node2Index32,matrix2to1,matrix1to2,intersectsRangesFunc,node1IndexByteOffset=0,node2IndexByteOffset=0,depth1=0,depth2=0,currBox=null,reversed=false){let bufferStack1,bufferStack2;if(reversed){bufferStack1=_bufferStack2;bufferStack2=_bufferStack1}else{bufferStack1=_bufferStack1;bufferStack2=_bufferStack2}const float32Array1=bufferStack1.float32Array,uint32Array1=bufferStack1.uint32Array,uint16Array1=bufferStack1.uint16Array,float32Array2=bufferStack2.float32Array,uint32Array2=bufferStack2.uint32Array,uint16Array2=bufferStack2.uint16Array;const node1Index16=node1Index32*2;const node2Index16=node2Index32*2;const isLeaf1=IS_LEAF(node1Index16,uint16Array1);const isLeaf2=IS_LEAF(node2Index16,uint16Array2);let result=false;if(isLeaf2&&isLeaf1){if(reversed){result=intersectsRangesFunc(OFFSET(node2Index32,uint32Array2),COUNT(node2Index32*2,uint16Array2),OFFSET(node1Index32,uint32Array1),COUNT(node1Index32*2,uint16Array1),depth2,node2IndexByteOffset+node2Index32,depth1,node1IndexByteOffset+node1Index32)}else{result=intersectsRangesFunc(OFFSET(node1Index32,uint32Array1),COUNT(node1Index32*2,uint16Array1),OFFSET(node2Index32,uint32Array2),COUNT(node2Index32*2,uint16Array2),depth1,node1IndexByteOffset+node1Index32,depth2,node2IndexByteOffset+node2Index32)}}else if(isLeaf2){const newBox=_boxPool.getPrimitive();arrayToBox(BOUNDING_DATA_INDEX(node2Index32),float32Array2,newBox);newBox.applyMatrix4(matrix2to1);const cl1=LEFT_NODE(node1Index32);const cr1=RIGHT_NODE(node1Index32,uint32Array1);arrayToBox(BOUNDING_DATA_INDEX(cl1),float32Array1,_leftBox1);arrayToBox(BOUNDING_DATA_INDEX(cr1),float32Array1,_rightBox1);const intersectCl1=newBox.intersectsBox(_leftBox1);const intersectCr1=newBox.intersectsBox(_rightBox1);result=intersectCl1&&_traverse(node2Index32,cl1,matrix1to2,matrix2to1,intersectsRangesFunc,node2IndexByteOffset,node1IndexByteOffset,depth2,depth1+1,newBox,!reversed)||intersectCr1&&_traverse(node2Index32,cr1,matrix1to2,matrix2to1,intersectsRangesFunc,node2IndexByteOffset,node1IndexByteOffset,depth2,depth1+1,newBox,!reversed);_boxPool.releasePrimitive(newBox)}else{const cl2=LEFT_NODE(node2Index32);const cr2=RIGHT_NODE(node2Index32,uint32Array2);arrayToBox(BOUNDING_DATA_INDEX(cl2),float32Array2,_leftBox2);arrayToBox(BOUNDING_DATA_INDEX(cr2),float32Array2,_rightBox2);const leftIntersects=currBox.intersectsBox(_leftBox2);const rightIntersects=currBox.intersectsBox(_rightBox2);if(leftIntersects&&rightIntersects){result=_traverse(node1Index32,cl2,matrix2to1,matrix1to2,intersectsRangesFunc,node1IndexByteOffset,node2IndexByteOffset,depth1,depth2+1,currBox,reversed)||_traverse(node1Index32,cr2,matrix2to1,matrix1to2,intersectsRangesFunc,node1IndexByteOffset,node2IndexByteOffset,depth1,depth2+1,currBox,reversed)}else if(leftIntersects){if(isLeaf1){result=_traverse(node1Index32,cl2,matrix2to1,matrix1to2,intersectsRangesFunc,node1IndexByteOffset,node2IndexByteOffset,depth1,depth2+1,currBox,reversed)}else{const newBox=_boxPool.getPrimitive();newBox.copy(_leftBox2).applyMatrix4(matrix2to1);const cl1=LEFT_NODE(node1Index32);const cr1=RIGHT_NODE(node1Index32,uint32Array1);arrayToBox(BOUNDING_DATA_INDEX(cl1),float32Array1,_leftBox1);arrayToBox(BOUNDING_DATA_INDEX(cr1),float32Array1,_rightBox1);const intersectCl1=newBox.intersectsBox(_leftBox1);const intersectCr1=newBox.intersectsBox(_rightBox1);result=intersectCl1&&_traverse(cl2,cl1,matrix1to2,matrix2to1,intersectsRangesFunc,node2IndexByteOffset,node1IndexByteOffset,depth2,depth1+1,newBox,!reversed)||intersectCr1&&_traverse(cl2,cr1,matrix1to2,matrix2to1,intersectsRangesFunc,node2IndexByteOffset,node1IndexByteOffset,depth2,depth1+1,newBox,!reversed);_boxPool.releasePrimitive(newBox)}}else if(rightIntersects){if(isLeaf1){result=_traverse(node1Index32,cr2,matrix2to1,matrix1to2,intersectsRangesFunc,node1IndexByteOffset,node2IndexByteOffset,depth1,depth2+1,currBox,reversed)}else{const newBox=_boxPool.getPrimitive();newBox.copy(_rightBox2).applyMatrix4(matrix2to1);const cl1=LEFT_NODE(node1Index32);const cr1=RIGHT_NODE(node1Index32,uint32Array1);arrayToBox(BOUNDING_DATA_INDEX(cl1),float32Array1,_leftBox1);arrayToBox(BOUNDING_DATA_INDEX(cr1),float32Array1,_rightBox1);const intersectCl1=newBox.intersectsBox(_leftBox1);const intersectCr1=newBox.intersectsBox(_rightBox1);result=intersectCl1&&_traverse(cr2,cl1,matrix1to2,matrix2to1,intersectsRangesFunc,node2IndexByteOffset,node1IndexByteOffset,depth2,depth1+1,newBox,!reversed)||intersectCr1&&_traverse(cr2,cr1,matrix1to2,matrix2to1,intersectsRangesFunc,node2IndexByteOffset,node1IndexByteOffset,depth2,depth1+1,newBox,!reversed);_boxPool.releasePrimitive(newBox)}}}return result}const obb=new OrientedBox;const tempBox=new three.Box3;const DEFAULT_OPTIONS={strategy:CENTER,maxDepth:40,maxLeafTris:10,useSharedArrayBuffer:false,setBoundingBox:true,onProgress:null,indirect:false,verbose:true};class MeshBVH{static serialize(bvh,options={}){options={cloneBuffers:true,...options};const geometry=bvh.geometry;const rootData=bvh._roots;const indirectBuffer=bvh._indirectBuffer;const indexAttribute=geometry.getIndex();let result;if(options.cloneBuffers){result={roots:rootData.map(root=>root.slice()),index:indexAttribute?indexAttribute.array.slice():null,indirectBuffer:indirectBuffer?indirectBuffer.slice():null}}else{result={roots:rootData,index:indexAttribute?indexAttribute.array:null,indirectBuffer:indirectBuffer}}return result}static deserialize(data,geometry,options={}){options={setIndex:true,indirect:Boolean(data.indirectBuffer),...options};const{index,roots,indirectBuffer}=data;const bvh=new MeshBVH(geometry,{...options,[SKIP_GENERATION]:true});bvh._roots=roots;bvh._indirectBuffer=indirectBuffer||null;if(options.setIndex){const indexAttribute=geometry.getIndex();if(indexAttribute===null){const newIndex=new three.BufferAttribute(data.index,1,false);geometry.setIndex(newIndex)}else if(indexAttribute.array!==index){indexAttribute.array.set(index);indexAttribute.needsUpdate=true}}return bvh}get indirect(){return!!this._indirectBuffer}constructor(geometry,options={}){if(!geometry.isBufferGeometry){throw new Error("MeshBVH: Only BufferGeometries are supported.")}else if(geometry.index&&geometry.index.isInterleavedBufferAttribute){throw new Error("MeshBVH: InterleavedBufferAttribute is not supported for the index attribute.")}options=Object.assign({...DEFAULT_OPTIONS,[SKIP_GENERATION]:false},options);if(options.useSharedArrayBuffer&&!isSharedArrayBufferSupported()){throw new Error("MeshBVH: SharedArrayBuffer is not available.")}this.geometry=geometry;this._roots=null;this._indirectBuffer=null;if(!options[SKIP_GENERATION]){buildPackedTree(this,options);if(!geometry.boundingBox&&options.setBoundingBox){geometry.boundingBox=this.getBoundingBox(new three.Box3)}}this.resolveTriangleIndex=this._indirectBuffer?i=>this._indirectBuffer[i]:i=>i}refit(nodeIndices=null){const refitFunc=this.indirect?refit_indirect:refit;return refitFunc(this,nodeIndices)}traverse(callback,rootIndex=0){const buffer=this._roots[rootIndex];const uint32Array=new Uint32Array(buffer);const uint16Array=new Uint16Array(buffer);_traverse(0);function _traverse(node32Index,depth=0){const node16Index=node32Index*2;const isLeaf=uint16Array[node16Index+15]===IS_LEAFNODE_FLAG;if(isLeaf){const offset=uint32Array[node32Index+6];const count=uint16Array[node16Index+14];callback(depth,isLeaf,new Float32Array(buffer,node32Index*4,6),offset,count)}else{const left=node32Index+BYTES_PER_NODE/4;const right=uint32Array[node32Index+6];const splitAxis=uint32Array[node32Index+7];const stopTraversal=callback(depth,isLeaf,new Float32Array(buffer,node32Index*4,6),splitAxis);if(!stopTraversal){_traverse(left,depth+1);_traverse(right,depth+1)}}}}raycast(ray,materialOrSide=three.FrontSide){const roots=this._roots;const geometry=this.geometry;const intersects=[];const isMaterial=materialOrSide.isMaterial;const isArrayMaterial=Array.isArray(materialOrSide);const groups=geometry.groups;const side=isMaterial?materialOrSide.side:materialOrSide;const raycastFunc=this.indirect?raycast_indirect:raycast;for(let i=0,l=roots.length;i<l;i++){const materialSide=isArrayMaterial?materialOrSide[groups[i].materialIndex].side:side;const startCount=intersects.length;raycastFunc(this,i,materialSide,ray,intersects);if(isArrayMaterial){const materialIndex=groups[i].materialIndex;for(let j=startCount,jl=intersects.length;j<jl;j++){intersects[j].face.materialIndex=materialIndex}}}return intersects}raycastFirst(ray,materialOrSide=three.FrontSide){const roots=this._roots;const geometry=this.geometry;const isMaterial=materialOrSide.isMaterial;const isArrayMaterial=Array.isArray(materialOrSide);let closestResult=null;const groups=geometry.groups;const side=isMaterial?materialOrSide.side:materialOrSide;const raycastFirstFunc=this.indirect?raycastFirst_indirect:raycastFirst;for(let i=0,l=roots.length;i<l;i++){const materialSide=isArrayMaterial?materialOrSide[groups[i].materialIndex].side:side;const result=raycastFirstFunc(this,i,materialSide,ray);if(result!=null&&(closestResult==null||result.distance<closestResult.distance)){closestResult=result;if(isArrayMaterial){result.face.materialIndex=groups[i].materialIndex}}}return closestResult}intersectsGeometry(otherGeometry,geomToMesh){let result=false;const roots=this._roots;const intersectsGeometryFunc=this.indirect?intersectsGeometry_indirect:intersectsGeometry;for(let i=0,l=roots.length;i<l;i++){result=intersectsGeometryFunc(this,i,otherGeometry,geomToMesh);if(result){break}}return result}shapecast(callbacks){const triangle=ExtendedTrianglePool.getPrimitive();const iterateFunc=this.indirect?iterateOverTriangles_indirect:iterateOverTriangles;let{boundsTraverseOrder,intersectsBounds,intersectsRange,intersectsTriangle}=callbacks;if(intersectsRange&&intersectsTriangle){const originalIntersectsRange=intersectsRange;intersectsRange=(offset,count,contained,depth,nodeIndex)=>{if(!originalIntersectsRange(offset,count,contained,depth,nodeIndex)){return iterateFunc(offset,count,this,intersectsTriangle,contained,depth,triangle)}return true}}else if(!intersectsRange){if(intersectsTriangle){intersectsRange=(offset,count,contained,depth)=>{return iterateFunc(offset,count,this,intersectsTriangle,contained,depth,triangle)}}else{intersectsRange=(offset,count,contained)=>{return contained}}}let result=false;let byteOffset=0;const roots=this._roots;for(let i=0,l=roots.length;i<l;i++){const root=roots[i];result=shapecast(this,i,intersectsBounds,intersectsRange,boundsTraverseOrder,byteOffset);if(result){break}byteOffset+=root.byteLength}ExtendedTrianglePool.releasePrimitive(triangle);return result}bvhcast(otherBvh,matrixToLocal,callbacks){let{intersectsRanges,intersectsTriangles}=callbacks;const triangle1=ExtendedTrianglePool.getPrimitive();const indexAttr1=this.geometry.index;const positionAttr1=this.geometry.attributes.position;const assignTriangle1=this.indirect?i1=>{const ti=this.resolveTriangleIndex(i1);setTriangle(triangle1,ti*3,indexAttr1,positionAttr1)}:i1=>{setTriangle(triangle1,i1*3,indexAttr1,positionAttr1)};const triangle2=ExtendedTrianglePool.getPrimitive();const indexAttr2=otherBvh.geometry.index;const positionAttr2=otherBvh.geometry.attributes.position;const assignTriangle2=otherBvh.indirect?i2=>{const ti2=otherBvh.resolveTriangleIndex(i2);setTriangle(triangle2,ti2*3,indexAttr2,positionAttr2)}:i2=>{setTriangle(triangle2,i2*3,indexAttr2,positionAttr2)};if(intersectsTriangles){const iterateOverDoubleTriangles=(offset1,count1,offset2,count2,depth1,index1,depth2,index2)=>{for(let i2=offset2,l2=offset2+count2;i2<l2;i2++){assignTriangle2(i2);triangle2.a.applyMatrix4(matrixToLocal);triangle2.b.applyMatrix4(matrixToLocal);triangle2.c.applyMatrix4(matrixToLocal);triangle2.needsUpdate=true;for(let i1=offset1,l1=offset1+count1;i1<l1;i1++){assignTriangle1(i1);triangle1.needsUpdate=true;if(intersectsTriangles(triangle1,triangle2,i1,i2,depth1,index1,depth2,index2)){return true}}}return false};if(intersectsRanges){const originalIntersectsRanges=intersectsRanges;intersectsRanges=function(offset1,count1,offset2,count2,depth1,index1,depth2,index2){if(!originalIntersectsRanges(offset1,count1,offset2,count2,depth1,index1,depth2,index2)){return iterateOverDoubleTriangles(offset1,count1,offset2,count2,depth1,index1,depth2,index2)}return true}}else{intersectsRanges=iterateOverDoubleTriangles}}return bvhcast(this,otherBvh,matrixToLocal,intersectsRanges)}intersectsBox(box,boxToMesh){obb.set(box.min,box.max,boxToMesh);obb.needsUpdate=true;return this.shapecast({intersectsBounds:box=>obb.intersectsBox(box),intersectsTriangle:tri=>obb.intersectsTriangle(tri)})}intersectsSphere(sphere){return this.shapecast({intersectsBounds:box=>sphere.intersectsBox(box),intersectsTriangle:tri=>tri.intersectsSphere(sphere)})}closestPointToGeometry(otherGeometry,geometryToBvh,target1={},target2={},minThreshold=0,maxThreshold=Infinity){const closestPointToGeometryFunc=this.indirect?closestPointToGeometry_indirect:closestPointToGeometry;return closestPointToGeometryFunc(this,otherGeometry,geometryToBvh,target1,target2,minThreshold,maxThreshold)}closestPointToPoint(point,target={},minThreshold=0,maxThreshold=Infinity){return closestPointToPoint(this,point,target,minThreshold,maxThreshold)}getBoundingBox(target){target.makeEmpty();const roots=this._roots;roots.forEach(buffer=>{arrayToBox(0,new Float32Array(buffer),tempBox);target.union(tempBox)});return target}}const boundingBox=new three.Box3;class MeshBVHRootHelper extends three.Object3D{get isMesh(){return!this.displayEdges}get isLineSegments(){return this.displayEdges}get isLine(){return this.displayEdges}constructor(bvh,material,depth=10,group=0){super();this.material=material;this.geometry=new three.BufferGeometry;this.name="MeshBVHRootHelper";this.depth=depth;this.displayParents=false;this.bvh=bvh;this.displayEdges=true;this._group=group}raycast(){}update(){const geometry=this.geometry;const boundsTree=this.bvh;const group=this._group;geometry.dispose();this.visible=false;if(boundsTree){const targetDepth=this.depth-1;const displayParents=this.displayParents;let boundsCount=0;boundsTree.traverse((depth,isLeaf)=>{if(depth>=targetDepth||isLeaf){boundsCount++;return true}else if(displayParents){boundsCount++}},group);let posIndex=0;const positionArray=new Float32Array(8*3*boundsCount);boundsTree.traverse((depth,isLeaf,boundingData)=>{const terminate=depth>=targetDepth||isLeaf;if(terminate||displayParents){arrayToBox(0,boundingData,boundingBox);const{min,max}=boundingBox;for(let x=-1;x<=1;x+=2){const xVal=x<0?min.x:max.x;for(let y=-1;y<=1;y+=2){const yVal=y<0?min.y:max.y;for(let z=-1;z<=1;z+=2){const zVal=z<0?min.z:max.z;positionArray[posIndex+0]=xVal;positionArray[posIndex+1]=yVal;positionArray[posIndex+2]=zVal;posIndex+=3}}}return terminate}},group);let indexArray;let indices;if(this.displayEdges){indices=new Uint8Array([0,4,1,5,2,6,3,7,0,2,1,3,4,6,5,7,0,1,2,3,4,5,6,7])}else{indices=new Uint8Array([0,1,2,2,1,3,4,6,5,6,7,5,1,4,5,0,4,1,2,3,6,3,7,6,0,2,4,2,6,4,1,5,3,3,5,7])}if(positionArray.length>65535){indexArray=new Uint32Array(indices.length*boundsCount)}else{indexArray=new Uint16Array(indices.length*boundsCount)}const indexLength=indices.length;for(let i=0;i<boundsCount;i++){const posOffset=i*8;const indexOffset=i*indexLength;for(let j=0;j<indexLength;j++){indexArray[indexOffset+j]=posOffset+indices[j]}}geometry.setIndex(new three.BufferAttribute(indexArray,1,false));geometry.setAttribute("position",new three.BufferAttribute(positionArray,3,false));this.visible=true}}}class MeshBVHHelper extends three.Group{get color(){return this.edgeMaterial.color}get opacity(){return this.edgeMaterial.opacity}set opacity(v){this.edgeMaterial.opacity=v;this.meshMaterial.opacity=v}constructor(mesh=null,bvh=null,depth=10){if(mesh instanceof MeshBVH){depth=bvh||10;bvh=mesh;mesh=null}if(typeof bvh==="number"){depth=bvh;bvh=null}super();this.name="MeshBVHHelper";this.depth=depth;this.mesh=mesh;this.bvh=bvh;this.displayParents=false;this.displayEdges=true;this._roots=[];const edgeMaterial=new three.LineBasicMaterial({color:65416,transparent:true,opacity:0.3,depthWrite:false});const meshMaterial=new three.MeshBasicMaterial({color:65416,transparent:true,opacity:0.3,depthWrite:false});meshMaterial.color=edgeMaterial.color;this.edgeMaterial=edgeMaterial;this.meshMaterial=meshMaterial;this.update()}update(){const bvh=this.bvh||this.mesh.geometry.boundsTree;const totalRoots=bvh?bvh._roots.length:0;while(this._roots.length>totalRoots){const root=this._roots.pop();root.geometry.dispose();this.remove(root)}for(let i=0;i<totalRoots;i++){const{depth,edgeMaterial,meshMaterial,displayParents,displayEdges}=this;if(i>=this._roots.length){const root=new MeshBVHRootHelper(bvh,edgeMaterial,depth,i);this.add(root);this._roots.push(root)}const root=this._roots[i];root.bvh=bvh;root.depth=depth;root.displayParents=displayParents;root.displayEdges=displayEdges;root.material=displayEdges?edgeMaterial:meshMaterial;root.update()}}updateMatrixWorld(...args){const mesh=this.mesh;const parent=this.parent;if(mesh!==null){mesh.updateWorldMatrix(true,false);if(parent){this.matrix.copy(parent.matrixWorld).invert().multiply(mesh.matrixWorld)}else{this.matrix.copy(mesh.matrixWorld)}this.matrix.decompose(this.position,this.quaternion,this.scale)}super.updateMatrixWorld(...args)}copy(source){this.depth=source.depth;this.mesh=source.mesh;this.bvh=source.bvh;this.opacity=source.opacity;this.color.copy(source.color)}clone(){return new MeshBVHHelper(this.mesh,this.bvh,this.depth)}dispose(){this.edgeMaterial.dispose();this.meshMaterial.dispose();const children=this.children;for(let i=0,l=children.length;i<l;i++){children[i].geometry.dispose()}}}class MeshBVHVisualizer extends MeshBVHHelper{constructor(...args){super(...args);console.warn("MeshBVHVisualizer: MeshBVHVisualizer has been deprecated. Use MeshBVHHelper, instead.")}}const _box1=new three.Box3;const _box2=new three.Box3;const _vec=new three.Vector3;function getPrimitiveSize(el){switch(typeof el){case"number":return 8;case"string":return el.length*2;case"boolean":return 4;default:return 0;}}function isTypedArray(arr){const regex=/(Uint|Int|Float)(8|16|32)Array/;return regex.test(arr.constructor.name)}function getRootExtremes(bvh,group){const result={nodeCount:0,leafNodeCount:0,depth:{min:Infinity,max:-Infinity},tris:{min:Infinity,max:-Infinity},splits:[0,0,0],surfaceAreaScore:0};bvh.traverse((depth,isLeaf,boundingData,offsetOrSplit,count)=>{const l0=boundingData[0+3]-boundingData[0];const l1=boundingData[1+3]-boundingData[1];const l2=boundingData[2+3]-boundingData[2];const surfaceArea=2*(l0*l1+l1*l2+l2*l0);result.nodeCount++;if(isLeaf){result.leafNodeCount++;result.depth.min=Math.min(depth,result.depth.min);result.depth.max=Math.max(depth,result.depth.max);result.tris.min=Math.min(count,result.tris.min);result.tris.max=Math.max(count,result.tris.max);result.surfaceAreaScore+=surfaceArea*TRIANGLE_INTERSECT_COST*count}else{result.splits[offsetOrSplit]++;result.surfaceAreaScore+=surfaceArea*TRAVERSAL_COST}},group);if(result.tris.min===Infinity){result.tris.min=0;result.tris.max=0}if(result.depth.min===Infinity){result.depth.min=0;result.depth.max=0}return result}function getBVHExtremes(bvh){return bvh._roots.map((root,i)=>getRootExtremes(bvh,i))}function estimateMemoryInBytes(obj){const traversed=new Set;const stack=[obj];let bytes=0;while(stack.length){const curr=stack.pop();if(traversed.has(curr)){continue}traversed.add(curr);for(let key in curr){if(!curr.hasOwnProperty(key)){continue}bytes+=getPrimitiveSize(key);const value=curr[key];if(value&&(typeof value==="object"||typeof value==="function")){if(isTypedArray(value)){bytes+=value.byteLength}else if(isSharedArrayBufferSupported()&&value instanceof SharedArrayBuffer){bytes+=value.byteLength}else if(value instanceof ArrayBuffer){bytes+=value.byteLength}else{stack.push(value)}}else{bytes+=getPrimitiveSize(value)}}}return bytes}function validateBounds(bvh){const geometry=bvh.geometry;const depthStack=[];const index=geometry.index;const position=geometry.getAttribute("position");let passes=true;bvh.traverse((depth,isLeaf,boundingData,offset,count)=>{const info={depth,isLeaf,boundingData,offset,count};depthStack[depth]=info;arrayToBox(0,boundingData,_box1);const parent=depthStack[depth-1];if(isLeaf){for(let i=offset,l=offset+count;i<l;i++){const triIndex=bvh.resolveTriangleIndex(i);let i0=3*triIndex;let i1=3*triIndex+1;let i2=3*triIndex+2;if(index){i0=index.getX(i0);i1=index.getX(i1);i2=index.getX(i2)}let isContained;_vec.fromBufferAttribute(position,i0);isContained=_box1.containsPoint(_vec);_vec.fromBufferAttribute(position,i1);isContained=isContained&&_box1.containsPoint(_vec);_vec.fromBufferAttribute(position,i2);isContained=isContained&&_box1.containsPoint(_vec);console.assert(isContained,"Leaf bounds does not fully contain triangle.");passes=passes&&isContained}}if(parent){arrayToBox(0,boundingData,_box2);const isContained=_box2.containsBox(_box1);console.assert(isContained,"Parent bounds does not fully contain child.");passes=passes&&isContained}});return passes}function getJSONStructure(bvh){const depthStack=[];bvh.traverse((depth,isLeaf,boundingData,offset,count)=>{const info={bounds:arrayToBox(0,boundingData,new three.Box3)};if(isLeaf){info.count=count;info.offset=offset}else{info.left=null;info.right=null}depthStack[depth]=info;const parent=depthStack[depth-1];if(parent){if(parent.left===null){parent.left=info}else{parent.right=info}}});return depthStack[0]}function convertRaycastIntersect(hit,object,raycaster){if(hit===null){return null}hit.point.applyMatrix4(object.matrixWorld);hit.distance=hit.point.distanceTo(raycaster.ray.origin);hit.object=object;if(hit.distance<raycaster.near||hit.distance>raycaster.far){return null}else{return hit}}const ray=new three.Ray;const tmpInverseMatrix=new three.Matrix4;const origMeshRaycastFunc=three.Mesh.prototype.raycast;function acceleratedRaycast(raycaster,intersects){if(this.geometry.boundsTree){if(this.material===undefined)return;tmpInverseMatrix.copy(this.matrixWorld).invert();ray.copy(raycaster.ray).applyMatrix4(tmpInverseMatrix);const bvh=this.geometry.boundsTree;if(raycaster.firstHitOnly===true){const hit=convertRaycastIntersect(bvh.raycastFirst(ray,this.material),this,raycaster);if(hit){intersects.push(hit)}}else{const hits=bvh.raycast(ray,this.material);for(let i=0,l=hits.length;i<l;i++){const hit=convertRaycastIntersect(hits[i],this,raycaster);if(hit){intersects.push(hit)}}}}else{origMeshRaycastFunc.call(this,raycaster,intersects)}}function computeBoundsTree(options){this.boundsTree=new MeshBVH(this,options);return this.boundsTree}function disposeBoundsTree(){this.boundsTree=null}function countToStringFormat(count){switch(count){case 1:return"R";case 2:return"RG";case 3:return"RGBA";case 4:return"RGBA";}throw new Error}function countToFormat(count){switch(count){case 1:return three.RedFormat;case 2:return three.RGFormat;case 3:return three.RGBAFormat;case 4:return three.RGBAFormat;}}function countToIntFormat(count){switch(count){case 1:return three.RedIntegerFormat;case 2:return three.RGIntegerFormat;case 3:return three.RGBAIntegerFormat;case 4:return three.RGBAIntegerFormat;}}class VertexAttributeTexture extends three.DataTexture{constructor(){super();this.minFilter=three.NearestFilter;this.magFilter=three.NearestFilter;this.generateMipmaps=false;this.overrideItemSize=null;this._forcedType=null}updateFrom(attr){const overrideItemSize=this.overrideItemSize;const originalItemSize=attr.itemSize;const originalCount=attr.count;if(overrideItemSize!==null){if(originalItemSize*originalCount%overrideItemSize!==0){throw new Error("VertexAttributeTexture: overrideItemSize must divide evenly into buffer length.")}attr.itemSize=overrideItemSize;attr.count=originalCount*originalItemSize/overrideItemSize}const itemSize=attr.itemSize;const count=attr.count;const normalized=attr.normalized;const originalBufferCons=attr.array.constructor;const byteCount=originalBufferCons.BYTES_PER_ELEMENT;let targetType=this._forcedType;let finalStride=itemSize;if(targetType===null){switch(originalBufferCons){case Float32Array:targetType=three.FloatType;break;case Uint8Array:case Uint16Array:case Uint32Array:targetType=three.UnsignedIntType;break;case Int8Array:case Int16Array:case Int32Array:targetType=three.IntType;break;}}let type,format,normalizeValue,targetBufferCons;let internalFormat=countToStringFormat(itemSize);switch(targetType){case three.FloatType:normalizeValue=1;format=countToFormat(itemSize);if(normalized&&byteCount===1){targetBufferCons=originalBufferCons;internalFormat+="8";if(originalBufferCons===Uint8Array){type=three.UnsignedByteType}else{type=three.ByteType;internalFormat+="_SNORM"}}else{targetBufferCons=Float32Array;internalFormat+="32F";type=three.FloatType}break;case three.IntType:internalFormat+=byteCount*8+"I";normalizeValue=normalized?Math.pow(2,originalBufferCons.BYTES_PER_ELEMENT*8-1):1;format=countToIntFormat(itemSize);if(byteCount===1){targetBufferCons=Int8Array;type=three.ByteType}else if(byteCount===2){targetBufferCons=Int16Array;type=three.ShortType}else{targetBufferCons=Int32Array;type=three.IntType}break;case three.UnsignedIntType:internalFormat+=byteCount*8+"UI";normalizeValue=normalized?Math.pow(2,originalBufferCons.BYTES_PER_ELEMENT*8-1):1;format=countToIntFormat(itemSize);if(byteCount===1){targetBufferCons=Uint8Array;type=three.UnsignedByteType}else if(byteCount===2){targetBufferCons=Uint16Array;type=three.UnsignedShortType}else{targetBufferCons=Uint32Array;type=three.UnsignedIntType}break;}if(finalStride===3&&(format===three.RGBAFormat||format===three.RGBAIntegerFormat)){finalStride=4}const dimension=Math.ceil(Math.sqrt(count))||1;const length=finalStride*dimension*dimension;const dataArray=new targetBufferCons(length);const originalNormalized=attr.normalized;attr.normalized=false;for(let i=0;i<count;i++){const ii=finalStride*i;dataArray[ii]=attr.getX(i)/normalizeValue;if(itemSize>=2){dataArray[ii+1]=attr.getY(i)/normalizeValue}if(itemSize>=3){dataArray[ii+2]=attr.getZ(i)/normalizeValue;if(finalStride===4){dataArray[ii+3]=1}}if(itemSize>=4){dataArray[ii+3]=attr.getW(i)/normalizeValue}}attr.normalized=originalNormalized;this.internalFormat=internalFormat;this.format=format;this.type=type;this.image.width=dimension;this.image.height=dimension;this.image.data=dataArray;this.needsUpdate=true;this.dispose();attr.itemSize=originalItemSize;attr.count=originalCount}}class UIntVertexAttributeTexture extends VertexAttributeTexture{constructor(){super();this._forcedType=three.UnsignedIntType}}class IntVertexAttributeTexture extends VertexAttributeTexture{constructor(){super();this._forcedType=three.IntType}}class FloatVertexAttributeTexture extends VertexAttributeTexture{constructor(){super();this._forcedType=three.FloatType}}class MeshBVHUniformStruct{constructor(){this.index=new UIntVertexAttributeTexture;this.position=new FloatVertexAttributeTexture;this.bvhBounds=new three.DataTexture;this.bvhContents=new three.DataTexture;this._cachedIndexAttr=null;this.index.overrideItemSize=3}updateFrom(bvh){const{geometry}=bvh;bvhToTextures(bvh,this.bvhBounds,this.bvhContents);this.position.updateFrom(geometry.attributes.position);if(bvh.indirect){const indirectBuffer=bvh._indirectBuffer;if(this._cachedIndexAttr===null||this._cachedIndexAttr.count!==indirectBuffer.length){if(geometry.index){this._cachedIndexAttr=geometry.index.clone()}else{const array=getIndexArray(getVertexCount(geometry));this._cachedIndexAttr=new three.BufferAttribute(array,1,false)}}dereferenceIndex(geometry,indirectBuffer,this._cachedIndexAttr);this.index.updateFrom(this._cachedIndexAttr)}else{this.index.updateFrom(geometry.index)}}dispose(){const{index,position,bvhBounds,bvhContents}=this;if(index)index.dispose();if(position)position.dispose();if(bvhBounds)bvhBounds.dispose();if(bvhContents)bvhContents.dispose()}}function dereferenceIndex(geometry,indirectBuffer,target){const unpacked=target.array;const indexArray=geometry.index?geometry.index.array:null;for(let i=0,l=indirectBuffer.length;i<l;i++){const i3=3*i;const v3=3*indirectBuffer[i];for(let c=0;c<3;c++){unpacked[i3+c]=indexArray?indexArray[v3+c]:v3+c}}}function bvhToTextures(bvh,boundsTexture,contentsTexture){const roots=bvh._roots;if(roots.length!==1){throw new Error("MeshBVHUniformStruct: Multi-root BVHs not supported.")}const root=roots[0];const uint16Array=new Uint16Array(root);const uint32Array=new Uint32Array(root);const float32Array=new Float32Array(root);const nodeCount=root.byteLength/BYTES_PER_NODE;const boundsDimension=2*Math.ceil(Math.sqrt(nodeCount/2));const boundsArray=new Float32Array(4*boundsDimension*boundsDimension);const contentsDimension=Math.ceil(Math.sqrt(nodeCount));const contentsArray=new Uint32Array(2*contentsDimension*contentsDimension);for(let i=0;i<nodeCount;i++){const nodeIndex32=i*BYTES_PER_NODE/4;const nodeIndex16=nodeIndex32*2;const boundsIndex=BOUNDING_DATA_INDEX(nodeIndex32);for(let b=0;b<3;b++){boundsArray[8*i+0+b]=float32Array[boundsIndex+0+b];boundsArray[8*i+4+b]=float32Array[boundsIndex+3+b]}if(IS_LEAF(nodeIndex16,uint16Array)){const count=COUNT(nodeIndex16,uint16Array);const offset=OFFSET(nodeIndex32,uint32Array);const mergedLeafCount=4294901760|count;contentsArray[i*2+0]=mergedLeafCount;contentsArray[i*2+1]=offset}else{const rightIndex=4*RIGHT_NODE(nodeIndex32,uint32Array)/BYTES_PER_NODE;const splitAxis=SPLIT_AXIS(nodeIndex32,uint32Array);contentsArray[i*2+0]=splitAxis;contentsArray[i*2+1]=rightIndex}}boundsTexture.image.data=boundsArray;boundsTexture.image.width=boundsDimension;boundsTexture.image.height=boundsDimension;boundsTexture.format=three.RGBAFormat;boundsTexture.type=three.FloatType;boundsTexture.internalFormat="RGBA32F";boundsTexture.minFilter=three.NearestFilter;boundsTexture.magFilter=three.NearestFilter;boundsTexture.generateMipmaps=false;boundsTexture.needsUpdate=true;boundsTexture.dispose();contentsTexture.image.data=contentsArray;contentsTexture.image.width=contentsDimension;contentsTexture.image.height=contentsDimension;contentsTexture.format=three.RGIntegerFormat;contentsTexture.type=three.UnsignedIntType;contentsTexture.internalFormat="RG32UI";contentsTexture.minFilter=three.NearestFilter;contentsTexture.magFilter=three.NearestFilter;contentsTexture.generateMipmaps=false;contentsTexture.needsUpdate=true;contentsTexture.dispose()}const _positionVector=new three.Vector3;const _normalVector=new three.Vector3;const _tangentVector=new three.Vector3;const _tangentVector4=new three.Vector4;const _morphVector=new three.Vector3;const _temp=new three.Vector3;const _skinIndex=new three.Vector4;const _skinWeight=new three.Vector4;const _matrix=new three.Matrix4;const _boneMatrix=new three.Matrix4;function validateAttributes(attr1,attr2){if(!attr1&&!attr2){return}const sameCount=attr1.count===attr2.count;const sameNormalized=attr1.normalized===attr2.normalized;const sameType=attr1.array.constructor===attr2.array.constructor;const sameItemSize=attr1.itemSize===attr2.itemSize;if(!sameCount||!sameNormalized||!sameType||!sameItemSize){throw new Error}}function createAttributeClone(attr,countOverride=null){const cons=attr.array.constructor;const normalized=attr.normalized;const itemSize=attr.itemSize;const count=countOverride===null?attr.count:countOverride;return new three.BufferAttribute(new cons(itemSize*count),itemSize,normalized)}function copyAttributeContents(attr,target,targetOffset=0){if(attr.isInterleavedBufferAttribute){const itemSize=attr.itemSize;for(let i=0,l=attr.count;i<l;i++){const io=i+targetOffset;target.setX(io,attr.getX(i));if(itemSize>=2)target.setY(io,attr.getY(i));if(itemSize>=3)target.setZ(io,attr.getZ(i));if(itemSize>=4)target.setW(io,attr.getW(i))}}else{const array=target.array;const cons=array.constructor;const byteOffset=array.BYTES_PER_ELEMENT*attr.itemSize*targetOffset;const temp=new cons(array.buffer,byteOffset,attr.array.length);temp.set(attr.array)}}function addScaledMatrix(target,matrix,scale){const targetArray=target.elements;const matrixArray=matrix.elements;for(let i=0,l=matrixArray.length;i<l;i++){targetArray[i]+=matrixArray[i]*scale}}function boneNormalTransform(mesh,index,target){const skeleton=mesh.skeleton;const geometry=mesh.geometry;const bones=skeleton.bones;const boneInverses=skeleton.boneInverses;_skinIndex.fromBufferAttribute(geometry.attributes.skinIndex,index);_skinWeight.fromBufferAttribute(geometry.attributes.skinWeight,index);_matrix.elements.fill(0);for(let i=0;i<4;i++){const weight=_skinWeight.getComponent(i);if(weight!==0){const boneIndex=_skinIndex.getComponent(i);_boneMatrix.multiplyMatrices(bones[boneIndex].matrixWorld,boneInverses[boneIndex]);addScaledMatrix(_matrix,_boneMatrix,weight)}}_matrix.multiply(mesh.bindMatrix).premultiply(mesh.bindMatrixInverse);target.transformDirection(_matrix);return target}function applyMorphTarget(morphData,morphInfluences,morphTargetsRelative,i,target){_morphVector.set(0,0,0);for(let j=0,jl=morphData.length;j<jl;j++){const influence=morphInfluences[j];const morphAttribute=morphData[j];if(influence===0)continue;_temp.fromBufferAttribute(morphAttribute,i);if(morphTargetsRelative){_morphVector.addScaledVector(_temp,influence)}else{_morphVector.addScaledVector(_temp.sub(target),influence)}}target.add(_morphVector)}function mergeBufferGeometries(geometries,options={useGroups:false,updateIndex:false,skipAttributes:[]},targetGeometry=new three.BufferGeometry){const isIndexed=geometries[0].index!==null;const{useGroups=false,updateIndex=false,skipAttributes=[]}=options;const attributesUsed=new Set(Object.keys(geometries[0].attributes));const attributes={};let offset=0;targetGeometry.clearGroups();for(let i=0;i<geometries.length;++i){const geometry=geometries[i];let attributesCount=0;if(isIndexed!==(geometry.index!==null)){throw new Error("StaticGeometryGenerator: All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them.")}for(const name in geometry.attributes){if(!attributesUsed.has(name)){throw new Error("StaticGeometryGenerator: All geometries must have compatible attributes; make sure \""+name+"\" attribute exists among all geometries, or in none of them.")}if(attributes[name]===undefined){attributes[name]=[]}attributes[name].push(geometry.attributes[name]);attributesCount++}if(attributesCount!==attributesUsed.size){throw new Error("StaticGeometryGenerator: Make sure all geometries have the same number of attributes.")}if(useGroups){let count;if(isIndexed){count=geometry.index.count}else if(geometry.attributes.position!==undefined){count=geometry.attributes.position.count}else{throw new Error("StaticGeometryGenerator: The geometry must have either an index or a position attribute")}targetGeometry.addGroup(offset,count,i);offset+=count}}if(isIndexed){let forceUpdateIndex=false;if(!targetGeometry.index){let indexCount=0;for(let i=0;i<geometries.length;++i){indexCount+=geometries[i].index.count}targetGeometry.setIndex(new three.BufferAttribute(new Uint32Array(indexCount),1,false));forceUpdateIndex=true}if(updateIndex||forceUpdateIndex){const targetIndex=targetGeometry.index;let targetOffset=0;let indexOffset=0;for(let i=0;i<geometries.length;++i){const geometry=geometries[i];const index=geometry.index;if(skipAttributes[i]!==true){for(let j=0;j<index.count;++j){targetIndex.setX(targetOffset,index.getX(j)+indexOffset);targetOffset++}}indexOffset+=geometry.attributes.position.count}}}for(const name in attributes){const attrList=attributes[name];if(!(name in targetGeometry.attributes)){let count=0;for(const key in attrList){count+=attrList[key].count}targetGeometry.setAttribute(name,createAttributeClone(attributes[name][0],count))}const targetAttribute=targetGeometry.attributes[name];let offset=0;for(let i=0,l=attrList.length;i<l;i++){const attr=attrList[i];if(skipAttributes[i]!==true){copyAttributeContents(attr,targetAttribute,offset)}offset+=attr.count}}return targetGeometry}function checkTypedArrayEquality(a,b){if(a===null||b===null){return a===b}if(a.length!==b.length){return false}for(let i=0,l=a.length;i<l;i++){if(a[i]!==b[i]){return false}}return true}function invertGeometry(geometry){const{index,attributes}=geometry;if(index){for(let i=0,l=index.count;i<l;i+=3){const v0=index.getX(i);const v2=index.getX(i+2);index.setX(i,v2);index.setX(i+2,v0)}}else{for(const key in attributes){const attr=attributes[key];const itemSize=attr.itemSize;for(let i=0,l=attr.count;i<l;i+=3){for(let j=0;j<itemSize;j++){const v0=attr.getComponent(i,j);const v2=attr.getComponent(i+2,j);attr.setComponent(i,j,v2);attr.setComponent(i+2,j,v0)}}}}return geometry}class GeometryDiff{constructor(mesh){this.matrixWorld=new three.Matrix4;this.geometryHash=null;this.boneMatrices=null;this.primitiveCount=-1;this.mesh=mesh;this.update()}update(){const mesh=this.mesh;const geometry=mesh.geometry;const skeleton=mesh.skeleton;const primitiveCount=(geometry.index?geometry.index.count:geometry.attributes.position.count)/3;this.matrixWorld.copy(mesh.matrixWorld);this.geometryHash=geometry.attributes.position.version;this.primitiveCount=primitiveCount;if(skeleton){if(!skeleton.boneTexture){skeleton.computeBoneTexture()}skeleton.update();const boneMatrices=skeleton.boneMatrices;if(!this.boneMatrices||this.boneMatrices.length!==boneMatrices.length){this.boneMatrices=boneMatrices.slice()}else{this.boneMatrices.set(boneMatrices)}}else{this.boneMatrices=null}}didChange(){const mesh=this.mesh;const geometry=mesh.geometry;const primitiveCount=(geometry.index?geometry.index.count:geometry.attributes.position.count)/3;const identical=this.matrixWorld.equals(mesh.matrixWorld)&&this.geometryHash===geometry.attributes.position.version&&checkTypedArrayEquality(mesh.skeleton&&mesh.skeleton.boneMatrices||null,this.boneMatrices)&&this.primitiveCount===primitiveCount;return!identical}}class StaticGeometryGenerator{constructor(meshes){if(!Array.isArray(meshes)){meshes=[meshes]}const finalMeshes=[];meshes.forEach(object=>{object.traverseVisible(c=>{if(c.isMesh){finalMeshes.push(c)}})});this.meshes=finalMeshes;this.useGroups=true;this.applyWorldTransforms=true;this.attributes=["position","normal","color","tangent","uv","uv2"];this._intermediateGeometry=new Array(finalMeshes.length).fill().map(()=>new three.BufferGeometry);this._diffMap=new WeakMap}getMaterials(){const materials=[];this.meshes.forEach(mesh=>{if(Array.isArray(mesh.material)){materials.push(...mesh.material)}else{materials.push(mesh.material)}});return materials}generate(targetGeometry=new three.BufferGeometry){let skipAttributes=[];const{meshes,useGroups,_intermediateGeometry,_diffMap}=this;for(let i=0,l=meshes.length;i<l;i++){const mesh=meshes[i];const geom=_intermediateGeometry[i];const diff=_diffMap.get(mesh);if(!diff||diff.didChange(mesh)){this._convertToStaticGeometry(mesh,geom);skipAttributes.push(false);if(!diff){_diffMap.set(mesh,new GeometryDiff(mesh))}else{diff.update()}}else{skipAttributes.push(true)}}if(_intermediateGeometry.length===0){targetGeometry.setIndex(null);const attrs=targetGeometry.attributes;for(const key in attrs){targetGeometry.deleteAttribute(key)}for(const key in this.attributes){targetGeometry.setAttribute(this.attributes[key],new three.BufferAttribute(new Float32Array(0),4,false))}}else{mergeBufferGeometries(_intermediateGeometry,{useGroups,skipAttributes},targetGeometry)}for(const key in targetGeometry.attributes){targetGeometry.attributes[key].needsUpdate=true}return targetGeometry}_convertToStaticGeometry(mesh,targetGeometry=new three.BufferGeometry){const geometry=mesh.geometry;const applyWorldTransforms=this.applyWorldTransforms;const includeNormal=this.attributes.includes("normal");const includeTangent=this.attributes.includes("tangent");const attributes=geometry.attributes;const targetAttributes=targetGeometry.attributes;if(!targetGeometry.index&&geometry.index){targetGeometry.index=geometry.index.clone()}if(!targetAttributes.position){targetGeometry.setAttribute("position",createAttributeClone(attributes.position))}if(includeNormal&&!targetAttributes.normal&&attributes.normal){targetGeometry.setAttribute("normal",createAttributeClone(attributes.normal))}if(includeTangent&&!targetAttributes.tangent&&attributes.tangent){targetGeometry.setAttribute("tangent",createAttributeClone(attributes.tangent))}validateAttributes(geometry.index,targetGeometry.index);validateAttributes(attributes.position,targetAttributes.position);if(includeNormal){validateAttributes(attributes.normal,targetAttributes.normal)}if(includeTangent){validateAttributes(attributes.tangent,targetAttributes.tangent)}const position=attributes.position;const normal=includeNormal?attributes.normal:null;const tangent=includeTangent?attributes.tangent:null;const morphPosition=geometry.morphAttributes.position;const morphNormal=geometry.morphAttributes.normal;const morphTangent=geometry.morphAttributes.tangent;const morphTargetsRelative=geometry.morphTargetsRelative;const morphInfluences=mesh.morphTargetInfluences;const normalMatrix=new three.Matrix3;normalMatrix.getNormalMatrix(mesh.matrixWorld);if(geometry.index){targetGeometry.index.array.set(geometry.index.array)}for(let i=0,l=attributes.position.count;i<l;i++){_positionVector.fromBufferAttribute(position,i);if(normal){_normalVector.fromBufferAttribute(normal,i)}if(tangent){_tangentVector4.fromBufferAttribute(tangent,i);_tangentVector.fromBufferAttribute(tangent,i)}if(morphInfluences){if(morphPosition){applyMorphTarget(morphPosition,morphInfluences,morphTargetsRelative,i,_positionVector)}if(morphNormal){applyMorphTarget(morphNormal,morphInfluences,morphTargetsRelative,i,_normalVector)}if(morphTangent){applyMorphTarget(morphTangent,morphInfluences,morphTargetsRelative,i,_tangentVector)}}if(mesh.isSkinnedMesh){mesh.applyBoneTransform(i,_positionVector);if(normal){boneNormalTransform(mesh,i,_normalVector)}if(tangent){boneNormalTransform(mesh,i,_tangentVector)}}if(applyWorldTransforms){_positionVector.applyMatrix4(mesh.matrixWorld)}targetAttributes.position.setXYZ(i,_positionVector.x,_positionVector.y,_positionVector.z);if(normal){if(applyWorldTransforms){_normalVector.applyNormalMatrix(normalMatrix)}targetAttributes.normal.setXYZ(i,_normalVector.x,_normalVector.y,_normalVector.z)}if(tangent){if(applyWorldTransforms){_tangentVector.transformDirection(mesh.matrixWorld)}targetAttributes.tangent.setXYZW(i,_tangentVector.x,_tangentVector.y,_tangentVector.z,_tangentVector4.w)}}for(const i in this.attributes){const key=this.attributes[i];if(key==="position"||key==="tangent"||key==="normal"||!(key in attributes)){continue}if(!targetAttributes[key]){targetGeometry.setAttribute(key,createAttributeClone(attributes[key]))}validateAttributes(attributes[key],targetAttributes[key]);copyAttributeContents(attributes[key],targetAttributes[key])}if(mesh.matrixWorld.determinant()<0){invertGeometry(targetGeometry)}return targetGeometry}}const common_functions=`

// A stack of uint32 indices can can store the indices for
// a perfectly balanced tree with a depth up to 31. Lower stack
// depth gets higher performance.
//
// However not all trees are balanced. Best value to set this to
// is the trees max depth.
#ifndef BVH_STACK_DEPTH
#define BVH_STACK_DEPTH 60
#endif

#ifndef INFINITY
#define INFINITY 1e20
#endif

// Utilities
uvec4 uTexelFetch1D( usampler2D tex, uint index ) {

	uint width = uint( textureSize( tex, 0 ).x );
	uvec2 uv;
	uv.x = index % width;
	uv.y = index / width;

	return texelFetch( tex, ivec2( uv ), 0 );

}

ivec4 iTexelFetch1D( isampler2D tex, uint index ) {

	uint width = uint( textureSize( tex, 0 ).x );
	uvec2 uv;
	uv.x = index % width;
	uv.y = index / width;

	return texelFetch( tex, ivec2( uv ), 0 );

}

vec4 texelFetch1D( sampler2D tex, uint index ) {

	uint width = uint( textureSize( tex, 0 ).x );
	uvec2 uv;
	uv.x = index % width;
	uv.y = index / width;

	return texelFetch( tex, ivec2( uv ), 0 );

}

vec4 textureSampleBarycoord( sampler2D tex, vec3 barycoord, uvec3 faceIndices ) {

	return
		barycoord.x * texelFetch1D( tex, faceIndices.x ) +
		barycoord.y * texelFetch1D( tex, faceIndices.y ) +
		barycoord.z * texelFetch1D( tex, faceIndices.z );

}

void ndcToCameraRay(
	vec2 coord, mat4 cameraWorld, mat4 invProjectionMatrix,
	out vec3 rayOrigin, out vec3 rayDirection
) {

	// get camera look direction and near plane for camera clipping
	vec4 lookDirection = cameraWorld * vec4( 0.0, 0.0, - 1.0, 0.0 );
	vec4 nearVector = invProjectionMatrix * vec4( 0.0, 0.0, - 1.0, 1.0 );
	float near = abs( nearVector.z / nearVector.w );

	// get the camera direction and position from camera matrices
	vec4 origin = cameraWorld * vec4( 0.0, 0.0, 0.0, 1.0 );
	vec4 direction = invProjectionMatrix * vec4( coord, 0.5, 1.0 );
	direction /= direction.w;
	direction = cameraWorld * direction - origin;

	// slide the origin along the ray until it sits at the near clip plane position
	origin.xyz += direction.xyz * near / dot( direction, lookDirection );

	rayOrigin = origin.xyz;
	rayDirection = direction.xyz;

}
`;const bvh_distance_functions=`

float dot2( vec3 v ) {

	return dot( v, v );

}

// https://www.shadertoy.com/view/ttfGWl
vec3 closestPointToTriangle( vec3 p, vec3 v0, vec3 v1, vec3 v2, out vec3 barycoord ) {

    vec3 v10 = v1 - v0;
    vec3 v21 = v2 - v1;
    vec3 v02 = v0 - v2;

	vec3 p0 = p - v0;
	vec3 p1 = p - v1;
	vec3 p2 = p - v2;

    vec3 nor = cross( v10, v02 );

    // method 2, in barycentric space
    vec3  q = cross( nor, p0 );
    float d = 1.0 / dot2( nor );
    float u = d * dot( q, v02 );
    float v = d * dot( q, v10 );
    float w = 1.0 - u - v;

	if( u < 0.0 ) {

		w = clamp( dot( p2, v02 ) / dot2( v02 ), 0.0, 1.0 );
		u = 0.0;
		v = 1.0 - w;

	} else if( v < 0.0 ) {

		u = clamp( dot( p0, v10 ) / dot2( v10 ), 0.0, 1.0 );
		v = 0.0;
		w = 1.0 - u;

	} else if( w < 0.0 ) {

		v = clamp( dot( p1, v21 ) / dot2( v21 ), 0.0, 1.0 );
		w = 0.0;
		u = 1.0-v;

	}

	barycoord = vec3( u, v, w );
    return u * v1 + v * v2 + w * v0;

}

float distanceToTriangles(
	// geometry info and triangle range
	sampler2D positionAttr, usampler2D indexAttr, uint offset, uint count,

	// point and cut off range
	vec3 point, float closestDistanceSquared,

	// outputs
	inout uvec4 faceIndices, inout vec3 faceNormal, inout vec3 barycoord, inout float side, inout vec3 outPoint
) {

	bool found = false;
	vec3 localBarycoord;
	for ( uint i = offset, l = offset + count; i < l; i ++ ) {

		uvec3 indices = uTexelFetch1D( indexAttr, i ).xyz;
		vec3 a = texelFetch1D( positionAttr, indices.x ).rgb;
		vec3 b = texelFetch1D( positionAttr, indices.y ).rgb;
		vec3 c = texelFetch1D( positionAttr, indices.z ).rgb;

		// get the closest point and barycoord
		vec3 closestPoint = closestPointToTriangle( point, a, b, c, localBarycoord );
		vec3 delta = point - closestPoint;
		float sqDist = dot2( delta );
		if ( sqDist < closestDistanceSquared ) {

			// set the output results
			closestDistanceSquared = sqDist;
			faceIndices = uvec4( indices.xyz, i );
			faceNormal = normalize( cross( a - b, b - c ) );
			barycoord = localBarycoord;
			outPoint = closestPoint;
			side = sign( dot( faceNormal, delta ) );

		}

	}

	return closestDistanceSquared;

}

float distanceSqToBounds( vec3 point, vec3 boundsMin, vec3 boundsMax ) {

	vec3 clampedPoint = clamp( point, boundsMin, boundsMax );
	vec3 delta = point - clampedPoint;
	return dot( delta, delta );

}

float distanceSqToBVHNodeBoundsPoint( vec3 point, sampler2D bvhBounds, uint currNodeIndex ) {

	uint cni2 = currNodeIndex * 2u;
	vec3 boundsMin = texelFetch1D( bvhBounds, cni2 ).xyz;
	vec3 boundsMax = texelFetch1D( bvhBounds, cni2 + 1u ).xyz;
	return distanceSqToBounds( point, boundsMin, boundsMax );

}

// use a macro to hide the fact that we need to expand the struct into separate fields
#define\
	bvhClosestPointToPoint(\
		bvh,\
		point, faceIndices, faceNormal, barycoord, side, outPoint\
	)\
	_bvhClosestPointToPoint(\
		bvh.position, bvh.index, bvh.bvhBounds, bvh.bvhContents,\
		point, faceIndices, faceNormal, barycoord, side, outPoint\
	)

float _bvhClosestPointToPoint(
	// bvh info
	sampler2D bvh_position, usampler2D bvh_index, sampler2D bvh_bvhBounds, usampler2D bvh_bvhContents,

	// point to check
	vec3 point,

	// output variables
	inout uvec4 faceIndices, inout vec3 faceNormal, inout vec3 barycoord,
	inout float side, inout vec3 outPoint
 ) {

	// stack needs to be twice as long as the deepest tree we expect because
	// we push both the left and right child onto the stack every traversal
	int ptr = 0;
	uint stack[ BVH_STACK_DEPTH ];
	stack[ 0 ] = 0u;

	float closestDistanceSquared = pow( 100000.0, 2.0 );
	bool found = false;
	while ( ptr > - 1 && ptr < BVH_STACK_DEPTH ) {

		uint currNodeIndex = stack[ ptr ];
		ptr --;

		// check if we intersect the current bounds
		float boundsHitDistance = distanceSqToBVHNodeBoundsPoint( point, bvh_bvhBounds, currNodeIndex );
		if ( boundsHitDistance > closestDistanceSquared ) {

			continue;

		}

		uvec2 boundsInfo = uTexelFetch1D( bvh_bvhContents, currNodeIndex ).xy;
		bool isLeaf = bool( boundsInfo.x & 0xffff0000u );
		if ( isLeaf ) {

			uint count = boundsInfo.x & 0x0000ffffu;
			uint offset = boundsInfo.y;
			closestDistanceSquared = distanceToTriangles(
				bvh_position, bvh_index, offset, count, point, closestDistanceSquared,

				// outputs
				faceIndices, faceNormal, barycoord, side, outPoint
			);

		} else {

			uint leftIndex = currNodeIndex + 1u;
			uint splitAxis = boundsInfo.x & 0x0000ffffu;
			uint rightIndex = boundsInfo.y;
			bool leftToRight = distanceSqToBVHNodeBoundsPoint( point, bvh_bvhBounds, leftIndex ) < distanceSqToBVHNodeBoundsPoint( point, bvh_bvhBounds, rightIndex );//rayDirection[ splitAxis ] >= 0.0;
			uint c1 = leftToRight ? leftIndex : rightIndex;
			uint c2 = leftToRight ? rightIndex : leftIndex;

			// set c2 in the stack so we traverse it later. We need to keep track of a pointer in
			// the stack while we traverse. The second pointer added is the one that will be
			// traversed first
			ptr ++;
			stack[ ptr ] = c2;
			ptr ++;
			stack[ ptr ] = c1;

		}

	}

	return sqrt( closestDistanceSquared );

}
`;const bvh_ray_functions=`

#ifndef TRI_INTERSECT_EPSILON
#define TRI_INTERSECT_EPSILON 1e-5
#endif

// Raycasting
bool intersectsBounds( vec3 rayOrigin, vec3 rayDirection, vec3 boundsMin, vec3 boundsMax, out float dist ) {

	// https://www.reddit.com/r/opengl/comments/8ntzz5/fast_glsl_ray_box_intersection/
	// https://tavianator.com/2011/ray_box.html
	vec3 invDir = 1.0 / rayDirection;

	// find intersection distances for each plane
	vec3 tMinPlane = invDir * ( boundsMin - rayOrigin );
	vec3 tMaxPlane = invDir * ( boundsMax - rayOrigin );

	// get the min and max distances from each intersection
	vec3 tMinHit = min( tMaxPlane, tMinPlane );
	vec3 tMaxHit = max( tMaxPlane, tMinPlane );

	// get the furthest hit distance
	vec2 t = max( tMinHit.xx, tMinHit.yz );
	float t0 = max( t.x, t.y );

	// get the minimum hit distance
	t = min( tMaxHit.xx, tMaxHit.yz );
	float t1 = min( t.x, t.y );

	// set distance to 0.0 if the ray starts inside the box
	dist = max( t0, 0.0 );

	return t1 >= dist;

}

bool intersectsTriangle(
	vec3 rayOrigin, vec3 rayDirection, vec3 a, vec3 b, vec3 c,
	out vec3 barycoord, out vec3 norm, out float dist, out float side
) {

	// https://stackoverflow.com/questions/42740765/intersection-between-line-and-triangle-in-3d
	vec3 edge1 = b - a;
	vec3 edge2 = c - a;
	norm = cross( edge1, edge2 );

	float det = - dot( rayDirection, norm );
	float invdet = 1.0 / det;

	vec3 AO = rayOrigin - a;
	vec3 DAO = cross( AO, rayDirection );

	vec4 uvt;
	uvt.x = dot( edge2, DAO ) * invdet;
	uvt.y = - dot( edge1, DAO ) * invdet;
	uvt.z = dot( AO, norm ) * invdet;
	uvt.w = 1.0 - uvt.x - uvt.y;

	// set the hit information
	barycoord = uvt.wxy; // arranged in A, B, C order
	dist = uvt.z;
	side = sign( det );
	norm = side * normalize( norm );

	// add an epsilon to avoid misses between triangles
	uvt += vec4( TRI_INTERSECT_EPSILON );

	return all( greaterThanEqual( uvt, vec4( 0.0 ) ) );

}

bool intersectTriangles(
	// geometry info and triangle range
	sampler2D positionAttr, usampler2D indexAttr, uint offset, uint count,

	// ray
	vec3 rayOrigin, vec3 rayDirection,

	// outputs
	inout float minDistance, inout uvec4 faceIndices, inout vec3 faceNormal, inout vec3 barycoord,
	inout float side, inout float dist
) {

	bool found = false;
	vec3 localBarycoord, localNormal;
	float localDist, localSide;
	for ( uint i = offset, l = offset + count; i < l; i ++ ) {

		uvec3 indices = uTexelFetch1D( indexAttr, i ).xyz;
		vec3 a = texelFetch1D( positionAttr, indices.x ).rgb;
		vec3 b = texelFetch1D( positionAttr, indices.y ).rgb;
		vec3 c = texelFetch1D( positionAttr, indices.z ).rgb;

		if (
			intersectsTriangle( rayOrigin, rayDirection, a, b, c, localBarycoord, localNormal, localDist, localSide )
			&& localDist < minDistance
		) {

			found = true;
			minDistance = localDist;

			faceIndices = uvec4( indices.xyz, i );
			faceNormal = localNormal;

			side = localSide;
			barycoord = localBarycoord;
			dist = localDist;

		}

	}

	return found;

}

bool intersectsBVHNodeBounds( vec3 rayOrigin, vec3 rayDirection, sampler2D bvhBounds, uint currNodeIndex, out float dist ) {

	uint cni2 = currNodeIndex * 2u;
	vec3 boundsMin = texelFetch1D( bvhBounds, cni2 ).xyz;
	vec3 boundsMax = texelFetch1D( bvhBounds, cni2 + 1u ).xyz;
	return intersectsBounds( rayOrigin, rayDirection, boundsMin, boundsMax, dist );

}

// use a macro to hide the fact that we need to expand the struct into separate fields
#define\
	bvhIntersectFirstHit(\
		bvh,\
		rayOrigin, rayDirection, faceIndices, faceNormal, barycoord, side, dist\
	)\
	_bvhIntersectFirstHit(\
		bvh.position, bvh.index, bvh.bvhBounds, bvh.bvhContents,\
		rayOrigin, rayDirection, faceIndices, faceNormal, barycoord, side, dist\
	)

bool _bvhIntersectFirstHit(
	// bvh info
	sampler2D bvh_position, usampler2D bvh_index, sampler2D bvh_bvhBounds, usampler2D bvh_bvhContents,

	// ray
	vec3 rayOrigin, vec3 rayDirection,

	// output variables split into separate variables due to output precision
	inout uvec4 faceIndices, inout vec3 faceNormal, inout vec3 barycoord,
	inout float side, inout float dist
) {

	// stack needs to be twice as long as the deepest tree we expect because
	// we push both the left and right child onto the stack every traversal
	int ptr = 0;
	uint stack[ BVH_STACK_DEPTH ];
	stack[ 0 ] = 0u;

	float triangleDistance = INFINITY;
	bool found = false;
	while ( ptr > - 1 && ptr < BVH_STACK_DEPTH ) {

		uint currNodeIndex = stack[ ptr ];
		ptr --;

		// check if we intersect the current bounds
		float boundsHitDistance;
		if (
			! intersectsBVHNodeBounds( rayOrigin, rayDirection, bvh_bvhBounds, currNodeIndex, boundsHitDistance )
			|| boundsHitDistance > triangleDistance
		) {

			continue;

		}

		uvec2 boundsInfo = uTexelFetch1D( bvh_bvhContents, currNodeIndex ).xy;
		bool isLeaf = bool( boundsInfo.x & 0xffff0000u );

		if ( isLeaf ) {

			uint count = boundsInfo.x & 0x0000ffffu;
			uint offset = boundsInfo.y;

			found = intersectTriangles(
				bvh_position, bvh_index, offset, count,
				rayOrigin, rayDirection, triangleDistance,
				faceIndices, faceNormal, barycoord, side, dist
			) || found;

		} else {

			uint leftIndex = currNodeIndex + 1u;
			uint splitAxis = boundsInfo.x & 0x0000ffffu;
			uint rightIndex = boundsInfo.y;

			bool leftToRight = rayDirection[ splitAxis ] >= 0.0;
			uint c1 = leftToRight ? leftIndex : rightIndex;
			uint c2 = leftToRight ? rightIndex : leftIndex;

			// set c2 in the stack so we traverse it later. We need to keep track of a pointer in
			// the stack while we traverse. The second pointer added is the one that will be
			// traversed first
			ptr ++;
			stack[ ptr ] = c2;

			ptr ++;
			stack[ ptr ] = c1;

		}

	}

	return found;

}
`;const bvh_struct_definitions=`
struct BVH {

	usampler2D index;
	sampler2D position;

	sampler2D bvhBounds;
	usampler2D bvhContents;

};
`;var BVHShaderGLSL=Object.freeze({__proto__:null,bvh_distance_functions:bvh_distance_functions,bvh_ray_functions:bvh_ray_functions,bvh_struct_definitions:bvh_struct_definitions,common_functions:common_functions});const shaderStructs=bvh_struct_definitions;const shaderDistanceFunction=bvh_distance_functions;const shaderIntersectFunction=`
	${common_functions}
	${bvh_ray_functions}
`;exports.AVERAGE=AVERAGE;exports.BVHShaderGLSL=BVHShaderGLSL;exports.CENTER=CENTER;exports.CONTAINED=CONTAINED;exports.ExtendedTriangle=ExtendedTriangle;exports.FloatVertexAttributeTexture=FloatVertexAttributeTexture;exports.INTERSECTED=INTERSECTED;exports.IntVertexAttributeTexture=IntVertexAttributeTexture;exports.MeshBVH=MeshBVH;exports.MeshBVHHelper=MeshBVHHelper;exports.MeshBVHUniformStruct=MeshBVHUniformStruct;exports.NOT_INTERSECTED=NOT_INTERSECTED;exports.OrientedBox=OrientedBox;exports.SAH=SAH;exports.StaticGeometryGenerator=StaticGeometryGenerator;exports.UIntVertexAttributeTexture=UIntVertexAttributeTexture;exports.VertexAttributeTexture=VertexAttributeTexture;exports.acceleratedRaycast=acceleratedRaycast;exports.computeBoundsTree=computeBoundsTree;exports.disposeBoundsTree=disposeBoundsTree;exports.estimateMemoryInBytes=estimateMemoryInBytes;exports.getBVHExtremes=getBVHExtremes;exports.getJSONStructure=getJSONStructure;exports.getTriangleHitPointInfo=getTriangleHitPointInfo;exports.shaderDistanceFunction=shaderDistanceFunction;exports.shaderIntersectFunction=shaderIntersectFunction;exports.shaderStructs=shaderStructs;exports.validateBounds=validateBounds;Object.defineProperty(exports,"__esModule",{value:true});three.BufferGeometry.prototype.computeBoundsTree=computeBoundsTree;three.BufferGeometry.prototype.disposeBoundsTree=disposeBoundsTree;three.Mesh.prototype.raycast=acceleratedRaycast});THREE.MeshoptDecoder=function(){"use strict";var wasm_base="b9H79Tebbbe8Fv9Gbb9Gvuuuuueu9Giuuub9Geueu9Giuuueuikqbeeedddillviebeoweuec:q;iekr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbeY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVbdE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbiL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtblK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbol79IV9Rbrq:P8Yqdbk;3sezu8Jjjjjbcj;eb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Radz1jjjbhwcj;abad9UhoaicefhldnadTmbaoc;WFbGgocjdaocjd6EhDcbhqinaqae9pmeaDaeaq9RaqaDfae6Egkcsfgocl4cifcd4hxdndndndnaoc9WGgmTmbcbhPcehsawcjdfhzalhHinaraH9Rax6midnaraHaxfgl9RcK6mbczhoinawcj;cbfaogifgoc9WfhOdndndndndnaHaic9WfgAco4fRbbaAci4coG4ciGPlbedibkaO9cb83ibaOcwf9cb83ibxikaOalRblalRbbgAco4gCaCciSgCE86bbaocGfalclfaCfgORbbaAcl4ciGgCaCciSgCE86bbaocVfaOaCfgORbbaAcd4ciGgCaCciSgCE86bbaoc7faOaCfgORbbaAciGgAaAciSgAE86bbaoctfaOaAfgARbbalRbegOco4gCaCciSgCE86bbaoc91faAaCfgARbbaOcl4ciGgCaCciSgCE86bbaoc4faAaCfgARbbaOcd4ciGgCaCciSgCE86bbaoc93faAaCfgARbbaOciGgOaOciSgOE86bbaoc94faAaOfgARbbalRbdgOco4gCaCciSgCE86bbaoc95faAaCfgARbbaOcl4ciGgCaCciSgCE86bbaoc96faAaCfgARbbaOcd4ciGgCaCciSgCE86bbaoc97faAaCfgARbbaOciGgOaOciSgOE86bbaoc98faAaOfgORbbalRbiglco4gAaAciSgAE86bbaoc99faOaAfgORbbalcl4ciGgAaAciSgAE86bbaoc9:faOaAfgORbbalcd4ciGgAaAciSgAE86bbaocufaOaAfgoRbbalciGglalciSglE86bbaoalfhlxdkaOalRbwalRbbgAcl4gCaCcsSgCE86bbaocGfalcwfaCfgORbbaAcsGgAaAcsSgAE86bbaocVfaOaAfgORbbalRbegAcl4gCaCcsSgCE86bbaoc7faOaCfgORbbaAcsGgAaAcsSgAE86bbaoctfaOaAfgORbbalRbdgAcl4gCaCcsSgCE86bbaoc91faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc4faOaAfgORbbalRbigAcl4gCaCcsSgCE86bbaoc93faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc94faOaAfgORbbalRblgAcl4gCaCcsSgCE86bbaoc95faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc96faOaAfgORbbalRbvgAcl4gCaCcsSgCE86bbaoc97faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc98faOaAfgORbbalRbogAcl4gCaCcsSgCE86bbaoc99faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc9:faOaAfgORbbalRbrglcl4gAaAcsSgAE86bbaocufaOaAfgoRbbalcsGglalcsSglE86bbaoalfhlxekaOal8Pbb83bbaOcwfalcwf8Pbb83bbalczfhlkdnaiam9pmbaiczfhoaral9RcL0mekkaiam6mialTmidnakTmbawaPfRbbhOcbhoazhiinaiawcj;cbfaofRbbgAce4cbaAceG9R7aOfgO86bbaiadfhiaocefgoak9hmbkkazcefhzaPcefgPad6hsalhHaPad9hmexvkkcbhlasceGmdxikalaxad2fhCdnakTmbcbhHcehsawcjdfhminaral9Rax6mialTmdalaxfhlawaHfRbbhOcbhoamhiinaiawcj;cbfaofRbbgAce4cbaAceG9R7aOfgO86bbaiadfhiaocefgoak9hmbkamcefhmaHcefgHad6hsaHad9hmbkaChlxikcbhocehsinaral9Rax6mdalTmealaxfhlaocefgoad6hsadao9hmbkaChlxdkcbhlasceGTmekc9:hoxikabaqad2fawcjdfakad2z1jjjb8Aawawcjdfakcufad2fadz1jjjb8Aakaqfhqalmbkc9:hoxekcbc99aral9Radcaadca0ESEhokavcj;ebf8Kjjjjbaok;yzeHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecjez:jjjjb8AavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhodnaeTmbcmcsaDceSEhkcbhxcbhmcbhDcbhicbhlindnaoaq9nmbc9:hoxikdndnawRbbgrc;Ve0mbavc;abfalarcl4cu7fcsGcitfgPydlhsaPydbhzdnarcsGgPak9pmbavaiarcu7fcsGcdtfydbaxaPEhraPThPdndnadcd9hmbabaDcetfgHaz87ebaHcdfas87ebaHclfar87ebxekabaDcdtfgHazBdbaHclfasBdbaHcwfarBdbkaxaPfhxavc;abfalcitfgHarBdbaHasBdlavaicdtfarBdbavc;abfalcefcsGglcitfgHazBdbaHarBdlaiaPfhialcefhlxdkdndnaPcsSmbamaPfaPc987fcefhmxekaocefhrao8SbbgPcFeGhHdndnaPcu9mmbarhoxekaocvfhoaHcFbGhHcrhPdninar8SbbgOcFbGaPtaHVhHaOcu9kmearcefhraPcrfgPc8J9hmbxdkkarcefhokaHce4cbaHceG9R7amfhmkdndnadcd9hmbabaDcetfgraz87ebarcdfas87ebarclfam87ebxekabaDcdtfgrazBdbarclfasBdbarcwfamBdbkavc;abfalcitfgramBdbarasBdlavaicdtfamBdbavc;abfalcefcsGglcitfgrazBdbaramBdlaicefhialcefhlxekdnarcpe0mbaxcefgOavaiaqarcsGfRbbgPcl49RcsGcdtfydbaPcz6gHEhravaiaP9RcsGcdtfydbaOaHfgsaPcsGgOEhPaOThOdndnadcd9hmbabaDcetfgzax87ebazcdfar87ebazclfaP87ebxekabaDcdtfgzaxBdbazclfarBdbazcwfaPBdbkavaicdtfaxBdbavc;abfalcitfgzarBdbazaxBdlavaicefgicsGcdtfarBdbavc;abfalcefcsGcitfgzaPBdbazarBdlavaiaHfcsGgicdtfaPBdbavc;abfalcdfcsGglcitfgraxBdbaraPBdlalcefhlaiaOfhiasaOfhxxekaxcbaoRbbgzEgAarc;:eSgrfhsazcsGhCazcl4hXdndnazcs0mbascefhOxekashOavaiaX9RcsGcdtfydbhskdndnaCmbaOcefhxxekaOhxavaiaz9RcsGcdtfydbhOkdndnarTmbaocefhrxekaocdfhrao8SbegHcFeGhPdnaHcu9kmbaocofhAaPcFbGhPcrhodninar8SbbgHcFbGaotaPVhPaHcu9kmearcefhraocrfgoc8J9hmbkaAhrxekarcefhrkaPce4cbaPceG9R7amfgmhAkdndnaXcsSmbarhPxekarcefhPar8SbbgocFeGhHdnaocu9kmbarcvfhsaHcFbGhHcrhodninaP8SbbgrcFbGaotaHVhHarcu9kmeaPcefhPaocrfgoc8J9hmbkashPxekaPcefhPkaHce4cbaHceG9R7amfgmhskdndnaCcsSmbaPhoxekaPcefhoaP8SbbgrcFeGhHdnarcu9kmbaPcvfhOaHcFbGhHcrhrdninao8SbbgPcFbGartaHVhHaPcu9kmeaocefhoarcrfgrc8J9hmbkaOhoxekaocefhokaHce4cbaHceG9R7amfgmhOkdndnadcd9hmbabaDcetfgraA87ebarcdfas87ebarclfaO87ebxekabaDcdtfgraABdbarclfasBdbarcwfaOBdbkavc;abfalcitfgrasBdbaraABdlavaicdtfaABdbavc;abfalcefcsGcitfgraOBdbarasBdlavaicefgicsGcdtfasBdbavc;abfalcdfcsGcitfgraABdbaraOBdlavaiazcz6aXcsSVfgicsGcdtfaOBdbaiaCTaCcsSVfhialcifhlkawcefhwalcsGhlaicsGhiaDcifgDae6mbkkcbc99aoaqSEhokavc;aef8Kjjjjbaok:llevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:Lvoeue99dud99eud99dndnadcl9hmbaeTmeindndnabcdfgd8Sbb:Yab8Sbbgi:Ygl:l:tabcefgv8Sbbgo:Ygr:l:tgwJbb;:9cawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai86bbdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad86bbdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad86bbabclfhbaecufgembxdkkaeTmbindndnabclfgd8Ueb:Yab8Uebgi:Ygl:l:tabcdfgv8Uebgo:Ygr:l:tgwJb;:FSawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai87ebdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad87ebdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad87ebabcwfhbaecufgembkkk;siliui99iue99dnaeTmbcbhiabhlindndnJ;Zl81Zalcof8UebgvciV:Y:vgoal8Ueb:YNgrJb;:FSNJbbbZJbbb:;arJbbbb9GEMgw:lJbbb9p9DTmbaw:OhDxekcjjjj94hDkalclf8Uebhqalcdf8UebhkabavcefciGaiVcetfaD87ebdndnaoak:YNgwJb;:FSNJbbbZJbbb:;awJbbbb9GEMgx:lJbbb9p9DTmbax:Ohkxekcjjjj94hkkabavcdfciGaiVcetfak87ebdndnaoaq:YNgoJb;:FSNJbbbZJbbb:;aoJbbbb9GEMgx:lJbbb9p9DTmbax:Ohqxekcjjjj94hqkabavcufciGaiVcetfaq87ebdndnJbbjZararN:tawawN:taoaoN:tgrJbbbbarJbbbb9GE:rJb;:FSNJbbbZMgr:lJbbb9p9DTmbar:Ohqxekcjjjj94hqkabavciGaiVcetfaq87ebalcwfhlaiclfhiaecufgembkkk9mbdnadcd4ae2geTmbinababydbgdcwtcw91:Yadce91cjjj;8ifcjjj98G::NUdbabclfhbaecufgembkkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaiczfhiaeczfheadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabkkkebcjwklz9Kbb";var wasm_simd="b9H79TebbbeKl9Gbb9Gvuuuuueu9Giuuub9Geueuikqbbebeedddilve9Weeeviebeoweuec:q;Aekr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbdY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVblE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtboK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbrL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbwl79IV9RbDq;t9tqlbzik9:evu8Jjjjjbcz9Rhbcbheincbhdcbhiinabcwfadfaicjuaead4ceGglE86bbaialfhiadcefgdcw9hmbkaec:q:yjjbfai86bbaecitc:q1jjbfab8Piw83ibaecefgecjd9hmbkk;h8JlHud97euo978Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Rad;8qbbcj;abad9UhoaicefhldnadTmbaoc;WFbGgocjdaocjd6EhwcbhDinaDae9pmeawaeaD9RaDawfae6Egqcsfgoc9WGgkci2hxakcethmaocl4cifcd4hPabaDad2fhscbhzdnincehHalhOcbhAdninaraO9RaP6miavcj;cbfaAak2fhCaOaPfhlcbhidnakc;ab6mbaral9Rc;Gb6mbcbhoinaCaofhidndndndndnaOaoco4fRbbgXciGPlbedibkaipxbbbbbbbbbbbbbbbbpklbxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklbalczfhlkdndndndndnaXcd4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklzxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklzalczfhlkdndndndndnaXcl4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklaxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklaalczfhlkdndndndndnaXco4Plbedibkaipxbbbbbbbbbbbbbbbbpkl8WxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WalclfaYpQbfaXc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WalcwfaYpQbfaXc:q:yjjbfRbbfhlxekaialpbbbpkl8Walczfhlkaoc;abfhiaocjefak0meaihoaral9Rc;Fb0mbkkdndnaiak9pmbaici4hoinaral9RcK6mdaCaifhXdndndndndnaOaico4fRbbaocoG4ciGPlbedibkaXpxbbbbbbbbbbbbbbbbpklbxikaXalpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaXalpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaXalpbbbpklbalczfhlkaocdfhoaiczfgiak6mbkkalTmbaAci6hHalhOaAcefgohAaoclSmdxekkcbhlaHceGmdkdnakTmbavcjdfazfhiavazfpbdbhYcbhXinaiavcj;cbfaXfgopblbgLcep9TaLpxeeeeeeeeeeeeeeeegQp9op9Hp9rgLaoakfpblbg8Acep9Ta8AaQp9op9Hp9rg8ApmbzeHdOiAlCvXoQrLgEaoamfpblbg3cep9Ta3aQp9op9Hp9rg3aoaxfpblbg5cep9Ta5aQp9op9Hp9rg5pmbzeHdOiAlCvXoQrLg8EpmbezHdiOAlvCXorQLgQaQpmbedibedibedibediaYp9UgYp9AdbbaiadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfgoaYaEa8EpmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaoadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfgoaYaLa8ApmwKDYq8AkEx3m5P8Es8FgLa3a5pmwKDYq8AkEx3m5P8Es8Fg8ApmbezHdiOAlvCXorQLgQaQpmbedibedibedibedip9UgYp9AdbbaoadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfgoaYaLa8ApmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaoadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfhiaXczfgXak6mbkkazclfgzad6mbkasavcjdfaqad2;8qbbavavcjdfaqcufad2fad;8qbbaqaDfhDc9:hoalmexikkc9:hoxekcbc99aral9Radcaadca0ESEhokavcj;kbf8Kjjjjbaokwbz:bjjjbk;uzeHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecje;8kbavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhodnaeTmbcmcsaDceSEhkcbhxcbhmcbhDcbhicbhlindnaoaq9nmbc9:hoxikdndnawRbbgrc;Ve0mbavc;abfalarcl4cu7fcsGcitfgPydlhsaPydbhzdnarcsGgPak9pmbavaiarcu7fcsGcdtfydbaxaPEhraPThPdndnadcd9hmbabaDcetfgHaz87ebaHcdfas87ebaHclfar87ebxekabaDcdtfgHazBdbaHclfasBdbaHcwfarBdbkaxaPfhxavc;abfalcitfgHarBdbaHasBdlavaicdtfarBdbavc;abfalcefcsGglcitfgHazBdbaHarBdlaiaPfhialcefhlxdkdndnaPcsSmbamaPfaPc987fcefhmxekaocefhrao8SbbgPcFeGhHdndnaPcu9mmbarhoxekaocvfhoaHcFbGhHcrhPdninar8SbbgOcFbGaPtaHVhHaOcu9kmearcefhraPcrfgPc8J9hmbxdkkarcefhokaHce4cbaHceG9R7amfhmkdndnadcd9hmbabaDcetfgraz87ebarcdfas87ebarclfam87ebxekabaDcdtfgrazBdbarclfasBdbarcwfamBdbkavc;abfalcitfgramBdbarasBdlavaicdtfamBdbavc;abfalcefcsGglcitfgrazBdbaramBdlaicefhialcefhlxekdnarcpe0mbaxcefgOavaiaqarcsGfRbbgPcl49RcsGcdtfydbaPcz6gHEhravaiaP9RcsGcdtfydbaOaHfgsaPcsGgOEhPaOThOdndnadcd9hmbabaDcetfgzax87ebazcdfar87ebazclfaP87ebxekabaDcdtfgzaxBdbazclfarBdbazcwfaPBdbkavaicdtfaxBdbavc;abfalcitfgzarBdbazaxBdlavaicefgicsGcdtfarBdbavc;abfalcefcsGcitfgzaPBdbazarBdlavaiaHfcsGgicdtfaPBdbavc;abfalcdfcsGglcitfgraxBdbaraPBdlalcefhlaiaOfhiasaOfhxxekaxcbaoRbbgzEgAarc;:eSgrfhsazcsGhCazcl4hXdndnazcs0mbascefhOxekashOavaiaX9RcsGcdtfydbhskdndnaCmbaOcefhxxekaOhxavaiaz9RcsGcdtfydbhOkdndnarTmbaocefhrxekaocdfhrao8SbegHcFeGhPdnaHcu9kmbaocofhAaPcFbGhPcrhodninar8SbbgHcFbGaotaPVhPaHcu9kmearcefhraocrfgoc8J9hmbkaAhrxekarcefhrkaPce4cbaPceG9R7amfgmhAkdndnaXcsSmbarhPxekarcefhPar8SbbgocFeGhHdnaocu9kmbarcvfhsaHcFbGhHcrhodninaP8SbbgrcFbGaotaHVhHarcu9kmeaPcefhPaocrfgoc8J9hmbkashPxekaPcefhPkaHce4cbaHceG9R7amfgmhskdndnaCcsSmbaPhoxekaPcefhoaP8SbbgrcFeGhHdnarcu9kmbaPcvfhOaHcFbGhHcrhrdninao8SbbgPcFbGartaHVhHaPcu9kmeaocefhoarcrfgrc8J9hmbkaOhoxekaocefhokaHce4cbaHceG9R7amfgmhOkdndnadcd9hmbabaDcetfgraA87ebarcdfas87ebarclfaO87ebxekabaDcdtfgraABdbarclfasBdbarcwfaOBdbkavc;abfalcitfgrasBdbaraABdlavaicdtfaABdbavc;abfalcefcsGcitfgraOBdbarasBdlavaicefgicsGcdtfasBdbavc;abfalcdfcsGcitfgraABdbaraOBdlavaiazcz6aXcsSVfgicsGcdtfaOBdbaiaCTaCcsSVfhialcifhlkawcefhwalcsGhlaicsGhiaDcifgDae6mbkkcbc99aoaqSEhokavc;aef8Kjjjjbaok:llevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:EPliuo97eue978Jjjjjbca9Rhidndnadcl9hmbdnaec98GglTmbcbhvabhdinadadpbbbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDpxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpkbbadczfhdavclfgval6mbkkalae9pmeaiaeciGgvcdtgdVcbczad9R;8kbaiabalcdtfglad;8qbbdnavTmbaiaipblbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDpxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpklbkalaiad;8qbbskdnaec98GgxTmbcbhvabhdinadczfglalpbbbgopxbbbbbbFFbbbbbbFFgkp9oadpbbbgDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eaDaopmbediwDqkzHOAKY8AEgoczp:Sep;6egrp;Geaoczp:Reczp:Sep;6egwp;Gep;Kep;Legopxb;:FSb;:FSb;:FSb;:FSawaopxbbbbbbbbbbbbbbbbp:2egqawpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegwawp;Meaoaop;Mearaqaramp9op9rp;Kegoaop;Mep;Kep;Kep;Jep;Negrp;Mepxbbn0bbn0bbn0bbn0gqp;Keczp:Reawarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9op9qgwaoarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogopmwDKYqk8AExm35Ps8E8Fp9qpkbbadaDakp9oawaopmbezHdiOAlvCXorQLp9qpkbbadcafhdavclfgvax6mbkkaxae9pmbaiaeciGgvcitgdfcbcaad9R;8kbaiabaxcitfglad;8qbbdnavTmbaiaipblzgopxbbbbbbFFbbbbbbFFgkp9oaipblbgDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eaDaopmbediwDqkzHOAKY8AEgoczp:Sep;6egrp;Geaoczp:Reczp:Sep;6egwp;Gep;Kep;Legopxb;:FSb;:FSb;:FSb;:FSawaopxbbbbbbbbbbbbbbbbp:2egqawpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegwawp;Meaoaop;Mearaqaramp9op9rp;Kegoaop;Mep;Kep;Kep;Jep;Negrp;Mepxbbn0bbn0bbn0bbn0gqp;Keczp:Reawarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9op9qgwaoarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogopmwDKYqk8AExm35Ps8E8Fp9qpklzaiaDakp9oawaopmbezHdiOAlvCXorQLp9qpklbkalaiad;8qbbkk;4wllue97euv978Jjjjjbc8W9Rhidnaec98GglTmbcbhvabhoinaiaopbbbgraoczfgwpbbbgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklbaopxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaqakp;Mearp;Keczp:ReaDakp;Mearp;Keamp9op9qgkpmbezHdiOAlvCXorQLgrp5baipblbpEb:T:j83ibaocwfarp5eaipblbpEe:T:j83ibawaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblbpEd:T:j83ibaocKfakp5eaipblbpEi:T:j83ibaocafhoavclfgval6mbkkdnalae9pmbaiaeciGgvcitgofcbcaao9R;8kbaiabalcitfgwao;8qbbdnavTmbaiaipblbgraipblzgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklaaipxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaqakp;Mearp;Keczp:ReaDakp;Mearp;Keamp9op9qgkpmbezHdiOAlvCXorQLgrp5baipblapEb:T:j83ibaiarp5eaipblapEe:T:j83iwaiaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblapEd:T:j83izaiakp5eaipblapEi:T:j83iKkawaiao;8qbbkk:Pddiue978Jjjjjbc;ab9Rhidnadcd4ae2glc98GgvTmbcbhdabheinaeaepbbbgocwp:Recwp:Sep;6eaocep:SepxbbjZbbjZbbjZbbjZp:UepxbbjFbbjFbbjFbbjFp9op;Mepkbbaeczfheadclfgdav6mbkkdnaval9pmbaialciGgdcdtgeVcbc;abae9R;8kbaiabavcdtfgvae;8qbbdnadTmbaiaipblbgocwp:Recwp:Sep;6eaocep:SepxbbjZbbjZbbjZbbjZp:UepxbbjFbbjFbbjFbbjFp9op;Mepklbkavaiae;8qbbkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikkkebcjwklz9Tbb";var detector=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]);var wasmpack=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!=="object"){return{supported:false}}var wasm=WebAssembly.validate(detector)?wasm_simd:wasm_base;var instance;var ready=WebAssembly.instantiate(unpack(wasm),{}).then(function(result){instance=result.instance;instance.exports.__wasm_call_ctors()});function unpack(data){var result=new Uint8Array(data.length);for(var i=0;i<data.length;++i){var ch=data.charCodeAt(i);result[i]=ch>96?ch-97:ch>64?ch-39:ch+4}var write=0;for(var i=0;i<data.length;++i){result[write++]=result[i]<60?wasmpack[result[i]]:(result[i]-60)*64+result[++i]}return result.buffer.slice(0,write)}function decode(fun,target,count,size,source,filter){var sbrk=instance.exports.sbrk;var count4=count+3&~3;var tp=sbrk(count4*size);var sp=sbrk(source.length);var heap=new Uint8Array(instance.exports.memory.buffer);heap.set(source,sp);var res=fun(tp,count,size,sp,source.length);if(res==0&&filter){filter(tp,count4,size)}target.set(heap.subarray(tp,tp+count*size));sbrk(tp-sbrk(0));if(res!=0){throw new Error("Malformed buffer data: "+res)}}var filters={NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"};var decoders={ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};var workers=[];var requestId=0;function createWorker(url){var worker={object:new Worker(url),pending:0,requests:{}};worker.object.onmessage=function(event){var data=event.data;worker.pending-=data.count;worker.requests[data.id][data.action](data.value);delete worker.requests[data.id]};return worker}function initWorkers(count){var source="var instance; var ready = WebAssembly.instantiate(new Uint8Array(["+new Uint8Array(unpack(wasm))+"]), {})"+".then(function(result) { instance = result.instance; instance.exports.__wasm_call_ctors(); });"+"self.onmessage = workerProcess;"+decode.toString()+workerProcess.toString();var blob=new Blob([source],{type:"text/javascript"});var url=URL.createObjectURL(blob);for(var i=0;i<count;++i){workers[i]=createWorker(url)}URL.revokeObjectURL(url)}function decodeWorker(count,size,source,mode,filter){var worker=workers[0];for(var i=1;i<workers.length;++i){if(workers[i].pending<worker.pending){worker=workers[i]}}return new Promise(function(resolve,reject){var data=new Uint8Array(source);var id=requestId++;worker.pending+=count;worker.requests[id]={resolve:resolve,reject:reject};worker.object.postMessage({id:id,count:count,size:size,source:data,mode:mode,filter:filter},[data.buffer])})}function workerProcess(event){ready.then(function(){var data=event.data;try{var target=new Uint8Array(data.count*data.size);decode(instance.exports[data.mode],target,data.count,data.size,data.source,instance.exports[data.filter]);self.postMessage({id:data.id,count:data.count,action:"resolve",value:target},[target.buffer])}catch(error){self.postMessage({id:data.id,count:data.count,action:"reject",value:error})}})}return{ready:ready,supported:true,useWorkers:function(count){initWorkers(count)},decodeVertexBuffer:function(target,count,size,source,filter){decode(instance.exports.meshopt_decodeVertexBuffer,target,count,size,source,instance.exports[filters[filter]])},decodeIndexBuffer:function(target,count,size,source){decode(instance.exports.meshopt_decodeIndexBuffer,target,count,size,source)},decodeIndexSequence:function(target,count,size,source){decode(instance.exports.meshopt_decodeIndexSequence,target,count,size,source)},decodeGltfBuffer:function(target,count,size,source,mode,filter){decode(instance.exports[decoders[mode]],target,count,size,source,instance.exports[filters[filter]])},decodeGltfBufferAsync:function(count,size,source,mode,filter){if(workers.length>0){return decodeWorker(count,size,source,decoders[mode],filters[filter])}return ready.then(function(){var target=new Uint8Array(count*size);decode(instance.exports[decoders[mode]],target,count,size,source,instance.exports[filters[filter]]);return target})}}}();(function(t,e){e(t.THREE=t.THREE||{})})(this,function(THREE){var Color=THREE.Color,Vector3=THREE.Vector3;class Face3{constructor(a,b,c,normal,color,materialIndex=0){this.a=a;this.b=b;this.c=c;this.normal=normal&&normal.isVector3?normal:new Vector3;this.vertexNormals=Array.isArray(normal)?normal:[];this.color=color&&color.isColor?color:new Color;this.vertexColors=Array.isArray(color)?color:[];this.materialIndex=materialIndex}clone(){return new this.constructor().copy(this)}copy(source){this.a=source.a;this.b=source.b;this.c=source.c;this.normal.copy(source.normal);this.color.copy(source.color);this.materialIndex=source.materialIndex;for(let i=0,il=source.vertexNormals.length;i<il;i++){this.vertexNormals[i]=source.vertexNormals[i].clone()}for(let i=0,il=source.vertexColors.length;i<il;i++){this.vertexColors[i]=source.vertexColors[i].clone()}return this}}THREE.Face3=Face3});(function(t,e){e(t.THREE=t.THREE||{})})(this,function(THREE){var Box3=THREE.Box3,BufferAttribute=THREE.BufferAttribute,BufferGeometry=THREE.BufferGeometry,Color=THREE.Color,EventDispatcher=THREE.EventDispatcher,Float32BufferAttribute=THREE.Float32BufferAttribute,Matrix3=THREE.Matrix3,Matrix4=THREE.Matrix4,MathUtils=THREE.MathUtils,Object3D=THREE.Object3D,Sphere=THREE.Sphere,Vector2=THREE.Vector2,Vector3=THREE.Vector3;const _m1=new Matrix4;const _obj=new Object3D;const _offset=new Vector3;class Geometry extends EventDispatcher{constructor(){super();this.uuid=MathUtils.generateUUID();this.name="";this.type="Geometry";this.vertices=[];this.colors=[];this.faces=[];this.faceVertexUvs=[[]];this.morphTargets=[];this.morphNormals=[];this.skinWeights=[];this.skinIndices=[];this.lineDistances=[];this.boundingBox=null;this.boundingSphere=null;this.elementsNeedUpdate=false;this.verticesNeedUpdate=false;this.uvsNeedUpdate=false;this.normalsNeedUpdate=false;this.colorsNeedUpdate=false;this.lineDistancesNeedUpdate=false;this.groupsNeedUpdate=false}applyMatrix4(matrix){const normalMatrix=new Matrix3().getNormalMatrix(matrix);for(let i=0,il=this.vertices.length;i<il;i++){const vertex=this.vertices[i];vertex.applyMatrix4(matrix)}for(let i=0,il=this.faces.length;i<il;i++){const face=this.faces[i];face.normal.applyMatrix3(normalMatrix).normalize();for(let j=0,jl=face.vertexNormals.length;j<jl;j++){face.vertexNormals[j].applyMatrix3(normalMatrix).normalize()}}if(this.boundingBox!==null){this.computeBoundingBox()}if(this.boundingSphere!==null){this.computeBoundingSphere()}this.verticesNeedUpdate=true;this.normalsNeedUpdate=true;return this}rotateX(angle){_m1.makeRotationX(angle);this.applyMatrix4(_m1);return this}rotateY(angle){_m1.makeRotationY(angle);this.applyMatrix4(_m1);return this}rotateZ(angle){_m1.makeRotationZ(angle);this.applyMatrix4(_m1);return this}translate(x,y,z){_m1.makeTranslation(x,y,z);this.applyMatrix4(_m1);return this}scale(x,y,z){_m1.makeScale(x,y,z);this.applyMatrix4(_m1);return this}lookAt(vector){_obj.lookAt(vector);_obj.updateMatrix();this.applyMatrix4(_obj.matrix);return this}fromBufferGeometry(geometry){const scope=this;const index=geometry.index!==null?geometry.index:undefined;const attributes=geometry.attributes;if(attributes.position===undefined){console.error("THREE.Geometry.fromBufferGeometry(): Position attribute required for conversion.");return this}const position=attributes.position;const normal=attributes.normal;const color=attributes.color;const uv=attributes.uv;const uv2=attributes.uv2;if(uv2!==undefined)this.faceVertexUvs[1]=[];for(let i=0;i<position.count;i++){scope.vertices.push(new Vector3().fromBufferAttribute(position,i));if(color!==undefined){scope.colors.push(new Color().fromBufferAttribute(color,i))}}function addFace(a,b,c,materialIndex){const vertexColors=color===undefined?[]:[scope.colors[a].clone(),scope.colors[b].clone(),scope.colors[c].clone()];const vertexNormals=normal===undefined?[]:[new Vector3().fromBufferAttribute(normal,a),new Vector3().fromBufferAttribute(normal,b),new Vector3().fromBufferAttribute(normal,c)];const face=new Face3(a,b,c,vertexNormals,vertexColors,materialIndex);scope.faces.push(face);if(uv!==undefined){scope.faceVertexUvs[0].push([new Vector2().fromBufferAttribute(uv,a),new Vector2().fromBufferAttribute(uv,b),new Vector2().fromBufferAttribute(uv,c)])}if(uv2!==undefined){scope.faceVertexUvs[1].push([new Vector2().fromBufferAttribute(uv2,a),new Vector2().fromBufferAttribute(uv2,b),new Vector2().fromBufferAttribute(uv2,c)])}}const groups=geometry.groups;if(groups.length>0){for(let i=0;i<groups.length;i++){const group=groups[i];const start=group.start;const count=group.count;for(let j=start,jl=start+count;j<jl;j+=3){if(index!==undefined){addFace(index.getX(j),index.getX(j+1),index.getX(j+2),group.materialIndex)}else{addFace(j,j+1,j+2,group.materialIndex)}}}}else{if(index!==undefined){for(let i=0;i<index.count;i+=3){addFace(index.getX(i),index.getX(i+1),index.getX(i+2))}}else{for(let i=0;i<position.count;i+=3){addFace(i,i+1,i+2)}}}this.computeFaceNormals();if(geometry.boundingBox!==null){this.boundingBox=geometry.boundingBox.clone()}if(geometry.boundingSphere!==null){this.boundingSphere=geometry.boundingSphere.clone()}return this}center(){this.computeBoundingBox();this.boundingBox.getCenter(_offset).negate();this.translate(_offset.x,_offset.y,_offset.z);return this}normalize(){this.computeBoundingSphere();const center=this.boundingSphere.center;const radius=this.boundingSphere.radius;const s=radius===0?1:1/radius;const matrix=new Matrix4;matrix.set(s,0,0,-s*center.x,0,s,0,-s*center.y,0,0,s,-s*center.z,0,0,0,1);this.applyMatrix4(matrix);return this}computeFaceNormals(){const cb=new Vector3,ab=new Vector3;for(let f=0,fl=this.faces.length;f<fl;f++){const face=this.faces[f];const vA=this.vertices[face.a];const vB=this.vertices[face.b];const vC=this.vertices[face.c];cb.subVectors(vC,vB);ab.subVectors(vA,vB);cb.cross(ab);cb.normalize();face.normal.copy(cb)}}computeVertexNormals(areaWeighted=true){const vertices=new Array(this.vertices.length);for(let v=0,vl=this.vertices.length;v<vl;v++){vertices[v]=new Vector3}if(areaWeighted){const cb=new Vector3,ab=new Vector3;for(let f=0,fl=this.faces.length;f<fl;f++){const face=this.faces[f];const vA=this.vertices[face.a];const vB=this.vertices[face.b];const vC=this.vertices[face.c];cb.subVectors(vC,vB);ab.subVectors(vA,vB);cb.cross(ab);vertices[face.a].add(cb);vertices[face.b].add(cb);vertices[face.c].add(cb)}}else{this.computeFaceNormals();for(let f=0,fl=this.faces.length;f<fl;f++){const face=this.faces[f];vertices[face.a].add(face.normal);vertices[face.b].add(face.normal);vertices[face.c].add(face.normal)}}for(let v=0,vl=this.vertices.length;v<vl;v++){vertices[v].normalize()}for(let f=0,fl=this.faces.length;f<fl;f++){const face=this.faces[f];const vertexNormals=face.vertexNormals;if(vertexNormals.length===3){vertexNormals[0].copy(vertices[face.a]);vertexNormals[1].copy(vertices[face.b]);vertexNormals[2].copy(vertices[face.c])}else{vertexNormals[0]=vertices[face.a].clone();vertexNormals[1]=vertices[face.b].clone();vertexNormals[2]=vertices[face.c].clone()}}if(this.faces.length>0){this.normalsNeedUpdate=true}}computeFlatVertexNormals(){this.computeFaceNormals();for(let f=0,fl=this.faces.length;f<fl;f++){const face=this.faces[f];const vertexNormals=face.vertexNormals;if(vertexNormals.length===3){vertexNormals[0].copy(face.normal);vertexNormals[1].copy(face.normal);vertexNormals[2].copy(face.normal)}else{vertexNormals[0]=face.normal.clone();vertexNormals[1]=face.normal.clone();vertexNormals[2]=face.normal.clone()}}if(this.faces.length>0){this.normalsNeedUpdate=true}}computeMorphNormals(){for(let f=0,fl=this.faces.length;f<fl;f++){const face=this.faces[f];if(!face.__originalFaceNormal){face.__originalFaceNormal=face.normal.clone()}else{face.__originalFaceNormal.copy(face.normal)}if(!face.__originalVertexNormals)face.__originalVertexNormals=[];for(let i=0,il=face.vertexNormals.length;i<il;i++){if(!face.__originalVertexNormals[i]){face.__originalVertexNormals[i]=face.vertexNormals[i].clone()}else{face.__originalVertexNormals[i].copy(face.vertexNormals[i])}}}const tmpGeo=new Geometry;tmpGeo.faces=this.faces;for(let i=0,il=this.morphTargets.length;i<il;i++){if(!this.morphNormals[i]){this.morphNormals[i]={};this.morphNormals[i].faceNormals=[];this.morphNormals[i].vertexNormals=[];const dstNormalsFace=this.morphNormals[i].faceNormals;const dstNormalsVertex=this.morphNormals[i].vertexNormals;for(let f=0,fl=this.faces.length;f<fl;f++){const faceNormal=new Vector3;const vertexNormals={a:new Vector3,b:new Vector3,c:new Vector3};dstNormalsFace.push(faceNormal);dstNormalsVertex.push(vertexNormals)}}const morphNormals=this.morphNormals[i];tmpGeo.vertices=this.morphTargets[i].vertices;tmpGeo.computeFaceNormals();tmpGeo.computeVertexNormals();for(let f=0,fl=this.faces.length;f<fl;f++){const face=this.faces[f];const faceNormal=morphNormals.faceNormals[f];const vertexNormals=morphNormals.vertexNormals[f];faceNormal.copy(face.normal);vertexNormals.a.copy(face.vertexNormals[0]);vertexNormals.b.copy(face.vertexNormals[1]);vertexNormals.c.copy(face.vertexNormals[2])}}for(let f=0,fl=this.faces.length;f<fl;f++){const face=this.faces[f];face.normal=face.__originalFaceNormal;face.vertexNormals=face.__originalVertexNormals}}computeBoundingBox(){if(this.boundingBox===null){this.boundingBox=new Box3}this.boundingBox.setFromPoints(this.vertices)}computeBoundingSphere(){if(this.boundingSphere===null){this.boundingSphere=new Sphere}this.boundingSphere.setFromPoints(this.vertices)}merge(geometry,matrix,materialIndexOffset=0){if(!(geometry&&geometry.isGeometry)){console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",geometry);return}let normalMatrix;const vertexOffset=this.vertices.length,vertices1=this.vertices,vertices2=geometry.vertices,faces1=this.faces,faces2=geometry.faces,colors1=this.colors,colors2=geometry.colors;if(matrix!==undefined){normalMatrix=new Matrix3().getNormalMatrix(matrix)}for(let i=0,il=vertices2.length;i<il;i++){const vertex=vertices2[i];const vertexCopy=vertex.clone();if(matrix!==undefined)vertexCopy.applyMatrix4(matrix);vertices1.push(vertexCopy)}for(let i=0,il=colors2.length;i<il;i++){colors1.push(colors2[i].clone())}for(let i=0,il=faces2.length;i<il;i++){const face=faces2[i];let normal,color;const faceVertexNormals=face.vertexNormals,faceVertexColors=face.vertexColors;const faceCopy=new Face3(face.a+vertexOffset,face.b+vertexOffset,face.c+vertexOffset);faceCopy.normal.copy(face.normal);if(normalMatrix!==undefined){faceCopy.normal.applyMatrix3(normalMatrix).normalize()}for(let j=0,jl=faceVertexNormals.length;j<jl;j++){normal=faceVertexNormals[j].clone();if(normalMatrix!==undefined){normal.applyMatrix3(normalMatrix).normalize()}faceCopy.vertexNormals.push(normal)}faceCopy.color.copy(face.color);for(let j=0,jl=faceVertexColors.length;j<jl;j++){color=faceVertexColors[j];faceCopy.vertexColors.push(color.clone())}faceCopy.materialIndex=face.materialIndex+materialIndexOffset;faces1.push(faceCopy)}for(let i=0,il=geometry.faceVertexUvs.length;i<il;i++){const faceVertexUvs2=geometry.faceVertexUvs[i];if(this.faceVertexUvs[i]===undefined)this.faceVertexUvs[i]=[];for(let j=0,jl=faceVertexUvs2.length;j<jl;j++){const uvs2=faceVertexUvs2[j],uvsCopy=[];for(let k=0,kl=uvs2.length;k<kl;k++){uvsCopy.push(uvs2[k].clone())}this.faceVertexUvs[i].push(uvsCopy)}}}mergeMesh(mesh){if(!(mesh&&mesh.isMesh)){console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",mesh);return}if(mesh.matrixAutoUpdate)mesh.updateMatrix();this.merge(mesh.geometry,mesh.matrix)}mergeVertices(precisionPoints=4){const verticesMap={};const unique=[],changes=[];const precision=Math.pow(10,precisionPoints);for(let i=0,il=this.vertices.length;i<il;i++){const v=this.vertices[i];const key=Math.round(v.x*precision)+"_"+Math.round(v.y*precision)+"_"+Math.round(v.z*precision);if(verticesMap[key]===undefined){verticesMap[key]=i;unique.push(this.vertices[i]);changes[i]=unique.length-1}else{changes[i]=changes[verticesMap[key]]}}const faceIndicesToRemove=[];for(let i=0,il=this.faces.length;i<il;i++){const face=this.faces[i];face.a=changes[face.a];face.b=changes[face.b];face.c=changes[face.c];const indices=[face.a,face.b,face.c];for(let n=0;n<3;n++){if(indices[n]===indices[(n+1)%3]){faceIndicesToRemove.push(i);break}}}for(let i=faceIndicesToRemove.length-1;i>=0;i--){const idx=faceIndicesToRemove[i];this.faces.splice(idx,1);for(let j=0,jl=this.faceVertexUvs.length;j<jl;j++){this.faceVertexUvs[j].splice(idx,1)}}const diff=this.vertices.length-unique.length;this.vertices=unique;return diff}setFromPoints(points){this.vertices=[];for(let i=0,l=points.length;i<l;i++){const point=points[i];this.vertices.push(new Vector3(point.x,point.y,point.z||0))}return this}sortFacesByMaterialIndex(){const faces=this.faces;const length=faces.length;for(let i=0;i<length;i++){faces[i]._id=i}function materialIndexSort(a,b){return a.materialIndex-b.materialIndex}faces.sort(materialIndexSort);const uvs1=this.faceVertexUvs[0];const uvs2=this.faceVertexUvs[1];let newUvs1,newUvs2;if(uvs1&&uvs1.length===length)newUvs1=[];if(uvs2&&uvs2.length===length)newUvs2=[];for(let i=0;i<length;i++){const id=faces[i]._id;if(newUvs1)newUvs1.push(uvs1[id]);if(newUvs2)newUvs2.push(uvs2[id])}if(newUvs1)this.faceVertexUvs[0]=newUvs1;if(newUvs2)this.faceVertexUvs[1]=newUvs2}toJSON(){const data={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};data.uuid=this.uuid;data.type=this.type;if(this.name!=="")data.name=this.name;if(this.parameters!==undefined){const parameters=this.parameters;for(const key in parameters){if(parameters[key]!==undefined)data[key]=parameters[key]}return data}const vertices=[];for(let i=0;i<this.vertices.length;i++){const vertex=this.vertices[i];vertices.push(vertex.x,vertex.y,vertex.z)}const faces=[];const normals=[];const normalsHash={};const colors=[];const colorsHash={};const uvs=[];const uvsHash={};for(let i=0;i<this.faces.length;i++){const face=this.faces[i];const hasMaterial=true;const hasFaceUv=false;const hasFaceVertexUv=this.faceVertexUvs[0][i]!==undefined;const hasFaceNormal=face.normal.length()>0;const hasFaceVertexNormal=face.vertexNormals.length>0;const hasFaceColor=face.color.r!==1||face.color.g!==1||face.color.b!==1;const hasFaceVertexColor=face.vertexColors.length>0;let faceType=0;faceType=setBit(faceType,0,0);faceType=setBit(faceType,1,hasMaterial);faceType=setBit(faceType,2,hasFaceUv);faceType=setBit(faceType,3,hasFaceVertexUv);faceType=setBit(faceType,4,hasFaceNormal);faceType=setBit(faceType,5,hasFaceVertexNormal);faceType=setBit(faceType,6,hasFaceColor);faceType=setBit(faceType,7,hasFaceVertexColor);faces.push(faceType);faces.push(face.a,face.b,face.c);faces.push(face.materialIndex);if(hasFaceVertexUv){const faceVertexUvs=this.faceVertexUvs[0][i];faces.push(getUvIndex(faceVertexUvs[0]),getUvIndex(faceVertexUvs[1]),getUvIndex(faceVertexUvs[2]))}if(hasFaceNormal){faces.push(getNormalIndex(face.normal))}if(hasFaceVertexNormal){const vertexNormals=face.vertexNormals;faces.push(getNormalIndex(vertexNormals[0]),getNormalIndex(vertexNormals[1]),getNormalIndex(vertexNormals[2]))}if(hasFaceColor){faces.push(getColorIndex(face.color))}if(hasFaceVertexColor){const vertexColors=face.vertexColors;faces.push(getColorIndex(vertexColors[0]),getColorIndex(vertexColors[1]),getColorIndex(vertexColors[2]))}}function setBit(value,position,enabled){return enabled?value|1<<position:value&~(1<<position)}function getNormalIndex(normal){const hash=normal.x.toString()+normal.y.toString()+normal.z.toString();if(normalsHash[hash]!==undefined){return normalsHash[hash]}normalsHash[hash]=normals.length/3;normals.push(normal.x,normal.y,normal.z);return normalsHash[hash]}function getColorIndex(color){const hash=color.r.toString()+color.g.toString()+color.b.toString();if(colorsHash[hash]!==undefined){return colorsHash[hash]}colorsHash[hash]=colors.length;colors.push(color.getHex());return colorsHash[hash]}function getUvIndex(uv){const hash=uv.x.toString()+uv.y.toString();if(uvsHash[hash]!==undefined){return uvsHash[hash]}uvsHash[hash]=uvs.length/2;uvs.push(uv.x,uv.y);return uvsHash[hash]}data.data={};data.data.vertices=vertices;data.data.normals=normals;if(colors.length>0)data.data.colors=colors;if(uvs.length>0)data.data.uvs=[uvs];data.data.faces=faces;return data}clone(){return new Geometry().copy(this)}copy(source){this.vertices=[];this.colors=[];this.faces=[];this.faceVertexUvs=[[]];this.morphTargets=[];this.morphNormals=[];this.skinWeights=[];this.skinIndices=[];this.lineDistances=[];this.boundingBox=null;this.boundingSphere=null;this.name=source.name;const vertices=source.vertices;for(let i=0,il=vertices.length;i<il;i++){this.vertices.push(vertices[i].clone())}const colors=source.colors;for(let i=0,il=colors.length;i<il;i++){this.colors.push(colors[i].clone())}const faces=source.faces;for(let i=0,il=faces.length;i<il;i++){this.faces.push(faces[i].clone())}for(let i=0,il=source.faceVertexUvs.length;i<il;i++){const faceVertexUvs=source.faceVertexUvs[i];if(this.faceVertexUvs[i]===undefined){this.faceVertexUvs[i]=[]}for(let j=0,jl=faceVertexUvs.length;j<jl;j++){const uvs=faceVertexUvs[j],uvsCopy=[];for(let k=0,kl=uvs.length;k<kl;k++){const uv=uvs[k];uvsCopy.push(uv.clone())}this.faceVertexUvs[i].push(uvsCopy)}}const morphTargets=source.morphTargets;for(let i=0,il=morphTargets.length;i<il;i++){const morphTarget={};morphTarget.name=morphTargets[i].name;if(morphTargets[i].vertices!==undefined){morphTarget.vertices=[];for(let j=0,jl=morphTargets[i].vertices.length;j<jl;j++){morphTarget.vertices.push(morphTargets[i].vertices[j].clone())}}if(morphTargets[i].normals!==undefined){morphTarget.normals=[];for(let j=0,jl=morphTargets[i].normals.length;j<jl;j++){morphTarget.normals.push(morphTargets[i].normals[j].clone())}}this.morphTargets.push(morphTarget)}const morphNormals=source.morphNormals;for(let i=0,il=morphNormals.length;i<il;i++){const morphNormal={};if(morphNormals[i].vertexNormals!==undefined){morphNormal.vertexNormals=[];for(let j=0,jl=morphNormals[i].vertexNormals.length;j<jl;j++){const srcVertexNormal=morphNormals[i].vertexNormals[j];const destVertexNormal={};destVertexNormal.a=srcVertexNormal.a.clone();destVertexNormal.b=srcVertexNormal.b.clone();destVertexNormal.c=srcVertexNormal.c.clone();morphNormal.vertexNormals.push(destVertexNormal)}}if(morphNormals[i].faceNormals!==undefined){morphNormal.faceNormals=[];for(let j=0,jl=morphNormals[i].faceNormals.length;j<jl;j++){morphNormal.faceNormals.push(morphNormals[i].faceNormals[j].clone())}}this.morphNormals.push(morphNormal)}const skinWeights=source.skinWeights;for(let i=0,il=skinWeights.length;i<il;i++){this.skinWeights.push(skinWeights[i].clone())}const skinIndices=source.skinIndices;for(let i=0,il=skinIndices.length;i<il;i++){this.skinIndices.push(skinIndices[i].clone())}const lineDistances=source.lineDistances;for(let i=0,il=lineDistances.length;i<il;i++){this.lineDistances.push(lineDistances[i])}const boundingBox=source.boundingBox;if(boundingBox!==null){this.boundingBox=boundingBox.clone()}const boundingSphere=source.boundingSphere;if(boundingSphere!==null){this.boundingSphere=boundingSphere.clone()}this.elementsNeedUpdate=source.elementsNeedUpdate;this.verticesNeedUpdate=source.verticesNeedUpdate;this.uvsNeedUpdate=source.uvsNeedUpdate;this.normalsNeedUpdate=source.normalsNeedUpdate;this.colorsNeedUpdate=source.colorsNeedUpdate;this.lineDistancesNeedUpdate=source.lineDistancesNeedUpdate;this.groupsNeedUpdate=source.groupsNeedUpdate;return this}toBufferGeometry(){const geometry=new DirectGeometry().fromGeometry(this);const buffergeometry=new BufferGeometry;const positions=new Float32Array(geometry.vertices.length*3);buffergeometry.setAttribute("position",copyVector3sArray(new BufferAttribute(positions,3),geometry.vertices));if(geometry.normals.length>0){const normals=new Float32Array(geometry.normals.length*3);buffergeometry.setAttribute("normal",copyVector3sArray(new BufferAttribute(normals,3),geometry.normals))}if(geometry.colors.length>0){const colors=new Float32Array(geometry.colors.length*3);buffergeometry.setAttribute("color",copyColorsArray(new BufferAttribute(colors,3),geometry.colors))}if(geometry.uvs.length>0){const uvs=new Float32Array(geometry.uvs.length*2);buffergeometry.setAttribute("uv",copyVector2sArray(new BufferAttribute(uvs,2),geometry.uvs))}if(geometry.uvs2.length>0){const uvs2=new Float32Array(geometry.uvs2.length*2);buffergeometry.setAttribute("uv2",copyVector2sArray(new BufferAttribute(uvs2,2),geometry.uvs2))}buffergeometry.groups=geometry.groups;for(const name in geometry.morphTargets){const array=[];const morphTargets=geometry.morphTargets[name];for(let i=0,l=morphTargets.length;i<l;i++){const morphTarget=morphTargets[i];const attribute=new Float32BufferAttribute(morphTarget.data.length*3,3);attribute.name=morphTarget.name;array.push(copyVector3sArray(attribute,morphTarget.data))}buffergeometry.morphAttributes[name]=array}if(geometry.skinIndices.length>0){const skinIndices=new Float32BufferAttribute(geometry.skinIndices.length*4,4);buffergeometry.setAttribute("skinIndex",copyVector4sArray(skinIndices,geometry.skinIndices))}if(geometry.skinWeights.length>0){const skinWeights=new Float32BufferAttribute(geometry.skinWeights.length*4,4);buffergeometry.setAttribute("skinWeight",copyVector4sArray(skinWeights,geometry.skinWeights))}if(geometry.boundingSphere!==null){buffergeometry.boundingSphere=geometry.boundingSphere.clone()}if(geometry.boundingBox!==null){buffergeometry.boundingBox=geometry.boundingBox.clone()}return buffergeometry}computeTangents(){console.error("THREE.Geometry: .computeTangents() has been removed.")}computeLineDistances(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")}applyMatrix(matrix){console.warn("THREE.Geometry: .applyMatrix() has been renamed to .applyMatrix4().");return this.applyMatrix4(matrix)}dispose(){this.dispatchEvent({type:"dispose"})}static createBufferGeometryFromObject(object){let buffergeometry=new BufferGeometry;const geometry=object.geometry;if(object.isPoints||object.isLine){const positions=new Float32BufferAttribute(geometry.vertices.length*3,3);const colors=new Float32BufferAttribute(geometry.colors.length*3,3);buffergeometry.setAttribute("position",copyVector3sArray(positions,geometry.vertices));buffergeometry.setAttribute("color",copyColorsArray(colors,geometry.colors));if(geometry.lineDistances&&geometry.lineDistances.length===geometry.vertices.length){const lineDistances=new Float32BufferAttribute(geometry.lineDistances.length,1);buffergeometry.setAttribute("lineDistance",lineDistances.copyArray(geometry.lineDistances))}if(geometry.boundingSphere!==null){buffergeometry.boundingSphere=geometry.boundingSphere.clone()}if(geometry.boundingBox!==null){buffergeometry.boundingBox=geometry.boundingBox.clone()}}else if(object.isMesh){buffergeometry=geometry.toBufferGeometry()}return buffergeometry}}Geometry.prototype.isGeometry=true;class DirectGeometry{constructor(){this.vertices=[];this.normals=[];this.colors=[];this.uvs=[];this.uvs2=[];this.groups=[];this.morphTargets={};this.skinWeights=[];this.skinIndices=[];this.boundingBox=null;this.boundingSphere=null;this.verticesNeedUpdate=false;this.normalsNeedUpdate=false;this.colorsNeedUpdate=false;this.uvsNeedUpdate=false;this.groupsNeedUpdate=false}computeGroups(geometry){const groups=[];let group,i;let materialIndex=undefined;const faces=geometry.faces;for(i=0;i<faces.length;i++){const face=faces[i];if(face.materialIndex!==materialIndex){materialIndex=face.materialIndex;if(group!==undefined){group.count=i*3-group.start;groups.push(group)}group={start:i*3,materialIndex:materialIndex}}}if(group!==undefined){group.count=i*3-group.start;groups.push(group)}this.groups=groups}fromGeometry(geometry){const faces=geometry.faces;const vertices=geometry.vertices;const faceVertexUvs=geometry.faceVertexUvs;const hasFaceVertexUv=faceVertexUvs[0]&&faceVertexUvs[0].length>0;const hasFaceVertexUv2=faceVertexUvs[1]&&faceVertexUvs[1].length>0;const morphTargets=geometry.morphTargets;const morphTargetsLength=morphTargets.length;let morphTargetsPosition;if(morphTargetsLength>0){morphTargetsPosition=[];for(let i=0;i<morphTargetsLength;i++){morphTargetsPosition[i]={name:morphTargets[i].name,data:[]}}this.morphTargets.position=morphTargetsPosition}const morphNormals=geometry.morphNormals;const morphNormalsLength=morphNormals.length;let morphTargetsNormal;if(morphNormalsLength>0){morphTargetsNormal=[];for(let i=0;i<morphNormalsLength;i++){morphTargetsNormal[i]={name:morphNormals[i].name,data:[]}}this.morphTargets.normal=morphTargetsNormal}const skinIndices=geometry.skinIndices;const skinWeights=geometry.skinWeights;const hasSkinIndices=skinIndices.length===vertices.length;const hasSkinWeights=skinWeights.length===vertices.length;if(vertices.length>0&&faces.length===0){console.error("THREE.DirectGeometry: Faceless geometries are not supported.")}for(let i=0;i<faces.length;i++){const face=faces[i];this.vertices.push(vertices[face.a],vertices[face.b],vertices[face.c]);const vertexNormals=face.vertexNormals;if(vertexNormals.length===3){this.normals.push(vertexNormals[0],vertexNormals[1],vertexNormals[2])}else{const normal=face.normal;this.normals.push(normal,normal,normal)}const vertexColors=face.vertexColors;if(vertexColors.length===3){this.colors.push(vertexColors[0],vertexColors[1],vertexColors[2])}else{const color=face.color;this.colors.push(color,color,color)}if(hasFaceVertexUv===true){const vertexUvs=faceVertexUvs[0][i];if(vertexUvs!==undefined){this.uvs.push(vertexUvs[0],vertexUvs[1],vertexUvs[2])}else{console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",i);this.uvs.push(new Vector2,new Vector2,new Vector2)}}if(hasFaceVertexUv2===true){const vertexUvs=faceVertexUvs[1][i];if(vertexUvs!==undefined){this.uvs2.push(vertexUvs[0],vertexUvs[1],vertexUvs[2])}else{console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",i);this.uvs2.push(new Vector2,new Vector2,new Vector2)}}for(let j=0;j<morphTargetsLength;j++){const morphTarget=morphTargets[j].vertices;morphTargetsPosition[j].data.push(morphTarget[face.a],morphTarget[face.b],morphTarget[face.c])}for(let j=0;j<morphNormalsLength;j++){const morphNormal=morphNormals[j].vertexNormals[i];morphTargetsNormal[j].data.push(morphNormal.a,morphNormal.b,morphNormal.c)}if(hasSkinIndices){this.skinIndices.push(skinIndices[face.a],skinIndices[face.b],skinIndices[face.c])}if(hasSkinWeights){this.skinWeights.push(skinWeights[face.a],skinWeights[face.b],skinWeights[face.c])}}this.computeGroups(geometry);this.verticesNeedUpdate=geometry.verticesNeedUpdate;this.normalsNeedUpdate=geometry.normalsNeedUpdate;this.colorsNeedUpdate=geometry.colorsNeedUpdate;this.uvsNeedUpdate=geometry.uvsNeedUpdate;this.groupsNeedUpdate=geometry.groupsNeedUpdate;if(geometry.boundingSphere!==null){this.boundingSphere=geometry.boundingSphere.clone()}if(geometry.boundingBox!==null){this.boundingBox=geometry.boundingBox.clone()}return this}}function copyColorsArray(bufferAttribute,colors){const array=bufferAttribute.array;let offset=0;for(let i=0,l=colors.length;i<l;i++){let color=colors[i];if(color===undefined){console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",i);color=new Color}if(bufferAttribute.normalized){array[offset++]=normalize(color.r,array);array[offset++]=normalize(color.g,array);array[offset++]=normalize(color.b,array)}else{array[offset++]=color.r;array[offset++]=color.g;array[offset++]=color.b}}return bufferAttribute}function copyVector2sArray(bufferAttribute,vectors){const array=bufferAttribute.array;let offset=0;for(let i=0,l=vectors.length;i<l;i++){let vector=vectors[i];if(vector===undefined){console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",i);vector=new Vector2}if(bufferAttribute.normalized){array[offset++]=normalize(vector.x,array);array[offset++]=normalize(vector.y,array)}else{array[offset++]=vector.x;array[offset++]=vector.y}}return bufferAttribute}function copyVector3sArray(bufferAttribute,vectors){const array=bufferAttribute.array;let offset=0;for(let i=0,l=vectors.length;i<l;i++){let vector=vectors[i];if(vector===undefined){console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",i);vector=new Vector3}if(bufferAttribute.normalized){array[offset++]=normalize(vector.x,array);array[offset++]=normalize(vector.y,array);array[offset++]=normalize(vector.z,array)}else{array[offset++]=vector.x;array[offset++]=vector.y;array[offset++]=vector.z}}return bufferAttribute}function copyVector4sArray(bufferAttribute,vectors){const array=bufferAttribute.array;let offset=0;for(let i=0,l=vectors.length;i<l;i++){let vector=vectors[i];if(vector===undefined){console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",i);vector=new Vector4}if(bufferAttribute.normalized){array[offset++]=normalize(vector.x,array);array[offset++]=normalize(vector.y,array);array[offset++]=normalize(vector.z,array);array[offset++]=normalize(vector.w,array)}else{array[offset++]=vector.x;array[offset++]=vector.y;array[offset++]=vector.z;array[offset++]=vector.w}}return this}THREE.Geometry=Geometry});(function(){var BufferAttribute=THREE.BufferAttribute,BufferGeometry=THREE.BufferGeometry,Float32BufferAttribute=THREE.Float32BufferAttribute,InstancedBufferAttribute=THREE.InstancedBufferAttribute,InterleavedBuffer=THREE.InterleavedBuffer,InterleavedBufferAttribute=THREE.InterleavedBufferAttribute,TriangleFanDrawMode=THREE.TriangleFanDrawMode,TriangleStripDrawMode=THREE.TriangleStripDrawMode,TrianglesDrawMode=THREE.TrianglesDrawMode,Vector3=THREE.Vector3;function computeMikkTSpaceTangents(geometry,MikkTSpace,negateSign=true){if(!MikkTSpace||!MikkTSpace.isReady){throw new Error("BufferGeometryUtils: Initialized MikkTSpace library required.")}if(!geometry.hasAttribute("position")||!geometry.hasAttribute("normal")||!geometry.hasAttribute("uv")){throw new Error("BufferGeometryUtils: Tangents require \"position\", \"normal\", and \"uv\" attributes.")}function getAttributeArray(attribute){if(attribute.normalized||attribute.isInterleavedBufferAttribute){const dstArray=new Float32Array(attribute.getCount()*attribute.itemSize);for(let i=0,j=0;i<attribute.getCount();i++){dstArray[j++]=attribute.getX(i);dstArray[j++]=attribute.getY(i);if(attribute.itemSize>2){dstArray[j++]=attribute.getZ(i)}}return dstArray}if(attribute.array instanceof Float32Array){return attribute.array}return new Float32Array(attribute.array)}const _geometry=geometry.index?geometry.toNonIndexed():geometry;const tangents=MikkTSpace.generateTangents(getAttributeArray(_geometry.attributes.position),getAttributeArray(_geometry.attributes.normal),getAttributeArray(_geometry.attributes.uv));if(negateSign){for(let i=3;i<tangents.length;i+=4){tangents[i]*=-1}}_geometry.setAttribute("tangent",new BufferAttribute(tangents,4));if(geometry!==_geometry){geometry.copy(_geometry)}return geometry}function mergeGeometries(geometries,useGroups=false){const isIndexed=geometries[0].index!==null;const attributesUsed=new Set(Object.keys(geometries[0].attributes));const morphAttributesUsed=new Set(Object.keys(geometries[0].morphAttributes));const attributes={};const morphAttributes={};const morphTargetsRelative=geometries[0].morphTargetsRelative;const mergedGeometry=new BufferGeometry;let offset=0;for(let i=0;i<geometries.length;++i){const geometry=geometries[i];let attributesCount=0;if(isIndexed!==(geometry.index!==null)){console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+i+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them.");return null}for(const name in geometry.attributes){if(!attributesUsed.has(name)){console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+i+". All geometries must have compatible attributes; make sure \""+name+"\" attribute exists among all geometries, or in none of them.");return null}if(attributes[name]===undefined)attributes[name]=[];attributes[name].push(geometry.attributes[name]);attributesCount++}if(attributesCount!==attributesUsed.size){console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+i+". Make sure all geometries have the same number of attributes.");return null}if(morphTargetsRelative!==geometry.morphTargetsRelative){console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+i+". .morphTargetsRelative must be consistent throughout all geometries.");return null}for(const name in geometry.morphAttributes){if(!morphAttributesUsed.has(name)){console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+i+".  .morphAttributes must be consistent throughout all geometries.");return null}if(morphAttributes[name]===undefined)morphAttributes[name]=[];morphAttributes[name].push(geometry.morphAttributes[name])}if(useGroups){let count;if(isIndexed){count=geometry.index.count}else if(geometry.attributes.position!==undefined){count=geometry.attributes.position.count}else{console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+i+". The geometry must have either an index or a position attribute");return null}mergedGeometry.addGroup(offset,count,i);offset+=count}}if(isIndexed){let indexOffset=0;const mergedIndex=[];for(let i=0;i<geometries.length;++i){const index=geometries[i].index;for(let j=0;j<index.count;++j){mergedIndex.push(index.getX(j)+indexOffset)}indexOffset+=geometries[i].attributes.position.count}mergedGeometry.setIndex(mergedIndex)}for(const name in attributes){const mergedAttribute=mergeAttributes(attributes[name]);if(!mergedAttribute){console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+name+" attribute.");return null}mergedGeometry.setAttribute(name,mergedAttribute)}for(const name in morphAttributes){const numMorphTargets=morphAttributes[name][0].length;if(numMorphTargets===0)break;mergedGeometry.morphAttributes=mergedGeometry.morphAttributes||{};mergedGeometry.morphAttributes[name]=[];for(let i=0;i<numMorphTargets;++i){const morphAttributesToMerge=[];for(let j=0;j<morphAttributes[name].length;++j){morphAttributesToMerge.push(morphAttributes[name][j][i])}const mergedMorphAttribute=mergeAttributes(morphAttributesToMerge);if(!mergedMorphAttribute){console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+name+" morphAttribute.");return null}mergedGeometry.morphAttributes[name].push(mergedMorphAttribute)}}return mergedGeometry}function mergeAttributes(attributes){let TypedArray;let itemSize;let normalized;let arrayLength=0;for(let i=0;i<attributes.length;++i){const attribute=attributes[i];if(attribute.isInterleavedBufferAttribute){console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. InterleavedBufferAttributes are not supported.");return null}if(TypedArray===undefined)TypedArray=attribute.array.constructor;if(TypedArray!==attribute.array.constructor){console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes.");return null}if(itemSize===undefined)itemSize=attribute.itemSize;if(itemSize!==attribute.itemSize){console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes.");return null}if(normalized===undefined)normalized=attribute.normalized;if(normalized!==attribute.normalized){console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes.");return null}arrayLength+=attribute.array.length}const array=new TypedArray(arrayLength);let offset=0;for(let i=0;i<attributes.length;++i){array.set(attributes[i].array,offset);offset+=attributes[i].array.length}return new BufferAttribute(array,itemSize,normalized)}function deepCloneAttribute(attribute){if(attribute.isInstancedInterleavedBufferAttribute||attribute.isInterleavedBufferAttribute){return deinterleaveAttribute(attribute)}if(attribute.isInstancedBufferAttribute){return new InstancedBufferAttribute().copy(attribute)}return new BufferAttribute().copy(attribute)}function interleaveAttributes(attributes){let TypedArray;let arrayLength=0;let stride=0;for(let i=0,l=attributes.length;i<l;++i){const attribute=attributes[i];if(TypedArray===undefined)TypedArray=attribute.array.constructor;if(TypedArray!==attribute.array.constructor){console.error("AttributeBuffers of different types cannot be interleaved");return null}arrayLength+=attribute.array.length;stride+=attribute.itemSize}const interleavedBuffer=new InterleavedBuffer(new TypedArray(arrayLength),stride);let offset=0;const res=[];const getters=["getX","getY","getZ","getW"];const setters=["setX","setY","setZ","setW"];for(let j=0,l=attributes.length;j<l;j++){const attribute=attributes[j];const itemSize=attribute.itemSize;const count=attribute.count;const iba=new InterleavedBufferAttribute(interleavedBuffer,itemSize,offset,attribute.normalized);res.push(iba);offset+=itemSize;for(let c=0;c<count;c++){for(let k=0;k<itemSize;k++){iba[setters[k]](c,attribute[getters[k]](c))}}}return res}function deinterleaveAttribute(attribute){const cons=attribute.data.array.constructor;const count=attribute.count;const itemSize=attribute.itemSize;const normalized=attribute.normalized;const array=new cons(count*itemSize);let newAttribute;if(attribute.isInstancedInterleavedBufferAttribute){newAttribute=new InstancedBufferAttribute(array,itemSize,normalized,attribute.meshPerAttribute)}else{newAttribute=new BufferAttribute(array,itemSize,normalized)}for(let i=0;i<count;i++){newAttribute.setX(i,attribute.getX(i));if(itemSize>=2){newAttribute.setY(i,attribute.getY(i))}if(itemSize>=3){newAttribute.setZ(i,attribute.getZ(i))}if(itemSize>=4){newAttribute.setW(i,attribute.getW(i))}}return newAttribute}function deinterleaveGeometry(geometry){const attributes=geometry.attributes;const morphTargets=geometry.morphTargets;const attrMap=new Map;for(const key in attributes){const attr=attributes[key];if(attr.isInterleavedBufferAttribute){if(!attrMap.has(attr)){attrMap.set(attr,deinterleaveAttribute(attr))}attributes[key]=attrMap.get(attr)}}for(const key in morphTargets){const attr=morphTargets[key];if(attr.isInterleavedBufferAttribute){if(!attrMap.has(attr)){attrMap.set(attr,deinterleaveAttribute(attr))}morphTargets[key]=attrMap.get(attr)}}}function estimateBytesUsed(geometry){let mem=0;for(const name in geometry.attributes){const attr=geometry.getAttribute(name);mem+=attr.count*attr.itemSize*attr.array.BYTES_PER_ELEMENT}const indices=geometry.getIndex();mem+=indices?indices.count*indices.itemSize*indices.array.BYTES_PER_ELEMENT:0;return mem}function mergeVertices(geometry,tolerance=1e-4){tolerance=Math.max(tolerance,Number.EPSILON);const hashToIndex={};const indices=geometry.getIndex();const positions=geometry.getAttribute("position");const vertexCount=indices?indices.count:positions.count;let nextIndex=0;const attributeNames=Object.keys(geometry.attributes);const tmpAttributes={};const tmpMorphAttributes={};const newIndices=[];const getters=["getX","getY","getZ","getW"];const setters=["setX","setY","setZ","setW"];for(let i=0,l=attributeNames.length;i<l;i++){const name=attributeNames[i];const attr=geometry.attributes[name];tmpAttributes[name]=new BufferAttribute(new attr.array.constructor(attr.count*attr.itemSize),attr.itemSize,attr.normalized);const morphAttr=geometry.morphAttributes[name];if(morphAttr){tmpMorphAttributes[name]=new BufferAttribute(new morphAttr.array.constructor(morphAttr.count*morphAttr.itemSize),morphAttr.itemSize,morphAttr.normalized)}}const decimalShift=Math.log10(1/tolerance);const shiftMultiplier=Math.pow(10,decimalShift);for(let i=0;i<vertexCount;i++){const index=indices?indices.getX(i):i;let hash="";for(let j=0,l=attributeNames.length;j<l;j++){const name=attributeNames[j];const attribute=geometry.getAttribute(name);const itemSize=attribute.itemSize;for(let k=0;k<itemSize;k++){hash+=`${~~(attribute[getters[k]](index)*shiftMultiplier)},`}}if(hash in hashToIndex){newIndices.push(hashToIndex[hash])}else{for(let j=0,l=attributeNames.length;j<l;j++){const name=attributeNames[j];const attribute=geometry.getAttribute(name);const morphAttr=geometry.morphAttributes[name];const itemSize=attribute.itemSize;const newarray=tmpAttributes[name];const newMorphArrays=tmpMorphAttributes[name];for(let k=0;k<itemSize;k++){const getterFunc=getters[k];const setterFunc=setters[k];newarray[setterFunc](nextIndex,attribute[getterFunc](index));if(morphAttr){for(let m=0,ml=morphAttr.length;m<ml;m++){newMorphArrays[m][setterFunc](nextIndex,morphAttr[m][getterFunc](index))}}}}hashToIndex[hash]=nextIndex;newIndices.push(nextIndex);nextIndex++}}const result=geometry.clone();for(const name in geometry.attributes){const tmpAttribute=tmpAttributes[name];result.setAttribute(name,new BufferAttribute(tmpAttribute.array.slice(0,nextIndex*tmpAttribute.itemSize),tmpAttribute.itemSize,tmpAttribute.normalized));if(!(name in tmpMorphAttributes))continue;for(let j=0;j<tmpMorphAttributes[name].length;j++){const tmpMorphAttribute=tmpMorphAttributes[name][j];result.morphAttributes[name][j]=new BufferAttribute(tmpMorphAttribute.array.slice(0,nextIndex*tmpMorphAttribute.itemSize),tmpMorphAttribute.itemSize,tmpMorphAttribute.normalized)}}result.setIndex(newIndices);return result}function toTrianglesDrawMode(geometry,drawMode){if(drawMode===TrianglesDrawMode){console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles.");return geometry}if(drawMode===TriangleFanDrawMode||drawMode===TriangleStripDrawMode){let index=geometry.getIndex();if(index===null){const indices=[];const position=geometry.getAttribute("position");if(position!==undefined){for(let i=0;i<position.count;i++){indices.push(i)}geometry.setIndex(indices);index=geometry.getIndex()}else{console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible.");return geometry}}const numberOfTriangles=index.count-2;const newIndices=[];if(drawMode===TriangleFanDrawMode){for(let i=1;i<=numberOfTriangles;i++){newIndices.push(index.getX(0));newIndices.push(index.getX(i));newIndices.push(index.getX(i+1))}}else{for(let i=0;i<numberOfTriangles;i++){if(i%2===0){newIndices.push(index.getX(i));newIndices.push(index.getX(i+1));newIndices.push(index.getX(i+2))}else{newIndices.push(index.getX(i+2));newIndices.push(index.getX(i+1));newIndices.push(index.getX(i))}}}if(newIndices.length/3!==numberOfTriangles){console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.")}const newGeometry=geometry.clone();newGeometry.setIndex(newIndices);newGeometry.clearGroups();return newGeometry}else{console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",drawMode);return geometry}}function computeMorphedAttributes(object){const _vA=new Vector3;const _vB=new Vector3;const _vC=new Vector3;const _tempA=new Vector3;const _tempB=new Vector3;const _tempC=new Vector3;const _morphA=new Vector3;const _morphB=new Vector3;const _morphC=new Vector3;function _calculateMorphedAttributeData(object,attribute,morphAttribute,morphTargetsRelative,a,b,c,modifiedAttributeArray){_vA.fromBufferAttribute(attribute,a);_vB.fromBufferAttribute(attribute,b);_vC.fromBufferAttribute(attribute,c);const morphInfluences=object.morphTargetInfluences;if(morphAttribute&&morphInfluences){_morphA.set(0,0,0);_morphB.set(0,0,0);_morphC.set(0,0,0);for(let i=0,il=morphAttribute.length;i<il;i++){const influence=morphInfluences[i];const morph=morphAttribute[i];if(influence===0)continue;_tempA.fromBufferAttribute(morph,a);_tempB.fromBufferAttribute(morph,b);_tempC.fromBufferAttribute(morph,c);if(morphTargetsRelative){_morphA.addScaledVector(_tempA,influence);_morphB.addScaledVector(_tempB,influence);_morphC.addScaledVector(_tempC,influence)}else{_morphA.addScaledVector(_tempA.sub(_vA),influence);_morphB.addScaledVector(_tempB.sub(_vB),influence);_morphC.addScaledVector(_tempC.sub(_vC),influence)}}_vA.add(_morphA);_vB.add(_morphB);_vC.add(_morphC)}if(object.isSkinnedMesh){object.applyBoneTransform(a,_vA);object.applyBoneTransform(b,_vB);object.applyBoneTransform(c,_vC)}modifiedAttributeArray[a*3+0]=_vA.x;modifiedAttributeArray[a*3+1]=_vA.y;modifiedAttributeArray[a*3+2]=_vA.z;modifiedAttributeArray[b*3+0]=_vB.x;modifiedAttributeArray[b*3+1]=_vB.y;modifiedAttributeArray[b*3+2]=_vB.z;modifiedAttributeArray[c*3+0]=_vC.x;modifiedAttributeArray[c*3+1]=_vC.y;modifiedAttributeArray[c*3+2]=_vC.z}const geometry=object.geometry;const material=object.material;let a,b,c;const index=geometry.index;const positionAttribute=geometry.attributes.position;const morphPosition=geometry.morphAttributes.position;const morphTargetsRelative=geometry.morphTargetsRelative;const normalAttribute=geometry.attributes.normal;const morphNormal=geometry.morphAttributes.position;const groups=geometry.groups;const drawRange=geometry.drawRange;let i,j,il,jl;let group;let start,end;const modifiedPosition=new Float32Array(positionAttribute.count*positionAttribute.itemSize);const modifiedNormal=new Float32Array(normalAttribute.count*normalAttribute.itemSize);if(index!==null){if(Array.isArray(material)){for(i=0,il=groups.length;i<il;i++){group=groups[i];start=Math.max(group.start,drawRange.start);end=Math.min(group.start+group.count,drawRange.start+drawRange.count);for(j=start,jl=end;j<jl;j+=3){a=index.getX(j);b=index.getX(j+1);c=index.getX(j+2);_calculateMorphedAttributeData(object,positionAttribute,morphPosition,morphTargetsRelative,a,b,c,modifiedPosition);_calculateMorphedAttributeData(object,normalAttribute,morphNormal,morphTargetsRelative,a,b,c,modifiedNormal)}}}else{start=Math.max(0,drawRange.start);end=Math.min(index.count,drawRange.start+drawRange.count);for(i=start,il=end;i<il;i+=3){a=index.getX(i);b=index.getX(i+1);c=index.getX(i+2);_calculateMorphedAttributeData(object,positionAttribute,morphPosition,morphTargetsRelative,a,b,c,modifiedPosition);_calculateMorphedAttributeData(object,normalAttribute,morphNormal,morphTargetsRelative,a,b,c,modifiedNormal)}}}else{if(Array.isArray(material)){for(i=0,il=groups.length;i<il;i++){group=groups[i];start=Math.max(group.start,drawRange.start);end=Math.min(group.start+group.count,drawRange.start+drawRange.count);for(j=start,jl=end;j<jl;j+=3){a=j;b=j+1;c=j+2;_calculateMorphedAttributeData(object,positionAttribute,morphPosition,morphTargetsRelative,a,b,c,modifiedPosition);_calculateMorphedAttributeData(object,normalAttribute,morphNormal,morphTargetsRelative,a,b,c,modifiedNormal)}}}else{start=Math.max(0,drawRange.start);end=Math.min(positionAttribute.count,drawRange.start+drawRange.count);for(i=start,il=end;i<il;i+=3){a=i;b=i+1;c=i+2;_calculateMorphedAttributeData(object,positionAttribute,morphPosition,morphTargetsRelative,a,b,c,modifiedPosition);_calculateMorphedAttributeData(object,normalAttribute,morphNormal,morphTargetsRelative,a,b,c,modifiedNormal)}}}const morphedPositionAttribute=new Float32BufferAttribute(modifiedPosition,3);const morphedNormalAttribute=new Float32BufferAttribute(modifiedNormal,3);return{positionAttribute:positionAttribute,normalAttribute:normalAttribute,morphedPositionAttribute:morphedPositionAttribute,morphedNormalAttribute:morphedNormalAttribute}}function mergeGroups(geometry){if(geometry.groups.length===0){console.warn("THREE.BufferGeometryUtils.mergeGroups(): No groups are defined. Nothing to merge.");return geometry}let groups=geometry.groups;groups=groups.sort((a,b)=>{if(a.materialIndex!==b.materialIndex)return a.materialIndex-b.materialIndex;return a.start-b.start});if(geometry.getIndex()===null){const positionAttribute=geometry.getAttribute("position");const indices=[];for(let i=0;i<positionAttribute.count;i+=3){indices.push(i,i+1,i+2)}geometry.setIndex(indices)}const index=geometry.getIndex();const newIndices=[];for(let i=0;i<groups.length;i++){const group=groups[i];const groupStart=group.start;const groupLength=groupStart+group.count;for(let j=groupStart;j<groupLength;j++){newIndices.push(index.getX(j))}}geometry.dispose();geometry.setIndex(newIndices);let start=0;for(let i=0;i<groups.length;i++){const group=groups[i];group.start=start;start+=group.count}let currentGroup=groups[0];geometry.groups=[currentGroup];for(let i=1;i<groups.length;i++){const group=groups[i];if(currentGroup.materialIndex===group.materialIndex){currentGroup.count+=group.count}else{currentGroup=group;geometry.groups.push(currentGroup)}}return geometry}function toCreasedNormals(geometry,creaseAngle=Math.PI/3){const creaseDot=Math.cos(creaseAngle);const hashMultiplier=(1+1e-10)*100;const verts=[new Vector3,new Vector3,new Vector3];const tempVec1=new Vector3;const tempVec2=new Vector3;const tempNorm=new Vector3;const tempNorm2=new Vector3;function hashVertex(v){const x=~~(v.x*hashMultiplier);const y=~~(v.y*hashMultiplier);const z=~~(v.z*hashMultiplier);return`${x},${y},${z}`}const resultGeometry=geometry.toNonIndexed();const posAttr=resultGeometry.attributes.position;const vertexMap={};for(let i=0,l=posAttr.count/3;i<l;i++){const i3=3*i;const a=verts[0].fromBufferAttribute(posAttr,i3+0);const b=verts[1].fromBufferAttribute(posAttr,i3+1);const c=verts[2].fromBufferAttribute(posAttr,i3+2);tempVec1.subVectors(c,b);tempVec2.subVectors(a,b);const normal=new Vector3().crossVectors(tempVec1,tempVec2).normalize();for(let n=0;n<3;n++){const vert=verts[n];const hash=hashVertex(vert);if(!(hash in vertexMap)){vertexMap[hash]=[]}vertexMap[hash].push(normal)}}const normalArray=new Float32Array(posAttr.count*3);const normAttr=new BufferAttribute(normalArray,3,false);for(let i=0,l=posAttr.count/3;i<l;i++){const i3=3*i;const a=verts[0].fromBufferAttribute(posAttr,i3+0);const b=verts[1].fromBufferAttribute(posAttr,i3+1);const c=verts[2].fromBufferAttribute(posAttr,i3+2);tempVec1.subVectors(c,b);tempVec2.subVectors(a,b);tempNorm.crossVectors(tempVec1,tempVec2).normalize();for(let n=0;n<3;n++){const vert=verts[n];const hash=hashVertex(vert);const otherNormals=vertexMap[hash];tempNorm2.set(0,0,0);for(let k=0,lk=otherNormals.length;k<lk;k++){const otherNorm=otherNormals[k];if(tempNorm.dot(otherNorm)>creaseDot){tempNorm2.add(otherNorm)}}tempNorm2.normalize();normAttr.setXYZ(i3+n,tempNorm2.x,tempNorm2.y,tempNorm2.z)}}resultGeometry.setAttribute("normal",normAttr);return resultGeometry}function mergeBufferGeometries(geometries,useGroups=false){console.warn("THREE.BufferGeometryUtils: mergeBufferGeometries() has been renamed to mergeGeometries().");return mergeGeometries(geometries,useGroups)}function mergeBufferAttributes(attributes){console.warn("THREE.BufferGeometryUtils: mergeBufferAttributes() has been renamed to mergeAttributes().");return mergeAttributes(attributes)}var BufferGeometryUtils={computeMikkTSpaceTangents,deepCloneAttribute,deinterleaveAttribute,deinterleaveGeometry,mergeGeometries,mergeBufferGeometries,mergeAttributes,mergeBufferAttributes,interleaveAttributes,estimateBytesUsed,mergeVertices,toTrianglesDrawMode,computeMorphedAttributes,mergeGroups,toCreasedNormals};THREE.BufferGeometryUtils=BufferGeometryUtils})();(function(){class WorkerPool{constructor(pool=4){this.pool=pool;this.queue=[];this.workers=[];this.workersResolve=[];this.workerStatus=0}_initWorker(workerId){if(!this.workers[workerId]){const worker=this.workerCreator();worker.addEventListener("message",this._onMessage.bind(this,workerId));this.workers[workerId]=worker}}_getIdleWorker(){for(let i=0;i<this.pool;i++)if(!(this.workerStatus&1<<i))return i;return-1}_onMessage(workerId,msg){const resolve=this.workersResolve[workerId];resolve&&resolve(msg);if(this.queue.length){const{resolve,msg,transfer}=this.queue.shift();this.workersResolve[workerId]=resolve;this.workers[workerId].postMessage(msg,transfer)}else{this.workerStatus^=1<<workerId}}setWorkerCreator(workerCreator){this.workerCreator=workerCreator}setWorkerLimit(pool){this.pool=pool}postMessage(msg,transfer){return new Promise(resolve=>{const workerId=this._getIdleWorker();if(workerId!==-1){this._initWorker(workerId);this.workerStatus|=1<<workerId;this.workersResolve[workerId]=resolve;this.workers[workerId].postMessage(msg,transfer)}else{this.queue.push({resolve,msg,transfer})}})}dispose(){this.workers.forEach(worker=>worker.terminate());this.workersResolve.length=0;this.workers.length=0;this.queue.length=0;this.workerStatus=0}}THREE.WorkerPool=WorkerPool})();(function(){const t=0,e=1,n=2,i=3,s=0,a=0,r=2,o=0,l=1,f=160,U=161,c=162,h=163,_=0,p=1,g=0,y=1,x=2,u=3,b=4,d=5,m=6,w=7,D=8,B=9,L=10,A=11,k=12,v=13,S=14,I=15,O=16,T=17,V=18,E=0,F=1,P=2,C=3,z=4,M=5,W=6,N=7,H=8,K=9,X=10,j=11,R=0,Y=1,q=2,G=13,J=14,Q=15,Z=128,$=64,tt=32,et=16,nt=0,it=1,st=2,at=3,rt=4,ot=5,lt=6,ft=7,Ut=8,ct=9,ht=10,_t=13,pt=14,gt=15,yt=16,xt=17,ut=20,bt=21,dt=22,mt=23,wt=24,Dt=27,Bt=28,Lt=29,At=30,kt=31,vt=34,St=35,It=36,Ot=37,Tt=38,Vt=41,Et=42,Ft=43,Pt=44,Ct=45,zt=48,Mt=49,Wt=50,Nt=58,Ht=59,Kt=62,Xt=63,jt=64,Rt=65,Yt=68,qt=69,Gt=70,Jt=71,Qt=74,Zt=75,$t=76,te=77,ee=78,ne=81,ie=82,se=83,ae=84,re=85,oe=88,le=89,fe=90,Ue=91,ce=92,he=95,_e=96,pe=97,ge=98,ye=99,xe=100,ue=101,be=102,de=103,me=104,we=105,De=106,Be=107,Le=108,Ae=109,ke=110,ve=111,Se=112,Ie=113,Oe=114,Te=115,Ve=116,Ee=117,Fe=118,Pe=119,Ce=120,ze=121,Me=122,We=123,Ne=124,He=125,Ke=126,Xe=127,je=128,Re=129,Ye=130,qe=131,Ge=132,Je=133,Qe=134,Ze=135,$e=136,tn=137,en=138,nn=139,sn=140,an=141,rn=142,on=143,ln=144,fn=145,Un=146,cn=147,hn=148,_n=149,pn=150,gn=151,yn=152,xn=153,un=154,bn=155,dn=156,mn=157,wn=158,Dn=159,Bn=160,Ln=161,An=162,kn=163,vn=164,Sn=165,In=166,On=167,Tn=168,Vn=169,En=170,Fn=171,Pn=172,Cn=173,zn=174,Mn=175,Wn=176,Nn=177,Hn=178,Kn=179,Xn=180,jn=181,Rn=182,Yn=183,qn=184,Gn=1000156007,Jn=1000156008,Qn=1000156009,Zn=1000156010,$n=1000156011,ti=1000156017,ei=1000156018,ni=1000156019,ii=1000156020,si=1000156021,ai=1000054e3,ri=1000054001,oi=1000054002,li=1000054003,fi=1000054004,Ui=1000054005,ci=1000054006,hi=1000054007,_i=1000066e3,pi=1000066001,gi=1000066002,yi=1000066003,xi=1000066004,ui=1000066005,bi=1000066006,di=1000066007,mi=1000066008,wi=1000066009,Di=1000066010,Bi=1000066011,Li=1000066012,Ai=1000066013,ki=100034e4,vi=1000340001;class Si{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=0,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:0,descriptorBlockSize:0,versionNumber:2,colorModel:0,colorPrimaries:1,transferFunction:2,flags:0,texelBlockDimension:[0,0,0,0],bytesPlane:[0,0,0,0,0,0,0,0],samples:[]}],this.keyValue={},this.globalData=null}}class Ii{constructor(t,e,n,i){this._dataView=new DataView(t.buffer,t.byteOffset+e,n),this._littleEndian=i,this._offset=0}_nextUint8(){const t=this._dataView.getUint8(this._offset);return this._offset+=1,t}_nextUint16(){const t=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,t}_nextUint32(){const t=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,t}_nextUint64(){const t=this._dataView.getUint32(this._offset,this._littleEndian)+2**32*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,t}_nextInt32(){const t=this._dataView.getInt32(this._offset,this._littleEndian);return this._offset+=4,t}_skip(t){return this._offset+=t,this}_scan(t,e=0){const n=this._offset;let i=0;for(;this._dataView.getUint8(this._offset)!==e&&i<t;)i++,this._offset++;return i<t&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+n,i)}}const Oi=new Uint8Array([0]),Ti=[171,75,84,88,32,50,48,187,13,10,26,10];function Vi(t){return"undefined"!=typeof TextEncoder?new TextEncoder().encode(t):Buffer.from(t)}function Ei(t){return"undefined"!=typeof TextDecoder?new TextDecoder().decode(t):Buffer.from(t).toString("utf8")}function Fi(t){let e=0;for(const n of t)e+=n.byteLength;const n=new Uint8Array(e);let i=0;for(const e of t)n.set(new Uint8Array(e),i),i+=e.byteLength;return n}function Pi(t){const e=new Uint8Array(t.buffer,t.byteOffset,Ti.length);if(e[0]!==Ti[0]||e[1]!==Ti[1]||e[2]!==Ti[2]||e[3]!==Ti[3]||e[4]!==Ti[4]||e[5]!==Ti[5]||e[6]!==Ti[6]||e[7]!==Ti[7]||e[8]!==Ti[8]||e[9]!==Ti[9]||e[10]!==Ti[10]||e[11]!==Ti[11])throw new Error("Missing KTX 2.0 identifier.");const n=new Si,i=17*Uint32Array.BYTES_PER_ELEMENT,s=new Ii(t,Ti.length,i,!0);n.vkFormat=s._nextUint32(),n.typeSize=s._nextUint32(),n.pixelWidth=s._nextUint32(),n.pixelHeight=s._nextUint32(),n.pixelDepth=s._nextUint32(),n.layerCount=s._nextUint32(),n.faceCount=s._nextUint32();const a=s._nextUint32();n.supercompressionScheme=s._nextUint32();const r=s._nextUint32(),o=s._nextUint32(),l=s._nextUint32(),f=s._nextUint32(),U=s._nextUint64(),c=s._nextUint64(),h=new Ii(t,Ti.length+i,3*a*8,!0);for(let e=0;e<a;e++)n.levels.push({levelData:new Uint8Array(t.buffer,t.byteOffset+h._nextUint64(),h._nextUint64()),uncompressedByteLength:h._nextUint64()});const _=new Ii(t,r,o,!0),p={vendorId:_._skip(4)._nextUint16(),descriptorType:_._nextUint16(),versionNumber:_._nextUint16(),descriptorBlockSize:_._nextUint16(),colorModel:_._nextUint8(),colorPrimaries:_._nextUint8(),transferFunction:_._nextUint8(),flags:_._nextUint8(),texelBlockDimension:[_._nextUint8(),_._nextUint8(),_._nextUint8(),_._nextUint8()],bytesPlane:[_._nextUint8(),_._nextUint8(),_._nextUint8(),_._nextUint8(),_._nextUint8(),_._nextUint8(),_._nextUint8(),_._nextUint8()],samples:[]},g=(p.descriptorBlockSize/4-6)/4;for(let t=0;t<g;t++){const e={bitOffset:_._nextUint16(),bitLength:_._nextUint8(),channelType:_._nextUint8(),samplePosition:[_._nextUint8(),_._nextUint8(),_._nextUint8(),_._nextUint8()],sampleLower:-Infinity,sampleUpper:Infinity};64&e.channelType?(e.sampleLower=_._nextInt32(),e.sampleUpper=_._nextInt32()):(e.sampleLower=_._nextUint32(),e.sampleUpper=_._nextUint32()),p.samples[t]=e}n.dataFormatDescriptor.length=0,n.dataFormatDescriptor.push(p);const y=new Ii(t,l,f,!0);for(;y._offset<f;){const t=y._nextUint32(),e=y._scan(t),i=Ei(e),s=y._scan(t-e.byteLength);n.keyValue[i]=i.match(/^ktx/i)?Ei(s):s,y._offset%4&&y._skip(4-y._offset%4)}if(c<=0)return n;const x=new Ii(t,U,c,!0),u=x._nextUint16(),b=x._nextUint16(),d=x._nextUint32(),m=x._nextUint32(),w=x._nextUint32(),D=x._nextUint32(),B=[];for(let t=0;t<a;t++)B.push({imageFlags:x._nextUint32(),rgbSliceByteOffset:x._nextUint32(),rgbSliceByteLength:x._nextUint32(),alphaSliceByteOffset:x._nextUint32(),alphaSliceByteLength:x._nextUint32()});const L=U+x._offset,A=L+d,k=A+m,v=k+w,S=new Uint8Array(t.buffer,t.byteOffset+L,d),I=new Uint8Array(t.buffer,t.byteOffset+A,m),O=new Uint8Array(t.buffer,t.byteOffset+k,w),T=new Uint8Array(t.buffer,t.byteOffset+v,D);return n.globalData={endpointCount:u,selectorCount:b,imageDescs:B,endpointsData:S,selectorsData:I,tablesData:O,extendedData:T},n}function Ci(){return(Ci=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}const zi={keepWriter:!1};function Mi(t,e={}){e=Ci({},zi,e);let n=new ArrayBuffer(0);if(t.globalData){const e=new ArrayBuffer(20+5*t.globalData.imageDescs.length*4),i=new DataView(e);i.setUint16(0,t.globalData.endpointCount,!0),i.setUint16(2,t.globalData.selectorCount,!0),i.setUint32(4,t.globalData.endpointsData.byteLength,!0),i.setUint32(8,t.globalData.selectorsData.byteLength,!0),i.setUint32(12,t.globalData.tablesData.byteLength,!0),i.setUint32(16,t.globalData.extendedData.byteLength,!0);for(let e=0;e<t.globalData.imageDescs.length;e++){const n=t.globalData.imageDescs[e];i.setUint32(20+5*e*4+0,n.imageFlags,!0),i.setUint32(20+5*e*4+4,n.rgbSliceByteOffset,!0),i.setUint32(20+5*e*4+8,n.rgbSliceByteLength,!0),i.setUint32(20+5*e*4+12,n.alphaSliceByteOffset,!0),i.setUint32(20+5*e*4+16,n.alphaSliceByteLength,!0)}n=Fi([e,t.globalData.endpointsData,t.globalData.selectorsData,t.globalData.tablesData,t.globalData.extendedData])}const i=[];let s=t.keyValue;e.keepWriter||(s=Ci({},t.keyValue,{KTXwriter:"KTX-Parse v0.3.1"}));for(const t in s){const e=s[t],n=Vi(t),a="string"==typeof e?Vi(e):e,r=n.byteLength+1+a.byteLength+1,o=r%4?4-r%4:0;i.push(Fi([new Uint32Array([r]),n,Oi,a,Oi,new Uint8Array(o).fill(0)]))}const a=Fi(i);if(1!==t.dataFormatDescriptor.length||0!==t.dataFormatDescriptor[0].descriptorType)throw new Error("Only BASICFORMAT Data Format Descriptor output supported.");const r=t.dataFormatDescriptor[0],o=new ArrayBuffer(28+16*r.samples.length),l=new DataView(o),f=24+16*r.samples.length;if(l.setUint32(0,o.byteLength,!0),l.setUint16(4,r.vendorId,!0),l.setUint16(6,r.descriptorType,!0),l.setUint16(8,r.versionNumber,!0),l.setUint16(10,f,!0),l.setUint8(12,r.colorModel),l.setUint8(13,r.colorPrimaries),l.setUint8(14,r.transferFunction),l.setUint8(15,r.flags),!Array.isArray(r.texelBlockDimension))throw new Error("texelBlockDimension is now an array. For dimensionality `d`, set `d - 1`.");l.setUint8(16,r.texelBlockDimension[0]),l.setUint8(17,r.texelBlockDimension[1]),l.setUint8(18,r.texelBlockDimension[2]),l.setUint8(19,r.texelBlockDimension[3]);for(let t=0;t<8;t++)l.setUint8(20+t,r.bytesPlane[t]);for(let t=0;t<r.samples.length;t++){const e=r.samples[t],n=28+16*t;if(e.channelID)throw new Error("channelID has been renamed to channelType.");l.setUint16(n+0,e.bitOffset,!0),l.setUint8(n+2,e.bitLength),l.setUint8(n+3,e.channelType),l.setUint8(n+4,e.samplePosition[0]),l.setUint8(n+5,e.samplePosition[1]),l.setUint8(n+6,e.samplePosition[2]),l.setUint8(n+7,e.samplePosition[3]),64&e.channelType?(l.setInt32(n+8,e.sampleLower,!0),l.setInt32(n+12,e.sampleUpper,!0)):(l.setUint32(n+8,e.sampleLower,!0),l.setUint32(n+12,e.sampleUpper,!0))}const U=Ti.length+68+3*t.levels.length*8,c=U+o.byteLength;let h=n.byteLength>0?c+a.byteLength:0;h%8&&(h+=8-h%8);const _=[],p=new DataView(new ArrayBuffer(3*t.levels.length*8));let g=(h||c+a.byteLength)+n.byteLength;for(let e=0;e<t.levels.length;e++){const n=t.levels[e];_.push(n.levelData),p.setBigUint64(24*e+0,BigInt(g),!0),p.setBigUint64(24*e+8,BigInt(n.levelData.byteLength),!0),p.setBigUint64(24*e+16,BigInt(n.uncompressedByteLength),!0),g+=n.levelData.byteLength}const y=new ArrayBuffer(68),x=new DataView(y);return x.setUint32(0,t.vkFormat,!0),x.setUint32(4,t.typeSize,!0),x.setUint32(8,t.pixelWidth,!0),x.setUint32(12,t.pixelHeight,!0),x.setUint32(16,t.pixelDepth,!0),x.setUint32(20,t.layerCount,!0),x.setUint32(24,t.faceCount,!0),x.setUint32(28,t.levels.length,!0),x.setUint32(32,t.supercompressionScheme,!0),x.setUint32(36,U,!0),x.setUint32(40,o.byteLength,!0),x.setUint32(44,c,!0),x.setUint32(48,a.byteLength,!0),x.setBigUint64(52,BigInt(n.byteLength>0?h:0),!0),x.setBigUint64(60,BigInt(n.byteLength),!0),new Uint8Array(Fi([new Uint8Array(Ti).buffer,y,p.buffer,o,a,h>0?new ArrayBuffer(h-(c+a.byteLength)):new ArrayBuffer(0),n,..._]))}var KTXParse=THREE.KTXParse={};KTXParse.KHR_DF_CHANNEL_RGBSDA_ALPHA=Q,KTXParse.KHR_DF_CHANNEL_RGBSDA_BLUE=q,KTXParse.KHR_DF_CHANNEL_RGBSDA_DEPTH=J,KTXParse.KHR_DF_CHANNEL_RGBSDA_GREEN=Y,KTXParse.KHR_DF_CHANNEL_RGBSDA_RED=R,KTXParse.KHR_DF_CHANNEL_RGBSDA_STENCIL=G,KTXParse.KHR_DF_FLAG_ALPHA_PREMULTIPLIED=p,KTXParse.KHR_DF_FLAG_ALPHA_STRAIGHT=_,KTXParse.KHR_DF_KHR_DESCRIPTORTYPE_BASICFORMAT=s,KTXParse.KHR_DF_MODEL_ASTC=c,KTXParse.KHR_DF_MODEL_ETC1=f,KTXParse.KHR_DF_MODEL_ETC1S=h,KTXParse.KHR_DF_MODEL_ETC2=U,KTXParse.KHR_DF_MODEL_RGBSDA=l,KTXParse.KHR_DF_MODEL_UNSPECIFIED=o,KTXParse.KHR_DF_PRIMARIES_ACES=W,KTXParse.KHR_DF_PRIMARIES_ACESCC=N,KTXParse.KHR_DF_PRIMARIES_ADOBERGB=j,KTXParse.KHR_DF_PRIMARIES_BT2020=z,KTXParse.KHR_DF_PRIMARIES_BT601_EBU=P,KTXParse.KHR_DF_PRIMARIES_BT601_SMPTE=C,KTXParse.KHR_DF_PRIMARIES_BT709=F,KTXParse.KHR_DF_PRIMARIES_CIEXYZ=M,KTXParse.KHR_DF_PRIMARIES_DISPLAYP3=X,KTXParse.KHR_DF_PRIMARIES_NTSC1953=H,KTXParse.KHR_DF_PRIMARIES_PAL525=K,KTXParse.KHR_DF_PRIMARIES_UNSPECIFIED=E,KTXParse.KHR_DF_SAMPLE_DATATYPE_EXPONENT=tt,KTXParse.KHR_DF_SAMPLE_DATATYPE_FLOAT=Z,KTXParse.KHR_DF_SAMPLE_DATATYPE_LINEAR=et,KTXParse.KHR_DF_SAMPLE_DATATYPE_SIGNED=$,KTXParse.KHR_DF_TRANSFER_ACESCC=O,KTXParse.KHR_DF_TRANSFER_ACESCCT=T,KTXParse.KHR_DF_TRANSFER_ADOBERGB=V,KTXParse.KHR_DF_TRANSFER_BT1886=w,KTXParse.KHR_DF_TRANSFER_DCIP3=k,KTXParse.KHR_DF_TRANSFER_HLG_EOTF=B,KTXParse.KHR_DF_TRANSFER_HLG_OETF=D,KTXParse.KHR_DF_TRANSFER_ITU=u,KTXParse.KHR_DF_TRANSFER_LINEAR=y,KTXParse.KHR_DF_TRANSFER_NTSC=b,KTXParse.KHR_DF_TRANSFER_PAL625_EOTF=S,KTXParse.KHR_DF_TRANSFER_PAL_OETF=v,KTXParse.KHR_DF_TRANSFER_PQ_EOTF=L,KTXParse.KHR_DF_TRANSFER_PQ_OETF=A,KTXParse.KHR_DF_TRANSFER_SLOG=d,KTXParse.KHR_DF_TRANSFER_SLOG2=m,KTXParse.KHR_DF_TRANSFER_SRGB=x,KTXParse.KHR_DF_TRANSFER_ST240=I,KTXParse.KHR_DF_TRANSFER_UNSPECIFIED=g,KTXParse.KHR_DF_VENDORID_KHRONOS=a,KTXParse.KHR_DF_VERSION=r,KTXParse.KHR_SUPERCOMPRESSION_BASISLZ=e,KTXParse.KHR_SUPERCOMPRESSION_NONE=t,KTXParse.KHR_SUPERCOMPRESSION_ZLIB=i,KTXParse.KHR_SUPERCOMPRESSION_ZSTD=n,KTXParse.KTX2Container=Si,KTXParse.VK_FORMAT_A1R5G5B5_UNORM_PACK16=Ut,KTXParse.VK_FORMAT_A2B10G10R10_SINT_PACK32=qt,KTXParse.VK_FORMAT_A2B10G10R10_SNORM_PACK32=Rt,KTXParse.VK_FORMAT_A2B10G10R10_UINT_PACK32=Yt,KTXParse.VK_FORMAT_A2B10G10R10_UNORM_PACK32=jt,KTXParse.VK_FORMAT_A2R10G10B10_SINT_PACK32=Xt,KTXParse.VK_FORMAT_A2R10G10B10_SNORM_PACK32=Ht,KTXParse.VK_FORMAT_A2R10G10B10_UINT_PACK32=Kt,KTXParse.VK_FORMAT_A2R10G10B10_UNORM_PACK32=Nt,KTXParse.VK_FORMAT_A4B4G4R4_UNORM_PACK16_EXT=vi,KTXParse.VK_FORMAT_A4R4G4B4_UNORM_PACK16_EXT=ki,KTXParse.VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT=Bi,KTXParse.VK_FORMAT_ASTC_10x10_SRGB_BLOCK=Xn,KTXParse.VK_FORMAT_ASTC_10x10_UNORM_BLOCK=Kn,KTXParse.VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT=mi,KTXParse.VK_FORMAT_ASTC_10x5_SRGB_BLOCK=zn,KTXParse.VK_FORMAT_ASTC_10x5_UNORM_BLOCK=Cn,KTXParse.VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT=wi,KTXParse.VK_FORMAT_ASTC_10x6_SRGB_BLOCK=Wn,KTXParse.VK_FORMAT_ASTC_10x6_UNORM_BLOCK=Mn,KTXParse.VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT=Di,KTXParse.VK_FORMAT_ASTC_10x8_SRGB_BLOCK=Hn,KTXParse.VK_FORMAT_ASTC_10x8_UNORM_BLOCK=Nn,KTXParse.VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT=Li,KTXParse.VK_FORMAT_ASTC_12x10_SRGB_BLOCK=Rn,KTXParse.VK_FORMAT_ASTC_12x10_UNORM_BLOCK=jn,KTXParse.VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT=Ai,KTXParse.VK_FORMAT_ASTC_12x12_SRGB_BLOCK=qn,KTXParse.VK_FORMAT_ASTC_12x12_UNORM_BLOCK=Yn,KTXParse.VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT=_i,KTXParse.VK_FORMAT_ASTC_4x4_SRGB_BLOCK=wn,KTXParse.VK_FORMAT_ASTC_4x4_UNORM_BLOCK=mn,KTXParse.VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT=pi,KTXParse.VK_FORMAT_ASTC_5x4_SRGB_BLOCK=Bn,KTXParse.VK_FORMAT_ASTC_5x4_UNORM_BLOCK=Dn,KTXParse.VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT=gi,KTXParse.VK_FORMAT_ASTC_5x5_SRGB_BLOCK=An,KTXParse.VK_FORMAT_ASTC_5x5_UNORM_BLOCK=Ln,KTXParse.VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT=yi,KTXParse.VK_FORMAT_ASTC_6x5_SRGB_BLOCK=vn,KTXParse.VK_FORMAT_ASTC_6x5_UNORM_BLOCK=kn,KTXParse.VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT=xi,KTXParse.VK_FORMAT_ASTC_6x6_SRGB_BLOCK=In,KTXParse.VK_FORMAT_ASTC_6x6_UNORM_BLOCK=Sn,KTXParse.VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT=ui,KTXParse.VK_FORMAT_ASTC_8x5_SRGB_BLOCK=Tn,KTXParse.VK_FORMAT_ASTC_8x5_UNORM_BLOCK=On,KTXParse.VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT=bi,KTXParse.VK_FORMAT_ASTC_8x6_SRGB_BLOCK=En,KTXParse.VK_FORMAT_ASTC_8x6_UNORM_BLOCK=Vn,KTXParse.VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT=di,KTXParse.VK_FORMAT_ASTC_8x8_SRGB_BLOCK=Pn,KTXParse.VK_FORMAT_ASTC_8x8_UNORM_BLOCK=Fn,KTXParse.VK_FORMAT_B10G11R11_UFLOAT_PACK32=Me,KTXParse.VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16=$n,KTXParse.VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16=si,KTXParse.VK_FORMAT_B4G4R4A4_UNORM_PACK16=at,KTXParse.VK_FORMAT_B5G5R5A1_UNORM_PACK16=ft,KTXParse.VK_FORMAT_B5G6R5_UNORM_PACK16=ot,KTXParse.VK_FORMAT_B8G8R8A8_SINT=Mt,KTXParse.VK_FORMAT_B8G8R8A8_SNORM=Ct,KTXParse.VK_FORMAT_B8G8R8A8_SRGB=Wt,KTXParse.VK_FORMAT_B8G8R8A8_UINT=zt,KTXParse.VK_FORMAT_B8G8R8A8_UNORM=Pt,KTXParse.VK_FORMAT_B8G8R8_SINT=St,KTXParse.VK_FORMAT_B8G8R8_SNORM=kt,KTXParse.VK_FORMAT_B8G8R8_SRGB=It,KTXParse.VK_FORMAT_B8G8R8_UINT=vt,KTXParse.VK_FORMAT_B8G8R8_UNORM=At,KTXParse.VK_FORMAT_BC1_RGBA_SRGB_BLOCK=Qe,KTXParse.VK_FORMAT_BC1_RGBA_UNORM_BLOCK=Je,KTXParse.VK_FORMAT_BC1_RGB_SRGB_BLOCK=Ge,KTXParse.VK_FORMAT_BC1_RGB_UNORM_BLOCK=qe,KTXParse.VK_FORMAT_BC2_SRGB_BLOCK=$e,KTXParse.VK_FORMAT_BC2_UNORM_BLOCK=Ze,KTXParse.VK_FORMAT_BC3_SRGB_BLOCK=en,KTXParse.VK_FORMAT_BC3_UNORM_BLOCK=tn,KTXParse.VK_FORMAT_BC4_SNORM_BLOCK=sn,KTXParse.VK_FORMAT_BC4_UNORM_BLOCK=nn,KTXParse.VK_FORMAT_BC5_SNORM_BLOCK=rn,KTXParse.VK_FORMAT_BC5_UNORM_BLOCK=an,KTXParse.VK_FORMAT_BC6H_SFLOAT_BLOCK=ln,KTXParse.VK_FORMAT_BC6H_UFLOAT_BLOCK=on,KTXParse.VK_FORMAT_BC7_SRGB_BLOCK=Un,KTXParse.VK_FORMAT_BC7_UNORM_BLOCK=fn,KTXParse.VK_FORMAT_D16_UNORM=Ne,KTXParse.VK_FORMAT_D16_UNORM_S8_UINT=je,KTXParse.VK_FORMAT_D24_UNORM_S8_UINT=Re,KTXParse.VK_FORMAT_D32_SFLOAT=Ke,KTXParse.VK_FORMAT_D32_SFLOAT_S8_UINT=Ye,KTXParse.VK_FORMAT_E5B9G9R9_UFLOAT_PACK32=We,KTXParse.VK_FORMAT_EAC_R11G11_SNORM_BLOCK=dn,KTXParse.VK_FORMAT_EAC_R11G11_UNORM_BLOCK=bn,KTXParse.VK_FORMAT_EAC_R11_SNORM_BLOCK=un,KTXParse.VK_FORMAT_EAC_R11_UNORM_BLOCK=xn,KTXParse.VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK=pn,KTXParse.VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK=_n,KTXParse.VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK=yn,KTXParse.VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK=gn,KTXParse.VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK=hn,KTXParse.VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK=cn,KTXParse.VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16=Zn,KTXParse.VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16=ii,KTXParse.VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG=fi,KTXParse.VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG=ai,KTXParse.VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG=Ui,KTXParse.VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG=ri,KTXParse.VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG=ci,KTXParse.VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG=oi,KTXParse.VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG=hi,KTXParse.VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG=li,KTXParse.VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16=Qn,KTXParse.VK_FORMAT_R10X6G10X6_UNORM_2PACK16=Jn,KTXParse.VK_FORMAT_R10X6_UNORM_PACK16=Gn,KTXParse.VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16=ni,KTXParse.VK_FORMAT_R12X4G12X4_UNORM_2PACK16=ei,KTXParse.VK_FORMAT_R12X4_UNORM_PACK16=ti,KTXParse.VK_FORMAT_R16G16B16A16_SFLOAT=pe,KTXParse.VK_FORMAT_R16G16B16A16_SINT=_e,KTXParse.VK_FORMAT_R16G16B16A16_SNORM=ce,KTXParse.VK_FORMAT_R16G16B16A16_UINT=he,KTXParse.VK_FORMAT_R16G16B16A16_UNORM=Ue,KTXParse.VK_FORMAT_R16G16B16_SFLOAT=fe,KTXParse.VK_FORMAT_R16G16B16_SINT=le,KTXParse.VK_FORMAT_R16G16B16_SNORM=re,KTXParse.VK_FORMAT_R16G16B16_UINT=oe,KTXParse.VK_FORMAT_R16G16B16_UNORM=ae,KTXParse.VK_FORMAT_R16G16_SFLOAT=se,KTXParse.VK_FORMAT_R16G16_SINT=ie,KTXParse.VK_FORMAT_R16G16_SNORM=ee,KTXParse.VK_FORMAT_R16G16_UINT=ne,KTXParse.VK_FORMAT_R16G16_UNORM=te,KTXParse.VK_FORMAT_R16_SFLOAT=$t,KTXParse.VK_FORMAT_R16_SINT=Zt,KTXParse.VK_FORMAT_R16_SNORM=Jt,KTXParse.VK_FORMAT_R16_UINT=Qt,KTXParse.VK_FORMAT_R16_UNORM=Gt,KTXParse.VK_FORMAT_R32G32B32A32_SFLOAT=Ae,KTXParse.VK_FORMAT_R32G32B32A32_SINT=Le,KTXParse.VK_FORMAT_R32G32B32A32_UINT=Be,KTXParse.VK_FORMAT_R32G32B32_SFLOAT=De,KTXParse.VK_FORMAT_R32G32B32_SINT=we,KTXParse.VK_FORMAT_R32G32B32_UINT=me,KTXParse.VK_FORMAT_R32G32_SFLOAT=de,KTXParse.VK_FORMAT_R32G32_SINT=be,KTXParse.VK_FORMAT_R32G32_UINT=ue,KTXParse.VK_FORMAT_R32_SFLOAT=xe,KTXParse.VK_FORMAT_R32_SINT=ye,KTXParse.VK_FORMAT_R32_UINT=ge,KTXParse.VK_FORMAT_R4G4B4A4_UNORM_PACK16=st,KTXParse.VK_FORMAT_R4G4_UNORM_PACK8=it,KTXParse.VK_FORMAT_R5G5B5A1_UNORM_PACK16=lt,KTXParse.VK_FORMAT_R5G6B5_UNORM_PACK16=rt,KTXParse.VK_FORMAT_R64G64B64A64_SFLOAT=ze,KTXParse.VK_FORMAT_R64G64B64A64_SINT=Ce,KTXParse.VK_FORMAT_R64G64B64A64_UINT=Pe,KTXParse.VK_FORMAT_R64G64B64_SFLOAT=Fe,KTXParse.VK_FORMAT_R64G64B64_SINT=Ee,KTXParse.VK_FORMAT_R64G64B64_UINT=Ve,KTXParse.VK_FORMAT_R64G64_SFLOAT=Te,KTXParse.VK_FORMAT_R64G64_SINT=Oe,KTXParse.VK_FORMAT_R64G64_UINT=Ie,KTXParse.VK_FORMAT_R64_SFLOAT=Se,KTXParse.VK_FORMAT_R64_SINT=ve,KTXParse.VK_FORMAT_R64_UINT=ke,KTXParse.VK_FORMAT_R8G8B8A8_SINT=Et,KTXParse.VK_FORMAT_R8G8B8A8_SNORM=Tt,KTXParse.VK_FORMAT_R8G8B8A8_SRGB=Ft,KTXParse.VK_FORMAT_R8G8B8A8_UINT=Vt,KTXParse.VK_FORMAT_R8G8B8A8_UNORM=Ot,KTXParse.VK_FORMAT_R8G8B8_SINT=Bt,KTXParse.VK_FORMAT_R8G8B8_SNORM=wt,KTXParse.VK_FORMAT_R8G8B8_SRGB=Lt,KTXParse.VK_FORMAT_R8G8B8_UINT=Dt,KTXParse.VK_FORMAT_R8G8B8_UNORM=mt,KTXParse.VK_FORMAT_R8G8_SINT=bt,KTXParse.VK_FORMAT_R8G8_SNORM=xt,KTXParse.VK_FORMAT_R8G8_SRGB=dt,KTXParse.VK_FORMAT_R8G8_UINT=ut,KTXParse.VK_FORMAT_R8G8_UNORM=yt,KTXParse.VK_FORMAT_R8_SINT=pt,KTXParse.VK_FORMAT_R8_SNORM=ht,KTXParse.VK_FORMAT_R8_SRGB=gt,KTXParse.VK_FORMAT_R8_UINT=_t,KTXParse.VK_FORMAT_R8_UNORM=ct,KTXParse.VK_FORMAT_S8_UINT=Xe,KTXParse.VK_FORMAT_UNDEFINED=nt,KTXParse.VK_FORMAT_X8_D24_UNORM_PACK32=He,KTXParse.read=Pi,KTXParse.write=Mi})();(function(){var CompressedTexture=THREE.CompressedTexture,Data3DTexture=THREE.Data3DTexture,DataTexture=THREE.DataTexture,FileLoader=THREE.FileLoader,FloatType=THREE.FloatType,HalfFloatType=THREE.HalfFloatType,LinearEncoding=THREE.LinearEncoding,LinearFilter=THREE.LinearFilter,LinearMipmapLinearFilter=THREE.LinearMipmapLinearFilter,Loader=THREE.Loader,RedFormat=THREE.RedFormat,RGB_ETC1_Format=THREE.RGB_ETC1_Format,RGB_ETC2_Format=THREE.RGB_ETC2_Format,RGB_PVRTC_4BPPV1_Format=THREE.RGB_PVRTC_4BPPV1_Format,RGB_S3TC_DXT1_Format=THREE.RGB_S3TC_DXT1_Format,RGBA_ASTC_4x4_Format=THREE.RGBA_ASTC_4x4_Format,RGBA_BPTC_Format=THREE.RGBA_BPTC_Format,RGBA_ETC2_EAC_Format=THREE.RGBA_ETC2_EAC_Format,RGBA_PVRTC_4BPPV1_Format=THREE.RGBA_PVRTC_4BPPV1_Format,RGBA_S3TC_DXT5_Format=THREE.RGBA_S3TC_DXT5_Format,RGBAFormat=THREE.RGBAFormat,RGFormat=THREE.RGFormat,sRGBEncoding=THREE.sRGBEncoding,UnsignedByteType=THREE.UnsignedByteType,WorkerPool=THREE.WorkerPool;var read=THREE.KTXParse.read,KHR_DF_FLAG_ALPHA_PREMULTIPLIED=THREE.KTXParse.KHR_DF_FLAG_ALPHA_PREMULTIPLIED,KHR_DF_TRANSFER_SRGB=THREE.KTXParse.KHR_DF_TRANSFER_SRGB,KHR_SUPERCOMPRESSION_NONE=THREE.KTXParse.KHR_SUPERCOMPRESSION_NONE,KHR_SUPERCOMPRESSION_ZSTD=THREE.KTXParse.KHR_SUPERCOMPRESSION_ZSTD,VK_FORMAT_UNDEFINED=THREE.KTXParse.VK_FORMAT_UNDEFINED,VK_FORMAT_R16_SFLOAT=THREE.KTXParse.VK_FORMAT_R16_SFLOAT,VK_FORMAT_R16G16_SFLOAT=THREE.KTXParse.VK_FORMAT_R16G16_SFLOAT,VK_FORMAT_R16G16B16A16_SFLOAT=THREE.KTXParse.VK_FORMAT_R16G16B16A16_SFLOAT,VK_FORMAT_R32_SFLOAT=THREE.KTXParse.VK_FORMAT_R32_SFLOAT,VK_FORMAT_R32G32_SFLOAT=THREE.KTXParse.VK_FORMAT_R32G32_SFLOAT,VK_FORMAT_R32G32B32A32_SFLOAT=THREE.KTXParse.VK_FORMAT_R32G32B32A32_SFLOAT,VK_FORMAT_R8_SRGB=THREE.KTXParse.VK_FORMAT_R8_SRGB,VK_FORMAT_R8_UNORM=THREE.KTXParse.VK_FORMAT_R8_UNORM,VK_FORMAT_R8G8_SRGB=THREE.KTXParse.VK_FORMAT_R8G8_SRGB,VK_FORMAT_R8G8_UNORM=THREE.KTXParse.VK_FORMAT_R8G8_UNORM,VK_FORMAT_R8G8B8A8_SRGB=THREE.KTXParse.VK_FORMAT_R8G8B8A8_SRGB,VK_FORMAT_R8G8B8A8_UNORM=THREE.KTXParse.VK_FORMAT_R8G8B8A8_UNORM;var ZSTDDecoder=THREE.ZSTDDecoder;const _taskCache=new WeakMap;let _activeLoaders=0;let _zstd;class KTX2Loader extends Loader{constructor(manager){super(manager);this.transcoderPath="";this.transcoderBinary=null;this.transcoderPending=null;this.workerPool=new WorkerPool;this.workerSourceURL="";this.workerConfig=null;if(typeof MSC_TRANSCODER!=="undefined"){console.warn("THREE.KTX2Loader: Please update to latest \"basis_transcoder\"."+" \"msc_basis_transcoder\" is no longer supported in three.js r125+.")}}setTranscoderPath(path){this.transcoderPath=path;return this}setWorkerLimit(num){this.workerPool.setWorkerLimit(num);return this}detectSupport(renderer){this.workerConfig={astcSupported:renderer.extensions.has("WEBGL_compressed_texture_astc"),etc1Supported:renderer.extensions.has("WEBGL_compressed_texture_etc1"),etc2Supported:renderer.extensions.has("WEBGL_compressed_texture_etc"),dxtSupported:renderer.extensions.has("WEBGL_compressed_texture_s3tc"),bptcSupported:renderer.extensions.has("EXT_texture_compression_bptc"),pvrtcSupported:renderer.extensions.has("WEBGL_compressed_texture_pvrtc")||renderer.extensions.has("WEBKIT_WEBGL_compressed_texture_pvrtc")};if(renderer.capabilities.isWebGL2){this.workerConfig.etc1Supported=false}return this}init(){if(!this.transcoderPending){const jsLoader=new FileLoader(this.manager);jsLoader.setPath(this.transcoderPath);jsLoader.setWithCredentials(this.withCredentials);const jsContent=jsLoader.loadAsync("basis_transcoder.js");const binaryLoader=new FileLoader(this.manager);binaryLoader.setPath(this.transcoderPath);binaryLoader.setResponseType("arraybuffer");binaryLoader.setWithCredentials(this.withCredentials);const binaryContent=binaryLoader.loadAsync("basis_transcoder.wasm");this.transcoderPending=Promise.all([jsContent,binaryContent]).then(([jsContent,binaryContent])=>{const fn=KTX2Loader.BasisWorker.toString();const body=["/* constants */","let _EngineFormat = "+JSON.stringify(KTX2Loader.EngineFormat),"let _TranscoderFormat = "+JSON.stringify(KTX2Loader.TranscoderFormat),"let _BasisFormat = "+JSON.stringify(KTX2Loader.BasisFormat),"/* basis_transcoder.js */",jsContent,"/* worker */",fn.substring(fn.indexOf("{")+1,fn.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([body]));this.transcoderBinary=binaryContent;this.workerPool.setWorkerCreator(()=>{const worker=new Worker(this.workerSourceURL);const transcoderBinary=this.transcoderBinary.slice(0);worker.postMessage({type:"init",config:this.workerConfig,transcoderBinary},[transcoderBinary]);return worker})});if(_activeLoaders>0){console.warn("THREE.KTX2Loader: Multiple active KTX2 loaders may cause performance issues."+" Use a single KTX2Loader instance, or call .dispose() on old instances.")}_activeLoaders++}return this.transcoderPending}load(url,onLoad,onProgress,onError){if(this.workerConfig===null){throw new Error("THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.")}const loader=new FileLoader(this.manager);loader.setResponseType("arraybuffer");loader.setWithCredentials(this.withCredentials);loader.load(url,buffer=>{if(_taskCache.has(buffer)){const cachedTask=_taskCache.get(buffer);return cachedTask.promise.then(onLoad).catch(onError)}this._createTexture(buffer).then(texture=>onLoad?onLoad(texture):null).catch(onError)},onProgress,onError)}_createTextureFrom(transcodeResult){const{mipmaps,width,height,format,type,error,dfdTransferFn,dfdFlags}=transcodeResult;if(type==="error")return Promise.reject(error);const texture=new CompressedTexture(mipmaps,width,height,format,UnsignedByteType);texture.minFilter=mipmaps.length===1?LinearFilter:LinearMipmapLinearFilter;texture.magFilter=LinearFilter;texture.generateMipmaps=false;texture.needsUpdate=true;texture.encoding=dfdTransferFn===KHR_DF_TRANSFER_SRGB?sRGBEncoding:LinearEncoding;texture.premultiplyAlpha=!!(dfdFlags&KHR_DF_FLAG_ALPHA_PREMULTIPLIED);return texture}_createTexture(buffer,config={}){const container=read(new Uint8Array(buffer));if(container.vkFormat!==VK_FORMAT_UNDEFINED){return createDataTexture(container)}const taskConfig=config;const texturePending=this.init().then(()=>{return this.workerPool.postMessage({type:"transcode",buffer,taskConfig:taskConfig},[buffer])}).then(e=>this._createTextureFrom(e.data));_taskCache.set(buffer,{promise:texturePending});return texturePending}dispose(){this.workerPool.dispose();if(this.workerSourceURL)URL.revokeObjectURL(this.workerSourceURL);_activeLoaders--;return this}}KTX2Loader.BasisFormat={ETC1S:0,UASTC_4x4:1};KTX2Loader.TranscoderFormat={ETC1:0,ETC2:1,BC1:2,BC3:3,BC4:4,BC5:5,BC7_M6_OPAQUE_ONLY:6,BC7_M5:7,PVRTC1_4_RGB:8,PVRTC1_4_RGBA:9,ASTC_4x4:10,ATC_RGB:11,ATC_RGBA_INTERPOLATED_ALPHA:12,RGBA32:13,RGB565:14,BGR565:15,RGBA4444:16};KTX2Loader.EngineFormat={RGBAFormat:RGBAFormat,RGBA_ASTC_4x4_Format:RGBA_ASTC_4x4_Format,RGBA_BPTC_Format:RGBA_BPTC_Format,RGBA_ETC2_EAC_Format:RGBA_ETC2_EAC_Format,RGBA_PVRTC_4BPPV1_Format:RGBA_PVRTC_4BPPV1_Format,RGBA_S3TC_DXT5_Format:RGBA_S3TC_DXT5_Format,RGB_ETC1_Format:RGB_ETC1_Format,RGB_ETC2_Format:RGB_ETC2_Format,RGB_PVRTC_4BPPV1_Format:RGB_PVRTC_4BPPV1_Format,RGB_S3TC_DXT1_Format:RGB_S3TC_DXT1_Format};KTX2Loader.BasisWorker=function(){let config;let transcoderPending;let BasisModule;const EngineFormat=_EngineFormat;const TranscoderFormat=_TranscoderFormat;const BasisFormat=_BasisFormat;self.addEventListener("message",function(e){const message=e.data;switch(message.type){case"init":config=message.config;init(message.transcoderBinary);break;case"transcode":transcoderPending.then(()=>{try{const{width,height,hasAlpha,mipmaps,format,dfdTransferFn,dfdFlags}=transcode(message.buffer);const buffers=[];for(let i=0;i<mipmaps.length;++i){buffers.push(mipmaps[i].data.buffer)}self.postMessage({type:"transcode",id:message.id,width,height,hasAlpha,mipmaps,format,dfdTransferFn,dfdFlags},buffers)}catch(error){console.error(error);self.postMessage({type:"error",id:message.id,error:error.message})}});break;}});function init(wasmBinary){transcoderPending=new Promise(resolve=>{BasisModule={wasmBinary,onRuntimeInitialized:resolve};BASIS(BasisModule)}).then(()=>{BasisModule.initializeBasis();if(BasisModule.KTX2File===undefined){console.warn("THREE.KTX2Loader: Please update Basis Universal transcoder.")}})}function transcode(buffer){const ktx2File=new BasisModule.KTX2File(new Uint8Array(buffer));function cleanup(){ktx2File.close();ktx2File.delete()}if(!ktx2File.isValid()){cleanup();throw new Error("THREE.KTX2Loader:\tInvalid or unsupported .ktx2 file")}const basisFormat=ktx2File.isUASTC()?BasisFormat.UASTC_4x4:BasisFormat.ETC1S;const width=ktx2File.getWidth();const height=ktx2File.getHeight();const levels=ktx2File.getLevels();const hasAlpha=ktx2File.getHasAlpha();const dfdTransferFn=ktx2File.getDFDTransferFunc();const dfdFlags=ktx2File.getDFDFlags();const{transcoderFormat,engineFormat}=getTranscoderFormat(basisFormat,width,height,hasAlpha);if(!width||!height||!levels){cleanup();throw new Error("THREE.KTX2Loader:\tInvalid texture")}if(!ktx2File.startTranscoding()){cleanup();throw new Error("THREE.KTX2Loader: .startTranscoding failed")}const mipmaps=[];for(let mip=0;mip<levels;mip++){const levelInfo=ktx2File.getImageLevelInfo(mip,0,0);const mipWidth=levelInfo.origWidth;const mipHeight=levelInfo.origHeight;const dst=new Uint8Array(ktx2File.getImageTranscodedSizeInBytes(mip,0,0,transcoderFormat));const status=ktx2File.transcodeImage(dst,mip,0,0,transcoderFormat,0,-1,-1);if(!status){cleanup();throw new Error("THREE.KTX2Loader: .transcodeImage failed.")}mipmaps.push({data:dst,width:mipWidth,height:mipHeight})}cleanup();return{width,height,hasAlpha,mipmaps,format:engineFormat,dfdTransferFn,dfdFlags}}const FORMAT_OPTIONS=[{if:"astcSupported",basisFormat:[BasisFormat.UASTC_4x4],transcoderFormat:[TranscoderFormat.ASTC_4x4,TranscoderFormat.ASTC_4x4],engineFormat:[EngineFormat.RGBA_ASTC_4x4_Format,EngineFormat.RGBA_ASTC_4x4_Format],priorityETC1S:Infinity,priorityUASTC:1,needsPowerOfTwo:false},{if:"bptcSupported",basisFormat:[BasisFormat.ETC1S,BasisFormat.UASTC_4x4],transcoderFormat:[TranscoderFormat.BC7_M5,TranscoderFormat.BC7_M5],engineFormat:[EngineFormat.RGBA_BPTC_Format,EngineFormat.RGBA_BPTC_Format],priorityETC1S:3,priorityUASTC:2,needsPowerOfTwo:false},{if:"dxtSupported",basisFormat:[BasisFormat.ETC1S,BasisFormat.UASTC_4x4],transcoderFormat:[TranscoderFormat.BC1,TranscoderFormat.BC3],engineFormat:[EngineFormat.RGB_S3TC_DXT1_Format,EngineFormat.RGBA_S3TC_DXT5_Format],priorityETC1S:4,priorityUASTC:5,needsPowerOfTwo:false},{if:"etc2Supported",basisFormat:[BasisFormat.ETC1S,BasisFormat.UASTC_4x4],transcoderFormat:[TranscoderFormat.ETC1,TranscoderFormat.ETC2],engineFormat:[EngineFormat.RGB_ETC2_Format,EngineFormat.RGBA_ETC2_EAC_Format],priorityETC1S:1,priorityUASTC:3,needsPowerOfTwo:false},{if:"etc1Supported",basisFormat:[BasisFormat.ETC1S,BasisFormat.UASTC_4x4],transcoderFormat:[TranscoderFormat.ETC1],engineFormat:[EngineFormat.RGB_ETC1_Format],priorityETC1S:2,priorityUASTC:4,needsPowerOfTwo:false},{if:"pvrtcSupported",basisFormat:[BasisFormat.ETC1S,BasisFormat.UASTC_4x4],transcoderFormat:[TranscoderFormat.PVRTC1_4_RGB,TranscoderFormat.PVRTC1_4_RGBA],engineFormat:[EngineFormat.RGB_PVRTC_4BPPV1_Format,EngineFormat.RGBA_PVRTC_4BPPV1_Format],priorityETC1S:5,priorityUASTC:6,needsPowerOfTwo:true}];const ETC1S_OPTIONS=FORMAT_OPTIONS.sort(function(a,b){return a.priorityETC1S-b.priorityETC1S});const UASTC_OPTIONS=FORMAT_OPTIONS.sort(function(a,b){return a.priorityUASTC-b.priorityUASTC});function getTranscoderFormat(basisFormat,width,height,hasAlpha){let transcoderFormat;let engineFormat;const options=basisFormat===BasisFormat.ETC1S?ETC1S_OPTIONS:UASTC_OPTIONS;for(let i=0;i<options.length;i++){const opt=options[i];if(!config[opt.if])continue;if(!opt.basisFormat.includes(basisFormat))continue;if(hasAlpha&&opt.transcoderFormat.length<2)continue;if(opt.needsPowerOfTwo&&!(isPowerOfTwo(width)&&isPowerOfTwo(height)))continue;transcoderFormat=opt.transcoderFormat[hasAlpha?1:0];engineFormat=opt.engineFormat[hasAlpha?1:0];return{transcoderFormat,engineFormat}}console.warn("THREE.KTX2Loader: No suitable compressed texture format found. Decoding to RGBA32.");transcoderFormat=TranscoderFormat.RGBA32;engineFormat=EngineFormat.RGBAFormat;return{transcoderFormat,engineFormat}}function isPowerOfTwo(value){if(value<=2)return true;return(value&value-1)===0&&value!==0}};const FORMAT_MAP={[VK_FORMAT_R32G32B32A32_SFLOAT]:RGBAFormat,[VK_FORMAT_R16G16B16A16_SFLOAT]:RGBAFormat,[VK_FORMAT_R8G8B8A8_UNORM]:RGBAFormat,[VK_FORMAT_R8G8B8A8_SRGB]:RGBAFormat,[VK_FORMAT_R32G32_SFLOAT]:RGFormat,[VK_FORMAT_R16G16_SFLOAT]:RGFormat,[VK_FORMAT_R8G8_UNORM]:RGFormat,[VK_FORMAT_R8G8_SRGB]:RGFormat,[VK_FORMAT_R32_SFLOAT]:RedFormat,[VK_FORMAT_R16_SFLOAT]:RedFormat,[VK_FORMAT_R8_SRGB]:RedFormat,[VK_FORMAT_R8_UNORM]:RedFormat};const TYPE_MAP={[VK_FORMAT_R32G32B32A32_SFLOAT]:FloatType,[VK_FORMAT_R16G16B16A16_SFLOAT]:HalfFloatType,[VK_FORMAT_R8G8B8A8_UNORM]:UnsignedByteType,[VK_FORMAT_R8G8B8A8_SRGB]:UnsignedByteType,[VK_FORMAT_R32G32_SFLOAT]:FloatType,[VK_FORMAT_R16G16_SFLOAT]:HalfFloatType,[VK_FORMAT_R8G8_UNORM]:UnsignedByteType,[VK_FORMAT_R8G8_SRGB]:UnsignedByteType,[VK_FORMAT_R32_SFLOAT]:FloatType,[VK_FORMAT_R16_SFLOAT]:HalfFloatType,[VK_FORMAT_R8_SRGB]:UnsignedByteType,[VK_FORMAT_R8_UNORM]:UnsignedByteType};const ENCODING_MAP={[VK_FORMAT_R8G8B8A8_SRGB]:sRGBEncoding,[VK_FORMAT_R8G8_SRGB]:sRGBEncoding,[VK_FORMAT_R8_SRGB]:sRGBEncoding};async function createDataTexture(container){const{vkFormat,pixelWidth,pixelHeight,pixelDepth}=container;if(FORMAT_MAP[vkFormat]===undefined){throw new Error("THREE.KTX2Loader: Unsupported vkFormat.")}const level=container.levels[0];let levelData;let view;if(container.supercompressionScheme===KHR_SUPERCOMPRESSION_NONE){levelData=level.levelData}else if(container.supercompressionScheme===KHR_SUPERCOMPRESSION_ZSTD){if(!_zstd){_zstd=new Promise(async resolve=>{const zstd=new ZSTDDecoder;await zstd.init();resolve(zstd)})}levelData=(await _zstd).decode(level.levelData,level.uncompressedByteLength)}else{throw new Error("THREE.KTX2Loader: Unsupported supercompressionScheme.")}if(TYPE_MAP[vkFormat]===FloatType){view=new Float32Array(levelData.buffer,levelData.byteOffset,levelData.byteLength/Float32Array.BYTES_PER_ELEMENT)}else if(TYPE_MAP[vkFormat]===HalfFloatType){view=new Uint16Array(levelData.buffer,levelData.byteOffset,levelData.byteLength/Uint16Array.BYTES_PER_ELEMENT)}else{view=levelData}const texture=pixelDepth===0?new DataTexture(view,pixelWidth,pixelHeight):new Data3DTexture(view,pixelWidth,pixelHeight,pixelDepth);texture.type=TYPE_MAP[vkFormat];texture.format=FORMAT_MAP[vkFormat];texture.encoding=ENCODING_MAP[vkFormat]||LinearEncoding;texture.needsUpdate=true;return Promise.resolve(texture)}THREE.KTX2Loader=KTX2Loader})();(function(){let A,I,B;const g={env:{emscripten_notify_memory_growth:function(A){B=new Uint8Array(I.exports.memory.buffer)}}};class Q{init(){return A||(A="undefined"!=typeof fetch?fetch("data:application/wasm;base64,"+C).then(A=>A.arrayBuffer()).then(A=>WebAssembly.instantiate(A,g)).then(this._init):WebAssembly.instantiate(Buffer.from(C,"base64"),g).then(this._init),A)}_init(A){I=A.instance,g.env.emscripten_notify_memory_growth(0)}decode(A,g=0){if(!I)throw new Error("ZSTDDecoder: Await .init() before decoding.");const Q=A.byteLength,C=I.exports.malloc(Q);B.set(A,C),g=g||Number(I.exports.ZSTD_findDecompressedSize(C,Q));const E=I.exports.malloc(g),i=I.exports.ZSTD_decompress(E,g,C,Q),D=B.slice(E,E+i);return I.exports.free(C),I.exports.free(E),D}}const C=" ";THREE.ZSTDDecoder=Q})();(function(){var BufferAttribute=THREE.BufferAttribute,BufferGeometry=THREE.BufferGeometry,Color=THREE.Color,FileLoader=THREE.FileLoader,Loader=THREE.Loader,LinearSRGBColorSpace=THREE.LinearSRGBColorSpace,SRGBColorSpace=THREE.SRGBColorSpace;const _taskCache=new WeakMap;class DRACOLoader extends Loader{constructor(manager){super(manager);this.decoderPath="";this.decoderConfig={};this.decoderBinary=null;this.decoderPending=null;this.workerLimit=4;this.workerPool=[];this.workerNextTaskID=1;this.workerSourceURL="";this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"};this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(path){this.decoderPath=path;return this}setDecoderConfig(config){this.decoderConfig=config;return this}setWorkerLimit(workerLimit){this.workerLimit=workerLimit;return this}load(url,onLoad,onProgress,onError){const loader=new FileLoader(this.manager);loader.setPath(this.path);loader.setResponseType("arraybuffer");loader.setRequestHeader(this.requestHeader);loader.setWithCredentials(this.withCredentials);loader.load(url,buffer=>{this.parse(buffer,onLoad,onError)},onProgress,onError)}parse(buffer,onLoad,onError=()=>{}){this.decodeDracoFile(buffer,onLoad,null,null,SRGBColorSpace).catch(onError)}decodeDracoFile(buffer,callback,attributeIDs,attributeTypes,vertexColorSpace=LinearSRGBColorSpace,onError=()=>{}){const taskConfig={attributeIDs:attributeIDs||this.defaultAttributeIDs,attributeTypes:attributeTypes||this.defaultAttributeTypes,useUniqueIDs:!!attributeIDs,vertexColorSpace:vertexColorSpace};return this.decodeGeometry(buffer,taskConfig).then(callback).catch(onError)}decodeGeometry(buffer,taskConfig){const taskKey=JSON.stringify(taskConfig);if(_taskCache.has(buffer)){const cachedTask=_taskCache.get(buffer);if(cachedTask.key===taskKey){return cachedTask.promise}else if(buffer.byteLength===0){throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different "+"settings. Buffer has already been transferred.")}}let worker;const taskID=this.workerNextTaskID++;const taskCost=buffer.byteLength;const geometryPending=this._getWorker(taskID,taskCost).then(_worker=>{worker=_worker;return new Promise((resolve,reject)=>{worker._callbacks[taskID]={resolve,reject};worker.postMessage({type:"decode",id:taskID,taskConfig,buffer},[buffer])})}).then(message=>this._createGeometry(message.geometry));geometryPending.catch(()=>true).then(()=>{if(worker&&taskID){this._releaseTask(worker,taskID)}});_taskCache.set(buffer,{key:taskKey,promise:geometryPending});return geometryPending}_createGeometry(geometryData){const geometry=new BufferGeometry;if(geometryData.index){geometry.setIndex(new BufferAttribute(geometryData.index.array,1))}for(let i=0;i<geometryData.attributes.length;i++){const result=geometryData.attributes[i];const name=result.name;const array=result.array;const itemSize=result.itemSize;const attribute=new BufferAttribute(array,itemSize);if(name==="color"){this._assignVertexColorSpace(attribute,result.vertexColorSpace);attribute.normalized=array instanceof Float32Array===false}geometry.setAttribute(name,attribute)}return geometry}_assignVertexColorSpace(attribute,inputColorSpace){if(inputColorSpace!==SRGBColorSpace)return;const _color=new Color;for(let i=0,il=attribute.count;i<il;i++){_color.fromBufferAttribute(attribute,i).convertSRGBToLinear();attribute.setXYZ(i,_color.r,_color.g,_color.b)}}_loadLibrary(url,responseType){const loader=new FileLoader(this.manager);loader.setPath(this.decoderPath);loader.setResponseType(responseType);loader.setWithCredentials(this.withCredentials);return new Promise((resolve,reject)=>{loader.load(url,resolve,undefined,reject)})}preload(){this._initDecoder();return this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const useJS=typeof WebAssembly!=="object"||this.decoderConfig.type==="js";const librariesPending=[];if(useJS){librariesPending.push(this._loadLibrary("draco_decoder.js","text"))}else{librariesPending.push(this._loadLibrary("draco_wasm_wrapper.js","text"));librariesPending.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))}this.decoderPending=Promise.all(librariesPending).then(libraries=>{const jsContent=libraries[0];if(!useJS){this.decoderConfig.wasmBinary=libraries[1]}const fn=DRACOWorker.toString();const body=["/* draco decoder */",jsContent,"","/* worker */",fn.substring(fn.indexOf("{")+1,fn.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([body]))});return this.decoderPending}_getWorker(taskID,taskCost){return this._initDecoder().then(()=>{if(this.workerPool.length<this.workerLimit){const worker=new Worker(this.workerSourceURL);worker._callbacks={};worker._taskCosts={};worker._taskLoad=0;worker.postMessage({type:"init",decoderConfig:this.decoderConfig});worker.onmessage=function(e){const message=e.data;switch(message.type){case"decode":worker._callbacks[message.id].resolve(message);break;case"error":worker._callbacks[message.id].reject(message);break;default:console.error("THREE.DRACOLoader: Unexpected message, \""+message.type+"\"");}};this.workerPool.push(worker)}else{this.workerPool.sort(function(a,b){return a._taskLoad>b._taskLoad?-1:1})}const worker=this.workerPool[this.workerPool.length-1];worker._taskCosts[taskID]=taskCost;worker._taskLoad+=taskCost;return worker})}_releaseTask(worker,taskID){worker._taskLoad-=worker._taskCosts[taskID];delete worker._callbacks[taskID];delete worker._taskCosts[taskID]}debug(){console.log("Task load: ",this.workerPool.map(worker=>worker._taskLoad))}dispose(){for(let i=0;i<this.workerPool.length;++i){this.workerPool[i].terminate()}this.workerPool.length=0;if(this.workerSourceURL!==""){URL.revokeObjectURL(this.workerSourceURL)}return this}}function DRACOWorker(){let decoderConfig;let decoderPending;onmessage=function(e){const message=e.data;switch(message.type){case"init":decoderConfig=message.decoderConfig;decoderPending=new Promise(function(resolve){decoderConfig.onModuleLoaded=function(draco){resolve({draco:draco})};DracoDecoderModule(decoderConfig)});break;case"decode":const buffer=message.buffer;const taskConfig=message.taskConfig;decoderPending.then(module=>{const draco=module.draco;const decoder=new draco.Decoder;try{const geometry=decodeGeometry(draco,decoder,new Int8Array(buffer),taskConfig);const buffers=geometry.attributes.map(attr=>attr.array.buffer);if(geometry.index)buffers.push(geometry.index.array.buffer);self.postMessage({type:"decode",id:message.id,geometry},buffers)}catch(error){console.error(error);self.postMessage({type:"error",id:message.id,error:error.message})}finally{draco.destroy(decoder)}});break;}};function decodeGeometry(draco,decoder,array,taskConfig){const attributeIDs=taskConfig.attributeIDs;const attributeTypes=taskConfig.attributeTypes;let dracoGeometry;let decodingStatus;const geometryType=decoder.GetEncodedGeometryType(array);if(geometryType===draco.TRIANGULAR_MESH){dracoGeometry=new draco.Mesh;decodingStatus=decoder.DecodeArrayToMesh(array,array.byteLength,dracoGeometry)}else if(geometryType===draco.POINT_CLOUD){dracoGeometry=new draco.PointCloud;decodingStatus=decoder.DecodeArrayToPointCloud(array,array.byteLength,dracoGeometry)}else{throw new Error("THREE.DRACOLoader: Unexpected geometry type.")}if(!decodingStatus.ok()||dracoGeometry.ptr===0){throw new Error("THREE.DRACOLoader: Decoding failed: "+decodingStatus.error_msg())}const geometry={index:null,attributes:[]};for(const attributeName in attributeIDs){const attributeType=self[attributeTypes[attributeName]];let attribute;let attributeID;if(taskConfig.useUniqueIDs){attributeID=attributeIDs[attributeName];attribute=decoder.GetAttributeByUniqueId(dracoGeometry,attributeID)}else{attributeID=decoder.GetAttributeId(dracoGeometry,draco[attributeIDs[attributeName]]);if(attributeID===-1)continue;attribute=decoder.GetAttribute(dracoGeometry,attributeID)}const attributeResult=decodeAttribute(draco,decoder,dracoGeometry,attributeName,attributeType,attribute);if(attributeName==="color"){attributeResult.vertexColorSpace=taskConfig.vertexColorSpace}geometry.attributes.push(attributeResult)}if(geometryType===draco.TRIANGULAR_MESH){geometry.index=decodeIndex(draco,decoder,dracoGeometry)}draco.destroy(dracoGeometry);return geometry}function decodeIndex(draco,decoder,dracoGeometry){const numFaces=dracoGeometry.num_faces();const numIndices=numFaces*3;const byteLength=numIndices*4;const ptr=draco._malloc(byteLength);decoder.GetTrianglesUInt32Array(dracoGeometry,byteLength,ptr);const index=new Uint32Array(draco.HEAPF32.buffer,ptr,numIndices).slice();draco._free(ptr);return{array:index,itemSize:1}}function decodeAttribute(draco,decoder,dracoGeometry,attributeName,attributeType,attribute){const numComponents=attribute.num_components();const numPoints=dracoGeometry.num_points();const numValues=numPoints*numComponents;const byteLength=numValues*attributeType.BYTES_PER_ELEMENT;const dataType=getDracoDataType(draco,attributeType);const ptr=draco._malloc(byteLength);decoder.GetAttributeDataArrayForAllPoints(dracoGeometry,attribute,dataType,byteLength,ptr);const array=new attributeType(draco.HEAPF32.buffer,ptr,numValues).slice();draco._free(ptr);return{name:attributeName,array:array,itemSize:numComponents}}function getDracoDataType(draco,attributeType){switch(attributeType){case Float32Array:return draco.DT_FLOAT32;case Int8Array:return draco.DT_INT8;case Int16Array:return draco.DT_INT16;case Int32Array:return draco.DT_INT32;case Uint8Array:return draco.DT_UINT8;case Uint16Array:return draco.DT_UINT16;case Uint32Array:return draco.DT_UINT32;}}}THREE.DRACOLoader=DRACOLoader})();(function(e){var modifiedJSON={};modifiedJSON.parse=function(data){json=JSON.parse(data);json.nodes&&json.nodes.forEach((node,index)=>{(node.extras||(node.extras={})).id=index.toString()});return json};e(modifiedJSON)})(function(JSON){(function(){var AnimationClip=THREE.AnimationClip,Bone=THREE.Bone,Box3=THREE.Box3,BufferAttribute=THREE.BufferAttribute,BufferGeometry=THREE.BufferGeometry,ClampToEdgeWrapping=THREE.ClampToEdgeWrapping,Color=THREE.Color,ColorManagement=THREE.ColorManagement,DirectionalLight=THREE.DirectionalLight,DoubleSide=THREE.DoubleSide,FileLoader=THREE.FileLoader,FrontSide=THREE.FrontSide,Group=THREE.Group,ImageBitmapLoader=THREE.ImageBitmapLoader,InstancedMesh=THREE.InstancedMesh,InterleavedBuffer=THREE.InterleavedBuffer,InterleavedBufferAttribute=THREE.InterleavedBufferAttribute,Interpolant=THREE.Interpolant,InterpolateDiscrete=THREE.InterpolateDiscrete,InterpolateLinear=THREE.InterpolateLinear,Line=THREE.Line,LineBasicMaterial=THREE.LineBasicMaterial,LineLoop=THREE.LineLoop,LineSegments=THREE.LineSegments,LinearFilter=THREE.LinearFilter,LinearMipmapLinearFilter=THREE.LinearMipmapLinearFilter,LinearMipmapNearestFilter=THREE.LinearMipmapNearestFilter,LinearSRGBColorSpace=THREE.LinearSRGBColorSpace,Loader=THREE.Loader,LoaderUtils=THREE.LoaderUtils,Material=THREE.Material,MathUtils=THREE.MathUtils,Matrix4=THREE.Matrix4,Mesh=THREE.Mesh,MeshBasicMaterial=THREE.MeshBasicMaterial,MeshPhysicalMaterial=THREE.MeshPhysicalMaterial,MeshStandardMaterial=THREE.MeshStandardMaterial,MirroredRepeatWrapping=THREE.MirroredRepeatWrapping,NearestFilter=THREE.NearestFilter,NearestMipmapLinearFilter=THREE.NearestMipmapLinearFilter,NearestMipmapNearestFilter=THREE.NearestMipmapNearestFilter,NumberKeyframeTrack=THREE.NumberKeyframeTrack,Object3D=THREE.Object3D,OrthographicCamera=THREE.OrthographicCamera,PerspectiveCamera=THREE.PerspectiveCamera,PointLight=THREE.PointLight,Points=THREE.Points,PointsMaterial=THREE.PointsMaterial,PropertyBinding=THREE.PropertyBinding,Quaternion=THREE.Quaternion,QuaternionKeyframeTrack=THREE.QuaternionKeyframeTrack,RepeatWrapping=THREE.RepeatWrapping,Skeleton=THREE.Skeleton,SkinnedMesh=THREE.SkinnedMesh,Sphere=THREE.Sphere,SpotLight=THREE.SpotLight,Texture=THREE.Texture,TextureLoader=THREE.TextureLoader,TriangleFanDrawMode=THREE.TriangleFanDrawMode,TriangleStripDrawMode=THREE.TriangleStripDrawMode,Vector2=THREE.Vector2,Vector3=THREE.Vector3,VectorKeyframeTrack=THREE.VectorKeyframeTrack,SRGBColorSpace=THREE.SRGBColorSpace,InstancedBufferAttribute=THREE.InstancedBufferAttribute;var toTrianglesDrawMode=THREE.BufferGeometryUtils.toTrianglesDrawMode;class GLTFLoader extends Loader{constructor(manager){super(manager);this.dracoLoader=null;this.ktx2Loader=null;this.meshoptDecoder=null;this.pluginCallbacks=[];this.register(function(parser){return new GLTFMaterialsClearcoatExtension(parser)});this.register(function(parser){return new GLTFMaterialsDispersionExtension(parser)});this.register(function(parser){return new GLTFTextureBasisUExtension(parser)});this.register(function(parser){return new GLTFTextureWebPExtension(parser)});this.register(function(parser){return new GLTFTextureAVIFExtension(parser)});this.register(function(parser){return new GLTFMaterialsSheenExtension(parser)});this.register(function(parser){return new GLTFMaterialsTransmissionExtension(parser)});this.register(function(parser){return new GLTFMaterialsVolumeExtension(parser)});this.register(function(parser){return new GLTFMaterialsIorExtension(parser)});this.register(function(parser){return new GLTFMaterialsEmissiveStrengthExtension(parser)});this.register(function(parser){return new GLTFMaterialsSpecularExtension(parser)});this.register(function(parser){return new GLTFMaterialsIridescenceExtension(parser)});this.register(function(parser){return new GLTFMaterialsAnisotropyExtension(parser)});this.register(function(parser){return new GLTFMaterialsBumpExtension(parser)});this.register(function(parser){return new GLTFLightsExtension(parser)});this.register(function(parser){return new GLTFMeshoptCompression(parser)});this.register(function(parser){return new GLTFMeshGpuInstancing(parser)})}load(url,onLoad,onProgress,onError){const scope=this;let resourcePath;if(this.resourcePath!==""){resourcePath=this.resourcePath}else if(this.path!==""){const relativeUrl=LoaderUtils.extractUrlBase(url);resourcePath=LoaderUtils.resolveURL(relativeUrl,this.path)}else{resourcePath=LoaderUtils.extractUrlBase(url)}this.manager.itemStart(url);const _onError=function(e){if(onError){onError(e)}else{console.error(e)}scope.manager.itemError(url);scope.manager.itemEnd(url)};const loader=new FileLoader(this.manager);loader.setPath(this.path);loader.setResponseType("arraybuffer");loader.setRequestHeader(this.requestHeader);loader.setWithCredentials(this.withCredentials);loader.load(url,function(data){try{scope.parse(data,resourcePath,function(gltf){onLoad(gltf);scope.manager.itemEnd(url)},_onError)}catch(e){_onError(e)}},onProgress,_onError)}setDRACOLoader(dracoLoader){this.dracoLoader=dracoLoader;return this}setDDSLoader(){throw new Error("THREE.GLTFLoader: \"MSFT_texture_dds\" no longer supported. Please update to \"KHR_texture_basisu\".")}setKTX2Loader(ktx2Loader){this.ktx2Loader=ktx2Loader;return this}setMeshoptDecoder(meshoptDecoder){this.meshoptDecoder=meshoptDecoder;return this}register(callback){if(this.pluginCallbacks.indexOf(callback)===-1){this.pluginCallbacks.push(callback)}return this}unregister(callback){if(this.pluginCallbacks.indexOf(callback)!==-1){this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(callback),1)}return this}parse(data,path,onLoad,onError){let json;const extensions={};const plugins={};const textDecoder=new TextDecoder;if(typeof data==="string"){json=JSON.parse(data)}else if(data instanceof ArrayBuffer){const magic=textDecoder.decode(new Uint8Array(data,0,4));if(magic===BINARY_EXTENSION_HEADER_MAGIC){try{extensions[EXTENSIONS.KHR_BINARY_GLTF]=new GLTFBinaryExtension(data)}catch(error){if(onError)onError(error);return}json=JSON.parse(extensions[EXTENSIONS.KHR_BINARY_GLTF].content)}else{json=JSON.parse(textDecoder.decode(data))}}else{json=data}if(json.asset===undefined||json.asset.version[0]<2){if(onError)onError(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const parser=new GLTFParser(json,{path:path||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});parser.fileLoader.setRequestHeader(this.requestHeader);for(let i=0;i<this.pluginCallbacks.length;i++){const plugin=this.pluginCallbacks[i](parser);if(!plugin.name)console.error("THREE.GLTFLoader: Invalid plugin found: missing name");plugins[plugin.name]=plugin;extensions[plugin.name]=true}if(json.extensionsUsed){for(let i=0;i<json.extensionsUsed.length;++i){const extensionName=json.extensionsUsed[i];const extensionsRequired=json.extensionsRequired||[];switch(extensionName){case EXTENSIONS.KHR_MATERIALS_UNLIT:extensions[extensionName]=new GLTFMaterialsUnlitExtension;break;case EXTENSIONS.KHR_DRACO_MESH_COMPRESSION:extensions[extensionName]=new GLTFDracoMeshCompressionExtension(json,this.dracoLoader);break;case EXTENSIONS.KHR_TEXTURE_TRANSFORM:extensions[extensionName]=new GLTFTextureTransformExtension;break;case EXTENSIONS.KHR_MESH_QUANTIZATION:extensions[extensionName]=new GLTFMeshQuantizationExtension;break;default:if(extensionsRequired.indexOf(extensionName)>=0&&plugins[extensionName]===undefined){console.warn("THREE.GLTFLoader: Unknown extension \""+extensionName+"\".")}}}}parser.setExtensions(extensions);parser.setPlugins(plugins);parser.parse(onLoad,onError)}parseAsync(data,path){const scope=this;return new Promise(function(resolve,reject){scope.parse(data,path,resolve,reject)})}}function GLTFRegistry(){let objects={};return{get:function(key){return objects[key]},add:function(key,object){objects[key]=object},remove:function(key){delete objects[key]},removeAll:function(){objects={}}}}const EXTENSIONS={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class GLTFLightsExtension{constructor(parser){this.parser=parser;this.name=EXTENSIONS.KHR_LIGHTS_PUNCTUAL;this.cache={refs:{},uses:{}}}_markDefs(){const parser=this.parser;const nodeDefs=this.parser.json.nodes||[];for(let nodeIndex=0,nodeLength=nodeDefs.length;nodeIndex<nodeLength;nodeIndex++){const nodeDef=nodeDefs[nodeIndex];if(nodeDef.extensions&&nodeDef.extensions[this.name]&&nodeDef.extensions[this.name].light!==undefined){parser._addNodeRef(this.cache,nodeDef.extensions[this.name].light)}}}_loadLight(lightIndex){const parser=this.parser;const cacheKey="light:"+lightIndex;let dependency=parser.cache.get(cacheKey);if(dependency)return dependency;const json=parser.json;const extensions=json.extensions&&json.extensions[this.name]||{};const lightDefs=extensions.lights||[];const lightDef=lightDefs[lightIndex];let lightNode;const color=new Color(16777215);if(lightDef.color!==undefined)color.setRGB(lightDef.color[0],lightDef.color[1],lightDef.color[2],LinearSRGBColorSpace);const range=lightDef.range!==undefined?lightDef.range:0;switch(lightDef.type){case"directional":lightNode=new DirectionalLight(color);lightNode.target.position.set(0,0,-1);lightNode.add(lightNode.target);break;case"point":lightNode=new PointLight(color);lightNode.distance=range;break;case"spot":lightNode=new SpotLight(color);lightNode.distance=range;lightDef.spot=lightDef.spot||{};lightDef.spot.innerConeAngle=lightDef.spot.innerConeAngle!==undefined?lightDef.spot.innerConeAngle:0;lightDef.spot.outerConeAngle=lightDef.spot.outerConeAngle!==undefined?lightDef.spot.outerConeAngle:Math.PI/4;lightNode.angle=lightDef.spot.outerConeAngle;lightNode.penumbra=1-lightDef.spot.innerConeAngle/lightDef.spot.outerConeAngle;lightNode.target.position.set(0,0,-1);lightNode.add(lightNode.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+lightDef.type);}lightNode.position.set(0,0,0);lightNode.decay=2;assignExtrasToUserData(lightNode,lightDef);if(lightDef.intensity!==undefined)lightNode.intensity=lightDef.intensity;lightNode.name=parser.createUniqueName(lightDef.name||"light_"+lightIndex);dependency=Promise.resolve(lightNode);parser.cache.add(cacheKey,dependency);return dependency}getDependency(type,index){if(type!=="light")return;return this._loadLight(index)}createNodeAttachment(nodeIndex){const self=this;const parser=this.parser;const json=parser.json;const nodeDef=json.nodes[nodeIndex];const lightDef=nodeDef.extensions&&nodeDef.extensions[this.name]||{};const lightIndex=lightDef.light;if(lightIndex===undefined)return null;return this._loadLight(lightIndex).then(function(light){return parser._getNodeRef(self.cache,lightIndex,light)})}}class GLTFMaterialsUnlitExtension{constructor(){this.name=EXTENSIONS.KHR_MATERIALS_UNLIT}getMaterialType(){return MeshBasicMaterial}extendParams(materialParams,materialDef,parser){const pending=[];materialParams.color=new Color(1,1,1);materialParams.opacity=1;const metallicRoughness=materialDef.pbrMetallicRoughness;if(metallicRoughness){if(Array.isArray(metallicRoughness.baseColorFactor)){const array=metallicRoughness.baseColorFactor;materialParams.color.setRGB(array[0],array[1],array[2],LinearSRGBColorSpace);materialParams.opacity=array[3]}if(metallicRoughness.baseColorTexture!==undefined){pending.push(parser.assignTexture(materialParams,"map",metallicRoughness.baseColorTexture,SRGBColorSpace))}}return Promise.all(pending)}}class GLTFMaterialsEmissiveStrengthExtension{constructor(parser){this.parser=parser;this.name=EXTENSIONS.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(materialIndex,materialParams){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name]){return Promise.resolve()}const emissiveStrength=materialDef.extensions[this.name].emissiveStrength;if(emissiveStrength!==undefined){materialParams.emissiveIntensity=emissiveStrength}return Promise.resolve()}}class GLTFMaterialsClearcoatExtension{constructor(parser){this.parser=parser;this.name=EXTENSIONS.KHR_MATERIALS_CLEARCOAT}getMaterialType(materialIndex){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name])return null;return MeshPhysicalMaterial}extendMaterialParams(materialIndex,materialParams){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name]){return Promise.resolve()}const pending=[];const extension=materialDef.extensions[this.name];if(extension.clearcoatFactor!==undefined){materialParams.clearcoat=extension.clearcoatFactor}if(extension.clearcoatTexture!==undefined){pending.push(parser.assignTexture(materialParams,"clearcoatMap",extension.clearcoatTexture))}if(extension.clearcoatRoughnessFactor!==undefined){materialParams.clearcoatRoughness=extension.clearcoatRoughnessFactor}if(extension.clearcoatRoughnessTexture!==undefined){pending.push(parser.assignTexture(materialParams,"clearcoatRoughnessMap",extension.clearcoatRoughnessTexture))}if(extension.clearcoatNormalTexture!==undefined){pending.push(parser.assignTexture(materialParams,"clearcoatNormalMap",extension.clearcoatNormalTexture));if(extension.clearcoatNormalTexture.scale!==undefined){const scale=extension.clearcoatNormalTexture.scale;materialParams.clearcoatNormalScale=new Vector2(scale,scale)}}return Promise.all(pending)}}class GLTFMaterialsDispersionExtension{constructor(parser){this.parser=parser;this.name=EXTENSIONS.KHR_MATERIALS_DISPERSION}getMaterialType(materialIndex){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name])return null;return MeshPhysicalMaterial}extendMaterialParams(materialIndex,materialParams){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name]){return Promise.resolve()}const extension=materialDef.extensions[this.name];materialParams.dispersion=extension.dispersion!==undefined?extension.dispersion:0;return Promise.resolve()}}class GLTFMaterialsIridescenceExtension{constructor(parser){this.parser=parser;this.name=EXTENSIONS.KHR_MATERIALS_IRIDESCENCE}getMaterialType(materialIndex){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name])return null;return MeshPhysicalMaterial}extendMaterialParams(materialIndex,materialParams){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name]){return Promise.resolve()}const pending=[];const extension=materialDef.extensions[this.name];if(extension.iridescenceFactor!==undefined){materialParams.iridescence=extension.iridescenceFactor}if(extension.iridescenceTexture!==undefined){pending.push(parser.assignTexture(materialParams,"iridescenceMap",extension.iridescenceTexture))}if(extension.iridescenceIor!==undefined){materialParams.iridescenceIOR=extension.iridescenceIor}if(materialParams.iridescenceThicknessRange===undefined){materialParams.iridescenceThicknessRange=[100,400]}if(extension.iridescenceThicknessMinimum!==undefined){materialParams.iridescenceThicknessRange[0]=extension.iridescenceThicknessMinimum}if(extension.iridescenceThicknessMaximum!==undefined){materialParams.iridescenceThicknessRange[1]=extension.iridescenceThicknessMaximum}if(extension.iridescenceThicknessTexture!==undefined){pending.push(parser.assignTexture(materialParams,"iridescenceThicknessMap",extension.iridescenceThicknessTexture))}return Promise.all(pending)}}class GLTFMaterialsSheenExtension{constructor(parser){this.parser=parser;this.name=EXTENSIONS.KHR_MATERIALS_SHEEN}getMaterialType(materialIndex){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name])return null;return MeshPhysicalMaterial}extendMaterialParams(materialIndex,materialParams){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name]){return Promise.resolve()}const pending=[];materialParams.sheenColor=new Color(0,0,0);materialParams.sheenRoughness=0;materialParams.sheen=1;const extension=materialDef.extensions[this.name];if(extension.sheenColorFactor!==undefined){const colorFactor=extension.sheenColorFactor;materialParams.sheenColor.setRGB(colorFactor[0],colorFactor[1],colorFactor[2],LinearSRGBColorSpace)}if(extension.sheenRoughnessFactor!==undefined){materialParams.sheenRoughness=extension.sheenRoughnessFactor}if(extension.sheenColorTexture!==undefined){pending.push(parser.assignTexture(materialParams,"sheenColorMap",extension.sheenColorTexture,SRGBColorSpace))}if(extension.sheenRoughnessTexture!==undefined){pending.push(parser.assignTexture(materialParams,"sheenRoughnessMap",extension.sheenRoughnessTexture))}return Promise.all(pending)}}class GLTFMaterialsTransmissionExtension{constructor(parser){this.parser=parser;this.name=EXTENSIONS.KHR_MATERIALS_TRANSMISSION}getMaterialType(materialIndex){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name])return null;return MeshPhysicalMaterial}extendMaterialParams(materialIndex,materialParams){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name]){return Promise.resolve()}const pending=[];const extension=materialDef.extensions[this.name];if(extension.transmissionFactor!==undefined){materialParams.transmission=extension.transmissionFactor}if(extension.transmissionTexture!==undefined){pending.push(parser.assignTexture(materialParams,"transmissionMap",extension.transmissionTexture))}return Promise.all(pending)}}class GLTFMaterialsVolumeExtension{constructor(parser){this.parser=parser;this.name=EXTENSIONS.KHR_MATERIALS_VOLUME}getMaterialType(materialIndex){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name])return null;return MeshPhysicalMaterial}extendMaterialParams(materialIndex,materialParams){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name]){return Promise.resolve()}const pending=[];const extension=materialDef.extensions[this.name];materialParams.thickness=extension.thicknessFactor!==undefined?extension.thicknessFactor:0;if(extension.thicknessTexture!==undefined){pending.push(parser.assignTexture(materialParams,"thicknessMap",extension.thicknessTexture))}materialParams.attenuationDistance=extension.attenuationDistance||Infinity;const colorArray=extension.attenuationColor||[1,1,1];materialParams.attenuationColor=new Color().setRGB(colorArray[0],colorArray[1],colorArray[2],LinearSRGBColorSpace);return Promise.all(pending)}}class GLTFMaterialsIorExtension{constructor(parser){this.parser=parser;this.name=EXTENSIONS.KHR_MATERIALS_IOR}getMaterialType(materialIndex){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name])return null;return MeshPhysicalMaterial}extendMaterialParams(materialIndex,materialParams){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name]){return Promise.resolve()}const extension=materialDef.extensions[this.name];materialParams.ior=extension.ior!==undefined?extension.ior:1.5;return Promise.resolve()}}class GLTFMaterialsSpecularExtension{constructor(parser){this.parser=parser;this.name=EXTENSIONS.KHR_MATERIALS_SPECULAR}getMaterialType(materialIndex){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name])return null;return MeshPhysicalMaterial}extendMaterialParams(materialIndex,materialParams){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name]){return Promise.resolve()}const pending=[];const extension=materialDef.extensions[this.name];materialParams.specularIntensity=extension.specularFactor!==undefined?extension.specularFactor:1;if(extension.specularTexture!==undefined){pending.push(parser.assignTexture(materialParams,"specularIntensityMap",extension.specularTexture))}const colorArray=extension.specularColorFactor||[1,1,1];materialParams.specularColor=new Color().setRGB(colorArray[0],colorArray[1],colorArray[2],LinearSRGBColorSpace);if(extension.specularColorTexture!==undefined){pending.push(parser.assignTexture(materialParams,"specularColorMap",extension.specularColorTexture,SRGBColorSpace))}return Promise.all(pending)}}class GLTFMaterialsBumpExtension{constructor(parser){this.parser=parser;this.name=EXTENSIONS.EXT_MATERIALS_BUMP}getMaterialType(materialIndex){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name])return null;return MeshPhysicalMaterial}extendMaterialParams(materialIndex,materialParams){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name]){return Promise.resolve()}const pending=[];const extension=materialDef.extensions[this.name];materialParams.bumpScale=extension.bumpFactor!==undefined?extension.bumpFactor:1;if(extension.bumpTexture!==undefined){pending.push(parser.assignTexture(materialParams,"bumpMap",extension.bumpTexture))}return Promise.all(pending)}}class GLTFMaterialsAnisotropyExtension{constructor(parser){this.parser=parser;this.name=EXTENSIONS.KHR_MATERIALS_ANISOTROPY}getMaterialType(materialIndex){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name])return null;return MeshPhysicalMaterial}extendMaterialParams(materialIndex,materialParams){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name]){return Promise.resolve()}const pending=[];const extension=materialDef.extensions[this.name];if(extension.anisotropyStrength!==undefined){materialParams.anisotropy=extension.anisotropyStrength}if(extension.anisotropyRotation!==undefined){materialParams.anisotropyRotation=extension.anisotropyRotation}if(extension.anisotropyTexture!==undefined){pending.push(parser.assignTexture(materialParams,"anisotropyMap",extension.anisotropyTexture))}return Promise.all(pending)}}class GLTFTextureBasisUExtension{constructor(parser){this.parser=parser;this.name=EXTENSIONS.KHR_TEXTURE_BASISU}loadTexture(textureIndex){const parser=this.parser;const json=parser.json;const textureDef=json.textures[textureIndex];if(!textureDef.extensions||!textureDef.extensions[this.name]){return null}const extension=textureDef.extensions[this.name];const loader=parser.options.ktx2Loader;if(!loader){if(json.extensionsRequired&&json.extensionsRequired.indexOf(this.name)>=0){throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures")}else{return null}}return parser.loadTextureImage(textureIndex,extension.source,loader)}}class GLTFTextureWebPExtension{constructor(parser){this.parser=parser;this.name=EXTENSIONS.EXT_TEXTURE_WEBP;this.isSupported=null}loadTexture(textureIndex){const name=this.name;const parser=this.parser;const json=parser.json;const textureDef=json.textures[textureIndex];if(!textureDef.extensions||!textureDef.extensions[name]){return null}const extension=textureDef.extensions[name];const source=json.images[extension.source];let loader=parser.textureLoader;if(source.uri){const handler=parser.options.manager.getHandler(source.uri);if(handler!==null)loader=handler}return this.detectSupport().then(function(isSupported){if(isSupported)return parser.loadTextureImage(textureIndex,extension.source,loader);if(json.extensionsRequired&&json.extensionsRequired.indexOf(name)>=0){throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.")}return parser.loadTexture(textureIndex)})}detectSupport(){if(!this.isSupported){this.isSupported=new Promise(function(resolve){const image=new Image;image.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA";image.onload=image.onerror=function(){resolve(image.height===1)}})}return this.isSupported}}class GLTFTextureAVIFExtension{constructor(parser){this.parser=parser;this.name=EXTENSIONS.EXT_TEXTURE_AVIF;this.isSupported=null}loadTexture(textureIndex){const name=this.name;const parser=this.parser;const json=parser.json;const textureDef=json.textures[textureIndex];if(!textureDef.extensions||!textureDef.extensions[name]){return null}const extension=textureDef.extensions[name];const source=json.images[extension.source];let loader=parser.textureLoader;if(source.uri){const handler=parser.options.manager.getHandler(source.uri);if(handler!==null)loader=handler}return this.detectSupport().then(function(isSupported){if(isSupported)return parser.loadTextureImage(textureIndex,extension.source,loader);if(json.extensionsRequired&&json.extensionsRequired.indexOf(name)>=0){throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.")}return parser.loadTexture(textureIndex)})}detectSupport(){if(!this.isSupported){this.isSupported=new Promise(function(resolve){const image=new Image;image.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=";image.onload=image.onerror=function(){resolve(image.height===1)}})}return this.isSupported}}class GLTFMeshoptCompression{constructor(parser){this.name=EXTENSIONS.EXT_MESHOPT_COMPRESSION;this.parser=parser}loadBufferView(index){const json=this.parser.json;const bufferView=json.bufferViews[index];if(bufferView.extensions&&bufferView.extensions[this.name]){const extensionDef=bufferView.extensions[this.name];const buffer=this.parser.getDependency("buffer",extensionDef.buffer);const decoder=this.parser.options.meshoptDecoder;if(!decoder||!decoder.supported){if(json.extensionsRequired&&json.extensionsRequired.indexOf(this.name)>=0){throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files")}else{return null}}return buffer.then(function(res){const byteOffset=extensionDef.byteOffset||0;const byteLength=extensionDef.byteLength||0;const count=extensionDef.count;const stride=extensionDef.byteStride;const source=new Uint8Array(res,byteOffset,byteLength);if(decoder.decodeGltfBufferAsync){return decoder.decodeGltfBufferAsync(count,stride,source,extensionDef.mode,extensionDef.filter).then(function(res){return res.buffer})}else{return decoder.ready.then(function(){const result=new ArrayBuffer(count*stride);decoder.decodeGltfBuffer(new Uint8Array(result),count,stride,source,extensionDef.mode,extensionDef.filter);return result})}})}else{return null}}}class GLTFMeshGpuInstancing{constructor(parser){this.name=EXTENSIONS.EXT_MESH_GPU_INSTANCING;this.parser=parser}createNodeMesh(nodeIndex){const json=this.parser.json;const nodeDef=json.nodes[nodeIndex];if(!nodeDef.extensions||!nodeDef.extensions[this.name]||nodeDef.mesh===undefined){return null}const meshDef=json.meshes[nodeDef.mesh];for(const primitive of meshDef.primitives){if(primitive.mode!==WEBGL_CONSTANTS.TRIANGLES&&primitive.mode!==WEBGL_CONSTANTS.TRIANGLE_STRIP&&primitive.mode!==WEBGL_CONSTANTS.TRIANGLE_FAN&&primitive.mode!==undefined){return null}}const extensionDef=nodeDef.extensions[this.name];const attributesDef=extensionDef.attributes;const pending=[];const attributes={};for(const key in attributesDef){pending.push(this.parser.getDependency("accessor",attributesDef[key]).then(accessor=>{attributes[key]=accessor;return attributes[key]}))}if(pending.length<1){return null}pending.push(this.parser.createNodeMesh(nodeIndex));return Promise.all(pending).then(results=>{const nodeObject=results.pop();const meshes=nodeObject.isGroup?nodeObject.children:[nodeObject];const count=results[0].count;const instancedMeshes=[];for(const mesh of meshes){const m=new Matrix4;const p=new Vector3;const q=new Quaternion;const s=new Vector3(1,1,1);const instancedMesh=new InstancedMesh(mesh.geometry,mesh.material,count);for(let i=0;i<count;i++){if(attributes.TRANSLATION){p.fromBufferAttribute(attributes.TRANSLATION,i)}if(attributes.ROTATION){q.fromBufferAttribute(attributes.ROTATION,i)}if(attributes.SCALE){s.fromBufferAttribute(attributes.SCALE,i)}instancedMesh.setMatrixAt(i,m.compose(p,q,s))}for(const attributeName in attributes){if(attributeName==="_COLOR_0"){const attr=attributes[attributeName];instancedMesh.instanceColor=new InstancedBufferAttribute(attr.array,attr.itemSize,attr.normalized)}else if(attributeName!=="TRANSLATION"&&attributeName!=="ROTATION"&&attributeName!=="SCALE"){mesh.geometry.setAttribute(attributeName,attributes[attributeName])}}Object3D.prototype.copy.call(instancedMesh,mesh);this.parser.assignFinalMaterial(instancedMesh);instancedMeshes.push(instancedMesh)}if(nodeObject.isGroup){nodeObject.clear();nodeObject.add(...instancedMeshes);return nodeObject}return instancedMeshes[0]})}}const BINARY_EXTENSION_HEADER_MAGIC="glTF";const BINARY_EXTENSION_HEADER_LENGTH=12;const BINARY_EXTENSION_CHUNK_TYPES={JSON:1313821514,BIN:5130562};class GLTFBinaryExtension{constructor(data){this.name=EXTENSIONS.KHR_BINARY_GLTF;this.content=null;this.body=null;const headerView=new DataView(data,0,BINARY_EXTENSION_HEADER_LENGTH);const textDecoder=new TextDecoder;this.header={magic:textDecoder.decode(new Uint8Array(data.slice(0,4))),version:headerView.getUint32(4,true),length:headerView.getUint32(8,true)};if(this.header.magic!==BINARY_EXTENSION_HEADER_MAGIC){throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.")}else if(this.header.version<2){throw new Error("THREE.GLTFLoader: Legacy binary file detected.")}const chunkContentsLength=this.header.length-BINARY_EXTENSION_HEADER_LENGTH;const chunkView=new DataView(data,BINARY_EXTENSION_HEADER_LENGTH);let chunkIndex=0;while(chunkIndex<chunkContentsLength){const chunkLength=chunkView.getUint32(chunkIndex,true);chunkIndex+=4;const chunkType=chunkView.getUint32(chunkIndex,true);chunkIndex+=4;if(chunkType===BINARY_EXTENSION_CHUNK_TYPES.JSON){const contentArray=new Uint8Array(data,BINARY_EXTENSION_HEADER_LENGTH+chunkIndex,chunkLength);this.content=textDecoder.decode(contentArray)}else if(chunkType===BINARY_EXTENSION_CHUNK_TYPES.BIN){const byteOffset=BINARY_EXTENSION_HEADER_LENGTH+chunkIndex;this.body=data.slice(byteOffset,byteOffset+chunkLength)}chunkIndex+=chunkLength}if(this.content===null){throw new Error("THREE.GLTFLoader: JSON content not found.")}}}class GLTFDracoMeshCompressionExtension{constructor(json,dracoLoader){if(!dracoLoader){throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.")}this.name=EXTENSIONS.KHR_DRACO_MESH_COMPRESSION;this.json=json;this.dracoLoader=dracoLoader;this.dracoLoader.preload()}decodePrimitive(primitive,parser){const json=this.json;const dracoLoader=this.dracoLoader;const bufferViewIndex=primitive.extensions[this.name].bufferView;const gltfAttributeMap=primitive.extensions[this.name].attributes;const threeAttributeMap={};const attributeNormalizedMap={};const attributeTypeMap={};for(const attributeName in gltfAttributeMap){const threeAttributeName=ATTRIBUTES[attributeName]||attributeName.toLowerCase();threeAttributeMap[threeAttributeName]=gltfAttributeMap[attributeName]}for(const attributeName in primitive.attributes){const threeAttributeName=ATTRIBUTES[attributeName]||attributeName.toLowerCase();if(gltfAttributeMap[attributeName]!==undefined){const accessorDef=json.accessors[primitive.attributes[attributeName]];const componentType=WEBGL_COMPONENT_TYPES[accessorDef.componentType];attributeTypeMap[threeAttributeName]=componentType.name;attributeNormalizedMap[threeAttributeName]=accessorDef.normalized===true}}return parser.getDependency("bufferView",bufferViewIndex).then(function(bufferView){return new Promise(function(resolve,reject){dracoLoader.decodeDracoFile(bufferView,function(geometry){for(const attributeName in geometry.attributes){const attribute=geometry.attributes[attributeName];const normalized=attributeNormalizedMap[attributeName];if(normalized!==undefined)attribute.normalized=normalized}resolve(geometry)},threeAttributeMap,attributeTypeMap,LinearSRGBColorSpace,reject)})})}}class GLTFTextureTransformExtension{constructor(){this.name=EXTENSIONS.KHR_TEXTURE_TRANSFORM}extendTexture(texture,transform){if((transform.texCoord===undefined||transform.texCoord===texture.channel)&&transform.offset===undefined&&transform.rotation===undefined&&transform.scale===undefined){return texture}texture=texture.clone();if(transform.texCoord!==undefined){texture.channel=transform.texCoord}if(transform.offset!==undefined){texture.offset.fromArray(transform.offset)}if(transform.rotation!==undefined){texture.rotation=transform.rotation}if(transform.scale!==undefined){texture.repeat.fromArray(transform.scale)}texture.needsUpdate=true;return texture}}class GLTFMeshQuantizationExtension{constructor(){this.name=EXTENSIONS.KHR_MESH_QUANTIZATION}}class GLTFCubicSplineInterpolant extends Interpolant{constructor(parameterPositions,sampleValues,sampleSize,resultBuffer){super(parameterPositions,sampleValues,sampleSize,resultBuffer)}copySampleValue_(index){const result=this.resultBuffer,values=this.sampleValues,valueSize=this.valueSize,offset=index*valueSize*3+valueSize;for(let i=0;i!==valueSize;i++){result[i]=values[offset+i]}return result}interpolate_(i1,t0,t,t1){const result=this.resultBuffer;const values=this.sampleValues;const stride=this.valueSize;const stride2=stride*2;const stride3=stride*3;const td=t1-t0;const p=(t-t0)/td;const pp=p*p;const ppp=pp*p;const offset1=i1*stride3;const offset0=offset1-stride3;const s2=-2*ppp+3*pp;const s3=ppp-pp;const s0=1-s2;const s1=s3-pp+p;for(let i=0;i!==stride;i++){const p0=values[offset0+i+stride];const m0=values[offset0+i+stride2]*td;const p1=values[offset1+i+stride];const m1=values[offset1+i]*td;result[i]=s0*p0+s1*m0+s2*p1+s3*m1}return result}}const _q=new Quaternion;class GLTFCubicSplineQuaternionInterpolant extends GLTFCubicSplineInterpolant{interpolate_(i1,t0,t,t1){const result=super.interpolate_(i1,t0,t,t1);_q.fromArray(result).normalize().toArray(result);return result}}const WEBGL_CONSTANTS={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123};const WEBGL_COMPONENT_TYPES={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};const WEBGL_FILTERS={9728:NearestFilter,9729:LinearFilter,9984:NearestMipmapNearestFilter,9985:LinearMipmapNearestFilter,9986:NearestMipmapLinearFilter,9987:LinearMipmapLinearFilter};const WEBGL_WRAPPINGS={33071:ClampToEdgeWrapping,33648:MirroredRepeatWrapping,10497:RepeatWrapping};const WEBGL_TYPE_SIZES={"SCALAR":1,"VEC2":2,"VEC3":3,"VEC4":4,"MAT2":4,"MAT3":9,"MAT4":16};const ATTRIBUTES={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"};const PATH_PROPERTIES={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"};const INTERPOLATION={CUBICSPLINE:undefined,LINEAR:InterpolateLinear,STEP:InterpolateDiscrete};const ALPHA_MODES={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function createDefaultMaterial(cache){if(cache["DefaultMaterial"]===undefined){cache["DefaultMaterial"]=new MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:false,depthTest:true,side:FrontSide})}return cache["DefaultMaterial"]}function addUnknownExtensionsToUserData(knownExtensions,object,objectDef){for(const name in objectDef.extensions){if(knownExtensions[name]===undefined){object.userData.gltfExtensions=object.userData.gltfExtensions||{};object.userData.gltfExtensions[name]=objectDef.extensions[name]}}}function assignExtrasToUserData(object,gltfDef){if(gltfDef.extras!==undefined){if(typeof gltfDef.extras==="object"){Object.assign(object.userData,gltfDef.extras)}else{console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+gltfDef.extras)}}}function addMorphTargets(geometry,targets,parser){let hasMorphPosition=false;let hasMorphNormal=false;let hasMorphColor=false;for(let i=0,il=targets.length;i<il;i++){const target=targets[i];if(target.POSITION!==undefined)hasMorphPosition=true;if(target.NORMAL!==undefined)hasMorphNormal=true;if(target.COLOR_0!==undefined)hasMorphColor=true;if(hasMorphPosition&&hasMorphNormal&&hasMorphColor)break}if(!hasMorphPosition&&!hasMorphNormal&&!hasMorphColor)return Promise.resolve(geometry);const pendingPositionAccessors=[];const pendingNormalAccessors=[];const pendingColorAccessors=[];for(let i=0,il=targets.length;i<il;i++){const target=targets[i];if(hasMorphPosition){const pendingAccessor=target.POSITION!==undefined?parser.getDependency("accessor",target.POSITION):geometry.attributes.position;pendingPositionAccessors.push(pendingAccessor)}if(hasMorphNormal){const pendingAccessor=target.NORMAL!==undefined?parser.getDependency("accessor",target.NORMAL):geometry.attributes.normal;pendingNormalAccessors.push(pendingAccessor)}if(hasMorphColor){const pendingAccessor=target.COLOR_0!==undefined?parser.getDependency("accessor",target.COLOR_0):geometry.attributes.color;pendingColorAccessors.push(pendingAccessor)}}return Promise.all([Promise.all(pendingPositionAccessors),Promise.all(pendingNormalAccessors),Promise.all(pendingColorAccessors)]).then(function(accessors){const morphPositions=accessors[0];const morphNormals=accessors[1];const morphColors=accessors[2];if(hasMorphPosition)geometry.morphAttributes.position=morphPositions;if(hasMorphNormal)geometry.morphAttributes.normal=morphNormals;if(hasMorphColor)geometry.morphAttributes.color=morphColors;geometry.morphTargetsRelative=true;return geometry})}function updateMorphTargets(mesh,meshDef){mesh.updateMorphTargets();if(meshDef.weights!==undefined){for(let i=0,il=meshDef.weights.length;i<il;i++){mesh.morphTargetInfluences[i]=meshDef.weights[i]}}if(meshDef.extras&&Array.isArray(meshDef.extras.targetNames)){const targetNames=meshDef.extras.targetNames;if(mesh.morphTargetInfluences.length===targetNames.length){mesh.morphTargetDictionary={};for(let i=0,il=targetNames.length;i<il;i++){mesh.morphTargetDictionary[targetNames[i]]=i}}else{console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}}function createPrimitiveKey(primitiveDef){let geometryKey;const dracoExtension=primitiveDef.extensions&&primitiveDef.extensions[EXTENSIONS.KHR_DRACO_MESH_COMPRESSION];if(dracoExtension){geometryKey="draco:"+dracoExtension.bufferView+":"+dracoExtension.indices+":"+createAttributesKey(dracoExtension.attributes)}else{geometryKey=primitiveDef.indices+":"+createAttributesKey(primitiveDef.attributes)+":"+primitiveDef.mode}if(primitiveDef.targets!==undefined){for(let i=0,il=primitiveDef.targets.length;i<il;i++){geometryKey+=":"+createAttributesKey(primitiveDef.targets[i])}}return geometryKey}function createAttributesKey(attributes){let attributesKey="";const keys=Object.keys(attributes).sort();for(let i=0,il=keys.length;i<il;i++){attributesKey+=keys[i]+":"+attributes[keys[i]]+";"}return attributesKey}function getNormalizedComponentScale(constructor){switch(constructor){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.");}}function getImageURIMimeType(uri){if(uri.search(/\.jpe?g($|\?)/i)>0||uri.search(/^data\:image\/jpeg/)===0)return"image/jpeg";if(uri.search(/\.webp($|\?)/i)>0||uri.search(/^data\:image\/webp/)===0)return"image/webp";return"image/png"}const _identityMatrix=new Matrix4;class GLTFParser{constructor(json={},options={}){this.json=json;this.extensions={};this.plugins={};this.options=options;this.cache=new GLTFRegistry;this.associations=new Map;this.primitiveCache={};this.nodeCache={};this.meshCache={refs:{},uses:{}};this.cameraCache={refs:{},uses:{}};this.lightCache={refs:{},uses:{}};this.sourceCache={};this.textureCache={};this.nodeNamesUsed={};let isSafari=false;let isFirefox=false;let firefoxVersion=-1;if(typeof navigator!=="undefined"){isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===true;isFirefox=navigator.userAgent.indexOf("Firefox")>-1;firefoxVersion=isFirefox?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1}if(typeof createImageBitmap==="undefined"||isSafari||isFirefox&&firefoxVersion<98){this.textureLoader=new TextureLoader(this.options.manager)}else{this.textureLoader=new ImageBitmapLoader(this.options.manager)}this.textureLoader.setCrossOrigin(this.options.crossOrigin);this.textureLoader.setRequestHeader(this.options.requestHeader);this.fileLoader=new FileLoader(this.options.manager);this.fileLoader.setResponseType("arraybuffer");if(this.options.crossOrigin==="use-credentials"){this.fileLoader.setWithCredentials(true)}}setExtensions(extensions){this.extensions=extensions}setPlugins(plugins){this.plugins=plugins}parse(onLoad,onError){const parser=this;const json=this.json;const extensions=this.extensions;this.cache.removeAll();this.nodeCache={};this._invokeAll(function(ext){return ext._markDefs&&ext._markDefs()});Promise.all(this._invokeAll(function(ext){return ext.beforeRoot&&ext.beforeRoot()})).then(function(){return Promise.all([parser.getDependencies("scene"),parser.getDependencies("animation"),parser.getDependencies("camera")])}).then(function(dependencies){const result={scene:dependencies[0][json.scene||0],scenes:dependencies[0],animations:dependencies[1],cameras:dependencies[2],asset:json.asset,parser:parser,userData:{}};addUnknownExtensionsToUserData(extensions,result,json);assignExtrasToUserData(result,json);return Promise.all(parser._invokeAll(function(ext){return ext.afterRoot&&ext.afterRoot(result)})).then(function(){for(const scene of result.scenes){scene.updateMatrixWorld()}onLoad(result)})}).catch(onError)}_markDefs(){const nodeDefs=this.json.nodes||[];const skinDefs=this.json.skins||[];const meshDefs=this.json.meshes||[];for(let skinIndex=0,skinLength=skinDefs.length;skinIndex<skinLength;skinIndex++){const joints=skinDefs[skinIndex].joints;for(let i=0,il=joints.length;i<il;i++){nodeDefs[joints[i]].isBone=true}}for(let nodeIndex=0,nodeLength=nodeDefs.length;nodeIndex<nodeLength;nodeIndex++){const nodeDef=nodeDefs[nodeIndex];if(nodeDef.mesh!==undefined){this._addNodeRef(this.meshCache,nodeDef.mesh);if(nodeDef.skin!==undefined){meshDefs[nodeDef.mesh].isSkinnedMesh=true}}if(nodeDef.camera!==undefined){this._addNodeRef(this.cameraCache,nodeDef.camera)}}}_addNodeRef(cache,index){if(index===undefined)return;if(cache.refs[index]===undefined){cache.refs[index]=cache.uses[index]=0}cache.refs[index]++}_getNodeRef(cache,index,object){if(cache.refs[index]<=1)return object;const ref=object.clone();const updateMappings=(original,clone)=>{const mappings=this.associations.get(original);if(mappings!=null){this.associations.set(clone,mappings)}for(const[i,child]of original.children.entries()){updateMappings(child,clone.children[i])}};updateMappings(object,ref);ref.name+="_instance_"+cache.uses[index]++;return ref}_invokeOne(func){const extensions=Object.values(this.plugins);extensions.push(this);for(let i=0;i<extensions.length;i++){const result=func(extensions[i]);if(result)return result}return null}_invokeAll(func){const extensions=Object.values(this.plugins);extensions.unshift(this);const pending=[];for(let i=0;i<extensions.length;i++){const result=func(extensions[i]);if(result)pending.push(result)}return pending}getDependency(type,index){const cacheKey=type+":"+index;let dependency=this.cache.get(cacheKey);if(!dependency){switch(type){case"scene":dependency=this.loadScene(index);break;case"node":dependency=this._invokeOne(function(ext){return ext.loadNode&&ext.loadNode(index)});break;case"mesh":dependency=this._invokeOne(function(ext){return ext.loadMesh&&ext.loadMesh(index)});break;case"accessor":dependency=this.loadAccessor(index);break;case"bufferView":dependency=this._invokeOne(function(ext){return ext.loadBufferView&&ext.loadBufferView(index)});break;case"buffer":dependency=this.loadBuffer(index);break;case"material":dependency=this._invokeOne(function(ext){return ext.loadMaterial&&ext.loadMaterial(index)});break;case"texture":dependency=this._invokeOne(function(ext){return ext.loadTexture&&ext.loadTexture(index)});break;case"skin":dependency=this.loadSkin(index);break;case"animation":dependency=this._invokeOne(function(ext){return ext.loadAnimation&&ext.loadAnimation(index)});break;case"camera":dependency=this.loadCamera(index);break;default:dependency=this._invokeOne(function(ext){return ext!=this&&ext.getDependency&&ext.getDependency(type,index)});if(!dependency){throw new Error("Unknown type: "+type)}break;}this.cache.add(cacheKey,dependency)}return dependency}getDependencies(type){let dependencies=this.cache.get(type);if(!dependencies){const parser=this;const defs=this.json[type+(type==="mesh"?"es":"s")]||[];dependencies=Promise.all(defs.map(function(def,index){return parser.getDependency(type,index)}));this.cache.add(type,dependencies)}return dependencies}loadBuffer(bufferIndex){const bufferDef=this.json.buffers[bufferIndex];const loader=this.fileLoader;if(bufferDef.type&&bufferDef.type!=="arraybuffer"){throw new Error("THREE.GLTFLoader: "+bufferDef.type+" buffer type is not supported.")}if(bufferDef.uri===undefined&&bufferIndex===0){return Promise.resolve(this.extensions[EXTENSIONS.KHR_BINARY_GLTF].body)}const options=this.options;return new Promise(function(resolve,reject){loader.load(LoaderUtils.resolveURL(bufferDef.uri,options.path),resolve,undefined,function(){reject(new Error("THREE.GLTFLoader: Failed to load buffer \""+bufferDef.uri+"\"."))})})}loadBufferView(bufferViewIndex){const bufferViewDef=this.json.bufferViews[bufferViewIndex];return this.getDependency("buffer",bufferViewDef.buffer).then(function(buffer){const byteLength=bufferViewDef.byteLength||0;const byteOffset=bufferViewDef.byteOffset||0;return buffer.slice(byteOffset,byteOffset+byteLength)})}loadAccessor(accessorIndex){const parser=this;const json=this.json;const accessorDef=this.json.accessors[accessorIndex];if(accessorDef.bufferView===undefined&&accessorDef.sparse===undefined){const itemSize=WEBGL_TYPE_SIZES[accessorDef.type];const TypedArray=WEBGL_COMPONENT_TYPES[accessorDef.componentType];const normalized=accessorDef.normalized===true;const array=new TypedArray(accessorDef.count*itemSize);return Promise.resolve(new BufferAttribute(array,itemSize,normalized))}const pendingBufferViews=[];if(accessorDef.bufferView!==undefined){pendingBufferViews.push(this.getDependency("bufferView",accessorDef.bufferView))}else{pendingBufferViews.push(null)}if(accessorDef.sparse!==undefined){pendingBufferViews.push(this.getDependency("bufferView",accessorDef.sparse.indices.bufferView));pendingBufferViews.push(this.getDependency("bufferView",accessorDef.sparse.values.bufferView))}return Promise.all(pendingBufferViews).then(function(bufferViews){const bufferView=bufferViews[0];const itemSize=WEBGL_TYPE_SIZES[accessorDef.type];const TypedArray=WEBGL_COMPONENT_TYPES[accessorDef.componentType];const elementBytes=TypedArray.BYTES_PER_ELEMENT;const itemBytes=elementBytes*itemSize;const byteOffset=accessorDef.byteOffset||0;const byteStride=accessorDef.bufferView!==undefined?json.bufferViews[accessorDef.bufferView].byteStride:undefined;const normalized=accessorDef.normalized===true;let array,bufferAttribute;if(byteStride&&byteStride!==itemBytes){const ibSlice=Math.floor(byteOffset/byteStride);const ibCacheKey="InterleavedBuffer:"+accessorDef.bufferView+":"+accessorDef.componentType+":"+ibSlice+":"+accessorDef.count;let ib=parser.cache.get(ibCacheKey);if(!ib){array=new TypedArray(bufferView,ibSlice*byteStride,accessorDef.count*byteStride/elementBytes);ib=new InterleavedBuffer(array,byteStride/elementBytes);parser.cache.add(ibCacheKey,ib)}bufferAttribute=new InterleavedBufferAttribute(ib,itemSize,byteOffset%byteStride/elementBytes,normalized)}else{if(bufferView===null){array=new TypedArray(accessorDef.count*itemSize)}else{array=new TypedArray(bufferView,byteOffset,accessorDef.count*itemSize)}bufferAttribute=new BufferAttribute(array,itemSize,normalized)}if(accessorDef.sparse!==undefined){const itemSizeIndices=WEBGL_TYPE_SIZES.SCALAR;const TypedArrayIndices=WEBGL_COMPONENT_TYPES[accessorDef.sparse.indices.componentType];const byteOffsetIndices=accessorDef.sparse.indices.byteOffset||0;const byteOffsetValues=accessorDef.sparse.values.byteOffset||0;const sparseIndices=new TypedArrayIndices(bufferViews[1],byteOffsetIndices,accessorDef.sparse.count*itemSizeIndices);const sparseValues=new TypedArray(bufferViews[2],byteOffsetValues,accessorDef.sparse.count*itemSize);if(bufferView!==null){bufferAttribute=new BufferAttribute(bufferAttribute.array.slice(),bufferAttribute.itemSize,bufferAttribute.normalized)}for(let i=0,il=sparseIndices.length;i<il;i++){const index=sparseIndices[i];bufferAttribute.setX(index,sparseValues[i*itemSize]);if(itemSize>=2)bufferAttribute.setY(index,sparseValues[i*itemSize+1]);if(itemSize>=3)bufferAttribute.setZ(index,sparseValues[i*itemSize+2]);if(itemSize>=4)bufferAttribute.setW(index,sparseValues[i*itemSize+3]);if(itemSize>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return bufferAttribute})}loadTexture(textureIndex){const json=this.json;const options=this.options;const textureDef=json.textures[textureIndex];const sourceIndex=textureDef.source;const sourceDef=json.images[sourceIndex];let loader=this.textureLoader;if(sourceDef.uri){const handler=options.manager.getHandler(sourceDef.uri);if(handler!==null)loader=handler}return this.loadTextureImage(textureIndex,sourceIndex,loader)}loadTextureImage(textureIndex,sourceIndex,loader){const parser=this;const json=this.json;const textureDef=json.textures[textureIndex];const sourceDef=json.images[sourceIndex];const cacheKey=(sourceDef.uri||sourceDef.bufferView)+":"+textureDef.sampler;if(this.textureCache[cacheKey]){return this.textureCache[cacheKey]}const promise=this.loadImageSource(sourceIndex,loader).then(function(texture){texture.flipY=false;texture.name=textureDef.name||sourceDef.name||"";if(texture.name===""&&typeof sourceDef.uri==="string"&&sourceDef.uri.startsWith("data:image/")===false){texture.name=sourceDef.uri}const samplers=json.samplers||{};const sampler=samplers[textureDef.sampler]||{};texture.magFilter=WEBGL_FILTERS[sampler.magFilter]||LinearFilter;texture.minFilter=WEBGL_FILTERS[sampler.minFilter]||LinearMipmapLinearFilter;texture.wrapS=WEBGL_WRAPPINGS[sampler.wrapS]||RepeatWrapping;texture.wrapT=WEBGL_WRAPPINGS[sampler.wrapT]||RepeatWrapping;parser.associations.set(texture,{textures:textureIndex});return texture}).catch(function(){return null});this.textureCache[cacheKey]=promise;return promise}loadImageSource(sourceIndex,loader){const parser=this;const json=this.json;const options=this.options;if(this.sourceCache[sourceIndex]!==undefined){return this.sourceCache[sourceIndex].then(texture=>texture.clone())}const sourceDef=json.images[sourceIndex];const URL=self.URL||self.webkitURL;let sourceURI=sourceDef.uri||"";let isObjectURL=false;if(sourceDef.bufferView!==undefined){sourceURI=parser.getDependency("bufferView",sourceDef.bufferView).then(function(bufferView){isObjectURL=true;const blob=new Blob([bufferView],{type:sourceDef.mimeType});sourceURI=URL.createObjectURL(blob);return sourceURI})}else if(sourceDef.uri===undefined){throw new Error("THREE.GLTFLoader: Image "+sourceIndex+" is missing URI and bufferView")}const promise=Promise.resolve(sourceURI).then(function(sourceURI){return new Promise(function(resolve,reject){let onLoad=resolve;if(loader.isImageBitmapLoader===true){onLoad=function(imageBitmap){const texture=new Texture(imageBitmap);texture.needsUpdate=true;resolve(texture)}}loader.load(LoaderUtils.resolveURL(sourceURI,options.path),onLoad,undefined,reject)})}).then(function(texture){if(isObjectURL===true){URL.revokeObjectURL(sourceURI)}texture.userData.mimeType=sourceDef.mimeType||getImageURIMimeType(sourceDef.uri);return texture}).catch(function(error){console.error("THREE.GLTFLoader: Couldn't load texture",sourceURI);throw error});this.sourceCache[sourceIndex]=promise;return promise}assignTexture(materialParams,mapName,mapDef,colorSpace){const parser=this;return this.getDependency("texture",mapDef.index).then(function(texture){if(!texture)return null;if(mapDef.texCoord!==undefined&&mapDef.texCoord>0){texture=texture.clone();texture.channel=mapDef.texCoord}if(parser.extensions[EXTENSIONS.KHR_TEXTURE_TRANSFORM]){const transform=mapDef.extensions!==undefined?mapDef.extensions[EXTENSIONS.KHR_TEXTURE_TRANSFORM]:undefined;if(transform){const gltfReference=parser.associations.get(texture);texture=parser.extensions[EXTENSIONS.KHR_TEXTURE_TRANSFORM].extendTexture(texture,transform);parser.associations.set(texture,gltfReference)}}if(colorSpace!==undefined){texture.colorSpace=colorSpace}materialParams[mapName]=texture;return texture})}assignFinalMaterial(mesh){const geometry=mesh.geometry;let material=mesh.material;const useDerivativeTangents=geometry.attributes.tangent===undefined;const useVertexColors=geometry.attributes.color!==undefined;const useFlatShading=geometry.attributes.normal===undefined;if(mesh.isPoints){const cacheKey="PointsMaterial:"+material.uuid;let pointsMaterial=this.cache.get(cacheKey);if(!pointsMaterial){pointsMaterial=new PointsMaterial;Material.prototype.copy.call(pointsMaterial,material);pointsMaterial.color.copy(material.color);pointsMaterial.map=material.map;pointsMaterial.sizeAttenuation=false;this.cache.add(cacheKey,pointsMaterial)}material=pointsMaterial}else if(mesh.isLine){const cacheKey="LineBasicMaterial:"+material.uuid;let lineMaterial=this.cache.get(cacheKey);if(!lineMaterial){lineMaterial=new LineBasicMaterial;Material.prototype.copy.call(lineMaterial,material);lineMaterial.color.copy(material.color);lineMaterial.map=material.map;this.cache.add(cacheKey,lineMaterial)}material=lineMaterial}if(useDerivativeTangents||useVertexColors||useFlatShading){let cacheKey="ClonedMaterial:"+material.uuid+":";if(useDerivativeTangents)cacheKey+="derivative-tangents:";if(useVertexColors)cacheKey+="vertex-colors:";if(useFlatShading)cacheKey+="flat-shading:";let cachedMaterial=this.cache.get(cacheKey);if(!cachedMaterial){cachedMaterial=material.clone();if(useVertexColors)cachedMaterial.vertexColors=true;if(useFlatShading)cachedMaterial.flatShading=true;if(useDerivativeTangents){if(cachedMaterial.normalScale)cachedMaterial.normalScale.y*=-1;if(cachedMaterial.clearcoatNormalScale)cachedMaterial.clearcoatNormalScale.y*=-1}this.cache.add(cacheKey,cachedMaterial);this.associations.set(cachedMaterial,this.associations.get(material))}material=cachedMaterial}mesh.material=material}getMaterialType(){return MeshStandardMaterial}loadMaterial(materialIndex){const parser=this;const json=this.json;const extensions=this.extensions;const materialDef=json.materials[materialIndex];let materialType;const materialParams={};const materialExtensions=materialDef.extensions||{};const pending=[];if(materialExtensions[EXTENSIONS.KHR_MATERIALS_UNLIT]){const kmuExtension=extensions[EXTENSIONS.KHR_MATERIALS_UNLIT];materialType=kmuExtension.getMaterialType();pending.push(kmuExtension.extendParams(materialParams,materialDef,parser))}else{const metallicRoughness=materialDef.pbrMetallicRoughness||{};materialParams.color=new Color(1,1,1);materialParams.opacity=1;if(Array.isArray(metallicRoughness.baseColorFactor)){const array=metallicRoughness.baseColorFactor;materialParams.color.setRGB(array[0],array[1],array[2],LinearSRGBColorSpace);materialParams.opacity=array[3]}if(metallicRoughness.baseColorTexture!==undefined){pending.push(parser.assignTexture(materialParams,"map",metallicRoughness.baseColorTexture,SRGBColorSpace))}materialParams.metalness=metallicRoughness.metallicFactor!==undefined?metallicRoughness.metallicFactor:1;materialParams.roughness=metallicRoughness.roughnessFactor!==undefined?metallicRoughness.roughnessFactor:1;if(metallicRoughness.metallicRoughnessTexture!==undefined){pending.push(parser.assignTexture(materialParams,"metalnessMap",metallicRoughness.metallicRoughnessTexture));pending.push(parser.assignTexture(materialParams,"roughnessMap",metallicRoughness.metallicRoughnessTexture))}materialType=this._invokeOne(function(ext){return ext.getMaterialType&&ext.getMaterialType(materialIndex)});pending.push(Promise.all(this._invokeAll(function(ext){return ext.extendMaterialParams&&ext.extendMaterialParams(materialIndex,materialParams)})))}if(materialDef.doubleSided===true){materialParams.side=DoubleSide}const alphaMode=materialDef.alphaMode||ALPHA_MODES.OPAQUE;if(alphaMode===ALPHA_MODES.BLEND){materialParams.transparent=true;materialParams.depthWrite=false}else{materialParams.transparent=false;if(alphaMode===ALPHA_MODES.MASK){materialParams.alphaTest=materialDef.alphaCutoff!==undefined?materialDef.alphaCutoff:0.5}}if(materialDef.normalTexture!==undefined&&materialType!==MeshBasicMaterial){pending.push(parser.assignTexture(materialParams,"normalMap",materialDef.normalTexture));materialParams.normalScale=new Vector2(1,1);if(materialDef.normalTexture.scale!==undefined){const scale=materialDef.normalTexture.scale;materialParams.normalScale.set(scale,scale)}}if(materialDef.occlusionTexture!==undefined&&materialType!==MeshBasicMaterial){pending.push(parser.assignTexture(materialParams,"aoMap",materialDef.occlusionTexture));if(materialDef.occlusionTexture.strength!==undefined){materialParams.aoMapIntensity=materialDef.occlusionTexture.strength}}if(materialDef.emissiveFactor!==undefined&&materialType!==MeshBasicMaterial){const emissiveFactor=materialDef.emissiveFactor;materialParams.emissive=new Color().setRGB(emissiveFactor[0],emissiveFactor[1],emissiveFactor[2],LinearSRGBColorSpace)}if(materialDef.emissiveTexture!==undefined&&materialType!==MeshBasicMaterial){pending.push(parser.assignTexture(materialParams,"emissiveMap",materialDef.emissiveTexture,SRGBColorSpace))}return Promise.all(pending).then(function(){const material=new materialType(materialParams);if(materialDef.name)material.name=materialDef.name;assignExtrasToUserData(material,materialDef);parser.associations.set(material,{materials:materialIndex});if(materialDef.extensions)addUnknownExtensionsToUserData(extensions,material,materialDef);return material})}createUniqueName(originalName){const sanitizedName=PropertyBinding.sanitizeNodeName(originalName||"");if(sanitizedName in this.nodeNamesUsed){return sanitizedName+"_"+ ++this.nodeNamesUsed[sanitizedName]}else{this.nodeNamesUsed[sanitizedName]=0;return sanitizedName}}loadGeometries(primitives){const parser=this;const extensions=this.extensions;const cache=this.primitiveCache;function createDracoPrimitive(primitive){return extensions[EXTENSIONS.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(primitive,parser).then(function(geometry){return addPrimitiveAttributes(geometry,primitive,parser)})}const pending=[];for(let i=0,il=primitives.length;i<il;i++){const primitive=primitives[i];const cacheKey=createPrimitiveKey(primitive);const cached=cache[cacheKey];if(cached){pending.push(cached.promise)}else{let geometryPromise;if(primitive.extensions&&primitive.extensions[EXTENSIONS.KHR_DRACO_MESH_COMPRESSION]){geometryPromise=createDracoPrimitive(primitive)}else{geometryPromise=addPrimitiveAttributes(new BufferGeometry,primitive,parser)}cache[cacheKey]={primitive:primitive,promise:geometryPromise};pending.push(geometryPromise)}}return Promise.all(pending)}loadMesh(meshIndex){const parser=this;const json=this.json;const extensions=this.extensions;const meshDef=json.meshes[meshIndex];const primitives=meshDef.primitives;const pending=[];for(let i=0,il=primitives.length;i<il;i++){const material=primitives[i].material===undefined?createDefaultMaterial(this.cache):this.getDependency("material",primitives[i].material);pending.push(material)}pending.push(parser.loadGeometries(primitives));return Promise.all(pending).then(function(results){const materials=results.slice(0,results.length-1);const geometries=results[results.length-1];const meshes=[];for(let i=0,il=geometries.length;i<il;i++){const geometry=geometries[i];const primitive=primitives[i];let mesh;const material=materials[i];if(primitive.mode===WEBGL_CONSTANTS.TRIANGLES||primitive.mode===WEBGL_CONSTANTS.TRIANGLE_STRIP||primitive.mode===WEBGL_CONSTANTS.TRIANGLE_FAN||primitive.mode===undefined){mesh=meshDef.isSkinnedMesh===true?new SkinnedMesh(geometry,material):new Mesh(geometry,material);if(mesh.isSkinnedMesh===true){mesh.normalizeSkinWeights()}if(primitive.mode===WEBGL_CONSTANTS.TRIANGLE_STRIP){mesh.geometry=toTrianglesDrawMode(mesh.geometry,TriangleStripDrawMode)}else if(primitive.mode===WEBGL_CONSTANTS.TRIANGLE_FAN){mesh.geometry=toTrianglesDrawMode(mesh.geometry,TriangleFanDrawMode)}}else if(primitive.mode===WEBGL_CONSTANTS.LINES){mesh=new LineSegments(geometry,material)}else if(primitive.mode===WEBGL_CONSTANTS.LINE_STRIP){mesh=new Line(geometry,material)}else if(primitive.mode===WEBGL_CONSTANTS.LINE_LOOP){mesh=new LineLoop(geometry,material)}else if(primitive.mode===WEBGL_CONSTANTS.POINTS){mesh=new Points(geometry,material)}else{throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+primitive.mode)}if(Object.keys(mesh.geometry.morphAttributes).length>0){updateMorphTargets(mesh,meshDef)}mesh.name=parser.createUniqueName(meshDef.name||"mesh_"+meshIndex);assignExtrasToUserData(mesh,meshDef);if(primitive.extensions)addUnknownExtensionsToUserData(extensions,mesh,primitive);parser.assignFinalMaterial(mesh);meshes.push(mesh)}for(let i=0,il=meshes.length;i<il;i++){parser.associations.set(meshes[i],{meshes:meshIndex,primitives:i})}if(meshes.length===1){if(meshDef.extensions)addUnknownExtensionsToUserData(extensions,meshes[0],meshDef);return meshes[0]}const group=new Group;if(meshDef.extensions)addUnknownExtensionsToUserData(extensions,group,meshDef);parser.associations.set(group,{meshes:meshIndex});for(let i=0,il=meshes.length;i<il;i++){group.add(meshes[i])}return group})}loadCamera(cameraIndex){let camera;const cameraDef=this.json.cameras[cameraIndex];const params=cameraDef[cameraDef.type];if(!params){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}if(cameraDef.type==="perspective"){camera=new PerspectiveCamera(MathUtils.radToDeg(params.yfov),params.aspectRatio||1,params.znear||1,params.zfar||2e6)}else if(cameraDef.type==="orthographic"){camera=new OrthographicCamera(-params.xmag,params.xmag,params.ymag,-params.ymag,params.znear,params.zfar)}if(cameraDef.name)camera.name=this.createUniqueName(cameraDef.name);assignExtrasToUserData(camera,cameraDef);return Promise.resolve(camera)}loadSkin(skinIndex){const skinDef=this.json.skins[skinIndex];const pending=[];for(let i=0,il=skinDef.joints.length;i<il;i++){pending.push(this._loadNodeShallow(skinDef.joints[i]))}if(skinDef.inverseBindMatrices!==undefined){pending.push(this.getDependency("accessor",skinDef.inverseBindMatrices))}else{pending.push(null)}return Promise.all(pending).then(function(results){const inverseBindMatrices=results.pop();const jointNodes=results;const bones=[];const boneInverses=[];for(let i=0,il=jointNodes.length;i<il;i++){const jointNode=jointNodes[i];if(jointNode){bones.push(jointNode);const mat=new Matrix4;if(inverseBindMatrices!==null){mat.fromArray(inverseBindMatrices.array,i*16)}boneInverses.push(mat)}else{console.warn("THREE.GLTFLoader: Joint \"%s\" could not be found.",skinDef.joints[i])}}return new Skeleton(bones,boneInverses)})}loadAnimation(animationIndex){const json=this.json;const parser=this;const animationDef=json.animations[animationIndex];const animationName=animationDef.name?animationDef.name:"animation_"+animationIndex;const pendingNodes=[];const pendingInputAccessors=[];const pendingOutputAccessors=[];const pendingSamplers=[];const pendingTargets=[];for(let i=0,il=animationDef.channels.length;i<il;i++){const channel=animationDef.channels[i];const sampler=animationDef.samplers[channel.sampler];const target=channel.target;const name=target.node;const input=animationDef.parameters!==undefined?animationDef.parameters[sampler.input]:sampler.input;const output=animationDef.parameters!==undefined?animationDef.parameters[sampler.output]:sampler.output;if(target.node===undefined)continue;pendingNodes.push(this.getDependency("node",name));pendingInputAccessors.push(this.getDependency("accessor",input));pendingOutputAccessors.push(this.getDependency("accessor",output));pendingSamplers.push(sampler);pendingTargets.push(target)}return Promise.all([Promise.all(pendingNodes),Promise.all(pendingInputAccessors),Promise.all(pendingOutputAccessors),Promise.all(pendingSamplers),Promise.all(pendingTargets)]).then(function(dependencies){const nodes=dependencies[0];const inputAccessors=dependencies[1];const outputAccessors=dependencies[2];const samplers=dependencies[3];const targets=dependencies[4];const tracks=[];for(let i=0,il=nodes.length;i<il;i++){const node=nodes[i];const inputAccessor=inputAccessors[i];const outputAccessor=outputAccessors[i];const sampler=samplers[i];const target=targets[i];if(node===undefined)continue;if(node.updateMatrix){node.updateMatrix()}const createdTracks=parser._createAnimationTracks(node,inputAccessor,outputAccessor,sampler,target);if(createdTracks){for(let k=0;k<createdTracks.length;k++){tracks.push(createdTracks[k])}}}return new AnimationClip(animationName,undefined,tracks)})}createNodeMesh(nodeIndex){const json=this.json;const parser=this;const nodeDef=json.nodes[nodeIndex];if(nodeDef.mesh===undefined)return null;return parser.getDependency("mesh",nodeDef.mesh).then(function(mesh){const node=parser._getNodeRef(parser.meshCache,nodeDef.mesh,mesh);if(nodeDef.weights!==undefined){node.traverse(function(o){if(!o.isMesh)return;for(let i=0,il=nodeDef.weights.length;i<il;i++){o.morphTargetInfluences[i]=nodeDef.weights[i]}})}return node})}loadNode(nodeIndex){const json=this.json;const parser=this;const nodeDef=json.nodes[nodeIndex];const nodePending=parser._loadNodeShallow(nodeIndex);const childPending=[];const childrenDef=nodeDef.children||[];for(let i=0,il=childrenDef.length;i<il;i++){childPending.push(parser.getDependency("node",childrenDef[i]))}const skeletonPending=nodeDef.skin===undefined?Promise.resolve(null):parser.getDependency("skin",nodeDef.skin);return Promise.all([nodePending,Promise.all(childPending),skeletonPending]).then(function(results){const node=results[0];const children=results[1];const skeleton=results[2];if(skeleton!==null){node.traverse(function(mesh){if(!mesh.isSkinnedMesh)return;mesh.bind(skeleton,_identityMatrix)})}for(let i=0,il=children.length;i<il;i++){node.add(children[i])}return node})}_loadNodeShallow(nodeIndex){const json=this.json;const extensions=this.extensions;const parser=this;if(this.nodeCache[nodeIndex]!==undefined){return this.nodeCache[nodeIndex]}const nodeDef=json.nodes[nodeIndex];const nodeName=nodeDef.name?parser.createUniqueName(nodeDef.name):"";const pending=[];const meshPromise=parser._invokeOne(function(ext){return ext.createNodeMesh&&ext.createNodeMesh(nodeIndex)});if(meshPromise){pending.push(meshPromise)}if(nodeDef.camera!==undefined){pending.push(parser.getDependency("camera",nodeDef.camera).then(function(camera){return parser._getNodeRef(parser.cameraCache,nodeDef.camera,camera)}))}parser._invokeAll(function(ext){return ext.createNodeAttachment&&ext.createNodeAttachment(nodeIndex)}).forEach(function(promise){pending.push(promise)});this.nodeCache[nodeIndex]=Promise.all(pending).then(function(objects){let node;if(nodeDef.isBone===true){node=new Bone}else if(objects.length>1){node=new Group}else if(objects.length===1){node=objects[0]}else{node=new Object3D}if(node!==objects[0]){for(let i=0,il=objects.length;i<il;i++){node.add(objects[i])}}if(nodeDef.name){node.userData.name=nodeDef.name;node.name=nodeName}assignExtrasToUserData(node,nodeDef);if(nodeDef.extensions)addUnknownExtensionsToUserData(extensions,node,nodeDef);if(nodeDef.matrix!==undefined){const matrix=new Matrix4;matrix.fromArray(nodeDef.matrix);node.applyMatrix4(matrix)}else{if(nodeDef.translation!==undefined){node.position.fromArray(nodeDef.translation)}if(nodeDef.rotation!==undefined){node.quaternion.fromArray(nodeDef.rotation)}if(nodeDef.scale!==undefined){node.scale.fromArray(nodeDef.scale)}}if(!parser.associations.has(node)){parser.associations.set(node,{})}parser.associations.get(node).nodes=nodeIndex;return node});return this.nodeCache[nodeIndex]}loadScene(sceneIndex){const extensions=this.extensions;const sceneDef=this.json.scenes[sceneIndex];const parser=this;const scene=new Group;if(sceneDef.name)scene.name=parser.createUniqueName(sceneDef.name);assignExtrasToUserData(scene,sceneDef);if(sceneDef.extensions)addUnknownExtensionsToUserData(extensions,scene,sceneDef);const nodeIds=sceneDef.nodes||[];const pending=[];for(let i=0,il=nodeIds.length;i<il;i++){pending.push(parser.getDependency("node",nodeIds[i]))}return Promise.all(pending).then(function(nodes){for(let i=0,il=nodes.length;i<il;i++){scene.add(nodes[i])}const reduceAssociations=node=>{const reducedAssociations=new Map;for(const[key,value]of parser.associations){if(key instanceof Material||key instanceof Texture){reducedAssociations.set(key,value)}}node.traverse(node=>{const mappings=parser.associations.get(node);if(mappings!=null){reducedAssociations.set(node,mappings)}});return reducedAssociations};parser.associations=reduceAssociations(scene);return scene})}_createAnimationTracks(node,inputAccessor,outputAccessor,sampler,target){const tracks=[];const targetName=node.name?node.name:node.uuid;const targetNames=[];if(PATH_PROPERTIES[target.path]===PATH_PROPERTIES.weights){node.traverse(function(object){if(object.morphTargetInfluences){targetNames.push(object.name?object.name:object.uuid)}})}else{targetNames.push(targetName)}let TypedKeyframeTrack;switch(PATH_PROPERTIES[target.path]){case PATH_PROPERTIES.weights:TypedKeyframeTrack=NumberKeyframeTrack;break;case PATH_PROPERTIES.rotation:TypedKeyframeTrack=QuaternionKeyframeTrack;break;case PATH_PROPERTIES.position:case PATH_PROPERTIES.scale:TypedKeyframeTrack=VectorKeyframeTrack;break;default:switch(outputAccessor.itemSize){case 1:TypedKeyframeTrack=NumberKeyframeTrack;break;case 2:case 3:default:TypedKeyframeTrack=VectorKeyframeTrack;break;}break;}const interpolation=sampler.interpolation!==undefined?INTERPOLATION[sampler.interpolation]:InterpolateLinear;const outputArray=this._getArrayFromAccessor(outputAccessor);for(let j=0,jl=targetNames.length;j<jl;j++){const track=new TypedKeyframeTrack(targetNames[j]+"."+PATH_PROPERTIES[target.path],inputAccessor.array,outputArray,interpolation);if(sampler.interpolation==="CUBICSPLINE"){this._createCubicSplineTrackInterpolant(track)}tracks.push(track)}return tracks}_getArrayFromAccessor(accessor){let outputArray=accessor.array;if(accessor.normalized){const scale=getNormalizedComponentScale(outputArray.constructor);const scaled=new Float32Array(outputArray.length);for(let j=0,jl=outputArray.length;j<jl;j++){scaled[j]=outputArray[j]*scale}outputArray=scaled}return outputArray}_createCubicSplineTrackInterpolant(track){track.createInterpolant=function InterpolantFactoryMethodGLTFCubicSpline(result){const interpolantType=this instanceof QuaternionKeyframeTrack?GLTFCubicSplineQuaternionInterpolant:GLTFCubicSplineInterpolant;return new interpolantType(this.times,this.values,this.getValueSize()/3,result)};track.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=true}}function computeBounds(geometry,primitiveDef,parser){const attributes=primitiveDef.attributes;const box=new Box3;if(attributes.POSITION!==undefined){const accessor=parser.json.accessors[attributes.POSITION];const min=accessor.min;const max=accessor.max;if(min!==undefined&&max!==undefined){box.set(new Vector3(min[0],min[1],min[2]),new Vector3(max[0],max[1],max[2]));if(accessor.normalized){const boxScale=getNormalizedComponentScale(WEBGL_COMPONENT_TYPES[accessor.componentType]);box.min.multiplyScalar(boxScale);box.max.multiplyScalar(boxScale)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else{return}const targets=primitiveDef.targets;if(targets!==undefined){const maxDisplacement=new Vector3;const vector=new Vector3;for(let i=0,il=targets.length;i<il;i++){const target=targets[i];if(target.POSITION!==undefined){const accessor=parser.json.accessors[target.POSITION];const min=accessor.min;const max=accessor.max;if(min!==undefined&&max!==undefined){vector.setX(Math.max(Math.abs(min[0]),Math.abs(max[0])));vector.setY(Math.max(Math.abs(min[1]),Math.abs(max[1])));vector.setZ(Math.max(Math.abs(min[2]),Math.abs(max[2])));if(accessor.normalized){const boxScale=getNormalizedComponentScale(WEBGL_COMPONENT_TYPES[accessor.componentType]);vector.multiplyScalar(boxScale)}maxDisplacement.max(vector)}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}}box.expandByVector(maxDisplacement)}geometry.boundingBox=box;const sphere=new Sphere;box.getCenter(sphere.center);sphere.radius=box.min.distanceTo(box.max)/2;geometry.boundingSphere=sphere}function addPrimitiveAttributes(geometry,primitiveDef,parser){const attributes=primitiveDef.attributes;const pending=[];function assignAttributeAccessor(accessorIndex,attributeName){return parser.getDependency("accessor",accessorIndex).then(function(accessor){geometry.setAttribute(attributeName,accessor)})}for(const gltfAttributeName in attributes){const threeAttributeName=ATTRIBUTES[gltfAttributeName]||gltfAttributeName.toLowerCase();if(threeAttributeName in geometry.attributes)continue;pending.push(assignAttributeAccessor(attributes[gltfAttributeName],threeAttributeName))}if(primitiveDef.indices!==undefined&&!geometry.index){const accessor=parser.getDependency("accessor",primitiveDef.indices).then(function(accessor){geometry.setIndex(accessor)});pending.push(accessor)}if(ColorManagement.workingColorSpace!==LinearSRGBColorSpace&&"COLOR_0"in attributes){console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${ColorManagement.workingColorSpace}" not supported.`)}assignExtrasToUserData(geometry,primitiveDef);computeBounds(geometry,primitiveDef,parser);return Promise.all(pending).then(function(){return primitiveDef.targets!==undefined?addMorphTargets(geometry,primitiveDef.targets,parser):geometry})}THREE.GLTFLoader=GLTFLoader})()});(function(t,e){e(t.THREE=t.THREE||{})})(this,function(THREE){var Object3D=THREE.Object3D;var deviceMax=Number.POSITIVE_INFINITY;var deviceMin=Number.NEGATIVE_INFINITY;class CSS3DObject extends Object3D{constructor(element){super();this.containerElement=document.createElement("div");this.containerElement.style.position="absolute";this.containerElement.style.pointerEvents="none";this.containerElement.style.overflow="hidden";this.cameraElement=document.createElement("div");this.containerElement.appendChild(this.cameraElement);this.cameraElement.style.transformStyle="preserve-3d";this.cameraElement.style.position="absolute";this.cameraElement.style.pointerEvents="none";this.element=element||document.createElement("div");this.cameraElement.appendChild(this.element);this.element.style.position="absolute";this.element.style.pointerEvents="none";this.contentWidth=100;this.contentHeight=100;this.vertices=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3];this.projectedVertices=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3];this.addEventListener("removed",function(){this.traverse(function(object){if(object.containerElement instanceof Element&&object.containerElement.parentNode!==null)object.containerElement.parentNode.removeChild(object.containerElement)})})}copy(source,recursive){super.copy(source,recursive);this.element=source.element.cloneNode(true);return this}updateVertices(){this.vertices[0].set(-this.contentWidth*0.5,+this.contentHeight*0.5,0);this.vertices[1].set(+this.contentWidth*0.5,+this.contentHeight*0.5,0);this.vertices[2].set(+this.contentWidth*0.5,-this.contentHeight*0.5,0);this.vertices[3].set(-this.contentWidth*0.5,-this.contentHeight*0.5,0)}projectVertices(camera){if(this.matrixWorldNeedsUpdate)this.updateMatrixWorld();projectVertices(this,camera);var pv=this.projectedVertices;this.isDrawable=true;pv=pv.filter(function(p){return p.z<0});var x=0,y=0;var max=0,min=0;pv.forEach(function(p){if(p.x<-1)x-=1;else if(p.x>1)x+=1;if(p.y<-1)y-=1;else if(p.y>1)y+=1;max=Math.max(p.x*camera.aspect,p.y,max);min=Math.min(p.x*camera.aspect,p.y,min)});this.isVisible=this.isDrawable&&Math.abs(x)<pv.length&&Math.abs(y)<pv.length&&max<deviceMax&&min>deviceMin}}CSS3DObject.prototype.isCSS3DObject=true;THREE.CSS3DObject=CSS3DObject;class CSS3DQuad extends Object3D{constructor(element){super();this.contentWidth=100;this.contentHeight=100;this.vertices=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3];this.projectedVertices=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3];this.containerElement=document.createElement("div");this.containerElement.style.position="absolute";this.containerElement.style.pointerEvents="none";this.containerElement.style.overflow="hidden";this.element=element||document.createElement("div");this.containerElement.appendChild(this.element);this.element.style.position="absolute";this.element.style.pointerEvents="none"}copy(source,recursive){super.copy(source,recursive);for(var i=0;i<4;i++)this.vertices[i].copy(source.vertices[i]);return this}projectVertices(camera){if(this.matrixWorldNeedsUpdate)this.updateMatrixWorld();projectVertices(this,camera);var pv=this.projectedVertices;this.isDrawable=pv[0].z<0&&pv[1].z<0&&pv[2].z<0&&pv[3].z<0;var x=0,y=0;var max=0,min=0;pv.forEach(function(p){if(p.x<-1)x-=1;else if(p.x>1)x+=1;if(p.y<-1)y-=1;else if(p.y>1)y+=1;max=Math.max(p.x*camera.aspect,p.y,max);min=Math.min(p.x*camera.aspect,p.y,min)});this.isVisible=this.isDrawable&&Math.abs(x)<pv.length&&Math.abs(y)<pv.length&&max<deviceMax&&min>deviceMin}}CSS3DQuad.prototype.isCSS3DQuad=true;THREE.CSS3DQuad=CSS3DQuad;class CSS3DRectangle extends CSS3DQuad{constructor(element){super(element)}updateVertices(){this.vertices[0].set(-this.contentWidth*0.5,+this.contentHeight*0.5,0);this.vertices[1].set(+this.contentWidth*0.5,+this.contentHeight*0.5,0);this.vertices[2].set(+this.contentWidth*0.5,-this.contentHeight*0.5,0);this.vertices[3].set(-this.contentWidth*0.5,-this.contentHeight*0.5,0)}}CSS3DRectangle.prototype.isCSS3DRectangle=true;THREE.CSS3DRectangle=CSS3DRectangle;var _matrix=new THREE.Matrix4;class CSS3DRenderer{constructor(){var _this=this;var _width,_height;var _widthHalf,_heightHalf;var _fov;var _cameraStyle;var cache={objects:new WeakMap};var domElement=document.createElement("div");domElement.style.overflow="hidden";this.domElement=domElement;this.getSize=function(){return{width:_width,height:_height}};this.render=function(scene,camera){_fov=camera.projectionMatrix.elements[5]*_heightHalf;if(scene.matrixWorldAutoUpdate===true)scene.updateMatrixWorld();_cameraStyle="translateZ("+_fov+"px)"+getCameraCSSMatrix(camera.matrixWorldInverse)+"translate("+_widthHalf+"px,"+_heightHalf+"px)";renderObject(scene,scene,camera)};this.setSize=function(width,height){_width=width;_height=height;_widthHalf=_width/2;_heightHalf=_height/2;domElement.style.width=_width+"px";domElement.style.height=_height+"px"};function renderObject(object,scene,camera){if(object.isCSS3DObject||object.isCSS3DQuad){object.onBeforeRender(_this,scene,camera);var cachedObject=cache.objects.get(object)||{};var cacheChanged=false;if(object.isVisible){if(object.isCSS3DQuad){var pv=object.projectedVertices;var x0=(1+pv[0].x)*0.5*_width,y0=(1-pv[0].y)*0.5*_height,x1=(1+pv[1].x)*0.5*_width,y1=(1-pv[1].y)*0.5*_height,x2=(1+pv[2].x)*0.5*_width,y2=(1-pv[2].y)*0.5*_height,x3=(1+pv[3].x)*0.5*_width,y3=(1-pv[3].y)*0.5*_height;createQuadMatrix(object.contentWidth,object.contentHeight,x0,y0,x1,y1,x3,y3,x2,y2,_matrix.elements);var elementStyle=getQuadCSSMatrix(_matrix);if(cachedObject.elementStyle!=elementStyle){cachedObject.elementStyle=object.element.style.transform=elementStyle;cacheChanged=true}if(cachedObject.width!==_width||cachedObject.height!==_height){object.containerElement.style.width=(cachedObject.width=_width)+"px";object.containerElement.style.height=(cachedObject.height=_height)+"px";cacheChanged=true}}else{var elementStyle=getObjectCSSMatrix(object.matrixWorld);if(cachedObject.cameraFov!==_fov){object.containerElement.style.perspective=(cachedObject.cameraFov=_fov)+"px";cacheChanged=true}if(cachedObject.width!==_width||cachedObject.height!==_height){object.cameraElement.style.width=object.containerElement.style.width=(cachedObject.width=_width)+"px";object.cameraElement.style.height=object.containerElement.style.height=(cachedObject.height=_height)+"px";cacheChanged=true}if(cachedObject.cameraStyle!==_cameraStyle){cachedObject.cameraStyle=object.cameraElement.style.transform=_cameraStyle;cacheChanged=true}if(cachedObject.elementStyle!==elementStyle){cachedObject.elementStyle=object.element.style.transform=elementStyle;cacheChanged=true}}object.containerElement.style.left="0"}else{object.containerElement.style.left=_width+"px"}if(cacheChanged)cache.objects.set(object,cachedObject);object.containerElement.style.display=object.visible?"":"none";if(object.containerElement.parentNode!==domElement)domElement.appendChild(object.containerElement);object.onAfterRender(_this,scene,camera)}for(var i=0,l=object.children.length;i<l;i++)renderObject(object.children[i],scene,camera)}function epsilon(value){return value<1e-10&&value>-1e-10?0:value}function getCameraCSSMatrix(matrix){var elements=matrix.elements;return"matrix3d("+epsilon(elements[0])+","+epsilon(-elements[1])+","+epsilon(elements[2])+","+epsilon(elements[3])+","+epsilon(elements[4])+","+epsilon(-elements[5])+","+epsilon(elements[6])+","+epsilon(elements[7])+","+epsilon(elements[8])+","+epsilon(-elements[9])+","+epsilon(elements[10])+","+epsilon(elements[11])+","+epsilon(elements[12])+","+epsilon(-elements[13])+","+epsilon(elements[14])+","+epsilon(elements[15])+")"}function getObjectCSSMatrix(matrix){var elements=matrix.elements;var matrix3d="matrix3d("+epsilon(elements[0])+","+epsilon(elements[1])+","+epsilon(elements[2])+","+epsilon(elements[3])+","+epsilon(-elements[4])+","+epsilon(-elements[5])+","+epsilon(-elements[6])+","+epsilon(-elements[7])+","+epsilon(elements[8])+","+epsilon(elements[9])+","+epsilon(elements[10])+","+epsilon(elements[11])+","+epsilon(elements[12])+","+epsilon(elements[13])+","+epsilon(elements[14])+","+epsilon(elements[15])+")";return"translate(-50%,-50%)"+matrix3d}function getQuadCSSMatrix(matrix){var elements=matrix.elements;var matrix3d="matrix3d("+epsilon(elements[0])+","+epsilon(elements[1])+","+epsilon(elements[2])+","+epsilon(elements[3])+","+epsilon(elements[4])+","+epsilon(elements[5])+","+epsilon(elements[6])+","+epsilon(elements[7])+","+epsilon(elements[8])+","+epsilon(elements[9])+","+epsilon(elements[10])+","+epsilon(elements[11])+","+epsilon(elements[12])+","+epsilon(elements[13])+","+epsilon(elements[14])+","+epsilon(elements[15])+")";return matrix3d}}};THREE.CSS3DRenderer=CSS3DRenderer;function projectVertices(object,camera){for(var index=0;index<object.vertices.length;index++){var vertex=object.vertices[index];var projectedVertex=object.projectedVertices[index];projectedVertex.copy(vertex);projectedVertex.applyMatrix4(object.matrixWorld);projectedVertex.applyMatrix4(camera.matrixWorldInverse);var z=projectedVertex.z;projectedVertex.applyMatrix4(camera.projectionMatrix);projectedVertex.z=z}}function setArray(){var a=arguments[0];for(var i=1;i<arguments.length;i++)a[i-1]=arguments[i];return a}function copyArray(t,s){for(var i=0;i<s.length;i++)t[i]=s[i];return t}function adjugate(m,out){setArray(out,m[4]*m[8]-m[5]*m[7],m[2]*m[7]-m[1]*m[8],m[1]*m[5]-m[2]*m[4],m[5]*m[6]-m[3]*m[8],m[0]*m[8]-m[2]*m[6],m[2]*m[3]-m[0]*m[5],m[3]*m[7]-m[4]*m[6],m[1]*m[6]-m[0]*m[7],m[0]*m[4]-m[1]*m[3])}function multmm(a,b,out){for(var i=0;i!=3;++i){for(var j=0;j!=3;++j){var cij=0;for(var k=0;k!=3;++k){cij+=a[3*i+k]*b[3*k+j]}out[3*i+j]=cij}}}function multmv(m,v,out){return setArray(out,m[0]*v[0]+m[1]*v[1]+m[2]*v[2],m[3]*v[0]+m[4]*v[1]+m[5]*v[2],m[6]*v[0]+m[7]*v[1]+m[8]*v[2])}var m=new Array(9);var m2=new Array(9);var mAdj=new Array(9);var p=new Array(3);var v=new Array(3);var s=new Array(9);var d=new Array(9);var sAdj=new Array(9);var t=new Array(9);function basisToPoints(x1,y1,x2,y2,x3,y3,x4,y4,out){setArray(m,x1,x2,x3,y1,y2,y3,1,1,1);adjugate(m,mAdj);setArray(p,x4,y4,1);multmv(mAdj,p,v);setArray(m2,v[0],0,0,0,v[1],0,0,0,v[2]);return multmm(m,m2,out)}function general2DProjection(x1s,y1s,x1d,y1d,x2s,y2s,x2d,y2d,x3s,y3s,x3d,y3d,x4s,y4s,x4d,y4d,out){basisToPoints(x1s,y1s,x2s,y2s,x3s,y3s,x4s,y4s,s);basisToPoints(x1d,y1d,x2d,y2d,x3d,y3d,x4d,y4d,d);adjugate(s,sAdj);return multmm(d,sAdj,out)}function createQuadMatrix(w,h,x1,y1,x2,y2,x3,y3,x4,y4,out){general2DProjection(0,0,x1,y1,w,0,x2,y2,0,h,x3,y3,w,h,x4,y4,t);setArray(out,t[0]/t[8],t[3]/t[8],0,t[6]/t[8],t[1]/t[8],t[4]/t[8],0,t[7]/t[8],0,0,1,0,t[2]/t[8],t[5]/t[8],0,1)}});(function(){var BackSide=THREE.BackSide,BoxGeometry=THREE.BoxGeometry,Mesh=THREE.Mesh,MeshBasicMaterial=THREE.MeshBasicMaterial,MeshStandardMaterial=THREE.MeshStandardMaterial,PointLight=THREE.PointLight,Scene=THREE.Scene;class RoomEnvironment extends Scene{constructor(renderer=null){super();const geometry=new BoxGeometry;geometry.deleteAttribute("uv");const roomMaterial=new MeshStandardMaterial({side:BackSide});const boxMaterial=new MeshStandardMaterial;let intensity=5;if(renderer!==null&&renderer._useLegacyLights===false)intensity=900;const mainLight=new PointLight(16777215,intensity,28,2);mainLight.position.set(0.418,16.199,0.3);this.add(mainLight);const room=new Mesh(geometry,roomMaterial);room.position.set(-0.757,13.219,0.717);room.scale.set(31.713,28.305,28.591);this.add(room);const box1=new Mesh(geometry,boxMaterial);box1.position.set(-10.906,2.009,1.846);box1.rotation.set(0,-0.195,0);box1.scale.set(2.328,7.905,4.651);this.add(box1);const box2=new Mesh(geometry,boxMaterial);box2.position.set(-5.607,-0.754,-0.758);box2.rotation.set(0,0.994,0);box2.scale.set(1.97,1.534,3.955);this.add(box2);const box3=new Mesh(geometry,boxMaterial);box3.position.set(6.167,0.857,7.803);box3.rotation.set(0,0.561,0);box3.scale.set(3.927,6.285,3.687);this.add(box3);const box4=new Mesh(geometry,boxMaterial);box4.position.set(-2.017,0.018,6.124);box4.rotation.set(0,0.333,0);box4.scale.set(2.002,4.566,2.064);this.add(box4);const box5=new Mesh(geometry,boxMaterial);box5.position.set(2.291,-0.756,-2.621);box5.rotation.set(0,-0.286,0);box5.scale.set(1.546,1.552,1.496);this.add(box5);const box6=new Mesh(geometry,boxMaterial);box6.position.set(-2.193,-0.369,-5.547);box6.rotation.set(0,0.516,0);box6.scale.set(3.875,3.487,2.986);this.add(box6);const light1=new Mesh(geometry,createAreaLightMaterial(50));light1.position.set(-16.116,14.37,8.208);light1.scale.set(0.1,2.428,2.739);this.add(light1);const light2=new Mesh(geometry,createAreaLightMaterial(50));light2.position.set(-16.109,18.021,-8.207);light2.scale.set(0.1,2.425,2.751);this.add(light2);const light3=new Mesh(geometry,createAreaLightMaterial(17));light3.position.set(14.904,12.198,-1.832);light3.scale.set(0.15,4.265,6.331);this.add(light3);const light4=new Mesh(geometry,createAreaLightMaterial(43));light4.position.set(-0.462,8.89,14.52);light4.scale.set(4.38,5.441,0.088);this.add(light4);const light5=new Mesh(geometry,createAreaLightMaterial(20));light5.position.set(3.235,11.486,-12.541);light5.scale.set(2.5,2,0.1);this.add(light5);const light6=new Mesh(geometry,createAreaLightMaterial(100));light6.position.set(0,20,0);light6.scale.set(1,0.1,1);this.add(light6)}dispose(){const resources=new Set;this.traverse(object=>{if(object.isMesh){resources.add(object.geometry);resources.add(object.material)}});for(const resource of resources){resource.dispose()}}}function createAreaLightMaterial(intensity){const material=new MeshBasicMaterial;material.color.setScalar(intensity);return material}THREE.RoomEnvironment=RoomEnvironment})();(function(t,e){e(t.THREE=t.THREE||{})})(this,function(THREE){var CubeReflectionMapping=THREE.CubeReflectionMapping,CubeRefractionMapping=THREE.CubeRefractionMapping,CubeUVReflectionMapping=THREE.CubeUVReflectionMapping,LinearEncoding=THREE.LinearEncoding,LinearFilter=THREE.LinearFilter,NoToneMapping=THREE.NoToneMapping,NoBlending=THREE.NoBlending,RGBAFormat=THREE.RGBAFormat,HalfFloatType=THREE.HalfFloatType,BufferAttribute=THREE.BufferAttribute,BufferGeometry=THREE.BufferGeometry,Mesh=THREE.Mesh,OrthographicCamera=THREE.OrthographicCamera,PerspectiveCamera=THREE.PerspectiveCamera,ShaderMaterial=THREE.ShaderMaterial,Vector3=THREE.Vector3,Color=THREE.Color,WebGLRenderTarget=THREE.WebGLRenderTarget,MeshBasicMaterial=THREE.MeshBasicMaterial,BoxGeometry=THREE.BoxGeometry,BackSide=THREE.BackSide;const LOD_MIN=4;const EXTRA_LOD_SIGMA=[0.125,0.215,0.35,0.446,0.526,0.582];const MAX_SAMPLES=20;const _flatCamera=new OrthographicCamera;const _clearColor=new Color;let _oldTarget=null;const PHI=(1+Math.sqrt(5))/2;const INV_PHI=1/PHI;const _axisDirections=[new Vector3(1,1,1),new Vector3(-1,1,1),new Vector3(1,1,-1),new Vector3(-1,1,-1),new Vector3(0,PHI,INV_PHI),new Vector3(0,PHI,-INV_PHI),new Vector3(INV_PHI,0,PHI),new Vector3(-INV_PHI,0,PHI),new Vector3(PHI,INV_PHI,0),new Vector3(-PHI,INV_PHI,0)];class PMREMGenerator{constructor(renderer){this._renderer=renderer;this._pingPongRenderTarget=null;this._lodMax=0;this._cubeSize=0;this._lodPlanes=[];this._sizeLods=[];this._sigmas=[];this._blurMaterial=null;this._cubemapMaterial=null;this._equirectMaterial=null;this._compileMaterial(this._blurMaterial)}fromScene(scene,sigma=0,near=0.1,far=100){_oldTarget=this._renderer.getRenderTarget();this._setSize(256);const cubeUVRenderTarget=this._allocateTargets();cubeUVRenderTarget.depthBuffer=true;this._sceneToCubeUV(scene,near,far,cubeUVRenderTarget);if(sigma>0){this._blur(cubeUVRenderTarget,0,0,sigma)}this._applyPMREM(cubeUVRenderTarget);this._cleanup(cubeUVRenderTarget);return cubeUVRenderTarget}fromEquirectangular(equirectangular,renderTarget=null){return this._fromTexture(equirectangular,renderTarget)}fromCubemap(cubemap,renderTarget=null){return this._fromTexture(cubemap,renderTarget)}compileCubemapShader(){if(this._cubemapMaterial===null){this._cubemapMaterial=_getCubemapMaterial();this._compileMaterial(this._cubemapMaterial)}}compileEquirectangularShader(){if(this._equirectMaterial===null){this._equirectMaterial=_getEquirectMaterial();this._compileMaterial(this._equirectMaterial)}}dispose(){this._dispose();if(this._cubemapMaterial!==null)this._cubemapMaterial.dispose();if(this._equirectMaterial!==null)this._equirectMaterial.dispose()}_setSize(cubeSize){this._lodMax=Math.floor(Math.log2(cubeSize));this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){if(this._blurMaterial!==null)this._blurMaterial.dispose();if(this._pingPongRenderTarget!==null)this._pingPongRenderTarget.dispose();for(let i=0;i<this._lodPlanes.length;i++){this._lodPlanes[i].dispose()}}_cleanup(outputTarget){this._renderer.setRenderTarget(_oldTarget);outputTarget.scissorTest=false;_setViewport(outputTarget,0,0,outputTarget.width,outputTarget.height)}_fromTexture(texture,renderTarget){if(texture.mapping===CubeReflectionMapping||texture.mapping===CubeRefractionMapping){this._setSize(texture.image.length===0?16:texture.image[0].width||texture.image[0].image.width)}else{this._setSize(texture.image.width/4)}_oldTarget=this._renderer.getRenderTarget();const cubeUVRenderTarget=renderTarget||this._allocateTargets();this._textureToCubeUV(texture,cubeUVRenderTarget);this._applyPMREM(cubeUVRenderTarget);this._cleanup(cubeUVRenderTarget);return cubeUVRenderTarget}_allocateTargets(){const width=3*Math.max(this._cubeSize,16*7);const height=4*this._cubeSize;const params={magFilter:LinearFilter,minFilter:LinearFilter,generateMipmaps:false,type:HalfFloatType,format:RGBAFormat,encoding:LinearEncoding,depthBuffer:false};const cubeUVRenderTarget=_createRenderTarget(width,height,params);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==width){if(this._pingPongRenderTarget!==null){this._dispose()}this._pingPongRenderTarget=_createRenderTarget(width,height,params);const{_lodMax}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=_createPlanes(_lodMax));this._blurMaterial=_getBlurShader(_lodMax,width,height)}return cubeUVRenderTarget}_compileMaterial(material){const tmpMesh=new Mesh(this._lodPlanes[0],material);this._renderer.compile(tmpMesh,_flatCamera)}_sceneToCubeUV(scene,near,far,cubeUVRenderTarget){const fov=90;const aspect=1;const cubeCamera=new PerspectiveCamera(fov,aspect,near,far);const upSign=[1,-1,1,1,1,1];const forwardSign=[1,1,1,-1,-1,-1];const renderer=this._renderer;const originalAutoClear=renderer.autoClear;const toneMapping=renderer.toneMapping;renderer.getClearColor(_clearColor);renderer.toneMapping=NoToneMapping;renderer.autoClear=false;const backgroundMaterial=new MeshBasicMaterial({name:"PMREM.Background",side:BackSide,depthWrite:false,depthTest:false});const backgroundBox=new Mesh(new BoxGeometry(),backgroundMaterial);let useSolidColor=false;const background=scene.background;if(background){if(background.isColor){backgroundMaterial.color.copy(background);scene.background=null;useSolidColor=true}}else{backgroundMaterial.color.copy(_clearColor);useSolidColor=true}for(let i=0;i<6;i++){const col=i%3;if(col===0){cubeCamera.up.set(0,upSign[i],0);cubeCamera.lookAt(forwardSign[i],0,0)}else if(col===1){cubeCamera.up.set(0,0,upSign[i]);cubeCamera.lookAt(0,forwardSign[i],0)}else{cubeCamera.up.set(0,upSign[i],0);cubeCamera.lookAt(0,0,forwardSign[i])}const size=this._cubeSize;_setViewport(cubeUVRenderTarget,col*size,i>2?size:0,size,size);renderer.setRenderTarget(cubeUVRenderTarget);if(useSolidColor){renderer.render(backgroundBox,cubeCamera)}renderer.render(scene,cubeCamera)}backgroundBox.geometry.dispose();backgroundBox.material.dispose();renderer.toneMapping=toneMapping;renderer.autoClear=originalAutoClear;scene.background=background}_textureToCubeUV(texture,cubeUVRenderTarget){const renderer=this._renderer;const isCubeTexture=texture.mapping===CubeReflectionMapping||texture.mapping===CubeRefractionMapping;if(isCubeTexture){if(this._cubemapMaterial===null){this._cubemapMaterial=_getCubemapMaterial()}this._cubemapMaterial.uniforms.flipEnvMap.value=texture.isRenderTargetTexture===false?-1:1}else{if(this._equirectMaterial===null){this._equirectMaterial=_getEquirectMaterial()}}const material=isCubeTexture?this._cubemapMaterial:this._equirectMaterial;const mesh=new Mesh(this._lodPlanes[0],material);const uniforms=material.uniforms;uniforms["envMap"].value=texture;const size=this._cubeSize;_setViewport(cubeUVRenderTarget,0,0,3*size,2*size);renderer.setRenderTarget(cubeUVRenderTarget);renderer.render(mesh,_flatCamera)}_applyPMREM(cubeUVRenderTarget){const renderer=this._renderer;const autoClear=renderer.autoClear;renderer.autoClear=false;for(let i=1;i<this._lodPlanes.length;i++){const sigma=Math.sqrt(this._sigmas[i]*this._sigmas[i]-this._sigmas[i-1]*this._sigmas[i-1]);const poleAxis=_axisDirections[(i-1)%_axisDirections.length];this._blur(cubeUVRenderTarget,i-1,i,sigma,poleAxis)}renderer.autoClear=autoClear}_blur(cubeUVRenderTarget,lodIn,lodOut,sigma,poleAxis){const pingPongRenderTarget=this._pingPongRenderTarget;this._halfBlur(cubeUVRenderTarget,pingPongRenderTarget,lodIn,lodOut,sigma,"latitudinal",poleAxis);this._halfBlur(pingPongRenderTarget,cubeUVRenderTarget,lodOut,lodOut,sigma,"longitudinal",poleAxis)}_halfBlur(targetIn,targetOut,lodIn,lodOut,sigmaRadians,direction,poleAxis){const renderer=this._renderer;const blurMaterial=this._blurMaterial;if(direction!=="latitudinal"&&direction!=="longitudinal"){console.error("blur direction must be either latitudinal or longitudinal!")}const STANDARD_DEVIATIONS=3;const blurMesh=new Mesh(this._lodPlanes[lodOut],blurMaterial);const blurUniforms=blurMaterial.uniforms;const pixels=this._sizeLods[lodIn]-1;const radiansPerPixel=isFinite(sigmaRadians)?Math.PI/(2*pixels):2*Math.PI/(2*MAX_SAMPLES-1);const sigmaPixels=sigmaRadians/radiansPerPixel;const samples=isFinite(sigmaRadians)?1+Math.floor(STANDARD_DEVIATIONS*sigmaPixels):MAX_SAMPLES;if(samples>MAX_SAMPLES){console.warn(`sigmaRadians, ${sigmaRadians}, is too large and will clip, as it requested ${samples} samples when the maximum is set to ${MAX_SAMPLES}`)}const weights=[];let sum=0;for(let i=0;i<MAX_SAMPLES;++i){const x=i/sigmaPixels;const weight=Math.exp(-x*x/2);weights.push(weight);if(i===0){sum+=weight}else if(i<samples){sum+=2*weight}}for(let i=0;i<weights.length;i++){weights[i]=weights[i]/sum}blurUniforms["envMap"].value=targetIn.texture;blurUniforms["samples"].value=samples;blurUniforms["weights"].value=weights;blurUniforms["latitudinal"].value=direction==="latitudinal";if(poleAxis){blurUniforms["poleAxis"].value=poleAxis}const{_lodMax}=this;blurUniforms["dTheta"].value=radiansPerPixel;blurUniforms["mipInt"].value=_lodMax-lodIn;const outputSize=this._sizeLods[lodOut];const x=3*outputSize*(lodOut>_lodMax-LOD_MIN?lodOut-_lodMax+LOD_MIN:0);const y=4*(this._cubeSize-outputSize);_setViewport(targetOut,x,y,3*outputSize,2*outputSize);renderer.setRenderTarget(targetOut);renderer.render(blurMesh,_flatCamera)}}function _createPlanes(lodMax){const lodPlanes=[];const sizeLods=[];const sigmas=[];let lod=lodMax;const totalLods=lodMax-LOD_MIN+1+EXTRA_LOD_SIGMA.length;for(let i=0;i<totalLods;i++){const sizeLod=Math.pow(2,lod);sizeLods.push(sizeLod);let sigma=1/sizeLod;if(i>lodMax-LOD_MIN){sigma=EXTRA_LOD_SIGMA[i-lodMax+LOD_MIN-1]}else if(i===0){sigma=0}sigmas.push(sigma);const texelSize=1/(sizeLod-2);const min=-texelSize;const max=1+texelSize;const uv1=[min,min,max,min,max,max,min,min,max,max,min,max];const cubeFaces=6;const vertices=6;const positionSize=3;const uvSize=2;const faceIndexSize=1;const position=new Float32Array(positionSize*vertices*cubeFaces);const uv=new Float32Array(uvSize*vertices*cubeFaces);const faceIndex=new Float32Array(faceIndexSize*vertices*cubeFaces);for(let face=0;face<cubeFaces;face++){const x=face%3*2/3-1;const y=face>2?0:-1;const coordinates=[x,y,0,x+2/3,y,0,x+2/3,y+1,0,x,y,0,x+2/3,y+1,0,x,y+1,0];position.set(coordinates,positionSize*vertices*face);uv.set(uv1,uvSize*vertices*face);const fill=[face,face,face,face,face,face];faceIndex.set(fill,faceIndexSize*vertices*face)}const planes=new BufferGeometry;planes.setAttribute("position",new BufferAttribute(position,positionSize));planes.setAttribute("uv",new BufferAttribute(uv,uvSize));planes.setAttribute("faceIndex",new BufferAttribute(faceIndex,faceIndexSize));lodPlanes.push(planes);if(lod>LOD_MIN){lod--}}return{lodPlanes,sizeLods,sigmas}}function _createRenderTarget(width,height,params){const cubeUVRenderTarget=new WebGLRenderTarget(width,height,params);cubeUVRenderTarget.texture.mapping=CubeUVReflectionMapping;cubeUVRenderTarget.texture.name="PMREM.cubeUv";cubeUVRenderTarget.scissorTest=true;return cubeUVRenderTarget}function _setViewport(target,x,y,width,height){target.viewport.set(x,y,width,height);target.scissor.set(x,y,width,height)}function _getBlurShader(lodMax,width,height){const weights=new Float32Array(MAX_SAMPLES);const poleAxis=new Vector3(0,1,0);const shaderMaterial=new ShaderMaterial({name:"SphericalGaussianBlur",defines:{"n":MAX_SAMPLES,"CUBEUV_TEXEL_WIDTH":1/width,"CUBEUV_TEXEL_HEIGHT":1/height,"CUBEUV_MAX_MIP":`${lodMax}.0`},uniforms:{"envMap":{value:null},"samples":{value:1},"weights":{value:weights},"latitudinal":{value:false},"dTheta":{value:0},"mipInt":{value:0},"poleAxis":{value:poleAxis}},vertexShader:_getCommonVertexShader(),fragmentShader:`

                precision mediump float;
                precision mediump int;

                varying vec3 vOutputDirection;

                uniform sampler2D envMap;
                uniform int samples;
                uniform float weights[ n ];
                uniform bool latitudinal;
                uniform float dTheta;
                uniform float mipInt;
                uniform vec3 poleAxis;

                #define ENVMAP_TYPE_CUBE_UV
                #include <cube_uv_reflection_fragment>

                vec3 getSample( float theta, vec3 axis ) {

                    float cosTheta = cos( theta );
                    // Rodrigues' axis-angle rotation
                    vec3 sampleDirection = vOutputDirection * cosTheta
                        + cross( axis, vOutputDirection ) * sin( theta )
                        + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );

                    return bilinearCubeUV( envMap, sampleDirection, mipInt );

                }

                void main() {

                    vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );

                    if ( all( equal( axis, vec3( 0.0 ) ) ) ) {

                        axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );

                    }

                    axis = normalize( axis );

                    gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );
                    gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );

                    for ( int i = 1; i < n; i++ ) {

                        if ( i >= samples ) {

                            break;

                        }

                        float theta = dTheta * float( i );
                        gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );
                        gl_FragColor.rgb += weights[ i ] * getSample( theta, axis );

                    }

                }
            `,blending:NoBlending,depthTest:false,depthWrite:false});return shaderMaterial}function _getEquirectMaterial(){return new ShaderMaterial({name:"EquirectangularToCubeUV",uniforms:{"envMap":{value:null}},vertexShader:_getCommonVertexShader(),fragmentShader:`

                precision mediump float;
                precision mediump int;

                varying vec3 vOutputDirection;

                uniform sampler2D envMap;

                #include <common>

                void main() {

                    vec3 outputDirection = normalize( vOutputDirection );
                    vec2 uv = equirectUv( outputDirection );

                    gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );

                }
            `,blending:NoBlending,depthTest:false,depthWrite:false})}function _getCubemapMaterial(){return new ShaderMaterial({name:"CubemapToCubeUV",uniforms:{"envMap":{value:null},"flipEnvMap":{value:-1}},vertexShader:_getCommonVertexShader(),fragmentShader:`

                precision mediump float;
                precision mediump int;

                uniform float flipEnvMap;

                varying vec3 vOutputDirection;

                uniform samplerCube envMap;

                void main() {

                    gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );

                }
            `,blending:NoBlending,depthTest:false,depthWrite:false})}function _getCommonVertexShader(){return`

            precision mediump float;
            precision mediump int;

            attribute float faceIndex;

            varying vec3 vOutputDirection;

            // RH coordinate system; PMREM face-indexing convention
            vec3 getDirection( vec2 uv, float face ) {

                uv = 2.0 * uv - 1.0;

                vec3 direction = vec3( uv, 1.0 );

                if ( face == 0.0 ) {

                    direction = direction.zyx; // ( 1, v, u ) pos x

                } else if ( face == 1.0 ) {

                    direction = direction.xzy;
                    direction.xz *= -1.0; // ( -u, 1, -v ) pos y

                } else if ( face == 2.0 ) {

                    direction.x *= -1.0; // ( -u, v, 1 ) pos z

                } else if ( face == 3.0 ) {

                    direction = direction.zyx;
                    direction.xz *= -1.0; // ( -1, v, -u ) neg x

                } else if ( face == 4.0 ) {

                    direction = direction.xzy;
                    direction.xy *= -1.0; // ( -u, -1, v ) neg y

                } else if ( face == 5.0 ) {

                    direction.z *= -1.0; // ( u, v, -1 ) neg z

                }

                return direction;

            }

            void main() {

                vOutputDirection = getDirection( uv, faceIndex );
                gl_Position = vec4( position, 1.0 );

            }
        `}THREE.PMREMGenerator=PMREMGenerator});(function(t,e){e(t,t.THREE=t.THREE||{})})(this,function(globalThis,THREE){const $5OpyM$Spherical=THREE.Spherical;const $5OpyM$Vector3=THREE.Vector3;const $5OpyM$MathUtils=THREE.MathUtils;const $5OpyM$Sphere=THREE.Sphere;const $5OpyM$Group=THREE.Group;const $5OpyM$PointsMaterial=THREE.PointsMaterial;const $5OpyM$MeshStandardMaterial=THREE.MeshStandardMaterial;const $5OpyM$Box3Helper=THREE.Box3Helper;const $5OpyM$Color=THREE.Color;const $5OpyM$Matrix4=THREE.Matrix4;const $5OpyM$LoadingManager=THREE.LoadingManager;const $5OpyM$Vector2=THREE.Vector2;const $5OpyM$Frustum=THREE.Frustum;const $5OpyM$DefaultLoadingManager=THREE.DefaultLoadingManager;const $5OpyM$BufferGeometry=THREE.BufferGeometry;const $5OpyM$BufferAttribute=THREE.BufferAttribute;const $5OpyM$Points=THREE.Points;const $5OpyM$Quaternion=THREE.Quaternion;const $5OpyM$InstancedMesh=THREE.InstancedMesh;const $5OpyM$Ray=THREE.Ray;const $5OpyM$Box3=THREE.Box3;const $5OpyM$LineBasicMaterial=THREE.LineBasicMaterial;const $5OpyM$LineSegments=THREE.LineSegments;const $5OpyM$BoxGeometry=THREE.BoxGeometry;const $5OpyM$EdgesGeometry=THREE.EdgesGeometry;const $5OpyM$Mesh=THREE.Mesh;const $5OpyM$Euler=THREE.Euler;const $5OpyM$GLTFLoader=THREE.GLTFLoader;var $parcel$global=typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:typeof window!=="undefined"?window:typeof global!=="undefined"?global:{};var $parcel$modules={};var $parcel$inits={};var parcelRequire=$parcel$global["parcelRequire5fa1"];if(parcelRequire==null){parcelRequire=function(id){if(id in $parcel$modules){return $parcel$modules[id].exports}if(id in $parcel$inits){var init=$parcel$inits[id];delete $parcel$inits[id];var module={id:id,exports:{}};$parcel$modules[id]=module;init.call(module.exports,module,module.exports);return module.exports}var err=new Error("Cannot find module '"+id+"'");err.code="MODULE_NOT_FOUND";throw err};parcelRequire.register=function register(id,init){$parcel$inits[id]=init};$parcel$global["parcelRequire5fa1"]=parcelRequire}parcelRequire.register("1hGdn",function(module,exports){"use strict";Object.defineProperty(module.exports,"__esModule",{value:true});module.exports.latitudeToSphericalPhi=$0ef81fee344e2f3b$var$latitudeToSphericalPhi;module.exports.sphericalPhiToLatitude=$0ef81fee344e2f3b$var$sphericalPhiToLatitude;module.exports.swapToGeoFrame=$0ef81fee344e2f3b$var$swapToGeoFrame;module.exports.swapToThreeFrame=$0ef81fee344e2f3b$var$swapToThreeFrame;module.exports.toLatLonString=$0ef81fee344e2f3b$var$toLatLonString;const $0ef81fee344e2f3b$var$_spherical=new $5OpyM$Spherical;const $0ef81fee344e2f3b$var$_vec=new $5OpyM$Vector3;const $0ef81fee344e2f3b$var$_geoResults={};function $0ef81fee344e2f3b$var$swapToGeoFrame(target){const{x:x,y:y,z:z}=target;target.x=z;target.y=x;target.z=y}function $0ef81fee344e2f3b$var$swapToThreeFrame(target){const{x:x,y:y,z:z}=target;target.z=x;target.x=y;target.y=z}function $0ef81fee344e2f3b$var$sphericalPhiToLatitude(phi){return-(phi-Math.PI/2)}function $0ef81fee344e2f3b$var$latitudeToSphericalPhi(latitude){return-latitude+Math.PI/2}function $0ef81fee344e2f3b$var$correctGeoCoordWrap(lat,lon,target={}){$0ef81fee344e2f3b$var$_spherical.theta=lon;$0ef81fee344e2f3b$var$_spherical.phi=$0ef81fee344e2f3b$var$latitudeToSphericalPhi(lat);$0ef81fee344e2f3b$var$_vec.setFromSpherical($0ef81fee344e2f3b$var$_spherical);$0ef81fee344e2f3b$var$_spherical.setFromVector3($0ef81fee344e2f3b$var$_vec);target.lat=$0ef81fee344e2f3b$var$sphericalPhiToLatitude($0ef81fee344e2f3b$var$_spherical.phi);target.lon=$0ef81fee344e2f3b$var$_spherical.theta;return target}function $0ef81fee344e2f3b$var$toHoursMinutesSecondsString(value,pos="E",neg="W"){const direction=value<0?neg:pos;value=Math.abs(value);const hours=~~value;const minDec=(value-hours)*60;const minutes=~~minDec;const secDec=(minDec-minutes)*60;const seconds=~~secDec;return`${hours}° ${minutes}' ${seconds}" ${direction}`}function $0ef81fee344e2f3b$var$toLatLonString(lat,lon,decimalFormat=false){const result=$0ef81fee344e2f3b$var$correctGeoCoordWrap(lat,lon,$0ef81fee344e2f3b$var$_geoResults);let latString,lonString;if(decimalFormat){latString=`${($5OpyM$MathUtils.RAD2DEG*result.lat).toFixed(4)}°`;lonString=`${($5OpyM$MathUtils.RAD2DEG*result.lon).toFixed(4)}°`}else{latString=$0ef81fee344e2f3b$var$toHoursMinutesSecondsString($5OpyM$MathUtils.RAD2DEG*result.lat,"N","S");lonString=$0ef81fee344e2f3b$var$toHoursMinutesSecondsString($5OpyM$MathUtils.RAD2DEG*result.lon,"E","W")}return`${latString} ${lonString}`}});var $cf838c15c8b009ba$exports={};"use strict";Object.defineProperty($cf838c15c8b009ba$exports,"__esModule",{value:true});var $cf838c15c8b009ba$var$_exportNames={DebugTilesRenderer:true,NONE:true,SCREEN_ERROR:true,GEOMETRIC_ERROR:true,DISTANCE:true,DEPTH:true,RELATIVE_DEPTH:true,IS_LEAF:true,RANDOM_COLOR:true,RANDOM_NODE_COLOR:true,CUSTOM_COLOR:true,TilesRenderer:true,B3DMLoader:true,PNTSLoader:true,I3DMLoader:true,CMPTLoader:true,GLTFCesiumRTCExtension:true,GLTFExtensionLoader:true,EllipsoidRegionHelper:true,EllipsoidRegionLineHelper:true,SphereHelper:true,Ellipsoid:true,EllipsoidRegion:true,GeoUtils:true,TilesRendererBase:true,LoaderBase:true,B3DMLoaderBase:true,I3DMLoaderBase:true,PNTSLoaderBase:true,CMPTLoaderBase:true,LRUCache:true,PriorityQueue:true};Object.defineProperty($cf838c15c8b009ba$exports,"B3DMLoader",{enumerable:true,get:function(){return $0aa3d1def57e98b1$exports.B3DMLoader}});Object.defineProperty($cf838c15c8b009ba$exports,"B3DMLoaderBase",{enumerable:true,get:function(){return $f5d9b5dde53306bf$exports.B3DMLoaderBase}});Object.defineProperty($cf838c15c8b009ba$exports,"CMPTLoader",{enumerable:true,get:function(){return $54879e9a7dc345e0$exports.CMPTLoader}});Object.defineProperty($cf838c15c8b009ba$exports,"CMPTLoaderBase",{enumerable:true,get:function(){return $cb66a16334732244$exports.CMPTLoaderBase}});Object.defineProperty($cf838c15c8b009ba$exports,"CUSTOM_COLOR",{enumerable:true,get:function(){return $1909f04f34bd6630$exports.CUSTOM_COLOR}});Object.defineProperty($cf838c15c8b009ba$exports,"DEPTH",{enumerable:true,get:function(){return $1909f04f34bd6630$exports.DEPTH}});Object.defineProperty($cf838c15c8b009ba$exports,"DISTANCE",{enumerable:true,get:function(){return $1909f04f34bd6630$exports.DISTANCE}});Object.defineProperty($cf838c15c8b009ba$exports,"DebugTilesRenderer",{enumerable:true,get:function(){return $1909f04f34bd6630$exports.DebugTilesRenderer}});Object.defineProperty($cf838c15c8b009ba$exports,"Ellipsoid",{enumerable:true,get:function(){return $9160f8f2e0578e98$exports.Ellipsoid}});Object.defineProperty($cf838c15c8b009ba$exports,"EllipsoidRegion",{enumerable:true,get:function(){return $aa7b3b269f245cbe$exports.EllipsoidRegion}});Object.defineProperty($cf838c15c8b009ba$exports,"EllipsoidRegionHelper",{enumerable:true,get:function(){return $3b9225051b507460$exports.EllipsoidRegionHelper}});Object.defineProperty($cf838c15c8b009ba$exports,"EllipsoidRegionLineHelper",{enumerable:true,get:function(){return $3b9225051b507460$exports.EllipsoidRegionLineHelper}});Object.defineProperty($cf838c15c8b009ba$exports,"GEOMETRIC_ERROR",{enumerable:true,get:function(){return $1909f04f34bd6630$exports.GEOMETRIC_ERROR}});Object.defineProperty($cf838c15c8b009ba$exports,"GLTFCesiumRTCExtension",{enumerable:true,get:function(){return $44c3bffa5e49f297$exports.GLTFCesiumRTCExtension}});Object.defineProperty($cf838c15c8b009ba$exports,"GLTFExtensionLoader",{enumerable:true,get:function(){return $29ced67d26e5c4e2$exports.GLTFExtensionLoader}});$cf838c15c8b009ba$exports.GeoUtils=void 0;Object.defineProperty($cf838c15c8b009ba$exports,"I3DMLoader",{enumerable:true,get:function(){return $0bc85483bdeca322$exports.I3DMLoader}});Object.defineProperty($cf838c15c8b009ba$exports,"I3DMLoaderBase",{enumerable:true,get:function(){return $bcb352fb74bed4a5$exports.I3DMLoaderBase}});Object.defineProperty($cf838c15c8b009ba$exports,"IS_LEAF",{enumerable:true,get:function(){return $1909f04f34bd6630$exports.IS_LEAF}});Object.defineProperty($cf838c15c8b009ba$exports,"LRUCache",{enumerable:true,get:function(){return $e0d7a242557dc8e6$exports.LRUCache}});Object.defineProperty($cf838c15c8b009ba$exports,"LoaderBase",{enumerable:true,get:function(){return $e6b785bba9ea128d$exports.LoaderBase}});Object.defineProperty($cf838c15c8b009ba$exports,"NONE",{enumerable:true,get:function(){return $1909f04f34bd6630$exports.NONE}});Object.defineProperty($cf838c15c8b009ba$exports,"PNTSLoader",{enumerable:true,get:function(){return $1ddd6ca16eb224df$exports.PNTSLoader}});Object.defineProperty($cf838c15c8b009ba$exports,"PNTSLoaderBase",{enumerable:true,get:function(){return $d408eda5a179398a$exports.PNTSLoaderBase}});Object.defineProperty($cf838c15c8b009ba$exports,"PriorityQueue",{enumerable:true,get:function(){return $096d2234d1235002$exports.PriorityQueue}});Object.defineProperty($cf838c15c8b009ba$exports,"RANDOM_COLOR",{enumerable:true,get:function(){return $1909f04f34bd6630$exports.RANDOM_COLOR}});Object.defineProperty($cf838c15c8b009ba$exports,"RANDOM_NODE_COLOR",{enumerable:true,get:function(){return $1909f04f34bd6630$exports.RANDOM_NODE_COLOR}});Object.defineProperty($cf838c15c8b009ba$exports,"RELATIVE_DEPTH",{enumerable:true,get:function(){return $1909f04f34bd6630$exports.RELATIVE_DEPTH}});Object.defineProperty($cf838c15c8b009ba$exports,"SCREEN_ERROR",{enumerable:true,get:function(){return $1909f04f34bd6630$exports.SCREEN_ERROR}});Object.defineProperty($cf838c15c8b009ba$exports,"SphereHelper",{enumerable:true,get:function(){return $1cb839fa4db014d3$exports.SphereHelper}});Object.defineProperty($cf838c15c8b009ba$exports,"TilesRenderer",{enumerable:true,get:function(){return $06d26e8e9f5361d3$exports.TilesRenderer}});Object.defineProperty($cf838c15c8b009ba$exports,"TilesRendererBase",{enumerable:true,get:function(){return $5a6f7a997885dc30$exports.TilesRendererBase}});var $1909f04f34bd6630$exports={};"use strict";Object.defineProperty($1909f04f34bd6630$exports,"__esModule",{value:true});$1909f04f34bd6630$exports.SCREEN_ERROR=$1909f04f34bd6630$exports.RELATIVE_DEPTH=$1909f04f34bd6630$exports.RANDOM_NODE_COLOR=$1909f04f34bd6630$exports.RANDOM_COLOR=$1909f04f34bd6630$exports.NONE=$1909f04f34bd6630$exports.IS_LEAF=$1909f04f34bd6630$exports.GEOMETRIC_ERROR=$1909f04f34bd6630$exports.DebugTilesRenderer=$1909f04f34bd6630$exports.DISTANCE=$1909f04f34bd6630$exports.DEPTH=$1909f04f34bd6630$exports.CUSTOM_COLOR=void 0;var $3a66585ec6f85053$exports={};"use strict";Object.defineProperty($3a66585ec6f85053$exports,"__esModule",{value:true});$3a66585ec6f85053$exports.getIndexedRandomColor=$3a66585ec6f85053$var$getIndexedRandomColor;const $3a66585ec6f85053$var$colors={};function $3a66585ec6f85053$var$getIndexedRandomColor(index){if(!$3a66585ec6f85053$var$colors[index]){const h=Math.random();const s=0.5+Math.random()*0.5;const l=0.375+Math.random()*0.25;$3a66585ec6f85053$var$colors[index]=new $5OpyM$Color().setHSL(h,s,l)}return $3a66585ec6f85053$var$colors[index]}var $06d26e8e9f5361d3$exports={};"use strict";Object.defineProperty($06d26e8e9f5361d3$exports,"__esModule",{value:true});$06d26e8e9f5361d3$exports.TilesRenderer=void 0;var $5a6f7a997885dc30$exports={};"use strict";Object.defineProperty($5a6f7a997885dc30$exports,"__esModule",{value:true});$5a6f7a997885dc30$exports.TilesRendererBase=void 0;var $7ff9fb142d83939f$exports={};"use strict";Object.defineProperty($7ff9fb142d83939f$exports,"__esModule",{value:true});$7ff9fb142d83939f$exports.getUrlExtension=$7ff9fb142d83939f$var$getUrlExtension;function $7ff9fb142d83939f$var$getUrlExtension(url){let parsedUrl;try{parsedUrl=new URL(url,"http://fakehost.com/")}catch(_){return null}const filename=parsedUrl.pathname.split("/").pop();const dotIndex=filename.lastIndexOf(".");if(dotIndex===-1||dotIndex===filename.length-1)return null;const extension=filename.substring(dotIndex+1);return extension}var $e0d7a242557dc8e6$exports={};"use strict";Object.defineProperty($e0d7a242557dc8e6$exports,"__esModule",{value:true});$e0d7a242557dc8e6$exports.LRUCache=void 0;function $e0d7a242557dc8e6$var$enqueueMicrotask(callback){Promise.resolve().then(callback)}class $e0d7a242557dc8e6$var$LRUCache{constructor(){this.maxSize=800;this.minSize=600;this.unloadPercent=0.05;this.itemSet=new Map;this.itemList=[];this.usedSet=new Set;this.callbacks=new Map;this.unloadPriorityCallback=null;const itemSet=this.itemSet;this.defaultPriorityCallback=item=>itemSet.get(item)}isFull(){return this.itemSet.size>=this.maxSize}add(item,removeCb){const itemSet=this.itemSet;if(itemSet.has(item))return false;if(this.isFull())return false;const usedSet=this.usedSet;const itemList=this.itemList;const callbacks=this.callbacks;itemList.push(item);usedSet.add(item);itemSet.set(item,Date.now());callbacks.set(item,removeCb);return true}remove(item){const usedSet=this.usedSet;const itemSet=this.itemSet;const itemList=this.itemList;const callbacks=this.callbacks;if(itemSet.has(item)){callbacks.get(item)(item);const index=itemList.indexOf(item);itemList.splice(index,1);usedSet.delete(item);itemSet.delete(item);callbacks.delete(item);return true}return false}markUsed(item){const itemSet=this.itemSet;const usedSet=this.usedSet;if(itemSet.has(item)&&!usedSet.has(item)){itemSet.set(item,Date.now());usedSet.add(item)}}markAllUnused(){this.usedSet.clear()}unloadUnusedContent(){const unloadPercent=this.unloadPercent;const targetSize=this.minSize;const itemList=this.itemList;const itemSet=this.itemSet;const usedSet=this.usedSet;const callbacks=this.callbacks;const unused=itemList.length-usedSet.size;const excess=itemList.length-targetSize;const unloadPriorityCallback=this.unloadPriorityCallback||this.defaultPriorityCallback;if(excess>0&&unused>0){itemList.sort((a,b)=>{const usedA=usedSet.has(a);const usedB=usedSet.has(b);if(usedA&&usedB)return 0;else if(!usedA&&!usedB)return unloadPriorityCallback(b)-unloadPriorityCallback(a);else return usedA?1:-1});const unusedExcess=Math.min(excess,unused);const maxUnload=Math.max(targetSize*unloadPercent,unusedExcess*unloadPercent);let nodesToUnload=Math.min(maxUnload,unused);nodesToUnload=Math.ceil(nodesToUnload);const removedItems=itemList.splice(0,nodesToUnload);for(let i=0,l=removedItems.length;i<l;i++){const item=removedItems[i];callbacks.get(item)(item);itemSet.delete(item);callbacks.delete(item)}}}scheduleUnload(markAllUnused=true){if(!this.scheduled){this.scheduled=true;$e0d7a242557dc8e6$var$enqueueMicrotask(()=>{this.scheduled=false;this.unloadUnusedContent();if(markAllUnused)this.markAllUnused()})}}}$e0d7a242557dc8e6$exports.LRUCache=$e0d7a242557dc8e6$var$LRUCache;var $096d2234d1235002$exports={};"use strict";Object.defineProperty($096d2234d1235002$exports,"__esModule",{value:true});$096d2234d1235002$exports.PriorityQueue=void 0;class $096d2234d1235002$var$PriorityQueue{constructor(){this.maxJobs=6;this.items=[];this.callbacks=new Map;this.currJobs=0;this.scheduled=false;this.autoUpdate=true;this.priorityCallback=()=>{throw new Error("PriorityQueue: PriorityCallback function not defined.")};this.schedulingCallback=func=>{requestAnimationFrame(func)};this._runjobs=()=>{this.tryRunJobs();this.scheduled=false}}sort(){const priorityCallback=this.priorityCallback;const items=this.items;items.sort(priorityCallback)}add(item,callback){return new Promise((resolve,reject)=>{const prCallback=(...args)=>callback(...args).then(resolve).catch(reject);const items=this.items;const callbacks=this.callbacks;items.push(item);callbacks.set(item,prCallback);if(this.autoUpdate)this.scheduleJobRun()})}remove(item){const items=this.items;const callbacks=this.callbacks;const index=items.indexOf(item);if(index!==-1){items.splice(index,1);callbacks.delete(item)}}tryRunJobs(){this.sort();const items=this.items;const callbacks=this.callbacks;const maxJobs=this.maxJobs;let currJobs=this.currJobs;while(maxJobs>currJobs&&items.length>0){currJobs++;const item=items.pop();const callback=callbacks.get(item);callbacks.delete(item);callback(item).then(()=>{this.currJobs--;if(this.autoUpdate)this.scheduleJobRun()}).catch(()=>{this.currJobs--;if(this.autoUpdate)this.scheduleJobRun()})}this.currJobs=currJobs}scheduleJobRun(){if(!this.scheduled){this.schedulingCallback(this._runjobs);this.scheduled=true}}}$096d2234d1235002$exports.PriorityQueue=$096d2234d1235002$var$PriorityQueue;var $cd531a5f1c18e9cc$exports={};"use strict";Object.defineProperty($cd531a5f1c18e9cc$exports,"__esModule",{value:true});$cd531a5f1c18e9cc$exports.determineFrustumSet=$cd531a5f1c18e9cc$var$determineFrustumSet;$cd531a5f1c18e9cc$exports.markUsedSetLeaves=$cd531a5f1c18e9cc$var$markUsedSetLeaves;$cd531a5f1c18e9cc$exports.skipTraversal=$cd531a5f1c18e9cc$var$skipTraversal;$cd531a5f1c18e9cc$exports.toggleTiles=$cd531a5f1c18e9cc$var$toggleTiles;$cd531a5f1c18e9cc$exports.traverseSet=$cd531a5f1c18e9cc$var$traverseSet;var $002d29a772485791$exports={};"use strict";Object.defineProperty($002d29a772485791$exports,"__esModule",{value:true});$002d29a772485791$exports.WGS84_RADIUS=$002d29a772485791$exports.WGS84_HEIGHT=$002d29a772485791$exports.WGS84_FLATTENING=$002d29a772485791$exports.UNLOADED=$002d29a772485791$exports.PARSING=$002d29a772485791$exports.LOADING=$002d29a772485791$exports.LOADED=$002d29a772485791$exports.FAILED=void 0;const $002d29a772485791$var$UNLOADED=0;$002d29a772485791$exports.UNLOADED=$002d29a772485791$var$UNLOADED;const $002d29a772485791$var$LOADING=1;$002d29a772485791$exports.LOADING=$002d29a772485791$var$LOADING;const $002d29a772485791$var$PARSING=2;$002d29a772485791$exports.PARSING=$002d29a772485791$var$PARSING;const $002d29a772485791$var$LOADED=3;$002d29a772485791$exports.LOADED=$002d29a772485791$var$LOADED;const $002d29a772485791$var$FAILED=4;$002d29a772485791$exports.FAILED=$002d29a772485791$var$FAILED;const $002d29a772485791$var$WGS84_RADIUS=6378137;$002d29a772485791$exports.WGS84_RADIUS=$002d29a772485791$var$WGS84_RADIUS;const $002d29a772485791$var$WGS84_FLATTENING=1/298.257223563;$002d29a772485791$exports.WGS84_FLATTENING=$002d29a772485791$var$WGS84_FLATTENING;const $002d29a772485791$var$WGS84_HEIGHT=-($002d29a772485791$var$WGS84_FLATTENING*$002d29a772485791$var$WGS84_RADIUS-$002d29a772485791$var$WGS84_RADIUS);$002d29a772485791$exports.WGS84_HEIGHT=$002d29a772485791$var$WGS84_HEIGHT;function $cd531a5f1c18e9cc$var$isDownloadFinished(value){return value===$002d29a772485791$exports.LOADED||value===$002d29a772485791$exports.FAILED}function $cd531a5f1c18e9cc$var$isUsedThisFrame(tile,frameCount){return tile.__lastFrameVisited===frameCount&&tile.__used}function $cd531a5f1c18e9cc$var$resetFrameState(tile,frameCount){if(tile.__lastFrameVisited!==frameCount){tile.__lastFrameVisited=frameCount;tile.__used=false;tile.__inFrustum=false;tile.__isLeaf=false;tile.__visible=false;tile.__active=false;tile.__error=Infinity;tile.__distanceFromCamera=Infinity;tile.__childrenWereVisible=false;tile.__allChildrenLoaded=false}}function $cd531a5f1c18e9cc$var$recursivelyMarkUsed(tile,frameCount,lruCache,renderer){renderer.ensureChildrenArePreprocessed(tile);$cd531a5f1c18e9cc$var$resetFrameState(tile,frameCount);tile.__used=true;lruCache.markUsed(tile);if(tile.__contentEmpty){const children=tile.children;for(let i=0,l=children.length;i<l;i++)$cd531a5f1c18e9cc$var$recursivelyMarkUsed(children[i],frameCount,lruCache,renderer)}}function $cd531a5f1c18e9cc$var$recursivelyLoadTiles(tile,depthFromRenderedParent,renderer){renderer.ensureChildrenArePreprocessed(tile);const doTraverse=tile.__contentEmpty&&(!tile.__externalTileSet||$cd531a5f1c18e9cc$var$isDownloadFinished(tile.__loadingState));if(doTraverse){const children=tile.children;for(let i=0,l=children.length;i<l;i++){const child=children[i];child.__depthFromRenderedParent=depthFromRenderedParent;$cd531a5f1c18e9cc$var$recursivelyLoadTiles(child,depthFromRenderedParent,renderer)}}else renderer.requestTileContents(tile)}function $cd531a5f1c18e9cc$var$traverseSet(tile,beforeCb=null,afterCb=null,parent=null,depth=0){if(beforeCb&&beforeCb(tile,parent,depth)){if(afterCb)afterCb(tile,parent,depth);return}const children=tile.children;for(let i=0,l=children.length;i<l;i++)$cd531a5f1c18e9cc$var$traverseSet(children[i],beforeCb,afterCb,tile,depth+1);if(afterCb)afterCb(tile,parent,depth)}function $cd531a5f1c18e9cc$var$determineFrustumSet(tile,renderer){renderer.ensureChildrenArePreprocessed(tile);const stats=renderer.stats;const frameCount=renderer.frameCount;const errorTarget=renderer.errorTarget;const maxDepth=renderer.maxDepth;const loadSiblings=renderer.loadSiblings;const lruCache=renderer.lruCache;const stopAtEmptyTiles=renderer.stopAtEmptyTiles;$cd531a5f1c18e9cc$var$resetFrameState(tile,frameCount);const inFrustum=renderer.tileInView(tile);if(inFrustum===false)return false;tile.__used=true;lruCache.markUsed(tile);tile.__inFrustum=true;stats.inFrustum++;if((stopAtEmptyTiles||!tile.__contentEmpty)&&!tile.__externalTileSet){renderer.calculateError(tile);const error=tile.__error;if(error<=errorTarget)return true;if(renderer.maxDepth>0&&tile.__depth+1>=maxDepth)return true}let anyChildrenUsed=false;const children=tile.children;for(let i=0,l=children.length;i<l;i++){const c=children[i];const r=$cd531a5f1c18e9cc$var$determineFrustumSet(c,renderer);anyChildrenUsed=anyChildrenUsed||r}if(anyChildrenUsed&&loadSiblings)for(let i=0,l=children.length;i<l;i++){const c=children[i];$cd531a5f1c18e9cc$var$recursivelyMarkUsed(c,frameCount,lruCache,renderer)}return true}function $cd531a5f1c18e9cc$var$markUsedSetLeaves(tile,renderer){const stats=renderer.stats;const frameCount=renderer.frameCount;if(!$cd531a5f1c18e9cc$var$isUsedThisFrame(tile,frameCount))return;stats.used++;const children=tile.children;let anyChildrenUsed=false;for(let i=0,l=children.length;i<l;i++){const c=children[i];anyChildrenUsed=anyChildrenUsed||$cd531a5f1c18e9cc$var$isUsedThisFrame(c,frameCount)}if(!anyChildrenUsed)tile.__isLeaf=true;else{let childrenWereVisible=false;let allChildrenLoaded=true;for(let i=0,l=children.length;i<l;i++){const c=children[i];$cd531a5f1c18e9cc$var$markUsedSetLeaves(c,renderer);childrenWereVisible=childrenWereVisible||c.__wasSetVisible||c.__childrenWereVisible;if($cd531a5f1c18e9cc$var$isUsedThisFrame(c,frameCount)){const childLoaded=c.__allChildrenLoaded||!c.__contentEmpty&&$cd531a5f1c18e9cc$var$isDownloadFinished(c.__loadingState)||c.__externalTileSet&&c.__loadingState===$002d29a772485791$exports.FAILED;allChildrenLoaded=allChildrenLoaded&&childLoaded}}tile.__childrenWereVisible=childrenWereVisible;tile.__allChildrenLoaded=allChildrenLoaded}}function $cd531a5f1c18e9cc$var$skipTraversal(tile,renderer){const stats=renderer.stats;const frameCount=renderer.frameCount;if(!$cd531a5f1c18e9cc$var$isUsedThisFrame(tile,frameCount))return;const parent=tile.parent;const parentDepthToParent=parent?parent.__depthFromRenderedParent:-1;tile.__depthFromRenderedParent=parentDepthToParent;const lruCache=renderer.lruCache;if(tile.__isLeaf){tile.__depthFromRenderedParent++;if(tile.__loadingState===$002d29a772485791$exports.LOADED){if(tile.__inFrustum){tile.__visible=true;stats.visible++}tile.__active=true;stats.active++}else if(!lruCache.isFull()&&(!tile.__contentEmpty||tile.__externalTileSet))renderer.requestTileContents(tile);return}const errorRequirement=(renderer.errorTarget+1)*renderer.errorThreshold;const meetsSSE=tile.__error<=errorRequirement;const includeTile=meetsSSE||tile.refine==="ADD";const hasModel=!tile.__contentEmpty;const hasContent=hasModel||tile.__externalTileSet;const loadedContent=$cd531a5f1c18e9cc$var$isDownloadFinished(tile.__loadingState)&&hasContent;const childrenWereVisible=tile.__childrenWereVisible;const children=tile.children;const allChildrenHaveContent=tile.__allChildrenLoaded;if(includeTile&&hasModel)tile.__depthFromRenderedParent++;if(includeTile&&!loadedContent&&!lruCache.isFull()&&hasContent)renderer.requestTileContents(tile);if(meetsSSE&&!allChildrenHaveContent&&!childrenWereVisible&&loadedContent||tile.refine==="ADD"&&loadedContent){if(tile.__inFrustum){tile.__visible=true;stats.visible++}tile.__active=true;stats.active++}if(tile.refine!=="ADD"&&meetsSSE&&!allChildrenHaveContent&&loadedContent)for(let i=0,l=children.length;i<l;i++){const c=children[i];if($cd531a5f1c18e9cc$var$isUsedThisFrame(c,frameCount)&&!lruCache.isFull()){c.__depthFromRenderedParent=tile.__depthFromRenderedParent+1;$cd531a5f1c18e9cc$var$recursivelyLoadTiles(c,c.__depthFromRenderedParent,renderer)}}else for(let i=0,l=children.length;i<l;i++){const c=children[i];if($cd531a5f1c18e9cc$var$isUsedThisFrame(c,frameCount))$cd531a5f1c18e9cc$var$skipTraversal(c,renderer)}}function $cd531a5f1c18e9cc$var$toggleTiles(tile,renderer){const frameCount=renderer.frameCount;const isUsed=$cd531a5f1c18e9cc$var$isUsedThisFrame(tile,frameCount);if(isUsed||tile.__usedLastFrame){let setActive=false;let setVisible=false;if(isUsed){setActive=tile.__active;if(renderer.displayActiveTiles)setVisible=tile.__active||tile.__visible;else setVisible=tile.__visible}if(!tile.__contentEmpty&&tile.__loadingState===$002d29a772485791$exports.LOADED){if(tile.__wasSetActive!==setActive)renderer.setTileActive(tile,setActive);if(tile.__wasSetVisible!==setVisible)renderer.setTileVisible(tile,setVisible)}tile.__wasSetActive=setActive;tile.__wasSetVisible=setVisible;tile.__usedLastFrame=isUsed;const children=tile.children;for(let i=0,l=children.length;i<l;i++){const c=children[i];$cd531a5f1c18e9cc$var$toggleTiles(c,renderer)}}}const $5a6f7a997885dc30$var$priorityCallback=(a,b)=>{if(a.__depth!==b.__depth)return a.__depth>b.__depth?-1:1;else if(a.__inFrustum!==b.__inFrustum)return a.__inFrustum?1:-1;else if(a.__used!==b.__used)return a.__used?1:-1;else if(a.__error!==b.__error)return a.__error>b.__error?1:-1;else if(a.__distanceFromCamera!==b.__distanceFromCamera)return a.__distanceFromCamera>b.__distanceFromCamera?-1:1;return 0};const $5a6f7a997885dc30$var$lruPriorityCallback=tile=>1/(tile.__depthFromRenderedParent+1);class $5a6f7a997885dc30$var$TilesRendererBase{get rootTileSet(){const tileSet=this.tileSets[this.rootURL];if(!tileSet||tileSet instanceof Promise)return null;else return tileSet}get root(){const tileSet=this.rootTileSet;return tileSet?tileSet.root:null}constructor(url){this.tileSets={};this.rootURL=url;this.fetchOptions={};this.preprocessURL=null;const lruCache=new $e0d7a242557dc8e6$exports.LRUCache;lruCache.unloadPriorityCallback=$5a6f7a997885dc30$var$lruPriorityCallback;const downloadQueue=new $096d2234d1235002$exports.PriorityQueue;downloadQueue.maxJobs=4;downloadQueue.priorityCallback=$5a6f7a997885dc30$var$priorityCallback;const parseQueue=new $096d2234d1235002$exports.PriorityQueue;parseQueue.maxJobs=1;parseQueue.priorityCallback=$5a6f7a997885dc30$var$priorityCallback;this.lruCache=lruCache;this.downloadQueue=downloadQueue;this.parseQueue=parseQueue;this.stats={parsing:0,downloading:0,failed:0,inFrustum:0,used:0,active:0,visible:0};this.frameCount=0;this.errorTarget=6;this.errorThreshold=Infinity;this.loadSiblings=true;this.displayActiveTiles=false;this.maxDepth=Infinity;this.stopAtEmptyTiles=true}traverse(beforecb,aftercb){const tileSets=this.tileSets;const rootTileSet=tileSets[this.rootURL];if(!rootTileSet||!rootTileSet.root)return;(0,$cd531a5f1c18e9cc$exports.traverseSet)(rootTileSet.root,(tile,...args)=>{this.ensureChildrenArePreprocessed(tile);return beforecb?beforecb(tile,...args):false},aftercb)}update(){const stats=this.stats;const lruCache=this.lruCache;const tileSets=this.tileSets;const rootTileSet=tileSets[this.rootURL];if(!(this.rootURL in tileSets)){this.loadRootTileSet(this.rootURL);return}else if(!rootTileSet||!rootTileSet.root)return;const root=rootTileSet.root;stats.inFrustum=0,stats.used=0,stats.active=0,stats.visible=0,this.frameCount++;(0,$cd531a5f1c18e9cc$exports.determineFrustumSet)(root,this);(0,$cd531a5f1c18e9cc$exports.markUsedSetLeaves)(root,this);(0,$cd531a5f1c18e9cc$exports.skipTraversal)(root,this);(0,$cd531a5f1c18e9cc$exports.toggleTiles)(root,this);lruCache.scheduleUnload()}parseTile(buffer,tile,extension){return null}disposeTile(tile){}preprocessNode(tile,tileSetDir,parentTile=null){if(tile.content){if(!("uri"in tile.content)&&"url"in tile.content){tile.content.uri=tile.content.url;delete tile.content.url}if(tile.content.uri)tile.content.uri=new URL(tile.content.uri,tileSetDir+"/").toString();if(tile.content.boundingVolume&&!("box"in tile.content.boundingVolume||"sphere"in tile.content.boundingVolume||"region"in tile.content.boundingVolume))delete tile.content.boundingVolume}tile.parent=parentTile;tile.children=tile.children||[];const uri=tile.content&&tile.content.uri;if(uri){const extension=(0,$7ff9fb142d83939f$exports.getUrlExtension)(tile.content.uri);const isExternalTileSet=Boolean(extension&&extension.toLowerCase()==="json");tile.__externalTileSet=isExternalTileSet;tile.__contentEmpty=isExternalTileSet}else{tile.__externalTileSet=false;tile.__contentEmpty=true}tile.__distanceFromCamera=Infinity;tile.__error=Infinity;tile.__inFrustum=false;tile.__isLeaf=false;tile.__usedLastFrame=false;tile.__used=false;tile.__wasSetVisible=false;tile.__visible=false;tile.__childrenWereVisible=false;tile.__allChildrenLoaded=false;tile.__wasSetActive=false;tile.__active=false;tile.__loadingState=$002d29a772485791$exports.UNLOADED;tile.__loadIndex=0;tile.__loadAbort=null;tile.__depthFromRenderedParent=-1;if(parentTile===null){tile.__depth=0;tile.refine=tile.refine||"REPLACE"}else{tile.__depth=parentTile.__depth+1;tile.refine=tile.refine||parentTile.refine}tile.__basePath=tileSetDir}setTileActive(tile,state){}setTileVisible(tile,state){}calculateError(tile){return 0}tileInView(tile){return true}ensureChildrenArePreprocessed(tile){const children=tile.children;for(let i=0,l=children.length;i<l;i++){const child=children[i];if("__depth"in child)break;this.preprocessNode(child,tile.__basePath,tile)}}resetFailedTiles(){const stats=this.stats;if(stats.failed===0)return;this.traverse(tile=>{if(tile.__loadingState===$002d29a772485791$exports.FAILED)tile.__loadingState=$002d29a772485791$exports.UNLOADED});stats.failed=0}fetchTileSet(url,fetchOptions,parent=null){return fetch(url,fetchOptions).then(res=>{if(res.ok)return res.json();else throw new Error(`TilesRenderer: Failed to load tileset "${url}" with status ${res.status} : ${res.statusText}`)}).then(json=>{const version=json.asset.version;console.assert(version==="1.0"||version==="0.0","asset.version is expected to be a string of \"1.0\" or \"0.0\"");let basePath=url.replace(/\/[^\/]*\/?$/,"");basePath=new URL(basePath,window.location.href).toString();this.preprocessNode(json.root,basePath,parent);return json})}loadRootTileSet(url){const tileSets=this.tileSets;if(!(url in tileSets)){const pr=this.fetchTileSet(this.preprocessURL?this.preprocessURL(url):url,this.fetchOptions).then(json=>{tileSets[url]=json});pr.catch(err=>{console.error(err);tileSets[url]=err});tileSets[url]=pr;return pr}else if(tileSets[url]instanceof Error)return Promise.reject(tileSets[url]);else return Promise.resolve(tileSets[url])}requestTileContents(tile){if(tile.__loadingState!==$002d29a772485791$exports.UNLOADED)return;const stats=this.stats;const lruCache=this.lruCache;const downloadQueue=this.downloadQueue;const parseQueue=this.parseQueue;const isExternalTileSet=tile.__externalTileSet;lruCache.add(tile,t=>{if(t.__loadingState===$002d29a772485791$exports.LOADING){t.__loadAbort.abort();t.__loadAbort=null}else if(isExternalTileSet)t.children.length=0;else this.disposeTile(t);if(t.__loadingState===$002d29a772485791$exports.LOADING)stats.downloading--;else if(t.__loadingState===$002d29a772485791$exports.PARSING)stats.parsing--;t.__loadingState=$002d29a772485791$exports.UNLOADED;t.__loadIndex++;parseQueue.remove(t);downloadQueue.remove(t)});tile.__loadIndex++;const loadIndex=tile.__loadIndex;const controller=new AbortController;const signal=controller.signal;stats.downloading++;tile.__loadAbort=controller;tile.__loadingState=$002d29a772485791$exports.LOADING;const errorCallback=e=>{if(tile.__loadIndex!==loadIndex)return;if(e.name!=="AbortError"){parseQueue.remove(tile);downloadQueue.remove(tile);if(tile.__loadingState===$002d29a772485791$exports.PARSING)stats.parsing--;else if(tile.__loadingState===$002d29a772485791$exports.LOADING)stats.downloading--;stats.failed++;console.error(`TilesRenderer : Failed to load tile at url "${tile.content.uri}".`);console.error(e);tile.__loadingState=$002d29a772485791$exports.FAILED}else lruCache.remove(tile)};if(isExternalTileSet)downloadQueue.add(tile,tileCb=>{if(tileCb.__loadIndex!==loadIndex)return Promise.resolve();const uri=this.preprocessURL?this.preprocessURL(tileCb.content.uri):tileCb.content.uri;return this.fetchTileSet(uri,Object.assign({signal:signal},this.fetchOptions),tileCb)}).then(json=>{if(tile.__loadIndex!==loadIndex)return;stats.downloading--;tile.__loadAbort=null;tile.__loadingState=$002d29a772485791$exports.LOADED;tile.children.push(json.root)}).catch(errorCallback);else downloadQueue.add(tile,downloadTile=>{if(downloadTile.__loadIndex!==loadIndex)return Promise.resolve();const uri=this.preprocessURL?this.preprocessURL(downloadTile.content.uri):downloadTile.content.uri;return fetch(uri,Object.assign({signal:signal},this.fetchOptions))}).then(res=>{if(tile.__loadIndex!==loadIndex)return;if(res.ok)return res.arrayBuffer();else throw new Error(`Failed to load model with error code ${res.status}`)}).then(buffer=>{if(tile.__loadIndex!==loadIndex)return;stats.downloading--;stats.parsing++;tile.__loadAbort=null;tile.__loadingState=$002d29a772485791$exports.PARSING;return parseQueue.add(tile,parseTile=>{if(parseTile.__loadIndex!==loadIndex)return Promise.resolve();const uri=parseTile.content.uri;const extension=(0,$7ff9fb142d83939f$exports.getUrlExtension)(uri);return this.parseTile(buffer,parseTile,extension)})}).then(()=>{if(tile.__loadIndex!==loadIndex)return;stats.parsing--;tile.__loadingState=$002d29a772485791$exports.LOADED;if(tile.__wasSetVisible)this.setTileVisible(tile,true);if(tile.__wasSetActive)this.setTileActive(tile,true)}).catch(errorCallback)}dispose(){const lruCache=this.lruCache;const toRemove=[];this.traverse(t=>{toRemove.push(t);return false});for(let i=0,l=toRemove.length;i<l;i++)lruCache.remove(toRemove[i]);this.stats={parsing:0,downloading:0,failed:0,inFrustum:0,used:0,active:0,visible:0};this.frameCount=0}}$5a6f7a997885dc30$exports.TilesRendererBase=$5a6f7a997885dc30$var$TilesRendererBase;var $0aa3d1def57e98b1$exports={};"use strict";Object.defineProperty($0aa3d1def57e98b1$exports,"__esModule",{value:true});$0aa3d1def57e98b1$exports.B3DMLoader=void 0;var $f5d9b5dde53306bf$exports={};"use strict";Object.defineProperty($f5d9b5dde53306bf$exports,"__esModule",{value:true});$f5d9b5dde53306bf$exports.B3DMLoaderBase=void 0;var $5bfd2e53a5ab8bef$exports={};"use strict";Object.defineProperty($5bfd2e53a5ab8bef$exports,"__esModule",{value:true});$5bfd2e53a5ab8bef$exports.FeatureTable=$5bfd2e53a5ab8bef$exports.BatchTable=void 0;var $5d480c6739d4b949$exports={};"use strict";Object.defineProperty($5d480c6739d4b949$exports,"__esModule",{value:true});$5d480c6739d4b949$exports.arrayToString=$5d480c6739d4b949$var$arrayToString;function $5d480c6739d4b949$var$arrayToString(array){const utf8decoder=new TextDecoder;return utf8decoder.decode(array)}class $5bfd2e53a5ab8bef$var$FeatureTable{constructor(buffer,start,headerLength,binLength){this.buffer=buffer;this.binOffset=start+headerLength;this.binLength=binLength;let header=null;if(headerLength!==0){const headerData=new Uint8Array(buffer,start,headerLength);header=JSON.parse((0,$5d480c6739d4b949$exports.arrayToString)(headerData))}else header={};this.header=header}getKeys(){return Object.keys(this.header)}getData(key,count,defaultComponentType=null,defaultType=null){const header=this.header;if(!(key in header))return null;const feature=header[key];if(!(feature instanceof Object))return feature;else if(Array.isArray(feature))return feature;else{const{buffer:buffer,binOffset:binOffset,binLength:binLength}=this;const byteOffset=feature.byteOffset||0;const featureType=feature.type||defaultType;const featureComponentType=feature.componentType||defaultComponentType;if("type"in feature&&defaultType&&feature.type!==defaultType)throw new Error("FeatureTable: Specified type does not match expected type.");let stride;switch(featureType){case"SCALAR":stride=1;break;case"VEC2":stride=2;break;case"VEC3":stride=3;break;case"VEC4":stride=4;break;default:throw new Error(`FeatureTable : Feature type not provided for "${key}".`);}let data;const arrayStart=binOffset+byteOffset;const arrayLength=count*stride;switch(featureComponentType){case"BYTE":data=new Int8Array(buffer,arrayStart,arrayLength);break;case"UNSIGNED_BYTE":data=new Uint8Array(buffer,arrayStart,arrayLength);break;case"SHORT":data=new Int16Array(buffer,arrayStart,arrayLength);break;case"UNSIGNED_SHORT":data=new Uint16Array(buffer,arrayStart,arrayLength);break;case"INT":data=new Int32Array(buffer,arrayStart,arrayLength);break;case"UNSIGNED_INT":data=new Uint32Array(buffer,arrayStart,arrayLength);break;case"FLOAT":data=new Float32Array(buffer,arrayStart,arrayLength);break;case"DOUBLE":data=new Float64Array(buffer,arrayStart,arrayLength);break;default:throw new Error(`FeatureTable : Feature component type not provided for "${key}".`);}const dataEnd=arrayStart+arrayLength*data.BYTES_PER_ELEMENT;if(dataEnd>binOffset+binLength)throw new Error("FeatureTable: Feature data read outside binary body length.");return data}}getBuffer(byteOffset,byteLength){const{buffer:buffer,binOffset:binOffset}=this;return buffer.slice(binOffset+byteOffset,binOffset+byteOffset+byteLength)}}$5bfd2e53a5ab8bef$exports.FeatureTable=$5bfd2e53a5ab8bef$var$FeatureTable;class $5bfd2e53a5ab8bef$var$BatchTable extends $5bfd2e53a5ab8bef$var$FeatureTable{constructor(buffer,batchSize,start,headerLength,binLength){super(buffer,start,headerLength,binLength);this.batchSize=batchSize}getData(key,componentType=null,type=null){return super.getData(key,this.batchSize,componentType,type)}}$5bfd2e53a5ab8bef$exports.BatchTable=$5bfd2e53a5ab8bef$var$BatchTable;var $e6b785bba9ea128d$exports={};"use strict";Object.defineProperty($e6b785bba9ea128d$exports,"__esModule",{value:true});$e6b785bba9ea128d$exports.LoaderBase=void 0;class $e6b785bba9ea128d$var$LoaderBase{constructor(){this.fetchOptions={};this.workingPath=""}load(url){return fetch(url,this.fetchOptions).then(res=>{if(!res.ok)throw new Error(`Failed to load file "${url}" with status ${res.status} : ${res.statusText}`);return res.arrayBuffer()}).then(buffer=>{if(this.workingPath==="")this.workingPath=this.workingPathForURL(url);return this.parse(buffer)})}resolveExternalURL(url){if(/^[^\\/]/.test(url))return this.workingPath+"/"+url;else return url}workingPathForURL(url){const splits=url.split(/[\\/]/g);splits.pop();const workingPath=splits.join("/");return workingPath+"/"}parse(buffer){throw new Error("LoaderBase: Parse not implemented.")}}$e6b785bba9ea128d$exports.LoaderBase=$e6b785bba9ea128d$var$LoaderBase;var $9e3e194659cc5776$exports={};"use strict";Object.defineProperty($9e3e194659cc5776$exports,"__esModule",{value:true});$9e3e194659cc5776$exports.readMagicBytes=$9e3e194659cc5776$var$readMagicBytes;function $9e3e194659cc5776$var$readMagicBytes(bufferOrDataView){let view;if(bufferOrDataView instanceof DataView)view=bufferOrDataView;else view=new DataView(bufferOrDataView);if(String.fromCharCode(view.getUint8(0))==="{")return null;let magicBytes="";for(let i=0;i<4;i++)magicBytes+=String.fromCharCode(view.getUint8(i));return magicBytes}class $f5d9b5dde53306bf$var$B3DMLoaderBase extends $e6b785bba9ea128d$exports.LoaderBase{parse(buffer){const dataView=new DataView(buffer);const magic=(0,$9e3e194659cc5776$exports.readMagicBytes)(dataView);console.assert(magic==="b3dm");const version=dataView.getUint32(4,true);console.assert(version===1);const byteLength=dataView.getUint32(8,true);console.assert(byteLength===buffer.byteLength);const featureTableJSONByteLength=dataView.getUint32(12,true);const featureTableBinaryByteLength=dataView.getUint32(16,true);const batchTableJSONByteLength=dataView.getUint32(20,true);const batchTableBinaryByteLength=dataView.getUint32(24,true);const featureTableStart=28;const featureTableBuffer=buffer.slice(featureTableStart,featureTableStart+featureTableJSONByteLength+featureTableBinaryByteLength);const featureTable=new $5bfd2e53a5ab8bef$exports.FeatureTable(featureTableBuffer,0,featureTableJSONByteLength,featureTableBinaryByteLength);const batchTableStart=featureTableStart+featureTableJSONByteLength+featureTableBinaryByteLength;const batchTableBuffer=buffer.slice(batchTableStart,batchTableStart+batchTableJSONByteLength+batchTableBinaryByteLength);const batchTable=new $5bfd2e53a5ab8bef$exports.BatchTable(batchTableBuffer,featureTable.getData("BATCH_LENGTH"),0,batchTableJSONByteLength,batchTableBinaryByteLength);const glbStart=batchTableStart+batchTableJSONByteLength+batchTableBinaryByteLength;const glbBytes=new Uint8Array(buffer,glbStart,byteLength-glbStart);return{version:version,featureTable:featureTable,batchTable:batchTable,glbBytes:glbBytes}}}$f5d9b5dde53306bf$exports.B3DMLoaderBase=$f5d9b5dde53306bf$var$B3DMLoaderBase;class $0aa3d1def57e98b1$var$B3DMLoader extends $f5d9b5dde53306bf$exports.B3DMLoaderBase{constructor(manager=$5OpyM$DefaultLoadingManager){super();this.manager=manager;this.adjustmentTransform=new $5OpyM$Matrix4}parse(buffer){const b3dm=super.parse(buffer);const gltfBuffer=b3dm.glbBytes.slice().buffer;return new Promise((resolve,reject)=>{const manager=this.manager;const fetchOptions=this.fetchOptions;const loader=manager.getHandler("path.gltf")||new $5OpyM$GLTFLoader(manager);if(fetchOptions.credentials==="include"&&fetchOptions.mode==="cors")loader.setCrossOrigin("use-credentials");if("credentials"in fetchOptions)loader.setWithCredentials(fetchOptions.credentials==="include");if(fetchOptions.headers)loader.setRequestHeader(fetchOptions.headers);let workingPath=this.workingPath;if(!/[\\/]$/.test(workingPath)&&workingPath.length)workingPath+="/";const adjustmentTransform=this.adjustmentTransform;loader.parse(gltfBuffer,workingPath,model=>{const{batchTable:batchTable,featureTable:featureTable}=b3dm;const{scene:scene}=model;const rtcCenter=featureTable.getData("RTC_CENTER");if(rtcCenter){scene.position.x+=rtcCenter[0];scene.position.y+=rtcCenter[1];scene.position.z+=rtcCenter[2]}model.scene.updateMatrix();model.scene.matrix.multiply(adjustmentTransform);model.scene.matrix.decompose(model.scene.position,model.scene.quaternion,model.scene.scale);model.batchTable=batchTable;model.featureTable=featureTable;scene.batchTable=batchTable;scene.featureTable=featureTable;resolve(model)},reject)})}}$0aa3d1def57e98b1$exports.B3DMLoader=$0aa3d1def57e98b1$var$B3DMLoader;var $1ddd6ca16eb224df$exports={};"use strict";Object.defineProperty($1ddd6ca16eb224df$exports,"__esModule",{value:true});$1ddd6ca16eb224df$exports.PNTSLoader=void 0;var $d408eda5a179398a$exports={};"use strict";Object.defineProperty($d408eda5a179398a$exports,"__esModule",{value:true});$d408eda5a179398a$exports.PNTSLoaderBase=void 0;class $d408eda5a179398a$var$PNTSLoaderBase extends $e6b785bba9ea128d$exports.LoaderBase{parse(buffer){const dataView=new DataView(buffer);const magic=(0,$9e3e194659cc5776$exports.readMagicBytes)(dataView);console.assert(magic==="pnts");const version=dataView.getUint32(4,true);console.assert(version===1);const byteLength=dataView.getUint32(8,true);console.assert(byteLength===buffer.byteLength);const featureTableJSONByteLength=dataView.getUint32(12,true);const featureTableBinaryByteLength=dataView.getUint32(16,true);const batchTableJSONByteLength=dataView.getUint32(20,true);const batchTableBinaryByteLength=dataView.getUint32(24,true);const featureTableStart=28;const featureTableBuffer=buffer.slice(featureTableStart,featureTableStart+featureTableJSONByteLength+featureTableBinaryByteLength);const featureTable=new $5bfd2e53a5ab8bef$exports.FeatureTable(featureTableBuffer,0,featureTableJSONByteLength,featureTableBinaryByteLength);const batchTableStart=featureTableStart+featureTableJSONByteLength+featureTableBinaryByteLength;const batchTableBuffer=buffer.slice(batchTableStart,batchTableStart+batchTableJSONByteLength+batchTableBinaryByteLength);const batchTable=new $5bfd2e53a5ab8bef$exports.BatchTable(batchTableBuffer,featureTable.getData("BATCH_LENGTH")||featureTable.getData("POINTS_LENGTH"),0,batchTableJSONByteLength,batchTableBinaryByteLength);return Promise.resolve({version:version,featureTable:featureTable,batchTable:batchTable})}}$d408eda5a179398a$exports.PNTSLoaderBase=$d408eda5a179398a$var$PNTSLoaderBase;const $1ddd6ca16eb224df$var$DRACO_ATTRIBUTE_MAP={RGB:"color",POSITION:"position"};class $1ddd6ca16eb224df$var$PNTSLoader extends $d408eda5a179398a$exports.PNTSLoaderBase{constructor(manager=$5OpyM$DefaultLoadingManager){super();this.manager=manager}parse(buffer){return super.parse(buffer).then(async result=>{const{featureTable:featureTable}=result;const material=new $5OpyM$PointsMaterial;const extensions=featureTable.header.extensions;const translationOffset=new $5OpyM$Vector3;let geometry;if(extensions&&extensions["3DTILES_draco_point_compression"]){const{byteOffset:byteOffset,byteLength:byteLength,properties:properties}=extensions["3DTILES_draco_point_compression"];const dracoLoader=this.manager.getHandler("draco.drc");if(dracoLoader==null)throw new Error("PNTSLoader: dracoLoader not available.");const attributeIDs={};for(const key in properties)if(key in $1ddd6ca16eb224df$var$DRACO_ATTRIBUTE_MAP&&key in properties){const mappedKey=$1ddd6ca16eb224df$var$DRACO_ATTRIBUTE_MAP[key];attributeIDs[mappedKey]=properties[key]}const taskConfig={attributeIDs:attributeIDs,attributeTypes:{position:"Float32Array",color:"Uint8Array"},useUniqueIDs:true};const buffer=featureTable.getBuffer(byteOffset,byteLength);geometry=await dracoLoader.decodeGeometry(buffer,taskConfig);if(geometry.attributes.color)material.vertexColors=true}else{const POINTS_LENGTH=featureTable.getData("POINTS_LENGTH");const POSITION=featureTable.getData("POSITION",POINTS_LENGTH,"FLOAT","VEC3");const RGB=featureTable.getData("RGB",POINTS_LENGTH,"UNSIGNED_BYTE","VEC3");const POSITION_QUANTIZED=featureTable.getData("POSITION_QUANTIZED",POINTS_LENGTH,"UNSIGNED_SHORT","VEC3");const QUANTIZED_VOLUME_SCALE=featureTable.getData("QUANTIZED_VOLUME_SCALE",POINTS_LENGTH,"FLOAT","VEC3");const QUANTIZED_VOLUME_OFFSET=featureTable.getData("QUANTIZED_VOLUME_OFFSET",POINTS_LENGTH,"FLOAT","VEC3");geometry=new $5OpyM$BufferGeometry;if(POSITION_QUANTIZED){const decodedPositions=new Float32Array(POINTS_LENGTH*3);for(let i=0;i<POINTS_LENGTH;i++)for(let j=0;j<3;j++){const index=3*i+j;decodedPositions[index]=POSITION_QUANTIZED[index]/65535*QUANTIZED_VOLUME_SCALE[j]}translationOffset.x=QUANTIZED_VOLUME_OFFSET[0];translationOffset.y=QUANTIZED_VOLUME_OFFSET[1];translationOffset.z=QUANTIZED_VOLUME_OFFSET[2];geometry.setAttribute("position",new $5OpyM$BufferAttribute(decodedPositions,3,false))}else geometry.setAttribute("position",new $5OpyM$BufferAttribute(POSITION,3,false));if(RGB!==null){geometry.setAttribute("color",new $5OpyM$BufferAttribute(RGB,3,true));material.vertexColors=true}}["CONSTANT_RGBA","BATCH_LENGTH","RGBA","RGB565","NORMAL","NORMAL_OCT16P"].forEach(feature=>{if(feature in featureTable.header)console.warn(`PNTSLoader: Unsupported FeatureTable feature "${feature}" detected.`)});const object=new $5OpyM$Points(geometry,material);object.position.copy(translationOffset);result.scene=object;result.scene.featureTable=featureTable;const rtcCenter=featureTable.getData("RTC_CENTER");if(rtcCenter){result.scene.position.x+=rtcCenter[0];result.scene.position.y+=rtcCenter[1];result.scene.position.z+=rtcCenter[2]}return result})}}$1ddd6ca16eb224df$exports.PNTSLoader=$1ddd6ca16eb224df$var$PNTSLoader;var $0bc85483bdeca322$exports={};"use strict";Object.defineProperty($0bc85483bdeca322$exports,"__esModule",{value:true});$0bc85483bdeca322$exports.I3DMLoader=void 0;var $bcb352fb74bed4a5$exports={};"use strict";Object.defineProperty($bcb352fb74bed4a5$exports,"__esModule",{value:true});$bcb352fb74bed4a5$exports.I3DMLoaderBase=void 0;class $bcb352fb74bed4a5$var$I3DMLoaderBase extends $e6b785bba9ea128d$exports.LoaderBase{parse(buffer){const dataView=new DataView(buffer);const magic=(0,$9e3e194659cc5776$exports.readMagicBytes)(dataView);console.assert(magic==="i3dm");const version=dataView.getUint32(4,true);console.assert(version===1);const byteLength=dataView.getUint32(8,true);console.assert(byteLength===buffer.byteLength);const featureTableJSONByteLength=dataView.getUint32(12,true);const featureTableBinaryByteLength=dataView.getUint32(16,true);const batchTableJSONByteLength=dataView.getUint32(20,true);const batchTableBinaryByteLength=dataView.getUint32(24,true);const gltfFormat=dataView.getUint32(28,true);const featureTableStart=32;const featureTableBuffer=buffer.slice(featureTableStart,featureTableStart+featureTableJSONByteLength+featureTableBinaryByteLength);const featureTable=new $5bfd2e53a5ab8bef$exports.FeatureTable(featureTableBuffer,0,featureTableJSONByteLength,featureTableBinaryByteLength);const batchTableStart=featureTableStart+featureTableJSONByteLength+featureTableBinaryByteLength;const batchTableBuffer=buffer.slice(batchTableStart,batchTableStart+batchTableJSONByteLength+batchTableBinaryByteLength);const batchTable=new $5bfd2e53a5ab8bef$exports.BatchTable(batchTableBuffer,featureTable.getData("INSTANCES_LENGTH"),0,batchTableJSONByteLength,batchTableBinaryByteLength);const glbStart=batchTableStart+batchTableJSONByteLength+batchTableBinaryByteLength;const bodyBytes=new Uint8Array(buffer,glbStart,byteLength-glbStart);let glbBytes=null;let promise=null;if(gltfFormat){glbBytes=bodyBytes;promise=Promise.resolve()}else{const externalUri=this.resolveExternalURL((0,$5d480c6739d4b949$exports.arrayToString)(bodyBytes));promise=fetch(externalUri,this.fetchOptions).then(res=>{if(!res.ok)throw new Error(`I3DMLoaderBase : Failed to load file "${externalUri}" with status ${res.status} : ${res.statusText}`);return res.arrayBuffer()}).then(buffer=>{glbBytes=new Uint8Array(buffer)})}return promise.then(()=>{return{version:version,featureTable:featureTable,batchTable:batchTable,glbBytes:glbBytes}})}}$bcb352fb74bed4a5$exports.I3DMLoaderBase=$bcb352fb74bed4a5$var$I3DMLoaderBase;const $0bc85483bdeca322$var$tempFwd=new $5OpyM$Vector3;const $0bc85483bdeca322$var$tempUp=new $5OpyM$Vector3;const $0bc85483bdeca322$var$tempRight=new $5OpyM$Vector3;const $0bc85483bdeca322$var$tempPos=new $5OpyM$Vector3;const $0bc85483bdeca322$var$tempQuat=new $5OpyM$Quaternion;const $0bc85483bdeca322$var$tempSca=new $5OpyM$Vector3;const $0bc85483bdeca322$var$tempMat=new $5OpyM$Matrix4;class $0bc85483bdeca322$var$I3DMLoader extends $bcb352fb74bed4a5$exports.I3DMLoaderBase{constructor(manager=$5OpyM$DefaultLoadingManager){super();this.manager=manager;this.adjustmentTransform=new $5OpyM$Matrix4}resolveExternalURL(url){return this.manager.resolveURL(super.resolveExternalURL(url))}parse(buffer){return super.parse(buffer).then(i3dm=>{const{featureTable:featureTable,batchTable:batchTable}=i3dm;const gltfBuffer=i3dm.glbBytes.slice().buffer;return new Promise((resolve,reject)=>{const fetchOptions=this.fetchOptions;const manager=this.manager;const loader=manager.getHandler("path.gltf")||new $5OpyM$GLTFLoader(manager);if(fetchOptions.credentials==="include"&&fetchOptions.mode==="cors")loader.setCrossOrigin("use-credentials");if("credentials"in fetchOptions)loader.setWithCredentials(fetchOptions.credentials==="include");if(fetchOptions.headers)loader.setRequestHeader(fetchOptions.headers);let workingPath=this.workingPath;if(!/[\\/]$/.test(workingPath))workingPath+="/";const adjustmentTransform=this.adjustmentTransform;loader.parse(gltfBuffer,workingPath,model=>{const INSTANCES_LENGTH=featureTable.getData("INSTANCES_LENGTH");const POSITION=featureTable.getData("POSITION",INSTANCES_LENGTH,"FLOAT","VEC3");const NORMAL_UP=featureTable.getData("NORMAL_UP",INSTANCES_LENGTH,"FLOAT","VEC3");const NORMAL_RIGHT=featureTable.getData("NORMAL_RIGHT",INSTANCES_LENGTH,"FLOAT","VEC3");const SCALE_NON_UNIFORM=featureTable.getData("SCALE_NON_UNIFORM",INSTANCES_LENGTH,"FLOAT","VEC3");const SCALE=featureTable.getData("SCALE",INSTANCES_LENGTH,"FLOAT","SCALAR");["RTC_CENTER","QUANTIZED_VOLUME_OFFSET","QUANTIZED_VOLUME_SCALE","EAST_NORTH_UP","POSITION_QUANTIZED","NORMAL_UP_OCT32P","NORMAL_RIGHT_OCT32P"].forEach(feature=>{if(feature in featureTable.header)console.warn(`I3DMLoader: Unsupported FeatureTable feature "${feature}" detected.`)});const instanceMap=new Map;const instances=[];model.scene.traverse(child=>{if(child.isMesh){const{geometry:geometry,material:material}=child;const instancedMesh=new $5OpyM$InstancedMesh(geometry,material,INSTANCES_LENGTH);instancedMesh.position.copy(child.position);instancedMesh.rotation.copy(child.rotation);instancedMesh.scale.copy(child.scale);instances.push(instancedMesh);instanceMap.set(child,instancedMesh)}});const averageVector=new $5OpyM$Vector3;for(let i=0;i<INSTANCES_LENGTH;i++){averageVector.x+=POSITION[i*3+0]/INSTANCES_LENGTH;averageVector.y+=POSITION[i*3+1]/INSTANCES_LENGTH;averageVector.z+=POSITION[i*3+2]/INSTANCES_LENGTH}instanceMap.forEach((instancedMesh,mesh)=>{const parent=mesh.parent;if(parent){parent.remove(mesh);parent.add(instancedMesh);instancedMesh.updateMatrixWorld();instancedMesh.position.copy(averageVector).applyMatrix4(instancedMesh.matrixWorld)}});for(let i=0;i<INSTANCES_LENGTH;i++){$0bc85483bdeca322$var$tempPos.set(POSITION[i*3+0]-averageVector.x,POSITION[i*3+1]-averageVector.y,POSITION[i*3+2]-averageVector.z);if(NORMAL_UP){$0bc85483bdeca322$var$tempUp.set(NORMAL_UP[i*3+0],NORMAL_UP[i*3+1],NORMAL_UP[i*3+2]);$0bc85483bdeca322$var$tempRight.set(NORMAL_RIGHT[i*3+0],NORMAL_RIGHT[i*3+1],NORMAL_RIGHT[i*3+2]);$0bc85483bdeca322$var$tempFwd.crossVectors($0bc85483bdeca322$var$tempRight,$0bc85483bdeca322$var$tempUp).normalize();$0bc85483bdeca322$var$tempMat.makeBasis($0bc85483bdeca322$var$tempRight,$0bc85483bdeca322$var$tempUp,$0bc85483bdeca322$var$tempFwd);$0bc85483bdeca322$var$tempQuat.setFromRotationMatrix($0bc85483bdeca322$var$tempMat)}else $0bc85483bdeca322$var$tempQuat.set(0,0,0,1);if(SCALE)$0bc85483bdeca322$var$tempSca.setScalar(SCALE[i]);else if(SCALE_NON_UNIFORM)$0bc85483bdeca322$var$tempSca.set(SCALE_NON_UNIFORM[i*3+0],SCALE_NON_UNIFORM[i*3+1],SCALE_NON_UNIFORM[i*3+2]);else $0bc85483bdeca322$var$tempSca.set(1,1,1);$0bc85483bdeca322$var$tempMat.compose($0bc85483bdeca322$var$tempPos,$0bc85483bdeca322$var$tempQuat,$0bc85483bdeca322$var$tempSca).multiply(adjustmentTransform);for(let j=0,l=instances.length;j<l;j++){const instance=instances[j];instance.setMatrixAt(i,$0bc85483bdeca322$var$tempMat)}}model.batchTable=batchTable;model.featureTable=featureTable;model.scene.batchTable=batchTable;model.scene.featureTable=featureTable;resolve(model)},reject)})})}}$0bc85483bdeca322$exports.I3DMLoader=$0bc85483bdeca322$var$I3DMLoader;var $54879e9a7dc345e0$exports={};"use strict";Object.defineProperty($54879e9a7dc345e0$exports,"__esModule",{value:true});$54879e9a7dc345e0$exports.CMPTLoader=void 0;var $cb66a16334732244$exports={};"use strict";Object.defineProperty($cb66a16334732244$exports,"__esModule",{value:true});$cb66a16334732244$exports.CMPTLoaderBase=void 0;class $cb66a16334732244$var$CMPTLoaderBase extends $e6b785bba9ea128d$exports.LoaderBase{parse(buffer){const dataView=new DataView(buffer);const magic=(0,$9e3e194659cc5776$exports.readMagicBytes)(dataView);console.assert(magic==="cmpt","CMPTLoader: The magic bytes equal \"cmpt\".");const version=dataView.getUint32(4,true);console.assert(version===1,"CMPTLoader: The version listed in the header is \"1\".");const byteLength=dataView.getUint32(8,true);console.assert(byteLength===buffer.byteLength,"CMPTLoader: The contents buffer length listed in the header matches the file.");const tilesLength=dataView.getUint32(12,true);const tiles=[];let offset=16;for(let i=0;i<tilesLength;i++){const tileView=new DataView(buffer,offset,12);const tileMagic=(0,$9e3e194659cc5776$exports.readMagicBytes)(tileView);const tileVersion=tileView.getUint32(4,true);const byteLength=tileView.getUint32(8,true);const tileBuffer=new Uint8Array(buffer,offset,byteLength);tiles.push({type:tileMagic,buffer:tileBuffer,version:tileVersion});offset+=byteLength}return{version:version,tiles:tiles}}}$cb66a16334732244$exports.CMPTLoaderBase=$cb66a16334732244$var$CMPTLoaderBase;class $54879e9a7dc345e0$var$CMPTLoader extends $cb66a16334732244$exports.CMPTLoaderBase{constructor(manager=$5OpyM$DefaultLoadingManager){super();this.manager=manager;this.adjustmentTransform=new $5OpyM$Matrix4}parse(buffer){const result=super.parse(buffer);const manager=this.manager;const adjustmentTransform=this.adjustmentTransform;const promises=[];for(const i in result.tiles){const{type:type,buffer:buffer}=result.tiles[i];switch(type){case"b3dm":{const slicedBuffer=buffer.slice();const loader=new $0aa3d1def57e98b1$exports.B3DMLoader(manager);loader.workingPath=this.workingPath;loader.fetchOptions=this.fetchOptions;loader.adjustmentTransform.copy(adjustmentTransform);const promise=loader.parse(slicedBuffer.buffer);promises.push(promise);break}case"pnts":{const slicedBuffer=buffer.slice();const loader=new $1ddd6ca16eb224df$exports.PNTSLoader(manager);loader.workingPath=this.workingPath;loader.fetchOptions=this.fetchOptions;const promise=loader.parse(slicedBuffer.buffer);promises.push(promise);break}case"i3dm":{const slicedBuffer=buffer.slice();const loader=new $0bc85483bdeca322$exports.I3DMLoader(manager);loader.workingPath=this.workingPath;loader.fetchOptions=this.fetchOptions;loader.adjustmentTransform.copy(adjustmentTransform);const promise=loader.parse(slicedBuffer.buffer);promises.push(promise);break}}}return Promise.all(promises).then(results=>{const group=new $5OpyM$Group;results.forEach(result=>{group.add(result.scene)});return{tiles:results,scene:group}})}}$54879e9a7dc345e0$exports.CMPTLoader=$54879e9a7dc345e0$var$CMPTLoader;var $29ced67d26e5c4e2$exports={};"use strict";Object.defineProperty($29ced67d26e5c4e2$exports,"__esModule",{value:true});$29ced67d26e5c4e2$exports.GLTFExtensionLoader=void 0;var $44c3bffa5e49f297$exports={};"use strict";Object.defineProperty($44c3bffa5e49f297$exports,"__esModule",{value:true});$44c3bffa5e49f297$exports.GLTFCesiumRTCExtension=void 0;class $44c3bffa5e49f297$var$GLTFCesiumRTCExtension{constructor(){this.name="CESIUM_RTC"}afterRoot(res){if(res.parser.json.extensions&&res.parser.json.extensions.CESIUM_RTC){const{center:center}=res.parser.json.extensions.CESIUM_RTC;if(center){res.scene.position.x+=center[0];res.scene.position.y+=center[1];res.scene.position.z+=center[2]}}}}$44c3bffa5e49f297$exports.GLTFCesiumRTCExtension=$44c3bffa5e49f297$var$GLTFCesiumRTCExtension;class $29ced67d26e5c4e2$var$GLTFExtensionLoader extends $e6b785bba9ea128d$exports.LoaderBase{constructor(manager=$5OpyM$DefaultLoadingManager){super();this.manager=manager}parse(buffer){return new Promise((resolve,reject)=>{const manager=this.manager;const fetchOptions=this.fetchOptions;let loader=manager.getHandler("path.gltf")||manager.getHandler("path.glb");if(!loader){loader=new $5OpyM$GLTFLoader(manager);loader.register(()=>new $44c3bffa5e49f297$exports.GLTFCesiumRTCExtension);if(fetchOptions.credentials==="include"&&fetchOptions.mode==="cors")loader.setCrossOrigin("use-credentials");if("credentials"in fetchOptions)loader.setWithCredentials(fetchOptions.credentials==="include");if(fetchOptions.headers)loader.setRequestHeader(fetchOptions.headers)}let resourcePath=loader.resourcePath||loader.path||this.workingPath;if(!/[\\/]$/.test(resourcePath)&&resourcePath.length)resourcePath+="/";loader.parse(buffer,resourcePath,model=>{resolve(model)},reject)})}}$29ced67d26e5c4e2$exports.GLTFExtensionLoader=$29ced67d26e5c4e2$var$GLTFExtensionLoader;var $3fcce8a4f74b2abc$exports={};"use strict";Object.defineProperty($3fcce8a4f74b2abc$exports,"__esModule",{value:true});$3fcce8a4f74b2abc$exports.TilesGroup=void 0;const $3fcce8a4f74b2abc$var$tempMat=new $5OpyM$Matrix4;class $3fcce8a4f74b2abc$var$TilesGroup extends $5OpyM$Group{constructor(tilesRenderer){super();this.name="TilesRenderer.TilesGroup";this.tilesRenderer=tilesRenderer}raycast(raycaster,intersects){if(this.tilesRenderer.optimizeRaycast)this.tilesRenderer.raycast(raycaster,intersects)}updateMatrixWorld(force){if(this.matrixAutoUpdate)this.updateMatrix();if(this.matrixWorldNeedsUpdate||force){if(this.parent===null)$3fcce8a4f74b2abc$var$tempMat.copy(this.matrix);else $3fcce8a4f74b2abc$var$tempMat.multiplyMatrices(this.parent.matrixWorld,this.matrix);this.matrixWorldNeedsUpdate=false;const elA=$3fcce8a4f74b2abc$var$tempMat.elements;const elB=this.matrixWorld.elements;let isDifferent=false;for(let i=0;i<16;i++){const itemA=elA[i];const itemB=elB[i];const diff=Math.abs(itemA-itemB);if(diff>Number.EPSILON){isDifferent=true;break}}if(isDifferent){this.matrixWorld.copy($3fcce8a4f74b2abc$var$tempMat);const children=this.children;for(let i=0,l=children.length;i<l;i++)children[i].updateMatrixWorld()}}}}$3fcce8a4f74b2abc$exports.TilesGroup=$3fcce8a4f74b2abc$var$TilesGroup;var $c1ac95a1e8efcc86$exports={};"use strict";Object.defineProperty($c1ac95a1e8efcc86$exports,"__esModule",{value:true});$c1ac95a1e8efcc86$exports.raycastTraverse=$c1ac95a1e8efcc86$var$raycastTraverse;$c1ac95a1e8efcc86$exports.raycastTraverseFirstHit=$c1ac95a1e8efcc86$var$raycastTraverseFirstHit;const $c1ac95a1e8efcc86$var$_mat=new $5OpyM$Matrix4;const $c1ac95a1e8efcc86$var$_localRay=new $5OpyM$Ray;const $c1ac95a1e8efcc86$var$_vec=new $5OpyM$Vector3;const $c1ac95a1e8efcc86$var$_hitArray=[];function $c1ac95a1e8efcc86$var$distanceSort(a,b){return a.distance-b.distance}function $c1ac95a1e8efcc86$var$intersectTileScene(scene,raycaster,intersects){scene.traverse(c=>{Object.getPrototypeOf(c).raycast.call(c,raycaster,intersects)})}function $c1ac95a1e8efcc86$var$intersectTileSceneFirstHist(scene,raycaster){$c1ac95a1e8efcc86$var$intersectTileScene(scene,raycaster,$c1ac95a1e8efcc86$var$_hitArray);$c1ac95a1e8efcc86$var$_hitArray.sort($c1ac95a1e8efcc86$var$distanceSort);const hit=$c1ac95a1e8efcc86$var$_hitArray[0]||null;$c1ac95a1e8efcc86$var$_hitArray.length=0;return hit}function $c1ac95a1e8efcc86$var$raycastTraverseFirstHit(renderer,tile,raycaster,localRay=null){const{group:group,activeTiles:activeTiles}=renderer;renderer.ensureChildrenArePreprocessed(tile);if(localRay===null){localRay=$c1ac95a1e8efcc86$var$_localRay;$c1ac95a1e8efcc86$var$_mat.copy(group.matrixWorld).invert();localRay.copy(raycaster.ray).applyMatrix4($c1ac95a1e8efcc86$var$_mat)}const array=[];const children=tile.children;for(let i=0,l=children.length;i<l;i++){const child=children[i];if(!child.__used)continue;const boundingVolume=child.cached.boundingVolume;if(boundingVolume.intersectRay(localRay,$c1ac95a1e8efcc86$var$_vec)!==null){$c1ac95a1e8efcc86$var$_vec.applyMatrix4(group.matrixWorld);array.push({distance:$c1ac95a1e8efcc86$var$_vec.distanceToSquared(raycaster.ray.origin),tile:child})}}array.sort($c1ac95a1e8efcc86$var$distanceSort);let bestHit=null;let bestHitDistSq=Infinity;if(activeTiles.has(tile)){const hit=$c1ac95a1e8efcc86$var$intersectTileSceneFirstHist(tile.cached.scene,raycaster);if(hit){bestHit=hit;bestHitDistSq=hit.distance*hit.distance}}for(let i=0,l=array.length;i<l;i++){const data=array[i];const boundingVolumeDistSq=data.distance;const tile=data.tile;if(boundingVolumeDistSq>bestHitDistSq)break;const hit=$c1ac95a1e8efcc86$var$raycastTraverseFirstHit(renderer,tile,raycaster,localRay);if(hit){const hitDistSq=hit.distance*hit.distance;if(hitDistSq<bestHitDistSq){bestHit=hit;bestHitDistSq=hitDistSq}}}return bestHit}function $c1ac95a1e8efcc86$var$raycastTraverse(renderer,tile,raycaster,intersects,localRay=null){const{group:group,activeTiles:activeTiles}=renderer;const{scene:scene,boundingVolume:boundingVolume}=tile.cached;renderer.ensureChildrenArePreprocessed(tile);if(localRay===null){localRay=$c1ac95a1e8efcc86$var$_localRay;$c1ac95a1e8efcc86$var$_mat.copy(group.matrixWorld).invert();localRay.copy(raycaster.ray).applyMatrix4($c1ac95a1e8efcc86$var$_mat)}if(!tile.__used||!boundingVolume.intersectsRay(localRay))return;if(activeTiles.has(tile))$c1ac95a1e8efcc86$var$intersectTileScene(scene,raycaster,intersects);const children=tile.children;for(let i=0,l=children.length;i<l;i++)$c1ac95a1e8efcc86$var$raycastTraverse(renderer,children[i],raycaster,intersects,localRay)}var $163be4c04da1c269$exports={};"use strict";Object.defineProperty($163be4c04da1c269$exports,"__esModule",{value:true});$163be4c04da1c269$exports.TileBoundingVolume=void 0;var $9e13f7da58b2928b$exports={};"use strict";Object.defineProperty($9e13f7da58b2928b$exports,"__esModule",{value:true});$9e13f7da58b2928b$exports.OBB=void 0;class $9e13f7da58b2928b$var$OBB{constructor(box=new $5OpyM$Box3,transform=new $5OpyM$Matrix4){this.box=box.clone();this.transform=transform.clone();this.inverseTransform=new $5OpyM$Matrix4;this.points=new Array(8).fill().map(()=>new $5OpyM$Vector3)}update(){const{points:points,inverseTransform:inverseTransform,transform:transform,box:box}=this;inverseTransform.copy(transform).invert();const{min:min,max:max}=box;let index=0;for(let x=-1;x<=1;x+=2){for(let y=-1;y<=1;y+=2)for(let z=-1;z<=1;z+=2){points[index].set(x<0?min.x:max.x,y<0?min.y:max.y,z<0?min.z:max.z).applyMatrix4(transform);index++}}}intersectsFrustum(frustum){const{points:points}=this;const{planes:planes}=frustum;for(let i=0;i<6;i++){const plane=planes[i];let maxDistance=-Infinity;for(let j=0;j<8;j++){const v=points[j];const dist=plane.distanceToPoint(v);maxDistance=maxDistance<dist?dist:maxDistance}if(maxDistance<0)return false}return true}}$9e13f7da58b2928b$exports.OBB=$9e13f7da58b2928b$var$OBB;var $aa7b3b269f245cbe$exports={};"use strict";Object.defineProperty($aa7b3b269f245cbe$exports,"__esModule",{value:true});$aa7b3b269f245cbe$exports.EllipsoidRegion=void 0;var $9160f8f2e0578e98$exports={};"use strict";Object.defineProperty($9160f8f2e0578e98$exports,"__esModule",{value:true});$9160f8f2e0578e98$exports.Ellipsoid=void 0;var $1hGdn=parcelRequire("1hGdn");const $9160f8f2e0578e98$var$_spherical=new $5OpyM$Spherical;const $9160f8f2e0578e98$var$_norm=new $5OpyM$Vector3;const $9160f8f2e0578e98$var$_vec=new $5OpyM$Vector3;const $9160f8f2e0578e98$var$_vec2=new $5OpyM$Vector3;const $9160f8f2e0578e98$var$_vec3=new $5OpyM$Vector3;const $9160f8f2e0578e98$var$_vecX=new $5OpyM$Vector3;const $9160f8f2e0578e98$var$_vecY=new $5OpyM$Vector3;const $9160f8f2e0578e98$var$_vecZ=new $5OpyM$Vector3;const $9160f8f2e0578e98$var$_pos=new $5OpyM$Vector3;const $9160f8f2e0578e98$var$EPSILON12=1e-12;const $9160f8f2e0578e98$var$CENTER_EPS=0.1;class $9160f8f2e0578e98$var$Ellipsoid{constructor(x=1,y=1,z=1){this.radius=new $5OpyM$Vector3(x,y,z)}constructLatLonFrame(lat,lon,target){this.getCartographicToPosition(lat,lon,0,$9160f8f2e0578e98$var$_pos);this.getCartographicToNormal(lat,lon,$9160f8f2e0578e98$var$_vecZ);this.getNorthernTangent(lat,lon,$9160f8f2e0578e98$var$_vecY);$9160f8f2e0578e98$var$_vecX.crossVectors($9160f8f2e0578e98$var$_vecY,$9160f8f2e0578e98$var$_vecZ);return target.makeBasis($9160f8f2e0578e98$var$_vecX,$9160f8f2e0578e98$var$_vecY,$9160f8f2e0578e98$var$_vecZ).setPosition($9160f8f2e0578e98$var$_pos)}getNorthernTangent(lat,lon,target,westTarget=$9160f8f2e0578e98$var$_vec3){let multiplier=1;let latPrime=lat+1e-7;if(lat>Math.PI/4){multiplier=-1;latPrime=lat-1e-7}const norm=this.getCartographicToNormal(lat,lon,$9160f8f2e0578e98$var$_vec).normalize();const normPrime=this.getCartographicToNormal(latPrime,lon,$9160f8f2e0578e98$var$_vec2).normalize();westTarget.crossVectors(norm,normPrime).normalize().multiplyScalar(multiplier);return target.crossVectors(westTarget,norm).normalize()}getCartographicToPosition(lat,lon,height,target){this.getCartographicToNormal(lat,lon,$9160f8f2e0578e98$var$_norm);const radius=this.radius;$9160f8f2e0578e98$var$_vec.copy($9160f8f2e0578e98$var$_norm);$9160f8f2e0578e98$var$_vec.x*=radius.x**2;$9160f8f2e0578e98$var$_vec.y*=radius.y**2;$9160f8f2e0578e98$var$_vec.z*=radius.z**2;const gamma=Math.sqrt($9160f8f2e0578e98$var$_norm.dot($9160f8f2e0578e98$var$_vec));$9160f8f2e0578e98$var$_vec.divideScalar(gamma);return target.copy($9160f8f2e0578e98$var$_vec).addScaledVector($9160f8f2e0578e98$var$_norm,height)}getPositionToCartographic(pos,target){this.getPositionToSurfacePoint(pos,$9160f8f2e0578e98$var$_vec);this.getPositionToNormal(pos,$9160f8f2e0578e98$var$_norm);const heightDelta=$9160f8f2e0578e98$var$_vec2.subVectors(pos,$9160f8f2e0578e98$var$_vec);target.lon=Math.atan2($9160f8f2e0578e98$var$_norm.y,$9160f8f2e0578e98$var$_norm.x);target.lat=Math.asin($9160f8f2e0578e98$var$_norm.z);target.height=Math.sign(heightDelta.dot(pos))*heightDelta.length();return target}getCartographicToNormal(lat,lon,target){$9160f8f2e0578e98$var$_spherical.set(1,(0,$1hGdn.latitudeToSphericalPhi)(lat),lon);target.setFromSpherical($9160f8f2e0578e98$var$_spherical).normalize();(0,$1hGdn.swapToGeoFrame)(target);return target}getPositionToNormal(pos,target){const radius=this.radius;target.copy(pos);target.x/=radius.x**2;target.y/=radius.y**2;target.z/=radius.z**2;target.normalize();return target}getPositionToSurfacePoint(pos,target){const radius=this.radius;const invRadiusSqX=1/radius.x**2;const invRadiusSqY=1/radius.y**2;const invRadiusSqZ=1/radius.z**2;const x2=pos.x*pos.x*invRadiusSqX;const y2=pos.y*pos.y*invRadiusSqY;const z2=pos.z*pos.z*invRadiusSqZ;const squaredNorm=x2+y2+z2;const ratio=Math.sqrt(1/squaredNorm);const intersection=$9160f8f2e0578e98$var$_vec.copy(pos).multiplyScalar(ratio);if(squaredNorm<$9160f8f2e0578e98$var$CENTER_EPS)return!isFinite(ratio)?null:target.copy(intersection);const gradient=$9160f8f2e0578e98$var$_vec2.set(intersection.x*invRadiusSqX*2,intersection.y*invRadiusSqY*2,intersection.z*invRadiusSqZ*2);let lambda=(1-ratio)*pos.length()/(0.5*gradient.length());let correction=0;let func,denominator;let xMultiplier,yMultiplier,zMultiplier;let xMultiplier2,yMultiplier2,zMultiplier2;let xMultiplier3,yMultiplier3,zMultiplier3;do{lambda-=correction;xMultiplier=1/(1+lambda*invRadiusSqX);yMultiplier=1/(1+lambda*invRadiusSqY);zMultiplier=1/(1+lambda*invRadiusSqZ);xMultiplier2=xMultiplier*xMultiplier;yMultiplier2=yMultiplier*yMultiplier;zMultiplier2=zMultiplier*zMultiplier;xMultiplier3=xMultiplier2*xMultiplier;yMultiplier3=yMultiplier2*yMultiplier;zMultiplier3=zMultiplier2*zMultiplier;func=x2*xMultiplier2+y2*yMultiplier2+z2*zMultiplier2-1;denominator=x2*xMultiplier3*invRadiusSqX+y2*yMultiplier3*invRadiusSqY+z2*zMultiplier3*invRadiusSqZ;const derivative=-2*denominator;correction=func/derivative}while(Math.abs(func)>$9160f8f2e0578e98$var$EPSILON12);return target.set(pos.x*xMultiplier,pos.y*yMultiplier,pos.z*zMultiplier)}}$9160f8f2e0578e98$exports.Ellipsoid=$9160f8f2e0578e98$var$Ellipsoid;const $aa7b3b269f245cbe$var$PI=Math.PI;const $aa7b3b269f245cbe$var$HALF_PI=$aa7b3b269f245cbe$var$PI/2;const $aa7b3b269f245cbe$var$_orthoX=new $5OpyM$Vector3;const $aa7b3b269f245cbe$var$_orthoY=new $5OpyM$Vector3;const $aa7b3b269f245cbe$var$_orthoZ=new $5OpyM$Vector3;const $aa7b3b269f245cbe$var$_invMatrix=new $5OpyM$Matrix4;let $aa7b3b269f245cbe$var$_poolIndex=0;const $aa7b3b269f245cbe$var$_pointsPool=[];function $aa7b3b269f245cbe$var$getVector(usePool=false){if(!usePool)return new $5OpyM$Vector3;if(!$aa7b3b269f245cbe$var$_pointsPool[$aa7b3b269f245cbe$var$_poolIndex])$aa7b3b269f245cbe$var$_pointsPool[$aa7b3b269f245cbe$var$_poolIndex]=new $5OpyM$Vector3;$aa7b3b269f245cbe$var$_poolIndex++;return $aa7b3b269f245cbe$var$_pointsPool[$aa7b3b269f245cbe$var$_poolIndex-1]}function $aa7b3b269f245cbe$var$resetPool(){$aa7b3b269f245cbe$var$_poolIndex=0}class $aa7b3b269f245cbe$var$EllipsoidRegion extends $9160f8f2e0578e98$exports.Ellipsoid{constructor(x,y,z,latStart=-$aa7b3b269f245cbe$var$HALF_PI,latEnd=$aa7b3b269f245cbe$var$HALF_PI,lonStart=0,lonEnd=2*$aa7b3b269f245cbe$var$PI,heightStart=0,heightEnd=0){super(x,y,z);this.latStart=latStart;this.latEnd=latEnd;this.lonStart=lonStart;this.lonEnd=lonEnd;this.heightStart=heightStart;this.heightEnd=heightEnd}_getPoints(usePool=false){const{latStart:latStart,latEnd:latEnd,lonStart:lonStart,lonEnd:lonEnd,heightStart:heightStart,heightEnd:heightEnd}=this;const midLat=$5OpyM$MathUtils.mapLinear(0.5,0,1,latStart,latEnd);const midLon=$5OpyM$MathUtils.mapLinear(0.5,0,1,lonStart,lonEnd);const lonOffset=Math.floor(lonStart/$aa7b3b269f245cbe$var$HALF_PI)*$aa7b3b269f245cbe$var$HALF_PI;const latlon=[[-$aa7b3b269f245cbe$var$PI/2,0],[$aa7b3b269f245cbe$var$PI/2,0],[0,lonOffset],[0,lonOffset+$aa7b3b269f245cbe$var$PI/2],[0,lonOffset+$aa7b3b269f245cbe$var$PI],[0,lonOffset+3*$aa7b3b269f245cbe$var$PI/2],[latStart,lonEnd],[latEnd,lonEnd],[latStart,lonStart],[latEnd,lonStart],[0,lonStart],[0,lonEnd],[midLat,midLon],[latStart,midLon],[latEnd,midLon],[midLat,lonStart],[midLat,lonEnd]];const target=[];const total=latlon.length;for(let z=0;z<=1;z++){const height=$5OpyM$MathUtils.mapLinear(z,0,1,heightStart,heightEnd);for(let i=0,l=total;i<l;i++){const[lat,lon]=latlon[i];if(lat>=latStart&&lat<=latEnd&&lon>=lonStart&&lon<=lonEnd){const v=$aa7b3b269f245cbe$var$getVector(usePool);target.push(v);this.getCartographicToPosition(lat,lon,height,v)}}}return target}getBoundingBox(box,matrix){$aa7b3b269f245cbe$var$resetPool();const{latStart:latStart,latEnd:latEnd,lonStart:lonStart,lonEnd:lonEnd}=this;const latRange=latEnd-latStart;if(latRange<$aa7b3b269f245cbe$var$PI/2){const midLat=$5OpyM$MathUtils.mapLinear(0.5,0,1,latStart,latEnd);const midLon=$5OpyM$MathUtils.mapLinear(0.5,0,1,lonStart,lonEnd);this.getCartographicToNormal(midLat,midLon,$aa7b3b269f245cbe$var$_orthoZ);$aa7b3b269f245cbe$var$_orthoY.set(0,0,1);$aa7b3b269f245cbe$var$_orthoX.crossVectors($aa7b3b269f245cbe$var$_orthoY,$aa7b3b269f245cbe$var$_orthoZ);$aa7b3b269f245cbe$var$_orthoY.crossVectors($aa7b3b269f245cbe$var$_orthoX,$aa7b3b269f245cbe$var$_orthoZ);matrix.makeBasis($aa7b3b269f245cbe$var$_orthoX,$aa7b3b269f245cbe$var$_orthoY,$aa7b3b269f245cbe$var$_orthoZ)}else{$aa7b3b269f245cbe$var$_orthoX.set(1,0,0);$aa7b3b269f245cbe$var$_orthoY.set(0,1,0);$aa7b3b269f245cbe$var$_orthoZ.set(0,0,1);matrix.makeBasis($aa7b3b269f245cbe$var$_orthoX,$aa7b3b269f245cbe$var$_orthoY,$aa7b3b269f245cbe$var$_orthoZ)}$aa7b3b269f245cbe$var$_invMatrix.copy(matrix).invert();const points=this._getPoints(true);for(let i=0,l=points.length;i<l;i++)points[i].applyMatrix4($aa7b3b269f245cbe$var$_invMatrix);box.makeEmpty();box.setFromPoints(points)}getBoundingSphere(sphere,center){$aa7b3b269f245cbe$var$resetPool();const points=this._getPoints(true);sphere.makeEmpty();sphere.setFromPoints(points,center)}}$aa7b3b269f245cbe$exports.EllipsoidRegion=$aa7b3b269f245cbe$var$EllipsoidRegion;const $163be4c04da1c269$var$_vecX=new $5OpyM$Vector3;const $163be4c04da1c269$var$_vecY=new $5OpyM$Vector3;const $163be4c04da1c269$var$_vecZ=new $5OpyM$Vector3;const $163be4c04da1c269$var$_vec=new $5OpyM$Vector3;const $163be4c04da1c269$var$_sphereVec=new $5OpyM$Vector3;const $163be4c04da1c269$var$_obbVec=new $5OpyM$Vector3;const $163be4c04da1c269$var$_ray=new $5OpyM$Ray;class $163be4c04da1c269$var$TileBoundingVolume{constructor(){this.sphere=null;this.obb=null;this.region=null;this.regionObb=null}intersectsRay(ray){const sphere=this.sphere;const obb=this.obb||this.regionObb;if(sphere&&!ray.intersectsSphere(sphere))return false;if(obb){$163be4c04da1c269$var$_ray.copy(ray).applyMatrix4(obb.inverseTransform);if(!$163be4c04da1c269$var$_ray.intersectsBox(obb.box))return false}return true}intersectRay(ray,target=null){const sphere=this.sphere;const obb=this.obb||this.regionObb;let sphereDistSq=-Infinity;let obbDistSq=-Infinity;if(sphere){if(ray.intersectSphere(sphere,$163be4c04da1c269$var$_sphereVec))sphereDistSq=sphere.containsPoint(ray.origin)?0:ray.origin.distanceToSquared($163be4c04da1c269$var$_sphereVec)}if(obb){$163be4c04da1c269$var$_ray.copy(ray).applyMatrix4(obb.inverseTransform);if($163be4c04da1c269$var$_ray.intersectBox(obb.box,$163be4c04da1c269$var$_obbVec))obbDistSq=obb.box.containsPoint($163be4c04da1c269$var$_ray.origin)?0:$163be4c04da1c269$var$_ray.origin.distanceToSquared($163be4c04da1c269$var$_obbVec)}const furthestDist=Math.max(sphereDistSq,obbDistSq);if(furthestDist===-Infinity)return null;ray.at(Math.sqrt(furthestDist),target);return target}distanceToPoint(point){const sphere=this.sphere;const obb=this.obb||this.regionObb;let sphereDistance=-Infinity;let obbDistance=-Infinity;if(sphere)sphereDistance=Math.max(sphere.distanceToPoint(point),0);if(obb){$163be4c04da1c269$var$_vec.copy(point).applyMatrix4(obb.inverseTransform);obbDistance=obb.box.distanceToPoint($163be4c04da1c269$var$_vec)}return sphereDistance>obbDistance?sphereDistance:obbDistance}intersectsFrustum(frustum){const obb=this.obb||this.regionObb;const sphere=this.sphere;if(sphere&&!frustum.intersectsSphere(sphere))return false;if(obb&&!obb.intersectsFrustum(frustum))return false;return Boolean(sphere||obb)}getOBB(targetBox,targetMatrix){const obb=this.obb||this.regionObb;if(obb){targetBox.copy(obb.box);targetMatrix.copy(obb.transform)}else{this.getAABB(targetBox);targetMatrix.identity()}}getAABB(target){if(this.sphere)this.sphere.getBoundingBox(target);else{const obb=this.obb||this.regionObb;target.copy(obb.box).applyMatrix4(obb.transform)}}getSphere(target){if(this.sphere)target.copy(this.sphere);else if(this.region)this.region.getBoundingSphere(target);else{const obb=this.obb||this.regionObb;obb.box.getBoundingSphere(target);target.applyMatrix4(obb.transform)}}setObbData(data,transform){const obb=new $9e13f7da58b2928b$exports.OBB;$163be4c04da1c269$var$_vecX.set(data[3],data[4],data[5]);$163be4c04da1c269$var$_vecY.set(data[6],data[7],data[8]);$163be4c04da1c269$var$_vecZ.set(data[9],data[10],data[11]);const scaleX=$163be4c04da1c269$var$_vecX.length();const scaleY=$163be4c04da1c269$var$_vecY.length();const scaleZ=$163be4c04da1c269$var$_vecZ.length();$163be4c04da1c269$var$_vecX.normalize();$163be4c04da1c269$var$_vecY.normalize();$163be4c04da1c269$var$_vecZ.normalize();if(scaleX===0)$163be4c04da1c269$var$_vecX.crossVectors($163be4c04da1c269$var$_vecY,$163be4c04da1c269$var$_vecZ);if(scaleY===0)$163be4c04da1c269$var$_vecY.crossVectors($163be4c04da1c269$var$_vecX,$163be4c04da1c269$var$_vecZ);if(scaleZ===0)$163be4c04da1c269$var$_vecZ.crossVectors($163be4c04da1c269$var$_vecX,$163be4c04da1c269$var$_vecY);obb.transform.set($163be4c04da1c269$var$_vecX.x,$163be4c04da1c269$var$_vecY.x,$163be4c04da1c269$var$_vecZ.x,data[0],$163be4c04da1c269$var$_vecX.y,$163be4c04da1c269$var$_vecY.y,$163be4c04da1c269$var$_vecZ.y,data[1],$163be4c04da1c269$var$_vecX.z,$163be4c04da1c269$var$_vecY.z,$163be4c04da1c269$var$_vecZ.z,data[2],0,0,0,1).premultiply(transform);obb.box.min.set(-scaleX,-scaleY,-scaleZ);obb.box.max.set(scaleX,scaleY,scaleZ);obb.update();this.obb=obb}setSphereData(x,y,z,radius,transform){const sphere=new $5OpyM$Sphere;sphere.center.set(x,y,z);sphere.radius=radius;sphere.applyMatrix4(transform);this.sphere=sphere}setRegionData(west,south,east,north,minHeight,maxHeight){const region=new $aa7b3b269f245cbe$exports.EllipsoidRegion($002d29a772485791$exports.WGS84_RADIUS,$002d29a772485791$exports.WGS84_RADIUS,$002d29a772485791$exports.WGS84_HEIGHT,south,north,west,east,minHeight,maxHeight);const obb=new $9e13f7da58b2928b$exports.OBB;region.getBoundingBox(obb.box,obb.transform);obb.update();this.region=region;this.regionObb=obb}}$163be4c04da1c269$exports.TileBoundingVolume=$163be4c04da1c269$var$TileBoundingVolume;const $06d26e8e9f5361d3$var$INITIAL_FRUSTUM_CULLED=Symbol("INITIAL_FRUSTUM_CULLED");const $06d26e8e9f5361d3$var$tempMat=new $5OpyM$Matrix4;const $06d26e8e9f5361d3$var$tempMat2=new $5OpyM$Matrix4;const $06d26e8e9f5361d3$var$tempVector=new $5OpyM$Vector3;const $06d26e8e9f5361d3$var$X_AXIS=new $5OpyM$Vector3(1,0,0);const $06d26e8e9f5361d3$var$Y_AXIS=new $5OpyM$Vector3(0,1,0);function $06d26e8e9f5361d3$var$updateFrustumCulled(object,toInitialValue){object.traverse(c=>{c.frustumCulled=c[$06d26e8e9f5361d3$var$INITIAL_FRUSTUM_CULLED]&&toInitialValue})}class $06d26e8e9f5361d3$var$TilesRenderer extends $5a6f7a997885dc30$exports.TilesRendererBase{get autoDisableRendererCulling(){return this._autoDisableRendererCulling}set autoDisableRendererCulling(value){if(this._autoDisableRendererCulling!==value){super._autoDisableRendererCulling=value;this.forEachLoadedModel(scene=>{$06d26e8e9f5361d3$var$updateFrustumCulled(scene,!value)})}}constructor(...args){super(...args);this.group=new $3fcce8a4f74b2abc$exports.TilesGroup(this);this.cameras=[];this.cameraMap=new Map;this.cameraInfo=[];this.activeTiles=new Set;this.visibleTiles=new Set;this._autoDisableRendererCulling=true;this.optimizeRaycast=true;this.onLoadTileSet=null;this.onLoadModel=null;this.onDisposeModel=null;this.onTileVisibilityChange=null;const manager=new $5OpyM$LoadingManager;manager.setURLModifier(url=>{if(this.preprocessURL)return this.preprocessURL(url);else return url});this.manager=manager;const tilesRenderer=this;this._overridenRaycast=function(raycaster,intersects){if(!tilesRenderer.optimizeRaycast)Object.getPrototypeOf(this).raycast.call(this,raycaster,intersects)}}getBounds(target){if(!this.root)return false;const boundingVolume=this.root.cached.boundingVolume;if(boundingVolume){boundingVolume.getAABB(target);return true}else return true}getOrientedBounds(targetBox,targetMatrix){if(!this.root)return false;const boundingVolume=this.root.cached.boundingVolume;if(boundingVolume){boundingVolume.getOBB(targetBox,targetMatrix);return true}else return true}getBoundingSphere(target){if(!this.root)return false;const boundingVolume=this.root.cached.boundingVolume;if(boundingVolume){boundingVolume.getSphere(target);return true}else return false}forEachLoadedModel(callback){this.traverse(tile=>{const scene=tile.cached.scene;if(scene)callback(scene,tile)})}raycast(raycaster,intersects){if(!this.root)return;if(raycaster.firstHitOnly){const hit=(0,$c1ac95a1e8efcc86$exports.raycastTraverseFirstHit)(this,this.root,raycaster);if(hit)intersects.push(hit)}else(0,$c1ac95a1e8efcc86$exports.raycastTraverse)(this,this.root,raycaster,intersects)}hasCamera(camera){return this.cameraMap.has(camera)}setCamera(camera){const cameras=this.cameras;const cameraMap=this.cameraMap;if(!cameraMap.has(camera)){cameraMap.set(camera,new $5OpyM$Vector2);cameras.push(camera);return true}return false}setResolution(camera,xOrVec,y){const cameraMap=this.cameraMap;if(!cameraMap.has(camera))return false;if(xOrVec instanceof $5OpyM$Vector2)cameraMap.get(camera).copy(xOrVec);else cameraMap.get(camera).set(xOrVec,y);return true}setResolutionFromRenderer(camera,renderer){const cameraMap=this.cameraMap;if(!cameraMap.has(camera))return false;const resolution=cameraMap.get(camera);renderer.getSize(resolution);resolution.multiplyScalar(renderer.getPixelRatio());return true}deleteCamera(camera){const cameras=this.cameras;const cameraMap=this.cameraMap;if(cameraMap.has(camera)){const index=cameras.indexOf(camera);cameras.splice(index,1);cameraMap.delete(camera);return true}return false}fetchTileSet(url,...rest){const pr=super.fetchTileSet(url,...rest);pr.then(json=>{if(this.onLoadTileSet)Promise.resolve().then(()=>{this.onLoadTileSet(json,url)})});return pr}update(){const group=this.group;const cameras=this.cameras;const cameraMap=this.cameraMap;const cameraInfo=this.cameraInfo;if(cameras.length===0){console.warn("TilesRenderer: no cameras defined. Cannot update 3d tiles.");return}while(cameraInfo.length>cameras.length)cameraInfo.pop();while(cameraInfo.length<cameras.length)cameraInfo.push({frustum:new $5OpyM$Frustum,isOrthographic:false,sseDenominator:-1,position:new $5OpyM$Vector3,invScale:-1,pixelSize:0});$06d26e8e9f5361d3$var$tempMat2.copy(group.matrixWorld).invert();$06d26e8e9f5361d3$var$tempVector.setFromMatrixScale($06d26e8e9f5361d3$var$tempMat2);const invScale=$06d26e8e9f5361d3$var$tempVector.x;if(Math.abs(Math.max($06d26e8e9f5361d3$var$tempVector.x-$06d26e8e9f5361d3$var$tempVector.y,$06d26e8e9f5361d3$var$tempVector.x-$06d26e8e9f5361d3$var$tempVector.z))>1e-6)console.warn("ThreeTilesRenderer : Non uniform scale used for tile which may cause issues when calculating screen space error.");for(let i=0,l=cameraInfo.length;i<l;i++){const camera=cameras[i];const info=cameraInfo[i];const frustum=info.frustum;const position=info.position;const resolution=cameraMap.get(camera);if(resolution.width===0||resolution.height===0)console.warn("TilesRenderer: resolution for camera error calculation is not set.");const projection=camera.projectionMatrix.elements;info.isOrthographic=projection[15]===1;if(info.isOrthographic){const w=2/projection[0];const h=2/projection[5];info.pixelSize=Math.max(h/resolution.height,w/resolution.width)}else info.sseDenominator=2/projection[5]/resolution.height;info.invScale=invScale;$06d26e8e9f5361d3$var$tempMat.copy(group.matrixWorld);$06d26e8e9f5361d3$var$tempMat.premultiply(camera.matrixWorldInverse);$06d26e8e9f5361d3$var$tempMat.premultiply(camera.projectionMatrix);frustum.setFromProjectionMatrix($06d26e8e9f5361d3$var$tempMat);position.set(0,0,0);position.applyMatrix4(camera.matrixWorld);position.applyMatrix4($06d26e8e9f5361d3$var$tempMat2)}super.update()}preprocessNode(tile,tileSetDir,parentTile=null){super.preprocessNode(tile,tileSetDir,parentTile);const transform=new $5OpyM$Matrix4;if(tile.transform){const transformArr=tile.transform;for(let i=0;i<16;i++)transform.elements[i]=transformArr[i]}else transform.identity();if(parentTile)transform.premultiply(parentTile.cached.transform);const transformInverse=new $5OpyM$Matrix4().copy(transform).invert();const boundingVolume=new $163be4c04da1c269$exports.TileBoundingVolume;if("sphere"in tile.boundingVolume)boundingVolume.setSphereData(...tile.boundingVolume.sphere,transform);if("box"in tile.boundingVolume)boundingVolume.setObbData(tile.boundingVolume.box,transform);if("region"in tile.boundingVolume)boundingVolume.setRegionData(...tile.boundingVolume.region);tile.cached={loadIndex:0,transform:transform,transformInverse:transformInverse,active:false,inFrustum:[],boundingVolume:boundingVolume,scene:null,geometry:null,material:null}}parseTile(buffer,tile,extension){tile._loadIndex=tile._loadIndex||0;tile._loadIndex++;const uri=tile.content.uri;const uriSplits=uri.split(/[\\\/]/g);uriSplits.pop();const workingPath=uriSplits.join("/");const fetchOptions=this.fetchOptions;const manager=this.manager;const loadIndex=tile._loadIndex;let promise=null;const upAxis=this.rootTileSet.asset&&this.rootTileSet.asset.gltfUpAxis||"y";const cached=tile.cached;const cachedTransform=cached.transform;const upAdjustment=new $5OpyM$Matrix4;switch(upAxis.toLowerCase()){case"x":upAdjustment.makeRotationAxis($06d26e8e9f5361d3$var$Y_AXIS,-Math.PI/2);break;case"y":upAdjustment.makeRotationAxis($06d26e8e9f5361d3$var$X_AXIS,Math.PI/2);break;case"z":upAdjustment.identity();break;}const fileType=((0,$9e3e194659cc5776$exports.readMagicBytes)(buffer)||extension).toLowerCase();switch(fileType){case"b3dm":{const loader=new $0aa3d1def57e98b1$exports.B3DMLoader(manager);loader.workingPath=workingPath;loader.fetchOptions=fetchOptions;loader.adjustmentTransform.copy(upAdjustment);promise=loader.parse(buffer);break}case"pnts":{const loader=new $1ddd6ca16eb224df$exports.PNTSLoader(manager);loader.workingPath=workingPath;loader.fetchOptions=fetchOptions;promise=loader.parse(buffer);break}case"i3dm":{const loader=new $0bc85483bdeca322$exports.I3DMLoader(manager);loader.workingPath=workingPath;loader.fetchOptions=fetchOptions;loader.adjustmentTransform.copy(upAdjustment);promise=loader.parse(buffer);break}case"cmpt":{const loader=new $54879e9a7dc345e0$exports.CMPTLoader(manager);loader.workingPath=workingPath;loader.fetchOptions=fetchOptions;loader.adjustmentTransform.copy(upAdjustment);promise=loader.parse(buffer).then(res=>res.scene);break}case"gltf":case"glb":const loader=new $29ced67d26e5c4e2$exports.GLTFExtensionLoader(manager);loader.workingPath=workingPath;loader.fetchOptions=fetchOptions;promise=loader.parse(buffer);break;default:console.warn(`TilesRenderer: Content type "${fileType}" not supported.`);promise=Promise.resolve(null);break;}return promise.then(result=>{let scene;let metadata;if(result.isObject3D){scene=result;metadata=null}else{scene=result.scene;metadata=result}if(tile._loadIndex!==loadIndex)return;scene.updateMatrix();if(fileType==="glb"||fileType==="gltf")scene.matrix.multiply(upAdjustment);scene.matrix.premultiply(cachedTransform);scene.matrix.decompose(scene.position,scene.quaternion,scene.scale);scene.traverse(c=>{c[$06d26e8e9f5361d3$var$INITIAL_FRUSTUM_CULLED]=c.frustumCulled});$06d26e8e9f5361d3$var$updateFrustumCulled(scene,!this.autoDisableRendererCulling);scene.traverse(c=>{c.raycast=this._overridenRaycast});const materials=[];const geometry=[];const textures=[];scene.traverse(c=>{if(c.geometry)geometry.push(c.geometry);if(c.material){const material=c.material;materials.push(c.material);for(const key in material){const value=material[key];if(value&&value.isTexture)textures.push(value)}}});cached.materials=materials;cached.geometry=geometry;cached.textures=textures;cached.scene=scene;cached.metadata=metadata;if(this.onLoadModel)this.onLoadModel(scene,tile)})}disposeTile(tile){const cached=tile.cached;if(cached.scene){const materials=cached.materials;const geometry=cached.geometry;const textures=cached.textures;const parent=cached.scene.parent;for(let i=0,l=geometry.length;i<l;i++)geometry[i].dispose();for(let i=0,l=materials.length;i<l;i++)materials[i].dispose();for(let i=0,l=textures.length;i<l;i++){const texture=textures[i];texture.dispose()}if(parent)parent.remove(cached.scene);if(this.onDisposeModel)this.onDisposeModel(cached.scene,tile);cached.scene=null;cached.materials=null;cached.textures=null;cached.geometry=null;cached.metadata=null}this.activeTiles.delete(tile);this.visibleTiles.delete(tile);tile._loadIndex++}setTileVisible(tile,visible){const scene=tile.cached.scene;const visibleTiles=this.visibleTiles;const group=this.group;if(visible){group.add(scene);visibleTiles.add(tile);scene.updateMatrixWorld(true)}else{group.remove(scene);visibleTiles.delete(tile)}if(this.onTileVisibilityChange)this.onTileVisibilityChange(scene,tile,visible)}setTileActive(tile,active){const activeTiles=this.activeTiles;if(active)activeTiles.add(tile);else activeTiles.delete(tile)}calculateError(tile){const cached=tile.cached;const inFrustum=cached.inFrustum;const cameras=this.cameras;const cameraInfo=this.cameraInfo;const boundingVolume=cached.boundingVolume;let maxError=-Infinity;let minDistance=Infinity;for(let i=0,l=cameras.length;i<l;i++){if(!inFrustum[i])continue;const info=cameraInfo[i];const invScale=info.invScale;let error;if(info.isOrthographic){const pixelSize=info.pixelSize;error=tile.geometricError/(pixelSize*invScale)}else{const distance=boundingVolume.distanceToPoint(info.position);const scaledDistance=distance*invScale;const sseDenominator=info.sseDenominator;error=tile.geometricError/(scaledDistance*sseDenominator);minDistance=Math.min(minDistance,scaledDistance)}maxError=Math.max(maxError,error)}tile.__distanceFromCamera=minDistance;tile.__error=maxError}tileInView(tile){const cached=tile.cached;const boundingVolume=cached.boundingVolume;const inFrustum=cached.inFrustum;const cameraInfo=this.cameraInfo;let inView=false;for(let i=0,l=cameraInfo.length;i<l;i++){const frustum=cameraInfo[i].frustum;if(boundingVolume.intersectsFrustum(frustum)){inView=true;inFrustum[i]=true}else inFrustum[i]=false}return inView}}$06d26e8e9f5361d3$exports.TilesRenderer=$06d26e8e9f5361d3$var$TilesRenderer;var $1cb839fa4db014d3$exports={};"use strict";Object.defineProperty($1cb839fa4db014d3$exports,"__esModule",{value:true});$1cb839fa4db014d3$exports.SphereHelper=void 0;const $1cb839fa4db014d3$var$_vector=new $5OpyM$Vector3;const $1cb839fa4db014d3$var$axes=["x","y","z"];class $1cb839fa4db014d3$var$SphereHelper extends $5OpyM$LineSegments{constructor(sphere,color=16776960,angleSteps=40){const geometry=new $5OpyM$BufferGeometry;const positions=[];for(let i=0;i<3;i++){const axis1=$1cb839fa4db014d3$var$axes[i];const axis2=$1cb839fa4db014d3$var$axes[(i+1)%3];$1cb839fa4db014d3$var$_vector.set(0,0,0);for(let a=0;a<angleSteps;a++){let angle;angle=2*Math.PI*a/(angleSteps-1);$1cb839fa4db014d3$var$_vector[axis1]=Math.sin(angle);$1cb839fa4db014d3$var$_vector[axis2]=Math.cos(angle);positions.push($1cb839fa4db014d3$var$_vector.x,$1cb839fa4db014d3$var$_vector.y,$1cb839fa4db014d3$var$_vector.z);angle=2*Math.PI*(a+1)/(angleSteps-1);$1cb839fa4db014d3$var$_vector[axis1]=Math.sin(angle);$1cb839fa4db014d3$var$_vector[axis2]=Math.cos(angle);positions.push($1cb839fa4db014d3$var$_vector.x,$1cb839fa4db014d3$var$_vector.y,$1cb839fa4db014d3$var$_vector.z)}}geometry.setAttribute("position",new $5OpyM$BufferAttribute(new Float32Array(positions),3));geometry.computeBoundingSphere();super(geometry,new $5OpyM$LineBasicMaterial({color:color,toneMapped:false}));this.sphere=sphere;this.type="SphereHelper"}updateMatrixWorld(force){const sphere=this.sphere;this.position.copy(sphere.center);this.scale.setScalar(sphere.radius);super.updateMatrixWorld(force)}}$1cb839fa4db014d3$exports.SphereHelper=$1cb839fa4db014d3$var$SphereHelper;var $3b9225051b507460$exports={};"use strict";Object.defineProperty($3b9225051b507460$exports,"__esModule",{value:true});$3b9225051b507460$exports.EllipsoidRegionLineHelper=$3b9225051b507460$exports.EllipsoidRegionHelper=void 0;const $3b9225051b507460$var$_norm=new $5OpyM$Vector3;const $3b9225051b507460$var$_norm2=new $5OpyM$Vector3;const $3b9225051b507460$var$_pos=new $5OpyM$Vector3;const $3b9225051b507460$var$_vec1=new $5OpyM$Vector3;const $3b9225051b507460$var$_vec2=new $5OpyM$Vector3;function $3b9225051b507460$var$toGroupGeometry(geometry){geometry=geometry.toNonIndexed();const{groups:groups}=geometry;const{position:position,normal:normal}=geometry.attributes;const newNorm=[];const newPos=[];for(const group of groups){const{start:start,count:count}=group;for(let i=start,l=start+count;i<l;i++){$3b9225051b507460$var$_vec1.fromBufferAttribute(position,i);$3b9225051b507460$var$_vec2.fromBufferAttribute(normal,i);newPos.push(...$3b9225051b507460$var$_vec1);newNorm.push(...$3b9225051b507460$var$_vec2)}}const newGeometry=new $5OpyM$BufferGeometry;newGeometry.setAttribute("position",new $5OpyM$BufferAttribute(new Float32Array(newPos),3));newGeometry.setAttribute("normal",new $5OpyM$BufferAttribute(new Float32Array(newNorm),3));return newGeometry}function $3b9225051b507460$var$getRegionGeometry(ellipsoidRegion){const{latStart=-Math.PI/2,latEnd=Math.PI/2,lonStart=0,lonEnd=2*Math.PI,heightStart=0,heightEnd=0}=ellipsoidRegion;const geometry=new $5OpyM$BoxGeometry(1,1,1,32,32);const{normal:normal,position:position}=geometry.attributes;const refPosition=position.clone();for(let i=0,l=position.count;i<l;i++){$3b9225051b507460$var$_pos.fromBufferAttribute(position,i);const lat=$5OpyM$MathUtils.mapLinear($3b9225051b507460$var$_pos.x,-0.5,0.5,latStart,latEnd);const lon=$5OpyM$MathUtils.mapLinear($3b9225051b507460$var$_pos.y,-0.5,0.5,lonStart,lonEnd);let height=heightStart;ellipsoidRegion.getCartographicToNormal(lat,lon,$3b9225051b507460$var$_norm);if($3b9225051b507460$var$_pos.z<0)height=heightEnd;ellipsoidRegion.getCartographicToPosition(lat,lon,height,$3b9225051b507460$var$_pos);position.setXYZ(i,...$3b9225051b507460$var$_pos)}geometry.computeVertexNormals();for(let i=0,l=refPosition.count;i<l;i++){$3b9225051b507460$var$_pos.fromBufferAttribute(refPosition,i);const lat=$5OpyM$MathUtils.mapLinear($3b9225051b507460$var$_pos.x,-0.5,0.5,latStart,latEnd);const lon=$5OpyM$MathUtils.mapLinear($3b9225051b507460$var$_pos.y,-0.5,0.5,lonStart,lonEnd);$3b9225051b507460$var$_norm.fromBufferAttribute(normal,i);ellipsoidRegion.getCartographicToNormal(lat,lon,$3b9225051b507460$var$_norm2);if(Math.abs($3b9225051b507460$var$_norm.dot($3b9225051b507460$var$_norm2))>0.1){if($3b9225051b507460$var$_pos.z>0)$3b9225051b507460$var$_norm2.multiplyScalar(-1);normal.setXYZ(i,...$3b9225051b507460$var$_norm2)}}return geometry}class $3b9225051b507460$var$EllipsoidRegionLineHelper extends $5OpyM$LineSegments{constructor(ellipsoidRegion=new $aa7b3b269f245cbe$exports.EllipsoidRegion,color=16776960){super();this.ellipsoidRegion=ellipsoidRegion;this.material.color.set(color);this.update()}update(){const geometry=$3b9225051b507460$var$getRegionGeometry(this.ellipsoidRegion);this.geometry.dispose();this.geometry=new $5OpyM$EdgesGeometry(geometry,80)}dispose(){this.geometry.dispose();this.material.dispose()}}$3b9225051b507460$exports.EllipsoidRegionLineHelper=$3b9225051b507460$var$EllipsoidRegionLineHelper;class $3b9225051b507460$var$EllipsoidRegionHelper extends $5OpyM$Mesh{constructor(ellipsoidRegion=new $aa7b3b269f245cbe$exports.EllipsoidRegion,color=16776960){super();this.ellipsoidRegion=ellipsoidRegion;this.material.color.set(color);this.update()}update(){this.geometry.dispose();const geometry=$3b9225051b507460$var$getRegionGeometry(this.ellipsoidRegion);const{lonStart:lonStart,lonEnd:lonEnd}=this;if(lonEnd-lonStart>=2*Math.PI){geometry.groups.splice(2,2);this.geometry=$3b9225051b507460$var$toGroupGeometry(geometry)}else this.geometry=geometry}dispose(){this.geometry.dispose();this.material.dispose()}}$3b9225051b507460$exports.EllipsoidRegionHelper=$3b9225051b507460$var$EllipsoidRegionHelper;const $1909f04f34bd6630$var$ORIGINAL_MATERIAL=Symbol("ORIGINAL_MATERIAL");const $1909f04f34bd6630$var$HAS_RANDOM_COLOR=Symbol("HAS_RANDOM_COLOR");const $1909f04f34bd6630$var$HAS_RANDOM_NODE_COLOR=Symbol("HAS_RANDOM_NODE_COLOR");function $1909f04f34bd6630$var$emptyRaycast(){}const $1909f04f34bd6630$var$NONE=0;$1909f04f34bd6630$exports.NONE=$1909f04f34bd6630$var$NONE;const $1909f04f34bd6630$var$SCREEN_ERROR=1;$1909f04f34bd6630$exports.SCREEN_ERROR=$1909f04f34bd6630$var$SCREEN_ERROR;const $1909f04f34bd6630$var$GEOMETRIC_ERROR=2;$1909f04f34bd6630$exports.GEOMETRIC_ERROR=$1909f04f34bd6630$var$GEOMETRIC_ERROR;const $1909f04f34bd6630$var$DISTANCE=3;$1909f04f34bd6630$exports.DISTANCE=$1909f04f34bd6630$var$DISTANCE;const $1909f04f34bd6630$var$DEPTH=4;$1909f04f34bd6630$exports.DEPTH=$1909f04f34bd6630$var$DEPTH;const $1909f04f34bd6630$var$RELATIVE_DEPTH=5;$1909f04f34bd6630$exports.RELATIVE_DEPTH=$1909f04f34bd6630$var$RELATIVE_DEPTH;const $1909f04f34bd6630$var$IS_LEAF=6;$1909f04f34bd6630$exports.IS_LEAF=$1909f04f34bd6630$var$IS_LEAF;const $1909f04f34bd6630$var$RANDOM_COLOR=7;$1909f04f34bd6630$exports.RANDOM_COLOR=$1909f04f34bd6630$var$RANDOM_COLOR;const $1909f04f34bd6630$var$RANDOM_NODE_COLOR=8;$1909f04f34bd6630$exports.RANDOM_NODE_COLOR=$1909f04f34bd6630$var$RANDOM_NODE_COLOR;const $1909f04f34bd6630$var$CUSTOM_COLOR=9;$1909f04f34bd6630$exports.CUSTOM_COLOR=$1909f04f34bd6630$var$CUSTOM_COLOR;const $1909f04f34bd6630$var$_sphere=new $5OpyM$Sphere;class $1909f04f34bd6630$var$DebugTilesRenderer extends $06d26e8e9f5361d3$exports.TilesRenderer{constructor(...args){super(...args);const tilesGroup=this.group;const boxGroup=new $5OpyM$Group;boxGroup.name="DebugTilesRenderer.boxGroup";tilesGroup.add(boxGroup);const sphereGroup=new $5OpyM$Group;sphereGroup.name="DebugTilesRenderer.sphereGroup";tilesGroup.add(sphereGroup);const regionGroup=new $5OpyM$Group;regionGroup.name="DebugTilesRenderer.regionGroup";tilesGroup.add(regionGroup);this.displayBoxBounds=false;this.displaySphereBounds=false;this.displayRegionBounds=false;this.colorMode=$1909f04f34bd6630$var$NONE;this.customColorCallback=null;this.boxGroup=boxGroup;this.sphereGroup=sphereGroup;this.regionGroup=regionGroup;this.maxDebugDepth=-1;this.maxDebugDistance=-1;this.maxDebugError=-1;this.getDebugColor=(value,target)=>{target.setRGB(value,value,value)};this.extremeDebugDepth=-1;this.extremeDebugError=-1}initExtremes(){let maxDepth=-1;this.traverse(tile=>{maxDepth=Math.max(maxDepth,tile.__depth)});let maxError=-1;this.traverse(tile=>{maxError=Math.max(maxError,tile.geometricError)});this.extremeDebugDepth=maxDepth;this.extremeDebugError=maxError}fetchTileSet(...args){const pr=super.fetchTileSet(...args);pr.then(()=>{Promise.resolve().then(()=>{this.initExtremes()})}).catch(()=>{});return pr}getTileInformationFromActiveObject(object){let targetTile=null;const activeTiles=this.activeTiles;activeTiles.forEach(tile=>{if(targetTile)return true;const scene=tile.cached.scene;if(scene)scene.traverse(c=>{if(c===object)targetTile=tile})});if(targetTile)return{distanceToCamera:targetTile.__distanceFromCamera,geometricError:targetTile.geometricError,screenSpaceError:targetTile.__error,depth:targetTile.__depth,isLeaf:targetTile.__isLeaf};else return null}update(){super.update();if(!this.root)return;this.boxGroup.visible=this.displayBoxBounds;this.sphereGroup.visible=this.displaySphereBounds;this.regionGroup.visible=this.displayRegionBounds;let maxDepth=-1;if(this.maxDebugDepth===-1)maxDepth=this.extremeDebugDepth;else maxDepth=this.maxDebugDepth;let maxError=-1;if(this.maxDebugError===-1)maxError=this.extremeDebugError;else maxError=this.maxDebugError;let maxDistance=-1;if(this.maxDebugDistance===-1){this.root.cached.boundingVolume.getSphere($1909f04f34bd6630$var$_sphere);maxDistance=$1909f04f34bd6630$var$_sphere.radius}else maxDistance=this.maxDebugDistance;const errorTarget=this.errorTarget;const colorMode=this.colorMode;const visibleTiles=this.visibleTiles;visibleTiles.forEach(tile=>{const scene=tile.cached.scene;let h,s,l;if(colorMode===$1909f04f34bd6630$var$RANDOM_COLOR){h=Math.random();s=0.5+Math.random()*0.5;l=0.375+Math.random()*0.25}scene.traverse(c=>{if(colorMode===$1909f04f34bd6630$var$RANDOM_NODE_COLOR){h=Math.random();s=0.5+Math.random()*0.5;l=0.375+Math.random()*0.25}const currMaterial=c.material;if(currMaterial){const originalMaterial=c[$1909f04f34bd6630$var$ORIGINAL_MATERIAL];if(colorMode===$1909f04f34bd6630$var$NONE&&currMaterial!==originalMaterial){c.material.dispose();c.material=c[$1909f04f34bd6630$var$ORIGINAL_MATERIAL]}else if(colorMode!==$1909f04f34bd6630$var$NONE&&currMaterial===originalMaterial){if(c.isPoints){const pointsMaterial=new $5OpyM$PointsMaterial;pointsMaterial.size=originalMaterial.size;pointsMaterial.sizeAttenuation=originalMaterial.sizeAttenuation;c.material=pointsMaterial}else{c.material=new $5OpyM$MeshStandardMaterial;c.material.flatShading=true}}if(colorMode!==$1909f04f34bd6630$var$RANDOM_COLOR)delete c.material[$1909f04f34bd6630$var$HAS_RANDOM_COLOR];if(colorMode!==$1909f04f34bd6630$var$RANDOM_NODE_COLOR)delete c.material[$1909f04f34bd6630$var$HAS_RANDOM_NODE_COLOR];switch(colorMode){case $1909f04f34bd6630$var$DEPTH:{const val=tile.__depth/maxDepth;this.getDebugColor(val,c.material.color);break}case $1909f04f34bd6630$var$RELATIVE_DEPTH:{const val=tile.__depthFromRenderedParent/maxDepth;this.getDebugColor(val,c.material.color);break}case $1909f04f34bd6630$var$SCREEN_ERROR:{const val=tile.__error/errorTarget;if(val>1)c.material.color.setRGB(1,0,0);else this.getDebugColor(val,c.material.color);break}case $1909f04f34bd6630$var$GEOMETRIC_ERROR:{const val=Math.min(tile.geometricError/maxError,1);this.getDebugColor(val,c.material.color);break}case $1909f04f34bd6630$var$DISTANCE:{const val=Math.min(tile.__distanceFromCamera/maxDistance,1);this.getDebugColor(val,c.material.color);break}case $1909f04f34bd6630$var$IS_LEAF:if(!tile.children||tile.children.length===0)this.getDebugColor(1,c.material.color);else this.getDebugColor(0,c.material.color);break;case $1909f04f34bd6630$var$RANDOM_NODE_COLOR:if(!c.material[$1909f04f34bd6630$var$HAS_RANDOM_NODE_COLOR]){c.material.color.setHSL(h,s,l);c.material[$1909f04f34bd6630$var$HAS_RANDOM_NODE_COLOR]=true}break;case $1909f04f34bd6630$var$RANDOM_COLOR:if(!c.material[$1909f04f34bd6630$var$HAS_RANDOM_COLOR]){c.material.color.setHSL(h,s,l);c.material[$1909f04f34bd6630$var$HAS_RANDOM_COLOR]=true}break;case $1909f04f34bd6630$var$CUSTOM_COLOR:if(this.customColorCallback)this.customColorCallback(tile,c);else console.warn("DebugTilesRenderer: customColorCallback not defined");break;}}})})}setTileVisible(tile,visible){super.setTileVisible(tile,visible);const cached=tile.cached;const sphereGroup=this.sphereGroup;const boxGroup=this.boxGroup;const regionGroup=this.regionGroup;const boxHelperGroup=cached.boxHelperGroup;const sphereHelper=cached.sphereHelper;const regionHelper=cached.regionHelper;if(!visible){if(boxHelperGroup)boxGroup.remove(boxHelperGroup);if(sphereHelper)sphereGroup.remove(sphereHelper);if(regionHelper)regionGroup.remove(regionHelper)}else{if(boxHelperGroup){boxGroup.add(boxHelperGroup);boxHelperGroup.updateMatrixWorld(true)}if(sphereHelper){sphereGroup.add(sphereHelper);sphereHelper.updateMatrixWorld(true)}if(regionHelper){regionGroup.add(regionHelper);regionHelper.updateMatrixWorld(true)}}}parseTile(buffer,tile,extension){return super.parseTile(buffer,tile,extension).then(()=>{const cached=tile.cached;const scene=cached.scene;if(scene){const{sphere:sphere,obb:obb,region:region}=cached.boundingVolume;if(obb){const boxHelperGroup=new $5OpyM$Group;boxHelperGroup.name="DebugTilesRenderer.boxHelperGroup";boxHelperGroup.matrix.copy(obb.transform);boxHelperGroup.matrixAutoUpdate=false;const boxHelper=new $5OpyM$Box3Helper(obb.box,(0,$3a66585ec6f85053$exports.getIndexedRandomColor)(tile.__depth));boxHelper.raycast=$1909f04f34bd6630$var$emptyRaycast;boxHelperGroup.add(boxHelper);cached.boxHelperGroup=boxHelperGroup;if(this.visibleTiles.has(tile)&&this.displayBoxBounds){this.boxGroup.add(boxHelperGroup);boxHelperGroup.updateMatrixWorld(true)}}if(sphere){const sphereHelper=new $1cb839fa4db014d3$exports.SphereHelper(sphere,(0,$3a66585ec6f85053$exports.getIndexedRandomColor)(tile.__depth));sphereHelper.raycast=$1909f04f34bd6630$var$emptyRaycast;cached.sphereHelper=sphereHelper;if(this.visibleTiles.has(tile)&&this.displaySphereBounds){this.sphereGroup.add(sphereHelper);sphereHelper.updateMatrixWorld(true)}}if(region){const regionHelper=new $3b9225051b507460$exports.EllipsoidRegionLineHelper(region,(0,$3a66585ec6f85053$exports.getIndexedRandomColor)(tile.__depth));regionHelper.raycast=$1909f04f34bd6630$var$emptyRaycast;const sphere=new $5OpyM$Sphere;region.getBoundingSphere(sphere);regionHelper.position.copy(sphere.center);sphere.center.multiplyScalar(-1);regionHelper.geometry.translate(...sphere.center);cached.regionHelper=regionHelper;if(this.visibleTiles.has(tile)&&this.displayRegionBounds){this.regionGroup.add(regionHelper);regionHelper.updateMatrixWorld(true)}}scene.traverse(c=>{const material=c.material;if(material)c[$1909f04f34bd6630$var$ORIGINAL_MATERIAL]=material})}})}disposeTile(tile){super.disposeTile(tile);const cached=tile.cached;if(cached.boxHelperGroup){cached.boxHelperGroup.children[0].geometry.dispose();delete cached.boxHelperGroup}if(cached.sphereHelper){cached.sphereHelper.geometry.dispose();delete cached.sphereHelper}}}$1909f04f34bd6630$exports.DebugTilesRenderer=$1909f04f34bd6630$var$DebugTilesRenderer;var $cf838c15c8b009ba$var$_GeoUtils=$cf838c15c8b009ba$var$_interopRequireWildcard(parcelRequire("1hGdn"));$cf838c15c8b009ba$exports.GeoUtils=$cf838c15c8b009ba$var$_GeoUtils;var $74a95d3099be71d6$exports={};"use strict";Object.defineProperty($74a95d3099be71d6$exports,"__esModule",{value:true});$74a95d3099be71d6$exports.WGS84_ELLIPSOID=void 0;const $74a95d3099be71d6$var$WGS84_ELLIPSOID=new $9160f8f2e0578e98$exports.Ellipsoid($002d29a772485791$exports.WGS84_RADIUS,$002d29a772485791$exports.WGS84_RADIUS,$002d29a772485791$exports.WGS84_HEIGHT);$74a95d3099be71d6$exports.WGS84_ELLIPSOID=$74a95d3099be71d6$var$WGS84_ELLIPSOID;Object.keys($74a95d3099be71d6$exports).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call($cf838c15c8b009ba$var$_exportNames,key))return;if(key in $cf838c15c8b009ba$exports&&$cf838c15c8b009ba$exports[key]===$74a95d3099be71d6$exports[key])return;Object.defineProperty($cf838c15c8b009ba$exports,key,{enumerable:true,get:function(){return $74a95d3099be71d6$exports[key]}})});var $e41589f0d6e8ce27$exports={};"use strict";Object.defineProperty($e41589f0d6e8ce27$exports,"__esModule",{value:true});$e41589f0d6e8ce27$exports.GoogleTilesRenderer=$e41589f0d6e8ce27$exports.DebugGoogleTilesRenderer=void 0;var $f462b5e10a0d334c$exports={};"use strict";Object.defineProperty($f462b5e10a0d334c$exports,"__esModule",{value:true});$f462b5e10a0d334c$exports.GoogleMapsTilesCredits=void 0;class $f462b5e10a0d334c$var$GoogleMapsTilesCredits{constructor(){this.creditsCount={}}_adjustCredits(line,add){const creditsCount=this.creditsCount;const tokens=line.split(/;/g);for(let i=0,l=tokens.length;i<l;i++){const t=tokens[i];if(!(t in creditsCount))creditsCount[t]=0;creditsCount[t]+=add?1:-1;if(creditsCount[t]<=0)delete creditsCount[t]}}addCredits(line){this._adjustCredits(line,true)}removeCredits(line){this._adjustCredits(line,false)}toString(){const tokens=Object.keys(this.creditsCount).sort();return tokens.join(", ")}}$f462b5e10a0d334c$exports.GoogleMapsTilesCredits=$f462b5e10a0d334c$var$GoogleMapsTilesCredits;const $e41589f0d6e8ce27$var$API_ORIGIN="https://tile.googleapis.com";const $e41589f0d6e8ce27$var$TILE_URL=`${$e41589f0d6e8ce27$var$API_ORIGIN}/v1/3dtiles/root.json`;const $e41589f0d6e8ce27$var$_mat=new $5OpyM$Matrix4;const $e41589f0d6e8ce27$var$_euler=new $5OpyM$Euler;const $e41589f0d6e8ce27$var$GoogleTilesRendererMixin=base=>class extends base{get ellipsoid(){return $74a95d3099be71d6$exports.WGS84_ELLIPSOID}constructor(apiKey,baseUrl=$e41589f0d6e8ce27$var$TILE_URL){super(new URL(`${baseUrl}?key=${apiKey}`).toString());this._credits=new $f462b5e10a0d334c$exports.GoogleMapsTilesCredits;this.fetchOptions.mode="cors";this.parseQueue.maxJobs=10;this.downloadQueue.maxJobs=30;this.lruCache.minSize=3000;this.lruCache.maxSize=5000;this.errorTarget=20;this.onLoadTileSet=tileset=>{let session;this.traverse(tile=>{if(tile.content&&tile.content.uri){session=new URL(tile.content.uri).searchParams.get("session");return true}return false});this.preprocessURL=uri=>{uri=new URL(uri);if(/^http/.test(uri.protocol)){uri.searchParams.append("session",session);uri.searchParams.append("key",apiKey)}return uri.toString()};this.onLoadTileSet=null};this.onTileVisibilityChange=(scene,tile,visible)=>{const copyright=tile.cached.metadata.asset.copyright||"";if(visible)this._credits.addCredits(copyright);else this._credits.removeCredits(copyright)}}getCreditsString(){return this._credits.toString()}setLatLonToYUp(lat,lon){const{ellipsoid:ellipsoid,group:group}=this;$e41589f0d6e8ce27$var$_euler.set(Math.PI/2,Math.PI/2,0);$e41589f0d6e8ce27$var$_mat.makeRotationFromEuler($e41589f0d6e8ce27$var$_euler);ellipsoid.constructLatLonFrame(lat,lon,group.matrix).multiply($e41589f0d6e8ce27$var$_mat).invert().decompose(group.position,group.quaternion,group.scale)}};const $e41589f0d6e8ce27$var$GoogleTilesRenderer=$e41589f0d6e8ce27$var$GoogleTilesRendererMixin($06d26e8e9f5361d3$exports.TilesRenderer);$e41589f0d6e8ce27$exports.GoogleTilesRenderer=$e41589f0d6e8ce27$var$GoogleTilesRenderer;const $e41589f0d6e8ce27$var$DebugGoogleTilesRenderer=$e41589f0d6e8ce27$var$GoogleTilesRendererMixin($1909f04f34bd6630$exports.DebugTilesRenderer);$e41589f0d6e8ce27$exports.DebugGoogleTilesRenderer=$e41589f0d6e8ce27$var$DebugGoogleTilesRenderer;Object.keys($e41589f0d6e8ce27$exports).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call($cf838c15c8b009ba$var$_exportNames,key))return;if(key in $cf838c15c8b009ba$exports&&$cf838c15c8b009ba$exports[key]===$e41589f0d6e8ce27$exports[key])return;Object.defineProperty($cf838c15c8b009ba$exports,key,{enumerable:true,get:function(){return $e41589f0d6e8ce27$exports[key]}})});var $3b72713b91ab2ada$exports={};"use strict";Object.defineProperty($3b72713b91ab2ada$exports,"__esModule",{value:true});$3b72713b91ab2ada$exports.DebugCesiumIonTilesRenderer=$3b72713b91ab2ada$exports.CesiumIonTilesRenderer=void 0;const $3b72713b91ab2ada$var$UNLOADED=0;const $3b72713b91ab2ada$var$LOADING=1;const $3b72713b91ab2ada$var$LOADED=2;const $3b72713b91ab2ada$var$FAILED=3;const $3b72713b91ab2ada$var$CesiumIonTilesRendererMixin=base=>class extends base{constructor(ionAssetId,ionAccessToken){super();this._tokenState=$3b72713b91ab2ada$var$UNLOADED;this._ionAccessToken=ionAccessToken;this._ionAssetId=ionAssetId;this._tileSetVersion=-1;this.preprocessURL=uri=>{uri=new URL(uri);if(/^http/.test(uri.protocol)&&this._tileSetVersion!=-1)uri.searchParams.append("v",this._tileSetVersion);return uri.toString()}}update(){const state=this._tokenState;if(state===$3b72713b91ab2ada$var$UNLOADED){this._tokenState=$3b72713b91ab2ada$var$LOADING;const url=new URL(`https://api.cesium.com/v1/assets/${this._ionAssetId}/endpoint`);url.searchParams.append("access_token",this._ionAccessToken);fetch(url,{mode:"cors"}).then(res=>{if(res.ok)return res.json();else return Promise.reject(`${res.status} : ${res.statusText}`)}).then(json=>{this._tokenState=$3b72713b91ab2ada$var$LOADED;const url=new URL(json.url);this._tileSetVersion=url.searchParams.get("v");this.rootURL=url;this.fetchOptions.headers=this.fetchOptions.headers||{};this.fetchOptions.headers.Authorization=`Bearer ${json.accessToken}`}).catch(()=>{this._tokenState=$3b72713b91ab2ada$var$FAILED})}else if(state===$3b72713b91ab2ada$var$LOADED)super.update()}};const $3b72713b91ab2ada$var$CesiumIonTilesRenderer=$3b72713b91ab2ada$var$CesiumIonTilesRendererMixin($06d26e8e9f5361d3$exports.TilesRenderer);$3b72713b91ab2ada$exports.CesiumIonTilesRenderer=$3b72713b91ab2ada$var$CesiumIonTilesRenderer;const $3b72713b91ab2ada$var$DebugCesiumIonTilesRenderer=$3b72713b91ab2ada$var$CesiumIonTilesRendererMixin($1909f04f34bd6630$exports.DebugTilesRenderer);$3b72713b91ab2ada$exports.DebugCesiumIonTilesRenderer=$3b72713b91ab2ada$var$DebugCesiumIonTilesRenderer;Object.keys($3b72713b91ab2ada$exports).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call($cf838c15c8b009ba$var$_exportNames,key))return;if(key in $cf838c15c8b009ba$exports&&$cf838c15c8b009ba$exports[key]===$3b72713b91ab2ada$exports[key])return;Object.defineProperty($cf838c15c8b009ba$exports,key,{enumerable:true,get:function(){return $3b72713b91ab2ada$exports[key]}})});Object.keys($002d29a772485791$exports).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call($cf838c15c8b009ba$var$_exportNames,key))return;if(key in $cf838c15c8b009ba$exports&&$cf838c15c8b009ba$exports[key]===$002d29a772485791$exports[key])return;Object.defineProperty($cf838c15c8b009ba$exports,key,{enumerable:true,get:function(){return $002d29a772485791$exports[key]}})});function $cf838c15c8b009ba$var$_getRequireWildcardCache(nodeInterop){if(typeof WeakMap!=="function")return null;var cacheBabelInterop=new WeakMap;var cacheNodeInterop=new WeakMap;return($cf838c15c8b009ba$var$_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function $cf838c15c8b009ba$var$_interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(obj===null||typeof obj!=="object"&&typeof obj!=="function")return{default:obj};var cache=$cf838c15c8b009ba$var$_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if(key!=="default"&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set))Object.defineProperty(newObj,key,desc);else newObj[key]=obj[key]}newObj.default=obj;if(cache)cache.set(obj,newObj);return newObj}THREE.TDTiles=$cf838c15c8b009ba$exports});(function(){const Constants={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:0.05,AxisTouchThreshold:0.1,VisualResponseProperty:Object.freeze({TRANSFORM:"transform",VISIBILITY:"visibility"})};async function fetchJsonFile(path){const response=await fetch(path);if(!response.ok){throw new Error(response.statusText)}else{return response.json()}}async function fetchProfilesList(basePath){if(!basePath){throw new Error("No basePath supplied")}const profileListFileName="profilesList.json";const profilesList=await fetchJsonFile(`${basePath}/${profileListFileName}`);return profilesList}async function fetchProfile(xrInputSource,basePath,defaultProfile=null,getAssetPath=true){if(!xrInputSource){throw new Error("No xrInputSource supplied")}if(!basePath){throw new Error("No basePath supplied")}const supportedProfilesList=await fetchProfilesList(basePath);let match;xrInputSource.profiles.some(profileId=>{const supportedProfile=supportedProfilesList[profileId];if(supportedProfile){match={profileId,profilePath:`${basePath}/${supportedProfile.path}`,deprecated:!!supportedProfile.deprecated}}return!!match});if(!match){if(!defaultProfile){throw new Error("No matching profile name found")}const supportedProfile=supportedProfilesList[defaultProfile];if(!supportedProfile){throw new Error(`No matching profile name found and default profile "${defaultProfile}" missing.`)}match={profileId:defaultProfile,profilePath:`${basePath}/${supportedProfile.path}`,deprecated:!!supportedProfile.deprecated}}const profile=await fetchJsonFile(match.profilePath);let assetPath;if(getAssetPath){let layout;if(xrInputSource.handedness==="any"){layout=profile.layouts[Object.keys(profile.layouts)[0]]}else{layout=profile.layouts[xrInputSource.handedness]}if(!layout){throw new Error(`No matching handedness, ${xrInputSource.handedness}, in profile ${match.profileId}`)}if(layout.assetPath){assetPath=match.profilePath.replace("profile.json",layout.assetPath)}}return{profile,assetPath}}const defaultComponentValues={xAxis:0,yAxis:0,button:0,state:Constants.ComponentState.DEFAULT};function normalizeAxes(x=0,y=0){let xAxis=x;let yAxis=y;const hypotenuse=Math.sqrt(x*x+y*y);if(hypotenuse>1){const theta=Math.atan2(y,x);xAxis=Math.cos(theta);yAxis=Math.sin(theta)}const result={normalizedXAxis:xAxis*0.5+0.5,normalizedYAxis:yAxis*0.5+0.5};return result}class VisualResponse{constructor(visualResponseDescription){this.componentProperty=visualResponseDescription.componentProperty;this.states=visualResponseDescription.states;this.valueNodeName=visualResponseDescription.valueNodeName;this.valueNodeProperty=visualResponseDescription.valueNodeProperty;if(this.valueNodeProperty===Constants.VisualResponseProperty.TRANSFORM){this.minNodeName=visualResponseDescription.minNodeName;this.maxNodeName=visualResponseDescription.maxNodeName}this.value=0;this.updateFromComponent(defaultComponentValues)}updateFromComponent({xAxis,yAxis,button,state}){const{normalizedXAxis,normalizedYAxis}=normalizeAxes(xAxis,yAxis);switch(this.componentProperty){case Constants.ComponentProperty.X_AXIS:this.value=this.states.includes(state)?normalizedXAxis:0.5;break;case Constants.ComponentProperty.Y_AXIS:this.value=this.states.includes(state)?normalizedYAxis:0.5;break;case Constants.ComponentProperty.BUTTON:this.value=this.states.includes(state)?button:0;break;case Constants.ComponentProperty.STATE:if(this.valueNodeProperty===Constants.VisualResponseProperty.VISIBILITY){this.value=this.states.includes(state)}else{this.value=this.states.includes(state)?1:0}break;default:throw new Error(`Unexpected visualResponse componentProperty ${this.componentProperty}`);}}}class Component{constructor(componentId,componentDescription){if(!componentId||!componentDescription||!componentDescription.visualResponses||!componentDescription.gamepadIndices||Object.keys(componentDescription.gamepadIndices).length===0){throw new Error("Invalid arguments supplied")}this.id=componentId;this.type=componentDescription.type;this.rootNodeName=componentDescription.rootNodeName;this.touchPointNodeName=componentDescription.touchPointNodeName;this.visualResponses={};Object.keys(componentDescription.visualResponses).forEach(responseName=>{const visualResponse=new VisualResponse(componentDescription.visualResponses[responseName]);this.visualResponses[responseName]=visualResponse});this.gamepadIndices=Object.assign({},componentDescription.gamepadIndices);this.values={state:Constants.ComponentState.DEFAULT,button:this.gamepadIndices.button!==undefined?0:undefined,xAxis:this.gamepadIndices.xAxis!==undefined?0:undefined,yAxis:this.gamepadIndices.yAxis!==undefined?0:undefined}}get data(){const data={id:this.id,...this.values};return data}updateFromGamepad(gamepad){this.values.state=Constants.ComponentState.DEFAULT;if(this.gamepadIndices.button!==undefined&&gamepad.buttons.length>this.gamepadIndices.button){const gamepadButton=gamepad.buttons[this.gamepadIndices.button];this.values.button=gamepadButton.value;this.values.button=this.values.button<0?0:this.values.button;this.values.button=this.values.button>1?1:this.values.button;if(gamepadButton.pressed||this.values.button===1){this.values.state=Constants.ComponentState.PRESSED}else if(gamepadButton.touched||this.values.button>Constants.ButtonTouchThreshold){this.values.state=Constants.ComponentState.TOUCHED}}if(this.gamepadIndices.xAxis!==undefined&&gamepad.axes.length>this.gamepadIndices.xAxis){this.values.xAxis=gamepad.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;if(this.values.state===Constants.ComponentState.DEFAULT&&Math.abs(this.values.xAxis)>Constants.AxisTouchThreshold){this.values.state=Constants.ComponentState.TOUCHED}}if(this.gamepadIndices.yAxis!==undefined&&gamepad.axes.length>this.gamepadIndices.yAxis){this.values.yAxis=gamepad.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;if(this.values.state===Constants.ComponentState.DEFAULT&&Math.abs(this.values.yAxis)>Constants.AxisTouchThreshold){this.values.state=Constants.ComponentState.TOUCHED}}Object.values(this.visualResponses).forEach(visualResponse=>{visualResponse.updateFromComponent(this.values)})}}class MotionController{constructor(xrInputSource,profile,assetUrl){if(!xrInputSource){throw new Error("No xrInputSource supplied")}if(!profile){throw new Error("No profile supplied")}this.xrInputSource=xrInputSource;this.assetUrl=assetUrl;this.id=profile.profileId;this.layoutDescription=profile.layouts[xrInputSource.handedness];this.components={};Object.keys(this.layoutDescription.components).forEach(componentId=>{const componentDescription=this.layoutDescription.components[componentId];this.components[componentId]=new Component(componentId,componentDescription)});this.updateFromGamepad()}get gripSpace(){return this.xrInputSource.gripSpace}get targetRaySpace(){return this.xrInputSource.targetRaySpace}get data(){const data=[];Object.values(this.components).forEach(component=>{data.push(component.data)});return data}updateFromGamepad(){Object.values(this.components).forEach(component=>{component.updateFromGamepad(this.xrInputSource.gamepad)})}}THREE.MontionControllers={};THREE.MontionControllers.Constants=Constants;THREE.MontionControllers.MotionController=MotionController;THREE.MontionControllers.fetchProfile=fetchProfile;THREE.MontionControllers.fetchProfilesList=fetchProfilesList})();(function(){var Mesh=THREE.Mesh,MeshBasicMaterial=THREE.MeshBasicMaterial,Object3D=THREE.Object3D,SphereGeometry=THREE.SphereGeometry;var GLTFLoader=THREE.GLTFLoader;var MotionControllerConstants=THREE.MontionControllers.Constants,fetchProfile=THREE.MontionControllers.fetchProfile,MotionController=THREE.MontionControllers.MotionController;const DEFAULT_PROFILES_PATH="https://cdn.jsdelivr.net/npm/@webxr-input-profiles/assets@1.0/dist/profiles";const DEFAULT_PROFILE="generic-trigger";class XRControllerModel extends Object3D{constructor(){super();this.motionController=null;this.envMap=null}setEnvironmentMap(envMap){if(this.envMap==envMap){return this}this.envMap=envMap;this.traverse(child=>{if(child.isMesh){child.material.envMap=this.envMap;child.material.needsUpdate=true}});return this}updateMatrixWorld(force){super.updateMatrixWorld(force);if(!this.motionController)return;this.motionController.updateFromGamepad();Object.values(this.motionController.components).forEach(component=>{Object.values(component.visualResponses).forEach(visualResponse=>{const{valueNode,minNode,maxNode,value,valueNodeProperty}=visualResponse;if(!valueNode)return;if(valueNodeProperty===MotionControllerConstants.VisualResponseProperty.VISIBILITY){valueNode.visible=value}else if(valueNodeProperty===MotionControllerConstants.VisualResponseProperty.TRANSFORM){valueNode.quaternion.slerpQuaternions(minNode.quaternion,maxNode.quaternion,value);valueNode.position.lerpVectors(minNode.position,maxNode.position,value)}})})}}function findNodes(motionController,scene){Object.values(motionController.components).forEach(component=>{const{type,touchPointNodeName,visualResponses}=component;if(type===MotionControllerConstants.ComponentType.TOUCHPAD){component.touchPointNode=scene.getObjectByName(touchPointNodeName);if(component.touchPointNode){const sphereGeometry=new SphereGeometry(0.001);const material=new MeshBasicMaterial({color:255});const sphere=new Mesh(sphereGeometry,material);component.touchPointNode.add(sphere)}else{console.warn(`Could not find touch dot, ${component.touchPointNodeName}, in touchpad component ${component.id}`)}}Object.values(visualResponses).forEach(visualResponse=>{const{valueNodeName,minNodeName,maxNodeName,valueNodeProperty}=visualResponse;if(valueNodeProperty===MotionControllerConstants.VisualResponseProperty.TRANSFORM){visualResponse.minNode=scene.getObjectByName(minNodeName);visualResponse.maxNode=scene.getObjectByName(maxNodeName);if(!visualResponse.minNode){console.warn(`Could not find ${minNodeName} in the model`);return}if(!visualResponse.maxNode){console.warn(`Could not find ${maxNodeName} in the model`);return}}visualResponse.valueNode=scene.getObjectByName(valueNodeName);if(!visualResponse.valueNode){console.warn(`Could not find ${valueNodeName} in the model`)}})})}function addAssetSceneToControllerModel(controllerModel,scene){findNodes(controllerModel.motionController,scene);if(controllerModel.envMap){scene.traverse(child=>{if(child.isMesh){child.material.envMap=controllerModel.envMap;child.material.needsUpdate=true}})}controllerModel.add(scene)}class XRControllerModelFactory{constructor(gltfLoader=null){this.gltfLoader=gltfLoader;this.path=DEFAULT_PROFILES_PATH;this._assetCache={};if(!this.gltfLoader){this.gltfLoader=new GLTFLoader}this}createControllerModel(controller,profiles=null){const controllerModel=new XRControllerModel;let scene=null;controller.addEventListener("connected",event=>{const xrInputSource=event.data;const profileInfo={profiles:profiles&&profiles(xrInputSource)||xrInputSource.profiles,handedness:xrInputSource.handedness};if(xrInputSource.targetRayMode!=="tracked-pointer"||!xrInputSource.gamepad)return;fetchProfile(profileInfo,this.path,DEFAULT_PROFILE).then(({profile,assetPath})=>{controllerModel.motionController=new MotionController(xrInputSource,profile,assetPath);const cachedAsset=this._assetCache[controllerModel.motionController.assetUrl];if(cachedAsset){scene=cachedAsset.scene.clone();addAssetSceneToControllerModel(controllerModel,scene);setTimeout(function(){controllerModel.dispatchEvent({type:"loaded"})},0)}else{if(!this.gltfLoader){throw new Error("GLTFLoader not set.")}this.gltfLoader.setPath("");this.gltfLoader.load(controllerModel.motionController.assetUrl,asset=>{this._assetCache[controllerModel.motionController.assetUrl]=asset;scene=asset.scene.clone();addAssetSceneToControllerModel(controllerModel,scene);controllerModel.dispatchEvent({type:"loaded"})},null,()=>{throw new Error(`Asset ${controllerModel.motionController.assetUrl} missing or malformed.`)})}}).catch(err=>{console.warn(err)})});controller.addEventListener("disconnected",()=>{controllerModel.motionController=null;controllerModel.remove(scene);scene=null});return controllerModel}}THREE.XRControllerModelFactory=XRControllerModelFactory})();(function(){const DepthLimitedBlurShader={defines:{"KERNEL_RADIUS":4,"DEPTH_PACKING":1,"PERSPECTIVE_CAMERA":1},uniforms:{"tDiffuse":{value:null},"size":{value:new THREE.Vector2(512,512)},"sampleUvOffsets":{value:[new THREE.Vector2(0,0)]},"sampleWeights":{value:[1]},"tDepth":{value:null},"cameraNear":{value:10},"cameraFar":{value:1000},"depthCutoff":{value:10}},vertexShader:`

		#include <common>

		uniform vec2 size;

		varying vec2 vUv;
		varying vec2 vInvSize;

		void main() {
			vUv = uv;
			vInvSize = 1.0 / size;

			gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
		}`,fragmentShader:`

		#include <common>
		#include <packing>

		uniform sampler2D tDiffuse;
		uniform sampler2D tDepth;

		uniform float cameraNear;
		uniform float cameraFar;
		uniform float depthCutoff;

		uniform vec2 sampleUvOffsets[ KERNEL_RADIUS + 1 ];
		uniform float sampleWeights[ KERNEL_RADIUS + 1 ];

		varying vec2 vUv;
		varying vec2 vInvSize;

		float getDepth( const in vec2 screenPosition ) {
			#if DEPTH_PACKING == 1
			return unpackRGBAToDepth( texture2D( tDepth, screenPosition ) );
			#else
			return texture2D( tDepth, screenPosition ).x;
			#endif
		}

		float getViewZ( const in float depth ) {
			#if PERSPECTIVE_CAMERA == 1
			return perspectiveDepthToViewZ( depth, cameraNear, cameraFar );
			#else
			return orthographicDepthToViewZ( depth, cameraNear, cameraFar );
			#endif
		}

		void main() {
			float depth = getDepth( vUv );
			if( depth >= ( 1.0 - EPSILON ) ) {
				discard;
			}

			float centerViewZ = -getViewZ( depth );
			bool rBreak = false, lBreak = false;

			float weightSum = sampleWeights[0];
			vec4 diffuseSum = texture2D( tDiffuse, vUv ) * weightSum;

			for( int i = 1; i <= KERNEL_RADIUS; i ++ ) {

				float sampleWeight = sampleWeights[i];
				vec2 sampleUvOffset = sampleUvOffsets[i] * vInvSize;

				vec2 sampleUv = vUv + sampleUvOffset;
				float viewZ = -getViewZ( getDepth( sampleUv ) );

				if( abs( viewZ - centerViewZ ) > depthCutoff ) rBreak = true;

				if( ! rBreak ) {
					diffuseSum += texture2D( tDiffuse, sampleUv ) * sampleWeight;
					weightSum += sampleWeight;
				}

				sampleUv = vUv - sampleUvOffset;
				viewZ = -getViewZ( getDepth( sampleUv ) );

				if( abs( viewZ - centerViewZ ) > depthCutoff ) lBreak = true;

				if( ! lBreak ) {
					diffuseSum += texture2D( tDiffuse, sampleUv ) * sampleWeight;
					weightSum += sampleWeight;
				}

			}

			gl_FragColor = diffuseSum / weightSum;
		}`};const BlurShaderUtils={createSampleWeights:function(kernelRadius,stdDev){const weights=[];for(let i=0;i<=kernelRadius;i++){weights.push(gaussian(i,stdDev))}return weights},createSampleOffsets:function(kernelRadius,uvIncrement){const offsets=[];for(let i=0;i<=kernelRadius;i++){offsets.push(uvIncrement.clone().multiplyScalar(i))}return offsets},configure:function(material,kernelRadius,stdDev,uvIncrement){material.defines["KERNEL_RADIUS"]=kernelRadius;material.uniforms["sampleUvOffsets"].value=BlurShaderUtils.createSampleOffsets(kernelRadius,uvIncrement);material.uniforms["sampleWeights"].value=BlurShaderUtils.createSampleWeights(kernelRadius,stdDev);material.needsUpdate=true}};function gaussian(x,stdDev){return Math.exp(-(x*x)/(2*(stdDev*stdDev)))/(Math.sqrt(2*Math.PI)*stdDev)}THREE.BlurShaderUtils=BlurShaderUtils;THREE.DepthLimitedBlurShader=DepthLimitedBlurShader})();(function(){class EffectComposer{constructor(renderer,renderTarget){this.renderer=renderer;if(renderTarget===undefined){const size=renderer.getSize(new THREE.Vector2);this._pixelRatio=renderer.getPixelRatio();this._width=size.width;this._height=size.height;renderTarget=new THREE.WebGLRenderTarget(this._width*this._pixelRatio,this._height*this._pixelRatio);renderTarget.texture.name="EffectComposer.rt1"}else{this._pixelRatio=1;this._width=renderTarget.width;this._height=renderTarget.height}this.renderTarget1=renderTarget;this.renderTarget2=renderTarget.clone();this.renderTarget2.texture.name="EffectComposer.rt2";this.writeBuffer=this.renderTarget1;this.readBuffer=this.renderTarget2;this.renderToScreen=true;this.passes=[];if(THREE.CopyShader===undefined){console.error("THREE.EffectComposer relies on THREE.CopyShader")}if(THREE.ShaderPass===undefined){console.error("THREE.EffectComposer relies on THREE.ShaderPass")}this.copyPass=new THREE.ShaderPass(THREE.CopyShader);this.clock=new THREE.Clock}swapBuffers(){const tmp=this.readBuffer;this.readBuffer=this.writeBuffer;this.writeBuffer=tmp}addPass(pass){this.passes.push(pass);pass.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(pass,index){this.passes.splice(index,0,pass);pass.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(pass){const index=this.passes.indexOf(pass);if(index!==-1){this.passes.splice(index,1)}}isLastEnabledPass(passIndex){for(let i=passIndex+1;i<this.passes.length;i++){if(this.passes[i].enabled){return false}}return true}render(deltaTime){if(deltaTime===undefined){deltaTime=this.clock.getDelta()}const currentRenderTarget=this.renderer.getRenderTarget();let maskActive=false;for(let i=0,il=this.passes.length;i<il;i++){const pass=this.passes[i];if(pass.enabled===false)continue;pass.renderToScreen=this.renderToScreen&&this.isLastEnabledPass(i);pass.render(this.renderer,this.writeBuffer,this.readBuffer,deltaTime,maskActive);if(pass.needsSwap){if(maskActive){const context=this.renderer.getContext();const stencil=this.renderer.state.buffers.stencil;stencil.setFunc(context.NOTEQUAL,1,4294967295);this.copyPass.render(this.renderer,this.writeBuffer,this.readBuffer,deltaTime);stencil.setFunc(context.EQUAL,1,4294967295)}this.swapBuffers()}if(THREE.MaskPass!==undefined){if(pass instanceof THREE.MaskPass){maskActive=true}else if(pass instanceof THREE.ClearMaskPass){maskActive=false}}}this.renderer.setRenderTarget(currentRenderTarget)}reset(renderTarget){if(renderTarget===undefined){const size=this.renderer.getSize(new THREE.Vector2);this._pixelRatio=this.renderer.getPixelRatio();this._width=size.width;this._height=size.height;renderTarget=this.renderTarget1.clone();renderTarget.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}this.renderTarget1.dispose();this.renderTarget2.dispose();this.renderTarget1=renderTarget;this.renderTarget2=renderTarget.clone();this.writeBuffer=this.renderTarget1;this.readBuffer=this.renderTarget2}setSize(width,height){this._width=width;this._height=height;const effectiveWidth=this._width*this._pixelRatio;const effectiveHeight=this._height*this._pixelRatio;this.renderTarget1.setSize(effectiveWidth,effectiveHeight);this.renderTarget2.setSize(effectiveWidth,effectiveHeight);for(let i=0;i<this.passes.length;i++){this.passes[i].setSize(effectiveWidth,effectiveHeight)}}setPixelRatio(pixelRatio){this._pixelRatio=pixelRatio;this.setSize(this._width,this._height)}}class Pass{constructor(){this.enabled=true;this.needsSwap=true;this.clear=false;this.renderToScreen=false}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}}const _camera=new THREE.OrthographicCamera(-1,1,1,-1,0,1);const _geometry=new THREE.BufferGeometry;_geometry.setAttribute("position",new THREE.Float32BufferAttribute([-1,3,0,-1,-1,0,3,-1,0],3));_geometry.setAttribute("uv",new THREE.Float32BufferAttribute([0,2,0,0,2,0],2));class FullScreenQuad{constructor(material){this._mesh=new THREE.Mesh(_geometry,material)}dispose(){this._mesh.geometry.dispose()}render(renderer){renderer.render(this._mesh,_camera)}get material(){return this._mesh.material}set material(value){this._mesh.material=value}}THREE.EffectComposer=EffectComposer;THREE.FullScreenQuad=FullScreenQuad;THREE.Pass=Pass})();(function(){const BlendShader={uniforms:{"tDiffuse1":{value:null},"tDiffuse2":{value:null},"mixRatio":{value:0.5},"opacity":{value:1}},vertexShader:`

		varying vec2 vUv;

		void main() {

			vUv = uv;
			gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );

		}`,fragmentShader:`

		uniform float opacity;
		uniform float mixRatio;

		uniform sampler2D tDiffuse1;
		uniform sampler2D tDiffuse2;

		varying vec2 vUv;

		void main() {

			vec4 texel1 = texture2D( tDiffuse1, vUv );
			vec4 texel2 = texture2D( tDiffuse2, vUv );
			gl_FragColor = mix( texel1, texel2, mixRatio );
			gl_FragColor.a *= opacity;

		}`};THREE.BlendShader=BlendShader})();(function(){const CopyShader={uniforms:{"tDiffuse":{value:null},"opacity":{value:1}},vertexShader:`

		varying vec2 vUv;

		void main() {

			vUv = uv;
			gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );

		}`,fragmentShader:`

		uniform float opacity;

		uniform sampler2D tDiffuse;

		varying vec2 vUv;

		void main() {

			gl_FragColor = texture2D( tDiffuse, vUv );
			gl_FragColor.a *= opacity;


		}`};THREE.CopyShader=CopyShader})();(function(){const FXAAShader={uniforms:{"tDiffuse":{value:null},"resolution":{value:new THREE.Vector2(1/1024,1/512)}},vertexShader:`

		varying vec2 vUv;

		void main() {

			vUv = uv;
			gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );

		}`,fragmentShader:`
	precision highp float;

	uniform sampler2D tDiffuse;

	uniform vec2 resolution;

	varying vec2 vUv;

	// FXAA 3.11 implementation by NVIDIA, ported to WebGL by Agost Biro (biro@archilogic.com)

	//----------------------------------------------------------------------------------
	// File:        es3-kepler\FXAA\assets\shaders/FXAA_DefaultES.frag
	// SDK Version: v3.00
	// Email:       gameworks@nvidia.com
	// Site:        http://developer.nvidia.com/
	//
	// Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.
	//
	// Redistribution and use in source and binary forms, with or without
	// modification, are permitted provided that the following conditions
	// are met:
	//  * Redistributions of source code must retain the above copyright
	//    notice, this list of conditions and the following disclaimer.
	//  * Redistributions in binary form must reproduce the above copyright
	//    notice, this list of conditions and the following disclaimer in the
	//    documentation and/or other materials provided with the distribution.
	//  * Neither the name of NVIDIA CORPORATION nor the names of its
	//    contributors may be used to endorse or promote products derived
	//    from this software without specific prior written permission.
	//
	// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
	// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
	// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
	// PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
	// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
	// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
	// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
	// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
	// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
	// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
	// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
	//
	//----------------------------------------------------------------------------------

	#ifndef FXAA_DISCARD
			//
			// Only valid for PC OpenGL currently.
			// Probably will not work when FXAA_GREEN_AS_LUMA = 1.
			//
			// 1 = Use discard on pixels which don't need AA.
			//     For APIs which enable concurrent TEX+ROP from same surface.
			// 0 = Return unchanged color on pixels which don't need AA.
			//
			#define FXAA_DISCARD 0
	#endif

	/*--------------------------------------------------------------------------*/
	#define FxaaTexTop(t, p) texture2D(t, p, -100.0)
	#define FxaaTexOff(t, p, o, r) texture2D(t, p + (o * r), -100.0)
	/*--------------------------------------------------------------------------*/

	#define NUM_SAMPLES 5

	// assumes colors have premultipliedAlpha, so that the calculated color contrast is scaled by alpha
	float contrast( vec4 a, vec4 b ) {
			vec4 diff = abs( a - b );
			return max( max( max( diff.r, diff.g ), diff.b ), diff.a );
	}

	/*============================================================================

									FXAA3 QUALITY - PC

	============================================================================*/

	/*--------------------------------------------------------------------------*/
	vec4 FxaaPixelShader(
			vec2 posM,
			sampler2D tex,
			vec2 fxaaQualityRcpFrame,
			float fxaaQualityEdgeThreshold,
			float fxaaQualityinvEdgeThreshold
	) {
			vec4 rgbaM = FxaaTexTop(tex, posM);
			vec4 rgbaS = FxaaTexOff(tex, posM, vec2( 0.0, 1.0), fxaaQualityRcpFrame.xy);
			vec4 rgbaE = FxaaTexOff(tex, posM, vec2( 1.0, 0.0), fxaaQualityRcpFrame.xy);
			vec4 rgbaN = FxaaTexOff(tex, posM, vec2( 0.0,-1.0), fxaaQualityRcpFrame.xy);
			vec4 rgbaW = FxaaTexOff(tex, posM, vec2(-1.0, 0.0), fxaaQualityRcpFrame.xy);
			// . S .
			// W M E
			// . N .

			bool earlyExit = max( max( max(
					contrast( rgbaM, rgbaN ),
					contrast( rgbaM, rgbaS ) ),
					contrast( rgbaM, rgbaE ) ),
					contrast( rgbaM, rgbaW ) )
					< fxaaQualityEdgeThreshold;
			// . 0 .
			// 0 0 0
			// . 0 .

			#if (FXAA_DISCARD == 1)
					if(earlyExit) FxaaDiscard;
			#else
					if(earlyExit) return rgbaM;
			#endif

			float contrastN = contrast( rgbaM, rgbaN );
			float contrastS = contrast( rgbaM, rgbaS );
			float contrastE = contrast( rgbaM, rgbaE );
			float contrastW = contrast( rgbaM, rgbaW );

			float relativeVContrast = ( contrastN + contrastS ) - ( contrastE + contrastW );
			relativeVContrast *= fxaaQualityinvEdgeThreshold;

			bool horzSpan = relativeVContrast > 0.;
			// . 1 .
			// 0 0 0
			// . 1 .

			// 45 deg edge detection and corners of objects, aka V/H contrast is too similar
			if( abs( relativeVContrast ) < .3 ) {
					// locate the edge
					vec2 dirToEdge;
					dirToEdge.x = contrastE > contrastW ? 1. : -1.;
					dirToEdge.y = contrastS > contrastN ? 1. : -1.;
					// . 2 .      . 1 .
					// 1 0 2  ~=  0 0 1
					// . 1 .      . 0 .

					// tap 2 pixels and see which ones are "outside" the edge, to
					// determine if the edge is vertical or horizontal

					vec4 rgbaAlongH = FxaaTexOff(tex, posM, vec2( dirToEdge.x, -dirToEdge.y ), fxaaQualityRcpFrame.xy);
					float matchAlongH = contrast( rgbaM, rgbaAlongH );
					// . 1 .
					// 0 0 1
					// . 0 H

					vec4 rgbaAlongV = FxaaTexOff(tex, posM, vec2( -dirToEdge.x, dirToEdge.y ), fxaaQualityRcpFrame.xy);
					float matchAlongV = contrast( rgbaM, rgbaAlongV );
					// V 1 .
					// 0 0 1
					// . 0 .

					relativeVContrast = matchAlongV - matchAlongH;
					relativeVContrast *= fxaaQualityinvEdgeThreshold;

					if( abs( relativeVContrast ) < .3 ) { // 45 deg edge
							// 1 1 .
							// 0 0 1
							// . 0 1

							// do a simple blur
							return mix(
									rgbaM,
									(rgbaN + rgbaS + rgbaE + rgbaW) * .25,
									.4
							);
					}

					horzSpan = relativeVContrast > 0.;
			}

			if(!horzSpan) rgbaN = rgbaW;
			if(!horzSpan) rgbaS = rgbaE;
			// . 0 .      1
			// 1 0 1  ->  0
			// . 0 .      1

			bool pairN = contrast( rgbaM, rgbaN ) > contrast( rgbaM, rgbaS );
			if(!pairN) rgbaN = rgbaS;

			vec2 offNP;
			offNP.x = (!horzSpan) ? 0.0 : fxaaQualityRcpFrame.x;
			offNP.y = ( horzSpan) ? 0.0 : fxaaQualityRcpFrame.y;

			bool doneN = false;
			bool doneP = false;

			float nDist = 0.;
			float pDist = 0.;

			vec2 posN = posM;
			vec2 posP = posM;

			int iterationsUsed = 0;
			int iterationsUsedN = 0;
			int iterationsUsedP = 0;
			for( int i = 0; i < NUM_SAMPLES; i++ ) {
					iterationsUsed = i;

					float increment = float(i + 1);

					if(!doneN) {
							nDist += increment;
							posN = posM + offNP * nDist;
							vec4 rgbaEndN = FxaaTexTop(tex, posN.xy);
							doneN = contrast( rgbaEndN, rgbaM ) > contrast( rgbaEndN, rgbaN );
							iterationsUsedN = i;
					}

					if(!doneP) {
							pDist += increment;
							posP = posM - offNP * pDist;
							vec4 rgbaEndP = FxaaTexTop(tex, posP.xy);
							doneP = contrast( rgbaEndP, rgbaM ) > contrast( rgbaEndP, rgbaN );
							iterationsUsedP = i;
					}

					if(doneN || doneP) break;
			}


			if ( !doneP && !doneN ) return rgbaM; // failed to find end of edge

			float dist = min(
					doneN ? float( iterationsUsedN ) / float( NUM_SAMPLES - 1 ) : 1.,
					doneP ? float( iterationsUsedP ) / float( NUM_SAMPLES - 1 ) : 1.
			);

			// hacky way of reduces blurriness of mostly diagonal edges
			// but reduces AA quality
			dist = pow(dist, .5);

			dist = 1. - dist;

			return mix(
					rgbaM,
					rgbaN,
					dist * .5
			);
	}

	void main() {
			const float edgeDetectionQuality = .2;
			const float invEdgeDetectionQuality = 1. / edgeDetectionQuality;

			gl_FragColor = FxaaPixelShader(
					vUv,
					tDiffuse,
					resolution,
					edgeDetectionQuality, // [0,1] contrast needed, otherwise early discard
					invEdgeDetectionQuality
			);

	}
	`};THREE.FXAAShader=FXAAShader})();(function(){const GammaCorrectionShader={uniforms:{"tDiffuse":{value:null}},vertexShader:`

		varying vec2 vUv;

		void main() {

			vUv = uv;
			gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );

		}`,fragmentShader:`

		uniform sampler2D tDiffuse;

		varying vec2 vUv;

		

		void main() {

			vec4 tex = texture2D( tDiffuse, vUv );

			gl_FragColor = sRGBTransferOETF( tex );

		}`};THREE.GammaCorrectionShader=GammaCorrectionShader})();(function(require){class CustomRenderPass extends THREE.Pass{constructor(renderCallback){super();this.renderCallback=renderCallback;this.scene=null;this.camera=null;this.clear=true;this.clearDepth=false;this.needsSwap=false}render(renderer,writeBuffer,readBuffer,delta,maskActive){var oldAutoClear=renderer.autoClear;renderer.autoClear=false;this.renderCallback(renderer,this.scene,this.camera,this.renderToScreen?null:readBuffer,this.clear);renderer.autoClear=oldAutoClear}}THREE.CustomRenderPass=CustomRenderPass})();(function(){class MaskPass extends THREE.Pass{constructor(scene,camera){super();this.scene=scene;this.camera=camera;this.clear=true;this.needsSwap=false;this.inverse=false}render(renderer,writeBuffer,readBuffer){const context=renderer.getContext();const state=renderer.state;state.buffers.color.setMask(false);state.buffers.depth.setMask(false);state.buffers.color.setLocked(true);state.buffers.depth.setLocked(true);let writeValue,clearValue;if(this.inverse){writeValue=0;clearValue=1}else{writeValue=1;clearValue=0}state.buffers.stencil.setTest(true);state.buffers.stencil.setOp(context.REPLACE,context.REPLACE,context.REPLACE);state.buffers.stencil.setFunc(context.ALWAYS,writeValue,4294967295);state.buffers.stencil.setClear(clearValue);state.buffers.stencil.setLocked(true);renderer.setRenderTarget(readBuffer);if(this.clear)renderer.clear();renderer.render(this.scene,this.camera);renderer.setRenderTarget(writeBuffer);if(this.clear)renderer.clear();renderer.render(this.scene,this.camera);state.buffers.color.setLocked(false);state.buffers.depth.setLocked(false);state.buffers.stencil.setLocked(false);state.buffers.stencil.setFunc(context.EQUAL,1,4294967295);state.buffers.stencil.setOp(context.KEEP,context.KEEP,context.KEEP);state.buffers.stencil.setLocked(true)}}class ClearMaskPass extends THREE.Pass{constructor(){super();this.needsSwap=false}render(renderer){renderer.state.buffers.stencil.setLocked(false);renderer.state.buffers.stencil.setTest(false)}}THREE.ClearMaskPass=ClearMaskPass;THREE.MaskPass=MaskPass})();(function(){var vertexShader=["varying vec2 vUv;","void main() {","    gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","    vUv = uv;","}"].join("\n");var fragmentShader=["varying vec2 vUv;","uniform sampler2D tDepth;","uniform sampler2D tColor;","uniform mat4 inverseProjectionMatrix;","uniform float near;","uniform float far;","uniform float depthLimit;","uniform mat4 clipToWorldMatrix;","uniform mat4 previousWorldToClipMatrix;","uniform vec3 cameraMove;    ","uniform float velocityFactor;","uniform float delta;","void main() {","    float zOverW = texture2D(tDepth, vUv).x;","    vec4 clipPosition = vec4(vUv.x * 2. - 1., vUv.y * 2. - 1., zOverW * 2. - 1., 1.);","    vec4 cameraSpacePosition = inverseProjectionMatrix * clipPosition;","    cameraSpacePosition /= cameraSpacePosition.w;","    float depth = -(cameraSpacePosition.z - near) / (far - near);","    if (depth > depthLimit)","    {","       gl_FragColor = texture2D(tColor, vUv);","       return;","    }","    vec4 worldPosition = clipToWorldMatrix * clipPosition;","    worldPosition /= worldPosition.w;","    vec4 previousClipPosition = worldPosition;","    previousClipPosition.xyz -= cameraMove * (","        1. - smoothstep(.3, 1., clamp(length(clipPosition.xy), 0., 1.))","    );","    previousClipPosition = previousWorldToClipMatrix * previousClipPosition;","    previousClipPosition /= previousClipPosition.w;","    vec2 velocity = velocityFactor * (clipPosition - previousClipPosition).xy / delta * 16.67;","    vec4 finalColor = vec4(0.);","    vec2 offset = vec2(0.);","    float weight = 0.;","    for(int i = 0; i < SAMPLE_COUNT; i++) {","            offset = velocity * (float(i) / (float(SAMPLE_COUNT) - 1.) - .5);","            vec4 c = texture2D(tColor, vUv + offset);","        finalColor += c;","    }","    finalColor /= float(SAMPLE_COUNT);","    gl_FragColor = vec4(finalColor.rgb, 1.);","}"].join("\n");var uniforms={"tDepth":{type:"t",value:null},"tColor":{type:"t",value:null},"velocityFactor":{type:"f",value:1},"delta":{type:"f",value:16.67},"inverseProjectionMatrix":{type:"m4",value:new THREE.Matrix4},"clipToWorldMatrix":{type:"m4",value:new THREE.Matrix4},"previousWorldToClipMatrix":{type:"m4",value:new THREE.Matrix4},"cameraMove":{type:"v3",value:new THREE.Vector3},"near":{type:"f",value:1},"far":{type:"f",value:1000},"depthLimit":{type:"f",value:0.99}};class MotionBlurPass extends THREE.Pass{constructor(sampleCount){super();this._sampleCount=sampleCount;this.uniforms=THREE.UniformsUtils.clone(uniforms);this.material=new THREE.ShaderMaterial({defines:{},uniforms:this.uniforms,vertexShader:vertexShader,fragmentShader:"#define SAMPLE_COUNT "+sampleCount+"\n"+fragmentShader});this.fsQuad=new THREE.FullScreenQuad(this.material)}getSampleCount(){return this._sampleCount}render(renderer,writeBuffer,readBuffer,deltaTime,maskActive){this.uniforms["tColor"].value=readBuffer.texture;this.uniforms["tDepth"].value=readBuffer.depthTexture;this.fsQuad.material=this.material;if(this.renderToScreen){renderer.setRenderTarget(null);this.fsQuad.render(renderer)}else{renderer.setRenderTarget(writeBuffer);if(this.clear)renderer.clear(renderer.autoClearColor,renderer.autoClearDepth,renderer.autoClearStencil);this.fsQuad.render(renderer)}}dispose(){this.fsQuad.dispose();this.material.dispose()}};THREE.MotionBlurPass=MotionBlurPass})();(function(){class RenderPass extends THREE.Pass{constructor(scene,camera,overrideMaterial,clearColor,clearAlpha){super();this.scene=scene;this.camera=camera;this.overrideMaterial=overrideMaterial;this.clearColor=clearColor;this.clearAlpha=clearAlpha!==undefined?clearAlpha:0;this.clear=true;this.clearDepth=false;this.needsSwap=false;this._oldClearColor=new THREE.Color}render(renderer,writeBuffer,readBuffer){const oldAutoClear=renderer.autoClear;renderer.autoClear=false;let oldClearAlpha,oldOverrideMaterial;if(this.overrideMaterial!==undefined){oldOverrideMaterial=this.scene.overrideMaterial;this.scene.overrideMaterial=this.overrideMaterial}if(this.clearColor){renderer.getClearColor(this._oldClearColor);oldClearAlpha=renderer.getClearAlpha();renderer.setClearColor(this.clearColor,this.clearAlpha)}if(this.clearDepth){renderer.clearDepth()}renderer.setRenderTarget(this.renderToScreen?null:readBuffer);if(this.clear)renderer.clear(renderer.autoClearColor,renderer.autoClearDepth,renderer.autoClearStencil);renderer.render(this.scene,this.camera);if(this.clearColor){renderer.setClearColor(this._oldClearColor,oldClearAlpha)}if(this.overrideMaterial!==undefined){this.scene.overrideMaterial=oldOverrideMaterial}renderer.autoClear=oldAutoClear}}THREE.RenderPass=RenderPass})();(function(){class SAOPass extends THREE.Pass{constructor(scene,camera,useDepthTexture=false,useNormals=false,resolution=new THREE.Vector2(256,256)){super();this.scene=scene;this.camera=camera;this.clear=true;this.needsSwap=false;this.supportsDepthTextureExtension=useDepthTexture;this.supportsNormalTexture=useNormals;this.originalClearColor=new THREE.Color;this._oldClearColor=new THREE.Color;this.oldClearAlpha=1;this.params={output:0,saoBias:0.5,saoIntensity:0.18,saoScale:1,saoKernelRadius:100,saoMinResolution:0,saoBlur:true,saoBlurRadius:8,saoBlurStdDev:4,saoBlurDepthCutoff:0.01};this.resolution=new THREE.Vector2(resolution.x,resolution.y);this.saoRenderTarget=new THREE.WebGLRenderTarget(this.resolution.x,this.resolution.y);this.blurIntermediateRenderTarget=this.saoRenderTarget.clone();this.beautyRenderTarget=this.saoRenderTarget.clone();this.normalRenderTarget=new THREE.WebGLRenderTarget(this.resolution.x,this.resolution.y,{minFilter:THREE.NearestFilter,magFilter:THREE.NearestFilter});this.depthRenderTarget=this.normalRenderTarget.clone();let depthTexture;if(this.supportsDepthTextureExtension){depthTexture=new THREE.DepthTexture;depthTexture.type=THREE.UnsignedShortType;this.beautyRenderTarget.depthTexture=depthTexture;this.beautyRenderTarget.depthBuffer=true}this.depthMaterial=new THREE.MeshDepthMaterial;this.depthMaterial.depthPacking=THREE.RGBADepthPacking;this.depthMaterial.blending=THREE.NoBlending;this.normalMaterial=new THREE.MeshNormalMaterial;this.normalMaterial.blending=THREE.NoBlending;if(THREE.SAOShader===undefined){console.error("THREE.SAOPass relies on THREE.SAOShader")}this.saoMaterial=new THREE.ShaderMaterial({defines:Object.assign({},THREE.SAOShader.defines),fragmentShader:THREE.SAOShader.fragmentShader,vertexShader:THREE.SAOShader.vertexShader,uniforms:THREE.UniformsUtils.clone(THREE.SAOShader.uniforms)});this.saoMaterial.extensions.derivatives=true;this.saoMaterial.defines["DEPTH_PACKING"]=this.supportsDepthTextureExtension?0:1;this.saoMaterial.defines["NORMAL_TEXTURE"]=this.supportsNormalTexture?1:0;this.saoMaterial.defines["PERSPECTIVE_CAMERA"]=this.camera.isPerspectiveCamera?1:0;this.saoMaterial.uniforms["tDepth"].value=this.supportsDepthTextureExtension?depthTexture:this.depthRenderTarget.texture;this.saoMaterial.uniforms["tNormal"].value=this.normalRenderTarget.texture;this.saoMaterial.uniforms["size"].value.set(this.resolution.x,this.resolution.y);this.saoMaterial.uniforms["cameraInverseProjectionMatrix"].value.copy(this.camera.projectionMatrixInverse);this.saoMaterial.uniforms["cameraProjectionMatrix"].value=this.camera.projectionMatrix;this.saoMaterial.blending=THREE.NoBlending;if(THREE.DepthLimitedBlurShader===undefined){console.error("THREE.SAOPass relies on THREE.DepthLimitedBlurShader")}this.vBlurMaterial=new THREE.ShaderMaterial({uniforms:THREE.UniformsUtils.clone(THREE.DepthLimitedBlurShader.uniforms),defines:Object.assign({},THREE.DepthLimitedBlurShader.defines),vertexShader:THREE.DepthLimitedBlurShader.vertexShader,fragmentShader:THREE.DepthLimitedBlurShader.fragmentShader});this.vBlurMaterial.defines["DEPTH_PACKING"]=this.supportsDepthTextureExtension?0:1;this.vBlurMaterial.defines["PERSPECTIVE_CAMERA"]=this.camera.isPerspectiveCamera?1:0;this.vBlurMaterial.uniforms["tDiffuse"].value=this.saoRenderTarget.texture;this.vBlurMaterial.uniforms["tDepth"].value=this.supportsDepthTextureExtension?depthTexture:this.depthRenderTarget.texture;this.vBlurMaterial.uniforms["size"].value.set(this.resolution.x,this.resolution.y);this.vBlurMaterial.blending=THREE.NoBlending;this.hBlurMaterial=new THREE.ShaderMaterial({uniforms:THREE.UniformsUtils.clone(THREE.DepthLimitedBlurShader.uniforms),defines:Object.assign({},THREE.DepthLimitedBlurShader.defines),vertexShader:THREE.DepthLimitedBlurShader.vertexShader,fragmentShader:THREE.DepthLimitedBlurShader.fragmentShader});this.hBlurMaterial.defines["DEPTH_PACKING"]=this.supportsDepthTextureExtension?0:1;this.hBlurMaterial.defines["PERSPECTIVE_CAMERA"]=this.camera.isPerspectiveCamera?1:0;this.hBlurMaterial.uniforms["tDiffuse"].value=this.blurIntermediateRenderTarget.texture;this.hBlurMaterial.uniforms["tDepth"].value=this.supportsDepthTextureExtension?depthTexture:this.depthRenderTarget.texture;this.hBlurMaterial.uniforms["size"].value.set(this.resolution.x,this.resolution.y);this.hBlurMaterial.blending=THREE.NoBlending;if(THREE.CopyShader===undefined){console.error("THREE.SAOPass relies on THREE.CopyShader")}this.materialCopy=new THREE.ShaderMaterial({uniforms:THREE.UniformsUtils.clone(THREE.CopyShader.uniforms),vertexShader:THREE.CopyShader.vertexShader,fragmentShader:THREE.CopyShader.fragmentShader,blending:THREE.NoBlending});this.materialCopy.transparent=true;this.materialCopy.depthTest=false;this.materialCopy.depthWrite=false;this.materialCopy.blending=THREE.CustomBlending;this.materialCopy.blendSrc=THREE.DstColorFactor;this.materialCopy.blendDst=THREE.ZeroFactor;this.materialCopy.blendEquation=THREE.AddEquation;this.materialCopy.blendSrcAlpha=THREE.DstAlphaFactor;this.materialCopy.blendDstAlpha=THREE.ZeroFactor;this.materialCopy.blendEquationAlpha=THREE.AddEquation;if(THREE.UnpackDepthRGBAShader===undefined){console.error("THREE.SAOPass relies on THREE.UnpackDepthRGBAShader")}this.depthCopy=new THREE.ShaderMaterial({uniforms:THREE.UniformsUtils.clone(THREE.UnpackDepthRGBAShader.uniforms),vertexShader:THREE.UnpackDepthRGBAShader.vertexShader,fragmentShader:THREE.UnpackDepthRGBAShader.fragmentShader,blending:THREE.NoBlending});this.fsQuad=new THREE.FullScreenQuad(null)}render(renderer,writeBuffer,readBuffer){if(this.renderToScreen){this.materialCopy.blending=THREE.NoBlending;this.materialCopy.uniforms["tDiffuse"].value=readBuffer.texture;this.materialCopy.needsUpdate=true;this.renderPass(renderer,this.materialCopy,null)}if(this.params.output===1){return}renderer.getClearColor(this._oldClearColor);this.oldClearAlpha=renderer.getClearAlpha();const oldAutoClear=renderer.autoClear;renderer.autoClear=false;renderer.setRenderTarget(this.depthRenderTarget);renderer.clear();this.saoMaterial.uniforms["bias"].value=this.params.saoBias;this.saoMaterial.uniforms["intensity"].value=this.params.saoIntensity;this.saoMaterial.uniforms["scale"].value=this.params.saoScale;this.saoMaterial.uniforms["kernelRadius"].value=this.params.saoKernelRadius;this.saoMaterial.uniforms["minResolution"].value=this.params.saoMinResolution;this.saoMaterial.uniforms["cameraNear"].value=this.camera.near;this.saoMaterial.uniforms["cameraFar"].value=this.camera.far;const depthCutoff=this.params.saoBlurDepthCutoff*(this.camera.far-this.camera.near);this.vBlurMaterial.uniforms["depthCutoff"].value=depthCutoff;this.hBlurMaterial.uniforms["depthCutoff"].value=depthCutoff;this.vBlurMaterial.uniforms["cameraNear"].value=this.camera.near;this.vBlurMaterial.uniforms["cameraFar"].value=this.camera.far;this.hBlurMaterial.uniforms["cameraNear"].value=this.camera.near;this.hBlurMaterial.uniforms["cameraFar"].value=this.camera.far;this.params.saoBlurRadius=Math.floor(this.params.saoBlurRadius);if(this.prevStdDev!==this.params.saoBlurStdDev||this.prevNumSamples!==this.params.saoBlurRadius){THREE.BlurShaderUtils.configure(this.vBlurMaterial,this.params.saoBlurRadius,this.params.saoBlurStdDev,new THREE.Vector2(0,1));THREE.BlurShaderUtils.configure(this.hBlurMaterial,this.params.saoBlurRadius,this.params.saoBlurStdDev,new THREE.Vector2(1,0));this.prevStdDev=this.params.saoBlurStdDev;this.prevNumSamples=this.params.saoBlurRadius}renderer.setClearColor(0);renderer.setRenderTarget(this.beautyRenderTarget);renderer.clear();renderer.render(this.scene,this.camera);if(!this.supportsDepthTextureExtension){this.renderOverride(renderer,this.depthMaterial,this.depthRenderTarget,0,1)}if(this.supportsNormalTexture){this.renderOverride(renderer,this.normalMaterial,this.normalRenderTarget,7829503,1)}this.renderPass(renderer,this.saoMaterial,this.saoRenderTarget,16777215,1);if(this.params.saoBlur){this.renderPass(renderer,this.vBlurMaterial,this.blurIntermediateRenderTarget,16777215,1);this.renderPass(renderer,this.hBlurMaterial,this.saoRenderTarget,16777215,1)}let outputMaterial=this.materialCopy;if(this.params.output===3){if(this.supportsDepthTextureExtension){this.materialCopy.uniforms["tDiffuse"].value=this.beautyRenderTarget.depthTexture;this.materialCopy.needsUpdate=true}else{this.depthCopy.uniforms["tDiffuse"].value=this.depthRenderTarget.texture;this.depthCopy.needsUpdate=true;outputMaterial=this.depthCopy}}else if(this.params.output===4){this.materialCopy.uniforms["tDiffuse"].value=this.normalRenderTarget.texture;this.materialCopy.needsUpdate=true}else{this.materialCopy.uniforms["tDiffuse"].value=this.saoRenderTarget.texture;this.materialCopy.needsUpdate=true}if(this.params.output===0){outputMaterial.blending=THREE.CustomBlending}else{outputMaterial.blending=THREE.NoBlending}this.renderPass(renderer,outputMaterial,this.renderToScreen?null:readBuffer);renderer.setClearColor(this._oldClearColor,this.oldClearAlpha);renderer.autoClear=oldAutoClear}renderPass(renderer,passMaterial,renderTarget,clearColor,clearAlpha){renderer.getClearColor(this.originalClearColor);const originalClearAlpha=renderer.getClearAlpha();const originalAutoClear=renderer.autoClear;renderer.setRenderTarget(renderTarget);renderer.autoClear=false;if(clearColor!==undefined&&clearColor!==null){renderer.setClearColor(clearColor);renderer.setClearAlpha(clearAlpha||0);renderer.clear()}this.fsQuad.material=passMaterial;this.fsQuad.render(renderer);renderer.autoClear=originalAutoClear;renderer.setClearColor(this.originalClearColor);renderer.setClearAlpha(originalClearAlpha)}renderOverride(renderer,overrideMaterial,renderTarget,clearColor,clearAlpha){renderer.getClearColor(this.originalClearColor);const originalClearAlpha=renderer.getClearAlpha();const originalAutoClear=renderer.autoClear;renderer.setRenderTarget(renderTarget);renderer.autoClear=false;clearColor=overrideMaterial.clearColor||clearColor;clearAlpha=overrideMaterial.clearAlpha||clearAlpha;if(clearColor!==undefined&&clearColor!==null){renderer.setClearColor(clearColor);renderer.setClearAlpha(clearAlpha||0);renderer.clear()}this.scene.overrideMaterial=overrideMaterial;renderer.render(this.scene,this.camera);this.scene.overrideMaterial=null;renderer.autoClear=originalAutoClear;renderer.setClearColor(this.originalClearColor);renderer.setClearAlpha(originalClearAlpha)}setSize(width,height){this.beautyRenderTarget.setSize(width,height);this.saoRenderTarget.setSize(width,height);this.blurIntermediateRenderTarget.setSize(width,height);this.normalRenderTarget.setSize(width,height);this.depthRenderTarget.setSize(width,height);this.saoMaterial.uniforms["size"].value.set(width,height);this.saoMaterial.uniforms["cameraInverseProjectionMatrix"].value.copy(this.camera.projectionMatrixInverse);this.saoMaterial.uniforms["cameraProjectionMatrix"].value=this.camera.projectionMatrix;this.saoMaterial.needsUpdate=true;this.vBlurMaterial.uniforms["size"].value.set(width,height);this.vBlurMaterial.needsUpdate=true;this.hBlurMaterial.uniforms["size"].value.set(width,height);this.hBlurMaterial.needsUpdate=true}}SAOPass.OUTPUT={"Beauty":1,"Default":0,"SAO":2,"Depth":3,"Normal":4};THREE.SAOPass=SAOPass})();(function(){const SAOShader={defines:{"NUM_SAMPLES":7,"NUM_RINGS":4,"NORMAL_TEXTURE":0,"DIFFUSE_TEXTURE":0,"DEPTH_PACKING":1,"PERSPECTIVE_CAMERA":1},uniforms:{"tDepth":{value:null},"tDiffuse":{value:null},"tNormal":{value:null},"size":{value:new THREE.Vector2(512,512)},"cameraNear":{value:1},"cameraFar":{value:100},"cameraProjectionMatrix":{value:new THREE.Matrix4},"cameraInverseProjectionMatrix":{value:new THREE.Matrix4},"scale":{value:1},"intensity":{value:0.1},"bias":{value:0.5},"minResolution":{value:0},"kernelRadius":{value:100},"randomSeed":{value:0}},vertexShader:`

		varying vec2 vUv;

		void main() {
			vUv = uv;
			gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
		}`,fragmentShader:`

		#include <common>

		varying vec2 vUv;

		#if DIFFUSE_TEXTURE == 1
		uniform sampler2D tDiffuse;
		#endif

		uniform sampler2D tDepth;

		#if NORMAL_TEXTURE == 1
		uniform sampler2D tNormal;
		#endif

		uniform float cameraNear;
		uniform float cameraFar;
		uniform mat4 cameraProjectionMatrix;
		uniform mat4 cameraInverseProjectionMatrix;

		uniform float scale;
		uniform float intensity;
		uniform float bias;
		uniform float kernelRadius;
		uniform float minResolution;
		uniform vec2 size;
		uniform float randomSeed;

		// RGBA depth

		#include <packing>

		vec4 getDefaultColor( const in vec2 screenPosition ) {
			#if DIFFUSE_TEXTURE == 1
			return texture2D( tDiffuse, vUv );
			#else
			return vec4( 1.0 );
			#endif
		}

		float getDepth( const in vec2 screenPosition ) {
			#if DEPTH_PACKING == 1
			return unpackRGBAToDepth( texture2D( tDepth, screenPosition ) );
			#else
			return texture2D( tDepth, screenPosition ).x;
			#endif
		}

		float getViewZ( const in float depth ) {
			#if PERSPECTIVE_CAMERA == 1
			return perspectiveDepthToViewZ( depth, cameraNear, cameraFar );
			#else
			return orthographicDepthToViewZ( depth, cameraNear, cameraFar );
			#endif
		}

		vec3 getViewPosition( const in vec2 screenPosition, const in float depth, const in float viewZ ) {
			float clipW = cameraProjectionMatrix[2][3] * viewZ + cameraProjectionMatrix[3][3];
			vec4 clipPosition = vec4( ( vec3( screenPosition, depth ) - 0.5 ) * 2.0, 1.0 );
			clipPosition *= clipW; // unprojection.

			return ( cameraInverseProjectionMatrix * clipPosition ).xyz;
		}

		vec3 getViewNormal( const in vec3 viewPosition, const in vec2 screenPosition ) {
			#if NORMAL_TEXTURE == 1
			return unpackRGBToNormal( texture2D( tNormal, screenPosition ).xyz );
			#else
			return normalize( cross( dFdx( viewPosition ), dFdy( viewPosition ) ) );
			#endif
		}

		float scaleDividedByCameraFar;
		float minResolutionMultipliedByCameraFar;

		float getOcclusion( const in vec3 centerViewPosition, const in vec3 centerViewNormal, const in vec3 sampleViewPosition ) {
			vec3 viewDelta = sampleViewPosition - centerViewPosition;
			float viewDistance = length( viewDelta );
			float scaledScreenDistance = scaleDividedByCameraFar * viewDistance;

			return max(0.0, (dot(centerViewNormal, viewDelta) - minResolutionMultipliedByCameraFar) / scaledScreenDistance - bias) / (1.0 + pow2( scaledScreenDistance ) );
		}

		// moving costly divides into consts
		const float ANGLE_STEP = PI2 * float( NUM_RINGS ) / float( NUM_SAMPLES );
		const float INV_NUM_SAMPLES = 1.0 / float( NUM_SAMPLES );

		float getAmbientOcclusion( const in vec3 centerViewPosition ) {
			// precompute some variables require in getOcclusion.
			scaleDividedByCameraFar = scale / cameraFar;
			minResolutionMultipliedByCameraFar = minResolution * cameraFar;
			vec3 centerViewNormal = getViewNormal( centerViewPosition, vUv );

			// jsfiddle that shows sample pattern: https://jsfiddle.net/a16ff1p7/
			float angle = rand( vUv + randomSeed ) * PI2;
			vec2 radius = vec2( kernelRadius * INV_NUM_SAMPLES ) / size;
			vec2 radiusStep = radius;

			float occlusionSum = 0.0;
			float weightSum = 0.0;

			for( int i = 0; i < NUM_SAMPLES; i ++ ) {
				vec2 sampleUv = vUv + vec2( cos( angle ), sin( angle ) ) * radius;
				radius += radiusStep;
				angle += ANGLE_STEP;

				float sampleDepth = getDepth( sampleUv );
				if( sampleDepth >= ( 1.0 - EPSILON ) ) {
					continue;
				}

				float sampleViewZ = getViewZ( sampleDepth );
				vec3 sampleViewPosition = getViewPosition( sampleUv, sampleDepth, sampleViewZ );
				occlusionSum += getOcclusion( centerViewPosition, centerViewNormal, sampleViewPosition );
				weightSum += 1.0;
			}

			if( weightSum == 0.0 ) discard;

			return occlusionSum * ( intensity / weightSum );
		}

		void main() {
			float centerDepth = getDepth( vUv );
			if( centerDepth >= ( 1.0 - EPSILON ) ) {
				discard;
			}

			float centerViewZ = getViewZ( centerDepth );
			vec3 viewPosition = getViewPosition( vUv, centerDepth, centerViewZ );

			float ambientOcclusion = getAmbientOcclusion( viewPosition );

			gl_FragColor = getDefaultColor( vUv );
			gl_FragColor.xyz *=  1.0 - ambientOcclusion;
		}`};THREE.SAOShader=SAOShader})();(function(){class SavePass extends THREE.Pass{constructor(renderTarget){super();if(THREE.CopyShader===undefined)console.error("THREE.SavePass relies on THREE.CopyShader");const shader=THREE.CopyShader;this.textureID="tDiffuse";this.uniforms=THREE.UniformsUtils.clone(shader.uniforms);this.material=new THREE.ShaderMaterial({uniforms:this.uniforms,vertexShader:shader.vertexShader,fragmentShader:shader.fragmentShader});this.renderTarget=renderTarget;if(this.renderTarget===undefined){this.renderTarget=new THREE.WebGLRenderTarget(window.innerWidth,window.innerHeight);this.renderTarget.texture.name="SavePass.rt"}this.needsSwap=false;this.fsQuad=new THREE.FullScreenQuad(this.material)}render(renderer,writeBuffer,readBuffer){if(this.uniforms[this.textureID]){this.uniforms[this.textureID].value=readBuffer.texture}renderer.setRenderTarget(this.renderTarget);if(this.clear)renderer.clear();this.fsQuad.render(renderer)}}THREE.SavePass=SavePass})();(function(){class ShaderPass extends THREE.Pass{constructor(shader,textureID){super();this.textureID=textureID!==undefined?textureID:"tDiffuse";if(shader instanceof THREE.ShaderMaterial){this.uniforms=shader.uniforms;this.material=shader}else if(shader){this.uniforms=THREE.UniformsUtils.clone(shader.uniforms);this.material=new THREE.ShaderMaterial({defines:Object.assign({},shader.defines),uniforms:this.uniforms,vertexShader:shader.vertexShader,fragmentShader:shader.fragmentShader})}this.fsQuad=new THREE.FullScreenQuad(this.material)}render(renderer,writeBuffer,readBuffer){if(this.uniforms[this.textureID]){this.uniforms[this.textureID].value=readBuffer.texture}this.fsQuad.material=this.material;if(this.renderToScreen){renderer.setRenderTarget(null);this.fsQuad.render(renderer)}else{renderer.setRenderTarget(writeBuffer);if(this.clear)renderer.clear(renderer.autoClearColor,renderer.autoClearDepth,renderer.autoClearStencil);this.fsQuad.render(renderer)}}}THREE.ShaderPass=ShaderPass})();(function(){class SMAAPass extends THREE.Pass{constructor(width,height){super();this.edgesRT=new THREE.WebGLRenderTarget(width,height,{depthBuffer:false});this.edgesRT.texture.name="SMAAPass.edges";this.weightsRT=new THREE.WebGLRenderTarget(width,height,{depthBuffer:false});this.weightsRT.texture.name="SMAAPass.weights";const scope=this;const areaTextureImage=new Image;areaTextureImage.src=this.getAreaTexture();areaTextureImage.onload=function(){scope.areaTexture.needsUpdate=true};this.areaTexture=new THREE.Texture;this.areaTexture.name="SMAAPass.area";this.areaTexture.image=areaTextureImage;this.areaTexture.minFilter=THREE.LinearFilter;this.areaTexture.generateMipmaps=false;this.areaTexture.flipY=false;const searchTextureImage=new Image;searchTextureImage.src=this.getSearchTexture();searchTextureImage.onload=function(){scope.searchTexture.needsUpdate=true};this.searchTexture=new THREE.Texture;this.searchTexture.name="SMAAPass.search";this.searchTexture.image=searchTextureImage;this.searchTexture.magFilter=THREE.NearestFilter;this.searchTexture.minFilter=THREE.NearestFilter;this.searchTexture.generateMipmaps=false;this.searchTexture.flipY=false;if(THREE.SMAAEdgesShader===undefined){console.error("THREE.SMAAPass relies on SMAAShader")}this.uniformsEdges=THREE.UniformsUtils.clone(THREE.SMAAEdgesShader.uniforms);this.uniformsEdges["resolution"].value.set(1/width,1/height);this.materialEdges=new THREE.ShaderMaterial({defines:Object.assign({},THREE.SMAAEdgesShader.defines),uniforms:this.uniformsEdges,vertexShader:THREE.SMAAEdgesShader.vertexShader,fragmentShader:THREE.SMAAEdgesShader.fragmentShader});this.uniformsWeights=THREE.UniformsUtils.clone(THREE.SMAAWeightsShader.uniforms);this.uniformsWeights["resolution"].value.set(1/width,1/height);this.uniformsWeights["tDiffuse"].value=this.edgesRT.texture;this.uniformsWeights["tArea"].value=this.areaTexture;this.uniformsWeights["tSearch"].value=this.searchTexture;this.materialWeights=new THREE.ShaderMaterial({defines:Object.assign({},THREE.SMAAWeightsShader.defines),uniforms:this.uniformsWeights,vertexShader:THREE.SMAAWeightsShader.vertexShader,fragmentShader:THREE.SMAAWeightsShader.fragmentShader});this.uniformsBlend=THREE.UniformsUtils.clone(THREE.SMAABlendShader.uniforms);this.uniformsBlend["resolution"].value.set(1/width,1/height);this.uniformsBlend["tDiffuse"].value=this.weightsRT.texture;this.materialBlend=new THREE.ShaderMaterial({uniforms:this.uniformsBlend,vertexShader:THREE.SMAABlendShader.vertexShader,fragmentShader:THREE.SMAABlendShader.fragmentShader});this.needsSwap=false;this.fsQuad=new THREE.FullScreenQuad(null)}render(renderer,writeBuffer,readBuffer){this.uniformsEdges["tDiffuse"].value=readBuffer.texture;this.fsQuad.material=this.materialEdges;renderer.setRenderTarget(this.edgesRT);if(this.clear)renderer.clear();this.fsQuad.render(renderer);this.fsQuad.material=this.materialWeights;renderer.setRenderTarget(this.weightsRT);if(this.clear)renderer.clear();this.fsQuad.render(renderer);this.uniformsBlend["tColor"].value=readBuffer.texture;this.fsQuad.material=this.materialBlend;if(this.renderToScreen){renderer.setRenderTarget(null);this.fsQuad.render(renderer)}else{renderer.setRenderTarget(writeBuffer);if(this.clear)renderer.clear();this.fsQuad.render(renderer)}}setSize(width,height){this.edgesRT.setSize(width,height);this.weightsRT.setSize(width,height);this.materialEdges.uniforms["resolution"].value.set(1/width,1/height);this.materialWeights.uniforms["resolution"].value.set(1/width,1/height);this.materialBlend.uniforms["resolution"].value.set(1/width,1/height)}getAreaTexture(){return"data:image/png;base64, "}getSearchTexture(){return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAAAhCAAAAABIXyLAAAAAOElEQVRIx2NgGAWjYBSMglEwEICREYRgFBZBqDCSLA2MGPUIVQETE9iNUAqLR5gIeoQKRgwXjwAAGn4AtaFeYLEAAAAASUVORK5CYII="}}THREE.SMAAPass=SMAAPass})();(function(){const SMAAEdgesShader={defines:{"SMAA_THRESHOLD":"0.1"},uniforms:{"tDiffuse":{value:null},"resolution":{value:new THREE.Vector2(1/1024,1/512)}},vertexShader:`

		uniform vec2 resolution;

		varying vec2 vUv;
		varying vec4 vOffset[ 3 ];

		void SMAAEdgeDetectionVS( vec2 texcoord ) {
			vOffset[ 0 ] = texcoord.xyxy + resolution.xyxy * vec4( -1.0, 0.0, 0.0,  1.0 ); // WebGL port note: Changed sign in W component
			vOffset[ 1 ] = texcoord.xyxy + resolution.xyxy * vec4(  1.0, 0.0, 0.0, -1.0 ); // WebGL port note: Changed sign in W component
			vOffset[ 2 ] = texcoord.xyxy + resolution.xyxy * vec4( -2.0, 0.0, 0.0,  2.0 ); // WebGL port note: Changed sign in W component
		}

		void main() {

			vUv = uv;

			SMAAEdgeDetectionVS( vUv );

			gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );

		}`,fragmentShader:`

		uniform sampler2D tDiffuse;

		varying vec2 vUv;
		varying vec4 vOffset[ 3 ];

		vec4 SMAAColorEdgeDetectionPS( vec2 texcoord, vec4 offset[3], sampler2D colorTex ) {
			vec2 threshold = vec2( SMAA_THRESHOLD, SMAA_THRESHOLD );

			// Calculate color deltas:
			vec4 delta;
			vec3 C = texture2D( colorTex, texcoord ).rgb;

			vec3 Cleft = texture2D( colorTex, offset[0].xy ).rgb;
			vec3 t = abs( C - Cleft );
			delta.x = max( max( t.r, t.g ), t.b );

			vec3 Ctop = texture2D( colorTex, offset[0].zw ).rgb;
			t = abs( C - Ctop );
			delta.y = max( max( t.r, t.g ), t.b );

			// We do the usual threshold:
			vec2 edges = step( threshold, delta.xy );

			// Then discard if there is no edge:
			if ( dot( edges, vec2( 1.0, 1.0 ) ) == 0.0 )
				discard;

			// Calculate right and bottom deltas:
			vec3 Cright = texture2D( colorTex, offset[1].xy ).rgb;
			t = abs( C - Cright );
			delta.z = max( max( t.r, t.g ), t.b );

			vec3 Cbottom  = texture2D( colorTex, offset[1].zw ).rgb;
			t = abs( C - Cbottom );
			delta.w = max( max( t.r, t.g ), t.b );

			// Calculate the maximum delta in the direct neighborhood:
			float maxDelta = max( max( max( delta.x, delta.y ), delta.z ), delta.w );

			// Calculate left-left and top-top deltas:
			vec3 Cleftleft  = texture2D( colorTex, offset[2].xy ).rgb;
			t = abs( C - Cleftleft );
			delta.z = max( max( t.r, t.g ), t.b );

			vec3 Ctoptop = texture2D( colorTex, offset[2].zw ).rgb;
			t = abs( C - Ctoptop );
			delta.w = max( max( t.r, t.g ), t.b );

			// Calculate the final maximum delta:
			maxDelta = max( max( maxDelta, delta.z ), delta.w );

			// Local contrast adaptation in action:
			edges.xy *= step( 0.5 * maxDelta, delta.xy );

			return vec4( edges, 0.0, 0.0 );
		}

		void main() {

			gl_FragColor = SMAAColorEdgeDetectionPS( vUv, vOffset, tDiffuse );

		}`};const SMAAWeightsShader={defines:{"SMAA_MAX_SEARCH_STEPS":"8","SMAA_AREATEX_MAX_DISTANCE":"16","SMAA_AREATEX_PIXEL_SIZE":"( 1.0 / vec2( 160.0, 560.0 ) )","SMAA_AREATEX_SUBTEX_SIZE":"( 1.0 / 7.0 )"},uniforms:{"tDiffuse":{value:null},"tArea":{value:null},"tSearch":{value:null},"resolution":{value:new THREE.Vector2(1/1024,1/512)}},vertexShader:`

		uniform vec2 resolution;

		varying vec2 vUv;
		varying vec4 vOffset[ 3 ];
		varying vec2 vPixcoord;

		void SMAABlendingWeightCalculationVS( vec2 texcoord ) {
			vPixcoord = texcoord / resolution;

			// We will use these offsets for the searches later on (see @PSEUDO_GATHER4):
			vOffset[ 0 ] = texcoord.xyxy + resolution.xyxy * vec4( -0.25, 0.125, 1.25, 0.125 ); // WebGL port note: Changed sign in Y and W components
			vOffset[ 1 ] = texcoord.xyxy + resolution.xyxy * vec4( -0.125, 0.25, -0.125, -1.25 ); // WebGL port note: Changed sign in Y and W components

			// And these for the searches, they indicate the ends of the loops:
			vOffset[ 2 ] = vec4( vOffset[ 0 ].xz, vOffset[ 1 ].yw ) + vec4( -2.0, 2.0, -2.0, 2.0 ) * resolution.xxyy * float( SMAA_MAX_SEARCH_STEPS );

		}

		void main() {

			vUv = uv;

			SMAABlendingWeightCalculationVS( vUv );

			gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );

		}`,fragmentShader:`

		#define SMAASampleLevelZeroOffset( tex, coord, offset ) texture2D( tex, coord + float( offset ) * resolution, 0.0 )

		uniform sampler2D tDiffuse;
		uniform sampler2D tArea;
		uniform sampler2D tSearch;
		uniform vec2 resolution;

		varying vec2 vUv;
		varying vec4 vOffset[3];
		varying vec2 vPixcoord;

		#if __VERSION__ == 100
		vec2 round( vec2 x ) {
			return sign( x ) * floor( abs( x ) + 0.5 );
		}
		#endif

		float SMAASearchLength( sampler2D searchTex, vec2 e, float bias, float scale ) {
			// Not required if searchTex accesses are set to point:
			// float2 SEARCH_TEX_PIXEL_SIZE = 1.0 / float2(66.0, 33.0);
			// e = float2(bias, 0.0) + 0.5 * SEARCH_TEX_PIXEL_SIZE +
			//     e * float2(scale, 1.0) * float2(64.0, 32.0) * SEARCH_TEX_PIXEL_SIZE;
			e.r = bias + e.r * scale;
			return 255.0 * texture2D( searchTex, e, 0.0 ).r;
		}

		float SMAASearchXLeft( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {
			/**
				* @PSEUDO_GATHER4
				* This texcoord has been offset by (-0.25, -0.125) in the vertex shader to
				* sample between edge, thus fetching four edges in a row.
				* Sampling with different offsets in each direction allows to disambiguate
				* which edges are active from the four fetched ones.
				*/
			vec2 e = vec2( 0.0, 1.0 );

			for ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) { // WebGL port note: Changed while to for
				e = texture2D( edgesTex, texcoord, 0.0 ).rg;
				texcoord -= vec2( 2.0, 0.0 ) * resolution;
				if ( ! ( texcoord.x > end && e.g > 0.8281 && e.r == 0.0 ) ) break;
			}

			// We correct the previous (-0.25, -0.125) offset we applied:
			texcoord.x += 0.25 * resolution.x;

			// The searches are bias by 1, so adjust the coords accordingly:
			texcoord.x += resolution.x;

			// Disambiguate the length added by the last step:
			texcoord.x += 2.0 * resolution.x; // Undo last step
			texcoord.x -= resolution.x * SMAASearchLength(searchTex, e, 0.0, 0.5);

			return texcoord.x;
		}

		float SMAASearchXRight( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {
			vec2 e = vec2( 0.0, 1.0 );

			for ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) { // WebGL port note: Changed while to for
				e = texture2D( edgesTex, texcoord, 0.0 ).rg;
				texcoord += vec2( 2.0, 0.0 ) * resolution;
				if ( ! ( texcoord.x < end && e.g > 0.8281 && e.r == 0.0 ) ) break;
			}

			texcoord.x -= 0.25 * resolution.x;
			texcoord.x -= resolution.x;
			texcoord.x -= 2.0 * resolution.x;
			texcoord.x += resolution.x * SMAASearchLength( searchTex, e, 0.5, 0.5 );

			return texcoord.x;
		}

		float SMAASearchYUp( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {
			vec2 e = vec2( 1.0, 0.0 );

			for ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) { // WebGL port note: Changed while to for
				e = texture2D( edgesTex, texcoord, 0.0 ).rg;
				texcoord += vec2( 0.0, 2.0 ) * resolution; // WebGL port note: Changed sign
				if ( ! ( texcoord.y > end && e.r > 0.8281 && e.g == 0.0 ) ) break;
			}

			texcoord.y -= 0.25 * resolution.y; // WebGL port note: Changed sign
			texcoord.y -= resolution.y; // WebGL port note: Changed sign
			texcoord.y -= 2.0 * resolution.y; // WebGL port note: Changed sign
			texcoord.y += resolution.y * SMAASearchLength( searchTex, e.gr, 0.0, 0.5 ); // WebGL port note: Changed sign

			return texcoord.y;
		}

		float SMAASearchYDown( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {
			vec2 e = vec2( 1.0, 0.0 );

			for ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) { // WebGL port note: Changed while to for
				e = texture2D( edgesTex, texcoord, 0.0 ).rg;
				texcoord -= vec2( 0.0, 2.0 ) * resolution; // WebGL port note: Changed sign
				if ( ! ( texcoord.y < end && e.r > 0.8281 && e.g == 0.0 ) ) break;
			}

			texcoord.y += 0.25 * resolution.y; // WebGL port note: Changed sign
			texcoord.y += resolution.y; // WebGL port note: Changed sign
			texcoord.y += 2.0 * resolution.y; // WebGL port note: Changed sign
			texcoord.y -= resolution.y * SMAASearchLength( searchTex, e.gr, 0.5, 0.5 ); // WebGL port note: Changed sign

			return texcoord.y;
		}

		vec2 SMAAArea( sampler2D areaTex, vec2 dist, float e1, float e2, float offset ) {
			// Rounding prevents precision errors of bilinear filtering:
			vec2 texcoord = float( SMAA_AREATEX_MAX_DISTANCE ) * round( 4.0 * vec2( e1, e2 ) ) + dist;

			// We do a scale and bias for mapping to texel space:
			texcoord = SMAA_AREATEX_PIXEL_SIZE * texcoord + ( 0.5 * SMAA_AREATEX_PIXEL_SIZE );

			// Move to proper place, according to the subpixel offset:
			texcoord.y += SMAA_AREATEX_SUBTEX_SIZE * offset;

			return texture2D( areaTex, texcoord, 0.0 ).rg;
		}

		vec4 SMAABlendingWeightCalculationPS( vec2 texcoord, vec2 pixcoord, vec4 offset[ 3 ], sampler2D edgesTex, sampler2D areaTex, sampler2D searchTex, ivec4 subsampleIndices ) {
			vec4 weights = vec4( 0.0, 0.0, 0.0, 0.0 );

			vec2 e = texture2D( edgesTex, texcoord ).rg;

			if ( e.g > 0.0 ) { // Edge at north
				vec2 d;

				// Find the distance to the left:
				vec2 coords;
				coords.x = SMAASearchXLeft( edgesTex, searchTex, offset[ 0 ].xy, offset[ 2 ].x );
				coords.y = offset[ 1 ].y; // offset[1].y = texcoord.y - 0.25 * resolution.y (@CROSSING_OFFSET)
				d.x = coords.x;

				// Now fetch the left crossing edges, two at a time using bilinear
				// filtering. Sampling at -0.25 (see @CROSSING_OFFSET) enables to
				// discern what value each edge has:
				float e1 = texture2D( edgesTex, coords, 0.0 ).r;

				// Find the distance to the right:
				coords.x = SMAASearchXRight( edgesTex, searchTex, offset[ 0 ].zw, offset[ 2 ].y );
				d.y = coords.x;

				// We want the distances to be in pixel units (doing this here allow to
				// better interleave arithmetic and memory accesses):
				d = d / resolution.x - pixcoord.x;

				// SMAAArea below needs a sqrt, as the areas texture is compressed
				// quadratically:
				vec2 sqrt_d = sqrt( abs( d ) );

				// Fetch the right crossing edges:
				coords.y -= 1.0 * resolution.y; // WebGL port note: Added
				float e2 = SMAASampleLevelZeroOffset( edgesTex, coords, ivec2( 1, 0 ) ).r;

				// Ok, we know how this pattern looks like, now it is time for getting
				// the actual area:
				weights.rg = SMAAArea( areaTex, sqrt_d, e1, e2, float( subsampleIndices.y ) );
			}

			if ( e.r > 0.0 ) { // Edge at west
				vec2 d;

				// Find the distance to the top:
				vec2 coords;

				coords.y = SMAASearchYUp( edgesTex, searchTex, offset[ 1 ].xy, offset[ 2 ].z );
				coords.x = offset[ 0 ].x; // offset[1].x = texcoord.x - 0.25 * resolution.x;
				d.x = coords.y;

				// Fetch the top crossing edges:
				float e1 = texture2D( edgesTex, coords, 0.0 ).g;

				// Find the distance to the bottom:
				coords.y = SMAASearchYDown( edgesTex, searchTex, offset[ 1 ].zw, offset[ 2 ].w );
				d.y = coords.y;

				// We want the distances to be in pixel units:
				d = d / resolution.y - pixcoord.y;

				// SMAAArea below needs a sqrt, as the areas texture is compressed
				// quadratically:
				vec2 sqrt_d = sqrt( abs( d ) );

				// Fetch the bottom crossing edges:
				coords.y -= 1.0 * resolution.y; // WebGL port note: Added
				float e2 = SMAASampleLevelZeroOffset( edgesTex, coords, ivec2( 0, 1 ) ).g;

				// Get the area for this direction:
				weights.ba = SMAAArea( areaTex, sqrt_d, e1, e2, float( subsampleIndices.x ) );
			}

			return weights;
		}

		void main() {

			gl_FragColor = SMAABlendingWeightCalculationPS( vUv, vPixcoord, vOffset, tDiffuse, tArea, tSearch, ivec4( 0.0 ) );

		}`};const SMAABlendShader={uniforms:{"tDiffuse":{value:null},"tColor":{value:null},"resolution":{value:new THREE.Vector2(1/1024,1/512)}},vertexShader:`

		uniform vec2 resolution;

		varying vec2 vUv;
		varying vec4 vOffset[ 2 ];

		void SMAANeighborhoodBlendingVS( vec2 texcoord ) {
			vOffset[ 0 ] = texcoord.xyxy + resolution.xyxy * vec4( -1.0, 0.0, 0.0, 1.0 ); // WebGL port note: Changed sign in W component
			vOffset[ 1 ] = texcoord.xyxy + resolution.xyxy * vec4( 1.0, 0.0, 0.0, -1.0 ); // WebGL port note: Changed sign in W component
		}

		void main() {

			vUv = uv;

			SMAANeighborhoodBlendingVS( vUv );

			gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );

		}`,fragmentShader:`

		uniform sampler2D tDiffuse;
		uniform sampler2D tColor;
		uniform vec2 resolution;

		varying vec2 vUv;
		varying vec4 vOffset[ 2 ];

		vec4 SMAANeighborhoodBlendingPS( vec2 texcoord, vec4 offset[ 2 ], sampler2D colorTex, sampler2D blendTex ) {
			// Fetch the blending weights for current pixel:
			vec4 a;
			a.xz = texture2D( blendTex, texcoord ).xz;
			a.y = texture2D( blendTex, offset[ 1 ].zw ).g;
			a.w = texture2D( blendTex, offset[ 1 ].xy ).a;

			// Is there any blending weight with a value greater than 0.0?
			if ( dot(a, vec4( 1.0, 1.0, 1.0, 1.0 )) < 1e-5 ) {
				return texture2D( colorTex, texcoord, 0.0 );
			} else {
				// Up to 4 lines can be crossing a pixel (one through each edge). We
				// favor blending by choosing the line with the maximum weight for each
				// direction:
				vec2 offset;
				offset.x = a.a > a.b ? a.a : -a.b; // left vs. right
				offset.y = a.g > a.r ? -a.g : a.r; // top vs. bottom // WebGL port note: Changed signs

				// Then we go in the direction that has the maximum weight:
				if ( abs( offset.x ) > abs( offset.y )) { // horizontal vs. vertical
					offset.y = 0.0;
				} else {
					offset.x = 0.0;
				}

				// Fetch the opposite color and lerp by hand:
				vec4 C = texture2D( colorTex, texcoord, 0.0 );
				texcoord += sign( offset ) * resolution;
				vec4 Cop = texture2D( colorTex, texcoord, 0.0 );
				float s = abs( offset.x ) > abs( offset.y ) ? abs( offset.x ) : abs( offset.y );

				// WebGL port note: Added gamma correction
				C.xyz = pow(C.xyz, vec3(2.2));
				Cop.xyz = pow(Cop.xyz, vec3(2.2));
				vec4 mixed = mix(C, Cop, s);
				mixed.xyz = pow(mixed.xyz, vec3(1.0 / 2.2));

				return mixed;
			}
		}

		void main() {

			gl_FragColor = SMAANeighborhoodBlendingPS( vUv, vOffset, tColor, tDiffuse );

		}`};THREE.SMAABlendShader=SMAABlendShader;THREE.SMAAEdgesShader=SMAAEdgesShader;THREE.SMAAWeightsShader=SMAAWeightsShader})();(function(){class SSAARenderPass extends THREE.Pass{constructor(scene,camera,clearColor,clearAlpha){super();this.scene=scene;this.camera=camera;this.sampleLevel=4;this.unbiased=true;this.clearColor=clearColor!==undefined?clearColor:0;this.clearAlpha=clearAlpha!==undefined?clearAlpha:0;this._oldClearColor=new THREE.Color;if(THREE.CopyShader===undefined)console.error("THREE.SSAARenderPass relies on THREE.CopyShader");const copyShader=THREE.CopyShader;this.copyUniforms=THREE.UniformsUtils.clone(copyShader.uniforms);this.copyMaterial=new THREE.ShaderMaterial({uniforms:this.copyUniforms,vertexShader:copyShader.vertexShader,fragmentShader:copyShader.fragmentShader,transparent:true,blending:THREE.AdditiveBlending,depthTest:false,depthWrite:false});this.fsQuad=new THREE.FullScreenQuad(this.copyMaterial)}dispose(){if(this.sampleRenderTarget){this.sampleRenderTarget.dispose();this.sampleRenderTarget=null}}setSize(width,height){if(this.sampleRenderTarget)this.sampleRenderTarget.setSize(width,height)}render(renderer,writeBuffer,readBuffer){if(!this.sampleRenderTarget){this.sampleRenderTarget=new THREE.WebGLRenderTarget(readBuffer.width,readBuffer.height);this.sampleRenderTarget.texture.name="SSAARenderPass.sample"}const jitterOffsets=_JitterVectors[Math.max(0,Math.min(this.sampleLevel,5))];const autoClear=renderer.autoClear;renderer.autoClear=false;renderer.getClearColor(this._oldClearColor);const oldClearAlpha=renderer.getClearAlpha();const baseSampleWeight=1/jitterOffsets.length;const roundingRange=1/32;this.copyUniforms["tDiffuse"].value=this.sampleRenderTarget.texture;const viewOffset={fullWidth:readBuffer.width,fullHeight:readBuffer.height,offsetX:0,offsetY:0,width:readBuffer.width,height:readBuffer.height};const originalViewOffset=Object.assign({},this.camera.view);if(originalViewOffset.enabled)Object.assign(viewOffset,originalViewOffset);for(let i=0;i<jitterOffsets.length;i++){const jitterOffset=jitterOffsets[i];if(this.camera.setViewOffset){this.camera.setViewOffset(viewOffset.fullWidth,viewOffset.fullHeight,viewOffset.offsetX+jitterOffset[0]*0.0625,viewOffset.offsetY+jitterOffset[1]*0.0625,viewOffset.width,viewOffset.height)}let sampleWeight=baseSampleWeight;if(this.unbiased){const uniformCenteredDistribution=-0.5+(i+0.5)/jitterOffsets.length;sampleWeight+=roundingRange*uniformCenteredDistribution}this.copyUniforms["opacity"].value=sampleWeight;renderer.setClearColor(this.clearColor,this.clearAlpha);renderer.setRenderTarget(this.sampleRenderTarget);renderer.clear();renderer.render(this.scene,this.camera);renderer.setRenderTarget(this.renderToScreen?null:writeBuffer);if(i===0){renderer.setClearColor(0,0);renderer.clear()}this.fsQuad.render(renderer)}if(this.camera.setViewOffset&&originalViewOffset.enabled){this.camera.setViewOffset(originalViewOffset.fullWidth,originalViewOffset.fullHeight,originalViewOffset.offsetX,originalViewOffset.offsetY,originalViewOffset.width,originalViewOffset.height)}else if(this.camera.clearViewOffset){this.camera.clearViewOffset()}renderer.autoClear=autoClear;renderer.setClearColor(this._oldClearColor,oldClearAlpha)}}const _JitterVectors=[[[0,0]],[[4,4],[-4,-4]],[[-2,-6],[6,-2],[-6,2],[2,6]],[[1,-3],[-1,3],[5,1],[-3,-5],[-5,5],[-7,-1],[3,7],[7,-7]],[[1,1],[-1,-3],[-3,2],[4,-1],[-5,-2],[2,5],[5,3],[3,-5],[-2,6],[0,-7],[-4,-6],[-6,4],[-8,0],[7,-4],[6,7],[-7,-8]],[[-4,-7],[-7,-5],[-3,-5],[-5,-4],[-1,-4],[-2,-2],[-6,-1],[-4,0],[-7,1],[-1,2],[-6,3],[-3,3],[-7,6],[-3,6],[-5,7],[-1,7],[5,-7],[1,-6],[6,-5],[4,-4],[2,-3],[7,-2],[1,-1],[4,-1],[2,1],[6,2],[0,4],[4,4],[2,5],[7,5],[5,6],[3,7]]];THREE.SSAARenderPass=SSAARenderPass})();(function(){const UnpackDepthRGBAShader={uniforms:{"tDiffuse":{value:null},"opacity":{value:1}},vertexShader:`

		varying vec2 vUv;

		void main() {

			vUv = uv;
			gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );

		}`,fragmentShader:`

		uniform float opacity;

		uniform sampler2D tDiffuse;

		varying vec2 vUv;

		#include <packing>

		void main() {

			float depth = 1.0 - unpackRGBAToDepth( texture2D( tDiffuse, vUv ) );
			gl_FragColor = vec4( vec3( depth ), opacity );

		}`};THREE.UnpackDepthRGBAShader=UnpackDepthRGBAShader})();

})(); } catch (e) { console.log(e.message, e.stack); throw e; };