diff --git a/.gitignore b/.gitignore index ceafe15fc..314444280 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,4 @@ npm-debug.log* build/ *.sw[pomn] # That's /src/lib/aframe-loader-3dtiles-component.min.js -dist/48406973e3ad4d65cbdd.js* -dist/aframe-mapbox-component.min.js -dist/notyf.min.css -dist/viewer-styles.css +dist diff --git a/dist/aframe-street-component.js b/dist/aframe-street-component.js deleted file mode 100644 index c32136499..000000000 --- a/dist/aframe-street-component.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! For license information please see aframe-street-component.js.LICENSE.txt */ -!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var i=e();for(var r in i)("object"==typeof exports?exports:t)[r]=i[r]}}(self,(()=>(()=>{var t={68:t=>{var e=[new THREE.Vector2,new THREE.Vector2,new THREE.Vector2,new THREE.Vector2];function i(t,i,r,a){const n=1/a,o=1/r;return e[0].set(n*i,o*t+o),e[1].set(n*i,o*t),e[2].set(n*i+n,o*t),e[3].set(n*i+n,o*t+o),e}AFRAME.registerComponent("atlas-uvs",{dependencies:["geometry"],schema:{totalColumns:{type:"int",default:1},totalRows:{type:"int",default:1},column:{type:"int",default:1},row:{type:"int",default:1}},update:function(){const t=this.data,e=i(t.row-1,t.column-1,t.totalRows,t.totalColumns),r=this.el.getObject3D("mesh").geometry;var a=new Float32Array([e[0].x,e[0].y,e[3].x,e[3].y,e[1].x,e[1].y,e[2].x,e[2].y]);r.setAttribute("uv",new THREE.BufferAttribute(a,2)),r.uvsNeedUpdate=!0}}),AFRAME.registerComponent("dynamic-texture-atlas",{schema:{canvasId:{default:"dynamicAtlas"},canvasHeight:{default:1024},canvasWidth:{default:1024},debug:{default:!1},numColumns:{default:8},numRows:{default:8}},multiple:!0,init:function(){const t=this.canvas=document.createElement("canvas");t.id=this.data.canvasId,t.height=this.data.canvasHeight,t.width=this.data.canvasWidth,this.ctx=t.getContext("2d"),document.body.appendChild(t),this.data.debug&&(t.style.left=0,t.style.top=0,t.style.position="fixed",t.style.zIndex=9999999999)},drawTexture:function(t,e,r,a,n){const o=this.canvas,s=this.data;t.complete||(t.onload=()=>{this.drawTexture(t,e,r)});const l=n||o.height/s.numRows,c=a||o.width/s.numColumns;return this.ctx.drawImage(t,c*e,c*r,c,l),i(e,r,s.numRows,s.numColumns)}}),t.exports.getGridUvs=i},3786:(t,e,i)=>{function r(t,e){if(t){if("string"==typeof t)return a(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,r=new Array(e);i2&&void 0!==arguments[2]?arguments[2]:2.25,r=u("dividers-".concat(t,"-parent"));return s({objectMixinId:"dividers-".concat(t),parentEl:r,step:i,radius:e}),r}function m(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2.25,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"0 0 0",a=u("".concat(t,"-parent"));return s({objectMixinId:t,parentEl:a,step:i,radius:e,rotation:r}),a}function h(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1)+t)}function f(t,e){return Math.random()*(e-t)+t}function g(t,e,i){var r=Math.floor((e-t)/i)+1;return Array(r).fill().map((function(e,r){return t+r*i})).sort((function(){return.5-Math.random()}))}function y(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"random",n=arguments.length>5&&void 0!==arguments[5]&&arguments[5],o=[-.37*t,.37*t],s=g(-.5*r,.5*r,1.5),l=parseInt({empty:0,sparse:.03,normal:.125,dense:.25}[e]*r,10),c=u("pedestrians-parent");c.setAttribute("position",{y:i});for(var d=0;d3&&void 0!==arguments[3]?arguments[3]:void 0,l=t.object3D,c={start:-.5*(n=i)+.5*(o=s||(r=l,a=(new THREE.Box3).setFromObject(r),{x:a.max.x-a.min.x,y:a.max.y-a.min.y,z:a.max.z-a.min.z})[e]),end:.5*n-.5*o},d=c.start,u=c.end,p="set".concat(e.toUpperCase()),m=f(d,u);return l.position[p](m),m}function x(t,e,i,r){if(r){var a="inbound"===t[0]?0:180,n=document.createElement("a-entity");n.setAttribute("rotation","0 "+a+" 0"),n.setAttribute("mixin",e),n.setAttribute("class",e);var o=v(n,"z",i,23);return n.setAttribute("position","0 0 "+o),n}}function w(t,e,i){if(i){var r="inbound"===t[0]?0:180,a=document.createElement("a-entity"),n=document.createElement("a-entity");n.setAttribute("rotation","0 "+r+" 0"),n.setAttribute("mixin","bus");var o=v(n,"z",e,12);return n.setAttribute("position","0 0 "+o),a.append(n),a}}function A(t,e,i,r){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,n=arguments.length>5?arguments[5]:void 0,o=i/e*1e3,s="outbound"===(arguments.length>6?arguments[6]:void 0)?-i/2:i/2,l=Math.abs(s-n)/e*1e3,c={property:"position",easing:"linear",loop:"false",from:{x:r,y:a,z:n},to:{z:s},dur:l},d={property:"position",easing:"linear",loop:"true",from:{x:r,y:a,z:-s},to:{x:r,y:a,z:s},delay:l,dur:o};return t.setAttribute("animation__1",c),t.setAttribute("animation__2",d),t}function E(t,e,i){var a,n,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:void 0;if(!(arguments.length>4&&void 0!==arguments[4])||arguments[4]){var c=0,d=(n=3,function(t){if(Array.isArray(t))return t}(a=t)||function(t,e){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var r,a,n,o,s=[],l=!0,c=!1;try{if(n=(i=i.call(t)).next,0===e){if(Object(i)!==i)return;l=!1}else for(;!(l=(r=n.call(i)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,a=t}finally{try{if(!l&&null!=i.return&&(o=i.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}(a,n)||r(a,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=d[0],p=d[1],m=d[2];2===t.length&&(m=p,p=u);var h,f={inbound:0,outbound:180,sideways:{left:-90,right:90},"angled-front-left":-60,"angled-front-right":60,"angled-rear-left":-120,"angled-rear-right":120};if(h="sideways"==u?f.sideways[p]:f[u],"pedestrian"===m)return y(e,"normal",0,i,p,o);var b=document.createElement("a-entity");if(1==t.length)return b;var x={car:{mixin:"sedan-rig",wheelDiameter:.76,length:5.17,width:2},microvan:{mixin:"suv-rig",wheelDiameter:.84,length:5,width:2},truck:{mixin:"box-truck-rig",wheelDiameter:1.05,length:6.95,width:2.5},av:{mixin:"self-driving-cruise-car-rig",wheelDiameter:.76,length:5.17,width:2}};if(x[m]||(m="car"),s>1){var w=i/2,E=l/2+l,S=g(-w+E,w-E,l).slice(0,s),k="sideways"==u||u.includes("angled")?"width":"length",T=x[m][k];S.forEach((function(t){var e=l-T-.2,i=-e/2+e*Math.random();e>0&&M(t+i,m)}))}else M(void 0,m);return b}function M(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=x[arguments.length>1&&void 0!==arguments[1]?arguments[1]:"car"],r=document.createElement("a-entity");return t||(t=v(r,"z",i,e.length)),r.setAttribute("position","0 0 ".concat(t)),r.setAttribute("mixin",e.mixin),r.setAttribute("rotation","0 ".concat(h," 0")),o&&(c=5,r.setAttribute("wheel",{speed:c,wheelDiameter:e.wheelDiameter}),A(r,c,i,0,0,t,p)),b.append(r),r}}function S(t,e){var i=document.createElement("a-entity"),r=document.createElement("a-entity"),a="left"===t[0]?0:180;r.setAttribute("rotation","0 "+a+" 0"),r.setAttribute("mixin","food-trailer-rig");var n=v(r,"z",e,7);return r.setAttribute("positon","0 0 "+n),i.append(r),i}function k(t){if(t){var e=document.createElement("a-entity"),i=document.createElement("a-entity");i.setAttribute("position","0 1.75 0"),i.setAttribute("rotation","0 0 0"),i.setAttribute("mixin","magic-carpet"),e.append(i);var r=document.createElement("a-entity");return r.setAttribute("position","0 1.75 0"),r.setAttribute("rotation","0 0 0"),r.setAttribute("mixin","Character_1_M"),e.append(r),e}}function T(t,e,i){var r=e/2+e;return g(-t/2+r/2,t/2-r/2,r).slice(0,i)}function M(t,e){var i=document.createElement("a-entity");return T(t,2.27,5).forEach((function(t){var r=document.createElement("a-entity");r.setAttribute("mixin","outdoor_dining"),r.setAttribute("position",{y:e,z:t}),i.append(r)})),i}function O(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0,a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(arguments.length>4?arguments[4]:void 0){var n=document.createElement("a-entity"),o=h(2,5),s=["cyclist-cargo","cyclist1","cyclist2","cyclist3","cyclist-dutch","cyclist-kid"],l=s.length,c="Bicycle_1";return T(r,2.03,o).forEach((function(o){var d=document.createElement("a-entity"),u="inbound"===t[0]?0:180;d.setAttribute("rotation","0 "+u+" 0"),d.setAttribute("position",{y:i,z:o}),a&&(d.setAttribute("animation-mixer",""),A(d,5,r,0,i,o,t[0])),c="bike-lane"===e?s[h(0,l)]:"ElectricScooter_1",d.setAttribute("mixin",c),n.append(d)})),n}}function C(t,e){if(!(arguments.length>2&&void 0!==arguments[2])||arguments[2]){var i=document.createElement("a-entity");return T(e,5,h(2,4)).forEach((function(e){var r=document.createElement("a-entity"),a="inbound"===t[1]?0:180;r.setAttribute("rotation","0 "+a+" 0"),"taxi"===t[0]?r.setAttribute("mixin","sedan-taxi-rig"):"rideshare"===t[0]&&r.setAttribute("mixin","sedan-rig"),r.setAttribute("position",{z:e}),i.append(r)})),i}}function _(){var t=document.createElement("a-entity");return t.setAttribute("class","bench-parent"),t.setAttribute("position","0 0.2 3.5"),t}function N(t){var e=document.createElement("a-entity");return e.setAttribute("class","bikerack-parent"),e.setAttribute("position",{y:t,z:-3.5}),e}function R(t,e){var i=document.createElement("a-entity");i.setAttribute("class","bikeshare"),i.setAttribute("mixin","bikeshare");var r="left"===t[0]?90:270;return i.setAttribute("rotation","0 "+r+" 0"),i.setAttribute("position",{y:e}),i}function P(t,e){var i=document.createElement("a-entity");return T(t,4.03,3).forEach((function(t){var r=document.createElement("a-entity");r.setAttribute("class","parklet"),r.setAttribute("position",{x:0,y:.02,z:t}),r.setAttribute("mixin","parklet");var a="left"===e[0]?90:270;r.setAttribute("rotation",{y:a}),i.append(r)})),i}function L(){var t=document.createElement("a-entity");return t.setAttribute("class","tree-parent"),t.setAttribute("position","0 0.2 7"),t}function j(){var t=document.createElement("a-entity");return t.setAttribute("class","lamp-parent"),t.setAttribute("position","0 0.2 0"),t}function I(t,e){var i=document.createElement("a-entity");return i.setAttribute("class","bus-stop"),i.setAttribute("rotation","0 "+t+" 0"),i.setAttribute("mixin","bus-stop"),i.setAttribute("position",{y:e}),i}function B(){var t=document.createElement("a-entity");return t.setAttribute("class","brt-station"),t.setAttribute("mixin","brt-station"),t}function F(t,e,i,r,a){var n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,o=document.createElement("a-entity"),s=[.2,.4,.6][n];return 0===n?e=-.1:2===n&&(e=.1),o.setAttribute("geometry","primitive: box; \n height: ".concat(s,"; \n depth: ").concat(r,";\n width: ").concat(t,";")),o.setAttribute("position",{y:e}),o.setAttribute("mixin",i),0!==a.length&&o.setAttribute("material","repeat: ".concat(a[0]," ").concat(a[1])),o}function D(t,e,i,r,a){var n=document.createElement("a-entity"),o="1 "+r/150+" 1";return n.setAttribute("rotation","270 "+e+" 0"),n.setAttribute("scale",o),n.setAttribute("position","0 "+t+" 0"),n.setAttribute("mixin",i),0!==a.length&&n.setAttribute("material","repeat: ".concat(a[0]," ").concat(a[1])),n}function H(t,e){if("separator"!=t){var i=o[t];i?i.includes(e)||(STREET.notify.warningMessage("The '".concat(e,"' variant of segment '").concat(t,"' is not yet supported in 3DStreet")),console.log("The '".concat(e,"' variant of segment '").concat(t,"' is not yet supported in 3DStreet"))):(STREET.notify.warningMessage("The '".concat(t,"' segment type is not yet supported in 3DStreet")),console.log("The '".concat(t,"' segment type is not yet supported in 3DStreet")))}}t.exports.processSegments=function(t,e,i,o,c){var u=i/2;i>12&&(u=(i-12)/2),e&&(t=function(t){function e(t){return"lane"===t.slice(t.length-4)||"light-rail"===t||"streetcar"===t||"flex-zone"===t}return t.reduce((function(t,i,r,a){if(0===r)return t.concat(i);var n=a[r-1];if(e(i.type)&&e(n.type)){var o="solid";i.type===n.type&&(o="dashed"),("drive-lane"===i.type&&"turn-lane"===n.type||"drive-lane"===n.type&&"turn-lane"===i.type)&&(o="dashed"),i.variantString.split("|")[0]!==n.variantString.split("|")[0]&&(o="doubleyellow","bike-lane"===i.type&&"bike-lane"===n.type&&(o="shortdashedyellow"),"flex-zone"!==i.type&&"flex-zone"!==n.type||(o="solid")),"turn-lane"===i.type&&"shared"===i.variantString.split("|")[1]?o="soliddashedyellow":"turn-lane"===n.type&&"shared"===n.variantString.split("|")[1]&&(o="soliddashedyellowinverted"),"parking-lane"!==i.type&&"parking-lane"!==n.type||(o="invisible"),t.push({type:"separator",variantString:o,width:0,elevation:i.elevation})}return(e(i.type)&&"divider"===n.type||e(n.type)&&"divider"===i.type)&&t.push({type:"separator",variantString:"solid",width:0,elevation:i.elevation}),t.push(i),t}),[])}(t));var f,g=function(t){var e=document.createElement("a-entity"),i=0-t.reduce((function(t,e){return t+e.width}),0)/2;return e.setAttribute("position",i+" 0 0"),e}(t);g.classList.add("street-parent"),g.setAttribute("data-layer-name","Street Segments Container");for(var v,A,T,z,V=0,G=0;G{function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){for(var r=0;r\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n '),people:'\n \x3c!-- human characters --\x3e\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n '),"people-rigged":' \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n '),vehicles:'\n \x3c!-- vehicles --\x3e\n \n \n \n \x3c!-- micro mobility vehicles --\x3e\n \n \n \n '),"vehicles-rigged":'\n \x3c!-- vehicles rigged --\x3e\n \n \n \n \n \n \n \n \n '),buildings:'\n \x3c!-- blocks --\x3e\n \n \n \n\n \x3c!-- buildings and blocks --\x3e\n \n \n \n \n \n\n \x3c!-- suburban buildings --\x3e\n \n \n \n\n \x3c!-- arched style buildings --\x3e\n \n \n \n \n'),"intersection-props":'\n \n \n \n \n \n \n '),"segment-textures":' \n \x3c!-- segment mixins with textures --\x3e\n \n \n \n \n \n \n \n \n \n \n \n \n '),"segment-colors":' \n \x3c!-- segment color modifier mixins --\x3e\n \n \n \n \n ',"lane-separator":'\n \x3c!-- lane separator markings --\x3e\n \n \n \n \n \n \n \n \n '),stencils:' \n \x3c!-- stencil markings --\x3e\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n '),"vehicles-transit":'\n \x3c!-- vehicles-transit --\x3e\n \n \n \n '),dividers:'\n \x3c!-- dividers --\x3e\n \n \n \n \n \n \n \n \n \n \n \n '),sky:'\n \x3c!-- sky --\x3e\n \n \n '),grounds:'\n \x3c!-- grounds --\x3e\n \n \n \n\n \x3c!-- legacy plane-based grounds for compatibility with 0.4.2 and earlier scenes, not used for new streets --\x3e\n \n \n \n \n\n \x3c!-- new grounds for 0.4.4 and later --\x3e \n \n \n \n \n\n \n \n '),"loud-bicycle":'\n \x3c!-- loud-bicycle-game --\x3e\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ')};function a(t,e){var i=(new DOMParser).parseFromString(t,"text/html");return i.querySelectorAll("a-mixin").forEach((function(t){t.setAttribute("category",e)})),i.documentElement.innerHTML}var n=Object.keys(r);if(e){var o=e.split(" ");n=n.filter((function(t){return o.includes(t)}))}var s="";for(var l in r)n.includes(l)&&(s+=a(r[l],l));return s}(e,t);this.insertAdjacentHTML("afterend",i),AFRAME.ANode.prototype.load.call(this)}}])&&e(a.prototype,n),Object.defineProperty(a,"prototype",{writable:!1}),a;var a,n}();customElements.define("street-assets",s),document.addEventListener("DOMSubtreeModified",(function t(e){if("A-SCENE"===e.target.nodeName){var i=e.target.querySelector("a-assets");if(i||(i=document.createElement("a-assets"),e.target.append(i)),i.querySelector("street-assets"))document.removeEventListener("DOMSubtreeModified",t);else{var r=document.createElement("street-assets");i.append(r),document.removeEventListener("DOMSubtreeModified",t)}}}),!1)},6948:(t,e,i)=>{var r=i(4001);AFRAME.registerComponent("create-from-json",{schema:{jsonString:{type:"string",default:""}},update:function(t){var e=this.data,i=this.el;if(t.string&&e.string!==t.string)for(;i.firstChild;)i.removeChild(i.lastChild);r.appendChildElementsFromArray(JSON.parse(e.jsonString),i)}})},6023:()=>{var t={},e={};AFRAME.registerComponent("gltf-part",{schema:{buffer:{default:!0},part:{type:"string"},src:{type:"asset"}},init:function(){this.dracoLoader=document.querySelector("a-scene").systems["gltf-model"].getDRACOLoader()},update:function(){var t=this.el;!this.data.part&&this.data.src||this.getModel((function(e){e&&t.setObject3D("mesh",e)}))},getModel:function(i){var r=this;if(!e[this.data.src])return t[this.data.src]?t[this.data.src].then((function(t){i(r.selectFromModel(t))})):void(t[this.data.src]=new Promise((function(a){var n=new THREE.GLTFLoader;r.dracoLoader&&n.setDRACOLoader(r.dracoLoader),n.load(r.data.src,(function(n){var o=n.scene||n.scenes[0];e[r.data.src]=o,delete t[r.data.src],i(r.selectFromModel(o)),a(o)}),(function(){}),console.error)})));i(this.selectFromModel(e[this.data.src]))},selectFromModel:function(t){var e,i;if(i=t.getObjectByName(this.data.part))return e=i.getObjectByProperty("type","Mesh").clone(!0),this.data.buffer?(e.geometry=e.geometry.toNonIndexed(),e):(e.geometry=(new THREE.Geometry).fromBufferGeometry(e.geometry),e);console.error("[gltf-part] `"+this.data.part+"` not found in model.")}})},4857:(t,e,i)=>{var r=i(5165).Notyf;AFRAME.registerComponent("notify",{schema:{duration:{type:"number",default:6e3},ripple:{type:"boolean",default:!1},position:{type:"string",default:{x:"center",y:"bottom"}},dismissible:{type:"boolean",default:!1},type:{type:"string",default:"info"},message:{type:"string",default:""}},init:function(){var t=this;this.notify=new r({types:[{type:"info",background:"blue",icon:!1},{type:"warning",background:"orange",icon:!1}],duration:this.data.duration,ripple:this.data.ripple,position:this.data.position,dismissible:this.data.dismissible}),this.types=this.notify.options.types.map((function(t){return t.type})),STREET&&(STREET.notify={},STREET.notify.successMessage=function(e){t.message(e,"success")},STREET.notify.errorMessage=function(e){t.message(e,"error")},STREET.notify.warningMessage=function(e){t.message(e,"warning")})},message:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info";t&&this.types.includes(e)&&this.notify.open({type:e,message:t})},update:function(t){if(0!==Object.keys(t).length){var e=this.data.message,i=this.data.type;e&&this.types.includes(i)&&(this.message(e,i),this.data.message="")}}})},2052:()=>{AFRAME.registerComponent("wobble-normal",{schema:{},tick:function(t){this.el.components.material.material.normalMap&&(this.el.components.material.material.normalMap.offset.x+=1e-4*Math.sin(t/1e4),this.el.components.material.material.normalMap.offset.y+=1e-4*Math.cos(t/8e3),this.el.components.material.material.normalScale.x=.5+.5*Math.cos(t/1e3),this.el.components.material.material.normalScale.x=.5+.5*Math.sin(t/1200))}}),AFRAME.registerComponent("wobble-geometry",{schema:{amplitude:{default:.1},amplitudeVariance:{default:.3},speed:{default:.25},speedVariance:{default:2}},play:function(){var t=this.data,e=this.geometry=this.el.object3D.children[0].geometry;console.log(this.el.object3D.children[0].geometry),this.waves=[];var i=e.getAttribute("position");console.log(i);for(var r=0;r{function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(){"use strict";e=function(){return r};var i,r={},a=Object.prototype,n=a.hasOwnProperty,o=Object.defineProperty||function(t,e,i){t[e]=i.value},s="function"==typeof Symbol?Symbol:{},l=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",d=s.toStringTag||"@@toStringTag";function u(t,e,i){return Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(i){u=function(t,e,i){return t[e]=i}}function p(t,e,i,r){var a=e&&e.prototype instanceof v?e:v,n=Object.create(a.prototype),s=new R(r||[]);return o(n,"_invoke",{value:O(t,i,s)}),n}function m(t,e,i){try{return{type:"normal",arg:t.call(e,i)}}catch(t){return{type:"throw",arg:t}}}r.wrap=p;var h="suspendedStart",f="suspendedYield",g="executing",y="completed",b={};function v(){}function x(){}function w(){}var A={};u(A,l,(function(){return this}));var E=Object.getPrototypeOf,S=E&&E(E(P([])));S&&S!==a&&n.call(S,l)&&(A=S);var k=w.prototype=v.prototype=Object.create(A);function T(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function M(e,i){function r(a,o,s,l){var c=m(e[a],e,o);if("throw"!==c.type){var d=c.arg,u=d.value;return u&&"object"==t(u)&&n.call(u,"__await")?i.resolve(u.__await).then((function(t){r("next",t,s,l)}),(function(t){r("throw",t,s,l)})):i.resolve(u).then((function(t){d.value=t,s(d)}),(function(t){return r("throw",t,s,l)}))}l(c.arg)}var a;o(this,"_invoke",{value:function(t,e){function n(){return new i((function(i,a){r(t,e,i,a)}))}return a=a?a.then(n,n):n()}})}function O(t,e,r){var a=h;return function(n,o){if(a===g)throw Error("Generator is already running");if(a===y){if("throw"===n)throw o;return{value:i,done:!0}}for(r.method=n,r.arg=o;;){var s=r.delegate;if(s){var l=C(s,r);if(l){if(l===b)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===h)throw a=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=g;var c=m(t,e,r);if("normal"===c.type){if(a=r.done?y:f,c.arg===b)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(a=y,r.method="throw",r.arg=c.arg)}}}function C(t,e){var r=e.method,a=t.iterator[r];if(a===i)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=i,C(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),b;var n=m(a,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,b;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=i),e.delegate=null,b):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,b)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[l];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,o=function t(){for(;++a=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var l=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(l&&c){if(this.prev=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),N(i),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var r=i.completion;if("throw"===r.type){var a=r.arg;N(i)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=i),b}},r}function i(t,e,i,r,a,n,o){try{var s=t[n](o),l=s.value}catch(t){return void i(t)}s.done?e(l):Promise.resolve(l).then(r,a)}function r(t){return function(){var e=this,r=arguments;return new Promise((function(a,n){var o=t.apply(e,r);function s(t){i(o,a,n,s,l,"next",t)}function l(t){i(o,a,n,s,l,"throw",t)}s(void 0)}))}}var a;AFRAME.registerComponent("screentock",{schema:{takeScreenshot:{type:"boolean",default:!1},filename:{type:"string",default:"screenshot"},type:{type:"string",default:"jpg"},imgElementSelector:{type:"selector"}},takeScreenshotNow:(a=r(e().mark((function t(i,a,n){var o,s,l,c,d,u,p,m,h;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return p=function(t,e,i){var r=document.createElement("a"),a=e.replace(/^data:image\/[^;]/,"data:application/octet-stream");r.setAttribute("href",a),r.setAttribute("download",t),r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r)},d=function(t,e,i){t.font="25px Lato",t.textAlign="center",t.fillStyle="#FFF",t.fillText(STREET.utils.getCurrentSceneTitle(),e-e/2,i-43)},l=function(t){o&&o.opened&&(o.sceneHelpers.visible=t),t?document.querySelector("#cameraRig").setAttribute("cursor-teleport","cameraRig: #cameraRig; cameraHead: #camera;"):document.querySelector("#cameraRig").removeAttribute("cursor-teleport")},o=AFRAME.INSPECTOR,s=AFRAME.scenes[0].renderer,l(!1),c=function(){var t=r(e().mark((function t(i){var r,a;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=document.querySelector("#screenshotCanvas"))||((r=document.createElement("canvas")).id="screenshotCanvas",r.hidden=!0,document.body.appendChild(r)),r.width=i.width,r.height=i.height,(a=r.getContext("2d")).drawImage(i,0,0),d(a,r.width,r.height),t.next=9,u(a);case 9:return t.abrupt("return",r);case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),u=function(){var t=r(e().mark((function t(i){var r,a,n;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=document.querySelector("img.viewer-logo-img"),a=document.querySelector("#aframeInspector #logoImg svg"),!r){t.next=6;break}i.drawImage(r,0,0,135,43,40,30,270,86),t.next=12;break;case 6:if(!a){t.next=12;break}return(n=new Image).src="data:image/svg+xml;base64,".concat(window.btoa(a.outerHTML)),t.next=11,new Promise((function(t){n.onload=t}));case 11:i.drawImage(n,0,0,135,23,40,40,270,46);case 12:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),m=i+"."+a,s.render(AFRAME.scenes[0].object3D,AFRAME.scenes[0].camera),t.next=12,c(s.domElement);case 12:h=t.sent,"img"==a&&(n.src=h.toDataURL()),"png"==a?p(m,h.toDataURL("image/png")):"jpg"==a&&p(m,h.toDataURL("image/jpeg",.95)),l(!0);case 16:case"end":return t.stop()}}),t)}))),function(t,e,i){return a.apply(this,arguments)}),update:function(t){0!==Object.keys(t).length&&this.data.takeScreenshot&&(this.data.takeScreenshot=!1,this.takeScreenshotNow(this.data.filename,this.data.type,this.data.imgElementSelector))}})},1394:(t,e,i)=>{var r=i(2480);i(4154),AFRAME.registerComponent("streetplan-loader",{dependencies:["street"],schema:{streetplanStreetURL:{type:"string"},streetplanAPIURL:{type:"string"},streetplanEncJSON:{type:"string"},showBuildings:{default:!0},name:{default:""}},streetplanResponseParse:function(t){var e,i=this.el,a=this.data,n=t.project,o=r.convertStreetStruct(n),s=o.segments,l=o.name;o.altName,console.log("streetplanName",l);var c=this.el.sceneEl;c&&c.getAttribute("metadata")&&(e=c.getAttribute("metadata").sceneTitle),e||(c.setAttribute("metadata","sceneTitle",l),console.log("therefore setting metadata sceneTitle as streetplanName",l)),i.setAttribute("data-layer-name","StreetPlan • "+l),a.showBuildings&&(i.setAttribute("street","right",o.rightBuildingVariant),i.setAttribute("street","left",o.leftBuildingVariant)),i.setAttribute("street","type","streetmixSegmentsMetric"),i.setAttribute("street","JSON",JSON.stringify({streetmixSegmentsMetric:s})),i.emit("streetplan-loader-street-loaded")},update:function(t){var e=this,i=this.data;if(this.el,i.streetplanEncJSON){var r=decodeURIComponent(encodedString);this.streetplanResponseParse(JSON.parse(r))}else if(t.streetplanStreetURL!==i.streetplanStreetURL||t.streetplanAPIURL!==i.streetplanAPIURL){var a=new XMLHttpRequest;console.log("[streetplan-loader]","GET "+i.streetplanAPIURL),a.open("GET",i.streetplanAPIURL,!0),a.onload=function(){if(this.status>=200&&this.status<400){var t=JSON.parse(this.response);e.streetplanResponseParse(t)}else console.log("[streetplan-loader]","Loading Error: We reached the target server, but it returned an error")},a.onerror=function(){console.log("[streetplan-loader]","Loading Error: There was a connection error of some sort")},a.send()}}})},608:(t,e,i)=>{var r=i(2072).SVGLoader;AFRAME.registerComponent("svg-extruder",{schema:{svgString:{type:"string"},depth:{type:"number",default:4},bevelEnabled:{type:"boolean",default:!1},bevelThickness:{type:"number",default:1},bevelSize:{type:"number",default:1},bevelOffset:{type:"number",default:1},bevelSegments:{type:"number",default:1},topElement:{type:"boolean",default:!1},topColor:{type:"color",default:"white"},topSrc:{type:"string",default:"#grass-texture"},color:{type:"color",default:"grey"},src:{type:"string",default:""},lineColor:{type:"color",default:"black"}},init:function(){var t=this.data,e=this.el;t.svgString,t.lineColor,this.loader=new r,e.removeAttribute("material"),e.setAttribute("shadow","cast: true; receive: true")},createTopEntity:function(t){var e=this.data,i=this.el.children[0];i||((i=document.createElement("a-entity")).classList.add("topElement"),this.el.appendChild(i));var r=this.mergedGeometryFromArray(t);r.translate(0,.15,0);var a=new THREE.Mesh(r,this.materialFromSrc(e.topSrc,e.topColor));i.getObject3D("mesh")&&i.removeObject3D("mesh"),i.setObject3D("mesh",a)},materialFromSrc:function(t,e){var i=null,r=""!==t?document.querySelector(t):null;r&&((i=new THREE.Texture(r)).encoding=THREE.sRGBEncoding,i.wrapS=THREE.RepeatWrapping,i.wrapT=THREE.RepeatWrapping,i.repeat.set(.01,.01));var a=new THREE.MeshStandardMaterial({color:e,map:i,roughness:1});return a.map&&(a.map.needsUpdate=!0),a},mergedGeometryFromArray:function(t){var e=THREE.BufferGeometryUtils.mergeGeometries(t);return e.computeBoundingBox(),e.computeVertexNormals(),e.center(),e.rotateX(Math.PI/2),e.scale(.05,.05,.05),e},extrudeFromSVG:function(t){var e=this.data,i=this.el,a=this.loader.parse(t),n={depth:e.depth,bevelEnabled:e.bevelEnabled,bevelThickness:e.bevelThickness,bevelSize:e.bevelSize,bevelOffset:e.bevelOffset,bevelSegments:e.bevelSegments},o=[],s=[];a.paths.forEach((function(t){r.createShapes(t).forEach((function(t){var e=new THREE.ExtrudeGeometry(t,{depth:1,bevelEnabled:!1}),i=new THREE.ExtrudeGeometry(t,n);s.push(e),o.push(i)}))}));var l=this.mergedGeometryFromArray(o),c=new THREE.LineBasicMaterial({color:e.lineColor}),d=new THREE.EdgesGeometry(l),u=new THREE.LineSegments(d,c);i.setObject3D("lines",u);var p=new THREE.Mesh(l,this.materialFromSrc(e.src,e.color));i.getObject3D("mesh")&&i.removeObject3D("mesh"),i.setObject3D("mesh",p);var m=this.el.children[0];e.topElement?this.createTopEntity(s):m&&i.removeChild(m)},update:function(t){this.el;var e=this.data.svgString;e&&this.extrudeFromSVG(e)}})},7554:()=>{function t(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var r,a,n,o,s=[],l=!0,c=!1;try{if(n=(i=i.call(t)).next,0===e){if(Object(i)!==i)return;l=!1}else for(;!(l=(r=n.call(i)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,a=t}finally{try{if(!l&&null!=i.return&&(o=i.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}(t,e)||r(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function i(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=r(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var a=0,n=function(){};return{s:n,n:function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,l=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return s=t.done,t},e:function(t){l=!0,o=t},f:function(){try{s||null==i.return||i.return()}finally{if(l)throw o}}}}function r(t,e){if(t){if("string"==typeof t)return a(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,r=new Array(e);i=200&&this.status<400){var e=JSON.parse(this.response,(function(t,e){return"set-loader-from-hash"===t?void 0:e}));console.log("[set-loader-from-hash]","200 response received and JSON parsed, now createElementsFromJSON"),STREET.utils.createElementsFromJSON(e);var i=(r=t.match(/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/))?r[0]:null;i&&(console.log("sceneId from fetchJSON from url hash loader",i),AFRAME.scenes[0].setAttribute("metadata","sceneId",i))}else 404===this.status&&(console.error("[set-loader-from-hash] Error trying to load scene: Resource not found."),STREET.notify.errorMessage("Error trying to load scene: Resource not found."));var r},e.onerror=function(){console.error("Loading Error: There was a connection error during JSON loading"),STREET.notify.errorMessage("Could not fetch scene.")},e.send()}}),STREET.utils.inputStreetmix=function(){for(streetmixURL=prompt("Please enter a Streetmix URL","https://streetmix.net/kfarr/3/example-street"),setTimeout((function(){window.location.hash=streetmixURL})),streetContainerEl=document.getElementById("street-container");streetContainerEl.firstChild;)streetContainerEl.removeChild(streetContainerEl.lastChild);AFRAME.scenes[0].setAttribute("metadata","sceneId",""),AFRAME.scenes[0].setAttribute("metadata","sceneTitle",""),streetContainerEl.innerHTML=''},STREET.utils.createElementsFromJSON=f,STREET.utils.fileJSON=function(){var t=new FileReader;t.onload=function(){AFRAME.scenes[0].setAttribute("metadata","sceneId",""),AFRAME.scenes[0].setAttribute("metadata","sceneTitle",""),f(t.result)},t.readAsText(this.files[0])}},2072:t=>{function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var r,a,n,o,s=[],l=!0,c=!1;try{if(n=(i=i.call(t)).next,0===e){if(Object(i)!==i)return;l=!1}else for(;!(l=(r=n.call(i)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,a=t}finally{try{if(!l&&null!=i.return&&(o=i.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?r(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,r=new Array(e);i=1||b<0||b>1)return null;if(0===f&&0===g){for(var v=0;v<2;v++){if(n(0===v?a:o,t,e),r.loc==i.ORIGIN){var x=0===v?a:o;return{x:x.x,y:x.y,t:r.t}}if(r.loc==i.BETWEEN)return{x:+(s+r.t*(l-s)).toPrecision(10),y:+(u+r.t*(p-u)).toPrecision(10),t:r.t}}return null}for(var w=0;w<2;w++)if(n(0===w?a:o,t,e),r.loc==i.ORIGIN){var A=0===w?a:o;return{x:A.x,y:A.y,t:r.t}}return{x:+(s+y*(l-s)).toPrecision(10),y:+(u+y*(p-u)).toPrecision(10),t:y}}function n(t,e,a){var n,o=a.x-e.x,s=a.y-e.y,l=t.x-e.x,c=t.y-e.y,d=o*c-l*s;return t.x===e.x&&t.y===e.y?(r.loc=i.ORIGIN,void(r.t=0)):t.x===a.x&&t.y===a.y?(r.loc=i.DESTINATION,void(r.t=1)):void(d<-Number.EPSILON?r.loc=i.LEFT:d>Number.EPSILON?r.loc=i.RIGHT:o*l<0||s*c<0?r.loc=i.BEHIND:Math.sqrt(o*o+s*s)r&&(r=d.y),d.yn&&(n=d.x),d.x=l&&(o=l-1),{curves:t.curves,points:i,isCW:x.isClockWise(i),identifier:-1,boundingBox:new u(new A(l,a),new A(n,r))}}));l=l.filter((function(t){return t.points.length>1}));for(var c=0;c=l.t-Number.EPSILON}))&&(i.push(l),r.push(new A(l.x,l.y)))},c=1;c0&&u[u.length-1]===c[p].identifier?u.pop():u.push(c[p].identifier),p++;if(u.push(t.identifier),"evenodd"===n){var m=u.length%2==0,h=u[u.length-2];return{identifier:t.identifier,isHole:m,for:h}}if("nonzero"===n){for(var f=!0,g=null,y=null,b=0;b=r&&n.push(t[o]);return n.push(t[t.length-1]),n}(t)).length;if(T<2)return 0;var M,O,C,_,N,R,P=t[0].equals(t[T-1]),L=t[0],j=e.strokeWidth/2,I=1/(T-1),B=0,F=!1,D=0,H=3*s,z=2*s;K(t[0],t[1],l).multiplyScalar(j),f.copy(t[0]).sub(l),g.copy(t[0]).add(l),y.copy(f),b.copy(g);for(var V=1;VNumber.EPSILON){var Y=j/U;d.multiplyScalar(-Y),u.subVectors(M,L),p.copy(u).setLength(Y).add(d),S.copy(p).negate();var q=p.length(),W=u.length();u.divideScalar(W),m.subVectors(O,M);var X=m.length();switch(m.divideScalar(X),u.dot(S)1){var b=Math.sqrt(y);m=(e*=b)*e,h=(i*=b)*i}var v=m*g+h*f,x=(m*h-v)/v,w=Math.sqrt(Math.max(0,x));a===o&&(w=-w);var A=w*e*p/i,E=-w*i*u/e,S=Math.cos(r)*A-Math.sin(r)*E+(s.x+l.x)/2,k=Math.sin(r)*A+Math.cos(r)*E+(s.y+l.y)/2,T=n(1,0,(u-A)/e,(p-E)/i),M=n((u-A)/e,(p-E)/i,(-u-A)/e,(-p-E)/i)%(2*Math.PI);t.currentPath.absellipse(S,k,e,i,T,T+M,0===o,r)}else t.lineTo(l.x,l.y)}function n(t,e,i,r){var a=t*i+e*r,n=Math.sqrt(t*t+e*e)*Math.sqrt(i*i+r*r),o=Math.acos(Math.max(-1,Math.min(1,a/n)));return t*r-e*i<0&&(o=-o),o}function o(t,e){e=Object.assign({},e);var i={};if(t.hasAttribute("class"))for(var r=t.getAttribute("class").split(/\s/).filter(Boolean).map((function(t){return t.trim()})),a=0;aNumber.EPSILON}function h(t){var e=t.elements;return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function f(t){var e=t.elements;return Math.sqrt(e[3]*e[3]+e[4]*e[4])}var b=[],x={},w=[],k=new g,T=new g,M=new g,O=new g,C=new A,_=new E,N=new g,R=(new DOMParser).parseFromString(t,"image/svg+xml");return function t(e,r){if(1===e.nodeType){var n=function(t){if(!(t.hasAttribute("transform")||"use"===t.nodeName&&(t.hasAttribute("x")||t.hasAttribute("y"))))return null;var e=function(t){var e=new g,i=k;if("use"===t.nodeName&&(t.hasAttribute("x")||t.hasAttribute("y"))){var r=u(t.getAttribute("x")),a=u(t.getAttribute("y"));e.translate(r,a)}if(t.hasAttribute("transform"))for(var n=t.getAttribute("transform").split(")"),o=n.length-1;o>=0;o--){var s=n[o].trim();if(""!==s){var c=s.indexOf("("),d=s.length;if(c>0&&c=1){var h=m[0],f=0;m.length>=2&&(f=m[1]),i.translate(h,f)}break;case"rotate":if(m.length>=1){var y,b=0,v=0;y=m[0]*Math.PI/180,m.length>=3&&(b=m[1],v=m[2]),T.makeTranslation(-b,-v),M.makeRotation(y),O.multiplyMatrices(M,T),T.makeTranslation(b,v),i.multiplyMatrices(T,O)}break;case"scale":if(m.length>=1){var x=m[0],w=x;m.length>=2&&(w=m[1]),i.scale(x,w)}break;case"skewX":1===m.length&&i.set(1,Math.tan(m[0]*Math.PI/180),0,0,1,0,0,0,1);break;case"skewY":1===m.length&&i.set(1,0,0,Math.tan(m[0]*Math.PI/180),1,0,0,0,1);break;case"matrix":6===m.length&&i.set(m[0],m[2],m[4],m[1],m[3],m[5],0,0,1)}}e.premultiply(i)}}return e}(t);return w.length>0&&e.premultiply(w[w.length-1]),N.copy(e),w.push(e),e}(e),c=!1,d=null;switch(e.nodeName){case"svg":case"g":r=o(e,r);break;case"style":!function(t){if(t.sheet&&t.sheet.cssRules&&t.sheet.cssRules.length)for(var e=0;e0&&(i.copy(n),e.currentPath.currentPoint.copy(i),o=!0);break;default:console.warn(h)}c=!1}return e}(e));break;case"rect":r=o(e,r),d=function(t){var e=u(t.getAttribute("x")||0),i=u(t.getAttribute("y")||0),r=u(t.getAttribute("rx")||t.getAttribute("ry")||0),a=u(t.getAttribute("ry")||t.getAttribute("rx")||0),n=u(t.getAttribute("width")),o=u(t.getAttribute("height")),s=.448084975506,l=new v;return l.moveTo(e+r,i),l.lineTo(e+n-r,i),(0!==r||0!==a)&&l.bezierCurveTo(e+n-r*s,i,e+n,i+a*s,e+n,i+a),l.lineTo(e+n,i+o-a),(0!==r||0!==a)&&l.bezierCurveTo(e+n,i+o-a*s,e+n-r*s,i+o,e+n-r,i+o),l.lineTo(e+r,i+o),(0!==r||0!==a)&&l.bezierCurveTo(e+r*s,i+o,e,i+o-a*s,e,i+o-a),l.lineTo(e,i+a),(0!==r||0!==a)&&l.bezierCurveTo(e,i+a*s,e+r*s,i,e+r,i),l}(e);break;case"polygon":r=o(e,r),d=function(t){var e=new v,i=0;return t.getAttribute("points").replace(/([+-]?\d*\.?\d+(?:e[+-]?\d+)?)(?:,|\s)([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/g,(function(t,r,a){var n=u(r),o=u(a);0===i?e.moveTo(n,o):e.lineTo(n,o),i++})),e.currentPath.autoClose=!0,e}(e);break;case"polyline":r=o(e,r),d=function(t){var e=new v,i=0;return t.getAttribute("points").replace(/([+-]?\d*\.?\d+(?:e[+-]?\d+)?)(?:,|\s)([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/g,(function(t,r,a){var n=u(r),o=u(a);0===i?e.moveTo(n,o):e.lineTo(n,o),i++})),e.currentPath.autoClose=!1,e}(e);break;case"circle":r=o(e,r),d=function(t){var e=u(t.getAttribute("cx")||0),i=u(t.getAttribute("cy")||0),r=u(t.getAttribute("r")||0),a=new y;a.absarc(e,i,r,0,2*Math.PI);var n=new v;return n.subPaths.push(a),n}(e);break;case"ellipse":r=o(e,r),d=function(t){var e=u(t.getAttribute("cx")||0),i=u(t.getAttribute("cy")||0),r=u(t.getAttribute("rx")||0),a=u(t.getAttribute("ry")||0),n=new y;n.absellipse(e,i,r,a,0,2*Math.PI);var o=new v;return o.subPaths.push(n),o}(e);break;case"line":r=o(e,r),d=function(t){var e=u(t.getAttribute("x1")||0),i=u(t.getAttribute("y1")||0),r=u(t.getAttribute("x2")||0),a=u(t.getAttribute("y2")||0),n=new v;return n.moveTo(e,i),n.lineTo(r,a),n.currentPath.autoClose=!1,n}(e);break;case"defs":c=!0;break;case"use":r=o(e,r);var R=(e.getAttributeNS("http://www.w3.org/1999/xlink","href")||"").substring(1),P=e.viewportElement.getElementById(R);P?t(P,r):console.warn("SVGLoader: 'use node' references non-existent node id: "+R)}d&&(void 0!==r.fill&&"none"!==r.fill&&d.color.setStyle(r.fill,S),function(t,e){function i(t){_.set(t.x,t.y,1).applyMatrix3(e),t.set(_.x,_.y)}function r(t){var i,r,a,n,o,s,l,c,d,u,m,h=t.xRadius,f=t.yRadius,g=Math.cos(t.aRotation),y=Math.sin(t.aRotation),b=new E(h*g,h*y,0),v=new E(-f*y,f*g,0),x=b.applyMatrix3(e),w=v.applyMatrix3(e),A=k.set(x.x,w.x,0,x.y,w.y,0,0,0,1),S=T.copy(A).invert(),O=M.copy(S).transpose().multiply(S).elements,C=(i=O[0],r=O[1],d=i+(a=O[4]),u=i-a,m=Math.sqrt(u*u+4*r*r),d>0?o=i*(c=1/(n=.5*(d+m)))*a-r*c*r:d<0?o=.5*(d-m):(n=.5*m,o=-.5*m),s=u>0?u+m:u-m,Math.abs(s)>2*Math.abs(r)?s=(c=-2*r/s)*(l=1/Math.sqrt(1+c*c)):0===Math.abs(r)?(s=1,l=0):l=(c=-.5*s/r)*(s=1/Math.sqrt(1+c*c)),u>0&&(c=s,s=-l,l=c),{rt1:n,rt2:o,cs:s,sn:l}),_=Math.sqrt(C.rt1),N=Math.sqrt(C.rt2);if(t.xRadius=1/_,t.yRadius=1/N,t.aRotation=Math.atan2(C.sn,C.cs),!((t.aEndAngle-t.aStartAngle)%(2*Math.PI)Number.EPSILON?Math.atan2(e.elements[1],e.elements[0]):Math.atan2(-e.elements[3],e.elements[4]);t.aRotation+=a,p(e)&&(t.aStartAngle*=-1,t.aEndAngle*=-1,t.aClockwise=!t.aClockwise)}for(var n=t.subPaths,o=0,s=n.length;o0?N.copy(w[w.length-1]):N.identity())}}(R.documentElement,{fill:"#000",fillOpacity:1,strokeOpacity:1,strokeWidth:1,strokeLineJoin:"miter",strokeLineCap:"butt",strokeMiterLimit:4}),{paths:b,xml:R.documentElement}}}])&&a(n.prototype,s),l&&a(n,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,s,l}(f);t.exports={SVGLoader:k}},7866:function(t,e,i){var r,a,n,o;function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}t=i.nmd(t),o=function(){return function(t){var e={};function i(r){if(e[r])return e[r].exports;var a=e[r]={i:r,l:!1,exports:{}};return t[r].call(a.exports,a,a.exports,i),a.l=!0,a.exports}return i.m=t,i.c=e,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==s(t)&&t&&t.__esModule)return t;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)i.d(r,a,function(e){return t[e]}.bind(null,a));return r},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=0)}([function(t,e){if("undefined"==typeof AFRAME)throw new Error("Component attempted to register before AFRAME was available.");AFRAME.registerComponent("cursor-teleport",{schema:{cameraHead:{type:"selector",default:""},cameraRig:{type:"selector",default:""},collisionEntities:{type:"string",default:""},ignoreEntities:{type:"string",default:""},landingMaxAngle:{default:45,min:0,max:360},landingNormal:{type:"vec3",default:{x:0,y:1,z:0}},transitionSpeed:{type:"number",default:6e-4}},init:function(){var t=this;this.mobile=AFRAME.utils.device.isMobile();var e=this.el.sceneEl;this.canvas=e.renderer.domElement,this.data.cameraHead.object3D.traverse((function(e){e instanceof THREE.Camera&&(t.cam=e)})),this.camRig=this.data.cameraRig.object3D,this.rayCaster=new THREE.Raycaster,this.referenceNormal=new THREE.Vector3,this.rayCastObjects=[],this.referenceNormal.copy(this.data.landingNormal);var i=new THREE.RingGeometry(.25,.3,32,1);i.rotateX(-Math.PI/2),i.translate(0,.02,0);var r=new THREE.MeshBasicMaterial({color:7818734}),a=new THREE.Mesh(i,r),n=new THREE.CylinderGeometry(.3,.3,.5,32,1,!0);n.translate(0,.25,0);var o=(new THREE.TextureLoader).load("data:image/png;base64,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"),s=new THREE.MeshBasicMaterial({color:7818734,side:"double",map:o,transparent:!0,depthTest:!1}),l=new THREE.Mesh(n,s),c=new THREE.Group;c.add(a),c.add(l),this.teleportIndicator=c,e.object3D.add(this.teleportIndicator),this.transitioning=!1,this.transitionProgress=0,this.transitionCamPosStart=new THREE.Vector3,this.transitionCamPosEnd=new THREE.Vector3,this.updateRaycastObjects=this.updateRaycastObjects.bind(this),this.getMouseState=this.getMouseState.bind(this),this.getTeleportPosition=this.getTeleportPosition.bind(this),this.isValidNormalsAngle=this.isValidNormalsAngle.bind(this),this.transition=this.transition.bind(this),this.mouseMove=this.mouseMove.bind(this),this.mouseDown=this.mouseDown.bind(this),this.mouseUp=this.mouseUp.bind(this),this.easeInOutQuad=this.easeInOutQuad.bind(this),this.updateRaycastObjects()},remove:function(){this.cam=null,this.canvas=null,this.rayCastObjects.length=0,this.el.sceneEl.object3D.remove(this.teleportIndicator),this.teleportIndicator.children[0].material.dispose(),this.teleportIndicator.children[0].geometry.dispose(),this.teleportIndicator.children[1].material.dispose(),this.teleportIndicator.children[1].geometry.dispose(),this.teleportIndicator=null,this.collisionMesh&&(this.collisionMesh.geometry.dispose(),this.collisionMesh.material.dispose(),this.collisionMesh=null)},play:function(){var t=this.canvas;t.addEventListener("mousedown",this.mouseDown,!1),t.addEventListener("mousemove",this.mouseMove,!1),t.addEventListener("mouseup",this.mouseUp,!1),t.addEventListener("touchstart",this.mouseDown,!1),t.addEventListener("touchmove",this.mouseMove,!1),t.addEventListener("touchend",this.mouseUp,!1)},pause:function(){var t=this.canvas;t.removeEventListener("mousedown",this.mouseDown),t.removeEventListener("mousemove",this.mouseMove),t.removeEventListener("mouseup",this.mouseUp),t.removeEventListener("touchstart",this.mouseDown),t.removeEventListener("touchmove",this.mouseMove),t.removeEventListener("touchend",this.mouseUp)},updateRaycastObjects:function(){var t=this;if(this.rayCastObjects.length=0,""!==this.data.collisionEntities)this.el.sceneEl.querySelectorAll(this.data.collisionEntities).forEach((function(e){e.object3D.traverse((function(e){e.isMesh&&(e.userData.collision=!0,t.rayCastObjects.push(e))}))}));else{if(!this.collisionMesh){var e=new THREE.PlaneGeometry(500,500,1);e.rotateX(-Math.PI/2);var i=new THREE.MeshNormalMaterial,r=new THREE.Mesh(e,i);r.userData.collision=!0,this.collisionMesh=r}this.rayCastObjects.push(this.collisionMesh)}""!==this.data.ignoreEntities&&this.el.sceneEl.querySelectorAll(this.data.ignoreEntities).forEach((function(e){e.object3D.traverse((function(e){e.isMesh&&t.rayCastObjects.push(e)}))}))},getMouseState:function(){var t=new THREE.Vector2;return function(e){var i=this.canvas.getBoundingClientRect();return null!=e.clientX?(t.x=e.clientX-i.left,t.y=e.clientY-i.top,t):null!=e.touches[0]?(t.x=e.touches[0].clientX-i.left,t.y=e.touches[0].clientY-i.top,t):void 0}}(),getTeleportPosition:function(){var t=new THREE.Vector2;return function(e,i){if(0!==this.rayCastObjects.length){if(this.cam&&this.canvas){var r=this.cam,a=this.canvas.getBoundingClientRect();t.x=e/(a.right-a.left)*2-1,t.y=-i/(a.bottom-a.top)*2+1,this.rayCaster.setFromCamera(t,r);var n=this.rayCaster.intersectObjects(this.rayCastObjects);return!(0===n.length||!this.isValidNormalsAngle(n[0].face.normal))&&!0===n[0].object.userData.collision&&n[0].point}return!1}return!1}}(),isValidNormalsAngle:function(t){var e=this.referenceNormal.angleTo(t);return THREE.MathUtils.RAD2DEG*e<=this.data.landingMaxAngle},transition:function(t){this.transitionProgress=0,this.transitionCamPosEnd.copy(t),this.transitionCamPosStart.copy(this.camRig.position),this.transitioning=!0},mouseMove:function(t){var e=this.getMouseState(t);this.mouseX=e.x,this.mouseY=e.y},mouseDown:function(t){this.updateRaycastObjects();var e=this.getMouseState(t);this.mouseX=e.x,this.mouseY=e.y,this.mouseXOrig=e.x,this.mouseYOrig=e.y},mouseUp:function(t){if(this.mouseX===this.mouseXOrig&&this.mouseY===this.mouseYOrig){var e=this.getTeleportPosition(this.mouseX,this.mouseY);e&&(this.teleportIndicator.position.copy(e),this.transition(e))}},easeInOutQuad:function(t){return t<.5?2*t*t:(4-2*t)*t-1},tick:function(t,e){if(!this.transitioning&&!this.mobile){var i=this.getTeleportPosition(this.mouseX,this.mouseY);i&&this.teleportIndicator.position.copy(i)}if(this.transitioning){this.transitionProgress+=e*this.data.transitionSpeed;var r=this.easeInOutQuad(this.transitionProgress),a=r<.5?r:1.5-1*(r+.5);this.teleportIndicator.scale.set(1+a,1,1+a);var n=this.camRig.position;n.x=this.transitionCamPosStart.x+(this.transitionCamPosEnd.x-this.transitionCamPosStart.x)*r,n.y=this.transitionCamPosStart.y+(this.transitionCamPosEnd.y-this.transitionCamPosStart.y)*r,n.z=this.transitionCamPosStart.z+(this.transitionCamPosEnd.z-this.transitionCamPosStart.z)*r,this.transitionProgress>=1&&(this.transitioning=!1,n.copy(this.transitionCamPosEnd))}}})}])},"object"==s(e)&&"object"==s(t)?t.exports=o():(a=[],void 0===(n="function"==typeof(r=o)?r.apply(e,a):r)||(t.exports=n))},3987:t=>{var e={once:THREE.LoopOnce,repeat:THREE.LoopRepeat,pingpong:THREE.LoopPingPong};function i(t){return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")}t.exports=AFRAME.registerComponent("animation-mixer",{schema:{clip:{default:"*"},duration:{default:0},clampWhenFinished:{default:!1,type:"boolean"},crossFadeDuration:{default:0},loop:{default:"repeat",oneOf:Object.keys(e)},repetitions:{default:1/0,min:0},timeScale:{default:1},startAt:{default:0}},init:function(){var t=this;this.model=null,this.mixer=null,this.activeActions=[];var e=this.el.getObject3D("mesh");e?this.load(e):this.el.addEventListener("model-loaded",(function(e){t.load(e.detail.model)}))},load:function(t){var e=this.el;this.model=t,this.mixer=new THREE.AnimationMixer(t),this.mixer.addEventListener("loop",(function(t){e.emit("animation-loop",{action:t.action,loopDelta:t.loopDelta})})),this.mixer.addEventListener("finished",(function(t){e.emit("animation-finished",{action:t.action,direction:t.direction})})),this.data.clip&&this.update({})},remove:function(){this.mixer&&this.mixer.stopAllAction()},update:function(t){if(t){var i=this.data,r=AFRAME.utils.diff(i,t);if("clip"in r)return this.stopAction(),void(i.clip&&this.playAction());this.activeActions.forEach((function(t){"duration"in r&&i.duration&&t.setDuration(i.duration),"clampWhenFinished"in r&&(t.clampWhenFinished=i.clampWhenFinished),("loop"in r||"repetitions"in r)&&t.setLoop(e[i.loop],i.repetitions),"timeScale"in r&&t.setEffectiveTimeScale(i.timeScale)}))}},stopAction:function(){for(var t=this.data,e=0;e{"use strict";function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}Object.defineProperty(e,"__esModule",{value:!0});var r,a=function(){return a=Object.assign||function(t){for(var e,i=1,r=arguments.length;i{t.exports.segmentVariants={sidewalk:["empty","sparse","normal","dense"],"sidewalk-wayfinding":["large"],"sidewalk-bench":["left","right","center"],"sidewalk-bike-rack":["left|sidewalk-parallel","right|sidewalk-parallel","left|sidewalk","right|sidewalk"],"sidewalk-tree":["big","palm-tree"],utilities:["left","right"],"sidewalk-lamp":["right|modern","both|modern","left|modern","right|traditional","both|traditional","left|traditional","right|pride","both|pride","left|pride"],parklet:["left","right"],"outdoor-dining":["empty|sidewalk","empty|road"],bikeshare:["left|road","right|road","left|sidewalk","right|sidewalk"],"bike-lane":["inbound|green|sidewalk","inbound|green|road","outbound|green|sidewalk","outbound|green|road","inbound|regular|sidewalk","inbound|regular|road","outbound|regular|sidewalk","outbound|regular|road","inbound|red|sidewalk","inbound|red|road","outbound|red|sidewalk","outbound|red|road"],scooter:["inbound|regular","inbound|green","inbound|red","outbound|regular","outbound|green","outbound|red"],"bus-lane":["inbound|colored|typical","outbound|colored|typical","inbound|regular|typical","outbound|regular|typical","inbound|red|typical","outbound|red|typical"],"drive-lane":["inbound|car","outbound|car","inbound|truck","outbound|truck","outbound|av","inbound|av","outbound|pedestrian","inbound|pedestrian","inbound|sharrow","outbound|sharrow"],"turn-lane":["inbound|left","inbound|right","inbound|left-right-straight","inbound|shared","inbound|both","inbound|left-straight","inbound|right-straight","inbound|straight","outbound|left","outbound|right","outbound|left-right-straight","outbound|shared","outbound|both","outbound|left-straight","outbound|right-straight","outbound|straight"],"parking-lane":["sideways|right","sideways|left","inbound|right","inbound|left","outbound|left","outbound|right","angled-front-left|left","angled-front-right|left","angled-rear-left|left","angled-rear-right|left","angled-front-left|right","angled-front-right|right","angled-rear-left|right","angled-rear-right|right"],"food-truck":["left","right"],"flex-zone":["taxi|inbound|right","taxi|inbound|left","taxi|outbound|right","taxi|outbound|left","rideshare|outbound|right","rideshare|outbound|right","rideshare|inbound|right","rideshare|inbound|left"],streetcar:["inbound|regular","inbound|colored","inbound|grass","outbound|regular","outbound|colored","outbound|grass"],"light-rail":["inbound|regular","inbound|colored","inbound|grass","outbound|regular","outbound|colored","outbound|grass"],"brt-station":["center"],"transit-shelter":["left|street-level","right|street-level","right|light-rail","left|light-rail"],divider:["buffer","flowers","planting-strip","planter-box","palm-tree","big-tree","bush","dome","bollard","striped-buffer"],temporary:["barricade","traffic-cone","jersey-barrier-plastic","jersey-barrier-concrete"],"magic-carpet":["aladdin"]}},1339:t=>{function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}var i={Setback:{"":{type:"sidewalk",variantString:"empty"},Trees:{type:"sidewalk-tree",variantString:"big"},tree:{type:"divider",variantString:"palm-tree"},Benchs:{type:"sidewalk-bench",variantStringAdd:"side"}},Walkways:{"":{type:"sidewalk",variantString:"empty"},Trees:{type:"sidewalk-tree",variantString:"big"},pedestrian:{type:"sidewalk",variantString:"dense"},Benchs:{type:"sidewalk-bench",variantStringAdd:"side"},Tables:{type:"outdoor-dining",variantString:"occupied|sidewalk"}},Furniture:{"":{type:"sidewalk",variantString:"empty"},Trees:{type:"sidewalk-tree",variantString:"big"},season_tree:{type:"sidewalk-tree",variantString:"big"},Shelters:{type:"transit-shelter",variantString:"street-level",variantStringAdd:"side|variantString"},Pedestrian:{type:"sidewalk",variantString:"dense"}},Curbside:{"":{type:"sidewalk",variantString:"empty"},Lights:{type:"sidewalk-lamp",tagToVariantMap:{"Historic Lights":"traditional","Regular Lights":"modern"},variantStringAdd:"side|variantString"},Poles:{type:"utilities",variantStringAdd:"side"},BikeRacks:{type:"sidewalk-bike-rack",nameToVariantMap:{"Sideview Modern":"sidewalk-parallel",Sideview:"sidewalk-parallel","NYC Bike Rack":"sidewalk"},variantStringAdd:"side|variantString"}},BikesPaths:{"":{type:"bike-lane",variantString:"sidewalk"},Bikes:{type:"bike-lane",variantString:"sidewalk",variantStringAdd:"direction|material|variantString"}},Gutter:{"":{type:"divider",variantString:"median"},Gutter:{type:"divider",variantString:"median"}},Transit:{"":{tag:"Bus Vehicles",type:"bus-lane",variantString:"typical",variantStringAdd:"direction|material|variantString"},Transit:[{tag:"Rail Vehicles",type:"streetcar",names:["StreetCar Yellow","StreetCar Blue","StreetCar Red 1","StreetCar Red 2"],variantStringAdd:"direction|material"},{tag:"Rail Vehicles",type:"light-rail",names:["UTA LightRail"],variantStringAdd:"direction|material"},{tag:"Rail Vehicles Reversed",type:"light-rail",variantStringAdd:"direction|material"},{tag:"Bus Vehicles",type:"bus-lane",variantString:"typical",variantStringAdd:"direction|material|variantString"}]},Cars:{"":{type:"drive-lane",variantString:"car",variantStringAdd:"direction|variantString"},Autos:{type:"drive-lane",variantString:"car",variantStringAdd:"direction|variantString"},Truck:{type:"drive-lane",variantString:"truck",variantStringAdd:"direction|variantString"}},Parking:{"":{tag:"Parking - Parallel",type:"parking-lane",variantStringAdd:"direction|side"},Parallel:{tag:"Parking - Parallel",type:"parking-lane",variantStringAdd:"direction|side"},AngleNormal:{tag:"Parking - Angle",type:"parking-lane",nameToVariantMap:{"Away, L. Park, Head In":"angled-rear-left","Toward, R. Park, Head In":"angled-front-right","Toward, L. Park, Head In":"angled-front-left","Away, R. Park, Head In":"angled-rear-right"},variantStringAdd:"side"},Perpendicular:{type:"parking-lane",variantString:"sideways",variantStringAdd:"variantString|side"}},Buffers:{"":{type:"divider",variantString:"median"},Trees:{type:"divider",variantString:"big-tree"},tree:{type:"divider",variantString:"palm-tree"},season_tree:{type:"divider",variantString:"big-tree"},median:{type:"divider",variantString:"planting-strip"},planter:{type:"divider",variantString:"planting-strip"}}};i.Buffers.AngleNormal=i.Parking.AngleNormal,i.Buffers.Autos=i.Cars.Autos,i.Buffers.Purpendicular=i.Parking.Perpendicular,i["Median/Buffer"]=i.Buffers,i.Setback.tree=i.Buffers.tree,i.Setback.Trees=i.Buffers.Trees,i.Setback.season_tree=i.Buffers.season_tree,i.Parking.Purpendicular=i.Parking.Perpendicular,i.Setback.Purpendicular=i.Parking.Perpendicular,i.Setback.AngleNormal=i.Parking.AngleNormal,i.Setback.planter=i.Buffers.planter,i.Setback.BikeRacks=i.Curbside.BikeRacks,i.Setback.Tables=i.Walkways.Tables,i.Setback.Poles=i.Curbside.Poles,i.Curbside.Shelters=i.Furniture.Shelters,i.Curbside.Benchs=i.Walkways.Benchs,i.Furniture.planter=i.Buffers.planter,i.Furniture.Benchs=i.Walkways.Benchs,i.Furniture.BikeRacks=i.Curbside.BikeRacks,i.Furniture.Tables=i.Walkways.Tables;var r={Coming:"inbound",Going:"outbound",Both:"both",NA:""},a={"Asphalt Black":"regular","Asphalt Blue":"blue","Asphalt Red 1":"red","Asphalt Red 2":"red","Asphalt Green":"green","Asphalt Old":"regular",Grass:"grass","Grass Dead":"grass"};function n(t,e){return t.split("|").map((function(t){return e[t]})).join("|")}t.exports.convertSegment=function(t){var o={},s=t.Type,l=t.Subtype,c=i[s];if(o.elevation=t.MaterialH/.5,o.width=t.width,o.direction=r[t.Direction],t.side&&(o.side=t.side),t.Material&&(o.material=a[t.Material]),c){var d=c[l];d?o=function(t,i,r){if("string"==typeof t)i.type=t;else if(Array.isArray(t)){var a=t.find((function(t){var e=t.tag===r["O1-Tags"];return e&&t.names?t.names.includes(r["O1-Name"]):e}));i.variantString="";var o=a.variantString;o&&"string"==typeof o&&(i.variantString=o),i.type=a.type;var s=a.variantStringAdd;s&&(i.variantString=n(s,i))}else if("object"===e(t)){i.type=t.type,i.variantString="";var l=t.variantString;l&&"string"==typeof l&&(i.variantString=l);var c=t.nameToVariantMap;c&&c[r["O1-Name"]]&&(i.variantString=c[r["O1-Name"]]);var d=t.tagToVariantMap;d&&d[r["O1-Tags"]]&&(i.variantString=d[r["O1-Tags"]]);var u=t.variantStringAdd;u&&(i.variantString=n(u,i))}return i}(d,o,t):(o.type=s,console.log("The '".concat(l,"' subtype of StreetPlan segment '").concat(s,"' is not yet supported in 3DStreet")))}else o.type=s,console.log("The '".concat(s,"' StreetPlan segment type is not yet supported in 3DStreet"));return o}},2480:(t,e,i)=>{mappingUtils=i(1339),t.exports.convertStreetStruct=function(t){var e,i={},r=Object.keys(t)[0],a=Object.keys(t[r])[0];return i.name=r,i.altName=a,i.segments=Object.values(t[r][a].segments),i.segments.forEach((function(t){t.width*=.3048})),i.segments=(e=i.segments,e.map(mappingUtils.convertSegment)).filter((function(t){return!["Buildings","setback"].includes(t.type)})),console.log("TEST. Converted JSON structure: ",i),i}},5384:t=>{t.exports.isSidewalk=function(t){return t.startsWith("sidewalk")||["utilities","scooter-drop-zone","bikeshare","flex-zone-curb","transit-shelter","brt-station","street-vendor"].includes(t)},t.exports.createBuildingsArray=function(){var t,e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:150,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"narrow";if("narrow"===r||"wide"===r)t=[{id:"SM3D_Bld_Mixed_4fl",width:5.251},{id:"SM3D_Bld_Mixed_Double_5fl",width:10.9041},{id:"SM3D_Bld_Mixed_4fl_2",width:5.309},{id:"SM3D_Bld_Mixed_5fl",width:5.903},{id:"SM3D_Bld_Mixed_Corner_4fl",width:5.644}],e="41431323432402434130303230234102402341";else if("residential"===r)t=[{id:"SM_Bld_House_Preset_03_1800",width:20},{id:"SM_Bld_House_Preset_08_1809",width:20},{id:"SM_Bld_House_Preset_09_1845",width:20}],e="12021201210101212021201012012021201210";else{if("arcade"!==r)return[];t=[{id:"arched-building-01",width:9.191},{id:"arched-building-02",width:11.19},{id:"arched-building-03",width:13.191},{id:"arched-building-04",width:15.191}],e="03120223130210321203123023103201232013"}for(var a=0,n=0,o=[];n{function e(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var r,a,n,o,s=[],l=!0,c=!1;try{if(n=(i=i.call(t)).next,0===e){if(Object(i)!==i)return;l=!1}else for(;!(l=(r=n.call(i)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,a=t}finally{try{if(!l&&null!=i.return&&(o=i.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,r=new Array(e);i0&&void 0!==arguments[0]?arguments[0]:{},i=document.createElement(t.tag);delete t.tag;for(var r=0,a=Object.entries(t);r1?arguments[1]:void 0;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(e,i){t.appendChild(r(e))})),t}},5676:t=>{t.exports.streetmixUserToAPI=function(t){var e=new URL(t).pathname.split("/"),i=e[1],r=e[2];return"-"===i?"https://streetmix.net/api/v1/streets?namespacedId="+r:"https://streetmix.net/api/v1/streets?namespacedId="+r+"&creatorId="+i},t.exports.pathStartsWithAPI=function(t){var e=document.createElement("a");return e.href=t,"api"===e.pathname.split("/")[1]},t.exports.streetmixAPIToUser=function(t){function e(t,e){for(var i=t.split("&"),r=0;r{"use strict";t.exports=JSON.parse('{"status":true,"project":{"My Street":{"Boulevard Alt 1":{"segments":{"1":{"Type":"Buildings","Subtype":"Commercial","SegPos":1,"width":30,"title":"Building Blue 4floors","side":"left","Direction":"NA","Material":"Building Blue 4floors","MaterialH":"0","Markings":"Standard Concrete","O1-Name":"Building Blue 4floors","O1-Tags":"4-Story,4-Story","O2-Name":"","O2-Tags":"","O3-Name":"","O3-Tags":""},"2":{"id":2478438,"Type":"setback","Subtype":"AngleNormal","SegPos":2,"width":3,"title":"Toward, R. Park, Head In","side":"left","Direction":"NA","Material":"Asphalt Blue","MaterialH":"0.5","Markings":"Setback Small","O1-Name":"Toward, R. Park, Head In","O1-Tags":"Parking - Angle","O2-Name":"Empty place holder","O2-Tags":"Business Signs","O3-Name":"","O3-Tags":""},"3":{"id":2478439,"Type":"Walkways","Subtype":"pedestrian","SegPos":3,"width":6,"title":"3 people","side":"left","Direction":"Both","Material":"Pavers Tan","MaterialH":"0.5","Markings":"Blank","O1-Name":"3 people","O1-Tags":"Many People","O2-Name":"Empty place holder","O2-Tags":"Many People","O3-Name":"","O3-Tags":""},"4":{"id":2478440,"Type":"Furniture","Subtype":"BikeRacks","SegPos":4,"width":7,"title":"NYC Bike Rack","side":"left","Direction":"NA","Material":"Pavers Tan","MaterialH":"0.5","Markings":"Blank","O1-Name":"NYC Bike Rack","O1-Tags":"Bike Racks","O2-Name":"Empty place holder","O2-Tags":"Trees, Fall","O3-Name":"Empty place holder","O3-Tags":"Trees, Fall"},"5":{"id":2478441,"Type":"BikesPaths","Subtype":"Bikes","SegPos":5,"width":4.5,"title":"Casual woman 2","side":"left","Direction":"Coming","Material":"Asphalt Blue","MaterialH":"0.5","Markings":"Painted BufferNone NoEdge","O1-Name":"Casual woman 2","O1-Tags":"Miscellaneous","O2-Name":"Empty place holder","O2-Tags":"Parking - Reverse Angle","O3-Name":"","O3-Tags":""},"6":{"id":2478442,"Type":"Curbside","Subtype":"","SegPos":6,"width":6,"title":"Empty place holder","side":"left","Direction":"NA","Material":"Pavers Tan","MaterialH":"0.5","Markings":"Blank","O1-Name":"Empty place holder","O1-Tags":"Markings - Transit Options","O2-Name":"Shelter","O2-Tags":"0 mph","O3-Name":"","O3-Tags":""},"7":{"id":2478443,"Type":"Gutter","Subtype":"Gutter","SegPos":7,"width":2.5,"title":"Gutter Std. 2.5 ft, Left","side":"left","Direction":"NA","Material":"Standard Concrete","MaterialH":"0.5","Markings":"Blank","O1-Name":"Gutter Std. 2.5 ft, Left","O1-Tags":"Gutters","O2-Name":"Empty place holder","O2-Tags":"Markings - Transit Options","O3-Name":"Empty place holder","O3-Tags":"Markings - Transit Options"},"8":{"id":2478540,"Type":"Parking","Subtype":"Purpendicular","SegPos":8,"width":19,"title":"Purpendicular Right side, Blue","side":"left","Direction":"Coming","Material":"Asphalt Black","MaterialH":"0","Markings":"Parking Left","O1-Name":"Purpendicular Right side, Blue","O1-Tags":"Private Parking","O2-Name":"","O2-Tags":"Markings - Transit Options","O3-Name":"","O3-Tags":""},"9":{"id":2478444,"Type":"Transit","Subtype":"Transit","SegPos":9,"width":11,"title":"UTA bus","side":"left","Direction":"Coming","Material":"Asphalt Red 2","MaterialH":"0","Markings":"Thru Only","O1-Name":"UTA bus","O1-Tags":"Bus Vehicles","O2-Name":"Yellow Sedan","O2-Tags":"Miscellaneous","O3-Name":"","O3-Tags":""},"10":{"id":2478445,"Type":"Cars","Subtype":"","SegPos":10,"width":10,"title":"Empty place holder","side":"left","Direction":"Coming","Material":"Asphalt Black","MaterialH":"0","Markings":"Thru Only","O1-Name":"Empty place holder","O1-Tags":"SUVs/Pickups Reversed","O2-Name":"","O2-Tags":"Miscellaneous","O3-Name":"","O3-Tags":""},"11":{"id":2478446,"Type":"Median/Buffer","Subtype":"season_tree","SegPos":11,"width":14,"title":"Japanese Zelkova","side":"median","Direction":"median","Material":"Asphalt Black","MaterialH":"0","Markings":"Center Median","O1-Name":"Japanese Zelkova","O1-Tags":"Trees, Summer","O2-Name":"TallPlantBox (12ft)","O2-Tags":"Low-Water Xeriscape","O3-Name":"","O3-Tags":""},"12":{"id":2478447,"Type":"Cars","Subtype":"Truck","SegPos":12,"width":10,"title":"Blue Truck","side":"right","Direction":"Going","Material":"Asphalt Black","MaterialH":"0","Markings":"Thru Only","O1-Name":"Blue Truck","O1-Tags":"Miscellaneous","O2-Name":"","O2-Tags":"Low-Water Xeriscape","O3-Name":"","O3-Tags":""},"13":{"id":2478448,"Type":"Transit","Subtype":"Transit","SegPos":13,"width":11,"title":"StreetCar Yellow","side":"right","Direction":"Going","Material":"Grass","MaterialH":"0","Markings":"Thru Only","O1-Name":"StreetCar Yellow","O1-Tags":"Rail Vehicles","O2-Name":"White Sedan","O2-Tags":"Miscellaneous","O3-Name":"","O3-Tags":""},"14":{"id":2478449,"Type":"Gutter","Subtype":"Gutter","SegPos":14,"width":2.5,"title":"Gutter Std. 2.5 ft, Right","side":"right","Direction":"NA","Material":"Standard Concrete","MaterialH":"0.5","Markings":"Blank","O1-Name":"Gutter Std. 2.5 ft, Right","O1-Tags":"Gutters","O2-Name":"Empty place holder","O2-Tags":"Markings - Transit Options","O3-Name":"Empty place holder","O3-Tags":"Markings - Transit Options"},"15":{"id":2478450,"Type":"Curbside","Subtype":"Lights","SegPos":15,"width":2,"title":"Streetlight solar banners 1","side":"right","Direction":"NA","Material":"Pavers Tan","MaterialH":"0.5","Markings":"Blank","O1-Name":"Streetlight solar banners 1","O1-Tags":"Historic Lights","O2-Name":"BikeRack Bollard","O2-Tags":"30 mph","O3-Name":"","O3-Tags":""},"16":{"id":2478451,"Type":"BikesPaths","Subtype":"Bikes","SegPos":16,"width":4.5,"title":"Man Go","side":"right","Direction":"Going","Material":"Asphalt Blue","MaterialH":"0.5","Markings":"Painted BufferNone NoEdge","O1-Name":"Man Go","O1-Tags":"Miscellaneous","O2-Name":"","O2-Tags":"Bike Racks","O3-Name":"","O3-Tags":""},"17":{"id":2478452,"Type":"Furniture","Subtype":"Tables","SegPos":17,"width":7,"title":"Table","side":"right","Direction":"NA","Material":"Pavers Tan","MaterialH":"0.5","Markings":"Blank","O1-Name":"Table","O1-Tags":"Miscellaneous","O2-Name":"Table","O2-Tags":"Miscellaneous","O3-Name":"Empty place holder","O3-Tags":"Trees, Fall"},"18":{"id":2478453,"Type":"Walkways","Subtype":"pedestrian","SegPos":18,"width":6,"title":"3 people","side":"right","Direction":"Both","Material":"Pavers Tan","MaterialH":"0.5","Markings":"Blank","O1-Name":"3 people","O1-Tags":"Many People","O2-Name":"Empty place holder","O2-Tags":"Many People","O3-Name":"","O3-Tags":""},"19":{"id":2478454,"Type":"setback","Subtype":"Paths","SegPos":19,"width":3,"title":"Empty place holder","side":"right","Direction":"NA","Material":"Asphalt Blue","MaterialH":"0.5","Markings":"Setback Small","O1-Name":"Empty place holder","O1-Tags":"Business Signs","O2-Name":"Empty place holder","O2-Tags":"Business Signs","O3-Name":"","O3-Tags":""},"20":{"Type":"Buildings","Subtype":"Commercial","SegPos":20,"width":30,"title":"Building Yellow 4floors","side":"right","Direction":"NA","Material":"Building Yellow 4floors","MaterialH":"0","Markings":"Standard Concrete","O1-Name":"Building Yellow 4floors","O1-Tags":"4-Story,4-Story","O2-Name":"","O2-Tags":"","O3-Name":"","O3-Tags":""}}}}}}')}},e={};function i(r){var a=e[r];if(void 0!==a)return a.exports;var n=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(n.exports,n,n.exports,i),n.loaded=!0,n.exports}return i.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{function t(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,r=new Array(e);i=200&&this.status<400){var t,a=JSON.parse(this.response),n=r.convertStreetValues(a.data.street),o=n.segments,s=a.name;console.log("streetmixName",s),i.setAttribute("streetmix-loader","name",s),AFRAME.scenes[0]&&AFRAME.scenes[0].getAttribute("metadata")&&(t=AFRAME.scenes[0].getAttribute("metadata").sceneTitle),t||(AFRAME.scenes[0].setAttribute("metadata","sceneTitle",s),console.log("therefore setting metadata sceneTitle as streetmixName",s)),i.setAttribute("data-layer-name","Streetmix • "+s),e.showBuildings&&(i.setAttribute("street","right",n.rightBuildingVariant),i.setAttribute("street","left",n.leftBuildingVariant)),i.setAttribute("street","type","streetmixSegmentsMetric"),i.setAttribute("street","JSON",JSON.stringify({streetmixSegmentsMetric:o})),i.emit("streetmix-loader-street-loaded")}else console.log("[streetmix-loader]","Loading Error: We reached the target server, but it returned an error")},a.onerror=function(){console.log("[streetmix-loader]","Loading Error: There was a connection error of some sort")},a.send()}else{if(e.streetmixStreetURL.length>0){var n=r.streetmixUserToAPI(e.streetmixStreetURL);return console.log("[streetmix-loader]","setting `streetmixAPIURL` to",n),void i.setAttribute("streetmix-loader","streetmixAPIURL",n)}console.log("[streetmix-loader]","Neither `streetmixAPIURL` nor `streetmixStreetURL` properties provided, please provide at least one.")}}}),AFRAME.registerComponent("intersection",{schema:{dimensions:{type:"string",default:"20 20"},sidewalk:{type:"string",default:"0 0 0 0"},northeastcurb:{type:"string",default:"0 0"},southwestcurb:{type:"string",default:"0 0"},southeastcurb:{type:"string",default:"0 0"},northwestcurb:{type:"string",default:"0 0"},stopsign:{type:"string",default:"0 0 0 0"},trafficsignal:{type:"string",default:"0 0 0 0"},crosswalk:{type:"string",default:"0 0 0 0"}},init:function(){for(var e=this.data,i=this.el;i.firstChild;)i.removeChild(i.lastChild);var r=e.dimensions.split(" ").map((function(t){return Number(t)})),a=[this.el.getAttribute("position").x,this.el.getAttribute("position").y,this.el.getAttribute("position").z],n=e.sidewalk.split(" ").map((function(t){return Number(t)})),o=e.northeastcurb.split(" ").map((function(t){return Number(t)})),s=e.southwestcurb.split(" ").map((function(t){return Number(t)})),l=e.southeastcurb.split(" ").map((function(t){return Number(t)})),c=e.northwestcurb.split(" ").map((function(t){return Number(t)})),d=e.stopsign.split(" ").map((function(t){return Number(t)})),u=e.trafficsignal.split(" ").map((function(t){return Number(t)})),p=e.crosswalk.split(" ").map((function(t){return Number(t)})),m=r[0],h=r[1];function f(t){var e=t.length,r=t.width,a=t.positionVec,n=t.scaleVec,o=void 0===n?{x:1,y:1,z:1}:n,s=t.rotationVec,l=document.createElement("a-entity"),c=[];c[0]=r/2,c[1]=parseInt(e/2),l.setAttribute("geometry","primitive","box"),l.setAttribute("geometry","height: 0.4"),l.setAttribute("position",a),l.setAttribute("scale",o),l.setAttribute("geometry","depth",e),l.setAttribute("geometry","width",r),l.setAttribute("rotation",s),l.setAttribute("mixin","sidewalk"),l.setAttribute("material","repeat: ".concat(c[0]," ").concat(c[1])),i.appendChild(l)}this.el.setAttribute("geometry","primitive:box; width: ".concat(m,"; height: ").concat(h,"; depth:0.2")),this.el.setAttribute("position",{x:a[0],y:-.1,z:a[2]}),this.el.setAttribute("rotation","-90 0 0"),this.el.setAttribute("material","src: #asphalt-texture; repeat:5 5; roughness:1");var g,y,b={west:{positionVec:{x:m/2-n[0]/2,z:.1},rotationVec:{x:90,y:0,z:0},length:h,width:n[0]},east:{positionVec:{x:-m/2+n[1]/2,z:.1},rotationVec:{x:90,y:0,z:0},length:h,width:n[1]},north:{positionVec:{y:-h/2+n[2]/2,x:n[1]/2-n[0]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:m-n[1]-n[0],width:n[2]},south:{positionVec:{y:h/2-n[3]/2,x:n[1]/2-n[0]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:m-n[1]-n[0],width:n[3]}};Object.keys(b).filter((function(t,e){return n[e]})).forEach((function(t,e){f(b[t])}));for(var v={northeast:{positionVec:{x:m/2-o[0]/2,y:h/2-o[1]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:o[0],width:o[1]},southwest:{positionVec:{x:-m/2+s[0]/2,y:-h/2+s[1]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:s[0],width:s[1]},southeast:{positionVec:{x:m/2-l[0]/2,y:-h/2+l[1]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:l[0],width:l[1]},northwest:{positionVec:{x:-m/2+c[0]/2,y:h/2-c[1]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:c[0],width:c[1]}},x=0,w=Object.entries(v);x