"use strict";var Util=function(){};Util.isInitialized=function(t){return null!==t&&Util.isPropertyDefined(t)},Util.isPropertyDefined=function(t){return"undefined"!=typeof t},Util.parseRGB=function(t,e){for(var n=t.split(","),r=0;r<n.length;r++)n[r]=n[r].replace(/\D/g,"");return Util.isInitialized(e)&&e?[parseInt(n[0]),parseInt(n[1]),parseInt(n[2])]:new THREE.Vector3(parseInt(n[0]),parseInt(n[1]),parseInt(n[2]))},Util.toCssRGB=function(t){return"rgb("+t.x+","+t.y+","+t.z+")"},Util.tintRGB=function(t,e){return t.x=Math.round(t.x+(255-t.x)*e),t.y=Math.round(t.y+(255-t.y)*e),t.z=Math.round(t.z+(255-t.z)*e),Util.clamp(t,0,255),t},Util.clamp=function(t,e,n){if("number"==typeof t)t<e&&(t=e),t>n&&(t=n);else for(var r=0;r<t.length;r++)t[r]<e&&(t[r]=e),t[r]>n&&(t[r]=n);return t},Util.getEnumKeys=function(t){for(var e=[],n=Object.keys(t),r=0;r<n.length;r++){var i=n[r],a=t[i];"function"!=typeof a&&0!==i.indexOf("__")&&e.push(n[r])}return e},Util.keyValuesIntoArray=function(t,e){if(!Util.isInitialized(e))var e=Util.getEnumKeys(t);for(var n=[],r=0;r<e.length;r++)n.push(t[e[r]]);return n},Util.makeFirstLetterCapital=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},Util.cutPrefixFromString=function(t,e){return t.substring(e.length)},Util.getFilenameFromPath=function(t){var e=t.lastIndexOf(".");return e===-1&&(e=t.length),t.substring(t.lastIndexOf("/")+1,e)},Util.getFileExtension=function(t){var e=t.lastIndexOf(".");return e===-1?null:t.substring(e+1).toLowerCase()},Util.printArray=function(t){for(var e="",n=0;n<t.length;n++)e+=t[n]+" "},Util.generatePrivateVariablesForGetters=function(t,e){if(!Util.isInitialized(e)){var e=Util.getEnumKeys(t);t.__enumNames=e}for(var n=0;n<e.length;n++){var r=e[n],i="__"+r;t[i]=t[r]}},Util.getVariable=function(t,e){return t["__"+e]},Util.setVariable=function(t,e,n){t["__"+e]=n},Util.inheritUnchangedKeys=function(t,e){for(var n=Object.keys(e),r=Object.keys(t),i={},a=0;a<r.length;a++)i[r[a]]=t[r[a]];for(var a=0;a<n.length;a++)i[n[a]]=e[n[a]];return i},Util.degToRad=function(t){return t*Preferences.Math.DEG_TO_RAD_CONVERSION},Util.radToDeg=function(t){return t*Preferences.Math.RAD_TO_DEG_CONVERSION},Util.timeInFloatToStandardTime=function(t){var e=Math.floor(t),n=60*(t-e);return n>=60&&(n=59),24===e&&(e=23,n=59),e=e.toFixed(0),n=n.toFixed(0),e<=9&&(e="0"+e),n<=9&&(n="0"+n),[e,n]};