1var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__commonJSMin=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),__exportAll=(e,t)=>{let n={};for(var r in e)__defProp(n,r,{get:e[r],enumerable:!0});return t||__defProp(n,Symbol.toStringTag,{value:`Module`}),n},__copyProps=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=__getOwnPropNames(t),a=0,o=i.length,s;a<o;a++)s=i[a],!__hasOwnProp.call(e,s)&&s!==n&&__defProp(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=__getOwnPropDesc(t,s))||r.enumerable});return e},__toESM=(e,t,n)=>(n=e==null?{}:__create(__getProtoOf(e)),__copyProps(t||!e||!e.__esModule?__defProp(n,`default`,{value:e,enumerable:!0}):n,e));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function bind(e,t){return function(){return e.apply(t,arguments)}}var{toString}=Object.prototype,{getPrototypeOf}=Object,{iterator,toStringTag}=Symbol,kindOf=(e=>t=>{let n=toString.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=e=>(e=e.toLowerCase(),t=>kindOf(t)===e),typeOfTest=e=>t=>typeof t===e,{isArray}=Array,isUndefined=typeOfTest(`undefined`);function isBuffer(e){return e!==null&&!isUndefined(e)&&e.constructor!==null&&!isUndefined(e.constructor)&&isFunction$1(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var isArrayBuffer=kindOfTest(`ArrayBuffer`);function isArrayBufferView(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&isArrayBuffer(e.buffer),t}var isString=typeOfTest(`string`),isFunction$1=typeOfTest(`function`),isNumber=typeOfTest(`number`),isObject=e=>typeof e==`object`&&!!e,isBoolean=e=>e===!0||e===!1,isPlainObject=e=>{if(kindOf(e)!==`object`)return!1;let t=getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(toStringTag in e)&&!(iterator in e)},isEmptyObject=e=>{if(!isObject(e)||isBuffer(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},isDate=kindOfTest(`Date`),isFile=kindOfTest(`File`),isReactNativeBlob=e=>!!(e&&e.uri!==void 0),isReactNative=e=>e&&e.getParts!==void 0,isBlob=kindOfTest(`Blob`),isFileList=kindOfTest(`FileList`),isStream=e=>isObject(e)&&isFunction$1(e.pipe);function getGlobal(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}}var G=getGlobal(),FormDataCtor=G.FormData===void 0?void 0:G.FormData,isFormData=e=>{if(!e)return!1;if(FormDataCtor&&e instanceof FormDataCtor)return!0;let t=getPrototypeOf(e);if(!t||t===Object.prototype||!isFunction$1(e.append))return!1;let n=kindOf(e);return n===`formdata`||n===`object`&&isFunction$1(e.toString)&&e.toString()===`[object FormData]`},isURLSearchParams=kindOfTest(`URLSearchParams`),[isReadableStream,isRequest,isResponse,isHeaders]=[`ReadableStream`,`Request`,`Response`,`Headers`].map(kindOfTest),trim=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``);function forEach(e,t,{allOwnKeys:n=!1}={}){if(e==null)return;let r,i;if(typeof e!=`object`&&(e=[e]),isArray(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(isBuffer(e))return;let i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length,o;for(r=0;r<a;r++)o=i[r],t.call(null,e[o],o,e)}}function findKey(e,t){if(isBuffer(e))return null;t=t.toLowerCase();let n=Object.keys(e),r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}var _global=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global,isContextDefined=e=>!isUndefined(e)&&e!==_global;function merge(...e){let{caseless:t,skipUndefined:n}=isContextDefined(this)&&this||{},r={},i=(e,i)=>{if(i===`__proto__`||i===`constructor`||i===`prototype`)return;let a=t&&findKey(r,i)||i,o=hasOwnProperty(r,a)?r[a]:void 0;isPlainObject(o)&&isPlainObject(e)?r[a]=merge(o,e):isPlainObject(e)?r[a]=merge({},e):isArray(e)?r[a]=e.slice():(!n||!isUndefined(e))&&(r[a]=e)};for(let t=0,n=e.length;t<n;t++)e[t]&&forEach(e[t],i);return r}var extend=(e,t,n,{allOwnKeys:r}={})=>(forEach(t,(t,r)=>{n&&isFunction$1(t)?Object.defineProperty(e,r,{__proto__:null,value:bind(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),stripBOM=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),inherits=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,
1configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject=(e,t,n,r)=>{let i,a,o,s={};if(t||={},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},endsWith=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},toArray$1=e=>{if(!e)return null;if(isArray(e))return e;let t=e.length;if(!isNumber(t))return null;let n=Array(t);for(;t-- >0;)n[t]=e[t];return n},isTypedArray$1=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&getPrototypeOf(Uint8Array)),forEachEntry=(e,t)=>{let n=(e&&e[iterator]).call(e),r;for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},matchAll=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},isHTMLForm=kindOfTest(`HTMLFormElement`),toCamelCase=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),hasOwnProperty=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),isRegExp=kindOfTest(`RegExp`),reduceDescriptors=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};forEach(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},freezeMethods=e=>{reduceDescriptors(e,(t,n)=>{if(isFunction$1(e)&&[`arguments`,`caller`,`callee`].includes(n))return!1;let r=e[n];if(isFunction$1(r)){if(t.enumerable=!1,`writable`in t){t.writable=!1;return}t.set||=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)}}})},toObjectSet=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return isArray(e)?r(e):r(String(e).split(t)),n},noop=()=>{},toFiniteNumber=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function isSpecCompliantForm(e){return!!(e&&isFunction$1(e.append)&&e[toStringTag]===`FormData`&&e[iterator])}var toJSONObject=e=>{let t=new WeakSet,n=e=>{if(isObject(e)){if(t.has(e))return;if(isBuffer(e))return e;if(!(`toJSON`in e)){t.add(e);let r=isArray(e)?[]:{};return forEach(e,(e,t)=>{let i=n(e);!isUndefined(i)&&(r[t]=i)}),t.delete(e),r}}return e};return n(e)},isAsyncFn=kindOfTest(`AsyncFunction`),isThenable=e=>e&&(isObject(e)||isFunction$1(e))&&isFunction$1(e.then)&&isFunction$1(e.catch),_setImmediate=((e,t)=>e?setImmediate:t?((e,t)=>(_global.addEventListener(`message`,({source:n,data:r})=>{n===_global&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),_global.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,isFunction$1(_global.postMessage)),asap=typeof queueMicrotask<`u`?queueMicrotask.bind(_global):typeof process<`u`&&process.nextTick||_setImmediate,isIterable=e=>e!=null&&isFunction$1(e[iterator]),utils_default={isArray,isArrayBuffer,isBuffer,isFormData,isArrayBufferView,isString,isNumber,isBoolean,isObject,isPlainObject,isEmptyObject,isReadableStream,isRequest,isResponse,isHeaders,isUndefined,isDate,isFile,isReactNativeBlob,isReactNative,isBlob,isRegExp,isFunction:isFunction$1,isStream,isURLSearchParams,isTypedArray:isTypedArray$1,isFileList,forEach,merge,extend,trim,stripBOM,inherits,toFlatObject,kindOf,kindOfTest,endsWith,toArray:toArray$1,forEachEntry,matchAll,isHTMLForm,hasOwnProperty,hasOwnProp:hasOwnProperty,reduceDescriptors,freezeMethods,toObjectSet,toCamelCase,noop,toFiniteNumber,findKey,global:_global,isContextDefined,isSpecCompliantForm,toJSONObject,isAsyncFn,isThenable,setImmediate:_setImmediate,asap,isIterable},ignoreDuplicateOf=utils_default.toObjectSet([`age`,`authorization`,`content-length`,`content-type`,`etag`,`expires`,`from`,`host`,`if-modified-since`,`if-unmodified-since`,`last-modified`,`location`,`max-forwards`,`proxy-authorization`,`referer`,`retry-after`,`user-agent`]),parseHeaders_default=e=>{let t={},n,r,i;return e&&e.split(` 2`).forEach(function(e){i=e.indexOf(`:`),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!(!n||t[n]&&ignoreDuplicateOf[n])&&(n===`set-cookie`?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+`, `+r:r)}),t};function trimSPorHTAB(e){let t=0,n=e.length;for(;t<n;){let n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;n>t;){let t=e.charCodeAt(n-1);if(t!==9&&t!==32)break;--n}return t===0&&n===e.length?e:e.slice(t,n)}
2var INVALID_UNICODE_HEADER_VALUE_CHARS=RegExp(`[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+`,`g`),INVALID_BYTE_STRING_HEADER_VALUE_CHARS=RegExp(`[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+`,`g`);function sanitizeValue(e,t){return utils_default.isArray(e)?e.map(e=>sanitizeValue(e,t)):trimSPorHTAB(String(e).replace(t,``))}var sanitizeHeaderValue=e=>sanitizeValue(e,INVALID_UNICODE_HEADER_VALUE_CHARS),sanitizeByteStringHeaderValue=e=>sanitizeValue(e,INVALID_BYTE_STRING_HEADER_VALUE_CHARS);function toByteStringHeaderObject(e){let t=Object.create(null);return utils_default.forEach(e.toJSON(),(e,n)=>{t[n]=sanitizeByteStringHeaderValue(e)}),t}var $internals=Symbol(`internals`);function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){return e===!1||e==null?e:utils_default.isArray(e)?e.map(normalizeValue):sanitizeHeaderValue(String(e))}function parseTokens(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}var isValidHeaderName=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function matchHeaderValue(e,t,n,r,i){if(utils_default.isFunction(r))return r.call(this,t,n);if(i&&(t=n),utils_default.isString(t)){if(utils_default.isString(r))return t.indexOf(r)!==-1;if(utils_default.isRegExp(r))return r.test(t)}}function formatHeader(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function buildAccessors(e,t){let n=utils_default.toCamelCase(` `+t);[`get`,`set`,`has`].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}var AxiosHeaders=class{constructor(e){e&&this.set(e)}set(e,t,n){let r=this;function i(e,t,n){let i=normalizeHeader(t);if(!i)throw Error(`header name must be a non-empty string`);let a=utils_default.findKey(r,i);(!a||r[a]===void 0||n===!0||n===void 0&&r[a]!==!1)&&(r[a||t]=normalizeValue(e))}let a=(e,t)=>utils_default.forEach(e,(e,n)=>i(e,n,t));if(utils_default.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(utils_default.isString(e)&&(e=e.trim())&&!isValidHeaderName(e))a(parseHeaders_default(e),t);else if(utils_default.isObject(e)&&utils_default.isIterable(e)){let n={},r,i;for(let t of e){if(!utils_default.isArray(t))throw TypeError(`Object iterator must return a key-value pair`);n[i=t[0]]=(r=n[i])?utils_default.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}a(n,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=normalizeHeader(e),e){let n=utils_default.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(t===!0)return parseTokens(e);if(utils_default.isFunction(t))return t.call(this,e,n);if(utils_default.isRegExp(t))return t.exec(e);throw TypeError(`parser must be boolean|regexp|function`)}}}has(e,t){if(e=normalizeHeader(e),e){let n=utils_default.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||matchHeaderValue(this,this[n],n,t)))}return!1}delete(e,t){let n=this,r=!1;function i(e){if(e=normalizeHeader(e),e){let i=utils_default.findKey(n,e);i&&(!t||matchHeaderValue(n,n[i],i,t))&&(delete n[i],r=!0)}}return utils_default.isArray(e)?e.forEach(i):i(e),r}clear(e){let t=Object.keys(this),n=t.length,r=!1;for(;n--;){let i=t[n];(!e||matchHeaderValue(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let t=this,n={};return utils_default.forEach(this,(r,i)=>{let a=utils_default.findKey(n,i);if(a){t[a]=normalizeValue(r),delete t[i];return}let o=e?formatHeader(i):String(i).trim();o!==i&&delete t[i],t[o]=normalizeValue(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return utils_default.forEach(this,(n,r)=>{n!=null&&n!==!1&&(t[r]=e&&utils_default.isArray(n)?n.join(`, `):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+`: `+t).join(` 3`)}getSetCookie(){return this.get(`set-cookie`)||[]}get[Symbol.toStringTag](){return`AxiosHeaders`}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[$internals]=this[$internals]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=normalizeHeader(e);t[r]||(buildAccessors(n,e),t[r]=!0)}return utils_default.isArray(e)?e.forEach(r):r(e),this}};AxiosHeaders.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),utils_default.reduceDescriptors(AxiosHeaders.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),utils_default.freezeMethods(AxiosHeaders);var REDACTED=`[REDACTED ****]`;function hasOwnOrPrototypeToJSON(e){if(utils_default.hasOwnProp(e,`toJSON`))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(utils_default.hasOwnProp(t,`toJSON`))return!0;t=Object.getPrototypeOf(t)}return!1}function redactConfig(e,t){let n=new Set(t.map(e=>String(e).toLowerCase())),r=[],i=e=>{if(typeof e!=`object`||!e||utils_default.isBuffer(e))return e;if(r.indexOf(e)!==-1)return;e instanceof AxiosHeaders&&(e=e.toJSON()),r.push(e);let t;if(utils_default.isArray(e))t=[],e.forEach((e,n)=>{let r=i(e);utils_default.isUndefined(r)||(t[n]=r)});else{if(!utils_default.isPlainObject(e)&&hasOwnOrPrototypeToJSON(e))return r.pop(),e;t=Object.create(null);for(let[r,a]of Object.entries(e)){let e=n.has(r.toLowerCase())?REDACTED:i(a);utils_default.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return i(e)}
3var AxiosError=class e extends Error{static from(t,n,r,i,a,o){let s=new e(t.message,n||t.code,r,i,a);return s.cause=t,s.name=t.name,t.status!=null&&s.status==null&&(s.status=t.status),o&&Object.assign(s,o),s}constructor(e,t,n,r,i){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name=`AxiosError`,this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){let e=this.config,t=e&&utils_default.hasOwnProp(e,`redact`)?e.redact:void 0,n=utils_default.isArray(t)&&t.length>0?redactConfig(e,t):utils_default.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};AxiosError.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,AxiosError.ERR_BAD_OPTION=`ERR_BAD_OPTION`,AxiosError.ECONNABORTED=`ECONNABORTED`,AxiosError.ETIMEDOUT=`ETIMEDOUT`,AxiosError.ECONNREFUSED=`ECONNREFUSED`,AxiosError.ERR_NETWORK=`ERR_NETWORK`,AxiosError.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,AxiosError.ERR_DEPRECATED=`ERR_DEPRECATED`,AxiosError.ERR_BAD_RESPONSE=`ERR_BAD_RESPONSE`,AxiosError.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,AxiosError.ERR_CANCELED=`ERR_CANCELED`,AxiosError.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,AxiosError.ERR_INVALID_URL=`ERR_INVALID_URL`,AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED=`ERR_FORM_DATA_DEPTH_EXCEEDED`;function isVisitable(e){return utils_default.isPlainObject(e)||utils_default.isArray(e)}function removeBrackets(e){return utils_default.endsWith(e,`[]`)?e.slice(0,-2):e}function renderKey(e,t,n){return e?e.concat(t).map(function(e,t){return e=removeBrackets(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function isFlatArray(e){return utils_default.isArray(e)&&!e.some(isVisitable)}var predicates=utils_default.toFlatObject(utils_default,{},null,function(e){return/^is[A-Z]/.test(e)});function toFormData(e,t,n){if(!utils_default.isObject(e))throw TypeError(`target must be an object`);t||=new FormData,n=utils_default.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!utils_default.isUndefined(t[e])});let r=n.metaTokens,i=n.visitor||d,a=n.dots,o=n.indexes,s=n.Blob||typeof Blob<`u`&&Blob,c=n.maxDepth===void 0?100:n.maxDepth,l=s&&utils_default.isSpecCompliantForm(t);if(!utils_default.isFunction(i))throw TypeError(`visitor must be a function`);function u(e){if(e===null)return``;if(utils_default.isDate(e))return e.toISOString();if(utils_default.isBoolean(e))return e.toString();if(!l&&utils_default.isBlob(e))throw new AxiosError(`Blob is not supported. Use a Buffer instead.`);return utils_default.isArrayBuffer(e)||utils_default.isTypedArray(e)?l&&typeof Blob==`function`?new Blob([e]):Buffer.from(e):e}function d(e,n,i){let s=e;if(utils_default.isReactNative(t)&&utils_default.isReactNativeBlob(e))return t.append(renderKey(i,n,a),u(e)),!1;if(e&&!i&&typeof e==`object`){if(utils_default.endsWith(n,`{}`))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(utils_default.isArray(e)&&isFlatArray(e)||(utils_default.isFileList(e)||utils_default.endsWith(n,`[]`))&&(s=utils_default.toArray(e)))return n=removeBrackets(n),s.forEac
3h(function(e,r){!(utils_default.isUndefined(e)||e===null)&&t.append(o===!0?renderKey([n],r,a):o===null?n:n+`[]`,u(e))}),!1}return isVisitable(e)?!0:(t.append(renderKey(i,n,a),u(e)),!1)}let f=[],p=Object.assign(predicates,{defaultVisitor:d,convertValue:u,isVisitable});function m(e,n,r=0){if(!utils_default.isUndefined(e)){if(r>c)throw new AxiosError(`Object is too deeply nested (`+r+` levels). Max depth: `+c,AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED);if(f.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));f.push(e),utils_default.forEach(e,function(e,a){(!(utils_default.isUndefined(e)||e===null)&&i.call(t,e,utils_default.isString(a)?a.trim():a,n,p))===!0&&m(e,n?n.concat(a):[a],r+1)}),f.pop()}}if(!utils_default.isObject(e))throw TypeError(`data must be an object`);return m(e),t}function encode$1(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function AxiosURLSearchParams(e,t){this._pairs=[],e&&toFormData(e,this,t)}var prototype=AxiosURLSearchParams.prototype;prototype.append=function(e,t){this._pairs.push([e,t])},prototype.toString=function(e){let t=e?function(t){return e.call(this,t,encode$1)}:encode$1;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)};function encode(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`)}function buildURL(e,t,n){if(!t)return e;let r=n&&n.encode||encode,i=utils_default.isFunction(n)?{serialize:n}:n,a=i&&i.serialize,o;if(o=a?a(t,i):utils_default.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,i).toString(r),o){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+o}return e}var InterceptorManager=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&=[]}forEach(e){utils_default.forEach(this.handlers,function(t){t!==null&&e(t)})}},transitional_default={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},URLSearchParams_default=typeof URLSearchParams<`u`?URLSearchParams:AxiosURLSearchParams,FormData_default=typeof FormData<`u`?FormData:null,Blob_default=typeof Blob<`u`?Blob:null,browser_default={isBrowser:!0,classes:{URLSearchParams:URLSearchParams_default,FormData:FormData_default,Blob:Blob_default},protocols:[`http`,`https`,`file`,`blob`,`url`,`data`]}
3,utils_exports=__exportAll({hasBrowserEnv:()=>hasBrowserEnv,hasStandardBrowserEnv:()=>hasStandardBrowserEnv,hasStandardBrowserWebWorkerEnv:()=>hasStandardBrowserWebWorkerEnv,navigator:()=>_navigator,origin:()=>origin}),hasBrowserEnv=typeof window<`u`&&typeof document<`u`,_navigator=typeof navigator==`object`&&navigator||void 0,hasStandardBrowserEnv=hasBrowserEnv&&(!_navigator||[`ReactNative`,`NativeScript`,`NS`].indexOf(_navigator.product)<0),hasStandardBrowserWebWorkerEnv=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`,origin=hasBrowserEnv&&window.location.href||`http://localhost`,platform_default={...utils_exports,...browser_default};function toURLEncodedForm(e,t){return toFormData(e,new platform_default.classes.URLSearchParams,{visitor:function(e,t,n,r){return platform_default.isNode&&utils_default.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)},...t})}function parsePropPath(e){return utils_default.matchAll(/\w+|\[(\w*)]/g,e).map(e=>e[0]===`[]`?``:e[1]||e[0])}function arrayToObject(e){let t={},n=Object.keys(e),r,i=n.length,a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function formDataToJSON(e){function t(e,n,r,i){let a=e[i++];if(a===`__proto__`)return!0;let o=Number.isFinite(+a),s=i>=e.length;return a=!a&&utils_default.isArray(r)?r.length:a,s?(utils_default.hasOwnProp(r,a)?r[a]=utils_default.isArray(r[a])?r[a].concat(n):[r[a],n]:r[a]=n,!o):((!utils_default.hasOwnProp(r,a)||!utils_default.isObject(r[a]))&&(r[a]=[]),t(e,n,r[a],i)&&utils_default.isArray(r[a])&&(r[a]=arrayToObject(r[a])),!o)}if(utils_default.isFormData(e)&&utils_default.isFunction(e.entries)){let n={};return utils_default.forEachEntry(e,(e,r)=>{t(parsePropPath(e),r,n,0)}),n}return null}var own=(e,t)=>e!=null&&utils_default.hasOwnProp(e,t)?e[t]:void 0;
3function stringifySafely(e,t,n){if(utils_default.isString(e))try{return(t||JSON.parse)(e),utils_default.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}var defaults={transitional:transitional_default,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=utils_default.isObject(e);if(i&&utils_default.isHTMLForm(e)&&(e=new FormData(e)),utils_default.isFormData(e))return r?JSON.stringify(formDataToJSON(e)):e;if(utils_default.isArrayBuffer(e)||utils_default.isBuffer(e)||utils_default.isStream(e)||utils_default.isFile(e)||utils_default.isBlob(e)||utils_default.isReadableStream(e))return e;if(utils_default.isArrayBufferView(e))return e.buffer;if(utils_default.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let a;if(i){let t=own(this,`formSerializer`);if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return toURLEncodedForm(e,t).toString();if((a=utils_default.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let n=own(this,`env`),r=n&&n.FormData;return toFormData(a?{"files[]":e}:e,r&&new r,t)}}return i||r?(t.setContentType(`application/json`,!1),stringifySafely(e)):e}],transformResponse:[function(e){let t=own(this,`transitional`)||defaults.transitional,n=t&&t.forcedJSONParsing,r=own(this,`responseType`),i=r===`json`;if(utils_default.isResponse(e)||utils_default.isReadableStream(e))return e;if(e&&utils_default.isString(e)&&(n&&!r||i)){let n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,own(this,`parseReviver`))}catch(e){if(n)throw e.name===`SyntaxError`?AxiosError.from(e,AxiosError.ERR_BAD_RESPONSE,this,null,own(this,`response`)):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform_default.classes.FormData,Blob:platform_default.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}};utils_default.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`],e=>{defaults.headers[e]={}});function transformData(e,t){let n=this||defaults,r=t||n,i=AxiosHeaders.from(r.headers),a=r.data;return utils_default.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function isCancel(e){return!!(e&&e.__CANCEL__)}var CanceledError=class extends AxiosError{constructor(e,t,n){super(e??`canceled`,AxiosError.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}};function settle(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new AxiosError(`Request failed with status code `+n.status,n.status>=400&&n.status<500?AxiosError.ERR_BAD_REQUEST:AxiosError.ERR_BAD_RESPONSE,n.config,n.request,n))}function parseProtocol(e){let t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||``}function speedometer(e,t){e||=10;let n=Array(e),r=Array(e),i=0,a=0,o;return t=t===void 0?1e3:t,function(s){let c=Date.now(),l=r[a];o||=c,n[i]=s,r[i]=c;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;let f=l&&c-l;return f?Math.round(d*1e3/f):void 0}}function throttle(e,t){let n=0,r=1e3/t,i,a,o=(t,r=Date.now())=>{n=r,i=null,a&&=(clearTimeout(a),null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-n;s>=r?o(e,t):(i=e,a||=setTimeout(()=>{a=null,o(i)},r-s))},()=>i&&o(i)]}var progressEventReducer=(e,t,n=3)=>{let r=0,i=speedometer(50,250);return throttle(n=>{if(!n||typeof n.loaded!=`number`)return;let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=o==null?a:Math.min(a,o),c=Math.max(0,s-r),l=i(c);r=Math.max(r,s),e({loaded:s,total:o,progress:o?s/o:void 0,bytes:c,rate:l||void 0,estimated:l&&o?(o-s)/l:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0})},n)},progressEventDecorator=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},asyncDecorator=e=>(...t)=>utils_default.asap(()=>e(...t)),isURLSameOrigin_default=platform_default.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,platform_default.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(platform_default.origin),platform_default.navigator&&/(msie|trident)/i.test(platform_default.navigator.userAgent)):()=>!0,cookies_default=platform_default.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let s=[`${e}=${encodeURIComponent(t)}`];utils_default.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),utils_default.isString(r)&&s.push(`path=${r}`),utils_default.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push(`secure`),utils_default.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join(`; `)},read(e){if(typeof document>`u`)return null;let t=document.cookie.split(`;`);for(let n=0;n<t.length;n++){let r=t[n].replace(/^\s+/,``),i=r.indexOf(`=`);
3if(i!==-1&&r.slice(0,i)===e)return decodeURIComponent(r.slice(i+1))}return null},remove(e){this.write(e,``,Date.now()-864e5,`/`)}}:{write(){},read(){return null},remove(){}};function isAbsoluteURL(e){return typeof e==`string`?/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e):!1}function combineURLs(e,t){return t?e.replace(/\/?\/$/,``)+`/`+t.replace(/^\/+/,``):e}function buildFullPath(e,t,n){let r=!isAbsoluteURL(t);return e&&(r||n===!1)?combineURLs(e,t):t}var headersToObject=e=>e instanceof AxiosHeaders?{...e}:e;function mergeConfig(e,t){t||={};let n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(e,t,n,r){return utils_default.isPlainObject(e)&&utils_default.isPlainObject(t)?utils_default.merge.call({caseless:r},e,t):utils_default.isPlainObject(t)?utils_default.merge({},t):utils_default.isArray(t)?t.slice():t}function i(e,t,n,i){if(!utils_default.isUndefined(t))return r(e,t,n,i);if(!utils_default.isUndefined(e))return r(void 0,e,n,i)}function a(e,t){if(!utils_default.isUndefined(t))return r(void 0,t)}function o(e,t){if(!utils_default.isUndefined(t))return r(void 0,t);if(!utils_default.isUndefined(e))return r(void 0,e)}function s(n,i,a){if(utils_default.hasOwnProp(t,a))return r(n,i);if(utils_default.hasOwnProp(e,a))return r(void 0,n)}let c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:s,headers:(e,t,n)=>i(headersToObject(e),headersToObject(t),n,!0)};return utils_default.forEach(Object.keys({...e,...t}),function(r){if(r===`__proto__`||r===`constructor`||r===`prototype`)return;let a=utils_default.hasOwnProp(c,r)?c[r]:i,o=a(utils_default.hasOwnProp(e,r)?e[r]:void 0,utils_default.hasOwnProp(t,r)?t[r]:void 0,r);utils_default.isUndefined(o)&&a!==s||(n[r]=o)}),n}var FORM_DATA_CONTENT_HEADERS=[`content-type`,`content-length`];function setFormDataHeaders(e,t,n){if(n!==`content-only`){e.set(t);return}Object.entries(t).forEach(([t,n])=>{FORM_DATA_CONTENT_HEADERS.includes(t.toLowerCase())&&e.set(t,n)})}var encodeUTF8=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))),resolveConfig_default=e=>{let t=mergeConfig({},e),n=e=>utils_default.hasOwnProp(t,e)?t[e]:void 0,r=n(`data`),i=n(`withXSRFToken`),a=n(`xsrfHeaderName`),o=n(`xsrfCookieName`),s=n(`headers`),c=n(`auth`),l=n(`baseURL`),u=n(`allowAbsoluteUrls`),d=n(`url`);if(t.headers=s=AxiosHeaders.from(s),t.url=buildURL(buildFullPath(l,d,u),e.params,e.paramsSerializer),c&&s.set(`Authorization`,`Basic `+btoa((c.username||``)+`:`+(c.password?encodeUTF8(c.password):``))),utils_default.isFormData(r)&&(platform_default.hasStandardBrowserEnv||platform_default.hasStandardBrowserWebWorkerEnv?s.setContentType(void 0):utils_default.isFunction(r.getHeaders)&&setFormDataHeaders(s,r.getHeaders(),n(`formDataHeaderPolicy`))),platform_default.hasStandardBrowserEnv&&(utils_default.isFunction(i)&&(i=i(t)),i===!0||i==null&&isURLSameOrigin_default(t.url))){let e=a&&o&&cookies_default.read(o);e&&s.set(a,e)}return t},isXHRAdapterSupported=typeof XMLHttpRequest<`u`,xhr_default=isXHRAdapterSupported&&function(e){return new Promise(function(t,n){let r=resolveConfig_default(e),i=r.data,a=AxiosHeaders.from(r.headers).normalize(),{responseType:o,onUploadProgress:s,onDownloadProgress:c}=r,l,u,d,f,p;function m(){f&&f(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener(`abort`,l)}let g=new XMLHttpRequest;g.open(r.method.toUpperCase(),r.url,!0),g.timeout=r.timeout;function _(){if(!g)return;let r=AxiosHeaders.from(`getAllResponseHeaders`in g&&g.getAllResponseHeaders());settle(function(e){t(e),m()},function(e){n(e),m()},{data:!o||o===`text`||o===`json`?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:r,config:e,request:g}),g=null}`onloadend`in g?g.onloadend=_:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.startsWith(`file:`))||setTimeout(_)},g.onabort=function(){g&&=(n(new AxiosError(`Request aborted`,AxiosError.ECONNABORTED,e,g)),m(),null)},g.onerror=function(t){let r=new AxiosError(t&&t.message?t.message:`Network Error`,AxiosError.ERR_NETWORK,e,g);r.event=t||null,n(r),m(),g=null},g.ontimeout=function(){let t=r.timeout?`timeout of `+r.timeout+`ms exceeded`:`timeout exceeded`,i=r.transitional||transitional_default;
3r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new AxiosError(t,i.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,e,g)),m(),g=null},i===void 0&&a.setContentType(null),`setRequestHeader`in g&&utils_default.forEach(toByteStringHeaderObject(a),function(e,t){g.setRequestHeader(t,e)}),utils_default.isUndefined(r.withCredentials)||(g.withCredentials=!!r.withCredentials),o&&o!==`json`&&(g.responseType=r.responseType),c&&([d,p]=progressEventReducer(c,!0),g.addEventListener(`progress`,d)),s&&g.upload&&([u,f]=progressEventReducer(s),g.upload.addEventListener(`progress`,u),g.upload.addEventListener(`loadend`,f)),(r.cancelToken||r.signal)&&(l=t=>{g&&=(n(!t||t.type?new CanceledError(null,e,g):t),g.abort(),m(),null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener(`abort`,l)));let y=parseProtocol(r.url);if(y&&!platform_default.protocols.includes(y)){n(new AxiosError(`Unsupported protocol `+y+`:`,AxiosError.ERR_BAD_REQUEST,e));return}g.send(i||null)})},composeSignals=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;let n=new AbortController,r=!1,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof AxiosError?t:new CanceledError(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new AxiosError(`timeout of ${t}ms exceeded`,AxiosError.ETIMEDOUT))},t),o=()=>{e&&=(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener(`abort`,i)}),null)};e.forEach(e=>e.addEventListener(`abort`,i));let{signal:s}=n;return s.unsubscribe=()=>utils_default.asap(o),s},streamChunk=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},readBytes=async function*(e,t){for await(let n of readStream(e))yield*streamChunk(n,t)},readStream=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},trackStream=(e,t,n,r)=>{let i=readBytes(e,t),a=0,o,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{let{done:t,value:r}=await i.next();if(t){s(),e.close();return}let o=r.byteLength;n&&n(a+=o),e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel(e){return s(e),i.return()}},{highWaterMark:2})};function estimateDataURLDecodedBytes(e){if(!e||typeof e!=`string`||!e.startsWith(`data:`))return 0;let t=e.indexOf(`,`);if(t<0)return 0;let n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let e=r.length,t=r.length;for(let n=0;n<t;n++)if(r.charCodeAt(n)===37&&n+2<t){let t=r.charCodeAt(n+1),i=r.charCodeAt(n+2);(t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102)&&(i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102)&&(e-=2,n+=2)}let n=0,i=t-1,a=e=>e>=2&&r.charCodeAt(e-2)===37&&r.charCodeAt(e-1)===51&&(r.charCodeAt(e)===68||r.charCodeAt(e)===100);i>=0&&(r.charCodeAt(i)===61?(n++,i--):a(i)&&(n++,i-=3)),n===1&&i>=0&&(r.charCodeAt(i)===61||a(i))&&n++;let o=Math.floor(e/4)*3-(n||0);return o>0?o:0}if(typeof Buffer<`u`&&typeof Buffer.byteLength==`function`)return Buffer.byteLength(r,`utf8`);let i=0;for(let e=0,t=r.length;e<t;e++){let n=r.charCodeAt(e);if(n<128)i+=1;else if(n<2048)i+=2;else if(n>=55296&&n<=56319&&e+1<t){let t=r.charCodeAt(e+1);t>=56320&&t<=57343?(i+=4,e++):i+=3}else i+=3}return i}var VERSION=`1.16.1`,DEFAULT_CHUNK_SIZE=64*1024,{isFunction}=utils_default,test=(e,...t)=>{try{return!!e(...t)}catch{return!1}},factory=e=>{let t=utils_default.global!==void 0&&utils_default.global!==null?utils_default.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=utils_default.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);let{fetch:i,Request:a,Response:o}=e,s=i?isFunction(i):typeof fetch==`function`,c=isFunction(a),l=isFunction(o);if(!s)return!1;let u=s&&isFunction(n),d=s&&(typeof r==`function`?(e=>t=>e.encode(t))(new r):async e=>new Uint8Array(await new a(e).arrayBuffer())),f=c&&u&&test(()=>{let e=!1,t=new a(platform_default.origin,{body:new n,method:`POST`,get duplex(){return e=!0,`half`}}),r=t.headers.has(`Content-Type`);return t.body!=null&&t.body.cancel(),e&&!r}),p=l&&u&&test(()=>
3utils_default.isReadableStream(new o(``).body)),m={stream:p&&(e=>e.body)};s&&[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(e=>{!m[e]&&(m[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new AxiosError(`Response type '${e}' is not supported`,AxiosError.ERR_NOT_SUPPORT,n)})});let g=async e=>{if(e==null)return 0;if(utils_default.isBlob(e))return e.size;if(utils_default.isSpecCompliantForm(e))return(await new a(platform_default.origin,{method:`POST`,body:e}).arrayBuffer()).byteLength;if(utils_default.isArrayBufferView(e)||utils_default.isArrayBuffer(e))return e.byteLength;if(utils_default.isURLSearchParams(e)&&(e+=``),utils_default.isString(e))return(await d(e)).byteLength},_=async(e,t)=>utils_default.toFiniteNumber(e.getContentLength())??g(t);return async e=>{let{url:t,method:n,data:s,signal:l,cancelToken:u,timeout:d,onDownloadProgress:g,onUploadProgress:y,responseType:b,headers:x,withCredentials:S=`same-origin`,fetchOptions:C,maxContentLength:T,maxBodyLength:E}=resolveConfig_default(e),D=utils_default.isNumber(T)&&T>-1,O=utils_default.isNumber(E)&&E>-1,k=i||fetch;b=b?(b+``).toLowerCase():`text`;let A=composeSignals([l,u&&u.toAbortSignal()],d),j=null,M=A&&A.unsubscribe&&(()=>{A.unsubscribe()}),N;try{if(D&&typeof t==`string`&&t.startsWith(`data:`)&&estimateDataURLDecodedBytes(t)>T)throw new AxiosError(`maxContentLength size of `+T+` exceeded`,AxiosError.ERR_BAD_RESPONSE,e,j);if(O&&n!==`get`&&n!==`head`){let t=await _(x,s);if(typeof t==`number`&&isFinite(t)&&t>E)throw new AxiosError(`Request body larger than maxBodyLength limit`,AxiosError.ERR_BAD_REQUEST,e,j)}if(y&&f&&n!==`get`&&n!==`head`&&(N=await _(x,s))!==0){let e=new a(t,{method:`POST`,body:s,duplex:`half`}),n;if(utils_default.isFormData(s)&&(n=e.headers.get(`content-type`))&&x.setContentType(n),e.body){let[t,n]=progressEventDecorator(N,progressEventReducer(asyncDecorator(y)));s=trackStream(e.body,DEFAULT_CHUNK_SIZE,t,n)}}utils_default.isString(S)||(S=S?`include`:`omit`);let i=c&&`credentials`in a.prototype;if(utils_default.isFormData(s)){let e=x.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&x.delete(`content-type`)}x.set(`User-Agent`,`axios/`+VERSION,!1);let l={...C,signal:A,method:n.toUpperCase(),headers:toByteStringHeaderObject(x.normalize()),body:s,duplex:`half`,credentials:i?S:void 0};j=c&&new a(t,l);let u=await(c?k(j,C):k(t,l));if(D){let t=utils_default.toFiniteNumber(u.headers.get(`content-length`));if(t!=null&&t>T)throw new AxiosError(`maxContentLength size of `+T+` exceeded`,AxiosError.ERR_BAD_RESPONSE,e,j)}let d=p&&(b===`stream`||b===`response`);if(p&&u.body&&(g||D||d&&M)){let t={};[`status`,`statusText`,`headers`].forEach(e=>{t[e]=u[e]});let n=utils_default.toFiniteNumber(u.headers.get(`content-length`)),[r,i]=g&&progressEventDecorator(n,progressEventReducer(asyncDecorator(g),!0))||[],a=0;u=new o(trackStream(u.body,DEFAULT_CHUNK_SIZE,t=>{if(D&&(a=t,a>T))throw new AxiosError(`maxContentLength size of `+T+` exceeded`,AxiosError.ERR_BAD_RESPONSE,e,j);r&&r(t)},()=>{i&&i(),M&&M()}),t)}b||=`text`;let P=await m[utils_default.findKey(m,b)||`text`](u,e);if(D&&!p&&!d){let t;if(P!=null&&(typeof P.byteLength==`number`?t=P.byteLength:typeof P.size==`number`?t=P.size:typeof P==`string`&&(t=typeof r==`function`?new r().encode(P).byteLength:P.length)),typeof t==`number`&&t>T)throw new AxiosError(`maxContentLength size of `+T+` exceeded`,AxiosError.ERR_BAD_RESPONSE,e,j)}return!d&&M&&M(),await new Promise((t,n)=>{settle(t,n,{data:P,headers:AxiosHeaders.from(u.headers),status:u.status,statusText:u.statusText,config:e,request:j})})}catch(t){if(M&&M(),A&&A.aborted&&A.reason instanceof AxiosError){let n=A.reason;throw n.config=e,j&&(n.request=j),t!==n&&(n.cause=t),n}throw t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)?Object.assign(new AxiosError(`Network Error`,AxiosError.ERR_NETWORK,e,j,t&&t.response),{cause:t.cause||t}):AxiosError.from(t,t&&t.code,e,j,t&&t.response)}}},seedCache=new Map,getFetch=e=>{let t=e&&e.env||{},{fetch:n,Request:r,Response:i}=t,a=[r,i,n],o=a.length,s,c,l=seedCache;for(;o--;)s=a[o],c=l.get(s),c===void 0&&l.set(s,c=o?new Map:factory(t)),l=c;return c},adapter=getFetch(),knownAdapters={http:null,xhr:xhr_default,fetch:{get:getFetch}};utils_default.forEach(knownAdapters,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});var renderReason=e=>`- ${e}`,isResolvedHandle=e=>utils_default.isFunction(e)||e===null||e===!1;function getAdapter(e,t){e=utils_default.isArray(e)?e:[e];let{length:n}=e,r,i,a={};for(let o=0;o<n;o++){r=e[o];let n;if(i=r,!isResolvedHandle(r)&&(i=knownAdapters[(n=String(r)).toLowerCase()],i===void 0))throw new AxiosError(`Unknown adapter '${n}'`);if(i&&(utils_default.isFunction(i)||(i=i.get(t))))break;a[n||`#`+o]=i}if(!i){let e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`));throw new AxiosError(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since : 4`+e.map(renderReason).join(` 5`):` `+renderReason(e[0]):`as no adapter specified`),`ERR_NOT_SUPPORT`)}return i}var adapters_default={getAdapter,adapters:knownAdapters};function throwIfCancellationRequested(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new CanceledError(null,e)}function dispatchRequest(e){return throwIfCancellationRequested(e),e.headers=AxiosHeaders.from(e.headers),e.data=transformData.call(e,e.transformRequest),[`post`,`put`,`patch`].indexOf(e.method)!==-1&&e.headers.setContentType(`application/x-www-form-urlencoded`,!1),adapters_default.getAdapter(e.adapter||defaults.adapter,e)(e).then(function(t){throwIfCancellationRequested(e),e.response=t;try{t.data=transformData.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=AxiosHeaders.from(t.headers),t},function(t){if(!isCancel(t)&&(throwIfCancellationRequested(e),t&&t.response)){e.response=t.response;try{t.response.data=transformData.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=AxiosHeaders.from(t.response.headers)}return Promise.reject(t)})}var validators$1={};[`object`,`boolean`,`number`,`function`,`string`,`symbol`].forEach((e,t)=>{validators$1[e]=function(n){return typeof n===e||`a`+(t<1?`n `:` `)+e}});var deprecatedWarnings={};validators$1.transitional=function(e,t,n){function r(e,t){return`[Axios v`+VERSION+`] Transitional option '`+e+`'`+t+(n?`. `+n:``)}return(n,i,a)=>
5{if(e===!1)throw new AxiosError(r(i,` has been removed`+(t?` in `+t:``)),AxiosError.ERR_DEPRECATED);return t&&!deprecatedWarnings[i]&&(deprecatedWarnings[i]=!0,console.warn(r(i,` has been deprecated since v`+t+` and will be removed in the near future`))),e?e(n,i,a):!0}},validators$1.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function assertOptions(e,t,n){if(typeof e!=`object`)throw new AxiosError(`options must be an object`,AxiosError.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-- >0;){let a=r[i],o=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(o){let t=e[a],n=t===void 0||o(t,a,e);if(n!==!0)throw new AxiosError(`option `+a+` must be `+n,AxiosError.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new AxiosError(`Unknown option `+a,AxiosError.ERR_BAD_OPTION)}}var validator_default={assertOptions,validators:validators$1},validators=validator_default.validators,Axios=class{constructor(e){this.defaults=e||{},this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let n=(()=>{if(!t.stack)return``;let e=t.stack.indexOf(` 6`);return e===-1?``:t.stack.slice(e+1)})();try{if(!e.stack)e.stack=n;else if(n){let t=n.indexOf(` 7`),r=t===-1?-1:n.indexOf(` 8`,t+1),i=r===-1?``:n.slice(r+1);String(e.stack).endsWith(i)||(e.stack+=` 9`+n)}}catch{}}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=mergeConfig(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&validator_default.assertOptions(n,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean),legacyInterceptorReqResOrdering:validators.transitional(validators.boolean)},!1),r!=null&&(utils_default.isFunction(r)?t.paramsSerializer={serialize:r}:validator_default.assertOptions(r,{encode:validators.function,serialize:validators.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),validator_default.assertOptions(t,{baseUrl:validators.spelling(`baseURL`),withXsrfToken:validators.spelling(`withXSRFToken`)},!0),t.method=(t.method||this.defaults.method||`get`).toLowerCase();let a=i&&utils_default.merge(i.common,i[t.method]);i&&utils_default.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`,`common`],e=>{delete i[e]}),t.headers=AxiosHeaders.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s&&=e.synchronous;let n=t.transitional||transitional_default;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[dispatchRequest.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=o.length;let f=t;for(;u<d;){let e=o[u++],t=o[u++];try{f=e(f)}catch(e){t.call(this,e);break}}try{l=dispatchRequest.call(this,f)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return e=mergeConfig(this.defaults,e),buildURL(buildFullPath(e.baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};utils_default.forEach([`delete`,`get`,`head`,`options`],function(e){Axios.prototype[e]=function(t,n){return this.request(mergeConfig(n||{},{method:e,url:t,data:(n||{}).data}))}}),utils_default.forEach([`post`,`put`,`patch`,`query`],function(e){function t(t){return function(n,r,i){return this.request(mergeConfig(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}Axios.prototype[e]=t(),e!==`query`&&(Axios.prototype[e+`Form`]=t(!0))});var CancelToken=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new CanceledError(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}
9subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function spread(e){return function(t){return e.apply(null,t)}}function isAxiosError(e){return utils_default.isObject(e)&&e.isAxiosError===!0}var HttpStatusCode={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(HttpStatusCode).forEach(([e,t])=>{HttpStatusCode[t]=e});function createInstance(e){let t=new Axios(e),n=bind(Axios.prototype.request,t);return utils_default.extend(n,Axios.prototype,t,{allOwnKeys:!0}),utils_default.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return createInstance(mergeConfig(e,t))},n}var axios=createInstance(defaults);axios.Axios=Axios,axios.CanceledError=CanceledError,axios.CancelToken=CancelToken,axios.isCancel=isCancel,axios.VERSION=VERSION,axios.toFormData=toFormData,axios.AxiosError=AxiosError,axios.Cancel=axios.CanceledError,axios.all=function(e){return Promise.all(e)},axios.spread=spread,axios.isAxiosError=isAxiosError,axios.mergeConfig=mergeConfig,axios.AxiosHeaders=AxiosHeaders,axios.formToJSON=e=>formDataToJSON(utils_default.isHTMLForm(e)?new FormData(e):e),axios.getAdapter=adapters_default.getAdapter,axios.HttpStatusCode=HttpStatusCode,axios.default=axios,window.axios=axios,window.axios.defaults.headers.common[`X-Requested-With`]=`XMLHttpRequest`;function _assertThisInitialized(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var _config={autoSleep:120,force3D:`auto`,nullTargetWarn:1,units:{lineHeight:``}},_defaults$1={duration:.5,overwrite:!1,delay:0},_suppressOverwrites$1,_reverting$1,_context$2,_bigNum$1=1e8,_tinyNum=1/_bigNum$1,_2PI=Math.PI*2,_HALF_PI=_2PI/4,_gsID=0,_sqrt=Math.sqrt,_cos=Math.cos,_sin=Math.sin,_isString$1=function(e){return typeof e==`string`},_isFunction$1=function(e){return typeof e==`function`},_isNumber$1=function(e){return typeof e==`number`},_isUndefined=function(e){return e===void 0},_isObject$1=function(e){return typeof e==`object`},_isNotFalse=function(e){return e!==!1},_windowExists$2=function(){return typeof window<`u`},_isFuncOrString=function(e){return _isFunction$1(e)||_isString$1(e)},_isTypedArray=typeof ArrayBuffer==`function`&&ArrayBuffer.isView||function(){},_isArray=Array.isArray,_randomExp=/random\([^)]+\)/g,_commaDelimExp=/,\s*/g,_strictNumExp=/(?:-?\.?\d|\.)+/gi,_numExp=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,_numWithUnitExp=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,_complexStringNumExp=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,_relExp=/[+-]=-?[.\d]+/,_delimitedValueExp=/[^,'"\[\]\s]+/gi,_unitExp=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,_globalTimeline,_win$3,_coreInitted$2,_doc$3,_globals={},_installScope={},_coreReady,_install=function(e){return(_installScope=_merge(e,_globals))&&gsap$2},_missingPlugin=function(e,t){return console.warn(`Invalid property`,e,`set to`,t,`Missing plugin? gsap.registerPlugin()`)},_warn=function(e,t){return!t&&console.warn(e)},_addGlobal=function(e,t){return e&&(_globals[e]=t)&&_installScope&&(_installScope[e]=t)||_globals},_emptyFunc=function(){return 0},_startAtRevertConfig={suppressEvents:!0,isStart:!0,kill:!1},_revertConfigNoKill={suppressEvents:!0,kill:!1},_revertConfig={suppressEvents:!0},_reservedProps={},_lazyTweens=[],_lazyLookup={},_lastRenderedFrame,_plugins={},_effects={},_nextGCFrame=30,_harnessPlugins=[],_callbackNames=``,_harness=function(e){var t=e[0],n,r;if(_isObject$1(t)||_isFunction$1(t)||(e=[e]),!(n=(t._gsap||{}).harness)){for(r=_harnessPlugins.length;r--&&!_harnessPlugins[r].targetTest(t););n=_harnessPlugins[r]}for(r=e.length;r--;)e[r]&&(e[r]._gsap||(e[r]._gsap=new GSCache(e[r],n)))||e.splice(r,1);return e},_getCache=function(e){return e._gsap||_harness(toArray(e))[0]._gsap},_getProperty=function(e,t,n){return(n=e[t])&&_isFunction$1(n)?e[t]():_isUndefined(n)&&e.getAttribute&&e.getAttribute(t)||n}
vendor: 5,299 bytes, line 9
9,_forEachName=function(e,t){return(e=e.split(`,`)).forEach(t)||e},_round$1=function(e){return Math.round(e*1e5)/1e5||0},_roundPrecise=function(e){return Math.round(e*1e7)/1e7||0},_parseRelative=function(e,t){var n=t.charAt(0),r=parseFloat(t.substr(2));return e=parseFloat(e),n===`+`?e+r:n===`-`?e-r:n===`*`?e*r:e/r},_arrayContainsAny=function(e,t){for(var n=t.length,r=0;e.indexOf(t[r])<0&&++r<n;);return r<n},_lazyRender=function(){var e=_lazyTweens.length,t=_lazyTweens.slice(0),n,r;for(_lazyLookup={},_lazyTweens.length=0,n=0;n<e;n++)r=t[n],r&&r._lazy&&(r.render(r._lazy[0],r._lazy[1],!0)._lazy=0)},_isRevertWorthy=function(e){return!!(e._initted||e._startAt||e.add)},_lazySafeRender=function(e,t,n,r){_lazyTweens.length&&!_reverting$1&&_lazyRender(),e.render(t,n,r||!!(_reverting$1&&t<0&&_isRevertWorthy(e))),_lazyTweens.length&&!_reverting$1&&_lazyRender()},_numericIfPossible=function(e){var t=parseFloat(e);return(t||t===0)&&(e+``).match(_delimitedValueExp).length<2?t:_isString$1(e)?e.trim():e},_passThrough$1=function(e){return e},_setDefaults$1=function(e,t){for(var n in t)n in e||(e[n]=t[n]);return e},_setKeyframeDefaults=function(e){return function(t,n){for(var r in n)r in t||r===`duration`&&e||r===`ease`||(t[r]=n[r])}},_merge=function(e,t){for(var n in t)e[n]=t[n];return e},_mergeDeep=function e(t,n){for(var r in n)r!==`__proto__`&&r!==`constructor`&&r!==`prototype`&&(t[r]=_isObject$1(n[r])?e(t[r]||(t[r]={}),n[r]):n[r]);return t},_copyExcluding=function(e,t){var n={},r;for(r in e)r in t||(n[r]=e[r]);return n},_inheritDefaults=function(e){var t=e.parent||_globalTimeline,n=e.keyframes?_setKeyframeDefaults(_isArray(e.keyframes)):_setDefaults$1;if(_isNotFalse(e.inherit))for(;t;)n(e,t.vars.defaults),t=t.parent||t._dp;return e},_arraysMatch=function(e,t){for(var n=e.length,r=n===t.length;r&&n--&&e[n]===t[n];);return n<0},_addLinkedListItem=function(e,t,n,r,i){n===void 0&&(n=`_first`),r===void 0&&(r=`_last`);var a=e[r],o;if(i)for(o=t[i];a&&a[i]>o;)a=a._prev;return a?(t._next=a._next,a._next=t):(t._next=e[n],e[n]=t),t._next?t._next._prev=t:e[r]=t,t._prev=a,t.parent=t._dp=e,t},_removeLinkedListItem=function(e,t,n,r){n===void 0&&(n=`_first`),r===void 0&&(r=`_last`);var i=t._prev,a=t._next;i?i._next=a:e[n]===t&&(e[n]=a),a?a._prev=i:e[r]===t&&(e[r]=i),t._next=t._prev=t.parent=null},_removeFromParent=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},_uncache=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var n=e;n;)n._dirty=1,n=n.parent;return e},_recacheAncestors=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},_rewindStartAt=function(e,t,n,r){return e._startAt&&(_reverting$1?e._startAt.revert(_revertConfigNoKill):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,r))},_hasNoPausedAncestors=function e(t){return!t||t._ts&&e(t.parent)},_elapsedCycleDuration=function(e){return e._repeat?_animationCycle(e._tTime,e=e.duration()+e._rDelay)*e:0},_animationCycle=function(e,t){var n=Math.floor(e=_roundPrecise(e/t));return e&&n===e?n-1:n},_parentToChildTotalTime=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},_setEnd=function(e){return e._end=_roundPrecise(e._start+(e._tDur/Math.abs(e._ts||e._rts||_tinyNum)||0))},_alignPlayhead=function(e,t){var n=e._dp;return n&&n.smoothChildTiming&&e._ts&&(e._start=_roundPrecise(n._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),_setEnd(e),n._dirty||_uncache(n,e)),e},_postAddChecks=function(e,t){var n;if((t._time||!t._dur&&t._initted||t._start<e._time&&(t._dur||!t.add))&&(n=_parentToChildTotalTime(e.rawTime(),t),(!t._dur||_clamp$1(0,t.totalDuration(),n)-t._tTime>_tinyNum)&&t.render(n,!0)),_uncache(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(n=e;n._dp;)n.rawTime()>=0&&n.totalTime(n._tTime),n=n._dp;e._zTime=-_tinyNum}},_addToTimeline=function(e,t,n,r){return t.parent&&_removeFromParent(t),t._start=_roundPrecise((_isNumber$1(n)?n:n||e!==_globalTimeline?_parsePosition$1(e,n,t):e._time)+t._delay),t._end=_roundPrecise(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),_addLinkedListItem(e,t,`_first`,`_last`,e._sort?`_start`:0),_isFromOrFromStart(t)||(e._recent=t),r||_postAddChecks(e,t),e._ts<0&&_alignPlayhead(e,e._tTime),e},_scrollTrigger=function(e,t){return(_globals.ScrollTrigger||_missingPlugin(`scrollTrigger`,t))&&_globals.ScrollTrigger.create(t,e)},_attemptInitTween=function(e,t,n,r,i){if(_initTween(e,t,i),!e._initted)return 1;if(!n&&e._pt&&!_reverting$1&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&_lastRenderedFrame!==_ticker.frame)return _lazyTweens.push(e),e._lazy=[i,r],1},_parentPlayheadIsBeforeStart=function e(t){var n=t.parent;return n&&n._ts&&n._initted&&!n._lock&&(n.rawTime()<0||e(n))},_isFromOrFromStart=function(e){var t=e.data;return t===`isFromStart`||t===`isStart`},_renderZeroDurationTween=function(e,t,n,r){var i=e.ratio,a=t<0||!t&&(!e._start&&_parentPlayheadIsBeforeStart(e)&&!(!e._initted&&_isFromOrFromStart(e))||(e._ts<0||e._dp._ts<0)&&!_isFromOrFromStart(e))?0:1,o=e._rDelay,s=0,c,l,u;if(o&&e._repeat&&(s=_clamp$1(0,e._tDur,t),l=_animationCycle(s,o),e._yoyo&&l&1&&(a=1-a),l!==_animationCycle(e._tTime,o)&&(i=1-a,e.vars.repeatRefresh&&e._initted&&e.invali
vendor: 7,723 bytes, line 9
9date())),a!==i||_reverting$1||r||e._zTime===_tinyNum||!t&&e._zTime){if(!e._initted&&_attemptInitTween(e,t,r,n,s))return;for(u=e._zTime,e._zTime=t||(n?_tinyNum:0),n||=t&&!u,e.ratio=a,e._from&&(a=1-a),e._time=0,e._tTime=s,c=e._pt;c;)c.r(a,c.d),c=c._next;t<0&&_rewindStartAt(e,t,n,!0),e._onUpdate&&!n&&_callback$1(e,`onUpdate`),s&&e._repeat&&!n&&e.parent&&_callback$1(e,`onRepeat`),(t>=e._tDur||t<0)&&e.ratio===a&&(a&&_removeFromParent(e,1),!n&&!_reverting$1&&(_callback$1(e,a?`onComplete`:`onReverseComplete`,!0),e._prom&&e._prom()))}else e._zTime||=t},_findNextPauseTween=function(e,t,n){var r;if(n>t)for(r=e._first;r&&r._start<=n;){if(r.data===`isPause`&&r._start>t)return r;r=r._next}else for(r=e._last;r&&r._start>=n;){if(r.data===`isPause`&&r._start<t)return r;r=r._prev}},_setDuration=function(e,t,n,r){var i=e._repeat,a=_roundPrecise(t)||0,o=e._tTime/e._tDur;return o&&!r&&(e._time*=a/e._dur),e._dur=a,e._tDur=i?i<0?1e10:_roundPrecise(a*(i+1)+e._rDelay*i):a,o>0&&!r&&_alignPlayhead(e,e._tTime=e._tDur*o),e.parent&&_setEnd(e),n||_uncache(e.parent,e),e},_onUpdateTotalDuration=function(e){return e instanceof Timeline?_uncache(e):_setDuration(e,e._dur)},_zeroPosition={_start:0,endTime:_emptyFunc,totalDuration:_emptyFunc},_parsePosition$1=function e(t,n,r){var i=t.labels,a=t._recent||_zeroPosition,o=t.duration()>=_bigNum$1?a.endTime(!1):t._dur,s,c,l;return _isString$1(n)&&(isNaN(n)||n in i)?(c=n.charAt(0),l=n.substr(-1)===`%`,s=n.indexOf(`=`),c===`<`||c===`>`?(s>=0&&(n=n.replace(/=/,``)),(c===`<`?a._start:a.endTime(a._repeat>=0))+(parseFloat(n.substr(1))||0)*(l?(s<0?a:r).totalDuration()/100:1)):s<0?(n in i||(i[n]=o),i[n]):(c=parseFloat(n.charAt(s-1)+n.substr(s+1)),l&&r&&(c=c/100*(_isArray(r)?r[0]:r).totalDuration()),s>1?e(t,n.substr(0,s-1),r)+c:o+c)):n==null?o:+n},_createTweenType=function(e,t,n){var r=_isNumber$1(t[1]),i=(r?2:1)+(e<2?0:1),a=t[i],o,s;if(r&&(a.duration=t[1]),a.parent=n,e){for(o=a,s=n;s&&!(`immediateRender`in o);)o=s.vars.defaults||{},s=_isNotFalse(s.vars.inherit)&&s.parent;a.immediateRender=_isNotFalse(o.immediateRender),e<2?a.runBackwards=1:a.startAt=t[i-1]}return new Tween(t[0],a,t[i+1])},_conditionalReturn=function(e,t){return e||e===0?t(e):t},_clamp$1=function(e,t,n){return n<e?e:n>t?t:n},getUnit=function(e,t){return!_isString$1(e)||!(t=_unitExp.exec(e))?``:t[1]},clamp$2=function(e,t,n){return _conditionalReturn(n,function(n){return _clamp$1(e,t,n)})},_slice=[].slice,_isArrayLike=function(e,t){return e&&_isObject$1(e)&&`length`in e&&(!t&&!e.length||e.length-1 in e&&_isObject$1(e[0]))&&!e.nodeType&&e!==_win$3},_flatten=function(e,t,n){return n===void 0&&(n=[]),e.forEach(function(e){var r;return _isString$1(e)&&!t||_isArrayLike(e,1)?(r=n).push.apply(r,toArray(e)):n.push(e)})||n},toArray=function(e,t,n){return _context$2&&!t&&_context$2.selector?_context$2.selector(e):_isString$1(e)&&!n&&(_coreInitted$2||!_wake())?_slice.call((t||_doc$3).querySelectorAll(e),0):_isArray(e)?_flatten(e,n):_isArrayLike(e)?_slice.call(e,0):e?[e]:[]},selector=function(e){return e=toArray(e)[0]||_warn(`Invalid scope`)||{},function(t){var n=e.current||e.nativeElement||e;return toArray(t,n.querySelectorAll?n:n===e?_warn(`Invalid scope`)||_doc$3.createElement(`div`):e)}},shuffle=function(e){return e.sort(function(){return .5-Math.random()})},distribute=function(e){if(_isFunction$1(e))return e;var t=_isObject$1(e)?e:{each:e},n=_parseEase(t.ease),r=t.from||0,i=parseFloat(t.base)||0,a={},o=r>0&&r<1,s=isNaN(r)||o,c=t.axis,l=r,u=r;return _isString$1(r)?l=u={center:.5,edges:.5,end:1}[r]||0:!o&&s&&(l=r[0],u=r[1]),function(e,o,d){var f=(d||t).length,p=a[f],m,g,_,y,b,x,S,C,T;if(!p){if(T=t.grid===`auto`?0:(t.grid||[1,_bigNum$1])[1],!T){for(S=-_bigNum$1;S<(S=d[T++].getBoundingClientRect().left)&&T<f;);T<f&&T--}for(p=a[f]=[],m=s?Math.min(T,f)*l-.5:r%T,g=T===_bigNum$1?0:s?f*u/T-.5:r/T|0,S=0,C=_bigNum$1,x=0;x<f;x++)_=x%T-m,y=g-(x/T|0),p[x]=b=c?Math.abs(c===`y`?y:_):_sqrt(_*_+y*y),b>S&&(S=b),b<C&&(C=b);r===`random`&&shuffle(p),p.max=S-C,p.min=C,p.v=f=(parseFloat(t.amount)||parseFloat(t.each)*(T>f?f-1:c?c===`y`?f/T:T:Math.max(T,f/T))||0)*(r===`edges`?-1:1),p.b=f<0?i-f:i,p.u=getUnit(t.amount||t.each)||0,n=n&&f<0?_invertEase(n):n}return f=(p[e]-p.min)/p.max||0,_roundPrecise(p.b+(n?n(f):f)*p.v)+p.u}},_roundModifier=function(e){var t=10**((e+``).split(`.`)[1]||``).length;return function(n){var r=_roundPrecise(Math.round(parseFloat(n)/e)*e*t);return(r-r%1)/t+(_isNumber$1(n)?0:getUnit(n))}},snap=function(e,t){var n=_isArray(e),r,i;return!n&&_isObject$1(e)&&(r=n=e.radius||_bigNum$1,e.values?(e=toArray(e.values),(i=!_isNumber$1(e[0]))&&(r*=r)):e=_roundModifier(e.increment)),_conditionalReturn(t,n?_isFunction$1(e)?function(t){return i=e(t),Math.abs(i-t)<=r?i:t}:function(t){for(var n=parseFloat(i?t.x:t),a=parseFloat(i?t.y:0),o=_bigNum$1,s=0,c=e.length,l,u;c--;)i?(l=e[c].x-n,u=e[c].y-a,l=l*l+u*u):l=Math.abs(e[c]-n),l<o&&(o=l,s=c);return s=!r||o<=r?e[s]:t,i||s===t||_isNumber$1(t)?s:s+getUnit(t)}:_roundModifier(e))},random=function(e,t,n,r){return _conditionalReturn(_isArray(e)?!t:n===!0?!!(n=0):!r,function(){return _isArray(e)?e[~~(Math.random()*e.length)]:(n||=1e-5)&&(r=n<1?10**((n+``).length-2):1)&&Math.floor(Math.round((e-n/2+Math.random()*(t-e+n*.99))/n)*n*r)/r})},pipe=function(){var e=[...arguments];return function(t){return e.reduce(function(e,t){return t(e)},t)}},unitize=function(e,t){return function(n){return e(parseFloat(n))+(t||getUnit(n))}},normalize$1=function(e,t,n){return mapRange(e,t,0,1,n)},_wrapArray=function(e,t,n){return _conditionalReturn(n,function(n){return e[~~t(n)]})},wrap=function e(t,n,r){var i=n-t;return _isArray(t)?_wrapArray(t,e(0,t.length),n):_conditionalReturn(r,function(e){return(i+(e-t)%i)%i+t})},wrapYoyo=function e(t,n,r){var i=n-t,a=i*2;return _isArray(t)?_wrapArray(t,e(0,t.length-1),n):_conditionalReturn(r,function(e){return e=(a+(e-t)%a)%a||0,t+(e>i?a-e:e)})},_replaceRandom=function(e){return e.replace(_randomExp,function(e){var t=e.indexOf(`[`)+1,n=e.substring(t||7,t?e.indexOf(`]`):e.length-1).split(_commaDelimExp);return random(t?n:+n[0],t?0:+n[1],+n[2]||1e-5)})},mapRange=function(e,t,n,r,i){var a=t-e,o=r-n;return _conditionalReturn(i,function(t){return n+((t-e)/a*o||0)})},interpolate=function e(t,n,r,i){var a=isNaN(t+n)?0:function(e){return(1-e)*t+e*n};if(!a){var o=_isString$1(t),s={},c,l,u,d,f;if(r===!0&&(i=1)&&(r=null),o)t={p:t},n={p:n};else if(_isArray(t)&&!_isArray(n)){for(u=[],d=t.length,f=d-2,l=1;l<d;l++)u.push(e(t[l-1],t[l]));d--,a=function(e){e*=d;var t=Math.min(f,~~e);return u[t](e-t)},r=n}else i||(t=_merge(_isArray(t)?[]:{},t));if(!u){for(c in n)_addPropTween.call(s,t,c,`get`,n[c]);a=function(e){return _renderPropTweens(e,s)||(o?t.p:t)}}}return _conditionalReturn(r,a)},_getLabelInDirection=function(e,t,n){var r=e.labels,i=_bigNum$1,a,o,s;for(a in r)o=r[a]-t,o<0==!!n&&o&&i>(o=Math.abs(o))&&(s=a,i=o);return s},_callback$1=function(e,t,n){var r=e.vars,i=r[t],a=_context$2,o=e._ctx,s,c,l;if(i)return s=r[t+`Params`],c=r.callbackScope||e,n&&_lazyTweens.length&&_lazyRender(),o&&(_context$2=o),l=s?i.apply(c,s):i.call(c),_context$2=a,l},_interrupt=function(e){return _removeFromParent(e),e.scrollTrigger&&e.scrollTrigger.kill(!!_reverting$1),e.progress()<1&&_callback$1(e,`onInterrupt`),e},_quickTween,_registerPluginQueue=[],_createPlugin=function(e){if(e)if(e=!e.name&&e.default||e,_windowExists$2()||e.headless){var t=e.name,n=_isFunction$1(e),r=t&&!n&&e.init?function(){this._props=[]}:e,i={init:_emptyFunc,render:_renderPropTweens,add:_addPropTween,kill:_killPropTweensOf,modifier:_addPluginModifier,rawVars:0},a={targetTest:0,get:0,getSetter:_getSetter,aliases:{},register:0};if(_wake(),e!==r){if(_plugins[t])return;_setDefaults$1(r,_setDefaults$1(_copyExcluding(e,i),a)),_merge(r.prototype,_merge
vendor: 6,557 bytes, line 9
9(i,_copyExcluding(e,a))),_plugins[r.prop=t]=r,e.targetTest&&(_harnessPlugins.push(r),_reservedProps[t]=1),t=(t===`css`?`CSS`:t.charAt(0).toUpperCase()+t.substr(1))+`Plugin`}_addGlobal(t,r),e.register&&e.register(gsap$2,r,PropTween)}else _registerPluginQueue.push(e)},_255=255,_colorLookup={aqua:[0,_255,_255],lime:[0,_255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,_255],navy:[0,0,128],white:[_255,_255,_255],olive:[128,128,0],yellow:[_255,_255,0],orange:[_255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[_255,0,0],pink:[_255,192,203],cyan:[0,_255,_255],transparent:[_255,_255,_255,0]},_hue=function(e,t,n){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(n-t)*e*6:e<.5?n:e*3<2?t+(n-t)*(2/3-e)*6:t)*_255+.5|0},splitColor=function(e,t,n){var r=e?_isNumber$1(e)?[e>>16,e>>8&_255,e&_255]:0:_colorLookup.black,i,a,o,s,c,l,u,d,f,p;if(!r){if(e.substr(-1)===`,`&&(e=e.substr(0,e.length-1)),_colorLookup[e])r=_colorLookup[e];else if(e.charAt(0)===`#`){if(e.length<6&&(i=e.charAt(1),a=e.charAt(2),o=e.charAt(3),e=`#`+i+i+a+a+o+o+(e.length===5?e.charAt(4)+e.charAt(4):``)),e.length===9)return r=parseInt(e.substr(1,6),16),[r>>16,r>>8&_255,r&_255,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),r=[e>>16,e>>8&_255,e&_255]}else if(e.substr(0,3)===`hsl`){if(r=p=e.match(_strictNumExp),!t)s=r[0]%360/360,c=r[1]/100,l=r[2]/100,a=l<=.5?l*(c+1):l+c-l*c,i=l*2-a,r.length>3&&(r[3]*=1),r[0]=_hue(s+1/3,i,a),r[1]=_hue(s,i,a),r[2]=_hue(s-1/3,i,a);else if(~e.indexOf(`=`))return r=e.match(_numExp),n&&r.length<4&&(r[3]=1),r}else r=e.match(_strictNumExp)||_colorLookup.transparent;r=r.map(Number)}return t&&!p&&(i=r[0]/_255,a=r[1]/_255,o=r[2]/_255,u=Math.max(i,a,o),d=Math.min(i,a,o),l=(u+d)/2,u===d?s=c=0:(f=u-d,c=l>.5?f/(2-u-d):f/(u+d),s=u===i?(a-o)/f+(a<o?6:0):u===a?(o-i)/f+2:(i-a)/f+4,s*=60),r[0]=~~(s+.5),r[1]=~~(c*100+.5),r[2]=~~(l*100+.5)),n&&r.length<4&&(r[3]=1),r},_colorOrderData=function(e){var t=[],n=[],r=-1;return e.split(_colorExp).forEach(function(e){var i=e.match(_numWithUnitExp)||[];t.push.apply(t,i),n.push(r+=i.length+1)}),t.c=n,t},_formatColors=function(e,t,n){var r=``,i=(e+r).match(_colorExp),a=t?`hsla(`:`rgba(`,o=0,s,c,l,u;if(!i)return e;if(i=i.map(function(e){return(e=splitColor(e,t,1))&&a+(t?e[0]+`,`+e[1]+`%,`+e[2]+`%,`+e[3]:e.join(`,`))+`)`}),n&&(l=_colorOrderData(e),s=n.c,s.join(r)!==l.c.join(r)))for(c=e.replace(_colorExp,`1`).split(_numWithUnitExp),u=c.length-1;o<u;o++)r+=c[o]+(~s.indexOf(o)?i.shift()||a+`0,0,0,0)`:(l.length?l:i.length?i:n).shift());if(!c)for(c=e.split(_colorExp),u=c.length-1;o<u;o++)r+=c[o]+i[o];return r+c[u]},_colorExp=function(){var e=`(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b`,t;for(t in _colorLookup)e+=`|`+t+`\\b`;return RegExp(e+`)`,`gi`)}(),_hslExp=/hsl[a]?\(/,_colorStringFilter=function(e){var t=e.join(` `),n;if(_colorExp.lastIndex=0,_colorExp.test(t))return n=_hslExp.test(t),e[1]=_formatColors(e[1],n),e[0]=_formatColors(e[0],n,_colorOrderData(e[1])),!0},_tickerActive,_ticker=function(){var e=Date.now,t=500,n=33,r=e(),i=r,a=1e3/240,o=a,s=[],c,l,u,d,f,p,m=function u(m){var g=e()-i,_=m===!0,y,b,x,S;if((g>t||g<0)&&(r+=g-n),i+=g,x=i-r,y=x-o,(y>0||_)&&(S=++d.frame,f=x-d.time*1e3,d.time=x/=1e3,o+=y+(y>=a?4:a-y),b=1),_||(c=l(u)),b)for(p=0;p<s.length;p++)s[p](x,f,S,m)};return d={time:0,frame:0,tick:function(){m(!0)},deltaRatio:function(e){return f/(1e3/(e||60))},wake:function(){_coreReady&&(!_coreInitted$2&&_windowExists$2()&&(_win$3=_coreInitted$2=window,_doc$3=_win$3.document||{},_globals.gsap=gsap$2,(_win$3.gsapVersions||=[]).push(gsap$2.version),_install(_installScope||_win$3.GreenSockGlobals||!_win$3.gsap&&_win$3||{}),_registerPluginQueue.forEach(_createPlugin)),u=typeof requestAnimationFrame<`u`&&requestAnimationFrame,c&&d.sleep(),l=u||function(e){return setTimeout(e,o-d.time*1e3+1|0)},_tickerActive=1,m(2))},sleep:function(){(u?cancelAnimationFrame:clearTimeout)(c),_tickerActive=0,l=_emptyFunc},lagSmoothing:function(e,r){t=e||1/0,n=Math.min(r||33,t)},fps:function(e){a=1e3/(e||240),o=d.time*1e3+a},add:function(e,t,n){var r=t?function(t,n,i,a){e(t,n,i,a),d.remove(r)}:e;return d.remove(e),s[n?`unshift`:`push`](r),_wake(),r},remove:function(e,t){~(t=s.indexOf(e))&&s.splice(t,1)&&p>=t&&p--},_listeners:s},d}(),_wake=function(){return!_tickerActive&&_ticker.wake()},_easeMap={},_customEaseExp=/^[\d.\-M][\d.\-,\s]/,_quotesExp=/["']/g,_parseObjectInString=function(e){for(var t={},n=e.substr(1,e.length-3).split(`:`),r=n[0],i=1,a=n.length,o,s,c;i<a;i++)s=n[i],o=i===a-1?s.length:s.lastIndexOf(`,`),c=s.substr(0,o),t[r]=isNaN(c)?c.replace(_quotesExp,``).trim():+c,r=s.substr(o+1).trim();return t},_valueInParentheses=function(e){var t=e.indexOf(`(`)+1,n=e.indexOf(`)`),r=e.indexOf(`(`,t);return e.substring(t,~r&&r<n?e.indexOf(`)`,n+1):n)},_configEaseFromString=function(e){var t=(e+``).split(`(`),n=_easeMap[t[0]];return n&&t.length>1&&n.config?n.config.apply(null,~e.indexOf(`{`)?[_parseObjectInString(t[1])]:_valueInParentheses(e).split(`,`).map(_numericIfPossible)):_easeMap._CE&&_customEaseExp.test(e)?_easeMap._CE(``,e):n},_invertEase=function(e){return function(t){return 1-e(1-t)}},_parseEase=function(e,t){return e&&(_isFunction$1(e)?e:_easeMap[e]||_configEaseFromString(e))||t},_insertEase=function(e,t,n,r){n===void 0&&(n=function(e){return 1-t(1-e)}),r===void 0&&(r=function(e){return e<.5?t(e*2)/2:1-t((1-e)*2)/2});var i={easeIn:t,easeOut:n,easeInOut:r},a;return _forEachName(e,function(e){for(var t in _easeMap[e]=_globals[e]=i,_easeMap[a=e.toLowerCase()]=n,i)_easeMap[a+(t===`easeIn`?`.in`:t===`easeOut`?`.out`:`.inOut`)]=_easeMap[e+`.`+t]=i[t]}),i},_easeInOutFromOut=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},_configElastic=function e(t,n,r){var i=n>=1?n:1,a=(r||(t?.3:.45))/(n<1?n:1),o=a/_2PI*(Math.asin(1/i)||0),s=function(e){return e===1?1:i*2**(-10*e)*_sin((e-o)*a)+1},c=t===`out`?s:t===`in`?function(e){return 1-s(1-e)}:_easeInOutFromOut(s);return a=_2PI/a,c.config=function(n,r){return e(t,n,r)},c},_configBack=function e(t,n){n===void 0&&(n=1.70158);var r=function(e){return e?--e*e*((n+1)*e+n)+1:0},i=t===`out`?r:t===`in`?function(e){return 1-r(1-e)}:_easeInOutFromOut(r);return i.config=function(n){return e(t,n)},i};_forEachName(`Linear,Quad,Cubic,Quart,Quint,Strong`,function(e,t){var n=t<5?t+1:t;_insertEase(e+`,Power`+(n-1),t?function(e){return e**+n}:function(e){return e},function(e){return 1-(1-e)**n},function(e){return e<.5?(e*2)**n/2:1-((1-e)*2)**n/2})}),_easeMap.Linear.easeNone=_easeMap.none=_easeMap.Linear.easeIn,_insertEase(`Elastic`,_
9configElastic(`in`),_configElastic(`out`),_configElastic()),(function(e,t){var n=1/t,r=2*n,i=2.5*n,a=function(a){return a<n?e*a*a:a<r?e*(a-1.5/t)**2+.75:a<i?e*(a-=2.25/t)*a+.9375:e*(a-2.625/t)**2+.984375};_insertEase(`Bounce`,function(e){return 1-a(1-e)},a)})(7.5625,2.75),_insertEase(`Expo`,function(e){return 2**(10*(e-1))*e+e*e*e*e*e*e*(1-e)}),_insertEase(`Circ`,function(e){return-(_sqrt(1-e*e)-1)}),_insertEase(`Sine`,function(e){return e===1?1:-_cos(e*_HALF_PI)+1}),_insertEase(`Back`,_configBack(`in`),_configBack(`out`),_configBack()),_easeMap.SteppedEase=_easeMap.steps=_globals.SteppedEase={config:function(e,t){e===void 0&&(e=1);var n=1/e,r=e+ +!t,i=+!!t,a=1-_tinyNum;return function(e){return((r*_clamp$1(0,a,e)|0)+i)*n}}},_defaults$1.ease=_easeMap[`quad.out`],_forEachName(`onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt`,function(e){return _callbackNames+=e+`,`+e+`Params,`});var GSCache=function(e,t){this.id=_gsID++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:_getProperty,this.set=t?t.getSetter:_getSetter},Animation=function(){function e(e){this.vars=e,this._delay=+e.delay||0,(this._repeat=e.repeat===1/0?-2:e.repeat||0)&&(this._rDelay=e.repeatDelay||0,this._yoyo=!!e.yoyo||!!e.yoyoEase),this._ts=1,_setDuration(this,+e.duration,1,1),this.data=e.data,_context$2&&(this._ctx=_context$2,_context$2.data.push(this)),_tickerActive||_ticker.wake()}var t=e.prototype;return t.delay=function(e){return e||e===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+e-this._delay),this._delay=e,this):this._delay},t.duration=function(e){return arguments.length?this.totalDuration(this._repeat>0?e+(e+this._rDelay)*this._repeat:e):this.totalDuration()&&this._dur},t.totalDuration=function(e){return arguments.length?(this._dirty=0,_setDuration(this,this._repeat<0?e:(e-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},t.totalTime=function(e,t){if(_wake(),!arguments.length)return this._tTime;var n=this._dp;if(n&&n.smoothChildTiming&&this._ts){for(_alignPlayhead(this,e),!n._dp||n.parent||_postAddChecks(n,this);n&&n.parent;)n.parent._time!==n._start+(n._ts>=0?n._tTime/n._ts:(n.totalDuration()-n._tTime)/-n._ts)&&n.totalTime(n._tTime,!0),n=n.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&e<this._tDur||this._ts<0&&e>
vendor: 24,523 bytes, line 9
90||!this._tDur&&!e)&&_addToTimeline(this._dp,this,this._start-this._delay)}return(this._tTime!==e||!this._dur&&!t||this._initted&&Math.abs(this._zTime)===_tinyNum||!this._initted&&this._dur&&e||!e&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=e),_lazySafeRender(this,e,t)),this},t.time=function(e,t){return arguments.length?this.totalTime(Math.min(this.totalDuration(),e+_elapsedCycleDuration(this))%(this._dur+this._rDelay)||(e?this._dur:0),t):this._time},t.totalProgress=function(e,t){return arguments.length?this.totalTime(this.totalDuration()*e,t):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},t.progress=function(e,t){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-e:e)+_elapsedCycleDuration(this),t):this.duration()?Math.min(1,this._time/this._dur):+(this.rawTime()>0)},t.iteration=function(e,t){var n=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(e-1)*n,t):this._repeat?_animationCycle(this._tTime,n)+1:1},t.timeScale=function(e,t){if(!arguments.length)return this._rts===-_tinyNum?0:this._rts;if(this._rts===e)return this;var n=this.parent&&this._ts?_parentToChildTotalTime(this.parent._time,this):this._tTime;return this._rts=+e||0,this._ts=this._ps||e===-_tinyNum?0:this._rts,this.totalTime(_clamp$1(-Math.abs(this._delay),this.totalDuration(),n),t!==!1),_setEnd(this),_recacheAncestors(this)},t.paused=function(e){return arguments.length?(this._ps!==e&&(this._ps=e,e?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(_wake(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==_tinyNum&&(this._tTime-=_tinyNum)))),this):this._ps},t.startTime=function(e){if(arguments.length){this._start=_roundPrecise(e);var t=this.parent||this._dp;return t&&(t._sort||!this.parent)&&_addToTimeline(t,this,this._start-this._delay),this}return this._start},t.endTime=function(e){return this._start+(_isNotFalse(e)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},t.rawTime=function(e){var t=this.parent||this._dp;return t?e&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?_parentToChildTotalTime(t.rawTime(e),this):this._tTime:this._tTime},t.revert=function(e){e===void 0&&(e=_revertConfig);var t=_reverting$1;return _reverting$1=e,_isRevertWorthy(this)&&(this.timeline&&this.timeline.revert(e),this.totalTime(-.01,e.suppressEvents)),this.data!==`nested`&&e.kill!==!1&&this.kill(),_reverting$1=t,this},t.globalTime=function(e){for(var t=this,n=arguments.length?e:t.rawTime();t;)n=t._start+n/(Math.abs(t._ts)||1),t=t._dp;return!this.parent&&this._sat?this._sat.globalTime(e):n},t.repeat=function(e){return arguments.length?(this._repeat=e===1/0?-2:e,_onUpdateTotalDuration(this)):this._repeat===-2?1/0:this._repeat},t.repeatDelay=function(e){if(arguments.length){var t=this._time;return this._rDelay=e,_onUpdateTotalDuration(this),t?this.time(t):this}return this._rDelay},t.yoyo=function(e){return arguments.length?(this._yoyo=e,this):this._yoyo},t.seek=function(e,t){return this.totalTime(_parsePosition$1(this,e),_isNotFalse(t))},t.restart=function(e,t){return this.play().totalTime(e?-this._delay:0,_isNotFalse(t)),this._dur||(this._zTime=-_tinyNum),this},t.play=function(e,t){return e!=null&&this.seek(e,t),this.reversed(!1).paused(!1)},t.reverse=function(e,t){return e!=null&&this.seek(e||this.totalDuration(),t),this.reversed(!0).paused(!1)},t.pause=function(e,t){return e!=null&&this.seek(e,t),this.paused(!0)},t.resume=function(){return this.paused(!1)},t.reversed=function(e){return arguments.length?(!!e!==this.reversed()&&this.timeScale(-this._rts||(e?-_tinyNum:0)),this):this._rts<0},t.invalidate=function(){return this._initted=this._act=0,this._zTime=-_tinyNum,this},t.isActive=function(){var e=this.parent||this._dp,t=this._start,n;return!!(!e||this._ts&&this._initted&&e.isActive()&&(n=e.rawTime(!0))>=t&&n<this.endTime(!0)-_tinyNum)},t.eventCallback=function(e,t,n){var r=this.vars;return arguments.length>1?(t?(r[e]=t,n&&(r[e+`Params`]=n),e===`onUpdate`&&(this._onUpdate=t)):delete r[e],this):r[e]},t.then=function(e){var t=this,n=t._prom;return new Promise(function(r){var i=_isFunction$1(e)?e:_passThrough$1,a=function(){var e=t.then;t.then=null,n&&n(),_isFunction$1(i)&&(i=i(t))&&(i.then||i===t)&&(t.then=e),r(i),t.then=e};t._initted&&t.totalProgress()===1&&t._ts>=0||!t._tTime&&t._ts<0?a():t._prom=a})},t.kill=function(){_interrupt(this)},e}();_setDefaults$1(Animation.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-_tinyNum,_prom:0,_ps:!1,_rts:1});var Timeline=function(e){_inheritsLoose(t,e);function t(t,n){var r;return t===void 0&&(t={}),r=e.call(this,t)||this,r.labels={},r.smoothChildTiming=!!t.smoothChildTiming,r.autoRemoveChildren=!!t.autoRemoveChildren,r._sort=_isNotFalse(t.sortChildren),_globalTimeline&&_addToTimeline(t.parent||_globalTimeline,_assertThisInitialized(r),n),t.reversed&&r.reverse(),t.paused&&r.paused(!0),t.scrollTrigger&&_scrollTrigger(_assertThisInitialized(r),t.scrollTrigger),r}var n=t.prototype;return n.to=function(e,t,n){return _createTweenType(0,arguments,this),this},n.from=function(e,t,n){return _createTweenType(1,arguments,this),this},n.fromTo=function(e,t,n,r){return _createTweenType(2,arguments,this),this},n.set=function(e,t,n){return t.duration=0,t.parent=this,_inheritDefaults(t).repeatDelay||(t.repeat=0),t.immediateRender=!!t.immediateRender,new Tween(e,t,_parsePosition$1(this,n),1),this},n.call=function(e,t,n){return _addToTimeline(this,Tween.delayedCall(0,e,t),n)},n.staggerTo=function(e,t,n,r,i,a,o){return n.duration=t,n.stagger=n.stagger||r,n.onComplete=a,n.onCompleteParams=o,n.parent=this,new Tween(e,n,_parsePosition$1(this,i)),this},n.staggerFrom=function(e,t,n,r,i,a,o){return n.runBackwards=1,_inheritDefaults(n).immediateRender=_isNotFalse(n.immediateRender),this.staggerTo(e,t,n,r,i,a,o)},n.staggerFromTo=function(e,t,n,r,i,a,o,s){return r.startAt=n,_inheritDefaults(r).immediateRender=_isNotFalse(r.immediateRender),this.staggerTo(e,t,r,i,a,o,s)},n.render=function(e,t,n){var r=this._time,i=this._dirty?this.totalDuration():this._tDur,a=this._dur,o=e<=0?0:_roundPrecise(e),s=this._zTime<0!=e<0&&(this._initted||!a),c,l,u,d,f,p,m,g,_,y,b,x;if(this!==_globalTimeline&&o>i&&e>=0&&(o=i),o!==this._tTime||n||s){if(r!==this._time&&a&&(o+=this._time-r,e+=this._time-r),c=o,_=this._start,g=this._ts,p=!g,s&&(a||(r=this._zTime),(e||!t)&&(this._zTime=e)),this._repeat){if(b=this._yoyo,f=a+this._rDelay,this._repeat<-1&&e<0)return this.totalTime(f*100+e,t,n);if(c=_roundPrecise(o%f),o===i?(d=this._repeat,c=a):(y=_roundPrecise(o/f),d=~~y,d&&d===y&&(c=a,d--),c>a&&(c=a)),y=_animationCycle(this._tTime,f),!r&&this._tTime&&y!==d&&this._tTime-y*f-this._dur<=0&&(y=d),b&&d&1&&(c=a-c,x=1),d!==y&&!this._lock){var S=b&&y&1,C=S===(b&&d&1);if(d<y&&(S=!S),r=S?0:o%a?a:o,this._lock=1,this.render(r||(x?0:_roundPrecise(d*f)),t,!a)._lock=0,this._tTime=o,!t&&this.parent&&_callback$1(this,`onRepeat`),this.vars.repeatRefresh&&!x&&(this.invalidate()._lock=1,y=d),r&&r!==this._time||p!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act||(a=this._dur,i=this._tDur,C&&(this._lock=2,r=S?a:-1e-4,this.render(r,!0),this.vars.repeatRefresh&&!x&&this.invalidate()),this._lock=0,!this._ts&&!p))return this}}if(this._hasPause&&!this._forcing&&this._lock<2&&(m=_findNextPauseTween(this,_roundPrecise(r),_roundPrecise(c)),m&&(o-=c-(c=m._start))),this._tTime=o,this._time=c,this._act=!!g,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=e,r=0),!r&&o&&a&&!t&&!y&&(_callback$1(this,`onStart`),this._tTime!==o))return this;if(c>=r&&e>=0)for(l=this._first;l;){if(u=l._next,(l._act||c>=l._start)&&l._ts&&m!==l){if(l.parent!==this)return this.render(e,t,n);if(l.render(l._ts>0?(c-l._start)*l._ts:(l._dirty?l.totalDuration():l._tDur)+(c-l._start)*l._ts,t,n),c!==this._time||!this._ts&&!p){m=0,u&&(o+=this._zTime=-_tinyNum);break}}l=u}else{l=this._last;for(var T=e<0?e:c;l;){if(u=l._prev,(l._act||T<=l._end)&&l._ts&&m!==l){if(l.parent!==this)return this.render(e,t,n);if(l.render(l._ts>0?(T-l._start)*l._ts:(l._dirty?l.totalDuration():l._tDur)+(T-l._start)*l._ts,t,n||_reverting$1&&_isRevertWorthy(l)),c!==this._time||!this._ts&&!p){m=0,u&&(o+=this._zTime=T?-_tinyNum:_tinyNum);break}}l=u}}if(m&&!t&&(this.pause(),m.render(c>=r?0:-_tinyNum)._zTime=c>=r?1:-1,this._ts))return this._start=_,_setEnd(this),this.render(e,t,n);this._onUpdate&&!t&&_callback$1(this,`onUpdate`,!0),(o===i&&this._tTime>=this.totalDuration()||!o&&r)&&(_===this._start||Math.abs(g)!==Math.abs(this._ts))&&(this._lock||((e||!a)&&(o===i&&this._ts>0||!o&&this._ts<0)&&_removeFromParent(this,1),!t&&!(e<0&&!r)&&(o||r||!i)&&(_callback$1(this,o===i&&e>=0?`onComplete`:`onReverseComplete`,!0),this._prom&&!(o<i&&this.timeScale()>0)&&this._prom())))}return this},n.add=function(e,t){var n=this;if(_isNumber$1(t)||(t=_parsePosition$1(this,t,e)),!(e instanceof Animation)){if(_isArray(e))return e.forEach(function(e){return n.add(e,t)}),this;if(_isString$1(e))return this.addLabel(e,t);if(_isFunction$1(e))e=Tween.delayedCall(0,e);else return this}return this===e?this:_addToTimeline(this,e,t)},n.getChildren=function(e,t,n,r){e===void 0&&(e=!0),t===void 0&&(t=!0),n===void 0&&(n=!0),r===void 0&&(r=-_bigNum$1);for(var i=[],a=this._first;a;)a._start>=r&&(a instanceof Tween?t&&i.push(a):(n&&i.push(a),e&&i.push.apply(i,a.getChildren(!0,t,n)))),a=a._next;return i},n.getById=function(e){for(var t=this.getChildren(1,1,1),n=t.length;n--;)if(t[n].vars.id===e)return t[n]},n.remove=function(e){return _isString$1(e)?this.removeLabel(e):_isFunction$1(e)?this.killTweensOf(e):(e.parent===this&&_removeLinkedListItem(this,e),e===this._recent&&(this._recent=this._last),_uncache(this))},n.totalTime=function(t,n){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=_roundPrecise(_ticker.time-(this._ts>0?t/this._ts:(this.totalDuration()-t)/-this._ts))),e.prototype.totalTime.call(this,t,n),this._forcing=0,this):this._tTime},n.addLabel=function(e,t){return this.labels[e]=_parsePosition$1(this,t),this},n.removeLabel=function(e){return delete this.labels[e],this},n.addPause=function(e,t,n){var r=Tween.delayedCall(0,t||_emptyFunc,n);return r.data=`isPause`,this._hasPause=1,_addToTimeline(this,r,_parsePosition$1(this,e))},n.removePause=function(e){var t=this._first;for(e=_parsePosition$1(this,e);t;)t._start===e&&t.data===`isPause`&&_removeFromParent(t),t=t._next},n.killTweensOf=function(e,t,n){for(var r=this.getTweensOf(e,n),i=r.length;i--;)_overwritingTween!==r[i]&&r[i].kill(e,t);return this},n.getTweensOf=function(e,t){for(var n=[],r=toArray(e),i=this._first,a=_isNumber$1(t),o;i;)i instanceof Tween?_arrayContainsAny(i._targets,r)&&(a?(!_overwritingTween||i._initted&&i._ts)&&i.globalTime(0)<=t&&i.globalTime(i.totalDuration())>t:!t||i.isActive())&&n.push(i):(o=i.getTweensOf(r,t)).length&&n.push.apply(n,o),i=i._next;return n},n.tweenTo=function(e,t){t||={};var n=this,r=_parsePosition$1(n,e),i=t,a=i.startAt,o=i.onStart,s=i.onStartParams,c=i.immediateRender,l,u=Tween.to(n,_setDefaults$1({ease:t.ease||`none`,lazy:!1,immediateRender:!1,time:r,overwrite:`auto`,duration:t.duration||Math.abs((r-(a&&`time`in a?a.time:n._time))/n.timeScale())||_tinyNum,onStart:function(){if(n.pause(),!l){var e=t.duration||Math.abs((r-(a&&`time`in a?a.time:n._time))/n.timeScale());u._dur!==e&&_setDuration(u,e,0,1).render(u._time,!0,!0),l=1}o&&o.apply(u,s||[])}},t));return c?u.render(0):u},n.tweenFromTo=function(e,t,n){return this.tweenTo(t,_setDefaults$1({startAt:{time:_parsePosition$1(this,e)}},n))},n.recent=function(){return this._recent},n.nextLabel=function(e){return e===void 0&&(e=this._time),_getLabelInDirection(this,_parsePosition$1(this,e))},n.previousLabel=function(e){return e===void 0&&(e=this._time),_getLabelInDirection(this,_parsePosition$1(this,e),1)},n.currentLabel=function(e){return arguments.length?this.seek(e,!0):this.previousLabel(this._time+_tinyNum)},n.shiftChildren=function(e,t,n){n===void 0&&(n=0);var r=this._first,i=this.labels,a;for(e=_roundPrecise(e);r;)r._start>=n&&(r._start+=e,r._end+=e),r=r._next;if(t)for(a in i)i[a]>=n&&(i[a]+=e);return _uncache(this)},n.invalidate=function(t){var n=this._first;for(this._lock=0;n;)n.invalidate(t),n=n._next;return e.prototype.invalidate.call(this,t)},n.clear=function(e){e===void 0&&(e=!0);for(var t=this._first,n;t;)n=t._next,this.remove(t),t=n;return this._dp&&(this._time=this._tTime=this._pTime=0),e&&(this.labels={}),_uncache(this)},n.totalDuration=function(e){var t=0,n=this,r=n._last,i=_bigNum$1,a,o,s;if(arguments.length)return n.timeScale((n._repeat<0?n.duration():n.totalDuration())/(n.reversed()?-e:e));if(n._dirty){for(s=n.parent;r;)a=r._prev,r._dirty&&r.totalDuration(),o=r._start,o>i&&n._sort&&r._ts&&!n._lock?(n._lock=1,_addToTimeline(n,r,o-r._delay,1)._lock=0):i=o,o<0&&r._ts&&(t-=o,(!s&&!n._dp||s&&s.smoothChildTiming)&&(n._start+=_roundPrecise(o/n._ts),n._time-=o,n._tTime-=o),n.shiftChildren(-o,!1,-1/0),i=0),r._end>t&&r._ts&&(t=r._end),r=a;_setDuration(n,n===_globalTimeline&&n._time>t?n._time:t,1,1),n._dirty=0}return n._tDur},t.updateRoot=function(e){if(_globalTimeline._ts&&(_lazySafeRender(_globalTimeline,_parentToChildTotalTime(e,_globalTimeline)),_lastRenderedFrame=_ticker.frame),_ticker.frame>=_nextGCFrame){_nextGCFrame+=_config.autoSleep||120;var t=_globalTimeline._first;if((!t||!t._ts)&&_config.autoSleep&&_ticker._listeners.length<2){for(;t&&!t._ts;)t=t._next;t||_ticker.sleep()}}},t}(Animation);_setDefaults$1(Timeline.prototype,{_lock:0,_hasPause:0,_forcing:0});var _addComplexStringPropTween=function(e,t,n,r,i,a,o){var s=new PropTween(this._pt,e,t,0,1,_renderComplexString,null,i),c=0,l=0,u,d,f,p,m,g,_,y;for(s.b=n,s.e=r,n+=``,r+=``,(_=~r.indexOf(`random(`))&&(r=_replaceRandom(r)),a&&(y=[n,r],a(y,e,t),n=y[0],r=y[1]),d=n.match(_complexStringNumExp)||[];u=_complexStringNumExp.exec(r);)p=u[0],m=r.substring(c,u.index),f?f=(f+1)%5:m.substr(-5)===`rgba(`&&(f=1),p!==d[l++]&&(g=parseFloat(d[l-1])||0,s._pt={_next:s._pt,p:m||l===1?m:`,`,s:g,c:p.charAt(1)===`=`?_parseRelative(g,p)-g:parseFloat(p)-g,m:f&&f<4?Math.round:0},c=_complexStringNumExp.lastIndex);return s.c=c<r.length?r.substring(c,r.length):``,s.fp=o,(_relExp.test(r)||_)&&(s.e=0),this._pt=s,s},_addPropTween=function(e,t,n,r,i,a,o,s,c,l){_isFunction$1(r)&&(r=r(i||0,e,a));var u=e[t],d=n===`get`?_isFunction$1(u)?c?e[t.indexOf(`set`)||!_isFunction$1(e[`get`+t.substr(3)])?t:`get`+t.substr(3)](c):e[t]():u:n,f=_isFunction$1(u)?c?_setterFuncWithParam:_setterFunc:_setterPlain,p;if(_isString$1(r)&&(~r.indexOf(`random(`)&&(r=_replaceRandom(r)),r.charAt(1)===`=`&&(p=_parseRelative(d,r)+(getUnit(d)||0),(p||p===0)&&(r=p))),!l||d!==r||_forceAllPropTweens)return!isNaN(d*r)&&r!==``?(p=new PropTween(this._pt,e,t,+d||0,r-(d||0),typeof u==`boolean`?_renderBoolean:_renderPlain,0,f),c&&(p.fp=c),o&&p.modifier(o,this,e),this._pt=p):(!u&&!(t in e)&&_missingPlugin(t,r),_addComplexStringPropTween.call(this,e,t,d,r,f,s||_config.stringFilter,c))},_processVars=function(e,t,n,r,i){if(_isFunction$1(e)&&(e=_parseFuncOrString(e,i,t,n,r)),!_isObject$1(e)||e.style&&e.nodeType||_isArray(e)||_isTypedArray(e))return _isString$1(e)?_parseFuncOrString(e,i,t,n,r):e;var a={},o;for(o in e)a[o]=_parseFuncOrString(e[o],i,t,n,r);return a},_checkPlugin=function(e,t,n,r,i,a){var o,s,c,l;if(_plugins[e]&&(o=new _plugins[e]).init(i,o.rawVars?t[e]:_processVars(t[e],r,i,a,n),n,r,a)!==!1&&(n._pt=s=new PropTween(n._pt,i,e,0,1,o.render,o,0,o.priority),n!==_quickTween))for(c=n._ptLookup[n._targets.indexOf(i)],l=o._props.length;l--;)c[o._props[l]]=s;return o},_overwritingTween,_forceAllPropTweens,_initTween=function e(t,n,r){var i=t.vars,a=i.ease,o=i.startAt,s=i.immediateRender,c=i.lazy,l=i.onUpdate,u=i.runBackwards,d=i.yoyoEase,f=i.keyframes,p=i.autoRevert,m=t._dur,g=t._startAt,_=t._targets,y=t.parent,b=y&&y.data===`nested`?y.vars.targets:_,x=t._overwrite===`auto`&&!_suppressOverwrites$1,S=t.timeline,C=i.easeReverse||d,T,E,D,O,k,A,j,M,N,P,F,I,L;if(S&&(!f||!a)&&(a=`none`),t._ease=_parseEase(a,_defaults$1.ease),t._rEase=C&&(_parseEase(C)||t._ease),t._from=!S&&!!i.runBackwards,t._from&&(t.ratio=1),!S||f&&!i.stagger){if(M=_[0]?_getCache(_[0]).harness:0,I=M&&i[M.prop],T=_copyExcluding(i,_reservedProps),g&&(g._zTime<0&&g.progress(1),n<0&&u&&s&&!p?g.render(-1,!0):g.revert(u&&m?_revertConfigNoKill:_startAtRevertConfig),g._lazy=0),o){if(_removeFromParent(t._startAt=Tween.set(_,_setDefaults$1({data:`isStart`,overwrite:!1,parent:y,immediateRender:!0,lazy:!g&&_isNotFalse(c),startAt:null,delay:0,onUpdate:l&&function(){return _callback$1(t,`onUpdate`)},stagger:0},o))),t._startAt._dp=0,t._startAt._sat=t,n<0&&(_reverting$1||!s&&!p)&&t._startAt.revert(_revertConfigNoKill),s&&m&&n<=0&&r<=0){n&&(t._zTime=n);return}}else if(u&&m&&!g){if(n&&(s=!1),D=_setDefaults$1({overwrite:!1,data:`isFromStart`,lazy:s&&!g&&_isNotFalse(c),immediateRender:s,stagger:0,parent:y},T),I&&(D[M.prop]=I),_removeFromParent(t._startAt=Tween.set(_,D)),t._startAt._dp=0,t._startAt._sat=t,n<0&&(_reverting$1?t._startAt.revert(_revertConfigNoKill):t._startAt.render(-1,!0)),t._zTime=n,!s)e(t._startAt,_tinyNum,_tinyNum);else if(!n)return}for(t._pt=t._ptCache=0,c=m&&_isNotFalse(c)||c&&!m,E=0;E<_.length;E++){if(k=_[E],j=k._gsap||_harness(_)[E]._gsap,t._ptLookup[E]=P={},_lazyLookup[j.id]&&_lazyTweens.length&&_lazyRender(),F=b===_?E:b.indexOf(k),M&&(N=new M).init(k,I||T,t,F,b)!==!1&&(t._pt=O=new PropTween(t._pt,k,N.name,0,1,N.render,N,0,N.priority),N._props.forEach(function(e){P[e]=O}),N.priority&&(A=1)),!M||I)for(D in T)_plugins[D]&&(N=_checkPlugin(D,T,t,F,k,b))?N.priority&&(A=1):P[D]=O=_addPropTween.call(t,k,D,`get`,T[D],F,b,0,i.stringFilter);t._op&&t._op[E]&&t.kill(k,t._op[E]),x&&t._pt&&(_overwritingTween=t,_globalTimeline.killTweensOf(k,P,t.globalTime(n)),L=!t.parent,_overwritingTween=0),t._pt&&c&&(_lazyLookup[j.id]=1)}A&&_sortPropTweensByPriority(t),t._onInit&&t._onInit(t)}t._onUpdate=l,t._initted=(!t._op||t._pt)&&!L,f&&n<=0&&S.render(_bigNum$1,!0,!0)},_updatePropTweens=function(e,t,n,r,i,a,o,s){var c=(e._pt&&e._ptCache||(e._ptCache={}))[t],l,u,d,f;if(!c)for(c=e._ptCache[t]=[],d=e._ptLookup,f=e._targets.length;f--;){if(l=d[f][t],l&&l.d&&l.d._pt)for(l=l.d._pt;l&&l.p!==t&&l.fp!==t;)l=l._next;if(!l)return _forceAllPropTweens=1,e.vars[t]=`+=0`,_initTween(e,o),_forceAllPropTweens=0,s?_warn(t+` not eligible for reset. Try splitting into individual properties`):1;c.push(l)}for(f=c.length;f--;)u=c[f],l=u._pt||u,l.s=(r||r===0)&&!i?r:l.s+(r||0)+a*l.c,l.c=n-l.s,u.e&&=_round$1(n)+getUnit(u.e),u.b&&=l.s+getUnit(u.b)},_addAliasesToVars=function(e,t){var n=e[0]?_getCache(e[0]).harness:0,r=n&&n.aliases,i,a,o,s;if(!r)return t;for(a in i=_merge({},t),r)if(a in i)for(s=r[a].split(`,`),o=s.length;o--;)i[s[o]]=i[a];return i},_parseKeyframe=function(e,t,n,r){var i=t.ease||r||`power1.inOut`,a,o;if(_isArray(t))o=n[e]||(n[e]=[]),t.forEach(function(e,n){return o.push({t:n/(t.length-1)*100,v:e,e:i})});else for(a in t)o=n[a]||(n[a]=[]),a===`ease`||o.push({t:parseFloat(e),v:t[a],e:i})},_parseFuncOrString=function(e,t,n,r,i){return _isFunction$1(e)?e.call(t,n,r,i):_isString$1(e)&&~e.indexOf(`random(`)?_replaceRandom(e):e},_staggerTweenProps=_callbackNames+`repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,easeReverse,autoRevert`,_staggerPropsToSkip={};_forEachName(_staggerTweenProps+`,id,stagger,delay,duration,paused,scrollTrigger`,function(e){return _staggerPropsToSkip[e]=1});var Tween=function(e){_inheritsLoose(t,e);function t(t,n,r,i){var a;typeof n==`number`&&(r.duration=n,n=r,r=null),a=e.call(this,i?n:_inheritDefaults(n))||this;var o=a.vars,s=o.duration,c=o.delay,l=o.immediateRender,u=o.stagger,d=o.overwrite,f=o.keyframes,p=o.defaults,m=o.scrollTrigger,g=n.parent||_globalTimeline,_=(_isArray(t)||_isTypedArray(t)?_isNumber$1(t[0]):`length`in n)?[t]:toArray(t),y,b,x,S,C,T,E,D;if(a._targets=_.length?_harness(_):_warn(`GSAP target `+t+` not found. https://gsap.com`,!_config.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=d,f||u||_isFuncOrString(s)||_isFuncOrString(c)){n=a.vars;var O=n.easeReverse||n.yoyoEase;if(y=a.timeline=new Timeline({data:`nested`,defaults:p||{},targets:g&&g.data===`nested`?g.vars.targets:_}),y.kill(),y.parent=y._dp=_assertThisInitialized(a),y._start=0,u||_isFuncOrString(s)||_isFuncOrString(c)){if(S=_.length,E=u&&distribute(u),_isObject$1(u))for(C in u)~_staggerTweenProps.indexOf(C)&&(D||={},D[C]=u[C]);for(b=0;b<S;b++)x=_copyExcluding(n,_staggerPropsToSkip),x.stagger=0,O&&(x.easeReverse=O),D&&_merge(x,D),T=_[b],x.duration=+_parseFuncOrString(s,_assertThisInitialized(a),b,T,_),x.delay=(+_parseFuncOrString(c,_assertThisInitialized(a),b,T,_)||0)-a._delay,!u&&S===1&&x.delay&&(a._delay=c=x.delay,a._start+=c,x.delay=0),y.to(T,x,E?E(b,T,_):0),y._ease=_easeMap.none;y.duration()?s=c=0:a.timeline=0}else if(f){_inheritDefaults(_setDefaults$1(y.vars.defaults,{ease:`none`})),y._ease=_parseEase(f.ease||n.ease||`none`);var k=0,A,j,M;if(_isArray(f))f.forEach(function(e){return y.to(_,e,`>`)}),y.duration();else{for(C in x={},f)C===`ease`||C===`easeEach`||_parseKeyframe(C,f[C],x,f.easeEach);for(C in x)for(A=x[C].sort(function(e,t){return e.t-t.t}),k=0,b=0;b<A.length;b++)j=A[b],M={ease:j.e,duration:(j.t-(b?A[b-1].t:0))/100*s},M[C]=j.v,y.to(_,M,k),k+=M.duration;y.duration()<s&&y.to({},{duration:s-y.duration()})}}s||a.duration(s=y.duration())}else a.timeline=0;return d===!0&&!_suppressOverwrites$1&&(_overwritingTween=_assertThisInitialized(a),_globalTimeline.killTweensOf(_),_overwritingTween=0),_addToTimeline(g,_assertThisInitialized(a),r),n.reversed&&a.reverse(),n.paused&&a.paused(!0),(l||!s&&!f&&a._start===_roundPrecise(g._time)&&_isNotFalse(l)&&_hasNoPausedAncestors(_assertThisInitialized(a))&&g.data!==`nested`)&&(a._tTime=-_tinyNum,a.render(Math.max(0,-c)||0)),m&&_scrollTrigger(_assertThisInitialized(a),m),a}var n=t.prototype;return n.render=function(e,t,n){var r=this._time,i=this._tDur,a=this._dur,o=e<0,s=e>i-_tinyNum&&!o?i:e<_tinyNum?0:e,c,l,u,d,f,p,m,g;if(!a)_renderZeroDurationTween(this,e,t,n);else if(s!==this._tTime||!e||n||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==o||this._lazy){if(c=s,g=this.timeline,this._repeat){if(d=a+this._rDelay,this._repeat<-1&&o)return this.totalTime(d*100+e,t,n);if(c=_roundPrecise(s%d),s===i?(u=this._repeat,c=a):(f=_roundPrecise(s/d),u=~~f,u&&u===f?(c=a,u--):c>a&&(c=a)),p=this._yoyo&&u&1,p&&(c=a-c),f=_animationCycle(this._tTime,d),c===r&&!n&&this._initted&&u===f)return this._tTime=s,this;u!==f&&this.vars.repeatRefresh&&!p&&!this._lock&&c!==d&&this._initted&&(this._lock=n=1,this.render(_roundPrecise(d*u),!0).invalidate()._lock=0)}if(!this._initted){if(_attemptInitTween(this,o?e:c,n,t,s))return this._tTime=0,this;if(r!==this._time&&!(n&&this.vars.repeatRefresh&&u!==f))return this;if(a!==this._dur)return this.render(e,t,n)}if(this._rEase){var _=c<r;if(_!==this._inv){var y=_?r:a-r;this._inv=_,this._from&&(this.ratio=1-this.ratio),this._invRatio=this.ratio,this._invTime=r,this._invRecip=y?(_?-1:1)/y:0,this._invScale=_?-this.ratio:1-this.ratio,this._invEase=_?this._rEase:this._ease}this.ratio=m=this._invRatio+this._invScale*this._invEase((c-this._invTime)*this._invRecip)}else this.ratio=m=this._ease(c/a);if(this._from&&(this.ratio=m=1-m),this._tTime=s,this._time=c,!this._act&&this._ts&&(this._act=1,this._lazy=0),!r&&s&&!t&&!f&&(_callback$1(this,`onStart`),this._tTime!==s))return this;for(l=this._pt;l;)l.r(m,l.d),l=l._next;g&&g.render(e<0?e:g._dur*g._ease(c/this._dur),t,n)||this._startAt&&(this._zTime=e),this._onUpdate&&!t&&(o&&_rewindStartAt(this,e,t,n),_callback$1(this,`onUpdate`)),this._repeat&&u!==f&&this.vars.onRepeat&&!t&&this.parent&&_callback$1(this,`onRepeat`),(s===this._tDur||!s)&&this._tTime===s&&(o&&!this._onUpdate&&_rewindStartAt(this,e,!0,!0),(e||!a)&&(s===this._tDur&&this._ts>0||!s&&this._ts<0)&&_removeFromParent(this,1),!t&&!(o&&!r)&&(s||r||p)&&(_callback$1(this,s===i?`onComplete`:`onReverseComplete`,!0),this._prom&&!(s<i&&this.timeScale()>0)&&this._prom()))}return this},n.targets=function(){return this._targets},n.invalidate=function(t){return(!t||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(t),e.prototype.invalidate.call(this,t)},n.resetTo=function(e,t,n,r,i){_tickerActive||_ticker.wake(),this._ts||this.play();
vendor: 4,636 bytes, line 9
9var a=Math.min(this._dur,(this._dp._time-this._start)*this._ts),o;return this._initted||_initTween(this,a),o=this._ease(a/this._dur),_updatePropTweens(this,e,t,n,r,o,a,i)?this.resetTo(e,t,n,r,1):(_alignPlayhead(this,0),this.parent||_addLinkedListItem(this._dp,this,`_first`,`_last`,this._dp._sort?`_start`:0),this.render(0))},n.kill=function(e,t){if(t===void 0&&(t=`all`),!e&&(!t||t===`all`))return this._lazy=this._pt=0,this.parent?_interrupt(this):this.scrollTrigger&&this.scrollTrigger.kill(!!_reverting$1),this;if(this.timeline){var n=this.timeline.totalDuration();return this.timeline.killTweensOf(e,t,_overwritingTween&&_overwritingTween.vars.overwrite!==!0)._first||_interrupt(this),this.parent&&n!==this.timeline.totalDuration()&&_setDuration(this,this._dur*this.timeline._tDur/n,0,1),this}var r=this._targets,i=e?toArray(e):r,a=this._ptLookup,o=this._pt,s,c,l,u,d,f,p;if((!t||t===`all`)&&_arraysMatch(r,i))return t===`all`&&(this._pt=0),_interrupt(this);for(s=this._op=this._op||[],t!==`all`&&(_isString$1(t)&&(d={},_forEachName(t,function(e){return d[e]=1}),t=d),t=_addAliasesToVars(r,t)),p=r.length;p--;)if(~i.indexOf(r[p]))for(d in c=a[p],t===`all`?(s[p]=t,u=c,l={}):(l=s[p]=s[p]||{},u=t),u)f=c&&c[d],f&&((!(`kill`in f.d)||f.d.kill(d)===!0)&&_removeLinkedListItem(this,f,`_pt`),delete c[d]),l!==`all`&&(l[d]=1);return this._initted&&!this._pt&&o&&_interrupt(this),this},t.to=function(e,n){return new t(e,n,arguments[2])},t.from=function(e,t){return _createTweenType(1,arguments)},t.delayedCall=function(e,n,r,i){return new t(n,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:e,onComplete:n,onReverseComplete:n,onCompleteParams:r,onReverseCompleteParams:r,callbackScope:i})},t.fromTo=function(e,t,n){return _createTweenType(2,arguments)},t.set=function(e,n){return n.duration=0,n.repeatDelay||(n.repeat=0),new t(e,n)},t.killTweensOf=function(e,t,n){return _globalTimeline.killTweensOf(e,t,n)},t}(Animation);_setDefaults$1(Tween.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),_forEachName(`staggerTo,staggerFrom,staggerFromTo`,function(e){Tween[e]=function(){var t=new Timeline,n=_slice.call(arguments,0);return n.splice(e===`staggerFromTo`?5:4,0,0),t[e].apply(t,n)}});var _setterPlain=function(e,t,n){return e[t]=n},_setterFunc=function(e,t,n){return e[t](n)},_setterFuncWithParam=function(e,t,n,r){return e[t](r.fp,n)},_setterAttribute=function(e,t,n){return e.setAttribute(t,n)},_getSetter=function(e,t){return _isFunction$1(e[t])?_setterFunc:_isUndefined(e[t])&&e.setAttribute?_setterAttribute:_setterPlain},_renderPlain=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},_renderBoolean=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},_renderComplexString=function(e,t){var n=t._pt,r=``;if(!e&&t.b)r=t.b;else if(e===1&&t.e)r=t.e;else{for(;n;)r=n.p+(n.m?n.m(n.s+n.c*e):Math.round((n.s+n.c*e)*1e4)/1e4)+r,n=n._next;r+=t.c}t.set(t.t,t.p,r,t)},_renderPropTweens=function(e,t){for(var n=t._pt;n;)n.r(e,n.d),n=n._next},_addPluginModifier=function(e,t,n,r){for(var i=this._pt,a;i;)a=i._next,i.p===r&&i.modifier(e,t,n),i=a},_killPropTweensOf=function(e){for(var t=this._pt,n,r;t;)r=t._next,t.p===e&&!t.op||t.op===e?_removeLinkedListItem(this,t,`_pt`):t.dep||(n=1),t=r;return!n},_setterWithModifier=function(e,t,n,r){r.mSet(e,t,r.m.call(r.tween,n,r.mt),r)},_sortPropTweensByPriority=function(e){for(var t=e._pt,n,r,i,a;t;){for(n=t._next,r=i;r&&r.pr>t.pr;)r=r._next;(t._prev=r?r._prev:a)?t._prev._next=t:i=t,(t._next=r)?r._prev=t:a=t,t=n}e._pt=i},PropTween=function(){function e(e,t,n,r,i,a,o,s,c){this.t=t,this.s=r,this.c=i,this.p=n,this.r=a||_renderPlain,this.d=o||this,this.set=s||_setterPlain,this.pr=c||0,this._next=e,e&&(e._prev=this)}var t=e.prototype;return t.modifier=function(e,t,n){this.mSet=this.mSet||this.set,this.set=_setterWithModifier,this.m=e,this.mt=n,this.tween=t},e}();_forEachName(_callbackNames+`parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger,easeReverse`,function(e){return _reservedProps[e]=1}),_globals.TweenMax=_globals.TweenLite=Tween,_globals.TimelineLite=_globals.TimelineMax=Timeline,_globalTimeline=new Timeline({sortChildren:!1,defaults:_defaults$1,autoRemoveChildren:!0,id:`root`,smoothChildTiming:!0}),_config.stringFilter=_colorStringFilter;var _media=[],_listeners$1={},_emptyArray$1=[],_lastMediaTime=0,_contextID=0,_dispatch$1=function(e){return(_listeners$1[e]||_emptyArray$1).map(function(e){return e()})},_onMediaChange=function(){var e=Date.now(),t=[];e-_lastMediaTime>
vendor: 2,728 bytes, line 9
92&&(_dispatch$1(`matchMediaInit`),_media.forEach(function(e){var n=e.queries,r=e.conditions,i,a,o,s;for(a in n)i=_win$3.matchMedia(n[a]).matches,i&&(o=1),i!==r[a]&&(r[a]=i,s=1);s&&(e.revert(),o&&t.push(e))}),_dispatch$1(`matchMediaRevert`),t.forEach(function(e){return e.onMatch(e,function(t){return e.add(null,t)})}),_lastMediaTime=e,_dispatch$1(`matchMedia`))},Context=function(){function e(e,t){this.selector=t&&selector(t),this.data=[],this._r=[],this.isReverted=!1,this.id=_contextID++,e&&this.add(e)}var t=e.prototype;return t.add=function(e,t,n){_isFunction$1(e)&&(n=t,t=e,e=_isFunction$1);var r=this,i=function(){var e=_context$2,i=r.selector,a;return e&&e!==r&&e.data.push(r),n&&(r.selector=selector(n)),_context$2=r,a=t.apply(r,arguments),_isFunction$1(a)&&r._r.push(a),_context$2=e,r.selector=i,r.isReverted=!1,a};return r.last=i,e===_isFunction$1?i(r,function(e){return r.add(null,e)}):e?r[e]=i:i},t.ignore=function(e){var t=_context$2;_context$2=null,e(this),_context$2=t},t.getTweens=function(){var t=[];return this.data.forEach(function(n){return n instanceof e?t.push.apply(t,n.getTweens()):n instanceof Tween&&!(n.parent&&n.parent.data===`nested`)&&t.push(n)}),t},t.clear=function(){this._r.length=this.data.length=0},t.kill=function(e,t){var n=this;if(e?(function(){for(var t=n.getTweens(),r=n.data.length,i;r--;)i=n.data[r],i.data===`isFlip`&&(i.revert(),i.getChildren(!0,!0,!1).forEach(function(e){return t.splice(t.indexOf(e),1)}));for(t.map(function(e){return{g:e._dur||e._delay||e._sat&&!e._sat.vars.immediateRender?e.globalTime(0):-1/0,t:e}}).sort(function(e,t){return t.g-e.g||-1/0}).forEach(function(t){return t.t.revert(e)}),r=n.data.length;r--;)i=n.data[r],i instanceof Timeline?i.data!==`nested`&&(i.scrollTrigger&&i.scrollTrigger.revert(),i.kill()):!(i instanceof Tween)&&i.revert&&i.revert(e);n._r.forEach(function(t){return t(e,n)}),n.isReverted=!0})():this.data.forEach(function(e){return e.kill&&e.kill()}),this.clear(),t)for(var r=_media.length;r--;)_media[r].id===this.id&&_media.splice(r,1)},t.revert=function(e){this.kill(e||{})},e}(),MatchMedia=function(){function e(e){this.contexts=[],this.scope=e,_context$2&&_context$2.data.push(this)}var t=e.prototype;return t.add=function(e,t,n){_isObject$1(e)||(e={matches:e});var r=new Context(0,n||this.scope),i=r.conditions={},a,o,s;for(o in _context$2&&!r.selector&&(r.selector=_context$2.selector),this.contexts.push(r),t=r.add(`onMatch`,t),r.queries=e,e)o===`all`?s=1:(a=_win$3.matchMedia(e[o]),a&&(_media.indexOf(r)<0&&_media.push(r),(i[o]=a.matches)&&(s=1),a.addListener?a.addListener(_onMediaChange):a.addEventListener(`change`,_onMediaChange)));return s&&t(r,function(e){return r.add(null,e)}),this},t.revert=function(e){this.kill(e||{})}
vendor: 10,558 bytes, line 9
9,t.kill=function(e){this.contexts.forEach(function(t){return t.kill(e,!0)})},e}(),_gsap={registerPlugin:function(){[...arguments].forEach(function(e){return _createPlugin(e)})},timeline:function(e){return new Timeline(e)},getTweensOf:function(e,t){return _globalTimeline.getTweensOf(e,t)},getProperty:function(e,t,n,r){_isString$1(e)&&(e=toArray(e)[0]);var i=_getCache(e||{}).get,a=n?_passThrough$1:_numericIfPossible;return n===`native`&&(n=``),e&&(t?a((_plugins[t]&&_plugins[t].get||i)(e,t,n,r)):function(t,n,r){return a((_plugins[t]&&_plugins[t].get||i)(e,t,n,r))})},quickSetter:function(e,t,n){if(e=toArray(e),e.length>1){var r=e.map(function(e){return gsap$2.quickSetter(e,t,n)}),i=r.length;return function(e){for(var t=i;t--;)r[t](e)}}e=e[0]||{};var a=_plugins[t],o=_getCache(e),s=o.harness&&(o.harness.aliases||{})[t]||t,c=a?function(t){var r=new a;_quickTween._pt=0,r.init(e,n?t+n:t,_quickTween,0,[e]),r.render(1,r),_quickTween._pt&&_renderPropTweens(1,_quickTween)}:o.set(e,s);return a?c:function(t){return c(e,s,n?t+n:t,o,1)}},quickTo:function(e,t,n){var r,i=gsap$2.to(e,_setDefaults$1((r={},r[t]=`+=0.1`,r.paused=!0,r.stagger=0,r),n||{})),a=function(e,n,r){return i.resetTo(t,e,n,r)};return a.tween=i,a},isTweening:function(e){return _globalTimeline.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=_parseEase(e.ease,_defaults$1.ease)),_mergeDeep(_defaults$1,e||{})},config:function(e){return _mergeDeep(_config,e||{})},registerEffect:function(e){var t=e.name,n=e.effect,r=e.plugins,i=e.defaults,a=e.extendTimeline;(r||``).split(`,`).forEach(function(e){return e&&!_plugins[e]&&!_globals[e]&&_warn(t+` effect requires `+e+` plugin.`)}),_effects[t]=function(e,t,r){return n(toArray(e),_setDefaults$1(t||{},i),r)},a&&(Timeline.prototype[t]=function(e,n,r){return this.add(_effects[t](e,_isObject$1(n)?n:(r=n)&&{},this),r)})},registerEase:function(e,t){_easeMap[e]=_parseEase(t)},parseEase:function(e,t){return arguments.length?_parseEase(e,t):_easeMap},getById:function(e){return _globalTimeline.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var n=new Timeline(e),r,i;for(n.smoothChildTiming=_isNotFalse(e.smoothChildTiming),_globalTimeline.remove(n),n._dp=0,n._time=n._tTime=_globalTimeline._time,r=_globalTimeline._first;r;)i=r._next,(t||!(!r._dur&&r instanceof Tween&&r.vars.onComplete===r._targets[0]))&&_addToTimeline(n,r,r._start-r._delay),r=i;return _addToTimeline(_globalTimeline,n,0),n},context:function(e,t){return e?new Context(e,t):_context$2},matchMedia:function(e){return new MatchMedia(e)},matchMediaRefresh:function(){return _media.forEach(function(e){var t=e.conditions,n,r;for(r in t)t[r]&&(t[r]=!1,n=1);n&&e.revert()})||_onMediaChange()},addEventListener:function(e,t){var n=_listeners$1[e]||(_listeners$1[e]=[]);~n.indexOf(t)||n.push(t)},removeEventListener:function(e,t){var n=_listeners$1[e],r=n&&n.indexOf(t);r>=0&&n.splice(r,1)},utils:{wrap,wrapYoyo,distribute,random,snap,normalize:normalize$1,getUnit,clamp:clamp$2,splitColor,toArray,selector,mapRange,pipe,unitize,interpolate,shuffle},install:_install,effects:_effects,ticker:_ticker,updateRoot:Timeline.updateRoot,plugins:_plugins,globalTimeline:_globalTimeline,core:{PropTween,globals:_addGlobal,Tween,Timeline,Animation,getCache:_getCache,_removeLinkedListItem,reverting:function(){return _reverting$1},context:function(e){return e&&_context$2&&(_context$2.data.push(e),e._ctx=_context$2),_context$2},suppressOverwrites:function(e){return _suppressOverwrites$1=e}}};_forEachName(`to,from,fromTo,delayedCall,set,killTweensOf`,function(e){return _gsap[e]=Tween[e]}),_ticker.add(Timeline.updateRoot),_quickTween=_gsap.to({},{duration:0});var _getPluginPropTween=function(e,t){for(var n=e._pt;n&&n.p!==t&&n.op!==t&&n.fp!==t;)n=n._next;return n},_addModifiers=function(e,t){var n=e._targets,r,i,a;for(r in t)for(i=n.length;i--;)a=e._ptLookup[i][r],(a&&=a.d)&&(a._pt&&(a=_getPluginPropTween(a,r)),a&&a.modifier&&a.modifier(t[r],e,n[i],r))},_buildModifierPlugin=function(e,t){return{name:e,headless:1,rawVars:1,init:function(e,n,r){r._onInit=function(e){var r,i;if(_isString$1(n)&&(r={},_forEachName(n,function(e){return r[e]=1}),n=r),t){for(i in r={},n)r[i]=t(n[i]);n=r}_addModifiers(e,n)}}}},gsap$2=_gsap.registerPlugin({name:`attr`,init:function(e,t,n,r,i){var a,o,s;for(a in this.tween=n,t)s=e.getAttribute(a)||``,o=this.add(e,`setAttribute`,(s||0)+``,t[a],r,i,0,0,a),o.op=a,o.b=s,this._props.push(a)},render:function(e,t){for(var n=t._pt;n;)_reverting$1?n.set(n.t,n.p,n.b,n):n.r(e,n.d),n=n._next}},{name:`endArray`,headless:1,init:function(e,t){for(var n=t.length;n--;)this.add(e,n,e[n]||0,t[n],0,0,0,0,0,1)}},_buildModifierPlugin(`roundProps`,_roundModifier),_buildModifierPlugin(`modifiers`),_buildModifierPlugin(`snap`,snap))||_gsap;Tween.version=Timeline.version=gsap$2.version=`3.15.0`,_coreReady=1,_windowExists$2()&&_wake();var Power0=_easeMap.Power0,Power1=_easeMap.Power1,Power2=_easeMap.Power2,Power3=_easeMap.Power3,Power4=_easeMap.Power4,Linear=_easeMap.Linear,Quad=_easeMap.Quad,Cubic=_easeMap.Cubic,Quart=_easeMap.Quart,Quint=_easeMap.Quint,Strong=_easeMap.Strong,Elastic=_easeMap.Elastic,Back=_easeMap.Back,SteppedEase=_easeMap.SteppedEase,Bounce=_easeMap.Bounce,Sine=_easeMap.Sine,Expo=_easeMap.Expo,Circ=_easeMap.Circ,_win$2,_doc$2,_docElement,_pluginInitted,_tempDiv,_recentSetterPlugin,_reverting,_windowExists$1=function(){return typeof window<`u`},_transformProps={},_RAD2DEG=180/Math.PI,_DEG2RAD=Math.PI/180,_atan2=Math.atan2,_bigNum=1e8,_capsExp$1=/([A-Z])/g,_horizontalExp=/(left|right|width|margin|padding|x)/i,_complexExp=/[\s,\(]\S/,_propertyAliases={autoAlpha:`opacity,visibility`,scale:`scaleX,scaleY`,alpha:`opacity`},_renderCSSProp=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},_renderPropWithEnd=function(e,t){return t.set(t.t,t.p,e===1?t.e:Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},_renderCSSPropWithBeginning=function(e,t){return t.set(t.t,t.p,e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},_renderCSSPropWithBeginningAndEnd=function(e,t){return t.set(t.t,t.p,e===1?t.e:e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},_renderRoundedCSSProp=function(e,t){var n=t.s+t.c*e;t.set(t.t,t.p,~~(n+(n<0?-.5:.5))+t.u,t)},_renderNonTweeningValue=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},_renderNonTweeningValueOnlyAtEnd=function(e,t){return t.set(t.t,t.p,e===1?t.e:t.b,t)},_setterCSSStyle=function(e,t,n){return e.style[t]=n},_setterCSSProp=function(e,t,n){return e.style.setProperty(t,n)},_setterTransform=function(e,t,n){return e._gsap[t]=n},_setterScale=function(e,t,n){return e._gsap.scaleX=e._gsap.scaleY=n},_setterScaleWithRender=function(e,t,n,r,i){var a=e._gsap;a.scaleX=a.scaleY=n,a.renderTransform(i,a)},_setterTransformWithRender=function(e,t,n,r,i){var a=e._gsap;a[t]=n,a.renderTransform(i,a)},_transformProp$1=`transform`,_transformOriginProp=_transformProp$1+`Origin`,_saveStyle=function e(t,n){var r=this,i=this.target,a=i.style,o=i._gsap;if(t in _transformProps&&a){if(this.tfm=this.tfm||{},t!==`transform`)t=_propertyAliases[t]||t,~t.indexOf(`,`)?t.split(`,`).forEach(function(e){return r.tfm[e]=_get(i,e)}):this.tfm[t]=o.x?o[t]:_get(i,t),t===_transformOriginProp&&(this.tfm.zOrigin=o.zOrigin);else return _propertyAliases.transform.split(`,`).forEach(function(t){return e.call(r,t,n)});if(this.props.indexOf(_transformProp$1)>=0)return;o.svg&&(this.svgo=i.getAttribute(`data-svg-origin`),this.props.push(_transformOriginProp,n,``)),t=_transformProp$1}(a||n)&&this.props.push(t,n,a[t])},_removeIndependentTransforms=function(e){e.translate&&(e.removeProperty(`translate`),e.removeProperty(`scale`),e.removeProperty(`rotate`))},_revertStyle=function(){var e=this.props,t=this.target,n=t.style,r=t._gsap,i,a;for(i=0;i<e.length;i+=3)e[i+1]?e[i+1]===2?t[e[i]](e[i+2]):t[e[i]]=e[i+2]:e[i+2]?n[e[i]]=e[i+2]:n.removeProperty(e[i].substr(0,2)===`--`?e[i]:e[i].replace(_capsExp$1,`-$1`).toLowerCase());if(this.tfm){for(a in this.tfm)r[a]=this.tfm[a];r.svg&&(r.renderTransform(),t.setAttribute(`data-svg-origin`,this.svgo||``)),i=_reverting(),(!i||!i.isStart)&&!n[_transformProp$1]&&(_removeIndependentTransforms(n),r.zOrigin&&n[_transformOriginProp]&&(n[_transformOriginProp]+=` `+r.zOrigin+`px`,r.zOrigin=0,r.renderTransform()),r.uncache=1)}},_getStyleSaver=function(e,t){var n={target:e,props:[],revert:_revertStyle,save:_saveStyle};return e._gsap||gsap$2.core.getCache(e),t&&e.style&&e.nodeType&&t.split(`,`).forEach(function(e){return n.save(e)}),n},_supports3D,_createElement=function(e,t){var n=_doc$2.createElementNS?_doc$2.createElementNS((t||`http://www.w3.org/1999/xhtml`).replace(/^https/,`http`),e):_doc$2.createElement(e);return n&&n.style?n:_doc$2.createElement(e)},_getComputedProperty=function e(t,n,r){var i=getComputedStyle(t);return i[n]||i.getPropertyValue(n.replace(_capsExp$1,`-$1`).toLowerCase())||i.getPropertyValue(n)||!r&&e(t,_checkPropPrefix(n)||n,1)||``},_prefixes=`O,Moz,ms,Ms,Webkit`.split(`,`),_checkPropPrefix=function(e,t,n){var r=(t||_tempDiv).style,i=5;if(e in r&&!n)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);i--&&!(_prefixes[i]+e in r););return i<0?null:(i===3?`ms`:i>=0?_prefixes[i]:``)+e},_initCore$1=function(){_windowExists$1()&&window.document&&(_win$2=window,_doc$2=_win$2.document,_docElement=_doc$2.documentElement,_tempDiv=_createElement(`div`)||{style:{}},_createElement(`div`),_transformProp$1=_checkPropPrefix(_transformProp$1),_transformOriginProp=_transformProp$1+`Origin`,_tempDiv.style.cssText=`border-width:0;line-height:0;position:absolute;padding:0`,_supports3D=!!_checkPropPrefix(`perspective`),_reverting=gsap$2.core.reverting,_pluginInitted=1)},_getReparentedCloneBBox=function(e){var t=e.ownerSVGElement,n=_createElement(`svg`,t&&t.getAttribute(`xmlns`)||`http://www.w3.org/2000/svg`),r=e.cloneNode(!0),i;r.style.display=`block`,n.appendChild(r),_docElement.appendChild(n);try{i=r.getBBox()}catch{}return n.removeChild(r),_docElement.removeChild(n),i},_getAttributeFallbacks=function(e,t){for(var n=t.length;n--;)if(e.hasAttribute(t[n]))return e.getAttribute(t[n])},_getBBox=function(e){var t,n;try{t=e.getBBox()}catch{t=_getReparentedCloneBBox(e),n=1}return t&&(t.width||t.height)||n||(t=_getReparentedCloneBBox(e)),t&&!t.width&&!t.x&&!t.y?{x:+_getAttributeFallbacks(e,[`x`,`cx`,`x1`])||0,y:+_getAttributeFallbacks(e,[`y`,`cy`,`y1`])||0,width:0,height:0}:t},_isSVG=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&_getBBox(e))},_removeProperty=function(e,t){if(t){var n=e.style,r;t in _transformProps&&t!==_transformOriginProp&&(t=_transformProp$1),n.removeProperty?(r=t.substr(0,2),
vendor: 4,682 bytes, line 9
9(r===`ms`||t.substr(0,6)===`webkit`)&&(t=`-`+t),n.removeProperty(r===`--`?t:t.replace(_capsExp$1,`-$1`).toLowerCase())):n.removeAttribute(t)}},_addNonTweeningPT=function(e,t,n,r,i,a){var o=new PropTween(e._pt,t,n,0,1,a?_renderNonTweeningValueOnlyAtEnd:_renderNonTweeningValue);return e._pt=o,o.b=r,o.e=i,e._props.push(n),o},_nonConvertibleUnits={deg:1,rad:1,turn:1},_nonStandardLayouts={grid:1,flex:1},_convertToUnit=function e(t,n,r,i){var a=parseFloat(r)||0,o=(r+``).trim().substr((a+``).length)||`px`,s=_tempDiv.style,c=_horizontalExp.test(n),l=t.tagName.toLowerCase()===`svg`,u=(l?`client`:`offset`)+(c?`Width`:`Height`),d=100,f=i===`px`,p=i===`%`,m,g,_,y;if(i===o||!a||_nonConvertibleUnits[i]||_nonConvertibleUnits[o])return a;if(o!==`px`&&!f&&(a=e(t,n,r,`px`)),y=t.getCTM&&_isSVG(t),(p||o===`%`)&&(_transformProps[n]||~n.indexOf(`adius`)))return m=y?t.getBBox()[c?`width`:`height`]:t[u],_round$1(p?a/m*d:a/100*m);if(s[c?`width`:`height`]=d+(f?o:i),g=i!==`rem`&&~n.indexOf(`adius`)||i===`em`&&t.appendChild&&!l?t:t.parentNode,y&&(g=(t.ownerSVGElement||{}).parentNode),(!g||g===_doc$2||!g.appendChild)&&(g=_doc$2.body),_=g._gsap,_&&p&&_.width&&c&&_.time===_ticker.time&&!_.uncache)return _round$1(a/_.width*d);if(p&&(n===`height`||n===`width`)){var b=t.style[n];t.style[n]=d+i,m=t[u],b?t.style[n]=b:_removeProperty(t,n)}else (p||o===`%`)&&!_nonStandardLayouts[_getComputedProperty(g,`display`)]&&(s.position=_getComputedProperty(t,`position`)),g===t&&(s.position=`static`),g.appendChild(_tempDiv),m=_tempDiv[u],g.removeChild(_tempDiv),s.position=`absolute`;return c&&p&&(_=_getCache(g),_.time=_ticker.time,_.width=g[u]),_round$1(f?m*a/d:m&&a?d/m*a:0)},_get=function(e,t,n,r){var i;return _pluginInitted||_initCore$1(),t in _propertyAliases&&t!==`transform`&&(t=_propertyAliases[t],~t.indexOf(`,`)&&(t=t.split(`,`)[0])),_transformProps[t]&&t!==`transform`?(i=_parseTransform(e,r),i=t===`transformOrigin`?i.svg?i.origin:_firstTwoOnly(_getComputedProperty(e,_transformOriginProp))+` `+i.zOrigin+`px`:i[t]):(i=e.style[t],(!i||i===`auto`||r||~(i+``).indexOf(`calc(`))&&(i=_specialProps[t]&&_specialProps[t](e,t,n)||_getComputedProperty(e,t)||_getProperty(e,t)||+(t===`opacity`))),n&&!~(i+``).trim().indexOf(` `)?_convertToUnit(e,t,i,n)+n:i},_tweenComplexCSSString=function(e,t,n,r){if(!n||n===`none`){var i=_checkPropPrefix(t,e,1),a=i&&_getComputedProperty(e,i,1);a&&a!==n?(t=i,n=a):t===`borderColor`&&(n=_getComputedProperty(e,`borderTopColor`))}var o=new PropTween(this._pt,e.style,t,0,1,_renderComplexString),s=0,c=0,l,u,d,f,p,m,g,_,y,b,x,S;if(o.b=n,o.e=r,n+=``,r+=``,r.substring(0,6)===`var(--`&&(r=_getComputedProperty(e,r.substring(4,r.indexOf(`)`)))),r===`auto`&&(m=e.style[t],e.style[t]=r,r=_getComputedProperty(e,t)||r,m?e.style[t]=m:_removeProperty(e,t)),l=[n,r],_colorStringFilter(l),n=l[0],r=l[1],d=n.match(_numWithUnitExp)||[],S=r.match(_numWithUnitExp)||[],S.length){for(;u=_numWithUnitExp.exec(r);)g=u[0],y=r.substring(s,u.index),p?p=(p+1)%5:(y.substr(-5)===`rgba(`||y.substr(-5)===`hsla(`)&&(p=1),g!==(m=d[c++]||``)&&(f=parseFloat(m)||0,x=m.substr((f+``).length),g.charAt(1)===`=`&&(g=_parseRelative(f,g)+x),_=parseFloat(g),b=g.substr((_+``).length),s=_numWithUnitExp.lastIndex-b.length,b||(b=b||_config.units[t]||x,s===r.length&&(r+=b,o.e+=b)),x!==b&&(f=_convertToUnit(e,t,m,b)||0),o._pt={_next:o._pt,p:y||c===1?y:`,`,s:f,c:_-f,m:p&&p<4||t===`zIndex`?Math.round:0});o.c=s<r.length?r.substring(s,r.length):``}else o.r=t===`display`&&r===`none`?_renderNonTweeningValueOnlyAtEnd:_renderNonTweeningValue;return _relExp.test(r)&&(o.e=0),this._pt=o,o},_keywordToPercent={top:`0%`,bottom:`100%`,left:`0%`,right:`100%`,center:`50%`},_convertKeywordsToPercentages=function(e){var t=e.split(` `),n=t[0],r=t[1]||`50%`;return(n===`top`||n===`bottom`||r===`left`||r===`right`)&&(e=n,n=r,r=e),t[0]=_keywordToPercent[n]||n,t[1]=_keywordToPercent[r]||r,t.join(` `)},_renderClearProps=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var n=t.t,r=n.style,i=t.u,a=n._gsap,o,s,c;if(i===`all`||i===!0)r.cssText=``,s=1;else for(i=i.split(`,`),c=i.length;--c>-1;)o=i[c],_transformProps[o]&&(s=1,o=o===`transformOrigin`?_transformOriginProp:_transformProp$1),_removeProperty(n,o);s&&(_removeProperty(n,_transformProp$1),a&&(a.svg&&n.removeAttribute(`transform`),r.scale=r.rotate=r.translate=`none`,_parseTransform(n,1),a.uncache=1,_removeIndependentTransforms(r)))}},_specialProps={clearProps:function(e,t,n,r,i){if(i.data!==`isFromStart`){var a=e._pt=new PropTween(e._pt,t,n,0,0,_renderClearProps);return a.u=r,a.pr=-10,a.tween=i,e._props.push(n),1}}},_identity2DMatrix=[1,0,0,1,0,0],_rotationalProperties={},_isNullTransform=function(e){return e===`matrix(1, 0, 0, 1, 0, 0)`||e===`
9none`||!e},_getComputedTransformMatrixAsArray=function(e){var t=_getComputedProperty(e,_transformProp$1);return _isNullTransform(t)?_identity2DMatrix:t.substr(7).match(_numExp).map(_round$1)},_getMatrix=function(e,t){var n=e._gsap||_getCache(e),r=e.style,i=_getComputedTransformMatrixAsArray(e),a,o,s,c;return n.svg&&e.getAttribute(`transform`)?(s=e.transform.baseVal.consolidate().matrix,i=[s.a,s.b,s.c,s.d,s.e,s.f],i.join(`,`)===`1,0,0,1,0,0`?_identity2DMatrix:i):(i===_identity2DMatrix&&!e.offsetParent&&e!==_docElement&&!n.svg&&(s=r.display,r.display=`block`,a=e.parentNode,(!a||!e.offsetParent&&!e.getBoundingClientRect().width)&&(c=1,o=e.nextElementSibling,_docElement.appendChild(e)),i=_getComputedTransformMatrixAsArray(e),s?r.display=s:_removeProperty(e,`display`),c&&(o?a.insertBefore(e,o):a?a.appendChild(e):_docElement.removeChild(e))),t&&i.length>6?[i[0],i[1],i[4],i[5],i[12],i[13]]:i)},_applySVGOrigin=function(e,t,n,r,i,a){var o=e._gsap,s=i||_getMatrix(e,!0),c=o.xOrigin||0,l=o.yOrigin||0,u=o.xOffset||0,d=o.yOffset||0,f=s[0],p=s[1],m=s[2],g=s[3],_=s[4],y=s[5],b=t.split(` `),x=parseFloat(b[0])||0,S=parseFloat(b[1])||0,C,T,E,D;n?s!==_identity2DMatrix&&(T=f*g-p*m)&&(E=g/T*x+S*(-m/T)+(m*y-g*_)/T,D=x*(-p/T)+f/T*S-(f*y-p*_)/T,x=E,S=D):(C=_getBBox(e),x=C.x+(~b[0].indexOf(`%`)?x/100*C.width:x),S=C.y+(~(b[1]||b[0]).indexOf(`%`)?S/100*C.height:S)),r||r!==!1&&o.smooth?(_=x-c,y=S-l,o.xOffset=u+(_*f+y*m)-_,o.yOffset=d+(_*p+y*g)-y):o.xOffset=o.yOffset=0,o.xOrigin=x,o.yOrigin=S,o.smooth=!!r,o.origin=t,o.originIsAbsolute=!!n,e.style[_transformOriginProp]=`0px 0px`,a&&(_addNonTweeningPT(a,o,`xOrigin`,c,x),_addNonTweeningPT(a,o,`yOrigin`,l,S),_addNonTweeningPT(a,o,`xOffset`,u,o.xOffset),_addNonTweeningPT(a,o,`yOffset`,d,o.yOffset)),e.setAttribute(`data-svg-origin`,x+` `+S)},_parseTransform=function(e,t){var n=e._gsap||new GSCache(e);if(`x`in n&&!t&&!n.uncache)return n;var r=e.style,i=n.scaleX<0,a=`px`,o=`deg`,s=getComputedStyle(e),c=_getComputedProperty(e,_transformOriginProp)||`0`,l=u=d=m=g=_=y=b=x=0,u,d,f=p=1,p,m,g,_,y,b,x,S,C,T,E,D,O,k,A,j,M,N,P,F,I,L,R,z,B,V,ee,H;return n.svg=!!(e.getCTM&&_isSVG(e)),s.translate&&((s.translate!==`none`||s.scale!==`none`||s.rotate!==`none`)&&(r[_transformProp$1]=(s.translate===`none`?``:`translate3d(`+(s.translate+` 0 0`).split(` `).slice(0,3).join(`, `)+`) `)+(s.rotate===`none`?``:`rotate(`+s.rotate+`) `)+(s.scale===`none`?``:`scale(`+s.scale.split(` `).join(`,`)+`) `)+(s[_transformProp$1]===`none`?``:s[_transformProp$1])),r.scale=r.rotate=r.translate=`none`),T=_getMatrix(e,n.svg),n.svg&&(n.uncache?(I=e.getBBox(),c=n.xOrigin-I.x+`px `+(n.yOrigin-I.y)+`px`,F=``):F=!t&&e.getAttribute(`data-svg-origin`),_applySVGOrigin(e,F||c,!!F||n.originIsAbsolute,n.smooth!==!1,T)),S=n.xOrigin||0,C=n.yOrigin||0,T!==_identity2DMatrix&&(k=T[0],A=T[1],j=T[2],M=T[3],l=N=T[4],u=P=T[5],T.length===6?(f=Math.sqrt(k*k+A*A),p=Math.sqrt(M*M+j*j),m=k||A?_atan2(A,k)*_RAD2DEG:0,y=j||M?_atan2(j,M)*_RAD2DEG+m:0,y&&(p*=Math.abs(Math.cos(y*_DEG2RAD))),n.svg&&(l-=S-(S*k+C*j),u-=C-(S*A+C*M))):(H=T[6],V=T[7],R=T[8],z=T[9],B=T[10],ee=T[11],l=T[12],u=T[13],d=T[14],E=_atan2(H,B),g=E*_RAD2DEG,E&&(D=Math.cos(-E),O=Math.sin(-E),F=N*D+R*O,I=P*D+z*O,L=H*D+B*O,R=N*-O+R*D,z=P*-O+z*D,B=H*-O+B*D,ee=V*-O+ee*D,N=F,P=I,H=L),E=_atan2(-j,B),_=E*_RAD2DEG,E&&(D=Math.cos(-E),O=Math.sin(-E),F=k*D-R*O,I=A*D-z*O,L=j*D-B*O,ee=M*O+ee*D,k=F,A=I,j=L),E=_atan2(A,k),m=E*_RAD2DEG,E&&(D=Math.cos(E),O=Math.sin(E),F=k*D+A*O,I=N*D+P*O,A=A*D-k*O,P=P*D-N*O,k=F,N=I),g&&Math.abs(g)+Math.abs(m)>359.9&&(g=m=0,_=180-_),f=_round$1(Math.sqrt(k*k+A*A+j*j)),p=_round$1(Math.sqrt(P*P+H*H)),E=_atan2(N,P),y=Math.abs(E)>2e-4?E*_RAD2DEG:0,x=ee?1/(ee<0?-ee:ee):0),n.svg&&(F=e.getAttribute(`transform`),n.forceCSS=e.setAttribute(`transform`,``)||!_isNullTransform(_getComputedProperty(e,_transformProp$1)),F&&e.setAttribute(`transform`,F))),Math.abs(y)>90&&Math.abs(y)<270&&(i?(f*=-1,y+=m<=0?180:-180,m+=m<=0?180:-180):(p*=-1,y+=y<=0?180:-180)),t||=n.uncache,n.x=l-((n.xPercent=l&&(!t&&n.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-l)?-50:0)))?e.offsetWidth*n.xPercent/100:0)+a,n.y=u-((n.yPercent=u&&(!t&&n.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-u)?-50:0)))?e.offsetHeight*n.yPercent/100:0)+a,n.z=d+a,n.scaleX=_round$1(f),n.scaleY=_round$1(p),n.rotation=_round$1(m)+o,n.rotationX=_round$1(g)+o,n.rotationY=_round$1(_)+o,n.skewX=y+o,n.skewY=b+o,n.transformPerspective=x+a,(n.zOrigin=parseFloat(c.split(` `)[2])||!t&&n.zOrigin||0)&&(r[_transformOriginProp]=_firstTwoOnly(c)),n.xOffset=n.yOffset=0,n.force3D=_config.force3D,n.renderTransform=n.svg?_renderSVGTransforms:_supports3D?_renderCSSTransforms:_renderNon3DTransforms,n.uncache=0,n},_firstTwoOnly=function(e){return(e=e.split(` `))[0]+` `+e[1]},_addPxTranslate=function(e,t,n){var r=getUnit(t);
vendor: 1,553 bytes, line 9
9return _round$1(parseFloat(t)+parseFloat(_convertToUnit(e,`x`,n+`px`,r)))+r},_renderNon3DTransforms=function(e,t){t.z=`0px`,t.rotationY=t.rotationX=`0deg`,t.force3D=0,_renderCSSTransforms(e,t)},_zeroDeg=`0deg`,_zeroPx=`0px`,_endParenthesis=`) `,_renderCSSTransforms=function(e,t){var n=t||this,r=n.xPercent,i=n.yPercent,a=n.x,o=n.y,s=n.z,c=n.rotation,l=n.rotationY,u=n.rotationX,d=n.skewX,f=n.skewY,p=n.scaleX,m=n.scaleY,g=n.transformPerspective,_=n.force3D,y=n.target,b=n.zOrigin,x=``,S=_===`auto`&&e&&e!==1||_===!0;if(b&&(u!==_zeroDeg||l!==_zeroDeg)){var C=parseFloat(l)*_DEG2RAD,T=Math.sin(C),E=Math.cos(C),D;C=parseFloat(u)*_DEG2RAD,D=Math.cos(C),a=_addPxTranslate(y,a,T*D*-b),o=_addPxTranslate(y,o,-Math.sin(C)*-b),s=_addPxTranslate(y,s,E*D*-b+b)}g!==_zeroPx&&(x+=`perspective(`+g+_endParenthesis),(r||i)&&(x+=`translate(`+r+`%, `+i+`%) `),(S||a!==_zeroPx||o!==_zeroPx||s!==_zeroPx)&&(x+=s!==_zeroPx||S?`translate3d(`+a+`, `+o+`, `+s+`) `:`translate(`+a+`, `+o+_endParenthesis),c!==_zeroDeg&&(x+=`rotate(`+c+_endParenthesis),l!==_zeroDeg&&(x+=`rotateY(`+l+_endParenthesis),u!==_zeroDeg&&(x+=`rotateX(`+u+_endParenthesis),(d!==_zeroDeg||f!==_zeroDeg)&&(x+=`skew(`+d+`, `+f+_endParenthesis),(p!==1||m!==1)&&(x+=`scale(`+p+`, `+m+_endParenthesis),y.style[_transformProp$1]=x||`translate(0, 0)`},_renderSVGTransforms=function(e,t){var n=t||this,r=n.xPercent,i=n.yPercent,a=n.x,o=n.y,s=n.rotation,c=n.skewX,l=n.skewY,u=n.scaleX,d=n.scaleY,f=n.target,p=n.xOrigin,m=n.yOrigin,g=n.xOffset,_=n.yOffset,y=n.forceCSS,b=parseFloat(a),x=parseFloat(o),S,C,T,E,D;
vendor: 4,186 bytes, line 9
9s=parseFloat(s),c=parseFloat(c),l=parseFloat(l),l&&(l=parseFloat(l),c+=l,s+=l),s||c?(s*=_DEG2RAD,c*=_DEG2RAD,S=Math.cos(s)*u,C=Math.sin(s)*u,T=Math.sin(s-c)*-d,E=Math.cos(s-c)*d,c&&(l*=_DEG2RAD,D=Math.tan(c-l),D=Math.sqrt(1+D*D),T*=D,E*=D,l&&(D=Math.tan(l),D=Math.sqrt(1+D*D),S*=D,C*=D)),S=_round$1(S),C=_round$1(C),T=_round$1(T),E=_round$1(E)):(S=u,E=d,C=T=0),(b&&!~(a+``).indexOf(`px`)||x&&!~(o+``).indexOf(`px`))&&(b=_convertToUnit(f,`x`,a,`px`),x=_convertToUnit(f,`y`,o,`px`)),(p||m||g||_)&&(b=_round$1(b+p-(p*S+m*T)+g),x=_round$1(x+m-(p*C+m*E)+_)),(r||i)&&(D=f.getBBox(),b=_round$1(b+r/100*D.width),x=_round$1(x+i/100*D.height)),D=`matrix(`+S+`,`+C+`,`+T+`,`+E+`,`+b+`,`+x+`)`,f.setAttribute(`transform`,D),y&&(f.style[_transformProp$1]=D)},_addRotationalPropTween=function(e,t,n,r,i){var a=360,o=_isString$1(i),s=parseFloat(i)*(o&&~i.indexOf(`rad`)?_RAD2DEG:1)-r,c=r+s+`deg`,l,u;return o&&(l=i.split(`_`)[1],l===`short`&&(s%=a,s!==s%(a/2)&&(s+=s<0?a:-a)),l===`cw`&&s<0?s=(s+a*_bigNum)%a-~~(s/a)*a:l===`ccw`&&s>0&&(s=(s-a*_bigNum)%a-~~(s/a)*a)),e._pt=u=new PropTween(e._pt,t,n,r,s,_renderPropWithEnd),u.e=c,u.u=`deg`,e._props.push(n),u},_assign=function(e,t){for(var n in t)e[n]=t[n];return e},_addRawTransformPTs=function(e,t,n){var r=_assign({},n._gsap),i=`perspective,force3D,transformOrigin,svgOrigin`,a=n.style,o,s,c,l,u,d,f,p;for(s in r.svg?(c=n.getAttribute(`transform`),n.setAttribute(`transform`,``),a[_transformProp$1]=t,o=_parseTransform(n,1),_removeProperty(n,_transformProp$1),n.setAttribute(`transform`,c)):(c=getComputedStyle(n)[_transformProp$1],a[_transformProp$1]=t,o=_parseTransform(n,1),a[_transformProp$1]=c),_transformProps)c=r[s],l=o[s],c!==l&&i.indexOf(s)<0&&(f=getUnit(c),p=getUnit(l),u=f===p?parseFloat(c):_convertToUnit(n,s,c,p),d=parseFloat(l),e._pt=new PropTween(e._pt,o,s,u,d-u,_renderCSSProp),e._pt.u=p||0,e._props.push(s));_assign(o,r)};_forEachName(`padding,margin,Width,Radius`,function(e,t){var n=`Top`,r=`Right`,i=`Bottom`,a=`Left`,o=(t<3?[n,r,i,a]:[n+a,n+r,i+r,i+a]).map(function(n){return t<2?e+n:`border`+n+e});_specialProps[t>1?`border`+e:e]=function(e,t,n,r,i){var a,s;if(arguments.length<4)return a=o.map(function(t){return _get(e,t,n)}),s=a.join(` `),s.split(a[0]).length===5?a[0]:s;a=(r+``).split(` `),s={},o.forEach(function(e,t){return s[e]=a[t]=a[t]||a[(t-1)/2|0]}),e.init(t,s,i)}});var CSSPlugin={name:`css`,register:_initCore$1,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,n,r,i){var a=this._props,o=e.style,s=n.vars.startAt,c,l,u,d,f,p,m,g,_,y,b,x,S,C,T,E,D;for(m in _pluginInitted||_initCore$1(),this.styles=this.styles||_getStyleSaver(e),E=this.styles.props,this.tween=n,t)if(m!==`autoRound`&&(l=t[m],!(_plugins[m]&&_checkPlugin(m,t,n,r,e,i)))){if(f=typeof l,p=_specialProps[m],f===`function`&&(l=l.call(n,r,e,i),f=typeof l),f===`string`&&~l.indexOf(`random(`)&&(l=_replaceRandom(l)),p)p(this,e,m,l,n)&&(T=1);else if(m.substr(0,2)===`--`)c=(getComputedStyle(e).getPropertyValue(m)+``).trim(),l+=``,_colorExp.lastIndex=0,_colorExp.test(c)||(g=getUnit(c),_=getUnit(l),_?g!==_&&(c=_convertToUnit(e,m,c,_)+_):g&&(l+=g)),this.add(o,`setProperty`,c,l,r,i,0,0,m),a.push(m),E.push(m,0,o[m]);else if(f!==`undefined`){if(s&&m in s?(c=typeof s[m]==`function`?s[m].call(n,r,e,i):s[m],_isString$1(c)&&~c.indexOf(`random(`)&&(c=_replaceRandom(c)),getUnit(c+``)||c===`auto`||(c+=_config.units[m]||getUnit(_get(e,m))||``),(c+``).charAt(1)===`=`&&(c=_get(e,m))):c=_get(e,m),d=parseFloat(c),y=f===`string`&&l.charAt(1)===`=`&&l.substr(0,2),y&&(l=l.substr(2)),u=parseFloat(l),m in _propertyAliases&&(m===`autoAlpha`&&(d===1&&_get(e,`visibility`)===`hidden`&&u&&(d=0),E.push(`visibility`,0,o.visibility),_addNonTweeningPT(this,o,`visibility`,d?`inherit`:`hidden`,u?`inherit`:`hidden`,!u)),m!==`scale`&&m!==`transform`&&(m=_propertyAliases[m],~m.indexOf(`,`)&&(m=m.split(`,`)[0]))),b=m in _transformProps,b){if(this.styles.save(m),D=l,f===`string`&&l.substring(0,6)===`var(--`){if(l=_getComputedProperty(e,l.substring(4,l.indexOf(`)`))),l.substring(0,5)===`calc(`){var O=e.style.perspective;e.style.perspective=l,l=_getComputedProperty(e,`perspective`),O?e.style.perspective=O:_removeProperty(e,`perspective`)}u=parseFloat(l)}
vendor: 5,220 bytes, line 9
9if(x||(S=e._gsap,S.renderTransform&&!t.parseTransform||_parseTransform(e,t.parseTransform),C=t.smoothOrigin!==!1&&S.smooth,x=this._pt=new PropTween(this._pt,o,_transformProp$1,0,1,S.renderTransform,S,0,-1),x.dep=1),m===`scale`)this._pt=new PropTween(this._pt,S,`scaleY`,S.scaleY,(y?_parseRelative(S.scaleY,y+u):u)-S.scaleY||0,_renderCSSProp),this._pt.u=0,a.push(`scaleY`,m),m+=`X`;else if(m===`transformOrigin`){E.push(_transformOriginProp,0,o[_transformOriginProp]),l=_convertKeywordsToPercentages(l),S.svg?_applySVGOrigin(e,l,0,C,0,this):(_=parseFloat(l.split(` `)[2])||0,_!==S.zOrigin&&_addNonTweeningPT(this,S,`zOrigin`,S.zOrigin,_),_addNonTweeningPT(this,o,m,_firstTwoOnly(c),_firstTwoOnly(l)));continue}else if(m===`svgOrigin`){_applySVGOrigin(e,l,1,C,0,this);continue}else if(m in _rotationalProperties){_addRotationalPropTween(this,S,m,d,y?_parseRelative(d,y+l):l);continue}else if(m===`smoothOrigin`){_addNonTweeningPT(this,S,`smooth`,S.smooth,l);continue}else if(m===`force3D`){S[m]=l;continue}else if(m===`transform`){_addRawTransformPTs(this,l,e);continue}}else m in o||(m=_checkPropPrefix(m)||m);if(b||(u||u===0)&&(d||d===0)&&!_complexExp.test(l)&&m in o)g=(c+``).substr((d+``).length),u||=0,_=getUnit(l)||(m in _config.units?_config.units[m]:g),g!==_&&(d=_convertToUnit(e,m,c,_)),this._pt=new PropTween(this._pt,b?S:o,m,d,(y?_parseRelative(d,y+u):u)-d,!b&&(_===`px`||m===`zIndex`)&&t.autoRound!==!1?_renderRoundedCSSProp:_renderCSSProp),this._pt.u=_||0,b&&D!==l?(this._pt.b=c,this._pt.e=D,this._pt.r=_renderCSSPropWithBeginningAndEnd):g!==_&&_!==`%`&&(this._pt.b=c,this._pt.r=_renderCSSPropWithBeginning);else if(m in o)_tweenComplexCSSString.call(this,e,m,c,y?y+l:l);else if(m in e)this.add(e,m,c||e[m],y?y+l:l,r,i);else if(m!==`parseTransform`){_missingPlugin(m,l);continue}b||(m in o?E.push(m,0,o[m]):typeof e[m]==`function`?E.push(m,2,e[m]()):E.push(m,1,c||e[m])),a.push(m)}}T&&_sortPropTweensByPriority(this)},render:function(e,t){if(t.tween._time||!_reverting())for(var n=t._pt;n;)n.r(e,n.d),n=n._next;else t.styles.revert()},get:_get,aliases:_propertyAliases,getSetter:function(e,t,n){var r=_propertyAliases[t];return r&&r.indexOf(`,`)<0&&(t=r),t in _transformProps&&t!==_transformOriginProp&&(e._gsap.x||_get(e,`x`))?n&&_recentSetterPlugin===n?t===`scale`?_setterScale:_setterTransform:(_recentSetterPlugin=n||{})&&(t===`scale`?_setterScaleWithRender:_setterTransformWithRender):e.style&&!_isUndefined(e.style[t])?_setterCSSStyle:~t.indexOf(`-`)?_setterCSSProp:_getSetter(e,t)},core:{_removeProperty,_getMatrix}};gsap$2.utils.checkPrefix=_checkPropPrefix,gsap$2.core.getStyleSaver=_getStyleSaver,(function(e,t,n,r){var i=_forEachName(e+`,`+t+`,`+n,function(e){_transformProps[e]=1});_forEachName(t,function(e){_config.units[e]=`deg`,_rotationalProperties[e]=1}),_propertyAliases[i[13]]=e+`,`+t,_forEachName(r,function(e){var t=e.split(`:`);_propertyAliases[t[1]]=i[t[0]]})})(`x,y,z,scale,scaleX,scaleY,xPercent,yPercent`,`rotation,rotationX,rotationY,skewX,skewY`,`transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective`,`0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY`),_forEachName(`x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective`,function(e){_config.units[e]=`px`}),gsap$2.registerPlugin(CSSPlugin);var gsapWithCSS$1=gsap$2.registerPlugin(CSSPlugin)||gsap$2,TweenMaxWithCSS$1=gsapWithCSS$1.core.Tween;function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}var gsap$1,_coreInitted$1,_win$1,_doc$1,_docEl$1,_body$1,_isTouch,_pointerType,ScrollTrigger$1,_root$1,_normalizer$1,_eventTypes,_context$1,_getGSAP$1=function(){return gsap$1||typeof window<`u`&&(gsap$1=window.gsap)&&gsap$1.registerPlugin&&gsap$1},_startup$1=1,_observers=[],_scrollers=[],_proxies=[],_getTime$1=Date.now,_bridge=function(e,t){return t},_integrate=function(){var e=ScrollTrigger$1.core,t=e.bridge||{},n=e._scrollers,r=e._proxies;n.push.apply(n,_scrollers),r.push.apply(r,_proxies),_scrollers=n,_proxies=r,_bridge=function(e,n){return t[e](n)}},_getProxyProp=function(e,t){return~_proxies.indexOf(e)&&_proxies[_proxies.indexOf(e)+1][t]},_isViewport$1=function(e){return!!~_root$1.indexOf(e)},_addListener$1=function(e,t,n,r,i){return e.addEventListener(t,n,{passive:r!==!1,capture:!!i})},_removeListener$1=function(e,t,n,r){return e.removeEventListener(t,n,!!r)},_scrollLeft=`scrollLeft`,_scrollTop=`scrollTop`,_onScroll$1=function(){return _normalizer$1&&_normalizer$1.isPressed||_scrollers.cache++},_scrollCacheFunc=function(e,t){var n=function n(r){if(r||r===0){_startup$1&&(_win$1.history.scrollRestoration=`manual`);var i=_normalizer$1&&_normalizer$1.isPressed;r=n.v=Math.round(r)||(_normalizer$1&&_normalizer$1.iOS?1:0),e(r),n.cacheID=_scrollers.cache,i&&_bridge(`ss`,r)}else (t||_scrollers.cache!==n.cacheID||_bridge(`ref`))&&(n.cacheID=_scrollers.cache,n.v=e());return n.v+n.offset};return n.offset=0,e&&n},_horizontal={s:_scrollLeft,p:`left`,p2:`Left`,os:`right`,os2:`Right`,d:`width`,d2:`W
9idth`,a:`x`,sc:_scrollCacheFunc(function(e){return arguments.length?_win$1.scrollTo(e,_vertical.sc()):_win$1.pageXOffset||_doc$1[_scrollLeft]||_docEl$1[_scrollLeft]||_body$1[_scrollLeft]||0})},_vertical={s:_scrollTop,p:`top`,p2:`Top`,os:`bottom`,os2:`Bottom`,d:`height`,d2:`Height`,a:`y`,op:_horizontal,sc:_scrollCacheFunc(function(e){return arguments.length?_win$1.scrollTo(_horizontal.sc(),e):_win$1.pageYOffset||_doc$1[_scrollTop]||_docEl$1[_scrollTop]||_body$1[_scrollTop]||0})},_getTarget=function(e,t){return(t&&t._ctx&&t._ctx.selector||gsap$1.utils.toArray)(e)[0]||(typeof e==`string`&&gsap$1.config().nullTargetWarn!==!1?console.warn(`Element not found:`,e):null)},_isWithin=function(e,t){for(var n=t.length;n--;)if(t[n]===e||t[n].contains(e))return!0;return!1},_getScrollFunc=function(e,t){var n=t.s,r=t.sc;_isViewport$1(e)&&(e=_doc$1.scrollingElement||_docEl$1);var i=_scrollers.indexOf(e),a=r===_vertical.sc?1:2;!~i&&(i=_scrollers.push(e)-1),_scrollers[i+a]||_addListener$1(e,`scroll`,_onScroll$1);var o=_scrollers[i+a],s=o||(_scrollers[i+a]=_scrollCacheFunc(_getProxyProp(e,n),!0)||(_isViewport$1(e)?r:_scrollCacheFunc(function(t){return arguments.length?e[n]=t:e[n]})));return s.target=e,o||(s.smooth=gsap$1.getProperty(e,`scrollBehavior`)===`smooth`),s},_getVelocityProp=function(e,t,n){var r=e,i=e,a=_getTime$1(),o=a,s=t||50,c=Math.max(500,s*3),l=function(e,t){var c=_getTime$1();t||c-a>s?(i=r,r=e,o=a,a=c):n?r+=e:r=i+(e-i)/(c-o)*(a-o)};return{update:l,reset:function(){i=r=n?0:r,o=a=0},getVelocity:function(e){var t=o,s=i,u=_getTime$1();return(e||e===0)&&e!==r&&l(e),a===o||u-o>c?0:(r+(n?s:-s))/((n?u:a)-t)*1e3}}},_getEvent=function(e,t){return t&&!e._gsapAllow&&e.cancelable!==!1&&e.preventDefault(),e.changedTouches?e.changedTouches[0]:e},_getAbsoluteMax=function(e){var t=Math.max.apply(Math,e),n=Math.min.apply(Math,e);return Math.abs(t)>=Math.abs(n)?t:n},_setScrollTrigger=function(){ScrollTrigger$1=gsap$1.core.globals().ScrollTrigger,ScrollTrigger$1&&ScrollTrigger$1.core&&_integrate()},_initCore=function(e){return gsap$1=e||_getGSAP$1(),!_coreInitted$1&&gsap$1&&typeof document<`u`&&document.body&&(_win$1=window,_doc$1=document,_docEl$1=_doc$1.documentElement,_body$1=_doc$1.body,_root$1=[_win$1,_doc$1,_docEl$1,_body$1],gsap$1.utils.clamp,_context$1=gsap$1.core.context||function(){},_pointerType=`onpointerenter`in _body$1?`pointer`:`mouse`,_isTouch=Observer.isTouch=_win$1.matchMedia&&_win$1.matchMedia(`(hover: none), (pointer: coarse)`).matches?1:`ontouchstart`in _win$1||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0?2:0,_eventTypes=Observer.eventTypes=(`ontouchstart`in _docEl$1?`touchstart,touchmove,touchcancel,touchend`:`onpointerdown`in _docEl$1?`pointerdown,pointermove,pointercancel,pointerup`:`mousedown,mousemove,mouseup,mouseup`).split(`,`),setTimeout(function(){return _startup$1=0},500),_coreInitted$1=1),ScrollTrigger$1||_setScrollTrigger(),_coreInitted$1};_horizontal.op=_vertical,_scrollers.cache=0;var Observer=function(){function e(e){this.init(e)}var t=e.prototype;return t.init=function(e){_coreInitted$1||_initCore(gsap$1)||console.warn(`Please gsap.registerPlugin(Observer)`),ScrollTrigger$1||_setScrollTrigger();var t=e.tolerance,n=e.dragMinimum,r=e.type,i=e.target,a=e.lineHeight,o=e.debounce,s=e.preventDefault,c=e.onStop,l=e.onStopDelay,u=e.ignore,d=e.wheelSpeed,f=e.event,p=e.onDragStart,m=e.onDragEnd,g=e.onDrag,_=e.onPress,y=e.onRelease,b=e.onRight,x=e.onLeft,S=e.onUp,C=e.onDown,T=e.onChangeX,E=e.onChangeY,D=e.onChange,O=e.onToggleX,k=e.onToggleY,A=e.onHover,j=e.onHoverEnd,M=e.onMove,N=e.ignoreCheck,P=e.isNormalizer,F=e.onGestureStart,I=e.onGestureEnd,L=e.onWheel,R=e.onEnable,z=e.onDisable,B=e.onClick,V=e.scrollSpeed,ee=e.capture,H=e.allowClicks,te=e.lockAxis,ne=e.onLockAxis;this.target=i=_getTarget(i)||_docEl$1,this.vars=e,u&&=gsap$1.utils.toArray(u),t||=1e-9,n||=0,d||=1,V||=1,r||=`wheel,touch,pointer`,o=o!==!1,a||=parseFloat(_win$1.getComputedStyle(_body$1).lineHeight)||22;var U,re,ie,ae,W,oe,K,q=this,se=0,ce=0,J=e.passive||!s&&e.passive!==!1,le=_getScrollFunc(i,_horizontal),Y=_getScrollFunc(i,_vertical),ue=le(),X=Y(),de=~r.indexOf(`touch`)&&!~r.indexOf(`pointer`)&&_eventTypes[0]===`pointerdown`,Z=_isViewport$1(i),Q=i.ownerDocument||_doc$1,fe=[0,0,0],$=[0,0,0],pe
vendor: 6,084 bytes, line 9
9=0,me=function(){return pe=_getTime$1()},he=function(e,t){return(q.event=e)&&u&&_isWithin(e.target,u)||t&&de&&e.pointerType!==`touch`||N&&N(e,t)},ge=function(){q._vx.reset(),q._vy.reset(),re.pause(),c&&c(q)},_e=function(){var e=q.deltaX=_getAbsoluteMax(fe),n=q.deltaY=_getAbsoluteMax($),r=Math.abs(e)>=t,i=Math.abs(n)>=t;D&&(r||i)&&D(q,e,n,fe,$),r&&(b&&q.deltaX>0&&b(q),x&&q.deltaX<0&&x(q),T&&T(q),O&&q.deltaX<0!=se<0&&O(q),se=q.deltaX,fe[0]=fe[1]=fe[2]=0),i&&(C&&q.deltaY>0&&C(q),S&&q.deltaY<0&&S(q),E&&E(q),k&&q.deltaY<0!=ce<0&&k(q),ce=q.deltaY,$[0]=$[1]=$[2]=0),(ae||ie)&&(M&&M(q),ie&&=(p&&ie===1&&p(q),g&&g(q),0),ae=!1),oe&&!(oe=!1)&&ne&&ne(q),W&&=(L(q),!1),U=0},ve=function(e,t,n){fe[n]+=e,$[n]+=t,q._vx.update(e),q._vy.update(t),o?U||=requestAnimationFrame(_e):_e()},ye=function(e,t){te&&!K&&(q.axis=K=Math.abs(e)>Math.abs(t)?`x`:`y`,oe=!0),K!==`y`&&(fe[2]+=e,q._vx.update(e,!0)),K!==`x`&&($[2]+=t,q._vy.update(t,!0)),o?U||=requestAnimationFrame(_e):_e()},be=function(e){if(!he(e,1)){e=_getEvent(e,s);var t=e.clientX,r=e.clientY,i=t-q.x,a=r-q.y,o=q.isDragging;q.x=t,q.y=r,(o||(i||a)&&(Math.abs(q.startX-t)>=n||Math.abs(q.startY-r)>=n))&&(ie||=o?2:1,o||(q.isDragging=!0),ye(i,a))}},xe=q.onPress=function(e){he(e,1)||e&&e.button||(q.axis=K=null,re.pause(),q.isPressed=!0,e=_getEvent(e),se=ce=0,q.startX=q.x=e.clientX,q.startY=q.y=e.clientY,q._vx.reset(),q._vy.reset(),_addListener$1(P?i:Q,_eventTypes[1],be,J,!0),q.deltaX=q.deltaY=0,_&&_(q))},Se=q.onRelease=function(e){if(!he(e,1)){_removeListener$1(P?i:Q,_eventTypes[1],be,!0);var t=!isNaN(q.y-q.startY),n=q.isDragging,r=n&&(Math.abs(q.x-q.startX)>3||Math.abs(q.y-q.startY)>3),a=_getEvent(e);!r&&t&&(q._vx.reset(),q._vy.reset(),s&&H&&gsap$1.delayedCall(.08,function(){if(_getTime$1()-pe>300&&!e.defaultPrevented){if(e.target.click)e.target.click();else if(Q.createEvent){var t=Q.createEvent(`MouseEvents`);t.initMouseEvent(`click`,!0,!0,_win$1,1,a.screenX,a.screenY,a.clientX,a.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(t)}}})),q.isDragging=q.isGesturing=q.isPressed=!1,c&&n&&!P&&re.restart(!0),ie&&_e(),m&&n&&m(q),y&&y(q,r)}},Ce=function(e){return e.touches&&e.touches.length>1&&(q.isGesturing=!0)&&F(e,q.isDragging)},we=function(){return(q.isGesturing=!1)||I(q)},Te=function(e){if(!he(e)){var t=le(),n=Y();ve((t-ue)*V,(n-X)*V,1),ue=t,X=n,c&&re.restart(!0)}},Ee=function(e){if(!he(e)){e=_getEvent(e,s),L&&(W=!0);var t=(e.deltaMode===1?a:e.deltaMode===2?_win$1.innerHeight:1)*d;ve(e.deltaX*t,e.deltaY*t,0),c&&!P&&re.restart(!0)}},De=function(e){if(!he(e)){var t=e.clientX,n=e.clientY,r=t-q.x,i=n-q.y;q.x=t,q.y=n,ae=!0,c&&re.restart(!0),(r||i)&&ye(r,i)}},Oe=function(e){q.event=e,A(q)},ke=function(e){q.event=e,j(q)},Ae=function(e){return he(e)||_getEvent(e,s)&&B(q)};re=q._dc=gsap$1.delayedCall(l||.25,ge).pause(),q.deltaX=q.deltaY=0,q._vx=_getVelocityProp(0,50,!0),q._vy=_getVelocityProp(0,50,!0),q.scrollX=le,q.scrollY=Y,q.isDragging=q.isGesturing=q.isPressed=!1,_context$1(this),q.enable=function(e){return q.isEnabled||(_addListener$1(Z?Q:i,`scroll`,_onScroll$1),r.indexOf(`scroll`)>=0&&_addListener$1(Z?Q:i,`scroll`,Te,J,ee),r.indexOf(`wheel`)>=0&&_addListener$1(i,`wheel`,Ee,J,ee),(r.indexOf(`touch`)>=0&&_isTouch||r.indexOf(`pointer`)>=0)&&(_addListener$1(i,_eventTypes[0],xe,J,ee),_addListener$1(Q,_eventTypes[2],Se),_addListener$1(Q,_eventTypes[3],Se),H&&_addListener$1(i,`click`,me,!0,!0),B&&_addListener$1(i,`click`,Ae),F&&_addListener$1(Q,`gesturestart`,Ce),I&&_addListener$1(Q,`gestureend`,we),A&&_addListener$1(i,_pointerType+`enter`,Oe),j&&_addListener$1(i,_pointerType+`leave`,ke),M&&_addListener$1(i,_pointerType+`move`,De)),q.isEnabled=!0,q.isDragging=q.isGesturing=q.isPressed=ae=ie=!1,q._vx.reset(),q._vy.reset(),ue=le(),X=Y(),e&&e.type&&xe(e),R&&R(q)),q},q.disable=function(){q.isEnabled&&(_observers.filter(function(e){return e!==q&&_isViewport$1(e.target)}).length||_removeListener$1(Z?Q:i,`scroll`,_onScroll$1),q.isPressed&&(q._vx.reset(),q._vy.reset(),_removeListener$1(P?i:Q,_eventTypes[1],be,!0)),_removeListener$1(Z?Q:i,`scroll`,Te,ee),_removeListener$1(i,`wheel`,Ee,ee),_removeListener$1(i,_eventTypes[0],xe,ee),_removeListener$1(Q,_eventTypes[2],Se),_removeListener$1(Q,_eventTypes[3],Se),_removeListener$1(i,`click`,me,!0),_removeListener$1(i,`click`,Ae),_removeListener$1(Q,`gesturestart`,Ce),_removeListener$1(Q,`gestureend`,we),_removeListener$1(i,_pointerType+`enter`,Oe),_removeListener$1(i,_pointerType+`leave`,ke),_removeListener$1(i,_pointerType+`move`,De),q.isEnabled=q.isPressed=q.isDragging=!1,z&&z(q))},q.kill=q.revert=function(){q.disable();var e=_observers.indexOf(q);e>=0&&_observers.splice(e,1),_normalizer$1===q&&(_normalizer$1=0)},_observers.push(q),P&&_isViewport$1(i)&&(_normalizer$1=q),q.enable(f)},_createClass(e,[{key:`velocityX`,get:function(){return this._vx.getVelocity()}},{key:`velocityY`,get:function(){return this._vy.getVelocity()}}]),e}();Observer.version=`3.15.0`,Observer.create=function(e){return new Observer(e)},Observer.register=_initCore,Observer.getAll=function(){return _observers.slice()},Observer.getById=function(e){return _observers.filter(function(t){return t.vars.id===e})[0]},_getGSAP$1()&&gsap$1.registerPlugin(Observer);var gsap,_coreInitted,_win,_doc,_docEl,_body,_root,_resizeDelay,_toArray,_clamp,_time2,_syncInterval,_refreshing,_pointerIsDown,_transformProp,_i,_prevWidth,_prevHeight,_autoRefresh,_sort,_suppressOverwrites,_ignoreResize,_normalizer,_ignoreMobileResize,_baseScreenHeight,_baseScreenWidth,_fixIOSBug,_context,_scrollRestoration,_div100vh,_100vh,_isReverted,_clampingMax,_limitCallbacks,_startup=1,_getTime=Date.now,_time1=_getTime(),_lastScrollTime=0,_enabled=0,_parseClamp=function(e,t,n){var r=_isString(e)&&(e.substr(0,6)===`clamp(`||e.indexOf(`max`)>-1);return n[`_`+t+`Clamp`]=r,r?e.substr(6,e.length-7):e},_keepClamp=function(e,t){return t&&(!_isString(e)||e.substr(0,6)!==`clamp(`)?`clamp(`+e+`)`:e},_rafBugFix=function e(){return _enabled&&requestAnimationFrame(e)},_pointerDownHandler=function(){return _pointerIsDown=1},_pointerUpHandler=function(){return _pointerIsDown=0},_passThrough=function(e){return e}
vendor: 5,370 bytes, line 9
9,_round=function(e){return Math.round(e*1e5)/1e5||0},_windowExists=function(){return typeof window<`u`},_getGSAP=function(){return gsap||_windowExists()&&(gsap=window.gsap)&&gsap.registerPlugin&&gsap},_isViewport=function(e){return!!~_root.indexOf(e)},_getViewportDimension=function(e){return(e===`Height`?_100vh:_win[`inner`+e])||_docEl[`client`+e]||_body[`client`+e]},_getBoundsFunc=function(e){return _getProxyProp(e,`getBoundingClientRect`)||(_isViewport(e)?function(){return _winOffsets.width=_win.innerWidth,_winOffsets.height=_100vh,_winOffsets}:function(){return _getBounds(e)})},_getSizeFunc=function(e,t,n){var r=n.d,i=n.d2,a=n.a;return(a=_getProxyProp(e,`getBoundingClientRect`))?function(){return a()[r]}:function(){return(t?_getViewportDimension(i):e[`client`+i])||0}},_getOffsetsFunc=function(e,t){return!t||~_proxies.indexOf(e)?_getBoundsFunc(e):function(){return _winOffsets}},_maxScroll=function(e,t){var n=t.s,r=t.d2,i=t.d,a=t.a;return Math.max(0,(n=`scroll`+r)&&(a=_getProxyProp(e,n))?a()-_getBoundsFunc(e)()[i]:_isViewport(e)?(_docEl[n]||_body[n])-_getViewportDimension(r):e[n]-e[`offset`+r])},_iterateAutoRefresh=function(e,t){for(var n=0;n<_autoRefresh.length;n+=3)(!t||~t.indexOf(_autoRefresh[n+1]))&&e(_autoRefresh[n],_autoRefresh[n+1],_autoRefresh[n+2])},_isString=function(e){return typeof e==`string`},_isFunction=function(e){return typeof e==`function`},_isNumber=function(e){return typeof e==`number`},_isObject=function(e){return typeof e==`object`},_endAnimation=function(e,t,n){return e&&e.progress(+!t)&&n&&e.pause()},_callback=function(e,t,n){if(e.enabled){var r=e._ctx?e._ctx.add(function(){return t(e,n)}):t(e,n);r&&r.totalTime&&(e.callbackAnimation=r)}},_abs=Math.abs,_left=`left`,_top=`top`,_right=`right`,_bottom=`bottom`,_width=`width`,_height=`height`,_Right=`Right`,_Left=`Left`,_Top=`Top`,_Bottom=`Bottom`,_padding=`padding`,_margin=`margin`,_Width=`Width`,_Height=`Height`,_px=`px`,_getComputedStyle=function(e){return _win.getComputedStyle(e.nodeType===Node.DOCUMENT_NODE?e.scrollingElement:e)},_makePositionable=function(e){var t=_getComputedStyle(e).position;e.style.position=t===`absolute`||t===`fixed`?t:`relative`},_setDefaults=function(e,t){for(var n in t)n in e||(e[n]=t[n]);return e},_getBounds=function(e,t){var n=t&&_getComputedStyle(e)[_transformProp]!==`matrix(1, 0, 0, 1, 0, 0)`&&gsap.to(e,{x:0,y:0,xPercent:0,yPercent:0,rotation:0,rotationX:0,rotationY:0,scale:1,skewX:0,skewY:0}).progress(1),r=e.getBoundingClientRect?e.getBoundingClientRect():e.scrollingElement.getBoundingClientRect();return n&&n.progress(0).kill(),r},_getSize=function(e,t){var n=t.d2;return e[`offset`+n]||e[`client`+n]||0},_getLabelRatioArray=function(e){var t=[],n=e.labels,r=e.duration(),i;for(i in n)t.push(n[i]/r);return t},_getClosestLabel=function(e){return function(t){return gsap.utils.snap(_getLabelRatioArray(e),t)}},_snapDirectional=function(e){var t=gsap.utils.snap(e),n=Array.isArray(e)&&e.slice(0).sort(function(e,t){return e-t});return n?function(e,r,i){i===void 0&&(i=.001);var a;if(!r)return t(e);if(r>0){for(e-=i,a=0;a<n.length;a++)if(n[a]>=e)return n[a];return n[a-1]}else for(a=n.length,e+=i;a--;)if(n[a]<=e)return n[a];return n[0]}:function(n,r,i){i===void 0&&(i=.001);var a=t(n);return!r||Math.abs(a-n)<i||a-n<0==r<0?a:t(r<0?n-e:n+e)}},_getLabelAtDirection=function(e){return function(t,n){return _snapDirectional(_getLabelRatioArray(e))(t,n.direction)}},_multiListener=function(e,t,n,r){return n.split(`,`).forEach(function(n){return e(t,n,r)})},_addListener=function(e,t,n,r,i){return e.addEventListener(t,n,{passive:!r,capture:!!i})},_removeListener=function(e,t,n,r){return e.removeEventListener(t,n,!!r)},_wheelListener=function(e,t,n){n&&=n.wheelHandler,n&&(e(t,`wheel`,n),e(t,`touchmove`,n))},_markerDefaults={startColor:`green`,endColor:`red`,indent:0,fontSize:`16px`,fontWeight:`normal`},_defaults={toggleActions:`play`,anticipatePin:0},_keywords={top:0,left:0,center:.5,bottom:1,right:1},_offsetToPx=function(e,t){if(_isString(e)){var n=e.indexOf(`=`),r=~n?+(e.charAt(n-1)+1)*parseFloat(e.substr(n+1)):0;~n&&(e.indexOf(`%`)>n&&(r*=t/100),e=e.substr(0,n-1)),e=r+(e in _keywords?_keywords[e]*t:~e.indexOf(`%`)?parseFloat(e)*t/100:parseFloat(e)||0)}return e},_createMarker=function(e,t,n,r,i,a,o,s){var c=i.startColor,l=i.endColor,u=i.fontSize,d=i.indent,f=i.fontWeight,p=_doc.createElement(`div`),m=_isViewport(n)||_getProxyProp(n,`pinType`)===`fixed`,g=e.indexOf(`scroller`)!==-1,_=m?_body:n.tagName===`IFRAME`?n.contentDocument.body:n,y=e.indexOf(`start`)!==-1,b=y?c:l,x=`border-color:`+b+`;font-size:`+u+`;color:`+b+`;font-weight:`+f+`;pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;`;return x+=`position:`+((g||s)&&m?`fixed;`:`absolute;`),(g||s||!m)&&(x+=(r===_vertical?_right:_bottom)+`:`+(a+parseFloat(d))+`px;`),o&&(x+=`box-sizing:border-box;text-align:left;width:`+o.offsetWidth+`px;`),p._isStart=y,p.setAttribute(`class`,`gsap-marker-`+e+(t?` marker-`+t:``)),p.style.cssText=x,p.innerText=t||t===0?e+`-`+t:e,_.children[0]?_.insertBefore(p,_.children[0]):_.appendChild(p),p._offset=p[`offset`+r.op.d2],_positionMarker(p,0,r,y),p},_positionMarker=function(e,t,n,r){var i={display:`block`},a=n[r?`os2`:`p2`],o=n[r?`p2`:`os2`];e._isFlipped=r,i[n.a+`Percent`]=r?-100:0,i[n.a]=r?`1px`:0,i[`border`+a+_Width]=1,i[`border`+
vendor: 9,366 bytes, line 9
9o+_Width]=0,i[n.p]=t+`px`,gsap.set(e,i)},_triggers=[],_ids={},_rafID,_sync=function(){return _getTime()-_lastScrollTime>34&&(_rafID||=requestAnimationFrame(_updateAll))},_onScroll=function(){(!_normalizer||!_normalizer.isPressed||_normalizer.startX>_body.clientWidth)&&(_scrollers.cache++,_normalizer?_rafID||=requestAnimationFrame(_updateAll):_updateAll(),_lastScrollTime||_dispatch(`scrollStart`),_lastScrollTime=_getTime())},_setBaseDimensions=function(){_baseScreenWidth=_win.innerWidth,_baseScreenHeight=_win.innerHeight},_onResize=function(e){_scrollers.cache++,(e===!0||!_refreshing&&!_ignoreResize&&!_doc.fullscreenElement&&!_doc.webkitFullscreenElement&&(!_ignoreMobileResize||_baseScreenWidth!==_win.innerWidth||Math.abs(_win.innerHeight-_baseScreenHeight)>_win.innerHeight*.25))&&_resizeDelay.restart(!0)},_listeners={},_emptyArray=[],_softRefresh=function e(){return _removeListener(ScrollTrigger,`scrollEnd`,e)||_refreshAll(!0)},_dispatch=function(e){return _listeners[e]&&_listeners[e].map(function(e){return e()})||_emptyArray},_savedStyles=[],_revertRecorded=function(e){for(var t=0;t<_savedStyles.length;t+=5)(!e||_savedStyles[t+4]&&_savedStyles[t+4].query===e)&&(_savedStyles[t].style.cssText=_savedStyles[t+1],_savedStyles[t].getBBox&&_savedStyles[t].setAttribute(`transform`,_savedStyles[t+2]||``),_savedStyles[t+3].uncache=1)},_recordScrollPositions=function(){return _scrollers.forEach(function(e){return _isFunction(e)&&++e.cacheID&&(e.rec=e())})},_revertAll=function(e,t){var n;for(_i=0;_i<_triggers.length;_i++)n=_triggers[_i],n&&(!t||n._ctx===t)&&(e?n.kill(1):n.revert(!0,!0));_isReverted=!0,t&&_revertRecorded(t),t||_dispatch(`revert`)},_clearScrollMemory=function(e,t){_scrollers.cache++,(t||!_refreshingAll)&&_scrollers.forEach(function(e){return _isFunction(e)&&e.cacheID++&&(e.rec=0)}),_isString(e)&&(_win.history.scrollRestoration=_scrollRestoration=e)},_refreshingAll,_refreshID=0,_queueRefreshID,_queueRefreshAll=function(){if(_queueRefreshID!==_refreshID){var e=_queueRefreshID=_refreshID;requestAnimationFrame(function(){return e===_refreshID&&_refreshAll(!0)})}},_refresh100vh=function(){_body.appendChild(_div100vh),_100vh=!_normalizer&&_div100vh.offsetHeight||_win.innerHeight,_body.removeChild(_div100vh)},_hideAllMarkers=function(e){return _toArray(`.gsap-marker-start, .gsap-marker-end, .gsap-marker-scroller-start, .gsap-marker-scroller-end`).forEach(function(t){return t.style.display=e?`none`:`block`})},_refreshAll=function(e,t){if(_docEl=_doc.documentElement,_body=_doc.body,_root=[_win,_doc,_docEl,_body],_lastScrollTime&&!e&&!_isReverted){_addListener(ScrollTrigger,`scrollEnd`,_softRefresh);return}_refresh100vh(),_refreshingAll=ScrollTrigger.isRefreshing=!0,_isReverted||_recordScrollPositions();var n=_dispatch(`refreshInit`);_sort&&ScrollTrigger.sort(),t||_revertAll(),_scrollers.forEach(function(e){_isFunction(e)&&(e.smooth&&(e.target.style.scrollBehavior=`auto`),e(0))}),_triggers.slice(0).forEach(function(e){return e.refresh()}),_isReverted=!1,_triggers.forEach(function(e){if(e._subPinOffset&&e.pin){var t=e.vars.horizontal?`offsetWidth`:`offsetHeight`,n=e.pin[t];e.revert(!0,1),e.adjustPinSpacing(e.pin[t]-n),e.refresh()}}),_clampingMax=1,_hideAllMarkers(!0),_triggers.forEach(function(e){var t=_maxScroll(e.scroller,e._dir),n=e.vars.end===`max`||e._endClamp&&e.end>t,r=e._startClamp&&e.start>=t;(n||r)&&e.setPositions(r?t-1:e.start,n?Math.max(r?t:e.start+1,t):e.end,!0)}),_hideAllMarkers(!1),_clampingMax=0,n.forEach(function(e){return e&&e.render&&e.render(-1)}),_scrollers.forEach(function(e){_isFunction(e)&&(e.smooth&&requestAnimationFrame(function(){return e.target.style.scrollBehavior=`smooth`}),e.rec&&e(e.rec))}),_clearScrollMemory(_scrollRestoration,1),_resizeDelay.pause(),_refreshID++,_refreshingAll=2,_updateAll(2),_triggers.forEach(function(e){return _isFunction(e.vars.onRefresh)&&e.vars.onRefresh(e)}),_refreshingAll=ScrollTrigger.isRefreshing=!1,_dispatch(`refresh`)},_lastScroll=0,_direction=1,_primary,_updateAll=function(e){if(e===2||!_refreshingAll&&!_isReverted){ScrollTrigger.isUpdating=!0,_primary&&_primary.update(0);var t=_triggers.length,n=_getTime(),r=n-_time1>=50,i=t&&_triggers[0].scroll();if(_direction=_lastScroll>i?-1:1,_refreshingAll||(_lastScroll=i),r&&(_lastScrollTime&&!_pointerIsDown&&n-_lastScrollTime>200&&(_lastScrollTime=0,_dispatch(`scrollEnd`)),_time2=_time1,_time1=n),_direction<0){for(_i=t;_i-- >0;)_triggers[_i]&&_triggers[_i].update(0,r);_direction=1}else for(_i=0;_i<t;_i++)_triggers[_i]&&_triggers[_i].update(0,r);ScrollTrigger.isUpdating=!1}_rafID=0},_propNamesToCopy=[_left,_top,_bottom,_right,_margin+_Bottom,_margin+_Right,_margin+_Top,_margin+_Left,`display`,`flexShrink`,`float`,`zIndex`,`gridColumnStart`,`gridColumnEnd`,`gridRowStart`,`gridRowEnd`,`gridArea`,`justifySelf`,`alignSelf`,`placeSelf`,`order`],_stateProps=_propNamesToCopy.concat([_width,_height,`boxSizing`,`max`+_Width,`max`+_Height,`position`,_margin,_padding,_padding+_Top,_padding+_Right,_padding+_Bottom,_padding+_Left]),_swapPinOut=function(e,t,n){_setState(n);var r=e._gsap;if(r.spacerIsNative)_setState(r.spacerState);else if(e._gsap.swappedIn){var i=t.parentNode;i&&(i.insertBefore(e,t),i.removeChild(t))}e._gsap.swappedIn=!1},_swapPinIn=function(e,t,n,r){if(!e._gsap.swappedIn){for(var i=_propNamesToCopy.length,a=t.style,o=e.style,s;i--;)s=_propNamesToCopy[i],a[s]=n[s];a.position=n.position===`absolute`?`absolute`:`relative`,n.display===`inline`&&(a.display=`inline-block`),o[_bottom]=o[_right]=`auto`,a.flexBasis=n.flexBasis||`auto`,a.overflow=`visible`,a.boxSizing=`border-box`,a[_width]=_getSize(e,_horizontal)+_px,a[_height]=_getSize(e,_vertical)+_px,a[_padding]=o[_margin]=o[_top]=o[_left]=`0`,_setState(r),o[_width]=o[`max`+_Width]=n[_width],o[_height]=o[`max`+_Height]=n[_height],o[_padding]=n[_padding],e.parentNode!==t&&(e.parentNode.insertBefore(t,e),t.appendChild(e)),e._gsap.swappedIn=!0}},_capsExp=/([A-Z])/g,_setState=function(e){if(e){var t=e.t.style,n=e.length,r=0,i,a;for((e.t._gsap||gsap.core.getCache(e.t)).uncache=1;r<n;r+=2)a=e[r+1],i=e[r],a?t[i]=a:t[i]&&t.removeProperty(i.replace(_capsExp,`-$1`).toLowerCase())}},_getState=function(e){for(var t=_stateProps.length,n=e.style,r=[],i=0;i<t;i++)r.push(_stateProps[i],n[_stateProps[i]]);return r.t=e,r},_copyState=function(e,t,n){for(var r=[],i=e.length,a=n?8:0,o;a<i;a+=2)o=e[a],r.push(o,o in t?t[o]:e[a+1]);return r.t=e.t,r},_winOffsets={left:0,top:0},_parsePosition=function(e,t,n,r,i,a,o,s,c,l,u,d,f,p){_isFunction(e)&&(e=e(s)),_isString(e)&&e.substr(0,3)===`max`&&(e=d+(e.charAt(4)===`=`?_offsetToPx(`0`+e.substr(3),n):0));var m=f?f.time():0,g,_,y;if(f&&f.seek(0),isNaN(e)||(e=+e),_isNumber(e))f&&(e=gsap.utils.mapRange(f.scrollTrigger.start,f.scrollTrigger.end,0,d,e)),o&&_positionMarker(o,n,r,!0);else{_isFunction(t)&&(t=t(s));var b=(e||`0`).split(` `),x,S,C,T;y=_getTarget(t,s)||_body,x=_getBounds(y)||{},(!x||!x.left&&!x.top)&&_getComputedStyle(y).display===`none`&&(T=y.style.display,y.style.display=`block`,x=_getBounds(y),T?y.style.display=T:y.style.removeProperty(`display`)),S=_offsetToPx(b[0],x[r.d]),C=_offsetToPx(b[1]||`0`,n),e=x[r.p]-c[r.p]-l+S+i-C,o&&_positionMarker(o,C,r,n-C<20||o._isStart&&C>20),n-=n-C}if(p&&(s[p]=e||-.001,e<0&&(e=0)),a){var E=e+n,D=a._isStart;g=`scroll`+r.d2,_positionMarker(a,E,r,D&&E>20||!D&&(u?Math.max(_body[g],_docEl[g]):a.parentNode[g])<=E+1),u&&(c=_getBounds(o),u&&(a.style[r.op.p]=c[r.op.p]-r.op.m-a._offset+_px))}return f&&y&&(g=_getBounds(y),f.seek(d),_=_getBounds(y),f._caScrollDist=g[r.p]-_[r.p],e=e/f._caScrollDist*d),f&&f.seek(m),f?e:Math.round(e)},_prefixExp=/(webkit|moz|length|cssText|inset)/i,_reparent=function(e,t,n,r){if(e.parentNode!==t){var i=e.style,a,o;if(t===_body){for(a in e._stOrig=i.cssText,o=_getComputedStyle(e),o)!+a&&!_prefixExp.test(a)&&o[a]&&typeof i[a]==`string`&&a!==`0`&&(i[a]=o[a]);i.top=n,i.left=r}else i.cssText=e._stOrig;gsap.core.getCache(e).uncache=1,t.appendChild(e)}},_interruptionTracker=function(e,t,n){var r=t,i=r;return function(t){var a=Math.round(e());return a!==r&&a!==i&&Math.abs(a-r)>3&&Math.abs(a-i)>3&&(t=a,n&&n()),i=r,r=Math.round(t),r}},_shiftMarker=function(e,t,n){var r={};r[t.p]=`+=`+n,gsap.set(e,r)},_getTweenCreator=function(e,t){var n=_getScrollFunc(e,t),r=`_scroll`+t.p2,i=function t(i,a,o,s,c){var l=t.tween,u=a.onComplete,d={};o||=n();var f=_interruptionTracker(n,o,function(){l.kill(),t.tween=0});return c=s&&c||0,s||=i-o,l&&l.kill(),a[r]=i,a.inherit=!1,a.modifiers=d,d[r]=function(){return f(o+s*l.ratio+c*l.ratio*l.ratio)},a.onUpdate=function(){_scrollers.cache++,t.tween&&_updateAll()},a.onComplete=function(){t.tween=0,u&&u.call(l)},l=t.tween=gsap.to(e,a),l};return e[r]=n,n.wheelHandler=function(){return i.tween&&i.tween.kill()&&(i.tween=0)},_addListener(e,`wheel`,n.wheelHandler),ScrollTrigger.isTouch&&_addListener(e,`touchmove`,n.wheelHandler),i},ScrollTrigger=function(){function e(t,n){_coreInitted||e.register(gsap)||console.warn(`Please gsap.registerPlugin(ScrollTrigger)`),_context(this),this.init(t,n)}var t=e.prototype;return t.init=function(t,n){if(this.progress=this.start=0,this.vars&&this.kill(!0,!0),!_enabled){this.update=this.refresh=this.kill=_passThrough;return}t=_setDefaults(_isString(t)||_isNumber(t)||t.nodeType?{trigger:t}:t,_defaults);var r=t,i=r.onUpdate,a=r.toggleClass,o=r.id,s=r.onToggle,c=r.onRefresh,l=r.scrub,u=r.trigger,d=r.pin,f=r.pinSpacing,p=r.invali
vendor: 4,526 bytes, line 9
9dateOnRefresh,m=r.anticipatePin,g=r.onScrubComplete,_=r.onSnapComplete,y=r.once,b=r.snap,x=r.pinReparent,S=r.pinSpacer,C=r.containerAnimation,T=r.fastScrollEnd,E=r.preventOverlaps,D=t.horizontal||t.containerAnimation&&t.horizontal!==!1?_horizontal:_vertical,O=!l&&l!==0,k=_getTarget(t.scroller||_win),A=gsap.core.getCache(k),j=_isViewport(k),M=(`pinType`in t?t.pinType:_getProxyProp(k,`pinType`)||j&&`fixed`)===`fixed`,N=[t.onEnter,t.onLeave,t.onEnterBack,t.onLeaveBack],P=O&&t.toggleActions.split(` `),F=`markers`in t?t.markers:_defaults.markers,I=j?0:parseFloat(_getComputedStyle(k)[`border`+D.p2+_Width])||0,L=this,R=t.onRefreshInit&&function(){return t.onRefreshInit(L)},z=_getSizeFunc(k,j,D),B=_getOffsetsFunc(k,j),V=0,ee=0,H=0,te=_getScrollFunc(k,D),ne,U,re,ie,ae,W,oe,K,q,se,ce,J,le,Y,ue,X,de,Z,Q,fe,$,pe,me,he,ge,_e,ve,ye,be,xe,Se,Ce,we,Te,Ee,De,Oe,ke,Ae;if(L._startClamp=L._endClamp=!1,L._dir=D,m*=45,L.scroller=k,L.scroll=C?C.time.bind(C):te,ie=te(),L.vars=t,n||=t.animation,`refreshPriority`in t&&(_sort=1,t.refreshPriority===-9999&&(_primary=L)),A.tweenScroll=A.tweenScroll||{top:_getTweenCreator(k,_vertical),left:_getTweenCreator(k,_horizontal)},L.tweenTo=ne=A.tweenScroll[D.p],L.scrubDuration=function(e){we=_isNumber(e)&&e,we?Ce?Ce.duration(e):Ce=gsap.to(n,{ease:`expo`,totalProgress:`+=0`,inherit:!1,duration:we,paused:!0,onComplete:function(){return g&&g(L)}}):(Ce&&Ce.progress(1).kill(),Ce=0)},n&&(n.vars.lazy=!1,n._initted&&!L.isReverted||n.vars.immediateRender!==!1&&t.immediateRender!==!1&&n.duration()&&n.render(0,!0,!0),L.animation=n.pause(),n.scrollTrigger=L,L.scrubDuration(l),xe=0,o||=n.vars.id),b&&((!_isObject(b)||b.push)&&(b={snapTo:b}),`scrollBehavior`in _body.style&&gsap.set(j?[_body,_docEl]:k,{scrollBehavior:`auto`}),_scrollers.forEach(function(e){return _isFunction(e)&&e.target===(j?_doc.scrollingElement||_docEl:k)&&(e.smooth=!1)}),re=_isFunction(b.snapTo)?b.snapTo:b.snapTo===`labels`?_getClosestLabel(n):b.snapTo===`labelsDirectional`?_getLabelAtDirection(n):b.directional===!1?gsap.utils.snap(b.snapTo):function(e,t){return _snapDirectional(b.snapTo)(e,_getTime()-ee<500?0:t.direction)},Te=b.duration||{min:.1,max:2},Te=_isObject(Te)?_clamp(Te.min,Te.max):_clamp(Te,Te),Ee=gsap.delayedCall(b.delay||we/2||.1,function(){var e=te(),t=_getTime()-ee<500,r=ne.tween;if((t||Math.abs(L.getVelocity())<10)&&!r&&!_pointerIsDown&&V!==e){var i=(e-W)/Y,a=n&&!O?n.totalProgress():i,o=t?0:(a-Se)/(_getTime()-_time2)*1e3||0,s=gsap.utils.clamp(-i,1-i,_abs(o/2)*o/.185),c=i+(b.inertia===!1?0:s),l,u,d=b,f=d.onStart,p=d.onInterrupt,m=d.onComplete;if(l=re(c,L),_isNumber(l)||(l=c),u=Math.max(0,Math.round(W+l*Y)),e<=oe&&e>=W&&u!==e){if(r&&!r._initted&&r.data<=_abs(u-e))return;b.inertia===!1&&(s=l-i),ne(u,{duration:Te(_abs(Math.max(_abs(c-a),_abs(l-a))*.185/o/.05||0)),ease:b.ease||`power3`,data:_abs(u-e),onInterrupt:function(){return Ee.restart(!0)&&p&&_callback(L,p)},onComplete:function(){L.update(),V=te(),n&&!O&&(Ce?Ce.resetTo(`totalProgress`,l,n._tTime/n._tDur):n.progress(l)),xe=Se=n&&!O?n.totalProgress():L.progress,_&&_(L),m&&_callback(L,m)}},e,s*Y,u-e-s*Y),f&&_callback(L,f,ne.tween)}}else L.isActive&&V!==e&&Ee.restart(!0)}).pause()),o&&(_ids[o]=L),u=L.trigger=_getTarget(u||d!==!0&&d),Ae=u&&u._gsap&&u._gsap.stRevert,Ae&&=Ae(L),d=d===!0?u:_getTarget(d),_isString(a)&&(a={targets:u,className:a}),d&&(f===!1||f===_margin||(f=!f&&d.parentNode&&d.parentNode.style&&_getComputedStyle(d.parentNode).display===`flex`?!1:_padding),L.pin=d,U=gsap.core.getCache(d),U.spacer?ue=U.pinState:(S&&(S=_getTarget(S),S&&!S.nodeType&&(S=S.current||S.nativeElement),U.spacerIsNative=!!S,S&&(U.spacerState=_getState(S))),U.spacer=Z=S||_doc.createElement(`div`),Z.classList.add(`pin-spacer`),o&&Z.classList.add(`pin-spacer-`+o),U.pinState=ue=_getState(d)),t.force3D!==!1&&gsap.set(d,{force3D:!0}),L.spacer=Z=U.spacer,be=_getComputedStyle(d),he=be[f+D.os2],fe=gsap.getProperty(d),$=gsap.quickSetter(d,D.a,_px),_swapPinIn(d,Z,be),de=_getState(d)),F){J=_isObject(F)?_setDefaults(F,_markerDefaults):_markerDefaults,se=_createMarker(`scroller-start`,o,k,D,J,0),ce=_createMarker(`scroller-end`,o,k,D,J,0,se),Q=se[`offset`+D.op.d2];var je=_getTarget(_getProxyProp(k,`content`)||k);K=this.markerStart=_createMarker(`start`,o,je,D,J,Q,0,C),q=this.markerEnd=_createMarker(`end`,o,je,D,J,Q,0,C),C&&(ke=gsap.quickSetter([K,q],D.a,_px)),!M&&!(_proxies.length&&_getProxyProp(k,`fixedMarkers`)===!0)&&(_makePositionable(j?_body:k),gsap.set([se,ce],{force3D:!0}),_e=gsap.quickSetter(se,D.a,_px),ye=gsap.quickSetter(ce,D.a,_px))}
vendor: 5,443 bytes, line 9
9if(C){var Me=C.vars.onUpdate,Ne=C.vars.onUpdateParams;C.eventCallback(`onUpdate`,function(){L.update(0,0,1),Me&&Me.apply(C,Ne||[])})}if(L.previous=function(){return _triggers[_triggers.indexOf(L)-1]},L.next=function(){return _triggers[_triggers.indexOf(L)+1]},L.revert=function(e,t){if(!t)return L.kill(!0);var r=e!==!1||!L.enabled,i=_refreshing;r!==L.isReverted&&(r&&(De=Math.max(te(),L.scroll.rec||0),H=L.progress,Oe=n&&n.progress()),K&&[K,q,se,ce].forEach(function(e){return e.style.display=r?`none`:`block`}),r&&(_refreshing=L,L.update(r)),d&&(!x||!L.isActive)&&(r?_swapPinOut(d,Z,ue):_swapPinIn(d,Z,_getComputedStyle(d),ge)),r||L.update(r),_refreshing=i,L.isReverted=r)},L.refresh=function(r,i,a,o){if(!((_refreshing||!L.enabled)&&!i)){if(d&&r&&_lastScrollTime){_addListener(e,`scrollEnd`,_softRefresh);return}!_refreshingAll&&R&&R(L),_refreshing=L,ne.tween&&!a&&(ne.tween.kill(),ne.tween=0),Ce&&Ce.pause(),p&&n&&(n.revert({kill:!1}).invalidate(),n.getChildren?n.getChildren(!0,!0,!1).forEach(function(e){return e.vars.immediateRender&&e.render(0,!0,!0)}):n.vars.immediateRender&&n.render(0,!0,!0)),L.isReverted||L.revert(!0,!0),L._subPinOffset=!1;var s=z(),l=B(),m=C?C.duration():_maxScroll(k,D),g=Y<=.01||!Y,_=0,y=o||0,b=_isObject(a)?a.end:t.end,S=t.endTrigger||u,T=_isObject(a)?a.start:t.start||(t.start===0||!u?0:d?`0 0`:`0 100%`),E=L.pinnedContainer=t.pinnedContainer&&_getTarget(t.pinnedContainer,L),A=u&&Math.max(0,_triggers.indexOf(L))||0,N=A,P,U,re,J,Q,$,he,_e,ye,be,xe,Se,we;for(F&&_isObject(a)&&(Se=gsap.getProperty(se,D.p),we=gsap.getProperty(ce,D.p));N-- >0;)$=_triggers[N],$.end||$.refresh(0,1)||(_refreshing=L),he=$.pin,he&&(he===u||he===d||he===E)&&!$.isReverted&&(be||=[],be.unshift($),$.revert(!0,!0)),$!==_triggers[N]&&(A--,N--);for(_isFunction(T)&&(T=T(L)),T=_parseClamp(T,`start`,L),W=_parsePosition(T,u,s,D,te(),K,se,L,l,I,M,m,C,L._startClamp&&`_startClamp`)||(d?-.001:0),_isFunction(b)&&(b=b(L)),_isString(b)&&!b.indexOf(`+=`)&&(~b.indexOf(` `)?b=(_isString(T)?T.split(` `)[0]:``)+b:(_=_offsetToPx(b.substr(2),s),b=_isString(T)?T:(C?gsap.utils.mapRange(0,C.duration(),C.scrollTrigger.start,C.scrollTrigger.end,W):W)+_,S=u)),b=_parseClamp(b,`end`,L),oe=Math.max(W,_parsePosition(b||(S?`100% 0`:m),S,s,D,te()+_,q,ce,L,l,I,M,m,C,L._endClamp&&`_endClamp`))||-.001,_=0,N=A;N--;)$=_triggers[N]||{},he=$.pin,he&&$.start-$._pinPush<=W&&!C&&$.end>0&&(P=$.end-(L._startClamp?Math.max(0,$.start):$.start),(he===u&&$.start-$._pinPush<W||he===E)&&isNaN(T)&&(_+=P*(1-$.progress)),he===d&&(y+=P));if(W+=_,oe+=_,L._startClamp&&(L._startClamp+=_),L._endClamp&&!_refreshingAll&&(L._endClamp=oe||-.001,oe=Math.min(oe,_maxScroll(k,D))),Y=oe-W||(W-=.01)&&.001,g&&(H=gsap.utils.clamp(0,1,gsap.utils.normalize(W,oe,De))),L._pinPush=y,K&&_&&(P={},P[D.a]=`+=`+_,E&&(P[D.p]=`-=`+te()),gsap.set([K,q],P)),d&&!(_clampingMax&&L.end>=_maxScroll(k,D)))P=_getComputedStyle(d),J=D===_vertical,re=te(),pe=parseFloat(fe(D.a))+y,!m&&oe>1&&(xe=(j?_doc.scrollingElement||_docEl:k).style,xe={style:xe,value:xe[`overflow`+D.a.toUpperCase()]},j&&_getComputedStyle(_body)[`overflow`+D.a.toUpperCase()]!==`scroll`&&(xe.style[`overflow`+D.a.toUpperCase()]=`scroll`)),_swapPinIn(d,Z,P),de=_getState(d),U=_getBounds(d,!0),_e=M&&_getScrollFunc(k,J?_horizontal:_vertical)(),f?(ge=[f+D.os2,Y+y+_px],ge.t=Z,N=f===_padding?_getSize(d,D)+Y+y:0,N&&(ge.push(D.d,N+_px),Z.style.flexBasis!==`auto`&&(Z.style.flexBasis=N+_px)),_setState(ge),E&&_triggers.forEach(function(e){e.pin===E&&e.vars.pinSpacing!==!1&&(e._subPinOffset=!0)}),M&&te(De)):(N=_getSize(d,D),N&&Z.style.flexBasis!==`auto`&&(Z.style.flexBasis=N+_px)),M&&(Q={top:U.top+(J?re-W:_e)+_px,left:U.left+(J?_e:re-W)+_px,boxSizing:`border-box`,position:`fixed`},Q[_width]=Q[`max`+_Width]=Math.ceil(U.width)+_px,Q[_height]=Q[`max`+_Height]=Math.ceil(U.height)+_px,Q[_margin]=Q[_margin+_Top]=Q[_margin+_Right]=Q[_margin+_Bottom]=Q[_margin+_Left]=`0`,Q[_padding]=P[_padding],Q[_padding+_Top]=P[_padding+_Top],Q[_padding+_Right]=P[_padding+_Right],Q[_padding+_Bottom]=P[_padding+_Bottom],Q[_padding+_Left]=P[_padding+_Left],X=_copyState(ue,Q,x),_refreshingAll&&te(0)),n?(ye=n._initted,_suppressOverwrites(1),n.render(n.duration(),!0,!0),me=fe(D.a)-pe+Y+y,ve=Math.abs(Y-me)>1,M&&ve&&X.splice(X.length-2,2),n.render(0,!0,!0),ye||n.invalidate(!0),n.parent||n.totalTime(n.totalTime()),_suppressOverwrites(0)):me=Y,xe&&(xe.value?xe.style[`overflow`+D.a.toUpperCase()]=xe.value:xe.style.removeProperty(`overflow-`+D.a));else if(u&&te()&&!C)for(U=u.parentNode;U&&U!==_body;)U._pinOffset&&(W-=U._pinOffset,oe-=U._pinOffset),U=U.parentNode;be&&be.forEach(function(e){return e.revert(!1,!0)}),L.start=W,L.end=oe,ie=ae=_refreshingAll?De:te(),!C&&!_refreshingAll&&(ie<De&&te(De),L.scroll.rec=0),L.revert(!1,!0),ee=_getTime(),Ee&&(V=-1,Ee.restart(!0)),_refreshing=0,n&&O&&(n._initted||Oe)&&n.progress()!==Oe&&n.progress(Oe||0,!0).render(n.time(),!0,!0),(g||H!==L.progress||C||p||n&&!n._initted)&&(n&&!O&&(n._initted||H||n.vars.immediateRender!==!1)&&n.totalProgress(C&&W<-.001&&!H?gsap.utils.normalize(W,oe,0):H,!0),L.progress=g||(ie-W)/Y===H?0:H),d&&f&&(Z._pinOffset=Math.round(L.progress*me)),Ce&&Ce.invalidate(),isNaN(Se)||(Se-=gsap.getProperty(se,D.p),we-=gsap.getProperty(ce,D.p),_shiftMarker(se,D,Se),_shiftMarker(K,D,Se-(o||0)),_shiftMarker(ce,D,we),_shiftMarker(q,D,we-(o||0))),g&&!_refreshingAll&&L.update(),c&&!_refreshingAll&&!le&&(le=!0,c(L),le=!1)}},L.getVelocity=function(){return(te()-ae)/(_getTime()-_time2)*1e3||0}
vendor: 4,113 bytes, line 9
9,L.endAnimation=function(){_endAnimation(L.callbackAnimation),n&&(Ce?Ce.progress(1):n.paused()?O||_endAnimation(n,L.direction<0,1):_endAnimation(n,n.reversed()))},L.labelToScroll=function(e){return n&&n.labels&&(W||L.refresh()||W)+n.labels[e]/n.duration()*Y||0},L.getTrailing=function(e){var t=_triggers.indexOf(L),n=L.direction>0?_triggers.slice(0,t).reverse():_triggers.slice(t+1);return(_isString(e)?n.filter(function(t){return t.vars.preventOverlaps===e}):n).filter(function(e){return L.direction>0?e.end<=W:e.start>=oe})},L.update=function(e,t,r){if(!(C&&!r&&!e)){var o=_refreshingAll===!0?De:L.scroll(),c=e?0:(o-W)/Y,u=c<0?0:c>1?1:c||0,p=L.progress,g,_,S,A,j,F,I,R;if(t&&(ae=ie,ie=C?te():o,b&&(Se=xe,xe=n&&!O?n.totalProgress():u)),m&&d&&!_refreshing&&!_startup&&_lastScrollTime&&(!u&&W<o+(o-ae)/(_getTime()-_time2)*m?u=1e-4:u===1&&oe>o+(o-ae)/(_getTime()-_time2)*m&&(u=.9999)),u!==p&&L.enabled){if(g=L.isActive=!!u&&u<1,_=!!p&&p<1,F=g!==_,j=F||!!u!=!!p,L.direction=u>p?1:-1,L.progress=u,j&&!_refreshing&&(S=u&&!p?0:u===1?1:p===1?2:3,O&&(A=!F&&P[S+1]!==`none`&&P[S+1]||P[S],R=n&&(A===`complete`||A===`reset`||A in n))),E&&(F||R)&&(R||l||!n)&&(_isFunction(E)?E(L):L.getTrailing(E).forEach(function(e){return e.endAnimation()})),O||(Ce&&!_refreshing&&!_startup?(Ce._dp._time-Ce._start!==Ce._time&&Ce.render(Ce._dp._time-Ce._start),Ce.resetTo?Ce.resetTo(`totalProgress`,u,n._tTime/n._tDur):(Ce.vars.totalProgress=u,Ce.invalidate().restart())):n&&n.totalProgress(u,!!(_refreshing&&(ee||e)))),d){if(e&&f&&(Z.style[f+D.os2]=he),!M)$(_round(pe+me*u));else if(j){if(I=!e&&u>p&&oe+1>o&&o+1>=_maxScroll(k,D),x)if(!e&&(g||I)){var z=_getBounds(d,!0),B=o-W;_reparent(d,_body,z.top+(D===_vertical?B:0)+_px,z.left+(D===_vertical?0:B)+_px)}else _reparent(d,Z);_setState(g||I?X:de),ve&&u<1&&g||$(pe+(u===1&&!I?me:0))}}b&&!ne.tween&&!_refreshing&&!_startup&&Ee.restart(!0),a&&(F||y&&u&&(u<1||!_limitCallbacks))&&_toArray(a.targets).forEach(function(e){return e.classList[g||y?`add`:`remove`](a.className)}),i&&!O&&!e&&i(L),j&&!_refreshing?(O&&(R&&(A===`complete`?n.pause().totalProgress(1):A===`reset`?n.restart(!0).pause():A===`restart`?n.restart(!0):n[A]()),i&&i(L)),(F||!_limitCallbacks)&&(s&&F&&_callback(L,s),N[S]&&_callback(L,N[S]),y&&(u===1?L.kill(!1,1):N[S]=0),F||(S=u===1?1:3,N[S]&&_callback(L,N[S]))),T&&!g&&Math.abs(L.getVelocity())>(_isNumber(T)?T:2500)&&(_endAnimation(L.callbackAnimation),Ce?Ce.progress(1):_endAnimation(n,A===`reverse`?1:!u,1))):O&&i&&!_refreshing&&i(L)}if(ye){var V=C?o/C.duration()*(C._caScrollDist||0):o;_e(V+ +!!se._isFlipped),ye(V)}ke&&ke(-o/C.duration()*(C._caScrollDist||0))}},L.enable=function(t,n){L.enabled||(L.enabled=!0,_addListener(k,`resize`,_onResize),j||_addListener(k,`scroll`,_onScroll),R&&_addListener(e,`refreshInit`,R),t!==!1&&(L.progress=H=0,ie=ae=V=te()),n!==!1&&L.refresh())},L.getTween=function(e){return e&&ne?ne.tween:Ce},L.setPositions=function(e,t,n,r){if(C){var i=C.scrollTrigger,a=C.duration(),o=i.end-i.start;e=i.start+o*e/a,t=i.start+o*t/a}L.refresh(!1,!1,{start:_keepClamp(e,n&&!!L._startClamp),end:_keepClamp(t,n&&!!L._endClamp)},r),L.update()},L.adjustPinSpacing=function(e){if(ge&&e){var t=ge.indexOf(D.d)+1;ge[t]=parseFloat(ge[t])+e+_px,ge[1]=parseFloat(ge[1])+e+_px,_setState(ge)}},L.disable=function(t,n){if(t!==!1&&L.revert(!0,!0),L.enabled&&(L.enabled=L.isActive=!1,n||Ce&&Ce.pause(),De=0,U&&(U.uncache=1),R&&_removeListener(e,`refreshInit`,R),Ee&&(Ee.pause(),ne.tween&&ne.tween.kill()&&(ne.tween=0)),!j)){for(var r=_triggers.length;r--;)if(_triggers[r].scroller===k&&_triggers[r]!==L)return;_removeListener(k,`resize`,_onResize),j||_removeListener(k,`scroll`,_onScroll)}},L.kill=function(e,r){L.disable(e,r),Ce&&!r&&Ce.kill(),o&&delete _ids[o];var i=_triggers.indexOf(L);i>=0&&_triggers.splice(i,1),i===_i&&_direction>0&&_i--,i=0,_triggers.forEach(function(e){return e.scroller===L.scroller&&(i=1)}),i||_refreshingAll||(L.scroll.rec=0),n&&(n.scrollTrigger=null,e&&n.revert({kill:!1}),r||n.kill()),K&&[K,q,se,ce].forEach(function(e){return e.parentNode&&e.parentNode.removeChild(e)}),_primary===L&&(_primary=0),d&&(U&&(U.uncache=1),i=0,_triggers.forEac
9h(function(e){return e.pin===d&&i++}),i||(U.spacer=0)),t.onKill&&t.onKill(L)},_triggers.push(L),L.enable(!1,!1),Ae&&Ae(L),n&&n.add&&!Y){var Pe=L.update;L.update=function(){L.update=Pe,_scrollers.cache++,W||oe||L.refresh()},gsap.delayedCall(.01,L.update),Y=.01,W=oe=0}else L.refresh();d&&_queueRefreshAll()},e.register=function(t){return _coreInitted||=(gsap=t||_getGSAP(),_windowExists()&&window.document&&e.enable(),_enabled),_coreInitted},e.defaults=function(e){if(e)for(var t in e)_defaults[t]=e[t];return _defaults},e.disable=function(e,t){_enabled=0,_triggers.forEach(function(n){return n[t?`kill`:`disable`](e)}),_removeListener(_win,`wheel`,_onScroll),_removeListener(_doc,`scroll`,_onScroll),clearInterval(_syncInterval),_removeListener(_doc,`touchcancel`,_passThrough),_removeListener(_body,`touchstart`,_passThrough),_multiListener(_removeListener,_doc,`pointerdown,touchstart,mousedown`,_pointerDownHandler),_multiListener(_removeListener,_doc,`pointerup,touchend,mouseup`,_pointerUpHandler),_resizeDelay.kill(),_iterateAutoRefresh(_removeListener);for(var n=0;n<_scrollers.length;n+=3)_wheelListener(_removeListener,_scrollers[n],_scrollers[n+1]),_wheelListener(_removeListener,_scrollers[n],_scrollers[n+2])},e.enable=function(){if(_win=window,_doc=document,_docEl=_doc.documentElement,_body=_doc.body,gsap)if(_toArray=gsap.utils.toArray,_clamp=gsap.utils.clamp,_context=gsap.core.context||_passThrough,_suppressOverwrites=gsap.core.suppressOverwrites||_passThrough,_scrollRestoration=_win.history.scrollRestoration||`auto`,_lastScroll=_win.pageYOffset||0,gsap.core.globals(`ScrollTrigger`,e),_body){_enabled=1,_div100vh=document.createElement(`div`),_div100vh.style.height=`100vh`,_div100vh.style.position=`absolute`,_refresh100vh(),_rafBugFix(),Observer.register(gsap),e.isTouch=Observer.isTouch,_fixIOSBug=Observer.isTouch&&/(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent),_ignoreMobileResize=Observer.isTouch===1,_addListener(_win,`wheel`,_onScroll),_root=[_win,_doc,_docEl,_body],gsap.matchMedia?(e.matchMedia=function(e){var t=gsap.matchMedia(),n;for(n in e)t.add(n,e[n]);return t},gsap.addEventListener(`matchMediaInit`,function(){_recordScrollPositions(),_revertAll()}),gsap.addEventListener(`matchMediaRevert`,function(){return _revertRecorded()}),gsap.addEventListener(`matchMedia`,function(){_refreshAll(0,1),_dispatch(`matchMedia`)}),gsap.matchMedia().add(`(orientation: portrait)`,function(){return _setBaseDimensions(),_setBaseDimensions})):console.warn(`Requires GSAP 3.11.0 or later`),_setBaseDimensions(),_addListener(_doc,`scroll`,_onScroll);var t=_body.hasAttribute(`style`),n=_body.style,r=n.borderTopStyle,i=gsap.core.Animation.prototype,a,o;for(i.revert||Object.defineProperty(i,"revert",{value:function(){return this.time(-.01,!0)}}),n.borderTopStyle=`solid`,a=_getBounds(_body),_vertical.m=Math.round(a.top+_vertical.sc())||0,_horizontal.m=Math.round(a.left+_horizontal.sc())||0,r?n.borderTopStyle=r:n.removeProperty(`border-top-style`),t||(_body.setAttribute(`style`,``),_body.removeAttribute(`style`)),_syncInterval=setInterval(_sync,250),gsap.delayedCall(.5,function(){return _startup=0}),_addListener(_doc,`touchcancel`,_passThrough),_addListener(_body,`touchstart`,_passThrough),_multiListener(_addListener,_doc,`pointerdown,touchstart,mousedown`,_pointerDownHandler),_multiListener(_addListener,_doc,`pointerup,touchend,mouseup`,_pointerUpHandler),_transformProp=gsap.utils.checkPrefix(`transform`),_stateProps.push(_transformProp),_coreInitted=_getTime(),_resizeDelay=gsap.delayedCall(.2,_refreshAll).pause(),_autoRefresh=[_doc,`visibilitychange`,function(){var e=_win.innerWidth,t=_win.innerHeight;_doc.hidden?(_prevWidth=e,_prevHeight=t):(_prevWidth!==e||_prevHeight!==t)&&_onResize()},_doc,`DOMContentLoaded`,_refreshAll,_win,`load`,_refreshAll,_win,`resize`,_onResize],_iterateAutoRefresh(_addListener),_triggers.forEach(function(e){return e.enable(0,1)}),o=0;o<_scrollers.length;o+=3)_wheelListener(_removeListener,_scrollers[o],_scrollers[o+1]),_wheelListener(_removeListener,_scrollers[o],_scrollers[o+2])}else _doc&&_doc.addEventListener(`DOMContentLoaded`,function t(){e.enable(),_doc.removeEventListener(`DOMContentLoaded`,t)})},e.config=function(t){`limitCallbacks`in t&&(_limitCallbacks=!!t.limitCallbacks);var n=t.syncInterval;n&&clearInterval(_syncInterval)||(_syncInterval=n)&&setInterval(_sync,n),`ignoreMobileResize`in t&&(_ignoreMobileResize=e.isTouch===1&&t.ignoreMobileResize),`autoRefreshEvents`in t&&(_iterateAutoRefresh(_removeListener)||_iterateAutoRefresh(_addListener,t.autoRefreshEvents||`none`),_ignoreResize=(t.autoRefreshEvents+``).indexOf(`resize`)===-1)},e.scrollerProxy=function(e,t){var n=_getTarget(e),r=_scrollers.indexOf(n),i=_isViewport(n);~r&&_scrollers.splice(r,i?6:2),t&&(i?_proxies.unshift(_win,t,_body,t,_docEl,t):_proxies.unshift(n,t))}
vendor: 4,716 bytes, line 9
9,e.clearMatchMedia=function(e){_triggers.forEach(function(t){return t._ctx&&t._ctx.query===e&&t._ctx.kill(!0,!0)})},e.isInViewport=function(e,t,n){var r=(_isString(e)?_getTarget(e):e).getBoundingClientRect(),i=r[n?_width:_height]*t||0;return n?r.right-i>0&&r.left+i<_win.innerWidth:r.bottom-i>0&&r.top+i<_win.innerHeight},e.positionInViewport=function(e,t,n){_isString(e)&&(e=_getTarget(e));var r=e.getBoundingClientRect(),i=r[n?_width:_height],a=t==null?i/2:t in _keywords?_keywords[t]*i:~t.indexOf(`%`)?parseFloat(t)*i/100:parseFloat(t)||0;return n?(r.left+a)/_win.innerWidth:(r.top+a)/_win.innerHeight},e.killAll=function(e){if(_triggers.slice(0).forEach(function(e){return e.vars.id!==`ScrollSmoother`&&e.kill()}),e!==!0){var t=_listeners.killAll||[];_listeners={},t.forEach(function(e){return e()})}},e}();ScrollTrigger.version=`3.15.0`,ScrollTrigger.saveStyles=function(e){return e?_toArray(e).forEach(function(e){if(e&&e.style){var t=_savedStyles.indexOf(e);t>=0&&_savedStyles.splice(t,5),_savedStyles.push(e,e.style.cssText,e.getBBox&&e.getAttribute(`transform`),gsap.core.getCache(e),_context())}}):_savedStyles},ScrollTrigger.revert=function(e,t){return _revertAll(!e,t)},ScrollTrigger.create=function(e,t){return new ScrollTrigger(e,t)},ScrollTrigger.refresh=function(e){return e?_onResize(!0):(_coreInitted||ScrollTrigger.register())&&_refreshAll(!0)},ScrollTrigger.update=function(e){return++_scrollers.cache&&_updateAll(e===!0?2:0)},ScrollTrigger.clearScrollMemory=_clearScrollMemory,ScrollTrigger.maxScroll=function(e,t){return _maxScroll(e,t?_horizontal:_vertical)},ScrollTrigger.getScrollFunc=function(e,t){return _getScrollFunc(_getTarget(e),t?_horizontal:_vertical)},ScrollTrigger.getById=function(e){return _ids[e]},ScrollTrigger.getAll=function(){return _triggers.filter(function(e){return e.vars.id!==`ScrollSmoother`})},ScrollTrigger.isScrolling=function(){return!!_lastScrollTime},ScrollTrigger.snapDirectional=_snapDirectional,ScrollTrigger.addEventListener=function(e,t){var n=_listeners[e]||(_listeners[e]=[]);~n.indexOf(t)||n.push(t)},ScrollTrigger.removeEventListener=function(e,t){var n=_listeners[e],r=n&&n.indexOf(t);r>=0&&n.splice(r,1)},ScrollTrigger.batch=function(e,t){var n=[],r={},i=t.interval||.016,a=t.batchMax||1e9,o=function(e,t){var n=[],r=[],o=gsap.delayedCall(i,function(){t(n,r),n=[],r=[]}).pause();return function(e){n.length||o.restart(!0),n.push(e.trigger),r.push(e),a<=n.length&&o.progress(1)}},s;for(s in t)r[s]=s.substr(0,2)===`on`&&_isFunction(t[s])&&s!==`onRefreshInit`?o(s,t[s]):t[s];return _isFunction(a)&&(a=a(),_addListener(ScrollTrigger,`refresh`,function(){return a=t.batchMax()})),_toArray(e).forEach(function(e){var t={};for(s in r)t[s]=r[s];t.trigger=e,n.push(ScrollTrigger.create(t))}),n};var _clampScrollAndGetDurationMultiplier=function(e,t,n,r){return t>r?e(r):t<0&&e(0),n>r?(r-t)/(n-t):n<0?t/(t-n):1},_allowNativePanning=function e(t,n){n===!0?t.style.removeProperty(`touch-action`):t.style.touchAction=n===!0?`auto`:n?`pan-`+n+(Observer.isTouch?` pinch-zoom`:``):`none`,t===_docEl&&e(_body,n)},_overflow={auto:1,scroll:1},_nestedScroll=function(e){var t=e.event,n=e.target,r=e.axis,i=(t.changedTouches?t.changedTouches[0]:t).target,a=i._gsap||gsap.core.getCache(i),o=_getTime(),s;if(!a._isScrollT||o-a._isScrollT>2e3){for(;i&&i!==_body&&(i.scrollHeight<=i.clientHeight&&i.scrollWidth<=i.clientWidth||!(_overflow[(s=_getComputedStyle(i)).overflowY]||_overflow[s.overflowX]));)i=i.parentNode;a._isScroll=i&&i!==n&&!_isViewport(i)&&(_overflow[(s=_getComputedStyle(i)).overflowY]||_overflow[s.overflowX]),a._isScrollT=o}(a._isScroll||r===`x`)&&(t.stopPropagation(),t._gsapAllow=!0)},_inputObserver=function(e,t,n,r){return Observer.create({target:e,capture:!0,debounce:!1,lockAxis:!0,type:t,onWheel:r&&=_nestedScroll,onPress:r,onDrag:r,onScroll:r,onEnable:function(){return n&&_addListener(_doc,Observer.eventTypes[0],_captureInputs,!1,!0)},onDisable:function(){return _removeListener(_doc,Observer.eventTypes[0],_captureInputs,!0)}})},_inputExp=/(input|label|select|textarea)/i,_inputIsFocused,_captureInputs=function(e){var t=_inputExp.test(e.target.tagName);(t||_inputIsFocused)&&(e._gsapAllow=!0,_inputIsFocused=t)},_getScrollNormalizer=function(e){_isObject(e)||(e={}),e.preventDefault=e.isNormalizer=e.allowClicks=!0,e.type||=`wheel,touch`,e.debounce=!!e.debounce,e.id=e.id||`normalizer`;var t=e,n=t.normalizeScrollX,r=t.momentum,i=t.allowNestedScroll,a=t.onRelease,o,s,c=_getTarget(e.target)||_docEl,l=gsap.core.globals().ScrollSmoother,u=l&&l.get(),d=_fixIOSBug&&(e.content&&_getTarget(e.content)||u&&e.content!==!1&&!u.smooth()&&u.content()),f=_getScrollFunc(c,_vertical),p=_getScrollFunc(c,_horizontal),m=1,g=(Observer.isTouch&&_win.visualVie
9wport?_win.visualViewport.scale*_win.visualViewport.width:_win.outerWidth)/_win.innerWidth,_=0,y=_isFunction(r)?function(){return r(o)}:function(){return r||2.8},b,x,S=_inputObserver(c,e.type,!0,i),C=function(){return x=!1},T=_passThrough,E=_passThrough,D=function(){s=_maxScroll(c,_vertical),E=_clamp(+!!_fixIOSBug,s),n&&(T=_clamp(0,_maxScroll(c,_horizontal))),b=_refreshID},O=function(){d._gsap.y=_round(parseFloat(d._gsap.y)+f.offset)+`px`,d.style.transform=`matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, `+parseFloat(d._gsap.y)+`, 0, 1)`,f.offset=f.cacheID=0},k=function(){if(x){requestAnimationFrame(C);var e=_round(o.deltaY/2),t=E(f.v-e);if(d&&t!==f.v+f.offset){f.offset=t-f.v;var n=_round((parseFloat(d&&d._gsap.y)||0)-f.offset);d.style.transform=`matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, `+n+`, 0, 1)`,d._gsap.y=n+`px`,f.cacheID=_scrollers.cache,_updateAll()}return!0}f.offset&&O(),x=!0},A,j,M,N,P=function(){D(),A.isActive()&&A.vars.scrollY>s&&(f()>s?A.progress(1)&&f(s):A.resetTo(`scrollY`,s))};return d&&gsap.set(d,{y:`+=0`}),e.ignoreCheck=function(e){return _fixIOSBug&&e.type===`touchmove`&&k(e)||m>1.05&&e.type!==`touchstart`||o.isGesturing||e.touches&&e.touches.length>1},e.onPress=function(){x=!1;var e=m;m=_round((_win.visualViewport&&_win.visualViewport.scale||1)/g),A.pause(),e!==m&&_allowNativePanning(c,m>1.01?!0:n?!1:`x`),j=p(),M=f(),D(),b=_refreshID},e.onRelease=e.onGestureStart=function(e,t){if(f.offset&&O(),!t)N.restart(!0);else{_scrollers.cache++;var r=y(),i,o;n&&(i=p(),o=i+r*.05*-e.velocityX/.227,r*=_clampScrollAndGetDurationMultiplier(p,i,o,_maxScroll(c,_horizontal)),A.vars.scrollX=T(o)),i=f(),o=i+r*.05*-e.velocityY/.227,r*=_clampScrollAndGetDurationMultiplier(f,i,o,_maxScroll(c,_vertical)),A.vars.scrollY=E(o),A.invalidate().duration(r).play(.01),(_fixIOSBug&&A.vars.scrollY>=s||i>=s-1)&&gsap.to({},{onUpdate:P,duration:r})}a&&a(e)},e.onWheel=function(){A._ts&&A.pause(),_getTime()-_>1e3&&(b=0,_=_getTime())},e.onChange=function(e,t,r,i,a){if(_refreshID!==b&&D(),t&&n&&p(T(i[2]===t?j+(e.startX-e.x):p()+t-i[1])),r){f.offset&&O();var o=a[2]===r,s=o?M+e.startY-e.y:f()+r-a[1],c=E(s);o&&s!==c&&(M+=c-s),f(c)}(r||t)&&_updateAll()},e.onEnable=function(){_allowNativePanning(c,n?!1:`x`),ScrollTrigger.addEventListener(`refresh`,P),_addListener(_win,`resize`,P),f.smooth&&=(f.target.style.scrollBehavior=`auto`,p.smooth=!1),S.enable()},e.onDisable=function(){_allowNativePanning(c,!0),_removeListener(_win,`resize`,P),ScrollTrigger.removeEventListener(`refresh`,P),S.kill()},e.lockAxis=e.lockAxis!==!1,o=new Observer(e),o.iOS=_fixIOSBug,_fixIOSBug&&!f()&&f(1),_fixIOSBug&&gsap.ticker.add(_passThrough),N=o._dc,A=gsap.to(o,{ease:`power4`,paused:!0,inherit:!1,scrollX:n?`+=0.1`:`+=0`,scrollY:`+=0.1`,modifiers:{scrollY:_interruptionTracker(f,f(),function(){return A.pause()})},onUpdate:_updateAll,onComplete:N.vars.onComplete}),o};ScrollTrigger.sort=function(e){if(_isFunction(e))return _triggers.sort(e);var t=_win.pageYOffset||0;return ScrollTrigger.getAll().forEach(function(e){return e._sortY=e.trigger?t+e.trigger.getBoundingClientRect().top:e.start+_win.innerHeight}),_triggers.sort(e||function(e,t){return(e.vars.refreshPriority||0)*-1e6+(e.vars.containerAnimation?1e6:e._sortY)-((t.vars.containerAnimation?1e6:t._sortY)+(t.vars.refreshPriority||0)*-1e6)})},ScrollTrigger.observe=function(e){return new Observer(e)},ScrollTrigger.normalizeScroll=function(e){if(e===void 0)return _normalizer;if(e===!0&&_normalizer)return _normalizer.enable();if(e===!1){_normalizer&&_normalizer.kill(),_normalizer=e;return}var t=e instanceof Observer?e:_getScrollNormalizer(e);return _normalizer&&_normalizer.target===t.target&&_normalizer.kill(),_isViewport(t.target)&&(_normalizer=t),t},ScrollTrigger.core={_getVelocityProp,_inputObserver,_scrollers,_proxies,bridge:{ss:function(){_lastScrollTime||_dispatch(`scrollStart`),_lastScrollTime=_getTime()},ref:function(){return _refreshing}}},_getGSAP()&&gsap.registerPlugin(ScrollTrigger);var require_lottie=__commonJSMin(((exports,module)=>{typeof document<`u`&&typeof navigator<`u`&&(function(e,t){typeof exports==`object`&&module!==void 0?module.exports=t():typeof define==`function`&&define.amd?define(t):(e=typeof globalThis<`u`?globalThis:e||self,e.lottie=t())})(exports,(function(){var svgNS=`http://www.w3.org/2000/svg`,locationHref=``,_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(e){_useWebWorker=!!e},getWebWorker=function(){return _useWebWorker},setLocationHref=function(e){locationHref=e},getLocationHref=function(){return locationHref};function createTag(e){return document.createElement(e)}function extendPrototype(e,t){var n,r=e.length,i;for(n=0;n<r;
9n+=1)for(var a in i=e[n].prototype,i)Object.prototype.hasOwnProperty.call(i,a)&&(t.prototype[a]=i[a])}function getDescriptor(e,t){return Object.getOwnPropertyDescriptor(e,t)}function createProxyFunction(e){function t(){}return t.prototype=e,t}var audioControllerFactory=function(){function e(e){this.audios=[],this.audioFactory=e,this._volume=1,this._isMuted=!1}return e.prototype={addAudio:function(e){this.audios.push(e)},pause:function(){var e,t=this.audios.length;for(e=0;e<t;e+=1)this.audios[e].pause()},resume:function(){var e,t=this.audios.length;for(e=0;e<t;e+=1)this.audios[e].resume()},setRate:function(e){var t,n=this.audios.length;for(t=0;t<n;t+=1)this.audios[t].setRate(e)},createAudio:function(e){return this.audioFactory?this.audioFactory(e):window.Howl?new window.Howl({src:[e]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(e){this.audioFactory=e},setVolume:function(e){this._volume=e,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var e,t=this.audios.length;for(e=0;e<t;e+=1)this.audios[e].volume(this._volume*+!this._isMuted)}},function(){return new e}}(),createTypedArray=function(){function e(e,t){var n=0,r=[],i;switch(e){case`int16`:case`uint8c`:i=1;break;default:i=1.1;break}for(n=0;n<t;n+=1)r.push(i);return r}function t(t,n){return t===`float32`?new Float32Array(n):t===`int16`?new Int16Array(n):t===`uint8c`?new Uint8ClampedArray(n):e(t,n)}return typeof Uint8ClampedArray==`function`&&typeof Float32Array==`function`?t:e}();function createSizedArray(e){return Array.apply(null,{length:e})}function _typeof$6(e){"@babel/helpers - typeof";return _typeof$6=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},_typeof$6(e)}var subframeEnabled=!0,expressionsPlugin=null,expressionsInterfaces=null,idPrefix$1=``,isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),_shouldRoundValues=!1,bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};(function(){var e=`abs.acos.acosh.asin.asinh.atan.atanh.atan2.ceil.cbrt.expm1.clz32.cos.cosh.exp.floor.fround.hypot.imul.log.log1p.log2.log10.max.min.pow.random.round.sign.sin.sinh.sqrt.tan.tanh.trunc.E.LN10.LN2.LOG10E.LOG2E.PI.SQRT1_2.SQRT2`.split(`.`),t,n=e.length;for(t=0;t<n;t+=1)BMMath[e[t]]=Math[e[t]]})();function ProjectInterface$1(){return{}}BMMath.random=Math.random,BMMath.abs=function(e){if(_typeof$6(e)===`object`&&e.length){var t=createSizedArray(e.length),n,r=e.length;for(n=0;n<r;n+=1)t[n]=Math.abs(e[n]);return t}return Math.abs(e)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function roundValues(e){_shouldRoundValues=!!e}function bmRnd(e){return _shouldRoundValues?Math.round(e):e}function styleDiv(e){e.style.position=`absolute`,e.style.top=0,e.style.left=0,e.style.display=`block`,e.style.transformOrigin=`0 0`,e.style.webkitTransformOrigin=`0 0`,e.style.backfaceVisibility=`visible`,e.style.webkitBackfaceVisibility=`visible`,e.style.transformStyle=`preserve-3d`,e.style.webkitTransformStyle=`preserve-3d`,e.style.mozTransformStyle=`preserve-3d`}function BMEnterFrameEvent(e,t,n,r){this.type=e,this.currentTime=t,this.totalTime=n,this.direction=r<0?-1:1}function BMCompleteEvent(e,t){this.type=e,this.direction=t<0?-1:1}function BMCompleteLoopEvent(e,t,n,r){this.type=e,this.currentLoop=n,this.totalLoops=t,this.direction=r<0?-1:1}function BMSegmentStartEvent(e,t,n){this.type=e,this.firstFrame=t,this.totalFrames=n}function BMDestroyEvent(e,t){this.type=e,this.target=t}function BMRenderFrameErrorEvent(e,t){this.type=`renderFrameError`,this.nativeError=e,this.currentTime=t}function BMConfigErrorEvent(e){this.type=`configError`,this.nativeError=e}function BMAnimationConfigErrorEvent(e,t){this.type=e,this.nativeError=t}var createElementID=function(){var e=0;return function(){return e+=1,idPrefix$1+`__lottie_element_`+e}}();function HSVtoRGB(e,t,n){var r,i,a,o=Math.floor(e*6),s=e*6-o,c=n*(1-t),l=n*(1-s*t),u=n*(1-(1-s)*t);switch(o%6){case 0:r=n,i=u,a=c;break;case 1:r=l,i=n,a=c;break;case 2:r=c,i=n,a=u;break;case 3:r=c,i=l,a=n;break;case 4:r=u,i=c,a=n;break;case 5:r=n,i=c,a=l;break;default:break}return[r,i,a]}
vendor: 60,005 bytes, lines 9-10
9function RGBtoHSV(e,t,n){var r=Math.max(e,t,n),i=Math.min(e,t,n),a=r-i,o,s=r===0?0:a/r,c=r/255;switch(r){case i:o=0;break;case e:o=t-n+a*(t<n?6:0),o/=6*a;break;case t:o=n-e+a*2,o/=6*a;break;case n:o=e-t+a*4,o/=6*a;break;default:break}return[o,s,c]}function addSaturationToRGB(e,t){var n=RGBtoHSV(e[0]*255,e[1]*255,e[2]*255);return n[1]+=t,n[1]>1?n[1]=1:n[1]<=0&&(n[1]=0),HSVtoRGB(n[0],n[1],n[2])}function addBrightnessToRGB(e,t){var n=RGBtoHSV(e[0]*255,e[1]*255,e[2]*255);return n[2]+=t,n[2]>1?n[2]=1:n[2]<0&&(n[2]=0),HSVtoRGB(n[0],n[1],n[2])}function addHueToRGB(e,t){var n=RGBtoHSV(e[0]*255,e[1]*255,e[2]*255);return n[0]+=t/360,n[0]>1?--n[0]:n[0]<0&&(n[0]+=1),HSVtoRGB(n[0],n[1],n[2])}var rgbToHex=function(){var e=[],t,n;for(t=0;t<256;t+=1)n=t.toString(16),e[t]=n.length===1?`0`+n:n;return function(t,n,r){return t<0&&(t=0),n<0&&(n=0),r<0&&(r=0),`#`+e[t]+e[n]+e[r]}}(),setSubframeEnabled=function(e){subframeEnabled=!!e},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(e){expressionsPlugin=e},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(e){expressionsInterfaces=e},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(e){defaultCurveSegments=e},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(e){idPrefix$1=e},getIdPrefix=function(){return idPrefix$1};function createNS(e){return document.createElementNS(svgNS,e)}function _typeof$5(e){"@babel/helpers - typeof";return _typeof$5=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},_typeof$5(e)}var dataManager=function(){var e=1,t=[],n,r,i={onmessage:function(){},postMessage:function(e){n({data:e})}},a={postMessage:function(e){i.onmessage({data:e})}};function o(e){if(window.Worker&&window.Blob&&getWebWorker()){var t=new Blob([`var _workerSelf = self; self.onmessage = `,e.toString()],{type:`text/javascript`}),r=URL.createObjectURL(t);return new Worker(r)}return n=e,i}function s(){r||(r=o(function(e){function t(){function e(t,n){var o,s,c=t.length,l,u,d,f;for(s=0;s<c;s+=1)if(o=t[s],`ks`in o&&!o.completed){if(o.completed=!0,o.hasMask){var m=o.masksProperties;for(u=m.length,l=0;l<u;l+=1)if(m[l].pt.k.i)a(m[l].pt.k);else for(f=m[l].pt.k.length,d=0;d<f;d+=1)m[l].pt.k[d].s&&a(m[l].pt.k[d].s[0]),m[l].pt.k[d].e&&a(m[l].pt.k[d].e[0])}o.ty===0?(o.layers=r(o.refId,n),e(o.layers,n)):o.ty===4?i(o.shapes):o.ty===5&&p(o)}}function t(t,n){if(t){var i=0,a=t.length;for(i=0;i<a;i+=1)t[i].t===1&&(t[i].data.layers=r(t[i].data.refId,n),e(t[i].data.layers,n))}}function n(e,t){for(var n=0,r=t.length;n<r;){if(t[n].id===e)return t[n];n+=1}return null}function r(e,t){var r=n(e,t);return r?r.layers.__used?JSON.parse(JSON.stringify(r.layers)):(r.layers.__used=!0,r.layers):null}function i(e){var t,n=e.length,r,o;for(t=n-1;t>=0;--t)if(e[t].ty===`sh`)if(e[t].ks.k.i)a(e[t].ks.k);else for(o=e[t].ks.k.length,r=0;r<o;r+=1)e[t].ks.k[r].s&&a(e[t].ks.k[r].s[0]),e[t].ks.k[r].e&&a(e[t].ks.k[r].e[0]);else e[t].ty===`gr`&&i(e[t].it)}function a(e){var t,n=e.i.length;for(t=0;t<n;t+=1)e.i[t][0]+=e.v[t][0],e.i[t][1]+=e.v[t][1],e.o[t][0]+=e.v[t][0],e.o[t][1]+=e.v[t][1]}function o(e,t){var n=t?t.split(`.`):[100,100,100];return e[0]>n[0]?!0:n[0]>e[0]?!1:e[1]>n[1]?!0:n[1]>e[1]?!1:e[2]>n[2]?!0:n[2]>e[2]?!1:null}var s=function(){var e=[4,4,14];function t(e){var t=e.t.d;e.t.d={k:[{s:t,t:0}]}}function n(e){var n,r=e.length;for(n=0;n<r;n+=1)e[n].ty===5&&t(e[n])}return function(t){if(o(e,t.v)&&(n(t.layers),t.assets)){var r,i=t.assets.length;for(r=0;r<i;r+=1)t.assets[r].layers&&n(t.assets[r].layers)}}}(),c=function(){var e=[4,7,99];return function(t){if(t.chars&&!o(e,t.v)){var n,r=t.chars.length;for(n=0;n<r;n+=1){var a=t.chars[n];a.data&&a.data.shapes&&(i(a.data.shapes),a.data.ip=0,a.data.op=99999,a.data.st=0,a.data.sr=1,a.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},t.chars[n].t||(a.data.shapes.push({ty:`no`}),a.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:`tr`})))}}}}(),l=function(){var e=[5,7,15];function t(e){var t=e.t.p;typeof t.a==`number`&&(t.a={a:0,k:t.a}),typeof t.p==`number`&&(t.p={a:0,k:t.p}),typeof t.r==`number`&&(t.r={a:0,k:t.r})}function n(e){var n,r=e.length;for(n=0;n<r;n+=1)e[n].ty===5&&t(e[n])}return function(t){if(o(e,t.v)&&(n(t.layers),t.assets)){var r,i=t.assets.length;for(r=0;r<i;r+=1)t.assets[r].layers&&n(t.assets[r].layers)}}}(),u=function(){var e=[4,1,9];function t(e){var n,r=e.length,i,a;for(n=0;n<r;n+=1)if(e[n].ty===`gr`)t(e[n].it);else if(e[n].ty===`fl`||e[n].ty===`st`)if(e[n].c.k&&e[n].c.k[0].i)for(a=e[n].c.k.length,i=0;i<a;i+=1)e[n].c.k[i].s&&(e[n].c.k[i].s[0]/=255,e[n].c.k[i].s[1]/=255,e[n].c.k[i].s[2]/=255,e[n].c.k[i].s[3]/=255),e[n].c.k[i].e&&(e[n].c.k[i].e[0]/=255,e[n].c.k[i].e[1]/=255,e[n].c.k[i].e[2]/=255,e[n].c.k[i].e[3]/=255);else e[n].c.k[0]/=255,e[n].c.k[1]/=255,e[n].c.k[2]/=255,e[n].c.k[3]/=255}function n(e){var n,r=e.length;for(n=0;n<r;n+=1)e[n].ty===4&&t(e[n].shapes)}return function(t){if(o(e,t.v)&&(n(t.layers),t.assets)){var r,i=t.assets.length;for(r=0;r<i;r+=1)t.assets[r].layers&&n(t.assets[r].layers)}}}(),d=function(){var e=[4,4,18];function t(e){var n,r=e.length,i,a;for(n=r-1;n>=0;--n)if(e[n].ty===`sh`)if(e[n].ks.k.i)e[n].ks.k.c=e[n].closed;else for(a=e[n].ks.k.length,i=0;i<a;i+=1)e[n].ks.k[i].s&&(e[n].ks.k[i].s[0].c=e[n].closed),e[n].ks.k[i].e&&(e[n].ks.k[i].e[0].c=e[n].closed);else e[n].ty===`gr`&&t(e[n].it)}function n(e){var n,r,i=e.length,a,o,s,c;for(r=0;r<i;r+=1){if(n=e[r],n.hasMask){var l=n.masksProperties;for(o=l.length,a=0;a<o;a+=1)if(l[a].pt.k.i)l[a].pt.k.c=l[a].cl;else for(c=l[a].pt.k.length,s=0;s<c;s+=1)l[a].pt.k[s].s&&(l[a].pt.k[s].s[0].c=l[a].cl),l[a].pt.k[s].e&&(l[a].pt.k[s].e[0].c=l[a].cl)}n.ty===4&&t(n.shapes)}}return function(t){if(o(e,t.v)&&(n(t.layers),t.assets)){var r,i=t.assets.length;for(r=0;r<i;r+=1)t.assets[r].layers&&n(t.assets[r].layers)}}}();function f(n){n.__complete||=(u(n),s(n),c(n),l(n),d(n),e(n.layers,n.assets),t(n.chars,n.assets),!0)}function p(e){e.t.a.length===0&&`m`in e.t.p}var m={};return m.completeData=f,m.checkColors=u,m.checkChars=c,m.checkPathProperties=l,m.checkShapes=d,m.completeLayers=e,m}if(a.dataManager||=t(),a.assetLoader||=function(){function e(e){var t=e.getResponseHeader(`content-type`);return t&&e.responseType===`json`&&t.indexOf(`json`)!==-1||e.response&&_typeof$5(e.response)===`object`?e.response:e.response&&typeof e.response==`string`?JSON.parse(e.response):e.responseText?JSON.parse(e.responseText):null}function t(t,n,r,i){var a,o=new XMLHttpRequest;try{o.responseType=`json`}catch{}o.onreadystatechange=function(){if(o.readyState===4)if(o.status===200)a=e(o),r(a);else try{a=e(o),r(a)}catch(e){i&&i(e)}};try{o.open([`G`,`E`,`T`].join(``),t,!0)}catch{o.open([`G`,`E`,`T`].join(``),n+`/`+t,!0)}o.send()}return{load:t}}(),e.data.type===`loadAnimation`)a.assetLoader.load(e.data.path,e.data.fullPath,function(t){a.dataManager.completeData(t),a.postMessage({id:e.data.id,payload:t,status:`success`})},function(){a.postMessage({id:e.data.id,status:`error`})});else if(e.data.type===`complete`){var n=e.data.animation;a.dataManager.completeData(n),a.postMessage({id:e.data.id,payload:n,status:`success`})}else e.data.type===`loadData`&&a.assetLoader.load(e.data.path,e.data.fullPath,function(t){a.postMessage({id:e.data.id,payload:t,status:`success`})},function(){a.postMessage({id:e.data.id,status:`error`})})}),r.onmessage=function(e){var n=e.data,r=n.id,i=t[r];t[r]=null,n.status===`success`?i.onComplete(n.payload):i.onError&&i.onError()})}function c(n,r){e+=1;var i=`processId_`+e;return t[i]={onComplete:n,onError:r},i}function l(e,t,n){s();var i=c(t,n);r.postMessage({type:`loadAnimation`,path:e,fullPath:window.location.origin+window.location.pathname,id:i})}function u(e,t,n){s();var i=c(t,n);r.postMessage({type:`loadData`,path:e,fullPath:window.location.origin+window.location.pathname,id:i})}function d(e,t,n){s();var i=c(t,n);r.postMessage({type:`complete`,animation:e,id:i})}return{loadAnimation:l,loadData:u,completeAnimation:d}}(),ImagePreloader=function(){var e=function(){var e=createTag(`canvas`);e.width=1,e.height=1;var t=e.getContext(`2d`);return t.fillStyle=`rgba(0,0,0,0)`,t.fillRect(0,0,1,1),e}();function t(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function n(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function r(e,t,n){var r=``;if(e.e)r=e.p;else if(t){var i=e.p;i.indexOf(`images/`)!==-1&&(i=i.split(`/`)[1]),r=t+i}else r=n,r+=e.u?e.u:``,r+=e.p;return r}function i(e){var t=0,n=setInterval(function(){(e.getBBox().width||t>500)&&(this._imageLoaded(),clearInterval(n)),t+=1}.bind(this),50)}function a(t){var n=r(t,this.assetsPath,this.path),i=createNS(`image`);isSafari?this.testImageLoaded(i):i.addEventListener(`load`,this._imageLoaded,!1),i.addEventListener(`error`,function(){a.img=e,this._imageLoaded()}.bind(this),!1),i.setAttributeNS(`http://www.w3.org/1999/xlink`,`href`,n),this._elementHelper.append?this._elementHelper.append(i):this._elementHelper.appendChild(i);var a={img:i,assetData:t};return a}function o(t){var n=r(t,this.assetsPath,this.path),i=createTag(`img`);i.crossOrigin=`anonymous`,i.addEventListener(`load`,this._imageLoaded,!1),i.addEventListener(`error`,function(){a.img=e,this._imageLoaded()}.bind(this),!1),i.src=n;var a={img:i,assetData:t};return a}function s(e){var t={assetData:e},n=r(e,this.assetsPath,this.path);return dataManager.loadData(n,function(e){t.img=e,this._footageLoaded()}.bind(this),function(){t.img={},this._footageLoaded()}.bind(this)),t}function c(e,t){this.imagesLoadedCb=t;var n,r=e.length;for(n=0;n<r;n+=1)e[n].layers||(!e[n].t||e[n].t===`seq`?(this.totalImages+=1,this.images.push(this._createImageData(e[n]))):e[n].t===3&&(this.totalFootages+=1,this.images.push(this.createFootageData(e[n]))))}function l(e){this.path=e||``}function u(e){this.assetsPath=e||``}function d(e){for(var t=0,n=this.images.length;t<n;){if(this.images[t].assetData===e)return this.images[t].img;t+=1}return null}function f(){this.imagesLoadedCb=null,this.images.length=0}function p(){return this.totalImages===this.loadedAssets}function m(){return this.totalFootages===this.loadedFootagesCount}function g(e,t){e===`svg`?(this._elementHelper=t,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}function _(){this._imageLoaded=t.bind(this),this._footageLoaded=n.bind(this),this.testImageLoaded=i.bind(this),this.createFootageData=s.bind(this),this.assetsPath=``,this.path=``,this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return _.prototype={loadAssets:c,setAssetsPath:u,setPath:l,loadedImages:p,loadedFootages:m,destroy:f,getAsset:d,createImgData:o,createImageData:a,imageLoaded:t,footageLoaded:n,setCacheType:g},_}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(e,t){if(this._cbs[e])for(var n=this._cbs[e],r=0;r<n.length;r+=1)n[r](t)},addEventListener:function(e,t){return this._cbs[e]||(this._cbs[e]=[]),this._cbs[e].push(t),function(){this.removeEventListener(e,t)}.bind(this)},removeEventListener:function(e,t){if(!t)this._cbs[e]=null;else if(this._cbs[e]){for(var n=0,r=this._cbs[e].length;n<r;)this._cbs[e][n]===t&&(this._cbs[e].splice(n,1),--n,--r),n+=1;this._cbs[e].length||(this._cbs[e]=null)}}};var markerParser=function(){function e(e){for(var t=e.split(`\r 10`),n={},r,i=0,a=0;a<t.length;a+=1)r=t[a].split(`:`),r.length===2&&(n[r[0]]=r[1].trim(),i+=1);if(i===0)throw Error();return n}return function(t){for(var n=[],r=0;r<t.length;r+=1){var i=t[r],a={time:i.tm,duration:i.dr};try{a.payload=JSON.parse(t[r].cm)}catch{try{a.payload=e(t[r].cm)}catch{a.payload={name:t[r].cm}}}n.push(a)}return n}}(),ProjectInterface=function(){function e(e){this.compositions.push(e)}return function(){function t(e){for(var t=0,n=this.compositions.length;t<n;){if(this.compositions[t].data&&this.compositions[t].data.nm===e)return this.compositions[t].prepareFrame&&this.compositions[t].data.xt&&this.compositions[t].prepareFrame(this.currentFrame),this.compositions[t].compInterface;t+=1}return null}return t.compositions=[],t.currentFrame=0,t.registerComposition=e,t}}(),renderers={},registerRenderer=function(e,t){renderers[e]=t};function getRenderer(e){return renderers[e]}function getRegisteredRenderer(){if(renderers.canvas)return`canvas`;for(var e in renderers)if(renderers[e])return e;return``}function _typeof$4(e){"@babel/helpers - typeof";return _typeof$4=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},_typeof$4(e)}var AnimationItem=function(){this._cbs=[],this.name=``,this.path=``,this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath=``,this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=getSubframeEnabled(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this),this.drawnFrameEvent=new BMEnterFrameEvent(`drawnFrame`,0,0,0),this.expressionsPlugin=getExpressionsPlugin()};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(e){(e.wrapper||e.container)&&(this.wrapper=e.wrapper||e.container);var t=`svg`;e.animType?t=e.animType:e.renderer&&(t=e.renderer);var n=getRenderer(t);this.renderer=new n(this,e.rendererSettings),this.imagePreloader.setCacheType(t,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=t,e.loop===``||e.loop===null||e.loop===void 0||e.loop===!0?this.loop=!0:e.loop===!1?this.loop=!1:this.loop=parseInt(e.loop,10),this.autoplay=`autoplay`in e?e.autoplay:!0,this.name=e.name?e.name:``,this.autoloadSegments=Object.prototype.hasOwnProperty.call(e,`autoloadSegments`)?e.autoloadSegments:!0,this.assetsPath=e.assetsPath,this.initialSegment=e.initialSegment,e.audioFactory&&this.audioController.setAudioFactory(e.audioFactory),e.animationData?this.setupAnimation(e.animationData):e.path&&(e.path.lastIndexOf(`\\`)===-1?this.path=e.path.substr(0,e.path.lastIndexOf(`/`)+1):this.path=e.path.substr(0,e.path.lastIndexOf(`\\`)+1),this.fileName=e.path.substr(e.path.lastIndexOf(`/`)+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(`.json`)),dataManager.loadAnimation(e.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger(`data_failed`)},AnimationItem.prototype.setupAnimation=function(e){dataManager.completeAnimation(e,this.configAnimation)},AnimationItem.prototype.setData=function(e,t){t&&_typeof$4(t)!==`object`&&(t=JSON.parse(t));var n={wrapper:e,animationData:t},r=e.attributes;n.path=r.getNamedItem(`data-animation-path`)?r.getNamedItem(`data-animation-path`).value:r.getNamedItem(`data-bm-path`)?r.getNamedItem(`data-bm-path`).value:r.getNamedItem(`bm-path`)?r.getNamedItem(`bm-path`).value:``,n.animType=r.getNamedItem(`data-anim-type`)?r.getNamedItem(`data-anim-type`).value:r.getNamedItem(`data-bm-type`)?r.getNamedItem(`data-bm-type`).value:r.getNamedItem(`bm-type`)?r.getNamedItem(`bm-type`).value:r.getNamedItem(`data-bm-renderer`)?r.getNamedItem(`data-bm-renderer`).value:r.getNamedItem(`bm-renderer`)?r.getNamedItem(`bm-renderer`).value:getRegisteredRenderer()||`canvas`;var i=r.getNamedItem(`data-anim-loop`)?r.getNamedItem(`data-anim-loop`).value:r.getNamedItem(`data-bm-loop`)?r.getNamedItem(`data-bm-loop`).value:r.getNamedItem(`bm-loop`)?r.getNamedItem(`bm-loop`).value:``;i===`false`?n.loop=!1:i===`true`?n.loop=!0:i!==``&&(n.loop=parseInt(i,10)),n.autoplay=(r.getNamedItem(`data-anim-autoplay`)?r.getNamedItem(`data-anim-autoplay`).value:r.getNamedItem(`data-bm-autoplay`)?r.getNamedItem(`data-bm-autoplay`).value:r.getNamedItem(`bm-autoplay`)?r.getNamedItem(`bm-autoplay`).value:!0)!==`false`,n.name=r.getNamedItem(`data-name`)?r.getNamedItem(`data-name`).value:r.getNamedItem(`data-bm-name`)?r.getNamedItem(`data-bm-name`).value:r.getNamedItem(`bm-name`)?r.getNamedItem(`bm-name`).value:``,(r.getNamedItem(`data-anim-prerender`)?r.getNamedItem(`data-anim-prerender`).value:r.getNamedItem(`data-bm-prerender`)?r.getNamedItem(`data-bm-prerender`).value:r.getNamedItem(`bm-prerender`)?r.getNamedItem(`bm-prerender`).value:``)===`false`&&(n.prerender=!1),n.path?this.setParams(n):this.trigger(`destroy`)},AnimationItem.prototype.includeLayers=function(e){e.op>this.animationData.op&&(this.animationData.op=e.op,this.totalFrames=Math.floor(e.op-this.animationData.ip));var t=this.animationData.layers,n,r=t.length,i=e.layers,a,o=i.length;for(a=0;a<o;a+=1)for(n=0;n<r;){if(t[n].id===i[a].id){t[n]=i[a];break}n+=1}if((e.chars||e.fonts)&&(this.renderer.globalData.fontManager.addChars(e.chars),this.renderer.globalData.fontManager.addFonts(e.fonts,this.renderer.globalData.defs)),e.assets)for(r=e.assets.length,n=0;n<r;n+=1)this.animationData.assets.push(e.assets[n]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(e){this.animationData=e;var t=getExpressionsPlugin();t&&t.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var e=this.animationData.segments;if(!e||e.length===0||!this.autoloadSegments){this.trigger(`data_ready`),this.timeCompleted=this.totalFrames;return}var t=e.shift();this.timeCompleted=t.time*this.frameRate;var n=this.path+this.fileName+`_`+this.segmentPos+`.json`;this.segmentPos+=1,dataManager.loadData(n,this.includeLayers.bind(this),function(){this.trigger(`data_failed`)}.bind(this))},AnimationItem.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger(`loaded_images`),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(e){if(this.renderer)try{this.animationData=e,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(e),e.assets||=[],this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(e.assets),this.markers=markerParser(e.markers||[]),this.trigger(`config_ready`),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(e){this.triggerConfigError(e)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||this.renderer.rendererType!==`canvas`)&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var e=getExpressionsPlugin();e&&e.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger(`DOMLoaded`)}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},AnimationItem.prototype.resize=function(e,t){var n=typeof e==`number`?e:void 0,r=typeof t==`number`?t:void 0;this.renderer.updateContainerSize(n,r)},AnimationItem.prototype.setSubframe=function(e){this.isSubframeEnabled=!!e},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger(`enterFrame`),this.renderFrame(),this.trigger(`drawnFrame`)},AnimationItem.prototype.renderFrame=function(){if(!(this.isLoaded===!1||!this.renderer))try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(e){this.triggerRenderFrameError(e)}},AnimationItem.prototype.play=function(e){e&&this.name!==e||this.isPaused===!0&&(this.isPaused=!1,this.trigger(`_play`),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger(`_active`)))},AnimationItem.prototype.pause=function(e){e&&this.name!==e||this.isPaused===!1&&(this.isPaused=!0,this.trigger(`_pause`),this._idle=!0,this.trigger(`_idle`),this.audioController.pause())},AnimationItem.prototype.togglePause=function(e){e&&this.name!==e||(this.isPaused===!0?this.play():this.pause())},AnimationItem.prototype.stop=function(e){e&&this.name!==e||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(e){for(var t,n=0;n<this.markers.length;n+=1)if(t=this.markers[n],t.payload&&t.payload.name===e)return t;return null},AnimationItem.prototype.goToAndStop=function(e,t,n){if(!(n&&this.name!==n)){var r=Number(e);if(isNaN(r)){var i=this.getMarkerData(e);i&&this.goToAndStop(i.time,!0)}else t?this.setCurrentRawFrameValue(e):this.setCurrentRawFrameValue(e*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(e,t,n){if(!(n&&this.name!==n)){var r=Number(e);if(isNaN(r)){var i=this.getMarkerData(e);i&&(i.duration?this.playSegments([i.time,i.time+i.duration],!0):this.goToAndStop(i.time,!0))}else this.goToAndStop(r,t,n);this.play()}},AnimationItem.prototype.advanceTime=function(e){if(!(this.isPaused===!0||this.isLoaded===!1)){var t=this.currentRawFrame+e*this.frameModifier,n=!1;t>=this.totalFrames-1&&this.frameModifier>0?!this.loop||this.playCount===this.loop?this.checkSegments(t>this.totalFrames?t%this.totalFrames:0)||(n=!0,t=this.totalFrames-1):t>=this.totalFrames?(this.playCount+=1,this.checkSegments(t%this.totalFrames)||(this.setCurrentRawFrameValue(t%this.totalFrames),this._completedLoop=!0,this.trigger(`loopComplete`))):this.setCurrentRawFrameValue(t):t<0?this.checkSegments(t%this.totalFrames)||(this.loop&&!(this.playCount--<=0&&this.loop!==!0)?(this.setCurrentRawFrameValue(this.totalFrames+t%this.totalFrames),this._completedLoop?this.trigger(`loopComplete`):this._completedLoop=!0):(n=!0,t=0)):this.setCurrentRawFrameValue(t),n&&(this.setCurrentRawFrameValue(t),this.pause(),this.trigger(`complete`))}},AnimationItem.prototype.adjustSegment=function(e,t){this.playCount=0,e[1]<e[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=e[0]-e[1],this.timeCompleted=this.totalFrames,this.firstFrame=e[1],this.setCurrentRawFrameValue(this.totalFrames-.001-t)):e[1]>e[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=e[1]-e[0],this.timeCompleted=this.totalFrames,this.firstFrame=e[0],this.setCurrentRawFrameValue(.001+t)),this.trigger(`segmentStart`)},AnimationItem.prototype.setSegment=function(e,t){var n=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<e?n=e:this.currentRawFrame+this.firstFrame>t&&(n=t-e)),this.firstFrame=e,this.totalFrames=t-e,this.timeCompleted=this.totalFrames,n!==-1&&this.goToAndStop(n,!0)},AnimationItem.prototype.playSegments=function(e,t){if(t&&(this.segments.length=0),_typeof$4(e[0])===`object`){var n,r=e.length;for(n=0;n<r;n+=1)this.segments.push(e[n])}else this.segments.push(e);this.segments.length&&t&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(e){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),e&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(e){return this.segments.length?(this.adjustSegment(this.segments.shift(),e),!0):!1},AnimationItem.prototype.destroy=function(e){e&&this.name!==e||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger(`destroy`),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.expressionsPlugin=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(e){this.currentRawFrame=e,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(e){this.playSpeed=e,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(e){this.playDirection=e<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setLoop=function(e){this.loop=e},AnimationItem.prototype.setVolume=function(e,t){t&&this.name!==t||this.audioController.setVolume(e)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(e){e&&this.name!==e||this.audioController.mute()},AnimationItem.prototype.unmute=function(e){e&&this.name!==e||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(e){var t=``;if(e.e)t=e.p;else if(this.assetsPath){var n=e.p;n.indexOf(`images/`)!==-1&&(n=n.split(`/`)[1]),t=this.assetsPath+n}else t=this.path,t+=e.u?e.u:``,t+=e.p;return t},AnimationItem.prototype.getAssetData=function(e){for(var t=0,n=this.assets.length;t<n;){if(e===this.assets[t].id)return this.assets[t];t+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(e){return e?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.updateDocumentData=function(e,t,n){try{this.renderer.getElementByPath(e).updateDocumentData(t,n)}catch{}},AnimationItem.prototype.trigger=function(e){if(this._cbs&&this._cbs[e])switch(e){case`enterFrame`:this.triggerEvent(e,new BMEnterFrameEvent(e,this.currentFrame,this.totalFrames,this.frameModifier));break;case`drawnFrame`:this.drawnFrameEvent.currentTime=this.currentFrame,this.drawnFrameEvent.totalTime=this.totalFrames,this.drawnFrameEvent.direction=this.frameModifier,this.triggerEvent(e,this.drawnFrameEvent);break;case`loopComplete`:this.triggerEvent(e,new BMCompleteLoopEvent(e,this.loop,this.playCount,this.frameMult));break;case`complete`:this.triggerEvent(e,new BMCompleteEvent(e,this.frameMult));break;case`segmentStart`:this.triggerEvent(e,new BMSegmentStartEvent(e,this.firstFrame,this.totalFrames));break;case`destroy`:this.triggerEvent(e,new BMDestroyEvent(e,this));break;default:this.triggerEvent(e)}e===`enterFrame`&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(e,this.currentFrame,this.totalFrames,this.frameMult)),e===`loopComplete`&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(e,this.loop,this.playCount,this.frameMult)),e===`complete`&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(e,this.frameMult)),e===`segmentStart`&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(e,this.firstFrame,this.totalFrames)),e===`destroy`&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(e,this))},AnimationItem.prototype.triggerRenderFrameError=function(e){var t=new BMRenderFrameErrorEvent(e,this.currentFrame);this.triggerEvent(`error`,t),this.onError&&this.onError.call(this,t)},AnimationItem.prototype.triggerConfigError=function(e){var t=new BMConfigErrorEvent(e,this.currentFrame);this.triggerEvent(`error`,t),this.onError&&this.onError.call(this,t)};var animationManager=function(){var e={},t=[],n=0,r=0,i=0,a=!0,o=!1;function s(e){for(var n=0,i=e.target;n<r;)t[n].animation===i&&(t.splice(n,1),--n,--r,i.isPaused||d()),n+=1}function c(e,n){if(!e)return null;for(var i=0;i<r;){if(t[i].elem===e&&t[i].elem!==null)return t[i].animation;i+=1}var a=new AnimationItem;return f(a,e),a.setData(e,n),a}function l(){var e,n=t.length,r=[];for(e=0;e<n;e+=1)r.push(t[e].animation);return r}function u(){i+=1,k()}function d(){--i}function f(e,n){e.addEventListener(`destroy`,s),e.addEventListener(`_active`,u),e.addEventListener(`_idle`,d),t.push({elem:n,animation:e}),r+=1}function p(e){var t=new AnimationItem;return f(t,null),t.setParams(e),t}function m(e,n){var i;for(i=0;i<r;i+=1)t[i].animation.setSpeed(e,n)}function g(e,n){var i;for(i=0;i<r;i+=1)t[i].animation.setDirection(e,n)}function _(e){var n;for(n=0;n<r;n+=1)t[n].animation.play(e)}function y(e){var s=e-n,c;for(c=0;c<r;c+=1)t[c].animation.advanceTime(s);n=e,i&&!o?window.requestAnimationFrame(y):a=!0}function b(e){n=e,window.requestAnimationFrame(y)}function x(e){var n;for(n=0;n<r;n+=1)t[n].animation.pause(e)}function S(e,n,i){var a;for(a=0;a<r;a+=1)t[a].animation.goToAndStop(e,n,i)}function C(e){var n;for(n=0;n<r;n+=1)t[n].animation.stop(e)}function T(e){var n;for(n=0;n<r;n+=1)t[n].animation.togglePause(e)}function E(e){var n;for(n=r-1;n>=0;--n)t[n].animation.destroy(e)}function D(e,t,n){var r=[].concat([].slice.call(document.getElementsByClassName(`lottie`)),[].slice.call(document.getElementsByClassName(`bodymovin`))),i,a=r.length;for(i=0;i<a;i+=1)n&&r[i].setAttribute(`data-bm-type`,n),c(r[i],e);if(t&&a===0){n||=`svg`;var o=document.getElementsByTagName(`body`)[0];o.innerText=``;var s=createTag(`div`);s.style.width=`100%`,s.style.height=`100%`,s.setAttribute(`data-bm-type`,n),o.appendChild(s),c(s,e)}}function O(){var e;for(e=0;e<r;e+=1)t[e].animation.resize()}function k(){!o&&i&&(a&&=(window.requestAnimationFrame(b),!1))}function A(){o=!0}function j(){o=!1,k()}function M(e,n){var i;for(i=0;i<r;i+=1)t[i].animation.setVolume(e,n)}function N(e){var n;for(n=0;n<r;n+=1)t[n].animation.mute(e)}function P(e){var n;for(n=0;n<r;n+=1)t[n].animation.unmute(e)}return e.registerAnimation=c,e.loadAnimation=p,e.setSpeed=m,e.setDirection=g,e.play=_,e.pause=x,e.stop=C,e.togglePause=T,e.searchAnimations=D,e.resize=O,e.goToAndStop=S,e.destroy=E,e.freeze=A,e.unfreeze=j,e.setVolume=M,e.mute=N,e.unmute=P,e.getRegisteredAnimations=l,e}(),BezierFactory=function(){var e={};e.getBezierEasing=n;var t={};function n(e,n,r,i,a){var o=a||(`bez_`+e+`_`+n+`_`+r+`_`+i).replace(/\./g,`p`);if(t[o])return t[o];var s=new y([e,n,r,i]);return t[o]=s,s}var r=4,i=.001,a=1e-7,o=10,s=11,c=1/(s-1),l=typeof Float32Array==`function`;function u(e,t){return 1-3*t+3*e}function d(e,t){return 3*t-6*e}function f(e){return 3*e}function p(e,t,n){return((u(t,n)*e+d(t,n))*e+f(t))*e}function m(e,t,n){return 3*u(t,n)*e*e+2*d(t,n)*e+f(t)}function g(e,t,n,r,i){var s,c,l=0;do c=t+(n-t)/2,s=p(c,r,i)-e,s>0?n=c:t=c;while(Math.abs(s)>a&&++l<o);return c}function _(e,t,n,i){for(var a=0;a<r;++a){var o=m(t,n,i);if(o===0)return t;var s=p(t,n,i)-e;t-=s/o}return t}function y(e){this._p=e,this._mSampleValues=l?new Float32Array(s):Array(s),this._precomputed=!1,this.get=this.get.bind(this)}return y.prototype={get:function(e){var t=this._p[0],n=this._p[1],r=this._p[2],i=this._p[3];return this._precomputed||this._precompute(),t===n&&r===i?e:e===0?0:e===1?1:p(this._getTForX(e),n,i)},_precompute:function(){var e=this._p[0],t=this._p[1],n=this._p[2],r=this._p[3];this._precomputed=!0,(e!==t||n!==r)&&this._calcSampleValues()},_calcSampleValues:function(){for(var e=this._p[0],t=this._p[2],n=0;n<s;++n)this._mSampleValues[n]=p(n*c,e,t)},_getTForX:function(e){for(var t=this._p[0],n=this._p[2],r=this._mSampleValues,a=0,o=1,l=s-1;o!==l&&r[o]<=e;++o)a+=c;--o;var u=(e-r[o])/(r[o+1]-r[o]),d=a+u*c,f=m(d,t,n);return f>=i?_(e,d,t,n):f===0?d:g(e,a,a+c,t,n)}},e}(),pooling=function(){function e(e){return e.concat(createSizedArray(e.length))}return{double:e}}(),poolFactory=function(){return function(e,t,n){var r=0,i=e,a=createSizedArray(i),o={newElement:s,release:c};function s(){var e;return r?(--r,e=a[r]):e=t(),e}function c(e){r===i&&(a=pooling.double(a),i*=2),n&&n(e),a[r]=e,r+=1}return o}}(),bezierLengthPool=function(){function e(){return{addedLength:0,percents:createTypedArray(`float32`,getDefaultCurveSegments()),lengths:createTypedArray(`float32`,getDefaultCurveSegments())}}return poolFactory(8,e)}(),segmentsLengthPool=function(){function e(){return{lengths:[],totalLength:0}}function t(e){var t,n=e.lengths.length;for(t=0;t<n;t+=1)bezierLengthPool.release(e.lengths[t]);e.lengths.length=0}return poolFactory(8,e,t)}();function bezFunction(){var e=Math;function t(e,t,n,r,i,a){var o=e*r+t*i+n*a-i*r-a*e-n*t;return o>-.001&&o<.001}function n(n,r,i,a,o,s,c,l,u){if(i===0&&s===0&&u===0)return t(n,r,a,o,c,l);var d=e.sqrt(e.pow(a-n,2)+e.pow(o-r,2)+e.pow(s-i,2)),f=e.sqrt(e.pow(c-n,2)+e.pow(l-r,2)+e.pow(u-i,2)),p=e.sqrt(e.pow(c-a,2)+e.pow(l-o,2)+e.pow(u-s,2)),m=d>f?d>p?d-f-p:p-f-d:p>f?p-f-d:f-d-p;return m>-1e-4&&m<1e-4}var r=function(){return function(e,t,n,r){var i=getDefaultCurveSegments(),a,o,s,c,l,u=0,d,f=[],p=[],m=bezierLengthPool.newElement();for(s=n.length,a=0;a<i;a+=1){for(l=a/(i-1),d=0,o=0;o<s;o+=1)c=bmPow(1-l,3)*e[o]+3*bmPow(1-l,2)*l*n[o]+3*(1-l)*bmPow(l,2)*r[o]+bmPow(l,3)*t[o],f[o]=c,p[o]!==null&&(d+=bmPow(f[o]-p[o],2)),p[o]=f[o];d&&(d=bmSqrt(d),u+=d),m.percents[a]=l,m.lengths[a]=u}return m.addedLength=u,m}}();function i(e){var t=segmentsLengthPool.newElement(),n=e.c,i=e.v,a=e.o,o=e.i,s,c=e._length,l=t.lengths,u=0;for(s=0;s<c-1;s+=1)l[s]=r(i[s],i[s+1],a[s],o[s+1]),u+=l[s].addedLength;return n&&c&&(l[s]=r(i[s],i[0],a[s],o[0]),u+=l[s].addedLength),t.totalLength=u,t}function a(e){this.segmentLength=0,this.points=Array(e)}function o(e,t){this.partialLength=e,this.point=t}var s=function(){var e={};return function(n,r,i,s){var c=(n[0]+`_`+n[1]+`_`+r[0]+`_`+r[1]+`_`+i[0]+`_`+i[1]+`_`+s[0]+`_`+s[1]).replace(/\./g,`p`);if(!e[c]){var l=getDefaultCurveSegments(),u,d,f,p,m,g=0,_,y,b=null;n.length===2&&(n[0]!==r[0]||n[1]!==r[1])&&t(n[0],n[1],r[0],r[1],n[0]+i[0],n[1]+i[1])&&t(n[0],n[1],r[0],r[1],r[0]+s[0],r[1]+s[1])&&(l=2);var x=new a(l);for(f=i.length,u=0;u<l;u+=1){for(y=createSizedArray(f),m=u/(l-1),_=0,d=0;d<f;d+=1)p=bmPow(1-m,3)*n[d]+3*bmPow(1-m,2)*m*(n[d]+i[d])+3*(1-m)*bmPow(m,2)*(r[d]+s[d])+bmPow(m,3)*r[d],y[d]=p,b!==null&&(_+=bmPow(y[d]-b[d],2));_=bmSqrt(_),g+=_,x.points[u]=new o(_,y),b=y}x.segmentLength=g,e[c]=x}return e[c]}}();function c(e,t){var n=t.percents,r=t.lengths,i=n.length,a=bmFloor((i-1)*e),o=e*t.addedLength,s=0;if(a===i-1||a===0||o===r[a])return n[a];for(var c=r[a]>o?-1:1,l=!0;l;)if(r[a]<=o&&r[a+1]>o?(s=(o-r[a])/(r[a+1]-r[a]),l=!1):a+=c,a<0||a>=i-1){if(a===i-1)return n[a];l=!1}return n[a]+(n[a+1]-n[a])*s}function l(t,n,r,i,a,o){var s=c(a,o),l=1-s;return[e.round((l*l*l*t[0]+(s*l*l+l*s*l+l*l*s)*r[0]+(s*s*l+l*s*s+s*l*s)*i[0]+s*s*s*n[0])*1e3)/1e3,e.round((l*l*l*t[1]+(s*l*l+l*s*l+l*l*s)*r[1]+(s*s*l+l*s*s+s*l*s)*i[1]+s*s*s*n[1])*1e3)/1e3]}var u=createTypedArray(`float32`,8);function d(t,n,r,i,a,o,s){a<0?a=0:a>1&&(a=1);var l=c(a,s);o=o>1?1:o;var d=c(o,s),f,p=t.length,m=1-l,g=1-d,_=m*m*m,y=l*m*m*3,b=l*l*m*3,x=l*l*l,S=m*m*g,C=l*m*g+m*l*g+m*m*d,T=l*l*g+m*l*d+l*m*d,E=l*l*d,D=m*g*g,O=l*g*g+m*d*g+m*g*d,k=l*d*g+m*d*d+l*g*d,A=l*d*d,j=g*g*g,M=d*g*g+g*d*g+g*g*d,N=d*d*g+g*d*d+d*g*d,P=d*d*d;for(f=0;f<p;f+=1)u[f*4]=e.round((_*t[f]+y*r[f]+b*i[f]+x*n[f])*1e3)/1e3,u[f*4+1]=e.round((S*t[f]+C*r[f]+T*i[f]+E*n[f])*1e3)/1e3,u[f*4+2]=e.round((D*t[f]+O*r[f]+k*i[f]+A*n[f])*1e3)/1e3,u[f*4+3]=e.round((j*t[f]+M*r[f]+N*i[f]+P*n[f])*1e3)/1e3;return u}return{getSegmentsLength:i,getNewSegment:d,getPointInSegment:l,buildBezierData:s,pointOnLine2D:t,pointOnLine3D:n}}var bez=bezFunction(),initFrame=initialDefaultFrame,mathAbs=Math.abs;function interpolateValue(e,t){var n=this.offsetTime,r;this.propType===`multidimensional`&&(r=createTypedArray(`float32`,this.pv.length));for(var i=t.lastIndex,a=i,o=this.keyframes.length-1,s=!0,c,l,u;s;){if(c=this.keyframes[a],l=this.keyframes[a+1],a===o-1&&e>=l.t-n){c.h&&(c=l),i=0;break}if(l.t-n>e){i=a;break}a<o-1?a+=1:(i=0,s=!1)}u=this.keyframesMetadata[a]||{};var d,f,p,m,g,_,y=l.t-n,b=c.t-n,x;if(c.to){u.bezierData||=bez.buildBezierData(c.s,l.s||c.e,c.to,c.ti);var S=u.bezierData;if(e>=y||e<b){var C=e>=y?S.points.length-1:0;for(f=S.points[C].point.length,d=0;d<f;d+=1)r[d]=S.points[C].point[d]}else{u.__fnct?_=u.__fnct:(_=BezierFactory.getBezierEasing(c.o.x,c.o.y,c.i.x,c.i.y,c.n).get,u.__fnct=_),p=_((e-b)/(y-b));var T=S.segmentLength*p,E,D=t.lastFrame<e&&t._lastKeyframeIndex===a?t._lastAddedLength:0;for(g=t.lastFrame<e&&t._lastKeyframeIndex===a?t._lastPoint:0,s=!0,m=S.points.length;s;){if(D+=S.points[g].partialLength,T===0||p===0||g===S.points.length-1){for(f=S.points[g].point.length,d=0;d<f;d+=1)r[d]=S.points[g].point[d];break}else if(T>=D&&T<D+S.points[g+1].partialLength){for(E=(T-D)/S.points[g+1].partialLength,f=S.points[g].point.length,d=0;d<f;d+=1)r[d]=S.points[g].point[d]+(S.points[g+1].point[d]-S.points[g].point[d])*E;break}g<m-1?g+=1:s=!1}t._lastPoint=g,t._lastAddedLength=D-S.points[g].partialLength,t._lastKeyframeIndex=a}}else{var O,k,A,j,M;if(o=c.s.length,x=l.s||c.e,this.sh&&c.h!==1)if(e>=y)r[0]=x[0],r[1]=x[1],r[2]=x[2];else if(e<=b)r[0]=c.s[0],r[1]=c.s[1],r[2]=c.s[2];else{var N=createQuaternion(c.s),P=createQuaternion(x),F=(e-b)/(y-b);quaternionToEuler(r,slerp(N,P,F))}else for(a=0;a<o;a+=1)c.h!==1&&(e>=y?p=1:e<b?p=0:(c.o.x.constructor===Array?(u.__fnct||=[],u.__fnct[a]?_=u.__fnct[a]:(O=c.o.x[a]===void 0?c.o.x[0]:c.o.x[a],k=c.o.y[a]===void 0?c.o.y[0]:c.o.y[a],A=c.i.x[a]===void 0?c.i.x[0]:c.i.x[a],j=c.i.y[a]===void 0?c.i.y[0]:c.i.y[a],_=BezierFactory.getBezierEasing(O,k,A,j).get,u.__fnct[a]=_)):u.__fnct?_=u.__fnct:(O=c.o.x,k=c.o.y,A=c.i.x,j=c.i.y,_=BezierFactory.getBezierEasing(O,k,A,j).get,c.keyframeMetadata=_),p=_((e-b)/(y-b)))),x=l.s||c.e,M=c.h===1?c.s[a]:c.s[a]+(x[a]-c.s[a])*p,this.propType===`multidimensional`?r[a]=M:r=M}return t.lastIndex=i,r}function slerp(e,t,n){var r=[],i=e[0],a=e[1],o=e[2],s=e[3],c=t[0],l=t[1],u=t[2],d=t[3],f,p=i*c+a*l+o*u+s*d,m,g,_;return p<0&&(p=-p,c=-c,l=-l,u=-u,d=-d),1-p>1e-6?(f=Math.acos(p),m=Math.sin(f),g=Math.sin((1-n)*f)/m,_=Math.sin(n*f)/m):(g=1-n,_=n),r[0]=g*i+_*c,r[1]=g*a+_*l,r[2]=g*o+_*u,r[3]=g*s+_*d,r}function quaternionToEuler(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=Math.atan2(2*r*a-2*n*i,1-2*r*r-2*i*i),s=Math.asin(2*n*r+2*i*a),c=Math.atan2(2*n*a-2*r*i,1-2*n*n-2*i*i);e[0]=o/degToRads,e[1]=s/degToRads,e[2]=c/degToRads}function createQuaternion(e){var t=e[0]*degToRads,n=e[1]*degToRads,r=e[2]*degToRads,i=Math.cos(t/2),a=Math.cos(n/2),o=Math.cos(r/2),s=Math.sin(t/2),c=Math.sin(n/2),l=Math.sin(r/2),u=i*a*o-s*c*l;return[s*c*o+i*a*l,s*a*o+i*c*l,i*c*o-s*a*l,u]}function getValueAtCurrentTime(){var e=this.comp.renderedFrame-this.offsetTime,t=this.keyframes[0].t-this.offsetTime,n=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(e===this._caching.lastFrame||this._caching.lastFrame!==initFrame&&(this._caching.lastFrame>=n&&e>=n||this._caching.lastFrame<t&&e<t))){this._caching.lastFrame>=e&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var r=this.interpolateValue(e,this._caching);this.pv=r}return this._caching.lastFrame=e,this.pv}function setVValue(e){var t;if(this.propType===`unidimensional`)t=e*this.mult,mathAbs(this.v-t)>1e-5&&(this.v=t,this._mdf=!0);else for(var n=0,r=this.v.length;n<r;)t=e[n]*this.mult,mathAbs(this.v[n]-t)>1e-5&&(this.v[n]=t,this._mdf=!0),n+=1}function processEffectsSequence(){if(!(this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)){if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=this._isFirstFrame;var e,t=this.effectsSequence.length,n=this.kf?this.pv:this.data.k;for(e=0;e<t;e+=1)n=this.effectsSequence[e](n);this.setVValue(n),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function addEffect(e){this.effectsSequence.push(e),this.container.addDynamicProperty(this)}function ValueProperty(e,t,n,r){this.propType=`unidimensional`,this.mult=n||1,this.data=t,this.v=n?t.k*n:t.k,this.pv=t.k,this._mdf=!1,this.elem=e,this.container=r,this.comp=e.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function MultiDimensionalProperty(e,t,n,r){this.propType=`multidimensional`,this.mult=n||1,this.data=t,this._mdf=!1,this.elem=e,this.container=r,this.comp=e.comp,this.k=!1,this.kf=!1,this.frameId=-1;var i,a=t.k.length;for(this.v=createTypedArray(`float32`,a),this.pv=createTypedArray(`float32`,a),this.vel=createTypedArray(`float32`,a),i=0;i<a;i+=1)this.v[i]=t.k[i]*this.mult,this.pv[i]=t.k[i];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function KeyframedValueProperty(e,t,n,r){this.propType=`unidimensional`,this.keyframes=t.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.frameId=-1,this._caching={lastFrame:initFrame,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=t,this.mult=n||1,this.elem=e,this.container=r,this.comp=e.comp,this.v=initFrame,this.pv=initFrame,this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.addEffect=addEffect}function KeyframedMultidimensionalProperty(e,t,n,r){this.propType=`multidimensional`;var i,a=t.k.length,o,s,c,l;for(i=0;i<a-1;i+=1)t.k[i].to&&t.k[i].s&&t.k[i+1]&&t.k[i+1].s&&(o=t.k[i].s,s=t.k[i+1].s,c=t.k[i].to,l=t.k[i].ti,(o.length===2&&!(o[0]===s[0]&&o[1]===s[1])&&bez.pointOnLine2D(o[0],o[1],s[0],s[1],o[0]+c[0],o[1]+c[1])&&bez.pointOnLine2D(o[0],o[1],s[0],s[1],s[0]+l[0],s[1]+l[1])||o.length===3&&!(o[0]===s[0]&&o[1]===s[1]&&o[2]===s[2])&&bez.pointOnLine3D(o[0],o[1],o[2],s[0],s[1],s[2],o[0]+c[0],o[1]+c[1],o[2]+c[2])&&bez.pointOnLine3D(o[0],o[1],o[2],s[0],s[1],s[2],s[0]+l[0],s[1]+l[1],s[2]+l[2]))&&(t.k[i].to=null,t.k[i].ti=null),o[0]===s[0]&&o[1]===s[1]&&c[0]===0&&c[1]===0&&l[0]===0&&l[1]===0&&(o.length===2||o[2]===s[2]&&c[2]===0&&l[2]===0)&&(t.k[i].to=null,t.k[i].ti=null));this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.data=t,this.keyframes=t.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=n||1,this.elem=e,this.container=r,this.comp=e.comp,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.frameId=-1;var u=t.k[0].s.length;for(this.v=createTypedArray(`float32`,u),this.pv=createTypedArray(`float32`,u),i=0;i<u;i+=1)this.v[i]=initFrame,this.pv[i]=initFrame;this._caching={lastFrame:initFrame,lastIndex:0,value:createTypedArray(`float32`,u)},this.addEffect=addEffect}var PropertyFactory=function(){function e(e,t,n,r,i){t.sid&&(t=e.globalData.slotManager.getProp(t));var a;if(!t.k.length)a=new ValueProperty(e,t,r,i);else if(typeof t.k[0]==`number`)a=new MultiDimensionalProperty(e,t,r,i);else switch(n){case 0:a=new KeyframedValueProperty(e,t,r,i);break;case 1:a=new KeyframedMultidimensionalProperty(e,t,r,i);break;default:break}return a.effectsSequence.length&&i.addDynamicProperty(a),a}return{getProp:e}}();function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(e){this.dynamicProperties.indexOf(e)===-1&&(this.dynamicProperties.push(e),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){this._mdf=!1;var e,t=this.dynamicProperties.length;for(e=0;e<t;e+=1)this.dynamicProperties[e].getValue(),this.dynamicProperties[e]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(e){this.container=e,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var pointPool=function(){function e(){return createTypedArray(`float32`,2)}return poolFactory(8,e)}();function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(e,t){this.c=e,this.setLength(t);for(var n=0;n<t;)this.v[n]=pointPool.newElement(),this.o[n]=pointPool.newElement(),this.i[n]=pointPool.newElement(),n+=1},ShapePath.prototype.setLength=function(e){for(;this._maxLength<e;)this.doubleArrayLength();this._length=e},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(e,t,n,r,i){var a;switch(this._length=Math.max(this._length,r+1),this._length>=this._maxLength&&this.doubleArrayLength(),n){case`v`:a=this.v;break;case`i`:a=this.i;break;case`o`:a=this.o;break;default:a=[];break}(!a[r]||a[r]&&!i)&&(a[r]=pointPool.newElement()),a[r][0]=e,a[r][1]=t},ShapePath.prototype.setTripleAt=function(e,t,n,r,i,a,o,s){this.setXYAt(e,t,`v`,o,s),this.setXYAt(n,r,`o`,o,s),this.setXYAt(i,a,`i`,o,s)},ShapePath.prototype.reverse=function(){var e=new ShapePath;e.setPathData(this.c,this._length);var t=this.v,n=this.o,r=this.i,i=0;this.c&&(e.setTripleAt(t[0][0],t[0][1],r[0][0],r[0][1],n[0][0],n[0][1],0,!1),i=1);var a=this._length-1,o=this._length,s;for(s=i;s<o;s+=1)e.setTripleAt(t[a][0],t[a][1],r[a][0],r[a][1],n[a][0],n[a][1],s,!1),--a;return e},ShapePath.prototype.length=function(){return this._length};var shapePool=function(){function e(){return new ShapePath}function t(e){var t=e._length,n;for(n=0;n<t;n+=1)pointPool.release(e.v[n]),pointPool.release(e.i[n]),pointPool.release(e.o[n]),e.v[n]=null,e.i[n]=null,e.o[n]=null;e._length=0,e.c=!1}function n(e){var t=r.newElement(),n,i=e._length===void 0?e.v.length:e._length;for(t.setLength(i),t.c=e.c,n=0;n<i;n+=1)t.setTripleAt(e.v[n][0],e.v[n][1],e.o[n][0],e.o[n][1],e.i[n][0],e.i[n][1],n);return t}var r=poolFactory(4,e,t);return r.clone=n,r}();function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}ShapeCollection.prototype.addShape=function(e){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=e,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var e;for(e=0;e<this._length;e+=1)shapePool.release(this.shapes[e]);this._length=0};var shapeCollectionPool=function(){var e={newShapeCollection:i,release:a},t=0,n=4,r=createSizedArray(n);function i(){var e;return t?(--t,e=r[t]):e=new ShapeCollection,e}function a(e){var i,a=e._length;for(i=0;i<a;i+=1)shapePool.release(e.shapes[i]);e._length=0,t===n&&(r=pooling.double(r),n*=2),r[t]=e,t+=1}return e}(),ShapePropertyFactory=function(){var e=-999999;function t(e,t,n){var r=n.lastIndex,i,a,o,s,c,l,u,d,f,p=this.keyframes;if(e<p[0].t-this.offsetTime)i=p[0].s[0],o=!0,r=0;else if(e>=p[p.length-1].t-this.offsetTime)i=p[p.length-1].s?p[p.length-1].s[0]:p[p.length-2].e[0],o=!0;else{for(var m=r,g=p.length-1,_=!0,y,b,x;_&&(y=p[m],b=p[m+1],!(b.t-this.offsetTime>e));)m<g-1?m+=1:_=!1;if(x=this.keyframesMetadata[m]||{},o=y.h===1,r=m,!o){if(e>=b.t-this.offsetTime)d=1;else if(e<y.t-this.offsetTime)d=0;else{var S;x.__fnct?S=x.__fnct:(S=BezierFactory.getBezierEasing(y.o.x,y.o.y,y.i.x,y.i.y).get,x.__fnct=S),d=S((e-(y.t-this.offsetTime))/(b.t-this.offsetTime-(y.t-this.offsetTime)))}a=b.s?b.s[0]:y.e[0]}i=y.s[0]}for(l=t._length,u=i.i[0].length,n.lastIndex=r,s=0;s<l;s+=1)for(c=0;c<u;c+=1)f=o?i.i[s][c]:i.i[s][c]+(a.i[s][c]-i.i[s][c])*d,t.i[s][c]=f,f=o?i.o[s][c]:i.o[s][c]+(a.o[s][c]-i.o[s][c])*d,t.o[s][c]=f,f=o?i.v[s][c]:i.v[s][c]+(a.v[s][c]-i.v[s][c])*d,t.v[s][c]=f}function n(){var t=this.comp.renderedFrame-this.offsetTime,n=this.keyframes[0].t-this.offsetTime,r=this.keyframes[this.keyframes.length-1].t-this.offsetTime,i=this._caching.lastFrame;return i!==e&&(i<n&&t<n||i>r&&t>r)||(this._caching.lastIndex=i<t?this._caching.lastIndex:0,this.interpolateShape(t,this.pv,this._caching)),this._caching.lastFrame=t,this.pv}function r(){this.paths=this.localShapeCollection}function i(e,t){if(e._length!==t._length||e.c!==t.c)return!1;var n,r=e._length;for(n=0;n<r;n+=1)if(e.v[n][0]!==t.v[n][0]||e.v[n][1]!==t.v[n][1]||e.o[n][0]!==t.o[n][0]||e.o[n][1]!==t.o[n][1]||e.i[n][0]!==t.i[n][0]||e.i[n][1]!==t.i[n][1])return!1;return!0}function a(e){i(this.v,e)||(this.v=shapePool.clone(e),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function o(){if(this.elem.globalData.frameId!==this.frameId){if(!this.effectsSequence.length){this._mdf=!1;return}if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=!1;var e=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k,t,n=this.effectsSequence.length;for(t=0;t<n;t+=1)e=this.effectsSequence[t](e);this.setVValue(e),this.lock=!1,this.frameId=this.elem.globalData.frameId}}function s(e,t,n){this.propType=`shape`,this.comp=e.comp,this.container=e,this.elem=e,this.data=t,this.k=!1,this.kf=!1,this._mdf=!1;var i=n===3?t.pt.k:t.ks.k;this.v=shapePool.clone(i),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=r,this.effectsSequence=[]}function c(e){this.effectsSequence.push(e),this.container.addDynamicProperty(this)}s.prototype.interpolateShape=t,s.prototype.getValue=o,s.prototype.setVValue=a,s.prototype.addEffect=c;function l(t,i,a){this.propType=`shape`,this.comp=t.comp,this.elem=t,this.container=t,this.offsetTime=t.data.st,this.keyframes=a===3?i.pt.k:i.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var o=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,o),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=e,this.reset=r,this._caching={lastFrame:e,lastIndex:0},this.effectsSequence=[n.bind(this)]}l.prototype.getValue=o,l.prototype.interpolateShape=t,l.prototype.setVValue=a,l.prototype.addEffect=c;var u=function(){var e=roundCorner;function t(e,t){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=t.d,this.elem=e,this.comp=e.comp,this.frameId=-1,this.initDynamicPropertyContainer(e),this.p=PropertyFactory.getProp(e,t.p,1,0,this),this.s=PropertyFactory.getProp(e,t.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return t.prototype={reset:r,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var t=this.p.v[0],n=this.p.v[1],r=this.s.v[0]/2,i=this.s.v[1]/2,a=this.d!==3,o=this.v;o.v[0][0]=t,o.v[0][1]=n-i,o.v[1][0]=a?t+r:t-r,o.v[1][1]=n,o.v[2][0]=t,o.v[2][1]=n+i,o.v[3][0]=a?t-r:t+r,o.v[3][1]=n,o.i[0][0]=a?t-r*e:t+r*e,o.i[0][1]=n-i,o.i[1][0]=a?t+r:t-r,o.i[1][1]=n-i*e,o.i[2][0]=a?t+r*e:t-r*e,o.i[2][1]=n+i,o.i[3][0]=a?t-r:t+r,o.i[3][1]=n+i*e,o.o[0][0]=a?t+r*e:t-r*e,o.o[0][1]=n-i,o.o[1][0]=a?t+r:t-r,o.o[1][1]=n+i*e,o.o[2][0]=a?t-r*e:t+r*e,o.o[2][1]=n+i,o.o[3][0]=a?t-r:t+r,o.o[3][1]=n-i*e}},extendPrototype([DynamicPropertyContainer],t),t}(),d=function(){function e(e,t){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=e,this.comp=e.comp,this.data=t,this.frameId=-1,this.d=t.d,this.initDynamicPropertyContainer(e),t.sy===1?(this.ir=PropertyFactory.getProp(e,t.ir,0,0,this),this.is=PropertyFactory.getProp(e,t.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(e,t.pt,0,0,this),this.p=PropertyFactory.getProp(e,t.p,1,0,this),this.r=PropertyFactory.getProp(e,t.r,0,degToRads,this),this.or=PropertyFactory.getProp(e,t.or,0,0,this),this.os=PropertyFactory.getProp(e,t.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return e.prototype={reset:r,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var e=Math.floor(this.pt.v)*2,t=Math.PI*2/e,n=!0,r=this.or.v,i=this.ir.v,a=this.os.v,o=this.is.v,s=2*Math.PI*r/(e*2),c=2*Math.PI*i/(e*2),l,u,d,f,p=-Math.PI/2;p+=this.r.v;var m=this.data.d===3?-1:1;for(this.v._length=0,l=0;l<e;l+=1){u=n?r:i,d=n?a:o,f=n?s:c;var g=u*Math.cos(p),_=u*Math.sin(p),y=g===0&&_===0?0:_/Math.sqrt(g*g+_*_),b=g===0&&_===0?0:-g/Math.sqrt(g*g+_*_);g+=+this.p.v[0],_+=+this.p.v[1],this.v.setTripleAt(g,_,g-y*f*d*m,_-b*f*d*m,g+y*f*d*m,_+b*f*d*m,l,!0),n=!n,p+=t*m}},convertPolygonToPath:function(){var e=Math.floor(this.pt.v),t=Math.PI*2/e,n=this.or.v,r=this.os.v,i=2*Math.PI*n/(e*4),a,o=-Math.PI*.5,s=this.data.d===3?-1:1;for(o+=this.r.v,this.v._length=0,a=0;a<e;a+=1){var c=n*Math.cos(o),l=n*Math.sin(o),u=c===0&&l===0?0:l/Math.sqrt(c*c+l*l),d=c===0&&l===0?0:-c/Math.sqrt(c*c+l*l);c+=+this.p.v[0],l+=+this.p.v[1],this.v.setTripleAt(c,l,c-u*i*r*s,l-d*i*r*s,c+u*i*r*s,l+d*i*r*s,a,!0),o+=t*s}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],e),e}(),f=function(){function e(e,t){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=e,this.comp=e.comp,this.frameId=-1,this.d=t.d,this.initDynamicPropertyContainer(e),this.p=PropertyFactory.getProp(e,t.p,1,0,this),this.s=PropertyFactory.getProp(e,t.s,1,0,this),this.r=PropertyFactory.getProp(e,t.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return e.prototype={convertRectToPath:function(){var e=this.p.v[0],t=this.p.v[1],n=this.s.v[0]/2,r=this.s.v[1]/2,i=bmMin(n,r,this.r.v),a=i*(1-roundCorner);this.v._length=0,this.d===2||this.d===1?(this.v.setTripleAt(e+n,t-r+i,e+n,t-r+i,e+n,t-r+a,0,!0),this.v.setTripleAt(e+n,t+r-i,e+n,t+r-a,e+n,t+r-i,1,!0),i===0?(this.v.setTripleAt(e-n,t+r,e-n+a,t+r,e-n,t+r,2),this.v.setTripleAt(e-n,t-r,e-n,t-r+a,e-n,t-r,3)):(this.v.setTripleAt(e+n-i,t+r,e+n-i,t+r,e+n-a,t+r,2,!0),this.v.setTripleAt(e-n+i,t+r,e-n+a,t+r,e-n+i,t+r,3,!0),this.v.setTripleAt(e-n,t+r-i,e-n,t+r-i,e-n,t+r-a,4,!0),this.v.setTripleAt(e-n,t-r+i,e-n,t-r+a,e-n,t-r+i,5,!0),this.v.setTripleAt(e-n+i,t-r,e-n+i,t-r,e-n+a,t-r,6,!0),this.v.setTripleAt(e+n-i,t-r,e+n-a,t-r,e+n-i,t-r,7,!0))):(this.v.setTripleAt(e+n,t-r+i,e+n,t-r+a,e+n,t-r+i,0,!0),i===0?(this.v.setTripleAt(e-n,t-r,e-n+a,t-r,e-n,t-r,1,!0),this.v.setTripleAt(e-n,t+r,e-n,t+r-a,e-n,t+r,2,!0),this.v.setTripleAt(e+n,t+r,e+n-a,t+r,e+n,t+r,3,!0)):(this.v.setTripleAt(e+n-i,t-r,e+n-i,t-r,e+n-a,t-r,1,!0),this.v.setTripleAt(e-n+i,t-r,e-n+a,t-r,e-n+i,t-r,2,!0),this.v.setTripleAt(e-n,t-r+i,e-n,t-r+i,e-n,t-r+a,3,!0),this.v.setTripleAt(e-n,t+r-i,e-n,t+r-a,e-n,t+r-i,4,!0),this.v.setTripleAt(e-n+i,t+r,e-n+i,t+r,e-n+a,t+r,5,!0),this.v.setTripleAt(e+n-i,t+r,e+n-a,t+r,e+n-i,t+r,6,!0),this.v.setTripleAt(e+n,t+r-i,e+n,t+r-i,e+n,t+r-a,7,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:r},extendPrototype([DynamicPropertyContainer],e),e}();function p(e,t,n){var r;return n===3||n===4?r=(n===3?t.pt:t.ks).k.length?new l(e,t,n):new s(e,t,n):n===5?r=new f(e,t):n===6?r=new u(e,t):n===7&&(r=new d(e,t)),r.k&&e.addDynamicProperty(r),r}function m(){return s}function g(){return l}var _={};return _.getShapeProp=p,_.getConstructorFunction=m,_.getKeyframedConstructorFunction=g,_}(),Matrix=function(){var e=Math.cos,t=Math.sin,n=Math.tan,r=Math.round;function i(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=0,this.props[4]=0,this.props[5]=1,this.props[6]=0,this.props[7]=0,this.props[8]=0,this.props[9]=0,this.props[10]=1,this.props[11]=0,this.props[12]=0,this.props[13]=0,this.props[14]=0,this.props[15]=1,this}function a(n){if(n===0)return this;var r=e(n),i=t(n);return this._t(r,-i,0,0,i,r,0,0,0,0,1,0,0,0,0,1)}function o(n){if(n===0)return this;var r=e(n),i=t(n);return this._t(1,0,0,0,0,r,-i,0,0,i,r,0,0,0,0,1)}function s(n){if(n===0)return this;var r=e(n),i=t(n);return this._t(r,0,i,0,0,1,0,0,-i,0,r,0,0,0,0,1)}function c(n){if(n===0)return this;var r=e(n),i=t(n);return this._t(r,-i,0,0,i,r,0,0,0,0,1,0,0,0,0,1)}function l(e,t){return this._t(1,t,e,1,0,0)}function u(e,t){return this.shear(n(e),n(t))}function d(r,i){var a=e(i),o=t(i);return this._t(a,o,0,0,-o,a,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,n(r),1,0,0,0,0,1,0,0,0,0,1)._t(a,-o,0,0,o,a,0,0,0,0,1,0,0,0,0,1)}function f(e,t,n){return!n&&n!==0&&(n=1),e===1&&t===1&&n===1?this:this._t(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1)}function p(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,g){return this.props[0]=e,this.props[1]=t,this.props[2]=n,this.props[3]=r,this.props[4]=i,this.props[5]=a,this.props[6]=o,this.props[7]=s,this.props[8]=c,this.props[9]=l,this.props[10]=u,this.props[11]=d,this.props[12]=f,this.props[13]=p,this.props[14]=m,this.props[15]=g,this}function m(e,t,n){return n||=0,e!==0||t!==0||n!==0?this._t(1,0,0,0,0,1,0,0,0,0,1,0,e,t,n,1):this}function g(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,g){var _=this.props;if(e===1&&t===0&&n===0&&r===0&&i===0&&a===1&&o===0&&s===0&&c===0&&l===0&&u===1&&d===0)return _[12]=_[12]*e+_[15]*f,_[13]=_[13]*a+_[15]*p,_[14]=_[14]*u+_[15]*m,_[15]*=g,this._identityCalculated=!1,this;var y=_[0],b=_[1],x=_[2],S=_[3],C=_[4],T=_[5],E=_[6],D=_[7],O=_[8],k=_[9],A=_[10],j=_[11],M=_[12],N=_[13],P=_[14],F=_[15];return _[0]=y*e+b*i+x*c+S*f,_[1]=y*t+b*a+x*l+S*p,_[2]=y*n+b*o+x*u+S*m,_[3]=y*r+b*s+x*d+S*g,_[4]=C*e+T*i+E*c+D*f,_[5]=C*t+T*a+E*l+D*p,_[6]=C*n+T*o+E*u+D*m,_[7]=C*r+T*s+E*d+D*g,_[8]=O*e+k*i+A*c+j*f,_[9]=O*t+k*a+A*l+j*p,_[10]=O*n+k*o+A*u+j*m,_[11]=O*r+k*s+A*d+j*g,_[12]=M*e+N*i+P*c+F*f,_[13]=M*t+N*a+P*l+F*p,_[14]=M*n+N*o+P*u+F*m,_[15]=M*r+N*s+P*d+F*g,this._identityCalculated=!1,this}function _(e){var t=e.props;return this.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}function y(){return this._identityCalculated||=(this._identity=!(this.props[0]!==1||this.props[1]!==0||this.props[2]!==0||this.props[3]!==0||this.props[4]!==0||this.props[5]!==1||this.props[6]!==0||this.props[7]!==0||this.props[8]!==0||this.props[9]!==0||this.props[10]!==1||this.props[11]!==0||this.props[12]!==0||this.props[13]!==0||this.props[14]!==0||this.props[15]!==1),!0),this._identity}function b(e){for(var t=0;t<16;){if(e.props[t]!==this.props[t])return!1;t+=1}return!0}function x(e){var t;for(t=0;t<16;t+=1)e.props[t]=this.props[t];return e}function S(e){var t;for(t=0;t<16;t+=1)this.props[t]=e[t]}
10function C(e,t,n){return{x:e*this.props[0]+t*this.props[4]+n*this.props[8]+this.props[12],y:e*this.props[1]+t*this.props[5]+n*this.props[9]+this.props[13],z:e*this.props[2]+t*this.props[6]+n*this.props[10]+this.props[14]}}function T(e,t,n){return e*this.props[0]+t*this.props[4]+n*this.props[8]+this.props[12]}function E(e,t,n){return e*this.props[1]+t*this.props[5]+n*this.props[9]+this.props[13]}function D(e,t,n){return e*this.props[2]+t*this.props[6]+n*this.props[10]+this.props[14]}function O(){var e=this.props[0]*this.props[5]-this.props[1]*this.props[4],t=this.props[5]/e,n=-this.props[1]/e,r=-this.props[4]/e,i=this.props[0]/e,a=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/e,o=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/e,s=new Matrix;return s.props[0]=t,s.props[1]=n,s.props[4]=r,s.props[5]=i,s.props[12]=a,s.props[13]=o,s}function k(e){return this.getInverseMatrix().applyToPointArray(e[0],e[1],e[2]||0)}function A(e){var t,n=e.length,r=[];for(t=0;t<n;t+=1)r[t]=k(e[t]);return r}function j(e,t,n){var r=createTypedArray(`float32`,6);if(this.isIdentity())r[0]=e[0],r[1]=e[1],r[2]=t[0],r[3]=t[1],r[4]=n[0],r[5]=n[1];else{var i=this.props[0],a=this.props[1],o=this.props[4],s=this.props[5],c=this.props[12],l=this.props[13];r[0]=e[0]*i+e[1]*o+c,r[1]=e[0]*a+e[1]*s+l,r[2]=t[0]*i+t[1]*o+c,r[3]=t[0]*a+t[1]*s+l,r[4]=n[0]*i+n[1]*o+c,r[5]=n[0]*a+n[1]*s+l}return r}function M(e,t,n){return this.isIdentity()?[e,t,n]:[e*this.props[0]+t*this.props[4]+n*this.props[8]+this.props[12],e*this.props[1]+t*this.props[5]+n*this.props[9]+this.props[13],e*this.props[2]+t*this.props[6]+n*this.props[10]+this.props[14]]}function N(e,t){if(this.isIdentity())return e+`,`+t;var n=this.props;return Math.round((e*n[0]+t*n[4]+n[12])*100)/100+`,`+Math.round((e*n[1]+t*n[5]+n[13])*100)/100}function P(){for(var e=0,t=this.props,n=`matrix3d(`,i=1e4;e<16;)n+=r(t[e]*i)/i,n+=e===15?`)`:`,`,e+=1;return n}function F(e){var t=1e4;return e<1e-6&&e>0||e>-1e-6&&e<0?r(e*t)/t:e}function I(){var e=this.props,t=F(e[0]),n=F(e[1]),r=F(e[4]),i=F(e[5]),a=F(e[12]),o=F(e[13]);return`matrix(`+t+`,`+n+`,`+r+`,`+i+`,`+a+`,`+o+`)`}return function(){this.reset=i,this.rotate=a,this.rotateX=o,this.rotateY=s,this.rotateZ=c,this.skew=u,this.skewFromAxis=d,this.shear=l,this.scale=f,this.setTransform=p,this.translate=m,this.transform=g,this.multiply=_,this.applyToPoint=C,this.applyToX=T,this.applyToY=E,this.applyToZ=D,this.applyToPointArray=M,this.applyToTriplePoints=j,this.applyToPointStringified=N,this.toCSS=P,this.to2dCSS=I,this.clone=x,this.cloneFromProps=S,this.equals=b,this.inversePoints=A,this.inversePoint=k,this.getInverseMatrix=O,this._t=this.transform,this.isIdentity=y,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray(`float32`,16),this.reset()}}();function _typeof$3(e){"@babel/helpers - typeof";return _typeof$3=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},_typeof$3(e)}var lottie={},standalone=`__[STANDALONE]__`,animationData=`__[ANIMATIONDATA]__`,renderer=``;function setLocation(e){setLocationHref(e)}function searchAnimations(){standalone===!0?animationManager.searchAnimations(animationData,standalone,renderer):animationManager.searchAnimations()}function setSubframeRendering(e){setSubframeEnabled(e)}function setPrefix(e){setIdPrefix(e)}function loadAnimation(e){return standalone===!0&&(e.animationData=JSON.parse(animationData)),animationManager.loadAnimation(e)}function setQuality(e){if(typeof e==`string`)switch(e){case`high`:setDefaultCurveSegments(200);break;default:case`medium`:setDefaultCurveSegments(50);break;case`low`:setDefaultCurveSegments(10);break}else !isNaN(e)&&e>1&&setDefaultCurveSegments(e);getDefaultCurveSegments()>=50?roundValues(!1):roundValues(!0)}function inBrowser(){return typeof navigator<`u`}function installPlugin(e,t){e===`expressions`&&setExpressionsPlugin(t)}function getFactory(e){switch(e){case`propertyFactory`:return PropertyFactory;case`shapePropertyFactory`:return ShapePropertyFactory;case`matrix`:return Matrix;default:return null}}lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocation,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=setWebWorker,lottie.setIDPrefix=setPrefix,lottie.__getFactory=getFactory,lottie.version=`5.13.0`;function checkReady(){document.readyState===`complete`&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(e){for(var t=queryString.split(`&`),n=0;n<t.length;n+=1){var r=t[n].split(`=`);
vendor: 15,212 bytes, line 10
10if(decodeURIComponent(r[0])==e)return decodeURIComponent(r[1])}return null}var queryString=``;if(standalone){var scripts=document.getElementsByTagName(`script`),myScript=scripts[scripts.length-1]||{src:``};queryString=myScript.src?myScript.src.replace(/^[^\?]+\??/,``):``,renderer=getQueryVariable(`renderer`)}var readyStateCheckInterval=setInterval(checkReady,100);try{!((exports===void 0?`undefined`:_typeof$3(exports))===`object`&&module!==void 0)&&!(typeof define==`function`&&define.amd)&&(window.bodymovin=lottie)}catch{}var ShapeModifiers=function(){var e={},t={};e.registerModifier=n,e.getModifier=r;function n(e,n){t[e]||(t[e]=n)}function r(e,n,r){return new t[e](n,r)}return e}();function ShapeModifier(){}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(e){if(!this.closed){e.sh.container.addDynamicProperty(e.sh);var t={shape:e.sh,data:e,localShapeCollection:shapeCollectionPool.newShapeCollection()};this.shapes.push(t),this.addShapeToModifier(t),this._isAnimated&&e.setAsAnimated()}},ShapeModifier.prototype.init=function(e,t){this.shapes=[],this.elem=e,this.initDynamicPropertyContainer(e),this.initModifierProperties(e,t),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},extendPrototype([DynamicPropertyContainer],ShapeModifier);function TrimModifier(){}extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(e,t){this.s=PropertyFactory.getProp(e,t.s,0,.01,this),this.e=PropertyFactory.getProp(e,t.e,0,.01,this),this.o=PropertyFactory.getProp(e,t.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=t.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(e){e.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(e,t,n,r,i){var a=[];t<=1?a.push({s:e,e:t}):e>=1?a.push({s:e-1,e:t-1}):(a.push({s:e,e:1}),a.push({s:0,e:t-1}));var o=[],s,c=a.length,l;for(s=0;s<c;s+=1)if(l=a[s],!(l.e*i<r||l.s*i>r+n)){var u=l.s*i<=r?0:(l.s*i-r)/n,d=l.e*i>=r+n?1:(l.e*i-r)/n;o.push([u,d])}return o.length||o.push([0,0]),o},TrimModifier.prototype.releasePathsData=function(e){var t,n=e.length;for(t=0;t<n;t+=1)segmentsLengthPool.release(e[t]);return e.length=0,e},TrimModifier.prototype.processShapes=function(e){var t,n;if(this._mdf||e){var r=this.o.v%360/360;if(r<0&&(r+=1),t=this.s.v>1?1+r:this.s.v<0?0+r:this.s.v+r,n=this.e.v>1?1+r:this.e.v<0?0+r:this.e.v+r,t>n){var i=t;t=n,n=i}t=Math.round(t*1e4)*1e-4,n=Math.round(n*1e4)*1e-4,this.sValue=t,this.eValue=n}else t=this.sValue,n=this.eValue;var a,o,s=this.shapes.length,c,l,u,d,f,p=0;if(n===t)for(o=0;o<s;o+=1)this.shapes[o].localShapeCollection.releaseShapes(),this.shapes[o].shape._mdf=!0,this.shapes[o].shape.paths=this.shapes[o].localShapeCollection,this._mdf&&(this.shapes[o].pathsData.length=0);else if(!(n===1&&t===0||n===0&&t===1)){var m=[],g,_;for(o=0;o<s;o+=1)if(g=this.shapes[o],!g.shape._mdf&&!this._mdf&&!e&&this.m!==2)g.shape.paths=g.localShapeCollection;else{if(a=g.shape.paths,l=a._length,f=0,!g.shape._mdf&&g.pathsData.length)f=g.totalShapeLength;else{for(u=this.releasePathsData(g.pathsData),c=0;c<l;c+=1)d=bez.getSegmentsLength(a.shapes[c]),u.push(d),f+=d.totalLength;g.totalShapeLength=f,g.pathsData=u}p+=f,g.shape._mdf=!0}var y=t,b=n,x=0,S;for(o=s-1;o>=0;--o)if(g=this.shapes[o],g.shape._mdf){for(_=g.localShapeCollection,_.releaseShapes(),this.m===2&&s>1?(S=this.calculateShapeEdges(t,n,g.totalShapeLength,x,p),x+=g.totalShapeLength):S=[[y,b]],l=S.length,c=0;c<l;c+=1){y=S[c][0],b=S[c][1],m.length=0,b<=1?m.push({s:g.totalShapeLength*y,e:g.totalShapeLength*b}):y>=1?m.push({s:g.totalShapeLength*(y-1),e:g.totalShapeLength*(b-1)}):(m.push({s:g.totalShapeLength*y,e:g.totalShapeLength}),m.push({s:0,e:g.totalShapeLength*(b-1)}));var C=this.addShapes(g,m[0]);if(m[0].s!==m[0].e){if(m.length>1)if(g.shape.paths.shapes[g.shape.paths._length-1].c){var T=C.pop();this.addPaths(C,_),C=this.addShapes(g,m[1],T)}else this.addPaths(C,_),C=this.addShapes(g,m[1]);this.addPaths(C,_)}}g.shape.paths=_}}else if(this._mdf)for(o=0;o<s;o+=1)this.shapes[o].pathsData.length=0,this.shapes[o].shape._mdf=!0},TrimModifier.prototype.addPaths=function(e,t){var n,r=e.length;for(n=0;n<r;n+=1)t.addShape(e[n])},TrimModifier.prototype.addSegment=function(e,t,n,r,i,a,o){i.setXYAt(t[0],t[1],`o`,a),i.setXYAt(n[0],n[1],`i`,a+1),o&&i.setXYAt(e[0],e[1],`v`,a),i.setXYAt(r[0],r[1],`v`,a+1)},TrimModifier.prototype.addSegmentFromArray=function(e,t,n,r){t.setXYAt(e[1],e[5],`o`,n),t.setXYAt(e[2],e[6],`i`,n+1),r&&t.setXYAt(e[0],e[4],`v`,n),t.setXYAt(e[3],e[7],`v`,n+1)},TrimModifier.prototype.addShapes=function(e,t,n){var r=e.pathsData,i=e.shape.paths.shapes,a,o=e.shape.paths._length,s,c,l=0,u,d,f,p,m=[],g,_=!0;for(n?(d=n._length,g=n._length):(n=shapePool.newElement(),d=0,g=0),m.push(n),a=0;a<o;a+=1){for(f=r[a].lengths,n.c=i[a].c,c=i[a].c?f.length:f.length+1,s=1;s<c;s+=1)if(u=f[s-1],l+u.addedLength<t.s)l+=u.addedLength,n.c=!1;else if(l>t.e){n.c=!1;break}else t.s<=l&&t.e>=l+u.addedLength?(this.addSegment(i[a].v[s-1],i[a].o[s-1],i[a].i[s],i[a].v[s],n,d,_),_=!1):(p=bez.getNewSegment(i[a].v[s-1],i[a].v[s],i[a].o[s-1],i[a].i[s],(t.s-l)/u.addedLength,(t.e-l)/u.addedLength,f[s-1]),this.addSegmentFromArray(p,n,d,_),_=!1,n.c=!1),l+=u.addedLength,d+=1;if(i[a].c&&f.length){if(u=f[s-1],l<=t.e){var y=f[s-1].addedLength;t.s<=l&&t.e>=l+y?(this.addSegment(i[a].v[s-1],i[a].o[s-1],i[a].i[0],i[a].v[0],n,d,_),_=!1):(p=bez.getNewSegment(i[a].v[s-1],i[a].v[0],i[a].o[s-1],i[a].i[0],(t.s-l)/y,(t.e-l)/y,f[s-1]),this.addSegmentFromArray(p,n,d,_),_=!1,n.c=!1)}else n.c=!1;l+=u.addedLength,d+=1}if(n._length&&(n.setXYAt(n.v[g][0],n.v[g][1],`i`,g),n.setXYAt(n.v[n._length-1][0],n.v[n._length-1][1],`o`,n._length-1)),l>t.e)break;a<o-1&&(n=shapePool.newElement(),_=!0,m.push(n),d=0)}return m};function PuckerAndBloatModifier(){}extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(e,t.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(e,t){var n=t/100,r=[0,0],i=e._length,a=0;for(a=0;a<i;a+=1)r[0]+=e.v[a][0],r[1]+=e.v[a][1];r[0]/=i,r[1]/=i;var o=shapePool.newElement();o.c=e.c;var s,c,l,u,d,f;for(a=0;a<i;a+=1)s=e.v[a][0]+(r[0]-e.v[a][0])*n,c=e.v[a][1]+(r[1]-e.v[a][1])*n,l=e.o[a][0]+(r[0]-e.o[a][0])*-n,u=e.o[a][1]+(r[1]-e.o[a][1])*-n,d=e.i[a][0]+(r[0]-e.i[a][0])*-n,f=e.i[a][1]+(r[1]-e.i[a][1])*-n,o.setTripleAt(s,c,l,u,d,f,a);return o},PuckerAndBloatModifier.prototype.processShapes=function(e){var t,n,r=this.shapes.length,i,a,o=this.amount.v;if(o!==0){var s,c;for(n=0;n<r;n+=1){if(s=this.shapes[n],c=s.localShapeCollection,!(!s.shape._mdf&&!this._mdf&&!e))for(c.releaseShapes(),s.shape._mdf=!0,t=s.shape.paths.shapes,a=s.shape.paths._length,i=0;i<a;i+=1)c.addShape(this.processPath(t[i],o));s.shape.paths=s.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};var TransformPropertyFactory=function(){var e=[0,0];function t(e){var t=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||t,this.a&&e.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&e.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&e.skewFromAxis(-this.sk.v,this.sa.v),this.r?e.rotate(-this.r.v):e.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?this.data.p.z?e.translate(this.px.v,this.py.v,-this.pz.v):e.translate(this.px.v,this.py.v,0):e.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}function n(t){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&=(this.precalculateMatrix(),!1),this.iterateDynamicProperties(),this._mdf||t){var n;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.autoOriented){var r,i;if(n=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(r=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/n,0),i=this.p.getValueAtTime(this.p.keyframes[0].t/n,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(r=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/n,0),i=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/n,0)):(r=this.p.pv,i=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/n,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){r=[],i=[];var a=this.px,o=this.py;a._caching.lastFrame+a.offsetTime<=a.keyframes[0].t?(r[0]=a.getValueAtTime((a.keyframes[0].t+.01)/n,0),r[1]=o.getValueAtTime((o.keyframes[0].t+.01)/n,0),i[0]=a.getValueAtTime(a.keyframes[0].t/n,0),i[1]=o.getValueAtTime(o.keyframes[0].t/n,0)):a._caching.lastFrame+a.offsetTime>=a.keyframes[a.keyframes.length-1].t?(r[0]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/n,0),r[1]=o.getValueAtTime(o.keyframes[o.keyframes.length-1].t/n,0),i[0]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/n,0),i[1]=o.getValueAtTime((o.keyframes[o.keyframes.length-1].t-.01)/n,0)):(r=[a.pv,o.pv],i[0]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/n,a.offsetTime),i[1]=o.getValueAtTime((o._caching.lastFrame+o.offsetTime-.01)/n,o.offsetTime))}else i=e,r=i;this.v.rotate(-Math.atan2(r[1]-i[1],r[0]-i[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}}function r(){if(this.appliedTransformations=0,this.pre.reset(),!this.a.effectsSequence.length)this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1;else return;if(!this.s.effectsSequence.length)this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2;else return;if(this.sk)if(!this.sk.effectsSequence.length&&!this.sa.effectsSequence.length)this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3;else return;this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):!this.rz.effectsSequence.length&&!this.ry.effectsSequence.length&&!this.rx.effectsSequence.length&&!this.or.effectsSequence.length&&(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}function i(){}function a(e){this._addDynamicProperty(e),this.elem.addDynamicProperty(e),this._isDirty=!0}function o(e,t,n){if(this.elem=e,this.frameId=-1,this.propType=`transform`,this.data=t,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(n||e),t.p&&t.p.s?(this.px=PropertyFactory.getProp(e,t.p.x,0,0,this),this.py=PropertyFactory.getProp(e,t.p.y,0,0,this),t.p.z&&(this.pz=PropertyFactory.getProp(e,t.p.z,0,0,this))):this.p=PropertyFactory.getProp(e,t.p||{k:[0,0,0]},1,0,this),t.rx){if(this.rx=PropertyFactory.getProp(e,t.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(e,t.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(e,t.rz,0,degToRads,this),t.or.k[0].ti){var r,i=t.or.k.length;for(r=0;r<i;r+=1)t.or.k[r].to=null,t.or.k[r].ti=null}this.or=PropertyFactory.getProp(e,t.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(e,t.r||{k:0},0,degToRads,this);t.sk&&(this.sk=PropertyFactory.getProp(e,t.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(e,t.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(e,t.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(e,t.s||{k:[100,100,100]},1,.01,this),t.o?this.o=PropertyFactory.getProp(e,t.o,0,.01,e):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}o.prototype={applyToMatrix:t,getValue:n,precalculateMatrix:r,autoOrient:i},extendPrototype([DynamicPropertyContainer],o),o.prototype.addDynamicProperty=a,o.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty;function s(e,t,n){return new o(e,t,n)}return{getTransformProperty:s}}();function RepeaterModifier(){}extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(e,t.c,0,null,this),this.o=PropertyFactory.getProp(e,t.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(e,t.tr,this),this.so=PropertyFactory.getProp(e,t.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(e,t.tr.eo,0,.01,this),this.data=t,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(e,t,n,r,i,a){var o=a?-1:1,s=r.s.v[0]+(1-r.s.v[0])*(1-i),c=r.s.v[1]+(1-r.s.v[1])*(1-i);e.translate(r.p.v[0]*o*i,r.p.v[1]*o*i,r.p.v[2]),t.translate(-r.a.v[0],-r.a.v[1],r.a.v[2]),t.rotate(-r.r.v*o*i),t.translate(r.a.v[0],r.a.v[1],r.a.v[2]),n.translate(-r.a.v[0],-r.a.v[1],r.a.v[2]),n.scale(a?1/s:s,a?1/c:c),n.translate(r.a.v[0],r.a.v[1],r.a.v[2])},RepeaterModifier.prototype.init=function(e,t,n,r){for(this.elem=e,this.arr=t,this.pos=n,this.elemsData=r,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(e),this.initModifierProperties(e,t[n]);n>0;)--n,this._elements.unshift(t[n]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(e){var t,n=e.length;for(t=0;t<n;t+=1)e[t]._processed=!1,e[t].ty===`gr`&&this.resetElements(e[t].it)},RepeaterModifier.prototype.cloneElements=function(e){var t=JSON.parse(JSON.stringify(e));return this.resetElements(t),t},RepeaterModifier.prototype.changeGroupRender=function(e,t){var n,r=e.length;for(n=0;n<r;n+=1)e[n]._render=t,e[n].ty===`gr`&&this.changeGroupRender(e[n].it,t)},RepeaterModifier.prototype.processShapes=function(e){var t,n,r,i,a,o=!1;if(this._mdf||e){var s=Math.ceil(this.c.v);if(this._groups.length<s){for(;this._groups.length<s;){var c={it:this.cloneElements(this._elements),ty:`gr`};c.it.push({a:{a:0,ix:1,k:[0,0]},nm:`Transform`,o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:1,ix:6,k:[{s:0,e:0,t:0},{s:0,e:0,t:1}]}
10,s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:`tr`}),this.arr.splice(0,0,c),this._groups.splice(0,0,c),this._currentCopies+=1}this.elem.reloadShapes(),o=!0}a=0;var l;for(r=0;r<=this._groups.length-1;r+=1){if(l=a<s,this._groups[r]._render=l,this.changeGroupRender(this._groups[r].it,l),!l){var u=this.elemsData[r].it,d=u[u.length-1];d.transform.op.v===0?d.transform.op._mdf=!1:(d.transform.op._mdf=!0,d.transform.op.v=0)}a+=1}this._currentCopies=s;var f=this.o.v,p=f%1,m=f>0?Math.floor(f):Math.ceil(f),g=this.pMatrix.props,_=this.rMatrix.props,y=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var b=0;if(f>0){for(;b<m;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),b+=1;p&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,p,!1),b+=p)}else if(f<0){for(;b>m;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),--b;p&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-p,!0),b-=p)}r=this.data.m===1?0:this._currentCopies-1,i=this.data.m===1?1:-1,a=this._currentCopies;for(var x,S;a;){if(t=this.elemsData[r].it,n=t[t.length-1].transform.mProps.v.props,S=n.length,t[t.length-1].transform.mProps._mdf=!0,t[t.length-1].transform.op._mdf=!0,t[t.length-1].transform.op.v=this._currentCopies===1?this.so.v:this.so.v+(this.eo.v-this.so.v)*(r/(this._currentCopies-1)),b!==0){for((r!==0&&i===1||r!==this._currentCopies-1&&i===-1)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(_[0],_[1],_[2],_[3],_[4],_[5],_[6],_[7],_[8],_[9],_[10],_[11],_[12],_[13],_[14],_[15]),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),x=0;x<S;x+=1)n[x]=this.matrix.props[x];this.matrix.reset()}else for(this.matrix.reset(),x=0;x<S;x+=1)n[x]=this.matrix.props[x];b+=1,--a,r+=i}}else for(a=this._currentCopies,r=0,i=1;a;)t=this.elemsData[r].it,n=t[t.length-1].transform.mProps.v.props,t[t.length-1].transform.mProps._mdf=!1,t[t.length-1].transform.op._mdf=!1,--a,r+=i;return o},RepeaterModifier.prototype.addShape=function(){};function RoundCornersModifier(){}extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(e,t.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(e,t){var n=shapePool.newElement();n.c=e.c;var r,i=e._length,a,o,s,c,l,u,d=0,f,p,m,g,_,y;for(r=0;r<i;r+=1)a=e.v[r],s=e.o[r],o=e.i[r],a[0]===s[0]&&a[1]===s[1]&&a[0]===o[0]&&a[1]===o[1]?(r===0||r===i-1)&&!e.c?(n.setTripleAt(a[0],a[1],s[0],s[1],o[0],o[1],d),d+=1):(c=r===0?e.v[i-1]:e.v[r-1],l=Math.sqrt((a[0]-c[0])**2+(a[1]-c[1])**2),u=l?Math.min(l/2,t)/l:0,_=a[0]+(c[0]-a[0])*u,f=_,y=a[1]-(a[1]-c[1])*u,p=y,m=f-(f-a[0])*roundCorner,g=p-(p-a[1])*roundCorner,n.setTripleAt(f,p,m,g,_,y,d),d+=1,c=r===i-1?e.v[0]:e.v[r+1],l=Math.sqrt((a[0]-c[0])**2+(a[1]-c[1])**2),u=l?Math.min(l/2,t)/l:0,m=a[0]+(c[0]-a[0])*u,f=m,g=a[1]+(c[1]-a[1])*u,p=g,_=f-(f-a[0])*roundCorner,y=p-(p-a[1])*roundCorner,n.setTripleAt(f,p,m,g,_,y,d),d+=1):(n.setTripleAt(e.v[r][0],e.v[r][1],e.o[r][0],e.o[r][1],e.i[r][0],e.i[r][1],d),d+=1);return n},RoundCornersModifier.prototype.processShapes=function(e){var t,n,r=this.shapes.length,i,a,o=this.rd.v;if(o!==0){var s,c;for(n=0;n<r;n+=1){if(s=this.shapes[n],c=s.localShapeCollection,!(!s.shape._mdf&&!this._mdf&&!e))for(c.releaseShapes(),s.shape._mdf=!0,t=s.shape.paths.shapes,a=s.shape.paths._length,i=0;i<a;i+=1)c.addShape(this.processPath(t[i],o));s.shape.paths=s.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function floatEqual(e,t){return Math.abs(e-t)*1e5<=Math.min(Math.abs(e),Math.abs(t))}function floatZero(e){return Math.abs(e)<=1e-5}function lerp(e,t,n){return e*(1-n)+t*n}function lerpPoint(e,t,n){return[lerp(e[0],t[0],n),lerp(e[1],t[1],n)]}
vendor: 10,556 bytes, line 10
10function quadRoots(e,t,n){if(e===0)return[];var r=t*t-4*e*n;if(r<0)return[];var i=-t/(2*e);if(r===0)return[i];var a=Math.sqrt(r)/(2*e);return[i-a,i+a]}function polynomialCoefficients(e,t,n,r){return[-e+3*t-3*n+r,3*e-6*t+3*n,-3*e+3*t,e]}function singlePoint(e){return new PolynomialBezier(e,e,e,e,!1)}function PolynomialBezier(e,t,n,r,i){i&&pointEqual(e,t)&&(t=lerpPoint(e,r,1/3)),i&&pointEqual(n,r)&&(n=lerpPoint(e,r,2/3));var a=polynomialCoefficients(e[0],t[0],n[0],r[0]),o=polynomialCoefficients(e[1],t[1],n[1],r[1]);this.a=[a[0],o[0]],this.b=[a[1],o[1]],this.c=[a[2],o[2]],this.d=[a[3],o[3]],this.points=[e,t,n,r]}PolynomialBezier.prototype.point=function(e){return[((this.a[0]*e+this.b[0])*e+this.c[0])*e+this.d[0],((this.a[1]*e+this.b[1])*e+this.c[1])*e+this.d[1]]},PolynomialBezier.prototype.derivative=function(e){return[(3*e*this.a[0]+2*this.b[0])*e+this.c[0],(3*e*this.a[1]+2*this.b[1])*e+this.c[1]]},PolynomialBezier.prototype.tangentAngle=function(e){var t=this.derivative(e);return Math.atan2(t[1],t[0])},PolynomialBezier.prototype.normalAngle=function(e){var t=this.derivative(e);return Math.atan2(t[0],t[1])},PolynomialBezier.prototype.inflectionPoints=function(){var e=this.a[1]*this.b[0]-this.a[0]*this.b[1];if(floatZero(e))return[];var t=-.5*(this.a[1]*this.c[0]-this.a[0]*this.c[1])/e,n=t*t-1/3*(this.b[1]*this.c[0]-this.b[0]*this.c[1])/e;if(n<0)return[];var r=Math.sqrt(n);return floatZero(r)?r>0&&r<1?[t]:[]:[t-r,t+r].filter(function(e){return e>0&&e<1})},PolynomialBezier.prototype.split=function(e){if(e<=0)return[singlePoint(this.points[0]),this];if(e>=1)return[this,singlePoint(this.points[this.points.length-1])];var t=lerpPoint(this.points[0],this.points[1],e),n=lerpPoint(this.points[1],this.points[2],e),r=lerpPoint(this.points[2],this.points[3],e),i=lerpPoint(t,n,e),a=lerpPoint(n,r,e),o=lerpPoint(i,a,e);return[new PolynomialBezier(this.points[0],t,i,o,!0),new PolynomialBezier(o,a,r,this.points[3],!0)]};function extrema(e,t){var n=e.points[0][t],r=e.points[e.points.length-1][t];if(n>r){var i=r;r=n,n=i}for(var a=quadRoots(3*e.a[t],2*e.b[t],e.c[t]),o=0;o<a.length;o+=1)if(a[o]>0&&a[o]<1){var s=e.point(a[o])[t];s<n?n=s:s>r&&(r=s)}return{min:n,max:r}}PolynomialBezier.prototype.bounds=function(){return{x:extrema(this,0),y:extrema(this,1)}},PolynomialBezier.prototype.boundingBox=function(){var e=this.bounds();return{left:e.x.min,right:e.x.max,top:e.y.min,bottom:e.y.max,width:e.x.max-e.x.min,height:e.y.max-e.y.min,cx:(e.x.max+e.x.min)/2,cy:(e.y.max+e.y.min)/2}};function intersectData(e,t,n){var r=e.boundingBox();return{cx:r.cx,cy:r.cy,width:r.width,height:r.height,bez:e,t:(t+n)/2,t1:t,t2:n}}function splitData(e){var t=e.bez.split(.5);return[intersectData(t[0],e.t1,e.t),intersectData(t[1],e.t,e.t2)]}function boxIntersect(e,t){return Math.abs(e.cx-t.cx)*2<e.width+t.width&&Math.abs(e.cy-t.cy)*2<e.height+t.height}function intersectsImpl(e,t,n,r,i,a){if(boxIntersect(e,t)){if(n>=a||e.width<=r&&e.height<=r&&t.width<=r&&t.height<=r){i.push([e.t,t.t]);return}var o=splitData(e),s=splitData(t);intersectsImpl(o[0],s[0],n+1,r,i,a),intersectsImpl(o[0],s[1],n+1,r,i,a),intersectsImpl(o[1],s[0],n+1,r,i,a),intersectsImpl(o[1],s[1],n+1,r,i,a)}}PolynomialBezier.prototype.intersections=function(e,t,n){t===void 0&&(t=2),n===void 0&&(n=7);var r=[];return intersectsImpl(intersectData(this,0,1),intersectData(e,0,1),0,t,r,n),r},PolynomialBezier.shapeSegment=function(e,t){var n=(t+1)%e.length();return new PolynomialBezier(e.v[t],e.o[t],e.i[n],e.v[n],!0)},PolynomialBezier.shapeSegmentInverted=function(e,t){var n=(t+1)%e.length();return new PolynomialBezier(e.v[n],e.i[n],e.o[t],e.v[t],!0)};function crossProduct(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function lineIntersection(e,t,n,r){var i=[e[0],e[1],1],a=[t[0],t[1],1],o=[n[0],n[1],1],s=[r[0],r[1],1],c=crossProduct(crossProduct(i,a),crossProduct(o,s));return floatZero(c[2])?null:[c[0]/c[2],c[1]/c[2]]}function polarOffset(e,t,n){return[e[0]+Math.cos(t)*n,e[1]-Math.sin(t)*n]}function pointDistance(e,t){return Math.hypot(e[0]-t[0],e[1]-t[1])}function pointEqual(e,t){return floatEqual(e[0],t[0])&&floatEqual(e[1],t[1])}function ZigZagModifier(){}extendPrototype([ShapeModifier],ZigZagModifier),ZigZagModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amplitude=PropertyFactory.getProp(e,t.s,0,null,this),this.frequency=PropertyFactory.getProp(e,t.r,0,null,this),this.pointsType=PropertyFactory.getProp(e,t.pt,0,null,this),this._isAnimated=this.amplitude.effectsSequence.length!==0||this.frequency.effectsSequence.length!==0||this.pointsType.effectsSequence.length!==0};function setPoint(e,t,n,r,i,a,o){var s=n-Math.PI/2,c=n+Math.PI/2,l=t[0]+Math.cos(n)*r*i,u=t[1]-Math.sin(n)*r*i;e.setTripleAt(l,u,l+Math.cos(s)*a,u-Math.sin(s)*a,l+Math.cos(c)*o,u-Math.sin(c)*o,e.length())}function getPerpendicularVector(e,t){var n=[t[0]-e[0],t[1]-e[1]],r=-Math.PI*.5;return[Math.cos(r)*n[0]-Math.sin(r)*n[1],Math.sin(r)*n[0]+Math.cos(r)*n[1]]}function getProjectingAngle(e,t){var n=t===0?e.length()-1:t-1,r=(t+1)%e.length(),i=e.v[n],a=e.v[r],o=getPerpendicularVector(i,a);return Math.atan2(0,1)-Math.atan2(o[1],o[0])}function zigZagCorner(e,t,n,r,i,a,o){var s=getProjectingAngle(t,n),c=t.v[n%t._length],l=t.v[n===0?t._length-1:n-1],u=t.v[(n+1)%t._length],d=a===2?Math.sqrt((c[0]-l[0])**2+(c[1]-l[1])**2):0,f=a===2?Math.sqrt((c[0]-u[0])**2+(c[1]-u[1])**2):0;setPoint(e,t.v[n%t._length],s,o,r,f/((i+1)*2),d/((i+1)*2),a)}function zigZagSegment(e,t,n,r,i,a){for(var o=0;o<r;o+=1){var s=(o+1)/(r+1),c=i===2?Math.sqrt((t.points[3][0]-t.points[0][0])**2+(t.points[3][1]-t.points[0][1])**2):0,l=t.normalAngle(s);setPoint(e,t.point(s),l,a,n,c/((r+1)*2),c/((r+1)*2),i),a=-a}return a}ZigZagModifier.prototype.processPath=function(e,t,n,r){var i=e._length,a=shapePool.newElement();if(a.c=e.c,e.c||--i,i===0)return a;var o=-1,s=PolynomialBezier.shapeSegment(e,0);zigZagCorner(a,e,0,t,n,r,o);for(var c=0;c<i;c+=1)o=zigZagSegment(a,s,t,n,r,-o),s=c===i-1&&!e.c?null:PolynomialBezier.shapeSegment(e,(c+1)%i),zigZagCorner(a,e,c+1,t,n,r,o);return a},ZigZagModifier.prototype.processShapes=function(e){var t,n,r=this.shapes.length,i,a,o=this.amplitude.v,s=Math.max(0,Math.round(this.frequency.v)),c=this.pointsType.v;if(o!==0){var l,u;for(n=0;n<r;n+=1){if(l=this.shapes[n],u=l.localShapeCollection,!(!l.shape._mdf&&!this._mdf&&!e))for(u.releaseShapes(),l.shape._mdf=!0,t=l.shape.paths.shapes,a=l.shape.paths._length,i=0;i<a;i+=1)u.addShape(this.processPath(t[i],o,s,c));l.shape.paths=l.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function linearOffset(e,t,n){var r=Math.atan2(t[0]-e[0],t[1]-e[1]);return[polarOffset(e,r,n),polarOffset(t,r,n)]}function offsetSegment(e,t){var n,r,i,a,o,s,c=linearOffset(e.points[0],e.points[1],t);n=c[0],r=c[1],c=linearOffset(e.points[1],e.points[2],t),i=c[0],a=c[1],c=linearOffset(e.points[2],e.points[3],t),o=c[0],s=c[1];var l=lineIntersection(n,r,i,a);l===null&&(l=r);var u=lineIntersection(o,s,i,a);return u===null&&(u=o),new PolynomialBezier(n,l,u,s)}function joinLines(e,t,n,r,i){var a=t.points[3],o=n.points[0];if(r===3||pointEqual(a,o))return a;if(r===2){var s=-t.tangentAngle(1),c=-n.tangentAngle(0)+Math.PI,l=lineIntersection(a,polarOffset(a,s+Math.PI/2,100),o,polarOffset(o,s+Math.PI/2,100)),u=l?pointDistance(l,a):pointDistance(a,o)/2,d=polarOffset(a,s,2*u*roundCorner);return e.setXYAt(d[0],d[1],`o`,e.length()-1),d=polarOffset(o,c,2*u*roundCorner),e.setTripleAt(o[0],o[1],o[0],o[1],d[0],d[1],e.length()),o}var f=lineIntersection(pointEqual(a,t.points[2])?t.points[0]:t.points[2],a,o,pointEqual(o,n.points[1])?n.points[3]:n.points[1]);return f&&pointDistance(f,a)<i?(e.setTripleAt(f[0],f[1],f[0],f[1],f[0],f[1],e.length()),f):a}function getIntersection(e,t){var n=e.intersections(t);return n.length&&floatEqual(n[0][0],1)&&n.shift(),n.length?n[0]:null}function pruneSegmentIntersection(e,t){var n=e.slice(),r=t.slice(),i=getIntersection(e[e.length-1],t[0]);return i&&(n[e.length-1]=e[e.length-1].split(i[0])[0],r[0]=t[0].split(i[1])[1]),e.length>1&&t.length>1&&(i=getIntersection(e[0],t[t.length-1]),i)?[[e[0].split(i[0])[0]],[t[t.length-1].split(i[1])[1]]]:[n,r]}function pruneIntersections(e){for(var t,n=1;n<e.length;n+=1)t=pruneSegmentIntersection(e[n-1],e[n]),e[n-1]=t[0],e[n]=t[1];return e.length>1&&(t=pruneSegmentIntersection(e[e.length-1],e[0]),e[e.length-1]=t[0],e[0]=t[1]),e}function offsetSegmentSplit(e,t){var n=e.inflectionPoints(),r,i,a,o;if(n.length===0)return[offsetSegment(e,t)];if(n.length===1||floatEqual(n[1],1))return a=e.split(n[0]),r=a[0],i=a[1],[offsetSegment(r,t),offsetSegment(i,t)];a=e.split(n[0]),r=a[0];var s=(n[1]-n[0])/(1-n[0]);return a=a[1].split(s),o=a[0],i=a[1],[offsetSegment(r,t),offsetSegment(o,t),offsetSegment(i,t)]}function OffsetPathModifier(){}extendPrototype([ShapeModifier],OffsetPathModifier),OffsetPathModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(e,t.a,0,null,this),this.miterLimit=PropertyFactory.getProp(e,t.ml,0,null,this),this.lineJoin=t.lj,this._isAnimated=this.amount.effectsSequence.length!==0},OffsetPathModifier.prototype.processPath=function(e,t,n,r){var i=shapePool.newElement();i.c=e.c;var a=e.length();e.c||--a;var o,s,c,l=[];for(o=0;o<a;o+=1)c=PolynomialBezier.shapeSegment(e,o),l.push(offsetSegmentSplit(c,t));if(!e.c)for(o=a-1;o>=0;--o)c=PolynomialBezier.shapeSegmentInverted(e,o),l.push(offsetSegmentSplit(c,t));l=pruneIntersections(l);var u=null,d=null;for(o=0;o<l.length;o+=1){var f=l[o];for(d&&(u=joinLines(i,d,f[0],n,r)),d=f[f.length-1],s=0;s<f.length;s+=1)c=f[s],u&&pointEqual(c.points[0],u)?i.setXYAt(c.points[1][0],c.points[1][1],`o`,i.length()-1):i.setTripleAt(c.points[0][0],c.points[0][1],c.points[1][0],c.points[1][1],c.points[0][0],c.points[0][1],i.length()),i.setTripleAt(c.points[3][0],c.points[3][1],c.points[3][0],c.points[3][1],c.points[2][0],c.points[2][1],i.length()),u=c.points[3]}return l.length&&joinLines(i,d,l[0][0],n,r),i},OffsetPathModifier.prototype.processShapes=function(e){var t,n,r=this.shapes.length,i,a,o=this.amount.v,s=this.miterLimit.v,c=this.lineJoin;if(o!==0){var l,u;for(n=0;n<r;n+=1){if(l=this.shapes[n],u=l.localShapeCollection,!(!l.shape._mdf&&!this._mdf&&!e))for(u.releaseShapes(),l.shape._mdf=!0,t=l.shape.paths.shapes,a=l.shape.paths._length,i=0;i<a;i+=1)u.addShape(this.processPath(t[i],o,c,s));l.shape.paths=l.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function getFontProperties(e){for(var t=e.fStyle?e.fStyle.split(` `):[],n=`normal`,r=`normal`,
10i=t.length,a,o=0;o<i;o+=1)switch(a=t[o].toLowerCase(),a){case`italic`:r=`italic`;break;case`bold`:n=`700`;break;case`black`:n=`900`;break;case`medium`:n=`500`;break;case`regular`:case`normal`:n=`400`;break;case`light`:case`thin`:n=`200`;break;default:break}return{style:r,weight:e.fWeight||n}}var FontManager=function(){var e=5e3,t={w:0,size:0,shapes:[],data:{shapes:[]}},n=[];n=n.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var r=127988,i=917631,a=917601,o=917626,s=65039,c=8205,l=127462,u=127487,d=[`d83cdffb`,`d83cdffc`,`d83cdffd`,`d83cdffe`,`d83cdfff`];function f(e){var t=e.split(`,`),n,r=t.length,i=[];for(n=0;n<r;n+=1)t[n]!==`sans-serif`&&t[n]!==`monospace`&&i.push(t[n]);return i.join(`,`)}function p(e,t){var n=createTag(`span`);n.setAttribute(`aria-hidden`,!0),n.style.fontFamily=t;var r=createTag(`span`);r.innerText=`giItT1WQy@!-/#`,n.style.position=`absolute`,n.style.left=`-10000px`,n.style.top=`-10000px`,n.style.fontSize=`300px`,n.style.fontVariant=`normal`,n.style.fontStyle=`normal`,n.style.fontWeight=`normal`,n.style.letterSpacing=`0`,n.appendChild(r),document.body.appendChild(n);var i=r.offsetWidth;return r.style.fontFamily=f(e)+`, `+t,{node:r,w:i,parent:n}}function m(){var t,n=this.fonts.length,r,i,a=n;for(t=0;t<n;t+=1)this.fonts[t].loaded?--a:this.fonts[t].fOrigin===`n`||this.fonts[t].origin===0?this.fonts[t].loaded=!0:(r=this.fonts[t].monoCase.node,i=this.fonts[t].monoCase.w,r.offsetWidth===i?(r=this.fonts[t].sansCase.node,i=this.fonts[t].sansCase.w,r.offsetWidth!==i&&(--a,this.fonts[t].loaded=!0)):(--a,this.fonts[t].loaded=!0),this.fonts[t].loaded&&(this.fonts[t].sansCase.parent.parentNode.removeChild(this.fonts[t].sansCase.parent),this.fonts[t].monoCase.parent.parentNode.removeChild(this.fonts[t].monoCase.parent)));a!==0&&Date.now()-this.initTime<e?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)}function g(e,t){var n=document.body&&t?`svg`:`canvas`,r,i=getFontProperties(e);if(n===`svg`){var a=createNS(`text`);a.style.fontSize=`100px`,a.setAttribute(`font-family`,e.fFamily),a.setAttribute(`font-style`,i.style),a.setAttribute(`font-weight`,i.weight),a.textContent=`1`,e.fClass?(a.style.fontFamily=`
10inherit`,a.setAttribute(`class`,e.fClass)):a.style.fontFamily=e.fFamily,t.appendChild(a),r=a}else{var o=new OffscreenCanvas(500,500).getContext(`2d`);o.font=i.style+` `+i.weight+` 100px `+e.fFamily,r=o}function s(e){return n===`svg`?(r.textContent=e,r.getComputedTextLength()):r.measureText(e).width}return{measureText:s}}function _(e,t){if(!e){this.isLoaded=!0;return}if(this.chars){this.isLoaded=!0,this.fonts=e.list;return}if(!document.body){this.isLoaded=!0,e.list.forEach(function(e){e.helper=g(e),e.cache={}}),this.fonts=e.list;return}var n=e.list,r,i=n.length,a=i;for(r=0;r<i;r+=1){var o=!0,s,c;if(n[r].loaded=!1,n[r].monoCase=p(n[r].fFamily,`monospace`),n[r].sansCase=p(n[r].fFamily,`sans-serif`),!n[r].fPath)n[r].loaded=!0,--a;else if(n[r].fOrigin===`p`||n[r].origin===3){if(s=document.querySelectorAll(`style[f-forigin="p"][f-family="`+n[r].fFamily+`"], style[f-origin="3"][f-family="`+n[r].fFamily+`"]`),s.length>0&&(o=!1),o){var l=createTag(`style`);l.setAttribute(`f-forigin`,n[r].fOrigin),l.setAttribute(`f-origin`,n[r].origin),l.setAttribute(`f-family`,n[r].fFamily),l.type=`text/css`,l.innerText=`@font-face {font-family: `+n[r].fFamily+`; font-style: normal; src: url('`+n[r].fPath+`');}`,t.appendChild(l)}}else if(n[r].fOrigin===`g`||n[r].origin===1){for(s=document.querySelectorAll(`link[f-forigin="g"], link[f-origin="1"]`),c=0;c<s.length;c+=1)s[c].href.indexOf(n[r].fPath)!==-1&&(o=!1);if(o){var u=createTag(`link`);u.setAttribute(`f-forigin`,n[r].fOrigin),u.setAttribute(`f-origin`,n[r].origin),u.type=`text/css`,u.rel=`stylesheet`,u.href=n[r].fPath,document.body.appendChild(u)}}else if(n[r].fOrigin===`t`||n[r].origin===2){for(s=document.querySelectorAll(`script[f-forigin="t"], script[f-origin="2"]`),c=0;c<s.length;c+=1)n[r].fPath===s[c].src&&(o=!1);if(o){var d=createTag(`link`);d.setAttribute(`f-forigin`,n[r].fOrigin),d.setAttribute(`f-origin`,n[r].origin),d.setAttribute(`rel`,`stylesheet`),d.setAttribute(`href`,n[r].fPath),t.appendChild(d)}}n[r].helper=g(n[r],t),n[r].cache={},this.fonts.push(n[r])}a===0?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}function y(e){if(e){this.chars||=[];var t,n=e.length,r,i=this.chars.length,a;for(t=0;t<n;t+=1){for(r=0,a=!1;r<i;)this.chars[r].style===e[t].style&&this.chars[r].fFamily===e[t].fFamily&&this.chars[r].ch===e[t].ch&&(a=!0),r+=1;a||(this.chars.push(e[t]),i+=1)}}}function b(e,n,r){for(var i=0,a=this.chars.length;i<a;){if(this.chars[i].ch===e&&this.chars[i].style===n&&this.chars[i].fFamily===r)return this.chars[i];i+=1}return(typeof e==`string`&&e.charCodeAt(0)!==13||!e)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn(`Missing character from exported characters list: `,e,n,r)),t}function x(e,t,n){var r=this.getFontByName(t),i=e;if(!r.cache[i]){var a=r.helper;if(e===` `){var o=a.measureText(`|`+e+`|`),s=a.measureText(`||`);r.cache[i]=(o-s)/100}else r.cache[i]=a.measureText(e)/100}return r.cache[i]*n}function S(e){for(var t=0,n=this.fonts.length;t<n;){if(this.fonts[t].fName===e)return this.fonts[t];t+=1}return this.fonts[0]}function C(e){var t=0,n=e.charCodeAt(0);if(n>=55296&&n<=56319){var r=e.charCodeAt(1);r>=56320&&r<=57343&&(t=(n-55296)*1024+r-56320+65536)}return t}function T(e,t){var n=e.toString(16)+t.toString(16);return d.indexOf(n)!==-1}function E(e){return e===c}function D(e){return e===s}function O(e){var t=C(e);return t>=l&&t<=u}function k(e){return O(e.substr(0,2))&&O(e.substr(2,2))}function A(e){return n.indexOf(e)!==-1}function j(e,t){var n=C(e.substr(t,2));if(n!==r)return!1;var s=0;for(t+=2;s<5;){if(n=C(e.substr(t,2)),n<a||n>o)return!1;s+=1,t+=2}return C(e.substr(t,2))===i}function M(){this.isLoaded=!0}var N=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};return N.isModifier=T,N.isZeroWidthJoiner=E,N.isFlagEmoji=k,N.isRegionalCode=O,N.isCombinedCharacter=A,N.isRegionalFlag=j,N.isVariationSelector=D,N.BLACK_FLAG_CODE_POINT=r,N.prototype={addChars:y,addFonts:_,getCharData:b,getFontByName:S,measureText:x,checkLoadedFonts:m,setIsLoaded:M},N}();function SlotManager(e){this.animationData=e}SlotManager.prototype.getProp=function(e){return this.animationData.slots&&this.animationData.slots[e.sid]?Object.assign(e,this.animationData.slots[e.sid].p):e};function slotFactory(e){return new SlotManager(e)}
vendor: 70,798 bytes, line 10
10function RenderableElement(){}RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(e){this.renderableComponents.indexOf(e)===-1&&this.renderableComponents.push(e)},removeRenderableComponent:function(e){this.renderableComponents.indexOf(e)!==-1&&this.renderableComponents.splice(this.renderableComponents.indexOf(e),1)},prepareRenderableFrame:function(e){this.checkLayerLimits(e)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(e){this.data.ip-this.data.st<=e&&this.data.op-this.data.st>e?this.isInRange!==!0&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):this.isInRange!==!1&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var e,t=this.renderableComponents.length;for(e=0;e<t;e+=1)this.renderableComponents[e].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return this.data.ty===5?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}};var getBlendMode=function(){var e={0:`source-over`,1:`multiply`,2:`screen`,3:`overlay`,4:`darken`,5:`lighten`,6:`color-dodge`,7:`color-burn`,8:`hard-light`,9:`soft-light`,10:`difference`,11:`exclusion`,12:`hue`,13:`saturation`,14:`color`,15:`luminosity`};return function(t){return e[t]||``}}();function SliderEffect(e,t,n){this.p=PropertyFactory.getProp(t,e.v,0,0,n)}function AngleEffect(e,t,n){this.p=PropertyFactory.getProp(t,e.v,0,0,n)}function ColorEffect(e,t,n){this.p=PropertyFactory.getProp(t,e.v,1,0,n)}function PointEffect(e,t,n){this.p=PropertyFactory.getProp(t,e.v,1,0,n)}function LayerIndexEffect(e,t,n){this.p=PropertyFactory.getProp(t,e.v,0,0,n)}function MaskIndexEffect(e,t,n){this.p=PropertyFactory.getProp(t,e.v,0,0,n)}function CheckboxEffect(e,t,n){this.p=PropertyFactory.getProp(t,e.v,0,0,n)}function NoValueEffect(){this.p={}}function EffectsManager(e,t){var n=e.ef||[];this.effectElements=[];var r,i=n.length,a;for(r=0;r<i;r+=1)a=new GroupEffect(n[r],t),this.effectElements.push(a)}function GroupEffect(e,t){this.init(e,t)}extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(e,t){this.data=e,this.effectElements=[],this.initDynamicPropertyContainer(t);var n,r=this.data.ef.length,i,a=this.data.ef;for(n=0;n<r;n+=1){switch(i=null,a[n].ty){case 0:i=new SliderEffect(a[n],t,this);break;case 1:i=new AngleEffect(a[n],t,this);break;case 2:i=new ColorEffect(a[n],t,this);break;case 3:i=new PointEffect(a[n],t,this);break;case 4:case 7:i=new CheckboxEffect(a[n],t,this);break;case 10:i=new LayerIndexEffect(a[n],t,this);break;case 11:i=new MaskIndexEffect(a[n],t,this);break;case 5:i=new EffectsManager(a[n],t,this);break;default:i=new NoValueEffect(a[n],t,this);break}i&&this.effectElements.push(i)}};function BaseElement(){}BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var e=0,t=this.data.masksProperties.length;e<t;){if(this.data.masksProperties[e].mode!==`n`&&this.data.masksProperties[e].cl!==!1)return!0;e+=1}return!1},initExpressions:function(){var e=getExpressionInterfaces();if(e){var t=e(`layer`),n=e(`effects`),r=e(`shape`),i=e(`text`),a=e(`comp`);this.layerInterface=t(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var o=n.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(o),this.data.ty===0||this.data.xt?this.compInterface=a(this):this.data.ty===4?(this.layerInterface.shapeInterface=r(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):this.data.ty===5&&(this.layerInterface.textInterface=i(this),this.layerInterface.text=this.layerInterface.textInterface)}},setBlendMode:function(){var e=getBlendMode(this.data.bm),t=this.baseElement||this.layerElement;t.style[`mix-blend-mode`]=e},initBaseData:function(e,t,n){this.globalData=t,this.comp=n,this.data=e,this.layerId=createElementID(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}};function FrameElement(){}FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(e,t){var n,r=this.dynamicProperties.length;for(n=0;n<r;n+=1)(t||this._isParent&&this.dynamicProperties[n].propType===`transform`)&&(this.dynamicProperties[n].getValue(),this.dynamicProperties[n]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(e){this.dynamicProperties.indexOf(e)===-1&&this.dynamicProperties.push(e)}};function FootageElement(e,t,n){this.initFrame(),this.initRenderable(),this.assetData=t.getAssetData(e.refId),this.footageData=t.imageLoader.getAsset(this.assetData),this.initBaseData(e,t,n)}FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){var e=getExpressionInterfaces();if(e){var t=e(`footage`);this.layerInterface=t(this)}},FootageElement.prototype.getFootageData=function(){return this.footageData};function AudioElement(e,t,n){this.initFrame(),this.initRenderable(),this.assetData=t.getAssetData(e.refId),this.initBaseData(e,t,n),this._isPlaying=!1,this._canPlay=!1;var r=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(r),this._currentTime=0,this.globalData.audioController.addAudio(this),this._volumeMultiplier=1,this._volume=1,this._previousVolume=null,this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0},this.lv=PropertyFactory.getProp(this,e.au&&e.au.lv?e.au.lv:{k:[100]},1,.01,this)}AudioElement.prototype.prepareFrame=function(e){if(this.prepareRenderableFrame(e,!0),this.prepareProperties(e,!0),this.tm._placeholder)this._currentTime=e/this.data.sr;else{var t=this.tm.v;this._currentTime=t}this._volume=this.lv.v[0];var n=this._volume*this._volumeMultiplier;this._previousVolume!==n&&(this._previousVolume=n,this.audio.volume(n))},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(e){this.audio.rate(e)},AudioElement.prototype.volume=function(e){this._volumeMultiplier=e,this._previousVolume=e*this._volume,this.audio.volume(this._previousVolume)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){};function BaseRenderer(){}BaseRenderer.prototype.checkLayers=function(e){var t,n=this.layers.length,r;for(this.completeLayers=!0,t=n-1;t>=0;--t)this.elements[t]||(r=this.layers[t],r.ip-r.st<=e-this.layers[t].st&&r.op-r.st>e-this.layers[t].st&&this.buildItem(t)),this.completeLayers=this.elements[t]?this.completeLayers:!1;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(e){switch(e.ty){case 2:return this.createImage(e);case 0:return this.createComp(e);case 1:return this.createSolid(e);case 3:return this.createNull(e);case 4:return this.createShape(e);case 5:return this.createText(e);case 6:return this.createAudio(e);case 13:return this.createCamera(e);case 15:return this.createFootage(e);default:return this.createNull(e)}},BaseRenderer.prototype.createCamera=function(){throw Error(`You're using a 3d camera. Try the html renderer.`)},BaseRenderer.prototype.createAudio=function(e){return new AudioElement(e,this.globalData,this)},BaseRenderer.prototype.createFootage=function(e){return new FootageElement(e,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)this.buildItem(e);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(e){this.completeLayers=!1;var t,n=e.length,r,i=this.layers.length;for(t=0;t<n;t+=1)for(r=0;r<i;){if(this.layers[r].id===e[t].id){this.layers[r]=e[t];break}r+=1}},BaseRenderer.prototype.setProjectInterface=function(e){this.globalData.projectInterface=e},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(e,t,n){for(var r=this.elements,i=this.layers,a=0,o=i.length;a<o;)i[a].ind==t&&(!r[a]||r[a]===!0?(this.buildItem(a),this.addPendingElement(e)):(n.push(r[a]),r[a].setAsParent(),i[a].parent===void 0?e.setHierarchy(n):this.buildElementParenting(e,i[a].parent,n))),a+=1},BaseRenderer.prototype.addPendingElement=function(e){this.pendingElements.push(e)},BaseRenderer.prototype.searchExtraCompositions=function(e){var t,n=e.length;for(t=0;t<n;t+=1)if(e[t].xt){var r=this.createComp(e[t]);r.initExpressions(),this.globalData.projectInterface.registerComposition(r)}},BaseRenderer.prototype.getElementById=function(e){var t,n=this.elements.length;for(t=0;t<n;t+=1)if(this.elements[t].data.ind===e)return this.elements[t];return null},BaseRenderer.prototype.getElementByPath=function(e){var t=e.shift(),n;if(typeof t==`number`)n=this.elements[t];else{var r,i=this.elements.length;for(r=0;r<i;r+=1)if(this.elements[r].data.nm===t){n=this.elements[r];break}}return e.length===0?n:n.getElementByPath(e)},BaseRenderer.prototype.setupGlobalData=function(e,t){this.globalData.fontManager=new FontManager,this.globalData.slotManager=slotFactory(e),this.globalData.fontManager.addChars(e.chars),this.globalData.fontManager.addFonts(e.fonts,t),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=e.fr,this.globalData.nm=e.nm,this.globalData.compSize={w:e.w,h:e.h}};var effectTypes={TRANSFORM_EFFECT:`transformEFfect`};function TransformElement(){}TransformElement.prototype={initTransform:function(){var e=new Matrix;this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_localMatMdf:!1,_opMdf:!1,mat:e,localMat:e,localOpacity:1},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var e,t=this.finalTransform.mat,n=0,r=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;n<r;){if(this.hierarchy[n].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}n+=1}if(this.finalTransform._matMdf)for(e=this.finalTransform.mProp.v.props,t.cloneFromProps(e),n=0;n<r;n+=1)t.multiply(this.hierarchy[n].finalTransform.mProp.v)}(!this.localTransforms||this.finalTransform._matMdf)&&(this.finalTransform._localMatMdf=this.finalTransform._matMdf),this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v)},renderLocalTransform:function(){if(this.localTransforms){var e=0,t=this.localTransforms.length;if(this.finalTransform._localMatMdf=this.finalTransform._matMdf,!this.finalTransform._localMatMdf||!this.finalTransform._opMdf)for(;e<t;)this.localTransforms[e]._mdf&&(this.finalTransform._localMatMdf=!0),this.localTransforms[e]._opMdf&&!this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v,this.finalTransform._opMdf=!0),e+=1;if(this.finalTransform._localMatMdf){var n=this.finalTransform.localMat;for(this.localTransforms[0].matrix.clone(n),e=1;e<t;e+=1){var r=this.localTransforms[e].matrix;n.multiply(r)}n.multiply(this.finalTransform.mat)}if(this.finalTransform._opMdf){var i=this.finalTransform.localOpacity;for(e=0;e<t;e+=1)i*=this.localTransforms[e].opacity*.01;this.finalTransform.localOpacity=i}}},searchEffectTransforms:function(){if(this.renderableEffectsManager){var e=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT);if(e.length){this.localTransforms=[],this.finalTransform.localMat=new Matrix;var t=0,n=e.length;for(t=0;t<n;t+=1)this.localTransforms.push(e[t])}}},globalToLocal:function(e){var t=[];t.push(this.finalTransform);for(var n=!0,r=this.comp;n;)r.finalTransform?(r.data.hasMask&&t.splice(0,0,r.finalTransform),r=r.comp):n=!1;var i,a=t.length,o;for(i=0;i<a;i+=1)o=t[i].mat.applyToPointArray(0,0,0),e=[e[0]-o[0],e[1]-o[1],0];return e},mHelper:new Matrix};function MaskElement(e,t,n){this.data=e,this.element=t,this.globalData=n,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var r=this.globalData.defs,i,a=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(a),this.solidPath=``;var o,s=this.masksProperties,c=0,l=[],u,d,f=createElementID(),p,m,g,_,y=`clipPath`,b=`clip-path`;for(i=0;i<a;i+=1)if((s[i].mode!==`a`&&s[i].mode!==`n`||s[i].inv||s[i].o.k!==100||s[i].o.x)&&(y=`mask`,b=`mask`),(s[i].mode===`s`||s[i].mode===`i`)&&c===0?(p=createNS(`rect`),p.setAttribute(`fill`,`#ffffff`),p.setAttribute(`width`,this.element.comp.data.w||0),p.setAttribute(`height`,this.element.comp.data.h||0),l.push(p)):p=null,o=createNS(`path`),s[i].mode===`n`)this.viewData[i]={op:PropertyFactory.getProp(this.element,s[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,s[i],3),elem:o,lastPath:``},r.appendChild(o);else{c+=1,o.setAttribute(`fill`,s[i].mode===`s`?`#000000`:`#ffffff`),o.setAttribute(`clip-rule`,`nonzero`);var x;if(s[i].x.k===0?(g=null,_=null):(y=`mask`,b=`mask`,_=PropertyFactory.getProp(this.element,s[i].x,0,null,this.element),x=createElementID(),m=createNS(`filter`),m.setAttribute(`id`,x),g=createNS(`feMorphology`),g.setAttribute(`operator`,`erode`),g.setAttribute(`in`,`SourceGraphic`),g.setAttribute(`radius`,`0`),m.appendChild(g),r.appendChild(m),o.setAttribute(`stroke`,s[i].mode===`s`?`#000000`:`#ffffff`)),this.storedData[i]={elem:o,x:_,expan:g,lastPath:``,lastOperator:``,filterId:x,lastRadius:0},s[i].mode===`i`){d=l.length;var S=createNS(`g`);for(u=0;u<d;u+=1)S.appendChild(l[u]);var C=createNS(`mask`);C.setAttribute(`mask-type`,`alpha`),C.setAttribute(`id`,f+`_`+c),C.appendChild(o),r.appendChild(C),S.setAttribute(`mask`,`url(`+getLocationHref()+`#`+f+`_`+c+`)`),l.length=0,l.push(S)}else l.push(o);s[i].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[i]={elem:o,lastPath:``,op:PropertyFactory.getProp(this.element,s[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,s[i],3),invRect:p},this.viewData[i].prop.k||this.drawPath(s[i],this.viewData[i].prop.v,this.viewData[i])}for(this.maskElement=createNS(y),a=l.length,i=0;i<a;i+=1)this.maskElement.appendChild(l[i]);c>0&&(this.maskElement.setAttribute(`id`,f),this.element.maskedElement.setAttribute(b,`url(`+getLocationHref()+`#`+f+`)`),r.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}MaskElement.prototype.getMaskProperty=function(e){return this.viewData[e].prop},MaskElement.prototype.renderFrame=function(e){var t=this.element.finalTransform.mat,n,r=this.masksProperties.length;for(n=0;n<r;n+=1)if((this.viewData[n].prop._mdf||e)&&this.drawPath(this.masksProperties[n],this.viewData[n].prop.v,this.viewData[n]),(this.viewData[n].op._mdf||e)&&this.viewData[n].elem.setAttribute(`fill-opacity`,this.viewData[n].op.v),this.masksProperties[n].mode!==`n`&&(this.viewData[n].invRect&&(this.element.finalTransform.mProp._mdf||e)&&this.viewData[n].invRect.setAttribute(`transform`,t.getInverseMatrix().to2dCSS()),this.storedData[n].x&&(this.storedData[n].x._mdf||e))){var i=this.storedData[n].expan;this.storedData[n].x.v<0?(this.storedData[n].lastOperator!==`erode`&&(this.storedData[n].lastOperator=`erode`,this.storedData[n].elem.setAttribute(`filter`,`url(`+getLocationHref()+`#`+this.storedData[n].filterId+`)`)),i.setAttribute(`radius`,-this.storedData[n].x.v)):(this.storedData[n].lastOperator!==`dilate`&&(this.storedData[n].lastOperator=`dilate`,this.storedData[n].elem.setAttribute(`filter`,null)),this.storedData[n].elem.setAttribute(`stroke-width`,this.storedData[n].x.v*2))}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var e=`M0,0 `;return e+=` h`+this.globalData.compSize.w,e+=` v`+this.globalData.compSize.h,e+=` h-`+this.globalData.compSize.w,e+=` v-`+this.globalData.compSize.h+` `,e},MaskElement.prototype.drawPath=function(e,t,n){var r=` M`+t.v[0][0]+`,`+t.v[0][1],i,a=t._length;for(i=1;i<a;i+=1)r+=` C`+t.o[i-1][0]+`,`+t.o[i-1][1]+` `+t.i[i][0]+`,`+t.i[i][1]+` `+t.v[i][0]+`,`+t.v[i][1];if(t.c&&a>1&&(r+=` C`+t.o[i-1][0]+`,`+t.o[i-1][1]+` `+t.i[0][0]+`,`+t.i[0][1]+` `+t.v[0][0]+`,`+t.v[0][1]),n.lastPath!==r){var o=``;n.elem&&(t.c&&(o=e.inv?this.solidPath+r:r),n.elem.setAttribute(`d`,o)),n.lastPath=r}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var e={};e.createFilter=t,e.createAlphaToLuminanceFilter=n;function t(e,t){var n=createNS(`filter`);return n.setAttribute(`id`,e),t!==!0&&(n.setAttribute(`filterUnits`,`objectBoundingBox`),n.setAttribute(`x`,`0%`),n.setAttribute(`y`,`0%`),n.setAttribute(`width`,`100%`),n.setAttribute(`height`,`100%`)),n}function n(){var e=createNS(`feColorMatrix`);return e.setAttribute(`type`,`matrix`),e.setAttribute(`color-interpolation-filters`,`sRGB`),e.setAttribute(`values`,`0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1`),e}return e}(),featureSupport=function(){var e={maskType:!0,svgLumaHidden:!0,offscreenCanvas:typeof OffscreenCanvas<`u`};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(e.maskType=!1),/firefox/i.test(navigator.userAgent)&&(e.svgLumaHidden=!1),e}(),registeredEffects$1={},idPrefix=`filter_result_`;function SVGEffects(e){var t,n=`SourceGraphic`,r=e.data.ef?e.data.ef.length:0,i=createElementID(),a=filtersFactory.createFilter(i,!0),o=0;this.filters=[];var s;for(t=0;t<r;t+=1){s=null;var c=e.data.ef[t].ty;if(registeredEffects$1[c]){var l=registeredEffects$1[c].effect;s=new l(a,e.effectsManager.effectElements[t],e,idPrefix+o,n),n=idPrefix+o,registeredEffects$1[c].countsAsEffect&&(o+=1)}s&&this.filters.push(s)}o&&(e.globalData.defs.appendChild(a),e.layerElement.setAttribute(`filter`,`url(`+getLocationHref()+`#`+i+`)`)),this.filters.length&&e.addRenderableComponent(this)}SVGEffects.prototype.renderFrame=function(e){var t,n=this.filters.length;for(t=0;t<n;t+=1)this.filters[t].renderFrame(e)},SVGEffects.prototype.getEffects=function(e){var t,n=this.filters.length,r=[];for(t=0;t<n;t+=1)this.filters[t].type===e&&r.push(this.filters[t]);return r};function registerEffect$1(e,t,n){registeredEffects$1[e]={effect:t,countsAsEffect:n}}function SVGBaseElement(){}SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS(`g`)},createContainerElements:function(){this.matteElement=createNS(`g`),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var e=null;if(this.data.td){this.matteMasks={};var t=createNS(`g`);t.setAttribute(`id`,this.layerId),t.appendChild(this.layerElement),e=t,this.globalData.defs.appendChild(t)}else this.data.tt?(this.matteElement.appendChild(this.layerElement),e=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute(`id`,this.data.ln),this.data.cl&&this.layerElement.setAttribute(`class`,this.data.cl),this.data.ty===0&&!this.data.hd){var n=createNS(`clipPath`),r=createNS(`path`);r.setAttribute(`d`,`M0,0 L`+this.data.w+`,0 L`+this.data.w+`,`+this.data.h+` L0,`+this.data.h+`z`);var i=createElementID();if(n.setAttribute(`id`,i),n.appendChild(r),this.globalData.defs.appendChild(n),this.checkMasks()){var a=createNS(`g`);a.setAttribute(`clip-path`,`url(`+getLocationHref()+`#`+i+`)`),a.appendChild(this.layerElement),this.transformedElement=a,e?e.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute(`clip-path`,`url(`+getLocationHref()+`#`+i+`)`)}this.data.bm!==0&&this.setBlendMode()},renderElement:function(){this.finalTransform._localMatMdf&&this.transformedElement.setAttribute(`transform`,this.finalTransform.localMat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute(`opacity`,this.finalTransform.localOpacity)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this),this.searchEffectTransforms()},getMatte:function(e){if(this.matteMasks||={},!this.matteMasks[e]){var t=this.layerId+`_`+e,n,r,i,a;if(e===1||e===3){var o=createNS(`mask`);o.setAttribute(`id`,t),o.setAttribute(`mask-type`,e===3?`luminance`:`alpha`),i=createNS(`use`),i.setAttributeNS(`http://www.w3.org/1999/xlink`,`href`,`#`+this.layerId),o.appendChild(i),this.globalData.defs.appendChild(o),!featureSupport.maskType&&e===1&&(o.setAttribute(`mask-type`,`luminance`),n=createElementID(),r=filtersFactory.createFilter(n),this.globalData.defs.appendChild(r),r.appendChild(filtersFactory.createAlphaToLuminanceFilter()),a=createNS(`g`),a.appendChild(i),o.appendChild(a),a.setAttribute(`filter`,`url(`+getLocationHref()+`#`+n+`)`))}else if(e===2){var s=createNS(`mask`);s.setAttribute(`id`,t),s.setAttribute(`mask-type`,`alpha`);var c=createNS(`g`);s.appendChild(c),n=createElementID(),r=filtersFactory.createFilter(n);var l=createNS(`feComponentTransfer`);l.setAttribute(`in`,`SourceGraphic`),r.appendChild(l);var u=createNS(`feFuncA`);u.setAttribute(`type`,`table`),u.setAttribute(`tableValues`,`1.0 0.0`),l.appendChild(u),this.globalData.defs.appendChild(r);var d=createNS(`rect`);d.setAttribute(`width`,this.comp.data.w),d.setAttribute(`height`,this.comp.data.h),d.setAttribute(`x`,`0`),d.setAttribute(`y`,`0`),d.setAttribute(`fill`,`#ffffff`),d.setAttribute(`opacity`,`0`),c.setAttribute(`filter`,`url(`+getLocationHref()+`#`+n+`)`),c.appendChild(d),i=createNS(`use`),i.setAttributeNS(`http://www.w3.org/1999/xlink`,`href`,`#`+this.layerId),c.appendChild(i),featureSupport.maskType||(s.setAttribute(`mask-type`,`luminance`),r.appendChild(filtersFactory.createAlphaToLuminanceFilter()),a=createNS(`g`),c.appendChild(d),a.appendChild(this.layerElement),c.appendChild(a)),this.globalData.defs.appendChild(s)}this.matteMasks[e]=t}return this.matteMasks[e]},setMatte:function(e){this.matteElement&&this.matteElement.setAttribute(`mask`,`url(`+getLocationHref()+`#`+e+`)`)}};function HierarchyElement(){}HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(e){this.hierarchy=e},setAsParent:function(){this._isParent=!0},checkParenting:function(){this.data.parent!==void 0&&this.comp.buildElementParenting(this,this.data.parent,[])}};function RenderableDOMElement(){}(function(){extendPrototype([RenderableElement,createProxyFunction({initElement:function(e,t,n){this.initFrame(),this.initBaseData(e,t,n),this.initTransform(e,t,n),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){if(!this.hidden&&(!this.isInRange||this.isTransparent)){var e=this.baseElement||this.layerElement;e.style.display=`none`,this.hidden=!0}},show:function(){if(this.isInRange&&!this.isTransparent){if(!this.data.hd){var e=this.baseElement||this.layerElement;e.style.display=`block`}this.hidden=!1,this._isFirstFrame=!0}},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&=!1)},renderInnerContent:function(){},prepareFrame:function(e){this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],RenderableDOMElement)})();function IImageElement(e,t,n){this.assetData=t.getAssetData(e.refId),this.assetData&&this.assetData.sid&&(this.assetData=t.slotManager.getProp(this.assetData)),this.initElement(e,t,n),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var e=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS(`image`),this.innerElem.setAttribute(`width`,this.assetData.w+`px`),this.innerElem.setAttribute(`height`,this.assetData.h+`px`),this.innerElem.setAttribute(`preserveAspectRatio`,this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS(`http://www.w3.org/1999/xlink`,`href`,e),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect};function ProcessedElement(e,t){this.elem=e,this.pos=t}function IShapeElement(){}IShapeElement.prototype={addShapeToModifiers:function(e){var t,n=this.shapeModifiers.length;for(t=0;t<n;t+=1)this.shapeModifiers[t].addShape(e)},isShapeInAnimatedModifiers:function(e){for(var t=0,n=this.shapeModifiers.length;t<n;)if(this.shapeModifiers[t].isAnimatedWithShape(e))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var e,t=this.shapes.length;for(e=0;e<t;e+=1)this.shapes[e].sh.reset();t=this.shapeModifiers.length;var n;for(e=t-1;e>=0&&(n=this.shapeModifiers[e].processShapes(this._isFirstFrame),!n);--e);}},searchProcessedElement:function(e){for(var t=this.processedElements,n=0,r=t.length;n<r;){if(t[n].elem===e)return t[n].pos;n+=1}return 0},addProcessedElement:function(e,t){for(var n=this.processedElements,r=n.length;r;)if(--r,n[r].elem===e){n[r].pos=t;return}n.push(new ProcessedElement(e,t))},prepareFrame:function(e){this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange)}};var lineCapEnum={1:`butt`,2:`round`,3:`square`},lineJoinEnum={1:`miter`,2:`round`,3:`bevel`};function SVGShapeData(e,t,n){this.caches=[],this.styles=[],this.transformers=e,this.lStr=``,this.sh=n,this.lvl=t,this._isAnimated=!!n.k;for(var r=0,i=e.length;r<i;){if(e[r].mProps.dynamicProperties.length){this._isAnimated=!0;break}r+=1}}SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0};function SVGStyleData(e,t){this.data=e,this.type=e.ty,this.d=``,this.lvl=t,this._mdf=!1,this.closed=e.hd===!0,this.pElem=createNS(`path`),this.msElem=null}SVGStyleData.prototype.reset=function(){this.d=``,this._mdf=!1};function DashProperty(e,t,n,r){this.elem=e,this.frameId=-1,this.dataProps=createSizedArray(t.length),this.renderer=n,this.k=!1,this.dashStr=``,this.dashArray=createTypedArray(`float32`,t.length?t.length-1:0),this.dashoffset=createTypedArray(`float32`,1),this.initDynamicPropertyContainer(r);var i,a=t.length||0,o;for(i=0;i<a;i+=1)o=PropertyFactory.getProp(e,t[i].v,0,0,this),this.k=o.k||this.k,this.dataProps[i]={n:t[i].n,p:o};this.k||this.getValue(!0),this._isAnimated=this.k}DashProperty.prototype.getValue=function(e){if(!(this.elem.globalData.frameId===this.frameId&&!e)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||e,this._mdf)){var t=0,n=this.dataProps.length;for(this.renderer===`svg`&&(this.dashStr=``),t=0;t<n;t+=1)this.dataProps[t].n===`o`?this.dashoffset[0]=this.dataProps[t].p.v:this.renderer===`svg`?this.dashStr+=` `+this.dataProps[t].p.v:this.dashArray[t]=this.dataProps[t].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty);function SVGStrokeStyleData(e,t,n){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(e,t.o,0,.01,this),this.w=PropertyFactory.getProp(e,t.w,0,null,this),this.d=new DashProperty(e,t.d||{},`svg`,this),this.c=PropertyFactory.getProp(e,t.c,1,255,this),this.style=n,this._isAnimated=!!this._isAnimated}extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData);function SVGFillStyleData(e,t,n){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(e,t.o,0,.01,this),this.c=PropertyFactory.getProp(e,t.c,1,255,this),this.style=n}extendPrototype([DynamicPropertyContainer],SVGFillStyleData);function SVGNoStyleData(e,t,n){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.style=n}extendPrototype([DynamicPropertyContainer],SVGNoStyleData);function GradientProperty(e,t,n){this.data=t,this.c=createTypedArray(`uint8c`,t.p*4);var r=t.k.k[0].s?t.k.k[0].s.length-t.p*4:t.k.k.length-t.p*4;this.o=createTypedArray(`float32`,r),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=r,this.initDynamicPropertyContainer(n),this.prop=PropertyFactory.getProp(e,t.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}GradientProperty.prototype.comparePoints=function(e,t){for(var n=0,r=this.o.length/2,i;n<r;){if(i=Math.abs(e[n*4]-e[t*4+n*2]),i>.01)return!1;n+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var e=0,t=this.data.k.k.length;e<t;){if(!this.comparePoints(this.data.k.k[e].s,this.data.p))return!1;e+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(e){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||e){var t,n=this.data.p*4,r,i;for(t=0;t<n;t+=1)r=t%4==0?100:255,i=Math.round(this.prop.v[t]*r),this.c[t]!==i&&(this.c[t]=i,this._cmdf=!e);if(this.o.length)for(n=this.prop.v.length,t=this.data.p*4;t<n;t+=1)r=t%2==0?100:1,i=t%2==0?Math.round(this.prop.v[t]*100):this.prop.v[t],this.o[t-this.data.p*4]!==i&&(this.o[t-this.data.p*4]=i,this._omdf=!e);this._mdf=!e}},extendPrototype([DynamicPropertyContainer],GradientProperty);function SVGGradientFillStyleData(e,t,n){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.initGradientData(e,t,n)}SVGGradientFillStyleData.prototype.initGradientData=function(e,t,n){this.o=PropertyFactory.getProp(e,t.o,0,.01,this),this.s=PropertyFactory.getProp(e,t.s,1,null,this),this.e=PropertyFactory.getProp(e,t.e,1,null,this),this.h=PropertyFactory.getProp(e,t.h||{k:0},0,.01,this),this.a=PropertyFactory.getProp(e,t.a||{k:0},0,degToRads,this),this.g=new GradientProperty(e,t.g,this),this.style=n,this.stops=[],this.setGradientData(n.pElem,t),this.setGradientOpacity(t,n),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(e,t){var n=createElementID(),r=createNS(t.t===1?`linearGradient`:`radialGradient`);r.setAttribute(`id`,n),r.setAttribute(`spreadMethod`,`pad`),r.setAttribute(`gradientUnits`,`userSpaceOnUse`);var i=[],a,o,s=t.g.p*4;for(o=0;o<s;o+=4)a=createNS(`stop`),r.appendChild(a),i.push(a);e.setAttribute(t.ty===`gf`?`fill`:`stroke`,`url(`+getLocationHref()+`#`+n+`)`),this.gf=r,this.cst=i},SVGGradientFillStyleData.prototype.setGradientOpacity=function(e,t){if(this.g._hasOpacity&&!this.g._collapsable){var n,r,i,a=createNS(`mask`),o=createNS(`path`);a.appendChild(o);var s=createElementID(),c=createElementID();a.setAttribute(`id`,c);var l=createNS(e.t===1?`linearGradient`:`radialGradient`);l.setAttribute(`id`,s),l.setAttribute(`spreadMethod`,`pad`),l.setAttribute(`gradientUnits`,`userSpaceOnUse`),i=e.g.k.k[0].s?e.g.k.k[0].s.length:e.g.k.k.length;var u=this.stops;for(r=e.g.p*4;r<i;r+=2)n=createNS(`stop`),n.setAttribute(`stop-color`,`rgb(255,255,255)`),l.appendChild(n),u.push(n);o.setAttribute(e.ty===`gf`?`fill`:`stroke`,`url(`+getLocationHref()+`#`+s+`)`),e.ty===`gs`&&(o.setAttribute(`stroke-linecap`,lineCapEnum[e.lc||2]),o.setAttribute(`stroke-linejoin`,lineJoinEnum[e.lj||2]),e.lj===1&&o.setAttribute(`stroke-miterlimit`,e.ml)),this.of=l,this.ms=a,this.ost=u,this.maskId=c,t.msElem=o}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData);function SVGGradientStrokeStyleData(e,t,n){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(e,t.w,0,null,this),this.d=new DashProperty(e,t.d||{},`svg`,this),this.initGradientData(e,t,n),this._isAnimated=!!this._isAnimated}extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS(`g`)}function SVGTransformData(e,t,n){this.transform={mProps:e,op:t,container:n},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}var buildShapeString=function(e,t,n,r){if(t===0)return``;var i=e.o,a=e.i,o=e.v,s,c=` M`+r.applyToPointStringified(o[0][0],o[0][1]);for(s=1;s<t;s+=1)c+=` C`+r.applyToPointStringified(i[s-1][0],i[s-1][1])+` `+r.applyToPointStringified(a[s][0],a[s][1])+` `+r.applyToPointStringified(o[s][0],o[s][1]);return n&&t&&(c+=` C`+r.applyToPointStringified(i[s-1][0],i[s-1][1])+` `+r.applyToPointStringified(a[0][0],a[0][1])+` `+r.applyToPointStringified(o[0][0],o[0][1]),c+=`z`),c},SVGElementsRenderer=function(){var e=new Matrix,t=new Matrix,n={createRenderFunction:r};function r(e){switch(e.ty){case`fl`:return s;case`gf`:return l;case`gs`:return c;case`st`:return u;case`sh`:case`el`:case`rc`:case`sr`:return o;case`tr`:return i;case`no`:return a;default:return null}}function i(e,t,n){(n||t.transform.op._mdf)&&t.transform.container.setAttribute(`opacity`,t.transform.op.v),(n||t.transform.mProps._mdf)&&t.transform.container.setAttribute(`transform`,t.transform.mProps.v.to2dCSS())}function a(){}function o(n,r,i){var a,o,s,c,l,u,d=r.styles.length,f=r.lvl,p,m,g,_;for(u=0;u<d;u+=1){if(c=r.sh._mdf||i,r.styles[u].lvl<f){for(m=t.reset(),g=f-r.styles[u].lvl,_=r.transformers.length-1;!c&&g>0;)c=r.transformers[_].mProps._mdf||c,--g,--_;if(c)for(g=f-r.styles[u].lvl,_=r.transformers.length-1;g>0;)m.multiply(r.transformers[_].mProps.v),--g,--_}else m=e;if(p=r.sh.paths,o=p._length,c){for(s=``,a=0;a<o;a+=1)l=p.shapes[a],l&&l._length&&(s+=buildShapeString(l,l._length,l.c,m));r.caches[u]=s}else s=r.caches[u];r.styles[u].d+=n.hd===!0?``:s,r.styles[u]._mdf=c||r.styles[u]._mdf}}function s(e,t,n){var r=t.style;(t.c._mdf||n)&&r.pElem.setAttribute(`fill`,`rgb(`+bmFloor(t.c.v[0])+`,`+bmFloor(t.c.v[1])+`,`+bmFloor(t.c.v[2])+`)`),(t.o._mdf||n)&&r.pElem.setAttribute(`fill-opacity`,t.o.v)}function c(e,t,n){l(e,t,n),u(e,t,n)}function l(e,t,n){var r=t.gf,i=t.g._hasOpacity,a=t.s.v,o=t.e.v;if(t.o._mdf||n){var s=e.ty===`gf`?`fill-opacity`:`stroke-opacity`;t.style.pElem.setAttribute(s,t.o.v)}if(t.s._mdf||n){var c=e.t===1?`x1`:`cx`,l=c===`x1`?`y1`:`cy`;r.setAttribute(c,a[0]),r.setAttribute(l,a[1]),i&&!t.g._collapsable&&(t.of.setAttribute(c,a[0]),t.of.setAttribute(l,a[1]))}var u,d,f,p;if(t.g._cmdf||n){u=t.cst;var m=t.g.c;for(f=u.length,d=0;d<f;d+=1)p=u[d],p.setAttribute(`offset`,m[d*4]+`%`),p.setAttribute(`stop-color`,`rgb(`+m[d*4+1]+`,`+m[d*4+2]+`,`+m[d*4+3]+`)`)}if(i&&(t.g._omdf||n)){var g=t.g.o;for(u=t.g._collapsable?t.cst:t.ost,f=u.length,d=0;d<f;d+=1)p=u[d],t.g._collapsable||p.setAttribute(`offset`,g[d*2]+`%`),p.setAttribute(`stop-opacity`,g[d*2+1])}if(e.t===1)(t.e._mdf||n)&&(r.setAttribute(`x2`,o[0]),r.setAttribute(`y2`,o[1]),i&&!t.g._collapsable&&(t.of.setAttribute(`x2`,o[0]),t.of.setAttribute(`y2`,o[1])));else{var _;if((t.s._mdf||t.e._mdf||n)&&(_=Math.sqrt((a[0]-o[0])**2+(a[1]-o[1])**2),r.setAttribute(`r`,_),i&&!t.g._collapsable&&t.of.setAttribute(`r`,_)),t.s._mdf||t.e._mdf||t.h._mdf||t.a._mdf||n){_||=Math.sqrt((a[0]-o[0])**2+(a[1]-o[1])**2);var y=Math.atan2(o[1]-a[1],o[0]-a[0]),b=t.h.v;b>=1?b=.99:b<=-1&&(b=-.99);var x=_*b,S=Math.cos(y+t.a.v)*x+a[0],C=Math.sin(y+t.a.v)*x+a[1];r.setAttribute(`fx`,S),r.setAttribute(`fy`,C),i&&!t.g._collapsable&&(t.of.setAttribute(`fx`,S),t.of.setAttribute(`fy`,C))}}}function u(e,t,n){var r=t.style,i=t.d;i&&(i._mdf||n)&&i.dashStr&&(r.pElem.setAttribute(`stroke-dasharray`,i.dashStr),r.pElem.setAttribute(`stroke-dashoffset`,i.dashoffset[0])),t.c&&(t.c._mdf||n)&&r.pElem.setAttribute(`stroke`,`rgb(`+bmFloor(t.c.v[0])+`,`+bmFloor(t.c.v[1])+`,`+bmFloor(t.c.v[2])+`)`),(t.o._mdf||n)&&r.pElem.setAttribute(`stroke-opacity`,t.o.v),(t.w._mdf||n)&&(r.pElem.setAttribute(`stroke-width`,t.w.v),r.msElem&&r.msElem.setAttribute(`stroke-width`,t.w.v))}return n}();function SVGShapeElement(e,t,n){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(e,t,n),this.prevViewData=[]}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var e,t=this.shapes.length,n,r,i=this.stylesList.length,a,o=[],s=!1;for(r=0;r<i;r+=1){for(a=this.stylesList[r],s=!1,o.length=0,e=0;e<t;e+=1)n=this.shapes[e],n.styles.indexOf(a)!==-1&&(o.push(n),s=n._isAnimated||s);o.length>1&&s&&this.setShapesAsAnimated(o)}},SVGShapeElement.prototype.setShapesAsAnimated=function(e){var t,n=e.length;for(t=0;t<n;t+=1)e[t].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(e,t){var n,r=new SVGStyleData(e,t),i=r.pElem;return e.ty===`st`?n=new SVGStrokeStyleData(this,e,r):e.ty===`fl`?n=new SVGFillStyleData(this,e,r):e.ty===`gf`||e.ty===`gs`?(n=new(e.ty===`gf`?SVGGradientFillStyleData:SVGGradientStrokeStyleData)(this,e,r),this.globalData.defs.appendChild(n.gf),n.maskId&&(this.globalData.defs.appendChild(n.ms),this.globalData.defs.appendChild(n.of),i.setAttribute(`mask`,`url(`+getLocationHref()+`#`+n.maskId+`)`))):e.ty===`no`&&(n=new SVGNoStyleData(this,e,r)),(e.ty===`st`||e.ty===`gs`)&&(i.setAttribute(`stroke-linecap`,lineCapEnum[e.lc||2]),i.setAttribute(`stroke-linejoin`,lineJoinEnum[e.lj||2]),i.setAttribute(`fill-opacity`,`0`),e.lj===1&&i.setAttribute(`stroke-miterlimit`,e.ml)),e.r===2&&i.setAttribute(`fill-rule`,`evenodd`),e.ln&&i.setAttribute(`id`,e.ln),e.cl&&i.setAttribute(`class`,e.cl),e.bm&&(i.style[`mix-blend-mode`]=getBlendMode(e.bm)),this.stylesList.push(r),this.addToAnimatedContents(e,n),n},SVGShapeElement.prototype.createGroupElement=function(e){var t=new ShapeGroupData;return e.ln&&t.gr.setAttribute(`id`,e.ln),e.cl&&t.gr.setAttribute(`class`,e.cl),e.bm&&(t.gr.style[`mix-blend-mode`]=getBlendMode(e.bm)),t},SVGShapeElement.prototype.createTransformElement=function(e,t){var n=TransformPropertyFactory.getTransformProperty(this,e,this),r=new SVGTransformData(n,n.o,t);return this.addToAnimatedContents(e,r),r},SVGShapeElement.prototype.createShapeElement=function(e,t,n){var r=4;e.ty===`rc`?r=5:e.ty===`el`?r=6:e.ty===`sr`&&(r=7);var i=new SVGShapeData(t,n,ShapePropertyFactory.getShapeProp(this,e,r,this));return this.shapes.push(i),this.addShapeToModifiers(i),this.addToAnimatedContents(e,i),i},SVGShapeElement.prototype.addToAnimatedContents=function(e,t){for(var n=0,r=this.animatedContents.length;n<r;){if(this.animatedContents[n].element===t)return;n+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(e),element:t,data:e})},SVGShapeElement.prototype.setElementStyles=function(e){var t=e.styles,n,r=this.stylesList.length;for(n=0;n<r;n+=1)t.indexOf(this.stylesList[n])===-1&&!this.stylesList[n].closed&&t.push(this.stylesList[n])},SVGShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;var e,t=this.itemsData.length;for(e=0;e<t;e+=1)this.prevViewData[e]=this.itemsData[e];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),t=this.dynamicProperties.length,e=0;e<t;e+=1)this.dynamicProperties[e].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(e,t,n,r,i,a,o){var s=[].concat(a),c,l=e.length-1,u,d,f=[],p=[],m,g,_;for(c=l;c>=0;--c){if(_=this.searchProcessedElement(e[c]),_?t[c]=n[_-1]:e[c]._render=o,e[c].ty===`fl`||e[c].ty===`st`||e[c].ty===`gf`||e[c].ty===`gs`||e[c].ty===`no`)_?t[c].style.closed=e[c].hd:t[c]=this.createStyleElement(e[c],i),e[c]._render&&t[c].style.pElem.parentNode!==r&&r.appendChild(t[c].style.pElem),f.push(t[c].style);else if(e[c].ty===`gr`){if(!_)t[c]=this.createGroupElement(e[c]);else for(d=t[c].it.length,u=0;u<d;u+=1)t[c].prevViewData[u]=t[c].it[u];this.searchShapes(e[c].it,t[c].it,t[c].prevViewData,t[c].gr,i+1,s,o),e[c]._render&&t[c].gr.parentNode!==r&&r.appendChild(t[c].gr)}else e[c].ty===`tr`?(_||(t[c]=this.createTransformElement(e[c],r)),m=t[c].transform,s.push(m)):e[c].ty===`sh`||e[c].ty===`rc`||e[c].ty===`el`||e[c].ty===`sr`?(_||(t[c]=this.createShapeElement(e[c],s,i)),this.setElementStyles(t[c])):e[c].ty===`tm`||e[c].ty===`rd`||e[c].ty===`ms`||e[c].ty===`pb`||e[c].ty===`zz`||e[c].ty===`op`?(_?(g=t[c],g.closed=!1):(g=ShapeModifiers.getModifier(e[c].ty),g.init(this,e[c]),t[c]=g,this.shapeModifiers.push(g)),p.push(g)):e[c].ty===`rp`&&(_?(g=t[c],g.closed=!0):(g=ShapeModifiers.getModifier(e[c].ty),t[c]=g,g.init(this,e,c,t),this.shapeModifiers.push(g),o=!1),p.push(g));this.addProcessedElement(e[c],c+1)}for(l=f.length,c=0;c<l;c+=1)f[c].closed=!0;for(l=p.length,c=0;c<l;c+=1)p[c].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){this.renderModifiers();var e,t=this.stylesList.length;for(e=0;e<t;e+=1)this.stylesList[e].reset();for(this.renderShape(),e=0;e<t;e+=1)(this.stylesList[e]._mdf||this._isFirstFrame)&&(this.stylesList[e].msElem&&(this.stylesList[e].msElem.setAttribute(`d`,this.stylesList[e].d),this.stylesList[e].d=`M0 0`+this.stylesList[e].d),this.stylesList[e].pElem.setAttribute(`d`,this.stylesList[e].d||`M0 0`))},SVGShapeElement.prototype.renderShape=function(){var e,t=this.animatedContents.length,n;for(e=0;e<t;e+=1)n=this.animatedContents[e],(this._isFirstFrame||n.element._isAnimated)&&n.data!==!0&&n.fn(n.data,n.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null};function LetterProps(e,t,n,r,i,a){this.o=e,this.sw=t,this.sc=n,this.fc=r,this.m=i,this.p=a,this._mdf={o:!0,sw:!!t,sc:!!n,fc:!!r,m:!0,p:!0}}LetterProps.prototype.update=function(e,t,n,r,i,a){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;var o=!1;return this.o!==e&&(this.o=e,this._mdf.o=!0,o=!0),this.sw!==t&&(this.sw=t,this._mdf.sw=!0,o=!0),this.sc!==n&&(this.sc=n,this._mdf.sc=!0,o=!0),this.fc!==r&&(this.fc=r,this._mdf.fc=!0,o=!0),this.m!==i&&(this.m=i,this._mdf.m=!0,o=!0),a.length&&(this.p[0]!==a[0]||this.p[1]!==a[1]||this.p[4]!==a[4]||this.p[5]!==a[5]||this.p[12]!==a[12]||this.p[13]!==a[13])&&(this.p=a,this._mdf.p=!0,o=!0),o};function TextProperty(e,t){this._frameId=initialDefaultFrame,this.pv=``,this.v=``,this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,t.d&&t.d.sid&&(t.d=e.globalData.slotManager.getProp(t.d)),this.data=t,this.elem=e,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:``,fStyle:``,fWeight:``,fc:``,j:``,justifyOffset:``,l:[],lh:0,lineWidths:[],ls:``,of:``,s:``,sc:``,sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},TextProperty.prototype.setCurrentData=function(e){e.__complete||this.completeTextData(e),this.currentData=e,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){return this.kf=this.data.d.k.length>1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(e){this.effectsSequence.push(e),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(e){if(!((this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)&&!e)){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var t=this.currentData,n=this.keysIndex;if(this.lock){this.setCurrentData(this.currentData);return}this.lock=!0,this._mdf=!1;var r,i=this.effectsSequence.length,a=e||this.data.d.k[this.keysIndex].s;for(r=0;r<i;r+=1)a=n===this.keysIndex?this.effectsSequence[r](this.currentData,a.t):this.effectsSequence[r](a,a.t);t!==a&&this.setCurrentData(a),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}},TextProperty.prototype.getKeyframeValue=function(){for(var e=this.data.d.k,t=this.elem.comp.renderedFrame,n=0,r=e.length;n<=r-1&&!(n===r-1||e[n+1].t>t);)n+=1;return this.keysIndex!==n&&(this.keysIndex=n),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(e){for(var t=[],n=0,r=e.length,i,a,o=!1,s=!1,c=``;n<r;)o=s,s=!1,i=e.charCodeAt(n),c=e.charAt(n),FontManager.isCombinedCharacter(i)?o=!0:i>=55296&&i<=56319?FontManager.isRegionalFlag(e,n)?c=e.substr(n,14):(a=e.charCodeAt(n+1),a>=56320&&a<=57343&&(FontManager.isModifier(i,a)?(c=e.substr(n,2),o=!0):c=FontManager.isFlagEmoji(e.substr(n,4))?e.substr(n,4):e.substr(n,2))):i>56319?(a=e.charCodeAt(n+1),FontManager.isVariationSelector(i)&&(o=!0)):FontManager.isZeroWidthJoiner(i)&&(o=!0,s=!0),o?(t[t.length-1]+=c,o=!1):t.push(c),n+=c.length;return t},TextProperty.prototype.completeTextData=function(e){e.__complete=!0;var t=this.elem.globalData.fontManager,n=this.data,r=[],i,a,o,s=0,c,l=n.m.g,u=0,d=0,f=0,p=[],m=0,g=0,_,y,b=t.getFontByName(e.f),x,S=0,C=getFontProperties(b);e.fWeight=C.weight,e.fStyle=C.style,e.finalSize=e.s,e.finalText=this.buildFinalText(e.t),a=e.finalText.length,e.finalLineHeight=e.lh;var T=e.tr/1e3*e.finalSize,E;if(e.sz)for(var D=!0,O=e.sz[0],k=e.sz[1],A,j;D;){j=this.buildFinalText(e.t),A=0,m=0,a=j.length,T=e.tr/1e3*e.finalSize;var M=-1;for(i=0;i<a;i+=1)E=j[i].charCodeAt(0),o=!1,j[i]===` `?M=i:(E===13||E===3)&&(m=0,o=!0,A+=e.finalLineHeight||e.finalSize*1.2),t.chars?(x=t.getCharData(j[i],b.fStyle,b.fFamily),S=o?0:x.w*e.finalSize/100):S=t.measureText(j[i],e.f,e.finalSize),m+S>O&&j[i]!==` `?(M===-1?a+=1:i=M,A+=e.finalLineHeight||e.finalSize*1.2,j.splice(i,+(M===i),`\r`),M=-1,m=0):(m+=S,m+=T);A+=b.ascent*e.finalSize/100,this.canResize&&e.finalSize>this.minimumFontSize&&k<A?(--e.finalSize,e.finalLineHeight=e.finalSize*e.lh/e.s):(e.finalText=j,a=e.finalText.length,D=!1)}m=-T,S=0;var N=0,P;for(i=0;i<a;i+=1)if(o=!1,P=e.finalText[i],E=P.charCodeAt(0),E===13||E===3?(N=0,p.push(m),g=m>g?m:g,m=-2*T,c=``,o=!0,f+=1):c=P,t.chars?(x=t.getCharData(P,b.fStyle,t.getFontByName(e.f).fFamily),S=o?0:x.w*e.finalSize/100):S=t.measureText(c,e.f,e.finalSize),P===` `?N+=S+T:(m+=S+T+N,N=0),r.push({l:S,an:S,add:u,n:o,anIndexes:[],val:c,line:f,animatorJustifyOffset:0}),l==2){if(u+=S,c===``||c===` `||i===a-1){for((c===``||c===` `)&&(u-=S);d<=i;)r[d].an=u,r[d].ind=s,r[d].extra=S,d+=1;s+=1,u=0}}else if(l==3){if(u+=S,c===``||i===a-1){for(c===``&&(u-=S);d<=i;)r[d].an=u,r[d].ind=s,r[d].extra=S,d+=1;u=0,s+=1}}else r[s].ind=s,r[s].extra=0,s+=1;if(e.l=r,g=m>g?m:g,p.push(m),e.sz)e.boxWidth=e.sz[0],e.justifyOffset=0;else switch(e.boxWidth=g,e.j){case 1:e.justifyOffset=-e.boxWidth;break;case 2:e.justifyOffset=-e.boxWidth/2;break;default:e.justifyOffset=0}e.lineWidths=p;var F=n.a,I,L;y=F.length;var R,z,B=[];for(_=0;_<y;_+=1){for(I=F[_],I.a.sc&&(e.strokeColorAnim=!0),I.a.sw&&(e.strokeWidthAnim=!0),(I.a.fc||I.a.fh||I.a.fs||I.a.fb)&&(e.fillColorAnim=!0),z=0,R=I.s.b,i=0;i<a;i+=1)L=r[i],L.anIndexes[_]=z,(R==1&&L.val!==``||R==2&&L.val!==``&&L.val!==` `||R==3&&(L.n||L.val==` `||i==a-1)||R==4&&(L.n||i==a-1))&&(I.s.rn===1&&B.push(z),z+=1);n.a[_].s.totalChars=z;var V=-1,ee;if(I.s.rn===1)for(i=0;i<a;i+=1)L=r[i],V!=L.anIndexes[_]&&(V=L.anIndexes[_],ee=B.splice(Math.floor(Math.random()*B.length),1)[0]),L.anIndexes[_]=ee}e.yOffset=e.finalLineHeight||e.finalSize*1.2,e.ls=e.ls||0,e.ascent=b.ascent*e.finalSize/100},TextProperty.prototype.updateDocumentData=function(e,t){t=t===void 0?this.keysIndex:t;var n=this.copyData({},this.data.d.k[t].s);n=this.copyData(n,e),this.data.d.k[t].s=n,this.recalculate(t),this.setCurrentData(n),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(e){var t=this.data.d.k[e].s;t.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(t)},TextProperty.prototype.canResizeFont=function(e){this.canResize=e,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(e){this.minimumFontSize=Math.floor(e)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var e=Math.max,t=Math.min,n=Math.floor;function r(e,t){this._currentTextLength=-1,this.k=!1,this.data=t,this.elem=e,this.comp=e.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(e),this.s=PropertyFactory.getProp(e,t.s||{k:0},0,0,this),`e`in t?this.e=PropertyFactory.getProp(e,t.e,0,0,this):this.e={v:100},this.o=PropertyFactory.getProp(e,t.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(e,t.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(e,t.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(e,t.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(e,t.a,0,.01,this),this.dynamicProperties.length||this.getValue()}r.prototype={getMult:function(r){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var i=0,a=0,o=1,s=1;this.ne.v>0?i=this.ne.v/100:a=-this.ne.v/100,this.xe.v>0?o=1-this.xe.v/100:s=1+this.xe.v/100;var c=BezierFactory.getBezierEasing(i,a,o,s).get,l=0,u=this.finalS,d=this.finalE,f=this.data.sh;if(f===2)l=d===u?+(r>=d):e(0,t(.5/(d-u)+(r-u)/(d-u),1)),l=c(l);else if(f===3)l=d===u?r>=d?0:1:1-e(0,t(.5/(d-u)+(r-u)/(d-u),1)),l=c(l);else if(f===4)d===u?l=0:(l=e(0,t(.5/(d-u)+(r-u)/(d-u),1)),l<.5?l*=2:l=1-2*(l-.5)),l=c(l);else if(f===5){if(d===u)l=0;else{var p=d-u;r=t(e(0,r+.5-u),d-u);var m=-p/2+r,g=p/2;l=Math.sqrt(1-m*m/(g*g))}l=c(l)}else f===6?(d===u?l=0:(r=t(e(0,r+.5-u),d-u),l=(1+Math.cos(Math.PI+Math.PI*2*r/(d-u)))/2),l=c(l)):(r>=n(u)&&(l=r-u<0?e(0,t(t(d,1)-(u-r),1)):e(0,t(d-r,1))),l=c(l));if(this.sm.v!==100){var _=this.sm.v*.01;_===0&&(_=1e-8);var y=.5-_*.5;l<y?l=0:(l=(l-y)/_,l>1&&(l=1))}return l*this.a.v},getValue:function(e){this.iterateDynamicProperties(),this._mdf=e||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,e&&this.data.r===2&&(this.e.v=this._currentTextLength);var t=this.data.r===2?1:100/this.data.totalChars,n=this.o.v/t,r=this.s.v/t+n,i=this.e.v/t+n;if(r>i){var a=r;r=i,i=a}this.finalS=r,this.finalE=i}},extendPrototype([DynamicPropertyContainer],r);function i(e,t,n){return new r(e,t,n)}return{getTextSelectorProp:i}}();function TextAnimatorDataProperty(e,t,n){var r={propType:!1},i=PropertyFactory.getProp,a=t.a;this.a={r:a.r?i(e,a.r,0,degToRads,n):r,rx:a.rx?i(e,a.rx,0,degToRads,n):r,ry:a.ry?i(e,a.ry,0,degToRads,n):r,sk:a.sk?i(e,a.sk,0,degToRads,n):r,sa:a.sa?i(e,a.sa,0,degToRads,n):r,s:a.s?i(e,a.s,1,.01,n):r,a:a.a?i(e,a.a,1,0,n):r,o:a.o?i(e,a.o,0,.01,n):r,p:a.p?i(e,a.p,1,0,n):r,sw:a.sw?i(e,a.sw,0,0,n):r,sc:a.sc?i(e,a.sc,1,0,n):r,fc:a.fc?i(e,a.fc,1,0,n):r,fh:a.fh?i(e,a.fh,0,0,n):r,fs:a.fs?i(e,a.fs,0,.01,n):r,fb:a.fb?i(e,a.fb,0,.01,n):r,t:a.t?i(e,a.t,0,0,n):r},this.s=TextSelectorProp.getTextSelectorProp(e,t.s,n),this.s.t=t.s.t}function TextAnimatorProperty(e,t,n){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=e,this._renderType=t,this._elem=n,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(n)}TextAnimatorProperty.prototype.searchProperties=function(){var e,t=this._textData.a.length,n,r=PropertyFactory.getProp;for(e=0;e<t;e+=1)n=this._textData.a[e],this._animatorsData[e]=new TextAnimatorDataProperty(this._elem,n,this);this._textData.p&&`m`in this._textData.p?(this._pathData={a:r(this._elem,this._textData.p.a,0,0,this),f:r(this._elem,this._textData.p.f,0,0,this),l:r(this._elem,this._textData.p.l,0,0,this),r:r(this._elem,this._textData.p.r,0,0,this),p:r(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=r(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(e,t){if(this.lettersChangedFlag=t,!(!this._mdf&&!this._isFirstFrame&&!t&&(!this._hasMaskedPath||!this._pathData.m._mdf))){this._isFirstFrame=!1;var n=this._moreOptions.alignment.v,r=this._animatorsData,i=this._textData,a=this.mHelper,o=this._renderType,s=this.renderedLetters.length,c,l,u,d,f=e.l,p,m,g,_,y,b,x,S,C,T,E,D,O,k,A;if(this._hasMaskedPath){if(A=this._pathData.m,!this._pathData.n||this._pathData._mdf){var j=A.v;this._pathData.r.v&&(j=j.reverse()),p={tLength:0,segments:[]},d=j._length-1;var M;for(D=0,u=0;u<d;u+=1)M=bez.buildBezierData(j.v[u],j.v[u+1],[j.o[u][0]-j.v[u][0],j.o[u][1]-j.v[u][1]],[j.i[u+1][0]-j.v[u+1][0],j.i[u+1][1]-j.v[u+1][1]]),p.tLength+=M.segmentLength,p.segments.push(M),D+=M.segmentLength;u=d,A.v.c&&(M=bez.buildBezierData(j.v[u],j.v[0],[j.o[u][0]-j.v[u][0],j.o[u][1]-j.v[u][1]],[j.i[0][0]-j.v[0][0],j.i[0][1]-j.v[0][1]]),p.tLength+=M.segmentLength,p.segments.push(M),D+=M.segmentLength),this._pathData.pi=p}if(p=this._pathData.pi,m=this._pathData.f.v,x=0,b=1,_=0,y=!0,T=p.segments,m<0&&A.v.c)for(p.tLength<Math.abs(m)&&(m=-Math.abs(m)%p.tLength),x=T.length-1,C=T[x].points,b=C.length-1;m<0;)m+=C[b].partialLength,--b,b<0&&(--x,C=T[x].points,b=C.length-1);C=T[x].points,S=C[b-1],g=C[b],E=g.partialLength}d=f.length,c=0,l=0;var N=e.finalSize*1.2*.714,P=!0,F,I,L,R=r.length,z,B,V=-1,ee,H,te,ne=m,U=x,re=b,ie=-1,ae,W,oe,K,q,se,ce,J,le=``,Y=this.defaultPropsArray,ue;if(e.j===2||e.j===1){var X=0,de=0,Z=e.j===2?-.5:-1,Q=0,fe=!0;for(u=0;u<d;u+=1)if(f[u].n){for(X&&(X+=de);Q<u;)f[Q].animatorJustifyOffset=X,Q+=1;X=0,fe=!0}else{for(L=0;L<R;L+=1)F=r[L].a,F.t.propType&&(fe&&e.j===2&&(de+=F.t.v*Z),I=r[L].s,B=I.getMult(f[u].anIndexes[L],i.a[L].s.totalChars),B.length?X+=F.t.v*B[0]*Z:X+=F.t.v*B*Z);fe=!1}for(X&&(X+=de);Q<u;)f[Q].animatorJustifyOffset=X,Q+=1}for(u=0;u<d;u+=1){if(a.reset(),ae=1,f[u].n)c=0,l+=e.yOffset,l+=+!!P,m=ne,P=!1,this._hasMaskedPath&&(x=U,b=re,C=T[x].points,S=C[b-1],g=C[b],E=g.partialLength,_=0),le=``,J=``,se=``,ue=``,Y=this.defaultPropsArray;else{if(this._hasMaskedPath){if(ie!==f[u].line){switch(e.j){case 1:m+=D-e.lineWidths[f[u].line];break;case 2:m+=(D-e.lineWidths[f[u].line])/2;break;default:break}ie=f[u].line}V!==f[u].ind&&(f[V]&&(m+=f[V].extra),m+=f[u].an/2,V=f[u].ind),m+=n[0]*f[u].an*.005;var $=0;for(L=0;L<R;L+=1)F=r[L].a,F.p.propType&&(I=r[L].s,B=I.getMult(f[u].anIndexes[L],i.a[L].s.totalChars),B.length?$+=F.p.v[0]*B[0]:$+=F.p.v[0]*B),F.a.propType&&(I=r[L].s,B=I.getMult(f[u].anIndexes[L],i.a[L].s.totalChars),B.length?$+=F.a.v[0]*B[0]:$+=F.a.v[0]*B);for(y=!0,this._pathData.a.v&&(m=f[0].an*.5+(D-this._pathData.f.v-f[0].an*.5-f[f.length-1].an*.5)*V/(d-1),m+=this._pathData.f.v);y;)_+E>=m+$||!C?(O=(m+$-_)/g.partialLength,H=S.point[0]+(g.point[0]-S.point[0])*O,te=S.point[1]+(g.point[1]-S.point[1])*O,a.translate(-n[0]*f[u].an*.005,-(n[1]*N)*.01),y=!1):C&&(_+=g.partialLength,b+=1,b>=C.length&&(b=0,x+=1,T[x]?C=T[x].points:A.v.c?(b=0,x=0,C=T[x].points):(_-=g.partialLength,C=null)),C&&(S=g,g=C[b],E=g.partialLength));ee=f[u].an/2-f[u].add,a.translate(-ee,0,0)}else ee=f[u].an/2-f[u].add,a.translate(-ee,0,0),a.translate(-n[0]*f[u].an*.005,-n[1]*N*.01,0);for(L=0;L<R;L+=1)F=r[L].a,F.t.propType&&(I=r[L].s,B=I.getMult(f[u].anIndexes[L],i.a[L].s.totalChars),(c!==0||e.j!==0)&&(this._hasMaskedPath?B.length?m+=F.t.v*B[0]:m+=F.t.v*B:B.length?c+=F.t.v*B[0]:c+=F.t.v*B));for(e.strokeWidthAnim&&(oe=e.sw||0),e.strokeColorAnim&&(W=e.sc?[e.sc[0],e.sc[1],e.sc[2]]:[0,0,0]),e.fillColorAnim&&e.fc&&(K=[e.fc[0],e.fc[1],e.fc[2]]),L=0;L<R;L+=1)F=r[L].a,F.a.propType&&(I=r[L].s,B=I.getMult(f[u].anIndexes[L],i.a[L].s.totalChars),B.length?a.translate(-F.a.v[0]*B[0],-F.a.v[1]*B[1],F.a.v[2]*B[2]):a.translate(-F.a.v[0]*B,-F.a.v[1]*B,F.a.v[2]*B));for(L=0;L<R;L+=1)F=r[L].a,F.s.propType&&(I=r[L].s,B=I.getMult(f[u].anIndexes[L],i.a[L].s.totalChars),B.length?a.scale(1+(F.s.v[0]-1)*B[0],1+(F.s.v[1]-1)*B[1],1):a.scale(1+(F.s.v[0]-1)*B,1+(F.s.v[1]-1)*B,1));for(L=0;L<R;L+=1){if(F=r[L].a,I=r[L].s,B=I.getMult(f[u].anIndexes[L],i.a[L].s.totalChars),F.sk.propType&&(B.length?a.skewFromAxis(-F.sk.v*B[0],F.sa.v*B[1]):a.skewFromAxis(-F.sk.v*B,F.sa.v*B)),F.r.propType&&(B.length?a.rotateZ(-F.r.v*B[2]):a.rotateZ(-F.r.v*B)),F.ry.propType&&(B.length?a.rotateY(F.ry.v*B[1]):a.rotateY(F.ry.v*B)),F.rx.propType&&(B.length?a.rotateX(F.rx.v*B[0]):a.rotateX(F.rx.v*B)),F.o.propType&&(B.length?ae+=(F.o.v*B[0]-ae)*B[0]:ae+=(F.o.v*B-ae)*B),e.strokeWidthAnim&&F.sw.propType&&(B.length?oe+=F.sw.v*B[0]:oe+=F.sw.v*B),e.strokeColorAnim&&F.sc.propType)for(q=0;q<3;q+=1)B.length?W[q]+=(F.sc.v[q]-W[q])*B[0]:W[q]+=(F.sc.v[q]-W[q])*B;if(e.fillColorAnim&&e.fc){if(F.fc.propType)for(q=0;q<3;q+=1)B.length?K[q]+=(F.fc.v[q]-K[q])*B[0]:K[q]+=(F.fc.v[q]-K[q])*B;F.fh.propType&&(K=B.length?addHueToRGB(K,F.fh.v*B[0]):addHueToRGB(K,F.fh.v*B)),F.fs.propType&&(K=B.length?addSaturationToRGB(K,F.fs.v*B[0]):addSaturationToRGB(K,F.fs.v*B)),F.fb.propType&&(K=B.length?addBrightnessToRGB(K,F.fb.v*B[0]):addBrightnessToRGB(K,F.fb.v*B))}}for(L=0;L<R;L+=1)F=r[L].a,F.p.propType&&(I=r[L].s,B=I.getMult(f[u].anIndexes[L],i.a[L].s.totalChars),this._hasMaskedPath?B.length?a.translate(0,F.p.v[1]*B[0],-F.p.v[2]*B[1]):a.translate(0,F.p.v[1]*B,-F.p.v[2]*B):B.length?a.translate(F.p.v[0]*B[0],F.p.v[1]*B[1],-F.p.v[2]*B[2]):a.translate(F.p.v[0]*B,F.p.v[1]*B,-F.p.v[2]*B));if(e.strokeWidthAnim&&(se=oe<0?0:oe),e.strokeColorAnim&&(ce=`rgb(`+Math.round(W[0]*255)+`,`+Math.round(W[1]*255)+`,`+Math.round(W[2]*255)+`)`),e.fillColorAnim&&e.fc&&(J=`rgb(`+Math.round(K[0]*255)+`,`+Math.round(K[1]*255)+`,`+Math.round(K[2]*255)+`)`),this._hasMaskedPath){if(a.translate(0,-e.ls),a.translate(0,n[1]*N*.01+l,0),this._pathData.p.v){k=(g.point[1]-S.point[1])/(g.point[0]-S.point[0]);var pe=Math.atan(k)*180/Math.PI;g.point[0]<S.point[0]&&(pe+=180),a.rotate(-pe*Math.PI/180)}a.translate(H,te,0),m-=n[0]*f[u].an*.005,f[u+1]&&V!==f[u+1].ind&&(m+=f[u].an/2,m+=e.tr*.001*e.finalSize)}else{switch(a.translate(c,l,0),e.ps&&a.translate(e.ps[0],e.ps[1]+e.ascent,0),e.j){case 1:a.translate(f[u].animatorJustifyOffset+e.justifyOffset+(e.boxWidth-e.lineWidths[f[u].line]),0,0);break;case 2:a.translate(f[u].animatorJustifyOffset+e.justifyOffset+(e.boxWidth-e.lineWidths[f[u].line])/2,0,0);break;default:break}a.translate(0,-e.ls),a.translate(ee,0,0),a.translate(n[0]*f[u].an*.005,n[1]*N*.01,0),c+=f[u].l+e.tr*.001*e.finalSize}o===`html`?le=a.toCSS():o===`svg`?le=a.to2dCSS():Y=[a.props[0],a.props[1],a.props[2],a.props[3],a.props[4],a.props[5],a.props[6],a.props[7],a.props[8],a.props[9],a.props[10],a.props[11],a.props[12],a.props[13],a.props[14],a.props[15]],ue=ae}s<=u?(z=new LetterProps(ue,se,ce,J,le,Y),this.renderedLetters.push(z),s+=1,this.lettersChangedFlag=!0):(z=this.renderedLetters[u],this.lettersChangedFlag=z.update(ue,se,ce,J,le,Y)||this.lettersChangedFlag)}}},TextAnimatorProperty.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty);function ITextElement(){}ITextElement.prototype.initElement=function(e,t,n){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(e,t,n),this.textProperty=new TextProperty(this,e.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(e.t,this.renderType,this),this.initTransform(e,t,n),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(e){this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange)},ITextElement.prototype.createPathShape=function(e,t){var n,r=t.length,i,a=``;for(n=0;n<r;n+=1)t[n].ty===`sh`&&(i=t[n].ks.k,a+=buildShapeString(i,i.i.length,!0,e));return a},ITextElement.prototype.updateDocumentData=function(e,t){this.textProperty.updateDocumentData(e,t)},ITextElement.prototype.canResizeFont=function(e){this.textProperty.canResizeFont(e)},ITextElement.prototype.setMinimumFontSize=function(e){this.textProperty.setMinimumFontSize(e)},ITextElement.prototype.applyTextPropertiesToMatrix=function(e,t,n,r,i){switch(e.ps&&t.translate(e.ps[0],e.ps[1]+e.ascent,0),t.translate(0,-e.ls,0),e.j){case 1:t.translate(e.justifyOffset+(e.boxWidth-e.lineWidths[n]),0,0);break;case 2:t.translate(e.justifyOffset+(e.boxWidth-e.lineWidths[n])/2,0,0);break;default:break}t.translate(r,i,0)},ITextElement.prototype.buildColor=function(e){return`rgb(`+Math.round(e[0]*255)+`,`+Math.round(e[1]*255)+`,`+Math.round(e[2]*255)+`)`},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){},ITextElement.prototype.validateText=function(){(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)};var emptyShapeData={shapes:[]};function SVGTextLottieElement(e,t,n){this.textSpans=[],this.renderType=`svg`,this.initElement(e,t,n)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextLottieElement),SVGTextLottieElement.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=createNS(`text`))},SVGTextLottieElement.prototype.buildTextContents=function(e){for(var t=0,n=e.length,r=[],i=``;t<n;)e[t]===`\r`||e[t]===`�`?(r.push(i),i=``):i+=e[t],t+=1;return r.push(i),r},SVGTextLottieElement.prototype.buildShapeData=function(e,t){if(e.shapes&&e.shapes.length){var n=e.shapes[0];if(n.it){var r=n.it[n.it.length-1];r.s&&(r.s.k[0]=t,r.s.k[1]=t)}}return e},SVGTextLottieElement.prototype.buildNewText=function(){this.addDynamicProperty(this);var e,t,n=this.textProperty.currentData;this.renderedLetters=createSizedArray(n?n.l.length:0),n.fc?this.layerElement.setAttribute(`fill`,this.buildColor(n.fc)):this.layerElement.setAttribute(`fill`,`rgba(0,0,0,0)`),n.sc&&(this.layerElement.setAttribute(`stroke`,this.buildColor(n.sc)),this.layerElement.setAttribute(`stroke-width`,n.sw)),this.layerElement.setAttribute(`font-size`,n.finalSize);var r=this.globalData.fontManager.getFontByName(n.f);if(r.fClass)this.layerElement.setAttribute(`class`,r.fClass);else{this.layerElement.setAttribute(`font-family`,r.fFamily);var i=n.fWeight,a=n.fStyle;this.layerElement.setAttribute(`font-style`,a),this.layerElement.setAttribute(`font-weight`,i)}this.layerElement.setAttribute(`aria-label`,n.t);var o=n.l||[],s=!!this.globalData.fontManager.chars;t=o.length;var c,l=this.mHelper,u=``,d=this.data.singleShape,f=0,p=0,m=!0,g=n.tr*.001*n.finalSize;if(d&&!s&&!n.sz){var _=this.textContainer,y=`start`;switch(n.j){case 1:y=`end`;break;case 2:y=`middle`;break;default:y=`start`;break}_.setAttribute(`text-anchor`,y),_.setAttribute(`letter-spacing`,g);var b=this.buildTextContents(n.finalText);for(t=b.length,p=n.ps?n.ps[1]+n.ascent:0,e=0;e<t;e+=1)c=this.textSpans[e].span||createNS(`tspan`),c.textContent=b[e],c.setAttribute(`x`,0),c.setAttribute(`y`,p),c.style.display=`inherit`,_.appendChild(c),this.textSpans[e]||(this.textSpans[e]={span:null,glyph:null}),this.textSpans[e].span=c,p+=n.finalLineHeight;this.layerElement.appendChild(_)}else{var x=this.textSpans.length,S;for(e=0;e<t;e+=1){if(this.textSpans[e]||(this.textSpans[e]={span:null,childSpan:null,glyph:null}),!s||!d||e===0){if(c=x>e?this.textSpans[e].span:createNS(s?`g`:`text`),x<=e){if(c.setAttribute(`stroke-linecap`,`butt`),c.setAttribute(`stroke-linejoin`,`round`),c.setAttribute(`stroke-miterlimit`,`4`),this.textSpans[e].span=c,s){var C=createNS(`g`);c.appendChild(C),this.textSpans[e].childSpan=C}this.textSpans[e].span=c,this.layerElement.appendChild(c)}c.style.display=`inherit`}if(l.reset(),d&&(o[e].n&&(f=-g,p+=n.yOffset,p+=+!!m,m=!1),this.applyTextPropertiesToMatrix(n,l,o[e].line,f,p),f+=o[e].l||0,f+=g),s){S=this.globalData.fontManager.getCharData(n.finalText[e],r.fStyle,this.globalData.fontManager.getFontByName(n.f).fFamily);var T;if(S.t===1)T=new SVGCompElement(S.data,this.globalData,this);else{var E=emptyShapeData;S.data&&S.data.shapes&&(E=this.buildShapeData(S.data,n.finalSize)),T=new SVGShapeElement(E,this.globalData,this)}if(this.textSpans[e].glyph){var D=this.textSpans[e].glyph;this.textSpans[e].childSpan.removeChild(D.layerElement),D.destroy()}this.textSpans[e].glyph=T,T._debug=!0,T.prepareFrame(0),T.renderFrame(),this.textSpans[e].childSpan.appendChild(T.layerElement),S.t===1&&this.textSpans[e].childSpan.setAttribute(`transform`,`scale(`+n.finalSize/100+`,`+n.finalSize/100+`)`)}else d&&c.setAttribute(`transform`,`translate(`+l.props[12]+`,`+l.props[13]+`)`),c.textContent=o[e].val,c.setAttributeNS(`http://www.w3.org/XML/1998/namespace`,`xml:space`,`preserve`)}d&&c&&c.setAttribute(`d`,u)}for(;e<this.textSpans.length;)this.textSpans[e].span.style.display=`none`,e+=1;this._sizeChanged=!0},SVGTextLottieElement.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var e=this.layerElement.getBBox();this.bbox={top:e.y,left:e.x,width:e.width,height:e.height}}return this.bbox},SVGTextLottieElement.prototype.getValue=function(){var e,t=this.textSpans.length,n;for(this.renderedFrame=this.comp.renderedFrame,e=0;e<t;e+=1)n=this.textSpans[e].glyph,n&&(n.prepareFrame(this.comp.renderedFrame-this.data.st),n._mdf&&(this._mdf=!0))},SVGTextLottieElement.prototype.renderInnerContent=function(){if(this.validateText(),(!this.data.singleShape||this._mdf)&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){this._sizeChanged=!0;var e,t,n=this.textAnimator.renderedLetters,r=this.textProperty.currentData.l;t=r.length;var i,a,o;for(e=0;e<t;e+=1)r[e].n||(i=n[e],a=this.textSpans[e].span,o=this.textSpans[e].glyph,o&&o.renderFrame(),i._mdf.m&&a.setAttribute(`transform`,i.m),i._mdf.o&&a.setAttribute(`opacity`,i.o),i._mdf.sw&&a.setAttribute(`stroke-width`,i.sw),i._mdf.sc&&a.setAttribute(`stroke`,i.sc),i._mdf.fc&&a.setAttribute(`fill`,i.fc))}};function ISolidElement(e,t,n){this.initElement(e,t,n)}extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var e=createNS(`rect`);e.setAttribute(`width`,this.data.sw),e.setAttribute(`height`,this.data.sh),e.setAttribute(`fill`,this.data.sc),this.layerElement.appendChild(e)};function NullElement(e,t,n){this.initFrame(),this.initBaseData(e,t,n),this.initFrame(),this.initTransform(e,t,n),this.initHierarchy()}NullElement.prototype.prepareFrame=function(e){this.prepareProperties(e,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement);function SVGRendererBase(){}extendPrototype([BaseRenderer],SVGRendererBase),SVGRendererBase.prototype.createNull=function(e){return new NullElement(e,this.globalData,this)},SVGRendererBase.prototype.createShape=function(e){return new SVGShapeElement(e,this.globalData,this)},SVGRendererBase.prototype.createText=function(e){return new SVGTextLottieElement(e,this.globalData,this)},SVGRendererBase.prototype.createImage=function(e){return new IImageElement(e,this.globalData,this)},SVGRendererBase.prototype.createSolid=function(e){return new ISolidElement(e,this.globalData,this)},SVGRendererBase.prototype.configAnimation=function(e){this.svgElement.setAttribute(`xmlns`,`http://www.w3.org/2000/svg`),this.svgElement.setAttribute(`xmlns:xlink`,`http://www.w3.org/1999/xlink`),this.renderConfig.viewBoxSize?this.svgElement.setAttribute(`viewBox`,this.renderConfig.viewBoxSize):this.svgElement.setAttribute(`viewBox`,`0 0 `+e.w+` `+e.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute(`width`,e.w),this.svgElement.setAttribute(`height`,e.h),this.svgElement.style.width=`100%`,this.svgElement.style.height=`100%`,this.svgElement.style.transform=`translate3d(0,
100,0)`,this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.width&&this.svgElement.setAttribute(`width`,this.renderConfig.width),this.renderConfig.height&&this.svgElement.setAttribute(`height`,this.renderConfig.height),this.renderConfig.className&&this.svgElement.setAttribute(`class`,this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute(`id`,this.renderConfig.id),this.renderConfig.focusable!==void 0&&this.svgElement.setAttribute(`focusable`,this.renderConfig.focusable),this.svgElement.setAttribute(`preserveAspectRatio`,this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var t=this.globalData.defs;this.setupGlobalData(e,t),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=e;var n=createNS(`clipPath`),r=createNS(`rect`);r.setAttribute(`width`,e.w),r.setAttribute(`height`,e.h),r.setAttribute(`x`,0),r.setAttribute(`y`,0);var i=createElementID();n.setAttribute(`id`,i),n.appendChild(r),this.layerElement.setAttribute(`clip-path`,`url(`+getLocationHref()+`#`+i+`)`),t.appendChild(n),this.layers=e.layers,this.elements=createSizedArray(e.layers.length)},SVGRendererBase.prototype.destroy=function(){this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=``),this.layerElement=null,this.globalData.defs=null;var e,t=this.layers?this.layers.length:0;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRendererBase.prototype.updateContainerSize=function(){},SVGRendererBase.prototype.findIndexByInd=function(e){var t=0,n=this.layers.length;for(t=0;t<n;t+=1)if(this.layers[t].ind===e)return t;return-1},SVGRendererBase.prototype.buildItem=function(e){var t=this.elements;if(!(t[e]||this.layers[e].ty===99)){t[e]=!0;var n=this.createItem(this.layers[e]);if(t[e]=n,getExpressionsPlugin()&&(this.layers[e].ty===0&&this.globalData.projectInterface.registerComposition(n),n.initExpressions()),this.appendElementInPos(n,e),this.layers[e].tt){var r=`tp`in this.layers[e]?this.findIndexByInd(this.layers[e].tp):e-1;if(r===-1)return;if(!this.elements[r]||this.elements[r]===!0)this.buildItem(r),this.addPendingElement(n);else{var i=t[r].getMatte(this.layers[e].tt);n.setMatte(i)}}}},SVGRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var e=this.pendingElements.pop();if(e.checkParenting(),e.data.tt)for(var t=0,n=this.elements.length;t<n;){if(this.elements[t]===e){var r=`tp`in e.data?this.findIndexByInd(e.data.tp):t-1,i=this.elements[r].getMatte(this.layers[t].tt);e.setMatte(i);break}t+=1}}},SVGRendererBase.prototype.renderFrame=function(e){if(!(this.renderedFrame===e||this.destroyed)){e===null?e=this.renderedFrame:this.renderedFrame=e,this.globalData.frameNum=e,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=e,this.globalData._mdf=!1;var t,n=this.layers.length;for(this.completeLayers||this.checkLayers(e),t=n-1;t>=0;--t)(this.completeLayers||this.elements[t])&&this.elements[t].prepareFrame(e-this.layers[t].st);if(this.globalData._mdf)for(t=0;t<n;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()}},SVGRendererBase.prototype.appendElementInPos=function(e,t){var n=e.getBaseElement();if(n){for(var r=0,i;r<t;)this.elements[r]&&this.elements[r]!==!0&&this.elements[r].getBaseElement()&&(i=this.elements[r].getBaseElement()),r+=1;i?this.layerElement.insertBefore(n,i):this.layerElement.appendChild(n)}},SVGRendererBase.prototype.hide=function(){this.layerElement.style.display=`none`},SVGRendererBase.prototype.show=function(){this.layerElement.style.display=`block`};function ICompElement(){}extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(e,t,n){this.initFrame(),this.initBaseData(e,t,n),this.initTransform(e,t,n),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),(this.data.xt||!t.progressiveLoad)&&this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(e){if(this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange),!(!this.isInRange&&!this.data.xt)){if(this.tm._placeholder)this.renderedFrame=e/this.data.sr;else{var t=this.tm.v;t===this.data.op&&(t=this.data.op-1),this.renderedFrame=t}var n,r=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),n=r-1;n>=0;--n)(this.completeLayers||this.elements[n])&&(this.elements[n].prepareFrame(this.renderedFrame-this.layers[n].st),this.elements[n]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()},ICompElement.prototype.setElements=function(e){this.elements=e},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()};function SVGCompElement(e,t,n){this.layers=e.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(e,t,n),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}extendPrototype([SVGRendererBase,ICompElement,SVGBaseElement],SVGCompElement),SVGCompElement.prototype.createComp=function(e){return new SVGCompElement(e,this.globalData,this)};function SVGRenderer(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS(`svg`);var n=``;if(t&&t.title){var r=createNS(`title`),i=createElementID();r.setAttribute(`id`,i),r.textContent=t.title,this.svgElement.appendChild(r),n+=i}if(t&&t.description){var a=createNS(`desc`),o=createElementID();a.setAttribute(`id`,o),a.textContent=t.description,this.svgElement.appendChild(a),n+=` `+o}n&&this.svgElement.setAttribute(`aria-labelledby`,n);var s=createNS(`defs`);this.svgElement.appendChild(s);var c=createNS(`g`);this.svgElement.appendChild(c),this.layerElement=c,this.renderConfig={preserveAspectRatio:t&&t.preserveAspectRatio||`xMidYMid meet`,imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||`xMidYMid slice`,contentVisibility:t&&t.contentVisibility||`visible`,progressiveLoad:t&&t.progressiveLoad||!1,hideOnTransparent:!(t&&t.hideOnTransparent===!1),viewB
vendor: 28,971 bytes, line 10
10oxOnly:t&&t.viewBoxOnly||!1,viewBoxSize:t&&t.viewBoxSize||!1,className:t&&t.className||``,id:t&&t.id||``,focusable:t&&t.focusable,filterSize:{width:t&&t.filterSize&&t.filterSize.width||`100%`,height:t&&t.filterSize&&t.filterSize.height||`100%`,x:t&&t.filterSize&&t.filterSize.x||`0%`,y:t&&t.filterSize&&t.filterSize.y||`0%`},width:t&&t.width,height:t&&t.height,runExpressions:!t||t.runExpressions===void 0||t.runExpressions},this.globalData={_mdf:!1,frameNum:-1,defs:s,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType=`svg`}extendPrototype([SVGRendererBase],SVGRenderer),SVGRenderer.prototype.createComp=function(e){return new SVGCompElement(e,this.globalData,this)};function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}ShapeTransformManager.prototype={addTransformSequence:function(e){var t,n=e.length,r=`_`;for(t=0;t<n;t+=1)r+=e[t].transform.key+`_`;var i=this.sequences[r];return i||(i={transforms:[].concat(e),finalTransform:new Matrix,_mdf:!1},this.sequences[r]=i,this.sequenceList.push(i)),i},processSequence:function(e,t){for(var n=0,r=e.transforms.length,i=t;n<r&&!t;){if(e.transforms[n].transform.mProps._mdf){i=!0;break}n+=1}if(i)for(e.finalTransform.reset(),n=r-1;n>=0;--n)e.finalTransform.multiply(e.transforms[n].transform.mProps.v);e._mdf=i},processSequences:function(e){var t,n=this.sequenceList.length;for(t=0;t<n;t+=1)this.processSequence(this.sequenceList[t],e)},getNewKey:function(){return this.transform_key_count+=1,`_`+this.transform_key_count}};var lumaLoader=function(){var e=`__lottie_element_luma_buffer`,t=null,n=null,r=null;function i(){var t=createNS(`svg`),n=createNS(`filter`),r=createNS(`feColorMatrix`);return n.setAttribute(`id`,e),r.setAttribute(`type`,`matrix`),r.setAttribute(`color-interpolation-filters`,`sRGB`),r.setAttribute(`values`,`0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0`),n.appendChild(r),t.appendChild(n),t.setAttribute(`id`,e+`_svg`),featureSupport.svgLumaHidden&&(t.style.display=`none`),t}function a(){t||(r=i(),document.body.appendChild(r),t=createTag(`canvas`),n=t.getContext(`2d`),n.filter=`url(#`+e+`)`,n.fillStyle=`rgba(0,0,0,0)`,n.fillRect(0,0,1,1))}function o(r){return t||a(),t.width=r.width,t.height=r.height,n.filter=`url(#`+e+`)`,t}return{load:a,get:o}};function createCanvas(e,t){if(featureSupport.offscreenCanvas)return new OffscreenCanvas(e,t);var n=createTag(`canvas`);return n.width=e,n.height=t,n}var assetLoader=function(){return{loadLumaCanvas:lumaLoader.load,getLumaCanvas:lumaLoader.get,createCanvas}}(),registeredEffects={};function CVEffects(e){var t,n=e.data.ef?e.data.ef.length:0;this.filters=[];var r;for(t=0;t<n;t+=1){r=null;var i=e.data.ef[t].ty;if(registeredEffects[i]){var a=registeredEffects[i].effect;r=new a(e.effectsManager.effectElements[t],e)}r&&this.filters.push(r)}this.filters.length&&e.addRenderableComponent(this)}CVEffects.prototype.renderFrame=function(e){var t,n=this.filters.length;for(t=0;t<n;t+=1)this.filters[t].renderFrame(e)},CVEffects.prototype.getEffects=function(e){var t,n=this.filters.length,r=[];for(t=0;t<n;t+=1)this.filters[t].type===e&&r.push(this.filters[t]);return r};function registerEffect(e,t){registeredEffects[e]={effect:t}}function CVMaskElement(e,t){this.data=e,this.element=t,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);var n,r=this.masksProperties.length,i=!1;for(n=0;n<r;n+=1)this.masksProperties[n].mode!==`n`&&(i=!0),this.viewData[n]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[n],3);this.hasMasks=i,i&&this.element.addRenderableComponent(this)}CVMaskElement.prototype.renderFrame=function(){if(this.hasMasks){var e=this.element.finalTransform.mat,t=this.element.canvasContext,n,r=this.masksProperties.length,i,a,o;for(t.beginPath(),n=0;n<r;n+=1)if(this.masksProperties[n].mode!==`n`){this.masksProperties[n].inv&&(t.moveTo(0,0),t.lineTo(this.element.globalData.compSize.w,0),t.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),t.lineTo(0,this.element.globalData.compSize.h),t.lineTo(0,0)),o=this.viewData[n].v,i=e.applyToPointArray(o.v[0][0],o.v[0][1],0),t.moveTo(i[0],i[1]);var s,c=o._length;for(s=1;s<c;s+=1)a=e.applyToTriplePoints(o.o[s-1],o.i[s],o.v[s]),t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);a=e.applyToTriplePoints(o.o[s-1],o.i[0],o.v[0]),t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5])}this.element.globalData.renderer.save(!0),t.clip()}},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null};function CVBaseElement(){}var operationsMap={1:`source-in`,2:`source-out`,3:`source-in`,4:`source-out`};CVBaseElement.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){if(this.data.tt>=1){this.buffers=[];var e=this.globalData.canvasContext,t=assetLoader.createCanvas(e.canvas.width,e.canvas.height);this.buffers.push(t);var n=assetLoader.createCanvas(e.canvas.width,e.canvas.height);this.buffers.push(n),this.data.tt>=3&&!document._isProxy&&assetLoader.loadLumaCanvas()}this.canvasContext=this.globalData.canvasContext,this.transformCanvas=this.globalData.transformCanvas,this.renderableEffectsManager=new CVEffects(this),this.searchEffectTransforms()},createContent:function(){},setBlendMode:function(){var e=this.globalData;if(e.blendMode!==this.data.bm){e.blendMode=this.data.bm;var t=getBlendMode(this.data.bm);e.canvasContext.globalCompositeOperation=t}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this),this.transformEffects=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT)},hideElement:function(){!this.hidden&&(!this.isInRange||this.isTransparent)&&(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},clearCanvas:function(e){e.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)},prepareLayer:function(){if(this.data.tt>=1){var e=this.buffers[0].getContext(`2d`);this.clearCanvas(e),e.drawImage(this.canvasContext.canvas,0,0),this.currentTransform=this.canvasContext.getTransform(),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform)}},exitLayer:function(){if(this.data.tt>=1){var e=this.buffers[1],t=e.getContext(`2d`);if(this.clearCanvas(t),t.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform),this.comp.getElementById(`tp`in this.data?this.data.tp:this.data.ind-1).renderFrame(!0),this.canvasContext.setTransform(1,0,0,1,0,0),this.data.tt>=3&&!document._isProxy){var n=assetLoader.getLumaCanvas(this.canvasContext.canvas);n.getContext(`2d`).drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(n,0,0)}this.canvasContext.globalCompositeOperation=operationsMap[this.data.tt],this.canvasContext.drawImage(e,0,0),this.canvasContext.globalCompositeOperation=`destination-over`,this.canvasContext.drawImage(this.buffers[0],0,0),this.canvasContext.setTransform(this.currentTransform),this.canvasContext.globalCompositeOperation=`source-over`}},renderFrame:function(e){if(!(this.hidden||this.data.hd)&&!(this.data.td===1&&!e)){this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.setBlendMode();var t=this.data.ty===0;this.prepareLayer(),this.globalData.renderer.save(t),this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity),this.renderInnerContent(),this.globalData.renderer.restore(t),this.exitLayer(),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&=!1}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement;function CVShapeData(e,t,n,r){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var i=4;t.ty===`rc`?i=5:t.ty===`el`?i=6:t.ty===`sr`&&(i=7),this.sh=ShapePropertyFactory.getShapeProp(e,t,i,e);var a,o=n.length,s;for(a=0;a<o;a+=1)n[a].closed||(s={transforms:r.addTransformSequence(n[a].transforms),trNodes:[]},this.styledShapes.push(s),n[a].elements.push(s))}CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated;function CVShapeElement(e,t,n){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new ShapeTransformManager,this.initElement(e,t,n)}extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(e,t){var n={data:e,type:e.ty,preTransforms:this.transformsManager.addTransformSequence(t),transforms:[],elements:[],closed:e.hd===!0},r={};return e.ty===`fl`||e.ty===`st`?(r.c=PropertyFactory.getProp(this,e.c,1,255,this),r.c.k||(n.co=`rgb(`+bmFloor(r.c.v[0])+`,`+bmFloor(r.c.v[1])+`,`+bmFloor(r.c.v[2])+`)`)):(e.ty===`gf`||e.ty===`gs`)&&(r.s=PropertyFactory.getProp(this,e.s,1,null,this),r.e=PropertyFactory.getProp(this,e.e,1,null,this),r.h=PropertyFactory.getProp(this,e.h||{k:0},0,.01,this),r.a=PropertyFactory.getProp(this,e.a||{k:0},0,degToRads,this),r.g=new GradientProperty(this,e.g,this)),r.o=PropertyFactory.getProp(this,e.o,0,.01,this),e.ty===`st`||e.ty===`gs`?(n.lc=lineCapEnum[e.lc||2],n.lj=lineJoinEnum[e.lj||2],e.lj==1&&(n.ml=e.ml),r.w=PropertyFactory.getProp(this,e.w,0,null,this),r.w.k||(n.wi=r.w.v),e.d&&(r.d=new DashProperty(this,e.d,`canvas`,this),r.d.k||(n.da=r.d.dashArray,n.do=r.d.dashoffset[0]))):n.r=e.r===2?`evenodd`:`nonzero`,this.stylesList.push(n),r.style=n,r},CVShapeElement.prototype.createGroupElement=function(){return{it:[],prevViewData:[]}},CVShapeElement.prototype.createTransformElement=function(e){return{transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,e.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,e,this)}}},CVShapeElement.prototype.createShapeElement=function(e){var t=new CVShapeData(this,e,this.stylesList,this.transformsManager);return this.shapes.push(t),this.addShapeToModifiers(t),t},CVShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;var e,t=this.itemsData.length;for(e=0;e<t;e+=1)this.prevViewData[e]=this.itemsData[e];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),t=this.dynamicProperties.length,e=0;e<t;e+=1)this.dynamicProperties[e].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},CVShapeElement.prototype.addTransformToStyleList=function(e){var t,n=this.stylesList.length;for(t=0;t<n;t+=1)this.stylesList[t].closed||this.stylesList[t].transforms.push(e)},CVShapeElement.prototype.removeTransformFromStyleList=function(){var e,t=this.stylesList.length;for(e=0;e<t;e+=1)this.stylesList[e].closed||this.stylesList[e].transforms.pop()},CVShapeElement.prototype.closeStyles=function(e){var t,n=e.length;for(t=0;t<n;t+=1)e[t].closed=!0},CVShapeElement.prototype.searchShapes=function(e,t,n,r,i){var a,o=e.length-1,s,c,l=[],u=[],d,f,p,m=[].concat(i);for(a=o;a>=0;--a){if(d=this.searchProcessedElement(e[a]),d?t[a]=n[d-1]:e[a]._shouldRender=r,e[a].ty===`fl`||e[a].ty===`st`||e[a].ty===`gf`||e[a].ty===`gs`)d?t[a].style.closed=!1:t[a]=this.createStyleElement(e[a],m),l.push(t[a].style);else if(e[a].ty===`gr`){if(!d)t[a]=this.createGroupElement(e[a]);else for(c=t[a].it.length,s=0;s<c;s+=1)t[a].prevViewData[s]=t[a].it[s];this.searchShapes(e[a].it,t[a].it,t[a].prevViewData,r,m)}else e[a].ty===`tr`?(d||(p=this.createTransformElement(e[a]),t[a]=p),m.push(t[a]),this.addTransformToStyleList(t[a])):e[a].ty===`sh`||e[a].ty===`rc`||e[a].ty===`el`||e[a].ty===`sr`?d||(t[a]=this.createShapeElement(e[a])):e[a].ty===`tm`||e[a].ty===`rd`||e[a].ty===`pb`||e[a].ty===`zz`||e[a].ty===`op`?(d?(f=t[a],f.closed=!1):(f=ShapeModifiers.getModifier(e[a].ty),f.init(this,e[a]),t[a]=f,this.shapeModifiers.push(f)),u.push(f)):e[a].ty===`rp`&&(d?(f=t[a],f.closed=!0):(f=ShapeModifiers.getModifier(e[a].ty),t[a]=f,f.init(this,e,a,t),this.shapeModifiers.push(f),r=!1),u.push(f));this.addProcessedElement(e[a],a+1)}for(this.removeTransformFromStyleList(),this.closeStyles(l),o=u.length,a=0;a<o;a+=1)u[a].closed=!0},CVShapeElement.prototype.renderInnerContent=function(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)},CVShapeElement.prototype.renderShapeTransform=function(e,t){(e._opMdf||t.op._mdf||this._isFirstFrame)&&(t.opacity=e.opacity,t.opacity*=t.op.v,t._opMdf=!0)},CVShapeElement.prototype.drawLayer=function(){var e,t=this.stylesList.length,n,r,i,a,o,s,c=this.globalData.renderer,l=this.globalData.canvasContext,u,d;for(e=0;e<t;e+=1)if(d=this.stylesList[e],u=d.type,!((u===`st`||u===`gs`)&&d.wi===0||!d.data._shouldRender||d.coOp===0||this.globalData.currentGlobalAlpha===0)){for(c.save(),o=d.elements,u===`st`||u===`gs`?(c.ctxStrokeStyle(u===`st`?d.co:d.grd),c.ctxLineWidth(d.wi),c.ctxLineCap(d.lc),c.ctxLineJoin(d.lj),c.ctxMiterLimit(d.ml||0)):c.ctxFillStyle(u===`fl`?d.co:d.grd),c.ctxOpacity(d.coOp),u!==`st`&&u!==`gs`&&l.beginPath(),c.ctxTransform(d.preTransforms.finalTransform.props),r=o.length,n=0;n<r;n+=1){for((u===`st`||u===`gs`)&&(l.beginPath(),d.da&&(l.setLineDash(d.da),l.lineDashOffset=d.do)),s=o[n].trNodes,a=s.length,i=0;i<a;i+=1)s[i].t===`m`?l.moveTo(s[i].p[0],s[i].p[1]):s[i].t===`c`?l.bezierCurveTo(s[i].pts[0],s[i].pts[1],s[i].pts[2],s[i].pts[3],s[i].pts[4],s[i].pts[5]):l.closePath();(u===`st`||u===`gs`)&&(c.ctxStroke(),d.da&&l.setLineDash(this.dashResetter))}u!==`st`&&u!==`gs`&&this.globalData.renderer.ctxFill(d.r),c.restore()}},CVShapeElement.prototype.renderShape=function(e,t,n,r){var i,a=t.length-1,o=e;for(i=a;i>=0;--i)t[i].ty===`tr`?(o=n[i].transform,this.renderShapeTransform(e,o)):t[i].ty===`sh`||t[i].ty===`el`||t[i].ty===`rc`||t[i].ty===`sr`?this.renderPath(t[i],n[i]):t[i].ty===`fl`?this.renderFill(t[i],n[i],o):t[i].ty===`st`?this.renderStroke(t[i],n[i],o):t[i].ty===`gf`||t[i].ty===`gs`?this.renderGradientFill(t[i],n[i],o):t[i].ty===`gr`?this.renderShape(o,t[i].it,n[i].it):t[i].ty;r&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(e,t){if(this._isFirstFrame||t._mdf||e.transforms._mdf){var n=e.trNodes,r=t.paths,i,a,o,s=r._length;n.length=0;var c=e.transforms.finalTransform;for(o=0;o<s;o+=1){var l=r.shapes[o];if(l&&l.v){for(a=l._length,i=1;i<a;i+=1)i===1&&n.push({t:`m`,p:c.applyToPointArray(l.v[0][0],l.v[0][1],0)}),n.push({t:`c`,pts:c.applyToTriplePoints(l.o[i-1],l.i[i],l.v[i])});a===1&&n.push({t:`m`,p:c.applyToPointArray(l.v[0][0],l.v[0][1],0)}),l.c&&a&&(n.push({t:`c`,pts:c.applyToTriplePoints(l.o[i-1],l.i[0],l.v[0])}),n.push({t:`z`}))}}e.trNodes=n}},CVShapeElement.prototype.renderPath=function(e,t){if(e.hd!==!0&&e._shouldRender){var n,r=t.styledShapes.length;for(n=0;n<r;n+=1)this.renderStyledShape(t.styledShapes[n],t.sh)}},CVShapeElement.prototype.renderFill=function(e,t,n){var r=t.style;(t.c._mdf||this._isFirstFrame)&&(r.co=`rgb(`+bmFloor(t.c.v[0])+`,`+bmFloor(t.c.v[1])+`,`+bmFloor(t.c.v[2])+`)`),(t.o._mdf||n._opMdf||this._isFirstFrame)&&(r.coOp=t.o.v*n.opacity)},CVShapeElement.prototype.renderGradientFill=function(e,t,n){var r=t.style,i;if(!r.grd||t.g._mdf||t.s._mdf||t.e._mdf||e.t!==1&&(t.h._mdf||t.a._mdf)){var a=this.globalData.canvasContext,o=t.s.v,s=t.e.v;if(e.t===1)i=a.createLinearGradient(o[0],o[1],s[0],s[1]);else{var c=Math.sqrt((o[0]-s[0])**2+(o[1]-s[1])**2),l=Math.atan2(s[1]-o[1],s[0]-o[0]),u=t.h.v;u>=1?u=.99:u<=-1&&(u=-.99);var d=c*u,f=Math.cos(l+t.a.v)*d+o[0],p=Math.sin(l+t.a.v)*d+o[1];i=a.createRadialGradient(f,p,0,o[0],o[1],c)}var m,g=e.g.p,_=t.g.c,y=1;for(m=0;m<g;m+=1)t.g._hasOpacity&&t.g._collapsable&&(y=t.g.o[m*2+1]),i.addColorStop(_[m*4]/100,`rgba(`+_[m*4+1]+`,`+_[m*4+2]+`,`+_[m*4+3]+`,`+y+`)`);r.grd=i}r.coOp=t.o.v*n.opacity},CVShapeElement.prototype.renderStroke=function(e,t,n){var r=t.style,i=t.d;i&&(i._mdf||this._isFirstFrame)&&(r.da=i.dashArray,r.do=i.dashoffset[0]),(t.c._mdf||this._isFirstFrame)&&(r.co=`rgb(`+bmFloor(t.c.v[0])+`,`+bmFloor(t.c.v[1])+`,`+bmFloor(t.c.v[2])+`)`),(t.o._mdf||n._opMdf||this._isFirstFrame)&&(r.coOp=t.o.v*n.opacity),(t.w._mdf||this._isFirstFrame)&&(r.wi=t.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0};function CVTextElement(e,t,n){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType=`canvas`,this.values={fill:`rgba(0,0,0,0)`,stroke:`rgba(0,0,0,0)`,sWidth:0,fValue:``},this.initElement(e,t,n)}extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement],CVTextElement),CVTextElement.prototype.tHelper=createTag(`canvas`).getContext(`2d`),CVTextElement.prototype.buildNewText=function(){var e=this.textProperty.currentData;this.renderedLetters=createSizedArray(e.l?e.l.length:0);var t=!1;e.fc?(t=!0,this.values.fill=this.buildColor(e.fc)):this.values.fill=`rgba(0,0,0,0)`,this.fill=t;var n=!1;e.sc&&(n=!0,this.values.stroke=this.buildColor(e.sc),this.values.sWidth=e.sw);var r=this.globalData.fontManager.getFontByName(e.f),i,a,o=e.l,s=this.mHelper;this.stroke=n,this.values.fValue=e.finalSize+`px `+this.globalData.fontManager.getFontByName(e.f).fFamily,a=e.finalText.length;var c,l,u,d,f,p,m,g,_,y,b=this.data.singleShape,x=e.tr*.001*e.finalSize,S=0,C=0,T=!0,E=0;for(i=0;i<a;i+=1){c=this.globalData.fontManager.getCharData(e.finalText[i],r.fStyle,this.globalData.fontManager.getFontByName(e.f).fFamily),l=c&&c.data||{},s.reset(),b&&o[i].n&&(S=-x,C+=e.yOffset,C+=+!!T,T=!1),f=l.shapes?l.shapes[0].it:[],m=f.length,s.scale(e.finalSize/100,e.finalSize/100),b&&this.applyTextPropertiesToMatrix(e,s,o[i].line,S,C),_=createSizedArray(m-1);var D=0;for(p=0;p<m;p+=1)if(f[p].ty===`sh`){for(d=f[p].ks.k.i.length,g=f[p].ks.k,y=[],u=1;u<d;u+=1)u===1&&y.push(s.applyToX(g.v[0][0],g.v[0][1],0),s.applyToY(g.v[0][0],g.v[0][1],0)),y.push(s.applyToX(g.o[u-1][0],g.o[u-1][1],0),s.applyToY(g.o[u-1][0],g.o[u-1][1],0),s.applyToX(g.i[u][0],g.i[u][1],0),s.applyToY(g.i[u][0],g.i[u][1],0),s.applyToX(g.v[u][0],g.v[u][1],0),s.applyToY(g.v[u][0],g.v[u][1],0));y.push(s.applyToX(g.o[u-1][0],g.o[u-1][1],0),s.applyToY(g.o[u-1][0],g.o[u-1][1],0),s.applyToX(g.i[0][0],g.i[0][1],0),s.applyToY(g.i[0][0],g.i[0][1],0),s.applyToX(g.v[0][0],g.v[0][1],0),s.applyToY(g.v[0][0],g.v[0][1],0)),_[D]=y,D+=1}b&&(S+=o[i].l,S+=x),this.textSpans[E]?this.textSpans[E].elem=_:this.textSpans[E]={elem:_},E+=1}},CVTextElement.prototype.renderInnerContent=function(){this.validateText();var e=this.canvasContext;e.font=this.values.fValue,this.globalData.renderer.ctxLineCap(`butt`),this.globalData.renderer.ctxLineJoin(`miter`),this.globalData.renderer.ctxMiterLimit(4),this.data.singleShape||this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);var t,n,r,i,a,o,s=this.textAnimator.renderedLetters,c=this.textProperty.currentData.l;n=c.length;var l,u=null,d=null,f=null,p,m,g=this.globalData.renderer;for(t=0;t<n;t+=1)if(!c[t].n){if(l=s[t],l&&(g.save(),g.ctxTransform(l.p),g.ctxOpacity(l.o)),this.fill){for(l&&l.fc?u!==l.fc&&(g.ctxFillStyle(l.fc),u=l.fc):u!==this.values.fill&&(u=this.values.fill,g.ctxFillStyle(this.values.fill)),p=this.textSpans[t].elem,i=p.length,this.globalData.canvasContext.beginPath(),r=0;r<i;r+=1)for(m=p[r],o=m.length,this.globalData.canvasContext.moveTo(m[0],m[1]),a=2;a<o;a+=6)this.globalData.canvasContext.bezierCurveTo(m[a],m[a+1],m[a+2],m[a+3],m[a+4],m[a+5]);this.globalData.canvasContext.closePath(),g.ctxFill()}if(this.stroke){for(l&&l.sw?f!==l.sw&&(f=l.sw,g.ctxLineWidth(l.sw)):f!==this.values.sWidth&&(f=this.values.sWidth,g.ctxLineWidth(this.values.sWidth)),l&&l.sc?d!==l.sc&&(d=l.sc,g.ctxStrokeStyle(l.sc)):d!==this.values.stroke&&(d=this.values.stroke,g.ctxStrokeStyle(this.values.stroke)),p=this.textSpans[t].elem,i=p.length,this.globalData.canvasContext.beginPath(),r=0;r<i;r+=1)for(m=p[r],o=m.length,this.globalData.canvasContext.moveTo(m[0],m[1]),a=2;a<o;a+=6)this.globalData.canvasContext.bezierCurveTo(m[a],m[a+1],m[a+2],m[a+3],m[a+4],m[a+5]);this.globalData.canvasContext.closePath(),g.ctxStroke()}l&&this.globalData.renderer.restore()}};function CVImageElement(e,t,n){this.assetData=t.getAssetData(e.refId),this.img=t.imageLoader.getAsset(this.assetData),this.initElement(e,t,n)}extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVImageElement),CVImageElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVImageElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVImageElement.prototype.createContent=function(){if(this.img.width&&(this.assetData.w!==this.img.width||this.assetData.h!==this.img.height)){var e=createTag(`canvas`);e.width=this.assetData.w,e.height=this.assetData.h;var t=e.getContext(`2d`),n=this.img.width,r=this.img.height,i=n/r,a=this.assetData.w/this.assetData.h,o,s,c=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio;i>a&&c===`xMidYMid slice`||i<a&&c!==`xMidYMid slice`?(s=r,o=s*a):(o=n,s=o/a),t.drawImage(this.img,(n-o)/2,(r-s)/2,o,s,0,0,this.assetData.w,this.assetData.h),this.img=e}},CVImageElement.prototype.renderInnerContent=function(){this.canvasContext.drawImage(this.img,0,0)},CVImageElement.prototype.destroy=function(){this.img=null};function CVSolidElement(e,t,n){this.initElement(e,t,n)}extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVSolidElement),CVSolidElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVSolidElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVSolidElement.prototype.renderInnerContent=function(){this.globalData.renderer.ctxFillStyle(this.data.sc),this.globalData.renderer.ctxFillRect(0,0,this.data.sw,this.data.sh)};function CanvasRendererBase(){}extendPrototype([BaseRenderer],CanvasRendererBase),CanvasRendererBase.prototype.createShape=function(e){return new CVShapeElement(e,this.globalData,this)},CanvasRendererBase.prototype.createText=function(e){return new CVTextElement(e,this.globalData,this)},CanvasRendererBase.prototype.createImage=function(e){return new CVImageElement(e,this.globalData,this)},CanvasRendererBase.prototype.createSolid=function(e){return new CVSolidElement(e,this.globalData,this)},CanvasRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRendererBase.prototype.ctxTransform=function(e){e[0]===1&&e[1]===0&&e[4]===0&&e[5]===1&&e[12]===0&&e[13]===0||this.canvasContext.transform(e[0],e[1],e[4],e[5],e[12],e[13])},CanvasRendererBase.prototype.ctxOpacity=function(e){this.canvasContext.globalAlpha*=e<0?0:e},CanvasRendererBase.prototype.ctxFillStyle=function(e){this.canvasContext.fillStyle=e},CanvasRendererBase.prototype.ctxStrokeStyle=function(e){this.canvasContext.strokeStyle=e},CanvasRendererBase.prototype.ctxLineWidth=function(e){this.canvasContext.lineWidth=e},CanvasRendererBase.prototype.ctxLineCap=function(e){this.canvasContext.lineCap=e},CanvasRendererBase.prototype.ctxLineJoin=function(e){this.canvasContext.lineJoin=e},CanvasRendererBase.prototype.ctxMiterLimit=function(e){this.canvasContext.miterLimit=e},CanvasRendererBase.prototype.ctxFill=function(e){this.canvasContext.fill(e)},CanvasRendererBase.prototype.ctxFillRect=function(e,t,n,r){this.canvasContext.fillRect(e,t,n,r)},CanvasRendererBase.prototype.ctxStroke=function(){this.canvasContext.stroke()},CanvasRendererBase.prototype.reset=function(){if(!this.renderConfig.clearCanvas){this.canvasContext.restore();return}this.contextData.reset()},CanvasRendererBase.prototype.save=function(){this.canvasContext.save()},CanvasRendererBase.prototype.restore=function(e){if(!this.renderConfig.clearCanvas){this.canvasContext.restore();return}e&&(this.globalData.blendMode=`source-over`),this.contextData.restore(e)},CanvasRendererBase.prototype.configAnimation=function(e){if(this.animationItem.wrapper){this.animationItem.container=createTag(`canvas`);var t=this.animationItem.container.style;t.width=`100%`,t.height=`100%`;var n=`0px 0px 0px`;t.transformOrigin=n,t.mozTransformOrigin=n,t.webkitTransformOrigin=n,t[`-webkit-transform`]=n,t.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext(`2d`),this.renderConfig.className&&this.animationItem.container.setAttribute(`class`,this.renderConfig.className),this.renderConfig.id&&this.animationItem.container.setAttribute(`id`,this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.contextData.setContext(this.canvasContext),this.data=e,this.layers=e.layers,this.transformCanvas={w:e.w,h:e.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(e,document.body),this.globalData.canvasContext=this.canvasContext,this.globalData.renderer=this,this.globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=createSizedArray(e.layers.length),this.updateContainerSize()},CanvasRendererBase.prototype.updateContainerSize=function(e,t){this.reset();var n,r;e?(n=e,r=t,this.canvasContext.canvas.width=n,this.canvasContext.canvas.height=r):(this.animationItem.wrapper&&this.animationItem.container?(n=this.animationItem.wrapper.offsetWidth,r=this.animationItem.wrapper.offsetHeight):(n=this.canvasContext.canvas.width,r=this.canvasContext.canvas.height),this.canvasContext.canvas.width=n*this.renderConfig.dpr,this.canvasContext.canvas.height=r*this.renderConfig.dpr);var i,a;if(this.renderConfig.preserveAspectRatio.indexOf(`meet`)!==-1||this.renderConfig.preserveAspectRatio.indexOf(`slice`)!==-1){var o=this.renderConfig.preserveAspectRatio.split(` `),s=o[1]||`meet`,c=o[0]||`xMidYMid`,l=c.substr(0,4),u=c.substr(4);i=n/r,a=this.transformCanvas.w/this.transformCanvas.h,a>i&&s===`meet`||a<i&&s===`slice`?(this.transformCanvas.sx=n/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=n/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=r/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.sy=r/(this.transformCanvas.h/this.renderConfig.dpr)),l===`xMid`&&(a<i&&s===`meet`||a>i&&s===`slice`)?this.transformCanvas.tx=(n-this.transformCanvas.w*(r/this.transformCanvas.h))/2*this.renderConfig.dpr:l===`xMax`&&(a<i&&s===`meet`||a>i&&s===`slice`)?this.transformCanvas.tx=(n-this.transformCanvas.w*(r/this.transformCanvas.h))*this.renderConfig.dpr:this.transformCanvas.tx=0,u===`YMid`&&(a>i&&s===`meet`||a<i&&s===`slice`)?this.transformCanvas.ty=(r-this.transformCanvas.h*(n/this.transformCanvas.w))/2*this.renderConfig.dpr:u===`YMax`&&(a>i&&s===`meet`||a<i&&s===`slice`)?this.transformCanvas.ty=(r-this.transformCanvas.h*(n/this.transformCanvas.w))*this.renderConfig.dpr:this.transformCanvas.ty=0}else this.renderConfig.preserveAspectRatio===`none`?(this.transformCanvas.sx=n/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=r/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr,this.transformCanvas.tx=0,this.transformCanvas.ty=0);this.transformCanvas.props=[this.transformCanvas.sx,0,0,0,0,this.transformCanvas.sy,0,0,0,0,1,0,this.transformCanvas.tx,this.transformCanvas.ty,0,1],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)},CanvasRendererBase.prototype.destroy=function(){this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=``);var e;
10for(e=(this.layers?this.layers.length:0)-1;e>=0;--e)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(e,t){if(!(this.renderedFrame===e&&this.renderConfig.clearCanvas===!0&&!t||this.destroyed||e===-1)){this.renderedFrame=e,this.globalData.frameNum=e-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||t,this.globalData.projectInterface.currentFrame=e;var n,r=this.layers.length;for(this.completeLayers||this.checkLayers(e),n=r-1;n>=0;--n)(this.completeLayers||this.elements[n])&&this.elements[n].prepareFrame(e-this.layers[n].st);if(this.globalData._mdf){for(this.renderConfig.clearCanvas===!0?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),n=r-1;n>=0;--n)(this.completeLayers||this.elements[n])&&this.elements[n].renderFrame();this.renderConfig.clearCanvas!==!0&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(e){var t=this.elements;if(!(t[e]||this.layers[e].ty===99)){var n=this.createItem(this.layers[e],this,this.globalData);t[e]=n,n.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting()},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display=`none`},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display=`block`};function CanvasContext(){this.opacity=-1,this.transform=createTypedArray(`float32`,16),this.fillStyle=``,this.strokeStyle=``,this.lineWidth=``,this.lineCap=``,this.lineJoin=``,this.miterLimit=``,this.id=Math.random()}function CVContextData(){this.stack=[],this.cArrPos=0,this.cTr=new Matrix;var e,t=15;for(e=0;e<t;e+=1){var n=new CanvasContext;this.stack[e]=n}
vendor: 4,099 bytes, line 10
10this._length=t,this.nativeContext=null,this.transformMat=new Matrix,this.currentOpacity=1,this.currentFillStyle=``,this.appliedFillStyle=``,this.currentStrokeStyle=``,this.appliedStrokeStyle=``,this.currentLineWidth=``,this.appliedLineWidth=``,this.currentLineCap=``,this.appliedLineCap=``,this.currentLineJoin=``,this.appliedLineJoin=``,this.appliedMiterLimit=``,this.currentMiterLimit=``}CVContextData.prototype.duplicate=function(){var e=this._length*2,t=0;for(t=this._length;t<e;t+=1)this.stack[t]=new CanvasContext;this._length=e},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.stack[this.cArrPos].opacity=1},CVContextData.prototype.restore=function(e){--this.cArrPos;var t=this.stack[this.cArrPos],n=t.transform,r,i=this.cTr.props;for(r=0;r<16;r+=1)i[r]=n[r];if(e){this.nativeContext.restore();var a=this.stack[this.cArrPos+1];this.appliedFillStyle=a.fillStyle,this.appliedStrokeStyle=a.strokeStyle,this.appliedLineWidth=a.lineWidth,this.appliedLineCap=a.lineCap,this.appliedLineJoin=a.lineJoin,this.appliedMiterLimit=a.miterLimit}this.nativeContext.setTransform(n[0],n[1],n[4],n[5],n[12],n[13]),(e||t.opacity!==-1&&this.currentOpacity!==t.opacity)&&(this.nativeContext.globalAlpha=t.opacity,this.currentOpacity=t.opacity),this.currentFillStyle=t.fillStyle,this.currentStrokeStyle=t.strokeStyle,this.currentLineWidth=t.lineWidth,this.currentLineCap=t.lineCap,this.currentLineJoin=t.lineJoin,this.currentMiterLimit=t.miterLimit},CVContextData.prototype.save=function(e){e&&this.nativeContext.save();var t=this.cTr.props;this._length<=this.cArrPos&&this.duplicate();var n=this.stack[this.cArrPos],r;for(r=0;r<16;r+=1)n.transform[r]=t[r];this.cArrPos+=1;var i=this.stack[this.cArrPos];i.opacity=n.opacity,i.fillStyle=n.fillStyle,i.strokeStyle=n.strokeStyle,i.lineWidth=n.lineWidth,i.lineCap=n.lineCap,i.lineJoin=n.lineJoin,i.miterLimit=n.miterLimit},CVContextData.prototype.setOpacity=function(e){this.stack[this.cArrPos].opacity=e},CVContextData.prototype.setContext=function(e){this.nativeContext=e},CVContextData.prototype.fillStyle=function(e){this.stack[this.cArrPos].fillStyle!==e&&(this.currentFillStyle=e,this.stack[this.cArrPos].fillStyle=e)},CVContextData.prototype.strokeStyle=function(e){this.stack[this.cArrPos].strokeStyle!==e&&(this.currentStrokeStyle=e,this.stack[this.cArrPos].strokeStyle=e)},CVContextData.prototype.lineWidth=function(e){this.stack[this.cArrPos].lineWidth!==e&&(this.currentLineWidth=e,this.stack[this.cArrPos].lineWidth=e)},CVContextData.prototype.lineCap=function(e){this.stack[this.cArrPos].lineCap!==e&&(this.currentLineCap=e,this.stack[this.cArrPos].lineCap=e)},CVContextData.prototype.lineJoin=function(e){this.stack[this.cArrPos].lineJoin!==e&&(this.currentLineJoin=e,this.stack[this.cArrPos].lineJoin=e)},CVContextData.prototype.miterLimit=function(e){this.stack[this.cArrPos].miterLimit!==e&&(this.currentMiterLimit=e,this.stack[this.cArrPos].miterLimit=e)},CVContextData.prototype.transform=function(e){this.transformMat.cloneFromProps(e);var t=this.cTr;this.transformMat.multiply(t),t.cloneFromProps(this.transformMat.props);var n=t.props;this.nativeContext.setTransform(n[0],n[1],n[4],n[5],n[12],n[13])},CVContextData.prototype.opacity=function(e){var t=this.stack[this.cArrPos].opacity;t*=e<0?0:e,this.stack[this.cArrPos].opacity!==t&&(this.currentOpacity!==e&&(this.nativeContext.globalAlpha=e,this.currentOpacity=e),this.stack[this.cArrPos].opacity=t)},CVContextData.prototype.fill=function(e){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fill(e)},CVContextData.prototype.fillRect=function(e,t,n,r){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fillRect(e,t,n,r)},CVContextData.prototype.stroke=function(){this.appliedStrokeStyle!==this.currentStrokeStyle&&(this.appliedStrokeStyle=this.currentStrokeStyle,this.nativeContext.strokeStyle=this.appliedStrokeStyle),this.appliedLineWi
10dth!==this.currentLineWidth&&(this.appliedLineWidth=this.currentLineWidth,this.nativeContext.lineWidth=this.appliedLineWidth),this.appliedLineCap!==this.currentLineCap&&(this.appliedLineCap=this.currentLineCap,this.nativeContext.lineCap=this.appliedLineCap),this.appliedLineJoin!==this.currentLineJoin&&(this.appliedLineJoin=this.currentLineJoin,this.nativeContext.lineJoin=this.appliedLineJoin),this.appliedMiterLimit!==this.currentMiterLimit&&(this.appliedMiterLimit=this.currentMiterLimit,this.nativeContext.miterLimit=this.appliedMiterLimit),this.nativeContext.stroke()};function CVCompElement(e,t,n){this.completeLayers=!1,this.layers=e.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(e,t,n),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}extendPrototype([CanvasRendererBase,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var e=this.canvasContext;e.beginPath(),e.moveTo(0,0),e.lineTo(this.data.w,0),e.lineTo(this.data.w,this.data.h),e.lineTo(0,this.data.h),e.lineTo(0,0),e.clip();var t;for(t=this.layers.length-1;t>=0;--t)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},CVCompElement.prototype.destroy=function(){var e;for(e=this.layers.length-1;e>=0;--e)this.elements[e]&&this.elements[e].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(e){return new CVCompElement(e,this.globalData,this)};function CanvasRenderer(e,t){this.animationItem=e,this.renderConfig={clearCanvas:t&&t.clearCanvas!==void 0?t.clearCanvas:!0,context:t&&t.context||null,progressiveLoad:t&&t.progressiveLoad||!1,preserveAspectRatio:t&&t.preserveAspectRatio||`xMidYMid meet`,imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||`xMidYMid slice`,contentVisibility:t&&t.contentVisibility||`visible`,className:t&&t.className||``,id:t&&t.id||``,runExpressions:!t||t.runExpressions===void 0||t.runExpressions},this.renderConfig.dpr=t&&t.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=t&&t.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=ne
vendor: 61,405 bytes, line 10
10w Matrix,this.completeLayers=!1,this.rendererType=`canvas`,this.renderConfig.clearCanvas&&(this.ctxTransform=this.contextData.transform.bind(this.contextData),this.ctxOpacity=this.contextData.opacity.bind(this.contextData),this.ctxFillStyle=this.contextData.fillStyle.bind(this.contextData),this.ctxStrokeStyle=this.contextData.strokeStyle.bind(this.contextData),this.ctxLineWidth=this.contextData.lineWidth.bind(this.contextData),this.ctxLineCap=this.contextData.lineCap.bind(this.contextData),this.ctxLineJoin=this.contextData.lineJoin.bind(this.contextData),this.ctxMiterLimit=this.contextData.miterLimit.bind(this.contextData),this.ctxFill=this.contextData.fill.bind(this.contextData),this.ctxFillRect=this.contextData.fillRect.bind(this.contextData),this.ctxStroke=this.contextData.stroke.bind(this.contextData),this.save=this.contextData.save.bind(this.contextData))}extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(e){return new CVCompElement(e,this.globalData,this)};function HBaseElement(){}HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||`div`),this.data.hasMask?(this.svgElement=createNS(`svg`),this.layerElement=createNS(`g`),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute(`id`,this.data.ln),this.data.cl&&this.layerElement.setAttribute(`class`,this.data.cl),this.data.bm!==0&&this.setBlendMode()},renderElement:function(){var e=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var t=this.finalTransform.mat.toCSS();e.transform=t,e.webkitTransform=t}this.finalTransform._opMdf&&(e.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&=!1)},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&=null,this.maskManager&&=(this.maskManager.destroy(),null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting;function HSolidElement(e,t,n){this.initElement(e,t,n)}extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var e;this.data.hasMask?(e=createNS(`rect`),e.setAttribute(`width`,this.data.sw),e.setAttribute(`height`,this.data.sh),e.setAttribute(`fill`,this.data.sc),this.svgElement.setAttribute(`width`,this.data.sw),this.svgElement.setAttribute(`height`,this.data.sh)):(e=createTag(`div`),e.style.width=this.data.sw+`px`,e.style.height=this.data.sh+`px`,e.style.backgroundColor=this.data.sc),this.layerElement.appendChild(e)};function HShapeElement(e,t,n){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS(`g`),this.initElement(e,t,n),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var e;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),e=this.svgElement;else{e=createNS(`svg`);var t=this.comp.data?this.comp.data:this.globalData.compSize;e.setAttribute(`width`,t.w),e.setAttribute(`height`,t.h),e.appendChild(this.shapesContainer),this.layerElement.appendChild(e)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=e},HShapeElement.prototype.getTransformedPoint=function(e,t){var n,r=e.length;for(n=0;n<r;n+=1)t=e[n].mProps.v.applyToPointArray(t[0],t[1],0);return t},HShapeElement.prototype.calculateShapeBoundingBox=function(e,t){var n=e.sh.v,r=e.transformers,i,a=n._length,o,s,c,l;if(!(a<=1)){for(i=0;i<a-1;i+=1)o=this.getTransformedPoint(r,n.v[i]),s=this.getTransformedPoint(r,n.o[i]),c=this.getTransformedPoint(r,n.i[i+1]),l=this.getTransformedPoint(r,n.v[i+1]),this.checkBounds(o,s,c,l,t);n.c&&(o=this.getTransformedPoint(r,n.v[i]),s=this.getTransformedPoint(r,n.o[i]),c=this.getTransformedPoint(r,n.i[0]),l=this.getTransformedPoint(r,n.v[0]),this.checkBounds(o,s,c,l,t))}},HShapeElement.prototype.checkBounds=function(e,t,n,r,i){this.getBoundsOfCurve(e,t,n,r);var a=this.shapeBoundingBox;i.x=bmMin(a.left,i.x),i.xMax=bmMax(a.right,i.xMax),i.y=bmMin(a.top,i.y),i.yMax=bmMax(a.bottom,i.yMax)},HShapeElement.prototype.shapeBoundingBox={left:0,right:0,top:0,bottom:0},HShapeElement.prototype.tempBoundingBox={x:0,xMax:0,y:0,yMax:0,width:0,height:0},HShapeElement.prototype.getBoundsOfCurve=function(e,t,n,r){for(var i=[[e[0],r[0]],[e[1],r[1]]],a,o,s,c,l,u,d,f=0;f<2;++f)o=6*e[f]-12*t[f]+6*n[f],a=-3*e[f]+9*t[f]-9*n[f]+3*r[f],s=3*t[f]-3*e[f],o|=0,a|=0,s|=0,a===0&&o===0||(a===0?(c=-s/o,c>0&&c<1&&i[f].push(this.calculateF(c,e,t,n,r,f))):(l=o*o-4*s*a,l>=0&&(u=(-o+bmSqrt(l))/(2*a),u>0&&u<1&&i[f].push(this.calculateF(u,e,t,n,r,f)),d=(-o-bmSqrt(l))/(2*a),d>0&&d<1&&i[f].push(this.calculateF(d,e,t,n,r,f)))));this.shapeBoundingBox.left=bmMin.apply(null,i[0]),this.shapeBoundingBox.top=bmMin.apply(null,i[1]),this.shapeBoundingBox.right=bmMax.apply(null,i[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,i[1])},HShapeElement.prototype.calculateF=function(e,t,n,r,i,a){return bmPow(1-e,3)*t[a]+3*bmPow(1-e,2)*e*n[a]+3*(1-e)*bmPow(e,2)*r[a]+bmPow(e,3)*i[a]},HShapeElement.prototype.calculateBoundingBox=function(e,t){var n,r=e.length;for(n=0;n<r;n+=1)e[n]&&e[n].sh?this.calculateShapeBoundingBox(e[n],t):e[n]&&e[n].it?this.calculateBoundingBox(e[n].it,t):e[n]&&e[n].style&&e[n].w&&this.expandStrokeBoundingBox(e[n].w,t)},HShapeElement.prototype.expandStrokeBoundingBox=function(e,t){var n=0;if(e.keyframes){for(var r=0;r<e.keyframes.length;r+=1){var i=e.keyframes[r].s;i>n&&(n=i)}n*=e.mult}else n=e.v*e.mult;t.x-=n,t.xMax+=n,t.y-=n,t.yMax+=n},HShapeElement.prototype.currentBoxContains=function(e){return this.currentBBox.x<=e.x&&this.currentBBox.y<=e.y&&this.currentBBox.width+this.currentBBox.x>=e.x+e.width&&this.currentBBox.height+this.currentBBox.y>=e.y+e.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var e=this.tempBoundingBox,t=999999;if(e.x=t,e.xMax=-t,e.y=t,e.yMax=-t,this.calculateBoundingBox(this.itemsData,e),e.width=e.xMax<e.x?0:e.xMax-e.x,e.height=e.yMax<e.y?0:e.yMax-e.y,this.currentBoxContains(e))return;var n=!1;if(this.currentBBox.w!==e.width&&(this.currentBBox.w=e.width,this.shapeCont.setAttribute(`width`,e.width),n=!0),this.currentBBox.h!==e.height&&(this.currentBBox.h=e.height,this.shapeCont.setAttribute(`height`,e.height),n=!0),n||this.currentBBox.x!==e.x||this.currentBBox.y!==e.y){this.currentBBox.w=e.width,this.currentBBox.h=e.height,this.currentBBox.x=e.x,this.currentBBox.y=e.y,this.shapeCont.setAttribute(`viewBox`,this.currentBBox.x+` `+this.currentBBox.y+` `+this.currentBBox.w+` `+this.currentBBox.h);var r=this.shapeCont.style,i=`translate(`+this.currentBBox.x+`px,`+this.currentBBox.y+`px)`;r.transform=i,r.webkitTransform=i}}};function HTextElement(e,t,n){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType=`svg`,this.isMasked=!1,this.initElement(e,t,n)}extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],HTextElement),HTextElement.prototype.createContent=function(){if(this.isMasked=this.checkMasks(),this.isMasked){this.renderType=`svg`,this.compW=this.comp.data.w,this.compH=this.comp.data.h,this.svgElement.setAttribute(`width`,this.compW),this.svgElement.setAttribute(`height`,this.compH);var e=createNS(`g`);this.maskedElement.appendChild(e),this.innerElem=e}else this.renderType=`html`,this.innerElem=this.layerElement;this.checkParenting()},HTextElement.prototype.buildNewText=function(){var e=this.textProperty.currentData;this.renderedLetters=createSizedArray(e.l?e.l.length:0);var t=this.innerElem.style,n=e.fc?this.buildColor(e.fc):`rgba(0,0,0,0)`;t.fill=n,t.color=n,e.sc&&(t.stroke=this.buildColor(e.sc),t.strokeWidth=e.sw+`px`);var r=this.globalData.fontManager.getFontByName(e.f);if(!this.globalData.fontManager.chars)if(t.fontSize=e.finalSize+`px`,t.lineHeight=e.finalSize+`px`,r.fClass)this.innerElem.className=r.fClass;else{t.fontFamily=r.fFamily;var i=e.fWeight;t.fontStyle=e.fStyle,t.fontWeight=i}var a,o,s=e.l;o=s.length;var c,l,u,d=this.mHelper,f,p=``,m=0;for(a=0;a<o;a+=1){if(this.globalData.fontManager.chars?(this.textPaths[m]?c=this.textPaths[m]:(c=createNS(`path`),c.setAttribute(`stroke-linecap`,lineCapEnum[1]),c.setAttribute(`stroke-linejoin`,lineJoinEnum[2]),c.setAttribute(`stroke-miterlimit`,`4`)),this.isMasked||(this.textSpans[m]?(l=this.textSpans[m],u=l.children[0]):(l=createTag(`div`),l.style.lineHeight=0,u=createNS(`svg`),u.appendChild(c),styleDiv(l)))):this.isMasked?c=this.textPaths[m]?this.textPaths[m]:createNS(`text`):this.textSpans[m]?(l=this.textSpans[m],c=this.textPaths[m]):(l=createTag(`span`),styleDiv(l),c=createTag(`span`),styleDiv(c),l.appendChild(c)),this.globalData.fontManager.chars){var g=this.globalData.fontManager.getCharData(e.finalText[a],r.fStyle,this.globalData.fontManager.getFontByName(e.f).fFamily),_=g?g.data:null;if(d.reset(),_&&_.shapes&&_.shapes.length&&(f=_.shapes[0].it,d.scale(e.finalSize/100,e.finalSize/100),p=this.createPathShape(d,f),c.setAttribute(`d`,p)),this.isMasked)this.innerElem.appendChild(c);else{if(this.innerElem.appendChild(l),_&&_.shapes){document.body.appendChild(u);var y=u.getBBox();u.setAttribute(`width`,y.width+2),u.setAttribute(`height`,y.height+2),u.setAttribute(`viewBox`,y.x-1+` `+(y.y-1)+` `+(y.width+2)+` `+(y.height+2));var b=u.style,x=`translate(`+(y.x-1)+`px,`+(y.y-1)+`px)`;b.transform=x,b.webkitTransform=x,s[a].yOffset=y.y-1}else u.setAttribute(`width`,1),u.setAttribute(`height`,1);l.appendChild(u)}}else if(c.textContent=s[a].val,c.setAttributeNS(`http://www.w3.org/XML/1998/namespace`,`xml:space`,`preserve`),this.isMasked)this.innerElem.appendChild(c);else{this.innerElem.appendChild(l);var S=c.style,C=`translate3d(0,`+-e.finalSize/1.2+`px,0)`;S.transform=C,S.webkitTransform=C}this.isMasked?this.textSpans[m]=c:this.textSpans[m]=l,this.textSpans[m].style.display=`block`,this.textPaths[m]=c,m+=1}for(;m<this.textSpans.length;)this.textSpans[m].style.display=`none`,m+=1},HTextElement.prototype.renderInnerContent=function(){this.validateText();var e;if(this.data.singleShape){if(!this._isFirstFrame&&!this.lettersChangedFlag)return;if(this.isMasked&&this.finalTransform._matMdf){this.svgElement.setAttribute(`viewBox`,-this.finalTransform.mProp.p.v[0]+` `+-this.finalTransform.mProp.p.v[1]+` `+this.compW+` `+this.compH),e=this.svgElement.style;var t=`translate(`+-this.finalTransform.mProp.p.v[0]+`px,`+-this.finalTransform.mProp.p.v[1]+`px)`;e.transform=t,e.webkitTransform=t}}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),!(!this.lettersChangedFlag&&!this.textAnimator.lettersChangedFlag)){var n,r,i=0,a=this.textAnimator.renderedLetters,o=this.textProperty.currentData.l;r=o.length;var s,c,l;for(n=0;n<r;n+=1)o[n].n?i+=1:(c=this.textSpans[n],l=this.textPaths[n],s=a[i],i+=1,s._mdf.m&&(this.isMasked?c.setAttribute(`transform`,s.m):(c.style.webkitTransform=s.m,c.style.transform=s.m)),c.style.opacity=s.o,s.sw&&s._mdf.sw&&l.setAttribute(`stroke-width`,s.sw),s.sc&&s._mdf.sc&&l.setAttribute(`stroke`,s.sc),s.fc&&s._mdf.fc&&(l.setAttribute(`fill`,s.fc),l.style.color=s.fc));if(this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){var u=this.innerElem.getBBox();this.currentBBox.w!==u.width&&(this.currentBBox.w=u.width,this.svgElement.setAttribute(`width`,u.width)),this.currentBBox.h!==u.height&&(this.currentBBox.h=u.height,this.svgElement.setAttribute(`height`,u.height));var d=1;if(this.currentBBox.w!==u.width+d*2||this.currentBBox.h!==u.height+d*2||this.currentBBox.x!==u.x-d||this.currentBBox.y!==u.y-d){this.currentBBox.w=u.width+d*2,this.currentBBox.h=u.height+d*2,this.currentBBox.x=u.x-d,this.currentBBox.y=u.y-d,this.svgElement.setAttribute(`viewBox`,this.currentBBox.x+` `+this.currentBBox.y+` `+this.currentBBox.w+` `+this.currentBBox.h),e=this.svgElement.style;var f=`translate(`+this.currentBBox.x+`px,`+this.currentBBox.y+`px)`;e.transform=f,e.webkitTransform=f}}}};function HCameraElement(e,t,n){this.initFrame(),this.initBaseData(e,t,n),this.initHierarchy();var r=PropertyFactory.getProp;if(this.pe=r(this,e.pe,0,0,this),e.ks.p.s?(this.px=r(this,e.ks.p.x,1,0,this),this.py=r(this,e.ks.p.y,1,0,this),this.pz=r(this,e.ks.p.z,1,0,this)):this.p=r(this,e.ks.p,1,0,this),e.ks.a&&(this.a=r(this,e.ks.a,1,0,this)),e.ks.or.k.length&&e.ks.or.k[0].to){var i,a=e.ks.or.k.length;for(i=0;i<a;i+=1)e.ks.or.k[i].to=null,e.ks.or.k[i].ti=null}this.or=r(this,e.ks.or,1,degToRads,this),this.or.sh=!0,this.rx=r(this,e.ks.rx,0,degToRads,this),this.ry=r(this,e.ks.ry,0,degToRads,this),this.rz=r(this,e.ks.rz,0,degToRads,this),this.mat=new Matrix,this._prevMat=new Matrix,this._isFirstFrame=!0,this.finalTransform={mProp:this}}extendPrototype([BaseElement,FrameElement,HierarchyElement],HCameraElement),HCameraElement.prototype.setup=function(){var e,t=this.comp.threeDElements.length,n,r,i;for(e=0;e<t;e+=1)if(n=this.comp.threeDElements[e],n.type===`3d`){r=n.perspectiveElem.style,i=n.container.style;var a=this.pe.v+`px`,o=`0px 0px 0px`,s=`matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)`;r.perspective=a,r.webkitPerspective=a,i.transformOrigin=o,i.mozTransformOrigin=o,i.webkitTransformOrigin=o,r.transform=s,r.webkitTransform=s}},HCameraElement.prototype.createElements=function(){},HCameraElement.prototype.hide=function(){},HCameraElement.prototype.renderFrame=function(){var e=this._isFirstFrame,t,n;if(this.hierarchy)for(n=this.hierarchy.length,t=0;t<n;t+=1)e=this.hierarchy[t].finalTransform.mProp._mdf||e;if(e||this.pe._mdf||this.p&&this.p._mdf||this.px&&(this.px._mdf||this.py._mdf||this.pz._mdf)||this.rx._mdf||this.ry._mdf||this.rz._mdf||this.or._mdf||this.a&&this.a._mdf){if(this.mat.reset(),this.hierarchy)for(n=this.hierarchy.length-1,t=n;t>=0;--t){var r=this.hierarchy[t].finalTransform.mProp;this.mat.translate(-r.p.v[0],-r.p.v[1],r.p.v[2]),this.mat.rotateX(-r.or.v[0]).rotateY(-r.or.v[1]).rotateZ(r.or.v[2]),this.mat.rotateX(-r.rx.v).rotateY(-r.ry.v).rotateZ(r.rz.v),this.mat.scale(1/r.s.v[0],1/r.s.v[1],1/r.s.v[2]),this.mat.translate(r.a.v[0],r.a.v[1],r.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var i=this.p?[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]],a=Math.sqrt(i[0]**2+i[1]**2+i[2]**2),o=[i[0]/a,i[1]/a,i[2]/a],s=Math.sqrt(o[2]*o[2]+o[0]*o[0]),c=Math.atan2(o[1],s),l=Math.atan2(o[0],-o[2]);this.mat.rotateY(l).rotateX(-c)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var u=!this._prevMat.equals(this.mat);if((u||this.pe._mdf)&&this.comp.threeDElements){n=this.comp.threeDElements.length;var d,f,p;for(t=0;t<n;t+=1)if(d=this.comp.threeDElements[t],d.type===`3d`){if(u){var m=this.mat.toCSS();p=d.container.style,p.transform=m,p.webkitTransform=m}this.pe._mdf&&(f=d.perspectiveElem.style,f.perspective=this.pe.v+`px`,f.webkitPerspective=this.pe.v+`px`)}this.mat.clone(this._prevMat)}}this._isFirstFrame=!1},HCameraElement.prototype.prepareFrame=function(e){this.prepareProperties(e,!0)},HCameraElement.prototype.destroy=function(){},HCameraElement.prototype.getBaseElement=function(){return null};function HImageElement(e,t,n){this.assetData=t.getAssetData(e.refId),this.initElement(e,t,n)}extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement],HImageElement),HImageElement.prototype.createContent=function(){var e=this.globalData.getAssetsPath(this.assetData),t=new Image;this.data.hasMask?(this.imageElem=createNS(`image`),this.imageElem.setAttribute(`width`,this.assetData.w+`px`),this.imageElem.setAttribute(`height`,this.assetData.h+`px`),this.imageElem.setAttributeNS(`http://www.w3.org/1999/xlink`,`href`,e),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute(`width`,this.assetData.w),this.baseElement.setAttribute(`height`,this.assetData.h)):this.layerElement.appendChild(t),t.crossOrigin=`anonymous`,t.src=e,this.data.ln&&this.baseElement.setAttribute(`id`,this.data.ln)};function HybridRendererBase(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:t&&t.className||``,imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||`xMidYMid slice`,hideOnTransparent:!(t&&t.hideOnTransparent===!1),filterSize:{width:t&&t.filterSize&&t.filterSize.width||`400%`,height:t&&t.filterSize&&t.filterSize.height||`400%`,x:t&&t.filterSize&&t.filterSize.x||`-100%`,y:t&&t.filterSize&&t.filterSize.y||`-100%`}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType=`html`}extendPrototype([BaseRenderer],HybridRendererBase),HybridRendererBase.prototype.buildItem=SVGRenderer.prototype.buildItem,HybridRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting()},HybridRendererBase.prototype.appendElementInPos=function(e,t){var n=e.getBaseElement();if(n){var r=this.layers[t];if(!r.ddd||!this.supports3d)if(this.threeDElements)this.addTo3dContainer(n,t);else{for(var i=0,a,o,s;i<t;)this.elements[i]&&this.elements[i]!==!0&&this.elements[i].getBaseElement&&(o=this.elements[i],s=this.layers[i].ddd?this.getThreeDContainerByPos(i):o.getBaseElement(),a=s||a),i+=1;a?(!r.ddd||!this.supports3d)&&this.layerElement.insertBefore(n,a):(!r.ddd||!this.supports3d)&&this.layerElement.appendChild(n)}else this.addTo3dContainer(n,t)}},HybridRendererBase.prototype.createShape=function(e){return this.supports3d?new HShapeElement(e,this.globalData,this):new SVGShapeElement(e,this.globalData,this)},HybridRendererBase.prototype.createText=function(e){return this.supports3d?new HTextElement(e,this.globalData,this):new SVGTextLottieElement(e,this.globalData,this)},HybridRendererBase.prototype.createCamera=function(e){return this.camera=new HCameraElement(e,this.globalData,this),this.camera},HybridRendererBase.prototype.createImage=function(e){return this.supports3d?new HImageElement(e,this.globalData,this):new IImageElement(e,this.globalData,this)},HybridRendererBase.prototype.createSolid=function(e){return this.supports3d?new HSolidElement(e,this.globalData,this):new ISolidElement(e,this.globalData,this)},HybridRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,HybridRendererBase.prototype.getThreeDContainerByPos=function(e){for(var t=0,n=this.threeDElements.length;t<n;){if(this.threeDElements[t].startPos<=e&&this.threeDElements[t].endPos>=e)return this.threeDElements[t].perspectiveElem;t+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(e,t){var n=createTag(`div`),r,i;styleDiv(n);var a=createTag(`div`);if(styleDiv(a),t===`3d`){r=n.style,r.width=this.globalData.compSize.w+`px`,r.height=this.globalData.compSize.h+`px`;var o=`50% 50%`;r.webkitTransformOrigin=o,r.mozTransformOrigin=o,r.transformOrigin=o,i=a.style;var s=`matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)`;i.transform=s,i.webkitTransform=s}n.appendChild(a);var c={container:a,perspectiveElem:n,startPos:e,endPos:e,type:t};return this.threeDElements.push(c),c},HybridRendererBase.prototype.build3dContainers=function(){var e,t=this.layers.length,n,r=``;for(e=0;e<t;e+=1)this.layers[e].ddd&&this.layers[e].ty!==3?(r!==`3d`&&(r=`3d`,n=this.createThreeDContainer(e,`3d`)),n.endPos=Math.max(n.endPos,e)):(r!==`2d`&&(r=`2d`,n=this.createThreeDContainer(e,`2d`)),n.endPos=Math.max(n.endPos,e));for(t=this.threeDElements.length,e=t-1;e>=0;--e)this.resizerElem.appendChild(this.threeDElements[e].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(e,t){for(var n=0,r=this.threeDElements.length;n<r;){if(t<=this.threeDElements[n].endPos){for(var i=this.threeDElements[n].startPos,a;i<t;)this.elements[i]&&this.elements[i].getBaseElement&&(a=this.elements[i].getBaseElement()),i+=1;a?this.threeDElements[n].container.insertBefore(e,a):this.threeDElements[n].container.appendChild(e);break}n+=1}},HybridRendererBase.prototype.configAnimation=function(e){var t=createTag(`div`),n=this.animationItem.wrapper,r=t.style;r.width=e.w+`px`,r.height=e.h+`px`,this.resizerElem=t,styleDiv(t),r.transformStyle=`flat`,r.mozTransformStyle=`flat`,r.webkitTransformStyle=`flat`,this.renderConfig.className&&t.setAttribute(`class`,this.renderConfig.className),n.appendChild(t),r.overflow=`hidden`;var i=createNS(`svg`);i.setAttribute(`width`,`1`),i.setAttribute(`height`,`1`),styleDiv(i),this.resizerElem.appendChild(i);var a=createNS(`defs`);i.appendChild(a),this.data=e,this.setupGlobalData(e,i),this.globalData.defs=a,this.layers=e.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},HybridRendererBase.prototype.destroy=function(){this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=``),this.animationItem.container=null,this.globalData.defs=null;var e,t=this.layers?this.layers.length:0;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},HybridRendererBase.prototype.updateContainerSize=function(){var e=this.animationItem.wrapper.offsetWidth,t=this.animationItem.wrapper.offsetHeight,n=e/t,r=this.globalData.compSize.w/this.globalData.compSize.h,i,a,o,s;r>n?(i=e/this.globalData.compSize.w,a=e/this.globalData.compSize.w,o=0,s=(t-this.globalData.compSize.h*(e/this.globalData.compSize.w))/2):(i=t/this.globalData.compSize.h,a=t/this.globalData.compSize.h,o=(e-this.globalData.compSize.w*(t/this.globalData.compSize.h))/2,s=0);var c=this.resizerElem.style;c.webkitTransform=`matrix3d(`+i+`,0,0,0,0,`+a+`,0,0,0,0,1,0,`+o+`,`+s+`,0,1)`,c.transform=c.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display=`none`},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display=`block`},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var e=this.globalData.compSize.w,t=this.globalData.compSize.h,n,r=this.threeDElements.length;for(n=0;n<r;n+=1){var i=this.threeDElements[n].perspectiveElem.style;i.webkitPerspective=Math.sqrt(e**2+t**2)+`px`,i.perspective=i.webkitPerspective}}},HybridRendererBase.prototype.searchExtraCompositions=function(e){var t,n=e.length,r=createTag(`div`);for(t=0;t<n;t+=1)if(e[t].xt){var i=this.createComp(e[t],r,this.globalData.comp,null);i.initExpressions(),this.globalData.projectInterface.registerComposition(i)}};function HCompElement(e,t,n){this.layers=e.layers,this.supports3d=!e.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(e,t,n),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}extendPrototype([HybridRendererBase,ICompElement,HBaseElement],HCompElement),HCompElement.prototype._createBaseContainerElements=HCompElement.prototype.createContainerElements,HCompElement.prototype.createContainerElements=function(){this._createBaseContainerElements(),this.data.hasMask?(this.svgElement.setAttribute(`width`,this.data.w),this.svgElement.setAttribute(`height`,this.data.h),this.transformedElement=this.baseElement):this.transformedElement=this.layerElement},HCompElement.prototype.addTo3dContainer=function(e,t){for(var n=0,r;n<t;)this.elements[n]&&this.elements[n].getBaseElement&&(r=this.elements[n].getBaseElement()),n+=1;r?this.layerElement.insertBefore(e,r):this.layerElement.appendChild(e)},HCompElement.prototype.createComp=function(e){return this.supports3d?new HCompElement(e,this.globalData,this):new SVGCompElement(e,this.globalData,this)};function HybridRenderer(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:t&&t.className||``,imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||`xMidYMid slice`,hideOnTransparent:!(t&&t.hideOnTransparent===!1),filterSize:{width:t&&t.filterSize&&t.filterSize.width||`400%`,height:t&&t.filterSize&&t.filterSize.height||`400%`,x:t&&t.filterSize&&t.filterSize.x||`-100%`,y:t&&t.filterSize&&t.filterSize.y||`-100%`},runExpressions:!t||t.runExpressions===void 0||t.runExpressions},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType=`html`}extendPrototype([HybridRendererBase],HybridRenderer),HybridRenderer.prototype.createComp=function(e){return this.supports3d?new HCompElement(e,this.globalData,this):new SVGCompElement(e,this.globalData,this)};var CompExpressionInterface=function(){return function(e){function t(t){for(var n=0,r=e.layers.length;n<r;){if(e.layers[n].nm===t||e.layers[n].ind===t)return e.elements[n].layerInterface;n+=1}return null}return Object.defineProperty(t,"_name",{value:e.data.nm}),t.layer=t,t.pixelAspect=1,t.height=e.data.h||e.globalData.compSize.h,t.width=e.data.w||e.globalData.compSize.w,t.pixelAspect=1,t.frameDuration=1/e.globalData.frameRate,t.displayStartTime=0,t.numLayers=e.layers.length,t}}();function _typeof$2(e){"@babel/helpers - typeof";return _typeof$2=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},_typeof$2(e)}function seedRandom(e,t){var n=this,r=256,i=6,a=52,o=`random`,s=t.pow(r,i),c=t.pow(2,a),l=c*2,u=r-1,d;function f(n,a,u){var d=[];a=a===!0?{entropy:!0}:a||{};var f=_(g(a.entropy?[n,b(e)]:n===null?y():n,3),d),x=new p(d),S=function(){for(var e=x.g(i),t=s,n=0;e<c;)e=(e+n)*r,t*=r,n=x.g(1);for(;e>=l;)e/=2,t/=2,n>>>=1;return(e+n)/t};return S.int32=function(){return x.g(4)|0},S.quick=function(){return x.g(4)/4294967296},S.double=S,_(b(x.S),e),(a.pass||u||function(e,n,r,i){return i&&(i.S&&m(i,x),e.state=function(){return m(x,{})}),r?(t[o]=e,n):e})(S,f,`global`in a?a.global:this==t,a.state)}t[`seed`+o]=f;function p(e){var t,n=e.length,i=this,a=0,o=i.i=i.j=0,s=i.S=[];for(n||(e=[n++]);a<r;)s[a]=a++;for(a=0;a<r;a++)s[a]=s[o=u&o+e[a%n]+(t=s[a])],s[o]=t;i.g=function(e){for(var t,n=0,a=i.i,o=i.j,s=i.S;e--;)t=s[a=u&a+1],n=n*r+s[u&(s[a]=s[o=u&o+t])+(s[o]=t)];return i.i=a,i.j=o,n}}function m(e,t){return t.i=e.i,t.j=e.j,t.S=e.S.slice(),t}function g(e,t){var n=[],r=_typeof$2(e),i;if(t&&r==`object`)for(i in e)try{n.push(g(e[i],t-1))}catch{}return n.length?n:r==`string`?e:e+`\0`}function _(e,t){for(var n=e+``,r,i=0;i<n.length;)t[u&i]=u&(r^=t[u&i]*19)+n.charCodeAt(i++);return b(t)}function y(){try{if(d)return b(d.randomBytes(r));var t=new Uint8Array(r);return(n.crypto||n.msCrypto).getRandomValues(t),b(t)}catch{var i=n.navigator,a=i&&i.plugins;return[+new Date,n,a,n.screen,b(e)]}}function b(e){return String.fromCharCode.apply(0,e)}_(t.random(),e)}function initialize$2(e){seedRandom([],e)}var propTypes={SHAPE:`shape`};function _typeof$1(e){"@babel/helpers - typeof";return _typeof$1=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},_typeof$1(e)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null,_lottieGlobal={};initialize$2(BMMath);function resetFrame(){_lottieGlobal={}}function $bm_isInstanceOfArray(e){return e.constructor===Array||e.constructor===Float32Array}function isNumerable(e,t){return e===`number`||t instanceof Number||e===`boolean`||e===`string`}function $bm_neg(e){var t=_typeof$1(e);if(t===`number`||e instanceof Number||t===`boolean`)return-e;if($bm_isInstanceOfArray(e)){var n,r=e.length,i=[];for(n=0;n<r;n+=1)i[n]=-e[n];return i}return e.propType?e.v:-e}var easeInBez=BezierFactory.getBezierEasing(.333,0,.833,.833,`easeIn`).get,easeOutBez=BezierFactory.getBezierEasing(.167,.167,.667,1,`easeOut`).get,easeInOutBez=BezierFactory.getBezierEasing(.33,0,.667,1,`easeInOut`).get;function sum(e,t){var n=_typeof$1(e),r=_typeof$1(t);if(isNumerable(n,e)&&isNumerable(r,t)||n===`string`||r===`string`)return e+t;if($bm_isInstanceOfArray(e)&&isNumerable(r,t))return e=e.slice(0),e[0]+=t,e;if(isNumerable(n,e)&&$bm_isInstanceOfArray(t))return t=t.slice(0),t[0]=e+t[0],t;if($bm_isInstanceOfArray(e)&&$bm_isInstanceOfArray(t)){for(var i=0,a=e.length,o=t.length,s=[];i<a||i<o;)(typeof e[i]==`number`||e[i]instanceof Number)&&(typeof t[i]==`number`||t[i]instanceof Number)?s[i]=e[i]+t[i]:s[i]=t[i]===void 0?e[i]:e[i]||t[i],i+=1;return s}return 0}var add=sum;function sub(e,t){var n=_typeof$1(e),r=_typeof$1(t);if(isNumerable(n,e)&&isNumerable(r,t))return n===`string`&&(e=parseInt(e,10)),r===`string`&&(t=parseInt(t,10)),e-t;if($bm_isInstanceOfArray(e)&&isNumerable(r,t))return e=e.slice(0),e[0]-=t,e;if(isNumerable(n,e)&&$bm_isInstanceOfArray(t))return t=t.slice(0),t[0]=e-t[0],t;if($bm_isInstanceOfArray(e)&&$bm_isInstanceOfArray(t)){for(var i=0,a=e.length,o=t.length,s=[];i<a||i<o;)(typeof e[i]==`number`||e[i]instanceof Number)&&(typeof t[i]==`number`||t[i]instanceof Number)?s[i]=e[i]-t[i]:s[i]=t[i]===void 0?e[i]:e[i]||t[i],i+=1;return s}return 0}function mul(e,t){var n=_typeof$1(e),r=_typeof$1(t),i;if(isNumerable(n,e)&&isNumerable(r,t))return e*t;var a,o;if($bm_isInstanceOfArray(e)&&isNumerable(r,t)){for(o=e.length,i=createTypedArray(`float32`,o),a=0;a<o;a+=1)i[a]=e[a]*t;return i}if(isNumerable(n,e)&&$bm_isInstanceOfArray(t)){for(o=t.length,i=createTypedArray(`float32`,o),a=0;a<o;a+=1)i[a]=e*t[a];return i}return 0}function div(e,t){var n=_typeof$1(e),r=_typeof$1(t),i;if(isNumerable(n,e)&&isNumerable(r,t))return e/t;var a,o;if($bm_isInstanceOfArray(e)&&isNumerable(r,t)){for(o=e.length,i=createTypedArray(`float32`,o),a=0;a<o;a+=1)i[a]=e[a]/t;return i}if(isNumerable(n,e)&&$bm_isInstanceOfArray(t)){for(o=t.length,i=createTypedArray(`float32`,o),a=0;a<o;a+=1)i[a]=e/t[a];return i}return 0}function mod(e,t){return typeof e==`string`&&(e=parseInt(e,10)),typeof t==`string`&&(t=parseInt(t,10)),e%t}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(e,t,n){if(t>n){var r=n;n=t,t=r}return Math.min(Math.max(e,t),n)}function radiansToDegrees(e){return e/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(e){return e*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(e,t){if(typeof e==`number`||e instanceof Number)return t||=0,Math.abs(e-t);t||=helperLengthArray;var n,r=Math.min(e.length,t.length),i=0;for(n=0;n<r;n+=1)i+=Math.pow(t[n]-e[n],2);return Math.sqrt(i)}function normalize(e){return div(e,length(e))}function rgbToHsl(e){var t=e[0],n=e[1],r=e[2],i=Math.max(t,n,r),a=Math.min(t,n,r),o,s,c=(i+a)/2;if(i===a)o=0,s=0;else{var l=i-a;switch(s=c>.5?l/(2-i-a):l/(i+a),i){case t:o=(n-r)/l+(n<r?6:0);break;case n:o=(r-t)/l+2;break;case r:o=(t-n)/l+4;break;default:break}o/=6}return[o,s,c,e[3]]}function hue2rgb(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function hslToRgb(e){var t=e[0],n=e[1],r=e[2],i,a,o;if(n===0)i=r,o=r,a=r;else{var s=r<.5?r*(1+n):r+n-r*n,c=2*r-s;i=hue2rgb(c,s,t+1/3),a=hue2rgb(c,s,t),o=hue2rgb(c,s,t-1/3)}return[i,a,o,e[3]]}function linear(e,t,n,r,i){if((r===void 0||i===void 0)&&(r=t,i=n,t=0,n=1),n<t){var a=n;n=t,t=a}if(e<=t)return r;if(e>=n)return i;var o=n===t?0:(e-t)/(n-t);if(!r.length)return r+(i-r)*o;var s,c=r.length,l=createTypedArray(`float32`,c);for(s=0;s<c;s+=1)l[s]=r[s]+(i[s]-r[s])*o;return l}function random(e,t){if(t===void 0&&(e===void 0?(e=0,t=1):(t=e,e=void 0)),t.length){var n,r=t.length;e||=createTypedArray(`float32`,r);var i=createTypedArray(`float32`,r),a=BMMath.random();for(n=0;n<r;n+=1)i[n]=e[n]+a*(t[n]-e[n]);return i}e===void 0&&(e=0);var o=BMMath.random();return e+o*(t-e)}function createPath(e,t,n,r){var i,a=e.length,o=shapePool.newElement();o.setPathData(!!r,a);var s=[0,0],c,l;for(i=0;i<a;i+=1)c=t&&t[i]?t[i]:s,l=n&&n[i]?n[i]:s,o.setTripleAt(e[i][0],e[i][1],l[0]+e[i][0],l[1]+e[i][1],c[0]+e[i][0],c[1]+e[i][1],i,!0);return o}function initiateExpression(elem,data,property){function noOp(e){return e}if(!elem.globalData.renderConfig.runExpressions)return noOp;var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=val.indexOf(`random`)!==-1,elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty._name=elem.data.nm,thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function(){return thisProperty.v}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,name=elem.data.nm,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval(`[function _expression_function(){`+val+`;scoped_bm_rt=$bm_rt}]`)[0],numKeys=property.kf?data.k.length:0,active=!this.data||this.data.hd!==!0,wiggle=function(e,t){var n,r,i=this.pv.length?this.pv.length:1,a=createTypedArray(`float32`,i);e=5;var o=Math.floor(time*e);for(n=0,r=0;n<o;){for(r=0;r<i;r+=1)a[r]+=-t+t*2*BMMath.random();n+=1}var s=time*e,c=s-Math.floor(s),l=createTypedArray(`float32`,i);if(i>1){for(r=0;r<i;r+=1)l[r]=this.pv[r]+a[r]+(-t+t*2*BMMath.random())*c;return l}return this.pv+a[0]+(-t+t*2*BMMath.random())*c}.bind(this);thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut),thisProperty.smooth&&(smooth=thisProperty.smooth.bind(thisProperty));function loopInDuration(e,t){return loopIn(e,t,!0)}function loopOutDuration(e,t){return loopOut(e,t,!0)}this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);function lookAt(e,t){var n=[t[0]-e[0],t[1]-e[1],t[2]-e[2]],r=Math.atan2(n[0],Math.sqrt(n[1]*n[1]+n[2]*n[2]))/degToRads;return[-Math.atan2(n[1],n[2])/degToRads,r,0]}function easeOut(e,t,n,r,i){return applyEase(easeOutBez,e,t,n,r,i)}function easeIn(e,t,n,r,i){return applyEase(easeInBez,e,t,n,r,i)}function ease(e,t,n,r,i){return applyEase(easeInOutBez,e,t,n,r,i)}function applyEase(e,t,n,r,i,a){i===void 0?(i=n,a=r):t=(t-n)/(r-n),t>1?t=1:t<0&&(t=0);var o=e(t);if($bm_isInstanceOfArray(i)){var s,c=i.length,l=createTypedArray(`float32`,c);for(s=0;s<c;s+=1)l[s]=(a[s]-i[s])*o+i[s];return l}return(a-i)*o+i}function nearestKey(e){var t,n=data.k.length,r,i;if(!data.k.length||typeof data.k[0]==`number`)r=0,i=0;else if(r=-1,e*=elem.comp.globalData.frameRate,e<data.k[0].t)r=1,i=data.k[0].t;else{for(t=0;t<n-1;t+=1)if(e===data.k[t].t){r=t+1,i=data.k[t].t;break}else if(e>data.k[t].t&&e<data.k[t+1].t){e-data.k[t].t>data.k[t+1].t-e?(r=t+2,i=data.k[t+1].t):(r=t+1,i=data.k[t].t);break}r===-1&&(r=t+1,i=data.k[t].t)}var a={};return a.index=r,a.time=i/elem.comp.globalData.frameRate,a}function key(e){var t,n,r;if(!data.k.length||typeof data.k[0]==`number`)throw Error(`The property has no keyframe at index `+e);--e,t={time:data.k[e].t/elem.comp.globalData.frameRate,value:[]};var i=Object.prototype.hasOwnProperty.call(data.k[e],`s`)?data.k[e].s:data.k[e-1].e;for(r=i.length,n=0;n<r;n+=1)t[n]=i[n],t.value[n]=i[n];return t}function framesToTime(e,t){return t||=elem.comp.globalData.frameRate,e/t}function timeToFrames(e,t){return!e&&e!==0&&(e=time),t||=elem.comp.globalData.frameRate,e*t}function seedRandom(e){BMMath.seedrandom(randSeed+e)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(e,t){return typeof value==`string`?t===void 0?value.substring(e):value.substring(e,t):``}function substr(e,t){return typeof value==`string`?t===void 0?value.substr(e):value.substr(e,t):``}function posterizeTime(e){time=e===0?0:Math.floor(time*e)/e,value=valueAtTime(time)}var time,velocity,value,text,textIndex,textTotal,selectorValue,index=elem.data.ind,hasParent=!!(elem.hierarchy&&elem.hierarchy.length),parent,randSeed=Math.floor(Math.random()*1e6),globalData=elem.globalData;function executeExpression(e){return value=e,this.frameExpressionId===elem.globalData.frameId&&this.propType!==`textSelector`?value:(this.propType===`textSelector`&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(text=elem.layerInterface.text,thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface(`ADBE Transform Group`),$bm_transform=transform,transform&&(anchorPoint=transform.anchorPoint)),elemType===4&&!content&&(content=thisLayer(`ADBE Root Vectors Group`)),effect||=thisLayer(4),hasParent=!!(elem.hierarchy&&elem.hierarchy.length),hasParent&&!parent&&(parent=elem.hierarchy[0].layerInterface),time=this.comp.renderedFrame/this.comp.globalData.frameRate,_needsRandom&&seedRandom(randSeed+time),needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),this.frameExpressionId=elem.globalData.frameId,scoped_bm_rt=scoped_bm_rt.propType===propTypes.SHAPE?scoped_bm_rt.v:scoped_bm_rt,scoped_bm_rt)}return executeExpression.__preventDeadCodeRemoval=[$bm_transform,anchorPoint,time,velocity,inPoint,outPoint,width,height,name,loop_in,loop_out,smooth,toComp,fromCompToSurface,toWorld,fromWorld,mask,position,rotation,scale,thisComp,numKeys,active,wiggle,loopInDuration,loopOutDuration,comp,lookAt,easeOut,easeIn,ease,nearestKey,key,text,textIndex,textTotal,selectorValue,framesToTime,timeToFrames,sourceRectAtTime,substring,substr,posterizeTime,index,globalData],executeExpression}return ob.initiateExpression=initiateExpression,ob.__preventDeadCodeRemoval=[window,document,XMLHttpRequest,fetch,frames,$bm_neg,add,$bm_sum,$bm_sub,$bm_mul,$bm_div,$bm_mod,clamp,radians_to_degrees,degreesToRadians,degrees_to_radians,normalize,rgbToHsl,hslToRgb,linear,random,createPath,_lottieGlobal],ob.resetFrame=resetFrame,ob}(),Expressions=function(){var e={};e.initExpressions=t,e.resetFrame=ExpressionManager.resetFrame;function t(e){var t=0,n=[];function r(){t+=1}function i(){--t,t===0&&o()}function a(e){n.indexOf(e)===-1&&n.push(e)}function o(){var e,t=n.length;for(e=0;e<t;e+=1)n[e].release();n.length=0}e.renderer.compInterface=CompExpressionInterface(e.renderer),e.renderer.globalData.projectInterface.registerComposition(e.renderer),e.renderer.globalData.pushExpression=r,e.renderer.globalData.popExpression=i,e.renderer.globalData.registerExpressionProperty=a}return e}(),MaskManagerInterface=function(){function e(e,t){this._mask=e,this._data=t}return Object.defineProperty(e.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(e.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),this._mask.op.v*100}}),function(t){var n=createSizedArray(t.viewData.length),r,i=t.viewData.length;for(r=0;r<i;r+=1)n[r]=new e(t.viewData[r],t.masksProperties[r]);return function(e){for(r=0;r<i;){if(t.masksProperties[r].nm===e)return n[r];r+=1}return null}}}(),ExpressionPropertyInterface=function(){var e={pv:0,v:0,mult:1},t={pv:[0,0,0],v:[0,0,0],mult:1};function n(e,t,n){Object.defineProperty(e,"velocity",{get:function(){return t.getVelocityAtTime(t.comp.currentFrame)}}),e.numKeys=t.keyframes?t.keyframes.length:0,e.key=function(r){if(!e.numKeys)return 0;var i=``;i=`s`in t.keyframes[r-1]?t.keyframes[r-1].s:`e`in t.keyframes[r-2]?t.keyframes[r-2].e:t.keyframes[r-2].s;var a=n===`unidimensional`?new Number(i):Object.assign({},i);return a.time=t.keyframes[r-1].t/t.elem.comp.globalData.frameRate,a.value=n===`unidimensional`?i[0]:i,a},e.valueAtTime=t.getValueAtTime,e.speedAtTime=t.getSpeedAtTime,e.velocityAtTime=t.getVelocityAtTime,e.propertyGroup=t.propertyGroup}function r(t){(!t||!(`pv`in t))&&(t=e);var r=1/t.mult,i=t.pv*r,a=new Number(i);return a.value=i,n(a,t,`unidimensional`),function(){return t.k&&t.getValue(),i=t.v*r,a.value!==i&&(a=new Number(i),a.value=i,a[0]=i,n(a,t,`unidimensional`)),a}}function i(e){(!e||!(`pv`in e))&&(e=t);var r=1/e.mult,i=e.data&&e.data.l||e.pv.length,a=createTypedArray(`float32`,i),o=createTypedArray(`float32`,i);return a.value=o,n(a,e,`multidimensional`),function(){e.k&&e.getValue();for(var t=0;t<i;t+=1)o[t]=e.v[t]*r,a[t]=o[t];return a}}function a(){return e}return function(e){return e?e.propType===`unidimensional`?r(e):i(e):a}}(),TransformExpressionInterface=function(){return function(e){function t(e){switch(e){case`scale`:case`Scale`:case`ADBE Scale`:case 6:return t.scale;case`rotation`:case`Rotation`:case`ADBE Rotation`:case`ADBE Rotate Z`:case 10:return t.rotation;case`ADBE Rotate X`:return t.xRotation;case`ADBE Rotate Y`:return t.yRotation;case`position`:case`Position`:case`ADBE Position`:case 2:return t.position;case`ADBE Position_0`:return t.xPosition;case`ADBE Position_1`:return t.yPosition;case`ADBE Position_2`:return t.zPosition;case`anchorPoint`:case`AnchorPoint`:case`Anchor Point`:case`ADBE AnchorPoint`:case 1:return t.anchorPoint;case`opacity`:case`Opacity`:case 11:return t.opacity;default:return null}}Object.defineProperty(t,"rotation",{get:ExpressionPropertyInterface(e.r||e.rz)}),Object.defineProperty(t,"zRotation",{get:ExpressionPropertyInterface(e.rz||e.r)}),Object.defineProperty(t,"xRotation",{get:ExpressionPropertyInterface(e.rx)}),Object.defineProperty(t,"yRotation",{get:ExpressionPropertyInterface(e.ry)}),Object.defineProperty(t,"scale",{get:ExpressionPropertyInterface(e.s)});var n,r,i,a;return e.p?a=ExpressionPropertyInterface(e.p):(n=ExpressionPropertyInterface(e.px),r=ExpressionPropertyInterface(e.py),e.pz&&(i=ExpressionPropertyInterface(e.pz))),Object.defineProperty(t,"position",{get:function(){return e.p?a():[n(),r(),i?i():0]}}),Object.defineProperty(t,"xPosition",{get:ExpressionPropertyInterface(e.px)}),Object.defineProperty(t,"yPosition",{get:ExpressionPropertyInterface(e.py)}),Object.defineProperty(t,"zPosition",{get:ExpressionPropertyInterface(e.pz)}),Object.defineProperty(t,"anchorPoint",{get:ExpressionPropertyInterface(e.a)}),Object.defineProperty(t,"opacity",{get:ExpressionPropertyInterface(e.o)}),Object.defineProperty(t,"skew",{get:ExpressionPropertyInterface(e.sk)}),Object.defineProperty(t,"skewAxis",{get:ExpressionPropertyInterface(e.sa)}),Object.defineProperty(t,"orientation",{get:ExpressionPropertyInterface(e.or)}),t}}(),LayerExpressionInterface=function(){function e(e){var t=new Matrix;return e===void 0?this._elem.finalTransform.mProp.applyToMatrix(t):this._elem.finalTransform.mProp.getValueAtTime(e).clone(t),t}function t(e,t){var n=this.getMatrix(t);return n.props[12]=0,n.props[13]=0,n.props[14]=0,this.applyPoint(n,e)}function n(e,t){var n=this.getMatrix(t);return this.applyPoint(n,e)}function r(e,t){var n=this.getMatrix(t);return n.props[12]=0,n.props[13]=0,n.props[14]=0,this.invertPoint(n,e)}function i(e,t){var n=this.getMatrix(t);return this.invertPoint(n,e)}function a(e,t){if(this._elem.hierarchy&&this._elem.hierarchy.length){var n,r=this._elem.hierarchy.length;for(n=0;n<r;n+=1)this._elem.hierarchy[n].finalTransform.mProp.applyToMatrix(e)}return e.applyToPointArray(t[0],t[1],t[2]||0)}function o(e,t){if(this._elem.hierarchy&&this._elem.hierarchy.length){var n,r=this._elem.hierarchy.length;for(n=0;n<r;n+=1)this._elem.hierarchy[n].finalTransform.mProp.applyToMatrix(e)}return e.inversePoint(t)}function s(e){var t=new Matrix;if(t.reset(),this._elem.finalTransform.mProp.applyToMatrix(t),this._elem.hierarchy&&this._elem.hierarchy.length){var n,r=this._elem.hierarchy.length;for(n=0;n<r;n+=1)this._elem.hierarchy[n].finalTransform.mProp.applyToMatrix(t);return t.inversePoint(e)}return t.inversePoint(e)}function c(){return[1,1,1,1]}return function(l){var u;function d(e){p.mask=new MaskManagerInterface(e,l)}function f(e){p.effect=e}function p(e){switch(e){case`ADBE Root Vectors Group`:case`Contents`:case 2:return p.shapeInterface;case 1:case 6:case`Transform`:case`transform`:case`ADBE Transform Group`:return u;case 4:case`ADBE Effect Parade`:case`effects`:case`Effects`:return p.effect;case`ADBE Text Properties`:return p.textInterface;default:return null}}p.getMatrix=e,p.invertPoint=o,p.applyPoint=a,p.toWorld=n,p.toWorldVec=t,p.fromWorld=i,p.fromWorldVec=r,p.toComp=n,p.fromComp=s,p.sampleImage=c,p.sourceRectAtTime=l.sourceRectAtTime.bind(l),p._elem=l,u=TransformExpressionInterface(l.finalTransform.mProp);var m=getDescriptor(u,`anchorPoint`);return Object.defineProperties(p,{hasParent:{get:function(){return l.hierarchy.length}},parent:{get:function(){return l.hierarchy[0].layerInterface}},rotation:getDescriptor(u,`rotation`),scale:getDescriptor(u,`scale`),position:getDescriptor(u,`position`),opacity:getDescriptor(u,`opacity`),anchorPoint:m,anchor_point:m,transform:{get:function(){return u}},active:{get:function(){return l.isInRange}}}),p.startTime=l.data.st,p.index=l.data.ind,p.source=l.data.refId,p.height=l.data.ty===0?l.data.h:100,p.width=l.data.ty===0?l.data.w:100,p.inPoint=l.data.ip/l.comp.globalData.frameRate,p.outPoint=l.data.op/l.comp.globalData.frameRate,p._name=l.data.nm,p.registerMaskInterface=d,p.registerEffectsInterface=f,p}}(),propertyGroupFactory=function(){return function(e,t){return function(n){return n=n===void 0?1:n,n<=0?e:t(n-1)}}}(),PropertyInterface=function(){return function(e,t){var n={_name:e};function r(e){return e=e===void 0?1:e,e<=0?n:t(e-1)}return r}}(),EffectsExpressionInterface=function(){var e={createEffectsInterface:t};function t(e,t){if(e.effectsManager){var r=[],i=e.data.ef,a,o=e.effectsManager.effectElements.length;for(a=0;a<o;a+=1)r.push(n(i[a],e.effectsManager.effectElements[a],t,e));var s=e.data.ef||[],c=function(e){for(a=0,o=s.length;a<o;){if(e===s[a].nm||e===s[a].mn||e===s[a].ix)return r[a];a+=1}return null};return Object.defineProperty(c,"numProperties",{get:function(){return s.length}}),c}return null}function n(e,t,i,a){function o(t){for(var n=e.ef,r=0,i=n.length;r<i;){if(t===n[r].nm||t===n[r].mn||t===n[r].ix)return n[r].ty===5?c[r]:c[r]();r+=1}throw Error()}var s=propertyGroupFactory(o,i),c=[],l,u=e.ef.length;for(l=0;l<u;l+=1)e.ef[l].ty===5?c.push(n(e.ef[l],t.effectElements[l],t.effectElements[l].propertyGroup,a)):c.push(r(t.effectElements[l],e.ef[l].ty,a,s));return e.mn===`ADBE Color Control`&&Object.defineProperty(o,"color",{get:function(){return c[0]()}}),Object.defineProperties(o,{numProperties:{get:function(){return e.np}},_name:{value:e.nm},propertyGroup:{value:s}}),o.enabled=e.en!==0,o.active=o.enabled,o}function r(e,t,n,r){var i=ExpressionPropertyInterface(e.p);function a(){return t===10?n.comp.compInterface(e.p.v):i()}return e.p.setGroupProperty&&e.p.setGroupProperty(PropertyInterface(``,r)),a}return e}(),ShapePathInterface=function(){return function(e,t,n){var r=t.sh;function i(e){return e===`Shape`||e===`shape`||e===`Path`||e===`path`||e===`ADBE Vector Shape`||e===2?i.path:null}var a=propertyGroupFactory(i,n);return r.setGroupProperty(PropertyInterface(`Path`,a)),Object.defineProperties(i,{path:{get:function(){return r.k&&r.getValue(),r}},shape:{get:function(){return r.k&&r.getValue(),r}},_name:{value:e.nm},ix:{value:e.ix},propertyIndex:{value:e.ix},mn:{value:e.mn},propertyGroup:{value:n}}),i}}(),ShapeExpressionInterface=function(){function e(e,t,c){var m=[],g,_=e?e.length:0;for(g=0;g<_;g+=1)e[g].ty===`gr`?m.push(n(e[g],t[g],c)):e[g].ty===`fl`?m.push(r(e[g],t[g],c)):e[g].ty===`st`?m.push(o(e[g],t[g],c)):e[g].ty===`tm`?m.push(s(e[g],t[g],c)):e[g].ty===`tr`||(e[g].ty===`el`?m.push(l(e[g],t[g],c)):e[g].ty===`sr`?m.push(u(e[g],t[g],c)):e[g].ty===`sh`?m.push(ShapePathInterface(e[g],t[g],c)):e[g].ty===`rc`?m.push(d(e[g],t[g],c)):e[g].ty===`rd`?m.push(f(e[g],t[g],c)):e[g].ty===`rp`?m.push(p(e[g],t[g],c)):e[g].ty===`gf`?m.push(i(e[g],t[g],c)):m.push(a(e[g],t[g],c)));return m}function t(t,n,r){var i,a=function(e){for(var t=0,n=i.length;t<n;){if(i[t]._name===e||i[t].mn===e||i[t].propertyIndex===e||i[t].ix===e||i[t].ind===e)return i[t];t+=1}return typeof e==`number`?i[e-1]:null};return a.propertyGroup=propertyGroupFactory(a,r),i=e(t.it,n.it,a.propertyGroup),a.numProperties=i.length,a.transform=c(t.it[t.it.length-1],n.it[n.it.length-1],a.propertyGroup),a.propertyIndex=t.cix,a._name=t.nm,a}function n(e,n,r){var i=function(e){switch(e){case`ADBE Vectors Group`:case`Contents`:case 2:return i.content;default:return i.transform}};i.propertyGroup=propertyGroupFactory(i,r);var a=t(e,n,i.propertyGroup),o=c(e.it[e.it.length-1],n.it[n.it.length-1],i.propertyGroup);return i.content=a,i.transform=o,Object.defineProperty(i,"_name",{get:function(){return e.nm}}),i.numProperties=e.np,i.propertyIndex=e.ix,i.nm=e.nm,i.mn=e.mn,i}function r(e,t,n){function r(e){return e===`Color`||e===`color`?r.color:e===`Opacity`||e===`opacity`?r.opacity:null}return Object.defineProperties(r,{color:{get:ExpressionPropertyInterface(t.c)},opacity:{get:ExpressionPropertyInterface(t.o)},_name:{value:e.nm},mn:{value:e.mn}}),t.c.setGroupProperty(PropertyInterface(`Color`,n)),t.o.setGroupProperty(PropertyInterface(`Opacity`,n)),r}function i(e,t,n){function r(e){return e===`Start Point`||e===`start point`?r.startPoint:e===`End Point`||e===`end point`?r.endPoint:e===`Opacity`||e===`opacity`?r.opacity:null}return Object.defineProperties(r,{startPoint:{get:ExpressionPropertyInterface(t.s)},endPoint:{get:ExpressionPropertyInterface(t.e)},opacity:{get:ExpressionPropertyInterface(t.o)},type:{get:function(){return`a`}},_name:{value:e.nm},mn:{value:e.mn}}),t.s.setGroupProperty(PropertyInterface(`Start Point`,n)),t.e.setGroupProperty(PropertyInterface(`End Point`,n)),t.o.setGroupProperty(PropertyInterface(`Opacity`,n)),r}function a(){function e(){return null}return e}function o(e,t,n){var r=propertyGroupFactory(l,n),i=propertyGroupFactory(c,r);function a(n){Object.defineProperty(c,e.d[n].nm,{get:ExpressionPropertyInterface(t.d.dataProps[n].p)})}var o,s=e.d?e.d.length:0,c={};for(o=0;o<s;o+=1)a(o),t.d.dataProps[o].p.setGroupProperty(i);function l(e){return e===`Color`||e===`color`?l.color:e===`Opacity`||e===`opacity`?l.opacity:e===`Stroke Width`||e===`stroke width`?l.strokeWidth:null}return Object.defineProperties(l,{color:{get:ExpressionPropertyInterface(t.c)},opacity:{get:ExpressionPropertyInterface(t.o)},strokeWidth:{get:ExpressionPropertyInterface(t.w)},dash:{get:function(){return c}},_name:{value:e.nm},mn:{value:e.mn}}),t.c.setGroupProperty(PropertyInterface(`Color`,r)),t.o.setGroupProperty(PropertyInterface(`Opacity`,r)),t.w.setGroupProperty(PropertyInterface(`Stroke Width`,r)),l}function s(e,t,n){function r(t){return t===e.e.ix||t===`End`||t===`end`?r.end:t===e.s.ix?r.start:t===e.o.ix?r.offset:null}var i=propertyGroupFactory(r,n);return r.propertyIndex=e.ix,t.s.setGroupProperty(PropertyInterface(`Start`,i)),t.e.setGroupProperty(PropertyInterface(`End`,i)),t.o.setGroupProperty(PropertyInterface(`Offset`,i)),r.propertyIndex=e.ix,r.propertyGroup=n,Object.defineProperties(r,{start:{get:ExpressionPropertyInterface(t.s)},end:{get:ExpressionPropertyInterface(t.e)},offset:{get:ExpressionPropertyInterface(t.o)},_name:{value:e.nm}}),r.mn=e.mn,r}function c(e,t,n){function r(t){return e.a.ix===t||t===`Anchor Point`?r.anchorPoint:e.o.ix===t||t===`Opacity`?r.opacity:e.p.ix===t||t===`Position`?r.position:e.r.ix===t||t===`Rotation`||t===`ADBE Vector Rotation`?r.rotation:e.s.ix===t||t===`Scale`?r.scale:e.sk&&e.sk.ix===t||t===`Skew`?r.skew:e.sa&&e.sa.ix===t||t===`Skew Axis`?r.skewAxis:null}var i=propertyGroupFactory(r,n);return t.transform.mProps.o.setGroupProperty(PropertyInterface(`Opacity`,i)),t.transform.mProps.p.setGroupProperty(PropertyInterface(`Position`,i)),t.transform.mProps.a.setGroupProperty(PropertyInterface(`Anchor Point`,i)),t.transform.mProps.s.setGroupProperty(PropertyInterface(`Scale`,i)),t.transform.mProps.r.setGroupProperty(PropertyInterface(`Rotation`,i)),t.transform.mProps.sk&&(t.transform.mProps.sk.setGroupProperty(PropertyInterface(`Skew`,i)),t.transform.mProps.sa.setGroupProperty(PropertyInterface(`Skew Angle`,i))),t.transform.op.setGroupProperty(PropertyInterface(`Opacity`,i)),Object.defineProperties(r,{opacity:{get:ExpressionPropertyInterface(t.transform.mProps.o)},position:{get:ExpressionPropertyInterface(t.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(t.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(t.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(t.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(t.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(t.transform.mProps.sa)},_name:{value:e.nm}}),r.ty=`tr`,r.mn=e.mn,r.propertyGroup=n,r}function l(e,t,n){function r(t){return e.p.ix===t?r.position:e.s.ix===t?r.size:null}var i=propertyGroupFactory(r,n);r.propertyIndex=e.ix;var a=t.sh.ty===`tm`?t.sh.prop:t.sh;return a.s.setGroupProperty(PropertyInterface(`Size`,i)),a.p.setGroupProperty(PropertyInterface(`Position`,i)),Object.defineProperties(r,{size:{get:ExpressionPropertyInterface(a.s)},position:{get:ExpressionPropertyInterface(a.p)},_name:{value:e.nm}}),r.mn=e.mn,r}function u(e,t,n){function r(t){return e.p.ix===t?r.position:e.r.ix===t?r.rotation:e.pt.ix===t?r.points:e.or.ix===t||t===`ADBE Vector Star Outer Radius`?r.outerRadius:e.os.ix===t?r.outerRoundness:e.ir&&(e.ir.ix===t||t===`ADBE Vector Star Inner Radius`)?r.innerRadius:e.is&&e.is.ix===t?r.innerRoundness:null}var i=propertyGroupFactory(r,n),a=t.sh.ty===`tm`?t.sh.prop:t.sh;return r.propertyIndex=e.ix,a.or.setGroupProperty(PropertyInterface(`Outer Radius`,i)),a.os.setGroupProperty(PropertyInterface(`Outer Roundness`,i)),a.pt.setGroupProperty(PropertyInterface(`Points`,i)),a.p.setGroupProperty(PropertyInterface(`Position`,i)),a.r.setGroupProperty(PropertyInterface(`Rotation`,i)),e.ir&&(a.ir.setGroupProperty(PropertyInterface(`Inner Radius`,i)),a.is.setGroupProperty(PropertyInterface(`Inner Roundness`,i))),Object.defineProperties(r,{position:{get:ExpressionPropertyInterface(a.p)},rotation:{get:ExpressionPropertyInterface(a.r)},points:{get:ExpressionPropertyInterface(a.pt)},outerRadius:{get:ExpressionPropertyInterface(a.or)},outerRoundness:{get:ExpressionPropertyInterface(a.os)},innerRadius:{get:ExpressionPropertyInterface(a.ir)},innerRoundness:{get:ExpressionPropertyInterface(a.is)},_name:{value:e.nm}}),r.mn=e.mn,r}function d(e,t,n){function r(t){return e.p.ix===t?r.position:e.r.ix===t?r.roundness:e.s.ix===t||t===`Size`||t===`ADBE Vector Rect Size`?r.size:null}var i=propertyGroupFactory(r,n),a=t.sh.ty===`tm`?t.sh.prop:t.sh;return r.propertyIndex=e.ix,a.p.setGroupProperty(PropertyInterface(`Position`,i)),a.s.setGroupProperty(PropertyInterface(`Size`,i)),a.r.setGroupProperty(PropertyInterface(`Rotation`,i)),Object.defineProperties(r,{position:{get:ExpressionPropertyInterface(a.p)},roundness:{get:ExpressionPropertyInterface(a.r)},size:{get:ExpressionPropertyInterface(a.s)},_name:{value:e.nm}}),r.mn=e.mn,r}function f(e,t,n){function r(t){return e.r.ix===t||t===`Round Corners 1`?r.radius:null}var i=propertyGroupFactory(r,n),a=t;return r.propertyIndex=e.ix,a.rd.setGroupProperty(PropertyInterface(`Radius`,i)),Object.defineProperties(r,{radius:{get:ExpressionPropertyInterface(a.rd)},_name:{value:e.nm}}),r.mn=e.mn,r}function p(e,t,n){function r(t){return e.c.ix===t||t===`Copies`?r.copies:e.o.ix===t||t===`Offset`?r.offset:null}var i=propertyGroupFactory(r,n),a=t;return r.propertyIndex=e.ix,a.c.setGroupProperty(PropertyInterface(`Copies`,i)),a.o.setGroupProperty(PropertyInterface(`Offset`,i)),Object.defineProperties(r,{copies:{get:ExpressionPropertyInterface(a.c)},offset:{get:ExpressionPropertyInterface(a.o)},_name:{value:e.nm}}),r.mn=e.mn,r}return function(t,n,r){var i;function a(e){if(typeof e==`number`)return e=e===void 0?1:e,e===0?r:i[e-1];for(var t=0,n=i.length;t<n;){if(i[t]._name===e)return i[t];t+=1}return null}function o(){return r}return a.propertyGroup=propertyGroupFactory(a,o),i=e(t,n,a.propertyGroup),a.numProperties=i.length,a._name=`Contents`,a}}(),TextExpressionInterface=function(){return function(e){var t;function n(e){switch(e){case`ADBE Text Document`:return n.sourceText;default:return null}}return Object.defineProperty(n,"sourceText",{get:function(){e.textProperty.getValue();var n=e.textProperty.currentData.t;return(!t||n!==t.value)&&(t=new String(n),t.value=n||new String(n),Object.defineProperty(t,"style",{get:function(){return{fillColor:e.textProperty.currentData.fc}}})),t}}),n}}();function _typeof(e){"@babel/helpers - typeof";return _typeof=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},_typeof(e)}var FootageInterface=function(){var e=function(e){var t=``,n=e.getFootageData();function r(){return t=``,n=e.getFootageData(),i}function i(e){if(n[e])return t=e,n=n[e],_typeof(n)===`object`?i:n;var r=e.indexOf(t);if(r!==-1){var a=parseInt(e.substr(r+t.length),10);return n=n[a],_typeof(n)===`object`?i:n}return``}return r},t=function(t){function n(e){return e===`Outline`?n.outlineInterface():null}return n._name=`Outline`,n.outlineInterface=e(t),n};return function(e){function n(e){return e===`Data`?n.dataInterface:null}return n._name=`Data`,n.dataInterface=t(e),n}}(),interfaces={layer:LayerExpressionInterface,effects:EffectsExpressionInterface,comp:CompExpressionInterface,shape:ShapeExpressionInterface,text:TextExpressionInterface,footage:FootageInterface};function getInterface(e){return interfaces[e]||null}var expressionHelpers=function(){function e(e,t,n){t.x&&(n.k=!0,n.x=!0,n.initiateExpression=ExpressionManager.initiateExpression,n.effectsSequence.push(n.initiateExpression(e,t,n).bind(n)))}function t(e){return e*=this.elem.globalData.frameRate,e-=this.offsetTime,e!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<e?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(e,this._cachingAtTime),this._cachingAtTime.lastFrame=e),this._cachingAtTime.value}function n(e){var t=-.01,n=this.getValueAtTime(e),r=this.getValueAtTime(e+t),i=0;if(n.length){var a;for(a=0;a<n.length;a+=1)i+=(r[a]-n[a])**2;i=Math.sqrt(i)*100}else i=0;return i}function r(e){if(this.vel!==void 0)return this.vel;var t=-.001,n=this.getValueAtTime(e),r=this.getValueAtTime(e+t),i;if(n.length){i=createTypedArray(`float32`,n.length);var a;for(a=0;a<n.length;a+=1)i[a]=(r[a]-n[a])/t}else i=(r-n)/t;return i}function i(){return this.pv}function a(e){this.propertyGroup=e}return{searchExpressions:e,getSpeedAtTime:n,getVelocityAtTime:r,getValueAtTime:t,getStaticValueAtTime:i,setGroupProperty:a}}();function addPropertyDecorator(){function e(e,t,n){if(!this.k||!this.keyframes)return this.pv;e=e?e.toLowerCase():``;var r=this.comp.renderedFrame,i=this.keyframes,a=i[i.length-1].t;if(r<=a)return this.pv;var o,s;n?(o=t?Math.abs(a-this.elem.comp.globalData.frameRate*t):Math.max(0,a-this.elem.data.ip),s=a-o):((!t||t>i.length-1)&&(t=i.length-1),s=i[i.length-1-t].t,o=a-s);var c,l,u;if(e===`pingpong`){if(Math.floor((r-s)/o)%2!=0)return this.getValueAtTime((o-(r-s)%o+s)/this.comp.globalData.frameRate,0)}else if(e===`offset`){var d=this.getValueAtTime(s/this.comp.globalData.frameRate,0),f=this.getValueAtTime(a/this.comp.globalData.frameRate,0),p=this.getValueAtTime(((r-s)%o+s)/this.comp.globalData.frameRate,0),m=
10Math.floor((r-s)/o);if(this.pv.length){for(u=Array(d.length),l=u.length,c=0;c<l;c+=1)u[c]=(f[c]-d[c])*m+p[c];return u}return(f-d)*m+p}else if(e===`continue`){var g=this.getValueAtTime(a/this.comp.globalData.frameRate,0),_=this.getValueAtTime((a-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(u=Array(g.length),l=u.length,c=0;c<l;c+=1)u[c]=g[c]+(g[c]-_[c])*((r-a)/this.comp.globalData.frameRate)/5e-4;return u}return g+(g-_)*((r-a)/.001)}return this.getValueAtTime(((r-s)%o+s)/this.comp.globalData.frameRate,0)}function t(e,t,n){if(!this.k)return this.pv;e=e?e.toLowerCase():``;var r=this.comp.renderedFrame,i=this.keyframes,a=i[0].t;if(r>=a)return this.pv;var o,s;n?(o=t?Math.abs(this.elem.comp.globalData.frameRate*t):Math.max(0,this.elem.data.op-a),s=a+o):((!t||t>i.length-1)&&(t=i.length-1),s=i[t].t,o=s-a);var c,l,u;if(e===`pingpong`){if(Math.floor((a-r)/o)%2==0)return this.getValueAtTime(((a-r)%o+a)/this.comp.globalData.frameRate,0)}else if(e===`offset`){var d=this.getValueAtTime(a/this.comp.globalData.frameRate,0),f=this.getValueAtTime(s/this.comp.globalData.frameRate,0),p=this.getValueAtTime((o-(a-r)%o+a)/this.comp.globalData.frameRate,0),m=Math.floor((a-r)/o)+1;if(this.pv.length){for(u=Array(d.length),l=u.length,c=0;c<l;c+=1)u[c]=p[c]-(f[c]-d[c])*m;return u}return p-(f-d)*m}else if(e===`continue`){var g=this.getValueAtTime(a/this.comp.globalData.frameRate,0),_=this.getValueAtTime((a+.
10001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(u=Array(g.length),l=u.length,c=0;c<l;c+=1)u[c]=g[c]+(g[c]-_[c])*(a-r)/.001;return u}return g+(g-_)*(a-r)/.001}return this.getValueAtTime((o-((a-r)%o+a))/this.comp.globalData.frameRate,0)}function n(e,t){if(!this.k||(e=(e||.4)*.5,t=Math.floor(t||5),t<=1))return this.pv;for(var n=this.comp.renderedFrame/this.comp.globalData.frameRate,r=n-e,i=n+e,a=t>1?(i-r)/(t-1):1,o=0,s=0,c=this.pv.length?createTypedArray(`float32`,this.pv.length):0,l;o<t;){if(l=this.getValueAtTime(r+o*a),this.pv.length)for(s=0;s<this.pv.length;s+=1)c[s]+=l[s];else c+=l;o+=1}if(this.pv.length)for(s=0;s<this.pv.length;s+=1)c[s]/=t;else c/=t;return c}function r(e){this._transformCachingAtTime||={v:new Matrix};var t=this._transformCachingAtTime.v;if(t.cloneFromProps(this.pre.props),this.appliedTransformations<1){var n=this.a.getValueAtTime(e);t.translate(-n[0]*this.a.mult,-n[1]*this.a.mult,n[2]*this.a.mult)}if(this.appliedTransformations<2){var r=this.s.getValueAtTime(e);t.scale(r[0]*this.s.mult,r[1]*this.s.mult,r[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var i=this.sk.getValueAtTime(e),a=this.sa.getValueAtTime(e);t.skewFromAxis(-i*this.sk.mult,a*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var o=this.r.getValueAtTime(e);t.rotate(-o*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var s=this.rz.getValueAtTime(e),c=this.ry.getValueAtTime(e),l=this.rx.getValueAtTime(e),u=this.or.getValueAtTime(e);t.rotateZ(-s*this.rz.mult).rotateY(c*this.ry.mult).rotateX(l*this.rx.mult).rotateZ(-u[2]*this.or.mult).rotateY(u[1]*this.or.mult).rotateX(u[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var d=this.px.getValueAtTime(e),f=this.py.getValueAtTime(e);if(this.data.p.z){var p=this.pz.getValueAtTime(e);t.translate(d*this.px.mult,f*this.py.mult,-p*this.pz.mult)}else t.translate(d*this.px.mult,f*this.py.mult,0)}else{var m=this.p.getValueAtTime(e);t.translate(m[0]*this.p.mult,m[1]*this.p.mult,-m[2]*this.p.mult)}return t}function i(){return this.v.clone(new Matrix)}var a=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(e,t,n){var o=a(e,t,n);return o.dynamicProperties.length?o.getValueAtTime=r.bind(o):o.getValueAtTime=i.bind(o),o.setGroupProperty=expressionHelpers.setGroupProperty,o};var o=PropertyFactory.getProp;PropertyFactory.getProp=function(r,i,a,s,c){var l=o(r,i,a,s,c);l.kf?l.getValueAtTime=expressionHelpers.getValueAtTime.bind(l):l.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(l),l.setGroupProperty=expressionHelpers.setGroupProperty,l.loopOut=e,l.loopIn=t,l.smooth=n,l.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(l),l.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(l),l.numKeys=i.a===1?i.k.length:0,l.propertyIndex=i.ix;var u=0;return a!==0&&(u=createTypedArray(`float32`,i.a===1?i.k[0].s.length:i.k.length)),l._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:u},expressionHelpers.searchExpressions(r,i,l),l.k&&c.addDynamicProperty(l),l};function s(e){return this._cachingAtTime||={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame},e*=this.elem.globalData.frameRate,e-=this.offsetTime,e!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<e?this._caching.lastIndex:0,this._cachingAtTime.lastTime=e,this.interpolateShape(e,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue}var c=ShapePropertyFactory.getConstructorFunction(),l=ShapePropertyFactory.getKeyframedConstructorFunction();function u(){}u.prototype={vertices:function(e,t){this.k&&this.getValue();var n=this.v;t!==void 0&&(n=this.getValueAtTime(t,0));var r,i=n._length,a=n[e],o=n.v,s=createSizedArray(i);for(r=0;r<i;r+=1)e===`i`||e===`o`?s[r]=[a[r][0]-o[r][0],a[r][1]-o[r][1]]:s[r]=[a[r][0],a[r][1]];return s},points:function(e){return this.vertices(`v`,e)},inTangents:function(e){return this.vertices(`i`,e)},outTangents:function(e){return this.vertices(`o`,e)},isClosed:function(){return this.v.c},pointOnPath:function(e,t){var n=this.v;
vendor: 10,484 bytes, line 10
10t!==void 0&&(n=this.getValueAtTime(t,0)),this._segmentsLength||=bez.getSegmentsLength(n);for(var r=this._segmentsLength,i=r.lengths,a=r.totalLength*e,o=0,s=i.length,c=0,l;o<s;){if(c+i[o].addedLength>a){var u=o,d=n.c&&o===s-1?0:o+1,f=(a-c)/i[o].addedLength;l=bez.getPointInSegment(n.v[u],n.v[d],n.o[u],n.i[d],f,i[o]);break}else c+=i[o].addedLength;o+=1}return l||=n.c?[n.v[0][0],n.v[0][1]]:[n.v[n._length-1][0],n.v[n._length-1][1]],l},vectorOnPath:function(e,t,n){e==1?e=this.v.c:e==0&&(e=.999);var r=this.pointOnPath(e,t),i=this.pointOnPath(e+.001,t),a=i[0]-r[0],o=i[1]-r[1],s=Math.sqrt(a**2+o**2);return s===0?[0,0]:n===`tangent`?[a/s,o/s]:[-o/s,a/s]},tangentOnPath:function(e,t){return this.vectorOnPath(e,t,`tangent`)},normalOnPath:function(e,t){return this.vectorOnPath(e,t,`normal`)},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([u],c),extendPrototype([u],l),l.prototype.getValueAtTime=s,l.prototype.initiateExpression=ExpressionManager.initiateExpression;var d=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(e,t,n,r,i){var a=d(e,t,n,r,i);return a.propertyIndex=t.ix,a.lock=!1,n===3?expressionHelpers.searchExpressions(e,t.pt,a):n===4&&expressionHelpers.searchExpressions(e,t.ks,a),a.k&&e.addDynamicProperty(a),a}}function initialize$1(){addPropertyDecorator()}function addDecorator(){function e(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null}TextProperty.prototype.getExpressionValue=function(e,t){var n=this.calculateExpression(t);if(e.t!==n){var r={};return this.copyData(r,e),r.t=n.toString(),r.__complete=!1,r}return e},TextProperty.prototype.searchProperty=function(){var e=this.searchKeyframes(),t=this.searchExpressions();return this.kf=e||t,this.kf},TextProperty.prototype.searchExpressions=e}function initialize(){addDecorator()}function SVGComposableEffect(){}SVGComposableEffect.prototype={createMergeNode:function(e,t){var n=createNS(`feMerge`);n.setAttribute(`result`,e);var r,i;for(i=0;i<t.length;i+=1)r=createNS(`feMergeNode`),r.setAttribute(`in`,t[i]),n.appendChild(r),n.appendChild(r);return n}};var linearFilterValue=`0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0`;function SVGTintFilter(e,t,n,r,i){this.filterManager=t;var a=createNS(`feColorMatrix`);a.setAttribute(`type`,`matrix`),a.setAttribute(`color-interpolation-filters`,`linearRGB`),a.setAttribute(`values`,linearFilterValue+` 1 0`),this.linearFilter=a,a.setAttribute(`result`,r+`_tint_1`),e.appendChild(a),a=createNS(`feColorMatrix`),a.setAttribute(`type`,`matrix`),a.setAttribute(`color-interpolation-filters`,`sRGB`),a.setAttribute(`values`,`1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0`),a.setAttribute(`result`,r+`_tint_2`),e.appendChild(a),this.matrixFilter=a;var o=this.createMergeNode(r,[i,r+`_tint_1`,r+`_tint_2`]);e.appendChild(o)}extendPrototype([SVGComposableEffect],SVGTintFilter),SVGTintFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[0].p.v,n=this.filterManager.effectElements[1].p.v,r=this.filterManager.effectElements[2].p.v/100;this.linearFilter.setAttribute(`values`,linearFilterValue+` `+r+` 0`),this.matrixFilter.setAttribute(`values`,n[0]-t[0]+` 0 0 0 `+t[0]+` `+(n[1]-t[1])+` 0 0 0 `+t[1]+` `+(n[2]-t[2])+` 0 0 0 `+t[2]+` 0 0 0 1 0`)}};function SVGFillFilter(e,t,n,r){this.filterManager=t;var i=createNS(`feColorMatrix`);i.setAttribute(`type`,`matrix`),i.setAttribute(`color-interpolation-filters`,`sRGB`),i.setAttribute(`values`,`1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0`),i.setAttribute(`result`,r),e.appendChild(i),this.matrixFilter=i}SVGFillFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[2].p.v,n=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute(`values`,`0 0 0 0 `+t[0]+` 0 0 0 0 `+t[1]+` 0 0 0 0 `+t[2]+` 0 0 0 `+n+` 0`)}};function SVGStrokeEffect(e,t,n){this.initialized=!1,this.filterManager=t,this.elem=n,this.paths=[]}SVGStrokeEffect.prototype.initialize=function(){var e=this.elem.layerElement.children||this.elem.layerElement.childNodes,t,n,r,i;for(this.filterManager.effectElements[1].p.v===1?(i=this.elem.maskManager.masksProperties.length,r=0):(r=this.filterManager.effectElements[0].p.v-1,i=r+1),n=createNS(`g`),n.setAttribute(`fill`,`none`),n.setAttribute(`stroke-linecap`,`round`),n.setAttribute(`stroke-dashoffset`,1);r<i;r+=1)t=createNS(`path`),n.appendChild(t),this.paths.push({p:t,m:r});if(this.filterManager.effectElements[10].p.v===3){var a=createNS(`mask`),o=createElementID();a.setAttribute(`id`,o),a.setAttribute(`mask-type`,`alpha`),a.appendChild(n),this.elem.globalData.defs.appendChild(a);var s=createNS(`g`);for(s.setAttribute(`mask`,`url(`+getLocationHref()+`#`+o+`)`);e[0];)s.appendChild(e[0]);this.elem.layerElement.appendChild(s),this.masker=a,n.setAttribute(`stroke`,`#fff`)}else if(this.filterManager.effectElements[10].p.v===1||this.filterManager.effectElements[10].p.v===2){if(this.filterManager.effectElements[10].p.v===2)for(e=this.elem.layerElement.children||this.elem.layerElement.childNodes;e.length;)this.elem.layerElement.removeChild(e[0]);this.elem.layerElement.appendChild(n),this.elem.layerElement.removeAttribute(`mask`),n.setAttribute(`stroke`,`#fff`)}this.initialized=!0,this.pathMasker=n},SVGStrokeEffect.prototype.renderFrame=function(e){this.initialized||this.initialize();var t,n=this.paths.length,r,i;for(t=0;t<n;t+=1)if(this.paths[t].m!==-1&&(r=this.elem.maskManager.viewData[this.paths[t].m],i=this.paths[t].p,(e||this.filterManager._mdf||r.prop._mdf)&&i.setAttribute(`d`,r.lastPath),e||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||r.prop._mdf)){var a;if(this.filterManager.effectElements[7].p.v!==0||this.filterManager.effectElements[8].p.v!==100){var o=Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)*.01,s=Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)*.01,c=i.getTotalLength();a=`0 0 0 `+c*o+` `;var l=c*(s-o),u=1+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v*.01,d=Math.floor(l/u),f;for(f=0;f<d;f+=1)a+=`1 `+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v*.01+` `;a+=`0 `+c*10+` 0 0`}else a=`1 `+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v*.01;i.setAttribute(`stroke-dasharray`,a)}if((e||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute(`stroke-width`,this.filterManager.effectElements[4].p.v*2),(e||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute(`opacity`,this.filterManager.effectElements[6].p.v),(this.filterManager.effectElements[10].p.v===1||this.filterManager.effectElements[10].p.v===2)&&(e||this.filterManager.effectElements[3].p._mdf)){var p=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute(`stroke`,`rgb(`+bmFloor(p[0]*255)+`,`+bmFloor(p[1]*255)+`,`+bmFloor(p[2]*255)+`)`)}};function SVGTritoneFilter(e,t,n,r){this.filterManager=t;var i=createNS(`feColorMatrix`);i.setAttribute(`type`,`matrix`),i.setAttribute(`color-interpolation-filters`,`linearRGB`),i.setAttribute(`values`,`0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0`),e.appendChild(i);var a=createNS(`feComponentTransfer`);a.setAttribute(`color-interpolation-filters`,`sRGB`),a.setAttribute(`result`,r),this.matrixFilter=a;var o=createNS(`feFuncR`);o.setAttribute(`type`,`table`),a.appendChild(o),this.feFuncR=o;var s=createNS(`feFuncG`);s.setAttribute(`type`,`table`),a.appendChild(s),this.feFuncG=s;var c=createNS(`feFuncB`);c.setAttribute(`type`,`table`),a.appendChild(c),this.feFuncB=c,e.appendChild(a)}SVGTritoneFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[0].p.v,n=this.filterManager.effectElements[1].p.v,r=this.filterManager.effectElements[2].p.v,i=r[0]+` `+n[0]+` `+t[0],a=r[1]+` `+n[1]+` `+t[1],o=r[2]+` `+n[2]+` `+t[2];this.feFuncR.setAttribute(`tableValues`,i),this.feFuncG.setAttribute(`tableValues`,a),this.feFuncB.setAttribute(`tableValues`,o)}};function SVGProLevelsFilter(e,t,n,r){this.filterManager=t;var i=this.filterManager.effectElements,a=createNS(`feComponentTransfer`);(i[10].p.k||i[10].p.v!==0||i[11].p.k||i[11].p.v!==1||i[12].p.k||i[12].p.v!==1||i[13].p.k||i[13].p.v!==0||i[14].p.k||i[14].p.v!==1)&&(this.feFuncR=this.createFeFunc(`feFuncR`,a)),(i[17].p.k||i[17].p.v!==0||i[18].p.k||i[18].p.v!==1||i[19].p.k||i[19].p.v!==1||i[20].p.k||i[20].p.v!==0||i[21].p.k||i[21].p.v!==1)&&(this.feFuncG=this.createFeFunc(`feFuncG`,a)),(i[24].p.k||i[24].p.v!==0||i[25].p.k||i[25].p.v!==1||i[26].p.k||i[26].p.v!==1||i[27].p.k||i[27].p.v!==0||i[28].p.k||i[28].p.v!==1)&&(this.feFuncB=this.createFeFunc(`feFuncB`,a)),(i[31].p.k||i[31].p.v!==0||i[32].p.k||i[32].p.v!==1||i[33].p.k||i[33].p.v!==1||i[34].p.k||i[34].p.v!==0||i[35].p.k||i[35].p.v!==1)&&(this.feFuncA=this.createFeFunc(`feFuncA`,a)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(a.setAttribute(`color-interpolation-filters`,`sRGB`),e.appendChild(a)),(i[3].p.k||i[3].p.v!==0||i[4].p.k||i[4].p.v!==1||i[5].p.k||i[5].p.v!==1||i[6].p.k||i[6].p.v!==0||i[7].p.k||i[7].p.v!==1)&&(a=createNS(`feComponentTransfer`),a.setAttribute(`color-interpolation-filters`,`sRGB`),a.setAttribute(`result`,r),e.appendChild(a),this.feFuncRComposed=this.createFeFunc(`feFuncR`,a),this.feFuncGComposed=this.createFeFunc(`feFuncG`,a),this.feFuncBComposed=this.createFeFunc(`feFuncB`,a))}SVGProLevelsFilter.prototype.createFeFunc=function(e,t){var n=createNS(e);return n.setAttribute(`type`,`table`),t.appendChild(n),n},SVGProLevelsFilter.prototype.getTableValue=function(e,t,n,r,i){for(var a=0,o=256,s,c=Math.min(e,t),l=Math.max(e,t),u=Array.call(null,{length:o}),d,f=0,p=i-r,m=t-e;a<=256;)s=a/256,d=s<=c?m<0?i:r:s>=l?m<0?r:i:r+p*((s-e)/m)**(1/n),u[f]=d,f+=1,a+=256/(o-1);return u.join(` `)},SVGProLevelsFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t,n=this.filterManager.effectElements;this.feFuncRComposed&&(e||n[3].p._mdf||n[4].p._mdf||n[5].p._mdf||n[6].p._mdf||n[7].p._mdf)&&(t=this.getTableValue(n[3].p.v,
10n[4].p.v,n[5].p.v,n[6].p.v,n[7].p.v),this.feFuncRComposed.setAttribute(`tableValues`,t),this.feFuncGComposed.setAttribute(`tableValues`,t),this.feFuncBComposed.setAttribute(`tableValues`,t)),this.feFuncR&&(e||n[10].p._mdf||n[11].p._mdf||n[12].p._mdf||n[13].p._mdf||n[14].p._mdf)&&(t=this.getTableValue(n[10].p.v,n[11].p.v,n[12].p.v,n[13].p.v,n[14].p.v),this.feFuncR.setAttribute(`tableValues`,t)),this.feFuncG&&(e||n[17].p._mdf||n[18].p._mdf||n[19].p._mdf||n[20].p._mdf||n[21].p._mdf)&&(t=this.getTableValue(n[17].p.v,n[18].p.v,n[19].p.v,n[20].p.v,n[21].p.v),this.feFuncG.setAttribute(`tableValues`,t)),this.feFuncB&&(e||n[24].p._mdf||n[25].p._mdf||n[26].p._mdf||n[27].p._mdf||n[28].p._mdf)&&(t=this.getTableValue(n[24].p.v,n[25].p.v,n[26].p.v,n[27].p.v,n[28].p.v),this.feFuncB.setAttribute(`tableValues`,t)),this.feFuncA&&(e||n[31].p._mdf||n[32].p._mdf||n[33].p._mdf||n[34].p._mdf||n[35].p._mdf)&&(t=this.getTableValue(n[31].p.v,n[32].p.v,n[33].p.v,n[34].p.v,n[35].p.v),this.feFuncA.setAttribute(`tableValues`,t))}};function SVGDropShadowEffect(e,t,n,r,i){var a=t.container.globalData.renderConfig.filterSize,o=t.data.fs||a;e.setAttribute(`x`,o.x||a.x),e.setAttribute(`y`,o.y||a.y),e.setAttribute(`width`,o.width||a.width),e.setAttribute(`height`,o.height||a.height),this.filterManager=t;var s=createNS(`feGaussianBlur`);s.setAttribute(`in`,`SourceAlpha`),s.setAttribute(`result`,r+`_drop_shadow_1`),s.setAttribute(`stdDeviation`,`0`),this.feGaussianBlur=s,e.appendChild(s);var c=createNS(`feOffset`);c.setAttribute(`dx`,`25`),c.setAttribute(`dy`,`0`),c.setAttribute(`in`,r+`_drop_shadow_1`),c.setAttribute(`result`,r+`_drop_shadow_2`),this.feOffset=c,e.appendChild(c);var l=createNS(`feFlood`);l.setAttribute(`flood-color`,`#00ff00`),l.setAttribute(`flood-opacity`,`1`),l.setAttribute(`result`,r+`_drop_shadow_3`),this.feFlood=l,e.appendChild(l);var u=createNS(`feComposite`);u.setAttribute(`in`,r+`_drop_shadow_3`),u.setAttribute(`in2`,r+`_drop_shadow_2`),u.setAttribute(`operator`,`in`),u.setAttribute(`result`,r+`_drop_shadow_4`),e.appendChild(u);var d=this.createMergeNode(r,[r+`_drop_shadow_4`,i]);e.appendChild(d)}extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){if((e||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute(`stdDeviation`,this.filterManager.effectElements[4].p.v/4),e||this.filterManager.effectElements[0].p._mdf){var t=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute(`flood-color`,rgbToHex(Math.round(t[0]*255),Math.round(t[1]*255),Math.round(t[2]*255)))}if((e||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute(`flood-opacity`,this.filterManager.effectElements[1].p.v/255),e||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var n=this.filterManager.effectElements[3].p.v,r=(this.filterManager.effectElements[2].p.v-90)*degToRads,i=n*Math.cos(r),a=n*Math.sin(r);this.feOffset.setAttribute(`dx`,i),this.feOffset.setAttribute(`dy`,a)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(e,t,n){this.initialized=!1,this.filterManager=t,this.filterElem=e,this.elem=n,n.matteElement=createNS(`g`),n.matteElement.appendChild(n.layerElement),n.matteElement.appendChild(n.transformedElement),n.baseElement=n.matteElement}SVGMatte3Effect.prototype.findSymbol=function(e){for(var t=0,n=_svgMatteSymbols.length;t<n;){if(_svgMatteSymbols[t]===e)return _svgMatteSymbols[t];t+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(e,t){var n=e.layerElement.parentNode;if(n){for(var r=n.children,i=0,a=r.length;i<a&&r[i]!==e.layerElement;)i+=1;var o;i<=a-2&&(o=r[i+1]);var s=createNS(`use`);s.setAttribute(`href`,`#`+t),o?n.insertBefore(s,o):n.appendChild(s)}},SVGMatte3Effect.prototype.setElementAsMask=function(e,t){if(!this.findSymbol(t)){var n=createElementID(),r=createNS(`mask`);r.setAttribute(`id`,t.layerId),r.setAttribute(`mask-type`,`alpha`),_svgMatteSymbols.push(t);var i=e.globalData.defs;i.appendChild(r);var a=createNS(`symbol`);a.setAttribute(`id`,n),this.replaceInParent(t,n),a.appendChild(t.layerElement),i.appendChild(a);var o=createNS(`use`);o.setAttribute(`href`,`#`+n),r.appendChild(o),t.data.hd=!1,t.show()}e.setMatte(t.layerId)},SVGMatte3Effect.prototype.initialize=function(){for(var e=this.filterManager.effectElements[0].p.v,t=this.elem.comp.elements,n=0,r=t.length;n<r;)t[n]&&t[n].data.ind===e&&this.setElementAsMask(this.elem,t[n]),n+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()};function SVGGaussianBlurEffect(e,t,n,r){e.setAttribute(`x`,`-100%`),e.setAttribute(`y`,`-100%`),e.setAttribute(`width`,`300%`),e.setAttribute(`height`,`300%`),this.filterManager=t;var i=createNS(`feGaussianBlur`);i.setAttribute(`result`,r),e.appendChild(i),this.feGaussianBlur=i}SVGGaussianBlurEffect.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[0].p.v*.3,n=this.filterManager.effectElements[1].p.v,r=n==3?0:t,i=n==2?0:t;this.feGaussianBlur.setAttribute(`stdDeviation`,r+` `+i);var a=this.filterManager.effectElements[2].p.v==1?`wrap`:`duplicate`;this.feGaussianBlur.setAttribute(`edgeMode`,a)}};function TransformEffect(){}TransformEffect.prototype.init=function(e){this.effectsManager=e,this.type=effectTypes.TRANSFORM_EFFECT,this.matrix=new Matrix,this.opacity=-1,this._mdf=!1,this._opMdf=!1},TransformEffect.prototype.renderFrame=function(e){if(this._opMdf=!1,this._mdf=!1,e||this.effectsManager._mdf){var t=this.effectsManager.effectElements,n=t[0].p.v,r=t[1].p.v,i=t[2].p.v===1,a=t[3].p.v,o=i?a:t[4].p.v,s=t[5].p.v,c=t[6].p.v,l=t[7].p.v;this.matrix.reset(),this.matrix.translate(-n[0],-n[1],n[2]),this.matrix.scale(o*.01,a*.01,1),this.matrix.rotate(-l*degToRads),this.matrix.skewFromAxis(-s*degToRads,(c+90)*degToRads),this.matrix.translate(r[0],r[1],0),this._mdf=!0,this.opacity!==t[8].p.v&&(this.opacity=t[8].p.v,this._opMdf=!0)}};function SVGTransformEffect(e,t){this.init(t)}extendPrototype([TransformEffect],SVGTransformEffect);function CVTransformEffect(e){this.init(e)}return extendPrototype([TransformEffect],CVTransformEffect),registerRenderer(`canvas`,CanvasRenderer),registerRenderer(`html`,HybridRenderer),registerRenderer(`svg`,SVGRenderer),ShapeModifiers.registerModifier(`tm`,TrimModifier),ShapeModifiers.registerModifier(`pb`,PuckerAndBloatModifier),ShapeModifiers.registerModifier(`rp`,RepeaterModifier),ShapeModifiers.registerModifier(`rd`,RoundCornersModifier),ShapeModifiers.registerModifier(`zz`,ZigZagModifier),ShapeModifiers.registerModifier(`op`,OffsetPathModifier),setExpressionsPlugin(Expressions),setExpressionInterfaces(getInterface),initialize$1(),initialize(),registerEffect$1(20,SVGTintFilter,!0),registerEffect$1(21,SVGFillFilter,!0),registerEffect$1(22,SVGStrokeEffect,!1),registerEffect$1(23,SVGTritoneFilter,!0),registerEffect$1(24,SVGProLevelsFilter,!0),registerEffect$1(25,SVGDropShadowEffect,!0),registerEffect$1(28,SVGMatte3Effect,!1),registerEffect$1(29,SVGGaussianBlurEffect,!0),registerEffect$1(35,SVGTransformEffect,!1),registerEffect(35,CVTransformEffect),lottie}))})),import_lottie=__toESM(require_lottie(),1),version=`1.3.23`;function clamp$1(e,t,n){return Math.max(e,Math.min(t,n))}function lerp$1(e,t,n){return(1-n)*e+n*t}function damp(e,t,n,r){return lerp$1(e,t,1-Math.exp(-n*r))}function modulo(e,t){return(e%t+t)%t}var Animate=class{isRunning=!1;value=0;from=0;to=0;currentTime=0;lerp;duration;easing;onUpdate;advance(e){if(!this.isRunning)return;let t=!1;if(this.duration&&this.easing){this.currentTime+=e;let n=clamp$1(0,this.currentTime/this.duration,1);t=n>=1;let r=t?1:this.easing(n);this.value=this.from+(this.to-this.from)*r}else this.lerp?(this.value=damp(this.value,this.to,this.lerp*60,e),Math.round(this.value)===Math.round(this.to)&&(this.value=this.to,t=!0)):(this.value=this.to,t=!0);t&&this.stop(),this.onUpdate?.(this.value,t)}stop(){this.isRunning=!1}fromTo(e,t,{lerp:n,duration:r,easing:i,onStart:a,onUpdate:o}){this.from=this.value=e,this.to=t,this.lerp=n,this.duration=r,this.easing=i,this.currentTime=0,this.isRunning=!0,a?.(),this.onUpdate=o}};function debounce(e,t){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>{n=void 0,e.apply(this,r)},t)}}var Dimensions=class{width=0;height=0;scrollHeight=0;scrollWidth=0;debouncedResize;wrapperResizeObserver;contentResizeObserver;constructor(e,t,{autoResize:n=!0,debounce:r=250}={}){this.wrapper=e,this.content=t,n&&(this.debouncedResize=debounce(this.resize,r),this.wrapper instanceof Window?window.addEventListener(`resize`,this.debouncedResize):(this.wrapperResizeObserver=new ResizeObserver(this.debouncedResize),this.wrapperResizeObserver.observe(this.wrapper)),this.contentResizeObserver=new ResizeObserver(this.debouncedResize),this.contentResizeObserver.observe(this.content)),this.resize()}destroy(){this.wrapperResizeObserver?.disconnect(),this.contentResizeObserver?.disconnect(),this.wrapper===window&&this.debouncedResize&&window.removeEventListener(`resize`,this.debouncedResize)}resize=()=>{this.onWrapperResize(),this.onContentResize()};onWrapperResize=()=>{this.wrapper instanceof Window?(this.width=window.innerWidth,this.height=window.innerHeight):(this.width=this.wrapper.clientWidth,this.height=this.wrapper.clientHeight)};onContentResize=()=>{this.wrapper instanceof Window?(this.scrollHeight=this.content.scrollHeight,this.scrollWidth=this.content.scrollWidth):(this.scrollHeight=this.wrapper.scrollHeight,this.scrollWidth=this.wrapper.scrollWidth)};get limit(){return{x:this.scrollWidth-this.width,y:this.scrollHeight-this.height}}},Emitter=class{events={};emit(e,...t){let n=this.events[e]||[];for(let e=0,r=n.length;e<r;e++)n[e]?.(...t)}on(e,t){return this.events[e]?this.events[e].push(t):this.events[e]=[t],()=>{this.events[e]=this.events[e]?.filter(e=>t!==e)}}off(e,t){this.events[e]=this.events[e]?.filter(e=>t!==e)}destroy(){this.events={}}},LINE_HEIGHT=100/6,listenerOptions={passive:!1};function getDeltaMultiplier(e,t){return e===1?LINE_HEIGHT:e===2?t:1}var VirtualScroll=class{touchStart={x:0,y:0};lastDelta={x:0,y:0};window={width:0,height:0};emitter=new Emitter;constructor(e,t={wheelMultiplier:1,touchMultiplier:1}){this.element=e,this.options=t,window.addEventListener(`resize`,this.onWindowResize),this.onWindowResize(),this.element.addEventListener(`wheel`,this.onWheel,listenerOptions),this.element.addEventListener(`touchstart`,this.onTouchStart,listenerOptions),this.element.addEventListener(`touchmove`,this.onTouchMove,listenerOptions),this.element.addEventListener(`touchend`,this.onTouchEnd,listenerOptions)}on(e,t){return this.emitter.on(e,t)}destroy(){this.emitter.destroy(),window.removeEventListener(`resize`,this.onWindowResize),this.element.removeEventListener(`wheel`,this.onWheel,listenerOptions),this.element.removeEventListener(`touchstart`,this.onTouchStart,listenerOptions),this.element.removeEventListener(`touchmove`,this.onTouchMove,listenerOptions),this.element.removeEventListener(`touchend`,this.onTouchEnd,listenerOptions)}onTouchStart=e=>{let{clientX:t,clientY:n}=e.targetTouches?e.targetTouches[0]:e;this.touchStart.x=t,this.touchStart.y=n,this.lastDelta={x:0,y:0},this.emitter.emit(`scroll`,{deltaX:0,deltaY:0,event:e})};onTouchMove=e=>{let{clientX:t,clientY:n}=e.targetTouches?e.targetTouches[0]:e,r=-(t-this.touchStart.x)*this.options.touchMultiplier,i=-(n-this.touchStart.y)*this.options.touchMultiplier;this.touchStart.x=t,this.touchStart.y=n,this.lastDelta={x:r,y:i},this.emitter.emit(`scroll`,{deltaX:r,deltaY:i,event:e})};onTouchEnd=e=>{this.emitter.emit(`scroll`,{deltaX:this.lastDelta.x,deltaY:this.lastDelta.y,event:e})};onWheel=e=>{let{deltaX:t,deltaY:n,deltaMode:r}=e,i=getDeltaMultiplier(r,this.window.width),a=getDeltaMultiplier(r,this.window.height);t*=i,n*=a,t*=this.options.wheelMultiplier,n*=this.options.wheelMultiplier,this.emitter.emit(`scroll`,{deltaX:t,deltaY:n,event:e})};onWindowResize=()=>{this.window={width:window.innerWidth,height:window.innerHeight}}},defaultEasing=e=>Math.min(1,1.001-2**(-10*e)),Lenis=class{_isScrolling=!1;_isStopped=!1;_isLocked=!1;_preventNextNativeScrollEvent=!1;_resetVelocityTimeout=null;_rafId=null;isTouching;time=0;userData={};lastVelocity=0;velocity=0;direction=0;options;targetScroll;animatedScroll;animate=new Animate;emitter=new Emitter;dimensions;virtualScroll;constructor({wrapper:e=window,content:t=document.documentElement,eventsTarget:n=e,smoothWheel:r=!0,syncTouch:i=!1,syncTouchLerp:a=.075,touchInertiaExponent:o=1.7,duration:s,easing:c,lerp:l=.1,infinite:u=!1,orientation:d=`vertical`,gestureOrientation:f=d===`horizontal`?`both`:`vertical`,touchMultiplier:p=1,wheelMultiplier:m=1,autoResize:g=!0,prevent:_,virtualScroll:y,overscroll:b=!0,autoRaf:x=!1,anchors:S=!1,autoToggle:C=!1,allowNestedScroll:T=!1,__experimental__naiveDimensions:E=!1,naiveDimensions:D=E,stopInertiaOnNavigate:O=!1}={}){window.lenisVersion=version,window.lenis||(window.lenis={}),window.lenis.version=version,d===`horizontal`&&(window.lenis.horizontal=!0),i===!0&&(window.lenis.touch=!0),(!e||e===document.documentElement)&&(e=window),typeof s==`
10number`&&typeof c!=`function`?c=defaultEasing:typeof c==`function`&&typeof s!=`number`&&(s=1),this.options={wrapper:e,content:t,eventsTarget:n,smoothWheel:r,syncTouch:i,syncTouchLerp:a,touchInertiaExponent:o,duration:s,easing:c,lerp:l,infinite:u,gestureOrientation:f,orientation:d,touchMultiplier:p,wheelMultiplier:m,autoResize:g,prevent:_,virtualScroll:y,overscroll:b,autoRaf:x,anchors:S,autoToggle:C,allowNestedScroll:T,naiveDimensions:D,stopInertiaOnNavigate:O},this.dimensions=new Dimensions(e,t,{autoResize:g}),this.updateClassName(),this.targetScroll=this.animatedScroll=this.actualScroll,this.options.wrapper.addEventListener(`scroll`,this.onNativeScroll),this.options.wrapper.addEventListener(`scrollend`,this.onScrollEnd,{capture:!0}),(this.options.anchors||this.options.stopInertiaOnNavigate)&&this.options.wrapper.addEventListener(`click`,this.onClick),this.options.wrapper.addEventListener(`pointerdown`,this.onPointerDown),this.virtualScroll=new VirtualScroll(n,{touchMultiplier:p,wheelMultiplier:m}),this.virtualScroll.on(`scroll`,this.onVirtualScroll),this.options.autoToggle&&(this.checkOverflow(),this.rootElement.addEventListener(`transitionend`,this.onTransitionEnd)),this.options.autoRaf&&(this._rafId=requestAnimationFrame(this.raf))}destroy(){this.emitter.destroy(),this.options.wrapper.removeEventListener(`scroll`,this.onNativeScroll),this.options.wrapper.removeEventListener(`scrollend`,this.onScrollEnd,{capture:!0}),this.options.wrapper.removeEventListener(`pointerdown`,this.onPointerDown),(this.options.anchors||this.options.stopInertiaOnNavigate)&&this.options.wrapper.removeEventListener(`click`,this.onClick),this.virtualScroll.destroy(),this.dimensions.destroy(),this.cleanUpClassName(),this._rafId&&cancelAnimationFrame(this._rafId)}on(e,t){return this.emitter.on(e,t)}off(e,t){return this.emitter.off(e,t)}onScrollEnd=e=>{e instanceof CustomEvent||(this.isScrolling===`smooth`||this.isScrolling===!1)&&e.stopPropagation()};dispatchScrollendEvent=()=>{this.options.wrapper.dispatchEvent(new CustomEvent(`scrollend`,{bubbles:this.options.wrapper===window,detail:{lenisScrollEnd:!0}}))};get overflow(){let e=this.isHorizontal?`overflow-x`:`overflow-y`;return getComputedStyle(this.rootElement)[e]}checkOverflow(){[`hidden`,`clip`].includes(this.overflow)?this.internalStop():this.internalStart()}onTransitionEnd=e=>{e.propertyName?.includes(`overflow`)&&e.target===this.rootElement&&this.checkOverflow()};setScroll(e){this.isHorizontal?this.options.wrapper.scrollTo({left:e,behavior:`instant`}):this.options.wrapper.scrollTo({top:e,behavior:`instant`})}onClick=e=>{let t=e.composedPath().filter(e=>e instanceof HTMLAnchorElement&&e.href).map(e=>new URL(e.href)),n=new URL(window.location.href);if(this.options.anchors){let e=t.find(e=>n.host===e.host&&n.pathname===e.pathname&&e.hash);if(e){let t=typeof this.options.anchors==`object`&&this.options.anchors?this.options.anchors:void 0,n=`#${e.hash.split(`#`)[1]}`;this.scrollTo(n,t);return}}if(this.options.stopInertiaOnNavigate&&t.some(e=>n.host===e.host&&n.pathname!==e.pathname)){this.reset();return}};onPointerDown=e=>{e.button===1&&this.reset()};onVirtualScroll=e=>{if(typeof this.options.virtualScroll==`function`&&this.options.virtualScroll(e)===!1)return;let{deltaX:t,deltaY:n,event:r}=e;if(this.emitter.emit(`virtual-scroll`,{deltaX:t,deltaY:n,event:r}),r.ctrlKey||r.lenisStopPropagation)return;let i=r.type.includes(`touch`),a=r.type.includes(`wheel`);this.isTouching=r.type===`touchstart`||r.type===`touchmove`;let o=t===0&&n===0;if(this.options.syncTouch&&i&&r.type===`touchstart`&&o&&!this.isStopped&&!this.isLocked){this.reset();return}let s=this.options.gestureOrientation===`vertical`&&n===0||this.options.gestureOrientation===`horizontal`&&t===0;if(o||s)return;let c=r.composedPath();c=c.slice(0,c.indexOf(this.rootElement));let l=this.options.prevent,u=Math.abs(t)>=Math.abs(n)?`horizontal`:`vertical`;if(c.find(e=>e instanceof HTMLElement&&(typeof l==`function`&&l?.(e)||e.hasAttribute?.(`data-lenis-prevent`)||u===`vertical`&&e.hasAttribute?.(`data-lenis-prevent-vertical`)||u===`horizontal`&&e.hasAttribute?.(`data-lenis-prevent-horizontal`)||i&&e.hasAttribute?.(`data-lenis-prevent-touch`)||a&&e.hasAttribute?.(`data-lenis-prevent-wheel`)||this.options.allowNestedScroll&&this.hasNestedScroll(e,{deltaX:t,deltaY:n}))))return;if(this.isStopped||this.isLocked){r.cancelable&&r.preventDefault();return}if(!(this.options.syncTouch&&i||this.options.smoothWheel&&a)){this.isScrolling=`native`,this.animate.stop(),r.lenisStopPropagation=!0;return}let d=n;this.options.gestureOrientation===`both`?d=Math.abs(n)>Math.abs(t)?n:t:this.options.gestureOrientation===`horizontal`&&(d=t),(!this.options.overscroll||this.options.infinite||this.options.wrapper!==window&&this.limit>0&&(this.animatedScroll>0&&this.animatedScroll<this.limit||this.animatedScroll===0&&n>0||this.animatedScroll===this.limit&&n<0))&&(r.lenisStopPropagation=!0),r.cancelable&&r.preventDefault();let f=i&&this.options.syncTouch,p=i&&r.type===`touchend`;p&&(d=Math.sign(d)*Math.abs(this.velocity)**this.options.touchInertiaExponent),this.scrollTo(this.targetScroll+d,{programmatic:!1,...f?{lerp:p?this.options.syncTouchLerp:1}:{lerp:this.options.lerp,duration:this.options.duration,easing:this.options.easing}})};resize(){this.dimensions.resize(),this.animatedScroll=this.targetScroll=this.actualScroll,this.emit
vendor: 6,474 bytes, line 10
10()}emit(){this.emitter.emit(`scroll`,this)}onNativeScroll=()=>{if(this._resetVelocityTimeout!==null&&(clearTimeout(this._resetVelocityTimeout),this._resetVelocityTimeout=null),this._preventNextNativeScrollEvent){this._preventNextNativeScrollEvent=!1;return}if(this.isScrolling===!1||this.isScrolling===`native`){let e=this.animatedScroll;this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity,this.velocity=this.animatedScroll-e,this.direction=Math.sign(this.animatedScroll-e),this.isStopped||(this.isScrolling=`native`),this.emit(),this.velocity!==0&&(this._resetVelocityTimeout=setTimeout(()=>{this.lastVelocity=this.velocity,this.velocity=0,this.isScrolling=!1,this.emit()},400))}};reset(){this.isLocked=!1,this.isScrolling=!1,this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity=0,this.animate.stop()}start(){if(this.isStopped){if(this.options.autoToggle){this.rootElement.style.removeProperty(`overflow`);return}this.internalStart()}}internalStart(){this.isStopped&&(this.reset(),this.isStopped=!1,this.emit())}stop(){if(!this.isStopped){if(this.options.autoToggle){this.rootElement.style.setProperty(`overflow`,`clip`);return}this.internalStop()}}internalStop(){this.isStopped||(this.reset(),this.isStopped=!0,this.emit())}raf=e=>{let t=e-(this.time||e);this.time=e,this.animate.advance(t*.001),this.options.autoRaf&&(this._rafId=requestAnimationFrame(this.raf))};scrollTo(e,{offset:t=0,immediate:n=!1,lock:r=!1,programmatic:i=!0,lerp:a=i?this.options.lerp:void 0,duration:o=i?this.options.duration:void 0,easing:s=i?this.options.easing:void 0,onStart:c,onComplete:l,force:u=!1,userData:d}={}){if((this.isStopped||this.isLocked)&&!u)return;let f=e,p=t;if(typeof f==`string`&&[`top`,`left`,`start`,`#`].includes(f))f=0;else if(typeof f==`string`&&[`bottom`,`right`,`end`].includes(f))f=this.limit;else{let e=null;if(typeof f==`string`?(e=document.querySelector(f),e||(f===`#top`?f=0:console.warn(`Lenis: Target not found`,f))):f instanceof HTMLElement&&f?.nodeType&&(e=f),e){if(this.options.wrapper!==window){let e=this.rootElement.getBoundingClientRect();p-=this.isHorizontal?e.left:e.top}let t=e.getBoundingClientRect(),n=getComputedStyle(e),r=this.isHorizontal?Number.parseFloat(n.scrollMarginLeft):Number.parseFloat(n.scrollMarginTop),i=getComputedStyle(this.rootElement),a=this.isHorizontal?Number.parseFloat(i.scrollPaddingLeft):Number.parseFloat(i.scrollPaddingTop);f=(this.isHorizontal?t.left:t.top)+this.animatedScroll-(Number.isNaN(r)?0:r)-(Number.isNaN(a)?0:a)}}if(typeof f==`number`){if(f+=p,this.options.infinite){if(i){this.targetScroll=this.animatedScroll=this.scroll;let e=f-this.animatedScroll;e>this.limit/2?f-=this.limit:e<-this.limit/2&&(f+=this.limit)}}else f=clamp$1(0,f,this.limit);if(f===this.targetScroll){c?.(this),l?.(this);return}if(this.userData=d??{},n){this.animatedScroll=this.targetScroll=f,this.setScroll(this.scroll),this.reset(),this.preventNextNativeScrollEvent(),this.emit(),l?.(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()});return}i||(this.targetScroll=f),typeof o==`number`&&typeof s!=`function`?s=defaultEasing:typeof s==`function`&&typeof o!=`number`&&(o=1),this.animate.fromTo(this.animatedScroll,f,{duration:o,easing:s,lerp:a,onStart:()=>{r&&(this.isLocked=!0),this.isScrolling=`smooth`,c?.(this)},onUpdate:(e,t)=>{this.isScrolling=`smooth`,this.lastVelocity=this.velocity,this.velocity=e-this.animatedScroll,this.direction=Math.sign(this.velocity),this.animatedScroll=e,this.setScroll(this.scroll),i&&(this.targetScroll=e),t||this.emit(),t&&(this.reset(),this.emit(),l?.(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()}),this.preventNextNativeScrollEvent())}})}}preventNextNativeScrollEvent(){this._preventNextNativeScrollEvent=!0,requestAnimationFrame(()=>{this._preventNextNativeScrollEvent=!1})}hasNestedScroll(e,{deltaX:t,deltaY:n}){let r=Date.now();e._lenis||={};let i=e._lenis,a,o,s,c,l,u,d,f,p,m;if(r-(i.time??0)>2e3){i.time=Date.now();let t=window.getComputedStyle(e);if(i.computedStyle=t,a=[`auto`,`overlay`,`scroll`].includes(t.overflowX),o=[`auto`,`overlay`,`scroll`].includes(t.overflowY),l=[`auto`].includes(t.overscrollBehaviorX),u=[`auto`].includes(t.overscrollBehaviorY),i.hasOverflowX=a,i.hasOverflowY=o,!(a||o))return!1;d=e.scrollWidth,f=e.scrollHeight,p=e.clientWidth,m=e.clientHeight,s=d>p,c=f>m,i.isScrollableX=s,i.isScrollableY=c,i.scrollWidth=d,i.scrollHeight=f,i.clientWidth=p,i.clientHeight=m,i.hasOverscrollBehaviorX=l,i.hasOverscrollBehaviorY=u}else s=i.isScrollableX,c=i.isScrollableY,a=i.hasOverflowX,o=i.hasOverflowY,d=i.scrollWidth,f=i.scrollHeight,p=i.clientWidth,m=i.clientHeight,l=i.hasOverscrollBehaviorX,u=i.hasOverscrollBehaviorY;if(!(a&&s||o&&c))return!1;let g=Math.abs(t)>=Math.abs(n)?`horizontal`:`vertical`,_,y,b,x,S,C;if(g===`horizontal`)_=Math.round(e.scrollLeft),y=d-p,b=t,x=a,S=s,C=l;else if(g===`vertical`)_=Math.round(e.scrollTop),y=f-m,b=n,x=o,S=c,C=u;else return!1;return!C&&(_>=y||_<=0)?!0:(b>0?_<y:_>0)&&x&&S}get rootElement(){return this.options.wrapper===window?document.documentElement:this.options.wrapper}get limit(){return this.options.naiveDimensions?this.isHorizontal?this.rootElement.scrollWidth-this.rootElement.clientWidth:this.rootElement.scrollHeight-this.rootElement.clientHeight:this.dimensions.limit[this.isHorizontal?`x`:`y`]}get isHorizontal(){return this.options.orientation===`horizontal`}get actualScroll(){let e=this.options.wrapper;return this.isHorizontal?e.scrollX??e.scrollLeft:e.scrollY??e.scrollTop}get scroll(){return this.options.infinite?modulo(this.animatedScroll,this.limit):this.animatedScroll}get progress(){return this.limit===0?1:this.scroll/this.limit}get isScrolling(){return this._isScrolling}set isScrolling(e){this._isScrolling!==e&&(this._isScrolling=e,this.updateClassName())}get isStopped(){return this._isStopped}set isStopped(e){this._isStopped!==e&&(this._isStopped=e,this.updateClassName())}get isLocked(){return this._isLocked}set isLocked(e){this._isLocked!==e&&(this._isLocked=e,this.updateClassName())}get isSmooth(){return this.isScrolling===`smooth`}get className(){let e=`lenis`;return this.options.autoToggle&&(e+=` lenis-autoToggle`),this.isStopped&&(e+=` lenis-stopped`),this.isLocked&&(e+=` lenis-locked`),this.isScrolling&&(e+=` lenis-scrolling`),this.isScrolling===`smooth`&&(e+=` lenis-smooth`),e}updateClassName(){this.cleanUpClassName(),this.className.split(` `).forEach(e
10=>{this.rootElement.classList.add(e)})}cleanUpClassName(){for(let e of Array.from(this.rootElement.classList))(e===`lenis`||e.startsWith(`lenis-`))&&this.rootElement.classList.remove(e)}},anywhere_default=``+new URL(`anywhere-4z0wicQl.png`,import.meta.url).href;gsapWithCSS$1.registerPlugin(ScrollTrigger),document.addEventListener(`DOMContentLoaded`,()=>{let e=document.querySelector(`.pic-animation`);if(!e)return;let t=document.createElement(`img`);t.src=anywhere_default,t.alt=`Anywhere Viaggi`,t.className=`pic-anim-img`,e.appendChild(t),gsapWithCSS$1.set(t,{borderRadius:`32px`,width:`100%`,height:`100%`,maxWidth:`1400px`,maxHeight:`90vh`,clipPath:`inset(15% 10% 15% 10% round 32px)`,display:`block`,margin:`0 auto`,zIndex:2,objectFit:`cover`,aspectRatio:`16/9`}),gsapWithCSS$1.to(t,{borderRadius:`32px`,clipPath:`inset(0% round 32px)`,ease:`power2.out`,scrollTrigger:{trigger:t,start:`top 80%`,end:`center center`,scrub:1}})});var require_iodine_min=__commonJSMin(((e,t)=>{var n=class e{constructor(){this.locale=void 0,this.messages={after:`The date must be after: '[PARAM]'`,afterOrEqual:`The date must be after or equal to: '[PARAM]'`,array:`[FIELD] must be an array`,before:`The date must be before: '[PARAM]'`,beforeOrEqual:`The date must be before or equal to: '[PARAM]'`,boolean:`[FIELD] must be true or false`,date:`[FIELD] must be a date`,different:`[FIELD] must be different to '[PARAM]'`,endsWith:`[FIELD] must end with '[PARAM]'`,email:`[FIELD] must be a valid email address`,falsy:`[FIELD] must be a falsy value (false, 'false', 0 or '0')`,in:`[FIELD] must be one of the following options: [PARAM]`,integer:`[FIELD] must be an integer`,json:`[FIELD] must be a parsable JSON object string`,max:`[FIELD] must be less than or equal to [PARAM]`,min:`[FIELD] must be greater than or equal to [PARAM]`,maxLength:`[FIELD] must not be greater than '[PARAM]' in character length`,minLength:`[FIELD] must not be less than '[PARAM]' character length`,notIn:`[FIELD] must not be one of the following options: [PARAM]`,numeric:`[FIELD] must be numeric`,optional:`[FIELD] is optional`,regexMatch:`[FIELD] must satisify the regular expression: [PARAM]`,required:`[FIELD] must be present`,same:`[FIELD] must be '[PARAM]'`,startsWith:`[FIELD] must start with '[PARAM]'`,string:`[FIELD] must be a string`,truthy:`[FIELD] must be a truthy value (true, 'true', 1 or '1')`,url:`[FIELD] must be a valid url`,uuid:`[FIELD] must be a valid UUID`}}_compare(e,t,n,r=!1){return!!this.assertDate(e)&&!(!this.assertDate(t)&&!this.assertInteger(t))&&(t=typeof t==`number`?t:t.getTime(),n===`less`&&r?e.getTime()<=t:n!==`less`||r?n===`more`&&r?e.getTime()>=t:n!==`more`||r?void 0:e.getTime()>t:e.getTime()<t)}_error(e,t=void 0){let{param:n,field:r}=typeof t==`object`?t:{param:t,field:void 0},i=e.split(`:`),a=i.shift();n||=i.join(`:`),[`after`,`afterOrEqual`,`before`,`beforeOrEqual`].includes(a)&&(n=new Date(parseInt(n)).toLocaleTimeString(this.locale,{year:`numeric`,month:`short`,day:`numeric`,hour:`2-digit`,minute:`numeric`,hour12:!1}));let o=[null,void 0,``].includes(n)?this.messages[a]:this.messages[a].replace(`[PARAM]`,n);return[null,void 0,``].includes(r)?o.replace(`[FIELD]`,this.default_field_name||`Value`):o.replace(`[FIELD]`,r)}_missing(){return{valid:!1,rule:`None`,error:`Rules exist, but no value was provided to check`}}_prepare(e,t=[]){return t.length?t[0]===`optional`&&this.assertOptional(e)?[]:t.filter(e=>e!==`optional`).map(e=>typeof e==`string`?[e,this._title(e.split(`:`).shift()),e.split(`:`).slice(1).join(`:`)]:[`${e.rule}:${e.param}`,this._title(e.rule),e.param]):[]}_title(e){return`${e[0].toUpperCase()}${e.slice(1)}`}_validate(e,t,n=null){for(let r in t=this._prepare(e,t))if(!this[`assert${t[r][1]}`].apply(this,[e,t[r][2]]))return{valid:!1,rule:t[r][0],error:n?n[t[r][0]]:this._error(t[r][0])};return{valid:!0,rule:``,error:``}}assert(e,t,n=null){if(Array.isArray(t))return this._validate(e,t,n);let r=Object.keys(t),i={valid:!0,fields:{}};for(let a=0;a<r.length;a++)i.fields[r[a]]=e.hasOwnProperty(r[a])?this._validate(e[r[a]],t[r[a]],n==null?null:n[r[a]]):this._missing(),i.fields[r[a]].valid||(i.valid=!1);return i}assertAfter(e,t){return this._compare(e,t,`more`,!1)}assertAfterOrEqual(e,t){return this._compare(e,t,`more`,!0)}assertArray(e){return Array.isArray(e)}assertBefore(e,t){return this._compare(e,t,`less`,!1)}assertBeforeOrEqual(e,t){return this._compare(e,t,`less`,!0)}
10assertBoolean(e){return[!0,!1].includes(e)}assertDate(e){return e&&Object.prototype.toString.call(e)===`[object Date]`&&!isNaN(e)}assertDifferent(e,t){return e!=t}assertEndsWith(e,t){return this.assertString(e)&&e.endsWith(t)}assertEmail(e){return RegExp("^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$").test(String(e).toLowerCase())}assertFalsy(e){return[0,`0`,!1,`false`].includes(e)}assertIn(e,t){return(typeof t==`string`?t.split(`,`):t).includes(e)}assertInteger(e){return Number.isInteger(e)&&parseInt(e).toString()===e.toString()}assertJson(e){try{return typeof JSON.parse(e)==`object`}catch{return!1}}assertMax(e,t){return parseFloat(e)<=t}assertMin(e,t){return parseFloat(e)>=t}assertMaxLength(e,t){return typeof e==`string`&&e.length<=t}assertMinLength(e,t){return typeof e==`string`&&e.length>=t}assertNotIn(e,t){return!this.assertIn(e,t)}assertNumeric(e){return!isNaN(parseFloat(e))&&isFinite(e)}assertOptional(e){return[null,void 0,``].includes(e)}assertRegexMatch(e,t){return new RegExp(t).test(String(e))}assertRequired(e){return!this.assertOptional(e)}assertSame(e,t){return e==t}assertStartsWith(e,t){return this.assertString(e)&&e.startsWith(t)}assertString(e){return typeof e==`string`}assertTruthy(e){return[1,`1`,!0,`true`].includes(e)}assertUrl(e){return RegExp(`^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$`).test(String(e).toLowerCase())}assertUuid(e){return RegExp(`^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$`).test(String(e).toLowerCase())}rule(t,n){e.prototype[`assert${this._title(t)}`]=n}setErrorMessages(e){this.messages=e}setErrorMessage(e,t){this.messages[e]=t}setLocale(e){this.locale=e}setDefaultFieldName(e){this.default_field_name=e}};typeof window<`u`&&(window.Iodine=new n),t.exports=n})),import_iodine_min=__toESM(require_iodine_min(),1),gsapWithCSS=gsap$2.registerPlugin(CSSPlugin)||gsap$2,TweenMaxWithCSS=gsapWithCSS.core.Tween,v$1=`5.9.6`,fr$1=25,ip$1=0,op$1=26,w$1=200,h$1=200,nm$1=`Composizione 1`,ddd$1=0,assets$1=[],layers$1=[{ddd:0,ind:1,ty:4,nm:`Livello forma 1`,sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[95.25,107.25,0],ix:2,l:2},a:{a:0,k:[0,0,0],ix:1,l:2},s:{a:0,k:[100,100,100],ix:6,l:2}},ao:0,shapes:[{ty:`gr`,it:[{ind:0,ty:`sh`,ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0]],v:[[-79.5,-6.5],[-9,64],[89,-78.5]],c:!1},ix:2},nm:`Tracciato 1`,mn:`ADBE Vector Shape - Group`,hd:!1},{ty:`tm`,s:{a:0,k:0,ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:0,s:[0]},{t:25,s:[98.819]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:`Taglia tracciati 1`,mn:`ADBE Vector Filter - Trim`,hd:!1},{ty:`st`,c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:10,ix:5},lc:1,lj:1,ml:4,bm:0,nm:`Traccia 1`,mn:`ADBE Vector Graphic - Stroke`,hd:!1},{ty:`tr`,p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:`Trasformazione`}],nm:`Forma 1`,np:4,cix:2,bm:0,ix:1,mn:`ADBE Vector Group`,hd:!1}],ip:0,op:75,st:0,ct:1,bm:0}],markers$1=[],check_form_default={v:v$1,fr:25,ip:0,op:26,w:200,h:200,nm:nm$1,ddd:0,assets:assets$1,layers:layers$1,markers:markers$1};document.addEventListener(`DOMContentLoaded`,function(){let e=document.querySelectorAll(`.service-card span`),t=document.getElementById(`contatti`),n=document.getElementById(`message`);e.length&&t&&n&&e.forEach(e=>{e.style.cursor=`pointer`,e.addEventListener(`click`,function(){t.scrollIntoView({behavior:`smooth`}),n.value=e.textContent.trim()+` 11`,n.focus()})})});var instance=new import_iodine_min.default,cf=document.querySelector(`#js--contact-form`),resp=document.querySelector(`#js--contact-form-response`),respTxt=document.querySelector(`#js--contact-form-response-text`);if(cf){let e={name:[`required`,`string`,`minLength:3`,`maxLength:255`],surname:[`required`,`string`,`minLength:3`,`maxLength:255`],email:[`required`,`string`,`minLength:6`,`maxLength:150`,`email`],telefono:[`optional`,`numeric`,`minLength:7`,`maxLength:20`],message:[`required`,`string`,`minLength:3`]};cf.addEventListener(`submit`,function(t){t.preventDefault();let n=!0;
11cf.querySelectorAll(`.form-control`).forEach(e=>{e.classList.remove(`input-error`)}),cf.querySelectorAll(`span.message`).forEach(e=>{e.classList.add(`d-none`),e.textContent=``});for(let t in e){let r=cf.querySelector(`#`+t),i=r&&r.nextElementSibling;(!i||!i.classList.contains(`message`))&&(i=cf.querySelector(`#${t} ~ .message`));let a=instance.assert(r?r.value:``,e[t]);a.valid||(n=!1,r&&r.classList.add(`input-error`),i&&(i.classList.remove(`d-none`),a.errors&&Array.isArray(a.errors)&&a.errors.some(e=>e.rule===`required`)?i.textContent=`Campo obbligatorio`:a.errors&&Array.isArray(a.errors)&&a.errors.some(e=>e.rule===`numeric`)?i.textContent=`Inserisci solo numeri`:a.errors&&Array.isArray(a.errors)&&a.errors.length>0?i.textContent=a.errors[0].message||`Valore non valido`:i.textContent=`Valore non valido`))}n&&axios.post(`https://www.bluemilk.it/api/api-contatto-bluemilk`,{name:cf.querySelector(`input[name="name"]`).value,surname:cf.querySelector(`input[name="surname"]`).value,phone:cf.querySelector(`input[name="telefono"]`).value,email:cf.querySelector(`input[name="email"]`).value,message:cf.querySelector(`textarea[name="message"]`).value}).then(e=>{cf.querySelector(`input[name="name"]`).value=``,cf.querySelector(`input[name="surname"]`).value=``,cf.querySelector(`input[name="email"]`).value=``,cf.querySelector(`input[name="telefono"]`).value=``,cf.querySelector(`textarea[name="message"]`).value=``;let t=document.getElementById(`js--contact-form-response-icon`);t.innerHTML=``,t.style.display=`block`;let n=window.lottie.loadAnimation({container:t,renderer:`svg`,loop:!1,autoplay:!0,animationData:check_form_default});respTxt.innerHTML=`Messaggio inviato!`,resp.removeAttribute(`hidden`),gsapWithCSS.timeline().to(resp,.001,{display:`flex`}).to(resp,.3,{autoAlpha:1}).to(resp,.5,{autoAlpha:0},`+=3s`).to(resp,.001,{display:`none`}).add(()=>{resp.setAttribute(`hidden`,``)}).eventCallback(`onComplete`,()=>{n.destroy(),t.style.display=`none`,t.innerHTML=``})}).catch(e=>{let t=`<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><polygon points="24,4 44,44 4,44" fill="#dc3545"/><text x="24" y="34" text-anchor="middle" font-size="28" fill="#fff" font-family="Arial" font-weight="bold">!</text></svg>`;document.getElementById(`js--contact-form-response-icon`).innerHTML=`<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><polygon points="24,4 44,44 4,44" fill="#dc3545"/><text x="24" y="34" text-anchor="middle" font-size="28" fill="#fff" font-family="Arial" font-weight="bold">!</text></svg>`,document.getElementById(`js--contact-form-response-icon`).style.display=`block`,respTxt.innerHTML=`Non è stato possibile inviare il messaggio`,resp.removeAttribute(`hidden`),gsapWithCSS.timeline().to(resp,.001,{display:`flex`}).to(resp,.3,{autoAlpha:1}).to(resp,.5,{autoAlpha:0},`+=3s`).to(resp,.001,{display:`none`}).add(()=>{resp.setAttribute(`hidden`,``)}).eventCallback(`onComplete`,()=>{document.getElementById(`js--contact-form-response-icon`).style.display=`none`}),console.log(e)})})}var v=`5.9.0`,fr=25,ip=0,op=26,w=152,h=152,nm=`hamburger LF`,ddd=0,assets=[],layers=[{ddd:0,ind:1,ty:4,nm:`Livello 1 contorni`,sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[75.553,75.553,0],ix:2,l:2},a:{a:0,k:[75.302,75.3,0],ix:1,l:2},s:{a:0,k:[100,100,100],ix:6,l:2}},ao:0,shapes:[{ty:`gr`,it:[{ind:0,ty:`sh`,ix:1,ks:{a:0,k:{i:[[8.409,0],[0,8.408],[-8.409,0],[0,-8.409]],o:[[-8.409,0],[0,-8.409],[8.409,0],[0,8.408]],v:[[0,15.225],[-15.225,0],[0,-15.225],[15.225,0]],c:!0},ix:2},nm:`Tracciato 1`,mn:`ADBE Vector Shape - Group`,hd:!1},{ty:`fl`,c:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:0,s:[.937254961799,.90588241278,.866666726505,1]},{t:10,s:[.180392161012,.180392161012,.180392161012,1]}],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:`Riempimento 1`,mn:`ADBE Vector Graphic - Fill`,hd:!1},{ty:`tr`,p:{a:1,k:[{i:{x:.667,y:1},o:{x:.333,y:0},t:0,s:[15.475,15.475],to:[0,0],ti:[0,0]},{i:{x:.667,y:.667},o:{x:.167,y:.167},t:10,s:[75.553,75.553],to:[0,0],ti:[0,0]},{i:{x:.667,y:1},o:{x:.167,y:0},t:15,s:[75.553,75.553],to:[0,0],ti:[0,0]},{t:25,s:[15.475,15.475]}],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:`Trasformazione`}],nm:`Gruppo 1`,np:2,cix:2,bm:0,ix:1,mn:`ADBE Vector Group`,hd:!1},{ty:`gr`,it:[{ind:0,ty:`sh`,ix:1,ks:{a:0,k:{i:[[8.409,0],[0,8.408],[-8.409,0],[0,-8.409]],o:[[-8.409,0],[0,-8.409],[8.409,0],[0,8.408]],v:[[0,15.225],[-15.225,0],[0,-15.225],[15.225,0]],c:!0},ix:2},nm:`Tracciato 1`,mn:`ADBE Vector Shape - Group`,hd:!1},{ty:`fl`,c:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:0,s:[.937254961799,.90588241278,.866666726505,1]},{t:10,s:[.180392161012,.180392161012,.180392161012,1]}],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:`Riempimento 1`,mn:`ADBE Vector Graphic - Fill`,hd:!1},{ty:`tr`,p:{a:1,k:[{i:{x:.667,y:1},o:{x:.167,y:.167},t:0,s:[135.129,15.475],to:[0,0],ti:[0,0]},{i:{x:.667,y:.667},o:{x:.167,y:.167},t:10,s:[75.553,75.553],to:[0,0],ti:[0,0]},{i:{x:.833,y:.833},o:{x:.167,y:0},t:15,s:[75.553,75.553],to:[0,0],ti:[0,0]},{t:25,s:[135.129,15.475]}],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:`Trasformazione`}],nm:`Gruppo 2`,np:2,cix:2,bm:0,ix:2,mn:`ADBE Vector Group`,hd:!1},{ty:`gr`,it:[{ind:0,ty:`sh`,ix:1,ks:{a:0,k:{i:[[8.409,0],[0,8.408],[-8.409,0],[0,-8.409]],o:[[-8.409,0],[0,-8.409],[8.409,0],[0,8.408]],v:[[0,15.225],[-15.225,0],[0,-15.225],[15.225,0]],c:!0},ix:2},nm:`Tracciato 1`,mn:`ADBE Vector Shape - Group`,hd:!1},{ty:`fl`,c:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:10,s:[.180392156863,.180392156863,.180392156863,1]}
11,{t:25,s:[.937254905701,.905882358551,.866666674614,1]}],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:`Riempimento 1`,mn:`ADBE Vector Graphic - Fill`,hd:!1},{ty:`tr`,p:{a:1,k:[{i:{x:.667,y:1},o:{x:.333,y:0},t:0,s:[75.303,15.475],to:[0,0],ti:[0,0]},{i:{x:.667,y:.667},o:{x:.167,y:.167},t:10,s:[75.553,75.553],to:[0,0],ti:[0,0]},{i:{x:.667,y:1},o:{x:.167,y:0},t:15,s:[75.553,75.553],to:[0,0],ti:[0,0]},{t:25,s:[75.303,15.475]}],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:`Trasformazione`}],nm:`Gruppo 3`,np:2,cix:2,bm:0,ix:3,mn:`ADBE Vector Group`,hd:!1},{ty:`gr`,it:[{ind:0,ty:`sh`,ix:1,ks:{a:0,k:{i:[[8.409,0],[0,8.408],[-8.409,0],[0,-8.409]],o:[[-8.409,0],[0,-8.409],[8.409,0],[0,8.408]],v:[[0,15.225],[-15.225,0],[0,-15.225],[15.225,0]],c:!0},ix:2},nm:`Tracciato 1`,mn:`ADBE Vector Shape - Group`,hd:!1},{ty:`fl`,c:{a:0,k:[.180392156863,.180392156863,.180392156863,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:`Riempimento 1`,mn:`ADBE Vector Graphic - Fill`,hd:!1},{ty:`tr`,p:{a:0,k:[75.303,75.301],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:`Trasformazione`}],nm:`Gruppo 4`,np:2,cix:2,bm:0,ix:4,mn:`ADBE Vector Group`,hd:!1},{ty:`gr`,it:[{ind:0,ty:`sh`,ix:1,ks:{a:0,k:{i:[[8.409,0],[0,8.408],[-8.409,0],[0,-8.409]],o:[[-8.409,0],[0,-8.409],[8.409,0],[0,8.408]],v:[[0,15.225],[-15.225,0],[0,-15.225],[15.225,0]],c:!0},ix:2},nm:`Tracciato 1`,mn:`ADBE Vector Shape - Group`,hd:!1},{ty:`fl`,c:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:0,s:[.937254961799,.90588241278,.866666726505,1]},{t:10,s:[.180392161012,.180392161012,.180392161012,1]}],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:`Riempimento 1`,mn:`ADBE Vector Graphic - Fill`,hd:!1},{ty:`tr`,p:{a:1,k:[{i:{x:.667,y:1},o:{x:.167,y:.167},t:0,s:[15.58,135.296],to:[0,0],ti:[0,0]},{i:{x:.667,y:.667},o:{x:.167,y:.167},t:10,s:[75.553,75.553],to:[0,0],ti:[0,0]},{i:{x:.833,y:.833},o:{x:.167,y:0},t:15,s:[75.553,75.553],to:[0,0],ti:[0,0]},{t:25,s:[15.58,135.296]}],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:`Trasformazione`}],nm:`Gruppo 5`,np:2,cix:2,bm:0,ix:5,mn:`ADBE Vector Group`,hd:!1},{ty:`gr`,it:[{ind:0,ty:`sh`,ix:1,ks:{a:0,k:{i:[[8.409,0],[0,8.408],[-8.409,0],[0,-8.409]],o:[[-8.409,0],[0,-8.409],[8.409,0],[0,8.408]],v:[[0,15.225],[-15.225,0],[0,-15.225],[15.225,0]],c:!0},ix:2},nm:`Tracciato 1`,mn:`ADBE Vector Shape - Group`,hd:!1},{ty:`fl`,c:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:0,s:[.937254965305,.905882418156,.866666734219,1]},{t:10,s:[.180392161012,.180392161012,.180392161012,1]}],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:`Riempimento 1`,mn:`ADBE Vector Graphic - Fill`,hd:!1},{ty:`tr`,p:{a:1,k:[{i:{x:.667,y:1},o:{x:.167,y:.167},t:0,s:[135.129,135.126],to:[0,0],ti:[0,0]},{i:{x:.667,y:.667},o:{x:.167,y:.167},t:10,s:[75.553,75.553],to:[0,0],ti:[0,0]},{i:{x:.833,y:.833},o:{x:.167,y:0},t:15,s:[75.553,75.553],to:[0,0],ti:[0,0]},{t:25,s:[135.129,135.126]}],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:`Trasformazione`}],nm:`Gruppo 6`,np:2,cix:2,bm:0,ix:6,mn:`ADBE Vector Group`,hd:!1},{ty:`gr`,it:[{ind:0,ty:`sh`,ix:1,ks:{a:0,k:{i:[[8.409,0],[0,8.408],[-8.409,0],[0,-8.409]],o:[[-8.409,0],[0,-8.409],[8.409,0],[0,8.408]],v:[[0,15.225],[-15.225,0],[0,-15.225],[15.225,0]],c:!0},ix:2},nm:`Tracciato 1`,mn:`ADBE Vector Shape - Group`,hd:!1},{ty:`fl`,c:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:15,s:[.180392156863,.180392156863,.180392156863,1]},{t:25,s:[.937254905701,.905882358551,.866666674614,1]}],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:`Riempimento 1`,mn:`ADBE Vector Graphic - Fill`,hd:!1},{ty:`tr`,p:{a:1,k:[{i:{x:.667,y:1},o:{x:.167,y:.167},t:0,s:[75.303,135.126],to:[0,0],ti:[0,0]},{i:{x:.667,y:.667},o:{x:.167,y:.167},t:10,s:[75.553,75.553],to:[0,0],ti:[0,0]},{i:{x:.833,y:.833},o:{x:.167,y:0},t:15,s:[75.553,75.553],to:[0,0],ti:[0,0]},{t:25,s:[75.303,135.126]}],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:`Trasformazione`}],nm:`Gruppo 7`,np:2,cix:2,bm:0,ix:7,mn:`ADBE Vector Group`,hd:!1},{ty:`gr`,it:[{ind:0,ty:`sh`,ix:1,ks:{a:0,k:{i:[[0,-8.409],[8.408,0],[0,8.409],[-8.409,0]],o:[[0,8.409],[-8.409,0],[0,-8.409],[8.408,0]],v:[[15.225,0],[0,15.225],[-15.225,0],[0,-15.225]],c:!0},ix:2},nm:`Tracciato 1`,mn:`ADBE Vector Shape - Group`,hd:!1},{ty:`fl`,c:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:10,s:[.180392156863,.180392156863,.180392156863,1]}
11,{t:25,s:[.937254905701,.905882358551,.866666674614,1]}],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:`Riempimento 1`,mn:`ADBE Vector Graphic - Fill`,hd:!1},{ty:`tr`,p:{a:1,k:[{i:{x:.667,y:1},o:{x:.167,y:.167},t:0,s:[15.478,75.3],to:[0,0],ti:[0,0]},{i:{x:.667,y:.667},o:{x:.167,y:.167},t:10,s:[75.553,75.553],to:[0,0],ti:[0,0]},{i:{x:.833,y:.833},o:{x:.167,y:0},t:15,s:[75.553,75.553],to:[0,0],ti:[0,0]},{t:25,s:[15.478,75.3]}],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:`Trasformazione`}],nm:`Gruppo 8`,np:2,cix:2,bm:0,ix:8,mn:`ADBE Vector Group`,hd:!1},{ty:`gr`,it:[{ind:0,ty:`sh`,ix:1,ks:{a:0,k:{i:[[0,-8.409],[8.408,0],[0,8.409],[-8.409,0]],o:[[0,8.409],[-8.409,0],[0,-8.409],[8.408,0]],v:[[15.225,0],[0,15.225],[-15.225,0],[0,-15.225]],c:!0},ix:2},nm:`Tracciato 1`,mn:`ADBE Vector Shape - Group`,hd:!1},{ty:`fl`,c:{a:0,k:[.180392156863,.180392156863,.180392156863,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:`Riempimento 1`,mn:`ADBE Vector Graphic - Fill`,hd:!1},{ty:`tr`,p:{a:0,k:[75.305,75.3],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:`Trasformazione`}],nm:`Gruppo 9`,np:2,cix:2,bm:0,ix:9,mn:`ADBE Vector Group`,hd:!1},{ty:`gr`,it:[{ind:0,ty:`sh`,ix:1,ks:{a:0,k:{i:[[0,-8.409],[8.408,0],[0,8.409],[-8.409,0]],o:[[0,8.409],[-8.409,0],[0,-8.409],[8.408,0]],v:[[15.225,0],[0,15.225],[-15.225,0],[0,-15.225]],c:!0},ix:2},nm:`Tracciato 1`,mn:`ADBE Vector Shape - Group`,hd:!1},{ty:`fl`,c:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:10,s:[.180392156863,.180392156863,.180392156863,1]},{t:25,s:[.937254905701,.905882358551,.866666674614,1]}],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:`Riempimento 1`,mn:`ADBE Vector Graphic - Fill`,hd:!1},{ty:`tr`,p:{a:1,k:[{i:{x:.667,y:1},o:{x:.167,y:.167},t:0,s:[135.129,75.301],to:[0,0],ti:[0,0]},{i:{x:.667,y:.667},o:{x:.167,y:.167},t:10,s:[75.553,75.553],to:[0,0],ti:[0,0]},{i:{x:.833,y:.833},o:{x:.167,y:0},t:15,s:[75.553,75.553],to:[0,0],ti:[0,0]},{t:25,s:[135.129,75.301]}],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:`Trasformazione`}],nm:`Gruppo 10`,np:2,cix:2,bm:0,ix:10,mn:`ADBE Vector Group`,hd:!1}],ip:0,op:112,st:0,bm:0}],markers=[],hamburger_default={v,fr:25,ip:0,op:26,w:152,h:152,nm,ddd:0,assets,layers,markers};function setupHeaderVisibilityOnScroll(){let e=Array.from(document.querySelectorAll(`.site-header, .site-header-mobile`));if(!e.length)return;let t=Math.max(window.scrollY,0),n=!1,r=16,i=80,a=2,o=t=>{e.forEach(e=>{e.classList.toggle(`site-header--hidden`,t)})},s=()=>
11{if(document.documentElement.classList.contains(`mobile-menu-open`)){o(!1),t=Math.max(window.scrollY,0),n=!1;return}let e=Math.max(window.scrollY,0),r=e-t;e<=16?o(!1):Math.abs(r)>=2&&(r>0&&e>80?o(!0):r<0&&o(!1)),t=e,n=!1};window.addEventListener(`scroll`,()=>{n||(n=!0,window.requestAnimationFrame(s))},{passive:!0}),s()}function setupHeaderActiveNavLinks(){let e=Array.from(document.querySelectorAll(`.header-nav a[href^="#"], #mobile-nav a[href^="#"]`));if(!e.length)return;let t=e=>{if(!e||e===`#`)return null;let t=e.slice(1).trim();if(!t)return null;let n=(()=>{try{return decodeURIComponent(t)}catch{return t}})();return document.getElementById(n)},n=e.map(e=>{let n=t(e.getAttribute(`href`));return n?{link:e,section:n}:null}).filter(Boolean);if(!n.length)return;let r=!1,i=e=>{n.forEach(({link:t,section:n})=>{let r=n.id===e;t.classList.toggle(`is-active`,r),r?t.setAttribute(`aria-current`,`true`):t.removeAttribute(`aria-current`)})},a=()=>{let e=Math.min(window.innerHeight*.34,280),t=null;n.forEach(({section:n})=>{let r=n.getBoundingClientRect();r.top<=e&&r.bottom>e&&(t=n.id)}),t||window.innerHeight+window.scrollY>=document.documentElement.scrollHeight-2&&(t=n[n.length-1].section.id),i(t),r=!1},o=()=>{r||(r=!0,window.requestAnimationFrame(a))};window.addEventListener(`scroll`,o,{passive:!0}),window.addEventListener(`resize`,o),window.addEventListener(`load`,o),a()}function setupScrollbarWidthVar(){let e=()=>{let e=window.innerWidth-document.documentElement.clientWidth;document.documentElement.style.setProperty(`--scrollbar-width`,e+`px`)};e(),window.addEventListener(`resize`,e)}function setupHeaderLogoSignatureAnimation(){let e=Array.from(document.querySelectorAll(`.header-logo-signature`));e.length&&e.forEach(e=>{e.classList.add(`is-ready`)})}window.addEventListener(`DOMContentLoaded`,function(){setupScrollbarWidthVar(),setupHeaderVisibilityOnScroll(),setupHeaderLogoSignatureAnimation(),setupHeaderActiveNavLinks();var e=document.getElementById(`hamburger-animation`),t=document.getElementById(`mobile-nav`),n=document.getElementById(`hamburger-btn`),r=t?t.querySelector(`.mobile-nav__panel`):null,i=t?Array.from(t.querySelectorAll(`a[href]`)):[],a=document.documentElement,o=document.body,s=window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,c=!1,l=0,u=25,d=!1;if(!(!e||!t||!n||!r||!window.lottie)){var f=window.lottie.loadAnimation({container:e,renderer:`svg`,loop:!1,autoplay:!1,animationData:hamburger_default}),p=function(e){n.setAttribute(`aria-expanded`,String(e)),n.setAttribute(`aria-label`,e?`Chiudi menu di navigazione`:`Apri menu di navigazione`),t.setAttribute(`aria-hidden`,String(!e)),t.classList.toggle(`is-open`,e),a.classList.toggle(`mobile-menu-open`,e),o.classList.toggle(`mobile-menu-open`,e)},m=function(e,t){if(c){if(t||s){f.goToAndStop(e?u:l,!0);return}f.playSegments(e?[l,u]:[u,l],!0)}},g=function(e,t){var r=t&&t.forceStill;d===e&&!r||(d=e,p(e),m(e,r),e?window.requestAnimationFrame(function(){i[0]&&i[0].focus()}):n.focus({preventScroll:!0}))};f.addEventListener(`DOMLoaded`,function(){c=!0,g(!1,{forceStill:!0})}),setTimeout(function(){t.classList.remove(`mobile-nav--preload`)},2e3),n.addEventListener(`click`,function(){g(!d)}),t.addEventListener(`click`,function(e){e.target===t&&g(!1)}
11),i.forEach(function(e){e.addEventListener(`click`,function(){g(!1)})});var _=t.querySelector(`.mobile-nav__cta button`);_&&_.addEventListener(`click`,function(){g(!1)}),document.addEventListener(`keydown`,function(e){e.key===`Escape`&&d&&g(!1)}),window.addEventListener(`resize`,function(){window.innerWidth>=1024&&d&&g(!1,{forceStill:!0})})}}),document.querySelectorAll(`[data-scroll-to]`).forEach(function(e,t){let n=(e.getAttribute(`data-scroll-to`)||``).trim(),r=n?document.getElementById(n):null;n&&r&&e.addEventListener(`click`,e=>{e.preventDefault(),r.scrollIntoView({behavior:`smooth`})})});var REVISION=`183`,FrontSide=0,BackSide=1,NormalBlending=1,AddEquation=100,SrcAlphaFactor=204,OneMinusSrcAlphaFactor=205,NeverDepth=0,AlwaysDepth=1,LessDepth=2,LessEqualDepth=3,EqualDepth=4,GreaterEqualDepth=5,GreaterDepth=6,NotEqualDepth=7,MultiplyOperation=0,UVMapping=300,CubeReflectionMapping=301,RepeatWrapping=1e3,ClampToEdgeWrapping=1001,MirroredRepeatWrapping=1002,NearestFilter=1003,NearestMipmapNearestFilter=1004,NearestMipmapLinearFilter=1005,LinearFilter=1006,LinearMipmapNearestFilter=1007,LinearMipmapLinearFilter=1008,UnsignedByteType=1009,ByteType=1010,ShortType=1011,UnsignedShortType=1012,IntType=1013,UnsignedIntType=1014,FloatType=1015,HalfFloatType=1016,UnsignedShort4444Type=1017,UnsignedShort5551Type=1018,UnsignedInt248Type=1020,UnsignedInt5999Type=35902,UnsignedInt101111Type=35899,AlphaFormat=1021,RGBFormat=1022,RGBAFormat=1023,DepthFormat=1026,DepthStencilFormat=1027,RedFormat=1028,RedIntegerFormat=1029,RGFormat=1030,RGIntegerFormat=1031,RGBAIntegerFormat=1033,RGB_S3TC_DXT1_Format=33776,RGBA_S3TC_DXT1_Format=33777,RGBA_S3TC_DXT3_Format=33778,RGBA_S3TC_DXT5_Format=33779,RGB_PVRTC_4BPPV1_Format=35840,RGB_PVRTC_2BPPV1_Format=35841,RGBA_PVRTC_4BPPV1_Format=35842,RGBA_PVRTC_2BPPV1_Format=35843,RGB_ETC1_Format=36196,RGB_ETC2_Format=37492,RGBA_ETC2_EAC_Format=37496,R11_EAC_Format=37488,SIGNED_R11_EAC_Format=37489,RG11_EAC_Format=37490,SIGNED_RG11_EAC_Format=37491,RGBA_ASTC_4x4_Format=37808,RGBA_ASTC_5x4_Format=37809,RGBA_ASTC_5x5_Format=37810,RGBA_ASTC_6x5_Format=37811,RGBA_ASTC_6x6_Format=37812,RGBA_ASTC_8x5_Format=37813,RGBA_ASTC_8x6_Format=37814,RGBA_ASTC_8x8_Format=37815,RGBA_ASTC_10x5_Format=37816,RGBA_ASTC_10x6_Format=37817,RGBA_ASTC_10x8_Format=37818,RGBA_ASTC_10x10_Format=37819,RGBA_ASTC_12x10_Format=37820,RGBA_ASTC_12x12_Format=37821,RGBA_BPTC_Format=36492,RGB_BPTC_SIGNED_Format=36494,RGB_BPTC_UNSIGNED_Format=36495,RED_RGTC1_Format=36283,SIGNED_RED_RGTC1_Format=36284,RED_GREEN_RGTC2_Format=36285,SIGNED_RED_GREEN_RGTC2_Format=36286,InterpolateDiscrete=2300,InterpolateLinear=2301,InterpolateSmooth=2302,InterpolateBezier=2303,ZeroCurvatureEnding=2400,ZeroSlopeEnding=2401,WrapAroundEnding=2402,BasicDepthPacking=3200,NoColorSpace=``,SRGBColorSpace=`srgb`,LinearSRGBColorSpace=`srgb-linear`,LinearTransfer=`linear`,SRGBTransfer=`srgb`,KeepStencilOp=7680,AlwaysStencilFunc=519,StaticDrawUsage=35044,GLSL3=`300 es`,WebGLCoordinateSystem=2e3,WebGPUCoordinateSystem=2001;function arrayNeedsUint32(e){for(let t=e.length-1;t>=0;--t)if(e[t]>=65535)return!0;return!1}function isTypedArray(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function createElementNS(e){return document.createElementNS(`http://www.w3.org/1999/xhtml`,e)}function createCanvasElement(){let e=createElementNS(`canvas`);return e.style.display=`block`,e}var _cache={},_setConsoleFunction=null;function log(...e){let t=`THREE.`+e.shift();_setConsoleFunction?_setConsoleFunction(`log`,t,...e):console.log(t,...e)}function enhanceLogMessage(e){let t=e[0];if(typeof t==`string`&&t.startsWith(`TSL:`)){let t=e[1];t&&t.isStackTrace?e[0]+=` `+t.getLocation():e[1]=`Stack trace not available. Enable "THREE.Node.captureStackTrace" to capture stack traces.`}return e}function warn(...e){e=enhanceLogMessage(e);let t=`THREE.`+e.shift();if(_setConsoleFunction)_setConsoleFunction(`warn`,t,...e);else{let n=e[0];n&&n.isStackTrace?console.warn(n.getError(t)):console.warn(t,...e)}}function error(...e){e=enhanceLogMessage(e);let t=`THREE.`+e.shift();if(_setConsoleFunction)_setConsoleFunction(`error`,t,...e);else{let n=e[0];n&&n.isStackTrace?console.error(n.getError(t)):console.error(t,...e)}}function warnOnce(...e){let t=e.join(` `);t in _cache||(_cache[t]=!0,warn(...e))}function probeAsync(e,t,n){return new Promise(function(r,i){function a(){switch(e.clientWaitSync(t,e.SYNC_FLUSH_COMMANDS_BIT,0)){case e.WAIT_FAILED:i();break;case e.TIMEOUT_EXPIRED:setTimeout(a,n);break;default:r()}}setTimeout(a,n)})}
vendor: 4,659 bytes, line 11
11var ReversedDepthFuncs={0:1,2:6,4:7,3:5,1:0,6:2,7:4,5:3},EventDispatcher=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){let n=this._listeners;return n===void 0?!1:n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){let n=this._listeners;if(n===void 0)return;let r=n[e];if(r!==void 0){let e=r.indexOf(t);e!==-1&&r.splice(e,1)}}dispatchEvent(e){let t=this._listeners;if(t===void 0)return;let n=t[e.type];if(n!==void 0){e.target=this;let t=n.slice(0);for(let n=0,r=t.length;n<r;n++)t[n].call(this,e);e.target=null}}},_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`.split(`.`),DEG2RAD=Math.PI/180,RAD2DEG=180/Math.PI;function generateUUID(){let e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0,r=Math.random()*4294967295|0;return(_lut[e&255]+_lut[e>>8&255]+_lut[e>>16&255]+_lut[e>>24&255]+`-`+_lut[t&255]+_lut[t>>8&255]+`-`+_lut[t>>16&15|64]+_lut[t>>24&255]+`-`+_lut[n&63|128]+_lut[n>>8&255]+`-`+_lut[n>>16&255]+_lut[n>>24&255]+_lut[r&255]+_lut[r>>8&255]+_lut[r>>16&255]+_lut[r>>24&255]).toLowerCase()}function clamp(e,t,n){return Math.max(t,Math.min(n,e))}function euclideanModulo(e,t){return(e%t+t)%t}function lerp(e,t,n){return(1-n)*e+n*t}function denormalize(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return e/4294967295;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int32Array:return Math.max(e/2147483647,-1);case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw Error(`Invalid component type.`)}}function normalize(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return Math.round(e*4294967295);case Uint16Array:return Math.round(e*65535);case Uint8Array:return Math.round(e*255);case Int32Array:return Math.round(e*2147483647);case Int16Array:return Math.round(e*32767);case Int8Array:return Math.round(e*127);default:throw Error(`Invalid component type.`)}}var Vector2=class e{constructor(t=0,n=0){e.prototype.isVector2=!0,this.x=t,this.y=n}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw Error(`index is out of range: `+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw Error(`index is out of range: `+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){let t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=clamp(this.x,e.x,t.x),this.y=clamp(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=clamp(this.x,e,t),this.y=clamp(this.y,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(clamp(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}
vendor: 4,442 bytes, line 11
11round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let n=this.dot(e)/t;return Math.acos(clamp(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){let n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,a=this.y-e.y;return this.x=i*n-a*r+e.x,this.y=i*r+a*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},Quaternion=class{constructor(e=0,t=0,n=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=r}static slerpFlat(e,t,n,r,i,a,o){let s=n[r+0],c=n[r+1],l=n[r+2],u=n[r+3],d=i[a+0],f=i[a+1],p=i[a+2],m=i[a+3];if(u!==m||s!==d||c!==f||l!==p){let e=s*d+c*f+l*p+u*m;e<0&&(d=-d,f=-f,p=-p,m=-m,e=-e);let t=1-o;if(e<.9995){let n=Math.acos(e),r=Math.sin(n);t=Math.sin(t*n)/r,o=Math.sin(o*n)/r,s=s*t+d*o,c=c*t+f*o,l=l*t+p*o,u=u*t+m*o}else{s=s*t+d*o,c=c*t+f*o,l=l*t+p*o,u=u*t+m*o;let e=1/Math.sqrt(s*s+c*c+l*l+u*u);s*=e,c*=e,l*=e,u*=e}}e[t]=s,e[t+1]=c,e[t+2]=l,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,r,i,a){let o=n[r],s=n[r+1],c=n[r+2],l=n[r+3],u=i[a],d=i[a+1],f=i[a+2],p=i[a+3];return e[t]=o*p+l*u+s*f-c*d,e[t+1]=s*p+l*d+c*u-o*f,e[t+2]=c*p+l*f+o*d-s*u,e[t+3]=l*p-o*u-s*d-c*f,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){let n=e._x,r=e._y,i=e._z,a=e._order,o=Math.cos,s=Math.sin,c=o(n/2),l=o(r/2),u=o(i/2),d=s(n/2),f=s(r/2),p=s(i/2);switch(a){case`XYZ`:this._x=d*l*u+c*f*p,this._y=c*f*u-d*l*p,this._z=c*l*p+d*f*u,this._w=c*l*u-d*f*p;break;case`YXZ`:this._x=d*l*u+c*f*p,this._y=c*f*u-d*l*p,this._z=c*l*p-d*f*u,this._w=c*l*u+d*f*p;break;case`ZXY`:this._x=d*l*u-c*f*p,this._y=c*f*u+d*l*p,this._z=c*l*p+d*f*u,this._w=c*l*u-d*f*p;break;case`ZYX`:this._x=d*l*u-c*f*p,this._y=c*f*u+d*l*p,this._z=c*l*p-d*f*u,this._w=c*l*u+d*f*p;break;case`YZX`:this._x=d*l*u+c*f*p,this._y=c*f*u+d*l*p,this._z=c*l*p-d*f*u,this._w=c*l*u-d*f*p;break;case`XZY`:this._x=d*l*u-c*f*p,this._y=c*f*u-d*l*p,this._z=c*l*p+d*f*u,this._w=c*l*u+d*f*p;break;default:warn(`Quaternion: .setFromEuler() encountered an unknown order: `+a)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,n=t[0],r=t[4],i=t[8],a=t[1],o=t[5],s=t[9],c=t[2],l=t[6],u=t[10],d=n+o+u;if(d>0){let e=.5/Math.sqrt(d+1);this._w=.25/e,this._x=(l-s)*e,this._y=(i-c)*e,this._z=(a-r)*e}else if(n>o&&n>u){let e=2*Math.sqrt(1+n-o-u);this._w=(l-s)/e,this._x=.25*e,this._y=(r+a)/e,this._z=(i+c)/e}else if(o>u){let e=2*Math.sqrt(1+o-n-u);this._w=(i-c)/e,this._x=(r+a)/e,this._y=.25*e,this._z=(s+l)/e}else{let e=2*Math.sqrt(1+u-n-o);this._w=(a-r)/e,this._x=(i+c)/e,this._y=(s+l)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<1e-8?(n=0,Math.abs(e.x)>
vendor: 12,301 bytes, line 11
11Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(clamp(this.dot(e),-1,1)))}rotateTowards(e,t){let n=this.angleTo(e);if(n===0)return this;let r=Math.min(1,t/n);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._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 e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x*=e,this._y*=e,this._z*=e,this._w*=e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){let n=e._x,r=e._y,i=e._z,a=e._w,o=t._x,s=t._y,c=t._z,l=t._w;return this._x=n*l+a*o+r*c-i*s,this._y=r*l+a*s+i*o-n*c,this._z=i*l+a*c+n*s-r*o,this._w=a*l-n*o-r*s-i*c,this._onChangeCallback(),this}slerp(e,t){let n=e._x,r=e._y,i=e._z,a=e._w,o=this.dot(e);o<0&&(n=-n,r=-r,i=-i,a=-a,o=-o);let s=1-t;if(o<.9995){let e=Math.acos(o),c=Math.sin(e);s=Math.sin(s*e)/c,t=Math.sin(t*e)/c,this._x=this._x*s+n*t,this._y=this._y*s+r*t,this._z=this._z*s+i*t,this._w=this._w*s+a*t,this._onChangeCallback()}else this._x=this._x*s+n*t,this._y=this._y*s+r*t,this._z=this._z*s+i*t,this._w=this._w*s+a*t,this.normalize();return this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){let e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),r=Math.sqrt(1-n),i=Math.sqrt(n);return this.set(r*Math.sin(e),r*Math.cos(e),i*Math.sin(t),i*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},Vector3=class e{constructor(t=0,n=0,r=0){e.prototype.isVector3=!0,this.x=t,this.y=n,this.z=r}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw Error(`index is out of range: `+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw Error(`index is out of range: `+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(_quaternion$5.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(_quaternion$5.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,i=e.elements,a=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*a,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*a,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*a,this}applyQuaternion(e){let t=this.x,n=this.y,r=this.z,i=e.x,a=e.y,o=e.z,s=e.w,c=2*(a*r-o*n),l=2*(o*t-i*r),u=2*(i*n-a*t);return this.x=t+s*c+a*u-o*l,this.y=n+s*l+o*c-i*u,this.z=r+s*u+i*l-a*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){let t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=clamp(this.x,e.x,t.x),this.y=clamp(this.y,e.y,t.y),this.z=clamp(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=clamp(this.x,e,t),this.y=clamp(this.y,e,t),this.z=clamp(this.z,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(clamp(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.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(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){let n=e.x,r=e.y,i=e.z,a=t.x,o=t.y,s=t.z;return this.x=r*s-i*o,this.y=i*a-n*s,this.z=n*o-r*a,this}projectOnVector(e){let t=e.lengthSq();if(t===0)return this.set(0,0,0);let n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return _vector$c.copy(this).projectOnVector(e),this.sub(_vector$c)}reflect(e){return this.sub(_vector$c.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let n=this.dot(e)/t;return Math.acos(clamp(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){let r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){let t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let e=Math.random()*Math.PI*2,t=Math.random()*2-1,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},_vector$c=new Vector3,_quaternion$5=new Quaternion,Matrix3=class e{constructor(t,n,r,i,a,o,s,c,l){e.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],t!==void 0&&this.set(t,n,r,i,a,o,s,c,l)}set(e,t,n,r,i,a,o,s,c){let l=this.elements;return l[0]=e,l[1]=r,l[2]=o,l[3]=t,l[4]=i,l[5]=s,l[6]=n,l[7]=a,l[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){let t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,r=t.elements,i=this.elements,a=n[0],o=n[3],s=n[6],c=n[1],l=n[4],u=n[7],d=n[2],f=n[5],p=n[8],m=r[0],g=r[3],_=r[6],y=r[1],b=r[4],x=r[7],S=r[2],C=r[5],T=r[8];return i[0]=a*m+o*y+s*S,i[3]=a*g+o*b+s*C,i[6]=a*_+o*x+s*T,i[1]=c*m+l*y+u*S,i[4]=c*g+l*b+u*C,i[7]=c*_+l*x+u*T,i[2]=d*m+f*y+p*S,i[5]=d*g+f*b+p*C,i[8]=d*_+f*x+p*T,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],c=e[7],l=e[8];return t*a*l-t*o*c-n*i*l+n*o*s+r*i*c-r*a*s}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],c=e[7],l=e[8],u=l*a-o*c,d=o*s-l*i,f=c*i-a*s,p=t*u+n*d+r*f;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);let m=1/p;return e[0]=u*m,e[1]=(r*c-l*n)*m,e[2]=(o*n-r*a)*m,e[3]=d*m,e[4]=(l*t-r*s)*m,e[5]=(r*i-o*t)*m,e[6]=f*m,e[7]=(n*s-c*t)*m,e[8]=(a*t-n*i)*m,this}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){let t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,r,i,a,o){let s=Math.cos(i),c=Math.sin(i);return this.set(n*s,n*c,-n*(s*a+c*o)+a+e,-r*c,r*s,-r*(-c*a+s*o)+o+t,0,0,1),this}scale(e,t){return this.premultiply(_m3.makeScale(e,t)),this}rotate(e){return this.premultiply(_m3.makeRotation(-e)),this}translate(e,t){return this.premultiply(_m3.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){let t=this.elements,n=e.elements;for(let e=0;e<9;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}},_m3=new Matrix3,LINEAR_REC709_TO_XYZ=new Matrix3().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),XYZ_TO_LINEAR_REC709=new Matrix3().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.20397
117,1.0569715);function createColorManagement(){let e={enabled:!0,workingColorSpace:LinearSRGBColorSpace,spaces:{},convert:function(e,t,n){return this.enabled===!1||t===n||!t||!n?e:(this.spaces[t].transfer===`srgb`&&(e.r=SRGBToLinear(e.r),e.g=SRGBToLinear(e.g),e.b=SRGBToLinear(e.b)),this.spaces[t].primaries!==this.spaces[n].primaries&&(e.applyMatrix3(this.spaces[t].toXYZ),e.applyMatrix3(this.spaces[n].fromXYZ)),this.spaces[n].transfer===`srgb`&&(e.r=LinearToSRGB(e.r),e.g=LinearToSRGB(e.g),e.b=LinearToSRGB(e.b)),e)},workingToColorSpace:function(e,t){return this.convert(e,this.workingColorSpace,t)},colorSpaceToWorking:function(e,t){return this.convert(e,t,this.workingColorSpace)},getPrimaries:function(e){return this.spaces[e].primaries},getTransfer:function(e){return e===``?LinearTransfer:this.spaces[e].transfer},getToneMappingMode:function(e){return this.spaces[e].outputColorSpaceConfig.toneMappingMode||`standard`},getLuminanceCoefficients:function(e,t=this.workingColorSpace){return e.fromArray(this.spaces[t].luminanceCoefficients)},define:function(e){Object.assign(this.spaces,e)},_getMatrix:function(e,t,n){return e.copy(this.spaces[t].toXYZ).multiply(this.spaces[n].fromXYZ)},_getDrawingBufferColorSpace:function(e){return this.spaces[e].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(e=this.workingColorSpace){return this.spaces[e].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(t,n){return warnOnce(`ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace().`),e.workingToColorSpace(t,n)},toWorkingColorSpace:function(t,n){return warnOnce(`ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking().`),e.colorSpaceToWorking(t,n)}},t=[.64,.33,.3,.6,.15,.06],n=[.2126,.7152,.0722],r=[.3127,.329];return e.define({[LinearSRGBColorSpace]:{primaries:t,whitePoint:r,transfer:LinearTransfer,toXYZ:LINEAR_REC709_TO_XYZ,fromXYZ:XYZ_TO_LINEAR_REC709,luminanceCoefficients:n,workingColorSpaceConfig:{unpackColorSpace:SRGBColorSpace},outputColorSpaceConfig:{drawingBufferColorSpace:SRGBColorSpace}},[SRGBColorSpace]:{primaries:t,whitePoint:r,transfer:SRGBTransfer,toXYZ:LINEAR_REC709_TO_XYZ,fromXYZ:XYZ_TO_LINEAR_REC709,luminanceCoefficients:n,outputColorSpaceConfig:{drawingBufferColorSpace:SRGBColorSpace}}}),e}var ColorManagement=createColorManagement();function SRGBToLinear(e){return e<.04045?e*.0773993808:(e*.9478672986+.0521327014)**2.4}function LinearToSRGB(e){return e<.0031308?e*12.92:1.055*e**.41666-.055}var _canvas,ImageUtils=class{static getDataURL(e,t=`image/png`){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>`u`)return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{_canvas===void 0&&(_canvas=createElementNS(`canvas`)),_canvas.width=e.width,_canvas.height=e.height;let t=_canvas.getContext(`2d`);e instanceof ImageData?t.putImageData(e,0,0):t.drawImage(e,0,0,e.width,e.height),n=_canvas}return n.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<`u`&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<`u`&&e instanceof HTMLCanvasElement||typeof ImageBitmap<`u`&&e instanceof ImageBitmap){let t=createElementNS(`canvas`);t.width=e.width,t.height=e.height;let n=t.getContext(`2d`);n.drawImage(e,0,0,e.width,e.height);let r=n.getImageData(0,0,e.width,e.height),i=r.data;for(let e=0;e<i.length;e++)i[e]=SRGBToLinear(i[e]/255)*255;return n.putImageData(r,0,0),t}else if(e.data){let t=e.data.slice(0);for(let e=0;e<t.length;e++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[e]=Math.floor(SRGBToLinear(t[e]/255)*255):t[e]=SRGBToLinear(t[e]);return{data:t,width:e.width,height:e.height}}else return warn(`ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied.`),e}},_sourceId=0,Source=class{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:_sourceId++}),this.uuid=generateUUID(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){let t=this.data;return typeof HTMLVideoElement<`u`&&t instanceof HTMLVideoElement?e.set(t.videoWidth,t.videoHeight,0):typeof VideoFrame<`u`&&t instanceof VideoFrame?e.set(t.displayHeight,t.displayWidth,0):t===null?e.set(0,0,0):e.set(t.width,t.height,t.depth||0),e}set needsUpdate(e){e===!0&&this.version++}toJSON(e){let t=e===void 0||typeof e==`string`;if(!t&&e.images[this.uuid]!==void 0)return e.images[this.uuid];let n={uuid:this.uuid,url:``},r=this.data;if(r!==null){let e;if(Array.isArray(r)){e=[];for(let t=0,n=r.length;t<n;t++)r[t].isDataTexture?e.push(serializeImage(r[t].image)):e.push(serializeImage(r[t]))}else e=serializeImage(r);n.url=e}return t||(e.images[this.uuid]=n),n}};function serializeImage(e){return typeof HTMLImageElement<`u`&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<`u`&&e instanceof HTMLCanvasElement||typeof ImageBitmap<`u`&&e instanceof ImageBitmap?ImageUtils.getDataURL(e):e.data?{data:Array.from(e.data),width:e.width,height:e.height,type:e.data.constructor.name}:(warn(`Texture: Unable to serialize Texture.`),{})}
vendor: 9,851 bytes, line 11
11var _textureId=0,_tempVec3=new Vector3,Texture=class e extends EventDispatcher{constructor(t=e.DEFAULT_IMAGE,n=e.DEFAULT_MAPPING,r=ClampToEdgeWrapping,i=ClampToEdgeWrapping,a=LinearFilter,o=LinearMipmapLinearFilter,s=RGBAFormat,c=UnsignedByteType,l=e.DEFAULT_ANISOTROPY,u=``){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:_textureId++}),this.uuid=generateUUID(),this.name=``,this.source=new Source(t),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=i,this.magFilter=a,this.minFilter=o,this.anisotropy=l,this.format=s,this.internalFormat=null,this.type=c,this.offset=new Vector2(0,0),this.repeat=new Vector2(1,1),this.center=new Vector2(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Matrix3,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=u,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(t&&t.depth&&t.depth>1),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(e=null){this.source.data=e}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(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isArrayTexture=e.isArrayTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}setValues(e){for(let t in e){let n=e[t];if(n===void 0){warn(`Texture.setValues(): parameter '${t}' has value of undefined.`);continue}let r=this[t];if(r===void 0){warn(`Texture.setValues(): property '${t}' does not exist.`);continue}r&&n&&r.isVector2&&n.isVector2||r&&n&&r.isVector3&&n.isVector3||r&&n&&r.isMatrix3&&n.isMatrix3?r.copy(n):this[t]=n}}toJSON(e){let t=e===void 0||typeof e==`string`;if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];let n={metadata:{version:4.7,type:`Texture`,generator:`Texture.toJSON`},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).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};return Object.keys(this.userData).length>0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:`dispose`})}transformUv(e){if(this.mapping!==300)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case RepeatWrapping:e.x-=Math.floor(e.x);break;case ClampToEdgeWrapping:e.x=e.x<0?0:1;break;case MirroredRepeatWrapping:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x-=Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case RepeatWrapping:e.y-=Math.floor(e.y);break;case ClampToEdgeWrapping:e.y=e.y<0?0:1;break;case MirroredRepeatWrapping:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y-=Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}};Texture.DEFAULT_IMAGE=null,Texture.DEFAULT_MAPPING=300,Texture.DEFAULT_ANISOTROPY=1;var Vector4=class e{constructor(t=0,n=0,r=0,i=1){e.prototype.isVector4=!0,this.x=t,this.y=n,this.z=r,this.w=i}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw Error(`index is out of range: `+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw Error(`index is out of range: `+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w===void 0?1:e.w,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,i=this.w,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*r+a[12]*i,this.y=a[1]*t+a[5]*n+a[9]*r+a[13]*i,this.z=a[2]*t+a[6]*n+a[10]*r+a[14]*i,this.w=a[3]*t+a[7]*n+a[11]*r+a[15]*i,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);let t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r,i,a=.01,o=.1,s=e.elements,c=s[0],l=s[4],u=s[8],d=s[1],f=s[5],p=s[9],m=s[2],g=s[6],_=s[10];if(Math.abs(l-d)<a&&Math.abs(u-m)<a&&Math.abs(p-g)<a){if(Math.abs(l+d)<o&&Math.abs(u+m)<o&&Math.abs(p+g)<o&&Math.abs(c+f+_-3)<o)return this.set(1,0,0,0),this;t=Math.PI;let e=(c+1)/2,s=(f+1)/2,y=(_+1)/2,b=(l+d)/4,x=(u+m)/4,S=(p+g)/4;return e>s&&e>y?e<a?(n=0,r=.707106781,i=.707106781):(n=Math.sqrt(e),r=b/n,i=x/n):s>y?s<a?(n=.707106781,r=0,i=.707106781):(r=Math.sqrt(s),n=b/r,i=S/r):y<a?(n=.707106781,r=.707106781,i=0):(i=Math.sqrt(y),n=x/i,r=S/i),this.set(n,r,i,t),this}let y=Math.sqrt((g-p)*(g-p)+(u-m)*(u-m)+(d-l)*(d-l));return Math.abs(y)<.001&&(y=1),this.x=(g-p)/y,this.y=(u-m)/y,this.z=(d-l)/y,this.w=Math.acos((c+f+_-1)/2),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=clamp(this.x,e.x,t.x),this.y=clamp(this.y,e.y,t.y),this.z=clamp(this.z,e.z,t.z),this.w=clamp(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=clamp(this.x,e,t),this.y=clamp(this.y,e,t),this.z=clamp(this.z,e,t),this.w=clamp(this.w,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(clamp(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.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(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}
vendor: 26,105 bytes, line 11
11,RenderTarget=class extends EventDispatcher{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:LinearFilter,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},n),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=n.depth,this.scissor=new Vector4(0,0,e,t),this.scissorTest=!1,this.viewport=new Vector4(0,0,e,t),this.textures=[];let r=new Texture({width:e,height:t,depth:n.depth}),i=n.count;for(let e=0;e<i;e++)this.textures[e]=r.clone(),this.textures[e].isRenderTargetTexture=!0,this.textures[e].renderTarget=this;this._setTextureOptions(n),this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=n.depthTexture,this.samples=n.samples,this.multiview=n.multiview}_setTextureOptions(e={}){let t={minFilter:LinearFilter,generateMipmaps:!1,flipY:!1,internalFormat:null};e.mapping!==void 0&&(t.mapping=e.mapping),e.wrapS!==void 0&&(t.wrapS=e.wrapS),e.wrapT!==void 0&&(t.wrapT=e.wrapT),e.wrapR!==void 0&&(t.wrapR=e.wrapR),e.magFilter!==void 0&&(t.magFilter=e.magFilter),e.minFilter!==void 0&&(t.minFilter=e.minFilter),e.format!==void 0&&(t.format=e.format),e.type!==void 0&&(t.type=e.type),e.anisotropy!==void 0&&(t.anisotropy=e.anisotropy),e.colorSpace!==void 0&&(t.colorSpace=e.colorSpace),e.flipY!==void 0&&(t.flipY=e.flipY),e.generateMipmaps!==void 0&&(t.generateMipmaps=e.generateMipmaps),e.internalFormat!==void 0&&(t.internalFormat=e.internalFormat);for(let e=0;e<this.textures.length;e++)this.textures[e].setValues(t)}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),e!==null&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let r=0,i=this.textures.length;r<i;r++)this.textures[r].image.width=e,this.textures[r].image.height=t,this.textures[r].image.depth=n,this.textures[r].isData3DTexture!==!0&&(this.textures[r].isArrayTexture=this.textures[r].image.depth>1);this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,n=e.textures.length;t<n;t++){this.textures[t]=e.textures[t].clone(),this.textures[t].isRenderTargetTexture=!0,this.textures[t].renderTarget=this;let n=Object.assign({},e.textures[t].image);this.textures[t].source=new Source(n)}return this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:`dispose`})}},WebGLRenderTarget=class extends RenderTarget{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}},DataArrayTexture=class extends Texture{constructor(e=null,t=1,n=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=NearestFilter,this.minFilter=NearestFilter,this.wrapR=ClampToEdgeWrapping,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}},Data3DTexture=class extends Texture{constructor(e=null,t=1,n=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=NearestFilter,this.minFilter=NearestFilter,this.wrapR=ClampToEdgeWrapping,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}},Matrix4=class e{constructor(t,n,r,i,a,o,s,c,l,u,d,f,p,m,g,_){e.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],t!==void 0&&this.set(t,n,r,i,a,o,s,c,l,u,d,f,p,m,g,_)}set(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,g){let _=this.elements;return _[0]=e,_[4]=t,_[8]=n,_[12]=r,_[1]=i,_[5]=a,_[9]=o,_[13]=s,_[2]=c,_[6]=l,_[10]=u,_[14]=d,_[3]=f,_[7]=p,_[11]=m,_[15]=g,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new e().fromArray(this.elements)}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){let t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){let t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return this.determinant()===0?(e.set(1,0,0),t.set(0,1,0),n.set(0,0,1),this):(e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this)}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){if(e.determinant()===0)return this.identity();let t=this.elements,n=e.elements,r=1/_v1$7.setFromMatrixColumn(e,0).length(),i=1/_v1$7.setFromMatrixColumn(e,1).length(),a=1/_v1$7.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=0,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){let t=this.elements,n=e.x,r=e.y,i=e.z,a=Math.cos(n),o=Math.sin(n),s=Math.cos(r),c=Math.sin(r),l=Math.cos(i),u=Math.sin(i);if(e.order===`XYZ`){let e=a*l,n=a*u,r=o*l,i=o*u;t[0]=s*l,t[4]=-s*u,t[8]=c,t[1]=n+r*c,t[5]=e-i*c,t[9]=-o*s,t[2]=i-e*c,t[6]=r+n*c,t[10]=a*s}else if(e.order===`YXZ`){let e=s*l,n=s*u,r=c*l,i=c*u;t[0]=e+i*o,t[4]=r*o-n,t[8]=a*c,t[1]=a*u,t[5]=a*l,t[9]=-o,t[2]=n*o-r,t[6]=i+e*o,t[10]=a*s}else if(e.order===`ZXY`){let e=s*l,n=s*u,r=c*l,i=c*u;t[0]=e-i*o,t[4]=-a*u,t[8]=r+n*o,t[1]=n+r*o,t[5]=a*l,t[9]=i-e*o,t[2]=-a*c,t[6]=o,t[10]=a*s}else if(e.order===`ZYX`){let e=a*l,n=a*u,r=o*l,i=o*u;t[0]=s*l,t[4]=r*c-n,t[8]=e*c+i,t[1]=s*u,t[5]=i*c+e,t[9]=n*c-r,t[2]=-c,t[6]=o*s,t[10]=a*s}else if(e.order===`YZX`){let e=a*s,n=a*c,r=o*s,i=o*c;t[0]=s*l,t[4]=i-e*u,t[8]=r*u+n,t[1]=u,t[5]=a*l,t[9]=-o*l,t[2]=-c*l,t[6]=n*u+r,t[10]=e-i*u}else if(e.order===`XZY`){let e=a*s,n=a*c,r=o*s,i=o*c;t[0]=s*l,t[4]=-u,t[8]=c*l,t[1]=e*u+i,t[5]=a*l,t[9]=n*u-r,t[2]=r*u-n,t[6]=o*l,t[10]=i*u+e}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(_zero,e,_one)}lookAt(e,t,n){let r=this.elements;return _z.subVectors(e,t),_z.lengthSq()===0&&(_z.z=1),_z.normalize(),_x.crossVectors(n,_z),_x.lengthSq()===0&&(Math.abs(n.z)===1?_z.x+=1e-4:_z.z+=1e-4,_z.normalize(),_x.crossVectors(n,_z)),_x.normalize(),_y.crossVectors(_z,_x),r[0]=_x.x,r[4]=_y.x,r[8]=_z.x,r[1]=_x.y,r[5]=_y.y,r[9]=_z.y,r[2]=_x.z,r[6]=_y.z,r[10]=_z.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,r=t.elements,i=this.elements,a=n[0],o=n[4],s=n[8],c=n[12],l=n[1],u=n[5],d=n[9],f=n[13],p=n[2],m=n[6],g=n[10],_=n[14],y=n[3],b=n[7],x=n[11],S=n[15],C=r[0],T=r[4],E=r[8],D=r[12],O=r[1],k=r[5],A=r[9],j=r[13],M=r[2],N=r[6],P=r[10],F=r[14],I=r[3],L=r[7],R=r[11],z=r[15];return i[0]=a*C+o*O+s*M+c*I,i[4]=a*T+o*k+s*N+c*L,i[8]=a*E+o*A+s*P+c*R,i[12]=a*D+o*j+s*F+c*z,i[1]=l*C+u*O+d*M+f*I,i[5]=l*T+u*k+d*N+f*L,i[9]=l*E+u*A+d*P+f*R,i[13]=l*D+u*j+d*F+f*z,i[2]=p*C+m*O+g*M+_*I,i[6]=p*T+m*k+g*N+_*L,i[10]=p*E+m*A+g*P+_*R,i[14]=p*D+m*j+g*F+_*z,i[3]=y*C+b*O+x*M+S*I,i[7]=y*T+b*k+x*N+S*L,i[11]=y*E+b*A+x*P+S*R,i[15]=y*D+b*j+x*F+S*z,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],a=e[1],o=e[5],s=e[9],c=e[13],l=e[2],u=e[6],d=e[10],f=e[14],p=e[3],m=e[7],g=e[11],_=e[15],y=s*f-c*d,b=o*f-c*u,x=o*d-s*u,S=a*f-c*l,C=a*d-s*l,T=a*u-o*l;return t*(m*y-g*b+_*x)-n*(p*y-g*S+_*C)+r*(p*b-m*S+_*T)-i*(p*x-m*C+g*T)}transpose(){let e=this.elements,t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){let r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],c=e[7],l=e[8],u=e[9],d=e[10],f=e[11],p=e[12],m=e[13],g=e[14],_=e[15],y=t*o-n*a,b=t*s-r*a,x=t*c-i*a,S=n*s-r*o,C=n*c-i*o,T=r*c-i*s,E=l*m-u*p,D=l*g-d*p,O=l*_-f*p,k=u*g-d*m,A=u*_-f*m,j=d*_-f*g,M=y*j-b*A+x*k+S*O-C*D+T*E;if(M===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let N=1/M;return e[0]=(o*j-s*A+c*k)*N,e[1]=(r*A-n*j-i*k)*N,e[2]=(m*T-g*C+_*S)*N,e[3]=(d*C-u*T-f*S)*N,e[4]=(s*O-a*j-c*D)*N,e[5]=(t*j-r*O+i*D)*N,e[6]=(g*x-p*T-_*b)*N,e[7]=(l*T-d*x+f*b)*N,e[8]=(a*A-o*O+c*E)*N,e[9]=(n*O-t*A-i*E)*N,e[10]=(p*C-m*x+_*y)*N,e[11]=(u*x-l*C-f*y)*N,e[12]=(o*D-a*k-s*E)*N,e[13]=(t*k-n*D+r*E)*N,e[14]=(m*b-p*S-g*y)*N,e[15]=(l*S-u*b+d*y)*N,this}scale(e){let t=this.elements,n=e.x,r=e.y,i=e.z;return t[0]*=n,t[4]*=r,t[8]*=i,t[1]*=n,t[5]*=r,t[9]*=i,t[2]*=n,t[6]*=r,t[10]*=i,t[3]*=n,t[7]*=r,t[11]*=i,this}getMaxScaleOnAxis(){let e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))}makeTranslation(e,t,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){let t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){let n=Math.cos(t),r=Math.sin(t),i=1-n,a=e.x,o=e.y,s=e.z,c=i*a,l=i*o;return this.set(c*a+n,c*o-r*s,c*s+r*o,0,c*o+r*s,l*o+n,l*s-r*a,0,c*s-r*o,l*s+r*a,i*s*s+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,i,a){return this.set(1,n,i,0,e,1,a,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){let r=this.elements,i=t._x,a=t._y,o=t._z,s=t._w,c=i+i,l=a+a,u=o+o,d=i*c,f=i*l,p=i*u,m=a*l,g=a*u,_=o*u,y=s*c,b=s*l,x=s*u,S=n.x,C=n.y,T=n.z;return r[0]=(1-(m+_))*S,r[1]=(f+x)*S,r[2]=(p-b)*S,r[3]=0,r[4]=(f-x)*C,r[5]=(1-(d+_))*C,r[6]=(g+y)*C,r[7]=0,r[8]=(p+b)*T,r[9]=(g-y)*T,r[10]=(1-(d+m))*T,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){let r=this.elements;e.x=r[12],e.y=r[13],e.z=r[14];let i=this.determinant();if(i===0)return n.set(1,1,1),t.identity(),this;let a=_v1$7.set(r[0],r[1],r[2]).length(),o=_v1$7.set(r[4],r[5],r[6]).length(),s=_v1$7.set(r[8],r[9],r[10]).length();i<0&&(a=-a),_m1$2.copy(this);let c=1/a,l=1/o,u=1/s;return _m1$2.elements[0]*=c,_m1$2.elements[1]*=c,_m1$2.elements[2]*=c,_m1$2.elements[4]*=l,_m1$2.elements[5]*=l,_m1$2.elements[6]*=l,_m1$2.elements[8]*=u,_m1$2.elements[9]*=u,_m1$2.elements[10]*=u,t.setFromRotationMatrix(_m1$2),n.x=a,n.y=o,n.z=s,this}makePerspective(e,t,n,r,i,a,o=WebGLCoordinateSystem,s=!1){let c=this.elements,l=2*i/(t-e),u=2*i/(n-r),d=(t+e)/(t-e),f=(n+r)/(n-r),p,m;if(s)p=i/(a-i),m=a*i/(a-i);else if(o===2e3)p=-(a+i)/(a-i),m=-2*a*i/(a-i);else if(o===2001)p=-a/(a-i),m=-a*i/(a-i);else throw Error(`THREE.Matrix4.makePerspective(): Invalid coordinate system: `+o);return c[0]=l,c[4]=0,c[8]=d,c[12]=0,c[1]=0,c[5]=u,c[9]=f,c[13]=0,c[2]=0,c[6]=0,c[10]=p,c[14]=m,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(e,t,n,r,i,a,o=WebGLCoordinateSystem,s=!1){let c=this.elements,l=2/(t-e),u=2/(n-r),d=-(t+e)/(t-e),f=-(n+r)/(n-r),p,m;if(s)p=1/(a-i),m=a/(a-i);else if(o===2e3)p=-2/(a-i),m=-(a+i)/(a-i);else if(o===2001)p=-1/(a-i),m=-i/(a-i);else throw Error(`THREE.Matrix4.makeOrthographic(): Invalid coordinate system: `+o);return c[0]=l,c[4]=0,c[8]=0,c[12]=d,c[1]=0,c[5]=u,c[9]=0,c[13]=f,c[2]=0,c[6]=0,c[10]=p,c[14]=m,c[3]=0,c[7]=0,c[11]=0,c[15]=1,this}equals(e){let t=this.elements,n=e.elements;for(let e=0;e<16;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}},_v1$7=new Vector3,_m1$2=new Matrix4,_zero=new Vector3(0,0,0),_one=new Vector3(1,1,1),_x=new Vector3,_y=new Vector3,_z=new Vector3,_matrix$2=new Matrix4,_quaternion$4=new Quaternion,Euler=class e{constructor(t=0,n=0,r=0,i=e.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=n,this._z=r,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,r=this._order){return this._x=e,this._y=t,this._z=n,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){let r=e.elements,i=r[0],a=r[4],o=r[8],s=r[1],c=r[5],l=r[9],u=r[2],d=r[6],f=r[10];switch(t){case`XYZ`:this._y=Math.asin(clamp(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-l,f),this._z=Math.atan2(-a,i)):(this._x=Math.atan2(d,c),this._z=0);break;case`YXZ`:this._x=Math.asin(-clamp(l,-1,1)),Math.abs(l)<.9999999?(this._y=Math.atan2(o,f),this._z=Math.atan2(s,c)):(this._y=Math.atan2(-u,i),this._z=0);break;case`ZXY`:this._x=Math.asin(clamp(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(-u,f),this._z=Math.atan2(-a,c)):(this._y=0,this._z=Math.atan2(s,i));break;case`ZYX`:this._y=Math.asin(-clamp(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(d,f),this._z=Math.atan2(s,i)):(this._x=0,this._z=Math.atan2(-a,c));break;case`YZX`:this._z=Math.asin(clamp(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-l,c),this._y=Math.atan2(-u,i)):(this._x=0,this._y=Math.atan2(o,f));break;case`XZY`:this._z=Math.asin(-clamp(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(d,c),this._y=Math.atan2(o,i)):(this._x=Math.atan2(-l,f),this._y=0);break;default:warn(`Euler: .setFromRotationMatrix() encountered an unknown order: `+t)}return this._order=t,n===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return _matrix$2.makeRotationFromQuaternion(e),this.setFromRotationMatrix(_matrix$2,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return _quaternion$4.setFromEuler(this),this.setFromQuaternion(_quaternion$4,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}};Euler.DEFAULT_ORDER=`XYZ`;var Layers=class{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!=0}},_object3DId=0,_v1$6=new Vector3,_q1=new Quaternion,_m1$1$1=new Matrix4,_target=new Vector3,_position$4=new Vector3,_scale$3=new Vector3,_quaternion$3=new Quaternion,_xAxis=new Vector3(1,0,0),_yAxis=new Vector3(0,1,0),_zAxis=new Vector3(0,0,1),_addedEvent={type:`added`},_removedEvent={type:`removed`},_childaddedEvent={type:`childadded`,child:null},_childremovedEvent={type:`childremoved`,child:null},Object3D=class e extends EventDispatcher{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:_object3DId++}),this.uuid=generateUUID(),this.name=``,this.type=`Object3D`,this.parent=null,this.children=[],this.up=e.DEFAULT_UP.clone();let t=new Vector3,n=new Euler,r=new Quaternion,i=new Vector3(1,1,1);function a(){r.setFromEuler(n,!1)}function o(){n.setFromQuaternion(r,void 0,!1)}n._onChange(a),r._onChange(o),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:n},quaternion:{configurable:!0,enumerable:!0,value:r},scale:{configurable:!0,enumerable:!0,value:i},modelViewMatrix:{value:new Matrix4},normalMatrix:{value:new Matrix3}}),this.matrix=new Matrix4,this.matrixWorld=new Matrix4,this.matrixAutoUpdate=e.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=e.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Layers,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.static=!1,this.userData={},this.pivot=null}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return _q1.setFromAxisAngle(e,t),this.quaternion.multiply(_q1),this}rotateOnWorldAxis(e,t){return _q1.setFromAxisAngle(e,t),this.quaternion.premultiply(_q1),this}rotateX(e){return this.rotateOnAxis(_xAxis,e)}rotateY(e){return this.rotateOnAxis(_yAxis,e)}rotateZ(e){return this.rotateOnAxis(_zAxis,e)}translateOnAxis(e,t){return _v1$6.copy(e).applyQuaternion(this.quaternion),this.position.add(_v1$6.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(_xAxis,e)}translateY(e){return this.translateOnAxis(_yAxis,e)}translateZ(e){return this.translateOnAxis(_zAxis,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(_m1$1$1.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?_target.copy(e):_target.set(e,t,n);let r=this.parent;this.updateWorldMatrix(!0,!1),_position$4.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?_m1$1$1.lookAt(_position$4,_target,this.up):_m1$1$1.lookAt(_target,_position$4,this.up),this.quaternion.setFromRotationMatrix(_m1$1$1),r&&(_m1$1$1.extractRotation(r.matrixWorld),_q1.setFromRotationMatrix(_m1$1$1),this.quaternion.premultiply(_q1.invert()))}add(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return e===this?(error(`Object3D.add: object can't be added as a child of itself.`,e),this):(e&&e.isObject3D?(e.removeFromParent(),e.parent=this,this.children.push(e),e.dispatchEvent(_addedEvent),_childaddedEvent.child=e,this.dispatchEvent(_childaddedEvent),_childaddedEvent.child=null):error(`Object3D.add: object not an instance of THREE.Object3D.`,e),this)}remove(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}let t=this.children.indexOf(e);return t!==-1&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(_removedEvent),_childremovedEvent.child=e,this.dispatchEvent(_childremovedEvent),_childremovedEvent.child=null),this}removeFromParent(){let e=this.parent;return e!==null&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),_m1$1$1.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),_m1$1$1.multiply(e.parent.matrixWorld)),e.applyMatrix4(_m1$1$1),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(_addedEvent),_childaddedEvent.child=e,this.dispatchEvent(_childaddedEvent),_childaddedEvent.child=null,this}getObjectById(e){return this.getObjectByProperty(`id`,e)}getObjectByName(e){return this.getObjectByProperty(`name`,e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let n=0,r=this.children.length;n<r;n++){let r=this.children[n].getObjectByProperty(e,t);if(r!==void 0)return r}}getObjectsByProperty(e,t,n=[]){this[e]===t&&n.push(this);let r=this.children;for(let i=0,a=r.length;i<a;i++)r[i].getObjectsByProperty(e,t,n);return n}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(_position$4,e,_scale$3),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(_position$4,_quaternion$3,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);let t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);let t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);let t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].traverseVisible(e)}traverseAncestors(e){let t=this.parent;t!==null&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale);let e=this.pivot;if(e!==null){let t=e.x,n=e.y,r=e.z,i=this.matrix.elements;i[12]+=t-i[0]*t-i[4]*n-i[8]*r,i[13]+=n-i[1]*t-i[5]*n-i[9]*r,i[14]+=r-i[2]*t-i[6]*n-i[10]*r}this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,e=!0);let t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].updateMatrixWorld(e)}updateWorldMatrix(e,t){let n=this.parent;if(e===!0&&n!==null&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),t===!0){let e=this.children;for(let t=0,n=e.length;t<n;t++)e[t].updateWorldMatrix(!1,!0)}}toJSON(e){let t=e===void 0||typeof e==`string`,n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.7,type:`Object`,generator:`Object3D.toJSON`});let r={};r.uuid=this.uuid,r.type=this.type,this.name!==``&&(r.name=this.name),this.castShadow===!0&&(r.castShadow=!0),this.receiveShadow===!0&&(r.receiveShadow=!0),this.visible===!1&&(r.visible=!1),this.frustumCulled===!1&&(r.frustumCulled=!1),this.renderOrder!==0&&(r.renderOrder=this.renderOrder),this.static!==!1&&(r.static=this.static),Object.keys(this.userData).length>0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),this.pivot!==null&&(r.pivot=this.pivot.toArray()),this.matrixAutoUpdate===!1&&(r.matrixAutoUpdate=!1),this.morphTargetDictionary!==void 0&&(r.morphTargetDictionary=Object.assign({},this.morphTargetDictionary)),this.morphTargetInfluences!==void 0&&(r.morphTargetInfluences=this.morphTargetInfluences.slice()),this.isInstancedMesh&&(r.type=`InstancedMesh`,r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(r.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(r.type=`BatchedMesh`,r.perObjectFrustumCulled=this.perObjectFrustumCulled,r.sortObjects=this.sortObjects,r.drawRanges=this._drawRanges,r.reservedRanges=this._reservedRanges,r.geometryInfo=this._geometryInfo.map(e=>({...e,boundingBox:e.boundingBox?e.boundingBox.toJSON():void 0,boundingSphere:e.boundingSphere?e.boundingSphere.toJSON():void 0})),r.instanceInfo=this._instanceInfo.map(e=>({...e})),r.availableInstanceIds=this._availableInstanceIds.slice(),r.availableGeometryIds=this._availableGeometryIds.slice(),r.nextIndexStart=this._nextIndexStart,r.nextVertexStart=this._nextVertexStart,r.geometryCount=this._geometryCount,r.maxInstanceCount=this._maxInstanceCount,r.maxVertexCount=this._maxVertexCount,r.maxIndexCount=this._maxIndexCount,r.geometryInitialized=this._geometryInitialized,r.matricesTexture=this._matricesTexture.toJSON(e),r.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(r.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(r.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(r.boundingBox=this.boundingBox.toJSON()));function i(t,n){return t[n.uuid]===void 0&&(t[n.uuid]=n.toJSON(e)),n.uuid}if(this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=i(e.geometries,this.geometry);let t=this.geometry.parameters;if(t!==void 0&&t.shapes!==void 0){let n=t.shapes;if(Array.isArray(n))for(let t=0,r=n.length;t<r;t++){let r=n[t];i(e.shapes,r)}else i(e.shapes,n)}}if(this.isSkinnedMesh&&(r.bindMode=this.bindMode,r.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(i(e.skeletons,this.skeleton),r.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){let t=[];for(let n=0,r=this.material.length;n<r;n++)t.push(i(e.materials,this.material[n]));r.material=t}else r.material=i(e.materials,this.material);
vendor: 11,297 bytes, line 11
11if(this.children.length>0){r.children=[];for(let t=0;t<this.children.length;t++)r.children.push(this.children[t].toJSON(e).object)}if(this.animations.length>0){r.animations=[];for(let t=0;t<this.animations.length;t++){let n=this.animations[t];r.animations.push(i(e.animations,n))}}if(t){let t=a(e.geometries),r=a(e.materials),i=a(e.textures),o=a(e.images),s=a(e.shapes),c=a(e.skeletons),l=a(e.animations),u=a(e.nodes);t.length>0&&(n.geometries=t),r.length>0&&(n.materials=r),i.length>0&&(n.textures=i),o.length>0&&(n.images=o),s.length>0&&(n.shapes=s),c.length>0&&(n.skeletons=c),l.length>0&&(n.animations=l),u.length>0&&(n.nodes=u)}return n.object=r,n;function a(e){let t=[];for(let n in e){let r=e[n];delete r.metadata,t.push(r)}return t}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),e.pivot!==null&&(this.pivot=e.pivot.clone()),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.static=e.static,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let t=0;t<e.children.length;t++){let n=e.children[t];this.add(n.clone())}return this}};Object3D.DEFAULT_UP=new Vector3(0,1,0),Object3D.DEFAULT_MATRIX_AUTO_UPDATE=!0,Object3D.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;var Group=class extends Object3D{constructor(){super(),this.isGroup=!0,this.type=`Group`}},_moveEvent={type:`move`},WebXRController=class{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Group,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Group,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Vector3,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Vector3),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Group,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Vector3,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Vector3),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){let t=this._hand;if(t)for(let n of e.hand.values())this._getHandJoint(t,n)}return this.dispatchEvent({type:`connected`,data:e}),this}disconnect(e){return this.dispatchEvent({type:`disconnected`,data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,n){let r=null,i=null,a=null,o=this._targetRay,s=this._grip,c=this._hand;if(e&&t.session.visibilityState!==`visible-blurred`){if(c&&e.hand){a=!0;for(let r of e.hand.values()){let e=t.getJointPose(r,n),i=this._getHandJoint(c,r);e!==null&&(i.matrix.fromArray(e.transform.matrix),i.matrix.decompose(i.position,i.rotation,i.scale),i.matrixWorldNeedsUpdate=!0,i.jointRadius=e.radius),i.visible=e!==null}let r=c.joints[`index-finger-tip`],i=c.joints[`thumb-tip`],o=r.position.distanceTo(i.position),s=.02,l=.005;c.inputState.pinching&&o>.025?(c.inputState.pinching=!1,this.dispatchEvent({type:`pinchend`,handedness:e.handedness,target:this})):!c.inputState.pinching&&o<=.015&&(c.inputState.pinching=!0,this.dispatchEvent({type:`pinchstart`,handedness:e.handedness,target:this}))}else s!==null&&e.gripSpace&&(i=t.getPose(e.gripSpace,n),i!==null&&(s.matrix.fromArray(i.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),s.matrixWorldNeedsUpdate=!0,i.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(i.linearVelocity)):s.hasLinearVelocity=!1,i.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(i.angularVelocity)):s.hasAngularVelocity=!1));o!==null&&(r=t.getPose(e.targetRaySpace,n),r===null&&i!==null&&(r=i),r!==null&&(o.matrix.fromArray(r.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,r.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(r.linearVelocity)):o.hasLinearVelocity=!1,r.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(r.angularVelocity)):o.hasAngularVelocity=!1,this.dispatchEvent(_moveEvent)))}return o!==null&&(o.visible=r!==null),s!==null&&(s.visible=i!==null),c!==null&&(c.visible=a!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){let n=new Group;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}},_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},_hslA={h:0,s:0,l:0},_hslB={h:0,s:0,l:0};function hue2rgb(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*6*(2/3-n):e}var Color=class{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(t===void 0&&n===void 0){let t=e;t&&t.isColor?this.copy(t):typeof t==`number`?this.setHex(t):typeof t==`string`&&this.setStyle(t)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=SRGBColorSpace){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,ColorManagement.colorSpaceToWorking(this,t),this}setRGB(e,t,n,r=ColorManagement.workingColorSpace){return this.r=e,this.g=t,this.b=n,ColorManagement.colorSpaceToWorking(this,r),this}setHSL(e,t,n,r=ColorManagement.workingColorSpace){if(e=euclideanModulo(e,1),t=clamp(t,0,1),n=clamp(n,0,1),t===0)this.r=this.g=this.b=n;else{let r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=hue2rgb(i,r,e+1/3),this.g=hue2rgb(i,r,e),this.b=hue2rgb(i,r,e-1/3)}return ColorManagement.colorSpaceToWorking(this,r),this}setStyle(e,t=SRGBColorSpace){function n(t){t!==void 0&&parseFloat(t)<1&&warn(`Color: Alpha component of `+e+` will be ignored.`)}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let i,a=r[1],o=r[2];switch(a){case`rgb`:case`rgba`:if(i=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(i[4]),this.setRGB(Math.min(255,parseInt(i[1],10))/255,Math.min(255,parseInt(i[2],10))/255,Math.min(255,parseInt(i[3],10))/255,t);if(i=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(i[4]),this.setRGB(Math.min(100,parseInt(i[1],10))/100,Math.min(100,parseInt(i[2],10))/100,Math.min(100,parseInt(i[3],10))/100,t);break;case`hsl`:case`hsla`:if(i=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(i[4]),this.setHSL(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,t);break;default:warn(`Color: Unknown color model `+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){let n=r[1],i=n.length;if(i===3)return this.setRGB(parseInt(n.charAt(0),16)/15,parseInt(n.charAt(1),16)/15,parseInt(n.charAt(2),16)/15,t);if(i===6)return this.setHex(parseInt(n,16),t);warn(`Color: Invalid hex color `+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=SRGBColorSpace){let n=_colorKeywords[e.toLowerCase()];return n===void 0?warn(`Color: Unknown color `+e):this.setHex(n,t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=SRGBToLinear(e.r),this.g=SRGBToLinear(e.g),this.b=SRGBToLinear(e.b),this}copyLinearToSRGB(e){return this.r=LinearToSRGB(e.r),this.g=LinearToSRGB(e.g),this.b=LinearToSRGB(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=SRGBColorSpace){return ColorManagement.workingToColorSpace(_color.copy(this),e),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(e=SRGBColorSpace){return(`000000`+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=ColorManagement.workingColorSpace){ColorManagement.workingToColorSpace(_color.copy(this),t);let n=_color.r,r=_color.g,i=_color.b,a=Math.max(n,r,i),o=Math.min(n,r,i),s,c,l=(o+a)/2;
vendor: 13,710 bytes, line 11
11if(o===a)s=0,c=0;else{let e=a-o;switch(c=l<=.5?e/(a+o):e/(2-a-o),a){case n:s=(r-i)/e+(r<i?6:0);break;case r:s=(i-n)/e+2;break;case i:s=(n-r)/e+4;break}s/=6}return e.h=s,e.s=c,e.l=l,e}getRGB(e,t=ColorManagement.workingColorSpace){return ColorManagement.workingToColorSpace(_color.copy(this),t),e.r=_color.r,e.g=_color.g,e.b=_color.b,e}getStyle(e=SRGBColorSpace){ColorManagement.workingToColorSpace(_color.copy(this),e);let t=_color.r,n=_color.g,r=_color.b;return e===`srgb`?`rgb(${Math.round(t*255)},${Math.round(n*255)},${Math.round(r*255)})`:`color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${r.toFixed(3)})`}offsetHSL(e,t,n){return this.getHSL(_hslA),this.setHSL(_hslA.h+e,_hslA.s+t,_hslA.l+n)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(_hslA),e.getHSL(_hslB);let n=lerp(_hslA.h,_hslB.h,t),r=lerp(_hslA.s,_hslB.s,t),i=lerp(_hslA.l,_hslB.l,t);return this.setHSL(n,r,i),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){let t=this.r,n=this.g,r=this.b,i=e.elements;return this.r=i[0]*t+i[3]*n+i[6]*r,this.g=i[1]*t+i[4]*n+i[7]*r,this.b=i[2]*t+i[5]*n+i[8]*r,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}},_color=new Color;Color.NAMES=_colorKeywords;var Scene=class extends Object3D{constructor(){super(),this.isScene=!0,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,typeof __THREE_DEVTOOLS__<`u`&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent(`observe`,{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){let t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}},_v0$2=new Vector3,_v1$5=new Vector3,_v2$4=new Vector3,_v3$2=new Vector3,_vab=new Vector3,_vac=new Vector3,_vbc=new Vector3,_vap=new Vector3,_vbp=new Vector3,_vcp=new Vector3,_v40=new Vector4,_v41=new Vector4,_v42=new Vector4,Triangle=class e{constructor(e=new Vector3,t=new Vector3,n=new Vector3){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,r){r.subVectors(n,t),_v0$2.subVectors(e,t),r.cross(_v0$2);let i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}static getBarycoord(e,t,n,r,i){_v0$2.subVectors(r,t),_v1$5.subVectors(n,t),_v2$4.subVectors(e,t);let a=_v0$2.dot(_v0$2),o=_v0$2.dot(_v1$5),s=_v0$2.dot(_v2$4),c=_v1$5.dot(_v1$5),l=_v1$5.dot(_v2$4),u=a*c-o*o;if(u===0)return i.set(0,0,0),null;let d=1/u,f=(c*s-o*l)*d,p=(a*l-o*s)*d;return i.set(1-f-p,p,f)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,_v3$2)===null?!1:_v3$2.x>=0&&_v3$2.y>=0&&_v3$2.x+_v3$2.y<=1}static getInterpolation(e,t,n,r,i,a,o,s){return this.getBarycoord(e,t,n,r,_v3$2)===null?(s.x=0,s.y=0,`z`in s&&(s.z=0),`w`in s&&(s.w=0),null):(s.setScalar(0),s.addScaledVector(i,_v3$2.x),s.addScaledVector(a,_v3$2.y),s.addScaledVector(o,_v3$2.z),s)}static getInterpolatedAttribute(e,t,n,r,i,a){return _v40.setScalar(0),_v41.setScalar(0),_v42.setScalar(0),_v40.fromBufferAttribute(e,t),_v41.fromBufferAttribute(e,n),_v42.fromBufferAttribute(e,r),a.setScalar(0),a.addScaledVector(_v40,i.x),a.addScaledVector(_v41,i.y),a.addScaledVector(_v42,i.z),a}static isFrontFacing(e,t,n,r){return _v0$2.subVectors(n,t),_v1$5.subVectors(e,t),_v0$2.cross(_v1$5).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return _v0$2.subVectors(this.c,this.b),_v1$5.subVectors(this.a,this.b),_v0$2.cross(_v1$5).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return e.getNormal(this.a,this.b,this.c,t)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,n){return e.getBarycoord(t,this.a,this.b,this.c,n)}getInterpolation(t,n,r,i,a){return e.getInterpolation(t,this.a,this.b,this.c,n,r,i,a)}containsPoint(t){return e.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return e.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){let n=this.a,r=this.b,i=this.c,a,o;_vab.subVectors(r,n),_vac.subVectors(i,n),_vap.subVectors(e,n);let s=_vab.dot(_vap),c=_vac.dot(_vap);if(s<=0&&c<=0)return t.copy(n);_vbp.subVectors(e,r);let l=_vab.dot(_vbp),u=_vac.dot(_vbp);if(l>=0&&u<=l)return t.copy(r);let d=s*u-l*c;if(d<=0&&s>=0&&l<=0)return a=s/(s-l),t.copy(n).addScaledVector(_vab,a);_vcp.subVectors(e,i);let f=_vab.dot(_vcp),p=_vac.dot(_vcp);if(p>=0&&f<=p)return t.copy(i);let m=f*c-s*p;if(m<=0&&c>=0&&p<=0)return o=c/(c-p),t.copy(n).addScaledVector(_vac,o);let g=l*p-f*u;if(g<=0&&u-l>=0&&f-p>=0)return _vbc.subVectors(i,r),o=(u-l)/(u-l+(f-p)),t.copy(r).addScaledVector(_vbc,o);let _=1/(g+m+d);return a=m*_,o=d*_,t.copy(n).addScaledVector(_vab,a).addScaledVector(_vac,o)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}},Box3=class{constructor(e=new Vector3(1/0,1/0,1/0),t=new Vector3(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t+=3)this.expandByPoint(_vector$b.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(_vector$b.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){let n=_vector$b.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);let n=e.geometry;if(n!==void 0){let r=n.getAttribute(`position`);if(t===!0&&r!==void 0&&e.isInstancedMesh!==!0)for(let t=0,n=r.count;t<n;t++)e.isMesh===!0?e.getVertexPosition(t,_vector$b):_vector$b.fromBufferAttribute(r,t),_vector$b.applyMatrix4(e.matrixWorld),this.expandByPoint(_vector$b);else e.boundingBox===void 0?(n.boundingBox===null&&n.computeBoundingBox(),_box$4.copy(n.boundingBox)):(e.boundingBox===null&&e.computeBoundingBox(),_box$4.copy(e.boundingBox)),_box$4.applyMatrix4(e.matrixWorld),this.union(_box$4)}let r=e.children;for(let e=0,n=r.length;e<n;e++)this.expandByObject(r[e],t);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,_vector$b),_vector$b.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(_center),_extents.subVectors(this.max,_center),_v0$1.subVectors(e.a,_center),_v1$4.subVectors(e.b,_center),_v2$3.subVectors(e.c,_center),_f0.subVectors(_v1$4,_v0$1),_f1.subVectors(_v2$3,_v1$4),_f2.subVectors(_v0$1,_v2$3);let t=[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];return!satForAxes(t,_v0$1,_v1$4,_v2$3,_extents)||(t=[1,0,0,0,1,0,0,0,1],!satForAxes(t,_v0$1,_v1$4,_v2$3,_extents))?!1:(_triangleNormal.crossVectors(_f0,_f1),t=[_triangleNormal.x,_triangleNormal.y,_triangleNormal.z],satForAxes(t,_v0$1,_v1$4,_v2$3,_extents))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,_vector$b).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(_vector$b).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(_points[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),_points[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),_points[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),_points[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),_points[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),_points[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),_points[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),_points[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(_points),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}},_points=[new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3],_vector$b=new Vector3,_box$4=new Box3,_v0$1=new Vector3,_v1$4=new Vector3,_v2$3=new Vector3,_f0=new Vector3,_f1=new Vector3,_f2=new Vector3,_center=new Vector3,_extents=new Vector3,_triangleNormal=new Vector3,_testAxis=new Vector3;function satForAxes(e,t,n,r,i){for(let a=0,o=e.length-3;a<=o;a+=3){_testAxis.fromArray(e,a);let o=i.x*Math.abs(_testAxis.x)+i.y*Math.abs(_testAxis.y)+i.z*Math.abs(_testAxis.z),s=t.dot(_testAxis),c=n.dot(_testAxis),l=r.dot(_testAxis);if(Math.max(-Math.max(s,c,l),Math.min(s,c,l))>o)return!1}return!0}var _vector$a=new Vector3,_vector2$1=new Vector2,_id$2=0,BufferAttribute=class{constructor(e,t,n=!1){if(Array.isArray(e))throw TypeError(`THREE.BufferAttribute: array should be a Typed Array.`);this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:_id$2++}),this.name=``,this.array=e,this.itemSize=t,this.count=e===void 0?0:e.length/t,this.normalized=n,this.usage=StaticDrawUsage,this.updateRanges=[],this.gpuType=FloatType,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;
vendor: 4,569 bytes, line 11
11for(let r=0,i=this.itemSize;r<i;r++)this.array[e+r]=t.array[n+r];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,n=this.count;t<n;t++)_vector2$1.fromBufferAttribute(this,t),_vector2$1.applyMatrix3(e),this.setXY(t,_vector2$1.x,_vector2$1.y);else if(this.itemSize===3)for(let t=0,n=this.count;t<n;t++)_vector$a.fromBufferAttribute(this,t),_vector$a.applyMatrix3(e),this.setXYZ(t,_vector$a.x,_vector$a.y,_vector$a.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)_vector$a.fromBufferAttribute(this,t),_vector$a.applyMatrix4(e),this.setXYZ(t,_vector$a.x,_vector$a.y,_vector$a.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)_vector$a.fromBufferAttribute(this,t),_vector$a.applyNormalMatrix(e),this.setXYZ(t,_vector$a.x,_vector$a.y,_vector$a.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)_vector$a.fromBufferAttribute(this,t),_vector$a.transformDirection(e),this.setXYZ(t,_vector$a.x,_vector$a.y,_vector$a.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let n=this.array[e*this.itemSize+t];return this.normalized&&(n=denormalize(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=normalize(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=denormalize(t,this.array)),t}setX(e,t){return this.normalized&&(t=normalize(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=denormalize(t,this.array)),t}setY(e,t){return this.normalized&&(t=normalize(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=denormalize(t,this.array)),t}setZ(e,t){return this.normalized&&(t=normalize(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=denormalize(t,this.array)),t}setW(e,t){return this.normalized&&(t=normalize(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=normalize(t,this.array),n=normalize(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,r){return e*=this.itemSize,this.normalized&&(t=normalize(t,this.array),n=normalize(n,this.array),r=normalize(r,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this}setXYZW(e,t,n,r,i){return e*=this.itemSize,this.normalized&&(t=normalize(t,this.array),n=normalize(n,this.array),r=normalize(r,this.array),i=normalize(i,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this.array[e+3]=i,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){let e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==``&&(e.name=this.name),this.usage!==35044&&(e.usage=this.usage),e}},Uint16BufferAttribute=class extends BufferAttribute{constructor(e,t,n){super(new Uint16Array(e),t,n)}},Uint32BufferAttribute=class extends BufferAttribute{constructor(e,t,n){super(new Uint32Array(e),t,n)}},Float32BufferAttribute=class extends BufferAttribute{constructor(e,t,n){super(new Float32Array(e),t,n)}},_box$3=new Box3,_v1$3=new Vector3,_v2$2=new Vector3,Sphere=class{constructor(e=new Vector3,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){let n=this.center;t===void 0?_box$3.setFromPoints(e).getCenter(n):n.copy(t);let r=0;for(let t=0,i=e.length;t<i;t++)r=Math.max(r,n.distanceToSquared(e[t]));return this.radius=Math.sqrt(r),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){let t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){let n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}
vendor: 11,808 bytes, line 11
11applyMatrix4(e){return this.center.applyMatrix4(e),this.radius*=e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;_v1$3.subVectors(e,this.center);let t=_v1$3.lengthSq();if(t>this.radius*this.radius){let e=Math.sqrt(t),n=(e-this.radius)*.5;this.center.addScaledVector(_v1$3,n/e),this.radius+=n}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(_v2$2.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(_v1$3.copy(e.center).add(_v2$2)),this.expandByPoint(_v1$3.copy(e.center).sub(_v2$2))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}},_id$1=0,_m1$3=new Matrix4,_obj=new Object3D,_offset=new Vector3,_box$2=new Box3,_boxMorphTargets=new Box3,_vector$9=new Vector3,BufferGeometry=class e extends EventDispatcher{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:_id$1++}),this.uuid=generateUUID(),this.name=``,this.type=`BufferGeometry`,this.index=null,this.indirect=null,this.indirectOffset=0,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(arrayNeedsUint32(e)?Uint32BufferAttribute:Uint16BufferAttribute)(e,1):this.index=e,this}setIndirect(e,t=0){return this.indirect=e,this.indirectOffset=t,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){let t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);let n=this.attributes.normal;if(n!==void 0){let t=new Matrix3().getNormalMatrix(e);n.applyNormalMatrix(t),n.needsUpdate=!0}let r=this.attributes.tangent;return r!==void 0&&(r.transformDirection(e),r.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return _m1$3.makeRotationFromQuaternion(e),this.applyMatrix4(_m1$3),this}rotateX(e){return _m1$3.makeRotationX(e),this.applyMatrix4(_m1$3),this}rotateY(e){return _m1$3.makeRotationY(e),this.applyMatrix4(_m1$3),this}rotateZ(e){return _m1$3.makeRotationZ(e),this.applyMatrix4(_m1$3),this}translate(e,t,n){return _m1$3.makeTranslation(e,t,n),this.applyMatrix4(_m1$3),this}scale(e,t,n){return _m1$3.makeScale(e,t,n),this.applyMatrix4(_m1$3),this}lookAt(e){return _obj.lookAt(e),_obj.updateMatrix(),this.applyMatrix4(_obj.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(_offset).negate(),this.translate(_offset.x,_offset.y,_offset.z),this}setFromPoints(e){let t=this.getAttribute(`position`);if(t===void 0){let t=[];for(let n=0,r=e.length;n<r;n++){let r=e[n];t.push(r.x,r.y,r.z||0)}this.setAttribute(`position`,new Float32BufferAttribute(t,3))}else{let n=Math.min(e.length,t.count);for(let r=0;r<n;r++){let n=e[r];t.setXYZ(r,n.x,n.y,n.z||0)}e.length>t.count&&warn(`BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry.`),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Box3);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){error(`BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.`,this),this.boundingBox.set(new Vector3(-1/0,-1/0,-1/0),new Vector3(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e<n;e++){let n=t[e];_box$2.setFromBufferAttribute(n),this.morphTargetsRelative?(_vector$9.addVectors(this.boundingBox.min,_box$2.min),this.boundingBox.expandByPoint(_vector$9),_vector$9.addVectors(this.boundingBox.max,_box$2.max),this.boundingBox.expandByPoint(_vector$9)):(this.boundingBox.expandByPoint(_box$2.min),this.boundingBox.expandByPoint(_box$2.max))}}else this.boundingBox.makeEmpty();(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(){this.boundingSphere===null&&(this.boundingSphere=new Sphere);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){error(`BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.`,this),this.boundingSphere.set(new Vector3,1/0);return}if(e){let n=this.boundingSphere.center;if(_box$2.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e<n;e++){let n=t[e];_boxMorphTargets.setFromBufferAttribute(n),this.morphTargetsRelative?(_vector$9.addVectors(_box$2.min,_boxMorphTargets.min),_box$2.expandByPoint(_vector$9),_vector$9.addVectors(_box$2.max,_boxMorphTargets.max),_box$2.expandByPoint(_vector$9)):(_box$2.expandByPoint(_boxMorphTargets.min),_box$2.expandByPoint(_boxMorphTargets.max))}_box$2.getCenter(n);let r=0;for(let t=0,i=e.count;t<i;t++)_vector$9.fromBufferAttribute(e,t),r=Math.max(r,n.distanceToSquared(_vector$9));if(t)for(let i=0,a=t.length;i<a;i++){let a=t[i],o=this.morphTargetsRelative;for(let t=0,i=a.count;t<i;t++)_vector$9.fromBufferAttribute(a,t),o&&(_offset.fromBufferAttribute(e,t),_vector$9.add(_offset)),r=Math.max(r,n.distanceToSquared(_vector$9))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&error(`BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.`,this)}}computeTangents(){let e=this.index,t=this.attributes;if(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0){error(`BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)`);return}let n=t.position,r=t.normal,i=t.uv;this.hasAttribute(`tangent`)===!1&&this.setAttribute(`tangent`,new BufferAttribute(new Float32Array(4*n.count),4));let a=this.getAttribute(`tangent`),o=[],s=[];for(let e=0;e<n.count;e++)o[e]=new Vector3,s[e]=new Vector3;let c=new Vector3,l=new Vector3,u=new Vector3,d=new Vector2,f=new Vector2,p=new Vector2,m=new Vector3,g=new Vector3;function _(e,t,r){c.fromBufferAttribute(n,e),l.fromBufferAttribute(n,t),u.fromBufferAttribute(n,r),d.fromBufferAttribute(i,e),f.fromBufferAttribute(i,t),p.fromBufferAttribute(i,r),l.sub(c),u.sub(c),f.sub(d),p.sub(d);let a=1/(f.x*p.y-p.x*f.y);isFinite(a)&&(m.copy(l).multiplyScalar(p.y).addScaledVector(u,-f.y).multiplyScalar(a),g.copy(u).multiplyScalar(f.x).addScaledVector(l,-p.x).multiplyScalar(a),o[e].add(m),o[t].add(m),o[r].add(m),s[e].add(g),s[t].add(g),s[r].add(g))}let y=this.groups;y.length===0&&(y=[{start:0,count:e.count}]);for(let t=0,n=y.length;t<n;++t){let n=y[t],r=n.start,i=n.count;for(let t=r,n=r+i;t<n;t+=3)_(e.getX(t+0),e.getX(t+1),e.getX(t+2))}let b=new Vector3,x=new Vector3,S=new Vector3,C=new Vector3;function T(e){S.fromBufferAttribute(r,e),C.copy(S);let t=o[e];b.copy(t),b.sub(S.multiplyScalar(S.dot(t))).normalize(),x.crossVectors(C,t);let n=x.dot(s[e])<0?-1:1;a.setXYZW(e,b.x,b.y,b.z,n)}for(let t=0,n=y.length;t<n;++t){let n=y[t],r=n.start,i=n.count;for(let t=r,n=r+i;t<n;t+=3)T(e.getX(t+0)),T(e.getX(t+1)),T(e.getX(t+2))}}computeVertexNormals(){let e=this.index,t=this.getAttribute(`position`);if(t!==void 0){let n=this.getAttribute(`normal`);if(n===void 0)n=new BufferAttribute(new Float32Array(t.count*3),3),this.setAttribute(`normal`,n);else for(let e=0,t=n.count;e<t;e++)n.setXYZ(e,0,0,0);let r=new Vector3,i=new Vector3,a=new Vector3,o=new Vector3,s=new Vector3,c=new Vector3,l=new Vector3,u=new Vector3;if(e)for(let d=0,f=e.count;d<f;d+=3){let f=e.getX(d+0),p=e.getX(d+1),m=e.getX(d+2);r.fromBufferAttribute(t,f),i.fromBufferAttribute(t,p),a.fromBufferAttribute(t,m),l.subVectors(a,i),u.subVectors(r,i),l.cross(u),o.fromBufferAttribute(n,f),s.fromBufferAttribute(n,p),c.fromBufferAttribute(n,m),o.add(l),s.add(l),c.add(l),n.setXYZ(f,o.x,o.y,o.z),n.setXYZ(p,s.x,s.y,s.z),n.setXYZ(m,c.x,c.y,c.z)}else for(let e=0,o=t.count;e<o;e+=3)r.fromBufferAttribute(t,e+0),i.fromBufferAttribute(t,e+1),a.fromBufferAttribute(t,e+2),l.subVectors(a,i),u.subVectors(r,i),l.cross(u),n.setXYZ(e+0,l.x,l.y,l.z),n.setXYZ(e+1,l.x,l.y,l.z),n.setXYZ(e+2,l.x,l.y,l.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){let e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)_vector$9.fromBufferAttribute(e,t),_vector$9.normalize(),e.setXYZ(t,_vector$9.x,_vector$9.y,_vector$9.z)}toNonIndexed(){function t(e,t){let n=e.array,r=e.itemSize,i=e.normalized,a=new n.constructor(t.length*r),o=0,s=0;for(let i=0,c=t.length;i<c;i++){o=e.isInterleavedBufferAttribute?t[i]*e.data.stride+e.offset:t[i]*r;for(let e=0;e<r;e++)a[s++]=n[o++]}return new BufferAttribute(a,r,i)}if(this.index===null)return warn(`BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed.`),this;let n=new e,r=this.index.array,i=this.attributes;for(let e in i){let a=i[e],o=t(a,r);n.setAttribute(e,o)}let a=this.morphAttributes;for(let e in a){let i=[],o=a[e];for(let e=0,n=o.length;e<n;e++){let n=o[e],a=t(n,r);i.push(a)}n.morphAttributes[e]=i}n.morphTargetsRelative=this.morphTargetsRelative;let o=this.groups;for(let e=0,t=o.length;e<t;e++){let t=o[e];n.addGroup(t.start,t.count,t.materialIndex)}return n}toJSON(){let e={metadata:{version:4.7,type:`BufferGeometry`,generator:`BufferGeometry.toJSON`}};if(e.uuid=this.uuid,e.type=this.type,this.name!==``&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){let t=this.parameters;for(let n in t)t[n]!==void 0&&(e[n]=t[n]);return e}e.data={attributes:{}};let t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});let n=this.attributes;for(let t in n){let r=n[t];e.data.attributes[t]=r.toJSON(e.data)}let r={},i=!1;for(let t in this.morphAttributes){let n=this.morphAttributes[t],a=[];for(let t=0,r=n.length;t<r;t++){let r=n[t];a.push(r.toJSON(e.data))}a.length>0&&(r[t]=a,i=!0)}i&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);let a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));let o=this.boundingSphere;return o!==null&&(e.data.boundingSphere=o.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let t={};this.name=e.name;let n=e.index;n!==null&&this.setIndex(n.clone());let r=e.attributes;for(let e in r){let n=r[e];this.setAttribute(e,n.clone(t))}let i=e.morphAttributes;for(let e in i){let n=[],r=i[e];for(let e=0,i=r.length;e<i;e++)n.push(r[e].clone(t));this.morphAttributes[e]=n}this.morphTargetsRelative=e.morphTargetsRelative;let a=e.groups;for(let e=0,t=a.length;e<t;e++){let t=a[e];this.addGroup(t.start,t.count,t.materialIndex)}let o=e.boundingBox;o!==null&&(this.boundingBox=o.clone());let s=e.boundingSphere;return s!==null&&(this.boundingSphere=s.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:`dispose`})}}
vendor: 1,546 bytes, line 11
11,_materialId=0,Material=class extends EventDispatcher{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:_materialId++}),this.uuid=generateUUID(),this.name=``,this.type=`Material`,this.blending=1,this.side=0,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=100,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new Color(0,0,0),this.blendAlpha=0,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=KeepStencilOp,this.stencilZFail=KeepStencilOp,this.stencilZPass=KeepStencilOp,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(let t in e){let n=e[t];if(n===void 0){warn(`Material: parameter '${t}' has value of undefined.`);continue}let r=this[t];if(r===void 0){warn
vendor: 10,041 bytes, line 11
11(`Material: '${t}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n}}toJSON(e){let t=e===void 0||typeof e==`string`;t&&(e={textures:{},images:{}});let n={metadata:{version:4.7,type:`Material`,generator:`Material.toJSON`}};n.uuid=this.uuid,n.type=this.type,this.name!==``&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(n.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(n.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==1&&(n.blending=this.blending),this.side!==0&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==204&&(n.blendSrc=this.blendSrc),this.blendDst!==205&&(n.blendDst=this.blendDst),this.blendEquation!==100&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==3&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==519&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==7680&&(n.stencilFail=this.stencilFail),this.stencilZFail!==7680&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==7680&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.allowOverride===!1&&(n.allowOverride=!1),this.wireframe===!0&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!==`round`&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!==`round`&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function r(e){let t=[];for(let n in e){let r=e[n];delete r.metadata,t.push(r)}return t}if(t){let t=r(e.textures),i=r(e.images);t.length>0&&(n.textures=t),i.length>0&&(n.images=i)}return n}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;let t=e.clippingPlanes,n=null;if(t!==null){let e=t.length;n=Array(e);for(let r=0;r!==e;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.allowOverride=e.allowOverride,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:`dispose`})}set needsUpdate(e){e===!0&&this.version++}},
vendor: 7,961 bytes, line 11
11_vector$7=new Vector3,_segCenter=new Vector3,_segDir=new Vector3,_diff=new Vector3,_edge1=new Vector3,_edge2=new Vector3,_normal$1=new Vector3,Ray=class{constructor(e=new Vector3,t=new Vector3(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,_vector$7)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);let n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=_vector$7.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(_vector$7.copy(this.origin).addScaledVector(this.direction,t),_vector$7.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){_segCenter.copy(e).add(t).multiplyScalar(.5),_segDir.copy(t).sub(e).normalize(),_diff.copy(this.origin).sub(_segCenter);let i=e.distanceTo(t)*.5,a=-this.direction.dot(_segDir),o=_diff.dot(this.direction),s=-_diff.dot(_segDir),c=_diff.lengthSq(),l=Math.abs(1-a*a),u,d,f,p;if(l>0)if(u=a*s-o,d=a*o-s,p=i*l,u>=0)if(d>=-p)if(d<=p){let e=1/l;u*=e,d*=e,f=u*(u+a*d+2*o)+d*(a*u+d+2*s)+c}else d=i,u=Math.max(0,-(a*d+o)),f=-u*u+d*(d+2*s)+c;else d=-i,u=Math.max(0,-(a*d+o)),f=-u*u+d*(d+2*s)+c;else d<=-p?(u=Math.max(0,-(-a*i+o)),d=u>0?-i:Math.min(Math.max(-i,-s),i),f=-u*u+d*(d+2*s)+c):d<=p?(u=0,d=Math.min(Math.max(-i,-s),i),f=d*(d+2*s)+c):(u=Math.max(0,-(a*i+o)),d=u>0?i:Math.min(Math.max(-i,-s),i),f=-u*u+d*(d+2*s)+c);else d=a>0?-i:i,u=Math.max(0,-(a*d+o)),f=-u*u+d*(d+2*s)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,u),r&&r.copy(_segCenter).addScaledVector(_segDir,d),f}intersectSphere(e,t){_vector$7.subVectors(e.center,this.origin);let n=_vector$7.dot(this.direction),r=_vector$7.dot(_vector$7)-n*n,i=e.radius*e.radius;if(r>i)return null;let a=Math.sqrt(i-r),o=n-a,s=n+a;return s<0?null:o<0?this.at(s,t):this.at(o,t)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){let t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;let n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){let n=this.distanceToPlane(e);return n===null?null:this.at(n,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,i,a,o,s,c=1/this.direction.x,l=1/this.direction.y,u=1/this.direction.z,d=this.origin;return c>=0?(n=(e.min.x-d.x)*c,r=(e.max.x-d.x)*c):(n=(e.max.x-d.x)*c,r=(e.min.x-d.x)*c),l>=0?(i=(e.min.y-d.y)*l,a=(e.max.y-d.y)*l):(i=(e.max.y-d.y)*l,a=(e.min.y-d.y)*l),n>a||i>r||((i>n||isNaN(n))&&(n=i),(a<r||isNaN(r))&&(r=a),u>=0?(o=(e.min.z-d.z)*u,s=(e.max.z-d.z)*u):(o=(e.max.z-d.z)*u,s=(e.min.z-d.z)*u),n>s||o>r)||((o>n||n!==n)&&(n=o),(s<r||r!==r)&&(r=s),r<0)?null:this.at(n>=0?n:r,t)}intersectsBox(e){return this.intersectBox(e,_vector$7)!==null}intersectTriangle(e,t,n,r,i){_edge1.subVectors(t,e),_edge2.subVectors(n,e),_normal$1.crossVectors(_edge1,_edge2);let a=this.direction.dot(_normal$1),o;if(a>0){if(r)return null;o=1}else if(a<0)o=-1,a=-a;else return null;_diff.subVectors(this.origin,e);let s=o*this.direction.dot(_edge2.crossVectors(_diff,_edge2));if(s<0)return null;let c=o*this.direction.dot(_edge1.cross(_diff));if(c<0||s+c>a)return null;let l=-o*_diff.dot(_normal$1);return l<0?null:this.at(l/a,i)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},MeshBasicMaterial=class extends Material{constructor(e){super(),this.isMeshBasicMaterial=!0,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=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap=`round`,this.wireframeLinejoin=`round`,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}},_inverseMatrix$3=new Matrix4,_ray$3=new Ray,_sphere$6=new Sphere,_sphereHitAt=new Vector3,_vA=new Vector3,_vB=new Vector3,_vC=new Vector3,_tempA=new Vector3,_morphA=new Vector3,_intersectionPoint=new Vector3,_intersectionPointWorld=new Vector3,Mesh=class extends Object3D{constructor(e=new BufferGeometry,t=new MeshBasicMaterial){super(),this.isMesh=!0,this.type=`Mesh`,this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){let e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){let n=e[t[0]];if(n!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e<t;e++){let t=n[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}getVertexPosition(e,t){let n=this.geometry,r=n.attributes.position,i=n.morphAttributes.position,a=n.morphTargetsRelative;t.fromBufferAttribute(r,e);let o=this.morphTargetInfluences;if(i&&o){_morphA.set(0,0,0);for(let n=0,r=i.length;n<r;n++){let r=o[n],s=i[n];r!==0&&(_tempA.fromBufferAttribute(s,e),a?_morphA.addScaledVector(_tempA,r):_morphA.addScaledVector(_tempA.sub(t),r))}t.add(_morphA)}return t}raycast(e,t){let n=this.geometry,r=this.material,i=this.matrixWorld;r!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),_sphere$6.copy(n.boundingSphere),_sphere$6.applyMatrix4(i),_ray$3.copy(e.ray).recast(e.near),!(_sphere$6.containsPoint(_ray$3.origin)===!1&&(_ray$3.intersectSphere(_sphere$6,_sphereHitAt)===null||_ray$3.origin.distanceToSquared(_sphereHitAt)>(e.far-e.near)**2))&&(_inverseMatrix$3.copy(i).invert(),_ray$3.copy(e.ray).applyMatrix4(_inverseMatrix$3),!(n.boundingBox!==null&&_ray$3.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,_ray$3)))}_computeIntersections(e,t,n){let r,i=this.geometry,a=this.material,o=i.index,s=i.attributes.position,c=i.attributes.uv,l=i.attributes.uv1,u=i.attributes.normal,d=i.groups,f=i.drawRange;if(o!==null)if(Array.isArray(a))for(let i=0,s=d.length;i<s;i++){let s=d[i],p=a[s.materialIndex],m=Math.max(s.start,f.start),g=Math.min(o.count,Math.min(s.start+s.count,f.start+f.count));for(let i=m,a=g;i<a;i+=3){let a=o.getX(i),d=o.getX(i+1),f=o.getX(i+2);r=checkGeometryIntersection(this,p,e,n,c,l,u,a,d,f),r&&(r.faceIndex=Math.floor(i/3),r.face.materialIndex=s.materialIndex,t.push(r))}}else{let i=Math.max(0,f.start),s=Math.min(o.count,f.start+f.count);for(let d=i,f=s;d<f;d+=3){let i=o.getX(d),s=o.getX(d+1),f=o.getX(d+2);r=checkGeometryIntersection(this,a,e,n,c,l,u,i,s,f),r&&(r.faceIndex=Math.floor(d/3),t.pu
vendor: 4,190 bytes, line 11
11sh(r))}}else if(s!==void 0)if(Array.isArray(a))for(let i=0,o=d.length;i<o;i++){let o=d[i],p=a[o.materialIndex],m=Math.max(o.start,f.start),g=Math.min(s.count,Math.min(o.start+o.count,f.start+f.count));for(let i=m,a=g;i<a;i+=3){let a=i,s=i+1,d=i+2;r=checkGeometryIntersection(this,p,e,n,c,l,u,a,s,d),r&&(r.faceIndex=Math.floor(i/3),r.face.materialIndex=o.materialIndex,t.push(r))}}else{let i=Math.max(0,f.start),o=Math.min(s.count,f.start+f.count);for(let s=i,d=o;s<d;s+=3){let i=s,o=s+1,d=s+2;r=checkGeometryIntersection(this,a,e,n,c,l,u,i,o,d),r&&(r.faceIndex=Math.floor(s/3),t.push(r))}}}};function checkIntersection$1(e,t,n,r,i,a,o,s){let c;if(c=t.side===1?r.intersectTriangle(o,a,i,!0,s):r.intersectTriangle(i,a,o,t.side===0,s),c===null)return null;_intersectionPointWorld.copy(s),_intersectionPointWorld.applyMatrix4(e.matrixWorld);let l=n.ray.origin.distanceTo(_intersectionPointWorld);return l<n.near||l>n.far?null:{distance:l,point:_intersectionPointWorld.clone(),object:e}}function checkGeometryIntersection(e,t,n,r,i,a,o,s,c,l){e.getVertexPosition(s,_vA),e.getVertexPosition(c,_vB),e.getVertexPosition(l,_vC);let u=checkIntersection$1(e,t,n,r,_vA,_vB,_vC,_intersectionPoint);if(u){let e=new Vector3;Triangle.getBarycoord(_intersectionPoint,_vA,_vB,_vC,e),i&&(u.uv=Triangle.getInterpolatedAttribute(i,s,c,l,e,new Vector2)),a&&(u.uv1=Triangle.getInterpolatedAttribute(a,s,c,l,e,new Vector2)),o&&(u.normal=Triangle.getInterpolatedAttribute(o,s,c,l,e,new Vector3),u.normal.dot(r.direction)>0&&u.normal.multiplyScalar(-1));let t={a:s,b:c,c:l,normal:new Vector3,materialIndex:0};Triangle.getNormal(_vA,_vB,_vC,t.normal),u.face=t,u.barycoord=e}return u}var DataTexture=class extends Texture{constructor(e=null,t=1,n=1,r,i,a,o,s,c=NearestFilter,l=NearestFilter,u,d){super(null,a,o,s,c,l,r,i,u,d),this.isDataTexture=!0,this.image={data:e,width:t,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}},_vector1=new Vector3,_vector2=new Vector3,_normalMatrix=new Matrix3,Plane=class{constructor(e=new Vector3(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){let r=_vector1.subVectors(n,t).cross(_vector2.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){let e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){let n=e.delta(_vector1),r=this.normal.dot(n);if(r===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;let i=-(e.start.dot(this.normal)+this.constant)/r;return i<0||i>1?null:t.copy(e.start).addScaledVector(n,i)}intersectsLine(e){let t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){let n=t||_normalMatrix.getNormalMatrix(e),r=this.coplanarPoint(_vector1).applyMatrix4(e),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}},_sphere$3=new Sphere,_defaultSpriteCenter=new Vector2(.5,.5),_vector$6=new Vector3,Frustum=class{constructor(e=new Plane,t=new Plane,n=new Plane,r=new Plane,i=new Plane,a=new Plane){this.planes=[e,t,n,r,i,a]}set(e,t,n,r,i,a){let o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(n),o[3].copy(r),o[4].copy(i),o[5].copy(a),this}copy(e){let t=this.planes;for(let n=0;n<6;
vendor: 5,115 bytes, line 11
11n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e,t=WebGLCoordinateSystem,n=!1){let r=this.planes,i=e.elements,a=i[0],o=i[1],s=i[2],c=i[3],l=i[4],u=i[5],d=i[6],f=i[7],p=i[8],m=i[9],g=i[10],_=i[11],y=i[12],b=i[13],x=i[14],S=i[15];if(r[0].setComponents(c-a,f-l,_-p,S-y).normalize(),r[1].setComponents(c+a,f+l,_+p,S+y).normalize(),r[2].setComponents(c+o,f+u,_+m,S+b).normalize(),r[3].setComponents(c-o,f-u,_-m,S-b).normalize(),n)r[4].setComponents(s,d,g,x).normalize(),r[5].setComponents(c-s,f-d,_-g,S-x).normalize();else if(r[4].setComponents(c-s,f-d,_-g,S-x).normalize(),t===2e3)r[5].setComponents(c+s,f+d,_+g,S+x).normalize();else if(t===2001)r[5].setComponents(s,d,g,x).normalize();else throw Error(`THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: `+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),_sphere$3.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{let t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),_sphere$3.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(_sphere$3)}intersectsSprite(e){return _sphere$3.center.set(0,0,0),_sphere$3.radius=.7071067811865476+_defaultSpriteCenter.distanceTo(e.center),_sphere$3.applyMatrix4(e.matrixWorld),this.intersectsSphere(_sphere$3)}intersectsSphere(e){let t=this.planes,n=e.center,r=-e.radius;for(let e=0;e<6;e++)if(t[e].distanceToPoint(n)<r)return!1;return!0}intersectsBox(e){let t=this.planes;for(let n=0;n<6;n++){let r=t[n];if(_vector$6.x=r.normal.x>0?e.max.x:e.min.x,_vector$6.y=r.normal.y>0?e.max.y:e.min.y,_vector$6.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(_vector$6)<0)return!1}return!0}containsPoint(e){let t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}},PointsMaterial=class extends Material{constructor(e){super(),this.isPointsMaterial=!0,this.type=`PointsMaterial`,this.color=new Color(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}},_inverseMatrix=new Matrix4,_ray=new Ray,_sphere=new Sphere,_position$3=new Vector3,Points=class extends Object3D{constructor(e=new BufferGeometry,t=new PointsMaterial){super(),this.isPoints=!0,this.type=`Points`,this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}raycast(e,t){let n=this.geometry,r=this.matrixWorld,i=e.params.Points.threshold,a=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),_sphere.copy(n.boundingSphere),_sphere.applyMatrix4(r),_sphere.radius+=i,e.ray.intersectsSphere(_sphere)===!1)return;_inverseMatrix.copy(r).invert(),_ray.copy(e.ray).applyMatrix4(_inverseMatrix);let o=i/((this.scale.x+this.scale.y+this.scale.z)/3),s=o*o,c=n.index,l=n.attributes.position;if(c!==null){let n=Math.max(0,a.start),i=Math.min(c.count,a.start+a.count);for(let a=n,o=i;a<o;a++){let n=c.getX(a);_position$3.fromBufferAttribute(l,n),testPoint(_position$3,n,s,r,e,t,this)}}else{let n=Math.max(0,a.start),i=Math.min(l.count,a.start+a.count);for(let a=n,o=i;a<o;a++)_position$3.fromBufferAttribute(l,a),testPoint(_position$3,a,s,r,e,t,this)}}updateMorphTargets(){let e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){let n=e[t[0]];if(n!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e<t;e++){let t=n[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}};function testPoint(e,t,n,r,i,a,o){let s=_ray.distanceSqToPoint(e);if(s<n){let n=new Vector3;_ray.closestPointToPoint(e,n),n.applyMatrix4(r);let c=i.ray.origin.distanceTo(n);if(c<i.near||c>i.far)return;a.push({distance:c,distanceToRay:Math.sqrt(s),point:n,index:t,face:null,faceIndex:null,barycoord:null,object:o})}}var CubeTexture=class extends Texture{constructor(e=[],t=301,n,r,i,a,o,s,c,l){super(e,t,n,r,i,a,o,s,c,l),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}},DepthTexture=class extends Texture{constructor(e,t,n=UnsignedIntType,r,i,a,o=NearestFilter,s=NearestFilter,c,l=DepthFormat,u=1){if(l!==1026&&l!==1027)throw Error(`DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat`);super({width:e,height:t,depth:u},r,i,a,o,s,l,n,c),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new Source(Object.assign({},e.image)),this.compareFunction=e.compareFunction,this}toJSON(e){let t=super.toJSON(e);return this.compareFunction!==null&&(t.compareFunction=this.compareFunction),t}},CubeDepthTexture=class extends DepthTexture{constructor(e,t=UnsignedIntType,n=301,r,i,a=NearestFilter,o=NearestFilter,s,c=DepthF
vendor: 7,116 bytes, lines 11-15
11ormat){let l={width:e,height:e,depth:1},u=[l,l,l,l,l,l];super(e,e,t,n,r,i,a,o,s,c),this.image=u,this.isCubeDepthTexture=!0,this.isCubeTexture=!0}get images(){return this.image}set images(e){this.image=e}},ExternalTexture=class extends Texture{constructor(e=null){super(),this.sourceTexture=e,this.isExternalTexture=!0}copy(e){return super.copy(e),this.sourceTexture=e.sourceTexture,this}},BoxGeometry=class e extends BufferGeometry{constructor(e=1,t=1,n=1,r=1,i=1,a=1){super(),this.type=`BoxGeometry`,this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:a};let o=this;r=Math.floor(r),i=Math.floor(i),a=Math.floor(a);let s=[],c=[],l=[],u=[],d=0,f=0;p(`z`,`y`,`x`,-1,-1,n,t,e,a,i,0),p(`z`,`y`,`x`,1,-1,n,t,-e,a,i,1),p(`x`,`z`,`y`,1,1,e,n,t,r,a,2),p(`x`,`z`,`y`,1,-1,e,n,-t,r,a,3),p(`x`,`y`,`z`,1,-1,e,t,n,r,i,4),p(`x`,`y`,`z`,-1,-1,e,t,-n,r,i,5),this.setIndex(s),this.setAttribute(`position`,new Float32BufferAttribute(c,3)),this.setAttribute(`normal`,new Float32BufferAttribute(l,3)),this.setAttribute(`uv`,new Float32BufferAttribute(u,2));function p(e,t,n,r,i,a,p,m,g,_,y){let b=a/g,x=p/_,S=a/2,C=p/2,T=m/2,E=g+1,D=_+1,O=0,k=0,A=new Vector3;for(let a=0;a<D;a++){let o=a*x-C;for(let s=0;s<E;s++)A[e]=(s*b-S)*r,A[t]=o*i,A[n]=T,c.push(A.x,A.y,A.z),A[e]=0,A[t]=0,A[n]=m>0?1:-1,l.push(A.x,A.y,A.z),u.push(s/g),u.push(1-a/_),O+=1}for(let e=0;e<_;e++)for(let t=0;t<g;t++){let n=d+t+E*e,r=d+t+E*(e+1),i=d+(t+1)+E*(e+1),a=d+(t+1)+E*e;s.push(n,r,a),s.push(r,i,a),k+=6}o.addGroup(f,k,y),f+=k,d+=O}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(t){return new e(t.width,t.height,t.depth,t.widthSegments,t.heightSegments,t.depthSegments)}},PlaneGeometry=class e extends BufferGeometry{constructor(e=1,t=1,n=1,r=1){super(),this.type=`PlaneGeometry`,this.parameters={width:e,height:t,widthSegments:n,heightSegments:r};let i=e/2,a=t/2,o=Math.floor(n),s=Math.floor(r),c=o+1,l=s+1,u=e/o,d=t/s,f=[],p=[],m=[],g=[];for(let e=0;e<l;e++){let t=e*d-a;for(let n=0;n<c;n++){let r=n*u-i;p.push(r,-t,0),m.push(0,0,1),g.push(n/o),g.push(1-e/s)}}for(let e=0;e<s;e++)for(let t=0;t<o;t++){let n=t+c*e,r=t+c*(e+1),i=t+1+c*(e+1),a=t+1+c*e;f.push(n,r,a),f.push(r,i,a)}this.setIndex(f),this.setAttribute(`position`,new Float32BufferAttribute(p,3)),this.setAttribute(`normal`,new Float32BufferAttribute(m,3)),this.setAttribute(`uv`,new Float32BufferAttribute(g,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(t){return new e(t.width,t.height,t.widthSegments,t.heightSegments)}},SphereGeometry=class e extends BufferGeometry{constructor(e=1,t=32,n=16,r=0,i=Math.PI*2,a=0,o=Math.PI){super(),this.type=`SphereGeometry`,this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:r,phiLength:i,thetaStart:a,thetaLength:o},t=Math.max(3,Math.floor(t)),n=Math.max(2,Math.floor(n));let s=Math.min(a+o,Math.PI),c=0,l=[],u=new Vector3,d=new Vector3,f=[],p=[],m=[],g=[];for(let f=0;f<=n;f++){let _=[],y=f/n,b=0;f===0&&a===0?b=.5/t:f===n&&s===Math.PI&&(b=-.5/t);for(let n=0;n<=t;n++){let s=n/t;u.x=-e*Math.cos(r+s*i)*Math.sin(a+y*o),u.y=e*Math.cos(a+y*o),u.z=e*Math.sin(r+s*i)*Math.sin(a+y*o),p.push(u.x,u.y,u.z),d.copy(u).normalize(),m.push(d.x,d.y,d.z),g.push(s+b,1-y),_.push(c++)}l.push(_)}for(let e=0;e<n;e++)for(let r=0;r<t;r++){let t=l[e][r+1],i=l[e][r],o=l[e+1][r],c=l[e+1][r+1];(e!==0||a>0)&&f.push(t,i,c),(e!==n-1||s<Math.PI)&&f.push(i,o,c)}this.setIndex(f),this.setAttribute(`position`,new Float32BufferAttribute(p,3)),this.setAttribute(`normal`,new Float32BufferAttribute(m,3)),this.setAttribute(`uv`,new Float32BufferAttribute(g,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(t){return new e(t.radius,t.widthSegments,t.heightSegments,t.phiStart,t.phiLength,t.thetaStart,t.thetaLength)}};function cloneUniforms(e){let t={};for(let n in e){t[n]={};for(let r in e[n]){let i=e[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture||i.isQuaternion)?i.isRenderTargetTexture?(warn(`UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms().`),t[n][r]=null):t[n][r]=i.clone():Array.isArray(i)?t[n][r]=i.slice():t[n][r]=i}}return t}function mergeUniforms(e){let t={};for(let n=0;n<e.length;n++){let r=cloneUniforms(e[n]);for(let e in r)t[e]=r[e]}return t}function cloneUniformsGroups(e){let t=[];for(let n=0;n<e.length;n++)t.push(e[n].clone());return t}function getUnlitUniformColorSpace(e){let t=e.getRenderTarget();return t===null?e.outputColorSpace:t.isXRRenderTarget===!0?t.texture.colorSpace:ColorManagement.workingColorSpace}var UniformsUtils={clone:cloneUniforms,merge:mergeUniforms},default_vertex=`void main() { 12 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 13}`,default_fragment=`void main() { 14 gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 ); 15}`,ShaderMaterial=class extends Material{constructor(e){super(),this.isShaderMaterial=!0,this.type=`ShaderMaterial`,this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=default_vertex,this.fragmentShader=default_fragment,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,e!==void 0&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=cloneUniforms(e.uniforms),this.uniformsGroups=cloneUniformsGroups(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this.defaultAttributeValues=Object.assign({},e.defaultAttributeValues),this.index0AttributeName=e.index0AttributeName,this.uniformsNeedUpdate=e.uniformsNeedUpdate,this}toJSON(e){let t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(let n in this.uniforms){let r=this.uniforms[n].value;r&&r.isTexture?t.uniforms[n]={type:`t`,value:r.toJSON(e).uuid}:r&&r.isColor?t.uniforms[n]={type:`c`,value:r.getHex()}:r&&r.isVector2?t.uniforms[n]={type:`v2`,value:r.toArray()}:r&&r.isVector3?t.uniforms[n]={type:`v3`,value:r.toArray()}:r&&r.isVector4?t.uniforms[n]={type:`v4`,value:r.toArray()}:r&&r.isMatrix3?t.uniforms[n]={type:`m3`,value:r.toArray()}:r&&r.isMatrix4?t.uniforms[n]={type:`m4`,value:r.toArray()}:t.uniforms[n]={value:r}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;let n={};for(let e in this.extensions)this.extensions[e]===!0&&(n[e]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}},RawShaderMaterial=class extends ShaderMaterial{constructor(e){super(e),this.isRawShaderMaterial=!0,this.type=`RawS
15haderMaterial`}},MeshDepthMaterial=class extends Material{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type=`MeshDepthMaterial`,this.depthPacking=BasicDepthPacking,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}},MeshDistanceMaterial=class extends Material{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type=`MeshDistanceMaterial`,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}};function convertArray(e,t){return!e||e.constructor===t?e:typeof t.BYTES_PER_ELEMENT==`number`?new t(e):Array.prototype.slice.call(e)}var Interpolant=class{constructor(e,t,n,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=r===void 0?new t.constructor(n):r,this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){let t=this.parameterPositions,n=this._cachedIndex,r=t[n],i=t[n-1];validate_interval:{seek:{let a;linear_scan:{forward_scan:if(!(e<r)){for(let a=n+2;;){if(r===void 0){if(e<i)break forward_scan;return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===a)break;if(i=r,r=t[++n],e<r)break seek}a=t.length;break linear_scan}if(!(e>=i)){let o=t[1];e<o&&(n=2,i=o);for(let a=n-2;;){if(i===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(n===a)break;if(r=i,i=t[--n-1],e>=i)break seek}a=n,n=0;break linear_scan}break validate_interval}for(;n<a;){let r=n+a>>>1;e<t[r]?a=r:n=r+1}if(r=t[n],i=t[n-1],i===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(r===void 0)return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,e,r)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){let t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r;for(let e=0;e!==r;++e)t[e]=n[i+e];return t}interpolate_(){throw Error(`call to abstract method`)}intervalChanged_(){}},CubicInterpolant=class extends Interpolant{constructor(e,t,n,r){super(e,t,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:ZeroCurvatureEnding,endingEnd:ZeroCurvatureEnding}}intervalChanged_(e,t,n){let r=this.parameterPositions,i=e-2,a=e+1,o=r[i],s=r[a];if(o===void 0)switch(this.getSettings_().endingStart){case ZeroSlopeEnding:i=e,o=2*t-n;break;case WrapAroundEnding:i=r.length-2,o=t+r[i]-r[i+1];break;default:i=e,o=n}if(s===void 0)switch(this.getSettings_().endingEnd){case ZeroSlopeEnding:a=e,s=2*n-t;break;case WrapAroundEnding:a=1,s=n+r[1]-r[0];break;default:a=e-1,s=t}let c=(n-t)*.5,l=this.valueSize;this._weightPrev=c/(t-o),this._weightNext=c/(s-n),this._offsetPrev=i*l,this._offsetNext=a*l}interpolate_(e,t,n,r){let i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=e*o,c=s-o,l=this._offsetPrev,u=this._offsetNext,d=this._weightPrev,f=this._weightNext,p=(n-t)/(r-t),m=p*p,g=m*p,_=-d*g+2*d*m-d*p,y=(1+d)*g+(-1.5-2*d)*m+(-.5+d)*p+1,b=(-1-f)*g+(1.5+f)*m+.5*p,x=f*g-f*m;for(let e=0;e!==o;++e)i[e]=_*a[l+e]+y*a[c+e]+b*a[s+e]+x*a[u+e];return i}},LinearInterpolant=class extends Interpolant{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){let i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=e*o,c=s-o,l=(n-t)/(r-t),u=1-l;for(let e=0;e!==o;++e)i[e]=a[c+e]*u+a[s+e]*l;return i}},DiscreteInterpolant=class extends Interpolant{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e){return this.copySampleValue_(e-1)}},BezierInterpolant=class extends Interpolant{interpolate_(e,t,n,r){let i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=e*o,c=s-o,l=this.settings||this.DefaultSettings_,u=l.inTangents,d=l.outTangents;if(!u||!d){let e=(n-t)/(r-t),l=1-e;for(let t=0;t!==o;++t)i[t]=a[c+t]*l+a[s+t]*e;return i}let f=o*2,p=e-1;for(let l=0;l!==o;++l){let o=a[c+l],m=a[s+l],g=p*f+l*2,_=d[g],y=d[g+1],b=e*f+l*2,x=u[b],S=u[b+1
vendor: 11,929 bytes, line 15
15],C=(n-t)/(r-t),T,E,D,O,k;for(let e=0;e<8;e++){T=C*C,E=T*C,D=1-C,O=D*D,k=O*D;let e=k*t+3*O*C*_+3*D*T*x+E*r-n;if(Math.abs(e)<1e-10)break;let i=3*O*(_-t)+6*D*C*(x-_)+3*T*(r-x);if(Math.abs(i)<1e-10)break;C-=e/i,C=Math.max(0,Math.min(1,C))}i[l]=k*o+3*O*C*y+3*D*T*S+E*m}return i}},KeyframeTrack=class{constructor(e,t,n,r){if(e===void 0)throw Error(`THREE.KeyframeTrack: track name is undefined`);if(t===void 0||t.length===0)throw Error(`THREE.KeyframeTrack: no keyframes in track named `+e);this.name=e,this.times=convertArray(t,this.TimeBufferType),this.values=convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}static toJSON(e){let t=e.constructor,n;if(t.toJSON!==this.toJSON)n=t.toJSON(e);else{n={name:e.name,times:convertArray(e.times,Array),values:convertArray(e.values,Array)};let t=e.getInterpolation();t!==e.DefaultInterpolation&&(n.interpolation=t)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new DiscreteInterpolant(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new LinearInterpolant(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new CubicInterpolant(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodBezier(e){let t=new BezierInterpolant(this.times,this.values,this.getValueSize(),e);return this.settings&&(t.settings=this.settings),t}setInterpolation(e){let t;switch(e){case InterpolateDiscrete:t=this.InterpolantFactoryMethodDiscrete;break;case InterpolateLinear:t=this.InterpolantFactoryMethodLinear;break;case InterpolateSmooth:t=this.InterpolantFactoryMethodSmooth;break;case InterpolateBezier:t=this.InterpolantFactoryMethodBezier;break}if(t===void 0){let t=`unsupported interpolation for `+this.ValueTypeName+` keyframe track named `+this.name;if(this.createInterpolant===void 0)if(e!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw Error(t);return warn(`KeyframeTrack:`,t),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return InterpolateDiscrete;case this.InterpolantFactoryMethodLinear:return InterpolateLinear;case this.InterpolantFactoryMethodSmooth:return InterpolateSmooth;case this.InterpolantFactoryMethodBezier:return InterpolateBezier}}getValueSize(){return this.values.length/this.times.length}shift(e){if(e!==0){let t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]+=e}return this}scale(e){if(e!==1){let t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]*=e}return this}trim(e,t){let n=this.times,r=n.length,i=0,a=r-1;for(;i!==r&&n[i]<e;)++i;for(;a!==-1&&n[a]>t;)--a;if(++a,i!==0||a!==r){i>=a&&(a=Math.max(a,1),i=a-1);let e=this.getValueSize();this.times=n.slice(i,a),this.values=this.values.slice(i*e,a*e)}return this}validate(){let e=!0,t=this.getValueSize();t-Math.floor(t)!==0&&(error(`KeyframeTrack: Invalid value size in track.`,this),e=!1);let n=this.times,r=this.values,i=n.length;i===0&&(error(`KeyframeTrack: Track is empty.`,this),e=!1);let a=null;for(let t=0;t!==i;t++){let r=n[t];if(typeof r==`number`&&isNaN(r)){error(`KeyframeTrack: Time is not a valid number.`,this,t,r),e=!1;break}if(a!==null&&a>r){error(`KeyframeTrack: Out of order keys.`,this,t,r,a),e=!1;break}a=r}if(r!==void 0&&isTypedArray(r))for(let t=0,n=r.length;t!==n;++t){let n=r[t];if(isNaN(n)){error(`KeyframeTrack: Value is not a valid number.`,this,t,n),e=!1;break}}return e}optimize(){let e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),r=this.getInterpolation()===InterpolateSmooth,i=e.length-1,a=1;for(let o=1;o<i;++o){let i=!1,s=e[o];if(s!==e[o+1]&&(o!==1||s!==e[0]))if(r)i=!0;else{let e=o*n,r=e-n,a=e+n;for(let o=0;o!==n;++o){let n=t[e+o];if(n!==t[r+o]||n!==t[a+o]){i=!0;break}}}if(i){if(o!==a){e[a]=e[o];let r=o*n,i=a*n;for(let e=0;e!==n;++e)t[i+e]=t[r+e]}++a}}if(i>0){e[a]=e[i];for(let e=i*n,r=a*n,o=0;o!==n;++o)t[r+o]=t[e+o];++a}return a===e.length?(this.times=e,this.values=t):(this.times=e.slice(0,a),this.values=t.slice(0,a*n)),this}clone(){let e=this.times.slice(),t=this.values.slice(),n=this.constructor,r=new n(this.name,e,t);return r.createInterpolant=this.createInterpolant,r}};KeyframeTrack.prototype.ValueTypeName=``,KeyframeTrack.prototype.TimeBufferType=Float32Array,KeyframeTrack.prototype.ValueBufferType=Float32Array,KeyframeTrack.prototype.DefaultInterpolation=InterpolateLinear;var BooleanKeyframeTrack=class extends KeyframeTrack{constructor(e,t,n){super(e,t,n)}};BooleanKeyframeTrack.prototype.ValueTypeName=`bool`,BooleanKeyframeTrack.prototype.ValueBufferType=Array,BooleanKeyframeTrack.prototype.DefaultInterpolation=InterpolateDiscrete,BooleanKeyframeTrack.prototype.InterpolantFactoryMethodLinear=void 0,BooleanKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=void 0;var ColorKeyframeTrack=class extends KeyframeTrack{constructor(e,t,n,r){super(e,t,n,r)}};ColorKeyframeTrack.prototype.ValueTypeName=`color`;var NumberKeyframeTrack=class extends KeyframeTrack{constructor(e,t,n,r){super(e,t,n,r)}};NumberKeyframeTrack.prototype.ValueTypeName=`number`;var QuaternionLinearInterpolant=class extends Interpolant{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){let i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=(n-t)/(r-t),c=e*o;for(let e=c+o;c!==e;c+=4)Quaternion.slerpFlat(i,0,a,c-o,a,c,s);return i}},QuaternionKeyframeTrack=class extends KeyframeTrack{constructor(e,t,n,r){super(e,t,n,r)}InterpolantFactoryMethodLinear(e){return new QuaternionLinearInterpolant(this.times,this.values,this.getValueSize(),e)}};QuaternionKeyframeTrack.prototype.ValueTypeName=`quaternion`,QuaternionKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=void 0;var StringKeyframeTrack=class extends KeyframeTrack{constructor(e,t,n){super(e,t,n)}};StringKeyframeTrack.prototype.ValueTypeName=`string`,StringKeyframeTrack.prototype.ValueBufferType=Array,StringKeyframeTrack.prototype.DefaultInterpolation=InterpolateDiscrete,StringKeyframeTrack.prototype.InterpolantFactoryMethodLinear=void 0,StringKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=void 0;var VectorKeyframeTrack=class extends KeyframeTrack{constructor(e,t,n,r){super(e,t,n,r)}};VectorKeyframeTrack.prototype.ValueTypeName=`vector`;var LoadingManager=class{constructor(e,t,n){let r=this,i=!1,a=0,o=0,s,c=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this._abortController=null,this.itemStart=function(e){o++,i===!1&&r.onStart!==void 0&&r.onStart(e,a,o),i=!0},this.itemEnd=function(e){a++,r.onProgress!==void 0&&r.onProgress(e,a,o),a===o&&(i=!1,r.onLoad!==void 0&&r.onLoad())},this.itemError=function(e){r.onError!==void 0&&r.onError(e)},this.resolveURL=function(e){return s?s(e):e},this.setURLModifier=function(e){return s=e,this},this.addHandler=function(e,t){return c.push(e,t),this},this.removeHandler=function(e){let t=c.indexOf(e);return t!==-1&&c.splice(t,2),this},this.getHandler=function(e){for(let t=0,n=c.length;t<n;t+=2){let n=c[t],r=c[t+1];if(n.global&&(n.lastIndex=0),n.test(e))return r}return null},this.abort=function(){return this.abortController.abort(),this._abortController=null,this}}get abortController(){return this._abortController||=new AbortController,this._abortController}},DefaultLoadingManager=new LoadingManager,Loader=class{constructor(e){this.manager=e===void 0?DefaultLoadingManager:e,this.crossOrigin=`anonymous`,this.withCredentials=!1,this.path=``,this.resourcePath=``,this.requestHeader={},typeof __THREE_DEVTOOLS__<`u`&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent(`observe`,{detail:this}))}load(){}loadAsync(e,t){let n=this;return new Promise(function(r,i){n.load(e,r,t,i)})}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}abort(){return this}};Loader.DEFAULT_MATERIAL_NAME=`__DEFAULT`;var _position$2=new Vector3,_quaternion$2=new Quaternion,_scale$2=new Vector3,Camera=class extends Object3D{constructor(){super(),this.isCamera=!0,this.type=`Camera`,this.matrixWorldInverse=new Matrix4,this.projectionMatrix=new Matrix4,this.projectionMatrixInverse=new Matrix4,this.coordinateSystem=WebGLCoordinateSystem,this._reversedDepth=!1}get reversedDepth(){return this._reversedDepth}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorld.decompose(_position$2,_quaternion$2,_scale$2),_scale$2.x===1&&_scale$2.y===1&&_scale$2.z===1?this.matrixWorldInverse.copy(this.matrixWorld).invert():this.matrixWorldInverse.compose(_position$2,_quaternion$2,_scale$2.set(1,1,1)).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorld.decompose(_position$2,_quaternion$2,_scale$2),_scale$2.x===1&&_scale$2.y===1&&_scale$2.z===1?this.matrixWorldInverse.copy(this.matrixWorld).invert():this.matrixWorldInverse.compose(_position$2,_quaternion$2,_scale$2.set(1,1,1)).invert()}clone(){return new this.constructor().copy(this)}},_v3$1=new Vector3,_minTarget=new Vector2,_maxTarget=new Vector2,PerspectiveCamera=class extends Camera{constructor(e=50,t=1,n=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type=`PerspectiveCamera`,this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){let t=.5*this.getFilmHeight()/e;this.fov=RAD2DEG*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){let e=Math.tan(DEG2RAD*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return RAD2DEG*2*Math.atan(Math.tan(DEG2RAD*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,t,n){_v3$1.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(_v3$1.x,_v3$1.y).multiplyScalar(-e/_v3$1.z),_v3$1.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(_v3$1.x,_v3$1.y).multiplyScalar(-e/_v3$1.z)}getViewSize(e,t){return this.getViewBounds(e,_minTarget,_maxTarget),t.subVectors(_maxTarget,_minTarget)}setViewOffset(e,t,n,r,i,a){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=this.near,t=e*Math.tan(DEG2RAD*.5*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r,a=this.view;if(this.view!==null&&this.view.enabled){let e=a.fullWidth,o=a.fullHeight;i+=a.offsetX*r/e,t-=a.offsetY*n/o,r*=a.width/e,n*=a.height/o}let o=this.filmOffset;o!==0&&(i+=e*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}
vendor: 7,586 bytes, line 15
15,OrthographicCamera=class extends Camera{constructor(e=-1,t=1,n=1,r=-1,i=.1,a=2e3){super(),this.isOrthographicCamera=!0,this.type=`OrthographicCamera`,this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=i,this.far=a,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,n,r,i,a){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,i=n-e,a=n+e,o=r+t,s=r-t;if(this.view!==null&&this.view.enabled){let e=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom;i+=e*this.view.offsetX,a=i+e*this.view.width,o-=t*this.view.offsetY,s=o-t*this.view.height}this.projectionMatrix.makeOrthographic(i,a,o,s,this.near,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}},fov=-90,aspect=1,CubeCamera=class extends Object3D{constructor(e,t,n){super(),this.type=`CubeCamera`,this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;let r=new PerspectiveCamera(fov,aspect,e,t);r.layers=this.layers,this.add(r);let i=new PerspectiveCamera(fov,aspect,e,t);i.layers=this.layers,this.add(i);let a=new PerspectiveCamera(fov,aspect,e,t);a.layers=this.layers,this.add(a);let o=new PerspectiveCamera(fov,aspect,e,t);o.layers=this.layers,this.add(o);let s=new PerspectiveCamera(fov,aspect,e,t);s.layers=this.layers,this.add(s);let c=new PerspectiveCamera(fov,aspect,e,t);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){let e=this.coordinateSystem,t=this.children.concat(),[n,r,i,a,o,s]=t;for(let e of t)this.remove(e);if(e===2e3)n.up.set(0,1,0),n.lookAt(1,0,0),r.up.set(0,1,0),r.lookAt(-1,0,0),i.up.set(0,0,-1),i.lookAt(0,1,0),a.up.set(0,0,1),a.lookAt(0,-1,0),o.up.set(0,1,0),o.lookAt(0,0,1),s.up.set(0,1,0),s.lookAt(0,0,-1);else if(e===2001)n.up.set(0,-1,0),n.lookAt(-1,0,0),r.up.set(0,-1,0),r.lookAt(1,0,0),i.up.set(0,0,1),i.lookAt(0,1,0),a.up.set(0,0,-1),a.lookAt(0,-1,0),o.up.set(0,-1,0),o.lookAt(0,0,1),s.up.set(0,-1,0),s.lookAt(0,0,-1);else throw Error(`THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: `+e);for(let e of t)this.add(e),e.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();let{renderTarget:n,activeMipmapLevel:r}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());let[i,a,o,s,c,l]=this.children,u=e.getRenderTarget(),d=e.getActiveCubeFace(),f=e.getActiveMipmapLevel(),p=e.xr.enabled;e.xr.enabled=!1;let m=n.texture.generateMipmaps;n.texture.generateMipmaps=!1;let g=!1;g=e.isWebGLRenderer===!0?e.state.buffers.depth.getReversed():e.reversedDepthBuffer,e.setRenderTarget(n,0,r),g&&e.autoClear===!1&&e.clearDepth(),e.render(t,i),e.setRenderTarget(n,1,r),g&&e.autoClear===!1&&e.clearDepth(),e.render(t,a),e.setRenderTarget(n,2,r),g&&e.autoClear===!1&&e.clearDepth(),e.render(t,o),e.setRenderTarget(n,3,r),g&&e.autoClear===!1&&e.clearDepth(),e.render(t,s),e.setRenderTarget(n,4,r),g&&e.autoClear===!1&&e.clearDepth(),e.render(t,c),n.texture.generateMipmaps=m,e.setRenderTarget(n,5,r),g&&e.autoClear===!1&&e.clearDepth(),e.render(t,l),e.setRenderTarget(u,d,f),e.xr.enabled=p,n.texture.needsPMREMUpdate=!0}},ArrayCamera=class extends PerspectiveCamera{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}},_RESERVED_CHARS_RE=`\\[\\]\\.:\\/`,_reservedRe=RegExp(`[\\[\\]\\.:\\/]`,`g`),_wordChar=`[^\\[\\]\\.:\\/]`,_wordCharOrDot=`[^`+_RESERVED_CHARS_RE.replace(`\\.`,``)+`]`,_directoryRe=`((?:WC+[\\/:])*)`.replace(`WC`,_wordChar),_nodeRe=`(WCOD+)?`.replace(`WCOD`,_wordCharOrDot),_objectRe=`(?:\\.(WC+)(?:\\[(.+)\\])?)?`.replace(`WC`,_wordChar),_propertyRe=`\\.(WC+)(?:\\[(.+)\\])?`.replace(`WC`,_wordChar),_trackRe=RegExp(`^`+_directoryRe+_nodeRe+_objectRe+_propertyRe+`$`),_supportedObjectNames=[`material`,`materials`,`bones`,`map`],Composite=class{constructor(e,t,n){let r=n||PropertyBinding.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();let n=this._targetGroup.nCachedObjects_,r=this._bindings[n];r!==void 0&&r.getValue(e,t)}setValue(e,t){let n=this._bindings;for(let r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(e,t)}bind(){let e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){let e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}},PropertyBinding=class e{constructor(t,n,r){this.path=n,this.parsedPath=r||e.parseTrackName(n),this.node=e.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,n,r){return t&&t.isAnimationObjectGroup?new e.Composite(t,n,r):new e(t,n,r)}static sanitizeNodeName(e){return e.replace(/\s/g,`_`).replace(_reservedRe,``)}static parseTrackName(e){let t=_trackRe.exec(e);if(t===null)throw Error(`PropertyBinding: Cannot parse trackName: `+e);let n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=n.nodeName&&n.nodeName.lastIndexOf(`.`);if(r!==void 0&&r!==-1){let e=n.nodeName.substring(r+1);_supportedObjectNames.indexOf(e)!==-1&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=e)}if(n.propertyName===null||n.propertyName.length===0)throw Error(`PropertyBinding: can not parse propertyName from trackName: `+e);return n}static findNode(e,t){if(t===void 0||t===``||t===`.`||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){let n=e.skeleton.getBoneByName(t);if(n!==void 0)return n}if(e.children){let n=function(e){for(let r=0;r<e.length;r++){let i=e[r];if(i.name===t||i.uuid===t)return i;let a=n(i.children);if(a)return a}return null},r=n(e.children);if(r)return r}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.targetObject[this.propertyName]}_getValue_array(e,t){let n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)e[t++]=n[r]}_getValue_arrayElement(e,t){e[t]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,t){this.resolvedProperty.toArray(e,t)}_setValue_direct(e,t){this.targetObject[this.propertyName]=e[t]}_setValue_direct_setNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,t){let n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++]}_setValue_array_setNeedsUpdate(e,t){let n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.needsUpdate=!0}
vendor: 4,383 bytes, line 15
15_setValue_array_setMatrixWorldNeedsUpdate(e,t){let n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,t){this.resolvedProperty[this.propertyIndex]=e[t]}_setValue_arrayElement_setNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,t){this.resolvedProperty.fromArray(e,t)}_setValue_fromArray_setNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,t){this.bind(),this.getValue(e,t)}_setValue_unbound(e,t){this.bind(),this.setValue(e,t)}bind(){let t=this.node,n=this.parsedPath,r=n.objectName,i=n.propertyName,a=n.propertyIndex;if(t||(t=e.findNode(this.rootNode,n.nodeName),this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!t){warn(`PropertyBinding: No target node found for track: `+this.path+`.`);return}if(r){let e=n.objectIndex;switch(r){case`materials`:if(!t.material){error(`PropertyBinding: Can not bind to material as node does not have a material.`,this);return}if(!t.material.materials){error(`PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.`,this);return}t=t.material.materials;break;case`bones`:if(!t.skeleton){error(`PropertyBinding: Can not bind to bones as node does not have a skeleton.`,this);return}t=t.skeleton.bones;for(let n=0;n<t.length;n++)if(t[n].name===e){e=n;break}break;case`map`:if(`map`in t){t=t.map;break}if(!t.material){error(`PropertyBinding: Can not bind to material as node does not have a material.`,this);return}if(!t.material.map){error(`PropertyBinding: Can not bind to material.map as node.material does not have a map.`,this);return}t=t.material.map;break;default:if(t[r]===void 0){error(`PropertyBinding: Can not bind to objectName of node undefined.`,this);return}t=t[r]}if(e!==void 0){if(t[e]===void 0){error(`PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.`,this,t);return}t=t[e]}}let o=t[i];if(o===void 0){let e=n.nodeName;error(`PropertyBinding: Trying to update property for track: `+e+`.`+i+` but it wasn't found.`,t);return}let s=this.Versioning.None;this.targetObject=t,t.isMaterial===!0?s=this.Versioning.NeedsUpdate:t.isObject3D===!0&&(s=this.Versioning.MatrixWorldNeedsUpdate);let c=this.BindingType.Direct;if(a!==void 0){if(i===`morphTargetInfluences`){if(!t.geometry){error(`PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.`,this);return}if(!t.geometry.morphAttributes){error(`PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.`,this);return}t.morphTargetDictionary[a]!==void 0&&(a=t.morphTargetDictionary[a])}c=this.BindingType.ArrayElement,this.resolvedProperty=o,this.propertyIndex=a}else o.fromArray!==void 0&&o.toArray!==void 0?(c=this.BindingType.HasFromToArray,this.resolvedProperty=o):Array.isArray(o)?(c=this.BindingType.EntireArray,this.resolvedProperty=o):this.propertyName=i;this.getValue=this.GetterByBindingType[c],this.setValue=this.SetterByBindingTypeAndVersioning[c][s]}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_setMatr
vendor: 1,035 bytes, line 15
15ixWorldNeedsUpdate],[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]];var _matrix=new Matrix4,Raycaster=class{constructor(e,t,n=0,r=1/0){this.ray=new Ray(e,t),this.near=n,this.far=r,this.camera=null,this.layers=new Layers,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,t){this.ray.set(e,t)}setFromCamera(e,t){t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld),this.camera=t):error(`Raycaster:
15Unsupported camera type: `+t.type)}setFromXRController(e){return _matrix.identity().extractRotation(e.matrixWorld),this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(_matrix),this}intersectObject(e,t=!0,n=[]){return intersect(e,this,n,t),n.sort(ascSort),n}intersectObjects(e,t=!0,n=[]){for(let r=0,i=e.length;r<i;r++)intersect(e[r],this,n,t);return n.sort(ascSort),n}};function ascSort(e,t){return e.distance-t.distance}function intersect(e,t,n,r){let i=!0;if(e.layers.test(t.layers)&&e.raycast(t,n)===!1&&(i=!1),i===!0&&r===!0){let r=e.children;for(let e=0,i=r.length;e<i;e++)intersect(r[e],t,n,!0)}}var Clock=class{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1,warn(`THREE.Clock: This module has been deprecated. Please use THREE.Timer instead.`)}start(){this.startTime=performance.now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){let t=performance.now();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}};function getByteLength(e,t,n,r){let i=getTextureTypeByteLength(r);switch(n){case AlphaFormat:return e*t;case RedFormat:return e*t/i.components*i.byteLength;case RedIntegerFormat:return e*t/i.components*i.byteLength;case RGFormat:return e*t*2/i.components*i.byteLength;case RGIntegerFormat:return e*t*2/i.components*i.byteLength;case RGBFormat:return e*t*3/i.components*i.byteLength;case RGBAFormat:return e*t*4/i.components*i.byteLength;case RGBAIntegerFormat:return e*t*4/i.components*i.byteLength;case RGB_S3TC_DXT1_Format:case RGBA_S3TC_DXT1_Format:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*8;case RGBA_S3TC_DXT3_Format:case RGBA_S3TC_DXT5_Format:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*16;case RGB_PVRTC_2BPPV1_Format:case RGBA_PVRTC_2BPPV1_Format:return Math.max(e,16)*Math.max(t,8)/4;case RGB_PVRTC_4BPPV1_Format:case RGBA_PVRTC_4BPPV1_Format:return Math.max(e,8)*Math.max(t,8)/2;case RGB_ETC1_Format:case RGB_ETC2_Format:case R11_EAC_Format:case SIGNED_R11_EAC_Format:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*8;case RGBA_ETC2_EAC_Format:case RG11_EAC_Format:case SIGNED_RG11_EAC_Format:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*16;case RGBA_ASTC_4x4_Format:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*16;case RGBA_ASTC_5x4_Format:return Math.floor((e+4)/5)*Math.floor((t+3)/4)*16;case RGBA_ASTC_5x5_Format:return Math.floor((e+4)/5)*Math.floor((t+4)/5)*16;case RGBA_ASTC_6x5_Format:return Math.floor((e+5)/6)*Math.floor((t+4)/5)*16;case RGBA_ASTC_6x6_Format:return Math.floor((e+5)/6)*Math.floor((t+5)/6)*16;case RGBA_ASTC_8x5_Format:return Math.floor((e+7)/8)*Math.floor((t+4)/5)*16;case RGBA_ASTC_8x6_Format:return Math.floor((e+7)/8)*Math.floor((t+5)/6)*16;case RGBA_ASTC_8x8_Format:return Math.floor((e+7)/8)*Math.floor((t+7)/8)*16;case RGBA_ASTC_10x5_Format:return Math.floor((e+9)/10)*Math.floor((t+4)/5)*16;case RGBA_ASTC_10x6_Format:return Math.floor((e+9)/10)*Math.floor((t+5)/6)*16;case RGBA_ASTC_10x8_Format:return Math.floor((e+9)/10)*Math.floor((t+7)/8)*16;case RGBA_ASTC_10x10_Format:return Math.floor((e+9)/10)*Math.floor((t+9)/10)*16;case RGBA_ASTC_12x10_Format:return Math.floor((e+11)/12)*Math.floor((t+9)/10)*16;case RGBA_ASTC_12x12_Format:return Math.floor((e+11)/12)*Math.floor((t+11)/12)*16;case RGBA_BPTC_Format:case RGB_BPTC_SIGNED_Format:case RGB_BPTC_UNSIGNED_Format:return Math.ceil(e/4)*Math.ceil(t/4)*16;case RED_RGTC1_Format:case SIGNED_RED_RGTC1_Format:return Math.ceil(e/4)*Math.ceil(t/4)*8;case RED_GREEN_RGTC2_Format:case SIGNED_RED_GREEN_RGTC2_Format:return Math.ceil(e/4)*Math.ceil(t/4)*16}throw Error(`Unable to determine texture byte length for ${n} format.`)}function getTextureTypeByteLength(e){switch(e){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 Error(`Unknown texture type ${e}.`)}typeof __THREE_DEVTOOLS__<`u`&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent(`register`,{detail:{revision:`183`}})),typeof window<`u`&&(window.__THREE__?warn(`WARNING: Multiple instances of Three.js being imported.`):window.__THREE__=`183`);function WebGLAnimation(){let e=null,t=!1,n=null,r=null;function i(t,a){n(t,a),r=e.requestAnimationFrame(i)}return{start:function(){t!==!0&&n!==null&&(r=e.requestAnimationFrame(i),t=!0)},stop:function(){e.cancelAnimationFrame(r),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function WebGLAttributes(e){let t=new WeakMap;function n(t,n){let r=t.array,i=t.usage,a=r.byteLength,o=e.createBuffer();e.bindBuffer(n,o),e.bufferData(n,r,i),t.onUploadCallback();let s;if(r instanceof Float32Array)s=e.FLOAT;else if(typeof Float16Array<`u`&&r instanceof Float16Array)s=e.HALF_FLOAT;else if(r instanceof Uint16Array)s=t.isFloat16BufferAttribute?e.HALF_FLOAT:e.UNSIGNED_SHORT;else if(r instanceof Int16Array)s=e.SHORT;else if(r instanceof Uint32Array)s=e.UNSIGNED_INT;else if(r instanceof Int32Array)s=e.INT;else if(r instanceof Int8Array)s=e.BYTE;else if(r instanceof Uint8Array)s=e.UNSIGNED_BYTE;else if(r instanceof Uint8ClampedArray)s=e.UNSIGNED_BYTE;else throw Error(`THREE.WebGLAttributes: Unsupported buffer data format: `+r);return{buffer:o,type:s,bytesPerElement:r.BYTES_PER_ELEMENT,version:t.version,size:a}}function r(t,n,r){let i=n.array,a=n.updateRanges;if(e.bindBuffer(r,t),a.length===0)e.bufferSubData(r,0,i);else{a.sort((e,t)=>
vendor: 4,852 bytes, lines 15-113
15e.start-t.start);let t=0;for(let e=1;e<a.length;e++){let n=a[t],r=a[e];r.start<=n.start+n.count+1?n.count=Math.max(n.count,r.start+r.count-n.start):(++t,a[t]=r)}a.length=t+1;for(let t=0,n=a.length;t<n;t++){let n=a[t];e.bufferSubData(r,n.start*i.BYTES_PER_ELEMENT,i,n.start,n.count)}n.clearUpdateRanges()}n.onUploadCallback()}function i(e){return e.isInterleavedBufferAttribute&&(e=e.data),t.get(e)}function a(n){n.isInterleavedBufferAttribute&&(n=n.data);let r=t.get(n);r&&(e.deleteBuffer(r.buffer),t.delete(n))}function o(e,i){if(e.isInterleavedBufferAttribute&&(e=e.data),e.isGLBufferAttribute){let n=t.get(e);(!n||n.version<e.version)&&t.set(e,{buffer:e.buffer,type:e.type,bytesPerElement:e.elementSize,version:e.version});return}let a=t.get(e);if(a===void 0)t.set(e,n(e,i));else if(a.version<e.version){if(a.size!==e.array.byteLength)throw Error(`THREE.WebGLAttributes: The size of the buffer attribute's array buffer does not match the original size. Resizing buffer attributes is not supported.`);r(a.buffer,e,i),a.version=e.version}}return{get:i,remove:a,update:o}}var ShaderChunk={alphahash_fragment:`#ifdef USE_ALPHAHASH 16 if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard; 17#endif`,alphahash_pars_fragment:`#ifdef USE_ALPHAHASH 18 const float ALPHA_HASH_SCALE = 0.05; 19 float hash2D( vec2 value ) { 20 return fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) ); 21 } 22 float hash3D( vec3 value ) { 23 return hash2D( vec2( hash2D( value.xy ), value.z ) ); 24 } 25 float getAlphaHashThreshold( vec3 position ) { 26 float maxDeriv = max( 27 length( dFdx( position.xyz ) ), 28 length( dFdy( position.xyz ) ) 29 ); 30 float pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv ); 31 vec2 pixScales = vec2( 32 exp2( floor( log2( pixScale ) ) ), 33 exp2( ceil( log2( pixScale ) ) ) 34 ); 35 vec2 alpha = vec2( 36 hash3D( floor( pixScales.x * position.xyz ) ), 37 hash3D( floor( pixScales.y * position.xyz ) ) 38 ); 39 float lerpFactor = fract( log2( pixScale ) ); 40 float x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y; 41 float a = min( lerpFactor, 1.0 - lerpFactor ); 42 vec3 cases = vec3( 43 x * x / ( 2.0 * a * ( 1.0 - a ) ), 44 ( x - 0.5 * a ) / ( 1.0 - a ), 45 1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) ) 46 ); 47 float threshold = ( x < ( 1.0 - a ) ) 48 ? ( ( x < a ) ? cases.x : cases.y ) 49 : cases.z; 50 return clamp( threshold , 1.0e-6, 1.0 ); 51 } 52#endif`,alphamap_fragment:`#ifdef USE_ALPHAMAP 53 diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g; 54#endif`,alphamap_pars_fragment:`#ifdef USE_ALPHAMAP 55 uniform sampler2D alphaMap; 56#endif`,alphatest_fragment:`#ifdef USE_ALPHATEST 57 #ifdef ALPHA_TO_COVERAGE 58 diffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a ); 59 if ( diffuseColor.a == 0.0 ) discard; 60 #else 61 if ( diffuseColor.a < alphaTest ) discard; 62 #endif 63#endif`,alphatest_pars_fragment:`#ifdef USE_ALPHATEST 64 uniform float alphaTest; 65#endif`,aomap_fragment:`#ifdef USE_AOMAP 66 float ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0; 67 reflectedLight.indirectDiffuse *= ambientOcclusion; 68 #if defined( USE_CLEARCOAT ) 69 clearcoatSpecularIndirect *= ambientOcclusion; 70 #endif 71 #if defined( USE_SHEEN ) 72 sheenSpecularIndirect *= ambientOcclusion; 73 #endif 74 #if defined( USE_ENVMAP ) && defined( STANDARD ) 75 float dotNV = saturate( dot( geometryNormal, geometryViewDir ) ); 76 reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness ); 77 #endif 78#endif`,aomap_pars_fragment:`#ifdef USE_AOMAP 79 uniform sampler2D aoMap; 80 uniform float aoMapIntensity; 81#endif`,batching_pars_vertex:`#ifdef USE_BATCHING 82 #if ! defined( GL_ANGLE_multi_draw ) 83 #define gl_DrawID _gl_DrawID 84 uniform int _gl_DrawID; 85 #endif 86 uniform highp sampler2D batchingTexture; 87 uniform highp usampler2D batchingIdTexture; 88 mat4 getBatchingMatrix( const in float i ) { 89 int size = textureSize( batchingTexture, 0 ).x; 90 int j = int( i ) * 4; 91 int x = j % size; 92 int y = j / size; 93 vec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 ); 94 vec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 ); 95 vec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 ); 96 vec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 ); 97 return mat4( v1, v2, v3, v4 ); 98 } 99 float getIndirectIndex( const in int i ) { 100 int size = textureSize( batchingIdTexture, 0 ).x; 101 int x = i % size; 102 int y = i / size; 103 return float( texelFetch( batchingIdTexture, ivec2( x, y ), 0 ).r ); 104 } 105#endif 106#ifdef USE_BATCHING_COLOR 107 uniform sampler2D batchingColorTexture; 108 vec4 getBatchingColor( const in float i ) { 109 int size = textureSize( batchingColorTexture, 0 ).x; 110 int j = int( i ); 111 int x = j % size; 112 int y = j / size; 113 return texelFetch( batchingColorTexture, ivec2( x, y ), 0 )
vendor: 6,787 bytes, lines 113-274
113; 114 } 115#endif`,batching_vertex:`#ifdef USE_BATCHING 116 mat4 batchingMatrix = getBatchingMatrix( getIndirectIndex( gl_DrawID ) ); 117#endif`,begin_vertex:`vec3 transformed = vec3( position ); 118#ifdef USE_ALPHAHASH 119 vPosition = vec3( position ); 120#endif`,beginnormal_vertex:`vec3 objectNormal = vec3( normal ); 121#ifdef USE_TANGENT 122 vec3 objectTangent = vec3( tangent.xyz ); 123#endif`,bsdfs:`float G_BlinnPhong_Implicit( ) { 124 return 0.25; 125} 126float D_BlinnPhong( const in float shininess, const in float dotNH ) { 127 return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess ); 128} 129vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) { 130 vec3 halfDir = normalize( lightDir + viewDir ); 131 float dotNH = saturate( dot( normal, halfDir ) ); 132 float dotVH = saturate( dot( viewDir, halfDir ) ); 133 vec3 F = F_Schlick( specularColor, 1.0, dotVH ); 134 float G = G_BlinnPhong_Implicit( ); 135 float D = D_BlinnPhong( shininess, dotNH ); 136 return F * ( G * D ); 137} // validated`,iridescence_fragment:`#ifdef USE_IRIDESCENCE 138 const mat3 XYZ_TO_REC709 = mat3( 139 3.2404542, -0.9692660, 0.0556434, 140 -1.5371385, 1.8760108, -0.2040259, 141 -0.4985314, 0.0415560, 1.0572252 142 ); 143 vec3 Fresnel0ToIor( vec3 fresnel0 ) { 144 vec3 sqrtF0 = sqrt( fresnel0 ); 145 return ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 ); 146 } 147 vec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) { 148 return pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) ); 149 } 150 float IorToFresnel0( float transmittedIor, float incidentIor ) { 151 return pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor )); 152 } 153 vec3 evalSensitivity( float OPD, vec3 shift ) { 154 float phase = 2.0 * PI * OPD * 1.0e-9; 155 vec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 ); 156 vec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 ); 157 vec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 ); 158 vec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var ); 159 xyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) ); 160 xyz /= 1.0685e-7; 161 vec3 rgb = XYZ_TO_REC709 * xyz; 162 return rgb; 163 } 164 vec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) { 165 vec3 I; 166 float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) ); 167 float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) ); 168 float cosTheta2Sq = 1.0 - sinTheta2Sq; 169 if ( cosTheta2Sq < 0.0 ) { 170 return vec3( 1.0 ); 171 } 172 float cosTheta2 = sqrt( cosTheta2Sq ); 173 float R0 = IorToFresnel0( iridescenceIOR, outsideIOR ); 174 float R12 = F_Schlick( R0, 1.0, cosTheta1 ); 175 float T121 = 1.0 - R12; 176 float phi12 = 0.0; 177 if ( iridescenceIOR < outsideIOR ) phi12 = PI; 178 float phi21 = PI - phi12; 179 vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) ); vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR ); 180 vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 ); 181 vec3 phi23 = vec3( 0.0 ); 182 if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI; 183 if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI; 184 if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI; 185 float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2; 186 vec3 phi = vec3( phi21 ) + phi23; 187 vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 ); 188 vec3 r123 = sqrt( R123 ); 189 vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 ); 190 vec3 C0 = R12 + Rs; 191 I = C0; 192 vec3 Cm = Rs - T121; 193 for ( int m = 1; m <= 2; ++ m ) { 194 Cm *= r123; 195 vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi ); 196 I += Cm * Sm; 197 } 198 return max( I, vec3( 0.0 ) ); 199 } 200#endif`,bumpmap_pars_fragment:`#ifdef USE_BUMPMAP 201 uniform sampler2D bumpMap; 202 uniform float bumpScale; 203 vec2 dHdxy_fwd() { 204 vec2 dSTdx = dFdx( vBumpMapUv ); 205 vec2 dSTdy = dFdy( vBumpMapUv ); 206 float Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x; 207 float dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll; 208 float dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll; 209 return vec2( dBx, dBy ); 210 } 211 vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) { 212 vec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) ); 213 vec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) ); 214 vec3 vN = surf_norm; 215 vec3 R1 = cross( vSigmaY, vN ); 216 vec3 R2 = cross( vN, vSigmaX ); 217 float fDet = dot( vSigmaX, R1 ) * faceDirection; 218 vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 ); 219 return normalize( abs( fDet ) * surf_norm - vGrad ); 220 } 221#endif`,clipping_planes_fragment:`#if NUM_CLIPPING_PLANES > 0 222 vec4 plane; 223 #ifdef ALPHA_TO_COVERAGE 224 float distanceToPlane, distanceGradient; 225 float clipOpacity = 1.0; 226 #pragma unroll_loop_start 227 for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { 228 plane = clippingPlanes[ i ]; 229 distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; 230 distanceGradient = fwidth( distanceToPlane ) / 2.0; 231 clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); 232 if ( clipOpacity == 0.0 ) discard; 233 } 234 #pragma unroll_loop_end 235 #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES 236 float unionClipOpacity = 1.0; 237 #pragma unroll_loop_start 238 for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { 239 plane = clippingPlanes[ i ]; 240 distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; 241 distanceGradient = fwidth( distanceToPlane ) / 2.0; 242 unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); 243 } 244 #pragma unroll_loop_end 245 clipOpacity *= 1.0 - unionClipOpacity; 246 #endif 247 diffuseColor.a *= clipOpacity; 248 if ( diffuseColor.a == 0.0 ) discard; 249 #else 250 #pragma unroll_loop_start 251 for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { 252 plane = clippingPlanes[ i ]; 253 if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard; 254 } 255 #pragma unroll_loop_end 256 #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES 257 bool clipped = true; 258 #pragma unroll_loop_start 259 for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { 260 plane = clippingPlanes[ i ]; 261 clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped; 262 } 263 #pragma unroll_loop_end 264 if ( clipped ) discard; 265 #endif 266 #endif 267#endif`,clipping_planes_pars_fragment:`#if NUM_CLIPPING_PLANES > 0 268 varying vec3 vClipPosition; 269 uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; 270#endif`,clipping_planes_pars_vertex:`#if NUM_CLIPPING_PLANES > 0 271 varying vec3 vClipPosition; 272#endif`,clipping_planes_vertex:`#if NUM_CLIPPING_PLANES > 0 273 vClipPosition = - mvPosition.xyz; 274#endif`,color_fragment:`#if defined( USE_COLOR
274 ) || defined( USE_COLOR_ALPHA ) 275 diffuseColor *= vColor; 276#endif`,color_pars_fragment:`#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA ) 277 varying vec4 vColor; 278#endif`,color_pars_vertex:`#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) 279 varying vec4 vColor; 280#endif`,color_vertex:`#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) 281 vColor = vec4( 1.0 ); 282#endif 283#ifdef USE_COLOR_ALPHA 284 vColor *= color; 285#elif defined( USE_COLOR ) 286 vColor.rgb *= color; 287#endif 288#ifdef USE_INSTANCING_COLOR 289 vColor.rgb *= instanceColor.rgb; 290#endif 291#ifdef USE_BATCHING_COLOR 292 vColor *= getBatchingColor( getIndirectIndex( gl_DrawID ) ); 293#endif`,common:`#define PI 3.141592653589793 294#define PI2 6.283185307179586 295#define PI_HALF 1.5707963267948966 296#define RECIPROCAL_PI 0.3183098861837907 297#define RECIPROCAL_PI2 0.15915494309189535 298#define EPSILON 1e-6 299#ifndef saturate 300#define saturate( a ) clamp( a, 0.0, 1.0 ) 301#endif 302#define whiteComplement( a ) ( 1.0 - saturate( a ) ) 303float pow2( const in float x ) { return x*x; } 304vec3 pow2( const in vec3 x ) { return x*x; } 305float pow3( const in float x ) { return x*x*x; } 306float pow4( const in float x ) { float x2 = x*x; return x2*x2; } 307float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); } 308float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); } 309highp float rand( const in vec2 uv ) { 310 const highp float a = 12.9898, b = 78.233, c = 43758.5453; 311 highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); 312 return fract( sin( sn ) * c ); 313} 314#ifdef HIGH_PRECISION 315 float precisionSafeLength( vec3 v ) { return length( v ); } 316#else 317 float precisionSafeLength( vec3 v ) { 318 float maxComponent = max3( abs( v ) ); 319 return length( v / maxComponent ) * maxComponent; 320 } 321#endif 322struct IncidentLight { 323 vec3 color; 324 vec3 direction; 325 bool visible; 326}; 327struct ReflectedLight { 328 vec3 directDiffuse; 329 vec3 directSpecular; 330 vec3 indirectDiffuse; 331 vec3 indirectSpecular; 332}; 333#ifdef USE_ALPHAHASH 334 varying vec3 vPosition; 335#endif 336vec3 transformDirection( in vec3 dir, in mat4 matrix ) { 337 return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); 338} 339vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { 340 return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz )
vendor: 7,151 bytes, lines 340-523
340; 341} 342bool isPerspectiveMatrix( mat4 m ) { 343 return m[ 2 ][ 3 ] == - 1.0; 344} 345vec2 equirectUv( in vec3 dir ) { 346 float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; 347 float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; 348 return vec2( u, v ); 349} 350vec3 BRDF_Lambert( const in vec3 diffuseColor ) { 351 return RECIPROCAL_PI * diffuseColor; 352} 353vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { 354 float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); 355 return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); 356} 357float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { 358 float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); 359 return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); 360} // validated`,cube_uv_reflection_fragment:`#ifdef ENVMAP_TYPE_CUBE_UV 361 #define cubeUV_minMipLevel 4.0 362 #define cubeUV_minTileSize 16.0 363 float getFace( vec3 direction ) { 364 vec3 absDirection = abs( direction ); 365 float face = - 1.0; 366 if ( absDirection.x > absDirection.z ) { 367 if ( absDirection.x > absDirection.y ) 368 face = direction.x > 0.0 ? 0.0 : 3.0; 369 else 370 face = direction.y > 0.0 ? 1.0 : 4.0; 371 } else { 372 if ( absDirection.z > absDirection.y ) 373 face = direction.z > 0.0 ? 2.0 : 5.0; 374 else 375 face = direction.y > 0.0 ? 1.0 : 4.0; 376 } 377 return face; 378 } 379 vec2 getUV( vec3 direction, float face ) { 380 vec2 uv; 381 if ( face == 0.0 ) { 382 uv = vec2( direction.z, direction.y ) / abs( direction.x ); 383 } else if ( face == 1.0 ) { 384 uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); 385 } else if ( face == 2.0 ) { 386 uv = vec2( - direction.x, direction.y ) / abs( direction.z ); 387 } else if ( face == 3.0 ) { 388 uv = vec2( - direction.z, direction.y ) / abs( direction.x ); 389 } else if ( face == 4.0 ) { 390 uv = vec2( - direction.x, direction.z ) / abs( direction.y ); 391 } else { 392 uv = vec2( direction.x, direction.y ) / abs( direction.z ); 393 } 394 return 0.5 * ( uv + 1.0 ); 395 } 396 vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { 397 float face = getFace( direction ); 398 float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); 399 mipInt = max( mipInt, cubeUV_minMipLevel ); 400 float faceSize = exp2( mipInt ); 401 highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0; 402 if ( face > 2.0 ) { 403 uv.y += faceSize; 404 face -= 3.0; 405 } 406 uv.x += face * faceSize; 407 uv.x += filterInt * 3.0 * cubeUV_minTileSize; 408 uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize ); 409 uv.x *= CUBEUV_TEXEL_WIDTH; 410 uv.y *= CUBEUV_TEXEL_HEIGHT; 411 #ifdef texture2DGradEXT 412 return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; 413 #else 414 return texture2D( envMap, uv ).rgb; 415 #endif 416 } 417 #define cubeUV_r0 1.0 418 #define cubeUV_m0 - 2.0 419 #define cubeUV_r1 0.8 420 #define cubeUV_m1 - 1.0 421 #define cubeUV_r4 0.4 422 #define cubeUV_m4 2.0 423 #define cubeUV_r5 0.305 424 #define cubeUV_m5 3.0 425 #define cubeUV_r6 0.21 426 #define cubeUV_m6 4.0 427 float roughnessToMip( float roughness ) { 428 float mip = 0.0; 429 if ( roughness >= cubeUV_r1 ) { 430 mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0; 431 } else if ( roughness >= cubeUV_r4 ) { 432 mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1; 433 } else if ( roughness >= cubeUV_r5 ) { 434 mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4; 435 } else if ( roughness >= cubeUV_r6 ) { 436 mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5; 437 } else { 438 mip = - 2.0 * log2( 1.16 * roughness ); } 439 return mip; 440 } 441 vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { 442 float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP ); 443 float mipF = fract( mip ); 444 float mipInt = floor( mip ); 445 vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); 446 if ( mipF == 0.0 ) { 447 return vec4( color0, 1.0 ); 448 } else { 449 vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); 450 return vec4( mix( color0, color1, mipF ), 1.0 ); 451 } 452 } 453#endif`,defaultnormal_vertex:`vec3 transformedNormal = objectNormal; 454#ifdef USE_TANGENT 455 vec3 transformedTangent = objectTangent; 456#endif 457#ifdef USE_BATCHING 458 mat3 bm = mat3( batchingMatrix ); 459 transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) ); 460 transformedNormal = bm * transformedNormal; 461 #ifdef USE_TANGENT 462 transformedTangent = bm * transformedTangent; 463 #endif 464#endif 465#ifdef USE_INSTANCING 466 mat3 im = mat3( instanceMatrix ); 467 transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) ); 468 transformedNormal = im * transformedNormal; 469 #ifdef USE_TANGENT 470 transformedTangent = im * transformedTangent; 471 #endif 472#endif 473transformedNormal = normalMatrix * transformedNormal; 474#ifdef FLIP_SIDED 475 transformedNormal = - transformedNormal; 476#endif 477#ifdef USE_TANGENT 478 transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz; 479 #ifdef FLIP_SIDED 480 transformedTangent = - transformedTangent; 481 #endif 482#endif`,displacementmap_pars_vertex:`#ifdef USE_DISPLACEMENTMAP 483 uniform sampler2D displacementMap; 484 uniform float displacementScale; 485 uniform float displacementBias; 486#endif`,displacementmap_vertex:`#ifdef USE_DISPLACEMENTMAP 487 transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); 488#endif`,emissivemap_fragment:`#ifdef USE_EMISSIVEMAP 489 vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); 490 #ifdef DECODE_VIDEO_TEXTURE_EMISSIVE 491 emissiveColor = sRGBTransferEOTF( emissiveColor ); 492 #endif 493 totalEmissiveRadiance *= emissiveColor.rgb; 494#endif`,emissivemap_pars_fragment:`#ifdef USE_EMISSIVEMAP 495 uniform sampler2D emissiveMap; 496#endif`,colorspace_fragment:`gl_FragColor = linearToOutputTexel( gl_FragColor );`,colorspace_pars_fragment:`vec4 LinearTransferOETF( in vec4 value ) { 497 return value; 498} 499vec4 sRGBTransferEOTF( in vec4 value ) { 500 return 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 ); 501} 502vec4 sRGBTransferOETF( in vec4 value ) { 503 return 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 ); 504}`,envmap_fragment:`#ifdef USE_ENVMAP 505 #ifdef ENV_WORLDPOS 506 vec3 cameraToFrag; 507 if ( isOrthographic ) { 508 cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); 509 } else { 510 cameraToFrag = normalize( vWorldPosition - cameraPosition ); 511 } 512 vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); 513 #ifdef ENVMAP_MODE_REFLECTION 514 vec3 reflectVec = reflect( cameraToFrag, worldNormal ); 515 #else 516 vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); 517 #endif 518 #else 519 vec3 reflectVec = vReflect; 520 #endif 521 #ifdef ENVMAP_TYPE_CUBE 522 vec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); 523
523 #ifdef ENVMAP_BLENDING_MULTIPLY 524 outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); 525 #elif defined( ENVMAP_BLENDING_MIX ) 526 outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); 527 #elif defined( ENVMAP_BLENDING_ADD ) 528 outgoingLight += envColor.xyz * specularStrength * reflectivity; 529 #endif 530 #endif 531#endif`,envmap_common_pars_fragment:`#ifdef USE_ENVMAP 532 uniform float envMapIntensity; 533 uniform float flipEnvMap; 534 uniform mat3 envMapRotation; 535 #ifdef ENVMAP_TYPE_CUBE 536 uniform samplerCube envMap; 537 #else 538 uniform sampler2D envMap; 539 #endif 540#endif`,envmap_pars_fragment:`#ifdef USE_ENVMAP 541 uniform float reflectivity; 542 #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) 543 #define ENV_WORLDPOS 544 #endif 545 #ifdef ENV_WORLDPOS 546 varying vec3 vWorldPosition; 547 uniform float refractionRatio; 548 #else 549 varying vec3 vReflect; 550 #endif 551#endif`,envmap_pars_vertex:`#ifdef USE_ENVMAP 552 #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) 553 #define ENV_WORLDPOS 554 #endif 555 #ifdef ENV_WORLDPOS 556 557 varying vec3 vWorldPosition; 558 #else 559 varying vec3 vReflect; 560 uniform float refractionRatio; 561 #endif 562#endif`,envmap_physical_pars_fragment:`#ifdef USE_ENVMAP 563 vec3 getIBLIrradiance( const in vec3 normal ) { 564 #ifdef ENVMAP_TYPE_CUBE_UV 565 vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); 566 vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 ); 567 return PI * envMapColor.rgb * envMapIntensity; 568 #else 569 return vec3( 0.0 ); 570 #endif 571 } 572 vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { 573 #ifdef ENVMAP_TYPE_CUBE_UV 574 vec3 reflectVec = reflect( - viewDir, normal ); 575 reflectVec = normalize( mix( reflectVec, normal, pow4( roughness )
vendor: 6,500 bytes, lines 575-728
575) ); 576 reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); 577 vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness ); 578 return envMapColor.rgb * envMapIntensity; 579 #else 580 return vec3( 0.0 ); 581 #endif 582 } 583 #ifdef USE_ANISOTROPY 584 vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) { 585 #ifdef ENVMAP_TYPE_CUBE_UV 586 vec3 bentNormal = cross( bitangent, viewDir ); 587 bentNormal = normalize( cross( bentNormal, bitangent ) ); 588 bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) ); 589 return getIBLRadiance( viewDir, bentNormal, roughness ); 590 #else 591 return vec3( 0.0 ); 592 #endif 593 } 594 #endif 595#endif`,envmap_vertex:`#ifdef USE_ENVMAP 596 #ifdef ENV_WORLDPOS 597 vWorldPosition = worldPosition.xyz; 598 #else 599 vec3 cameraToVertex; 600 if ( isOrthographic ) { 601 cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); 602 } else { 603 cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); 604 } 605 vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); 606 #ifdef ENVMAP_MODE_REFLECTION 607 vReflect = reflect( cameraToVertex, worldNormal ); 608 #else 609 vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); 610 #endif 611 #endif 612#endif`,fog_vertex:`#ifdef USE_FOG 613 vFogDepth = - mvPosition.z; 614#endif`,fog_pars_vertex:`#ifdef USE_FOG 615 varying float vFogDepth; 616#endif`,fog_fragment:`#ifdef USE_FOG 617 #ifdef FOG_EXP2 618 float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); 619 #else 620 float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); 621 #endif 622 gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); 623#endif`,fog_pars_fragment:`#ifdef USE_FOG 624 uniform vec3 fogColor; 625 varying float vFogDepth; 626 #ifdef FOG_EXP2 627 uniform float fogDensity; 628 #else 629 uniform float fogNear; 630 uniform float fogFar; 631 #endif 632#endif`,gradientmap_pars_fragment:`#ifdef USE_GRADIENTMAP 633 uniform sampler2D gradientMap; 634#endif 635vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { 636 float dotNL = dot( normal, lightDirection ); 637 vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); 638 #ifdef USE_GRADIENTMAP 639 return vec3( texture2D( gradientMap, coord ).r ); 640 #else 641 vec2 fw = fwidth( coord ) * 0.5; 642 return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); 643 #endif 644}`,lightmap_pars_fragment:`#ifdef USE_LIGHTMAP 645 uniform sampler2D lightMap; 646 uniform float lightMapIntensity; 647#endif`,lights_lambert_fragment:`LambertMaterial material; 648material.diffuseColor = diffuseColor.rgb; 649material.specularStrength = specularStrength;`,lights_lambert_pars_fragment:`varying vec3 vViewPosition; 650struct LambertMaterial { 651 vec3 diffuseColor; 652 float specularStrength; 653}; 654void 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 ) { 655 float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); 656 vec3 irradiance = dotNL * directLight.color; 657 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 658} 659void 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 ) { 660 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 661} 662#define RE_Direct RE_Direct_Lambert 663#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,lights_pars_begin:`uniform bool receiveShadow; 664uniform vec3 ambientLightColor; 665#if defined( USE_LIGHT_PROBES ) 666 uniform vec3 lightProbe[ 9 ]; 667#endif 668vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { 669 float x = normal.x, y = normal.y, z = normal.z; 670 vec3 result = shCoefficients[ 0 ] * 0.886227; 671 result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; 672 result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; 673 result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; 674 result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; 675 result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; 676 result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); 677 result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; 678 result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); 679 return result; 680} 681vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) { 682 vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); 683 vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); 684 return irradiance; 685} 686vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { 687 vec3 irradiance = ambientLightColor; 688 return irradiance; 689} 690float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { 691 float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); 692 if ( cutoffDistance > 0.0 ) { 693 distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); 694 } 695 return distanceFalloff; 696} 697float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) { 698 return smoothstep( coneCosine, penumbraCosine, angleCosine ); 699} 700#if NUM_DIR_LIGHTS > 0 701 struct DirectionalLight { 702 vec3 direction; 703 vec3 color; 704 }; 705 uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; 706 void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) { 707 light.color = directionalLight.color; 708 light.direction = directionalLight.direction; 709 light.visible = true; 710 } 711#endif 712#if NUM_POINT_LIGHTS > 0 713 struct PointLight { 714 vec3 position; 715 vec3 color; 716 float distance; 717 float decay; 718 }; 719 uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; 720 void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) { 721 vec3 lVector = pointLight.position - geometryPosition; 722 light.direction = normalize( lVector ); 723 float lightDistance = length( lVector ); 724 light.color = pointLight.color; 725 light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay ); 726 light.visible = ( light.color != vec3( 0.0 ) ); 727 } 728#endif
vendor: 13,829 bytes, lines 729-1050
729#if NUM_SPOT_LIGHTS > 0 730 struct SpotLight { 731 vec3 position; 732 vec3 direction; 733 vec3 color; 734 float distance; 735 float decay; 736 float coneCos; 737 float penumbraCos; 738 }; 739 uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; 740 void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) { 741 vec3 lVector = spotLight.position - geometryPosition; 742 light.direction = normalize( lVector ); 743 float angleCos = dot( light.direction, spotLight.direction ); 744 float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos ); 745 if ( spotAttenuation > 0.0 ) { 746 float lightDistance = length( lVector ); 747 light.color = spotLight.color * spotAttenuation; 748 light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay ); 749 light.visible = ( light.color != vec3( 0.0 ) ); 750 } else { 751 light.color = vec3( 0.0 ); 752 light.visible = false; 753 } 754 } 755#endif 756#if NUM_RECT_AREA_LIGHTS > 0 757 struct RectAreaLight { 758 vec3 color; 759 vec3 position; 760 vec3 halfWidth; 761 vec3 halfHeight; 762 }; 763 uniform sampler2D ltc_1; uniform sampler2D ltc_2; 764 uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; 765#endif 766#if NUM_HEMI_LIGHTS > 0 767 struct HemisphereLight { 768 vec3 direction; 769 vec3 skyColor; 770 vec3 groundColor; 771 }; 772 uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; 773 vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) { 774 float dotNL = dot( normal, hemiLight.direction ); 775 float hemiDiffuseWeight = 0.5 * dotNL + 0.5; 776 vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); 777 return irradiance; 778 } 779#endif`,lights_toon_fragment:`ToonMaterial material; 780material.diffuseColor = diffuseColor.rgb;`,lights_toon_pars_fragment:`varying vec3 vViewPosition; 781struct ToonMaterial { 782 vec3 diffuseColor; 783}; 784void 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 ) { 785 vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color; 786 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 787} 788void 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 ) { 789 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 790} 791#define RE_Direct RE_Direct_Toon 792#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,lights_phong_fragment:`BlinnPhongMaterial material; 793material.diffuseColor = diffuseColor.rgb; 794material.specularColor = specular; 795material.specularShininess = shininess; 796material.specularStrength = specularStrength;`,lights_phong_pars_fragment:`varying vec3 vViewPosition; 797struct BlinnPhongMaterial { 798 vec3 diffuseColor; 799 vec3 specularColor; 800 float specularShininess; 801 float specularStrength; 802}; 803void 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 ) { 804 float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); 805 vec3 irradiance = dotNL * directLight.color; 806 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 807 reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength; 808} 809void 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 ) { 810 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 811} 812#define RE_Direct RE_Direct_BlinnPhong 813#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,lights_physical_fragment:`PhysicalMaterial material; 814material.diffuseColor = diffuseColor.rgb; 815material.diffuseContribution = diffuseColor.rgb * ( 1.0 - metalnessFactor ); 816material.metalness = metalnessFactor; 817vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); 818float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); 819material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness; 820material.roughness = min( material.roughness, 1.0 ); 821#ifdef IOR 822 material.ior = ior; 823 #ifdef USE_SPECULAR 824 float specularIntensityFactor = specularIntensity; 825 vec3 specularColorFactor = specularColor; 826 #ifdef USE_SPECULAR_COLORMAP 827 specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb; 828 #endif 829 #ifdef USE_SPECULAR_INTENSITYMAP 830 specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a; 831 #endif 832 material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor ); 833 #else 834 float specularIntensityFactor = 1.0; 835 vec3 specularColorFactor = vec3( 1.0 ); 836 material.specularF90 = 1.0; 837 #endif 838 material.specularColor = min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor; 839 material.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor ); 840#else 841 material.specularColor = vec3( 0.04 ); 842 material.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor ); 843 material.specularF90 = 1.0; 844#endif 845#ifdef USE_CLEARCOAT 846 material.clearcoat = clearcoat; 847 material.clearcoatRoughness = clearcoatRoughness; 848 material.clearcoatF0 = vec3( 0.04 ); 849 material.clearcoatF90 = 1.0; 850 #ifdef USE_CLEARCOATMAP 851 material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x; 852 #endif 853 #ifdef USE_CLEARCOAT_ROUGHNESSMAP 854 material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y; 855 #endif 856 material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); 857 material.clearcoatRoughness += geometryRoughness; 858 material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); 859#endif 860#ifdef USE_DISPERSION 861 material.dispersion = dispersion; 862#endif 863#ifdef USE_IRIDESCENCE 864 material.iridescence = iridescence; 865 material.iridescenceIOR = iridescenceIOR; 866 #ifdef USE_IRIDESCENCEMAP 867 material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r; 868 #endif 869 #ifdef USE_IRIDESCENCE_THICKNESSMAP 870 material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum; 871 #else 872 material.iridescenceThickness = iridescenceThicknessMaximum; 873 #endif 874#endif 875#ifdef USE_SHEEN 876 material.sheenColor = sheenColor; 877 #ifdef USE_SHEEN_COLORMAP 878 material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb; 879 #endif 880 material.sheenRoughness = clamp( sheenRoughness, 0.0001, 1.0 ); 881 #ifdef USE_SHEEN_ROUGHNESSMAP 882 material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a; 883 #endif 884#endif 885#ifdef USE_ANISOTROPY 886 #ifdef USE_ANISOTROPYMAP 887 mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x ); 888 vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb; 889 vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b; 890 #else 891 vec2 anisotropyV = anisotropyVector; 892 #endif 893 material.anisotropy = length( anisotropyV ); 894 if( material.anisotropy == 0.0 ) { 895 anisotropyV = vec2( 1.0, 0.0 ); 896 } else { 897 anisotropyV /= material.anisotropy; 898 material.anisotropy = saturate( material.anisotropy ); 899 } 900 material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) ); 901 material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; 902 material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; 903#endif`,lights_physical_pars_fragment:`uniform sampler2D dfgLUT; 904struct PhysicalMaterial { 905 vec3 diffuseColor; 906 vec3 diffuseContribution; 907 vec3 specularColor; 908 vec3 specularColorBlended; 909 float roughness; 910 float metalness; 911 float specularF90; 912 float dispersion; 913 #ifdef USE_CLEARCOAT 914 float clearcoat; 915 float clearcoatRoughness; 916 vec3 clearcoatF0; 917 float clearcoatF90; 918 #endif 919 #ifdef USE_IRIDESCENCE 920 float iridescence; 921 float iridescenceIOR; 922 float iridescenceThickness; 923 vec3 iridescenceFresnel; 924 vec3 iridescenceF0; 925 vec3 iridescenceFresnelDielectric; 926 vec3 iridescenceFresnelMetallic; 927 #endif 928 #ifdef USE_SHEEN 929 vec3 sheenColor; 930 float sheenRoughness; 931 #endif 932 #ifdef IOR 933 float ior; 934 #endif 935 #ifdef USE_TRANSMISSION 936 float transmission; 937 float transmissionAlpha; 938 float thickness; 939 float attenuationDistance; 940 vec3 attenuationColor; 941 #endif 942 #ifdef USE_ANISOTROPY 943 float anisotropy; 944 float alphaT; 945 vec3 anisotropyT; 946 vec3 anisotropyB; 947 #endif 948}; 949vec3 clearcoatSpecularDirect = vec3( 0.0 ); 950vec3 clearcoatSpecularIndirect = vec3( 0.0 ); 951vec3 sheenSpecularDirect = vec3( 0.0 ); 952vec3 sheenSpecularIndirect = vec3(0.0 ); 953vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) { 954 float x = clamp( 1.0 - dotVH, 0.0, 1.0 ); 955 float x2 = x * x; 956 float x5 = clamp( x * x2 * x2, 0.0, 0.9999 ); 957 return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 ); 958} 959float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) { 960 float a2 = pow2( alpha ); 961 float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); 962 float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); 963 return 0.5 / max( gv + gl, EPSILON ); 964} 965float D_GGX( const in float alpha, const in float dotNH ) { 966 float a2 = pow2( alpha ); 967 float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; 968 return RECIPROCAL_PI * a2 / pow2( denom ); 969} 970#ifdef USE_ANISOTROPY 971 float 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 ) { 972 float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) ); 973 float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) ); 974 float v = 0.5 / ( gv + gl ); 975 return v; 976 } 977 float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) { 978 float a2 = alphaT * alphaB; 979 highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH ); 980 highp float v2 = dot( v, v ); 981 float w2 = a2 / v2; 982 return RECIPROCAL_PI * a2 * pow2 ( w2 ); 983 } 984#endif 985#ifdef USE_CLEARCOAT 986 vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) { 987 vec3 f0 = material.clearcoatF0; 988 float f90 = material.clearcoatF90; 989 float roughness = material.clearcoatRoughness; 990 float alpha = pow2( roughness ); 991 vec3 halfDir = normalize( lightDir + viewDir ); 992 float dotNL = saturate( dot( normal, lightDir ) ); 993 float dotNV = saturate( dot( normal, viewDir ) ); 994 float dotNH = saturate( dot( normal, halfDir ) ); 995 float dotVH = saturate( dot( viewDir, halfDir ) ); 996 vec3 F = F_Schlick( f0, f90, dotVH ); 997 float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); 998 float D = D_GGX( alpha, dotNH ); 999 return F * ( V * D ); 1000 } 1001#endif 1002vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { 1003 vec3 f0 = material.specularColorBlended; 1004 float f90 = material.specularF90; 1005 float roughness = material.roughness; 1006 float alpha = pow2( roughness ); 1007 vec3 halfDir = normalize( lightDir + viewDir ); 1008 float dotNL = saturate( dot( normal, lightDir ) ); 1009 float dotNV = saturate( dot( normal, viewDir ) ); 1010 float dotNH = saturate( dot( normal, halfDir ) ); 1011 float dotVH = saturate( dot( viewDir, halfDir ) ); 1012 vec3 F = F_Schlick( f0, f90, dotVH ); 1013 #ifdef USE_IRIDESCENCE 1014 F = mix( F, material.iridescenceFresnel, material.iridescence ); 1015 #endif 1016 #ifdef USE_ANISOTROPY 1017 float dotTL = dot( material.anisotropyT, lightDir ); 1018 float dotTV = dot( material.anisotropyT, viewDir ); 1019 float dotTH = dot( material.anisotropyT, halfDir ); 1020 float dotBL = dot( material.anisotropyB, lightDir ); 1021 float dotBV = dot( material.anisotropyB, viewDir ); 1022 float dotBH = dot( material.anisotropyB, halfDir ); 1023 float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL ); 1024 float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH ); 1025 #else 1026 float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); 1027 float D = D_GGX( alpha, dotNH ); 1028 #endif 1029 return F * ( V * D ); 1030} 1031vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) { 1032 const float LUT_SIZE = 64.0; 1033 const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE; 1034 const float LUT_BIAS = 0.5 / LUT_SIZE; 1035 float dotNV = saturate( dot( N, V ) ); 1036 vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) ); 1037 uv = uv * LUT_SCALE + LUT_BIAS; 1038 return uv; 1039} 1040float LTC_ClippedSphereFormFactor( const in vec3 f ) { 1041 float l = length( f ); 1042 return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 ); 1043} 1044vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) { 1045 float x = dot( v1, v2 ); 1046 float y = abs( x ); 1047 float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y; 1048 float b = 3.4175940 + ( 4.1616724 + y ) * y; 1049 float v = a / b; 1050 float theta_sintheta = ( x >
vendor: 4,203 bytes, lines 1050-1134
1050 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; 1051 return cross( v1, v2 ) * theta_sintheta; 1052} 1053vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { 1054 vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; 1055 vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; 1056 vec3 lightNormal = cross( v1, v2 ); 1057 if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); 1058 vec3 T1, T2; 1059 T1 = normalize( V - N * dot( V, N ) ); 1060 T2 = - cross( N, T1 ); 1061 mat3 mat = mInv * transpose( mat3( T1, T2, N ) ); 1062 vec3 coords[ 4 ]; 1063 coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); 1064 coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); 1065 coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); 1066 coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); 1067 coords[ 0 ] = normalize( coords[ 0 ] ); 1068 coords[ 1 ] = normalize( coords[ 1 ] ); 1069 coords[ 2 ] = normalize( coords[ 2 ] ); 1070 coords[ 3 ] = normalize( coords[ 3 ] ); 1071 vec3 vectorFormFactor = vec3( 0.0 ); 1072 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); 1073 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); 1074 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); 1075 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); 1076 float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); 1077 return vec3( result ); 1078} 1079#if defined( USE_SHEEN ) 1080float D_Charlie( float roughness, float dotNH ) { 1081 float alpha = pow2( roughness ); 1082 float invAlpha = 1.0 / alpha; 1083 float cos2h = dotNH * dotNH; 1084 float sin2h = max( 1.0 - cos2h, 0.0078125 ); 1085 return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI ); 1086} 1087float V_Neubelt( float dotNV, float dotNL ) { 1088 return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ); 1089} 1090vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) { 1091 vec3 halfDir = normalize( lightDir + viewDir ); 1092 float dotNL = saturate( dot( normal, lightDir ) ); 1093 float dotNV = saturate( dot( normal, viewDir ) ); 1094 float dotNH = saturate( dot( normal, halfDir ) ); 1095 float D = D_Charlie( sheenRoughness, dotNH ); 1096 float V = V_Neubelt( dotNV, dotNL ); 1097 return sheenColor * ( D * V ); 1098} 1099#endif 1100float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { 1101 float dotNV = saturate( dot( normal, viewDir ) ); 1102 float r2 = roughness * roughness; 1103 float rInv = 1.0 / ( roughness + 0.1 ); 1104 float a = -1.9362 + 1.0678 * roughness + 0.4573 * r2 - 0.8469 * rInv; 1105 float b = -0.6014 + 0.5538 * roughness - 0.4670 * r2 - 0.1255 * rInv; 1106 float DG = exp( a * dotNV + b ); 1107 return saturate( DG ); 1108} 1109vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { 1110 float dotNV = saturate( dot( normal, viewDir ) ); 1111 vec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg; 1112 return specularColor * fab.x + specularF90 * fab.y; 1113} 1114#ifdef USE_IRIDESCENCE 1115void 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 ) { 1116#else 1117void 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 ) { 1118#endif 1119 float dotNV = saturate( dot( normal, viewDir ) ); 1120 vec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg; 1121 #ifdef USE_IRIDESCENCE 1122 vec3 Fr = mix( specularColor, iridescenceF0, iridescence ); 1123 #else 1124 vec3 Fr = specularColor; 1125 #endif 1126 vec3 FssEss = Fr * fab.x + specularF90 * fab.y; 1127 float Ess = fab.x + fab.y; 1128 float Ems = 1.0 - Ess; 1129 vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); 1130 singleScatter += FssEss; 1131 multiScatter += Fms * Ems; 1132} 1133vec3 BRDF_GGX_Multiscatter( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { 1134 vec3 singleScatter = BRDF_GGX( lightDir, viewDir, normal, material );
vendor: 6,009 bytes, lines 1135-1233
1135 float dotNL = saturate( dot( normal, lightDir ) ); 1136 float dotNV = saturate( dot( normal, viewDir ) ); 1137 vec2 dfgV = texture2D( dfgLUT, vec2( material.roughness, dotNV ) ).rg; 1138 vec2 dfgL = texture2D( dfgLUT, vec2( material.roughness, dotNL ) ).rg; 1139 vec3 FssEss_V = material.specularColorBlended * dfgV.x + material.specularF90 * dfgV.y; 1140 vec3 FssEss_L = material.specularColorBlended * dfgL.x + material.specularF90 * dfgL.y; 1141 float Ess_V = dfgV.x + dfgV.y; 1142 float Ess_L = dfgL.x + dfgL.y; 1143 float Ems_V = 1.0 - Ess_V; 1144 float Ems_L = 1.0 - Ess_L; 1145 vec3 Favg = material.specularColorBlended + ( 1.0 - material.specularColorBlended ) * 0.047619; 1146 vec3 Fms = FssEss_V * FssEss_L * Favg / ( 1.0 - Ems_V * Ems_L * Favg + EPSILON ); 1147 float compensationFactor = Ems_V * Ems_L; 1148 vec3 multiScatter = Fms * compensationFactor; 1149 return singleScatter + multiScatter; 1150} 1151#if NUM_RECT_AREA_LIGHTS > 0 1152 void 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 ) { 1153 vec3 normal = geometryNormal; 1154 vec3 viewDir = geometryViewDir; 1155 vec3 position = geometryPosition; 1156 vec3 lightPos = rectAreaLight.position; 1157 vec3 halfWidth = rectAreaLight.halfWidth; 1158 vec3 halfHeight = rectAreaLight.halfHeight; 1159 vec3 lightColor = rectAreaLight.color; 1160 float roughness = material.roughness; 1161 vec3 rectCoords[ 4 ]; 1162 rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; 1163 rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; 1164 rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; 1165 vec2 uv = LTC_Uv( normal, viewDir, roughness ); 1166 vec4 t1 = texture2D( ltc_1, uv ); 1167 vec4 t2 = texture2D( ltc_2, uv ); 1168 mat3 mInv = mat3( 1169 vec3( t1.x, 0, t1.y ), 1170 vec3( 0, 1, 0 ), 1171 vec3( t1.z, 0, t1.w ) 1172 ); 1173 vec3 fresnel = ( material.specularColorBlended * t2.x + ( material.specularF90 - material.specularColorBlended ) * t2.y ); 1174 reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); 1175 reflectedLight.directDiffuse += lightColor * material.diffuseContribution * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); 1176 #ifdef USE_CLEARCOAT 1177 vec3 Ncc = geometryClearcoatNormal; 1178 vec2 uvClearcoat = LTC_Uv( Ncc, viewDir, material.clearcoatRoughness ); 1179 vec4 t1Clearcoat = texture2D( ltc_1, uvClearcoat ); 1180 vec4 t2Clearcoat = texture2D( ltc_2, uvClearcoat ); 1181 mat3 mInvClearcoat = mat3( 1182 vec3( t1Clearcoat.x, 0, t1Clearcoat.y ), 1183 vec3( 0, 1, 0 ), 1184 vec3( t1Clearcoat.z, 0, t1Clearcoat.w ) 1185 ); 1186 vec3 fresnelClearcoat = material.clearcoatF0 * t2Clearcoat.x + ( material.clearcoatF90 - material.clearcoatF0 ) * t2Clearcoat.y; 1187 clearcoatSpecularDirect += lightColor * fresnelClearcoat * LTC_Evaluate( Ncc, viewDir, position, mInvClearcoat, rectCoords ); 1188 #endif 1189 } 1190#endif 1191void 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 ) { 1192 float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); 1193 vec3 irradiance = dotNL * directLight.color; 1194 #ifdef USE_CLEARCOAT 1195 float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) ); 1196 vec3 ccIrradiance = dotNLcc * directLight.color; 1197 clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material ); 1198 #endif 1199 #ifdef USE_SHEEN 1200 1201 sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness ); 1202 1203 float sheenAlbedoV = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); 1204 float sheenAlbedoL = IBLSheenBRDF( geometryNormal, directLight.direction, material.sheenRoughness ); 1205 1206 float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * max( sheenAlbedoV, sheenAlbedoL ); 1207 1208 irradiance *= sheenEnergyComp; 1209 1210 #endif 1211 reflectedLight.directSpecular += irradiance * BRDF_GGX_Multiscatter( directLight.direction, geometryViewDir, geometryNormal, material ); 1212 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseContribution ); 1213} 1214void 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 ) { 1215 vec3 diffuse = irradiance * BRDF_Lambert( material.diffuseContribution ); 1216 #ifdef USE_SHEEN 1217 float sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); 1218 float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo; 1219 diffuse *= sheenEnergyComp; 1220 #endif 1221 reflectedLight.indirectDiffuse += diffuse; 1222} 1223void 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) { 1224 #ifdef USE_CLEARCOAT 1225 clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); 1226 #endif 1227 #ifdef USE_SHEEN 1228 sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ) * RECIPROCAL_PI; 1229 #endif 1230 vec3 singleScatteringDielectric = vec3( 0.0 ); 1231 vec3 multiScatteringDielectric = vec3( 0.0 ); 1232 vec3 singleScatteringMetallic = vec3( 0.0 ); 1233 vec3 multiScatteringMetallic = vec3( 0.0 );
vendor: 8,542 bytes, lines 1234-1387
1234 #ifdef USE_IRIDESCENCE 1235 computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnelDielectric, material.roughness, singleScatteringDielectric, multiScatteringDielectric ); 1236 computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.diffuseColor, material.specularF90, material.iridescence, material.iridescenceFresnelMetallic, material.roughness, singleScatteringMetallic, multiScatteringMetallic ); 1237 #else 1238 computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScatteringDielectric, multiScatteringDielectric ); 1239 computeMultiscattering( geometryNormal, geometryViewDir, material.diffuseColor, material.specularF90, material.roughness, singleScatteringMetallic, multiScatteringMetallic ); 1240 #endif 1241 vec3 singleScattering = mix( singleScatteringDielectric, singleScatteringMetallic, material.metalness ); 1242 vec3 multiScattering = mix( multiScatteringDielectric, multiScatteringMetallic, material.metalness ); 1243 vec3 totalScatteringDielectric = singleScatteringDielectric + multiScatteringDielectric; 1244 vec3 diffuse = material.diffuseContribution * ( 1.0 - totalScatteringDielectric ); 1245 vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; 1246 vec3 indirectSpecular = radiance * singleScattering; 1247 indirectSpecular += multiScattering * cosineWeightedIrradiance; 1248 vec3 indirectDiffuse = diffuse * cosineWeightedIrradiance; 1249 #ifdef USE_SHEEN 1250 float sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); 1251 float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo; 1252 indirectSpecular *= sheenEnergyComp; 1253 indirectDiffuse *= sheenEnergyComp; 1254 #endif 1255 reflectedLight.indirectSpecular += indirectSpecular; 1256 reflectedLight.indirectDiffuse += indirectDiffuse; 1257} 1258#define RE_Direct RE_Direct_Physical 1259#define RE_Direct_RectArea RE_Direct_RectArea_Physical 1260#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical 1261#define RE_IndirectSpecular RE_IndirectSpecular_Physical 1262float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { 1263 return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); 1264}`,lights_fragment_begin:` 1265vec3 geometryPosition = - vViewPosition; 1266vec3 geometryNormal = normal; 1267vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); 1268vec3 geometryClearcoatNormal = vec3( 0.0 ); 1269#ifdef USE_CLEARCOAT 1270 geometryClearcoatNormal = clearcoatNormal; 1271#endif 1272#ifdef USE_IRIDESCENCE 1273 float dotNVi = saturate( dot( normal, geometryViewDir ) ); 1274 if ( material.iridescenceThickness == 0.0 ) { 1275 material.iridescence = 0.0; 1276 } else { 1277 material.iridescence = saturate( material.iridescence ); 1278 } 1279 if ( material.iridescence > 0.0 ) { 1280 material.iridescenceFresnelDielectric = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor ); 1281 material.iridescenceFresnelMetallic = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.diffuseColor ); 1282 material.iridescenceFresnel = mix( material.iridescenceFresnelDielectric, material.iridescenceFresnelMetallic, material.metalness ); 1283 material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi ); 1284 } 1285#endif 1286IncidentLight directLight; 1287#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) 1288 PointLight pointLight; 1289 #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 1290 PointLightShadow pointLightShadow; 1291 #endif 1292 #pragma unroll_loop_start 1293 for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { 1294 pointLight = pointLights[ i ]; 1295 getPointLightInfo( pointLight, geometryPosition, directLight ); 1296 #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) ) 1297 pointLightShadow = pointLightShadows[ i ]; 1298 directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; 1299 #endif 1300 RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1301 } 1302 #pragma unroll_loop_end 1303#endif 1304#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) 1305 SpotLight spotLight; 1306 vec4 spotColor; 1307 vec3 spotLightCoord; 1308 bool inSpotLightMap; 1309 #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 1310 SpotLightShadow spotLightShadow; 1311 #endif 1312 #pragma unroll_loop_start 1313 for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { 1314 spotLight = spotLights[ i ]; 1315 getSpotLightInfo( spotLight, geometryPosition, directLight ); 1316 #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) 1317 #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX 1318 #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) 1319 #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS 1320 #else 1321 #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) 1322 #endif 1323 #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS ) 1324 spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w; 1325 inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) ); 1326 spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy ); 1327 directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color; 1328 #endif 1329 #undef SPOT_LIGHT_MAP_INDEX 1330 #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) 1331 spotLightShadow = spotLightShadows[ i ]; 1332 directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; 1333 #endif 1334 RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1335 } 1336 #pragma unroll_loop_end 1337#endif 1338#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) 1339 DirectionalLight directionalLight; 1340 #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 1341 DirectionalLightShadow directionalLightShadow; 1342 #endif 1343 #pragma unroll_loop_start 1344 for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { 1345 directionalLight = directionalLights[ i ]; 1346 getDirectionalLightInfo( directionalLight, directLight ); 1347 #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) 1348 directionalLightShadow = directionalLightShadows[ i ]; 1349 directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; 1350 #endif 1351 RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1352 } 1353 #pragma unroll_loop_end 1354#endif 1355#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) 1356 RectAreaLight rectAreaLight; 1357 #pragma unroll_loop_start 1358 for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { 1359 rectAreaLight = rectAreaLights[ i ]; 1360 RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1361 } 1362 #pragma unroll_loop_end 1363#endif 1364#if defined( RE_IndirectDiffuse ) 1365 vec3 iblIrradiance = vec3( 0.0 ); 1366 vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); 1367 #if defined( USE_LIGHT_PROBES ) 1368 irradiance += getLightProbeIrradiance( lightProbe, geometryNormal ); 1369 #endif 1370 #if ( NUM_HEMI_LIGHTS > 0 ) 1371 #pragma unroll_loop_start 1372 for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { 1373 irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal ); 1374 } 1375 #pragma unroll_loop_end 1376 #endif 1377#endif 1378#if defined( RE_IndirectSpecular ) 1379 vec3 radiance = vec3( 0.0 ); 1380 vec3 clearcoatRadiance = vec3( 0.0 ); 1381#endif`,lights_fragment_maps:`#if defined( RE_IndirectDiffuse ) 1382 #ifdef USE_LIGHTMAP 1383 vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); 1384 vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; 1385 irradiance += lightMapIrradiance; 1386 #endif 1387 #if defined( USE_ENVMAP ) && defined(
1387ENVMAP_TYPE_CUBE_UV ) 1388 #if defined( STANDARD ) || defined( LAMBERT ) || defined( PHONG ) 1389 iblIrradiance += getIBLIrradiance( geometryNormal ); 1390 #endif 1391 #endif 1392#endif 1393#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) 1394 #ifdef USE_ANISOTROPY 1395 radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy ); 1396 #else 1397 radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness ); 1398 #endif 1399 #ifdef USE_CLEARCOAT 1400 clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); 1401 #endif 1402#endif`,lights_fragment_end:`#if defined( RE_IndirectDiffuse ) 1403 #if defined( LAMBERT ) || defined( PHONG ) 1404 irradiance += iblIrradiance; 1405 #endif 1406 RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1407#endif 1408#if defined( RE_IndirectSpecular ) 1409 RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1410#endif`,logdepthbuf_fragment:`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER ) 1411 gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; 1412#endif`,logdepthbuf_pars_fragment:`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER ) 1413 uniform float logDepthBufFC; 1414 varying float vFragDepth; 1415 varying float vIsPerspective; 1416#endif`,logdepthbuf_pars_vertex:`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER 1417 varying float vFragDepth; 1418 varying float vIsPerspective; 1419#endif`,logdepthbuf_vertex:`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER
vendor: 9,879 bytes, lines 1419-1683
1419 1420 vFragDepth = 1.0 + gl_Position.w; 1421 vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); 1422#endif`,map_fragment:`#ifdef USE_MAP 1423 vec4 sampledDiffuseColor = texture2D( map, vMapUv ); 1424 #ifdef DECODE_VIDEO_TEXTURE 1425 sampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor ); 1426 #endif 1427 diffuseColor *= sampledDiffuseColor; 1428#endif`,map_pars_fragment:`#ifdef USE_MAP 1429 uniform sampler2D map; 1430#endif`,map_particle_fragment:`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) 1431 #if defined( USE_POINTS_UV ) 1432 vec2 uv = vUv; 1433 #else 1434 vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; 1435 #endif 1436#endif 1437#ifdef USE_MAP 1438 diffuseColor *= texture2D( map, uv ); 1439#endif 1440#ifdef USE_ALPHAMAP 1441 diffuseColor.a *= texture2D( alphaMap, uv ).g; 1442#endif`,map_particle_pars_fragment:`#if defined( USE_POINTS_UV ) 1443 varying vec2 vUv; 1444#else 1445 #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) 1446 uniform mat3 uvTransform; 1447 #endif 1448#endif 1449#ifdef USE_MAP 1450 uniform sampler2D map; 1451#endif 1452#ifdef USE_ALPHAMAP 1453 uniform sampler2D alphaMap; 1454#endif`,metalnessmap_fragment:`float metalnessFactor = metalness; 1455#ifdef USE_METALNESSMAP 1456 vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); 1457 metalnessFactor *= texelMetalness.b; 1458#endif`,metalnessmap_pars_fragment:`#ifdef USE_METALNESSMAP 1459 uniform sampler2D metalnessMap; 1460#endif`,morphinstance_vertex:`#ifdef USE_INSTANCING_MORPH 1461 float morphTargetInfluences[ MORPHTARGETS_COUNT ]; 1462 float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r; 1463 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1464 morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r; 1465 } 1466#endif`,morphcolor_vertex:`#if defined( USE_MORPHCOLORS ) 1467 vColor *= morphTargetBaseInfluence; 1468 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1469 #if defined( USE_COLOR_ALPHA ) 1470 if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ]; 1471 #elif defined( USE_COLOR ) 1472 if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; 1473 #endif 1474 } 1475#endif`,morphnormal_vertex:`#ifdef USE_MORPHNORMALS 1476 objectNormal *= morphTargetBaseInfluence; 1477 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1478 if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ]; 1479 } 1480#endif`,morphtarget_pars_vertex:`#ifdef USE_MORPHTARGETS 1481 #ifndef USE_INSTANCING_MORPH 1482 uniform float morphTargetBaseInfluence; 1483 uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; 1484 #endif 1485 uniform sampler2DArray morphTargetsTexture; 1486 uniform ivec2 morphTargetsTextureSize; 1487 vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) { 1488 int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset; 1489 int y = texelIndex / morphTargetsTextureSize.x; 1490 int x = texelIndex - y * morphTargetsTextureSize.x; 1491 ivec3 morphUV = ivec3( x, y, morphTargetIndex ); 1492 return texelFetch( morphTargetsTexture, morphUV, 0 ); 1493 } 1494#endif`,morphtarget_vertex:`#ifdef USE_MORPHTARGETS 1495 transformed *= morphTargetBaseInfluence; 1496 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1497 if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ]; 1498 } 1499#endif`,normal_fragment_begin:`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; 1500#ifdef FLAT_SHADED 1501 vec3 fdx = dFdx( vViewPosition ); 1502 vec3 fdy = dFdy( vViewPosition ); 1503 vec3 normal = normalize( cross( fdx, fdy ) ); 1504#else 1505 vec3 normal = normalize( vNormal ); 1506 #ifdef DOUBLE_SIDED 1507 normal *= faceDirection; 1508 #endif 1509#endif 1510#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) 1511 #ifdef USE_TANGENT 1512 mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); 1513 #else 1514 mat3 tbn = getTangentFrame( - vViewPosition, normal, 1515 #if defined( USE_NORMALMAP ) 1516 vNormalMapUv 1517 #elif defined( USE_CLEARCOAT_NORMALMAP ) 1518 vClearcoatNormalMapUv 1519 #else 1520 vUv 1521 #endif 1522 ); 1523 #endif 1524 #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) 1525 tbn[0] *= faceDirection; 1526 tbn[1] *= faceDirection; 1527 #endif 1528#endif 1529#ifdef USE_CLEARCOAT_NORMALMAP 1530 #ifdef USE_TANGENT 1531 mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); 1532 #else 1533 mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv ); 1534 #endif 1535 #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) 1536 tbn2[0] *= faceDirection; 1537 tbn2[1] *= faceDirection; 1538 #endif 1539#endif 1540vec3 nonPerturbedNormal = normal;`,normal_fragment_maps:`#ifdef USE_NORMALMAP_OBJECTSPACE 1541 normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; 1542 #ifdef FLIP_SIDED 1543 normal = - normal; 1544 #endif 1545 #ifdef DOUBLE_SIDED 1546 normal = normal * faceDirection; 1547 #endif 1548 normal = normalize( normalMatrix * normal ); 1549#elif defined( USE_NORMALMAP_TANGENTSPACE ) 1550 vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; 1551 mapN.xy *= normalScale; 1552 normal = normalize( tbn * mapN ); 1553#elif defined( USE_BUMPMAP ) 1554 normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); 1555#endif`,normal_pars_fragment:`#ifndef FLAT_SHADED 1556 varying vec3 vNormal; 1557 #ifdef USE_TANGENT 1558 varying vec3 vTangent; 1559 varying vec3 vBitangent; 1560 #endif 1561#endif`,normal_pars_vertex:`#ifndef FLAT_SHADED 1562 varying vec3 vNormal; 1563 #ifdef USE_TANGENT 1564 varying vec3 vTangent; 1565 varying vec3 vBitangent; 1566 #endif 1567#endif`,normal_vertex:`#ifndef FLAT_SHADED 1568 vNormal = normalize( transformedNormal ); 1569 #ifdef USE_TANGENT 1570 vTangent = normalize( transformedTangent ); 1571 vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); 1572 #endif 1573#endif`,normalmap_pars_fragment:`#ifdef USE_NORMALMAP 1574 uniform sampler2D normalMap; 1575 uniform vec2 normalScale; 1576#endif 1577#ifdef USE_NORMALMAP_OBJECTSPACE 1578 uniform mat3 normalMatrix; 1579#endif 1580#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) ) 1581 mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) { 1582 vec3 q0 = dFdx( eye_pos.xyz ); 1583 vec3 q1 = dFdy( eye_pos.xyz ); 1584 vec2 st0 = dFdx( uv.st ); 1585 vec2 st1 = dFdy( uv.st ); 1586 vec3 N = surf_norm; 1587 vec3 q1perp = cross( q1, N ); 1588 vec3 q0perp = cross( N, q0 ); 1589 vec3 T = q1perp * st0.x + q0perp * st1.x; 1590 vec3 B = q1perp * st0.y + q0perp * st1.y; 1591 float det = max( dot( T, T ), dot( B, B ) ); 1592 float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); 1593 return mat3( T * scale, B * scale, N ); 1594 } 1595#endif`,clearcoat_normal_fragment_begin:`#ifdef USE_CLEARCOAT 1596 vec3 clearcoatNormal = nonPerturbedNormal; 1597#endif`,clearcoat_normal_fragment_maps:`#ifdef USE_CLEARCOAT_NORMALMAP 1598 vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; 1599 clearcoatMapN.xy *= clearcoatNormalScale; 1600 clearcoatNormal = normalize( tbn2 * clearcoatMapN ); 1601#endif`,clearcoat_pars_fragment:`#ifdef USE_CLEARCOATMAP 1602 uniform sampler2D clearcoatMap; 1603#endif 1604#ifdef USE_CLEARCOAT_NORMALMAP 1605 uniform sampler2D clearcoatNormalMap; 1606 uniform vec2 clearcoatNormalScale; 1607#endif 1608#ifdef USE_CLEARCOAT_ROUGHNESSMAP 1609 uniform sampler2D clearcoatRoughnessMap; 1610#endif`,iridescence_pars_fragment:`#ifdef USE_IRIDESCENCEMAP 1611 uniform sampler2D iridescenceMap; 1612#endif 1613#ifdef USE_IRIDESCENCE_THICKNESSMAP 1614 uniform sampler2D iridescenceThicknessMap; 1615#endif`,opaque_fragment:`#ifdef OPAQUE 1616diffuseColor.a = 1.0; 1617#endif 1618#ifdef USE_TRANSMISSION 1619diffuseColor.a *= material.transmissionAlpha; 1620#endif 1621gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,packing:`vec3 packNormalToRGB( const in vec3 normal ) { 1622 return normalize( normal ) * 0.5 + 0.5; 1623} 1624vec3 unpackRGBToNormal( const in vec3 rgb ) { 1625 return 2.0 * rgb.xyz - 1.0; 1626} 1627const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.; 1628const float Inv255 = 1. / 255.; 1629const vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 ); 1630const vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g ); 1631const vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b ); 1632const vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a ); 1633vec4 packDepthToRGBA( const in float v ) { 1634 if( v <= 0.0 ) 1635 return vec4( 0., 0., 0., 0. ); 1636 if( v >= 1.0 ) 1637 return vec4( 1., 1., 1., 1. ); 1638 float vuf; 1639 float af = modf( v * PackFactors.a, vuf ); 1640 float bf = modf( vuf * ShiftRight8, vuf ); 1641 float gf = modf( vuf * ShiftRight8, vuf ); 1642 return vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af ); 1643} 1644vec3 packDepthToRGB( const in float v ) { 1645 if( v <= 0.0 ) 1646 return vec3( 0., 0., 0. ); 1647 if( v >= 1.0 ) 1648 return vec3( 1., 1., 1. ); 1649 float vuf; 1650 float bf = modf( v * PackFactors.b, vuf ); 1651 float gf = modf( vuf * ShiftRight8, vuf ); 1652 return vec3( vuf * Inv255, gf * PackUpscale, bf ); 1653} 1654vec2 packDepthToRG( const in float v ) { 1655 if( v <= 0.0 ) 1656 return vec2( 0., 0. ); 1657 if( v >= 1.0 ) 1658 return vec2( 1., 1. ); 1659 float vuf; 1660 float gf = modf( v * 256., vuf ); 1661 return vec2( vuf * Inv255, gf ); 1662} 1663float unpackRGBAToDepth( const in vec4 v ) { 1664 return dot( v, UnpackFactors4 ); 1665} 1666float unpackRGBToDepth( const in vec3 v ) { 1667 return dot( v, UnpackFactors3 ); 1668} 1669float unpackRGToDepth( const in vec2 v ) { 1670 return v.r * UnpackFactors2.r + v.g * UnpackFactors2.g; 1671} 1672vec4 pack2HalfToRGBA( const in vec2 v ) { 1673 vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) ); 1674 return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w ); 1675} 1676vec2 unpackRGBATo2Half( const in vec4 v ) { 1677 return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); 1678} 1679float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { 1680 return ( viewZ + near ) / ( near - far ); 1681} 1682float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) { 1683
1683#ifdef USE_REVERSED_DEPTH_BUFFER 1684 1685 return depth * ( far - near ) - far; 1686 #else 1687 return depth * ( near - far ) - near; 1688 #endif 1689} 1690float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { 1691 return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ ); 1692} 1693float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { 1694 1695 #ifdef USE_REVERSED_DEPTH_BUFFER 1696 return ( near * far ) / ( ( near - far ) * depth - near ); 1697 #else 1698 return ( near * far ) / ( ( far - near ) * depth - far ); 1699 #endif 1700}`,premultiplied_alpha_fragment:`#ifdef PREMULTIPLIED_ALPHA 1701 gl_FragColor.rgb *= gl_FragColor.a; 1702#endif`,project_vertex:`vec4 mvPosition = vec4( transformed, 1.0 ); 1703#ifdef USE_BATCHING 1704 mvPosition = batchingMatrix * mvPosition; 1705#endif 1706#ifdef USE_INSTANCING 1707 mvPosition = instanceMatrix * mvPosition; 1708#endif 1709mvPosition = modelViewMatrix * mvPosition; 1710gl_Position = projectionMatrix * mvPosition;`,dithering_fragment:`#ifdef DITHERING 1711 gl_FragColor.rgb = dithering( gl_FragColor.rgb ); 1712#endif`,dithering_pars_fragment:`#ifdef DITHERING 1713 vec3 dithering( vec3 color ) { 1714 float grid_position = rand( gl_FragCoord.xy ); 1715 vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); 1716 dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); 1717 return color + dither_shift_RGB; 1718 } 1719#endif`,roughnessmap_fragment:`float roughnessFactor = roughness; 1720#ifdef USE_ROUGHNESSMAP 1721 vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); 1722 roughnessFactor *= texelRoughness.g; 1723#endif`,roughnessmap_pars_fragment:`#ifdef USE_ROUGHNESSMAP 1724 uniform sampler2D roughnessMap; 1725#endif`,shadowmap_pars_fragment:`#if NUM_SPOT_LIGHT_COORDS > 0 1726 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; 1727#endif 1728#if NUM_SPOT_LIGHT_MAPS > 0 1729 uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ]; 1730#endif 1731#ifdef USE_SHADOWMAP 1732 #if NUM_DIR_LIGHT_SHADOWS > 0 1733 #if defined( SHADOWMAP_TYPE_PCF ) 1734 uniform sampler2DShadow directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; 1735 #else 1736 uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; 1737 #endif 1738 varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; 1739 struct DirectionalLightShadow { 1740 float shadowIntensity; 1741 float shadowBias; 1742 float shadowNormalBias; 1743 float shadowRadius; 1744 vec2 shadowMapSize; 1745 }; 1746 uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; 1747 #endif 1748 #if NUM_SPOT_LIGHT_SHADOWS > 0 1749 #if defined( SHADOWMAP_TYPE_PCF ) 1750 uniform sampler2DShadow spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; 1751 #else 1752 uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; 1753 #endif 1754 struct SpotLightShadow { 1755 float shadowIntensity; 1756 float shadowBias; 1757 float shadowNormalBias; 1758 float shadowRadius; 1759 vec2 shadowMapSize; 1760 }; 1761 uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; 1762 #endif 1763 #if NUM_POINT_LIGHT_SHADOWS > 0 1764 #if defined( SHADOWMAP_TYPE_PCF ) 1765 uniform samplerCubeShadow pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; 1766 #elif defined( SHADOWMAP_TYPE_BASIC ) 1767 uniform samplerCube pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; 1768 #endif 1769 varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; 1770 struct PointLightShadow { 1771 float shadowIntensity; 1772 float shadowBias; 1773 float shadowNormalBias; 1774 float shadowRadius; 1775 vec2 shadowMapSize; 1776 float shadowCameraNear; 1777 float shadowCameraFar; 1778 }; 1779 uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; 1780 #endif 1781 #if defined( SHADOWMAP_TYPE_PCF ) 1782 float interleavedGradientNoise( vec2 position ) { 1783 return fract( 52.9829189 * fract( dot( position, vec2( 0.06711056, 0.00583715 ) ) ) ); 1784 } 1785 vec2 vogelDiskSample( int sampleIndex, int samplesCount, float phi ) { 1786 const float goldenAngle = 2.399963229728653; 1787 float r = sqrt( ( float( sampleIndex ) + 0.5 ) / float( samplesCount ) ); 1788 float theta = float( sampleIndex ) * goldenAngle + phi; 1789 return vec2( cos( theta ), sin( theta ) ) * r; 1790 } 1791 #endif 1792 #if defined( SHADOWMAP_TYPE_PCF ) 1793 float getShadow( sampler2DShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) { 1794 float shadow = 1.0; 1795 shadowCoord.xyz /= shadowCoord.w; 1796 shadowCoord.z += shadowBias; 1797 bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; 1798 bool frustumTest = inFrustum && shadowCoord.z <= 1.0; 1799 if ( frustumTest ) { 1800 vec2 texelSize = vec2( 1.0 ) / shadowMapSize; 1801 float radius = shadowRadius * texelSize.x; 1802 float phi = interleavedGradientNoise( gl_FragCoord.xy ) * PI2; 1803 shadow = ( 1804 texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 0, 5, phi ) * radius, shadowCoord.z ) ) + 1805 texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 1, 5, phi ) * radius, shadowCoord.z ) ) + 1806 texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 2, 5, phi ) * radius, shadowCoord.z ) ) + 1807 texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 3, 5, phi ) * radius, shadowCoord.z ) ) + 1808 texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 4, 5, phi ) * radius, shadowCoord.z ) ) 1809 ) * 0.2; 1810 } 1811 return mix( 1.0, shadow, shadowIntensity ); 1812 } 1813 #elif defined( SHADOWMAP_TYPE_VSM ) 1814 float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) { 1815 float shadow = 1.0; 1816 shadowCoord.xyz /= shadowCoord.w; 1817 #ifdef USE_REVERSED_DEPTH_BUFFER 1818 shadowCoord.z -= shadowBias; 1819 #else 1820 shadowCoord.z += shadowBias; 1821 #endif 1822 bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; 1823 bool frustumTest = inFrustum && shadowCoord.z <= 1.0; 1824 if ( frustumTest ) { 1825 vec2 distribution = texture2D( shadowMap, shadowCoord.xy ).rg; 1826 float mean = distribution.x; 1827 float variance = distribution.y * distribution.y; 1828 #ifdef USE_REVERSED_DEPTH_BUFFER 1829 float hard_shadow = step( mean, shadowCoord.z ); 1830 #else 1831 float hard_shadow = step( shadowCoord.z, mean ); 1832 #endif 1833 1834 if ( hard_shadow == 1.0 ) { 1835 shadow = 1.0; 1836 } else { 1837 variance = max( variance, 0.0000001 ); 1838 float d = shadowCoord.z - mean; 1839 float p_max = variance / ( variance + d * d ); 1840 p_max = clamp( ( p_max - 0.3 ) / 0.65, 0.0, 1.0 ); 1841 shadow = max( hard_shadow, p_max ); 1842 } 1843 } 1844 return mix( 1.0, shadow, shadowIntensity ); 1845 } 1846 #else 1847 float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) { 1848 float shadow = 1.0; 1849 shadowCoord.xyz /= shadowCoord.w; 1850 #ifdef USE_REVERSED_DEPTH_BUFFER 1851 shadowCoord.z -= shadowBias; 1852 #else 1853 shadowCoord.z += shadowBias; 1854 #endif 1855 bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; 1856 bool frustumTest = inFrustum && shadowCoord.z <= 1.0; 1857 if ( frustumTest ) { 1858 float depth = texture2D( shadowMap, shadowCoord.xy ).r; 1859 #ifdef USE_REVERSED_DEPTH_BUFFER 1860 shadow = step( depth, shadowCoord.z ); 1861 #else 1862 shadow = step( shadowCoord.z, depth ); 1863 #endif 1864 } 1865 return mix( 1.0, shadow, shadowIntensity ); 1866 } 1867 #endif 1868 #if NUM_POINT_LIGHT_SHADOWS > 0 1869 #if defined( SHADOWMAP_TYPE_PCF ) 1870 float getPointShadow( samplerCubeShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { 1871 float shadow = 1.0; 1872 vec3 lightToPosition = shadowCoord.xyz; 1873 vec3 bd3D = normalize( lightToPosition ); 1874 vec3 absVec = abs( lightToPosition ); 1875 float viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z ); 1876 if ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) { 1877 #ifdef USE_REVERSED_DEPTH_BUFFER 1878 float dp = ( shadowCameraNear * ( shadowCameraFar - viewSpaceZ ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) );
1879 dp -= shadowBias; 1880 #else 1881 float dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) ); 1882 dp += shadowBias; 1883 #endif 1884 float texelSize = shadowRadius / shadowMapSize.x; 1885 vec3 absDir = abs( bd3D ); 1886 vec3 tangent = absDir.x > absDir.z ? vec3( 0.0, 1.0, 0.0 ) : vec3( 1.0, 0.0, 0.0 ); 1887 tangent = normalize( cross( bd3D, tangent ) ); 1888 vec3 bitangent = cross( bd3D, tangent ); 1889 float phi = interleavedGradientNoise( gl_FragCoord.xy ) * PI2; 1890 vec2 sample0 = vogelDiskSample( 0, 5, phi ); 1891 vec2 sample1 = vogelDiskSample( 1, 5, phi ); 1892 vec2 sample2 = vogelDiskSample( 2, 5, phi ); 1893 vec2 sample3 = vogelDiskSample( 3, 5, phi ); 1894 vec2 sample4 = vogelDiskSample( 4, 5, phi ); 1895 shadow = ( 1896 texture( shadowMap, vec4( bd3D + ( tangent * sample0.x + bitangent * sample0.y ) * texelSize, dp ) ) + 1897 texture( shadowMap, vec4( bd3D + ( tangent * sample1.x + bitangent * sample1.y ) * texelSize, dp ) ) + 1898 texture( shadowMap, vec4( bd3D + ( tangent * sample2.x + bitangent * sample2.y ) * texelSize, dp ) ) + 1899 texture( shadowMap, vec4( bd3D + ( tangent * sample3.x + bitangent * sample3.y ) * texelSize, dp ) ) + 1900 texture( shadowMap, vec4( bd3D + ( tangent * sample4.x + bitangent * sample4.y ) * texelSize, dp ) ) 1901 ) * 0.2; 1902 } 1903 return mix( 1.0, shadow, shadowIntensity ); 1904 } 1905 #elif defined( SHADOWMAP_TYPE_BASIC ) 1906 float getPointShadow( samplerCube shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { 1907 float shadow = 1.0; 1908 vec3 lightToPosition = shadowCoord.xyz; 1909 vec3 absVec = abs( lightToPosition ); 1910 float viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z ); 1911 if ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) { 1912 float dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) ); 1913 dp += shadowBias; 1914 vec3 bd3D = normalize( lightToPosition ); 1915 float depth = textureCube( shadowMap, bd3D ).r; 1916 #ifdef USE_REVERSED_DEPTH_BUFFER 1917 depth = 1.0 - depth; 1918 #endif 1919 shadow = step( dp, depth );
vendor: 17,110 bytes, lines 1919-2329
1919 1920 } 1921 return mix( 1.0, shadow, shadowIntensity ); 1922 } 1923 #endif 1924 #endif 1925#endif`,shadowmap_pars_vertex:`#if NUM_SPOT_LIGHT_COORDS > 0 1926 uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; 1927 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; 1928#endif 1929#ifdef USE_SHADOWMAP 1930 #if NUM_DIR_LIGHT_SHADOWS > 0 1931 uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; 1932 varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; 1933 struct DirectionalLightShadow { 1934 float shadowIntensity; 1935 float shadowBias; 1936 float shadowNormalBias; 1937 float shadowRadius; 1938 vec2 shadowMapSize; 1939 }; 1940 uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; 1941 #endif 1942 #if NUM_SPOT_LIGHT_SHADOWS > 0 1943 struct SpotLightShadow { 1944 float shadowIntensity; 1945 float shadowBias; 1946 float shadowNormalBias; 1947 float shadowRadius; 1948 vec2 shadowMapSize; 1949 }; 1950 uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; 1951 #endif 1952 #if NUM_POINT_LIGHT_SHADOWS > 0 1953 uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; 1954 varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; 1955 struct PointLightShadow { 1956 float shadowIntensity; 1957 float shadowBias; 1958 float shadowNormalBias; 1959 float shadowRadius; 1960 vec2 shadowMapSize; 1961 float shadowCameraNear; 1962 float shadowCameraFar; 1963 }; 1964 uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; 1965 #endif 1966#endif`,shadowmap_vertex:`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) 1967 vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); 1968 vec4 shadowWorldPosition; 1969#endif 1970#if defined( USE_SHADOWMAP ) 1971 #if NUM_DIR_LIGHT_SHADOWS > 0 1972 #pragma unroll_loop_start 1973 for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { 1974 shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 ); 1975 vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition; 1976 } 1977 #pragma unroll_loop_end 1978 #endif 1979 #if NUM_POINT_LIGHT_SHADOWS > 0 1980 #pragma unroll_loop_start 1981 for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { 1982 shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 ); 1983 vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition; 1984 } 1985 #pragma unroll_loop_end 1986 #endif 1987#endif 1988#if NUM_SPOT_LIGHT_COORDS > 0 1989 #pragma unroll_loop_start 1990 for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) { 1991 shadowWorldPosition = worldPosition; 1992 #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) 1993 shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias; 1994 #endif 1995 vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; 1996 } 1997 #pragma unroll_loop_end 1998#endif`,shadowmask_pars_fragment:`float getShadowMask() { 1999 float shadow = 1.0; 2000 #ifdef USE_SHADOWMAP 2001 #if NUM_DIR_LIGHT_SHADOWS > 0 2002 DirectionalLightShadow directionalLight; 2003 #pragma unroll_loop_start 2004 for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { 2005 directionalLight = directionalLightShadows[ i ]; 2006 shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; 2007 } 2008 #pragma unroll_loop_end 2009 #endif 2010 #if NUM_SPOT_LIGHT_SHADOWS > 0 2011 SpotLightShadow spotLight; 2012 #pragma unroll_loop_start 2013 for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { 2014 spotLight = spotLightShadows[ i ]; 2015 shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; 2016 } 2017 #pragma unroll_loop_end 2018 #endif 2019 #if NUM_POINT_LIGHT_SHADOWS > 0 && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) ) 2020 PointLightShadow pointLight; 2021 #pragma unroll_loop_start 2022 for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { 2023 pointLight = pointLightShadows[ i ]; 2024 shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; 2025 } 2026 #pragma unroll_loop_end 2027 #endif 2028 #endif 2029 return shadow; 2030}`,skinbase_vertex:`#ifdef USE_SKINNING 2031 mat4 boneMatX = getBoneMatrix( skinIndex.x ); 2032 mat4 boneMatY = getBoneMatrix( skinIndex.y ); 2033 mat4 boneMatZ = getBoneMatrix( skinIndex.z ); 2034 mat4 boneMatW = getBoneMatrix( skinIndex.w ); 2035#endif`,skinning_pars_vertex:`#ifdef USE_SKINNING 2036 uniform mat4 bindMatrix; 2037 uniform mat4 bindMatrixInverse; 2038 uniform highp sampler2D boneTexture; 2039 mat4 getBoneMatrix( const in float i ) { 2040 int size = textureSize( boneTexture, 0 ).x; 2041 int j = int( i ) * 4; 2042 int x = j % size; 2043 int y = j / size; 2044 vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 ); 2045 vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 ); 2046 vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 ); 2047 vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); 2048 return mat4( v1, v2, v3, v4 ); 2049 } 2050#endif`,skinning_vertex:`#ifdef USE_SKINNING 2051 vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); 2052 vec4 skinned = vec4( 0.0 ); 2053 skinned += boneMatX * skinVertex * skinWeight.x; 2054 skinned += boneMatY * skinVertex * skinWeight.y; 2055 skinned += boneMatZ * skinVertex * skinWeight.z; 2056 skinned += boneMatW * skinVertex * skinWeight.w; 2057 transformed = ( bindMatrixInverse * skinned ).xyz; 2058#endif`,skinnormal_vertex:`#ifdef USE_SKINNING 2059 mat4 skinMatrix = mat4( 0.0 ); 2060 skinMatrix += skinWeight.x * boneMatX; 2061 skinMatrix += skinWeight.y * boneMatY; 2062 skinMatrix += skinWeight.z * boneMatZ; 2063 skinMatrix += skinWeight.w * boneMatW; 2064 skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; 2065 objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; 2066 #ifdef USE_TANGENT 2067 objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; 2068 #endif 2069#endif`,specularmap_fragment:`float specularStrength; 2070#ifdef USE_SPECULARMAP 2071 vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); 2072 specularStrength = texelSpecular.r; 2073#else 2074 specularStrength = 1.0; 2075#endif`,specularmap_pars_fragment:`#ifdef USE_SPECULARMAP 2076 uniform sampler2D specularMap; 2077#endif`,tonemapping_fragment:`#if defined( TONE_MAPPING ) 2078 gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); 2079#endif`,tonemapping_pars_fragment:`#ifndef saturate 2080#define saturate( a ) clamp( a, 0.0, 1.0 ) 2081#endif 2082uniform float toneMappingExposure; 2083vec3 LinearToneMapping( vec3 color ) { 2084 return saturate( toneMappingExposure * color ); 2085} 2086vec3 ReinhardToneMapping( vec3 color ) { 2087 color *= toneMappingExposure; 2088 return saturate( color / ( vec3( 1.0 ) + color ) ); 2089} 2090vec3 CineonToneMapping( vec3 color ) { 2091 color *= toneMappingExposure; 2092 color = max( vec3( 0.0 ), color - 0.004 ); 2093 return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); 2094} 2095vec3 RRTAndODTFit( vec3 v ) { 2096 vec3 a = v * ( v + 0.0245786 ) - 0.000090537; 2097 vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; 2098 return a / b; 2099} 2100vec3 ACESFilmicToneMapping( vec3 color ) { 2101 const mat3 ACESInputMat = mat3( 2102 vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ), 2103 vec3( 0.04823, 0.01566, 0.83777 ) 2104 ); 2105 const mat3 ACESOutputMat = mat3( 2106 vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ), 2107 vec3( -0.07367, -0.00605, 1.07602 ) 2108 ); 2109 color *= toneMappingExposure / 0.6; 2110 color = ACESInputMat * color; 2111 color = RRTAndODTFit( color ); 2112 color = ACESOutputMat * color; 2113 return saturate( color ); 2114} 2115const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3( 2116 vec3( 1.6605, - 0.1246, - 0.0182 ), 2117 vec3( - 0.5876, 1.1329, - 0.1006 ), 2118 vec3( - 0.0728, - 0.0083, 1.1187 ) 2119); 2120const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3( 2121 vec3( 0.6274, 0.0691, 0.0164 ), 2122 vec3( 0.3293, 0.9195, 0.0880 ), 2123 vec3( 0.0433, 0.0113, 0.8956 ) 2124); 2125vec3 agxDefaultContrastApprox( vec3 x ) { 2126 vec3 x2 = x * x; 2127 vec3 x4 = x2 * x2; 2128 return + 15.5 * x4 * x2 2129 - 40.14 * x4 * x 2130 + 31.96 * x4 2131 - 6.868 * x2 * x 2132 + 0.4298 * x2 2133 + 0.1191 * x 2134 - 0.00232; 2135} 2136vec3 AgXToneMapping( vec3 color ) { 2137 const mat3 AgXInsetMatrix = mat3( 2138 vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ), 2139 vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ), 2140 vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 ) 2141 ); 2142 const mat3 AgXOutsetMatrix = mat3( 2143 vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ), 2144 vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ), 2145 vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 ) 2146 ); 2147 const float AgxMinEv = - 12.47393; const float AgxMaxEv = 4.026069; 2148 color *= toneMappingExposure; 2149 color = LINEAR_SRGB_TO_LINEAR_REC2020 * color; 2150 color = AgXInsetMatrix * color; 2151 color = max( color, 1e-10 ); color = log2( color ); 2152 color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv ); 2153 color = clamp( color, 0.0, 1.0 ); 2154 color = agxDefaultContrastApprox( color ); 2155 color = AgXOutsetMatrix * color; 2156 color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) ); 2157 color = LINEAR_REC2020_TO_LINEAR_SRGB * color; 2158 color = clamp( color, 0.0, 1.0 ); 2159 return color; 2160} 2161vec3 NeutralToneMapping( vec3 color ) { 2162 const float StartCompression = 0.8 - 0.04; 2163 const float Desaturation = 0.15; 2164 color *= toneMappingExposure; 2165 float x = min( color.r, min( color.g, color.b ) ); 2166 float offset = x < 0.08 ? x - 6.25 * x * x : 0.04; 2167 color -= offset; 2168 float peak = max( color.r, max( color.g, color.b ) ); 2169 if ( peak < StartCompression ) return color; 2170 float d = 1. - StartCompression; 2171 float newPeak = 1. - d * d / ( peak + d - StartCompression ); 2172 color *= newPeak / peak; 2173 float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. ); 2174 return mix( color, vec3( newPeak ), g ); 2175} 2176vec3 CustomToneMapping( vec3 color ) { return color; }`,transmission_fragment:`#ifdef USE_TRANSMISSION 2177 material.transmission = transmission; 2178 material.transmissionAlpha = 1.0; 2179 material.thickness = thickness; 2180 material.attenuationDistance = attenuationDistance; 2181 material.attenuationColor = attenuationColor; 2182 #ifdef USE_TRANSMISSIONMAP 2183 material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r; 2184 #endif 2185 #ifdef USE_THICKNESSMAP 2186 material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g; 2187 #endif 2188 vec3 pos = vWorldPosition; 2189 vec3 v = normalize( cameraPosition - pos ); 2190 vec3 n = inverseTransformDirection( normal, viewMatrix ); 2191 vec4 transmitted = getIBLVolumeRefraction( 2192 n, v, material.roughness, material.diffuseContribution, material.specularColorBlended, material.specularF90, 2193 pos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness, 2194 material.attenuationColor, material.attenuationDistance ); 2195 material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); 2196 totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); 2197#endif`,transmission_pars_fragment:`#ifdef USE_TRANSMISSION 2198 uniform float transmission; 2199 uniform float thickness; 2200 uniform float attenuationDistance; 2201 uniform vec3 attenuationColor; 2202 #ifdef USE_TRANSMISSIONMAP 2203 uniform sampler2D transmissionMap; 2204 #endif 2205 #ifdef USE_THICKNESSMAP 2206 uniform sampler2D thicknessMap; 2207 #endif 2208 uniform vec2 transmissionSamplerSize; 2209 uniform sampler2D transmissionSamplerMap; 2210 uniform mat4 modelMatrix; 2211 uniform mat4 projectionMatrix; 2212 varying vec3 vWorldPosition; 2213 float w0( float a ) { 2214 return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 ); 2215 } 2216 float w1( float a ) { 2217 return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 ); 2218 } 2219 float w2( float a ){ 2220 return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 ); 2221 } 2222 float w3( float a ) { 2223 return ( 1.0 / 6.0 ) * ( a * a * a ); 2224 } 2225 float g0( float a ) { 2226 return w0( a ) + w1( a ); 2227 } 2228 float g1( float a ) { 2229 return w2( a ) + w3( a ); 2230 } 2231 float h0( float a ) { 2232 return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) ); 2233 } 2234 float h1( float a ) { 2235 return 1.0 + w3( a ) / ( w2( a ) + w3( a ) ); 2236 } 2237 vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) { 2238 uv = uv * texelSize.zw + 0.5; 2239 vec2 iuv = floor( uv ); 2240 vec2 fuv = fract( uv ); 2241 float g0x = g0( fuv.x ); 2242 float g1x = g1( fuv.x ); 2243 float h0x = h0( fuv.x ); 2244 float h1x = h1( fuv.x ); 2245 float h0y = h0( fuv.y ); 2246 float h1y = h1( fuv.y ); 2247 vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; 2248 vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; 2249 vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; 2250 vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; 2251 return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) + 2252 g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) ); 2253 } 2254 vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) { 2255 vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) ); 2256 vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) ); 2257 vec2 fLodSizeInv = 1.0 / fLodSize; 2258 vec2 cLodSizeInv = 1.0 / cLodSize; 2259 vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) ); 2260 vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) ); 2261 return mix( fSample, cSample, fract( lod ) ); 2262 } 2263 vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) { 2264 vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior ); 2265 vec3 modelScale; 2266 modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) ); 2267 modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) ); 2268 modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) ); 2269 return normalize( refractionVector ) * thickness * modelScale; 2270 } 2271 float applyIorToRoughness( const in float roughness, const in float ior ) { 2272 return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 ); 2273 } 2274 vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) { 2275 float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior ); 2276 return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod ); 2277 } 2278 vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) { 2279 if ( isinf( attenuationDistance ) ) { 2280 return vec3( 1.0 ); 2281 } else { 2282 vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance; 2283 vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance; 2284 } 2285 } 2286 vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor, 2287 const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix, 2288 const in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness, 2289 const in vec3 attenuationColor, const in float attenuationDistance ) { 2290 vec4 transmittedLight; 2291 vec3 transmittance; 2292 #ifdef USE_DISPERSION 2293 float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion; 2294 vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread ); 2295 for ( int i = 0; i < 3; i ++ ) { 2296 vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix ); 2297 vec3 refractedRayExit = position + transmissionRay; 2298 vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); 2299 vec2 refractionCoords = ndcPos.xy / ndcPos.w; 2300 refractionCoords += 1.0; 2301 refractionCoords /= 2.0; 2302 vec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] ); 2303 transmittedLight[ i ] = transmissionSample[ i ]; 2304 transmittedLight.a += transmissionSample.a; 2305 transmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ]; 2306 } 2307 transmittedLight.a /= 3.0; 2308 #else 2309 vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix ); 2310 vec3 refractedRayExit = position + transmissionRay; 2311 vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); 2312 vec2 refractionCoords = ndcPos.xy / ndcPos.w; 2313 refractionCoords += 1.0; 2314 refractionCoords /= 2.0; 2315 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior ); 2316 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance ); 2317 #endif 2318 vec3 attenuatedColor = transmittance * transmittedLight.rgb; 2319 vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); 2320 float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; 2321 return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); 2322 } 2323#endif`,uv_pars_fragment:`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) 2324 varying vec2 vUv; 2325#endif 2326#ifdef USE_MAP 2327 varying vec2 vMapUv; 2328#endif 2329#ifdef USE_ALPHAMAP
vendor: 10,762 bytes, lines 2330-2682
2330 varying vec2 vAlphaMapUv; 2331#endif 2332#ifdef USE_LIGHTMAP 2333 varying vec2 vLightMapUv; 2334#endif 2335#ifdef USE_AOMAP 2336 varying vec2 vAoMapUv; 2337#endif 2338#ifdef USE_BUMPMAP 2339 varying vec2 vBumpMapUv; 2340#endif 2341#ifdef USE_NORMALMAP 2342 varying vec2 vNormalMapUv; 2343#endif 2344#ifdef USE_EMISSIVEMAP 2345 varying vec2 vEmissiveMapUv; 2346#endif 2347#ifdef USE_METALNESSMAP 2348 varying vec2 vMetalnessMapUv; 2349#endif 2350#ifdef USE_ROUGHNESSMAP 2351 varying vec2 vRoughnessMapUv; 2352#endif 2353#ifdef USE_ANISOTROPYMAP 2354 varying vec2 vAnisotropyMapUv; 2355#endif 2356#ifdef USE_CLEARCOATMAP 2357 varying vec2 vClearcoatMapUv; 2358#endif 2359#ifdef USE_CLEARCOAT_NORMALMAP 2360 varying vec2 vClearcoatNormalMapUv; 2361#endif 2362#ifdef USE_CLEARCOAT_ROUGHNESSMAP 2363 varying vec2 vClearcoatRoughnessMapUv; 2364#endif 2365#ifdef USE_IRIDESCENCEMAP 2366 varying vec2 vIridescenceMapUv; 2367#endif 2368#ifdef USE_IRIDESCENCE_THICKNESSMAP 2369 varying vec2 vIridescenceThicknessMapUv; 2370#endif 2371#ifdef USE_SHEEN_COLORMAP 2372 varying vec2 vSheenColorMapUv; 2373#endif 2374#ifdef USE_SHEEN_ROUGHNESSMAP 2375 varying vec2 vSheenRoughnessMapUv; 2376#endif 2377#ifdef USE_SPECULARMAP 2378 varying vec2 vSpecularMapUv; 2379#endif 2380#ifdef USE_SPECULAR_COLORMAP 2381 varying vec2 vSpecularColorMapUv; 2382#endif 2383#ifdef USE_SPECULAR_INTENSITYMAP 2384 varying vec2 vSpecularIntensityMapUv; 2385#endif 2386#ifdef USE_TRANSMISSIONMAP 2387 uniform mat3 transmissionMapTransform; 2388 varying vec2 vTransmissionMapUv; 2389#endif 2390#ifdef USE_THICKNESSMAP 2391 uniform mat3 thicknessMapTransform; 2392 varying vec2 vThicknessMapUv; 2393#endif`,uv_pars_vertex:`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) 2394 varying vec2 vUv; 2395#endif 2396#ifdef USE_MAP 2397 uniform mat3 mapTransform; 2398 varying vec2 vMapUv; 2399#endif 2400#ifdef USE_ALPHAMAP 2401 uniform mat3 alphaMapTransform; 2402 varying vec2 vAlphaMapUv; 2403#endif 2404#ifdef USE_LIGHTMAP 2405 uniform mat3 lightMapTransform; 2406 varying vec2 vLightMapUv; 2407#endif 2408#ifdef USE_AOMAP 2409 uniform mat3 aoMapTransform; 2410 varying vec2 vAoMapUv; 2411#endif 2412#ifdef USE_BUMPMAP 2413 uniform mat3 bumpMapTransform; 2414 varying vec2 vBumpMapUv; 2415#endif 2416#ifdef USE_NORMALMAP 2417 uniform mat3 normalMapTransform; 2418 varying vec2 vNormalMapUv; 2419#endif 2420#ifdef USE_DISPLACEMENTMAP 2421 uniform mat3 displacementMapTransform; 2422 varying vec2 vDisplacementMapUv; 2423#endif 2424#ifdef USE_EMISSIVEMAP 2425 uniform mat3 emissiveMapTransform; 2426 varying vec2 vEmissiveMapUv; 2427#endif 2428#ifdef USE_METALNESSMAP 2429 uniform mat3 metalnessMapTransform; 2430 varying vec2 vMetalnessMapUv; 2431#endif 2432#ifdef USE_ROUGHNESSMAP 2433 uniform mat3 roughnessMapTransform; 2434 varying vec2 vRoughnessMapUv; 2435#endif 2436#ifdef USE_ANISOTROPYMAP 2437 uniform mat3 anisotropyMapTransform; 2438 varying vec2 vAnisotropyMapUv; 2439#endif 2440#ifdef USE_CLEARCOATMAP 2441 uniform mat3 clearcoatMapTransform; 2442 varying vec2 vClearcoatMapUv; 2443#endif 2444#ifdef USE_CLEARCOAT_NORMALMAP 2445 uniform mat3 clearcoatNormalMapTransform; 2446 varying vec2 vClearcoatNormalMapUv; 2447#endif 2448#ifdef USE_CLEARCOAT_ROUGHNESSMAP 2449 uniform mat3 clearcoatRoughnessMapTransform; 2450 varying vec2 vClearcoatRoughnessMapUv; 2451#endif 2452#ifdef USE_SHEEN_COLORMAP 2453 uniform mat3 sheenColorMapTransform; 2454 varying vec2 vSheenColorMapUv; 2455#endif 2456#ifdef USE_SHEEN_ROUGHNESSMAP 2457 uniform mat3 sheenRoughnessMapTransform; 2458 varying vec2 vSheenRoughnessMapUv; 2459#endif 2460#ifdef USE_IRIDESCENCEMAP 2461 uniform mat3 iridescenceMapTransform; 2462 varying vec2 vIridescenceMapUv; 2463#endif 2464#ifdef USE_IRIDESCENCE_THICKNESSMAP 2465 uniform mat3 iridescenceThicknessMapTransform; 2466 varying vec2 vIridescenceThicknessMapUv; 2467#endif 2468#ifdef USE_SPECULARMAP 2469 uniform mat3 specularMapTransform; 2470 varying vec2 vSpecularMapUv; 2471#endif 2472#ifdef USE_SPECULAR_COLORMAP 2473 uniform mat3 specularColorMapTransform; 2474 varying vec2 vSpecularColorMapUv; 2475#endif 2476#ifdef USE_SPECULAR_INTENSITYMAP 2477 uniform mat3 specularIntensityMapTransform; 2478 varying vec2 vSpecularIntensityMapUv; 2479#endif 2480#ifdef USE_TRANSMISSIONMAP 2481 uniform mat3 transmissionMapTransform; 2482 varying vec2 vTransmissionMapUv; 2483#endif 2484#ifdef USE_THICKNESSMAP 2485 uniform mat3 thicknessMapTransform; 2486 varying vec2 vThicknessMapUv; 2487#endif`,uv_vertex:`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) 2488 vUv = vec3( uv, 1 ).xy; 2489#endif 2490#ifdef USE_MAP 2491 vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy; 2492#endif 2493#ifdef USE_ALPHAMAP 2494 vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy; 2495#endif 2496#ifdef USE_LIGHTMAP 2497 vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy; 2498#endif 2499#ifdef USE_AOMAP 2500 vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy; 2501#endif 2502#ifdef USE_BUMPMAP 2503 vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy; 2504#endif 2505#ifdef USE_NORMALMAP 2506 vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy; 2507#endif 2508#ifdef USE_DISPLACEMENTMAP 2509 vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy; 2510#endif 2511#ifdef USE_EMISSIVEMAP 2512 vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy; 2513#endif 2514#ifdef USE_METALNESSMAP 2515 vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy; 2516#endif 2517#ifdef USE_ROUGHNESSMAP 2518 vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy; 2519#endif 2520#ifdef USE_ANISOTROPYMAP 2521 vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy; 2522#endif 2523#ifdef USE_CLEARCOATMAP 2524 vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy; 2525#endif 2526#ifdef USE_CLEARCOAT_NORMALMAP 2527 vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy; 2528#endif 2529#ifdef USE_CLEARCOAT_ROUGHNESSMAP 2530 vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy; 2531#endif 2532#ifdef USE_IRIDESCENCEMAP 2533 vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy; 2534#endif 2535#ifdef USE_IRIDESCENCE_THICKNESSMAP 2536 vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy; 2537#endif 2538#ifdef USE_SHEEN_COLORMAP 2539 vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy; 2540#endif 2541#ifdef USE_SHEEN_ROUGHNESSMAP 2542 vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy; 2543#endif 2544#ifdef USE_SPECULARMAP 2545 vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy; 2546#endif 2547#ifdef USE_SPECULAR_COLORMAP 2548 vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy; 2549#endif 2550#ifdef USE_SPECULAR_INTENSITYMAP 2551 vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy; 2552#endif 2553#ifdef USE_TRANSMISSIONMAP 2554 vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy; 2555#endif 2556#ifdef USE_THICKNESSMAP 2557 vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; 2558#endif`,worldpos_vertex:`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 2559 vec4 worldPosition = vec4( transformed, 1.0 ); 2560 #ifdef USE_BATCHING 2561 worldPosition = batchingMatrix * worldPosition; 2562 #endif 2563 #ifdef USE_INSTANCING 2564 worldPosition = instanceMatrix * worldPosition; 2565 #endif 2566 worldPosition = modelMatrix * worldPosition; 2567#endif`,background_vert:`varying vec2 vUv; 2568uniform mat3 uvTransform; 2569void main() { 2570 vUv = ( uvTransform * vec3( uv, 1 ) ).xy; 2571 gl_Position = vec4( position.xy, 1.0, 1.0 ); 2572}`,background_frag:`uniform sampler2D t2D; 2573uniform float backgroundIntensity; 2574varying vec2 vUv; 2575void main() { 2576 vec4 texColor = texture2D( t2D, vUv ); 2577 #ifdef DECODE_VIDEO_TEXTURE 2578 texColor = 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 ); 2579 #endif 2580 texColor.rgb *= backgroundIntensity; 2581 gl_FragColor = texColor; 2582 #include <tonemapping_fragment> 2583 #include <colorspace_fragment> 2584}`,backgroundCube_vert:`varying vec3 vWorldDirection; 2585#include <common> 2586void main() { 2587 vWorldDirection = transformDirection( position, modelMatrix ); 2588 #include <begin_vertex> 2589 #include <project_vertex> 2590 gl_Position.z = gl_Position.w; 2591}`,backgroundCube_frag:`#ifdef ENVMAP_TYPE_CUBE 2592 uniform samplerCube envMap; 2593#elif defined( ENVMAP_TYPE_CUBE_UV ) 2594 uniform sampler2D envMap; 2595#endif 2596uniform float flipEnvMap; 2597uniform float backgroundBlurriness; 2598uniform float backgroundIntensity; 2599uniform mat3 backgroundRotation; 2600varying vec3 vWorldDirection; 2601#include <cube_uv_reflection_fragment> 2602void main() { 2603 #ifdef ENVMAP_TYPE_CUBE 2604 vec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) ); 2605 #elif defined( ENVMAP_TYPE_CUBE_UV ) 2606 vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness ); 2607 #else 2608 vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 ); 2609 #endif 2610 texColor.rgb *= backgroundIntensity; 2611 gl_FragColor = texColor; 2612 #include <tonemapping_fragment> 2613 #include <colorspace_fragment> 2614}`,cube_vert:`varying vec3 vWorldDirection; 2615#include <common> 2616void main() { 2617 vWorldDirection = transformDirection( position, modelMatrix ); 2618 #include <begin_vertex> 2619 #include <project_vertex> 2620 gl_Position.z = gl_Position.w; 2621}`,cube_frag:`uniform samplerCube tCube; 2622uniform float tFlip; 2623uniform float opacity; 2624varying vec3 vWorldDirection; 2625void main() { 2626 vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) ); 2627 gl_FragColor = texColor; 2628 gl_FragColor.a *= opacity; 2629 #include <tonemapping_fragment> 2630 #include <colorspace_fragment> 2631}`,depth_vert:`#include <common> 2632#include <batching_pars_vertex> 2633#include <uv_pars_vertex> 2634#include <displacementmap_pars_vertex> 2635#include <morphtarget_pars_vertex> 2636#include <skinning_pars_vertex> 2637#include <logdepthbuf_pars_vertex> 2638#include <clipping_planes_pars_vertex> 2639varying vec2 vHighPrecisionZW; 2640void main() { 2641 #include <uv_vertex> 2642 #include <batching_vertex> 2643 #include <skinbase_vertex> 2644 #include <morphinstance_vertex> 2645 #ifdef USE_DISPLACEMENTMAP 2646 #include <beginnormal_vertex> 2647 #include <morphnormal_vertex> 2648 #include <skinnormal_vertex> 2649 #endif 2650 #include <begin_vertex> 2651 #include <morphtarget_vertex> 2652 #include <skinning_vertex> 2653 #include <displacementmap_vertex> 2654 #include <project_vertex> 2655 #include <logdepthbuf_vertex> 2656 #include <clipping_planes_vertex> 2657 vHighPrecisionZW = gl_Position.zw; 2658}`,depth_frag:`#if DEPTH_PACKING == 3200 2659 uniform float opacity; 2660#endif 2661#include <common> 2662#include <packing> 2663#include <uv_pars_fragment> 2664#include <map_pars_fragment> 2665#include <alphamap_pars_fragment> 2666#include <alphatest_pars_fragment> 2667#include <alphahash_pars_fragment> 2668#include <logdepthbuf_pars_fragment> 2669#include <clipping_planes_pars_fragment> 2670varying vec2 vHighPrecisionZW; 2671void main() { 2672 vec4 diffuseColor = vec4( 1.0 ); 2673 #include <clipping_planes_fragment> 2674 #if DEPTH_PACKING == 3200 2675 diffuseColor.a = opacity; 2676 #endif 2677 #include <map_fragment> 2678 #include <alphamap_fragment> 2679 #include <alphatest_fragment> 2680 #include <alphahash_fragment> 2681 #include <logdepthbuf_fragment> 2682
2682#ifdef USE_REVERSED_DEPTH_BUFFER 2683 float fragCoordZ = vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ]; 2684 #else 2685 float fragCoordZ = 0.5 * vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ] + 0.5; 2686 #endif 2687 #if DEPTH_PACKING == 3200 2688 gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); 2689 #elif DEPTH_PACKING == 3201 2690 gl_FragColor = packDepthToRGBA( fragCoordZ ); 2691 #elif DEPTH_PACKING == 3202 2692 gl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 ); 2693 #elif DEPTH_PACKING == 3203 2694 gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 ); 2695 #endif 2696}`,distance_vert:`#define DISTANCE 2697varying vec3 vWorldPosition; 2698#include <common> 2699#include <batching_pars_vertex> 2700#include <uv_pars_vertex> 2701#include <displacementmap_pars_vertex> 2702#include <morphtarget_pars_vertex> 2703#include <skinning_pars_vertex> 2704#include <clipping_planes_pars_vertex> 2705void main() { 2706 #include <uv_vertex> 2707 #include <batching_vertex> 2708 #include <skinbase_vertex> 2709 #include <morphinstance_vertex> 2710 #ifdef USE_DISPLACEMENTMAP 2711 #include <beginnormal_vertex> 2712 #include <morphnormal_vertex> 2713 #include <skinnormal_vertex> 2714 #endif 2715 #include <begin_vertex> 2716 #include <morphtarget_vertex> 2717 #include <skinning_vertex> 2718 #include <displacementmap_vertex> 2719 #include <project_vertex> 2720 #include <worldpos_vertex> 2721 #include <clipping_planes_vertex> 2722 vWorldPosition = worldPosition.xyz; 2723}`,distance_frag:`#define DISTANCE 2724uniform vec3 referencePosition; 2725uniform float nearDistance; 2726uniform float farDistance; 2727varying vec3 vWorldPosition; 2728#include <common> 2729#include <uv_pars_fragment> 2730#include <map_pars_fragment> 2731#include <alphamap_pars_fragment> 2732#include <alphatest_pars_fragment> 2733#include <alphahash_pars_fragment> 2734#include <clipping_planes_pars_fragment> 2735void main () { 2736 vec4 diffuseColor = vec4( 1.0 ); 2737 #include <clipping_planes_fragment> 2738 #include <map_fragment> 2739 #include <alphamap_fragment> 2740 #include <alphatest_fragment> 2741 #include <alphahash_fragment> 2742 float dist = length( vWorldPosition - referencePosition ); 2743 dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); 2744 dist = saturate( dist ); 2745 gl_FragColor = vec4( dist, 0.0, 0.0, 1.0 ); 2746}`,equirect_vert:`varying vec3 vWorldDirection; 2747#include <common> 2748void main() { 2749 vWorldDirection = transformDirection( position, modelMatrix ); 2750 #include <begin_vertex> 2751 #include <project_vertex> 2752}`,equirect_frag:`uniform sampler2D tEquirect; 2753varying vec3 vWorldDirection; 2754#include <common> 2755void main() { 2756 vec3 direction = normalize( vWorldDirection ); 2757 vec2 sampleUV = equirectUv( direction ); 2758 gl_FragColor = texture2D( tEquirect, sampleUV ); 2759 #include <tonemapping_fragment> 2760 #include <colorspace_fragment> 2761}`,linedashed_vert:`uniform float scale; 2762attribute float lineDistance; 2763varying float vLineDistance; 2764#include <common> 2765#include <uv_pars_vertex> 2766#include <color_pars_vertex> 2767#include <fog_pars_vertex> 2768#include <morphtarget_pars_vertex> 2769#include <logdepthbuf_pars_vertex> 2770#include <clipping_planes_pars_vertex> 2771void main() { 2772 vLineDistance = scale * lineDistance; 2773 #include <uv_vertex> 2774 #include <color_vertex> 2775 #include <morphinstance_vertex> 2776 #include <morphcolor_vertex> 2777 #include <begin_vertex> 2778 #include <morphtarget_vertex> 2779 #include <project_vertex> 2780 #include <logdepthbuf_vertex> 2781 #include <clipping_planes_vertex> 2782 #include <fog_vertex> 2783}`,linedashed_frag:`uniform vec3 diffuse; 2784uniform float opacity; 2785uniform float dashSize; 2786uniform float totalSize; 2787varying float vLineDistance; 2788#include <common> 2789#include <color_pars_fragment> 2790#include <uv_pars_fragment> 2791#include <map_pars_fragment> 2792#include <fog_pars_fragment> 2793#include <logdepthbuf_pars_fragment> 2794#include <clipping_planes_pars_fragment> 2795void main() { 2796 vec4 diffuseColor = vec4( diffuse, opacity ); 2797 #include <clipping_planes_fragment> 2798 if ( mod( vLineDistance, totalSize ) > dashSize ) { 2799 discard; 2800 } 2801 vec3 outgoingLight = vec3( 0.0 ); 2802 #include <logdepthbuf_fragment> 2803 #include <map_fragment> 2804 #include <color_fragment> 2805 outgoingLight = diffuseColor.rgb; 2806 #include <opaque_fragment> 2807 #include <tonemapping_fragment> 2808 #include <colorspace_fragment> 2809 #include <fog_fragment> 2810 #include <premultiplied_alpha_fragment> 2811}`,meshbasic_vert:`#include <common> 2812#include <batching_pars_vertex> 2813#include <uv_pars_vertex> 2814#include <envmap_pars_vertex> 2815#include <color_pars_vertex> 2816#include <fog_pars_vertex> 2817#include <morphtarget_pars_vertex> 2818#include <skinning_pars_vertex> 2819#include <logdepthbuf_pars_vertex> 2820#include <clipping_planes_pars_vertex> 2821void main() { 2822 #include <uv_vertex> 2823 #include <color_vertex> 2824 #include <morphinstance_vertex> 2825 #include <morphcolor_vertex> 2826 #include <batching_vertex> 2827 #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) 2828 #include <beginnormal_vertex> 2829 #include <morphnormal_vertex> 2830 #include <skinbase_vertex> 2831 #include <skinnormal_vertex> 2832 #include <defaultnormal_vertex> 2833 #endif 2834 #include <begin_vertex> 2835 #include <morphtarget_vertex> 2836 #include <skinning_vertex> 2837 #include <project_vertex> 2838 #include <logdepthbuf_vertex> 2839 #include <clipping_planes_vertex> 2840 #include <worldpos_vertex> 2841 #include <envmap_vertex> 2842 #include <fog_vertex> 2843}`,meshbasic_frag:`uniform vec3 diffuse; 2844uniform float opacity; 2845#ifndef FLAT_SHADED 2846 varying vec3 vNormal; 2847#endif 2848#include <common> 2849#include <dithering_pars_fragment> 2850#include <color_pars_fragment> 2851#include <uv_pars_fragment> 2852#include <map_pars_fragment> 2853#include <alphamap_pars_fragment> 2854#include <alphatest_pars_fragment> 2855#include <alphahash_pars_fragment> 2856#include <aomap_pars_fragment> 2857#include <lightmap_pars_fragment> 2858#include <envmap_common_pars_fragment> 2859#include <envmap_pars_fragment> 2860#include <fog_pars_fragment> 2861#include <specularmap_pars_fragment> 2862#include <logdepthbuf_pars_fragment> 2863#include <clipping_planes_pars_fragment> 2864void main() { 2865 vec4 diffuseColor = vec4( diffuse, opacity ); 2866 #include <clipping_planes_fragment> 2867 #include <logdepthbuf_fragment> 2868 #include <map_fragment> 2869 #include <color_fragment> 2870 #include <alphamap_fragment> 2871 #include <alphatest_fragment> 2872 #include <alphahash_fragment> 2873 #include <specularmap_fragment> 2874 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 2875 #ifdef USE_LIGHTMAP 2876 vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); 2877 reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI; 2878 #else 2879 reflectedLight.indirectDiffuse += vec3( 1.0 ); 2880 #endif 2881 #include <aomap_fragment> 2882 reflectedLight.indirectDiffuse *= diffuseColor.rgb; 2883 vec3 outgoingLight = reflectedLight.indirectDiffuse; 2884 #include <envmap_fragment> 2885 #include <opaque_fragment> 2886 #include <tonemapping_fragment> 2887 #include <colorspace_fragment> 2888 #include <fog_fragment> 2889 #include <premultiplied_alpha_fragment> 2890 #include <dithering_fragment> 2891}`,meshlambert_vert:`#define LAMBERT 2892varying vec3 vViewPosition; 2893#include <common> 2894#include <batching_pars_vertex> 2895#include <uv_pars_vertex> 2896#include <displacementmap_pars_vertex> 2897#include <envmap_pars_vertex> 2898#include <color_pars_vertex> 2899#include <fog_pars_vertex> 2900#include <normal_pars_vertex> 2901#include <morphtarget_pars_vertex> 2902#include <skinning_pars_vertex> 2903#include <shadowmap_pars_vertex> 2904#include <logdepthbuf_pars_vertex> 2905#include <clipping_planes_pars_vertex> 2906void main() { 2907 #include <uv_vertex> 2908 #include <color_vertex> 2909 #include <morphinstance_vertex> 2910 #include <morphcolor_vertex> 2911 #include <batching_vertex> 2912 #include <beginnormal_vertex> 2913 #include <morphnormal_vertex> 2914 #include <skinbase_vertex> 2915 #include <skinnormal_vertex> 2916 #include <defaultnormal_vertex> 2917 #include <normal_vertex> 2918 #include <begin_vertex> 2919 #include <morphtarget_vertex> 2920 #include <skinning_vertex> 2921 #include <displacementmap_vertex> 2922 #include <project_vertex> 2923 #include <logdepthbuf_vertex> 2924 #include <clipping_planes_vertex> 2925 vViewPosition = - mvPosition.xyz; 2926 #include <worldpos_vertex> 2927 #include <envmap_vertex> 2928 #include <shadowmap_vertex> 2929 #include <fog_vertex> 2930}`,meshlambert_frag:`#define LAMBERT 2931uniform vec3 diffuse; 2932uniform vec3 emissive; 2933uniform float opacity; 2934#include <common> 2935#include <dithering_pars_fragment> 2936#include <color_pars_fragment> 2937#include <uv_pars_fragment> 2938#include <map_pars_fragment> 2939#include <alphamap_pars_fragment> 2940#include <alphatest_pars_fragment> 2941#include <alphahash_pars_fragment> 2942#include <aomap_pars_fragment> 2943#include <lightmap_pars_fragment> 2944#include <emissivemap_pars_fragment> 2945#include <cube_uv_reflection_fragment> 2946#include <envmap_common_pars_fragment> 2947#include <envmap_pars_fragment> 2948#include <envmap_physical_pars_fragment> 2949#include <fog_pars_fragment> 2950#include <bsdfs> 2951#include <lights_pars_begin> 2952#include <normal_pars_fragment> 2953#include <lights_lambert_pars_fragment> 2954#include <shadowmap_pars_fragment> 2955#include <bumpmap_pars_fragment> 2956#include <normalmap_pars_fragment> 2957#include <specularmap_pars_fragment> 2958#include <logdepthbuf_pars_fragment> 2959#include <clipping_planes_pars_fragment> 2960void main() { 2961 vec4 diffuseColor = vec4( diffuse, opacity ); 2962 #include <clipping_planes_fragment> 2963 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 2964 vec3 totalEmissiveRadiance = emissive; 2965 #include <logdepthbuf_fragment> 2966 #include <map_fragment> 2967 #include <color_fragment> 2968 #include <alphamap_fragment> 2969 #include <alphatest_fragment> 2970 #include <alphahash_fragment> 2971 #include <specularmap_fragment> 2972 #include <normal_fragment_begin> 2973 #include <normal_fragment_maps> 2974 #include <emissivemap_fragment> 2975 #include <lights_lambert_fragment> 2976 #include <lights_fragment_begin> 2977 #include <lights_fragment_maps> 2978 #include <lights_fragment_end> 2979 #include <aomap_fragment> 2980 vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; 2981 #include <envmap_fragment> 2982 #include <opaque_fragment> 2983 #include <tonemapping_fragment> 2984 #include <colorspace_fragment> 2985 #include <fog_fragment> 2986 #include <premultiplied_alpha_fragment> 2987 #include <dithering_fragment> 2988}`,meshmatcap_vert:`#define MATCAP 2989varying vec3 vViewPosition; 2990#include <common> 2991#include <batching_pars_vertex> 2992#include <uv_pars_vertex> 2993#include <color_pars_vertex> 2994#include <displacementmap_pars_vertex> 2995#include <fog_pars_vertex> 2996#include <normal_pars_vertex> 2997#include <morphtarget_pars_vertex> 2998#include <skinning_pars_vertex> 2999#include <logdepthbuf_pars_vertex> 3000#include <clipping_planes_pars_vertex> 3001void main() { 3002 #include <uv_vertex> 3003 #include <color_vertex> 3004 #include <morphinstance_vertex> 3005 #include <morphcolor_vertex> 3006 #include <batching_vertex> 3007 #include <beginnormal_vertex> 3008 #include <morphnormal_vertex> 3009 #include <skinbase_vertex> 3010 #include <skinnormal_vertex> 3011 #include <defaultnormal_vertex> 3012 #include <normal_vertex> 3013 #include <begin_vertex> 3014 #include <morphtarget_vertex> 3015 #include <skinning_vertex> 3016 #include <displacementmap_vertex> 3017 #include <project_vertex> 3018 #include <logdepthbuf_vertex> 3019 #include <clipping_planes_vertex> 3020 #include <fog_vertex> 3021 vViewPosition = - mvPosition.xyz; 3022}`,meshmatcap_frag:`#define MATCAP 3023uniform vec3 diffuse; 3024uniform float opacity; 3025uniform sampler2D matcap; 3026varying vec3 vViewPosition; 3027#include <common> 3028#include <dithering_pars_fragment> 3029#include <color_pars_fragment> 3030#include <uv_pars_fragment> 3031#include <map_pars_fragment> 3032#include <alphamap_pars_fragment> 3033#include <alphatest_pars_fragment> 3034#include <alphahash_pars_fragment> 3035#include <fog_pars_fragment> 3036#include <normal_pars_fragment> 3037#include <bumpmap_pars_fragment> 3038#include <normalmap_pars_fragment> 3039#include <logdepthbuf_pars_fragment> 3040#include <clipping_planes_pars_fragment> 3041void main() { 3042 vec4 diffuseColor = vec4( diffuse, opacity ); 3043 #include <clipping_planes_fragment> 3044 #include <logdepthbuf_fragment> 3045 #include <map_fragment> 3046 #include <color_fragment> 3047 #include <alphamap_fragment> 3048 #include <alphatest_fragment> 3049 #include <alphahash_fragment> 3050 #include <normal_fragment_begin> 3051 #include <normal_fragment_maps> 3052 vec3 viewDir = normalize( vViewPosition ); 3053 vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); 3054 vec3 y = cross( viewDir, x ); 3055 vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; 3056 #ifdef USE_MATCAP
3057 vec4 matcapColor = texture2D( matcap, uv ); 3058 #else 3059 vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 ); 3060 #endif 3061 vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; 3062 #include <opaque_fragment> 3063 #include <tonemapping_fragment> 3064 #include <colorspace_fragment> 3065 #include <fog_fragment> 3066 #include <premultiplied_alpha_fragment> 3067 #include <dithering_fragment> 3068}`,meshnormal_vert:`#define NORMAL 3069#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) 3070 varying vec3 vViewPosition; 3071#endif 3072#include <common> 3073#include <batching_pars_vertex> 3074#include <uv_pars_vertex> 3075#include <displacementmap_pars_vertex> 3076#include <normal_pars_vertex> 3077#include <morphtarget_pars_vertex> 3078#include <skinning_pars_vertex> 3079#include <logdepthbuf_pars_vertex> 3080#include <clipping_planes_pars_vertex> 3081void main() { 3082 #include <uv_vertex> 3083 #include <batching_vertex> 3084 #include <beginnormal_vertex> 3085 #include <morphinstance_vertex> 3086 #include <morphnormal_vertex> 3087 #include <skinbase_vertex> 3088 #include <skinnormal_vertex> 3089 #include <defaultnormal_vertex> 3090 #include <normal_vertex> 3091 #include <begin_vertex> 3092 #include <morphtarget_vertex> 3093 #include <skinning_vertex> 3094 #include <displacementmap_vertex> 3095 #include <project_vertex> 3096 #include <logdepthbuf_vertex> 3097 #include <clipping_planes_vertex> 3098#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) 3099 vViewPosition = - mvPosition.xyz; 3100#endif 3101}`,meshnormal_frag:`#define NORMAL 3102uniform float opacity; 3103#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) 3104 varying vec3 vViewPosition; 3105#endif 3106#include <uv_pars_fragment> 3107#include <normal_pars_fragment> 3108#include <bumpmap_pars_fragment> 3109#include <normalmap_pars_fragment> 3110#include <logdepthbuf_pars_fragment> 3111#include <clipping_planes_pars_fragment> 3112void main() { 3113 vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity ); 3114 #include <clipping_planes_fragment> 3115 #include <logdepthbuf_fragment> 3116 #include <normal_fragment_begin> 3117 #include <normal_fragment_maps> 3118 gl_FragColor = vec4( normalize( normal ) * 0.5 + 0.5, diffuseColor.a ); 3119 #ifdef OPAQUE 3120 gl_FragColor.a = 1.0; 3121 #endif 3122}`,meshphong_vert:`#define PHONG 3123varying vec3 vViewPosition; 3124#include <common> 3125#include <batching_pars_vertex> 3126#include <uv_pars_vertex> 3127#include <displacementmap_pars_vertex> 3128#include <envmap_pars_vertex> 3129#include <color_pars_vertex> 3130#include <fog_pars_vertex> 3131#include <normal_pars_vertex> 3132#include <morphtarget_pars_vertex> 3133#include <skinning_pars_vertex> 3134#include <shadowmap_pars_vertex> 3135#include <logdepthbuf_pars_vertex> 3136#include <clipping_planes_pars_vertex> 3137void main() { 3138 #include <uv_vertex> 3139 #include <color_vertex> 3140 #include <morphcolor_vertex> 3141 #include <batching_vertex> 3142 #include <beginnormal_vertex> 3143 #include <morphinstance_vertex> 3144 #include <morphnormal_vertex> 3145 #include <skinbase_vertex> 3146 #include <skinnormal_vertex> 3147 #include <defaultnormal_vertex> 3148 #include <normal_vertex> 3149 #include <begin_vertex> 3150 #include <morphtarget_vertex> 3151 #include <skinning_vertex> 3152 #include <displacementmap_vertex> 3153 #include <project_vertex> 3154 #include <logdepthbuf_vertex> 3155 #include <clipping_planes_vertex> 3156 vViewPosition = - mvPosition.xyz; 3157 #include <worldpos_vertex> 3158 #include <envmap_vertex> 3159 #include <shadowmap_vertex> 3160 #include <fog_vertex> 3161}`,meshphong_frag:`#define PHONG 3162uniform vec3 diffuse; 3163uniform vec3 emissive; 3164uniform vec3 specular; 3165uniform float shininess; 3166uniform float opacity; 3167#include <common> 3168#include <dithering_pars_fragment> 3169#include <color_pars_fragment> 3170#include <uv_pars_fragment> 3171#include <map_pars_fragment> 3172#include <alphamap_pars_fragment> 3173#include <alphatest_pars_fragment> 3174#include <alphahash_pars_fragment> 3175#include <aomap_pars_fragment> 3176#include <lightmap_pars_fragment> 3177#include <emissivemap_pars_fragment> 3178#include <cube_uv_reflection_fragment> 3179#include <envmap_common_pars_fragment> 3180#include <envmap_pars_fragment> 3181#include <envmap_physical_pars_fragment> 3182#include <fog_pars_fragment> 3183#include <bsdfs> 3184#include <lights_pars_begin> 3185#include <normal_pars_fragment> 3186#include <lights_phong_pars_fragment> 3187#include <shadowmap_pars_fragment> 3188#include <bumpmap_pars_fragment> 3189#include <normalmap_pars_fragment> 3190#include <specularmap_pars_fragment> 3191#include <logdepthbuf_pars_fragment> 3192#include <clipping_planes_pars_fragment> 3193void main() { 3194 vec4 diffuseColor = vec4( diffuse, opacity ); 3195 #include <clipping_planes_fragment> 3196 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3197 vec3 totalEmissiveRadiance = emissive; 3198 #include <logdepthbuf_fragment> 3199 #include <map_fragment> 3200 #include <color_fragment> 3201 #include <alphamap_fragment> 3202 #include <alphatest_fragment> 3203 #include <alphahash_fragment> 3204 #include <specularmap_fragment> 3205 #include <normal_fragment_begin> 3206 #include <normal_fragment_maps> 3207 #include <emissivemap_fragment> 3208 #include <lights_phong_fragment> 3209 #include <lights_fragment_begin> 3210 #include <lights_fragment_maps> 3211 #include <lights_fragment_end> 3212 #include <aomap_fragment> 3213 vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; 3214 #include <envmap_fragment> 3215 #include <opaque_fragment> 3216 #include <tonemapping_fragment> 3217 #include <colorspace_fragment> 3218 #include <fog_fragment> 3219 #include <premultiplied_alpha_fragment> 3220 #include <dithering_fragment> 3221}`,meshphysical_vert:`#define STANDARD 3222varying vec3 vViewPosition; 3223#ifdef USE_TRANSMISSION 3224 varying vec3 vWorldPosition; 3225#endif 3226#include <common> 3227#include <batching_pars_vertex> 3228#include <uv_pars_vertex> 3229#include <displacementmap_pars_vertex> 3230#include <color_pars_vertex> 3231#include <fog_pars_vertex> 3232#include <normal_pars_vertex> 3233#include <morphtarget_pars_vertex> 3234#include <skinning_pars_vertex> 3235#include <shadowmap_pars_vertex> 3236#include <logdepthbuf_pars_vertex> 3237#include <clipping_planes_pars_vertex> 3238void main() { 3239 #include <uv_vertex> 3240 #include <color_vertex> 3241 #include <morphinstance_vertex> 3242 #include <morphcolor_vertex> 3243 #include <batching_vertex> 3244 #include <beginnormal_vertex> 3245 #include <morphnormal_vertex> 3246 #include <skinbase_vertex> 3247 #include <skinnormal_vertex> 3248 #include <defaultnormal_vertex> 3249 #include <normal_vertex> 3250 #include <begin_vertex> 3251 #include <morphtarget_vertex> 3252 #include <skinning_vertex> 3253 #include <displacementmap_vertex> 3254 #include <project_vertex> 3255 #include <logdepthbuf_vertex> 3256 #include <clipping_planes_vertex> 3257 vViewPosition = - mvPosition.xyz; 3258 #include <worldpos_vertex> 3259 #include <shadowmap_vertex> 3260 #include <fog_vertex> 3261#ifdef USE_TRANSMISSION 3262 vWorldPosition = worldPosition.xyz; 3263#endif 3264}`,meshphysical_frag:`#define STANDARD 3265#ifdef PHYSICAL 3266 #define IOR 3267 #define USE_SPECULAR 3268#endif 3269uniform vec3 diffuse; 3270uniform vec3 emissive; 3271uniform float roughness; 3272uniform float metalness; 3273uniform float opacity; 3274#ifdef IOR 3275 uniform float ior; 3276#endif 3277#ifdef USE_SPECULAR 3278 uniform float specularIntensity; 3279 uniform vec3 specularColor; 3280 #ifdef USE_SPECULAR_COLORMAP 3281 uniform sampler2D specularColorMap; 3282 #endif 3283 #ifdef USE_SPECULAR_INTENSITYMAP 3284 uniform sampler2D specularIntensityMap; 3285 #endif 3286#endif 3287#ifdef USE_CLEARCOAT 3288 uniform float clearcoat; 3289 uniform float clearcoatRoughness; 3290#endif 3291#ifdef USE_DISPERSION 3292 uniform float dispersion; 3293#endif
3294#ifdef USE_IRIDESCENCE 3295 uniform float iridescence; 3296 uniform float iridescenceIOR; 3297 uniform float iridescenceThicknessMinimum; 3298 uniform float iridescenceThicknessMaximum; 3299#endif 3300#ifdef USE_SHEEN 3301 uniform vec3 sheenColor; 3302 uniform float sheenRoughness; 3303 #ifdef USE_SHEEN_COLORMAP 3304 uniform sampler2D sheenColorMap; 3305 #endif 3306 #ifdef USE_SHEEN_ROUGHNESSMAP 3307 uniform sampler2D sheenRoughnessMap; 3308 #endif 3309#endif 3310#ifdef USE_ANISOTROPY 3311 uniform vec2 anisotropyVector; 3312 #ifdef USE_ANISOTROPYMAP 3313 uniform sampler2D anisotropyMap; 3314 #endif 3315#endif 3316varying vec3 vViewPosition; 3317#include <common> 3318#include <dithering_pars_fragment> 3319#include <color_pars_fragment> 3320#include <uv_pars_fragment> 3321#include <map_pars_fragment> 3322#include <alphamap_pars_fragment> 3323#include <alphatest_pars_fragment> 3324#include <alphahash_pars_fragment> 3325#include <aomap_pars_fragment> 3326#include <lightmap_pars_fragment> 3327#include <emissivemap_pars_fragment> 3328#include <iridescence_fragment> 3329#include <cube_uv_reflection_fragment> 3330#include <envmap_common_pars_fragment> 3331#include <envmap_physical_pars_fragment> 3332#include <fog_pars_fragment> 3333#include <lights_pars_begin> 3334#include <normal_pars_fragment> 3335#include <lights_physical_pars_fragment> 3336#include <transmission_pars_fragment> 3337#include <shadowmap_pars_fragment> 3338#include <bumpmap_pars_fragment> 3339#include <normalmap_pars_fragment> 3340#include <clearcoat_pars_fragment> 3341#include <iridescence_pars_fragment> 3342#include <roughnessmap_pars_fragment> 3343#include <metalnessmap_pars_fragment> 3344#include <logdepthbuf_pars_fragment> 3345#include <clipping_planes_pars_fragment> 3346void main() { 3347 vec4 diffuseColor = vec4( diffuse, opacity ); 3348 #include <clipping_planes_fragment> 3349 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3350 vec3 totalEmissiveRadiance = emissive; 3351 #include <logdepthbuf_fragment> 3352 #include <map_fragment> 3353 #include <color_fragment> 3354 #include <alphamap_fragment> 3355 #include <alphatest_fragment> 3356 #include <alphahash_fragment> 3357 #include <roughnessmap_fragment> 3358 #include <metalnessmap_fragment> 3359 #include <normal_fragment_begin> 3360 #include <normal_fragment_maps> 3361 #include <clearcoat_normal_fragment_begin> 3362 #include <clearcoat_normal_fragment_maps> 3363 #include <emissivemap_fragment> 3364 #include <lights_physical_fragment> 3365 #include <lights_fragment_begin> 3366 #include <lights_fragment_maps> 3367 #include <lights_fragment_end> 3368 #include <aomap_fragment> 3369 vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse; 3370 vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular; 3371 #include <transmission_fragment> 3372 vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance; 3373 #ifdef USE_SHEEN 3374 3375 outgoingLight = outgoingLight + sheenSpecularDirect + sheenSpecularIndirect; 3376 3377 #endif 3378 #ifdef USE_CLEARCOAT 3379 float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) ); 3380 vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc ); 3381 outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat; 3382 #endif 3383 #include <opaque_fragment> 3384 #include <tonemapping_fragment> 3385 #include <colorspace_fragment> 3386 #include <fog_fragment> 3387 #include <premultiplied_alpha_fragment> 3388 #include <dithering_fragment> 3389}`,meshtoon_vert:`#define TOON 3390varying vec3 vViewPosition; 3391#include <common> 3392#include <batching_pars_vertex> 3393#include <uv_pars_vertex> 3394#include <displacementmap_pars_vertex> 3395#include <color_pars_vertex> 3396#include <fog_pars_vertex> 3397#include <normal_pars_vertex> 3398#include <morphtarget_pars_vertex> 3399#include <skinning_pars_vertex> 3400#include <shadowmap_pars_vertex> 3401#include <logdepthbuf_pars_vertex> 3402#include <clipping_planes_pars_vertex> 3403void main() { 3404 #include <uv_vertex> 3405 #include <color_vertex> 3406 #include <morphinstance_vertex> 3407 #include <morphcolor_vertex> 3408 #include <batching_vertex> 3409 #include <beginnormal_vertex> 3410 #include <morphnormal_vertex> 3411 #include <skinbase_vertex> 3412 #include <skinnormal_vertex> 3413 #include <defaultnormal_vertex> 3414 #include <normal_vertex> 3415 #include <begin_vertex> 3416 #include <morphtarget_vertex> 3417 #include <skinning_vertex> 3418 #include <displacementmap_vertex> 3419 #include <project_vertex> 3420 #include <logdepthbuf_vertex> 3421 #include <clipping_planes_vertex> 3422 vViewPosition = - mvPosition.xyz; 3423 #include <worldpos_vertex> 3424 #include <shadowmap_vertex> 3425 #include <fog_vertex> 3426}`,meshtoon_frag:`#define TOON 3427uniform vec3 diffuse; 3428uniform vec3 emissive; 3429uniform float opacity; 3430#include <common> 3431#include <dithering_pars_fragment> 3432#include <color_pars_fragment> 3433#include <uv_pars_fragment> 3434#include <map_pars_fragment> 3435#include <alphamap_pars_fragment> 3436#include <alphatest_pars_fragment> 3437#include <alphahash_pars_fragment> 3438#include <aomap_pars_fragment> 3439#include <lightmap_pars_fragment> 3440#include <emissivemap_pars_fragment> 3441#include <gradientmap_pars_fragment> 3442#include <fog_pars_fragment> 3443#include <bsdfs> 3444#include <lights_pars_begin> 3445#include <normal_pars_fragment> 3446#include <lights_toon_pars_fragment> 3447#include <shadowmap_pars_fragment> 3448#include <bumpmap_pars_fragment> 3449#include <normalmap_pars_fragment> 3450#include <logdepthbuf_pars_fragment> 3451#include <clipping_planes_pars_fragment> 3452void main() { 3453 vec4 diffuseColor = vec4( diffuse, opacity ); 3454 #include <clipping_planes_fragment> 3455 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3456 vec3 totalEmissiveRadiance = emissive; 3457 #include <logdepthbuf_fragment> 3458 #include <map_fragment> 3459 #include <color_fragment> 3460 #include <alphamap_fragment> 3461 #include <alphatest_fragment> 3462 #include <alphahash_fragment> 3463 #include <normal_fragment_begin> 3464 #include <normal_fragment_maps> 3465 #include <emissivemap_fragment> 3466 #include <lights_toon_fragment> 3467 #include <lights_fragment_begin> 3468 #include <lights_fragment_maps> 3469 #include <lights_fragment_end> 3470 #include <aomap_fragment> 3471 vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; 3472 #include <opaque_fragment> 3473 #include <tonemapping_fragment> 3474 #include <colorspace_fragment> 3475 #include <fog_fragment> 3476 #include <premultiplied_alpha_fragment> 3477 #include <dithering_fragment> 3478}`,points_vert:`uniform float size; 3479uniform float scale; 3480#include <common> 3481#include <color_pars_vertex> 3482#include <fog_pars_vertex> 3483#include <morphtarget_pars_vertex> 3484#include <logdepthbuf_pars_vertex> 3485#include <clipping_planes_pars_vertex> 3486#ifdef USE_POINTS_UV 3487 varying vec2 vUv; 3488 uniform mat3 uvTransform; 3489#endif 3490void main() { 3491 #ifdef USE_POINTS_UV 3492 vUv = ( uvTransform * vec3( uv, 1 ) ).xy; 3493 #endif 3494 #include <color_vertex> 3495 #include <morphinstance_vertex> 3496 #include <morphcolor_vertex> 3497 #include <begin_vertex> 3498 #include <morphtarget_vertex> 3499 #include <project_vertex> 3500 gl_PointSize = size; 3501 #ifdef USE_SIZEATTENUATION 3502 bool isPerspective = isPerspectiveMatrix( projectionMatrix ); 3503 if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); 3504 #endif 3505 #include <logdepthbuf_vertex> 3506 #include <clipping_planes_vertex> 3507 #include <worldpos_vertex> 3508 #include <fog_vertex> 3509}`,points_frag:`uniform vec3 diffuse; 3510uniform float opacity; 3511#include <common> 3512#include <color_pars_fragment> 3513#include <map_particle_pars_fragment> 3514#include <alphatest_pars_fragment> 3515#include <alphahash_pars_fragment> 3516#include <fog_pars_fragment> 3517#include <logdepthbuf_pars_fragment> 3518#include <clipping_planes_pars_fragment> 3519void main() { 3520 vec4 diffuseColor = vec4( diffuse, opacity ); 3521 #include <clipping_planes_fragment> 3522 vec3 outgoingLight = vec3( 0.0 ); 3523 #include <logdepthbuf_fragment> 3524 #include <map_particle_fragment> 3525 #include <color_fragment> 3526 #include <alphatest_fragment> 3527 #include <alphahash_fragment> 3528 outgoingLight = diffuseColor.rgb; 3529 #include <opaque_fragment> 3530 #include <tonemapping_fragment> 3531 #include <colorspace_fragment> 3532 #include <fog_fragment> 3533 #include <premultiplied_alpha_fragment> 3534}`,shadow_vert:`#include <common> 3535#include <batching_pars_vertex> 3536#include <fog_pars_vertex> 3537#include <morphtarget_pars_vertex> 3538#include <skinning_pars_vertex> 3539#include <logdepthbuf_pars_vertex> 3540#include <shadowmap_pars_vertex> 3541void main() { 3542 #include <batching_vertex> 3543 #include <beginnormal_vertex> 3544 #include <morphinstance_vertex> 3545 #include <morphnormal_vertex> 3546 #include <skinbase_vertex> 3547 #include <skinnormal_vertex> 3548 #include <defaultnormal_vertex> 3549 #include <begin_vertex> 3550 #include <morphtarget_vertex> 3551 #include <skinning_vertex> 3552 #include <project_vertex> 3553 #include <logdepthbuf_vertex> 3554 #include <worldpos_vertex> 3555 #include <shadowmap_vertex> 3556 #include <fog_vertex> 3557}`,shadow_frag:`uniform vec3 color; 3558uniform float opacity; 3559#include <common> 3560#include <fog_pars_fragment> 3561#include <bsdfs> 3562#include <lights_pars_begin> 3563#include <logdepthbuf_pars_fragment> 3564#include <shadowmap_pars_fragment> 3565#include <shadowmask_pars_fragment> 3566void main() { 3567 #include <logdepthbuf_fragment> 3568 gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); 3569 #include <tonemapping_fragment> 3570 #include <colorspace_fragment> 3571 #include <fog_fragment> 3572 #include <premultiplied_alpha_fragment> 3573}`,sprite_vert:`uniform float rotation; 3574uniform vec2 center; 3575#include <common> 3576#include <uv_pars_vertex> 3577#include <fog_pars_vertex> 3578#include <logdepthbuf_pars_vertex> 3579#include <clipping_planes_pars_vertex> 3580void main() { 3581 #include <uv_vertex> 3582 vec4 mvPosition = modelViewMatrix[ 3 ]; 3583 vec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) ); 3584 #ifndef USE_SIZEATTENUATION 3585 bool isPerspective = isPerspectiveMatrix( projectionMatrix ); 3586 if ( isPerspective ) scale *= - mvPosition.z; 3587 #endif 3588 vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; 3589 vec2 rotatedPosition; 3590 rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; 3591 rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; 3592 mvPosition.xy += rotatedPosition; 3593 gl_Position = projectionMatrix * mvPosition; 3594 #include <logdepthbuf_vertex> 3595 #include <clipping_planes_vertex> 3596 #include <fog_vertex> 3597}`,sprite_frag:`uniform vec3 diffuse; 3598uniform float opacity; 3599#include <common> 3600#include <uv_pars_fragment> 3601#include <map_pars_fragment> 3602#include <alphamap_pars_fragment> 3603#include <alphatest_pars_fragment> 3604#include <alphahash_pars_fragment> 3605#include <fog_pars_fragment> 3606#include <logdepthbuf_pars_fragment> 3607#include <clipping_planes_pars_fragment> 3608void main() { 3609 vec4 diffuseColor = vec4( diffuse, opacity ); 3610 #include <clipping_planes_fragment> 3611 vec3 outgoingLight = vec3( 0.0 ); 3612 #include <logdepthbuf_fragment> 3613 #include <map_fragment> 3614 #include <alphamap_fragment> 3615 #include <alphatest_fragment> 3616 #include <alphahash_fragment> 3617 outgoingLight = diffuseColor.rgb; 3618 #include <opaque_fragment> 3619 #include <tonemapping_fragment> 3620 #include <colorspace_fragment> 3621 #include <fog_fragment> 3622}`},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:.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)}}
vendor: 4,156 bytes, line 3622
3622,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:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Color(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},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(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Matrix3},alphaMap:{value:null},alphaMapTransform:{value:new Matrix3},alphaTest:{value:0}}},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)},envMapIntensity:{value:1}}]),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},envMapIntensity:{value:1}}]),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,{matc
vendor: 4,099 bytes, line 3622
3622ap:{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:1e3}}]),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};var _rgb={r:0,b:0,g:0},_e1$1=new Euler,_m1$1=new Matrix4;function WebGLBackground(e,t,n,r,i,a){let o=new Color(0),s=i===!0?0:1,c,l,u=null,d=0,f=null;function p(e){let n=e.isScene===!0?e.background:null;if(n&&n.isTexture){let r=e.backgroundBlurriness>0;
vendor: 1,171 bytes, line 3622
3622n=t.get(n,r)}return n}function m(t){let r=!1,i=p(t);i===null?_(o,s):i&&i.isColor&&(_(i,1),r=!0);let c=e.xr.getEnvironmentBlendMode();c===`additive`?n.buffers.color.setClear(0,0,0,1,a):c===`alpha-blend`&&n.buffers.color.setClear(0,0,0,0,a),(e.autoClear||r)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil))}function g(t,n){let i=p(n);i&&(i.isCubeTexture||i.mapping===306)?(l===void 0&&(l=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:1,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),l.geometry.deleteAttribute(`normal`),l.geometry.deleteAttribute(`uv`),l.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(l.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(l)),_e1$1.copy(n.backgroundRotation),_e1$1.x*=-1,_e1$1.y*=-1,_e1$1.z*=-1,i.isCubeTexture&&i.isRenderTargetTexture===!1&&(_e1$
vendor: 7,067 bytes, line 3622
36221.y*=-1,_e1$1.z*=-1),l.material.uniforms.envMap.value=i,l.material.uniforms.flipEnvMap.value=i.isCubeTexture&&i.isRenderTargetTexture===!1?-1:1,l.material.uniforms.backgroundBlurriness.value=n.backgroundBlurriness,l.material.uniforms.backgroundIntensity.value=n.backgroundIntensity,l.material.uniforms.backgroundRotation.value.setFromMatrix4(_m1$1.makeRotationFromEuler(_e1$1)),l.material.toneMapped=ColorManagement.getTransfer(i.colorSpace)!==SRGBTransfer,(u!==i||d!==i.version||f!==e.toneMapping)&&(l.material.needsUpdate=!0,u=i,d=i.version,f=e.toneMapping),l.layers.enableAll(),t.unshift(l,l.geometry,l.material,0,0,null)):i&&i.isTexture&&(c===void 0&&(c=new Mesh(new PlaneGeometry(2,2),new ShaderMaterial({name:`BackgroundMaterial`,uniforms:cloneUniforms(ShaderLib.background.uniforms),vertexShader:ShaderLib.background.vertexShader,fragmentShader:ShaderLib.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),c.geometry.deleteAttribute(`normal`),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(c)),c.material.uniforms.t2D.value=i,c.material.uniforms.backgroundIntensity.value=n.backgroundIntensity,c.material.toneMapped=ColorManagement.getTransfer(i.colorSpace)!==SRGBTransfer,i.matrixAutoUpdate===!0&&i.updateMatrix(),c.material.uniforms.uvTransform.value.copy(i.matrix),(u!==i||d!==i.version||f!==e.toneMapping)&&(c.material.needsUpdate=!0,u=i,d=i.version,f=e.toneMapping),c.layers.enableAll(),t.unshift(c,c.geometry,c.material,0,0,null))}function _(t,r){t.getRGB(_rgb,getUnlitUniformColorSpace(e)),n.buffers.color.setClear(_rgb.r,_rgb.g,_rgb.b,r,a)}function y(){l!==void 0&&(l.geometry.dispose(),l.material.dispose(),l=void 0),c!==void 0&&(c.geometry.dispose(),c.material.dispose(),c=void 0)}return{getClearColor:function(){return o},setClearColor:function(e,t=1){o.set(e),s=t,_(o,s)},getClearAlpha:function(){return s},setClearAlpha:function(e){s=e,_(o,s)},render:m,addToRenderList:g,dispose:y}}function WebGLBindingStates(e,t){let n=e.getParameter(e.MAX_VERTEX_ATTRIBS),r={},i=f(null),a=i,o=!1;function s(n,r,i,s,c){let u=!1,f=d(n,s,i,r);a!==f&&(a=f,l(a.object)),u=p(n,s,i,c),u&&m(n,s,i,c),c!==null&&t.update(c,e.ELEMENT_ARRAY_BUFFER),(u||o)&&(o=!1,S(n,r,i,s),c!==null&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t.get(c).buffer))}function c(){return e.createVertexArray()}function l(t){return e.bindVertexArray(t)}function u(t){return e.deleteVertexArray(t)}function d(e,t,n,i){let a=i.wireframe===!0,o=r[t.id];o===void 0&&(o={},r[t.id]=o);let s=e.isInstancedMesh===!0?e.id:0,l=o[s];l===void 0&&(l={},o[s]=l);let u=l[n.id];u===void 0&&(u={},l[n.id]=u);let d=u[a];return d===void 0&&(d=f(c()),u[a]=d),d}function f(e){let t=[],r=[],i=[];for(let e=0;e<n;e++)t[e]=0,r[e]=0,i[e]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:t,enabledAttributes:r,attributeDivisors:i,object:e,attributes:{},index:null}}function p(e,t,n,r){let i=a.attributes,o=t.attributes,s=0,c=n.getAttributes();for(let t in c)if(c[t].location>=0){let n=i[t],r=o[t];if(r===void 0&&(t===`instanceMatrix`&&e.instanceMatrix&&(r=e.instanceMatrix),t===`instanceColor`&&e.instanceColor&&(r=e.instanceColor)),n===void 0||n.attribute!==r||r&&n.data!==r.data)return!0;s++}return a.attributesNum!==s||a.index!==r}function m(e,t,n,r){let i={},o=t.attributes,s=0,c=n.getAttributes();for(let t in c)if(c[t].location>=0){let n=o[t];n===void 0&&(t===`instanceMatrix`&&e.instanceMatrix&&(n=e.instanceMatrix),t===`instanceColor`&&e.instanceColor&&(n=e.instanceColor));let r={};r.attribute=n,n&&n.data&&(r.data=n.data),i[t]=r,s++}a.attributes=i,a.attributesNum=s,a.index=r}function g(){let e=a.newAttributes;for(let t=0,n=e.length;t<n;t++)e[t]=0}function _(e){y(e,0)}function y(t,n){let r=a.newAttributes,i=a.enabledAttributes,o=a.attributeDivisors;r[t]=1,i[t]===0&&(e.enableVertexAttribArray(t),i[t]=1),o[t]!==n&&(e.vertexAttribDivisor(t,n),o[t]=n)}function b(){let t=a.newAttributes,n=a.enabledAttributes;for(let r=0,i=n.length;r<i;r++)n[r]!==t[r]&&(e.disableVertexAttribArray(r),n[r]=0)}function x(t,n,r,i,a,o,s){s===!0?e.vertexAttribIPointer(t,n,r,a,o):e.vertexAttribPointer(t,n,r,i,a,o)}function S(n,r,i,a){g();let o=a.attributes,s=i.getAttributes(),c=r.defaultAttributeValues;for(let r in s){let i=s[r];if(i.location>=0){let s=o[r];if(s===void 0&&(r===`instanceMatrix`&&n.instanceMatrix&&(s=n.instanceMatrix),r===`instanceColor`&&n.instanceColor&&(s=n.instanceColor)),s!==void 0){let r=s.normalized,o=s.itemSize,c=t.get(s);if(c===void 0)continue;let l=c.buffer,u=c.type,d=c.bytesPerElement,f=u===e.INT||u===e.UNSIGNED_INT||s.gpuType===1013;if(s.isInterleavedBufferAttribute){let t=s.data,c=t.stride,p=s.offset;if(t.isInstancedInterleavedBuffer){for(let e=0;e<i.locationSize;e++)y(i.location+e,t.meshPerAttribute);n.isInstancedMesh!==!0&&a._maxInstanceCount===void 0&&(a._maxInstanceCount=t.meshPerAttribute*t.count)}else for(let e=0;e<i.locationSize;e++)_(i.location+e);e.bindBuffer(e.ARRAY_BUFFER,l);for(let e=0;e<i.locationSize;e++)x(i.location+e,o/i.locationSize,u,r,c*d,(p+o/i.locationSize*e)*d,f)}else{if(s.isInstancedBufferAttribute){for(let e=0;e<i.locationSize;e++)y(i.location+e,s.meshPerAttribute);n.isInstancedMesh!==!0&&a._maxInstanceCount===void 0&&(a._maxInstanceCount=s.meshPerAttribute*s.count)}else for(let e=0;e<i.locationSize;e++)_(i.location+e);e.bindBuffer(e.ARRAY_BUFFER,l);for(let e=0;e<i.locationSize;e++)x(i.location+e,o/i.locationSize,u,r,o*d,o/i.locationSize*e*d,f)}}else if(c!==void 0){let t=c[r];if(t!==void 0)switch(t.length){case 2:e.vertexAttrib2fv(i.location,t);break;case 3:e.vertexAttrib3fv(i.location,t);break;case 4:e.vertexAttrib4fv(i.location,t);break;default:e.vertexAttrib1fv(i.location,t)}}}}b()}function C(){O();for(let e in r){let t=r[e];for(let e in t){let n=t[e];for(let e in n){let t=n[e];for(let e in t)u(t[e].object),delete t[e];delete n[e]}}delete r[e]}}function T(e){if(r[e.id]===void 0)return;let t=r[e.id];for(let e in t){let n=t[e];for(let e in n){let t=n[e];for(let e in t)u(t[e].object),delete t[e];delete n[e]}}delete r[e.id]}function E(e){for(let t in r){let n=r[t];for(let t in n){let r=n[t];if(r[e.id]===void 0)continue;let i=r[e.id];for(let e in i)u(i[e].object),delete i[e];delete r[e.id]}}}function D(e){for(let t in r){let n=r[t],i=e.isInstancedMesh===!0?e.id:0,a=n[i];if(a!==void 0){for(let e in a){let t=a[e];for(let e in t)u(t[e].object),delete t[e];delete a[e]}delete n[i],Object.keys(n).length===0&&delete r[t]}}}function O(){k(),o=!0,a!==i&&(a=i,l(a.object))}function k(){i.geometry=null,i.program=null,i.wireframe=!1}return{setup:s,reset:O,resetDefaultState:k,dispose:C,releaseStatesOfGeometry:T,releaseStatesOfObject:D,releaseStatesOfProgram:E,initAttributes:g,enableAttribute:_,disableUnusedAttributes:b}}function WebGLBufferRenderer(e,t,n){let r;function i(e){r=e}function a(t,i){e.drawArrays(r,t,i),n.update(i,r,1)}function o(t,i,a){a!==0&&(e.drawArraysInstanced(r,t,i,a),n.update(i,r,a))}function s(e,i,a){if(a===0)return;t.get(`WEBGL_multi_draw`).multiDrawArraysWEBGL(r,e,0,i,0,a);let o=0;for(let e=0;e<a;e++)o+=i[e];n.update(o,r,1)}
vendor: 7,302 bytes, line 3622
3622function c(e,i,a,s){if(a===0)return;let c=t.get(`WEBGL_multi_draw`);if(c===null)for(let t=0;t<e.length;t++)o(e[t],i[t],s[t]);else{c.multiDrawArraysInstancedWEBGL(r,e,0,i,0,s,0,a);let t=0;for(let e=0;e<a;e++)t+=i[e]*s[e];n.update(t,r,1)}}this.setMode=i,this.render=a,this.renderInstances=o,this.renderMultiDraw=s,this.renderMultiDrawInstances=c}function WebGLCapabilities(e,t,n,r){let i;function a(){if(i!==void 0)return i;if(t.has(`EXT_texture_filter_anisotropic`)===!0){let n=t.get(`EXT_texture_filter_anisotropic`);i=e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i}function o(t){return!(t!==1023&&r.convert(t)!==e.getParameter(e.IMPLEMENTATION_COLOR_READ_FORMAT))}function s(n){let i=n===1016&&(t.has(`EXT_color_buffer_half_float`)||t.has(`EXT_color_buffer_float`));return!(n!==1009&&r.convert(n)!==e.getParameter(e.IMPLEMENTATION_COLOR_READ_TYPE)&&n!==1015&&!i)}function c(t){if(t===`highp`){if(e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision>0)return`highp`;t=`mediump`}return t===`mediump`&&e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?`mediump`:`lowp`}let l=n.precision===void 0?`highp`:n.precision,u=c(l);u!==l&&(warn(`WebGLRenderer:`,l,`not supported, using`,u,`instead.`),l=u);let d=n.logarithmicDepthBuffer===!0,f=n.reversedDepthBuffer===!0&&t.has(`EXT_clip_control`),p=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),m=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),g=e.getParameter(e.MAX_TEXTURE_SIZE),_=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),y=e.getParameter(e.MAX_VERTEX_ATTRIBS),b=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),x=e.getParameter(e.MAX_VARYING_VECTORS),S=e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),C=e.getParameter(e.MAX_SAMPLES),T=e.getParameter(e.SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:a,getMaxPrecision:c,textureFormatReadable:o,textureTypeReadable:s,precision:l,logarithmicDepthBuffer:d,reversedDepthBuffer:f,maxTextures:p,maxVertexTextures:m,maxTextureSize:g,maxCubemapSize:_,maxAttributes:y,maxVertexUniforms:b,maxVaryings:x,maxFragmentUniforms:S,maxSamples:C,samples:T}}function WebGLClipping(e){let t=this,n=null,r=0,i=!1,a=!1,o=new Plane,s=new Matrix3,c={value:null,needsUpdate:!1};this.uniform=c,this.numPlanes=0,this.numIntersection=0,this.init=function(e,t){let n=e.length!==0||t||r!==0||i;return i=t,r=e.length,n},this.beginShadows=function(){a=!0,u(null)},this.endShadows=function(){a=!1},this.setGlobalState=function(e,t){n=u(e,t,0)},this.setState=function(t,o,s){let d=t.clippingPlanes,f=t.clipIntersection,p=t.clipShadows,m=e.get(t);if(!i||d===null||d.length===0||a&&!p)a?u(null):l();else{let e=a?0:r,t=e*4,i=m.clippingState||null;c.value=i,i=u(d,o,t,s);for(let e=0;e!==t;++e)i[e]=n[e];m.clippingState=i,this.numIntersection=f?this.numPlanes:0,this.numPlanes+=e}};function l(){c.value!==n&&(c.value=n,c.needsUpdate=r>0),t.numPlanes=r,t.numIntersection=0}function u(e,n,r,i){let a=e===null?0:e.length,l=null;if(a!==0){if(l=c.value,i!==!0||l===null){let t=r+a*4,i=n.matrixWorldInverse;s.getNormalMatrix(i),(l===null||l.length<t)&&(l=new Float32Array(t));for(let t=0,n=r;t!==a;++t,n+=4)o.copy(e[t]).applyMatrix4(i,s),o.normal.toArray(l,n),l[n+3]=o.constant}c.value=l,c.needsUpdate=!0}return t.numPlanes=a,t.numIntersection=0,l}}var LOD_MIN=4,EXTRA_LOD_SIGMA=[.125,.215,.35,.446,.526,.582],MAX_SAMPLES=20,GGX_SAMPLES=256,_flatCamera=new OrthographicCamera,_clearColor=new Color,_oldTarget=null,_oldActiveCubeFace=0,_oldActiveMipmapLevel=0,_oldXrEnabled=!1,_origin=new Vector3,PMREMGenerator=class{constructor(e){this._renderer=e,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(e,t=0,n=.1,r=100,i={}){let{size:a=256,position:o=_origin}=i;_oldTarget=this._renderer.getRenderTarget(),_oldActiveCubeFace=this._renderer.getActiveCubeFace(),_oldActiveMipmapLevel=this._renderer.getActiveMipmapLevel(),_oldXrEnabled=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(a);let s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(e,n,r,s,o),t>0&&this._blur(s,0,0,t),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=_getCubemapMaterial(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=_getEquirectMaterial(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose(),this._backgroundBox!==null&&(this._backgroundBox.geometry.dispose(),this._backgroundBox.material.dispose())}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=2**this._lodMax}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._ggxMaterial!==null&&this._ggxMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodMeshes.length;e++)this._lodMeshes[e].geometry.dispose()}_cleanup(e){this._renderer.setRenderTarget(_oldTarget,_oldActiveCubeFace,_oldActiveMipmapLevel),this._renderer.xr.enabled=_oldXrEnabled,e.scissorTest=!1,_setViewport(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===301||e.mapping===302?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),_oldTarget=this._renderer.getRenderTarget(),_oldActiveCubeFace=this._renderer.getActiveCubeFace(),_oldActiveMipmapLevel=this._renderer.getActiveMipmapLevel(),_oldXrEnabled=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;let n=t||this._allocateTargets();return this._textureToCubeUV(e,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(){let e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,n={magFilter:LinearFilter,minFilter:LinearFilter,generateMipmaps:!1,type:HalfFloatType,format:RGBAFormat,colorSpace:LinearSRGBColorSpace,depthBuffer:!1},r=_createRenderTarget(e,t,n);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=_createRenderTarget(e,t,n);let{_lodMax:r}=this;({lodMeshes:this._lodMeshes,sizeLods:this._sizeLods,sigmas:this._sigmas}=_createPlanes(r)),this._blurMaterial=_getBlurShader(r,e,t),this._ggxMaterial=_getGGXShader(r,e,t)}return r}_compileMaterial(e){let t=new Mesh(new BufferGeometry,e);this._renderer.compile(t,_flatCamera)}_sceneToCubeUV(e,t,n,r,i){let a=new PerspectiveCamera(90,1,t,n),o=[1,-1,1,1,1,1],s=[1,1,1,-1,-1,-1],c=this._renderer,l=c.autoClear,u=c.toneMapping;c.getClearColor(_clearColor),c.toneMapping=0,c.autoClear=!1,c.state.buffers.depth.getReversed()&&(c.setRenderTarget(r),c.clearDepth(),c.setRenderTarget(null)),this._backgroundBox===null&&(this._backgroundBox=new Mesh(new BoxGeometry,new MeshBasicMaterial({name:`PMREM.Backgroun
3622d`,side:1,depthWrite:!1,depthTest:!1})));let d=this._backgroundBox,f=d.material,p=!1,m=e.background;m?m.isColor&&(f.color.copy(m),e.background=null,p=!0):(f.color.copy(_clearColor),p=!0);for(let t=0;t<6;t++){let n=t%3;n===0?(a.up.set(0,o[t],0),a.position.set(i.x,i.y,i.z),a.lookAt(i.x+s[t],i.y,i.z)):n===1?(a.up.set(0,0,o[t]),a.position.set(i.x,i.y,i.z),a.lookAt(i.x,i.y+s[t],i.z)):(a.up.set(0,o[t],0),a.position.set(i.x,i.y,i.z),a.lookAt(i.x,i.y,i.z+s[t]));let l=this._cubeSize;_setViewport(r,n*l,t>2?l:0,l,l),c.setRenderTarget(r),p&&c.render(d,a),c.render(e,a)}c.toneMapping=u,c.autoClear=l,e.background=m}_textureToCubeUV(e,t){let n=this._renderer,r=e.mapping===301||e.mapping===302;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=_getCubemapMaterial()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=_getEquirectMaterial());let i=r?this._cubemapMaterial:this._equirectMaterial,a=this._lodMeshes[0];a.material=i;let o=i.uniforms;o.envMap.value=e;let s=this._cubeSize;_setViewport(t,0,0,3*s,2*s),n.setRenderTarget(t),n.render(a,_flatCamera)}_applyPMREM(e){let t=this._renderer,n=t.autoClear;t.autoClear=!1;let r=this._lodMeshes.length;for(let t=1;t<r;t++)this._applyGGXFilter(e,t-1,t);t.autoClear=n}_applyGGXFilter(e,t,n){let r=this._renderer,i=this._pingPongRenderTarget,a=this._ggxMaterial,o=this._lodMeshes[n];o.material=a;let s=a.uniforms,c=n/(this._lodMeshes.length-1),l=t/(this._lodMeshes.length-1),u=Math.sqrt(c*c-l*l)*(0+c*1.25),{_lodMax:d}=this,f=this._sizeLods[n],p=3*f*(n>d-LOD_MIN?n-d+LOD_MIN:0),m=4*(this._cubeSize-f);s.envMap.value=e.texture,s.roughness.value=u,s.mipInt.value=d-t,_setViewport(i,p,m,3*f,2*f),r.setRenderTarget(i),r.render(o,_flatCamera),s.envMap.value=i.texture,s.roughness.value=0,s.mipInt.value=d-n,_setViewport(e,p,m,3*f,2*f),r.setRenderTarget(e),r.render(o,_flatCamera)}_blur(e,t,n,r,i){let a=this._pingPongRenderTarget;this._halfBlur(e,a,t,n,r,`latitudinal`,i),this._halfBlur(a,e,n,n,r,`longitudinal`,i)}_halfBlur(e,t,n,r,i,a,o){let s=this._renderer,c=this._blurMaterial;a!==`latitudinal`&&a!==`longitudinal`&&error(`blur direction must be either latitudinal or longitudinal!`);let l=3,u=this._lodMeshes[r];u.material=c;let d=c.uniforms,f=this._sizeLods[n]-1,p=isFinite(i)?Math.PI/(2*f):2*Math.PI/(2*MAX_SAMPLES-1),m=i/p,g=isFinite(i)?1+Math.floor(3*m):MAX_SAMPLES;g>MAX_SAMPLES&&warn(`sigmaRadians, ${i}, is too large and will clip, as it requested ${g} samples when the maximum is set to ${MAX_SAMPLES}`);let _=[],y=0;for(let e=0;e<MAX_SAMPLES;++e){let t=e/m,n=Math.exp(-t*t/2);_.push(n),e===0?y+=n:e<g&&(y+=2*n)}for(let e=0;e<_.length;e++)_[e]=_[e]/y;d.envMap.value=e.texture,d.samples.value=g,d.weights.value=_,d.latitudinal.value=a===`latitudinal`,o&&(d.poleAxis.value=o);let{_lodMax:b}=this;d.dTheta.value=p,d.mipInt.value=b-n;let x=this._sizeLods[r];_setViewport(t,3*x*(r>b-LOD_MIN?r-b+LOD_MIN:0),4*(this._cubeSize-x),3*x,2*x),s.setRenderTarget(t),s.render(u,_flatCamera)}};function _createPlanes(e){let t=[],n=[],r=[],i=e,a=e-LOD_MIN+1+EXTRA_LOD_SIGMA.length;for(let o=0;o<a;o++){let a=2**i;t.push(a);let s=1/a;o>e-LOD_MIN?s=EXTRA_LOD_SIGMA[o-e+LOD_MIN-1]:o===0&&(s=0),n.push(s);let c=1/(a-2),l=-c,u=1+c,d=[l,l,u,l,u,u,l,l,u,u,l,u],f=6,p=6,m=3,g=2,_=1,y=new Float32Array(108),b=new Float32Array(72),x=new Float32Array(36);for(let e=0;e<6;e++){let t=e%3*2/3-1,n=e>2?0:-1,r=[t,n,0,t+2/3,n,0,t+2/3,n+1,0,t,n,0,t+2/3,n+1,0,t,n+1,0];y.set(r,18*e),b.set(d,12*e);let i=[e,e,e,e,e,e];x.set(i,6*e)}let S=new BufferGeometry;S.setAttribute(`position`,new BufferAttribute(y,3)),S.setAttribute(`uv`,new BufferAttribute(b,2)),S.setAttribute(`faceIndex`,new BufferAttribute(x,1)),r.push(new Mesh(S,null)),i>LOD_MIN&&i--}return{lodMeshes:r,sizeLods:t,sigmas:n}}function _createRenderTarget(e,t,n){let r=new WebGLRenderTarget(e,t,n);return r.texture.mapping=306,r.texture.name=`PMREM.cubeUv`,r.scissorTest=!0,r}function _setViewport(e,t,n,r,i){e.viewport.set(t,n,r,i),e.scissor.set(t,n,r,i)}function _getGGXShader(e,t,n){return new ShaderMaterial({name:`PMREMGGXConvolution`,defines:{GGX_SAMPLES,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${e}.0`},uniforms:{envMap:{value:null},roughness:{value:0},mipInt:{value:0}},vertexShader:_getCommonVertexShader(),fragmentShader:` 3623 3624 precision highp float; 3625 precision highp int; 3626 3627 varying vec3 vOutputDirection; 3628 3629 uniform sampler2D envMap; 3630 uniform float roughness; 3631 uniform float mipInt; 3632 3633 #define ENVMAP_TYPE_CUBE_UV 3634 #include <cube_uv_reflection_fragment> 3635 3636 #define PI 3.14159265359 3637 3638 // Van der Corput radical inverse 3639 float radicalInverse_VdC(uint bits) { 3640 bits = (bits << 16u) | (bits >> 16u); 3641 bits = ((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u); 3642 bits = ((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u); 3643 bits = ((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u); 3644 bits = ((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u); 3645 return float(bits) * 2.3283064365386963e-10; // / 0x100000000 3646 } 3647 3648 // Hammersley sequence 3649 vec2 hammersley(uint i, uint N) { 3650 return vec2(float(i) / float(N), radicalInverse_VdC(i)); 3651 } 3652 3653 // GGX VNDF importance sampling (Eric Heitz 2018) 3654 // "Sampling the GGX Distribution of Visible Normals" 3655 // https://jcgt.org/published/0007/04/01/ 3656 vec3 importanceSampleGGX_VNDF(vec2 Xi, vec3 V, float roughness) { 3657 float alpha = roughness * roughness; 3658 3659 // Section 4.1: Orthonormal basis 3660 vec3 T1 = vec3(1.0, 0.0, 0.0); 3661 vec3 T2 = cross(V, T1); 3662 3663 // Section 4.2: Parameterization of projected area 3664 float r = sqrt(Xi.x); 3665 float phi = 2.0 * PI * Xi.y; 3666 float t1 = r * cos(phi); 3667 float t2 = r * sin(phi); 3668 float s = 0.5 * (1.0 + V.z); 3669 t2 = (1.0 - s) * sqrt(1.0 - t1 * t1) + s * t2; 3670 3671 // Section 4.3: Reprojection onto hemisphere 3672 vec3 Nh = t1 * T1 + t2 * T2 + sqrt(max(0.0, 1.0 - t1 * t1 - t2 * t2)) * V; 3673 3674 // Section 3.4: Transform back to ellipsoid configuration 3675 return normalize(vec3(alpha * Nh.x, alpha * Nh.y, max(0.0, Nh.z))); 3676 } 3677 3678 void main() { 3679 vec3 N = normalize(vOutputDirection); 3680 vec3 V = N; // Assume view direction equals normal for pre-filtering 3681 3682 vec3 prefilteredColor = vec3(0.0); 3683 float totalWeight = 0.0; 3684 3685 // For very low roughness, just sample the environment directly 3686 if (roughness < 0.001) { 3687 gl_FragColor = vec4(bilinearCubeUV(envMap, N, mipInt), 1.0); 3688 return; 3689 } 3690 3691 // Tangent space basis for VNDF sampling 3692 vec3 up = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0); 3693 vec3 tangent = normalize(cross(up, N)); 3694 vec3 bitangent = cross(N, tangent); 3695
3696 for(uint i = 0u; i < uint(GGX_SAMPLES); i++) { 3697 vec2 Xi = hammersley(i, uint(GGX_SAMPLES)); 3698 3699 // For PMREM, V = N, so in tangent space V is always (0, 0, 1) 3700 vec3 H_tangent = importanceSampleGGX_VNDF(Xi, vec3(0.0, 0.0, 1.0), roughness); 3701 3702 // Transform H back to world space 3703 vec3 H = normalize(tangent * H_tangent.x + bitangent * H_tangent.y + N * H_tangent.z); 3704 vec3 L = normalize(2.0 * dot(V, H) * H - V); 3705 3706 float NdotL = max(dot(N, L), 0.0); 3707 3708 if(NdotL > 0.0) { 3709 // Sample environment at fixed mip level 3710 // VNDF importance sampling handles the distribution filtering 3711 vec3 sampleColor = bilinearCubeUV(envMap, L, mipInt); 3712 3713 // Weight by NdotL for the split-sum approximation 3714 // VNDF PDF naturally accounts for the visible microfacet distribution 3715 prefilteredColor += sampleColor * NdotL; 3716 totalWeight += NdotL; 3717 } 3718 } 3719 3720 if (totalWeight > 0.0) { 3721 prefilteredColor = prefilteredColor / totalWeight; 3722 } 3723 3724 gl_FragColor = vec4(prefilteredColor, 1.0); 3725 } 3726 `,blending:0,depthTest:!1,depthWrite:!1})}function _getBlurShader(e,t,n){let r=new Float32Array(MAX_SAMPLES),i=new Vector3(0,1,0);return new ShaderMaterial({name:`SphericalGaussianBlur`,defines:{n:MAX_SAMPLES,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${e}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:_getCommonVertexShader(),fragmentShader:` 3727 3728 precision mediump float; 3729 precision mediump int; 3730 3731 varying vec3 vOutputDirection; 3732 3733 uniform sampler2D envMap; 3734 uniform int samples; 3735 uniform float weights[ n ]; 3736 uniform bool latitudinal; 3737 uniform float dTheta; 3738 uniform float mipInt; 3739 uniform vec3 poleAxis; 3740 3741 #define ENVMAP_TYPE_CUBE_UV 3742 #include <cube_uv_reflection_fragment> 3743 3744 vec3 getSample( float theta, vec3 axis ) { 3745 3746 float cosTheta = cos( theta ); 3747 // Rodrigues' axis-angle rotation 3748 vec3 sampleDirection = vOutputDirection * cosTheta 3749 + cross( axis, vOutputDirection ) * sin( theta ) 3750 + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); 3751 3752 return bilinearCubeUV( envMap, sampleDirection, mipInt ); 3753 3754 } 3755 3756 void main() { 3757 3758 vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); 3759 3760 if ( all( equal( axis, vec3( 0.0 ) ) ) ) { 3761 3762 axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); 3763 3764 } 3765 3766 axis = normalize( axis ); 3767 3768 gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); 3769 gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); 3770 3771 for ( int i = 1; i < n; i++ ) { 3772 3773 if ( i >= samples ) { 3774 3775 break; 3776 3777 } 3778 3779 float theta = dTheta * float( i ); 3780 gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); 3781 gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); 3782 3783 } 3784 3785 } 3786 `,blending:0,depthTest:!1,depthWrite:!1})}function _getEquirectMaterial(){return new ShaderMaterial({name:`EquirectangularToCubeUV`,uniforms:{envMap:{value:null}},vertexShader:_getCommonVertexShader(),fragmentShader:` 3787 3788 precision mediump float; 3789 precision mediump int; 3790 3791 varying vec3 vOutputDirection; 3792 3793 uniform sampler2D envMap; 3794 3795 #include <common> 3796 3797 void main() { 3798 3799 vec3 outputDirection = normalize( vOutputDirection ); 3800 vec2 uv = equirectUv( outputDirection ); 3801 3802 gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); 3803 3804 } 3805 `,blending:0,depthTest:!1,depthWrite:!1})}function _getCubemapMaterial(){return new ShaderMaterial({name:`CubemapToCubeUV`,uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:_getCommonVertexShader(),fragmentShader:` 3806 3807 precision mediump float; 3808 precision mediump int; 3809 3810 uniform float flipEnvMap; 3811 3812 varying vec3 vOutputDirection; 3813 3814 uniform samplerCube envMap; 3815 3816 void main() { 3817 3818 gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); 3819 3820 } 3821 `,blending:0,depthTest:!1,depthWrite:!1})}function _getCommonVertexShader(){return` 3822 3823 precision mediump float; 3824 precision mediump int; 3825 3826 attribute float faceIndex; 3827 3828 varying vec3 vOutputDirection; 3829 3830 // RH coordinate system; PMREM face-indexing convention 3831 vec3 getDirection( vec2 uv, float face ) { 3832 3833 uv = 2.0 * uv - 1.0; 3834 3835 vec3 direction = vec3( uv, 1.0 ); 3836 3837 if ( face == 0.0 ) { 3838 3839 direction = direction.zyx; // ( 1, v, u ) pos x 3840 3841 } else if ( face == 1.0 ) { 3842 3843 direction = direction.xzy; 3844 direction.xz *= -1.0; // ( -u, 1, -v ) pos y 3845 3846 } else if ( face == 2.0 ) { 3847 3848 direction.x *= -1.0; // ( -u, v, 1 ) pos z 3849 3850 } else if ( face == 3.0 ) { 3851 3852 direction = direction.zyx; 3853 direction.xz *= -1.0; // ( -1, v, -u ) neg x 3854 3855 } else if ( face == 4.0 ) { 3856 3857 direction = direction.xzy; 3858 direction.xy *= -1.0; // ( -u, -1, v ) neg y 3859 3860 } else if ( face == 5.0 ) { 3861 3862 direction.z *= -1.0; // ( u, v, -1 ) neg z 3863 3864 } 3865 3866 return direction; 3867 3868 } 3869 3870 void main() { 3871 3872 vOutputDirection = getDirection( uv, faceIndex ); 3873 gl_Position = vec4( position, 1.0 ); 3874 3875 } 3876 `}
vendor: 56,787 bytes, lines 3876-4008
3876var WebGLCubeRenderTarget=class extends WebGLRenderTarget{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;let n={width:e,height:e,depth:1},r=[n,n,n,n,n,n];this.texture=new CubeTexture(r),this._setTextureOptions(t),this.texture.isRenderTargetTexture=!0}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;let n={uniforms:{tEquirect:{value:null}},vertexShader:` 3877 3878 varying vec3 vWorldDirection; 3879 3880 vec3 transformDirection( in vec3 dir, in mat4 matrix ) { 3881 3882 return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); 3883 3884 } 3885 3886 void main() { 3887 3888 vWorldDirection = transformDirection( position, modelMatrix ); 3889 3890 #include <begin_vertex> 3891 #include <project_vertex> 3892 3893 } 3894 `,fragmentShader:` 3895 3896 uniform sampler2D tEquirect; 3897 3898 varying vec3 vWorldDirection; 3899 3900 #include <common> 3901 3902 void main() { 3903 3904 vec3 direction = normalize( vWorldDirection ); 3905 3906 vec2 sampleUV = equirectUv( direction ); 3907 3908 gl_FragColor = texture2D( tEquirect, sampleUV ); 3909 3910 } 3911 `},r=new BoxGeometry(5,5,5),i=new ShaderMaterial({name:`CubemapFromEquirect`,uniforms:cloneUniforms(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:1,blending:0});i.uniforms.tEquirect.value=t;let a=new Mesh(r,i),o=t.minFilter;return t.minFilter===1008&&(t.minFilter=LinearFilter),new CubeCamera(1,10,this).update(e,a),t.minFilter=o,a.geometry.dispose(),a.material.dispose(),this}clear(e,t=!0,n=!0,r=!0){let i=e.getRenderTarget();for(let i=0;i<6;i++)e.setRenderTarget(this,i),e.clear(t,n,r);e.setRenderTarget(i)}};function WebGLEnvironments(e){let t=new WeakMap,n=new WeakMap,r=null;function i(e,t=!1){return e==null?null:t?o(e):a(e)}function a(n){if(n&&n.isTexture){let r=n.mapping;if(r===303||r===304)if(t.has(n)){let e=t.get(n).texture;return s(e,n.mapping)}else{let r=n.image;if(r&&r.height>0){let i=new WebGLCubeRenderTarget(r.height);return i.fromEquirectangularTexture(e,n),t.set(n,i),n.addEventListener(`dispose`,l),s(i.texture,n.mapping)}else return null}}return n}function o(t){if(t&&t.isTexture){let i=t.mapping,a=i===303||i===304,o=i===301||i===302;if(a||o){let i=n.get(t),s=i===void 0?0:i.texture.pmremVersion;if(t.isRenderTargetTexture&&t.pmremVersion!==s)return r===null&&(r=new PMREMGenerator(e)),i=a?r.fromEquirectangular(t,i):r.fromCubemap(t,i),i.texture.pmremVersion=t.pmremVersion,n.set(t,i),i.texture;if(i!==void 0)return i.texture;{let s=t.image;return a&&s&&s.height>0||o&&s&&c(s)?(r===null&&(r=new PMREMGenerator(e)),i=a?r.fromEquirectangular(t):r.fromCubemap(t),i.texture.pmremVersion=t.pmremVersion,n.set(t,i),t.addEventListener(`dispose`,u),i.texture):null}}}return t}function s(e,t){return t===303?e.mapping=301:t===304&&(e.mapping=302),e}function c(e){let t=0,n=6;for(let n=0;n<6;n++)e[n]!==void 0&&t++;return t===6}function l(e){let n=e.target;n.removeEventListener(`dispose`,l);let r=t.get(n);r!==void 0&&(t.delete(n),r.dispose())}function u(e){let t=e.target;t.removeEventListener(`dispose`,u);let r=n.get(t);r!==void 0&&(n.delete(t),r.dispose())}function d(){t=new WeakMap,n=new WeakMap,r!==null&&(r.dispose(),r=null)}return{get:i,dispose:d}}function WebGLExtensions(e){let t={};function n(n){if(t[n]!==void 0)return t[n];let r=e.getExtension(n);return t[n]=r,r}return{has:function(e){return n(e)!==null},init:function(){n(`EXT_color_buffer_float`),n(`WEBGL_clip_cull_distance`),n(`OES_texture_float_linear`),n(`EXT_color_buffer_half_float`),n(`WEBGL_multisampled_render_to_texture`),n(`WEBGL_render_shared_exponent`)},get:function(e){let t=n(e);return t===null&&warnOnce(`WebGLRenderer: `+e+` extension not supported.`),t}}}function WebGLGeometries(e,t,n,r){let i={},a=new WeakMap;function o(e){let s=e.target;s.index!==null&&t.remove(s.index);for(let e in s.attributes)t.remove(s.attributes[e]);s.removeEventListener(`dispose`,o),delete i[s.id];let c=a.get(s);c&&(t.remove(c),a.delete(s)),r.releaseStatesOfGeometry(s),s.isInstancedBufferGeometry===!0&&delete s._maxInstanceCount,n.memory.geometries--}function s(e,t){return i[t.id]===!0?t:(t.addEventListener(`dispose`,o),i[t.id]=!0,n.memory.geometries++,t)}function c(n){let r=n.attributes;for(let n in r)t.update(r[n],e.ARRAY_BUFFER)}function l(e){let n=[],r=e.index,i=e.attributes.position,o=0;if(i===void 0)return;if(r!==null){let e=r.array;o=r.version;for(let t=0,r=e.length;t<r;t+=3){let r=e[t+0],i=e[t+1],a=e[t+2];n.push(r,i,i,a,a,r)}}else{let e=i.array;o=i.version;for(let t=0,r=e.length/3-1;t<r;t+=3){let e=t+0,r=t+1,i=t+2;n.push(e,r,r,i,i,e)}}let s=new(i.count>=65535?Uint32BufferAttribute:Uint16BufferAttribute)(n,1);s.version=o;let c=a.get(e);c&&t.remove(c),a.set(e,s)}function u(e){let t=a.get(e);if(t){let n=e.index;n!==null&&t.version<n.version&&l(e)}else l(e);return a.get(e)}return{get:s,update:c,getWireframeAttribute:u}}function WebGLIndexedBufferRenderer(e,t,n){let r;function i(e){r=e}let a,o;function s(e){a=e.type,o=e.bytesPerElement}function c(t,i){e.drawElements(r,i,a,t*o),n.update(i,r,1)}function l(t,i,s){s!==0&&(e.drawElementsInstanced(r,i,a,t*o,s),n.update(i,r,s))}function u(e,i,o){if(o===0)return;t.get(`WEBGL_multi_draw`).multiDrawElementsWEBGL(r,i,0,a,e,0,o);let s=0;for(let e=0;e<o;e++)s+=i[e];n.update(s,r,1)}function d(e,i,s,c){if(s===0)return;let u=t.get(`WEBGL_multi_draw`);if(u===null)for(let t=0;t<e.length;t++)l(e[t]/o,i[t],c[t]);else{u.multiDrawElementsInstancedWEBGL(r,i,0,a,e,0,c,0,s);let t=0;for(let e=0;e<s;e++)t+=i[e]*c[e];n.update(t,r,1)}}this.setMode=i,this.setIndex=s,this.render=c,this.renderInstances=l,this.renderMultiDraw=u,this.renderMultiDrawInstances=d}function WebGLInfo(e){let t={geometries:0,textures:0},n={frame:0,calls:0,triangles:0,points:0,lines:0};function r(t,r,i){switch(n.calls++,r){case e.TRIANGLES:n.triangles+=t/3*i;break;case e.LINES:n.lines+=t/2*i;break;case e.LINE_STRIP:n.lines+=i*(t-1);break;case e.LINE_LOOP:n.lines+=i*t;break;case e.POINTS:n.points+=i*t;break;default:error(`WebGLInfo: Unknown draw mode:`,r);break}}function i(){n.calls=0,n.triangles=0,n.points=0,n.lines=0}return{memory:t,render:n,programs:null,autoReset:!0,reset:i,update:r}}function WebGLMorphtargets(e,t,n){let r=new WeakMap,i=new Vector4;function a(a,o,s){let c=a.morphTargetInfluences,l=o.morphAttributes.position||o.morphAttributes.normal||o.morphAttributes.color,u=l===void 0?0:l.length,d=r.get(o);if(d===void 0||d.count!==u){d!==void 0&&d.texture.dispose();let e=o.morphAttributes.position!==void 0,n=o.morphAttributes.normal!==void 0,a=o.morphAttributes.color!==void 0,s=o.morphAttributes.position||[],c=o.morphAttributes.normal||[],l=o.morphAttributes.color||[],f=0;e===!0&&(f=1),n===!0&&(f=2),a===!0&&(f=3);let p=o.attributes.position.count*f,m=1;p>t.maxTextureSize&&(m=Math.ceil(p/t.maxTextureSize),p=t.maxTextureSize);let g=new Float32Array(p*m*4*u),_=new DataArrayTexture(g,p,m,u);_.type=FloatType,_.needsUpdate=!0;let y=f*4;for(let t=0;t<u;t++){let r=s[t],o=c[t],u=l[t],d=p*m*4*t;for(let t=0;t<r.count;t++){let s=t*y;e===!0&&(i.fromBufferAttribute(r,t),g[d+s+0]=i.x,g[d+s+1]=i.y,g[d+s+2]=i.z,g[d+s+3]=0),n===!0&&(i.fromBufferAttribute(o,t),g[d+s+4]=i.x,g[d+s+5]=i.y,g[d+s+6]=i.z,g[d+s+7]=0),a===!0&&(i.fromBufferAttribute(u,t),g[d+s+8]=i.x,g[d+s+9]=i.y,g[d+s+10]=i.z,g[d+s+11]=u.itemSize===4?i.w:1)}}d={count:u,texture:_,size:new Vector2(p,m)},r.set(o,d);function b(){_.dispose(),r.delete(o),o.removeEventListener(`dispose`,b)}o.addEventListener(`dispose`,b)}if(a.isInstancedMesh===!0&&a.morphTexture!==null)s.getUniforms().setValue(e,`morphTexture`,a.morphTexture,n);else{let t=0;for(let e=0;e<c.length;e++)t+=c[e];let n=o.morphTargetsRelative?1:1-t;s.getUniforms().setValue(e,`morphTargetBaseInfluence`,n),s.getUniforms().setValue(e,`morphTargetInfluences`,c)}s.getUniforms().setValue(e,`morphTargetsTexture`,d.texture,n),s.getUniforms().setValue(e,`morphTargetsTextureSize`,d.size)}return{update:a}}function WebGLObjects(e,t,n,r,i){let a=new WeakMap;function o(r){let o=i.render.frame,s=r.geometry,l=t.get(r,s);if(a.get(l)!==o&&(t.update(l),a.set(l,o)),r.isInstancedMesh&&(r.hasEventListener(`dispose`,c)===!1&&r.addEventListener(`dispose`,c),a.get(r)!==o&&(n.update(r.instanceMatrix,e.ARRAY_BUFFER),r.instanceColor!==null&&n.update(r.instanceColor,e.ARRAY_BUFFER),a.set(r,o))),r.isSkinnedMesh){let e=r.skeleton;a.get(e)!==o&&(e.update(),a.set(e,o))}return l}function s(){a=new WeakMap}function c(e){let t=e.target;t.removeEventListener(`dispose`,c),r.releaseStatesOfObject(t),n.remove(t.instanceMatrix),t.instanceColor!==null&&n.remove(t.instanceColor)}return{update:o,dispose:s}}var toneMappingMap={1:`LINEAR_TONE_MAPPING`,2:`REINHARD_TONE_MAPPING`,3:`CINEON_TONE_MAPPING`,4:`ACES_FILMIC_TONE_MAPPING`,6:`AGX_TONE_MAPPING`,7:`NEUTRAL_TONE_MAPPING`,5:`CUSTOM_TONE_MAPPING`};function WebGLOutput(e,t,n,r,i){let a=new WebGLRenderTarget(t,n,{type:e,depthBuffer:r,stencilBuffer:i}),o=new WebGLRenderTarget(t,n,{type:HalfFloatType,depthBuffer:!1,stencilBuffer:!1}),s=new BufferGeometry;s.setAttribute(`position`,new Float32BufferAttribute([-1,3,0,-1,-1,0,3,-1,0],3)),s.setAttribute(`uv`,new Float32BufferAttribute([0,2,0,0,2,0],2));let c=new RawShaderMaterial({uniforms:{tDiffuse:{value:null}},vertexShader:` 3912 precision highp float; 3913 3914 uniform mat4 modelViewMatrix; 3915 uniform mat4 projectionMatrix; 3916 3917 attribute vec3 position; 3918 attribute vec2 uv; 3919 3920 varying vec2 vUv; 3921 3922 void main() { 3923 vUv = uv; 3924 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 3925 }`,fragmentShader:` 3926 precision highp float; 3927 3928 uniform sampler2D tDiffuse; 3929 3930 varying vec2 vUv; 3931 3932 #include <tonemapping_pars_fragment> 3933 #include <colorspace_pars_fragment> 3934 3935 void main() { 3936 gl_FragColor = texture2D( tDiffuse, vUv ); 3937 3938 #ifdef LINEAR_TONE_MAPPING 3939 gl_FragColor.rgb = LinearToneMapping( gl_FragColor.rgb ); 3940 #elif defined( REINHARD_TONE_MAPPING ) 3941 gl_FragColor.rgb = ReinhardToneMapping( gl_FragColor.rgb ); 3942 #elif defined( CINEON_TONE_MAPPING ) 3943 gl_FragColor.rgb = CineonToneMapping( gl_FragColor.rgb ); 3944 #elif defined( ACES_FILMIC_TONE_MAPPING ) 3945 gl_FragColor.rgb = ACESFilmicToneMapping( gl_FragColor.rgb ); 3946 #elif defined( AGX_TONE_MAPPING ) 3947 gl_FragColor.rgb = AgXToneMapping( gl_FragColor.rgb ); 3948 #elif defined( NEUTRAL_TONE_MAPPING ) 3949 gl_FragColor.rgb = NeutralToneMapping( gl_FragColor.rgb ); 3950 #elif defined( CUSTOM_TONE_MAPPING ) 3951 gl_FragColor.rgb = CustomToneMapping( gl_FragColor.rgb ); 3952 #endif 3953 3954 #ifdef SRGB_TRANSFER 3955 gl_FragColor = sRGBTransferOETF( gl_FragColor ); 3956 #endif 3957 }`,depthTest:!1,depthWrite:!1}),l=new Mesh(s,c),u=new OrthographicCamera(-1,1,1,-1,0,1),d=null,f=null,p=!1,m,g=null,_=[],y=!1;this.setSize=function(e,t){a.setSize(e,t),o.setSize(e,t);for(let n=0;n<_.length;n++){let r=_[n];r.setSize&&r.setSize(e,t)}},this.setEffects=function(e){_=e,y=_.length>0&&_[0].isRenderPass===!0;let t=a.width,n=a.height;for(let e=0;e<_.length;e++){let r=_[e];r.setSize&&r.setSize(t,n)}},this.begin=function(e,t){if(p||e.toneMapping===0&&_.length===0)return!1;if(g=t,t!==null){let e=t.width,n=t.height;(a.width!==e||a.height!==n)&&this.setSize(e,n)}return y===!1&&e.setRenderTarget(a),m=e.toneMapping,e.toneMapping=0,!0},this.hasRenderPass=function(){return y},this.end=function(e,t){e.toneMapping=m,p=!0;let n=a,r=o;for(let i=0;i<_.length;i++){let a=_[i];if(a.enabled!==!1&&(a.render(e,r,n,t),a.needsSwap!==!1)){let e=n;n=r,r=e}}if(d!==e.outputColorSpace||f!==e.toneMapping){d=e.outputColorSpace,f=e.toneMapping,c.defines={},ColorManagement.getTransfer(d)===`srgb`&&(c.defines.SRGB_TRANSFER=``);let t=toneMappingMap[f];t&&(c.defines[t]=``),c.needsUpdate=!0}c.uniforms.tDiffuse.value=n.texture,e.setRenderTarget(g),e.render(l,u),g=null,p=!1},this.isCompositing=function(){return p},this.dispose=function(){a.dispose(),o.dispose(),s.dispose(),c.dispose()}}var emptyTexture=new Texture,emptyShadowTexture=new DepthTexture(1,1),emptyArrayTexture=new DataArrayTexture,empty3dTexture=new Data3DTexture,emptyCubeTexture=new CubeTexture,arrayCacheF32=[],arrayCacheI32=[],mat4array=new Float32Array(16),mat3array=new Float32Array(9),mat2array=new Float32Array(4);function flatten(e,t,n){let r=e[0];if(r<=0||r>0)return e;let i=t*n,a=arrayCacheF32[i];if(a===void 0&&(a=new Float32Array(i),arrayCacheF32[i]=a),t!==0){r.toArray(a,0);for(let r=1,i=0;r!==t;++r)i+=n,e[r].toArray(a,i)}return a}function arraysEqual(e,t){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0}function copyArray(e,t){for(let n=0,r=t.length;n<r;n++)e[n]=t[n]}function allocTexUnits(e,t){let n=arrayCacheI32[t];n===void 0&&(n=new Int32Array(t),arrayCacheI32[t]=n);for(let r=0;r!==t;++r)n[r]=e.allocateTextureUnit();return n}function setValueV1f(e,t){let n=this.cache;n[0]!==t&&(e.uniform1f(this.addr,t),n[0]=t)}function setValueV2f(e,t){let n=this.cache;if(t.x!==void 0)(n[0]!==t.x||n[1]!==t.y)&&(e.uniform2f(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(arraysEqual(n,t))return;e.uniform2fv(this.addr,t),copyArray(n,t)}}function setValueV3f(e,t){let n=this.cache;if(t.x!==void 0)(n[0]!==t.x||n[1]!==t.y||n[2]!==t.z)&&(e.uniform3f(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else if(t.r!==void 0)(n[0]!==t.r||n[1]!==t.g||n[2]!==t.b)&&(e.uniform3f(this.addr,t.r,t.g,t.b),n[0]=t.r,n[1]=t.g,n[2]=t.b);else{if(arraysEqual(n,t))return;e.uniform3fv(this.addr,t),copyArray(n,t)}}function setValueV4f(e,t){let n=this.cache;if(t.x!==void 0)(n[0]!==t.x||n[1]!==t.y||n[2]!==t.z||n[3]!==t.w)&&(e.uniform4f(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(arraysEqual(n,t))return;e.uniform4fv(this.addr,t),copyArray(n,t)}}function setValueM2(e,t){let n=this.cache,r=t.elements;if(r===void 0){if(arraysEqual(n,t))return;e.uniformMatrix2fv(this.addr,!1,t),copyArray(n,t)}else{if(arraysEqual(n,r))return;mat2array.set(r),e.uniformMatrix2fv(this.addr,!1,mat2array),copyArray(n,r)}}function setValueM3(e,t){let n=this.cache,r=t.elements;if(r===void 0){if(arraysEqual(n,t))return;e.uniformMatrix3fv(this.addr,!1,t),copyArray(n,t)}else{if(arraysEqual(n,r))return;mat3array.set(r),e.uniformMatrix3fv(this.addr,!1,mat3array),copyArray(n,r)}}function setValueM4(e,t){let n=this.cache,r=t.elements;if(r===void 0){if(arraysEqual(n,t))return;e.uniformMatrix4fv(this.addr,!1,t),copyArray(n,t)}else{if(arraysEqual(n,r))return;mat4array.set(r),e.uniformMatrix4fv(this.addr,!1,mat4array),copyArray(n,r)}}function setValueV1i(e,t){let n=this.cache;n[0]!==t&&(e.uniform1i(this.addr,t),n[0]=t)}function setValueV2i(e,t){let n=this.cache;if(t.x!==void 0)(n[0]!==t.x||n[1]!==t.y)&&(e.uniform2i(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(arraysEqual(n,t))return;e.uniform2iv(this.addr,t),copyArray(n,t)}}function setValueV3i(e,t){let n=this.cache;if(t.x!==void 0)(n[0]!==t.x||n[1]!==t.y||n[2]!==t.z)&&(e.uniform3i(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else{if(arraysEqual(n,t))return;e.uniform3iv(this.addr,t),copyArray(n,t)}}function setValueV4i(e,t){let n=this.cache;if(t.x!==void 0)(n[0]!==t.x||n[1]!==t.y||n[2]!==t.z||n[3]!==t.w)&&(e.uniform4i(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(arraysEqual(n,t))return;e.uniform4iv(this.addr,t),copyArray(n,t)}}function setValueV1ui(e,t){let n=this.cache;n[0]!==t&&(e.uniform1ui(this.addr,t),n[0]=t)}function setValueV2ui(e,t){let n=this.cache;if(t.x!==void 0)(n[0]!==t.x||n[1]!==t.y)&&(e.uniform2ui(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(arraysEqual(n,t))return;e.uniform2uiv(this.addr,t),copyArray(n,t)}}function setValueV3ui(e,t){let n=this.cache;if(t.x!==void 0)(n[0]!==t.x||n[1]!==t.y||n[2]!==t.z)&&(e.uniform3ui(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else{if(arraysEqual(n,t))return;e.uniform3uiv(this.addr,t),copyArray(n,t)}}function setValueV4ui(e,t){let n=this.cache;if(t.x!==void 0)(n[0]!==t.x||n[1]!==t.y||n[2]!==t.z||n[3]!==t.w)&&(e.uniform4ui(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(arraysEqual(n,t))return;e.uniform4uiv(this.addr,t),copyArray(n,t)}}function setValueT1(e,t,n){let r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i);let a;this.type===e.SAMPLER_2D_SHADOW?(emptyShadowTexture.compareFunction=n.isReversedDepthBuffer()?518:515,a=emptyShadowTexture):a=emptyTexture,n.setTexture2D(t||a,i)}function setValueT3D1(e,t,n){let r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture3D(t||empty3dTexture,i)}function setValueT6(e,t,n){let r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTextureCube(t||emptyCubeTexture,i)}function setValueT2DArray1(e,t,n){let r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture2DArray(t||emptyArrayTexture,i)}function getSingularSetter(e){switch(e){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(e,t){e.uniform1fv(this.addr,t)}function setValueV2fArray(e,t){let n=flatten(t,this.size,2);e.uniform2fv(this.addr,n)}function setValueV3fArray(e,t){let n=flatten(t,this.size,3);e.uniform3fv(this.addr,n)}function setValueV4fArray(e,t){let n=flatten(t,this.size,4);e.uniform4fv(this.addr,n)}function setValueM2Array(e,t){let n=flatten(t,this.size,4);e.uniformMatrix2fv(this.addr,!1,n)}function setValueM3Array(e,t){let n=flatten(t,this.size,9);e.uniformMatrix3fv(this.addr,!1,n)}function setValueM4Array(e,t){let n=flatten(t,this.size,16);e.uniformMatrix4fv(this.addr,!1,n)}function setValueV1iArray(e,t){e.uniform1iv(this.addr,t)}function setValueV2iArray(e,t){e.uniform2iv(this.addr,t)}function setValueV3iArray(e,t){e.uniform3iv(this.addr,t)}function setValueV4iArray(e,t){e.uniform4iv(this.addr,t)}function setValueV1uiArray(e,t){e.uniform1uiv(this.addr,t)}function setValueV2uiArray(e,t){e.uniform2uiv(this.addr,t)}function setValueV3uiArray(e,t){e.uniform3uiv(this.addr,t)}function setValueV4uiArray(e,t){e.uniform4uiv(this.addr,t)}function setValueT1Array(e,t,n){let r=this.cache,i=t.length,a=allocTexUnits(n,i);arraysEqual(r,a)||(e.uniform1iv(this.addr,a),copyArray(r,a));let o;o=this.type===e.SAMPLER_2D_SHADOW?emptyShadowTexture:emptyTexture;for(let e=0;e!==i;++e)n.setTexture2D(t[e]||o,a[e])}function setValueT3DArray(e,t,n){let r=this.cache,i=t.length,a=allocTexUnits(n,i);arraysEqual(r,a)||(e.uniform1iv(this.addr,a),copyArray(r,a));for(let e=0;e!==i;++e)n.setTexture3D(t[e]||empty3dTexture,a[e])}function setValueT6Array(e,t,n){let r=this.cache,i=t.length,a=allocTexUnits(n,i);arraysEqual(r,a)||(e.uniform1iv(this.addr,a),copyArray(r,a));for(let e=0;e!==i;++e)n.setTextureCube(t[e]||emptyCubeTexture,a[e])}function setValueT2DArrayArray(e,t,n){let r=this.cache,i=t.length,a=allocTexUnits(n,i);arraysEqual(r,a)||(e.uniform1iv(this.addr,a),copyArray(r,a));for(let e=0;e!==i;++e)n.setTexture2DArray(t[e]||emptyArrayTexture,a[e])}function getPureArraySetter(e){switch(e){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}}var SingleUniform=class{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.setValue=getSingularSetter(t.type)}},PureArrayUniform=class{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.size=t.size,this.setValue=getPureArraySetter(t.type)}},StructuredUniform=class{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,t,n){let r=this.seq;for(let i=0,a=r.length;i!==a;++i){let a=r[i];a.setValue(e,t[a.id],n)}}},RePathPart=/(\w+)(\])?(\[|\.)?/g;function addUniform(e,t){e.seq.push(t),e.map[t.id]=t}function parseUniform(e,t,n){let r=e.name,i=r.length;for(RePathPart.lastIndex=0;;){let a=RePathPart.exec(r),o=RePathPart.lastIndex,s=a[1],c=a[2]===`]`,l=a[3];if(c&&(s|=0),l===void 0||l===`[`&&o+2===i){addUniform(n,l===void 0?new SingleUniform(s,e,t):new PureArrayUniform(s,e,t));break}else{let e=n.map[s];e===void 0&&(e=new StructuredUniform(s),addUniform(n,e)),n=e}}}var WebGLUniforms=class{constructor(e,t){this.seq=[],this.map={};let n=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let r=0;r<n;++r){let n=e.getActiveUniform(t,r);parseUniform(n,e.getUniformLocation(t,n.name),this)}let r=[],i=[];for(let t of this.seq)t.type===e.SAMPLER_2D_SHADOW||t.type===e.SAMPLER_CUBE_SHADOW||t.type===e.SAMPLER_2D_ARRAY_SHADOW?r.push(t):i.push(t);r.length>0&&(this.seq=r.concat(i))}setValue(e,t,n,r){let i=this.map[t];i!==void 0&&i.setValue(e,n,r)}setOptional(e,t,n){let r=t[n];r!==void 0&&this.setValue(e,n,r)}static upload(e,t,n,r){for(let i=0,a=t.length;i!==a;++i){let a=t[i],o=n[a.id];o.needsUpdate!==!1&&a.setValue(e,o.value,r)}}static seqWithValue(e,t){let n=[];for(let r=0,i=e.length;r!==i;++r){let i=e[r];i.id in t&&n.push(i)}return n}};function WebGLShader(e,t,n){let r=e.createShader(t);return e.shaderSource(r,n),e.compileShader(r),r}var COMPLETION_STATUS_KHR=37297,programIdCount=0;function handleSource(e,t){let n=e.split(` 3958`),r=[],i=Math.max(t-6,0),a=Math.min(t+6,n.length);for(let e=i;e<a;e++){let i=e+1;r.push(`${i===t?`>`:` `} ${i}: ${n[e]}`)}return r.join(` 3959`)}var _m0=new Matrix3;function getEncodingComponents(e){ColorManagement._getMatrix(_m0,ColorManagement.workingColorSpace,e);let t=`mat3( ${_m0.elements.map(e=>e.toFixed(4))} )`;switch(ColorManagement.getTransfer(e)){case LinearTransfer:return[t,`LinearTransferOETF`];case SRGBTransfer:return[t,`sRGBTransferOETF`];default:return warn(`WebGLProgram: Unsupported color space: `,e),[t,`LinearTransferOETF`]}}function getShaderErrors(e,t,n){let r=e.getShaderParameter(t,e.COMPILE_STATUS),i=(e.getShaderInfoLog(t)||``).trim();if(r&&i===``)return``;let a=/ERROR: 0:(\d+)/.exec(i);if(a){let r=parseInt(a[1]);return n.toUpperCase()+` 3960 3961`+i+` 3962 3963`+handleSource(e.getShaderSource(t),r)}else return i}function getTexelEncodingFunction(e,t){let n=getEncodingComponents(t);return[`vec4 ${e}( vec4 value ) {`,` return ${n[1]}( vec4( value.rgb * ${n[0]}, value.a ) );`,`}`].join(` 3964`)}var toneMappingFunctions={1:`Linear`,2:`Reinhard`,3:`Cineon`,4:`ACESFilmic`,6:`AgX`,7:`Neutral`,5:`Custom`};function getToneMappingFunction(e,t){let n=toneMappingFunctions[t];return n===void 0?(warn(`WebGLProgram: Unsupported toneMapping:`,t),`vec3 `+e+`( vec3 color ) { return LinearToneMapping( color ); }`):`vec3 `+e+`( vec3 color ) { return `+n+`ToneMapping( color ); }`}var _v0=new Vector3;function getLuminanceFunction(){return ColorManagement.getLuminanceCoefficients(_v0),[`float luminance( const in vec3 rgb ) {`,` const vec3 weights = vec3( ${_v0.x.toFixed(4)}, ${_v0.y.toFixed(4)}, ${_v0.z.toFixed(4)} );`,` return dot( weights, rgb );`,`}`].join(` 3965`)}function generateVertexExtensions(e){return[e.extensionClipCullDistance?`#extension GL_ANGLE_clip_cull_distance : require`:``,e.extensionMultiDraw?`#extension GL_ANGLE_multi_draw : require`:``].filter(filterEmptyLine).join(` 3966`)}function generateDefines(e){let t=[];for(let n in e){let r=e[n];r!==!1&&t.push(`#define `+n+` `+r)}return t.join(` 3967`)}function fetchAttributeLocations(e,t){let n={},r=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let i=0;i<r;i++){let r=e.getActiveAttrib(t,i),a=r.name,o=1;r.type===e.FLOAT_MAT2&&(o=2),r.type===e.FLOAT_MAT3&&(o=3),r.type===e.FLOAT_MAT4&&(o=4),n[a]={type:r.type,location:e.getAttribLocation(t,a),locationSize:o}}return n}function filterEmptyLine(e){return e!==``}function replaceLightNums(e,t){let n=t.numSpotLightShadows+t.numSpotLightMaps-t.numSpotLightShadowsWithMaps;return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,t.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,n).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,t.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function replaceClippingPlaneNums(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}var includePattern=/^[ \t]*#include +<([\w\d./]+)>/gm;function resolveIncludes(e){return e.replace(includePattern,includeReplacer)}var shaderChunkMap=new Map;function includeReplacer(e,t){let n=ShaderChunk[t];if(n===void 0){let e=shaderChunkMap.get(t);if(e!==void 0)n=ShaderChunk[e],warn(`WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.`,t,e);else throw Error(`Can not resolve #include <`+t+`>`)}return resolveIncludes(n)}var 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(e){return e.replace(unrollLoopPattern,loopReplacer)}function loopReplacer(e,t,n,r){let i=``;for(let e=parseInt(t);e<parseInt(n);e++)i+=r.replace(/\[\s*i\s*\]/g,`[ `+e+` ]`).replace(/UNROLLED_LOOP_INDEX/g,e);return i}function generatePrecision(e){let t=`precision ${e.precision} float; 3968 precision ${e.precision} int; 3969 precision ${e.precision} sampler2D; 3970 precision ${e.precision} samplerCube; 3971 precision ${e.precision} sampler3D; 3972 precision ${e.precision} sampler2DArray; 3973 precision ${e.precision} sampler2DShadow; 3974 precision ${e.precision} samplerCubeShadow; 3975 precision ${e.precision} sampler2DArrayShadow; 3976 precision ${e.precision} isampler2D; 3977 precision ${e.precision} isampler3D; 3978 precision ${e.precision} isamplerCube; 3979 precision ${e.precision} isampler2DArray; 3980 precision ${e.precision} usampler2D; 3981 precision ${e.precision} usampler3D; 3982 precision ${e.precision} usamplerCube; 3983 precision ${e.precision} usampler2DArray; 3984 `;return e.precision===`highp`?t+=` 3985#define HIGH_PRECISION`:e.precision===`mediump`?t+=` 3986#define MEDIUM_PRECISION`:e.precision===`lowp`&&(t+=` 3987#define LOW_PRECISION`),t}var shadowMapTypeDefines={1:`SHADOWMAP_TYPE_PCF`,3:`SHADOWMAP_TYPE_VSM`};function generateShadowMapTypeDefine(e){return shadowMapTypeDefines[e.shadowMapType]||`SHADOWMAP_TYPE_BASIC`}var envMapTypeDefines={301:`ENVMAP_TYPE_CUBE`,302:`ENVMAP_TYPE_CUBE`,306:`ENVMAP_TYPE_CUBE_UV`};function generateEnvMapTypeDefine(e){return e.envMap===!1?`ENVMAP_TYPE_CUBE`:envMapTypeDefines[e.envMapMode]||`ENVMAP_TYPE_CUBE`}var envMapModeDefines={302:`ENVMAP_MODE_REFRACTION`};function generateEnvMapModeDefine(e){return e.envMap===!1?`ENVMAP_MODE_REFLECTION`:envMapModeDefines[e.envMapMode]||`ENVMAP_MODE_REFLECTION`}var envMapBlendingDefines={0:`ENVMAP_BLENDING_MULTIPLY`,1:`ENVMAP_BLENDING_MIX`,2:`ENVMAP_BLENDING_ADD`};function generateEnvMapBlendingDefine(e){return e.envMap===!1?`ENVMAP_BLENDING_NONE`:envMapBlendingDefines[e.combine]||`ENVMAP_BLENDING_NONE`}function generateCubeUVSize(e){let t=e.envMapCubeUVHeight;if(t===null)return null;let n=Math.log2(t)-2,r=1/t;return{texelWidth:1/(3*Math.max(2**n,112)),texelHeight:r,maxMip:n}}function WebGLProgram(e,t,n,r){let i=e.getContext(),a=n.defines,o=n.vertexShader,s=n.fragmentShader,c=generateShadowMapTypeDefine(n),l=generateEnvMapTypeDefine(n),u=generateEnvMapModeDefine(n),d=generateEnvMapBlendingDefine(n),f=generateCubeUVSize(n),p=generateVertexExtensions(n),m=generateDefines(a),g=i.createProgram(),_,y,b=n.glslVersion?`#version `+n.glslVersion+` 3988`:``;n.isRawShaderMaterial?(_=[`#define SHADER_TYPE `+n.shaderType,`#define SHADER_NAME `+n.shaderName,m].filter(filterEmptyLine).join(` 3989`),_.length>0&&(_+=` 3990`),y=[`#define SHADER_TYPE `+n.shaderType,`#define SHADER_NAME `+n.shaderName,m].filter(filterEmptyLine).join(` 3991`),y.length>0&&(y+=` 3992`)):(_=[generatePrecision(n),`#define SHADER_TYPE `+n.shaderType,`#define SHADER_NAME `+n.shaderName,m,n.extensionClipCullDistance?`#define USE_CLIP_DISTANCE`:``,n.batching?`#define USE_BATCHING`:``,n.batchingColor?`#define USE_BATCHING_COLOR`:``,n.instancing?`#define USE_INSTANCING`:``,n.instancingColor?`#define USE_INSTANCING_COLOR`:``,n.instancingMorph?`#define USE_INSTANCING_MORPH`:``,n.useFog&&n.fog?`#define USE_FOG`:``,n.useFog&&n.fogExp2?`#define FOG_EXP2`:``,n.map?`#define USE_MAP`:``,n.envMap?`#define USE_ENVMAP`:``,n.envMap?`#define `+u:``,n.lightMap?`#define USE_LIGHTMAP`:``,n.aoMap?`#define USE_AOMAP`:``,n.bumpMap?`#define USE_BUMPMAP`:``,n.normalMap?`#define USE_NORMALMAP`:``,n.normalMapObjectSpace?`#define USE_NORMALMAP_OBJECTSPACE`:``,n.normalMapTangentSpace?`#define USE_NORMALMAP_TANGENTSPACE`:``,n.displacementMap?`#define USE_DISPLACEMENTMAP`:``,n.emissiveMap?`#define USE_EMISSIVEMAP`:``,n.anisotropy?`#define USE_ANISOTROPY`:``,n.anisotropyMap?`#define USE_ANISOTROPYMAP`:``,n.clearcoatMap?`#define USE_CLEARCOATMAP`:``,n.clearcoatRoughnessMap?`#define USE_CLEARCOAT_ROUGHNESSMAP`:``,n.clearcoatNormalMap?`#define USE_CLEARCOAT_NORMALMAP`:``,n.iridescenceMap?`#define USE_IRIDESCENCEMAP`:``,n.iridescenceThicknessMap?`#define USE_IRIDESCENCE_THICKNESSMAP`:``,n.specularMap?`#define USE_SPECULARMAP`:``,n.specularColorMap?`#define USE_SPECULAR_COLORMAP`:``,n.specularIntensityMap?`#define USE_SPECULAR_INTENSITYMAP`:``,n.roughnessMap?`#define USE_ROUGHNESSMAP`:``,n.metalnessMap?`#define USE_METALNESSMAP`:``,n.alphaMap?`#define USE_ALPHAMAP`:``,n.alphaHash?`#define USE_ALPHAHASH`:``,n.transmission?`#define USE_TRANSMISSION`:``,n.transmissionMap?`#define USE_TRANSMISSIONMAP`:``,n.thicknessMap?`#define USE_THICKNESSMAP`:``,n.sheenColorMap?`#define USE_SHEEN_COLORMAP`:``,n.sheenRoughnessMap?`#define USE_SHEEN_ROUGHNESSMAP`:``,n.mapUv?`#define MAP_UV `+n.mapUv:``,n.alphaMapUv?`#define ALPHAMAP_UV `+n.alphaMapUv:``,n.lightMapUv?`#define LIGHTMAP_UV `+n.lightMapUv:``,n.aoMapUv?`#define AOMAP_UV `+n.aoMapUv:``,n.emissiveMapUv?`#define EMISSIVEMAP_UV `+n.emissiveMapUv:``,n.bumpMapUv?`#define BUMPMAP_UV `+n.bumpMapUv:``,n.normalMapUv?`#define NORMALMAP_UV `+n.normalMapUv:``,n.displacementMapUv?`#define DISPLACEMENTMAP_UV `+n.displacementMapUv:``,n.metalnessMapUv?`#define METALNESSMAP_UV `+n.metalnessMapUv:``,n.roughnessMapUv?`#define ROUGHNESSMAP_UV `+n.roughnessMapUv:``,n.anisotropyMapUv?`#define ANISOTROPYMAP_UV `+n.anisotropyMapUv:``,n.clearcoatMapUv?`#define CLEARCOATMAP_UV `+n.clearcoatMapUv:``,n.clearcoatNormalMapUv?`#define CLEARCOAT_NORMALMAP_UV `+n.clearcoatNormalMapUv:``,n.clearcoatRoughnessMapUv?`#define CLEARCOAT_ROUGHNESSMAP_UV `+n.clearcoatRoughnessMapUv:``,n.iridescenceMapUv?`#define IRIDESCENCEMAP_UV `+n.iridescenceMapUv:``,n.iridescenceThicknessMapUv?`#define IRIDESCENCE_THICKNESSMAP_UV `+n.iridescenceThicknessMapUv:``,n.sheenColorMapUv?`#define SHEEN_COLORMAP_UV `+n.sheenColorMapUv:``,n.sheenRoughnessMapUv?`#define SHEEN_ROUGHNESSMAP_UV `+n.sheenRoughnessMapUv:``,n.specularMapUv?`#define SPECULARMAP_UV `+n.specularMapUv:``,n.specularColorMapUv?`#define SPECULAR_COLORMAP_UV `+n.specularColorMapUv:``,n.specularIntensityMapUv?`#define SPECULAR_INTENSITYMAP_UV `+n.specularIntensityMapUv:``,n.transmissionMapUv?`#define TRANSMISSIONMAP_UV `+n.transmissionMapUv:``,n.thicknessMapUv?`#define THICKNESSMAP_UV `+n.thicknessMapUv:``,n.vertexTangents&&n.flatShading===!1?`#define USE_TANGENT`:``,n.vertexColors?`#define USE_COLOR`:``,n.vertexAlphas?`#define USE_COLOR_ALPHA`:``,n.vertexUv1s?`#define USE_UV1`:``,n.vertexUv2s?`#define USE_UV2`:``,n.vertexUv3s?`#define USE_UV3`:``,n.pointsUvs?`#define USE_POINTS_UV`:``,n.flatShading?`#define FLAT_SHADED`:``,n.skinning?`#define USE_SKINNING`:``,n.morphTargets?`#define USE_MORPHTARGETS`:``,n.morphNormals&&n.flatShading===!1?`#define USE_MORPHNORMALS`:``,n.morphColors?`#define USE_MORPHCOLORS`:``,n.morphTargetsCount>0?`#define MORPHTARGETS_TEXTURE_STRIDE `+n.morphTextureStride:``,n.morphTargetsCount>0?`#define MORPHTARGETS_COUNT `+n.morphTargetsCount:``,n.doubleSided?`#define DOUBLE_SIDED`:``,n.flipSided?`#define FLIP_SIDED`:``,n.shadowMapEnabled?`#define USE_SHADOWMAP`:``,n.shadowMapEnabled?`#define `+c:``,n.sizeAttenuation?`#define USE_SIZEATTENUATION`:``,n.numLightProbes>0?`#define USE_LIGHT_PROBES`:``,n.logarithmicDepthBuffer?`#define USE_LOGARITHMIC_DEPTH_BUFFER`:``,n.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`,` attribute mat4 instanceMatrix;`,`#endif`,`#ifdef USE_INSTANCING_COLOR`,` attribute vec3 instanceColor;`,`#endif`,`#ifdef USE_INSTANCING_MORPH`,` uniform sampler2D morphTexture;`,`#endif`,`attribute vec3 position;`,`attribute vec3 normal;`,`attribute vec2 uv;`,`#ifdef USE_UV1`,` attribute vec2 uv1;`,`#endif`,`#ifdef USE_UV2`,` attribute vec2 uv2;`,`#endif`,`#ifdef USE_UV3`,` attribute vec2 uv3;`,`#endif`,`#ifdef USE_TANGENT`,` attribute vec4 tangent;`,`#endif`,`#if defined( USE_COLOR_ALPHA )`,` attribute vec4 color;`,`#elif defined( USE_COLOR )`,` attribute vec3 color;`,`#endif`,`#ifdef USE_SKINNING`,` attribute vec4 skinIndex;`,` attribute vec4 skinWeight;`,`#endif`,` 3993`].filter(filterEmptyLine).join(` 3994`),y=[generatePrecision(n),`#define SHADER_TYPE `+n.shaderType,`#define SHADER_NAME `+n.shaderName,m,n.useFog&&n.fog?`#define USE_FOG`:``,n.useFog&&n.fogExp2?`#define FOG_EXP2`:``,n.alphaToCoverage?`#define ALPHA_TO_COVERAGE`:``,n.map?`#define USE_MAP`:``,n.matcap?`#define USE_MATCAP`:``,n.envMap?`#define USE_ENVMAP`:``,n.envMap?`#define `+l:``,n.envMap?`#define `+u:``,n.envMap?`#define `+d:``,f?`#define CUBEUV_TEXEL_WIDTH `+f.texelWidth:``,f?`#define CUBEUV_TEXEL_HEIGHT `+f.texelHeight:``,f?`#define CUBEUV_MAX_MIP `+f.maxMip+`.0`:``,n.lightMap?`#define USE_LIGHTMAP`:``,n.aoMap?`#define USE_AOMAP`:``,n.bumpMap?`#define USE_BUMPMAP`:``,n.normalMap?`#define USE_NORMALMAP`:``,n.normalMapObjectSpace?`#define USE_NORMALMAP_OBJECTSPACE`:``,n.normalMapTangentSpace?`#define USE_NORMALMAP_TANGENTSPACE`:``,n.emissiveMap?`#define USE_EMISSIVEMAP`:``,n.anisotropy?`#define USE_ANISOTROPY`:``,n.anisotropyMap?`#define USE_ANISOTROPYMAP`:``,n.clearcoat?`#define USE_CLEARCOAT`:``,n.clearcoatMap?`#define USE_CLEARCOATMAP`:``,n.clearcoatRoughnessMap?`#define USE_CLEARCOAT_ROUGHNESSMAP`:``,n.clearcoatNormalMap?`#define USE_CLEARCOAT_NORMALMAP`:``,n.dispersion?`#define USE_DISPERSION`:``,n.iridescence?`#define USE_IRIDESCENCE`:``,n.iridescenceMap?`#define USE_IRIDESCENCEMAP`:``,n.iridescenceThicknessMap?`#define USE_IRIDESCENCE_THICKNESSMAP`:``,n.specularMap?`#define USE_SPECULARMAP`:``,n.specularColorMap?`#define USE_SPECULAR_COLORMAP`:``,n.specularIntensityMap?`#define USE_SPECULAR_INTENSITYMAP`:``,n.roughnessMap?`#define USE_ROUGHNESSMAP`:``,n.metalnessMap?`#define USE_METALNESSMAP`:``,n.alphaMap?`#define USE_ALPHAMAP`:``,n.alphaTest?`#define USE_ALPHATEST`:``,n.alphaHash?`#define USE_ALPHAHASH`:``,n.sheen?`#define USE_SHEEN`:``,n.sheenColorMap?`#define USE_SHEEN_COLORMAP`:``,n.sheenRoughnessMap?`#define USE_SHEEN_ROUGHNESSMAP`:``,n.transmission?`#define USE_TRANSMISSION`:``,n.transmissionMap?`#define USE_TRANSMISSIONMAP`:``,n.thicknessMap?`#define USE_THICKNESSMAP`:``,n.vertexTangents&&n.flatShading===!1?`#define USE_TANGENT`:``,n.vertexColors||n.instancingColor?`#define USE_COLOR`:``,n.vertexAlphas||n.batchingColor?`#define USE_COLOR_ALPHA`:``,n.vertexUv1s?`#define USE_UV1`:``,n.vertexUv2s?`#define USE_UV2`:``,n.vertexUv3s?`#define USE_UV3`:``,n.pointsUvs?`#define USE_POINTS_UV`:``,n.gradientMap?`#define USE_GRADIENTMAP`:``,n.flatShading?`#define FLAT_SHADED`:``,n.doubleSided?`#define DOUBLE_SIDED`:``,n.flipSided?`#define FLIP_SIDED`:``,n.shadowMapEnabled?`#define USE_SHADOWMAP`:``,n.shadowMapEnabled?`#define `+c:``,n.premultipliedAlpha?`#define PREMULTIPLIED_ALPHA`:``,n.numLightProbes>0?`#define USE_LIGHT_PROBES`:``,n.decodeVideoTexture?`#define DECODE_VIDEO_TEXTURE`:``,n.decodeVideoTextureEmissive?`#define DECODE_VIDEO_TEXTURE_EMISSIVE`:``,n.logarithmicDepthBuffer?`#define USE_LOGARITHMIC_DEPTH_BUFFER`:``,n.reversedDepthBuffer?`#define USE_REVERSED_DEPTH_BUFFER`:``,`uniform mat4 viewMatrix;`,`uniform vec3 cameraPosition;`,`uniform bool isOrthographic;`,n.toneMapping===0?``:`#define TONE_MAPPING`,n.toneMapping===0?``:ShaderChunk.tonemapping_pars_fragment,n.toneMapping===0?``:getToneMappingFunction(`toneMapping`,n.toneMapping),n.dithering?`#define DITHERING`:``,n.opaque?`#define OPAQUE`:``,ShaderChunk.colorspace_pars_fragment,getTexelEncodingFunction(`linearToOutputTexel`,n.outputColorSpace),getLuminanceFunction(),n.useDepthPacking?`#define DEPTH_PACKING `+n.depthPacking:``,` 3995`].filter(filterEmptyLine).join(` 3996`)),o=resolveIncludes(o),o=replaceLightNums(o,n),o=replaceClippingPlaneNums(o,n),s=resolveIncludes(s),s=replaceLightNums(s,n),s=replaceClippingPlaneNums(s,n),o=unrollLoops(o),s=unrollLoops(s),n.isRawShaderMaterial!==!0&&(b=`#version 300 es 3997`,_=[p,`#define attribute in`,`#define varying out`,`#define texture2D texture`].join(` 3998`)+` 3999`+_,y=[`#define varying in`,n.glslVersion===`300 es`?``:`layout(location = 0) out highp vec4 pc_fragColor;`,n.glslVersion===`300 es`?``:`#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(` 4000`)+` 4001`+y);let x=b+_+o,S=b+y+s,C=WebGLShader(i,i.VERTEX_SHADER,x),T=WebGLShader(i,i.FRAGMENT_SHADER,S);i.attachShader(g,C),i.attachShader(g,T),n.index0AttributeName===void 0?n.morphTargets===!0&&i.bindAttribLocation(g,0,`position`):i.bindAttribLocation(g,0,n.index0AttributeName),i.linkProgram(g);function E(t){if(e.debug.checkShaderErrors){let n=i.getProgramInfoLog(g)||``,r=i.getShaderInfoLog(C)||``,a=i.getShaderInfoLog(T)||``,o=n.trim(),s=r.trim(),c=a.trim(),l=!0,u=!0;if(i.getProgramParameter(g,i.LINK_STATUS)===!1)if(l=!1,typeof e.debug.onShaderError==`function`)e.debug.onShaderError(i,g,C,T);else{let e=getShaderErrors(i,C,`vertex`),n=getShaderErrors(i,T,`fragment`);error(`THREE.WebGLProgram: Shader Error `+i.getError()+` - VALIDATE_STATUS `+i.getProgramParameter(g,i.VALIDATE_STATUS)+` 4002 4003Material Name: `+t.name+` 4004Material Type: `+t.type+` 4005 4006Program Info Log: `+o+` 4007`+e+` 4008`+n)}else o===``?(s===``||c===``)&&(u=!1):warn(`WebGLProgram: Program Info Log:`,o);u&&(t.diagnostics={runnable:l,programLog:o,vertexShader:{log:s,prefix:_},fragmentShader:{log:c,prefix:y}})}i.deleteShader(C),i.deleteShader(T),D=new WebGLUniforms(i,g),O=fetchAttributeLocations(i,g)}let D;this.getUniforms=function(){return D===void 0&&E(this),D};let O;this.getAttributes=function(){return O===void 0&&E(this),O};let k=n.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return k===!1&&(k=i.getProgramParameter(g,COMPLETION_STATUS_KHR)),k},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(g),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=programIdCount++,this.cacheKey=t,this.usedTimes=1,this.program=g,this.vertexShader=C,this.fragmentShader=T,this}var _id=0,WebGLShaderCache=class{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){let t=e.vertexShader,n=e.fragmentShader,r=this._getShaderStage(t),i=this._getShaderStage(n),a=this._getShaderCacheForMaterial(e);return a.has(r)===!1&&(a.add(r),r.usedTimes++),a.has(i)===!1&&(a.add(i),i.usedTimes++),this}remove(e){let t=this.materialCache.get(e);for(let e of t)e.usedTimes--,e.usedTimes===0&&this.shaderCache.delete(e.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){let t=this.materialCache,n=t.get(e);return n===void 0&&(n=new Set,t.set(e,n)),n}_getShaderStage(e){let t=this.shaderCache,n=t.get(e);return n===void 0&&(n=new WebGLShaderStage(e),t.set(e,n)),n}},WebGLShaderStage=class{constructor(e){this.id=_id++,this.code=e,this.usedTimes=0}};function WebGLPrograms(e,t,n,r,i,a){let o=new Layers,s=new WebGLShaderCache,c=new Set,l=[],u=new Map,d=r.logarithmicDepthBuffer,f=r.precision,p={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 m(e){return c.add(e),e===0?`uv`:`uv${e}`}function g(i,o,l,u,g){let _=u.fog,y=g.geometry,b=i.isMeshStandardMaterial||i.isMeshLambertMaterial||i.isMeshPhongMaterial?u.environment:null,x=i.isMeshStandardMaterial||i.isMeshLambertMaterial&&!i.envMap||i.isMeshPhongMaterial&&!i.envMap,S=t.get(i.envMap||b,x),C=S&&S.mapping===306?S.image.height:null,T=p[i.type];i.precision!==null&&(f=r.getMaxPrecision(i.precision),f!==i.precision&&warn(`WebGLProgram.getParameters:`,i.precision,`not supported, using`,f,`instead.`));let E=y.morphAttributes.position||y.morphAttributes.normal||y.morphAttributes.color,D=E===void 0?0:E.length,O=0;y.morphAttributes.position!==void 0&&(O=1),y.morphAttributes.normal!==void 0&&(O=2),y.morphAttributes.color!==void 0&&(O=3);let k,A,j,M;if(T){let e=ShaderLib[T];k=e.vertexShader,A=e.fragmentShader}else k=i.vertexShader,A=i.fragmentShader,s.update(i),j=s.getVertexShaderID(i),M=s.getFragmentShaderID(i);let N=e.getRenderTarget(),P=e.state.buffers.depth.getReversed(),F=g.isInstancedMesh===!0,I=g.isBatchedMesh===!0,L=!!i.map,R=!!i.matcap,z=!!S,B=!!i.aoMap,V=!!i.lightMap,ee=!!i.bumpMap,H=!!i.normalMap,te=!!i.displacementMap,ne=!!i.emissiveMap,U=!!i.metalnessMap,re=!!i.roughnessMap,ie=i.anisotropy>0,ae=i.clearcoat>0,W=i.dispersion>0,oe=i.iridescence>0,K=i.sheen>0,q=i.transmission>0,se=ie&&!!i.anisotropyMap,ce=ae&&!!i.clearcoatMap,J=ae&&!!i.clearcoatNormalMap,le=ae&&!!i.clearcoatRoughnessMap,Y=oe&&!!i.iridescenceMap,ue=oe&&!!i.iridescenceThicknessMap,X=K&&!!i.sheenColorMap,de=K&&!!i.sheenRoughnessMap,Z=!!i.specularMap,Q=!!i.specularColorMap,fe=!!i.specularIntensityMap,$=q&&!!i.transmissionMap,pe=q&&!!i.thicknessMap,me=!!i.gradientMap,he=!!i.alphaMap,ge=i.alphaTest>0,_e=!!i.alphaHash,ve=!!i.extensions,ye=0;i.toneMapped&&(N===null||N.isXRRenderTarget===!0)&&(ye=e.toneMapping);let be={shaderID:T,shaderType:i.type,shaderName:i.name,vertexShader:k,fragmentShader:A,defines:i.defines,customVertexShaderID:j,customFragmentShaderID:M,isRawShaderMaterial:i.isRawShaderMaterial===!0,glslVersion:i.glslVersion,precision:f,batching:I,batchingColor:I&&g._colorsTexture!==null,instancing:F,instancingColor:F&&g.instanceColor!==null,instancingMorph:F&&g.morphTexture!==null,outputColorSpace:N===null?e.outputColorSpace:N.isXRRenderTarget===!0?N.texture.colorSpace:LinearSRGBColorSpace,alphaToCoverage:!!i.alphaToCoverage,map:L,matcap:R,envMap:z,envMapMode:z&&S.mapping,envMapCubeUVHeight:C,aoMap:B,lightMap:V,bumpMap:ee,normalMap:H,displacementMap:te,emissiveMap:ne,normalMapObjectSpace:H&&i.normalMapType===1,normalMapTangentSpace:H&&i.normalMapType===0,metalnessMap:U,roughnessMap:re,anisotropy:ie,anisotropyMap:se,clearcoat:ae,clearcoatMap:ce,clearcoatNormalMap:J,clearcoatRoughnessMap:le,dispersion:W,iridescence:oe,iridescenceMap:Y,iridescenceThicknessMap:ue,sheen:K,sheenColorMap:X,sheenRoughnessMap:de,specularMap:Z,specularColorMap:Q,specularIntensityMap:fe,transmission:q,transmissionMap:$,thicknessMap:pe,gradientMap:me,opaque:i.transparent===!1&&i.blending===1&&i.alphaToCoverage===!1,alphaMap:he,alphaTest:ge,alphaHash:_e,combine:i.combine,mapUv:L&&m(i.map.channel),aoMapUv:B&&m(i.aoMap.channel),lightMapUv:V&&m(i.lightMap.channel),bumpMapUv:ee&&m(i.bumpMap.channel),normalMapUv:H&&m(i.normalMap.channel),displacementMapUv:te&&m(i.displacementMap.channel),emissiveMapUv:ne&&m(i.emissiveMap.channel),metalnessMapUv:U&&m(i.metalnessMap.channel),roughnessMapUv:re&&m(i.roughnessMap.channel),anisotropyMapUv:se&&m(i.anisotropyMap.channel),clearcoatMapUv:ce&&m(i.clearcoatMap.channel),clearcoatNormalMapUv:J&&m(i.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:le&&m(i.clearcoatRoughnessMap.channel),iridescenceMapUv:Y&&m(i.iridescenceMap.channel),iridescenceThicknessMapUv:ue&&m(i.iridescenceThicknessMap.channel),sheenColorMapUv:X&&m(i.sheenColorMap.channel),sheenRoughnessMapUv:de&&m(i.sheenRoughnessMap.channel),specularMapUv:Z&&m(i.specularMap.channel),specularColorMapUv:Q&&m(i.specularColorMap.channel),specularIntensityMapUv:fe&&m(i.specularIntensityMap.channel),transmissionMapUv:$&&m(i.transmissionMap.channel),thicknessMapUv:pe&&m(i.thicknessMap.channel),alphaMapUv:he&&m(i.alphaMap.channel),vertexTangents:!!y.attributes.tangent&&(H||ie),vertexColors:i.vertexColors,vertexAlphas:i.vertexColors===!0&&!!y.attributes.color&&y.attributes.color.itemSize===4,pointsUvs:g.isPoints===!0&&!!y.attributes.uv&&(L||he),fog:!!_,useFog:i.fog===!0,fogExp2:!!_&&_.isFogExp2,flatShading:i.wireframe===!1&&(i.flatShading===!0||y.attributes.normal===void 0&&H===!1&&(i.isMeshLambertMaterial||i.isMeshPhongMaterial||i.isMeshStandardMaterial||i.isMeshPhysicalMaterial)),sizeAttenuation:i.sizeAttenuation===!0,logarithmicDepthBuffer:d,reversedDepthBuffer:P,skinning:g.isSkinnedMesh===!0,morphTargets:y.morphAttributes.position!==void 0,morphNormals:y.morphAttributes.normal!==void 0,morphColors:y.morphAttributes.color!==void 0,morphTargetsCount:D,morphTextureStride:O,numDirLights:o.directional.length,numPointLights:o.point.length,numSpotLights:o.spot.length,numSpotLightMaps:o.spotLightMap.length,numRectAreaLights:o.rectArea.length,numHemiLights:o.hemi.length,numDirLightShadows:o.directionalShadowMap.length,numPointLightShadows:o.pointShadowMap.length,numSpotLightShadows:o.spotShadowMap.length,numSpotLightShadowsWithMaps:o.numSpotLightShadowsWithMaps,numLightProbes:o.numLightProbes,numClippingPlanes:a.numPlanes,numClipIntersection:a.numIntersection,dithering:i.dithering,shadowMapEnabled:e.shadowMap.enabled&&l.length>0,shadowMapType:e.shadowMap.type,toneMapping:ye,decodeVideoTexture:L&&i.map.isVideoTexture===!0&&ColorManagement.getTransfer(i.map.colorSpace)===`srgb`,decodeVideoTextureEmissive:ne&&i.emissiveMap.isVideoTexture===!0&&ColorManagement.getTransfer(i.emissiveMap.colorSpace)===`srgb`,premultipliedAlpha:i.premultipliedAlpha,doubleSided:i.side===2,flipSided:i.side===1,useDepthPacking:i.depthPacking>=0,depthPacking:i.depthPacking||0,index0AttributeName:i.index0AttributeName,extensionClipCullDistance:ve&&i.extensions.clipCullDistance===!0&&n.has(`WEBGL_clip_cull_distance`),extensionMultiDraw:(ve&&i.extensions.multiDraw===!0||I)&&n.has(`WEBGL_multi_draw`),rendererExtensionParallelShaderCompile:n.has(`KHR_parallel_shader_compile`),customProgramCacheKey:i.customProgramCacheKey()};return be.vertexUv1s=c.has(1),be.vertexUv2s=c.has(2),be.vertexUv3s=c.has(3),c.clear(),be}function _(t){let n=[];if(t.shaderID?n.push(t.shaderID):(n.push(t.customVertexShaderID),n.push(t.customFragmentShaderID)),t.defines!==void 0)for(let e in t.defines)n.push(e),n.push(t.defines[e]);return t.isRawShaderMaterial===!1&&(y(n,t),b(n,t),n.push(e.outputColorSpace)),n.push(t.customProgramCacheKey),n.join()}function y(e,t){e.push(t.precision),e.push(t.outputColorSpace),e.push(t.envMapMode),e.push(t.envMapCubeUVHeight),e.push(t.mapUv),e.push(t.alphaMapUv),e.push(t.lightMapUv),e.push(t.aoMapUv),e.push(t.bumpMapUv),e.push(t.normalMapUv),e.push(t.displacementMapUv),e.push(t.emissiveMapUv),e.push(t.metalnessMapUv),e.push(t.roughnessMapUv),e.push(t.anisotropyMapUv),e.push(t.clearcoatMapUv),e.push(t.clearcoatNormalMapUv),e.push(t.clearcoatRoughnessMapUv),e.push(t.iridescenceMapUv),e.push(t.iridescenceThicknessMapUv),e.push(t.sheenColorMapUv),e.push(t.sheenRoughnessMapUv),e.push(t.specularMapUv),e.push(t.specularColorMapUv),e.push(t.specularIntensityMapUv),e.push(t.transmissionMapUv),e.push(t.thicknessMapUv),e.push(t.combine),e.push(t.fogExp2),e.push(t.sizeAttenuation),e.push(t.morphTargetsCount),e.push(t.morphAttributeCount),e.push(t.numDirLights),e.push(t.numPointLights),e.push(t.numSpotLights),e.push(t.numSpotLightMaps),e.push(t.numHemiLights),e.push(t.numRectAreaLights),e.push(t.numDirLightShadows),e.push(t.numPointLightShadows),e.push(t.numSpotLightShadows),e.push(t.numSpotLightShadowsWithMaps),e.push(t.numLightProbes),e.push(t.shadowMapType),e.push(t.toneMapping),e.push(t.numClippingPlanes),e.push(t.numClipIntersection),e.push(t.depthPacking)}function b(e,t){o.disableAll(),t.instancing&&o.enable(0),t.instancingColor&&o.enable(1),t.instancingMorph&&o.enable(2),t.matcap&&o.enable(3),t.envMap&&o.enable(4),t.normalMapObjectSpace&&o.enable(5),t.normalMapTangentSpace&&o.enable(6),t.clearcoat&&o.enable(7),t.iridescence&&o.enable(8),t.alphaTest&&o.enable(9),t.vertexColors&&o.enable(10),t.vertexAlphas&&o.enable(11),t.vertexUv1s&&o.enable(12),t.vertexUv2s&&o.enable(13),t.vertexUv3s&&o.enable(14),t.vertexTangents&&o.enable(15),t.anisotropy&&o.enable(16),t.alphaHash&&o.enable(17),t.batching&&o.enable(18),t.dispersion&&o.enable(19),t.batchingColor&&o.enable(20),t.gradientMap&&o.enable(21),e.push(o.mask),o.disableAll(),t.fog&&o.enable(0),t.useFog&&o.enable(1),t.flatShading&&o.enable(2),t.logarithmicDepthBuffer&&o.enable(3),t.reversedDepthBuffer&&o.enable(4),t.skinning&&o.enable(5),t.morphTargets&&o.enable(6),t.morphNormals&&o.enable(7),t.morphColors&&o.enable(8),t.premultipliedAlpha&&o.enable(9),t.shadowMapEnabled&&o.enable(10),t.doubleSided&&o.enable(11),t.flipSided&&o.enable(12),t.useDepthPacking&&o.enable(13),t.dithering&&o.enable(14),t.transmission&&o.enable(15),t.sheen&&o.enable(16),t.opaque&&o.enable(17),t.pointsUvs&&o.enable(18),t.decodeVideoTexture&&o.enable(19),t.decodeVideoTextureEmissive&&o.enable(20),t.alphaToCoverage&&o.enable(21),e.push(o.mask)}function x(e){let t=p[e.type],n;if(t){let e=ShaderLib[t];n=UniformsUtils.clone(e.uniforms)}else n=e.uniforms;return n}function S(t,n){let r=u.get(n);return r===void 0?(r=new WebGLProgram(e,n,t,i),l.push(r),u.set(n,r)):++r.usedTimes,r}function C(e){if(--e.usedTimes===0){let t=l.indexOf(e);l[t]=l[l.length-1],l.pop(),u.delete(e.cacheKey),e.destroy()}}function T(e){s.remove(e)}function E(){s.dispose()}return{getParameters:g,getProgramCacheKey:_,getUniforms:x,acquireProgram:S,releaseProgram:C,releaseShaderCache:T,programs:l,dispose:E}}function WebGLProperties(){let e=new WeakMap;function t(t){return e.has(t)}function n(t){let n=e.get(t);return n===void 0&&(n={},e.set(t,n)),n}function r(t){e.delete(t)}function i(t,n,r){e.get(t)[n]=r}function a(){e=new WeakMap}return{has:t,get:n,remove:r,update:i,dispose:a}}function painterSortStable(e,t){return e.groupOrder===t.groupOrder?e.renderOrder===t.renderOrder?e.material.id===t.material.id?e.materialVariant===t.materialVariant?e.z===t.z?e.id-t.id:e.z-t.z:e.materialVariant-t.materialVariant:e.material.id-t.material.id:e.renderOrder-t.renderOrder:e.groupOrder-t.groupOrder}function reversePainterSortStable(e,t){return e.groupOrder===t.groupOrder?e.renderOrder===t.renderOrder?e.z===t.z?e.id-t.id:t.z-e.z:e.renderOrder-t.renderOrder:e.groupOrder-t.groupOrder}function WebGLRenderList(){let e=[],t=0,n=[],r=[],i=[];function a(){t=0,n.length=0,r.length=0,i.length=0}function o(e){let t=0;return e.isInstancedMesh&&(t+=2),e.isSkinnedMesh&&(t+=1),t}function s(n,r,i,a,s,c){let l=e[t];return l===void 0?(l={id:n.id,object:n,geometry:r,material:i,materialVariant:o(n),groupOrder:a,renderOrder:n.renderOrder,z:s,group:c},e[t]=l):(l.id=n.id,l.object=n,l.geometry=r,l.material=i,l.materialVariant=o(n),l.groupOrder=a,l.renderOrder=n.renderOrder,l.z=s,l.group=c),t++,l}function c(e,t,a,o,c,l){let u=s(e,t,a,o,c,l);a.transmission>0?r.push(u):a.transparent===!0?i.push(u):n.push(u)}function l(e,t,a,o,c,l){let u=s(e,t,a,o,c,l);a.transmission>0?r.unshift(u):a.transparent===!0?i.unshift(u):n.unshift(u)}function u(e,t){n.length>1&&n.sort(e||painterSortStable),r.length>1&&r.sort(t||reversePainterSortStable),i.length>1&&i.sort(t||reversePainterSortStable)}function d(){for(let n=t,r=e.length;n<r;n++){let t=e[n];if(t.id===null)break;t.id=null,t.object=null,t.geometry=null,t.material=null,t.group=null}}return{opaque:n,transmissive:r,transparent:i,init:a,push:c,unshift:l,finish:d,sort:u}}function WebGLRenderLists(){let e=new WeakMap;function t(t,n){let r=e.get(t),i;return r===void 0?(i=new WebGLRenderList,e.set(t,[i])):n>=r.length?(i=new WebGLRenderList,r.push(i)):i=r[n],i}function n(){e=new WeakMap}return{get:t,dispose:n}}function UniformsCache(){let e={};return{get:function(t){if(e[t.id]!==void 0)return e[t.id];let n;switch(t.type){case`DirectionalLight`:n={direction:new Vector3,color:new Color};break;case`SpotLight`:n={position:new Vector3,direction:new Vector3,color:new Color,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case`PointLight`:n={position:new Vector3,color:new Color,distance:0,decay:0};break;case`HemisphereLight`:n={direction:new Vector3,skyColor:new Color,groundColor:new Color};break;case`RectAreaLight`:n={color:new Color,position:new Vector3,halfWidth:new Vector3,halfHeight:new Vector3};break}return e[t.id]=n,n}}}function ShadowUniformsCache(){let e={};return{get:function(t){if(e[t.id]!==void 0)return e[t.id];let n;switch(t.type){case`DirectionalLight`:n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Vector2};break;case`SpotLight`:n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Vector2};break;case`PointLight`:n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Vector2,shadowCameraNear:1,shadowCameraFar:1e3};break}return e[t.id]=n,n}}}var nextVersion=0;function shadowCastingAndTexturingLightsFirst(e,t){return(t.castShadow?2:0)-(e.castShadow?2:0)+ +!!t.map-!!e.map}function WebGLLights(e){let t=new UniformsCache,n=ShadowUniformsCache(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let e=0;e<9;e++)r.probe.push(new Vector3);let i=new Vector3,a=new Matrix4,o=new Matrix4;function s(i){let a=0,o=0,s=0;for(let e=0;e<9;e++)r.probe[e].set(0,0,0);let c=0,l=0,u=0,d=0,f=0,p=0,m=0,g=0,_=0,y=0,b=0;i.sort(shadowCastingAndTexturingLightsFirst);for(let e=0,x=i.length;e<x;e++){let x=i[e],S=x.color,C=x.intensity,T=x.distance,E=null;if(x.shadow&&x.shadow.map&&(E=x.shadow.map.texture.format===1030?x.shadow.map.texture:x.shadow.map.depthTexture||x.shadow.map.texture),x.isAmbientLight)a+=S.r*C,o+=S.g*C,s+=S.b*C;else if(x.isLightProbe){for(let e=0;e<9;e++)r.probe[e].addScaledVector(x.sh.coefficients[e],C);b++}else if(x.isDirectionalLight){let e=t.get(x);if(e.color.copy(x.color).multiplyScalar(x.intensity),x.castShadow){let e=x.shadow,t=n.get(x);t.shadowIntensity=e.intensity,t.shadowBias=e.bias,t.shadowNormalBias=e.normalBias,t.shadowRadius=e.radius,t.shadowMapSize=e.mapSize,r.directionalShadow[c]=t,r.directionalShadowMap[c]=E,r.directionalShadowMatrix[c]=x.shadow.matrix,p++}r.directional[c]=e,c++}
vendor: 4,450 bytes, lines 4008-4013
4008else if(x.isSpotLight){let e=t.get(x);e.position.setFromMatrixPosition(x.matrixWorld),e.color.copy(S).multiplyScalar(C),e.distance=T,e.coneCos=Math.cos(x.angle),e.penumbraCos=Math.cos(x.angle*(1-x.penumbra)),e.decay=x.decay,r.spot[u]=e;let i=x.shadow;if(x.map&&(r.spotLightMap[_]=x.map,_++,i.updateMatrices(x),x.castShadow&&y++),r.spotLightMatrix[u]=i.matrix,x.castShadow){let e=n.get(x);e.shadowIntensity=i.intensity,e.shadowBias=i.bias,e.shadowNormalBias=i.normalBias,e.shadowRadius=i.radius,e.shadowMapSize=i.mapSize,r.spotShadow[u]=e,r.spotShadowMap[u]=E,g++}u++}else if(x.isRectAreaLight){let e=t.get(x);e.color.copy(S).multiplyScalar(C),e.halfWidth.set(x.width*.5,0,0),e.halfHeight.set(0,x.height*.5,0),r.rectArea[d]=e,d++}else if(x.isPointLight){let e=t.get(x);if(e.color.copy(x.color).multiplyScalar(x.intensity),e.distance=x.distance,e.decay=x.decay,x.castShadow){let e=x.shadow,t=n.get(x);t.shadowIntensity=e.intensity,t.shadowBias=e.bias,t.shadowNormalBias=e.normalBias,t.shadowRadius=e.radius,t.shadowMapSize=e.mapSize,t.shadowCameraNear=e.camera.near,t.shadowCameraFar=e.camera.far,r.pointShadow[l]=t,r.pointShadowMap[l]=E,r.pointShadowMatrix[l]=x.shadow.matrix,m++}r.point[l]=e,l++}else if(x.isHemisphereLight){let e=t.get(x);e.skyColor.copy(x.color).multiplyScalar(C),e.groundColor.copy(x.groundColor).multiplyScalar(C),r.hemi[f]=e,f++}}d>0&&(e.has(`OES_texture_float_linear`)===!0?(r.rectAreaLTC1=UniformsLib.LTC_FLOAT_1,r.rectAreaLTC2=UniformsLib.LTC_FLOAT_2):(r.rectAreaLTC1=UniformsLib.LTC_HALF_1,r.rectAreaLTC2=UniformsLib.LTC_HALF_2)),r.ambient[0]=a,r.ambient[1]=o,r.ambient[2]=s;let x=r.hash;(x.directionalLength!==c||x.pointLength!==l||x.spotLength!==u||x.rectAreaLength!==d||x.hemiLength!==f||x.numDirectionalShadows!==p||x.numPointShadows!==m||x.numSpotShadows!==g||x.numSpotMaps!==_||x.numLightProbes!==b)&&(r.directional.length=c,r.spot.length=u,r.rectArea.length=d,r.point.length=l,r.hemi.length=f,r.directionalShadow.length=p,r.directionalShadowMap.length=p,r.pointShadow.length=m,r.pointShadowMap.length=m,r.spotShadow.length=g,r.spotShadowMap.length=g,r.directionalShadowMatrix.length=p,r.pointShadowMatrix.length=m,r.spotLightMatrix.length=g+_-y,r.spotLightMap.length=_,r.numSpotLightShadowsWithMaps=y,r.numLightProbes=b,x.directionalLength=c,x.pointLength=l,x.spotLength=u,x.rectAreaLength=d,x.hemiLength=f,x.numDirectionalShadows=p,x.numPointShadows=m,x.numSpotShadows=g,x.numSpotMaps=_,x.numLightProbes=b,r.version=nextVersion++)}function c(e,t){let n=0,s=0,c=0,l=0,u=0,d=t.matrixWorldInverse;for(let t=0,f=e.length;t<f;t++){let f=e[t];if(f.isDirectionalLight){let e=r.directional[n];e.direction.setFromMatrixPosition(f.matrixWorld),i.setFromMatrixPosition(f.target.matrixWorld),e.direction.sub(i),e.direction.transformDirection(d),n++}else if(f.isSpotLight){let e=r.spot[c];e.position.setFromMatrixPosition(f.matrixWorld),e.position.applyMatrix4(d),e.direction.setFromMatrixPosition(f.matrixWorld),i.setFromMatrixPosition(f.target.matrixWorld),e.direction.sub(i),e.direction.transformDirection(d),c++}else if(f.isRectAreaLight){let e=r.rectArea[l];e.position.setFromMatrixPosition(f.matrixWorld),e.position.applyMatrix4(d),o.identity(),a.copy(f.matrixWorld),a.premultiply(d),o.extractRotation(a),e.halfWidth.set(f.width*.5,0,0),e.halfHeight.set(0,f.height*.5,0),e.halfWidth.applyMatrix4(o),e.halfHeight.applyMatrix4(o),l++}else if(f.isPointLight){let e=r.point[s];e.position.setFromMatrixPosition(f.matrixWorld),e.position.applyMatrix4(d),s++}else if(f.isHemisphereLight){let e=r.hemi[u];e.direction.setFromMatrixPosition(f.matrixWorld),e.direction.transformDirection(d),u++}}}return{setup:s,setupView:c,state:r}}function WebGLRenderState(e){let t=new WebGLLights(e),n=[],r=[];function i(e){l.camera=e,n.length=0,r.length=0}function a(e){n.push(e)}function o(e){r.push(e)}function s(){t.setup(n)}function c(e){t.setupView(n,e)}let l={lightsArray:n,shadowsArray:r,camera:null,lights:t,transmissionRenderTarget:{}};return{init:i,state:l,setupLights:s,setupLightsView:c,pushLight:a,pushShadow:o}}function WebGLRenderStates(e){let t=new WeakMap;function n(n,r=0){let i=t.get(n),a;return i===void 0?(a=new WebGLRenderState(e),t.set(n,[a])):r>=i.length?(a=new WebGLRenderState(e),i.push(a)):a=i[r],a}function r(){t=new WeakMap}return{get:n,dispose:r}}var vertex=`void main() { 4009 gl_Position = vec4( position, 1.0 ); 4010}`,fragment=`uniform sampler2D shadow_pass; 4011uniform vec2 resolution; 4012uniform float radius; 4013void main() {
4014 const float samples = float( VSM_SAMPLES ); 4015 float mean = 0.0; 4016 float squared_mean = 0.0; 4017 float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); 4018 float uvStart = samples <= 1.0 ? 0.0 : - 1.0; 4019 for ( float i = 0.0; i < samples; i ++ ) { 4020 float uvOffset = uvStart + i * uvStride; 4021 #ifdef HORIZONTAL_PASS 4022 vec2 distribution = texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ).rg; 4023 mean += distribution.x; 4024 squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; 4025 #else 4026 float depth = texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ).r; 4027 mean += depth; 4028 squared_mean += depth * depth; 4029 #endif 4030 } 4031 mean = mean / samples; 4032 squared_mean = squared_mean / samples; 4033 float std_dev = sqrt( max( 0.0, squared_mean - mean * mean ) ); 4034 gl_FragColor = vec4( mean, std_dev, 0.0, 1.0 ); 4035}`,_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)],_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)],_projScreenMatrix=new Matrix4,_lightPositionWorld=new Vector3,_lookTarget=new Vector3;function WebGLShadowMap(e,t,n){let r=new Frustum,i=new Vector2,a=new Vector2,o=new Vector4,s=new MeshDepthMaterial,c=new MeshDistanceMaterial,l={},u=n.maxTextureSize,d={0:1,1:0,2:2},f=new ShaderMaterial({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Vector2},radius:{value:4}},vertexShader:vertex,fragmentShader:fragment}),p=f.clone();p.defines.HORIZONTAL_PASS=1;let m=new BufferGeometry;m.setAttribute(`position`,new BufferAttribute(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let g=new Mesh(m,f),_=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1;let y=this.type;this.render=function(t,n,s){if(_.enabled===!1||_.autoUpdate===!1&&_.needsUpdate===!1||t.length===0)return;this.type===2&&(warn(`WebGLShadowMap: PCFSoftShadowMap has been deprecated. Using PCFShadowMap instead.`),this.type=1);let c=e.getRenderTarget(),l=e.getActiveCubeFace(),d=e.getActiveMipmapLevel(),f=e.state;f.setBlending(0),f.buffers.depth.getReversed()===!0?f.buffers.color.setClear(0,0,0,0):f.buffers.color.setClear(1,1,1,1),f.buffers.depth.setTest(!0),f.setScissorTest(!1);let p=y!==this.type;p&&n.traverse(function(e){e.material&&(Array.isArray(e.material)?e.material.forEach(e=>e.needsUpdate=!0):e.material.needsUpdate=!0)});for(let c=0,l=t.length;c<l;c++){let l=t[c],d=l.shadow;if(d===void 0){warn(`WebGLShadowMap:`,l,`has no shadow.`);continue}if(d.autoUpdate===!1&&d.needsUpdate===!1)continue;i.copy(d.mapSize);let m=d.getFrameExtents();i.multiply(m),a.copy(d.mapSize),(i.x>u||i.y>u)&&(i.x>u&&(a.x=Math.floor(u/m.x),i.x=a.x*m.x,d.mapSize.x=a.x),i.y>u&&(a.y=Math.floor(u/m.y),i.y=a.y*m.y,d.mapSize.y=a.y));let g=e.state.buffers.depth.getReversed();if(d.camera._reversedDepth=g,d.map===null||p===!0){if(d.map!==null&&(d.map.depthTexture!==null&&(d.map.depthTexture.dispose(),d.map.depthTexture=null),d.map.dispose()),this.type===3){if(l.isPointLight){warn(`WebGLShadowMap: VSM shadow maps are not supported for PointLights. Use PCF or BasicShadowMap instead.`);continue}d.map=new WebGLRenderTarget(i.x,i.y,{format:RGFormat,type:HalfFloatType,minFilter:LinearFilter,magFilter:LinearFilter,generateMipmaps:!1}),d.map.texture.name=l.name+`.shadowMap`,d.map.depthTexture=new DepthTexture(i.x,i.y,FloatType),d.map.depthTexture.name=l.name+`.shadowMapDepth`,d.map.depthTexture.format=DepthFormat,d.map.depthTexture.compareFunction=null,d.map.depthTexture.minFilter=NearestFilter,d.map.depthTexture.magFilter=NearestFilter}else l.isPointLight?(d.map=new WebGLCubeRenderTarget(i.x),d.map.depthTexture=new CubeDepthTexture(i.x,UnsignedIntType)):(d.map=new WebGLRenderTarget(i.x,i.y),d.map.depthTexture=new DepthTexture(i.x,i.y,UnsignedIntType)),d.map.depthTexture.name=l.name+`.shadowMap`,d.map.depthTexture.format=DepthFormat,this.type===1?(d.map.depthTexture.compareFunction=g?518:515,d.map.depthTexture.minFilter=LinearFilter,d.map.depthTexture.magFilter=LinearFilter):(d.map.depthTexture.compareFunction=null,d.map.depthTexture.minFilter=NearestFilter,d.map.depthTexture.magFilter=NearestFilter);d.camera.updateProjectionMatrix()}
vendor: 34,081 bytes, line 4035
4035let _=d.map.isWebGLCubeRenderTarget?6:1;for(let t=0;t<_;t++){if(d.map.isWebGLCubeRenderTarget)e.setRenderTarget(d.map,t),e.clear();else{t===0&&(e.setRenderTarget(d.map),e.clear());let n=d.getViewport(t);o.set(a.x*n.x,a.y*n.y,a.x*n.z,a.y*n.w),f.viewport(o)}if(l.isPointLight){let e=d.camera,n=d.matrix,r=l.distance||e.far;r!==e.far&&(e.far=r,e.updateProjectionMatrix()),_lightPositionWorld.setFromMatrixPosition(l.matrixWorld),e.position.copy(_lightPositionWorld),_lookTarget.copy(e.position),_lookTarget.add(_cubeDirections[t]),e.up.copy(_cubeUps[t]),e.lookAt(_lookTarget),e.updateMatrixWorld(),n.makeTranslation(-_lightPositionWorld.x,-_lightPositionWorld.y,-_lightPositionWorld.z),_projScreenMatrix.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),d._frustum.setFromProjectionMatrix(_projScreenMatrix,e.coordinateSystem,e.reversedDepth)}else d.updateMatrices(l);r=d.getFrustum(),S(n,s,d.camera,l,this.type)}d.isPointLightShadow!==!0&&this.type===3&&b(d,s),d.needsUpdate=!1}y=this.type,_.needsUpdate=!1,e.setRenderTarget(c,l,d)};function b(n,r){let a=t.update(g);f.defines.VSM_SAMPLES!==n.blurSamples&&(f.defines.VSM_SAMPLES=n.blurSamples,p.defines.VSM_SAMPLES=n.blurSamples,f.needsUpdate=!0,p.needsUpdate=!0),n.mapPass===null&&(n.mapPass=new WebGLRenderTarget(i.x,i.y,{format:RGFormat,type:HalfFloatType})),f.uniforms.shadow_pass.value=n.map.depthTexture,f.uniforms.resolution.value=n.mapSize,f.uniforms.radius.value=n.radius,e.setRenderTarget(n.mapPass),e.clear(),e.renderBufferDirect(r,null,a,f,g,null),p.uniforms.shadow_pass.value=n.mapPass.texture,p.uniforms.resolution.value=n.mapSize,p.uniforms.radius.value=n.radius,e.setRenderTarget(n.map),e.clear(),e.renderBufferDirect(r,null,a,p,g,null)}function x(t,n,r,i){let a=null,o=r.isPointLight===!0?t.customDistanceMaterial:t.customDepthMaterial;if(o!==void 0)a=o;else if(a=r.isPointLight===!0?c:s,e.localClippingEnabled&&n.clipShadows===!0&&Array.isArray(n.clippingPlanes)&&n.clippingPlanes.length!==0||n.displacementMap&&n.displacementScale!==0||n.alphaMap&&n.alphaTest>0||n.map&&n.alphaTest>0||n.alphaToCoverage===!0){let e=a.uuid,t=n.uuid,r=l[e];r===void 0&&(r={},l[e]=r);let i=r[t];i===void 0&&(i=a.clone(),r[t]=i,n.addEventListener(`dispose`,C)),a=i}if(a.visible=n.visible,a.wireframe=n.wireframe,i===3?a.side=n.shadowSide===null?n.side:n.shadowSide:a.side=n.shadowSide===null?d[n.side]:n.shadowSide,a.alphaMap=n.alphaMap,a.alphaTest=n.alphaToCoverage===!0?.5:n.alphaTest,a.map=n.map,a.clipShadows=n.clipShadows,a.clippingPlanes=n.clippingPlanes,a.clipIntersection=n.clipIntersection,a.displacementMap=n.displacementMap,a.displacementScale=n.displacementScale,a.displacementBias=n.displacementBias,a.wireframeLinewidth=n.wireframeLinewidth,a.linewidth=n.linewidth,r.isPointLight===!0&&a.isMeshDistanceMaterial===!0){let t=e.properties.get(a);t.light=r}return a}function S(n,i,a,o,s){if(n.visible===!1)return;if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&s===3)&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(a.matrixWorldInverse,n.matrixWorld);let r=t.update(n),c=n.material;if(Array.isArray(c)){let t=r.groups;for(let l=0,u=t.length;l<u;l++){let u=t[l],d=c[u.materialIndex];if(d&&d.visible){let t=x(n,d,o,s);n.onBeforeShadow(e,n,i,a,r,t,u),e.renderBufferDirect(a,null,r,t,n,u),n.onAfterShadow(e,n,i,a,r,t,u)}}}else if(c.visible){let t=x(n,c,o,s);n.onBeforeShadow(e,n,i,a,r,t,null),e.renderBufferDirect(a,null,r,t,n,null),n.onAfterShadow(e,n,i,a,r,t,null)}}let c=n.children;for(let e=0,t=c.length;e<t;e++)S(c[e],i,a,o,s)}function C(e){e.target.removeEventListener(`dispose`,C);for(let t in l){let n=l[t],r=e.target.uuid;r in n&&(n[r].dispose(),delete n[r])}}}function WebGLState(e,t){function n(){let t=!1,n=new Vector4,r=null,i=new Vector4(0,0,0,0);return{setMask:function(n){r!==n&&!t&&(e.colorMask(n,n,n,n),r=n)},setLocked:function(e){t=e},setClear:function(t,r,a,o,s){s===!0&&(t*=o,r*=o,a*=o),n.set(t,r,a,o),i.equals(n)===!1&&(e.clearColor(t,r,a,o),i.copy(n))},reset:function(){t=!1,r=null,i.set(-1,0,0,0)}}}function r(){let n=!1,r=!1,i=null,a=null,o=null;return{setReversed:function(e){if(r!==e){let n=t.get(`EXT_clip_control`);e?n.clipControlEXT(n.LOWER_LEFT_EXT,n.ZERO_TO_ONE_EXT):n.clipControlEXT(n.LOWER_LEFT_EXT,n.NEGATIVE_ONE_TO_ONE_EXT),r=e;let i=o;o=null,this.setClear(i)}},getReversed:function(){return r},setTest:function(t){t?U(e.DEPTH_TEST):re(e.DEPTH_TEST)},setMask:function(t){i!==t&&!n&&(e.depthMask(t),i=t)},setFunc:function(t){if(r&&(t=ReversedDepthFuncs[t]),a!==t){switch(t){case 0:e.depthFunc(e.NEVER);break;case 1:e.depthFunc(e.ALWAYS);break;case 2:e.depthFunc(e.LESS);break;case 3:e.depthFunc(e.LEQUAL);break;case 4:e.depthFunc(e.EQUAL);break;case 5:e.depthFunc(e.GEQUAL);break;case 6:e.depthFunc(e.GREATER);break;case 7:e.depthFunc(e.NOTEQUAL);break;default:e.depthFunc(e.LEQUAL)}a=t}},setLocked:function(e){n=e},setClear:function(t){o!==t&&(o=t,r&&(t=1-t),e.clearDepth(t))},reset:function(){n=!1,i=null,a=null,o=null,r=!1}}}function i(){let t=!1,n=null,r=null,i=null,a=null,o=null,s=null,c=null,l=null;return{setTest:function(n){t||(n?U(e.STENCIL_TEST):re(e.STENCIL_TEST))},setMask:function(r){n!==r&&!t&&(e.stencilMask(r),n=r)},setFunc:function(t,n,o){(r!==t||i!==n||a!==o)&&(e.stencilFunc(t,n,o),r=t,i=n,a=o)},setOp:function(t,n,r){(o!==t||s!==n||c!==r)&&(e.stencilOp(t,n,r),o=t,s=n,c=r)},setLocked:function(e){t=e},setClear:function(t){l!==t&&(e.clearStencil(t),l=t)},reset:function(){t=!1,n=null,r=null,i=null,a=null,o=null,s=null,c=null,l=null}}}let a=new n,o=new r,s=new i,c=new WeakMap,l=new WeakMap,u={},d={},f=new WeakMap,p=[],m=null,g=!1,_=null,y=null,b=null,x=null,S=null,C=null,T=null,E=new Color(0,0,0),D=0,O=!1,k=null,A=null,j=null,M=null,N=null,P=e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS),F=!1,I=0,L=e.getParameter(e.VERSION);L.indexOf(`WebGL`)===-1?L.indexOf(`OpenGL ES`)!==-1&&(I=parseFloat(/^OpenGL ES (\d)/.exec(L)[1]),F=I>=2):(I=parseFloat(/^WebGL (\d)/.exec(L)[1]),F=I>=1);let R=null,z={},B=e.getParameter(e.SCISSOR_BOX),V=e.getParameter(e.VIEWPORT),ee=new Vector4().fromArray(B),H=new Vector4().fromArray(V);function te(t,n,r,i){let a=new Uint8Array(4),o=e.createTexture();e.bindTexture(t,o),e.texParameteri(t,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(t,e.TEXTURE_MAG_FILTER,e.NEAREST);for(let o=0;o<r;o++)t===e.TEXTURE_3D||t===e.TEXTURE_2D_ARRAY?e.texImage3D(n,0,e.RGBA,1,1,i,0,e.RGBA,e.UNSIGNED_BYTE,a):e.texImage2D(n+o,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,a);return o}let ne={};ne[e.TEXTURE_2D]=te(e.TEXTURE_2D,e.TEXTURE_2D,1),ne[e.TEXTURE_CUBE_MAP]=te(e.TEXTURE_CUBE_MAP,e.TEXTURE_CUBE_MAP_POSITIVE_X,6),ne[e.TEXTURE_2D_ARRAY]=te(e.TEXTURE_2D_ARRAY,e.TEXTURE_2D_ARRAY,1,1),ne[e.TEXTURE_3D]=te(e.TEXTURE_3D,e.TEXTURE_3D,1,1),a.setClear(0,0,0,1),o.setClear(1),s.setClear(0),U(e.DEPTH_TEST),o.setFunc(3),ce(!1),J(1),U(e.CULL_FACE),q(0);function U(t){u[t]!==!0&&(e.enable(t),u[t]=!0)}function re(t){u[t]!==!1&&(e.disable(t),u[t]=!1)}function ie(t,n){return d[t]===n?!1:(e.bindFramebuffer(t,n),d[t]=n,t===e.DRAW_FRAMEBUFFER&&(d[e.FRAMEBUFFER]=n),t===e.FRAMEBUFFER&&(d[e.DRAW_FRAMEBUFFER]=n),!0)}function ae(t,n){let r=p,i=!1;if(t){r=f.get(n),r===void 0&&(r=[],f.set(n,r));let a=t.textures;if(r.length!==a.length||r[0]!==e.COLOR_ATTACHMENT0){for(let t=0,n=a.length;t<n;t++)r[t]=e.COLOR_ATTACHMENT0+t;r.length=a.length,i=!0}}else r[0]!==e.BACK&&(r[0]=e.BACK,i=!0);i&&e.drawBuffers(r)}function W(t){return m===t?!1:(e.useProgram(t),m=t,!0)}let oe={100:e.FUNC_ADD,101:e.FUNC_SUBTRACT,102:e.FUNC_REVERSE_SUBTRACT};oe[103]=e.MIN,oe[104]=e.MAX;let K={200:e.ZERO,201:e.ONE,202:e.SRC_COLOR,204:e.SRC_ALPHA,210:e.SRC_ALPHA_SATURATE,208:e.DST_COLOR,206:e.DST_ALPHA,203:e.ONE_MINUS_SRC_COLOR,205:e.ONE_MINUS_SRC_ALPHA,209:e.ONE_MINUS_DST_COLOR,207:e.ONE_MINUS_DST_ALPHA,211:e.CONSTANT_COLOR,212:e.ONE_MINUS_CONSTANT_COLOR,213:e.CONSTANT_ALPHA,214:e.ONE_MINUS_CONSTANT_ALPHA};function q(t,n,r,i,a,o,s,c,l,u){if(t===0){g===!0&&(re(e.BLEND),g=!1);return}if(g===!1&&(U(e.BLEND),g=!0),t!==5){if(t!==_||u!==O){if((y!==100||S!==100)&&(e.blendEquation(e.FUNC_ADD),y=100,S=100),u)switch(t){case 1:e.blendFuncSeparate(e.ONE,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA);break;case 2:e.blendFunc(e.ONE,e.ONE);break;case 3:e.blendFuncSeparate(e.ZERO,e.ONE_MINUS_SRC_COLOR,e.ZERO,e.ONE);break;case 4:e.blendFuncSeparate(e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA,e.ZERO,e.ONE);break;default:error(`WebGLState: Invalid blending: `,t);break}else switch(t){case 1:e.blendFuncSeparate(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA);break;case 2:e.blendFuncSeparate(e.SRC_ALPHA,e.ONE,e.ONE,e.ONE);break;case 3:error(`WebGLState: SubtractiveBlending requires material.premultipliedAlpha = true`);break;case 4:error(`WebGLState: MultiplyBlending requires material.premultipliedAlpha = true`);break;default:error(`WebGLState: Invalid blending: `,t);break}b=null,x=null,C=null,T=null,E.set(0,0,0),D=0,_=t,O=u}return}a||=n,o||=r,s||=i,(n!==y||a!==S)&&(e.blendEquationSeparate(oe[n],oe[a]),y=n,S=a),(r!==b||i!==x||o!==C||s!==T)&&(e.blendFuncSeparate(K[r],K[i],K[o],K[s]),b=r,x=i,C=o,T=s),(c.equals(E)===!1||l!==D)&&(e.blendColor(c.r,c.g,c.b,l),E.copy(c),D=l),_=t,O=!1}function se(t,n){t.side===2?re(e.CULL_FACE):U(e.CULL_FACE);let r=t.side===1;n&&(r=!r),ce(r),t.blending===1&&t.transparent===!1?q(0):q(t.blending,t.blendEquation,t.blendSrc,t.blendDst,t.blendEquationAlpha,t.blendSrcAlpha,t.blendDstAlpha,t.blendColor,t.blendAlpha,t.premultipliedAlpha),o.setFunc(t.depthFunc),o.setTest(t.depthTest),o.setMask(t.depthWrite),a.setMask(t.colorWrite);let i=t.stencilWrite;s.setTest(i),i&&(s.setMask(t.stencilWriteMask),s.setFunc(t.stencilFunc,t.stencilRef,t.stencilFuncMask),s.setOp(t.stencilFail,t.stencilZFail,t.stencilZPass)),Y(t.polygonOffset,t.polygonOffsetFactor,t.polygonOffsetUnits),t.alphaToCoverage===!0?U(e.SAMPLE_ALPHA_TO_COVERAGE):re(e.SAMPLE_ALPHA_TO_COVERAGE)}function ce(t){k!==t&&(t?e.frontFace(e.CW):e.frontFace(e.CCW),k=t)}function J(t){t===0?re(e.CULL_FACE):(U(e.CULL_FACE),t!==A&&(t===1?e.cullFace(e.BACK):t===2?e.cullFace(e.FRONT):e.cullFace(e.FRONT_AND_BACK))),A=t}function le(t){t!==j&&(F&&e.lineWidth(t),j=t)}function Y(t,n,r){t?(U(e.POLYGON_OFFSET_FILL),(M!==n||N!==r)&&(M=n,N=r,o.getReversed()&&(n=-n),e.polygonOffset(n,r))):re(e.POLYGON_OFFSET_FILL)}function ue(t){t?U(e.SCISSOR_TEST):re(e.SCISSOR_TEST)}function X(t){t===void 0&&(t=e.TEXTURE0+P-1),R!==t&&(e.activeTexture(t),R=t)}function de(t,n,r){r===void 0&&(r=R===null?e.TEXTURE0+P-1:R);let i=z[r];i===void 0&&(i={type:void 0,texture:void 0},z[r]=i),(i.type!==t||i.texture!==n)&&(R!==r&&(e.activeTexture(r),R=r),e.bindTexture(t,n||ne[t]),i.type=t,i.texture=n)}function Z(){let t=z[R];t!==void 0&&t.type!==void 0&&(e.bindTexture(t.type,null),t.type=void 0,t.texture=void 0)}function Q(){try{e.compressedTexImage2D(...arguments)}catch(e){error(`WebGLState:`,e)}}function fe(){try{e.compressedTexImage3D(...arguments)}catch(e){error(`WebGLState:`,e)}}function $(){try{e.texSubImage2D(...arguments)}catch(e){error(`WebGLState:`,e)}}function pe(){try{e.texSubImage3D(...arguments)}catch(e){error(`WebGLState:`,e)}}function me(){try{e.compressedTexSubImage2D(...arguments)}catch(e){error(`WebGLState:`,e)}}function he(){try{e.compressedTexSubImage3D(...arguments)}catch(e){error(`WebGLState:`,e)}}function ge(){try{e.texStorage2D(...arguments)}catch(e){error(`WebGLState:`,e)}}function _e(){try{e.texStorage3D(...arguments)}catch(e){error(`WebGLState:`,e)}}function ve(){try{e.texImage2D(...arguments)}catch(e){error(`WebGLState:`,e)}}function ye(){try{e.texImage3D(...arguments)}catch(e){error(`WebGLState:`,e)}}function be(t){ee.equals(t)===!1&&(e.scissor(t.x,t.y,t.z,t.w),ee.copy(t))}function xe(t){H.equals(t)===!1&&(e.viewport(t.x,t.y,t.z,t.w),H.copy(t))}function Se(t,n){let r=l.get(n);r===void 0&&(r=new WeakMap,l.set(n,r));let i=r.get(t);i===void 0&&(i=e.getUniformBlockIndex(n,t.name),r.set(t,i))}function Ce(t,n){let r=l.get(n).get(t);c.get(n)!==r&&(e.uniformBlockBinding(n,r,t.__bindingPointIndex),c.set(n,r))}function we(){e.disable(e.BLEND),e.disable(e.CULL_FACE),e.disable(e.DEPTH_TEST),e.disable(e.POLYGON_OFFSET_FILL),e.disable(e.SCISSOR_TEST),e.disable(e.STENCIL_TEST),e.disable(e.SAMPLE_ALPHA_TO_COVERAGE),e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ONE,e.ZERO),e.blendFuncSeparate(e.ONE,e.ZERO,e.ONE,e.ZERO),e.blendColor(0,0,0,0),e.colorMask(!0,!0,!0,!0),e.clearColor(0,0,0,0),e.depthMask(!0),e.depthFunc(e.LESS),o.setReversed(!1),e.clearDepth(1),e.stencilMask(4294967295),e.stencilFunc(e.ALWAYS,0,4294967295),e.stencilOp(e.KEEP,e.KEEP,e.KEEP),e.clearStencil(0),e.cullFace(e.BACK),e.frontFace(e.CCW),e.polygonOffset(0,0),e.activeTexture(e.TEXTURE0),e.bindFramebuffer(e.FRAMEBUFFER,null),e.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),e.bindFramebuffer(e.READ_FRAMEBUFFER,null),e.useProgram(null),e.lineWidth(1),e.scissor(0,0,e.canvas.width,e.canvas.height),e.viewport(0,0,e.canvas.width,e.canvas.height),u={},R=null,z={},d={},f=new WeakMap,p=[],m=null,g=!1,_=null,y=null,b=null,x=null,S=null,C=null,T=null,E=new Color(0,0,0),D=0,O=!1,k=null,A=null,j=null,M=null,N=null,ee.set(0,0,e.canvas.width,e.canvas.height),H.set(0,0,e.canvas.width,e.canvas.height),a.reset(),o.reset(),s.reset()}return{buffers:{color:a,depth:o,stencil:s},enable:U,disable:re,bindFramebuffer:ie,drawBuffers:ae,useProgram:W,setBlending:q,setMaterial:se,setFlipSided:ce,setCullFace:J,setLineWidth:le,setPolygonOffset:Y,setScissorTest:ue,activeTexture:X,bindTexture:de,unbindTexture:Z,compressedTexImage2D:Q,compressedTexImage3D:fe,texImage2D:ve,texImage3D:ye,updateUBOMapping:Se,uniformBlockBinding:Ce,texStorage2D:ge,texStorage3D:_e,texSubImage2D:$,texSubImage3D:pe,compressedTexSubImage2D:me,compressedTexSubImage3D:he,scissor:be,viewport:xe,reset:we}}function WebGLTextures(e,t,n,r,i,a,o){let s=t.has(`WEBGL_multisampled_render_to_texture`)?t.get(`WEBGL_multisampled_render_to_texture`):null,c=typeof navigator>`u`?!1:/OculusBrowser/g.test(navigator.userAgent),l=new Vector2,u=new WeakMap,d,f=new WeakMap,p=!1;try{p=typeof OffscreenCanvas<`u`&&new OffscreenCanvas(1,1).getContext(`2d`)!==null}catch{}function m(e,t){return p?new OffscreenCanvas(e,t):createElementNS(`canvas`)}function g(e,t,n){let r=1,i=de(e);if((i.width>n||i.height>n)&&(r=n/Math.max(i.width,i.height)),r<1)if(typeof HTMLImageElement<`u`&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<`u`&&e instanceof HTMLCanvasElement||typeof ImageBitmap<`u`&&e instanceof ImageBitmap||typeof VideoFrame<`u`&&e instanceof VideoFrame){let n=Math.floor(r*i.width),a=Math.floor(r*i.height);d===void 0&&(d=m(n,a));let o=t?m(n,a):d;return o.width=n,o.height=a,o.getContext(`2d`).drawImage(e,0,0,n,a),warn(`WebGLRenderer: Texture has been resized from (`+i.width+`x`+i.height+`) to (`+n+`x`+a+`).`),o}else return`data`in e&&warn(`WebGLRenderer: Image in DataTexture is too big (`+i.width+`x`+i.height+`).`),e;return e}function _(e){return e.generateMipmaps}function y(t){e.generateMipmap(t)}function b(t){return t.isWebGLCubeRenderTarget?e.TEXTURE_CUBE_MAP:t.isWebGL3DRenderTarget?e.TEXTURE_3D:t.isWebGLArrayRenderTarget||t.isCompressedArrayTexture?e.TEXTURE_2D_ARRAY:e.TEXTURE_2D}function x(n,r,i,a,o=!1){if(n!==null){if(e[n]!==void 0)return e[n];warn(`WebGLRenderer: Attempt to use non-existing WebGL internal format '`+n+`'`)}let s=r;if(r===e.RED&&(i===e.FLOAT&&(s=e.R32F),i===e.HALF_FLOAT&&(s=e.R16F),i===e.UNSIGNED_BYTE&&(s=e.R8)),r===e.RED_INTEGER&&(i===e.UNSIGNED_BYTE&&(s=e.R8UI),i===e.UNSIGNED_SHORT&&(s=e.R16UI),i===e.UNSIGNED_INT&&(s=e.R32UI),i===e.BYTE&&(s=e.R8I),i===e.SHORT&&(s=e.R16I),i===e.INT&&(s=e.R32I)),r===e.RG&&(i===e.FLOAT&&(s=e.RG32F),i===e.HALF_FLOAT&&(s=e.RG16F),i===e.UNSIGNED_BYTE&&(s=e.RG8)),r===e.RG_INTEGER&&(i===e.UNSIGNED_BYTE&&(s=e.RG8UI),i===e.UNSIGNED_SHORT&&(s=e.RG16UI),i===e.UNSIGNED_INT&&(s=e.RG32UI),i===e.BYTE&&(s=e.RG8I),i===e.SHORT&&(s=e.RG16I),i===e.INT&&(s=e.RG32I)),r===e.RGB_INTEGER&&(i===e.UNSIGNED_BYTE&&(s=e.RGB8UI),i===e.UNSIGNED_SHORT&&(s=e.RGB16UI),i===e.UNSIGNED_INT&&(s=e.RGB32UI),i===e.BYTE&&(s=e.RGB8I),i===e.SHORT&&(s=e.RGB16I),i===e.INT&&(s=e.RGB32I)),r===e.RGBA_INTEGER&&(i===e.UNSIGNED_BYTE&&(s=e.RGBA8UI),i===e.UNSIGNED_SHORT&&(s=e.RGBA16UI),i===e.UNSIGNED_INT&&(s=e.RGBA32UI),i===e.BYTE&&(s=e.RGBA8I),i===e.SHORT&&(s=e.RGBA16I),i===e.INT&&(s=e.RGBA32I)),r===e.RGB&&(i===e.UNSIGNED_INT_5_9_9_9_REV&&(s=e.RGB9_E5),i===e.UNSIGNED_INT_10F_11F_11F_REV&&(s=e.R11F_G11F_B10F)),r===e.RGBA){let t=o?LinearTransfer:ColorManagement.getTransfer(a);i===e.FLOAT&&(s=e.RGBA32F),i===e.HALF_FLOAT&&(s=e.RGBA16F),i===e.UNSIGNED_BYTE&&(s=t===`srgb`?e.SRGB8_ALPHA8:e.RGBA8),i===e.UNSIGNED_SHORT_4_4_4_4&&(s=e.RGBA4),i===e.UNSIGNED_SHORT_5_5_5_1&&(s=e.RGB5_A1)}return(s===e.R16F||s===e.R32F||s===e.RG16F||s===e.RG32F||s===e.RGBA16F||s===e.RGBA32F)&&t.get(`EXT_color_buffer_float`),s}function S(t,n){let r;return t?n===null||n===1014||n===1020?r=e.DEPTH24_STENCIL8:n===1015?r=e.DEPTH32F_STENCIL8:n===1012&&(r=e.DEPTH24_STENCIL8,warn(`DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.`)):n===null||n===1014||n===1020?r=e.DEPTH_COMPONENT24:n===1015?r=e.DEPTH_COMPONENT32F:n===1012&&(r=e.DEPTH_COMPONENT16),r}function C(e,t){return _(e)===!0||e.isFramebufferTexture&&e.minFilter!==1003&&e.minFilter!==1006?Math.log2(Math.max(t.width,t.height))+1:e.mipmaps!==void 0&&e.mipmaps.length>0?e.mipmaps.length:e.isCompressedTexture&&Array.isArray(e.image)?t.mipmaps.length:1}function T(e){let t=e.target;t.removeEventListener(`dispose`,T),D(t),t.isVideoTexture&&u.delete(t)}function E(e){let t=e.target;t.removeEventListener(`dispose`,E),k(t)}function D(e){let t=r.get(e);if(t.__webglInit===void 0)return;let n=e.source,i=f.get(n);if(i){let r=i[t.__cacheKey];r.usedTimes--,r.usedTimes===0&&O(e),Object.keys(i).length===0&&f.delete(n)}r.remove(e)}function O(t){let n=r.get(t);e.deleteTexture(n.__webglTexture);let i=t.source,a=f.get(i);delete a[n.__cacheKey],o.memory.textures--}function k(t){let n=r.get(t);if(t.depthTexture&&(t.depthTexture.dispose(),r.remove(t.depthTexture)),t.isWebGLCubeRenderTarget)for(let t=0;t<6;t++){if(Array.isArray(n.__webglFramebuffer[t]))for(let r=0;r<n.__webglFramebuffer[t].length;r++)e.deleteFramebuffer(n.__webglFramebuffer[t][r]);else e.deleteFramebuffer(n.__webglFramebuffer[t]);n.__webglDepthbuffer&&e.deleteRenderbuffer(n.__webglDepthbuffer[t])}else{if(Array.isArray(n.__webglFramebuffer))for(let t=0;t<n.__webglFramebuffer.length;t++)e.deleteFramebuffer(n.__webglFramebuffer[t]);else e.deleteFramebuffer(n.__webglFramebuffer);if(n.__webglDepthbuffer&&e.deleteRenderbuffer(n.__webglDepthbuffer),n.__webglMultisampledFramebuffer&&e.deleteFramebuffer(n.__webglMultisampledFramebuffer),n.__webglColorRenderbuffer)for(let t=0;t<n.__webglColorRenderbuffer.length;t++)n.__webglColorRenderbuffer[t]&&e.deleteRenderbuffer(n.__webglColorRenderbuffer[t]);n.__webglDepthRenderbuffer&&e.deleteRenderbuffer(n.__webglDepthRenderbuffer)}let i=t.textures;for(let t=0,n=i.length;t<n;t++){let n=r.get(i[t]);n.__webglTexture&&(e.deleteTexture(n.__webglTexture),o.memory.textures--),r.remove(i[t])}r.remove(t)}let A=0;function j(){A=0}function M(){let e=A;return e>=i.maxTextures&&warn(`WebGLTextures: Trying to use `+e+` texture units while this GPU supports only `+i.maxTextures),A+=1,e}function N(e){let t=[];return t.push(e.wrapS),t.push(e.wrapT),t.push(e.wrapR||0),t.push(e.magFilter),t.push(e.minFilter),t.push(e.anisotropy),t.push(e.internalFormat),t.push(e.format),t.push(e.type),t.push(e.generateMipmaps),t.push(e.premultiplyAlpha),t.push(e.flipY),t.push(e.unpackAlignment),t.push(e.colorSpace),t.join()}function P(t,i){let a=r.get(t);if(t.isVideoTexture&&ue(t),t.isRenderTargetTexture===!1&&t.isExternalTexture!==!0&&t.version>0&&a.__version!==t.version){let e=t.image;if(e===null)warn(`WebGLRenderer: Texture marked for update but no image data found.`);else if(e.complete===!1)warn(`WebGLRenderer: Texture marked for update but image is incomplete`);else{ne(a,t,i);return}}else t.isExternalTexture&&(a.__webglTexture=t.sourceTexture?t.sourceTexture:null);n.bindTexture(e.TEXTURE_2D,a.__webglTexture,e.TEXTURE0+i)}function F(t,i){let a=r.get(t);if(t.isRenderTargetTexture===!1&&t.version>0&&a.__version!==t.version){ne(a,t,i);return}else t.isExternalTexture&&(a.__webglTexture=t.sourceTexture?t.sourceTexture:null);n.bindTexture(e.TEXTURE_2D_ARRAY,a.__webglTexture,e.TEXTURE0+i)}function I(t,i){let a=r.get(t);if(t.isRenderTargetTexture===!1&&t.version>0&&a.__version!==t.version){ne(a,t,i);return}n.bindTexture(e.TEXTURE_3D,a.__webglTexture,e.TEXTURE0+i)}function L(t,i){let a=r.get(t);if(t.isCubeDepthTexture!==!0&&t.version>0&&a.__version!==t.version){U(a,t,i);return}n.bindTexture(e.TEXTURE_CUBE_MAP,a.__webglTexture,e.TEXTURE0+i)}let R={[RepeatWrapping]:e.REPEAT,[ClampToEdgeWrapping]:e.CLAMP_TO_EDGE,[MirroredRepeatWrapping]:e.MIRRORED_REPEAT},z={[NearestFilter]:e.NEAREST,[NearestMipmapNearestFilter]:e.NEAREST_MIPMAP_NEAREST,[NearestMipmapLinearFilter]:e.NEAREST_MIPMAP_LINEAR,[LinearFilter]:e.LINEAR,[LinearMipmapNearestFilter]:e.LINEAR_MIPMAP_NEAREST,[LinearMipmapLinearFilter]:e.LINEAR_MIPMAP_LINEAR},B={512:e.NEVER,519:e.ALWAYS,513:e.LESS,515:e.LEQUAL,514:e.EQUAL,518:e.GEQUAL,516:e.GREATER,517:e.NOTEQUAL};function V(n,a){if(a.type===1015&&t.has(`OES_texture_float_linear`)===!1&&(a.magFilter===1006||a.magFilter===1007||a.magFilter===1005||a.magFilter===1008||a.minFilter===1006||a.minFilter===1007||a.minFilter===1005||a.minFilter===1008)&&warn(`WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device.`),e.texParameteri(n,e.TEXTURE_WRAP_S,R[a.wrapS]),e.texParameteri(n,e.TEXTURE_WRAP_T,R[a.wrapT]),(n===e.TEXTURE_3D||n===e.TEXTURE_2D_ARRAY)&&e.texParameteri(n,e.TEXTURE_WRAP_R,R[a.wrapR]),e.texParameteri(n,e.TEXTURE_MAG_FILTER,z[a.magFilter]),e.texParameteri(n,e.TEXTURE_MIN_FILTER,z[a.minFilter]),a.compareFunction&&(e.texParameteri(n,e.TEXTURE_COMPARE_MODE,e.COMPARE_REF_TO_TEXTURE),e.texParameteri(n,e.TEXTURE_COMPARE_FUNC,B[a.compareFunction])),t.has(`EXT_texture_filter_anisotropic`)===!0){if(a.magFilter===1003||a.minFilter!==1005&&a.minFilter!==1008||a.type===1015&&t.has(`OES_texture_float_linear`)===!1)return;if(a.anisotropy>1||r.get(a).__currentAnisotropy){let o=t.get(`EXT_texture_filter_anisotropic`);e.texParameterf(n,o.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy}}}function ee(t,n){let r=!1;t.__webglInit===void 0&&(t.__webglInit=!0,n.addEventListener(`dispose`,T));let i=n.source,a=f.get(i);a===void 0&&(a={},f.set(i,a));let s=N(n);if(s!==t.__cacheKey){a[s]===void 0&&(a[s]={texture:e.createTexture(),usedTimes:0},o.memory.textures++,r=!0),a[s].usedTimes++;let i=a[t.__cacheKey];i!==void 0&&(a[t.__cacheKey].usedTimes--,i.usedTimes===0&&O(n)),t.__cacheKey=s,t.__webglTexture=a[s].texture}return r}function H(e,t,n){return Math.floor(Math.floor(e/n)/t)}function te(t,r,i,a){let o=4,s=t.updateRanges;if(s.length===0)n.texSubImage2D(e.TEXTURE_2D,0,0,0,r.width,r.height,i,a,r.data);else{s.sort((e,t)=>e.start-t.start);let o=0;for(let e=1;e<s.length;e++){let t=s[o],n=s[e],i=t.start+t.count,a=H(n.start,r.width,4),c=H(t.start,r.width,4);n.start<=i+1&&a===c&&H(n.start+n.count-1,r.width,4)===a?t.count=Math.max(t.count,n.start+n.count-t.start):(++o,s[o]=n)}s.length=o+1;let c=e.getParameter(e.UNPACK_ROW_LENGTH),l=e.getParameter(e.UNPACK_SKIP_PIXELS),u=e.getParameter(e.UNPACK_SKIP_ROWS);e.pixelStorei(e.UNPACK_ROW_LENGTH,r.width);for(let t=0,o=s.length;t<o;t++){let o=s[t],c=Math.floor(o.start/4),l=Math.ceil(o.count/4),u=c%r.width,d=Math.floor(c/r.width),f=l,p=1;e.pixelStorei(e.UNPACK_SKIP_PIXELS,u),e.pixelStorei(e.UNPACK_SKIP_ROWS,d),n.texSubImage2D(e.TEXTURE_2D,0,u,d,f,1,i,a,r.data)}t.clearUpdateRanges(),e.pixelStorei(e.UNPACK_ROW_LENGTH,c),e.pixelStorei(e.UNPACK_SKIP_PIXELS,l),e.pixelStorei(e.UNPACK_SKIP_ROWS,u)}}function ne(t,o,s){let c=e.TEXTURE_2D;(o.isDataArrayTexture||o.isCompressedArrayTexture)&&(c=e.TEXTURE_2D_ARRAY),o.isData3DTexture&&(c=e.TEXTURE_3D);let l=ee(t,o),u=o.source;n.bindTexture(c,t.__webglTexture,e.TEXTURE0+s);let d=r.get(u);if(u.version!==d.__version||l===!0){n.activeTexture(e.TEXTURE0+s);let t=ColorManagement.getPrimaries(ColorManagement.workingColorSpace),r=o.colorSpace===``?null:ColorManagement.getPrimaries(o.colorSpace),f=o.colorSpace===``||t===r?e.NONE:e.BROWSER_DEFAULT_WEBGL;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,o.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,o.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,o.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,f);let p=g(o.image,!1,i.maxTextureSize);p=X(o,p);let m=a.convert(o.format,o.colorSpace),b=a.convert(o.type),T=x(o.internalFormat,m,b,o.colorSpace,o.isVideoTexture);V(c,o);let E,D=o.mipmaps,O=o.isVideoTexture!==!0,k=d.__version===void 0||l===!0,A=u.dataReady,j=C(o,p);if(o.isDepthTexture)T=S(o.format===DepthStencilFormat,o.type),k&&(O?n.texStorage2D(e.TEXTURE_2D,1,T,p.width,p.height):n.texImage2D(e.TEXTURE_2D,0,T,p.width,p.height,0,m,b,null));else if(o.isDataTexture)if(D.length>0){O&&k&&n.texStorage2D(e.TEXTURE_2D,j,T,D[0].width,D[0].height);for(let t=0,r=D.length;t<r;t++)E=D[t],O?A&&n.texSubImage2D(e.TEXTURE_2D,t,0,0,E.width,E.height,m,b,E.data):n.texImage2D(e.TEXTURE_2D,t,T,E.width,E.height,0,m,b,E.data);o.generateMipmaps=!1}else O?(k&&n.texStorage2D(e.TEXTURE_2D,j,T,p.width,p.height),A&&te(o,p,m,b)):n.texImage2D(e.TEXTURE_2D,0,T,p.width,p.height,0,m,b,p.data);else if(o.isCompressedTexture)if(o.isCompressedArrayTexture){O&&k&&n.texStorage3D(e.TEXTURE_2D_ARRAY,j,T,D[0].width,D[0].height,p.depth);for(let t=0,r=D.length;t<r;t++)if(E=D[t],o.format!==1023)if(m!==null)if(O){if(A)if(o.layerUpdates.size>0){let r=getByteLength(E.width,E.height,o.format,o.type);for(let i of o.layerUpdates){let a=E.data.subarray(i*r/E.data.BYTES_PER_ELEMENT,(i+1)*r/E.data.BYTES_PER_ELEMENT);n.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY,t,0,0,i,E.width,E.height,1,m,a)}o.clearLayerUpdates()}else n.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY,t,0,0,0,E.width,E.height,p.depth,m,E.data)}else n.compressedTexImage3D(e.TEXTURE_2D_ARRAY,t,T,E.width,E.height,p.depth,0,E.data,0,0);else warn(`WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()`);else O?A&&n.texSubImage3D(e.TEXTURE_2D_ARRAY,t,0,0,0,E.width,E.height,p.depth,m,b,E.data):n.texImage3D(e.TEXTURE_2D_ARRAY,t,T,E.width,E.height,p.depth,0,m,b,E.data)}else{O&&k&&n.texStorage2D(e.TEXTURE_2D,j,T,D[0].width,D[0].height);for(let t=0,r=D.length;t<r;t++)E=D[t],o.format===1023?O?A&&n.texSubImage2D(e.TEXTURE_2D,t,0,0,E.width,E.height,m,b,E.data):n.texImage2D(e.TEXTURE_2D,t,T,E.width,E.height,0,m,b,E.data):m===null?warn(`WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()`):O?A&&n.compressedTexSubImage2D(e.TEXTURE_2D,t,0,0,E.width,E.height,m,E.data):n.compressedTexImage2D(e.TEXTURE_2D,t,T,E.width,E.height,0,E.data)}else if(o.isDataArrayTexture)if(O){if(k&&n.texStorage3D(e.TEXTURE_2D_ARRAY,j,T,p.width,p.height,p.depth),A)if(o.layerUpdates.size>0){let t=getByteLength(p.width,p.height,o.format,o.type);for(let r of o.layerUpdates){let i=p.data.subarray(r*t/p.data.BYTES_PER_ELEMENT,(r+1)*t/p.data.BYTES_PER_ELEMENT);n.texSubImage3D(e.TEXTURE_2D_ARRAY,0,0,0,r,p.width,p.height,1,m,b,i)}o.clearLayerUpdates()}else n.texSubImage3D(e.TEXTURE_2D_ARRAY,0,0,0,0,p.width,p.height,p.depth,m,b,p.data)}else n.texImage3D(e.TEXTURE_2D_ARRAY,0,T,p.width,p.height,p.depth,0,m,b,p.data);else if(o.isData3DTexture)O?(k&&n.texStorage3D(e.TEXTURE_3D,j,T,p.width,p.height,p.depth),A&&n.texSubImage3D(e.TEXTURE_3D,0,0,0,0,p.width,p.height,p.depth,m,b,p.data)):n.texImage3D(e.TEXTURE_3D,0,T,p.width,p.height,p.depth,0,m,b,p.data);else if(o.isFramebufferTexture){if(k)if(O)n.texStorage2D(e.TEXTURE_2D,j,T,p.width,p.height);else{let t=p.width,r=p.height;for(let i=0;i<j;i++)n.texImage2D(e.TEXTURE_2D,i,T,t,r,0,m,b,null),t>>=1,r>>=1}}else if(D.length>0){if(O&&k){let t=de(D[0]);n.texStorage2D(e.TEXTURE_2D,j,T,t.width,t.height)}for(let t=0,r=D.length;t<r;t++)E=D[t],O?A&&n.texSubImage2D(e.TEXTURE_2D,t,0,0,m,b,E):n.texImage2D(e.TEXTURE_2D,t,T,m,b,E);o.generateMipmaps=!1}else if(O){if(k){let t=de(p);n.texStorage2D(e.TEXTURE_2D,j,T,t.width,t.height)}A&&n.texSubImage2D(e.TEXTURE_2D,0,0,0,m,b,p)}else n.texImage2D(e.TEXTURE_2D,0,T,m,b,p);_(o)&&y(c),d.__version=u.version,o.onUpdate&&o.onUpdate(o)}t.__version=o.version}function U(t,o,s){if(o.image.length!==6)return;let c=ee(t,o),l=o.source;n.bindTexture(e.TEXTURE_CUBE_MAP,t.__webglTexture,e.TEXTURE0+s);let u=r.get(l);if(l.version!==u.__version||c===!0){n.activeTexture(e.TEXTURE0+s);let t=ColorManagement.getPrimaries(ColorManagement.workingColorSpace),r=o.colorSpace===``?null:ColorManagement.getPrimaries(o.colorSpace),d=o.colorSpace===``||t===r?e.NONE:e.BROWSER_DEFAULT_WEBGL;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,o.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,o.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,o.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,d);let f=o.isCompressedTexture||o.image[0].isCompressedTexture,p=o.image[0]&&o.image[0].isDataTexture,m=[];for(let e=0;e<6;e++)!f&&!p?m[e]=g(o.image[e],!0,i.maxCubemapSize):m[e]=p?o.image[e].image:o.image[e],m[e]=X(o,m[e]);let b=m[0],S=a.convert(o.format,o.colorSpace),T=a.convert(o.type),E=x(o.internalFormat,S,T,o.colorSpace),D=o.isVideoTexture!==!0,O=u.__version===void 0||c===!0,k=l.dataReady,A=C(o,b);V(e.TEXTURE_CUBE_MAP,o);let j;if(f){D&&O&&n.texStorage2D(e.TEXTURE_CUBE_MAP,A,E,b.width,b.height);for(let t=0;t<6;t++){j=m[t].mipmaps;for(let r=0;r<j.length;r++){let i=j[r];o.format===1023?D?k&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r,0,0,i.width,i.height,S,T,i.data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r,E,i.width,i.height,0,S,T,i.data):S===null?warn(`WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()`):D?k&&n.compressedTexSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r,0,0,i.width,i.height,S,i.data):n.compressedTexImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r,E,i.width,i.height,0,i.data)}}}else{if(j=o.mipmaps,D&&O){j.length>0&&A++;let t=de(m[0]);n.texStorage2D(e.TEXTURE_CUBE_MAP,A,E,t.width,t.height)}for(let t=0;t<6;t++)if(p){D?k&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,0,0,m[t].width,m[t].height,S,T,m[t].data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,E,m[t].width,m[t].height,0,S,T,m[t].data);for(let r=0;r<j.length;r++){let i=j[r].image[t].image;D?k&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r+1,0,0,i.width,i.height,S,T,i.data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r+1,E,i.width,i.height,0,S,T,i.data)}}else{D?k&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,0,0,S,T,m[t]):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,E,S,T,m[t]);for(let r=0;r<j.length;r++){let i=j[r];D?k&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r+1,0,0,S,T,i.image[t]):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r+1,E,S,T,i.image[t])}}}_(o)&&y(e.TEXTURE_CUBE_MAP),u.__version=l.version,o.onUpdate&&o.onUpdate(o)}t.__version=o.version}function re(t,i,o,c,l,u){let d=a.convert(o.format,o.colorSpace),f=a.convert(o.type),p=x(o.internalFormat,d,f,o.colorSpace),m=r.get(i),g=r.get(o);if(g.__renderTarget=i,!m.__hasExternalTextures){let t=Math.max(1,i.width>>u),r=Math.max(1,i.height>>u);l===e.TEXTURE_3D||l===e.TEXTURE_2D_ARRAY?n.texImage3D(l,u,p,t,r,i.depth,0,d,f,null):n.texImage2D(l,u,p,t,r,0,d,f,null)}n.bindFramebuffer(e.FRAMEBUFFER,t),Y(i)?s.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,c,l,g.__webglTexture,0,le(i)):(l===e.TEXTURE_2D||l>=e.TEXTURE_CUBE_MAP_POSITIVE_X&&l<=e.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&e.framebufferTexture2D(e.FRAMEBUFFER,c,l,g.__webglTexture,u),n.bindFramebuffer(e.FRAMEBUFFER,null)}function ie(t,n,r){if(e.bindRenderbuffer(e.RENDERBUFFER,t),n.depthBuffer){let i=n.depthTexture,a=i&&i.isDepthTexture?i.type:null,o=S(n.stencilBuffer,a),c=n.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT;Y(n)?s.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,le(n),o,n.width,n.height):r?e.renderbufferStorageMultisample(e.RENDERBUFFER,le(n),o,n.width,n.height):e.renderbufferStorage(e.RENDERBUFFER,o,n.width,n.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,c,e.RENDERBUFFER,t)}else{let t=n.textures;for(let i=0;i<t.length;i++){let o=t[i],c=a.convert(o.format,o.colorSpace),l=a.convert(o.type),u=x(o.internalFormat,c,l,o.colorSpace);Y(n)?s.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,le(n),u,n.width,n.height):r?e.renderbufferStorageMultisample(e.RENDERBUFFER,le(n),u,n.width,n.height):e.renderbufferStorage(e.RENDERBUFFER,u,n.width,n.height)}}e.bindRenderbuffer(e.RENDERBUFFER,null)}function ae(t,i,o){let c=i.isWebGLCubeRenderTarget===!0;if(n.bindFramebuffer(e.FRAMEBUFFER,t),!(i.depthTexture&&i.depthTexture.isDepthTexture))throw Error(`renderTarget.depthTexture must be an instance of THREE.DepthTexture`);let l=r.get(i.depthTexture);if(l.__renderTarget=i,(!l.__webglTexture||i.depthTexture.image.width!==i.width||i.depthTexture.image.height!==i.height)&&(i.depthTexture.image.width=i.width,i.depthTexture.image.height=i.height,i.depthTexture.needsUpdate=!0),c){if(l.__webglInit===void 0&&(l.__webglInit=!0,i.depthTexture.addEventListener(`dispose`,T)),l.__webglTexture===void 0){l.__webglTexture=e.createTexture(),n.bindTexture(e.TEXTURE_CUBE_MAP,l.__webglTexture),V(e.TEXTURE_CUBE_MAP,i.depthTexture);let t=a.convert(i.depthTexture.format),r=a.convert(i.depthTexture.type),o;i.depthTexture.format===1026?o=e.DEPTH_COMPONENT24:i.depthTexture.format===1027&&(o=e.DEPTH24_STENCIL8);for(let n=0;n<6;n++)e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+n,0,o,i.width,i.height,0,t,r,null)}}else P(i.depthTexture,0);let u=l.__webglTexture,d=le(i),f=c?e.TEXTURE_CUBE_MAP_POSITIVE_X+o:e.TEXTURE_2D,p=i.depthTexture.format===1027?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT;if(i.depthTexture.format===1026)Y(i)?s.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,p,f,u,0,d):e.framebufferTexture2D(e.FRAMEBUFFER,p,f,u,0);else if(i.depthTexture.format===1027)Y(i)?s.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,p,f,u,0,d):e.framebufferTexture2D(e.FRAMEBUFFER,p,f,u,0);else throw Error(`Unknown depthTexture format`)}
vendor: 5,606 bytes, line 4035
4035function W(t){let i=r.get(t),a=t.isWebGLCubeRenderTarget===!0;if(i.__boundDepthTexture!==t.depthTexture){let e=t.depthTexture;if(i.__depthDisposeCallback&&i.__depthDisposeCallback(),e){let t=()=>{delete i.__boundDepthTexture,delete i.__depthDisposeCallback,e.removeEventListener(`dispose`,t)};e.addEventListener(`dispose`,t),i.__depthDisposeCallback=t}i.__boundDepthTexture=e}if(t.depthTexture&&!i.__autoAllocateDepthBuffer)if(a)for(let e=0;e<6;e++)ae(i.__webglFramebuffer[e],t,e);else{let e=t.texture.mipmaps;e&&e.length>0?ae(i.__webglFramebuffer[0],t,0):ae(i.__webglFramebuffer,t,0)}else if(a){i.__webglDepthbuffer=[];for(let r=0;r<6;r++)if(n.bindFramebuffer(e.FRAMEBUFFER,i.__webglFramebuffer[r]),i.__webglDepthbuffer[r]===void 0)i.__webglDepthbuffer[r]=e.createRenderbuffer(),ie(i.__webglDepthbuffer[r],t,!1);else{let n=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,a=i.__webglDepthbuffer[r];e.bindRenderbuffer(e.RENDERBUFFER,a),e.framebufferRenderbuffer(e.FRAMEBUFFER,n,e.RENDERBUFFER,a)}}else{let r=t.texture.mipmaps;if(r&&r.length>0?n.bindFramebuffer(e.FRAMEBUFFER,i.__webglFramebuffer[0]):n.bindFramebuffer(e.FRAMEBUFFER,i.__webglFramebuffer),i.__webglDepthbuffer===void 0)i.__webglDepthbuffer=e.createRenderbuffer(),ie(i.__webglDepthbuffer,t,!1);else{let n=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,r=i.__webglDepthbuffer;e.bindRenderbuffer(e.RENDERBUFFER,r),e.framebufferRenderbuffer(e.FRAMEBUFFER,n,e.RENDERBUFFER,r)}}n.bindFramebuffer(e.FRAMEBUFFER,null)}function oe(t,n,i){let a=r.get(t);n!==void 0&&re(a.__webglFramebuffer,t,t.texture,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,0),i!==void 0&&W(t)}function K(t){let i=t.texture,s=r.get(t),c=r.get(i);t.addEventListener(`dispose`,E);let l=t.textures,u=t.isWebGLCubeRenderTarget===!0,d=l.length>1;if(d||(c.__webglTexture===void 0&&(c.__webglTexture=e.createTexture()),c.__version=i.version,o.memory.textures++),u){s.__webglFramebuffer=[];for(let t=0;t<6;t++)if(i.mipmaps&&i.mipmaps.length>0){s.__webglFramebuffer[t]=[];for(let n=0;n<i.mipmaps.length;n++)s.__webglFramebuffer[t][n]=e.createFramebuffer()}else s.__webglFramebuffer[t]=e.createFramebuffer()}else{if(i.mipmaps&&i.mipmaps.length>0){s.__webglFramebuffer=[];for(let t=0;t<i.mipmaps.length;t++)s.__webglFramebuffer[t]=e.createFramebuffer()}else s.__webglFramebuffer=e.createFramebuffer();if(d)for(let t=0,n=l.length;t<n;t++){let n=r.get(l[t]);n.__webglTexture===void 0&&(n.__webglTexture=e.createTexture(),o.memory.textures++)}if(t.samples>0&&Y(t)===!1){s.__webglMultisampledFramebuffer=e.createFramebuffer(),s.__webglColorRenderbuffer=[],n.bindFramebuffer(e.FRAMEBUFFER,s.__webglMultisampledFramebuffer);for(let n=0;n<l.length;n++){let r=l[n];s.__webglColorRenderbuffer[n]=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,s.__webglColorRenderbuffer[n]);let i=a.convert(r.format,r.colorSpace),o=a.convert(r.type),c=x(r.internalFormat,i,o,r.colorSpace,t.isXRRenderTarget===!0),u=le(t);e.renderbufferStorageMultisample(e.RENDERBUFFER,u,c,t.width,t.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+n,e.RENDERBUFFER,s.__webglColorRenderbuffer[n])}e.bindRenderbuffer(e.RENDERBUFFER,null),t.depthBuffer&&(s.__webglDepthRenderbuffer=e.createRenderbuffer(),ie(s.__webglDepthRenderbuffer,t,!0)),n.bindFramebuffer(e.FRAMEBUFFER,null)}}if(u){n.bindTexture(e.TEXTURE_CUBE_MAP,c.__webglTexture),V(e.TEXTURE_CUBE_MAP,i);for(let n=0;n<6;n++)if(i.mipmaps&&i.mipmaps.length>0)for(let r=0;r<i.mipmaps.length;r++)re(s.__webglFramebuffer[n][r],t,i,e.COLOR_ATTACHMENT0,e.TEXTURE_CUBE_MAP_POSITIVE_X+n,r);else re(s.__webglFramebuffer[n],t,i,e.COLOR_ATTACHMENT0,e.TEXTURE_CUBE_MAP_POSITIVE_X+n,0);_(i)&&y(e.TEXTURE_CUBE_MAP),n.unbindTexture()}else if(d){for(let i=0,a=l.length;i<a;i++){let a=l[i],o=r.get(a),c=e.TEXTURE_2D;(t.isWebGL3DRenderTarget||t.isWebGLArrayRenderTarget)&&(c=t.isWebGL3DRenderTarget?e.TEXTURE_3D:e.TEXTURE_2D_ARRAY),n.bindTexture(c,o.__webglTexture),V(c,a),re(s.__webglFramebuffer,t,a,e.COLOR_ATTACHMENT0+i,c,0),_(a)&&y(c)}n.unbindTexture()}else{let r=e.TEXTURE_2D;if((t.isWebGL3DRenderTarget||t.isWebGLArrayRenderTarget)&&(r=t.isWebGL3DRenderTarget?e.TEXTURE_3D:e.TEXTURE_2D_ARRAY),n.bindTexture(r,c.__webglTexture),V(r,i),i.mipmaps&&i.mipmaps.length>0)for(let n=0;n<i.mipmaps.length;n++)re(s.__webglFramebuffer[n],t,i,e.COLOR_ATTACHMENT0,r,n);else re(s.__webglFramebuffer,t,i,e.COLOR_ATTACHMENT0,r,0);_(i)&&y(r),n.unbindTexture()}t.depthBuffer&&W(t)}function q(e){let t=e.textures;for(let i=0,a=t.length;i<a;i++){let a=t[i];if(_(a)){let t=b(e),i=r.get(a).__webglTexture;n.bindTexture(t,i),y(t),n.unbindTexture()}}}let se=[],ce=[];function J(t){if(t.samples>0){if(Y(t)===!1){let i=t.textures,a=t.width,o=t.height,s=e.COLOR_BUFFER_BIT,l=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,u=r.get(t),d=i.length>1;if(d)for(let t=0;t<i.length;t++)n.bindFramebuffer(e.FRAMEBUFFER,u.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.RENDERBUFFER,null),n.bindFramebuffer(e.FRAMEBUFFER,u.__webglFramebuffer),e.framebufferTexture2D(e.DRAW_FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.TEXTURE_2D,null,0);n.bindFramebuffer(e.READ_FRAMEBUFFER,u.__webglMultisampledFramebuffer);let f=t.texture.mipmaps;f&&f.length>0?n.bindFramebuffer(e.DRAW_FRAMEBUFFER,u.__webglFramebuffer[0]):n.bindFramebuffer(e.DRAW_FRAMEBUFFER,u.__webglFramebuffer);for(let n=0;n<i.length;n++){if(t.resolveDepthBuffer&&(t.depthBuffer&&(s|=e.DEPTH_BUFFER_BIT),t.stencilBuffer&&t.resolveStencilBuffer&&(s|=e.STENCIL_BUFFER_BIT)),d){e.framebufferRenderbuffer(e.READ_FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.RENDERBUFFER,u.__webglColorRen
vendor: 25,947 bytes, lines 4035-4059
4035derbuffer[n]);let t=r.get(i[n]).__webglTexture;e.framebufferTexture2D(e.DRAW_FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0)}e.blitFramebuffer(0,0,a,o,0,0,a,o,s,e.NEAREST),c===!0&&(se.length=0,ce.length=0,se.push(e.COLOR_ATTACHMENT0+n),t.depthBuffer&&t.resolveDepthBuffer===!1&&(se.push(l),ce.push(l),e.invalidateFramebuffer(e.DRAW_FRAMEBUFFER,ce)),e.invalidateFramebuffer(e.READ_FRAMEBUFFER,se))}if(n.bindFramebuffer(e.READ_FRAMEBUFFER,null),n.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),d)for(let t=0;t<i.length;t++){n.bindFramebuffer(e.FRAMEBUFFER,u.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.RENDERBUFFER,u.__webglColorRenderbuffer[t]);let a=r.get(i[t]).__webglTexture;n.bindFramebuffer(e.FRAMEBUFFER,u.__webglFramebuffer),e.framebufferTexture2D(e.DRAW_FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.TEXTURE_2D,a,0)}n.bindFramebuffer(e.DRAW_FRAMEBUFFER,u.__webglMultisampledFramebuffer)}else if(t.depthBuffer&&t.resolveDepthBuffer===!1&&c){let n=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT;e.invalidateFramebuffer(e.DRAW_FRAMEBUFFER,[n])}}}function le(e){return Math.min(i.maxSamples,e.samples)}function Y(e){let n=r.get(e);return e.samples>0&&t.has(`WEBGL_multisampled_render_to_texture`)===!0&&n.__useRenderToTexture!==!1}function ue(e){let t=o.render.frame;u.get(e)!==t&&(u.set(e,t),e.update())}function X(e,t){let n=e.colorSpace,r=e.format,i=e.type;return e.isCompressedTexture===!0||e.isVideoTexture===!0||n!==`srgb-linear`&&n!==``&&(ColorManagement.getTransfer(n)===`srgb`?(r!==1023||i!==1009)&&warn(`WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.`):error(`WebGLTextures: Unsupported texture color space:`,n)),t}function de(e){return typeof HTMLImageElement<`u`&&e instanceof HTMLImageElement?(l.width=e.naturalWidth||e.width,l.height=e.naturalHeight||e.height):typeof VideoFrame<`u`&&e instanceof VideoFrame?(l.width=e.displayWidth,l.height=e.displayHeight):(l.width=e.width,l.height=e.height),l}this.allocateTextureUnit=M,this.resetTextureUnits=j,this.setTexture2D=P,this.setTexture2DArray=F,this.setTexture3D=I,this.setTextureCube=L,this.rebindTextures=oe,this.setupRenderTarget=K,this.updateRenderTargetMipmap=q,this.updateMultisampleRenderTarget=J,this.setupDepthRenderbuffer=W,this.setupFrameBufferTexture=re,this.useMultisampledRTT=Y,this.isReversedDepthBuffer=function(){return n.buffers.depth.getReversed()}}function WebGLUtils(e,t){function n(n,r=``){let i,a=ColorManagement.getTransfer(r);if(n===1009)return e.UNSIGNED_BYTE;if(n===1017)return e.UNSIGNED_SHORT_4_4_4_4;if(n===1018)return e.UNSIGNED_SHORT_5_5_5_1;if(n===35902)return e.UNSIGNED_INT_5_9_9_9_REV;if(n===35899)return e.UNSIGNED_INT_10F_11F_11F_REV;if(n===1010)return e.BYTE;if(n===1011)return e.SHORT;if(n===1012)return e.UNSIGNED_SHORT;if(n===1013)return e.INT;if(n===1014)return e.UNSIGNED_INT;if(n===1015)return e.FLOAT;if(n===1016)return e.HALF_FLOAT;if(n===1021)return e.ALPHA;if(n===1022)return e.RGB;if(n===1023)return e.RGBA;if(n===1026)return e.DEPTH_COMPONENT;if(n===1027)return e.DEPTH_STENCIL;if(n===1028)return e.RED;if(n===1029)return e.RED_INTEGER;if(n===1030)return e.RG;if(n===1031)return e.RG_INTEGER;if(n===1033)return e.RGBA_INTEGER;if(n===33776||n===33777||n===33778||n===33779)if(a===`srgb`)if(i=t.get(`WEBGL_compressed_texture_s3tc_srgb`),i!==null){if(n===33776)return i.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===33777)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===33778)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===33779)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(i=t.get(`WEBGL_compressed_texture_s3tc`),i!==null){if(n===33776)return i.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===33777)return i.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===33778)return i.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===33779)return i.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(n===35840||n===35841||n===35842||n===35843)if(i=t.get(`WEBGL_compressed_texture_pvrtc`),i!==null){if(n===35840)return i.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===35841)return i.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===35842)return i.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===35843)return i.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(n===36196||n===37492||n===37496||n===37488||n===37489||n===37490||n===37491)if(i=t.get(`WEBGL_compressed_texture_etc`),i!==null){if(n===36196||n===37492)return a===`srgb`?i.COMPRESSED_SRGB8_ETC2:i.COMPRESSED_RGB8_ETC2;if(n===37496)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:i.COMPRESSED_RGBA8_ETC2_EAC;if(n===37488)return i.COMPRESSED_R11_EAC;if(n===37489)return i.COMPRESSED_SIGNED_R11_EAC;if(n===37490)return i.COMPRESSED_RG11_EAC;if(n===37491)return i.COMPRESSED_SIGNED_RG11_EAC}else return null;if(n===37808||n===37809||n===37810||n===37811||n===37812||n===37813||n===37814||n===37815||n===37816||n===37817||n===37818||n===37819||n===37820||n===37821)if(i=t.get(`WEBGL_compressed_texture_astc`),i!==null){if(n===37808)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:i.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===37809)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:i.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===37810)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:i.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===37811)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:i.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===37812)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:i.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===37813)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:i.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===37814)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:i.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===37815)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:i.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===37816)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:i.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===37817)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:i.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===37818)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:i.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===37819)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:i.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===37820)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:i.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===37821)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:i.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(n===36492||n===36494||n===36495)if(i=t.get(`EXT_texture_compression_bptc`),i!==null){if(n===36492)return a===`srgb`?i.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:i.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===36494)return i.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===36495)return i.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(n===36283||n===36284||n===36285||n===36286)if(i=t.get(`EXT_texture_compression_rgtc`),i!==null){if(n===36283)return i.COMPRESSED_RED_RGTC1_EXT;if(n===36284)return i.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===36285)return i.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===36286)return i.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return n===1020?e.UNSIGNED_INT_24_8:e[n]===void 0?null:e[n]}return{convert:n}}var _occlusion_vertex=` 4036void main() { 4037 4038 gl_Position = vec4( position, 1.0 ); 4039 4040}`,_occlusion_fragment=` 4041uniform sampler2DArray depthColor; 4042uniform float depthWidth; 4043uniform float depthHeight; 4044 4045void main() { 4046 4047 vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight ); 4048 4049 if ( coord.x >= 1.0 ) { 4050 4051 gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r; 4052 4053 } else { 4054 4055 gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r; 4056 4057 } 4058 4059}`,WebXRDepthSensing=class{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t){if(this.texture===null){let n=new ExternalTexture(e.texture);(e.depthNear!==t.depthNear||e.depthFar!==t.depthFar)&&(this.depthNear=e.depthNear,this.depthFar=e.depthFar),this.texture=n}}getMesh(e){if(this.texture!==null&&this.mesh===null){let t=e.cameras[0].viewport,n=new ShaderMaterial({vertexShader:_occlusion_vertex,fragmentShader:_occlusion_fragment,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new Mesh(new PlaneGeometry(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}},WebXRManager=class extends EventDispatcher{constructor(e,t){super();let n=this,r=null,i=1,a=null,o=`local-floor`,s=1,c=null,l=null,u=null,d=null,f=null,p=null,m=typeof XRWebGLBinding<`u`,g=new WebXRDepthSensing,_={},y=t.getContextAttributes(),b=null,x=null,S=[],C=[],T=new Vector2,E=null,D=new PerspectiveCamera;D.viewport=new Vector4;let O=new PerspectiveCamera;O.viewport=new Vector4;let k=[D,O],A=new ArrayCamera,j=null,M=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=S[e];return t===void 0&&(t=new WebXRController,S[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=S[e];return t===void 0&&(t=new WebXRController,S[e]=t),t.getGripSpace()},this.getHand=function(e){let t=S[e];return t===void 0&&(t=new WebXRController,S[e]=t),t.getHandSpace()};function N(e){let t=C.indexOf(e.inputSource);if(t===-1)return;let n=S[t];n!==void 0&&(n.update(e.inputSource,e.frame,c||a),n.dispatchEvent({type:e.type,data:e.inputSource}))}function P(){r.removeEventListener(`select`,N),r.removeEventListener(`selectstart`,N),r.removeEventListener(`selectend`,N),r.removeEventListener(`squeeze`,N),r.removeEventListener(`squeezestart`,N),r.removeEventListener(`squeezeend`,N),r.removeEventListener(`end`,P),r.removeEventListener(`inputsourceschange`,F);for(let e=0;e<S.length;e++){let t=C[e];t!==null&&(C[e]=null,S[e].disconnect(t))}j=null,M=null,g.reset();for(let e in _)delete _[e];e.setRenderTarget(b),f=null,d=null,u=null,r=null,x=null,H.stop(),n.isPresenting=!1,e.setPixelRatio(E),e.setSize(T.width,T.height,!1),n.dispatchEvent({type:`sessionend`})}this.setFramebufferScaleFactor=function(e){i=e,n.isPresenting===!0&&warn(`WebXRManager: Cannot change framebuffer scale while presenting.`)},this.setReferenceSpaceType=function(e){o=e,n.isPresenting===!0&&warn(`WebXRManager: Cannot change reference space type while presenting.`)},this.getReferenceSpace=function(){return c||a},this.setReferenceSpace=function(e){c=e},this.getBaseLayer=function(){return d===null?f:d},this.getBinding=function(){return u===null&&m&&(u=new XRWebGLBinding(r,t)),u},this.getFrame=function(){return p},this.getSession=function(){return r},this.setSession=async function(l){if(r=l,r!==null){if(b=e.getRenderTarget(),r.addEventListener(`select`,N),r.addEventListener(`selectstart`,N),r.addEventListener(`selectend`,N),r.addEventListener(`squeeze`,N),r.addEventListener(`squeezestart`,N),r.addEventListener(`squeezeend`,N),r.addEventListener(`end`,P),r.addEventListener(`inputsourceschange`,F),y.xrCompatible!==!0&&await t.makeXRCompatible(),E=e.getPixelRatio(),e.getSize(T),m&&`createProjectionLayer`in XRWebGLBinding.prototype){let n=null,a=null,o=null;y.depth&&(o=y.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,n=y.stencil?DepthStencilFormat:DepthFormat,a=y.stencil?UnsignedInt248Type:UnsignedIntType);let s={colorFormat:t.RGBA8,depthFormat:o,scaleFactor:i};u=this.getBinding(),d=u.createProjectionLayer(s),r.updateRenderState({layers:[d]}),e.setPixelRatio(1),e.setSize(d.textureWidth,d.textureHeight,!1),x=new WebGLRenderTarget(d.textureWidth,d.textureHeight,{format:RGBAFormat,type:UnsignedByteType,depthTexture:new DepthTexture(d.textureWidth,d.textureHeight,a,void 0,void 0,void 0,void 0,void 0,void 0,n),stencilBuffer:y.stencil,colorSpace:e.outputColorSpace,samples:y.antialias?4:0,resolveDepthBuffer:d.ignoreDepthValues===!1,resolveStencilBuffer:d.ignoreDepthValues===!1})}else{let n={antialias:y.antialias,alpha:!0,depth:y.depth,stencil:y.stencil,framebufferScaleFactor:i};f=new XRWebGLLayer(r,t,n),r.updateRenderState({baseLayer:f}),e.setPixelRatio(1),e.setSize(f.framebufferWidth,f.framebufferHeight,!1),x=new WebGLRenderTarget(f.framebufferWidth,f.framebufferHeight,{format:RGBAFormat,type:UnsignedByteType,colorSpace:e.outputColorSpace,stencilBuffer:y.stencil,resolveDepthBuffer:f.ignoreDepthValues===!1,resolveStencilBuffer:f.ignoreDepthValues===!1})}x.isXRRenderTarget=!0,this.setFoveation(s),c=null,a=await r.requestReferenceSpace(o),H.setContext(r),H.start(),n.isPresenting=!0,n.dispatchEvent({type:`sessionstart`})}},this.getEnvironmentBlendMode=function(){if(r!==null)return r.environmentBlendMode},this.getDepthTexture=function(){return g.getDepthTexture()};function F(e){for(let t=0;t<e.removed.length;t++){let n=e.removed[t],r=C.indexOf(n);r>=0&&(C[r]=null,S[r].disconnect(n))}for(let t=0;t<e.added.length;t++){let n=e.added[t],r=C.indexOf(n);if(r===-1){for(let e=0;e<S.length;e++)if(e>=C.length){C.push(n),r=e;break}else if(C[e]===null){C[e]=n,r=e;break}if(r===-1)break}let i=S[r];i&&i.connect(n)}}let I=new Vector3,L=new Vector3;function R(e,t,n){I.setFromMatrixPosition(t.matrixWorld),L.setFromMatrixPosition(n.matrixWorld);let r=I.distanceTo(L),i=t.projectionMatrix.elements,a=n.projectionMatrix.elements,o=i[14]/(i[10]-1),s=i[14]/(i[10]+1),c=(i[9]+1)/i[5],l=(i[9]-1)/i[5],u=(i[8]-1)/i[0],d=(a[8]+1)/a[0],f=o*u,p=o*d,m=r/(-u+d),g=m*-u;if(t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(g),e.translateZ(m),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.copy(e.matrixWorld).invert(),i[10]===-1)e.projectionMatrix.copy(t.projectionMatrix),e.projectionMatrixInverse.copy(t.projectionMatrixInverse);else{let t=o+m,n=s+m,i=f-g,a=p+(r-g),u=c*s/n*t,d=l*s/n*t;e.projectionMatrix.makePerspective(i,a,u,d,t,n),e.projectionMatrixInverse.copy(e.projectionMatrix).invert()}}function z(e,t){t===null?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.updateCamera=function(e){if(r===null)return;let t=e.near,n=e.far;g.texture!==null&&(g.depthNear>0&&(t=g.depthNear),g.depthFar>0&&(n=g.depthFar)),A.near=O.near=D.near=t,A.far=O.far=D.far=n,(j!==A.near||M!==A.far)&&(r.updateRenderState({depthNear:A.near,depthFar:A.far}),j=A.near,M=A.far),A.layers.mask=e.layers.mask|6,D.layers.mask=A.layers.mask&-5,O.layers.mask=A.layers.mask&-3;let i=e.parent,a=A.cameras;z(A,i);for(let e=0;e<a.length;e++)z(a[e],i);a.length===2?R(A,D,O):A.projectionMatrix.copy(D.projectionMatrix),B(e,A,i)};function B(e,t,n){n===null?e.matrix.copy(t.matrixWorld):(e.matrix.copy(n.matrixWorld),e.matrix.invert(),e.matrix.multiply(t.matrixWorld)),e.matrix.decompose(e.position,e.quaternion,e.scale),e.updateMatrixWorld(!0),e.projectionMatrix.copy(t.projectionMatrix),e.projectionMatrixInverse.copy(t.projectionMatrixInverse),e.isPerspectiveCamera&&(e.fov=RAD2DEG*2*Math.atan(1/e.projectionMatrix.elements[5]),e.zoom=1)}this.getCamera=function(){return A},this.getFoveation=function(){if(!(d===null&&f===null))return s},this.setFoveation=function(e){s=e,d!==null&&(d.fixedFoveation=e),f!==null&&f.fixedFoveation!==void 0&&(f.fixedFoveation=e)},this.hasDepthSensing=function(){return g.texture!==null},this.getDepthSensingMesh=function(){return g.getMesh(A)},this.getCameraTexture=function(e){return _[e]};let V=null;function ee(t,i){if(l=i.getViewerPose(c||a),p=i,l!==null){let t=l.views;f!==null&&(e.setRenderTargetFramebuffer(x,f.framebuffer),e.setRenderTarget(x));let i=!1;t.length!==A.cameras.length&&(A.cameras.length=0,i=!0);for(let n=0;n<t.length;n++){let r=t[n],a=null;if(f!==null)a=f.getViewport(r);else{let t=u.getViewSubImage(d,r);a=t.viewport,n===0&&(e.setRenderTargetTextures(x,t.colorTexture,t.depthStencilTexture),e.setRenderTarget(x))}let o=k[n];o===void 0&&(o=new PerspectiveCamera,o.layers.enable(n),o.viewport=new Vector4,k[n]=o),o.matrix.fromArray(r.transform.matrix),o.matrix.decompose(o.position,o.quaternion,o.scale),o.projectionMatrix.fromArray(r.projectionMatrix),o.projectionMatrixInverse.copy(o.projectionMatrix).invert(),o.viewport.set(a.x,a.y,a.width,a.height),n===0&&(A.matrix.copy(o.matrix),A.matrix.decompose(A.position,A.quaternion,A.scale)),i===!0&&A.cameras.push(o)}let a=r.enabledFeatures;if(a&&a.includes(`depth-sensing`)&&r.depthUsage==`gpu-optimized`&&m){u=n.getBinding();let e=u.getDepthInformation(t[0]);e&&e.isValid&&e.texture&&g.init(e,r.renderState)}if(a&&a.includes(`camera-access`)&&m){e.state.unbindTexture(),u=n.getBinding();for(let e=0;e<t.length;e++){let n=t[e].camera;if(n){let e=_[n];e||(e=new ExternalTexture,_[n]=e);let t=u.getCameraImage(n);e.sourceTexture=t}}}}for(let e=0;e<S.length;e++){let t=C[e],n=S[e];t!==null&&n!==void 0&&n.update(t,i,c||a)}V&&V(t,i),i.detectedPlanes&&n.dispatchEvent({type:`planesdetected`,data:i}),p=null}let H=new WebGLAnimation;H.setAnimationLoop(ee),this.setAnimationLoop=function(e){V=e},this.dispose=function(){}}},_e1=new Euler,_m1=new Matrix4;function WebGLMaterials(e,t){function n(e,t){e.matrixAutoUpdate===!0&&e.updateMatrix(),t.value.copy(e.matrix)}function r(t,n){n.color.getRGB(t.fogColor.value,getUnlitUniformColorSpace(e)),n.isFog?(t.fogNear.value=n.near,t.fogFar.value=n.far):n.isFogExp2&&(t.fogDensity.value=n.density)}function i(e,t,n,r,i){t.isMeshBasicMaterial?a(e,t):t.isMeshLambertMaterial?(a(e,t),t.envMap&&(e.envMapIntensity.value=t.envMapIntensity)):t.isMeshToonMaterial?(a(e,t),d(e,t)):t.isMeshPhongMaterial?(a(e,t),u(e,t),t.envMap&&(e.envMapIntensity.value=t.envMapIntensity)):t.isMeshStandardMaterial?(a(e,t),f(e,t),t.isMeshPhysicalMaterial&&p(e,t,i)):t.isMeshMatcapMaterial?(a(e,t),m(e,t)):t.isMeshDepthMaterial?a(e,t):t.isMeshDistanceMaterial?(a(e,t),g(e,t)):t.isMeshNormalMaterial?a(e,t):t.isLineBasicMaterial?(o(e,t),t.isLineDashedMaterial&&s(e,t)):t.isPointsMaterial?c(e,t,n,r):t.isSpriteMaterial?l(e,t):t.isShadowMaterial?(e.color.value.copy(t.color),e.opacity.value=t.opacity):t.isShaderMaterial&&(t.uniformsNeedUpdate=!1)}function a(e,r){e.opacity.value=r.opacity,r.color&&e.diffuse.value.copy(r.color),r.emissive&&e.emissive.value.copy(r.emissive).multiplyScalar(r.emissiveIntensity),r.map&&(e.map.value=r.map,n(r.map,e.mapTransform)),r.alphaMap&&(e.alphaMap.value=r.alphaMap,n(r.alphaMap,e.alphaMapTransform)),r.bumpMap&&(e.bumpMap.value=r.bumpMap,n(r.bumpMap,e.bumpMapTransform),e.bumpScale.value=r.bumpScale,r.side===1&&(e.bumpScale.value*=-1)),r.normalMap&&(e.normalMap.value=r.normalMap,n(r.normalMap,e.normalMapTransform),e.normalScale.value.copy(r.normalScale),r.side===1&&e.normalScale.value.negate()),r.displacementMap&&(e.displacementMap.value=r.displacementMap,n(r.displacementMap,e.displacementMapTransform),e.displacementScale.value=r.displacementScale,e.displacementBias.value=r.displacementBias),r.emissiveMap&&(e.emissiveMap.value=r.emissiveMap,n(r.emissiveMap,e.emissiveMapTransform)),r.specularMap&&(e.specularMap.value=r.specularMap,n(r.specularMap,e.specularMapTransform)),r.alphaTest>0&&(e.alphaTest.value=r.alphaTest);let i=t.get(r),a=i.envMap,o=i.envMapRotation;a&&(e.envMap.value=a,_e1.copy(o),_e1.x*=-1,_e1.y*=-1,_e1.z*=-1,a.isCubeTexture&&a.isRenderTargetTexture===!1&&(_e1.y*=-1,_e1.z*=-1),e.envMapRotation.value.setFromMatrix4(_m1.makeRotationFromEuler(_e1)),e.flipEnvMap.value=a.isCubeTexture&&a.isRenderTargetTexture===!1?-1:1,e.reflectivity.value=r.reflectivity,e.ior.value=r.ior,e.refractionRatio.value=r.refractionRatio),r.lightMap&&(e.lightMap.value=r.lightMap,e.lightMapIntensity.value=r.lightMapIntensity,n(r.lightMap,e.lightMapTransform)),r.aoMap&&(e.aoMap.value=r.aoMap,e.aoMapIntensity.value=r.aoMapIntensity,n(r.aoMap,e.aoMapTransform))}function o(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,t.map&&(e.map.value=t.map,n(t.map,e.mapTransform))}function s(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}function c(e,t,r,i){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*r,e.scale.value=i*.5,t.map&&(e.map.value=t.map,n(t.map,e.uvTransform)),t.alphaMap&&(e.alphaMap.value=t.alphaMap,n(t.alphaMap,e.alphaMapTransform)),t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}function l(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map,n(t.map,e.mapTransform)),t.alphaMap&&(e.alphaMap.value=t.alphaMap,n(t.alphaMap,e.alphaMapTransform)),t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}function u(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4)}function d(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap)}function f(e,t){e.metalness.value=t.metalness,t.metalnessMap&&(e.metalnessMap.value=t.metalnessMap,n(t.metalnessMap,e.metalnessMapTransform)),e.roughness.value=t.roughness,t.roughnessMap&&(e.roughnessMap.value=t.roughnessMap,n(t.roughnessMap,e.roughnessMapTransform)),t.envMap&&(e.envMapIntensity.value=t.envMapIntensity)}function p(e,t,r){e.ior.value=t.ior,t.sheen>0&&(e.sheenColor.value.copy(t.sheenColor).multiplyScalar(t.sheen),e.sheenRoughness.value=t.sheenRoughness,t.sheenColorMap&&(e.sheenColorMap.value=t.sheenColorMap,n(t.sheenColorMap,e.sheenColorMapTransform)),t.sheenRoughnessMap&&(e.sheenRoughnessMap.value=t.sheenRoughnessMap,n(t.sheenRoughnessMap,e.sheenRoughnessMapTransform))),t.clearcoat>0&&(e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap,n(t.clearcoatMap,e.clearcoatMapTransform)),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap,n(t.clearcoatRoughnessMap,e.clearcoatRoughnessMapTransform)),t.clearcoatNormalMap&&(e.clearcoatNormalMap.value=t.clearcoatNormalMap,n(t.clearcoatNormalMap,e.clearcoatNormalMapTransform),e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),t.side===1&&e.clearcoatNormalScale.value.negate())),t.dispersion>0&&(e.dispersion.value=t.dispersion),t.iridescence>0&&(e.iridescence.value=t.iridescence,e.iridescenceIOR.value=t.iridescenceIOR,e.iridescenceThicknessMinimum.value=t.iridescenceThicknessRange[0],e.iridescenceThicknessMaximum.value=t.iridescenceThicknessRange[1],t.iridescenceMap&&(e.iridescenceMap.value=t.iridescenceMap,n(t.iridescenceMap,e.iridescenceMapTransform)),t.iridescenceThicknessMap&&(e.iridescenceThicknessMap.value=t.iridescenceThicknessMap,n(t.iridescenceThicknessMap,e.iridescenceThicknessMapTransform))),t.transmission>0&&(e.transmission.value=t.transmission,e.transmissionSamplerMap.value=r.texture,e.transmissionSamplerSize.value.set(r.width,r.height),t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap,n(t.transmissionMap,e.transmissionMapTransform)),e.thickness.value=t.thickness,t.thicknessMap&&(e.thicknessMap.value=t.thicknessMap,n(t.thicknessMap,e.thicknessMapTransform)),e.attenuationDistance.value=t.attenuationDistance,e.attenuationColor.value.copy(t.attenuationColor)),t.anisotropy>0&&(e.anisotropyVector.value.set(t.anisotropy*Math.cos(t.anisotropyRotation),t.anisotropy*Math.sin(t.anisotropyRotation)),t.anisotropyMap&&(e.anisotropyMap.value=t.anisotropyMap,n(t.anisotropyMap,e.anisotropyMapTransform))),e.specularIntensity.value=t.specularIntensity,e.specularColor.value.copy(t.specularColor),t.specularColorMap&&(e.specularColorMap.value=t.specularColorMap,n(t.specularColorMap,e.specularColorMapTransform)),t.specularIntensityMap&&(e.specularIntensityMap.value=t.specularIntensityMap,n(t.specularIntensityMap,e.specularIntensityMapTransform))}function m(e,t){t.matcap&&(e.matcap.value=t.matcap)}function g(e,n){let r=t.get(n).light;e.referencePosition.value.setFromMatrixPosition(r.matrixWorld),e.nearDistance.value=r.shadow.camera.near,e.farDistance.value=r.shadow.camera.far}return{refreshFogUniforms:r,refreshMaterialUniforms:i}}function WebGLUniformsGroups(e,t,n,r){let i={},a={},o=[],s=e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS);function c(e,t){let n=t.program;r.uniformBlockBinding(e,n)}function l(e,n){let o=i[e.id];o===void 0&&(m(e),o=u(e),i[e.id]=o,e.addEventListener(`dispose`,_));let s=n.program;r.updateUBOMapping(e,s);let c=t.render.frame;a[e.id]!==c&&(f(e),a[e.id]=c)}function u(t){let n=d();t.__bindingPointIndex=n;let r=e.createBuffer(),i=t.__size,a=t.usage;return e.bindBuffer(e.UNIFORM_BUFFER,r),e.bufferData(e.UNIFORM_BUFFER,i,a),e.bindBuffer(e.UNIFORM_BUFFER,null),e.bindBufferBase(e.UNIFORM_BUFFER,n,r),r}function d(){for(let e=0;e<s;e++)if(o.indexOf(e)===-1)return o.push(e),e;return error(`WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached.`),0}function f(t){let n=i[t.id],r=t.uniforms,a=t.__cache;e.bindBuffer(e.UNIFORM_BUFFER,n);for(let t=0,n=r.length;t<n;t++){let n=Array.isArray(r[t])?r[t]:[r[t]];for(let r=0,i=n.length;r<i;r++){let i=n[r];if(p(i,t,r,a)===!0){let t=i.__offset,n=Array.isArray(i.value)?i.value:[i.value],r=0;for(let a=0;a<n.length;a++){let o=n[a],s=g(o);typeof o==`number`||typeof o==`boolean`?(i.__data[0]=o,e.bufferSubData(e.UNIFORM_BUFFER,t+r,i.__data)):o.isMatrix3?(i.__data[0]=o.elements[0],i.__data[1]=o.elements[1],i.__data[2]=o.elements[2],i.__data[3]=0,i.__data[4]=o.elements[3],i.__data[5]=o.elements[4],i.__data[6]=o.elements[5],i.__data[7]=0,i.__data[8]=o.elements[6],i.__data[9]=o.elements[7],i.__data[10]=o.elements[8],i.__data[11]=0):(o.toArray(i.__data,r),r+=s.storage/Float32Array.BYTES_PER_ELEMENT)}e.bufferSubData(e.UNIFORM_BUFFER,t,i.__data)}}}e.bindBuffer(e.UNIFORM_BUFFER,null)}function p(e,t,n,r){let i=e.value,a=t+`_`+n;if(r[a]===void 0)return typeof i==`number`||typeof i==`boolean`?r[a]=i:r[a]=i.clone(),!0;{let e=r[a];if(typeof i==`number`||typeof i==`boolean`){if(e!==i)return r[a]=i,!0}else if(e.equals(i)===!1)return e.copy(i),!0}return!1}function m(e){let t=e.uniforms,n=0,r=16;for(let e=0,r=t.length;e<r;e++){let r=Array.isArray(t[e])?t[e]:[t[e]];for(let e=0,t=r.length;e<t;e++){let t=r[e],i=Array.isArray(t.value)?t.value:[t.value];for(let e=0,r=i.length;e<r;e++){let r=i[e],a=g(r),o=n%16,s=o%a.boundary,c=o+s;n+=s,c!==0&&16-c<a.storage&&(n+=16-c),t.__data=new Float32Array(a.storage/Float32Array.BYTES_PER_ELEMENT),t.__offset=n,n+=a.storage}}}let i=n%16;return i>0&&(n+=16-i),e.__size=n,e.__cache={},this}
vendor: 1,809 bytes, line 4059
4059function g(e){let t={boundary:0,storage:0};return typeof e==`number`||typeof e==`boolean`?(t.boundary=4,t.storage=4):e.isVector2?(t.boundary=8,t.storage=8):e.isVector3||e.isColor?(t.boundary=16,t.storage=12):e.isVector4?(t.boundary=16,t.storage=16):e.isMatrix3?(t.boundary=48,t.storage=48):e.isMatrix4?(t.boundary=64,t.storage=64):e.isTexture?warn(`WebGLRenderer: Texture samplers can not be part of an uniforms group.`):warn(`WebGLRenderer: Unsupported uniform value type.`,e),t}function _(t){let n=t.target;n.removeEventListener(`dispose`,_);let r=o.indexOf(n.__bindingPointIndex);o.splice(r,1),e.deleteBuffer(i[n.id]),delete i[n.id],delete a[n.id]}function y(){for(let t in i)e.deleteBuffer(i[t]);o=[],i={},a={}}return{bind:c,update:l,dispose:y}}var 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,
vendor: 34,381 bytes, line 4059
405914942,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]),lut=null;function getDFGLUT(){return 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=!1,lut.needsUpdate=!0),lut}var WebGLRenderer=class{constructor(e={}){let{canvas:t=createCanvasElement(),context:n=null,depth:r=!0,stencil:i=!1,alpha:a=!1,antialias:o=!1,premultipliedAlpha:s=!0,preserveDrawingBuffer:c=!1,powerPreference:l=`default`,failIfMajorPerformanceCaveat:u=!1,reversedDepthBuffer:d=!1,outputBufferType:f=UnsignedByteType}=e;this.isWebGLRenderer=!0;let p;if(n!==null){if(typeof WebGLRenderingContext<`u`&&n instanceof WebGLRenderingContext)throw Error(`THREE.WebGLRenderer: WebGL 1 is not supported since r163.`);p=n.getContextAttributes().alpha}else p=a;let m=f,g=new Set([RGBAIntegerFormat,RGIntegerFormat,RedIntegerFormat]),_=new Set([UnsignedByteType,UnsignedIntType,UnsignedShortType,UnsignedInt248Type,UnsignedShort4444Type,UnsignedShort5551Type]),y=new Uint32Array(4),b=new Int32Array(4),x=null,S=null,C=[],T=[],E=null;this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.toneMapping=0,this.toneMappingExposure=1,this.transmissionResolutionScale=1;let D=this,O=!1;this._outputColorSpace=SRGBColorSpace;let k=0,A=0,j=null,M=-1,N=null,P=new Vector4,F=new Vector4,I=null,L=new Color(0),R=0,z=t.width,B=t.height,V=1,ee=null,H=null,te=new Vector4(0,0,z,B),ne=new Vector4(0,0,z,B),U=!1,re=new Frustum,ie=!1,ae=!1,W=new Matrix4,oe=new Vector3,K=new Vector4,q={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0},se=!1;function ce(){return j===null?V:1}let J=n;function le(e,n){return t.getContext(e,n)}try{let e={alpha:!0,depth:r,stencil:i,antialias:o,premultipliedAlpha:s,preserveDrawingBuffer:c,powerPreference:l,failIfMajorPerformanceCaveat:u};if(`setAttribute`in t&&t.setAttribute(`data-engine`,`three.js r183`),t.addEventListener(`webglcontextlost`,Ae,!1),t.addEventListener(`webglcontextrestored`,je,!1),t.addEventListener(`webglcontextcreationerror`,Me,!1),J===null){let t=`webgl2`;if(J=le(t,e),J===null)throw le(t)?Error(`Error creating WebGL context with your selected attributes.`):Error(`Error creating WebGL context.`)}}catch(e){throw error(`WebGLRenderer: `+e.message),e}let Y,ue,X,de,Z,Q,fe,$,pe,me,he,ge,_e,ve,ye,be,xe,Se,Ce,we,Te,Ee,De;function Oe(){Y=new WebGLExtensions(J),Y.init(),Te=new WebGLUtils(J,Y),ue=new WebGLCapabilities(J,Y,e,Te),X=new WebGLState(J,Y),ue.reversedDepthBuffer&&d&&X.buffers.depth.setReversed(!0),de=new WebGLInfo(J),Z=new WebGLProperties,Q=new WebGLTextures(J,Y,X,Z,ue,Te,de),fe=new WebGLEnvironments(D),$=new WebGLAttributes(J),Ee=new WebGLBindingStates(J,$),pe=new WebGLGeometries(J,$,de,Ee),me=new WebGLObjects(J,pe,$,Ee,de),Se=new WebGLMorphtargets(J,ue,Q),ye=new WebGLClipping(Z),he=new WebGLPrograms(D,fe,Y,ue,Ee,ye),ge=new WebGLMaterials(D,Z),_e=new WebGLRenderLists,ve=new WebGLRenderStates(Y),xe=new WebGLBackground(D,fe,X,me,p,s),be=new WebGLShadowMap(D,me,ue),De=new WebGLUniformsGroups(J,de,ue,X),Ce=new WebGLBufferRenderer(J,Y,de),we=new WebGLIndexedBufferRenderer(J,Y,de),de.programs=he.programs,D.capabilities=ue,D.extensions=Y,D.properties=Z,D.renderLists=_e,D.shadowMap=be,D.state=X,D.info=de}Oe(),m!==1009&&(E=new WebGLOutput(m,t.width,t.height,r,i));let ke=new WebXRManager(D,J);this.xr=ke,this.getContext=function(){return J},this.getContextAttributes=function(){return J.getContextAttributes()},this.forceContextLoss=function(){let e=Y.get(`WEBGL_lose_context`);e&&e.loseContext()},this.forceContextRestore=function(){let e=Y.get(`WEBGL_lose_context`);e&&e.restoreContext()},this.getPixelRatio=function(){return V},this.setPixelRatio=function(e){e!==void 0&&(V=e,this.setSize(z,B,!1))},this.getSize=function(e){return e.set(z,B)},this.setSize=function(e,n,r=!0){if(ke.isPresenting){warn(`WebGLRenderer: Can't change size while VR device is presenting.`);return}z=e,B=n,t.width=Math.floor(e*V),t.height=Math.floor(n*V),r===!0&&(t.style.width=e+`px`,t.style.height=n+`px`),E!==null&&E.setSize(t.width,t.height),this.setViewport(0,0,e,n)},this.getDrawingBufferSize=function(e){return e.set(z*V,B*V).floor()},this.setDrawingBufferSize=function(e,n,r){z=e,B=n,V=r,t.width=Math.floor(e*r),t.height=Math.floor(n*r),this.setViewport(0,0,e,n)},this.setEffects=function(e){if(m===1009){console.error(`THREE.WebGLRenderer: setEffects() requires outputBufferType set to HalfFloatType or FloatType.`);return}if(e){for(let t=0;t<e.length;t++)if(e[t].isOutputPass===!0){console.warn(`THREE.WebGLRenderer: OutputPass is not needed in setEffects(). Tone mapping and color space conversion are applied automatically.`);break}}E.setEffects(e||[])},this.getCurrentViewport=function(e){return e.copy(P)},this.getViewport=function(e){return e.copy(te)},this.setViewport=function(e,t,n,r){e.isVector4?te.set(e.x,e.y,e.z,e.w):te.set(e,t,n,r),X.viewport(P.copy(te).multiplyScalar(V).round())},this.getScissor=function(e){return e.copy(ne)},this.setScissor=function(e,t,n,r){e.isVector4?ne.set(e.x,e.y,e.z,e.w):ne.set(e,t,n,r),X.scissor(F.copy(ne).multiplyScalar(V).round())},this.getScissorTest=function(){return U},this.setScissorTest=function(e){X.setScissorTest(U=e)},this.setOpaqueSort=function(e){ee=e},this.setTransparentSort=function(e){H=e},this.getClearColor=function(e){return e.copy(xe.getClearColor())},this.setClearColor=function(){xe.setClearColor(...arguments)},this.getClearAlpha=function(){return xe.getClearAlpha()},this.setClearAlpha=function(){xe.setClearAlpha(...arguments)},this.clear=function(e=!0,t=!0,n=!0){let r=0;if(e){let e=!1;if(j!==null){let t=j.texture.format;e=g.has(t)}if(e){let e=j.texture.type,t=_.has(e),n=xe.getClearColor(),r=xe.getClearAlpha(),i=n.r,a=n.g,o=n.b;t?(y[0]=i,y[1]=a,y[2]=o,y[3]=r,J.clearBufferuiv(J.COLOR,0,y)):(b[0]=i,b[1]=a,b[2]=o,b[3]=r,J.clearBufferiv(J.COLOR,0,b))}else r|=J.COLOR_BUFFER_BIT}t&&(r|=J.DEPTH_BUFFER_BIT),n&&(r|=J.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),r!==0&&J.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener(`webglcontextlost`,Ae,!1),t.removeEventListener(`webglcontextrestored`,je,!1),t.removeEventListener(`webglcontextcreationerror`,Me,!1),xe.dispose(),_e.dispose(),ve.dispose(),Z.dispose(),fe.dispose(),me.dispose(),Ee.dispose(),De.dispose(),he.dispose(),ke.dispose(),ke.removeEventListener(`sessionstart`,ze),ke.removeEventListener(`sessionend`,Be),Ve.stop()};function Ae(e){e.preventDefault(),log(`WebGLRenderer: Context Lost.`),O=!0}function je(){log(`WebGLRenderer: Context Restored.`),O=!1;let e=de.autoReset,t=be.enabled,n=be.autoUpdate,r=be.needsUpdate,i=be.type;Oe(),de.autoReset=e,be.enabled=t,be.autoUpdate=n,be.needsUpdate=r,be.type=i}function Me(e){error(`WebGLRenderer: A WebGL context could not be created. Reason: `,e.statusMessage)}function Ne(e){let t=e.target;t.removeEventListener(`dispose`,Ne),Pe(t)}function Pe(e){Fe(e),Z.remove(e)}function Fe(e){let t=Z.get(e).programs;t!==void 0&&(t.forEach(function(e){he.releaseProgram(e)}),e.isShaderMaterial&&he.releaseShaderCache(e))}this.renderBufferDirect=function(e,t,n,r,i,a){t===null&&(t=q);let o=i.isMesh&&i.matrixWorld.determinant()<0,s=Xe(e,t,n,r,i);X.setMaterial(r,o);let c=n.index,l=1;if(r.wireframe===!0){if(c=pe.getWireframeAttribute(n),c===void 0)return;l=2}let u=n.drawRange,d=n.attributes.position,f=u.start*l,p=(u.start+u.count)*l;a!==null&&(f=Math.max(f,a.start*l),p=Math.min(p,(a.start+a.count)*l)),c===null?d!=null&&(f=Math.max(f,0),p=Math.min(p,d.count)):(f=Math.max(f,0),p=Math.min(p,c.count));let m=p-f;if(m<0||m===1/0)return;Ee.setup(i,r,s,n,c);let g,_=Ce;if(c!==null&&(g=$.get(c),_=we,_.setIndex(g)),i.isMesh)r.wireframe===!0?(X.setLineWidth(r.wireframeLinewidth*ce()),_.setMode(J.LINES)):_.setMode(J.TRIANGLES);else if(i.isLine){let e=r.linewidth;e===void 0&&(e=1),X.setLineWidth(e*ce()),i.isLineSegments?_.setMode(J.LINES):i.isLineLoop?_.setMode(J.LINE_LOOP):_.setMode(J.LINE_STRIP)}else i.isPoints?_.setMode(J.POINTS):i.isSprite&&_.setMode(J.TRIANGLES);if(i.isBatchedMesh)if(i._multiDrawInstances!==null)warnOnce(`WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection.`),_.renderMultiDrawInstances(i._multiDrawStarts,i._multiDrawCounts,i._multiDrawCount,i._multiDrawInstances);else if(Y.get(`WEBGL_multi_draw`))_.renderMultiDraw(i._multiDrawStarts,i._multiDrawCounts,i._multiDrawCount);else{let e=i._multiDrawStarts,t=i._multiDrawCounts,n=i._multiDrawCount,a=c?$.get(c).bytesPerElement:1,o=Z.get(r).currentProgram.getUniforms();for(let r=0;r<n;r++)o.setValue(J,`_gl_DrawID`,r),_.render(e[r]/a,t[r])}else if(i.isInstancedMesh)_.renderInstances(f,m,i.count);else if(n.isInstancedBufferGeometry){let e=n._maxInstanceCount===void 0?1/0:n._maxInstanceCount,t=Math.min(n.instanceCount,e);_.renderInstances(f,m,t)}else _.render(f,m)};function Ie(e,t,n){e.transparent===!0&&e.side===2&&e.forceSinglePass===!1?(e.side=1,e.needsUpdate=!0,qe(e,t,n),e.side=0,e.needsUpdate=!0,qe(e,t,n),e.side=2):qe(e,t,n)}this.compile=function(e,t,n=null){n===null&&(n=e),S=ve.get(n),S.init(t),T.push(S),n.traverseVisible(function(e){e.isLight&&e.layers.test(t.layers)&&(S.pushLight(e),e.castShadow&&S.pushShadow(e))}),e!==n&&e.traverseVisible(function(e){e.isLight&&e.layers.test(t.layers)&&(S.pushLight(e),e.castShadow&&S.pushShadow(e))}),S.setupLights();let r=new Set;return e.traverse(function(e){if(!(e.isMesh||e.isPoints||e.isLine||e.isSprite))return;let t=e.material;if(t)if(Array.isArray(t))for(let i=0;i<t.length;i++){let a=t[i];Ie(a,n,e),r.add(a)}else Ie(t,n,e),r.add(t)}),S=T.pop(),r},this.compileAsync=function(e,t,n=null){let r=this.compile(e,t,n);return new Promise(t=>{function n(){if(r.forEach(function(e){Z.get(e).currentProgram.isReady()&&r.delete(e)}),r.size===0){t(e);return}setTimeout(n,10)}Y.get(`KHR_parallel_shader_compile`)===null?setTimeout(n,10):n()})};let Le=null;function Re(e){Le&&Le(e)}function ze(){Ve.stop()}function Be(){Ve.start()}let Ve=new WebGLAnimation;Ve.setAnimationLoop(Re),typeof self<`u`&&Ve.setContext(self),this.setAnimationLoop=function(e){Le=e,ke.setAnimationLoop(e),e===null?Ve.stop():Ve.start()},ke.addEventListener(`sessionstart`,ze),ke.addEventListener(`sessionend`,Be),this.render=function(e,t){if(t!==void 0&&t.isCamera!==!0){error(`WebGLRenderer.render: camera is not an instance of THREE.Camera.`);return}if(O===!0)return;let n=ke.enabled===!0&&ke.isPresenting===!0,r=E!==null&&(j===null||n)&&E.begin(D,j);if(e.matrixWorldAutoUpdate===!0&&e.updateMatrixWorld(),t.parent===null&&t.matrixWorldAutoUpdate===!0&&t.updateMatrixWorld(),ke.enabled===!0&&ke.isPresenting===!0&&(E===null||E.isCompositing()===!1)&&(ke.cameraAutoUpdate===!0&&ke.updateCamera(t),t=ke.getCamera()),e.isScene===!0&&e.onBeforeRender(D,e,t,j),S=ve.get(e,T.length),S.init(t),T.push(S),W.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),re.setFromProjectionMatrix(W,WebGLCoordinateSystem,t.reversedDepth),ae=this.localClippingEnabled,ie=ye.init(this.clippingPlanes,ae),x=_e.get(e,C.length),x.init(),C.push(x),ke.enabled===!0&&ke.isPresenting===!0){let e=D.xr.getDepthSensingMesh();e!==null&&He(e,t,-1/0,D.sortObjects)}He(e,t,0,D.sortObjects),x.finish(),D.sortObjects===!0&&x.sort(ee,H),se=ke.enabled===!1||ke.isPresenting===!1||ke.hasDepthSensing()===!1,se&&xe.addToRenderList(x,e),this.info.render.frame++,ie===!0&&ye.beginShadows();let i=S.state.shadowsArray;if(be.render(i,e,t),ie===!0&&ye.endShadows(),this.info.autoReset===!0&&this.info.reset(),(r&&E.hasRenderPass())===!1){let n=x.opaque,r=x.transmissive;if(S.setupLights(),t.isArrayCamera){let i=t.cameras;if(r.length>0)for(let t=0,a=i.length;t<a;t++){let a=i[t];We(n,r,e,a)}se&&xe.render(e);for(let t=0,n=i.length;t<n;t++){let n=i[t];Ue(x,e,n,n.viewport)}}else r.length>0&&We(n,r,e,t),se&&xe.render(e),Ue(x,e,t)}j!==null&&A===0&&(Q.updateMultisampleRenderTarget(j),Q.updateRenderTargetMipmap(j)),r&&E.end(D),e.isScene===!0&&e.onAfterRender(D,e,t),Ee.resetDefaultState(),M=-1,N=null,T.pop(),T.length>0?(S=T[T.length-1],ie===!0&&ye.setGlobalState(D.clippingPlanes,S.state.camera)):S=null,C.pop(),x=C.length>0?C[C.length-1]:null};function He(e,t,n,r){if(e.visible===!1)return;if(e.layers.test(t.layers)){if(e.isGroup)n=e.renderOrder;else if(e.isLOD)e.autoUpdate===!0&&e.update(t);else if(e.isLight)S.pushLight(e),e.castShadow&&S.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||re.intersectsSprite(e)){r&&K.setFromMatrixPosition(e.matrixWorld).applyMatrix4(W);let t=me.update(e),i=e.material;i.visible&&x.push(e,t,i,n,K.z,null)}}else if((e.isMesh||e.isLine||e.isPoints)&&(!e.frustumCulled||re.intersectsObject(e))){let t=me.update(e),i=e.material;if(r&&(e.boundingSphere===void 0?(t.boundingSphere===null&&t.computeBoundingSphere(),K.copy(t.boundingSphere.center)):(e.boundingSphere===null&&e.computeBoundingSphere(),K.copy(e.boundingSphere.center)),K.applyMatrix4(e.matrixWorld).applyMatrix4(W)),Array.isArray(i)){let r=t.groups;for(let a=0,o=r.length;a<o;a++){let o=r[a],s=i[o.materialIndex];s&&s.visible&&x.push(e,t,s,n,K.z,o)}}else i.visible&&x.push(e,t,i,n,K.z,null)}}let i=e.children;for(let e=0,a=i.length;e<a;e++)He(i[e],t,n,r)}function Ue(e,t,n,r){let{opaque:i,transmissive:a,transparent:o}=e;S.setupLightsView(n),ie===!0&&ye.setGlobalState(D.clippingPlanes,n),r&&X.viewport(P.copy(r)),i.length>0&&Ge(i,t,n),a.length>0&&Ge(a,t,n),o.length>0&&Ge(o,t,n),X.buffers.depth.setTest(!0),X.buffers.depth.setMask(!0),X.buffers.color.setMask(!0),X.setPolygonOffset(!1)}function We(e,t,n,r){if((n.isScene===!0?n.overrideMaterial:null)!==null)return;if(S.state.transmissionRenderTarget[r.id]===void 0){let e=Y.has(`EXT_color_buffer_half_float`)||Y.has(`EXT_color_buffer_float`);S.state.transmissionRenderTarget[r.id]=new WebGLRenderTarget(1,1,{generateMipmaps:!0,type:e?HalfFloatType:UnsignedByteType,minFilter:LinearMipmapLinearFilter,samples:Math.max(4,ue.samples),stencilBuffer:i,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:ColorManagement.workingColorSpace})}let a=S.state.transmissionRenderTarget[r.id],o=r.viewport||P;a.setSize(o.z*D.transmissionResolutionScale,o.w*D.transmissionResolutionScale);let s=D.getRenderTarget(),c=D.getActiveCubeFace(),l=D.getActiveMipmapLevel();D.setRenderTarget(a),D.getClearColor(L),R=D.getClearAlpha(),R<1&&D.setClearColor(16777215,.5),D.clear(),se&&xe.render(n);let u=D.toneMapping;D.toneMapping=0;let d=r.viewport;if(r.viewport!==void 0&&(r.viewport=void 0),S.setupLightsView(r),ie===!0&&ye.setGlobalState(D.clippingPlanes,r),Ge(e,n,r),Q.updateMultisampleRenderTarget(a),Q.updateRenderTargetMipmap(a),Y.has(`WEBGL_multisampled_render_to_texture`)===!1){let e=!1;for(let i=0,a=t.length;i<a;i++){let{object:a,geometry:o,material:s,group:c}=t[i];if(s.side===2&&a.layers.test(r.layers)){let t=s.side;s.side=1,s.needsUpdate=!0,Ke(a,n,r,o,s,c),s.side=t,s.needsUpdate=!0,e=!0}}e===!0&&(Q.updateMultisampleRenderTarget(a),Q.updateRenderTargetMipmap(a))}D.setRenderTarget(s,c,l),D.setClearColor(L,R),d!==void 0&&(r.viewport=d),D.toneMapping=u}function Ge(e,t,n){let r=t.isScene===!0?t.overrideMaterial:null;for(let i=0,a=e.length;i<a;i++){let a=e[i],{object:o,geometry:s,group:c}=a,l=a.material;l.allowOverride===!0&&r!==null&&(l=r),o.layers.test(n.layers)&&Ke(o,t,n,s,l,c)}}function Ke(e,t,n,r,i,a){e.onBeforeRender(D,t,n,r,i,a),e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),i.onBeforeRender(D,t,n,r,e,a),i.transparent===!0&&i.side===2&&i.forceSinglePass===!1?(i.side=1,i.needsUpdate=!0,D.renderBufferDirect(n,t,r,i,e,a),i.side=0,i.needsUpdate=!0,D.renderBufferDirect(n,t,r,i,e,a),i.side=2):D.renderBufferDirect(n,t,r,i,e,a),e.onAfterRender(D,t,n,r,i,a)}function qe(e,t,n){t.isScene!==!0&&(t=q);let r=Z.get(e),i=S.state.lights,a=S.state.shadowsArray,o=i.state.version,s=he.getParameters(e,i.state,a,t,n),c=he.getProgramCacheKey(s),l=r.programs;r.environment=e.isMeshStandardMaterial||e.isMeshLambertMaterial||e.isMeshPhongMaterial?t.environment:null,r.fog=t.fog;let u=e.isMeshStandardMaterial||e.isMeshLambertMaterial&&!e.envMap||e.isMeshPhongMaterial&&!e.envMap;r.envMap=fe.get(e.envMap||r.environment,u),r.envMapRotation=r.environment!==null&&e.envMap===null?t.environmentRotation:e.envMapRotation,l===void 0&&(e.addEventListener(`dispose`,Ne),l=new Map,r.programs=l);let d=l.get(c);if(d!==void 0){if(r.currentProgram===d&&r.lightsStateVersion===o)return Ye(e,s),d}else s.uniforms=he.getUniforms(e),e.onBeforeCompile(s,D),d=he.acquireProgram(s,c),l.set(c,d),r.uniforms=s.uniforms;let f=r.uniforms;return(!e.isShaderMaterial&&!e.isRawShaderMaterial||e.clipping===!0)&&(f.clippingPlanes=ye.uniform),Ye(e,s),r.needsLights=Qe(e),r.lightsStateVersion=o,r.needsLights&&(f.ambientLightColor.value=i.state.ambient,f.lightProbe.value=i.state.probe,f.directionalLights.value=i.state.directional,f.directionalLightShadows.value=i.state.directionalShadow,f.spotLights.value=i.state.spot,f.spotLightShadows.value=i.state.spotShadow,f.rectAreaLights.value=i.state.rectArea,f.ltc_1.value=i.state.rectAreaLTC1,f.ltc_2.value=i.state.rectAreaLTC2,f.pointLights.value=i.state.point,f.pointLightShadows.value=i.state.pointShadow,f.hemisphereLights.value=i.state.hemi,f.directionalShadowMatrix.value=i.state.directionalShadowMatrix,f.spotLightMatrix.value=i.state.spotLightMatrix,f.spotLightMap.value=i.state.spotLightMap,f.pointShadowMatrix.value=i.state.pointShadowMatrix),r.currentProgram=d,r.uniformsList=null,d}function Je(e){if(e.uniformsList===null){let t=e.currentProgram.getUniforms();e.uniformsList=WebGLUniforms.seqWithValue(t.seq,e.uniforms)}return e.uniformsList}function Ye(e,t){let n=Z.get(e);n.outputColorSpace=t.outputColorSpace,n.batching=t.batching,n.batchingColor=t.batchingColor,n.instancing=t.instancing,n.instancingColor=t.instancingColor,n.instancingMorph=t.instancingMorph,n.skinning=t.skinning,n.morphTargets=t.morphTargets,n.morphNormals=t.morphNormals,n.morphColors=t.morphColors,n.morphTargetsCount=t.morphTargetsCount,n.numClippingPlanes=t.numClippingPlanes,n.numIntersection=t.numClipIntersection,n.vertexAlphas=t.vertexAlphas,n.vertexTangents=t.vertexTangents,n.toneMapping=t.toneMapping}function Xe(e,t,n,r,i){t.isScene!==!0&&(t=q),Q.resetTextureUnits();let a=t.fog,o=r.isMeshStandardMaterial||r.isMeshLambertMaterial||r.isMeshPhongMaterial?t.environment:null,s=j===null?D.outputColorSpace:j.isXRRenderTarget===!0?j.texture.colorSpace:LinearSRGBColorSpace,c=r.isMeshStandardMaterial||r.isMeshLambertMaterial&&!r.envMap||r.isMeshPhongMaterial&&!r.envMap,l=fe.get(r.envMap||o,c),u=r.vertexColors===!0&&!!n.attributes.color&&n.attributes.color.itemSize===4,d=!!n.attributes.tangent&&(!!r.normalMap||r.anisotropy>0),f=!!n.morphAttributes.position,p=!!n.morphAttributes.normal,m=!!n.morphAttributes.color,g=0;r.toneMapped&&(j===null||j.isXRRenderTarget===!0)&&(g=D.toneMapping);let _=n.morphAttributes.position||n.morphAttributes.normal||n.morphAttributes.color,y=_===void 0?0:_.length,b=Z.get(r),x=S.state.lights;if(ie===!0&&(ae===!0||e!==N)){let t=e===N&&r.id===M;ye.setState(r,e,t)}let C=!1;r.version===b.__version?b.needsLights&&b.lightsStateVersion!==x.state.version?C=!0:b.outputColorSpace===s?i.isBatchedMesh&&b.batching===!1||!i.isBatchedMesh&&b.batching===!0||i.isBatchedMesh&&b.batchingColor===!0&&i.colorTexture===null||i.isBatchedMesh&&b.batchingColor===!1&&i.colorTexture!==null||i.isInstancedMesh&&b.instancing===!1||!i.isInstancedMesh&&b.instancing===!0||i.isSkinnedMesh&&b.skinning===!1||!i.isSkinnedMesh&&b.skinning===!0||i.isInstancedMesh&&b.instancingColor===!0&&i.instanceColor===null||i.isInstancedMesh&&b.instancingColor===!1&&i.instanceColor!==null||i.isInstancedMesh&&b.instancingMorph===!0&&i.morphTexture===null||i.isInstancedMesh&&b.instancingMorph===!1&&i.morphTexture!==null?C=!0:b.envMap===l?r.fog===!0&&b.fog!==a||b.numClippingPlanes!==void 0&&(b.numClippingPlanes!==ye.numPlanes||b.numIntersection!==ye.numIntersection)?C=!0:b.vertexAlphas===u&&b.vertexTangents===d&&b.morphTargets===f&&b.morphNormals===p&&b.morphColors===m&&b.toneMapping===g?b.morphTargetsCount!==y&&(C=!0):C=!0:C=!0:C=!0:(C=!0,b.__version=r.version);let T=b.currentProgram;C===!0&&(T=qe(r,t,i));let E=!1,O=!1,k=!1,A=T.getUniforms(),P=b.uniforms;if(X.useProgram(T.program)&&(E=!0,O=!0,k=!0),r.id!==M&&(M=r.id,O=!0),E||N!==e){X.buffers.depth.getReversed()&&e.reversedDepth!==!0&&(e._reversedDepth=!0,e.updateProjectionMatrix()),A.setValue(J,`projectionMatrix`,e.projectionMatrix),A.setValue(J,`viewMatrix`,e.matrixWorldInverse);let t=A.map.cameraPosition;t!==void 0&&t.setValue(J,oe.setFromMatrixPosition(e.matrixWorld)),ue.logarithmicDepthBuffer&&A.setValue(J,`logDepthBufFC`,2/(Math.log(e.far+1)/Math.LN2)),(r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshLambertMaterial||r.isMeshBasicMaterial||r.isMeshStandardMaterial||r.isShaderMaterial)&&A.setValue(J,`isOrthographic`,e.isOrthographicCamera===!0),N!==e&&(N=e,O=!0,k=!0)}if(b.needsLights&&(x.state.directionalShadowMap.length>0&&A.setValue(J,`directionalShadowMap`,x.state.directionalShadowMap,Q),x.state.spotShadowMap.length>0&&A.setValue(J,`spotShadowMap`,x.state.spotShadowMap,Q),x.state.pointShadowMap.length>0&&A.setValue(J,`pointShadowMap`,x.state.pointShadowMap,Q)),i.isSkinnedMesh){A.setOptional(J,i,`bindMatrix`),A.setOptional(J,i,`bindMatrixInverse`);let e=i.skeleton;e&&(e.boneTexture===null&&e.computeBoneTexture(),A.setValue(J,`boneTexture`,e.boneTexture,Q))}i.isBatchedMesh&&(A.setOptional(J,i,`batchingTexture`),A.setValue(J,`batchingTexture`,i._matricesTexture,Q),A.setOptional(J,i,`batchingIdTexture`),A.setValue(J,`batchingIdTexture`,i._indirectTexture,Q),A.setOptional(J,i,`batchingColorTexture`),i._colorsTexture!==null&&A.setValue(J,`batchingColorTexture`,i._colorsTexture,Q));let F=n.morphAttributes;if((F.position!==void 0||F.normal!==void 0||F.color!==void 0)&&Se.update(i,n,T),(O||b.receiveShadow!==i.receiveShadow)&&(b.receiveShadow=i.receiveShadow,A.setValue(J,`receiveShadow`,i.receiveShadow)),(r.isMeshStandardMaterial||r.isMeshLambertMaterial||r.isMeshPhongMaterial)&&r.envMap===null&&t.environment!==null&&(P.envMapIntensity.value=t.environmentIntensity),P.dfgLUT!==void 0&&(P.dfgLUT.value=getDFGLUT()),O&&(A.setValue(J,`toneMappingExposure`,D.toneMappingExposure),b.needsLights&&Ze(P,k),a&&r.fog===!0&&ge.refreshFogUniforms(P,a),ge.refreshMaterialUniforms(P,r,V,B,S.state.transmissionRenderTarget[e.id]),WebGLUniforms.upload(J,Je(b),P,Q)),r.isShaderMaterial&&r.uniformsNeedUpdate===!0&&(WebGLUniforms.upload(J,Je(b),P,Q),r.uniformsNeedUpdate=!1),r.isSpriteMaterial&&A.setValue(J,`center`,i.center),A.setValue(J,`modelViewMatrix`,i.modelViewMatrix),A.setValue(J,`normalMatrix`,i.normalMatrix),A.setValue(J,`modelMatrix`,i.matrixWorld),r.isShaderMaterial||r.isRawShaderMaterial){let e=r.uniformsGroups;for(let t=0,n=e.length;t<n;t++){let n=e[t];De.update(n,T),De.bind(n,T)}}return T}function Ze(e,t){e.ambientLightColor.needsUpdate=t,e.lightProbe.needsUpdate=t,e.directionalLights.needsUpdate=t,e.directionalLightShadows.needsUpdate=t,e.pointLights.needsUpdate=t,e.pointLightShadows.needsUpdate=t,e.spotLights.needsUpdate=t,e.spotLightShadows.needsUpdate=t,e.rectAreaLights.needsUpdate=t,e.hemisphereLights.needsUpdate=t}function Qe(e){return e.isMeshLambertMaterial||e.isMeshToonMaterial||e.isMeshPhongMaterial||e.isMeshStandardMaterial||e.isShadowMaterial||e.isShaderMaterial&&e.lights===!0}this.getActiveCubeFace=function(){return k},this.getActiveMipmapLevel=function(){return A},this.getRenderTarget=function(){return j},this.setRenderTargetTextures=function(e,t,n){let r=Z.get(e);r.__autoAllocateDepthBuffer=e.resolveDepthBuffer===!1,r.__autoAllocateDepthBuffer===!1&&(r.__useRenderToTexture=!1),Z.get(e.texture).__webglTexture=t,Z.get(e.depthTexture).__webglTexture=r.__autoAllocateDepthBuffer?void 0:n,r.__hasExternalTextures=!0},this.setRenderTargetFramebuffer=function(e,t){let n=Z.get(e);n.__webglFramebuffer=t,n.__useDefaultFramebuffer=t===void 0};let $e=J.createFramebuffer();this.setRenderTarget=function(e,t=0,n=0){j=e,k=t,A=n;let r=null,i=!1,a=!1;if(e){let o=Z.get(e);if(o.__useDefaultFramebuffer!==void 0){X.bindFramebuffer(J.FRAMEBUFFER,o.__webglFramebuffer),P.copy(e.viewport),F.copy(e.scissor),I=e.scissorTest,X.viewport(P),X.scissor(F),X.setScissorTest(I),M=-1;return}else if(o.__webglFramebuffer===void 0)Q.setupRenderTarget(e);else if(o.__hasExternalTextures)Q.rebindTextures(e,Z.get(e.texture).__webglTexture,Z.get(e.depthTexture).__webglTexture);else if(e.depthBuffer){let t=e.depthTexture;if(o.__boundDepthTexture!==t){if(t!==null&&Z.has(t)&&(e.width!==t.image.width||e.height!==t.image.height))throw Error(`WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.`);Q.setupDepthRenderbuffer(e)}}let s=e.texture;(s.isData3DTexture||s.isDataArrayTexture||s.isCompressedArrayTexture)&&(a=!0);let c=Z.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(r=Array.isArray(c[t])?c[t][n]:c[t],i=!0):r=e.samples>0&&Q.useMultisampledRTT(e)===!1?Z.get(e).__webglMultisampledFramebuffer:Array.isArray(c)?c[n]:c,P.copy(e.viewport),F.copy(e.scissor),I=e.scissorTest}else P.copy(te).multiplyScalar(V).floor(),F.copy(ne).multiplyScalar(V).floor(),I=U;if(n!==0&&(r=$e),X.bindFramebuffer(J.FRAMEBUFFER,r)&&X.drawBuffers(e,r),X.viewport(P),X.scissor(F),X.setScissorTest(I),i){let r=Z.get(e.texture);J.framebufferTexture2D(J.FRAMEBUFFER,J.COLOR_ATTACHMENT0,J.TEXTURE_CUBE_MAP_POSITIVE_X+t,r.__webglTexture,n)}else if(a){let r=t;for(let t=0;t<e.textures.length;t++){let i=Z.get(e.textures[t]);J.framebufferTextureLayer(J.FRAMEBUFFER,J.COLOR_ATTACHMENT0+t,i.__webglTexture,n,r)}}else if(e!==null&&n!==0){let t=Z.get(e.texture);J.framebufferTexture2D(J.FRAMEBUFFER,J.COLOR_ATTACHMENT0,J.TEXTURE_2D,t.__webglTexture,n)}M=-1},this.readRenderTargetPixels=function(e,t,n,r,i,a,o,s=0){if(!(e&&e.isWebGLRenderTarget)){error(`WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.`);return}let c=Z.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&o!==void 0&&(c=c[o]),c){X.bindFramebuffer(J.FRAMEBUFFER,c);try{let o=e.textures[s],c=o.format,l=o.type;if(e.textures.length>1&&J.readBuffer(J.COLOR_ATTACHMENT0+s),!ue.textureFormatReadable(c)){error(`WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.`);return}if(!ue.textureTypeReadable(l)){error(`WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.`);return}t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i&&J.readPixels(t,n,r,i,Te.convert(c),Te.convert(l),a)}finally{let e=j===null?null:Z.get(j).__webglFramebuffer;X.bindFramebuffer(J.FRAMEBUFFER,e)}}},this.readRenderTargetPixelsAsync=async function(e,t,n,r,i,a,o,s=0){if(!(e&&e.isWebGLRenderTarget))throw Error(`THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.`);let c=Z.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&o!==void 0&&(c=c[o]),c)if(t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i){X.bindFramebuffer(J.FRAMEBUFFER,c);let o=e.textures[s],l=o.format,u=o.type;if(e.textures.length>1&&J.readBuffer(J.COLOR_ATTACHMENT0+s),!ue.textureFormatReadable(l))throw Error(`THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.`);if(!ue.textureTypeReadable(u))throw Error(`THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.`);let d=J.createBuffer();J.bindBuffer(J.PIXEL_PACK_BUFFER,d),J.bufferData(J.PIXEL_PACK_BUFFER,a.byteLength,J.STREAM_READ),J.readPixels(t,n,r,i,Te.convert(l),Te.convert(u),0);let f=j===null?null:Z.get(j).__webglFramebuffer;X.bindFramebuffer(J.FRAMEBUFFER,f);let p=J.fenceSync(J.SYNC_GPU_COMMANDS_COMPLETE,0);return J.flush(),await probeAsync(J,p,4),J.bindBuffer(J.PIXEL_PACK_BUFFER,d),J.getBufferSubData(J.PIXEL_PACK_BUFFER,0,a),J.deleteBuffer(d),J.deleteSync(p),a}else throw Error(`THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.`)},this.copyFramebufferToTexture=function(e,t=null,n=0){let r=2**-n,i=Math.floor(e.image.width*r),a=Math.floor(e.image.height*r),o=t===null?0:t.x,s=t===null?0:t.y;Q.setTexture2D(e,0),J.copyTexSubImage2D(J.TEXTURE_2D,n,0,0,o,s,i,a),X.unbindTexture()};let et=J.createFramebuffer(),tt=J.createFramebuffer();this.copyTextureToTexture=function(e,t,n=null,r=null,i=0,a=0){let o,s,c,l,u,d,f,p,m,g=e.isCompressedTexture?e.mipmaps[a]:e.image;if(n!==null)o=n.max.x-n.min.x,s=n.max.y-n.min.y,c=n.isBox3?n.max.z-n.min.z:1,l=n.min.x,u=n.min.y,d=n.isBox3?n.min.z:0;else{let t=2**-i;o=Math.floor(g.width*t),s=Math.floor(g.height*t),c=e.isDataArrayTexture?g.depth:e.isData3DTexture?Math.floor(g.depth*t):1,l=0,u=0,d=0}r===null?(f=0,p=0,m=0):(f=r.x,p=r.y,m=r.z);let _=Te.convert(t.format),y=Te.convert(t.type),b;t.isData3DTexture?(Q.setTexture3D(t,0),b=J.TEXTURE_3D):t.isDataArrayTexture||t.isCompressedArrayTexture?(Q.setTexture2DArray(t,0),b=J.TEXTURE_2D_ARRAY):(Q.setTexture2D(t,0),b=J.TEXTURE_2D),J.pixelStorei(J.UNPACK_FLIP_Y_WEBGL,t.flipY),J.pixelStorei(J.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.premultiplyAlpha),J.pixelStorei(J.UNPACK_ALIGNMENT,t.unpackAlignment);let x=J.getParameter(J.UNPACK_ROW_LENGTH),S=J.getParameter(J.UNPACK_IMAGE_HEIGHT),C=J.getParameter(J.UNPACK_SKIP_PIXELS),T=J.getParameter(J.UNPACK_SKIP_ROWS),E=J.getParameter(J.UNPACK_SKIP_IMAGES);J.pixelStorei(J.UNPACK_ROW_LENGTH,g.width),J.pixelStorei(J.UNPACK_IMAGE_HEIGHT,g.height),J.pixelStorei(J.UNPACK_SKIP_PIXELS,l),J.pixelStorei(J.UNPACK_SKIP_ROWS,u),J.pixelStorei(J.UNPACK_SKIP_IMAGES,d);let D=e.isDataArrayTexture||e.isData3DTexture,O=t.isDataArrayTexture||t.isData3DTexture;if(e.isDepthTexture){let n=Z.get(e),r=Z.get(t),g=Z.get(n.__renderTarget),_=Z.get(r.__renderTarget);X.bindFramebuffer(J.READ_FRAMEBUFFER,g.__webglFramebuffer),X.bindFramebuffer(J.DRAW_FRAMEBUFFER,_.__webglFramebuffer);for(let n=0;n<c;n++)D&&(J.framebufferTextureLayer(J.READ_FRAMEBUFFER,J.COLOR_ATTACHMENT0,Z.get(e).__webglTexture,i,d+n),J.framebufferTextureLayer(J.DRAW_FRAMEBUFFER,J.COLOR_ATTACHMENT0,Z.get(t).__webglTexture,a,m+n)),J.blitFramebuffer(l,u,o,s,f,p,o,s,J.DEPTH_BUFFER_BIT,J.NEAREST);X.bindFramebuffer(J.READ_FRAMEBUFFER,null),X.bindFramebuffer(J.DRAW_FRAMEBUFFER,null)}else if(i!==0||e.isRenderTargetTexture||Z.has(e)){let n=Z.get(e),r=Z.get(t);X.bindFramebuffer(J.READ_FRAMEBUFFER,et),X.bindFramebuffer(J.DRAW_FRAMEBUFFER,tt);for(let e=0;e<c;e++)D?J.framebufferTextureLayer(J.READ_FRAMEBUFFER,J.COLOR_ATTACHMENT0,n.__webglTexture,i,d+e):J.framebufferTexture2D(J.READ_FRAMEBUFFER,J.COLOR_ATTACHMENT0,J.TEXTURE_2D,n.__webglTexture,i),O?J.framebufferTextureLayer(J.DRAW_FRAMEBUFFER,J.COLOR_ATTACHMENT0,r.__webglTexture,a,m+e):J.framebufferTexture2D(J.DRAW_FRAMEBUFFER,J.COLOR_ATTACHMENT0,J.TEXTURE_2D,r.__webglTexture,a),i===0?O?J.copyTexSubImage3D(b,a,f,p,m+e,l,u,o,s):J.copyTexSubImage2D(b,a,f,p,l,u,o,s):J.blitFramebuffer(l,u,o,s,f,p,o,s,J.COLOR_BUFFER_BIT,J.NEAREST);X.bindFramebuffer(J.READ_FRAMEBUFFER,null),X.bindFramebuffer(J.DRAW_FRAMEBUFFER,null)}else O?e.isDataTexture||e.isData3DTexture?J.texSubImage3D(b,a,f,p,m,o,s,c,_,y,g.data):t.isCompressedArrayTexture?J.compressedTexSubImage3D(b,a,f,p,m,o,s,c,_,g.data):J.texSubImage3D(b,a,f,p,m,o,s,c,_,y,g):e.isDataTexture?J.texSubImage2D(J.TEXTURE_2D,a,f,p,o,s,_,y,g.data):e.isCompressedTexture?J.compressedTexSubImage2D(J.TEXTURE_2D,a,f,p,g.width,g.height,_,g.data):J.texSubImage2D(J.TEXTURE_2D,a,f,p,o,s,_,y,g);J.pixelStorei(J.UNPACK_ROW_LENGTH,x),J.pixelStorei(J.UNPACK_IMAGE_HEIGHT,S),J.pixelStorei(J.UNPACK_SKIP_PIXELS,C),J.pixelStorei(J.UNPACK_SKIP_ROWS,T),J.pixelStorei(J.UNPACK_SKIP_IMAGES,E),a===0&&t.generateMipmaps&&J.generateMipmap(b),X.unbindTexture()},this.initRenderTarget=function(e){Z.get(e).__webglFramebuffer===void 0&&Q.setupRenderTarget(e)},this.initTexture=function(e){e.isCubeTexture?Q.setTextureCube(e,0):e.isData3DTexture?Q.setTexture3D(e,0):e.isDataArrayTexture||e.isCompressedArrayTexture?Q.setTexture2DArray(e,0):Q.setTexture2D(e,0),X.unbindTexture()},this.resetState=function(){k=0,A=0,j=null,X.reset(),Ee.reset()},typeof __THREE_DEVTOOLS__<`u`&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent(`observe`,{detail:this}))}get coordinateSystem(){return WebGLCoordinateSystem}get outputColorSpace(){return this._outputColorSpace}
4059set outputColorSpace(e){this._outputColorSpace=e;let t=this.getContext();t.drawingBufferColorSpace=ColorManagement._getDrawingBufferColorSpace(e),t.unpackColorSpace=ColorManagement._getUnpackColorSpace()}};gsapWithCSS.registerPlugin(ScrollTrigger);var scene$1,camera$1,renderer$1,geometry$1,material$1,sphere$1,vertices=[],originalVertices=[],controls={totalPoints:2500,distributionConstant:(1+Math.sqrt(5))/2-1,pointSize:3,rotationSpeed:.002,pointColor:7049978,magneticRadius:200,magneticStrength:9,magneticEase:.25},mouse$1=new Vector2,raycaster=new Raycaster,planeZ=new Plane(new Vector3(0,0,1),0),intersectPoint=new Vector3,isLargeScreen=window.innerWidth>=1024;function resizeRendererToDisplaySize2(){let e=document.getElementById(`globo2`),t=e.clientWidth,n=e.clientHeight;renderer$1.setSize(t,n,!1),camera$1.aspect=t/n,camera$1.updateProjectionMatrix(),isLargeScreen=window.innerWidth>=1024}document.addEventListener(`DOMContentLoaded`,()=>{let e=document.getElementById(`globo2`);if(!e){console.warn(`[globo2.js] #globo2 non trovato nel DOM!`);return}function t(){scene$1=new Scene,camera$1=new PerspectiveCamera(75,1,.1,1e3),camera$1.position.z=500,renderer$1=new WebGLRenderer({alpha:!0,antialias:!0}),renderer$1.setClearAlpha(0),renderer$1.domElement.style.background=``,e.appendChild(renderer$1.domElement),geometry$1=new BufferGeometry,material$1=new PointsMaterial({color:16777215,size:controls.pointSize,transparent:!0,opacity:0}),sphere$1=new Points(geometry$1,material$1),scene$1.add(sphere$1),n(controls.totalPoints,controls.distributionConstant),resizeRendererToDisplaySize2(),isLargeScreen?(r(),o()):(material$1.color.set(controls.pointColor),material$1.opacity=1),i()}function n(e,t){vertices=[],originalVertices=[];for(let n=0;n<e;n++){let r=2*Math.PI*n*t,i=1-n/(e-1)*2,a=Math.sqrt(1-i*i),o=Math.cos(r)*a,s=Math.sin(r)*a;vertices.push(o*200,i*200,s*200),originalVertices.push(o*200,i*200,s*200)}geometry$1.setAttribute(`position`,new Float32BufferAttribute(vertices,3)),geometry$1.attributes.position.needsUpdate=!0}function r(){let e=document.getElementById(`globo2`);e.addEventListener(`mousemove`,t=>{let n=e.getBoundingClientRect();mouse$1.x=(t.clientX-n.left)/n.width*2-1,mouse$1.y=-((t.clientY-n.top)/n.height)*2+1})}function i(){requestAnimationFrame(i),scene$1.rotation.y+=controls.rotationSpeed,a(),renderer$1.render(scene$1,camera$1)}function a(){raycaster.setFromCamera(mouse$1,camera$1),raycaster.ray.intersectPlane(planeZ,intersectPoint);let e=geometry$1.attributes.position.array;for(let t=0;t<controls.totalPoints;t++){let n=t*3,r=new Vector3(e[n],e[n+1],e[n+2]),i=new Vector3(originalVertices[n],originalVertices[n+1],originalVertices[n+2]),a=r.distanceTo(intersectPoint);if(a<controls.magneticRadius){let e=new Vector3().subVectors(intersectPoint,r).normalize();r.add(e.multiplyScalar(controls.magneticStrength*(controls.magneticRadius-a)/controls.magneticRadius))}else r.lerp(i,controls.magneticEase);e[n]=r.x,e[n+1]=r.y,e[n+2]=r.z}geometry$1.attributes.position.needsUpdate=!0}function o(){let e={t:0};gsapWithCSS.to(e,{t:1,ease:`none`,scrollTrigger:{trigger:`.globo2-trigger`,start:`top 75%`,end:`center 25%`,scrub:1.1},onUpdate:()=>{let t=new Color(16777215),n=new Color(controls.pointColor),r=t.lerp(n,e.t);material$1.color.set(r),material$1.opacity=e.t}})}window.addEventListener(`resize`,()=>{resizeRendererToDisplaySize2(),camera$1.updateProjectionMatrix()}),t()}),document.addEventListener(`DOMContentLoaded`,()=>{let e=document.querySelector(`.accordion`);if(!e)return;let t=e.querySelectorAll(`.accordion_card`);t.length&&(t.forEach((e,t)=>{t===0?e.classList.add(`is-open`):e.classList.remove(`is-open`)}),t.forEach(e=>{let n=e.querySelector(`.accordion_card-header`);n.style.cursor=`pointer`,n.addEventListener(`click`,()=>{e.classList.contains(`is-open`)?e.classList.remove(`is-open`):(t.forEach(e=>e.classList.remove(`is-open`)),e.classList.add(`is-open`))})}))});var container=document.getElementById(`globe-container`),scene=new Scene,camera=new PerspectiveCamera(45,container.clientWidth/container.clientHeight,.1,1e3);camera.position.z=4;var renderer=new WebGLRenderer({antialias:!0,alpha:!0});renderer.setPixelRatio(Math.min(window.devicePixelRatio,2));function setRendererSize(){let e,t;window.innerWidth<900?(e=Math.max(window.innerWidth,380),t=Math.max(Math.min(window.innerHeight*.5,420),320),container.style.width=e+`px`,container.style.height=t+`px`,container.style.minWidth=`320px`,container.style.minHeight=`320px`,container.style.display=`block`):window.innerWidth>1500?(e=container.clientWidth,t=400,container.style.width=``,container.style.height=`400px`,container.style.minWidth=``,container.style.minHeight=``,container.style.display=``):(e=container.clientWidth,t=350,container.style.width=``,container.style.height=`350px`,container.style.minWidth=``,container.style.minHeight=``,container.style.display=``),renderer.setSize(e,t,!1),camera.aspect=e/t,t/e<.7?camera.fov=60:camera.fov=45,camera.updateProjectionMatrix()}setRendererSize(),camera.position.z=4,camera.lookAt(0,0,0),renderer.setClearColor(0,0),container.appendChild(renderer.domElement);var geometry=new SphereGeometry(1,128,128),material=new ShaderMaterial({transparent:!0,uniforms:{uTime:{value:0},uHover:{value:0},uDistortAmount:{value:1}},vertexShader:` 4060 uniform float uTime; 4061 uniform float uHover; 4062 uniform float uDistortAmount; 4063 varying vec2 vUv; 4064 varying float vDistortion; 4065 void main() { 4066 vUv = uv; 4067 vec3 pos = position; 4068 // MAIN WAVES (più intensi) 4069 float wave1 = sin(pos.y * 4.0 + uTime * 1.5) * 0.12; 4070 float wave2 = sin(pos.x * 5.0 + uTime * 1.2) * 0.12; 4071 // SURFACE DETAIL (più intenso) 4072 float detail = sin(pos.x * 18.0 + uTime * 3.0) * sin(pos.y * 18.0 + uTime * 2.0) * 0.06; 4073 // TOTAL DISTORTION 4074 float distortion = (wave1 + wave2 + detail) * uDistortAmount; 4075 // HOVER BOOST 4076 distortion *= (1.0 + uHover * 0.25); 4077 vDistortion = distortion; 4078 // KEEP SPHERICAL SHAPE 4079 pos += normalize(normal) * distortion; 4080 gl_Position = projectionMatrix * modelViewMatrix * vec4(pos, 1.0
4080); 4081 } 4082 `,fragmentShader:` 4083 varying vec2 vUv; 4084 varying float vDistortion; 4085 void main() { 4086 // DARK BASE solo blu 4087 vec3 baseColor = vec3(0.01, 0.08, 0.18); 4088 // GLOW COLOR: azzurro/blu se perfetta, sfuma verso viola se distorta 4089 vec3 blueColor = vec3(0.0, 0.4, 1.0); // azzurro puro 4090 vec3 violetColor = vec3(0.4, 0.2, 1.0); // viola 4091 float t = smoothstep(0.08, 0.22, abs(vDistortion)); 4092 vec3 glowColor = mix(blueColor, violetColor, t); 4093 // FRESNEL 4094 float fresnel = pow(1.0 - distance(vUv, vec2(0.5)), 2.0); 4095 // FINAL COLOR 4096 vec3 finalColor = mix(baseColor, glowColor, fresnel); 4097 // Se la sfera è perfetta (distorsione minima), niente viola 4098 if (abs(vDistortion) < 0.08) { 4099 finalColor = mix(baseColor, blueColor, fresnel); 4100 } 4101 gl_FragColor = vec4(finalColor, 0.95); 4102 } 4103 `}),sphere=new Mesh(geometry,material);scene.add(sphere);var wireMaterial=new ShaderMaterial({wireframe:!0,transparent:!0,uniforms:{uTime:{value:0},uHover:{value:0},uDistortAmount:{value:1}},vertexShader:` 4104 uniform float uTime; 4105 uniform float uHover; 4106 uniform float uDistortAmount; 4107 varying vec3 vPosition; 4108 void main() { 4109 vPosition = position; 4110 vec3 pos = position; 4111 // SAME DISTORTION (più intensi) 4112 float wave1 = sin(pos.y * 4.0 + uTime * 1.5) * 0.12; 4113 float wave2 = sin(pos.x * 5.0 + uTime * 1.2) * 0.12; 4114 float detail = sin(pos.x * 18.0 + uTime * 3.0) * sin(pos.y * 18.0 + uTime * 2.0) * 0.06; 4115 float distortion = (wave1 + wave2 + detail) * uDistortAmount; 4116 distortion *= (1.0 + uHover * 0.25); 4117 pos += normalize(normal) * distortion; 4118 gl_Position = projectionMatrix * modelViewMatrix * vec4(pos, 1.0); 4119 } 4120 `,fragmentShader:` 4121 uniform float uTime; 4122 varying vec3 vPosition; 4123 void main() { 4124 // ANIMATED COLORS solo blu/azzurro 4125 float blue = 0.7 + 0.3 * sin(uTime + vPosition.x * 3.0); 4126 float azz = 0.3 + 0.3 * sin(uTime + vPosition.y * 3.0); 4127 vec3 color = vec3(0.0, azz, blue); 4128 gl_FragColor = vec4(color, 0.5); 4129 } 4130 `}),aiSection=document.getElementById(`ai`);function updateDistortionOnScroll(){if(!aiSection)return;let e=aiSection.getBoundingClientRect(),t=window.innerHeight||document.documentElement.clientHeight,n=(e.top+e.height/2-0)/t,r=1,i=.1,a=.66;n<=i?r=0:n>=a?r=1:(r=(n-i)/(a-i),r=Math.max(0,Math.min(1,r))),material.uniforms.uDistortAmount.value=r,wireMaterial.uniforms.uDistortAmount.value=r}window.addEventListener(`scroll`,updateDistortionOnScroll),window.addEventListener(`resize`,updateDistortionOnScroll),updateDistortionOnScroll();var wireSphere=new Mesh(geometry,wireMaterial);wireSphere.scale.setScalar(1.01),scene.add(wireSphere);var mouse={x:0,y:0,targetX:0,targetY:0},isHover=!1;container.addEventListener(`mousemove`,e=>{let t=container.getBoundingClientRect(),n=(e.clientX-t.left)/t.width*2-1,r=-((e.clientY-t.top)/t.height)*2+1;mouse.targetX=n*.4,mouse.targetY=r*.4,isHover=!0}),container.addEventListener(`mouseleave`,()=>{isHover=!1});function resizeSphere(){setRendererSize(),camera.aspect=container.clientWidth/container.clientHeight,camera.position.z=4,camera.lookAt(0,0,0),camera.updateProjectionMatrix(),container.clientHeight/2;let e=.98;sphere.scale.setScalar(e),wireSphere.scale.setScalar(e*1.01)}window.addEventListener(`resize`,resizeSphere),resizeSphere();var clock=new Clock;function animate(){requestAnimationFrame(animate);let e=clock.getElapsedTime();material.uniforms.uTime.value=e,wireMaterial.uniforms.uTime.value=e,updateDistortionOnScroll();let t=+!!isHover;material.uniforms.uHover.value+=(t-material.uniforms.uHover.value)*.05,wireMaterial.uniforms.uHover.value=material.uniforms.uHover.value,mouse.x+=(mouse.targetX-mouse.x)*.05,mouse.y+=(mouse.targetY-mouse.y)*.05,sphere.rotation.y=e*.15,sphere.rotation.x=mouse.y*.2,sphere.rotation.z=mouse.x*.2,wireSphere.rotation.copy(sphere.rotation),renderer.render(scene,camera)}animate();function createButton({as:e=`a`,href:t=null,target:n=null,id:r=null,text:i=``,type:a=`button`,className:o=``}={}){let s=`btn btn-point d-flex gap-3 align-items-center ${o}
4130`.trim(),c=`<svg class="button-icon" viewBox="0 0 12 12" fill="none"><circle cx="6" cy="6" r="6" fill="#fff"/></svg>`;return e===`button`?` 4131 <div class="btn-point-container"> 4132 <button type="${a}" id="${r||``}" class="${s}"> 4133 ${c} 4134 <span>${i}</span> 4135 </button> 4136 </div> 4137 `:` 4138 <div class="btn-point-container"> 4139 <a href="${t||`#`}" target="${n||`_self`}" id="${r||``}" class="${s}"> 4140 ${c} 4141 <span class="text-nowrap">${i}</span> 4142 </a> 4143 </div> 4144 `}if(gsapWithCSS$1.registerPlugin(ScrollTrigger),window.ScrollTrigger=ScrollTrigger,window.lottie=import_lottie.default,window.innerWidth,document.addEventListener(`DOMContentLoaded`,()=>{let e=document.querySelector(`.custom-mouse`);if(!e)return;let t=window.innerWidth/2,n=window.innerHeight/2,r=t,i=n,a=.18;document.addEventListener(`mousemove`,r=>{t=r.clientX,n=r.clientY,e.style.opacity=1});function o(){r+=(t-r)*a,i+=(n-i)*a,e.style.transform=`translate(${r-9}px, ${i-9}px)`,requestAnimationFrame(o)}o(),window.addEventListener(`touchstart`,()=>{e.style.display=`none`},{once:!0})}),!document.body.classList.contains(`no-lenis`)){let e=window._lenis=new Lenis({duration:1.75,easing:e=>Math.min(1,1.001-2**(-10*e)),direction:`vertical`,gestureDirection:`vertical`,smooth:!0,mouseMultiplier:1,smoothTouch:!1,touchMultiplier:2,infinite:!1});e.on(`scroll`,ScrollTrigger.update),gsapWithCSS$1.ticker.add(t=>{e.raf(t*1e3)}),gsapWithCSS$1.ticker.lagSmoothing(0),setTimeout(()=>{window.scrollTo(0,1),window._lenis.scrollTo(1,{immediate:!0}),ScrollTrigger.refresh()},100)}window.addEventListener(`DOMContentLoaded`,()=>{document.querySelectorAll(`#hero .anim-title, #hero .anim-paragraph`).forEach(e=>{e.style.opacity=0,e.style.transform=`translateY(40px)`}),gsapWithCSS$1.utils.toArray(`.anim-title`).forEach(e=>{if(e.closest(`#hero`)){let t=e.tagName.toLowerCase()===`h1`;gsapWithCSS$1.to(e,{opacity:1,y:0,duration:.8,ease:`power2.out`,delay:t?0:.2})}else ScrollTrigger.create({trigger:e,start:`top 80%`,toggleClass:{targets:e,className:`in-view`},markers:!1,once:!0})}),gsapWithCSS$1.utils.toArray(`.anim-paragraph`).forEach(e=>{e.closest(`#hero`)?gsapWithCSS$1.to(e,{opacity:1,y:0,duration:.9,ease:`power2.out`,delay:.2}):ScrollTrigger.create({trigger:e,start:`top 85%`,toggleClass:{targets:e,className:`in-view`},markers:!1,once:!0})})}),document.getElementById(`header-btn`).innerHTML=createButton({as:`button`,href:`#contatti`,text:`Contattaci`,className:`header-btn`}),document.getElementById(`hero-btn`).innerHTML=createButton({as:`a`,href:`https://calendar.app.google/272vodKXLcbvkFM4A`,text:`Parla con un nostro esperto`,className:`my-custom-class`}),document.getElementById(`caso-studio-btn`).innerHTML=createButton({as:`a`,href:`https://www.bluemilk.it/articoli/il-tuo-sito-risponde-bene-allai`,text:`Leggi il caso studio`,className:`my-custom-class`,target:`_blank`}),document.getElementById(`contact-form-call`).innerHTML=createButton({as:`a`,href:`https://calendar.app.google/272vodKXLcbvkFM4A`,text:`Prenota una call`,className:`text-uppercase`}),document.getElementById(`contact-form-wa`).innerHTML=createButton({as:`a`,href:`https://wa.me/+393889885411`,text:`WhatsApp`,className:`text-uppercase`}),document.getElementById(`contact-form-btn`).innerHTML=createButton({as:`button`,type:`submit`,text:`Invia`,className:`my-custom-class`}),document.querySelectorAll(`.corsi-btn`).forEach(e=>{e.innerHTML=createButton({as:`a`,href:`#contatti`,text:`Fissa una call`,className:`my-custom-class mt-5`})}),[...document.querySelectorAll(`.delicate-stagger-card`)].forEach(e=>{let t=e.querySelectorAll(`.stagger-card`);gsapWithCSS$1.from(t,{y:150,autoAlpha:0,duration:1.25,stagger:.55,scrollTrigger:{trigger:e,once:!0}})});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.