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,CAAC,KAAQ,KAAK,GAAG,CAAC,EAAK,IAAO,EAAA,OAAA,CAAmB,KAAK,GAAG,CAAC,EAAK,KAAK,GAAG,CAAC,GAAK,KAAK,GAAG,CAAC,KAAQ,KAAK,GAAG,CAAC,EAAK,IAAO,EAAA,OAAA,CAAmB,KAAK,GAAG,CAAC,EAAK,KAAK,GAAG,CAAC,GAAK,KAAK,GAAG,CAAC,KAAQ,KAAK,GAAG,CAAC,EAAK,IAAO,EAAA,OAAA,CAAmB,KAAK,GAAG,CAAC,EAAK,KAAK,GAAG,CAAC,GAAK,KAAK,GAAG,CAAC,KAAQ,KAAK,GAAG,CAAC,EAAK,IAAO,EAAA,OAAA,CAAmB,KAAK,GAAG,CAAC,EAAK,KAAK,GAAG,CAAC,GAAK,KAAK,GAAG,CAAC,KAAQ,KAAK,GAAG,CAAC,EAAK,IAAO,EAAA,OAAA,CAAmB,KAAK,GAAG,CAAC,EAAK,KAAK,GAAG,CAAC,GAAK,KAAK,GAAG,CAAC,KAAQ,KAAK,GAAG,CAAC,EAAK,IAAO,EAAA,OAAA,CAAmB,KAAK,GAAG,CAAC,EAAK,KAAK,GAAG,CAAC,GAAK,KAAK,GAAG,CAAC,GACzqB,C,G,E","sources":["","src/data-config.js","src/data/index.js","src/data/2-kitchen-island.js","node_modules/marzipano/src/index.js","node_modules/marzipano/src/stages/WebGl.js","node_modules/marzipano/src/stages/Stage.js","node_modules/minimal-event-emitter/index.js","node_modules/marzipano/src/collections/WorkQueue.js","node_modules/marzipano/src/util/now.js","node_modules/marzipano/src/util/calcRect.js","node_modules/marzipano/src/util/async.js","node_modules/marzipano/src/util/cancelize.js","node_modules/marzipano/src/util/once.js","node_modules/marzipano/src/util/clearOwnProperties.js","node_modules/marzipano/src/stages/RendererRegistry.js","node_modules/marzipano/src/loaders/HtmlImage.js","node_modules/marzipano/src/assets/Static.js","node_modules/marzipano/src/util/global.js","node_modules/marzipano/src/NetworkError.js","node_modules/marzipano/src/util/inherits.js","node_modules/marzipano/src/support/WebGl.js","node_modules/marzipano/node_modules/bowser/es5.js","node_modules/marzipano/src/util/pixelRatio.js","node_modules/marzipano/src/util/ispot.js","node_modules/marzipano/src/util/dom.js","node_modules/marzipano/src/stages/Css.js","node_modules/marzipano/src/support/Css.js","node_modules/marzipano/src/stages/Flash.js","node_modules/marzipano/src/loaders/FlashImage.js","node_modules/marzipano/src/assets/Flash.js","node_modules/marzipano/src/support/Flash.js","node_modules/marzipano/src/util/defer.js","node_modules/marzipano/src/renderers/WebGlCube.js","node_modules/marzipano/src/renderers/WebGlBase.js","node_modules/gl-matrix/esm/mat4.js","node_modules/gl-matrix/esm/common.js","node_modules/gl-matrix/esm/vec3.js","node_modules/marzipano/src/renderers/WebGlCommon.js","node_modules/marzipano/src/util/clamp.js","node_modules/gl-matrix/esm/vec4.js","node_modules/marzipano/src/shaders/vertexNormal.js","node_modules/marzipano/src/shaders/fragmentNormal.js","node_modules/marzipano/src/renderers/WebGlFlat.js","node_modules/marzipano/src/renderers/WebGlEquirect.js","node_modules/marzipano/src/shaders/vertexEquirect.js","node_modules/marzipano/src/shaders/fragmentEquirect.js","node_modules/marzipano/src/renderers/CssCube.js","node_modules/marzipano/src/geometries/Cube.js","node_modules/marzipano/src/util/hash.js","node_modules/marzipano/src/TileSearcher.js","node_modules/marzipano/src/collections/Set.js","node_modules/marzipano/src/util/mod.js","node_modules/marzipano/src/collections/LruMap.js","node_modules/marzipano/src/geometries/Level.js","node_modules/marzipano/src/geometries/common.js","node_modules/marzipano/src/util/cmp.js","node_modules/marzipano/src/util/type.js","node_modules/marzipano/src/renderers/CssBase.js","node_modules/marzipano/src/collections/Map.js","node_modules/marzipano/src/util/decimal.js","node_modules/marzipano/src/renderers/CssFlat.js","node_modules/marzipano/src/geometries/Flat.js","node_modules/gl-matrix/esm/vec2.js","node_modules/marzipano/src/renderers/FlashCube.js","node_modules/marzipano/src/renderers/FlashBase.js","node_modules/marzipano/src/util/radToDeg.js","node_modules/marzipano/src/renderers/FlashFlat.js","node_modules/marzipano/src/renderers/registerDefaultRenderers.js","node_modules/marzipano/src/geometries/Equirect.js","node_modules/marzipano/src/views/Rectilinear.js","node_modules/marzipano/src/util/convertFov.js","node_modules/marzipano/src/util/real.js","node_modules/marzipano/src/util/compose.js","node_modules/marzipano/src/views/Flat.js","node_modules/marzipano/src/sources/ImageUrl.js","node_modules/marzipano/src/collections/WorkPool.js","node_modules/marzipano/src/util/chain.js","node_modules/marzipano/src/util/noop.js","node_modules/marzipano/src/util/delay.js","node_modules/marzipano/src/sources/SingleAsset.js","node_modules/marzipano/src/assets/Dynamic.js","node_modules/marzipano/src/TextureStore.js","node_modules/marzipano/src/collections/LruSet.js","node_modules/marzipano/src/util/defaults.js","node_modules/marzipano/src/util/retry.js","node_modules/marzipano/src/Layer.js","node_modules/marzipano/src/util/extend.js","node_modules/marzipano/src/RenderLoop.js","node_modules/marzipano/src/controls/Key.js","node_modules/marzipano/src/controls/Dynamics.js","node_modules/marzipano/src/controls/Drag.js","node_modules/marzipano/src/controls/HammerGestures.js","node_modules/hammerjs/hammer.js","node_modules/marzipano/src/controls/util.js","node_modules/marzipano/src/controls/Qtvr.js","node_modules/marzipano/src/controls/ScrollZoom.js","node_modules/marzipano/src/controls/WheelListener.js","node_modules/marzipano/src/controls/PinchZoom.js","node_modules/marzipano/src/controls/Velocity.js","node_modules/marzipano/src/controls/ElementPress.js","node_modules/marzipano/src/controls/Controls.js","node_modules/marzipano/src/controls/Composer.js","node_modules/marzipano/src/Viewer.js","node_modules/marzipano/src/Scene.js","node_modules/marzipano/src/HotspotContainer.js","node_modules/marzipano/src/Hotspot.js","node_modules/marzipano/src/util/positionAbsolutely.js","node_modules/marzipano/src/support/cssPointerEvents.js","node_modules/marzipano/src/Timer.js","node_modules/marzipano/src/controls/ControlCursor.js","node_modules/marzipano/src/controls/registerDefaultControls.js","node_modules/marzipano/src/util/tween.js","node_modules/marzipano/src/colorEffects.js","node_modules/marzipano/src/autorotate.js","node_modules/marzipano/src/util/degToRad.js","node_modules/gl-matrix/esm/index.js","node_modules/gl-matrix/esm/mat2.js","node_modules/gl-matrix/esm/mat2d.js","node_modules/gl-matrix/esm/mat3.js","node_modules/gl-matrix/esm/quat.js","node_modules/gl-matrix/esm/quat2.js"],"sourcesContent":["\nfunction $parcel$export(e, n, v, s) {\n Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n\n var $parcel$global =\n typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequire6c95\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequire6c95\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\nparcelRegister(\"96HUf\", function(module, exports) {\n\n$parcel$export(module.exports, \"resetSceneButton\", function () { return $6a16bb76f73d4368$export$8da03248cdcfe1a3; });\n$parcel$export(module.exports, \"viewer\", function () { return $6a16bb76f73d4368$export$7dea6024c4894e8e; });\n$parcel$export(module.exports, \"data\", function () { return $6a16bb76f73d4368$export$4051a07651545597; });\n\nvar $emWKU = parcelRequire(\"emWKU\");\n\nvar $d94HJ = parcelRequire(\"d94HJ\");\nconst $6a16bb76f73d4368$var$panoElement = document.getElementById(\"pano\");\nconst $6a16bb76f73d4368$export$8da03248cdcfe1a3 = document.getElementById(\"request-view-reset\");\nconst $6a16bb76f73d4368$var$viewerOpts = {\n controls: {\n mouseViewMode: \"drag\",\n scrollZoom: true\n }\n};\nconst $6a16bb76f73d4368$export$7dea6024c4894e8e = new $d94HJ.Viewer($6a16bb76f73d4368$var$panoElement, $6a16bb76f73d4368$var$viewerOpts);\nvar $6a16bb76f73d4368$var$e, $6a16bb76f73d4368$var$view;\n// const tourLinkHotspot = SCENES[0].linkHotspots[0]\nconst $6a16bb76f73d4368$var$tourInfoHotspot = (0, $emWKU.SCENES)[0].infoHotspots[0];\n// const tourLinkHotspotLookToValues = {\n// yaw: tourLinkHotspot?.yaw,\n// pitch: tourLinkHotspot?.pitch,\n// rotation: tourLinkHotspot?.rotation\n// };\nconst $6a16bb76f73d4368$var$tourLookToInfoHotspot = {\n yaw: $6a16bb76f73d4368$var$tourInfoHotspot?.yaw,\n pitch: $6a16bb76f73d4368$var$tourInfoHotspot?.pitch,\n rotation: $6a16bb76f73d4368$var$tourInfoHotspot?.rotation\n};\nconst $6a16bb76f73d4368$export$4051a07651545597 = {\n scenes: (0, $emWKU.SCENES),\n name: `Pampered Chef - ${\"Fall 2024\"} VR Kitchen`,\n settings: {\n mouseViewMode: \"drag\",\n autorotateEnabled: false,\n fullscreenButton: false\n },\n tourParams: {\n tourSection1: $6a16bb76f73d4368$var$tourLookToInfoHotspot\n }\n};\n\n});\nparcelRegister(\"emWKU\", function(module, exports) {\n\n$parcel$export(module.exports, \"SCENES\", function () { return $a760b26c56c09f66$export$d3112996f706f1c; });\n\nvar $cy4lp = parcelRequire(\"cy4lp\");\nconst $a760b26c56c09f66$export$d3112996f706f1c = [\n (0, $cy4lp.KITCHEN_ISLAND)\n];\n\n});\nparcelRegister(\"cy4lp\", function(module, exports) {\n\n$parcel$export(module.exports, \"KITCHEN_ISLAND\", function () { return $922c07b81080a7a2$export$c7323ca0efd38c6; });\nconst $922c07b81080a7a2$export$c7323ca0efd38c6 = {\n id: \"2-kitchen-island\",\n name: \"Kitchen Island\",\n levels: [\n {\n tileSize: 256,\n size: 256,\n fallbackOnly: true\n },\n {\n tileSize: 512,\n size: 512\n },\n {\n tileSize: 512,\n size: 1024\n },\n {\n tileSize: 512,\n size: 2048\n }\n ],\n faceSize: 2048,\n initialViewParameters: {\n yaw: -0.0005943935503509579,\n pitch: 0.6074701054373062,\n fov: 1.1252406777618285\n },\n linkHotspots: [],\n infoHotspots: [\n {\n class: \"intro-starter\",\n yaw: -0.6296041741844114,\n pitch: 0.6541907464738905,\n title: \"Stoneware Starter Set\",\n text: `\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t

    Stoneware Starter Set (#100292)

    \n\t\t\t\t\t\t\t\t\tYou can make perfect pizzas every time with the Pizza Stone, create easy \n\t\t\t\t\t\t\t\t\tsheet-pan dinners on the Stone Bar Pan, and bake delicious banana bread \n\t\t\t\t\t\t\t\t\tin the Stone Loaf Pan.\n\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\tGreat for new cooks, first-time homeowners, college students, and empty \n\t\t\t\t\t\t\t\t\tnesters ready to refresh their kitchen!\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t`,\n images: [\n `\"vrk-fall24-kitchen-stoneware-set-02.jpg\"`,\n `\"vrk-fall24-kitchen-stoneware-set-03.jpg\"`,\n `\"vrk-fall24-kitchen-stoneware-set-04.jpg\"`\n ],\n videos: [\n `
`\n ]\n },\n {\n yaw: 0.09754898793619304,\n pitch: 0.5661444781747988,\n title: \"Cutlery Basics Set\",\n text: `\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t

    Cutlery Basics Set (#101419)

    \n\t\t\t\t\t\t\t\t\tAll the essential cutting tools new kitchens need. First, you need a few \n\t\t\t\t\t\t\t\t\tdifferent size cutting boards for any prep task. Then, a variety of knife sizes \n\t\t\t\t\t\t\t\t\tand styles for a variety of foods\\u{2014}the right knife for the job makes a \n\t\t\t\t\t\t\t\t\tdifference! And lastly, quality steak knives for enjoying those heartier meals.\n\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\tGreat for new cooks, first-time homeowners, college students, and empty \n\t\t\t\t\t\t\t\t\tnesters ready to refresh their kitchen!\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t`,\n images: [\n `\"vrk-fall24-kitchen-cutlery-set-02.jpg\"`,\n `\"vrk-fall24-kitchen-cutlery-set-03.jpg\"`,\n `\"vrk-fall24-kitchen-cutlery-set-04.jpg\"`\n ],\n videos: [\n `
`\n ]\n },\n {\n yaw: 0.5808080655022643,\n pitch: 0.5253043154516455,\n title: \"Cookie Baking Set\",\n text: `\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t

    Cookie Baking Set (#101420)

    \n\t\t\t\t\t\t\t\t\tThe perfect way to get into baking or stock your kitchen with quality baking \n\t\t\t\t\t\t\t\t\tessentials.\n\t\t\t\t\t\t\t\t\tWith two heavy-duty Cookie Sheets to bake up a storm, a Medium Scoop \n\t\t\t\t\t\t\t\t\tfor perfectly portioned cookies, two Stackable Cooling Racks for cooling \n\t\t\t\t\t\t\t\t\tand decorating, and a Teal Mini Nylon Serving Spatula to easy move and \n\t\t\t\t\t\t\t\t\tserve your delicious creations.\n\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\tGreat for new cooks, first-time homeowners, college students, and empty \n\t\t\t\t\t\t\t\t\tnesters ready to refresh their kitchen!\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t`,\n images: [\n `\"vrk-fall24-kitchen-cookie-set-01.jpg\"`,\n `\"vrk-fall24-kitchen-cookie-set-02.jpg\"`,\n `\"vrk-fall24-kitchen-cookie-set-03.jpg\"`,\n `\"vrk-fall24-kitchen-cookie-set-04.jpg\"`\n ]\n },\n {\n yaw: -0.3836619982848326,\n pitch: 0.20475223119669828,\n title: \"Utensil Starter Set\",\n text: `\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t

    Utensil Starter Set (#101418)

    \n\t\t\t\t\t\t\t\t\tEvery cook needs quality kitchen essentials. This set has a mix of durable, \n\t\t\t\t\t\t\t\t\tsilicone basics, along with a few multi-functional tools that make it super \n\t\t\t\t\t\t\t\t\teasy to do many tasks with just one tool, and less dishes! All together, they \n\t\t\t\t\t\t\t\t\teasily fit into the compact and sleek utensil holder that looks great on any \n\t\t\t\t\t\t\t\t\tcounter.\n\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\tGreat for new cooks, first-time homeowners, college students, and empty \n\t\t\t\t\t\t\t\t\tnesters ready to refresh their kitchen!\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t`,\n images: [\n `\"vrk-fall24-kitchen-utensil-set-03.jpg\"`,\n `\"vrk-fall24-kitchen-utensil-set-04.jpg\"`\n ],\n videos: [\n `
`,\n `
`\n ]\n },\n {\n yaw: 0.012833724448508832,\n pitch: 0.11378186415693747,\n title: \"Brilliance Cookware Set\",\n text: `\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t

    5-Piece Brilliance Nonstick Cookware Set (#100772)

    \n\t\t\t\t\t\t\t\t\tStart your cookware collection or add a pop of color to it with this five-piece \n\t\t\t\t\t\t\t\t\tset! It includes all the basic pieces you'll need to make delicious, no-fuss \n\t\t\t\t\t\t\t\t\tmeals every day. With high-quality nonstick coatings on the inside and \n\t\t\t\t\t\t\t\t\toutside of this cookware, you can be sure your food will slide right out\\u{2014}and \n\t\t\t\t\t\t\t\t\tbecause it's dishwasher-safe, cleanup has never been easier.\n\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\tGreat for new cooks, first-time homeowners, college students, and empty \n\t\t\t\t\t\t\t\t\tnesters ready to refresh their kitchen!\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t`,\n images: [\n `\"vrk-fall24-kitchen-cookware-03.jpg\"`,\n `\"vrk-fall24-kitchen-cookware-04.jpg\"`\n ],\n videos: [\n `
`,\n `
`\n ]\n }\n ]\n};\n\n});\n\n\nparcelRegister(\"d94HJ\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\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\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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nmodule.exports = {\n // Stages.\n WebGlStage: (parcelRequire(\"jgcBG\")),\n CssStage: (parcelRequire(\"kgURn\")),\n FlashStage: (parcelRequire(\"lUg8r\")),\n // Renderers.\n WebGlCubeRenderer: (parcelRequire(\"b7h3a\")),\n WebGlFlatRenderer: (parcelRequire(\"6yDfP\")),\n WebGlEquirectRenderer: (parcelRequire(\"iIThc\")),\n CssCubeRenderer: (parcelRequire(\"48tXO\")),\n CssFlatRenderer: (parcelRequire(\"aYyo6\")),\n FlashCubeRenderer: (parcelRequire(\"aK6y2\")),\n FlashFlatRenderer: (parcelRequire(\"51qT1\")),\n registerDefaultRenderers: (parcelRequire(\"kjZKr\")),\n // Geometries.\n CubeGeometry: (parcelRequire(\"4QGnk\")),\n FlatGeometry: (parcelRequire(\"l1BkT\")),\n EquirectGeometry: (parcelRequire(\"bI46y\")),\n // Views.\n RectilinearView: (parcelRequire(\"63xsq\")),\n FlatView: (parcelRequire(\"9iOfn\")),\n // Sources.\n ImageUrlSource: (parcelRequire(\"3vK5M\")),\n SingleAssetSource: (parcelRequire(\"lEiVO\")),\n // Assets.\n StaticAsset: (parcelRequire(\"4Qk7S\")),\n DynamicAsset: (parcelRequire(\"iB2Tl\")),\n // Texture store.\n TextureStore: (parcelRequire(\"8U6hQ\")),\n // Layer.\n Layer: (parcelRequire(\"gouN9\")),\n // Render loop.\n RenderLoop: (parcelRequire(\"h0UOQ\")),\n // Controls.\n KeyControlMethod: (parcelRequire(\"kniT1\")),\n DragControlMethod: (parcelRequire(\"efdW7\")),\n QtvrControlMethod: (parcelRequire(\"kjQCu\")),\n ScrollZoomControlMethod: (parcelRequire(\"fCy8Y\")),\n PinchZoomControlMethod: (parcelRequire(\"2cyzb\")),\n VelocityControlMethod: (parcelRequire(\"joYne\")),\n ElementPressControlMethod: (parcelRequire(\"b7OCs\")),\n Controls: (parcelRequire(\"rtmgR\")),\n Dynamics: (parcelRequire(\"bqWZD\")),\n // High-level API.\n Viewer: (parcelRequire(\"kkazn\")),\n Scene: (parcelRequire(\"9kjMi\")),\n // Hotspots.\n Hotspot: (parcelRequire(\"028gl\")),\n HotspotContainer: (parcelRequire(\"a3AC3\")),\n // Effects.\n colorEffects: (parcelRequire(\"j8BiC\")),\n // Miscellaneous functions.\n registerDefaultControls: (parcelRequire(\"9aEkC\")),\n autorotate: (parcelRequire(\"eoK70\")),\n // Utility functions.\n util: {\n async: (parcelRequire(\"11mTq\")),\n cancelize: (parcelRequire(\"bMUVO\")),\n chain: (parcelRequire(\"61A4i\")),\n clamp: (parcelRequire(\"eCQUD\")),\n clearOwnProperties: (parcelRequire(\"2Xxut\")),\n cmp: (parcelRequire(\"3nhrd\")),\n compose: (parcelRequire(\"arsG2\")),\n convertFov: (parcelRequire(\"hmySL\")),\n decimal: (parcelRequire(\"asoyN\")),\n defaults: (parcelRequire(\"9eJDl\")),\n defer: (parcelRequire(\"9aPxp\")),\n degToRad: (parcelRequire(\"82Ddh\")),\n delay: (parcelRequire(\"7OILR\")),\n dom: (parcelRequire(\"dBMHD\")),\n extend: (parcelRequire(\"iozi5\")),\n hash: (parcelRequire(\"4j7qz\")),\n inherits: (parcelRequire(\"Yar88\")),\n mod: (parcelRequire(\"iZgBB\")),\n noop: (parcelRequire(\"exIfG\")),\n now: (parcelRequire(\"azWbw\")),\n once: (parcelRequire(\"9ZuRa\")),\n pixelRatio: (parcelRequire(\"lNra6\")),\n radToDeg: (parcelRequire(\"jSacE\")),\n real: (parcelRequire(\"0OTzd\")),\n retry: (parcelRequire(\"2uuGq\")),\n tween: (parcelRequire(\"28mhx\")),\n type: (parcelRequire(\"fXp6t\"))\n },\n // Expose dependencies for clients to use.\n dependencies: {\n bowser: (parcelRequire(\"W9Vbx\")),\n glMatrix: (parcelRequire(\"d1IHX\")),\n eventEmitter: (parcelRequire(\"6mia6\")),\n hammerjs: (parcelRequire(\"bTkIC\"))\n }\n};\n\n});\nparcelRegister(\"jgcBG\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $7wjV9 = parcelRequire(\"7wjV9\");\n\nvar $5k1DD = parcelRequire(\"5k1DD\");\n\nvar $dfwu4 = parcelRequire(\"dfwu4\");\n\nvar $W9Vbx = parcelRequire(\"W9Vbx\");\n\nvar $Yar88 = parcelRequire(\"Yar88\");\n\nvar $lNra6 = parcelRequire(\"lNra6\");\n\nvar $6InGT = parcelRequire(\"6InGT\");\n\nvar $dBMHD = parcelRequire(\"dBMHD\");\nvar $e0594a60b4b76785$require$setAbsolute = $dBMHD.setAbsolute;\n\nvar $dBMHD = parcelRequire(\"dBMHD\");\nvar $e0594a60b4b76785$require$setFullSize = $dBMHD.setFullSize;\n\nvar $2Xxut = parcelRequire(\"2Xxut\");\nvar $e0594a60b4b76785$var$debug = typeof MARZIPANODEBUG !== \"undefined\" && MARZIPANODEBUG.webGl;\n// Browser-specific workarounds.\nvar $e0594a60b4b76785$var$browserQuirks = {\n // Whether to use texImage2D instead of texSubImage2D when repainting an\n // existing texture from a video element. On most browsers texSubImage2D is\n // faster, but on Chrome the performance degrades significantly. See:\n // https://bugs.chromium.org/p/chromium/issues/detail?id=612542\n videoUseTexImage2D: $W9Vbx.chrome\n};\nfunction $e0594a60b4b76785$var$initWebGlContext(canvas, opts) {\n var options = {\n alpha: true,\n premultipliedAlpha: true,\n antialias: !!(opts && opts.antialias),\n preserveDrawingBuffer: !!(opts && opts.preserveDrawingBuffer)\n };\n if ($e0594a60b4b76785$var$debug && typeof WebGLDebugUtils !== \"undefined\") {\n console.log(\"Using WebGL lost context simulator\");\n canvas = WebGLDebugUtils.makeLostContextSimulatingCanvas(canvas);\n }\n // Keep support/WebGl.js in sync with this.\n var gl = canvas.getContext && (canvas.getContext(\"webgl\", options) || canvas.getContext(\"experimental-webgl\", options));\n if (!gl) throw new Error(\"Could not get WebGL context\");\n if ($e0594a60b4b76785$var$debug && typeof WebGLDebugUtils !== \"undefined\") {\n gl = WebGLDebugUtils.makeDebugContext(gl);\n console.log(\"Using WebGL debug context\");\n }\n return gl;\n}\n/**\n * @class WebGlStage\n * @extends Stage\n * @classdesc\n *\n * A {@link Stage} implementation using WebGl.\n *\n * @param {Object} opts\n * @param {boolean} [opts.antialias=false]\n * @param {boolean} [opts.preserveDrawingBuffer=false]\n * @param {boolean} [opts.generateMipmaps=false]\n *\n * The `antialias` and `preserveDrawingBuffer` options control the WebGL\n * context attributes of the same name. The `alpha` and `premultipliedAlpha`\n * WebGL context attributes are set to their default true value and cannot\n * be overriden; this allows semitransparent textures to be composited with\n * the page. See:\n * https://www.khronos.org/registry/webgl/specs/1.0/#WEBGLCONTEXTATTRIBUTES\n *\n * The `generateMipmaps` option controls texture mipmap generation. Mipmaps\n * may improve rendering quality, at the cost of increased memory usage.\n * Due to technical limitations, they are only generated for textures whose\n * dimensions are a power of two. See:\n * https://www.khronos.org/webgl/wiki/WebGL_and_OpenGL_Differences#Non-Power_of_Two_Texture_Support\n *\n * Also see the available {@link Stage} options.\n */ function $e0594a60b4b76785$var$WebGlStage(opts) {\n opts = opts || {};\n var self = this;\n this.constructor.super_.call(this, opts);\n this._generateMipmaps = opts.generateMipmaps != null ? opts.generateMipmaps : false;\n this._loader = new $5k1DD(this);\n this._domElement = document.createElement(\"canvas\");\n $e0594a60b4b76785$require$setAbsolute(this._domElement);\n $e0594a60b4b76785$require$setFullSize(this._domElement);\n this._gl = $e0594a60b4b76785$var$initWebGlContext(this._domElement, opts);\n this._handleContextLoss = function() {\n self.emit(\"webglcontextlost\");\n self._gl = null;\n };\n // Handle WebGl context loss.\n this._domElement.addEventListener(\"webglcontextlost\", this._handleContextLoss);\n // WebGl renderers are singletons for a given stage. This list stores the\n // existing renderers so they can be reused across layers with the same\n // geometry and view type.\n this._rendererInstances = [];\n}\n$Yar88($e0594a60b4b76785$var$WebGlStage, $7wjV9);\n/**\n * Destructor.\n */ $e0594a60b4b76785$var$WebGlStage.prototype.destroy = function() {\n this._domElement.removeEventListener(\"webglcontextlost\", this._handleContextLoss);\n // Delegate clearing own properties to the Stage destructor.\n this.constructor.super_.prototype.destroy.call(this);\n};\n$e0594a60b4b76785$var$WebGlStage.supported = function() {\n return $dfwu4();\n};\n/**\n * Returns the underlying DOM element.\n *\n * @return {Element}\n */ $e0594a60b4b76785$var$WebGlStage.prototype.domElement = function() {\n return this._domElement;\n};\n/**\n * Returns the underlying WebGL rendering context.\n *\n * @return {WebGLRenderingContext }\n */ $e0594a60b4b76785$var$WebGlStage.prototype.webGlContext = function() {\n return this._gl;\n};\n$e0594a60b4b76785$var$WebGlStage.prototype.setSizeForType = function() {\n // Update the size of the canvas coordinate space.\n //\n // The size is obtained by taking the stage dimensions, which are set in CSS\n // pixels, and multiplying them by the device pixel ratio. Crucially, this\n // must be the only place where the WebGL rendering pipeline accesses the\n // pixel ratio; subsequent uses should reference the `drawingBufferWidth` and\n // `drawingBufferHeight` properties on the WebGLRenderingContext. Failing to\n // do so will break the rendering if the pixel ratio changes but the stage\n // size does not, e.g. when moving the window across screens.\n var ratio = $lNra6();\n this._domElement.width = ratio * this._width;\n this._domElement.height = ratio * this._height;\n};\n$e0594a60b4b76785$var$WebGlStage.prototype.loadImage = function(url, rect, done) {\n return this._loader.loadImage(url, rect, done);\n};\n$e0594a60b4b76785$var$WebGlStage.prototype.maxTextureSize = function() {\n return this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE);\n};\n$e0594a60b4b76785$var$WebGlStage.prototype.validateLayer = function(layer) {\n var tileSize = layer.geometry().maxTileSize();\n var maxTextureSize = this.maxTextureSize();\n if (tileSize > maxTextureSize) throw new Error(\"Layer has level with tile size larger than maximum texture size (\" + tileSize + \" vs. \" + maxTextureSize + \")\");\n};\n$e0594a60b4b76785$var$WebGlStage.prototype.createRenderer = function(Renderer) {\n var rendererInstances = this._rendererInstances;\n for(var i = 0; i < rendererInstances.length; i++){\n if (rendererInstances[i] instanceof Renderer) return rendererInstances[i];\n }\n var renderer = new Renderer(this._gl);\n rendererInstances.push(renderer);\n return renderer;\n};\n$e0594a60b4b76785$var$WebGlStage.prototype.destroyRenderer = function(renderer) {\n var rendererInstances = this._rendererInstances;\n if (this._renderers.indexOf(renderer) < 0) {\n renderer.destroy();\n var index = rendererInstances.indexOf(renderer);\n if (index >= 0) rendererInstances.splice(index, 1);\n }\n};\n$e0594a60b4b76785$var$WebGlStage.prototype.startFrame = function() {\n var gl = this._gl;\n if (!gl) throw new Error(\"Bad WebGL context - maybe context was lost?\");\n // Set the WebGL viewport.\n gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);\n // Clear framebuffer.\n gl.clearColor(0.0, 0.0, 0.0, 0.0);\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n // Enable depth testing.\n gl.enable(gl.DEPTH_TEST);\n // Enable blending. ONE and ONE_MINUS_SRC_ALPHA are the right choices for\n // premultiplied textures.\n gl.enable(gl.BLEND);\n gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n};\n$e0594a60b4b76785$var$WebGlStage.prototype.endFrame = function() {};\n$e0594a60b4b76785$var$WebGlStage.prototype.takeSnapshot = function(options) {\n // Validate passed argument\n if (typeof options !== \"object\" || options == null) options = {};\n var quality = options.quality;\n // Set default quality if it is not passed\n if (typeof quality == \"undefined\") quality = 75;\n // Throw if quality is of invlid type or out of bounds\n if (typeof quality !== \"number\" || quality < 0 || quality > 100) throw new Error(\"WebGLStage: Snapshot quality needs to be a number between 0 and 100\");\n // Canvas method \"toDataURL\" needs to be called in the same\n // context as where the actual rendering is done. Hence this.\n this.render();\n // Return the snapshot\n return this._domElement.toDataURL(\"image/jpeg\", quality / 100);\n};\n$e0594a60b4b76785$var$WebGlStage.type = $e0594a60b4b76785$var$WebGlStage.prototype.type = \"webgl\";\nfunction $e0594a60b4b76785$var$WebGlTexture(stage, tile, asset) {\n this._stage = stage;\n this._gl = stage._gl;\n this._texture = null;\n this._timestamp = null;\n this._width = this._height = null;\n this.refresh(tile, asset);\n}\n$e0594a60b4b76785$var$WebGlTexture.prototype.refresh = function(tile, asset) {\n var gl = this._gl;\n var stage = this._stage;\n var texture;\n // Check whether the texture needs to be updated.\n var timestamp = asset.timestamp();\n if (timestamp === this._timestamp) return;\n // Get asset element.\n var element = asset.element();\n // Get asset dimensions.\n var width = asset.width();\n var height = asset.height();\n if (width !== this._width || height !== this._height) {\n // If the texture dimensions have changed since the last refresh, create\n // a new texture with the correct size.\n // Check if texture dimensions would exceed the maximum texture size.\n var maxSize = stage.maxTextureSize();\n if (width > maxSize) throw new Error(\"Texture width larger than max size (\" + width + \" vs. \" + maxSize + \")\");\n if (height > maxSize) throw new Error(\"Texture height larger than max size (\" + height + \" vs. \" + maxSize + \")\");\n // Delete the current texture if it exists.\n // This is necessary for Chrome on Android. If it isn't done the textures\n // do not render when the size changes.\n if (this._texture) gl.deleteTexture(texture);\n // The texture must be premultiplied by alpha to ensure correct blending of\n // semitransparent textures. For details, see:\n // http://www.realtimerendering.com/blog/gpus-prefer-premultiplication/\n texture = this._texture = gl.createTexture();\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, element);\n } else {\n // If the texture dimensions remain the same, repaint the existing texture.\n // Repainting with texSubImage2D is usually faster than with texImage2D,\n // except in the case noted in browserQuirks.\n texture = this._texture;\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);\n if (element instanceof HTMLVideoElement && $e0594a60b4b76785$var$browserQuirks.videoUseTexImage2D) gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, element);\n else gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, element);\n }\n // Generate mipmap if the corresponding stage option is set and the texture\n // dimensions are powers of two.\n if (stage._generateMipmaps && $6InGT(width) && $6InGT(height)) {\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR_MIPMAP_LINEAR);\n gl.generateMipmap(gl.TEXTURE_2D);\n } else {\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n }\n // Clamp texture to edges.\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n // Unbind texture.\n gl.bindTexture(gl.TEXTURE_2D, null);\n // Update texture dimensions and timestamp.\n this._timestamp = timestamp;\n this._width = width;\n this._height = height;\n};\n$e0594a60b4b76785$var$WebGlTexture.prototype.destroy = function() {\n if (this._texture) this._gl.deleteTexture(this._texture);\n $2Xxut(this);\n};\n$e0594a60b4b76785$var$WebGlStage.TextureClass = $e0594a60b4b76785$var$WebGlStage.prototype.TextureClass = $e0594a60b4b76785$var$WebGlTexture;\nmodule.exports = $e0594a60b4b76785$var$WebGlStage;\n\n});\nparcelRegister(\"7wjV9\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $6mia6 = parcelRequire(\"6mia6\");\n\nvar $hluEj = parcelRequire(\"hluEj\");\n\nvar $8pjZz = parcelRequire(\"8pjZz\");\n\nvar $11mTq = parcelRequire(\"11mTq\");\n\nvar $bMUVO = parcelRequire(\"bMUVO\");\n\nvar $2Xxut = parcelRequire(\"2Xxut\");\n\nvar $bYEal = parcelRequire(\"bYEal\");\nfunction $579af966673ff6bc$var$forwardTileCmp(t1, t2) {\n return t1.cmp(t2);\n}\nfunction $579af966673ff6bc$var$reverseTileCmp(t1, t2) {\n return -t1.cmp(t2);\n}\n/**\n * Signals that the stage has been rendered.\n *\n * @param {boolean} stable Whether all tiles were successfully rendered without\n * missing textures or resorting to fallbacks.\n * @event Stage#renderComplete\n */ /**\n * Signals that the contents of the stage have been invalidated and must be\n * rendered again.\n *\n * This is used by the {@link RenderLoop} implementation.\n *\n * @event Stage#renderInvalid\n */ /**\n * @interface Stage\n * @classdesc\n *\n * A Stage is a container with the ability to render a stack of\n * {@link Layer layers}.\n *\n * This is a superclass containing logic that is common to all implementations;\n * it should never be instantiated directly. Instead, use one of the\n * subclasses: {@link WebGlStage}, {@link CssStage} or {@link FlashStage}.\n *\n * @param {Object} opts\n * @param {boolean} [opts.progressive=false]\n *\n * Options listed here may be passed into the `opts` constructor argument of\n * subclasses.\n *\n * The `progressive` option controls whether resolution levels are loaded in\n * order, from lowest to highest. This results in a more pleasing effect when\n * zooming past several levels in a large panoramas, but consumes additional\n * bandwidth.\n */ function $579af966673ff6bc$var$Stage(opts) {\n this._progressive = !!(opts && opts.progressive);\n // The list of layers in display order (background to foreground).\n this._layers = [];\n // The list of renderers; the i-th renderer is for the i-th layer.\n this._renderers = [];\n // The lists of tiles to load and render, populated during render().\n this._tilesToLoad = [];\n this._tilesToRender = [];\n // Temporary tile lists.\n this._tmpVisible = [];\n this._tmpChildren = [];\n // Cached stage dimensions.\n // Start with zero, which inhibits rendering until setSize() is called.\n this._width = 0;\n this._height = 0;\n // Temporary variable for rect.\n this._tmpRect = {};\n // Temporary variable for size.\n this._tmpSize = {};\n // Work queue for createTexture.\n this._createTextureWorkQueue = new $hluEj();\n // Function to emit event when render parameters have changed.\n this._emitRenderInvalid = this._emitRenderInvalid.bind(this);\n // The renderer registry maps each geometry/view pair into the respective\n // Renderer class.\n this._rendererRegistry = new $bYEal();\n}\n$6mia6($579af966673ff6bc$var$Stage);\n/**\n * Destructor.\n */ $579af966673ff6bc$var$Stage.prototype.destroy = function() {\n this.removeAllLayers();\n $2Xxut(this);\n};\n/**\n * Registers a {@link Renderer} for the given {@link Geometry} and {@link View}\n * type.\n *\n * The {@link registerDefaultRenderers} utility function may be used to\n * register all known renderers for a stage type into that stage. Most users\n * will not need to register renderers, as {@link Viewer} does it for them.\n *\n * @param {string} geometryType The geometry type, as given by\n * {@link Geometry#type}.\n * @param {string} viewType The view type, as given by {@link View#type}.\n * @param {*} Renderer The renderer class.\n */ $579af966673ff6bc$var$Stage.prototype.registerRenderer = function(geometryType, viewType, Renderer) {\n return this._rendererRegistry.set(geometryType, viewType, Renderer);\n};\n/**\n * Returns the underlying DOM element.\n *\n * Must be overridden by subclasses.\n *\n * @return {Element}\n */ $579af966673ff6bc$var$Stage.prototype.domElement = function() {\n throw new Error(\"Stage implementation must override domElement\");\n};\n/**\n * Get the stage width.\n * @return {number}\n */ $579af966673ff6bc$var$Stage.prototype.width = function() {\n return this._width;\n};\n/**\n * Get the stage height.\n * @return {number}\n */ $579af966673ff6bc$var$Stage.prototype.height = function() {\n return this._height;\n};\n/**\n * Get the stage dimensions. If an argument is supplied, it is filled in with\n * the result and returned. Otherwise, a fresh object is filled in and returned.\n *\n * @param {Size=} size\n */ $579af966673ff6bc$var$Stage.prototype.size = function(size) {\n size = size || {};\n size.width = this._width;\n size.height = this._height;\n return size;\n};\n/**\n * Set the stage dimensions.\n *\n * This contains the size update logic common to all stage types. Subclasses\n * must define the {@link Stage#setSizeForType} method to perform their own\n * logic.\n *\n * @param {Size} size\n */ $579af966673ff6bc$var$Stage.prototype.setSize = function(size) {\n this._width = size.width;\n this._height = size.height;\n this.setSizeForType(); // must be defined by subclasses.\n this.emit(\"resize\");\n this._emitRenderInvalid();\n};\n/**\n * Call {@link Stage#setSize} instead.\n *\n * This contains the size update logic specific to a stage type. It is called by\n * {@link Stage#setSize} after the base class has been updated to reflect the\n * new size, but before any events are emitted.\n *\n * @param {Size} size\n */ $579af966673ff6bc$var$Stage.prototype.setSizeForType = function(size) {\n throw new Error(\"Stage implementation must override setSizeForType\");\n};\n/**\n * Loads an {@link Asset} from an image.\n * @param {string} url The image URL.\n * @param {?Rect} rect A {@link Rect} describing a portion of the image, or null\n * to use the full image.\n * @param {function(?Error, Asset)} done The callback.\n * @return {function()} A function to cancel loading.\n */ $579af966673ff6bc$var$Stage.prototype.loadImage = function() {\n throw new Error(\"Stage implementation must override loadImage\");\n};\n$579af966673ff6bc$var$Stage.prototype._emitRenderInvalid = function() {\n this.emit(\"renderInvalid\");\n};\n/**\n * Verifies that the layer is valid for this stage, throwing an exception\n * otherwise.\n *\n * @param {Layer} layer\n * @throws {Error} If the layer is not valid for this stage.\n */ $579af966673ff6bc$var$Stage.prototype.validateLayer = function(layer) {\n throw new Error(\"Stage implementation must override validateLayer\");\n};\n/**\n * Returns a list of all {@link Layer layers} belonging to the stage. The\n * returned list is in display order, background to foreground.\n * @return {Layer[]}\n */ $579af966673ff6bc$var$Stage.prototype.listLayers = function() {\n // Return a copy to prevent unintended mutation by the caller.\n return [].concat(this._layers);\n};\n/**\n * Return whether a {@link Layer layer} belongs to the stage.\n * @param {Layer} layer\n * @return {boolean}\n */ $579af966673ff6bc$var$Stage.prototype.hasLayer = function(layer) {\n return this._layers.indexOf(layer) >= 0;\n};\n/**\n * Adds a {@link Layer layer} into the stage.\n * @param {Layer} layer The layer to add.\n * @param {number|undefined} i The optional position, where 0 ≤ i ≤ n and n is\n * the current number of layers. The default is n, which inserts at the\n * top of the display stack.\n * @throws An error if the layer already belongs to the stage or if the position\n * is invalid.\n */ $579af966673ff6bc$var$Stage.prototype.addLayer = function(layer, i) {\n if (this._layers.indexOf(layer) >= 0) throw new Error(\"Layer already in stage\");\n if (i == null) i = this._layers.length;\n if (i < 0 || i > this._layers.length) throw new Error(\"Invalid layer position\");\n this.validateLayer(layer); // must be defined by subclasses.\n var geometryType = layer.geometry().type;\n var viewType = layer.view().type;\n var rendererClass = this._rendererRegistry.get(geometryType, viewType);\n if (!rendererClass) throw new Error(\"No \" + this.type + \" renderer avaiable for \" + geometryType + \" geometry and \" + viewType + \" view\");\n var renderer = this.createRenderer(rendererClass);\n this._layers.splice(i, 0, layer);\n this._renderers.splice(i, 0, renderer);\n // Listeners for render invalid.\n layer.addEventListener(\"viewChange\", this._emitRenderInvalid);\n layer.addEventListener(\"effectsChange\", this._emitRenderInvalid);\n layer.addEventListener(\"fixedLevelChange\", this._emitRenderInvalid);\n layer.addEventListener(\"textureStoreChange\", this._emitRenderInvalid);\n this._emitRenderInvalid();\n};\n/**\n * Moves a {@link Layer layer} into a different position in the display stack.\n * @param {Layer} layer The layer to move.\n * @param {number} i The position, where 0 ≤ i ≤ n-1 and n is the current number\n * of layers.\n * @throws An error if the layer does not belong to the stage or if the position\n * is invalid.\n */ $579af966673ff6bc$var$Stage.prototype.moveLayer = function(layer, i) {\n var index = this._layers.indexOf(layer);\n if (index < 0) throw new Error(\"No such layer in stage\");\n if (i < 0 || i >= this._layers.length) throw new Error(\"Invalid layer position\");\n layer = this._layers.splice(index, 1)[0];\n var renderer = this._renderers.splice(index, 1)[0];\n this._layers.splice(i, 0, layer);\n this._renderers.splice(i, 0, renderer);\n this._emitRenderInvalid();\n};\n/**\n * Removes a {@link Layer} from the stage.\n * @param {Layer} layer The layer to remove.\n * @throws An error if the layer does not belong to the stage.\n */ $579af966673ff6bc$var$Stage.prototype.removeLayer = function(layer) {\n var index = this._layers.indexOf(layer);\n if (index < 0) throw new Error(\"No such layer in stage\");\n var removedLayer = this._layers.splice(index, 1)[0];\n var renderer = this._renderers.splice(index, 1)[0];\n this.destroyRenderer(renderer);\n removedLayer.removeEventListener(\"viewChange\", this._emitRenderInvalid);\n removedLayer.removeEventListener(\"effectsChange\", this._emitRenderInvalid);\n removedLayer.removeEventListener(\"fixedLevelChange\", this._emitRenderInvalid);\n removedLayer.removeEventListener(\"textureStoreChange\", this._emitRenderInvalid);\n this._emitRenderInvalid();\n};\n/**\n * Removes all {@link Layer layers} from the stage.\n */ $579af966673ff6bc$var$Stage.prototype.removeAllLayers = function() {\n while(this._layers.length > 0)this.removeLayer(this._layers[0]);\n};\n/**\n * Called before a frame is rendered.\n *\n * Must be overridden by subclasses.\n */ $579af966673ff6bc$var$Stage.prototype.startFrame = function() {\n throw new Error(\"Stage implementation must override startFrame\");\n};\n/**\n * Called after a frame is rendered.\n *\n * Must be overridden by subclasses.\n */ $579af966673ff6bc$var$Stage.prototype.endFrame = function() {\n throw new Error(\"Stage implementation must override endFrame\");\n};\n/**\n * Render the current frame. Usually called from a {@link RenderLoop}.\n *\n * This contains the rendering logic common to all stage types. Subclasses\n * define the startFrame() and endFrame() methods to perform their own logic.\n */ $579af966673ff6bc$var$Stage.prototype.render = function() {\n var i, j;\n var tilesToLoad = this._tilesToLoad;\n var tilesToRender = this._tilesToRender;\n var stableStage = true;\n var stableLayer;\n // Get the stage dimensions.\n var width = this._width;\n var height = this._height;\n var rect = this._tmpRect;\n var size = this._tmpSize;\n if (width <= 0 || height <= 0) return;\n this.startFrame(); // defined by subclasses\n // Signal start of frame to the texture stores.\n for(i = 0; i < this._layers.length; i++)this._layers[i].textureStore().startFrame();\n // Render layers.\n for(i = 0; i < this._layers.length; i++){\n var layer = this._layers[i];\n var effects = layer.effects();\n var view = layer.view();\n var textureStore = layer.textureStore();\n var renderer = this._renderers[i];\n var depth = this._layers.length - i;\n var tile, texture;\n // Convert the rect effect into a normalized rect.\n // TODO: avoid doing this on every frame.\n $8pjZz(width, height, effects && effects.rect, rect);\n if (rect.width <= 0 || rect.height <= 0) continue;\n // Update the view size.\n size.width = rect.width * this._width;\n size.height = rect.height * this._height;\n view.setSize(size);\n // Signal start of layer to the renderer.\n renderer.startLayer(layer, rect);\n // We render with both alpha blending and depth testing enabled. Thus, when\n // rendering a subsequent pixel at the same location than an existing one,\n // the subsequent pixel gets discarded unless it has smaller depth, and is\n // otherwise composited with the existing pixel.\n //\n // When using fallback tiles to fill a gap in the preferred resolution\n // level, we prefer higher resolution fallbacks to lower resolution ones.\n // However, where fallbacks overlap, we want higher resolution ones to\n // prevail, and we don't want multiple fallbacks to be composited with each\n // other, as that would produce a bad result when semitransparent textures\n // are involved.\n //\n // In order to achieve this within the constraints of alpha blending and\n // depth testing, the depth of a tile must be inversely proportional to its\n // resolution, and higher-resolution tiles must be rendered before lower-\n // resolution ones.\n // Collect the lists of tiles to load and render.\n stableLayer = this._collectTiles(layer, textureStore);\n // Mark all the tiles whose textures must be loaded.\n // This will either trigger loading (for textures not yet loaded) or\n // prevent unloading (for textures already loaded).\n for(j = 0; j < tilesToLoad.length; j++){\n tile = tilesToLoad[j];\n textureStore.markTile(tile);\n }\n // Render tiles.\n for(j = 0; j < tilesToRender.length; j++){\n tile = tilesToRender[j];\n texture = textureStore.texture(tile);\n renderer.renderTile(tile, texture, layer, depth);\n }\n layer.emit(\"renderComplete\", stableLayer);\n if (!stableLayer) stableStage = false;\n // Signal end of layer to the renderer.\n renderer.endLayer(layer, rect);\n }\n // Signal end of frame to the texture stores.\n for(i = 0; i < this._layers.length; i++)this._layers[i].textureStore().endFrame();\n this.endFrame(); // defined by subclasses\n this.emit(\"renderComplete\", stableStage);\n};\n$579af966673ff6bc$var$Stage.prototype._collectTiles = function(layer, textureStore) {\n var tilesToLoad = this._tilesToLoad;\n var tilesToRender = this._tilesToRender;\n var tmpVisible = this._tmpVisible;\n tilesToLoad.length = 0;\n tilesToRender.length = 0;\n tmpVisible.length = 0;\n layer.visibleTiles(tmpVisible);\n var isStable = true;\n for(var i = 0; i < tmpVisible.length; i++){\n var tile = tmpVisible[i];\n var needsFallback;\n this._collectTileToLoad(tile);\n if (textureStore.texture(tile)) {\n // The preferred texture is available.\n // No fallback is required.\n needsFallback = false;\n this._collectTileToRender(tile);\n } else {\n // The preferred texture is unavailable.\n // Collect children for rendering as a fallback.\n needsFallback = this._collectChildren(tile, textureStore);\n isStable = false;\n }\n // Collect all parents for loading, and the closest parent for rendering if\n // a fallback is required.\n this._collectParents(tile, textureStore, needsFallback);\n }\n // Sort tiles to load in ascending resolution order.\n tilesToLoad.sort($579af966673ff6bc$var$forwardTileCmp);\n // Sort tiles to render in descending resolution order.\n tilesToRender.sort($579af966673ff6bc$var$reverseTileCmp);\n return isStable;\n};\n$579af966673ff6bc$var$Stage.prototype._collectChildren = function(tile, textureStore) {\n var tmpChildren = this._tmpChildren;\n var needsFallback = true;\n // Fall back as many levels as necessary on single-child geometries, but do\n // not go beyond immediate children on multiple-child geometries, to avoid\n // exploring an exponential number of tiles.\n do {\n tmpChildren.length = 0;\n if (!tile.children(tmpChildren)) break;\n needsFallback = false;\n for(var i = 0; i < tmpChildren.length; i++){\n tile = tmpChildren[i];\n if (textureStore.texture(tile)) {\n this._collectTileToLoad(tile);\n this._collectTileToRender(tile);\n } else needsFallback = true;\n }\n }while (needsFallback && tmpChildren.length === 1);\n return needsFallback;\n};\n$579af966673ff6bc$var$Stage.prototype._collectParents = function(tile, textureStore, needsFallback) {\n // Recursively visit parent tiles until:\n // - all parents have been marked for loading, if progressive rendering is\n // enabled; and\n // - at least one parent has been marked for both loading and rendering, if\n // a fallback is required.\n var needsLoading = this._progressive;\n while((needsLoading || needsFallback) && (tile = tile.parent()) != null){\n if (needsFallback) {\n if (textureStore.texture(tile)) {\n this._collectTileToRender(tile);\n needsFallback = false;\n } else if (!this._progressive) continue;\n }\n if (!this._collectTileToLoad(tile)) needsLoading = false;\n }\n return needsFallback;\n};\n$579af966673ff6bc$var$Stage.prototype._collectTileToLoad = function(tile) {\n return this._collectTileIntoList(tile, this._tilesToLoad);\n};\n$579af966673ff6bc$var$Stage.prototype._collectTileToRender = function(tile) {\n return this._collectTileIntoList(tile, this._tilesToRender);\n};\n$579af966673ff6bc$var$Stage.prototype._collectTileIntoList = function(tile, tileList) {\n // TODO: Investigate whether it's worth it to make this better than O(n²).\n var found = false;\n for(var i = 0; i < tileList.length; i++)if (tile.equals(tileList[i])) {\n found = true;\n break;\n }\n if (!found) tileList.push(tile);\n return !found;\n};\n/**\n * Create a texture for the given tile and asset. Called by {@link TextureStore}.\n * @param {Tile} tile\n * @param {Asset} asset\n * @param {Function} done\n */ $579af966673ff6bc$var$Stage.prototype.createTexture = function(tile, asset, done) {\n var self = this;\n function makeTexture() {\n return new self.TextureClass(self, tile, asset);\n }\n var fn = $bMUVO($11mTq(makeTexture));\n return this._createTextureWorkQueue.push(fn, function(err, texture) {\n done(err, tile, asset, texture);\n });\n};\n/**\n * The stage type, used to determine the appropriate renderer for a given\n * geometry and view.\n *\n * Known values are `\"webgl\"`, `\"css\"` and `\"flash\"`.\n *\n * See also {@link Stage#registerRenderer}.\n *\n * @property {string}\n * @name Stage#type\n */ module.exports = $579af966673ff6bc$var$Stage;\n\n});\nparcelRegister(\"6mia6\", function(module, exports) {\n\"use strict\";\n/**\n * @class\n * @classdesc Minimalistic event emitter mixin.\n */ function $4a12e2b927a9c278$var$EventEmitter() {}\n/**\n * Registers an event listener for the specified event. If the listener has\n * already been registered for the event, this is a no-op.\n *\n * @param {string} name The event name.\n * @param {function} fn The listener function.\n */ $4a12e2b927a9c278$var$EventEmitter.prototype.addEventListener = function(name, fn) {\n var eventMap = this.__events = this.__events || {};\n var handlerList = eventMap[name] = eventMap[name] || [];\n if (handlerList.indexOf(fn) < 0) handlerList.push(fn);\n};\n/**\n * Unregisters an event listener from the specified event. If the listener\n * hasn't been registered for the event, this is a no-op.\n *\n * @param {string} name The event name.\n * @param {function} fn The listener function.\n */ $4a12e2b927a9c278$var$EventEmitter.prototype.removeEventListener = function(name, fn) {\n var eventMap = this.__events = this.__events || {};\n var handlerList = eventMap[name];\n if (handlerList) {\n var index = handlerList.indexOf(fn);\n if (index >= 0) handlerList.splice(index, 1);\n }\n};\n/**\n * Emits an event, causing all registered event listeners for that event to be\n * called in registration order.\n *\n * @param {string} name The event name.\n * @param {...*} var_args Arguments to call listeners with.\n */ $4a12e2b927a9c278$var$EventEmitter.prototype.emit = function(name, var_args) {\n var eventMap = this.__events = this.__events || {};\n var handlerList = eventMap[name];\n var args = Array.prototype.slice.call(arguments, 1);\n if (handlerList) for(var i = 0; i < handlerList.length; i++){\n var fn = handlerList[i];\n fn.apply(this, args);\n }\n};\n/**\n * Mixes in {@link EventEmitter} into a constructor function.\n *\n * @param {function} ctor The constructor function.\n */ function $4a12e2b927a9c278$var$eventEmitter(ctor) {\n for(var prop in $4a12e2b927a9c278$var$EventEmitter.prototype)if ($4a12e2b927a9c278$var$EventEmitter.prototype.hasOwnProperty(prop)) ctor.prototype[prop] = $4a12e2b927a9c278$var$EventEmitter.prototype[prop];\n}\nmodule.exports = $4a12e2b927a9c278$var$eventEmitter;\n\n});\n\nparcelRegister(\"hluEj\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $azWbw = parcelRequire(\"azWbw\");\nfunction $ca0c2c24c302e94b$var$WorkTask(fn, cb) {\n this.fn = fn;\n this.cb = cb;\n this.cfn = null;\n}\nfunction $ca0c2c24c302e94b$var$WorkQueue(opts) {\n this._queue = [];\n this._delay = opts && opts.delay || 0;\n this._paused = opts && !!opts.paused || false;\n this._currentTask = null;\n this._lastFinished = null;\n}\n$ca0c2c24c302e94b$var$WorkQueue.prototype.length = function() {\n return this._queue.length;\n};\n$ca0c2c24c302e94b$var$WorkQueue.prototype.push = function(fn, cb) {\n var task = new $ca0c2c24c302e94b$var$WorkTask(fn, cb);\n var cancel = this._cancel.bind(this, task);\n // Push the task into the queue.\n this._queue.push(task);\n // Run the task if idle.\n this._next();\n return cancel;\n};\n$ca0c2c24c302e94b$var$WorkQueue.prototype.pause = function() {\n if (!this._paused) this._paused = true;\n};\n$ca0c2c24c302e94b$var$WorkQueue.prototype.resume = function() {\n if (this._paused) {\n this._paused = false;\n this._next();\n }\n};\n$ca0c2c24c302e94b$var$WorkQueue.prototype._start = function(task) {\n // Consistency check.\n if (this._currentTask) throw new Error(\"WorkQueue: called start while running task\");\n // Mark queue as busy, so that concurrent tasks wait.\n this._currentTask = task;\n // Execute the task.\n var finish = this._finish.bind(this, task);\n task.cfn = task.fn(finish);\n // Detect when a non-cancellable function has been queued.\n if (typeof task.cfn !== \"function\") throw new Error(\"WorkQueue: function is not cancellable\");\n};\n$ca0c2c24c302e94b$var$WorkQueue.prototype._finish = function(task) {\n var args = Array.prototype.slice.call(arguments, 1);\n // Consistency check.\n if (this._currentTask !== task) throw new Error(\"WorkQueue: called finish on wrong task\");\n // Call the task callback on the return values.\n task.cb.apply(null, args);\n // Mark as not busy and record task finish time, then advance to next task.\n this._currentTask = null;\n this._lastFinished = $azWbw();\n this._next();\n};\n$ca0c2c24c302e94b$var$WorkQueue.prototype._cancel = function(task) {\n var args = Array.prototype.slice.call(arguments, 1);\n if (this._currentTask === task) // Cancel running task. Because cancel passes control to the _finish\n // callback we passed into fn, the cleanup logic will be handled there.\n task.cfn.apply(null, args);\n else {\n // Remove task from queue.\n var pos = this._queue.indexOf(task);\n if (pos >= 0) {\n this._queue.splice(pos, 1);\n task.cb.apply(null, args);\n }\n }\n};\n$ca0c2c24c302e94b$var$WorkQueue.prototype._next = function() {\n if (this._paused) // Do not start tasks while paused.\n return;\n if (!this._queue.length) // No tasks to run.\n return;\n if (this._currentTask) // Will be called again when the current task finishes.\n return;\n if (this._lastFinished != null) {\n var elapsed = $azWbw() - this._lastFinished;\n var remaining = this._delay - elapsed;\n if (remaining > 0) {\n // Too soon. Run again after the inter-task delay.\n setTimeout(this._next.bind(this), remaining);\n return;\n }\n }\n // Run the next task.\n var task = this._queue.shift();\n this._start(task);\n};\nmodule.exports = $ca0c2c24c302e94b$var$WorkQueue;\n\n});\nparcelRegister(\"azWbw\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\nfunction $7b3a4e9666ec5414$var$getNow() {\n if (typeof performance !== \"undefined\" && performance.now) return function performanceNow() {\n return performance.now();\n };\n return function dateNow() {\n return Date.now();\n };\n}\nmodule.exports = $7b3a4e9666ec5414$var$getNow();\n\n});\n\n\nparcelRegister(\"8pjZz\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n/**\n * Converts a {@link RectSpec} into an equivalent {@link Rect}.\n *\n * A {@link RectSpec} is a convenient user API format, providing default values\n * and the flexibility of specifying absolute, relative or mixed dimensions.\n *\n * A {@link Rect} is a more convenient format for the rendering pipeline. It is\n * always expressed in normalized coordinates, and all its properties are\n * guaranteed to be present.\n *\n * @param {number} totalWidth The total width of the rendering area in pixels.\n * @param {number} totalHeight The total height of the rendering area in pixels.\n * @param {RectSpec} spec The input spec, defaulting to the full rendering area\n * if null or undefined.\n * @param {Rect} result The output spec. If the argument is present, it is\n * filled in and returned; otherwise, a fresh object is returned.\n */ function $61f02a8aab9e7b97$var$calcRect(totalWidth, totalHeight, spec, result) {\n result = result || {};\n var width;\n if (spec != null && spec.absoluteWidth != null) width = spec.absoluteWidth / totalWidth;\n else if (spec != null && spec.relativeWidth != null) width = spec.relativeWidth;\n else width = 1;\n var height;\n if (spec && spec.absoluteHeight != null) height = spec.absoluteHeight / totalHeight;\n else if (spec != null && spec.relativeHeight != null) height = spec.relativeHeight;\n else height = 1;\n var x;\n if (spec != null && spec.absoluteX != null) x = spec.absoluteX / totalWidth;\n else if (spec != null && spec.relativeX != null) x = spec.relativeX;\n else x = 0;\n var y;\n if (spec != null && spec.absoluteY != null) y = spec.absoluteY / totalHeight;\n else if (spec != null && spec.relativeY != null) y = spec.relativeY;\n else y = 0;\n result.x = x;\n result.y = y;\n result.width = width;\n result.height = height;\n return result;\n}\nmodule.exports = $61f02a8aab9e7b97$var$calcRect;\n\n});\n\nparcelRegister(\"11mTq\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n// Transform a synchronous function into an asynchronous one.\nfunction $0be7a4830ed170c4$var$async(fn) {\n return function asynced(done) {\n var err, ret;\n try {\n ret = fn();\n } catch (e) {\n err = e;\n } finally{\n if (err) done(err);\n else done(null, ret);\n }\n };\n}\nmodule.exports = $0be7a4830ed170c4$var$async;\n\n});\n\nparcelRegister(\"bMUVO\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $9ZuRa = parcelRequire(\"9ZuRa\");\n// A cancelable function is an asynchronous function (i.e., one whose last\n// argument is a callback receiving an error plus zero or more return values)\n// that (synchronously) returns a cancel() function. Calling cancel() should\n// abort the asynchronous operation and call the callback with the arguments\n// that were passed into cancel(). Calling cancel() twice, as with callbacks,\n// is not guaranteed to be safe.\n// Wrap a non-cancellable asynchronous function into a cancelable one.\n//\n// Calling cancel() on the returned function will not interrupt the execution\n// of the original function; it will merely ignore its return value.\n//\n// Usually, instead of wrapping your function, you want to implement cancel()\n// yourself in order to have some abort logic. This utility function provides a\n// straighforward solution for cases in which no custom abort logic is required.\nfunction $895056c8173cbb2b$var$cancelize(fn) {\n return function cancelized() {\n if (!arguments.length) throw new Error(\"cancelized: expected at least one argument\");\n var args = Array.prototype.slice.call(arguments, 0);\n var done = args[args.length - 1] = $9ZuRa(args[args.length - 1]);\n function cancel() {\n done.apply(null, arguments);\n }\n fn.apply(null, args);\n return cancel;\n };\n}\nmodule.exports = $895056c8173cbb2b$var$cancelize;\n\n});\nparcelRegister(\"9ZuRa\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\nfunction $7461bf0c47673714$var$once(fn) {\n var called = false;\n var value;\n return function onced() {\n if (!called) {\n called = true;\n value = fn.apply(null, arguments);\n }\n return value;\n };\n}\nmodule.exports = $7461bf0c47673714$var$once;\n\n});\n\n\nparcelRegister(\"2Xxut\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n// Sets an object's own properties to undefined. This may be called by\n// destructors to avoid retaining references and help detect incorrect use of\n// destroyed instances.\nfunction $227b11fe472f7d56$var$clearOwnProperties(obj) {\n for(var prop in obj)if (obj.hasOwnProperty(prop)) obj[prop] = undefined;\n}\nmodule.exports = $227b11fe472f7d56$var$clearOwnProperties;\n\n});\n\nparcelRegister(\"bYEal\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n/**\n * @class RendererRegistry\n * @classdesc\n *\n * A RendererRegistry maps pairs of {@link Geometry} and {@link View} type into\n * the appropriate {@link Renderer} class. It is used by a {@link Stage} to\n * determine the appropriate renderer for a {@link Layer}.\n *\n * See also {@link Stage#registerRenderer}.\n */ function $8b847468f6b3fd4c$var$RendererRegistry() {\n this._renderers = {};\n}\n/**\n * Registers a renderer for the given geometry and view type.\n * @param {string} geometryType The geometry type, as given by\n * {@link Geometry#type}.\n * @param {string} viewType The view type, as given by {@link View#type}.\n * @param {*} Renderer The renderer class.\n */ $8b847468f6b3fd4c$var$RendererRegistry.prototype.set = function(geometryType, viewType, Renderer) {\n if (!this._renderers[geometryType]) this._renderers[geometryType] = {};\n this._renderers[geometryType][viewType] = Renderer;\n};\n/**\n * Retrieves the renderer for the given geometry and view type.\n * @param {string} geometryType The geometry type, as given by\n * {@link Geometry#type}.\n * @param {string} viewType The view type, as given by {@link View#type}.\n * @param {*} Renderer The renderer class, or null if no such renderer has been\n * registered.\n */ $8b847468f6b3fd4c$var$RendererRegistry.prototype.get = function(geometryType, viewType) {\n var Renderer = this._renderers[geometryType] && this._renderers[geometryType][viewType];\n return Renderer || null;\n};\nmodule.exports = $8b847468f6b3fd4c$var$RendererRegistry;\n\n});\n\n\nparcelRegister(\"5k1DD\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $4Qk7S = parcelRequire(\"4Qk7S\");\n\nvar $1Cfry = parcelRequire(\"1Cfry\");\n\nvar $9ZuRa = parcelRequire(\"9ZuRa\");\n// N.B. HtmlImageLoader is broken on IE8 for images that require resizing, due\n// to the unavailable HTML5 canvas element and the naturalWidth/naturalHeight\n// properties of image elements. This is currently not a problem because the\n// HTML-based renderers (WebGL and CSS) do not work on IE8 anyway. It could\n// become a problem in the future if we decide to support CSS rendering of flat\n// panoramas on IE8.\n// TODO: Move the load queue into the loader.\n/**\n * @class HtmlImageLoader\n * @implements ImageLoader\n * @classdesc\n *\n * A {@link Loader} for HTML images.\n *\n * @param {Stage} stage The stage which is going to request images to be loaded.\n */ function $3e00175a50caf80a$var$HtmlImageLoader(stage) {\n if (stage.type !== \"webgl\" && stage.type !== \"css\") throw new Error(\"Stage type incompatible with loader\");\n this._stage = stage;\n}\n/**\n * Loads an {@link Asset} from an image.\n * @param {string} url The image URL.\n * @param {?Rect} rect A {@link Rect} describing a portion of the image, or null\n * to use the full image.\n * @param {function(?Error, Asset)} done The callback.\n * @return {function()} A function to cancel loading.\n */ $3e00175a50caf80a$var$HtmlImageLoader.prototype.loadImage = function(url, rect, done) {\n var img = new Image();\n // Allow cross-domain image loading.\n // This is required to be able to create WebGL textures from images fetched\n // from a different domain. Note that setting the crossorigin attribute to\n // 'anonymous' will trigger a CORS preflight for cross-domain requests, but no\n // credentials (cookies or HTTP auth) will be sent; to do so, the attribute\n // would have to be set to 'use-credentials' instead. Unfortunately, this is\n // not a safe choice, as it causes requests to fail when the response contains\n // an Access-Control-Allow-Origin header with a wildcard. See the section\n // \"Credentialed requests and wildcards\" on:\n // https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS\n img.crossOrigin = \"anonymous\";\n var x = rect && rect.x || 0;\n var y = rect && rect.y || 0;\n var width = rect && rect.width || 1;\n var height = rect && rect.height || 1;\n done = $9ZuRa(done);\n img.onload = function() {\n if (x === 0 && y === 0 && width === 1 && height === 1) done(null, new $4Qk7S(img));\n else {\n x *= img.naturalWidth;\n y *= img.naturalHeight;\n width *= img.naturalWidth;\n height *= img.naturalHeight;\n var canvas = document.createElement(\"canvas\");\n canvas.width = width;\n canvas.height = height;\n var context = canvas.getContext(\"2d\");\n context.drawImage(img, x, y, width, height, 0, 0, width, height);\n done(null, new $4Qk7S(canvas));\n }\n };\n img.onerror = function() {\n // TODO: is there any way to distinguish a network error from other\n // kinds of errors? For now we always return NetworkError since this\n // prevents images to be retried continuously while we are offline.\n done(new $1Cfry(\"Network error: \" + url));\n };\n img.src = url;\n function cancel() {\n img.onload = img.onerror = null;\n img.src = \"\";\n done.apply(null, arguments);\n }\n return cancel;\n};\nmodule.exports = $3e00175a50caf80a$var$HtmlImageLoader;\n\n});\nparcelRegister(\"4Qk7S\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $h87tj = parcelRequire(\"h87tj\");\n\nvar $6mia6 = parcelRequire(\"6mia6\");\n\nvar $2Xxut = parcelRequire(\"2Xxut\");\nvar $386ba157d397599a$var$propertyMap = {\n HTMLImageElement: [\n \"naturalWidth\",\n \"naturalHeight\"\n ],\n HTMLCanvasElement: [\n \"width\",\n \"height\"\n ],\n ImageBitmap: [\n \"width\",\n \"height\"\n ]\n};\n/**\n * @class StaticAsset\n * @implements Asset\n * @classdesc\n *\n * An immutable {@link Asset} compatible with {@link WebGlStage} and\n * {@link CssStage}.\n *\n * @param {HTMLImageElement|HTMLCanvasElement|ImageBitmap} element The\n * underlying pixel source.\n * @throws If the pixel source is unsupported.\n */ function $386ba157d397599a$var$StaticAsset(element) {\n var supported = false;\n for(var type in $386ba157d397599a$var$propertyMap)if ($h87tj[type] && element instanceof $h87tj[type]) {\n supported = true;\n this._widthProp = $386ba157d397599a$var$propertyMap[type][0];\n this._heightProp = $386ba157d397599a$var$propertyMap[type][1];\n break;\n }\n if (!supported) throw new Error(\"Unsupported pixel source\");\n this._element = element;\n}\n$6mia6($386ba157d397599a$var$StaticAsset);\n/**\n * Destructor.\n */ $386ba157d397599a$var$StaticAsset.prototype.destroy = function() {\n $2Xxut(this);\n};\n$386ba157d397599a$var$StaticAsset.prototype.element = function() {\n return this._element;\n};\n$386ba157d397599a$var$StaticAsset.prototype.width = function() {\n return this._element[this._widthProp];\n};\n$386ba157d397599a$var$StaticAsset.prototype.height = function() {\n return this._element[this._heightProp];\n};\n$386ba157d397599a$var$StaticAsset.prototype.timestamp = function() {\n return 0;\n};\n$386ba157d397599a$var$StaticAsset.prototype.isDynamic = function() {\n return false;\n};\nmodule.exports = $386ba157d397599a$var$StaticAsset;\n\n});\nparcelRegister(\"h87tj\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n// The global object.\nvar $c788fac48c2ce4e4$var$globalObject = function() {\n if (typeof window !== \"undefined\") return window;\n if (typeof self !== \"undefined\") return self;\n if (typeof $parcel$global !== \"undefined\") return $parcel$global;\n return null;\n}();\nmodule.exports = $c788fac48c2ce4e4$var$globalObject;\n\n});\n\n\nparcelRegister(\"1Cfry\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $Yar88 = parcelRequire(\"Yar88\");\n/**\n * @class NetworkError\n * @extends {Error}\n * @classdesc\n *\n * Signals an error that occurred while fetching a URL. This is used by\n * {@link Loader loaders} to distinguish network failures from other errors.\n */ function $12d551cd80a2a729$var$NetworkError(message) {\n // See: https://stackoverflow.com/questions/1382107/whats-a-good-way-to-extend-error-in-javascript\n this.constructor.super_.apply(this, arguments);\n this.message = message;\n}\n$Yar88($12d551cd80a2a729$var$NetworkError, Error);\nmodule.exports = $12d551cd80a2a729$var$NetworkError;\n\n});\nparcelRegister(\"Yar88\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n// Make ctor a subclass of superCtor.\n// Do not depend on ES5 Object.create semantics because of older browsers.\nfunction $0b4db3332be99d71$var$inherits(ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function() {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n}\nmodule.exports = $0b4db3332be99d71$var$inherits;\n\n});\n\n\n\nparcelRegister(\"dfwu4\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n// Detect WebGl support.\n// Keep stages/WebGl.js in sync with this.\nfunction $9a55dfbeb821c235$var$checkWebGlSupported() {\n var canvas = document.createElement(\"canvas\");\n var gl = canvas.getContext && (canvas.getContext(\"webgl\") || canvas.getContext(\"experimental-webgl\"));\n return !!gl;\n}\n// Cache result.\nvar $9a55dfbeb821c235$var$supported;\nfunction $9a55dfbeb821c235$var$webGlSupported() {\n if ($9a55dfbeb821c235$var$supported !== undefined) return $9a55dfbeb821c235$var$supported;\n return $9a55dfbeb821c235$var$supported = $9a55dfbeb821c235$var$checkWebGlSupported();\n}\nmodule.exports = $9a55dfbeb821c235$var$webGlSupported;\n\n});\n\nparcelRegister(\"W9Vbx\", function(module, exports) {\n!function(e, t) {\n module.exports = t();\n}(module.exports, function() {\n return function(e) {\n var t = {};\n function r(i) {\n if (t[i]) return t[i].exports;\n var n = t[i] = {\n i: i,\n l: !1,\n exports: {}\n };\n return e[i].call(n.exports, n, n.exports, r), n.l = !0, n.exports;\n }\n return r.m = e, r.c = t, r.d = function(e, t, i) {\n r.o(e, t) || Object.defineProperty(e, t, {\n enumerable: !0,\n get: i\n });\n }, r.r = function(e) {\n \"undefined\" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {\n value: \"Module\"\n }), Object.defineProperty(e, \"__esModule\", {\n value: !0\n });\n }, r.t = function(e, t) {\n if (1 & t && (e = r(e)), 8 & t) return e;\n if (4 & t && \"object\" == typeof e && e && e.__esModule) return e;\n var i = Object.create(null);\n if (r.r(i), Object.defineProperty(i, \"default\", {\n enumerable: !0,\n value: e\n }), 2 & t && \"string\" != typeof e) for(var n in e)r.d(i, n, (function(t) {\n return e[t];\n }).bind(null, n));\n return i;\n }, r.n = function(e) {\n var t = e && e.__esModule ? function() {\n return e.default;\n } : function() {\n return e;\n };\n return r.d(t, \"a\", t), t;\n }, r.o = function(e, t) {\n return Object.prototype.hasOwnProperty.call(e, t);\n }, r.p = \"\", r(r.s = 90);\n }({\n 17: function(e, t, r) {\n \"use strict\";\n t.__esModule = !0, t.default = void 0;\n var i = r(18), n = function() {\n function e() {}\n return e.getFirstMatch = function(e, t) {\n var r = t.match(e);\n return r && r.length > 0 && r[1] || \"\";\n }, e.getSecondMatch = function(e, t) {\n var r = t.match(e);\n return r && r.length > 1 && r[2] || \"\";\n }, e.matchAndReturnConst = function(e, t, r) {\n if (e.test(t)) return r;\n }, e.getWindowsVersionName = function(e) {\n switch(e){\n case \"NT\":\n return \"NT\";\n case \"XP\":\n return \"XP\";\n case \"NT 5.0\":\n return \"2000\";\n case \"NT 5.1\":\n return \"XP\";\n case \"NT 5.2\":\n return \"2003\";\n case \"NT 6.0\":\n return \"Vista\";\n case \"NT 6.1\":\n return \"7\";\n case \"NT 6.2\":\n return \"8\";\n case \"NT 6.3\":\n return \"8.1\";\n case \"NT 10.0\":\n return \"10\";\n default:\n return;\n }\n }, e.getMacOSVersionName = function(e) {\n var t = e.split(\".\").splice(0, 2).map(function(e) {\n return parseInt(e, 10) || 0;\n });\n if (t.push(0), 10 === t[0]) switch(t[1]){\n case 5:\n return \"Leopard\";\n case 6:\n return \"Snow Leopard\";\n case 7:\n return \"Lion\";\n case 8:\n return \"Mountain Lion\";\n case 9:\n return \"Mavericks\";\n case 10:\n return \"Yosemite\";\n case 11:\n return \"El Capitan\";\n case 12:\n return \"Sierra\";\n case 13:\n return \"High Sierra\";\n case 14:\n return \"Mojave\";\n case 15:\n return \"Catalina\";\n default:\n return;\n }\n }, e.getAndroidVersionName = function(e) {\n var t = e.split(\".\").splice(0, 2).map(function(e) {\n return parseInt(e, 10) || 0;\n });\n if (t.push(0), !(1 === t[0] && t[1] < 5)) return 1 === t[0] && t[1] < 6 ? \"Cupcake\" : 1 === t[0] && t[1] >= 6 ? \"Donut\" : 2 === t[0] && t[1] < 2 ? \"Eclair\" : 2 === t[0] && 2 === t[1] ? \"Froyo\" : 2 === t[0] && t[1] > 2 ? \"Gingerbread\" : 3 === t[0] ? \"Honeycomb\" : 4 === t[0] && t[1] < 1 ? \"Ice Cream Sandwich\" : 4 === t[0] && t[1] < 4 ? \"Jelly Bean\" : 4 === t[0] && t[1] >= 4 ? \"KitKat\" : 5 === t[0] ? \"Lollipop\" : 6 === t[0] ? \"Marshmallow\" : 7 === t[0] ? \"Nougat\" : 8 === t[0] ? \"Oreo\" : 9 === t[0] ? \"Pie\" : void 0;\n }, e.getVersionPrecision = function(e) {\n return e.split(\".\").length;\n }, e.compareVersions = function(t, r, i) {\n void 0 === i && (i = !1);\n var n = e.getVersionPrecision(t), s = e.getVersionPrecision(r), o = Math.max(n, s), a = 0, u = e.map([\n t,\n r\n ], function(t) {\n var r = o - e.getVersionPrecision(t), i = t + new Array(r + 1).join(\".0\");\n return e.map(i.split(\".\"), function(e) {\n return new Array(20 - e.length).join(\"0\") + e;\n }).reverse();\n });\n for(i && (a = o - Math.min(n, s)), o -= 1; o >= a;){\n if (u[0][o] > u[1][o]) return 1;\n if (u[0][o] === u[1][o]) {\n if (o === a) return 0;\n o -= 1;\n } else if (u[0][o] < u[1][o]) return -1;\n }\n }, e.map = function(e, t) {\n var r, i = [];\n if (Array.prototype.map) return Array.prototype.map.call(e, t);\n for(r = 0; r < e.length; r += 1)i.push(t(e[r]));\n return i;\n }, e.getBrowserAlias = function(e) {\n return i.BROWSER_ALIASES_MAP[e];\n }, e.getBrowserTypeByAlias = function(e) {\n return i.BROWSER_MAP[e] || \"\";\n }, e;\n }();\n t.default = n, e.exports = t.default;\n },\n 18: function(e, t, r) {\n \"use strict\";\n t.__esModule = !0, t.ENGINE_MAP = t.OS_MAP = t.PLATFORMS_MAP = t.BROWSER_MAP = t.BROWSER_ALIASES_MAP = void 0;\n t.BROWSER_ALIASES_MAP = {\n \"Amazon Silk\": \"amazon_silk\",\n \"Android Browser\": \"android\",\n Bada: \"bada\",\n BlackBerry: \"blackberry\",\n Chrome: \"chrome\",\n Chromium: \"chromium\",\n Epiphany: \"epiphany\",\n Firefox: \"firefox\",\n Focus: \"focus\",\n Generic: \"generic\",\n \"Google Search\": \"google_search\",\n Googlebot: \"googlebot\",\n \"Internet Explorer\": \"ie\",\n \"K-Meleon\": \"k_meleon\",\n Maxthon: \"maxthon\",\n \"Microsoft Edge\": \"edge\",\n \"MZ Browser\": \"mz\",\n \"NAVER Whale Browser\": \"naver\",\n Opera: \"opera\",\n \"Opera Coast\": \"opera_coast\",\n PhantomJS: \"phantomjs\",\n Puffin: \"puffin\",\n QupZilla: \"qupzilla\",\n QQ: \"qq\",\n QQLite: \"qqlite\",\n Safari: \"safari\",\n Sailfish: \"sailfish\",\n \"Samsung Internet for Android\": \"samsung_internet\",\n SeaMonkey: \"seamonkey\",\n Sleipnir: \"sleipnir\",\n Swing: \"swing\",\n Tizen: \"tizen\",\n \"UC Browser\": \"uc\",\n Vivaldi: \"vivaldi\",\n \"WebOS Browser\": \"webos\",\n WeChat: \"wechat\",\n \"Yandex Browser\": \"yandex\",\n Roku: \"roku\"\n };\n t.BROWSER_MAP = {\n amazon_silk: \"Amazon Silk\",\n android: \"Android Browser\",\n bada: \"Bada\",\n blackberry: \"BlackBerry\",\n chrome: \"Chrome\",\n chromium: \"Chromium\",\n epiphany: \"Epiphany\",\n firefox: \"Firefox\",\n focus: \"Focus\",\n generic: \"Generic\",\n googlebot: \"Googlebot\",\n google_search: \"Google Search\",\n ie: \"Internet Explorer\",\n k_meleon: \"K-Meleon\",\n maxthon: \"Maxthon\",\n edge: \"Microsoft Edge\",\n mz: \"MZ Browser\",\n naver: \"NAVER Whale Browser\",\n opera: \"Opera\",\n opera_coast: \"Opera Coast\",\n phantomjs: \"PhantomJS\",\n puffin: \"Puffin\",\n qupzilla: \"QupZilla\",\n qq: \"QQ Browser\",\n qqlite: \"QQ Browser Lite\",\n safari: \"Safari\",\n sailfish: \"Sailfish\",\n samsung_internet: \"Samsung Internet for Android\",\n seamonkey: \"SeaMonkey\",\n sleipnir: \"Sleipnir\",\n swing: \"Swing\",\n tizen: \"Tizen\",\n uc: \"UC Browser\",\n vivaldi: \"Vivaldi\",\n webos: \"WebOS Browser\",\n wechat: \"WeChat\",\n yandex: \"Yandex Browser\"\n };\n t.PLATFORMS_MAP = {\n tablet: \"tablet\",\n mobile: \"mobile\",\n desktop: \"desktop\",\n tv: \"tv\"\n };\n t.OS_MAP = {\n WindowsPhone: \"Windows Phone\",\n Windows: \"Windows\",\n MacOS: \"macOS\",\n iOS: \"iOS\",\n Android: \"Android\",\n WebOS: \"WebOS\",\n BlackBerry: \"BlackBerry\",\n Bada: \"Bada\",\n Tizen: \"Tizen\",\n Linux: \"Linux\",\n ChromeOS: \"Chrome OS\",\n PlayStation4: \"PlayStation 4\",\n Roku: \"Roku\"\n };\n t.ENGINE_MAP = {\n EdgeHTML: \"EdgeHTML\",\n Blink: \"Blink\",\n Trident: \"Trident\",\n Presto: \"Presto\",\n Gecko: \"Gecko\",\n WebKit: \"WebKit\"\n };\n },\n 90: function(e, t, r) {\n \"use strict\";\n t.__esModule = !0, t.default = void 0;\n var i, n = (i = r(91)) && i.__esModule ? i : {\n default: i\n }, s = r(18);\n function o(e, t) {\n for(var r = 0; r < t.length; r++){\n var i = t[r];\n i.enumerable = i.enumerable || !1, i.configurable = !0, \"value\" in i && (i.writable = !0), Object.defineProperty(e, i.key, i);\n }\n }\n var a = function() {\n function e() {}\n var t, r, i;\n return e.getParser = function(e, t) {\n if (void 0 === t && (t = !1), \"string\" != typeof e) throw new Error(\"UserAgent should be a string\");\n return new n.default(e, t);\n }, e.parse = function(e) {\n return new n.default(e).getResult();\n }, t = e, i = [\n {\n key: \"BROWSER_MAP\",\n get: function() {\n return s.BROWSER_MAP;\n }\n },\n {\n key: \"ENGINE_MAP\",\n get: function() {\n return s.ENGINE_MAP;\n }\n },\n {\n key: \"OS_MAP\",\n get: function() {\n return s.OS_MAP;\n }\n },\n {\n key: \"PLATFORMS_MAP\",\n get: function() {\n return s.PLATFORMS_MAP;\n }\n }\n ], r = null, i && o(t, i), e;\n }();\n t.default = a, e.exports = t.default;\n },\n 91: function(e, t, r) {\n \"use strict\";\n t.__esModule = !0, t.default = void 0;\n var i = u(r(92)), n = u(r(93)), s = u(r(94)), o = u(r(95)), a = u(r(17));\n function u(e) {\n return e && e.__esModule ? e : {\n default: e\n };\n }\n var d = function() {\n function e(e, t) {\n if (void 0 === t && (t = !1), null == e || \"\" === e) throw new Error(\"UserAgent parameter can't be empty\");\n this._ua = e, this.parsedResult = {}, !0 !== t && this.parse();\n }\n var t = e.prototype;\n return t.getUA = function() {\n return this._ua;\n }, t.test = function(e) {\n return e.test(this._ua);\n }, t.parseBrowser = function() {\n var e = this;\n this.parsedResult.browser = {};\n var t = i.default.find(function(t) {\n if (\"function\" == typeof t.test) return t.test(e);\n if (t.test instanceof Array) return t.test.some(function(t) {\n return e.test(t);\n });\n throw new Error(\"Browser's test function is not valid\");\n });\n return t && (this.parsedResult.browser = t.describe(this.getUA())), this.parsedResult.browser;\n }, t.getBrowser = function() {\n return this.parsedResult.browser ? this.parsedResult.browser : this.parseBrowser();\n }, t.getBrowserName = function(e) {\n return e ? String(this.getBrowser().name).toLowerCase() || \"\" : this.getBrowser().name || \"\";\n }, t.getBrowserVersion = function() {\n return this.getBrowser().version;\n }, t.getOS = function() {\n return this.parsedResult.os ? this.parsedResult.os : this.parseOS();\n }, t.parseOS = function() {\n var e = this;\n this.parsedResult.os = {};\n var t = n.default.find(function(t) {\n if (\"function\" == typeof t.test) return t.test(e);\n if (t.test instanceof Array) return t.test.some(function(t) {\n return e.test(t);\n });\n throw new Error(\"Browser's test function is not valid\");\n });\n return t && (this.parsedResult.os = t.describe(this.getUA())), this.parsedResult.os;\n }, t.getOSName = function(e) {\n var t = this.getOS().name;\n return e ? String(t).toLowerCase() || \"\" : t || \"\";\n }, t.getOSVersion = function() {\n return this.getOS().version;\n }, t.getPlatform = function() {\n return this.parsedResult.platform ? this.parsedResult.platform : this.parsePlatform();\n }, t.getPlatformType = function(e) {\n void 0 === e && (e = !1);\n var t = this.getPlatform().type;\n return e ? String(t).toLowerCase() || \"\" : t || \"\";\n }, t.parsePlatform = function() {\n var e = this;\n this.parsedResult.platform = {};\n var t = s.default.find(function(t) {\n if (\"function\" == typeof t.test) return t.test(e);\n if (t.test instanceof Array) return t.test.some(function(t) {\n return e.test(t);\n });\n throw new Error(\"Browser's test function is not valid\");\n });\n return t && (this.parsedResult.platform = t.describe(this.getUA())), this.parsedResult.platform;\n }, t.getEngine = function() {\n return this.parsedResult.engine ? this.parsedResult.engine : this.parseEngine();\n }, t.getEngineName = function(e) {\n return e ? String(this.getEngine().name).toLowerCase() || \"\" : this.getEngine().name || \"\";\n }, t.parseEngine = function() {\n var e = this;\n this.parsedResult.engine = {};\n var t = o.default.find(function(t) {\n if (\"function\" == typeof t.test) return t.test(e);\n if (t.test instanceof Array) return t.test.some(function(t) {\n return e.test(t);\n });\n throw new Error(\"Browser's test function is not valid\");\n });\n return t && (this.parsedResult.engine = t.describe(this.getUA())), this.parsedResult.engine;\n }, t.parse = function() {\n return this.parseBrowser(), this.parseOS(), this.parsePlatform(), this.parseEngine(), this;\n }, t.getResult = function() {\n return Object.assign({}, this.parsedResult);\n }, t.satisfies = function(e) {\n var t = this, r = {}, i = 0, n = {}, s = 0;\n if (Object.keys(e).forEach(function(t) {\n var o = e[t];\n \"string\" == typeof o ? (n[t] = o, s += 1) : \"object\" == typeof o && (r[t] = o, i += 1);\n }), i > 0) {\n var o = Object.keys(r), a = o.find(function(e) {\n return t.isOS(e);\n });\n if (a) {\n var u = this.satisfies(r[a]);\n if (void 0 !== u) return u;\n }\n var d = o.find(function(e) {\n return t.isPlatform(e);\n });\n if (d) {\n var c = this.satisfies(r[d]);\n if (void 0 !== c) return c;\n }\n }\n if (s > 0) {\n var f = Object.keys(n).find(function(e) {\n return t.isBrowser(e, !0);\n });\n if (void 0 !== f) return this.compareVersion(n[f]);\n }\n }, t.isBrowser = function(e, t) {\n void 0 === t && (t = !1);\n var r = this.getBrowserName().toLowerCase(), i = e.toLowerCase(), n = a.default.getBrowserTypeByAlias(i);\n return t && n && (i = n.toLowerCase()), i === r;\n }, t.compareVersion = function(e) {\n var t = [\n 0\n ], r = e, i = !1, n = this.getBrowserVersion();\n if (\"string\" == typeof n) return \">\" === e[0] || \"<\" === e[0] ? (r = e.substr(1), \"=\" === e[1] ? (i = !0, r = e.substr(2)) : t = [], \">\" === e[0] ? t.push(1) : t.push(-1)) : \"=\" === e[0] ? r = e.substr(1) : \"~\" === e[0] && (i = !0, r = e.substr(1)), t.indexOf(a.default.compareVersions(n, r, i)) > -1;\n }, t.isOS = function(e) {\n return this.getOSName(!0) === String(e).toLowerCase();\n }, t.isPlatform = function(e) {\n return this.getPlatformType(!0) === String(e).toLowerCase();\n }, t.isEngine = function(e) {\n return this.getEngineName(!0) === String(e).toLowerCase();\n }, t.is = function(e) {\n return this.isBrowser(e) || this.isOS(e) || this.isPlatform(e);\n }, t.some = function(e) {\n var t = this;\n return void 0 === e && (e = []), e.some(function(e) {\n return t.is(e);\n });\n }, e;\n }();\n t.default = d, e.exports = t.default;\n },\n 92: function(e, t, r) {\n \"use strict\";\n t.__esModule = !0, t.default = void 0;\n var i, n = (i = r(17)) && i.__esModule ? i : {\n default: i\n };\n var s = /version\\/(\\d+(\\.?_?\\d+)+)/i, o = [\n {\n test: [\n /googlebot/i\n ],\n describe: function(e) {\n var t = {\n name: \"Googlebot\"\n }, r = n.default.getFirstMatch(/googlebot\\/(\\d+(\\.\\d+))/i, e) || n.default.getFirstMatch(s, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /opera/i\n ],\n describe: function(e) {\n var t = {\n name: \"Opera\"\n }, r = n.default.getFirstMatch(s, e) || n.default.getFirstMatch(/(?:opera)[\\s/](\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /opr\\/|opios/i\n ],\n describe: function(e) {\n var t = {\n name: \"Opera\"\n }, r = n.default.getFirstMatch(/(?:opr|opios)[\\s/](\\S+)/i, e) || n.default.getFirstMatch(s, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /SamsungBrowser/i\n ],\n describe: function(e) {\n var t = {\n name: \"Samsung Internet for Android\"\n }, r = n.default.getFirstMatch(s, e) || n.default.getFirstMatch(/(?:SamsungBrowser)[\\s/](\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /Whale/i\n ],\n describe: function(e) {\n var t = {\n name: \"NAVER Whale Browser\"\n }, r = n.default.getFirstMatch(s, e) || n.default.getFirstMatch(/(?:whale)[\\s/](\\d+(?:\\.\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /MZBrowser/i\n ],\n describe: function(e) {\n var t = {\n name: \"MZ Browser\"\n }, r = n.default.getFirstMatch(/(?:MZBrowser)[\\s/](\\d+(?:\\.\\d+)+)/i, e) || n.default.getFirstMatch(s, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /focus/i\n ],\n describe: function(e) {\n var t = {\n name: \"Focus\"\n }, r = n.default.getFirstMatch(/(?:focus)[\\s/](\\d+(?:\\.\\d+)+)/i, e) || n.default.getFirstMatch(s, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /swing/i\n ],\n describe: function(e) {\n var t = {\n name: \"Swing\"\n }, r = n.default.getFirstMatch(/(?:swing)[\\s/](\\d+(?:\\.\\d+)+)/i, e) || n.default.getFirstMatch(s, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /coast/i\n ],\n describe: function(e) {\n var t = {\n name: \"Opera Coast\"\n }, r = n.default.getFirstMatch(s, e) || n.default.getFirstMatch(/(?:coast)[\\s/](\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /yabrowser/i\n ],\n describe: function(e) {\n var t = {\n name: \"Yandex Browser\"\n }, r = n.default.getFirstMatch(/(?:yabrowser)[\\s/](\\d+(\\.?_?\\d+)+)/i, e) || n.default.getFirstMatch(s, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /ucbrowser/i\n ],\n describe: function(e) {\n var t = {\n name: \"UC Browser\"\n }, r = n.default.getFirstMatch(s, e) || n.default.getFirstMatch(/(?:ucbrowser)[\\s/](\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /Maxthon|mxios/i\n ],\n describe: function(e) {\n var t = {\n name: \"Maxthon\"\n }, r = n.default.getFirstMatch(s, e) || n.default.getFirstMatch(/(?:Maxthon|mxios)[\\s/](\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /epiphany/i\n ],\n describe: function(e) {\n var t = {\n name: \"Epiphany\"\n }, r = n.default.getFirstMatch(s, e) || n.default.getFirstMatch(/(?:epiphany)[\\s/](\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /puffin/i\n ],\n describe: function(e) {\n var t = {\n name: \"Puffin\"\n }, r = n.default.getFirstMatch(s, e) || n.default.getFirstMatch(/(?:puffin)[\\s/](\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /sleipnir/i\n ],\n describe: function(e) {\n var t = {\n name: \"Sleipnir\"\n }, r = n.default.getFirstMatch(s, e) || n.default.getFirstMatch(/(?:sleipnir)[\\s/](\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /k-meleon/i\n ],\n describe: function(e) {\n var t = {\n name: \"K-Meleon\"\n }, r = n.default.getFirstMatch(s, e) || n.default.getFirstMatch(/(?:k-meleon)[\\s/](\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /micromessenger/i\n ],\n describe: function(e) {\n var t = {\n name: \"WeChat\"\n }, r = n.default.getFirstMatch(/(?:micromessenger)[\\s/](\\d+(\\.?_?\\d+)+)/i, e) || n.default.getFirstMatch(s, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /qqbrowser/i\n ],\n describe: function(e) {\n var t = {\n name: /qqbrowserlite/i.test(e) ? \"QQ Browser Lite\" : \"QQ Browser\"\n }, r = n.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\\d+(\\.?_?\\d+)+)/i, e) || n.default.getFirstMatch(s, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /msie|trident/i\n ],\n describe: function(e) {\n var t = {\n name: \"Internet Explorer\"\n }, r = n.default.getFirstMatch(/(?:msie |rv:)(\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /\\sedg\\//i\n ],\n describe: function(e) {\n var t = {\n name: \"Microsoft Edge\"\n }, r = n.default.getFirstMatch(/\\sedg\\/(\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /edg([ea]|ios)/i\n ],\n describe: function(e) {\n var t = {\n name: \"Microsoft Edge\"\n }, r = n.default.getSecondMatch(/edg([ea]|ios)\\/(\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /vivaldi/i\n ],\n describe: function(e) {\n var t = {\n name: \"Vivaldi\"\n }, r = n.default.getFirstMatch(/vivaldi\\/(\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /seamonkey/i\n ],\n describe: function(e) {\n var t = {\n name: \"SeaMonkey\"\n }, r = n.default.getFirstMatch(/seamonkey\\/(\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /sailfish/i\n ],\n describe: function(e) {\n var t = {\n name: \"Sailfish\"\n }, r = n.default.getFirstMatch(/sailfish\\s?browser\\/(\\d+(\\.\\d+)?)/i, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /silk/i\n ],\n describe: function(e) {\n var t = {\n name: \"Amazon Silk\"\n }, r = n.default.getFirstMatch(/silk\\/(\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /phantom/i\n ],\n describe: function(e) {\n var t = {\n name: \"PhantomJS\"\n }, r = n.default.getFirstMatch(/phantomjs\\/(\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /slimerjs/i\n ],\n describe: function(e) {\n var t = {\n name: \"SlimerJS\"\n }, r = n.default.getFirstMatch(/slimerjs\\/(\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /blackberry|\\bbb\\d+/i,\n /rim\\stablet/i\n ],\n describe: function(e) {\n var t = {\n name: \"BlackBerry\"\n }, r = n.default.getFirstMatch(s, e) || n.default.getFirstMatch(/blackberry[\\d]+\\/(\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /(web|hpw)[o0]s/i\n ],\n describe: function(e) {\n var t = {\n name: \"WebOS Browser\"\n }, r = n.default.getFirstMatch(s, e) || n.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\\/(\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /bada/i\n ],\n describe: function(e) {\n var t = {\n name: \"Bada\"\n }, r = n.default.getFirstMatch(/dolfin\\/(\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /tizen/i\n ],\n describe: function(e) {\n var t = {\n name: \"Tizen\"\n }, r = n.default.getFirstMatch(/(?:tizen\\s?)?browser\\/(\\d+(\\.?_?\\d+)+)/i, e) || n.default.getFirstMatch(s, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /qupzilla/i\n ],\n describe: function(e) {\n var t = {\n name: \"QupZilla\"\n }, r = n.default.getFirstMatch(/(?:qupzilla)[\\s/](\\d+(\\.?_?\\d+)+)/i, e) || n.default.getFirstMatch(s, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /firefox|iceweasel|fxios/i\n ],\n describe: function(e) {\n var t = {\n name: \"Firefox\"\n }, r = n.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\\s/](\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /chromium/i\n ],\n describe: function(e) {\n var t = {\n name: \"Chromium\"\n }, r = n.default.getFirstMatch(/(?:chromium)[\\s/](\\d+(\\.?_?\\d+)+)/i, e) || n.default.getFirstMatch(s, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /chrome|crios|crmo/i\n ],\n describe: function(e) {\n var t = {\n name: \"Chrome\"\n }, r = n.default.getFirstMatch(/(?:chrome|crios|crmo)\\/(\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /GSA/i\n ],\n describe: function(e) {\n var t = {\n name: \"Google Search\"\n }, r = n.default.getFirstMatch(/(?:GSA)\\/(\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: function(e) {\n var t = !e.test(/like android/i), r = e.test(/android/i);\n return t && r;\n },\n describe: function(e) {\n var t = {\n name: \"Android Browser\"\n }, r = n.default.getFirstMatch(s, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /playstation 4/i\n ],\n describe: function(e) {\n var t = {\n name: \"PlayStation 4\"\n }, r = n.default.getFirstMatch(s, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /safari|applewebkit/i\n ],\n describe: function(e) {\n var t = {\n name: \"Safari\"\n }, r = n.default.getFirstMatch(s, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /.*/i\n ],\n describe: function(e) {\n var t = -1 !== e.search(\"\\\\(\") ? /^(.*)\\/(.*)[ \\t]\\((.*)/ : /^(.*)\\/(.*) /;\n return {\n name: n.default.getFirstMatch(t, e),\n version: n.default.getSecondMatch(t, e)\n };\n }\n }\n ];\n t.default = o, e.exports = t.default;\n },\n 93: function(e, t, r) {\n \"use strict\";\n t.__esModule = !0, t.default = void 0;\n var i, n = (i = r(17)) && i.__esModule ? i : {\n default: i\n }, s = r(18);\n var o = [\n {\n test: [\n /Roku\\/DVP/\n ],\n describe: function(e) {\n var t = n.default.getFirstMatch(/Roku\\/DVP-(\\d+\\.\\d+)/i, e);\n return {\n name: s.OS_MAP.Roku,\n version: t\n };\n }\n },\n {\n test: [\n /windows phone/i\n ],\n describe: function(e) {\n var t = n.default.getFirstMatch(/windows phone (?:os)?\\s?(\\d+(\\.\\d+)*)/i, e);\n return {\n name: s.OS_MAP.WindowsPhone,\n version: t\n };\n }\n },\n {\n test: [\n /windows/i\n ],\n describe: function(e) {\n var t = n.default.getFirstMatch(/Windows ((NT|XP)( \\d\\d?.\\d)?)/i, e), r = n.default.getWindowsVersionName(t);\n return {\n name: s.OS_MAP.Windows,\n version: t,\n versionName: r\n };\n }\n },\n {\n test: [\n /macintosh/i\n ],\n describe: function(e) {\n var t = n.default.getFirstMatch(/mac os x (\\d+(\\.?_?\\d+)+)/i, e).replace(/[_\\s]/g, \".\"), r = n.default.getMacOSVersionName(t), i = {\n name: s.OS_MAP.MacOS,\n version: t\n };\n return r && (i.versionName = r), i;\n }\n },\n {\n test: [\n /(ipod|iphone|ipad)/i\n ],\n describe: function(e) {\n var t = n.default.getFirstMatch(/os (\\d+([_\\s]\\d+)*) like mac os x/i, e).replace(/[_\\s]/g, \".\");\n return {\n name: s.OS_MAP.iOS,\n version: t\n };\n }\n },\n {\n test: function(e) {\n var t = !e.test(/like android/i), r = e.test(/android/i);\n return t && r;\n },\n describe: function(e) {\n var t = n.default.getFirstMatch(/android[\\s/-](\\d+(\\.\\d+)*)/i, e), r = n.default.getAndroidVersionName(t), i = {\n name: s.OS_MAP.Android,\n version: t\n };\n return r && (i.versionName = r), i;\n }\n },\n {\n test: [\n /(web|hpw)[o0]s/i\n ],\n describe: function(e) {\n var t = n.default.getFirstMatch(/(?:web|hpw)[o0]s\\/(\\d+(\\.\\d+)*)/i, e), r = {\n name: s.OS_MAP.WebOS\n };\n return t && t.length && (r.version = t), r;\n }\n },\n {\n test: [\n /blackberry|\\bbb\\d+/i,\n /rim\\stablet/i\n ],\n describe: function(e) {\n var t = n.default.getFirstMatch(/rim\\stablet\\sos\\s(\\d+(\\.\\d+)*)/i, e) || n.default.getFirstMatch(/blackberry\\d+\\/(\\d+([_\\s]\\d+)*)/i, e) || n.default.getFirstMatch(/\\bbb(\\d+)/i, e);\n return {\n name: s.OS_MAP.BlackBerry,\n version: t\n };\n }\n },\n {\n test: [\n /bada/i\n ],\n describe: function(e) {\n var t = n.default.getFirstMatch(/bada\\/(\\d+(\\.\\d+)*)/i, e);\n return {\n name: s.OS_MAP.Bada,\n version: t\n };\n }\n },\n {\n test: [\n /tizen/i\n ],\n describe: function(e) {\n var t = n.default.getFirstMatch(/tizen[/\\s](\\d+(\\.\\d+)*)/i, e);\n return {\n name: s.OS_MAP.Tizen,\n version: t\n };\n }\n },\n {\n test: [\n /linux/i\n ],\n describe: function() {\n return {\n name: s.OS_MAP.Linux\n };\n }\n },\n {\n test: [\n /CrOS/\n ],\n describe: function() {\n return {\n name: s.OS_MAP.ChromeOS\n };\n }\n },\n {\n test: [\n /PlayStation 4/\n ],\n describe: function(e) {\n var t = n.default.getFirstMatch(/PlayStation 4[/\\s](\\d+(\\.\\d+)*)/i, e);\n return {\n name: s.OS_MAP.PlayStation4,\n version: t\n };\n }\n }\n ];\n t.default = o, e.exports = t.default;\n },\n 94: function(e, t, r) {\n \"use strict\";\n t.__esModule = !0, t.default = void 0;\n var i, n = (i = r(17)) && i.__esModule ? i : {\n default: i\n }, s = r(18);\n var o = [\n {\n test: [\n /googlebot/i\n ],\n describe: function() {\n return {\n type: \"bot\",\n vendor: \"Google\"\n };\n }\n },\n {\n test: [\n /huawei/i\n ],\n describe: function(e) {\n var t = n.default.getFirstMatch(/(can-l01)/i, e) && \"Nova\", r = {\n type: s.PLATFORMS_MAP.mobile,\n vendor: \"Huawei\"\n };\n return t && (r.model = t), r;\n }\n },\n {\n test: [\n /nexus\\s*(?:7|8|9|10).*/i\n ],\n describe: function() {\n return {\n type: s.PLATFORMS_MAP.tablet,\n vendor: \"Nexus\"\n };\n }\n },\n {\n test: [\n /ipad/i\n ],\n describe: function() {\n return {\n type: s.PLATFORMS_MAP.tablet,\n vendor: \"Apple\",\n model: \"iPad\"\n };\n }\n },\n {\n test: [\n /kftt build/i\n ],\n describe: function() {\n return {\n type: s.PLATFORMS_MAP.tablet,\n vendor: \"Amazon\",\n model: \"Kindle Fire HD 7\"\n };\n }\n },\n {\n test: [\n /silk/i\n ],\n describe: function() {\n return {\n type: s.PLATFORMS_MAP.tablet,\n vendor: \"Amazon\"\n };\n }\n },\n {\n test: [\n /tablet(?! pc)/i\n ],\n describe: function() {\n return {\n type: s.PLATFORMS_MAP.tablet\n };\n }\n },\n {\n test: function(e) {\n var t = e.test(/ipod|iphone/i), r = e.test(/like (ipod|iphone)/i);\n return t && !r;\n },\n describe: function(e) {\n var t = n.default.getFirstMatch(/(ipod|iphone)/i, e);\n return {\n type: s.PLATFORMS_MAP.mobile,\n vendor: \"Apple\",\n model: t\n };\n }\n },\n {\n test: [\n /nexus\\s*[0-6].*/i,\n /galaxy nexus/i\n ],\n describe: function() {\n return {\n type: s.PLATFORMS_MAP.mobile,\n vendor: \"Nexus\"\n };\n }\n },\n {\n test: [\n /[^-]mobi/i\n ],\n describe: function() {\n return {\n type: s.PLATFORMS_MAP.mobile\n };\n }\n },\n {\n test: function(e) {\n return \"blackberry\" === e.getBrowserName(!0);\n },\n describe: function() {\n return {\n type: s.PLATFORMS_MAP.mobile,\n vendor: \"BlackBerry\"\n };\n }\n },\n {\n test: function(e) {\n return \"bada\" === e.getBrowserName(!0);\n },\n describe: function() {\n return {\n type: s.PLATFORMS_MAP.mobile\n };\n }\n },\n {\n test: function(e) {\n return \"windows phone\" === e.getBrowserName();\n },\n describe: function() {\n return {\n type: s.PLATFORMS_MAP.mobile,\n vendor: \"Microsoft\"\n };\n }\n },\n {\n test: function(e) {\n var t = Number(String(e.getOSVersion()).split(\".\")[0]);\n return \"android\" === e.getOSName(!0) && t >= 3;\n },\n describe: function() {\n return {\n type: s.PLATFORMS_MAP.tablet\n };\n }\n },\n {\n test: function(e) {\n return \"android\" === e.getOSName(!0);\n },\n describe: function() {\n return {\n type: s.PLATFORMS_MAP.mobile\n };\n }\n },\n {\n test: function(e) {\n return \"macos\" === e.getOSName(!0);\n },\n describe: function() {\n return {\n type: s.PLATFORMS_MAP.desktop,\n vendor: \"Apple\"\n };\n }\n },\n {\n test: function(e) {\n return \"windows\" === e.getOSName(!0);\n },\n describe: function() {\n return {\n type: s.PLATFORMS_MAP.desktop\n };\n }\n },\n {\n test: function(e) {\n return \"linux\" === e.getOSName(!0);\n },\n describe: function() {\n return {\n type: s.PLATFORMS_MAP.desktop\n };\n }\n },\n {\n test: function(e) {\n return \"playstation 4\" === e.getOSName(!0);\n },\n describe: function() {\n return {\n type: s.PLATFORMS_MAP.tv\n };\n }\n },\n {\n test: function(e) {\n return \"roku\" === e.getOSName(!0);\n },\n describe: function() {\n return {\n type: s.PLATFORMS_MAP.tv\n };\n }\n }\n ];\n t.default = o, e.exports = t.default;\n },\n 95: function(e, t, r) {\n \"use strict\";\n t.__esModule = !0, t.default = void 0;\n var i, n = (i = r(17)) && i.__esModule ? i : {\n default: i\n }, s = r(18);\n var o = [\n {\n test: function(e) {\n return \"microsoft edge\" === e.getBrowserName(!0);\n },\n describe: function(e) {\n if (/\\sedg\\//i.test(e)) return {\n name: s.ENGINE_MAP.Blink\n };\n var t = n.default.getFirstMatch(/edge\\/(\\d+(\\.?_?\\d+)+)/i, e);\n return {\n name: s.ENGINE_MAP.EdgeHTML,\n version: t\n };\n }\n },\n {\n test: [\n /trident/i\n ],\n describe: function(e) {\n var t = {\n name: s.ENGINE_MAP.Trident\n }, r = n.default.getFirstMatch(/trident\\/(\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: function(e) {\n return e.test(/presto/i);\n },\n describe: function(e) {\n var t = {\n name: s.ENGINE_MAP.Presto\n }, r = n.default.getFirstMatch(/presto\\/(\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: function(e) {\n var t = e.test(/gecko/i), r = e.test(/like gecko/i);\n return t && !r;\n },\n describe: function(e) {\n var t = {\n name: s.ENGINE_MAP.Gecko\n }, r = n.default.getFirstMatch(/gecko\\/(\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n },\n {\n test: [\n /(apple)?webkit\\/537\\.36/i\n ],\n describe: function() {\n return {\n name: s.ENGINE_MAP.Blink\n };\n }\n },\n {\n test: [\n /(apple)?webkit/i\n ],\n describe: function(e) {\n var t = {\n name: s.ENGINE_MAP.WebKit\n }, r = n.default.getFirstMatch(/webkit\\/(\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n }\n ];\n t.default = o, e.exports = t.default;\n }\n });\n});\n\n});\n\nparcelRegister(\"lNra6\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\nvar $fde33e6418df4cd4$var$defaultPixelRatio = 1;\nfunction $fde33e6418df4cd4$var$pixelRatio() {\n if (typeof window !== \"undefined\") {\n if (window.devicePixelRatio) return window.devicePixelRatio;\n else {\n var screen = window.screen;\n if (screen && screen.deviceXDPI && screen.logicalXDPI) return screen.deviceXDPI / screen.logicalXDPI;\n else if (screen && screen.systemXDPI && screen.logicalXDPI) return screen.systemXDPI / screen.logicalXDPI;\n }\n }\n return $fde33e6418df4cd4$var$defaultPixelRatio;\n}\nmodule.exports = $fde33e6418df4cd4$var$pixelRatio;\n\n});\n\nparcelRegister(\"6InGT\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n// Returns whether n is a power of two.\nfunction $4e393aa11a91fd82$var$ispot(n) {\n return (n & n - 1) == 0;\n}\nmodule.exports = $4e393aa11a91fd82$var$ispot;\n\n});\n\nparcelRegister(\"dBMHD\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\nfunction $9e84826b89c9752f$var$prefixProperty(property) {\n var style = document.documentElement.style;\n var prefixList = [\n \"Moz\",\n \"Webkit\",\n \"Khtml\",\n \"O\",\n \"ms\"\n ];\n for(var i = 0; i < prefixList.length; i++){\n var prefix = prefixList[i];\n var capitalizedProperty = property[0].toUpperCase() + property.slice(1);\n var prefixedProperty = prefix + capitalizedProperty;\n if (prefixedProperty in style) return prefixedProperty;\n }\n return property;\n}\nfunction $9e84826b89c9752f$var$getWithVendorPrefix(property) {\n var prefixedProperty = $9e84826b89c9752f$var$prefixProperty(property);\n return function getPropertyWithVendorPrefix(element) {\n return element.style[prefixedProperty];\n };\n}\nfunction $9e84826b89c9752f$var$setWithVendorPrefix(property) {\n var prefixedProperty = $9e84826b89c9752f$var$prefixProperty(property);\n return function setPropertyWithVendorPrefix(element, val) {\n return element.style[prefixedProperty] = val;\n };\n}\nvar $9e84826b89c9752f$var$setTransform = $9e84826b89c9752f$var$setWithVendorPrefix(\"transform\");\nvar $9e84826b89c9752f$var$setTransformOrigin = $9e84826b89c9752f$var$setWithVendorPrefix(\"transformOrigin\");\nfunction $9e84826b89c9752f$var$setNullTransform(element) {\n $9e84826b89c9752f$var$setTransform(element, \"translateZ(0)\");\n}\nfunction $9e84826b89c9752f$var$setNullTransformOrigin(element) {\n $9e84826b89c9752f$var$setTransformOrigin(element, \"0 0 0\");\n}\nfunction $9e84826b89c9752f$var$setAbsolute(element) {\n element.style.position = \"absolute\";\n}\nfunction $9e84826b89c9752f$var$setPixelPosition(element, x, y) {\n element.style.left = x + \"px\";\n element.style.top = y + \"px\";\n}\nfunction $9e84826b89c9752f$var$setPixelSize(element, width, height) {\n element.style.width = width + \"px\";\n element.style.height = height + \"px\";\n}\nfunction $9e84826b89c9752f$var$setNullSize(element) {\n element.style.width = element.style.height = 0;\n}\nfunction $9e84826b89c9752f$var$setFullSize(element) {\n element.style.width = element.style.height = \"100%\";\n}\nfunction $9e84826b89c9752f$var$setOverflowHidden(element) {\n element.style.overflow = \"hidden\";\n}\nfunction $9e84826b89c9752f$var$setOverflowVisible(element) {\n element.style.overflow = \"visible\";\n}\nfunction $9e84826b89c9752f$var$setNoPointerEvents(element) {\n element.style.pointerEvents = \"none\";\n}\nfunction $9e84826b89c9752f$var$setBlocking(element) {\n element.style.backgroundColor = \"#000\";\n element.style.opacity = \"0\";\n element.style.filter = \"alpha(opacity=0)\";\n}\nmodule.exports = {\n prefixProperty: $9e84826b89c9752f$var$prefixProperty,\n getWithVendorPrefix: $9e84826b89c9752f$var$getWithVendorPrefix,\n setWithVendorPrefix: $9e84826b89c9752f$var$setWithVendorPrefix,\n setTransform: $9e84826b89c9752f$var$setTransform,\n setTransformOrigin: $9e84826b89c9752f$var$setTransformOrigin,\n setNullTransform: $9e84826b89c9752f$var$setNullTransform,\n setNullTransformOrigin: $9e84826b89c9752f$var$setNullTransformOrigin,\n setAbsolute: $9e84826b89c9752f$var$setAbsolute,\n setPixelPosition: $9e84826b89c9752f$var$setPixelPosition,\n setPixelSize: $9e84826b89c9752f$var$setPixelSize,\n setNullSize: $9e84826b89c9752f$var$setNullSize,\n setFullSize: $9e84826b89c9752f$var$setFullSize,\n setOverflowHidden: $9e84826b89c9752f$var$setOverflowHidden,\n setOverflowVisible: $9e84826b89c9752f$var$setOverflowVisible,\n setNoPointerEvents: $9e84826b89c9752f$var$setNoPointerEvents,\n setBlocking: $9e84826b89c9752f$var$setBlocking\n};\n\n});\n\n\nparcelRegister(\"kgURn\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $7wjV9 = parcelRequire(\"7wjV9\");\n\nvar $5k1DD = parcelRequire(\"5k1DD\");\n\nvar $3owNE = parcelRequire(\"3owNE\");\n\nvar $W9Vbx = parcelRequire(\"W9Vbx\");\n\nvar $Yar88 = parcelRequire(\"Yar88\");\n\nvar $dBMHD = parcelRequire(\"dBMHD\");\nvar $ec21687300627257$require$setAbsolute = $dBMHD.setAbsolute;\n\nvar $dBMHD = parcelRequire(\"dBMHD\");\nvar $ec21687300627257$require$setFullSize = $dBMHD.setFullSize;\n\nvar $dBMHD = parcelRequire(\"dBMHD\");\nvar $ec21687300627257$require$setNullTransformOrigin = $dBMHD.setNullTransformOrigin;\n\nvar $2Xxut = parcelRequire(\"2Xxut\");\n// Browser-specific workarounds.\nvar $ec21687300627257$var$browserQuirks = {\n // On most browsers we need to pad the tile edges with repeated pixels so\n // that the borders between neighboring tiles aren't apparent.\n // On iOS this isn't required, but we must disable it because the padding is\n // incorrectly rendered on top of the neighboring tile.\n padSize: $W9Vbx.ios ? 0 : 3,\n // In order to prevent fallback tiles from overlapping their children, iOS\n // requires smaller zoom levels to be placed below larger zoom levels in\n // the CSS 3D coordinate space.\n reverseLevelDepth: $W9Vbx.ios,\n // A null transform on the layer element is required so that transitions\n // between layers work on iOS.\n useNullTransform: $W9Vbx.ios,\n // On Webkit and Gecko browsers, some tiles become invisible at certain\n // angles, usually non-floor tiles when looking straight down. Setting the\n // translateZ following the perspective transform to a slightly larger value\n // than the latter seems to work around this glitch.\n perspectiveNudge: $W9Vbx.webkit || $W9Vbx.gecko ? 0.001 : 0\n};\n/**\n * @class CssStage\n * @extends Stage\n * @classdesc\n *\n * A {@link Stage} implementation using CSS 3D Transforms.\n *\n * @param {Object} opts\n *\n * Also see the available {@link Stage} options.\n */ function $ec21687300627257$var$CssStage(opts) {\n this.constructor.super_.call(this, opts);\n this._loader = new $5k1DD(this);\n this._domElement = document.createElement(\"div\");\n $ec21687300627257$require$setAbsolute(this._domElement);\n $ec21687300627257$require$setFullSize(this._domElement);\n// N.B. the CSS stage requires device adaptation to be configured through\n// the tag on the containing document.\n// Failure to do so will cause clipping and padding bugs to occur,\n// at least on iOS <= 7.\n}\n$Yar88($ec21687300627257$var$CssStage, $7wjV9);\n/**\n * Destructor.\n */ $ec21687300627257$var$CssStage.prototype.destroy = function() {\n // Delegate clearing own properties to the Stage destructor.\n this.constructor.super_.prototype.destroy.call(this);\n};\n$ec21687300627257$var$CssStage.supported = function() {\n return $3owNE();\n};\n/**\n * Returns the underlying DOM element.\n *\n * @return {Element}\n */ $ec21687300627257$var$CssStage.prototype.domElement = function() {\n return this._domElement;\n};\n$ec21687300627257$var$CssStage.prototype.setSizeForType = function() {};\n$ec21687300627257$var$CssStage.prototype.loadImage = function(url, rect, done) {\n return this._loader.loadImage(url, rect, done);\n};\n$ec21687300627257$var$CssStage.prototype.validateLayer = function(layer) {\n return; // always valid\n};\n$ec21687300627257$var$CssStage.prototype.createRenderer = function(Renderer) {\n return new Renderer(this._domElement, $ec21687300627257$var$browserQuirks);\n};\n$ec21687300627257$var$CssStage.prototype.destroyRenderer = function(renderer) {\n renderer.destroy();\n};\n$ec21687300627257$var$CssStage.prototype.startFrame = function() {};\n$ec21687300627257$var$CssStage.prototype.endFrame = function() {};\n$ec21687300627257$var$CssStage.prototype.takeSnapshot = function() {\n throw new Error(\"CssStage: takeSnapshot not implemented\");\n};\n$ec21687300627257$var$CssStage.type = $ec21687300627257$var$CssStage.prototype.type = \"css\";\nfunction $ec21687300627257$var$CssTexture(stage, tile, asset) {\n var canvas = document.createElement(\"canvas\");\n $ec21687300627257$require$setAbsolute(canvas);\n $ec21687300627257$require$setNullTransformOrigin(canvas);\n this._canvas = canvas;\n this._timestamp = null;\n this.refresh(tile, asset);\n}\n$ec21687300627257$var$CssTexture.prototype.refresh = function(tile, asset) {\n // Check whether the texture needs to be updated.\n var timestamp = asset.timestamp();\n if (timestamp === this._timestamp) return;\n this._timestamp = timestamp;\n var canvas = this._canvas;\n var ctx = canvas.getContext(\"2d\");\n // Get asset element.\n var element = asset.element();\n // Get tile dimensions.\n var tileWidth = tile.width();\n var tileHeight = tile.height();\n // Get padding sizes.\n var padSize = $ec21687300627257$var$browserQuirks.padSize;\n var padTop = tile.padTop() ? padSize : 0;\n var padBottom = tile.padBottom() ? padSize : 0;\n var padLeft = tile.padLeft() ? padSize : 0;\n var padRight = tile.padRight() ? padSize : 0;\n // Set canvas size.\n canvas.width = padLeft + tileWidth + padRight;\n canvas.height = padTop + tileHeight + padBottom;\n // Draw image.\n ctx.drawImage(element, padLeft, padTop, tileWidth, tileHeight);\n var i;\n // Draw top padding.\n for(i = 0; i < padTop; i++)ctx.drawImage(canvas, padLeft, padTop, tileWidth, 1, padLeft, i, tileWidth, 1);\n // Draw left padding.\n for(i = 0; i < padLeft; i++)ctx.drawImage(canvas, padLeft, padTop, 1, tileHeight, i, padTop, 1, tileHeight);\n // Draw bottom padding.\n for(i = 0; i < padBottom; i++)ctx.drawImage(canvas, padLeft, padTop + tileHeight - 1, tileWidth, 1, padLeft, padTop + tileHeight + i, tileWidth, 1);\n // Draw right padding.\n for(i = 0; i < padRight; i++)ctx.drawImage(canvas, padLeft + tileWidth - 1, padTop, 1, tileHeight, padLeft + tileWidth + i, padTop, 1, tileHeight);\n};\n$ec21687300627257$var$CssTexture.prototype.destroy = function() {\n // TODO: investigate whether keeping a pool of canvases instead of\n // creating new ones on demand improves performance.\n $2Xxut(this);\n};\n$ec21687300627257$var$CssStage.TextureClass = $ec21687300627257$var$CssStage.prototype.TextureClass = $ec21687300627257$var$CssTexture;\nmodule.exports = $ec21687300627257$var$CssStage;\n\n});\nparcelRegister(\"3owNE\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $dBMHD = parcelRequire(\"dBMHD\");\nvar $278d0e5ef4071395$require$prefixProperty = $dBMHD.prefixProperty;\n// Detect CSS 3D transforms support. Adapted from Modernizr.\nfunction $278d0e5ef4071395$var$checkCssSupported() {\n // First, check if the 'perspective' CSS property or a vendor-prefixed\n // variant is available.\n var perspectiveProperty = $278d0e5ef4071395$require$prefixProperty(\"perspective\");\n var el = document.createElement(\"div\");\n var supported = typeof el.style[perspectiveProperty] !== \"undefined\";\n // Certain versions of Chrome disable 3D transforms even though the CSS\n // property exists. In those cases, we use the following media query,\n // which only succeeds if the feature is indeed enabled.\n if (supported && perspectiveProperty === \"WebkitPerspective\") {\n var id = \"__marzipano_test_css3d_support__\";\n var st = document.createElement(\"style\");\n st.textContent = \"@media(-webkit-transform-3d){#\" + id + \"{height: 3px;})\";\n document.getElementsByTagName(\"head\")[0].appendChild(st);\n el.id = id;\n document.body.appendChild(el);\n // The offsetHeight seems to be different than 3 at some zoom levels on\n // Chrome (and maybe other browsers). Test for > 0 instead.\n supported = el.offsetHeight > 0;\n st.parentNode.removeChild(st);\n el.parentNode.removeChild(el);\n }\n return supported;\n}\n// Cache result.\nvar $278d0e5ef4071395$var$supported;\nfunction $278d0e5ef4071395$var$cssSupported() {\n if ($278d0e5ef4071395$var$supported !== undefined) return $278d0e5ef4071395$var$supported;\n return $278d0e5ef4071395$var$supported = $278d0e5ef4071395$var$checkCssSupported();\n}\nmodule.exports = $278d0e5ef4071395$var$cssSupported;\n\n});\n\n\nparcelRegister(\"lUg8r\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $7wjV9 = parcelRequire(\"7wjV9\");\n\nvar $54X95 = parcelRequire(\"54X95\");\n\nvar $1IPfd = parcelRequire(\"1IPfd\");\n\nvar $hluEj = parcelRequire(\"hluEj\");\n\nvar $Yar88 = parcelRequire(\"Yar88\");\n\nvar $9aPxp = parcelRequire(\"9aPxp\");\n\nvar $dBMHD = parcelRequire(\"dBMHD\");\nvar $ff2b580a383d48d8$require$setAbsolute = $dBMHD.setAbsolute;\n\nvar $dBMHD = parcelRequire(\"dBMHD\");\nvar $ff2b580a383d48d8$require$setFullSize = $dBMHD.setFullSize;\n\nvar $dBMHD = parcelRequire(\"dBMHD\");\nvar $ff2b580a383d48d8$require$setBlocking = $dBMHD.setBlocking;\n\nvar $2Xxut = parcelRequire(\"2Xxut\");\n// Default Flash wmode.\nvar $ff2b580a383d48d8$var$defaultWMode = \"transparent\";\n// Default Flash SWF path. By default, expect the SWF to be named marzipano.swf\n// and located in the same directory as the current script. The default path\n// may be overridden by passing the `swfPath` option into the Viewer or Stage\n// constructor.\nvar $ff2b580a383d48d8$var$defaultSwfPath = function() {\n var script = document.currentScript;\n if (!script) {\n // This will produce the wrong result if the current script is loaded with\n // the `async` or `defer` options, or exec'ed from a string. The user is\n // expected to supply a custom `swfPath` in these cases.\n var scripts = document.getElementsByTagName(\"script\");\n script = scripts.length ? scripts[scripts.length - 1] : null;\n }\n if (!script) return null;\n var path = script.src;\n var slash = path.lastIndexOf(\"/\");\n if (slash >= 0) path = path.slice(0, slash + 1);\n else path = \"\";\n return path + \"marzipano.swf\";\n}();\n// Callbacks must be exposed in a global object to be called from Flash.\n// The global object maps each stage ID into the respective callbacks.\n// To prevent multiple Marzipano instances from clobbering the callbacks\n// for each other's stages, the next available stage ID must be shared among\n// the instances. We cache this value in a special property of the global\n// callback object.\nvar $ff2b580a383d48d8$var$callbackObjectName = \"MarzipanoFlashCallbackMap\";\nif (!($ff2b580a383d48d8$var$callbackObjectName in window)) window[$ff2b580a383d48d8$var$callbackObjectName] = {\n __next: 0\n};\n// Get the next available Flash stage ID.\nfunction $ff2b580a383d48d8$var$nextFlashStageId() {\n return window[$ff2b580a383d48d8$var$callbackObjectName].__next++;\n}\n// Names of the callbacks called from Flash. Presently there is only one.\nvar $ff2b580a383d48d8$var$callbackNames = [\n \"imageLoaded\"\n];\n// Browser-specific workarounds.\nvar $ff2b580a383d48d8$var$flashQuirks = {\n // How many repeated pixels to add around tile edges to suppress visible seams.\n padSize: 3\n};\n/**\n * @class FlashStage\n * @extends Stage\n * @classdesc\n *\n * A {@link Stage} implementation using Flash.\n *\n * @param {Object} opts\n * @param {string} [opts.wmode='transparent']\n * @param {string} [opts.swfPath]\n *\n * The `wmode` option controls transparency, layering and compositing of the\n * Flash element into the web page. For more information see:\n * http://helpx.adobe.com/flash/kb/flash-object-embed-tag-attributes.html\n *\n * The `swfPath` option denotes the path to the `marzipano.swf` file. It\n * defaults to the location of `marzipano.js` by looking for a script tag with\n * that name.\n *\n * Also see the available {@link Stage} options.\n */ function $ff2b580a383d48d8$var$FlashStage(opts) {\n this.constructor.super_.call(this, opts);\n this._wmode = opts && opts.wmode || $ff2b580a383d48d8$var$defaultWMode;\n this._swfPath = opts && opts.swfPath || $ff2b580a383d48d8$var$defaultSwfPath;\n if (!$ff2b580a383d48d8$var$defaultSwfPath) throw new Error(\"Missing SWF path\");\n // Setup JavaScript callbacks to be called from Flash land when\n // asynchronous operations terminate.\n this._flashStageId = $ff2b580a383d48d8$var$nextFlashStageId();\n this._callbacksObj = window[$ff2b580a383d48d8$var$callbackObjectName][this._flashStageId] = {};\n this._stageCallbacksObjVarName = $ff2b580a383d48d8$var$callbackObjectName + \"[\" + this._flashStageId + \"]\";\n this._callbackListeners = {};\n for(var i = 0; i < $ff2b580a383d48d8$var$callbackNames.length; i++)this._callbacksObj[$ff2b580a383d48d8$var$callbackNames[i]] = this._callListeners($ff2b580a383d48d8$var$callbackNames[i]);\n this._loader = new $54X95(this);\n // Queue for loadImage calls.\n // The queue starts paused so that loadImage calls occurring before Flash\n // is ready do not start right away (as they would fail).\n // TODO: This is awkward. The stage must signal that it's ready to load\n // images, but queuing should otherwise be implemented by the loader.\n this._loadImageQueue = new $hluEj();\n this._loadImageQueue.pause();\n // Whether flash is ready to be called from JavaScript.\n this._flashReady = false;\n // Add an ID to each renderer/layer, so that it can be identified within\n // the ActionScript program.\n this._nextLayerId = 0;\n // Create the DOM elements.\n var elements = $ff2b580a383d48d8$var$createDomElements(this._swfPath, this._flashStageId, this._stageCallbacksObjVarName);\n this._domElement = elements.root;\n this._blockingElement = elements.blocking;\n this._flashElement = elements.flash;\n // Wake up the render loop when we are ready (only after element is added to the DOM)\n this._checkReadyTimer = setInterval(this._checkReady.bind(this), 50);\n}\n$Yar88($ff2b580a383d48d8$var$FlashStage, $7wjV9);\n/**\n * Destructor.\n */ $ff2b580a383d48d8$var$FlashStage.prototype.destroy = function() {\n window[$ff2b580a383d48d8$var$callbackObjectName][this._flashStageId] = null;\n if (this._checkReadyTimer != null) clearInterval(this._checkReadyTimer);\n // Delegate clearing own properties to the Stage destructor.\n this.constructor.super_.prototype.destroy.call(this);\n};\n$ff2b580a383d48d8$var$FlashStage.supported = function() {\n return $1IPfd();\n};\n/**\n * Returns the underlying DOM element.\n * @return {Element}\n */ $ff2b580a383d48d8$var$FlashStage.prototype.domElement = function() {\n return this._domElement;\n};\n/**\n * Returns the underlying Flash element.\n * @return {Element}\n */ $ff2b580a383d48d8$var$FlashStage.prototype.flashElement = function() {\n return this._flashElement;\n};\n$ff2b580a383d48d8$var$FlashStage.prototype.setSizeForType = function() {};\n$ff2b580a383d48d8$var$FlashStage.prototype.loadImage = function(url, rect, done) {\n // TODO: Move the queuing into the loader, which avoids this nonsense.\n var loadFn = this._loader.loadImage.bind(this._loader, url, rect);\n return this._loadImageQueue.push(loadFn, done);\n};\n$ff2b580a383d48d8$var$FlashStage.prototype.validateLayer = function(layer) {\n return; // always valid\n};\n$ff2b580a383d48d8$var$FlashStage.prototype.addFlashCallbackListener = function(callbackName, f) {\n this._callbackListeners[callbackName] = this._callbackListeners[callbackName] || [];\n this._callbackListeners[callbackName].push(f);\n};\n$ff2b580a383d48d8$var$FlashStage.prototype.removeFlashCallbackListener = function(callbackName, f) {\n var listeners = this._callbackListeners[callbackName] || [];\n var index = listeners.indexOf(f);\n if (index >= 0) listeners.splice(index, 1);\n};\n$ff2b580a383d48d8$var$FlashStage.prototype._callListeners = function(callbackName) {\n var self = this;\n return function callListeners() {\n var listeners = self._callbackListeners[callbackName] || [];\n for(var i = 0; i < listeners.length; i++){\n // JavaScript executed on calls from Flash does not throw exceptions.\n // Executing the callback in a new stack frame fixes this.\n var listener = listeners[i];\n $9aPxp(listener, arguments);\n }\n };\n};\n$ff2b580a383d48d8$var$FlashStage.prototype._checkReady = function() {\n if (!this._flashElement || !this._flashElement.isReady || !this._flashElement.isReady()) // Not ready yet.\n return false;\n // Mark as ready.\n this._flashReady = true;\n // Disable interval timer.\n clearTimeout(this._checkReadyTimer);\n this._checkReadyTimer = null;\n // Resume image loading queue.\n this._loadImageQueue.resume();\n // Force next render.\n this.emit(\"renderInvalid\");\n return true;\n};\nfunction $ff2b580a383d48d8$var$createDomElements(swfPath, id, stageCallbacksObjVarName) {\n var rootElement = document.createElement(\"div\");\n $ff2b580a383d48d8$require$setAbsolute(rootElement);\n $ff2b580a383d48d8$require$setFullSize(rootElement);\n // The Flash object must have `id` and `name` attributes, otherwise\n // ExternalInterface calls will not work.\n var elementId = \"marzipano-flash-stage-\" + id;\n var objectStr = '';\n var paramsStr = \"\";\n paramsStr += '';\n paramsStr += '';\n paramsStr += '';\n paramsStr += '';\n objectStr += paramsStr;\n objectStr += \"\";\n // Embed Flash into the DOM.\n // Adding children into an element doesn't work, so we create a\n // temporary element and set its innerHTML.\n var tmpElement = document.createElement(\"div\");\n tmpElement.innerHTML = objectStr;\n var flashElement = tmpElement.firstChild;\n $ff2b580a383d48d8$require$setAbsolute(flashElement);\n $ff2b580a383d48d8$require$setFullSize(flashElement);\n rootElement.appendChild(flashElement);\n // Create blocking element to prevent events from being caught by Flash.\n var blockingElement = document.createElement(\"div\");\n $ff2b580a383d48d8$require$setAbsolute(blockingElement);\n $ff2b580a383d48d8$require$setFullSize(blockingElement);\n $ff2b580a383d48d8$require$setBlocking(blockingElement);\n rootElement.appendChild(blockingElement);\n return {\n root: rootElement,\n flash: flashElement,\n blocking: blockingElement\n };\n}\n$ff2b580a383d48d8$var$FlashStage.prototype.createRenderer = function(Renderer) {\n return new Renderer(this._flashElement, ++this._nextLayerId, $ff2b580a383d48d8$var$flashQuirks);\n};\n$ff2b580a383d48d8$var$FlashStage.prototype.destroyRenderer = function(renderer) {\n renderer.destroy();\n};\n$ff2b580a383d48d8$var$FlashStage.prototype.startFrame = function() {};\n$ff2b580a383d48d8$var$FlashStage.prototype.endFrame = function() {};\n$ff2b580a383d48d8$var$FlashStage.prototype.takeSnapshot = function(options) {\n // Validate argument.\n if (typeof options !== \"object\" || options == null) options = {};\n var quality = options.quality;\n // Set default quality if it is not passed in.\n if (typeof quality == \"undefined\") quality = 75;\n // Throw if quality is of invlid type or out of bounds.\n if (typeof quality !== \"number\" || quality < 0 || quality > 100) throw new Error(\"FlashStage: Snapshot quality needs to be a number between 0 and 100\");\n // Return the snapshot by executing a flash-exported method.\n return this._flashElement.takeSnapshot(quality);\n};\n$ff2b580a383d48d8$var$FlashStage.type = $ff2b580a383d48d8$var$FlashStage.prototype.type = \"flash\";\nfunction $ff2b580a383d48d8$var$FlashTexture(stage, tile, asset) {\n // Get image id.\n var imageId = asset.element();\n // Get tile dimensions.\n var tileWidth = tile.width();\n var tileHeight = tile.height();\n // Get padding sizes.\n var padSize = $ff2b580a383d48d8$var$flashQuirks.padSize;\n var padTop = tile.padTop() ? padSize : 0;\n var padBottom = tile.padBottom() ? padSize : 0;\n var padLeft = tile.padLeft() ? padSize : 0;\n var padRight = tile.padRight() ? padSize : 0;\n var textureId = stage._flashElement.createTexture(imageId, tileWidth, tileHeight, padTop, padBottom, padLeft, padRight);\n this._stage = stage;\n this._textureId = textureId;\n}\n$ff2b580a383d48d8$var$FlashTexture.prototype.refresh = function(tile, asset) {\n// TODO: This is required for the Flash stage to support dynamic textures.\n// However, there are currently no dynamic textures that work with the\n// Flash stage.\n};\n$ff2b580a383d48d8$var$FlashTexture.prototype.destroy = function() {\n this._stage._flashElement.destroyTexture(this._textureId);\n $2Xxut(this);\n};\n$ff2b580a383d48d8$var$FlashStage.TextureClass = $ff2b580a383d48d8$var$FlashStage.prototype.TextureClass = $ff2b580a383d48d8$var$FlashTexture;\nmodule.exports = $ff2b580a383d48d8$var$FlashStage;\n\n});\nparcelRegister(\"54X95\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $3S0Tf = parcelRequire(\"3S0Tf\");\n\nvar $1Cfry = parcelRequire(\"1Cfry\");\n\nvar $9ZuRa = parcelRequire(\"9ZuRa\");\n// TODO: Move the load queue into the loader.\n/**\n * @class FlashImageLoader\n * @implements ImageLoader\n * @classdesc\n *\n * A {@link Loader} for Flash images.\n *\n * @param {Stage} stage The stage which is going to request images to be loaded.\n */ function $3b2b348b66bf18e8$var$FlashImageLoader(stage) {\n if (stage.type !== \"flash\") throw new Error(\"Stage type incompatible with loader\");\n this._stage = stage;\n}\n/**\n * Loads an {@link Asset} from an image.\n * @param {string} url The image URL.\n * @param {?Rect} rect A {@link Rect} describing a portion of the image, or null\n * to use the full image.\n * @param {function(?Error, Asset)} done The callback.\n * @return {function()} A function to cancel loading.\n */ $3b2b348b66bf18e8$var$FlashImageLoader.prototype.loadImage = function(url, rect, done) {\n var stage = this._stage;\n var flashElement = stage.flashElement();\n var x = rect && rect.x || 0;\n var y = rect && rect.y || 0;\n var width = rect && rect.width || 1;\n var height = rect && rect.height || 1;\n var imageId = flashElement.loadImage(url, width, height, x, y);\n done = $9ZuRa(done);\n // TODO: use a single callback for all imageLoaded events.\n function callback(err, callbackId) {\n // There is a single callback for all load events, so make sure this\n // is the right one.\n if (callbackId !== imageId) return;\n stage.removeFlashCallbackListener(\"imageLoaded\", callback);\n // TODO: is there any way to distinguish a network error from other\n // kinds of errors? For now we always return NetworkError since this\n // prevents images to be retried continuously while we are offline.\n if (err) done(new $1Cfry(\"Network error: \" + url));\n else done(null, new $3S0Tf(flashElement, imageId));\n }\n stage.addFlashCallbackListener(\"imageLoaded\", callback);\n function cancel() {\n flashElement.cancelImage(imageId);\n stage.removeFlashCallbackListener(\"imageLoaded\", callback);\n done.apply(null, arguments);\n }\n return cancel;\n};\nmodule.exports = $3b2b348b66bf18e8$var$FlashImageLoader;\n\n});\nparcelRegister(\"3S0Tf\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $6mia6 = parcelRequire(\"6mia6\");\n\nvar $2Xxut = parcelRequire(\"2Xxut\");\n/**\n * @class FlashAsset\n * @implements Asset\n * @classdesc\n *\n * An immutable {@link Asset} compatible with {@link FlashStage}.\n * \n * The asset's underlying pixel source is a unique image ID associated with\n * a Flash application.\n *\n * @param {Element} flashElement The HTML element for the Flash application.\n * @param {number} imageId The unique image ID inside the Flash application.\n */ function $2d171afb078671be$var$FlashAsset(flashElement, imageId) {\n this._flashElement = flashElement;\n this._imageId = imageId;\n}\n$6mia6($2d171afb078671be$var$FlashAsset);\n/**\n * Destructor.\n */ $2d171afb078671be$var$FlashAsset.prototype.destroy = function() {\n this._flashElement.unloadImage(this._imageId);\n $2Xxut(this);\n};\n$2d171afb078671be$var$FlashAsset.prototype.element = function() {\n return this._imageId;\n};\n$2d171afb078671be$var$FlashAsset.prototype.width = function() {\n // Not actually used anywhere.\n return 0;\n};\n$2d171afb078671be$var$FlashAsset.prototype.height = function() {\n // Not actually used anywhere.\n return 0;\n};\n$2d171afb078671be$var$FlashAsset.prototype.timestamp = function() {\n return 0;\n};\n$2d171afb078671be$var$FlashAsset.prototype.isDynamic = function() {\n return false;\n};\nmodule.exports = $2d171afb078671be$var$FlashAsset;\n\n});\n\n\nparcelRegister(\"1IPfd\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n// Detect supported Flash version. Returns [major, minor, rev] or null.\n// Adapted from https://code.google.com/p/swfobject\nfunction $1411a68d9347b03f$var$detectFlashVersion() {\n var playerVersion = null;\n var plugins = navigator.plugins;\n var mimeTypes = navigator.mimeTypes;\n var d = null;\n if (plugins && plugins[\"Shockwave Flash\"] && mimeTypes && mimeTypes[\"application/x-shockwave-flash\"] && mimeTypes[\"application/x-shockwave-flash\"].enabledPlugin) {\n d = plugins[\"Shockwave Flash\"].description;\n d = d.replace(/^.*\\s+(\\S+\\s+\\S+$)/, \"$1\");\n playerVersion = [\n 0,\n 0,\n 0\n ];\n playerVersion[0] = parseInt(d.replace(/^(.*)\\..*$/, \"$1\"), 10);\n playerVersion[1] = parseInt(d.replace(/^.*\\.(.*)\\s.*$/, \"$1\"), 10);\n playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, \"$1\"), 10) : 0;\n } else if (window.ActiveXObject) try {\n var a = new ActiveXObject(\"ShockwaveFlash.ShockwaveFlash\");\n if (a && (d = a.GetVariable(\"$version\"))) {\n d = d.split(\" \")[1].split(\",\");\n playerVersion = [\n parseInt(d[0], 10),\n parseInt(d[1], 10),\n parseInt(d[2], 10)\n ];\n }\n } catch (e) {}\n return playerVersion;\n}\n// Flash support detection.\nfunction $1411a68d9347b03f$var$checkFlashSupported() {\n var version = $1411a68d9347b03f$var$detectFlashVersion();\n // Only support 10.1 and above. Flash 10.0 does not work for some reason.\n return version && (version[0] >= 11 || version[0] === 10 && version[1] >= 1);\n}\n// Cache result.\nvar $1411a68d9347b03f$var$supported;\nfunction $1411a68d9347b03f$var$flashSupported() {\n if ($1411a68d9347b03f$var$supported !== undefined) return $1411a68d9347b03f$var$supported;\n return $1411a68d9347b03f$var$supported = $1411a68d9347b03f$var$checkFlashSupported();\n}\nmodule.exports = $1411a68d9347b03f$var$flashSupported;\n\n});\n\nparcelRegister(\"9aPxp\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\nfunction $6add06942ae41107$var$defer(fn, args) {\n function deferred() {\n if (args && args.length > 0) fn.apply(null, args);\n else fn();\n }\n setTimeout(deferred, 0);\n}\nmodule.exports = $6add06942ae41107$var$defer;\n\n});\n\n\nparcelRegister(\"b7h3a\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $bKQXE = parcelRequire(\"bKQXE\");\n\nvar $Yar88 = parcelRequire(\"Yar88\");\n/**\n * @class WebGlCubeRenderer\n * @implements Renderer\n * @classdesc\n *\n * A renderer for {@link CubeGeometry} and {@link RectilinearView}, appropriate\n * for a {@link WebGlStage}.\n *\n * Most users do not need to instantiate this class. Renderers are created and\n * destroyed by {@link Stage} as necessary.\n */ function $817d92f1c56df95d$var$WebGlCubeRenderer() {\n this.constructor.super_.apply(this, arguments);\n}\n$Yar88($817d92f1c56df95d$var$WebGlCubeRenderer, $bKQXE);\nmodule.exports = $817d92f1c56df95d$var$WebGlCubeRenderer;\n\n});\nparcelRegister(\"bKQXE\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $c3mW8 = parcelRequire(\"c3mW8\");\nvar $fwwPx = parcelRequire(\"fwwPx\");\nvar $88ed1296090d26cd$require$mat4 = $c3mW8;\n\nvar $c3mW8 = parcelRequire(\"c3mW8\");\nvar $fwwPx = parcelRequire(\"fwwPx\");\nvar $88ed1296090d26cd$require$vec3 = $fwwPx;\n\nvar $2Xxut = parcelRequire(\"2Xxut\");\n\nvar $3KYUN = parcelRequire(\"3KYUN\");\nvar $88ed1296090d26cd$var$createConstantBuffers = $3KYUN.createConstantBuffers;\nvar $88ed1296090d26cd$var$destroyConstantBuffers = $3KYUN.destroyConstantBuffers;\nvar $88ed1296090d26cd$var$createShaderProgram = $3KYUN.createShaderProgram;\nvar $88ed1296090d26cd$var$destroyShaderProgram = $3KYUN.destroyShaderProgram;\nvar $88ed1296090d26cd$var$enableAttributes = $3KYUN.enableAttributes;\nvar $88ed1296090d26cd$var$disableAttributes = $3KYUN.disableAttributes;\nvar $88ed1296090d26cd$var$setViewport = $3KYUN.setViewport;\nvar $88ed1296090d26cd$var$setupPixelEffectUniforms = $3KYUN.setupPixelEffectUniforms;\nvar $88ed1296090d26cd$var$setDepth = $3KYUN.setDepth;\nvar $88ed1296090d26cd$var$setTexture = $3KYUN.setTexture;\n\nvar $o1WjV = parcelRequire(\"o1WjV\");\n\nvar $7d8BE = parcelRequire(\"7d8BE\");\nvar $88ed1296090d26cd$var$vertexIndices = [\n 0,\n 1,\n 2,\n 0,\n 2,\n 3\n];\nvar $88ed1296090d26cd$var$vertexPositions = [\n -0.5,\n -0.5,\n 0.0,\n 0.5,\n -0.5,\n 0.0,\n 0.5,\n 0.5,\n 0.0,\n -0.5,\n 0.5,\n 0.0\n];\nvar $88ed1296090d26cd$var$textureCoords = [\n 0.0,\n 0.0,\n 1.0,\n 0.0,\n 1.0,\n 1.0,\n 0.0,\n 1.0\n];\nvar $88ed1296090d26cd$var$attribList = [\n \"aVertexPosition\",\n \"aTextureCoord\"\n];\nvar $88ed1296090d26cd$var$uniformList = [\n \"uDepth\",\n \"uOpacity\",\n \"uSampler\",\n \"uProjMatrix\",\n \"uViewportMatrix\",\n \"uColorOffset\",\n \"uColorMatrix\"\n];\nfunction $88ed1296090d26cd$var$WebGlBaseRenderer(gl) {\n this.gl = gl;\n // The projection matrix positions the tiles in world space.\n // We compute it in Javascript because lack of precision in the vertex shader\n // causes seams to appear between adjacent tiles at large zoom levels.\n this.projMatrix = $88ed1296090d26cd$require$mat4.create();\n // The viewport matrix responsible for viewport clamping.\n // See setViewport() for an explanation of how it works.\n this.viewportMatrix = $88ed1296090d26cd$require$mat4.create();\n // Translation and scale vectors for tiles.\n this.translateVector = $88ed1296090d26cd$require$vec3.create();\n this.scaleVector = $88ed1296090d26cd$require$vec3.create();\n this.constantBuffers = $88ed1296090d26cd$var$createConstantBuffers(gl, $88ed1296090d26cd$var$vertexIndices, $88ed1296090d26cd$var$vertexPositions, $88ed1296090d26cd$var$textureCoords);\n this.shaderProgram = $88ed1296090d26cd$var$createShaderProgram(gl, $o1WjV, $7d8BE, $88ed1296090d26cd$var$attribList, $88ed1296090d26cd$var$uniformList);\n}\n$88ed1296090d26cd$var$WebGlBaseRenderer.prototype.destroy = function() {\n $88ed1296090d26cd$var$destroyConstantBuffers(this.gl, this.constantBuffers);\n $88ed1296090d26cd$var$destroyShaderProgram(this.gl, this.shaderProgram);\n $2Xxut(this);\n};\n$88ed1296090d26cd$var$WebGlBaseRenderer.prototype.startLayer = function(layer, rect) {\n var gl = this.gl;\n var shaderProgram = this.shaderProgram;\n var constantBuffers = this.constantBuffers;\n var viewportMatrix = this.viewportMatrix;\n gl.useProgram(shaderProgram);\n $88ed1296090d26cd$var$enableAttributes(gl, shaderProgram);\n $88ed1296090d26cd$var$setViewport(gl, layer, rect, viewportMatrix);\n gl.uniformMatrix4fv(shaderProgram.uViewportMatrix, false, viewportMatrix);\n gl.bindBuffer(gl.ARRAY_BUFFER, constantBuffers.vertexPositions);\n gl.vertexAttribPointer(shaderProgram.aVertexPosition, 3, gl.FLOAT, gl.FALSE, 0, 0);\n gl.bindBuffer(gl.ARRAY_BUFFER, constantBuffers.textureCoords);\n gl.vertexAttribPointer(shaderProgram.aTextureCoord, 2, gl.FLOAT, gl.FALSE, 0, 0);\n $88ed1296090d26cd$var$setupPixelEffectUniforms(gl, layer.effects(), {\n opacity: shaderProgram.uOpacity,\n colorOffset: shaderProgram.uColorOffset,\n colorMatrix: shaderProgram.uColorMatrix\n });\n};\n$88ed1296090d26cd$var$WebGlBaseRenderer.prototype.endLayer = function(layer, rect) {\n var gl = this.gl;\n var shaderProgram = this.shaderProgram;\n $88ed1296090d26cd$var$disableAttributes(gl, shaderProgram);\n};\n$88ed1296090d26cd$var$WebGlBaseRenderer.prototype.renderTile = function(tile, texture, layer, layerZ) {\n var gl = this.gl;\n var shaderProgram = this.shaderProgram;\n var constantBuffers = this.constantBuffers;\n var projMatrix = this.projMatrix;\n var translateVector = this.translateVector;\n var scaleVector = this.scaleVector;\n translateVector[0] = tile.centerX();\n translateVector[1] = tile.centerY();\n translateVector[2] = -0.5;\n scaleVector[0] = tile.scaleX();\n scaleVector[1] = tile.scaleY();\n scaleVector[2] = 1.0;\n $88ed1296090d26cd$require$mat4.copy(projMatrix, layer.view().projection());\n $88ed1296090d26cd$require$mat4.rotateX(projMatrix, projMatrix, tile.rotX());\n $88ed1296090d26cd$require$mat4.rotateY(projMatrix, projMatrix, tile.rotY());\n $88ed1296090d26cd$require$mat4.translate(projMatrix, projMatrix, translateVector);\n $88ed1296090d26cd$require$mat4.scale(projMatrix, projMatrix, scaleVector);\n gl.uniformMatrix4fv(shaderProgram.uProjMatrix, false, projMatrix);\n $88ed1296090d26cd$var$setDepth(gl, shaderProgram, layerZ, tile.z);\n $88ed1296090d26cd$var$setTexture(gl, shaderProgram, texture);\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, constantBuffers.vertexIndices);\n gl.drawElements(gl.TRIANGLES, $88ed1296090d26cd$var$vertexIndices.length, gl.UNSIGNED_SHORT, 0);\n};\nmodule.exports = $88ed1296090d26cd$var$WebGlBaseRenderer;\n\n});\nparcelRegister(\"c3mW8\", function(module, exports) {\n\n$parcel$export(module.exports, \"create\", function () { return $8c678e942362b0b9$export$185802fd694ee1f5; });\n$parcel$export(module.exports, \"clone\", function () { return $8c678e942362b0b9$export$9cd59f9826255e47; });\n$parcel$export(module.exports, \"copy\", function () { return $8c678e942362b0b9$export$784d13d8ee351f07; });\n$parcel$export(module.exports, \"fromValues\", function () { return $8c678e942362b0b9$export$a82be99ed2a44a7d; });\n$parcel$export(module.exports, \"set\", function () { return $8c678e942362b0b9$export$adaa4cf7ef1b65be; });\n$parcel$export(module.exports, \"identity\", function () { return $8c678e942362b0b9$export$f0954fd7d5368655; });\n$parcel$export(module.exports, \"transpose\", function () { return $8c678e942362b0b9$export$9cb09a71b7d66923; });\n$parcel$export(module.exports, \"invert\", function () { return $8c678e942362b0b9$export$6897c284b6f9f4dc; });\n$parcel$export(module.exports, \"adjoint\", function () { return $8c678e942362b0b9$export$33f3c024b4ae00a1; });\n$parcel$export(module.exports, \"determinant\", function () { return $8c678e942362b0b9$export$a04698f914c55ed9; });\n$parcel$export(module.exports, \"multiply\", function () { return $8c678e942362b0b9$export$2060d2db72cce88f; });\n$parcel$export(module.exports, \"translate\", function () { return $8c678e942362b0b9$export$d73ee8ef04f5226a; });\n$parcel$export(module.exports, \"scale\", function () { return $8c678e942362b0b9$export$dcdf75081b88279d; });\n$parcel$export(module.exports, \"rotate\", function () { return $8c678e942362b0b9$export$bb628a54ab399bc9; });\n$parcel$export(module.exports, \"rotateX\", function () { return $8c678e942362b0b9$export$a59c8716592e09af; });\n$parcel$export(module.exports, \"rotateY\", function () { return $8c678e942362b0b9$export$cf71e4d4ca4d1cfd; });\n$parcel$export(module.exports, \"rotateZ\", function () { return $8c678e942362b0b9$export$ea6eae3365de5b9c; });\n$parcel$export(module.exports, \"fromTranslation\", function () { return $8c678e942362b0b9$export$bc9e79e74e9fddf6; });\n$parcel$export(module.exports, \"fromScaling\", function () { return $8c678e942362b0b9$export$832ca188ffb1955d; });\n$parcel$export(module.exports, \"fromRotation\", function () { return $8c678e942362b0b9$export$926fc125ff3c666c; });\n$parcel$export(module.exports, \"fromXRotation\", function () { return $8c678e942362b0b9$export$dd47cc2f828c32ef; });\n$parcel$export(module.exports, \"fromYRotation\", function () { return $8c678e942362b0b9$export$7dc997d67d2b7f33; });\n$parcel$export(module.exports, \"fromZRotation\", function () { return $8c678e942362b0b9$export$ad5ddaedc8f405df; });\n$parcel$export(module.exports, \"fromRotationTranslation\", function () { return $8c678e942362b0b9$export$9545ac307f2a256b; });\n$parcel$export(module.exports, \"fromQuat2\", function () { return $8c678e942362b0b9$export$ff497f2be31cc6a; });\n$parcel$export(module.exports, \"getTranslation\", function () { return $8c678e942362b0b9$export$202e99f82f7f0395; });\n$parcel$export(module.exports, \"getScaling\", function () { return $8c678e942362b0b9$export$71dc54d92bd04b57; });\n$parcel$export(module.exports, \"getRotation\", function () { return $8c678e942362b0b9$export$df3937d3b537df0a; });\n$parcel$export(module.exports, \"fromRotationTranslationScale\", function () { return $8c678e942362b0b9$export$ddf9c55c9f2be172; });\n$parcel$export(module.exports, \"fromRotationTranslationScaleOrigin\", function () { return $8c678e942362b0b9$export$1def1f860edc4b1f; });\n$parcel$export(module.exports, \"fromQuat\", function () { return $8c678e942362b0b9$export$2ff2bbe382249af7; });\n$parcel$export(module.exports, \"frustum\", function () { return $8c678e942362b0b9$export$89b5708c387cac6c; });\n$parcel$export(module.exports, \"perspective\", function () { return $8c678e942362b0b9$export$541149539f3a4684; });\n$parcel$export(module.exports, \"perspectiveFromFieldOfView\", function () { return $8c678e942362b0b9$export$58ae211c788e338f; });\n$parcel$export(module.exports, \"ortho\", function () { return $8c678e942362b0b9$export$4f2167e613cfc87b; });\n$parcel$export(module.exports, \"lookAt\", function () { return $8c678e942362b0b9$export$d924e14fd6d9aa66; });\n$parcel$export(module.exports, \"targetTo\", function () { return $8c678e942362b0b9$export$aa67782f4dc9e52c; });\n$parcel$export(module.exports, \"str\", function () { return $8c678e942362b0b9$export$42d51816ce590c93; });\n$parcel$export(module.exports, \"frob\", function () { return $8c678e942362b0b9$export$326827e8268e9cdb; });\n$parcel$export(module.exports, \"add\", function () { return $8c678e942362b0b9$export$e16d8520af44a096; });\n$parcel$export(module.exports, \"subtract\", function () { return $8c678e942362b0b9$export$4e2d2ead65e5f7e3; });\n$parcel$export(module.exports, \"multiplyScalar\", function () { return $8c678e942362b0b9$export$c697bed75648cdb7; });\n$parcel$export(module.exports, \"multiplyScalarAndAdd\", function () { return $8c678e942362b0b9$export$553579f63bdd7137; });\n$parcel$export(module.exports, \"exactEquals\", function () { return $8c678e942362b0b9$export$f2599a5cf1109d8; });\n$parcel$export(module.exports, \"equals\", function () { return $8c678e942362b0b9$export$e9bab7fafb253603; });\n$parcel$export(module.exports, \"mul\", function () { return $8c678e942362b0b9$export$6e3a27864ab166fe; });\n$parcel$export(module.exports, \"sub\", function () { return $8c678e942362b0b9$export$f93b5905241a7cca; });\n\nvar $rqjzO = parcelRequire(\"rqjzO\");\nfunction $8c678e942362b0b9$export$185802fd694ee1f5() {\n var out = new $rqjzO.ARRAY_TYPE(16);\n if ($rqjzO.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n }\n out[0] = 1;\n out[5] = 1;\n out[10] = 1;\n out[15] = 1;\n return out;\n}\nfunction $8c678e942362b0b9$export$9cd59f9826255e47(a) {\n var out = new $rqjzO.ARRAY_TYPE(16);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\nfunction $8c678e942362b0b9$export$784d13d8ee351f07(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\nfunction $8c678e942362b0b9$export$a82be99ed2a44a7d(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {\n var out = new $rqjzO.ARRAY_TYPE(16);\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n return out;\n}\nfunction $8c678e942362b0b9$export$adaa4cf7ef1b65be(out, m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n return out;\n}\nfunction $8c678e942362b0b9$export$f0954fd7d5368655(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\nfunction $8c678e942362b0b9$export$9cb09a71b7d66923(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n var a01 = a[1], a02 = a[2], a03 = a[3];\n var a12 = a[6], a13 = a[7];\n var a23 = a[11];\n out[1] = a[4];\n out[2] = a[8];\n out[3] = a[12];\n out[4] = a01;\n out[6] = a[9];\n out[7] = a[13];\n out[8] = a02;\n out[9] = a12;\n out[11] = a[14];\n out[12] = a03;\n out[13] = a13;\n out[14] = a23;\n } else {\n out[0] = a[0];\n out[1] = a[4];\n out[2] = a[8];\n out[3] = a[12];\n out[4] = a[1];\n out[5] = a[5];\n out[6] = a[9];\n out[7] = a[13];\n out[8] = a[2];\n out[9] = a[6];\n out[10] = a[10];\n out[11] = a[14];\n out[12] = a[3];\n out[13] = a[7];\n out[14] = a[11];\n out[15] = a[15];\n }\n return out;\n}\nfunction $8c678e942362b0b9$export$6897c284b6f9f4dc(out, a) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3];\n var a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7];\n var a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11];\n var a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n if (!det) return null;\n det = 1.0 / det;\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\n out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\n out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\n out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\n out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\n out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\n out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\n return out;\n}\nfunction $8c678e942362b0b9$export$33f3c024b4ae00a1(out, a) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3];\n var a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7];\n var a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11];\n var a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15];\n out[0] = a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22);\n out[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22));\n out[2] = a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12);\n out[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12));\n out[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22));\n out[5] = a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22);\n out[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12));\n out[7] = a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12);\n out[8] = a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21);\n out[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21));\n out[10] = a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11);\n out[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11));\n out[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21));\n out[13] = a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21);\n out[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11));\n out[15] = a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11);\n return out;\n}\nfunction $8c678e942362b0b9$export$a04698f914c55ed9(a) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3];\n var a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7];\n var a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11];\n var a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n}\nfunction $8c678e942362b0b9$export$2060d2db72cce88f(out, a, b) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3];\n var a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7];\n var a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11];\n var a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15]; // Cache only the current line of the second matrix\n var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3];\n out[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[4];\n b1 = b[5];\n b2 = b[6];\n b3 = b[7];\n out[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[8];\n b1 = b[9];\n b2 = b[10];\n b3 = b[11];\n out[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[12];\n b1 = b[13];\n b2 = b[14];\n b3 = b[15];\n out[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n return out;\n}\nfunction $8c678e942362b0b9$export$d73ee8ef04f5226a(out, a, v) {\n var x = v[0], y = v[1], z = v[2];\n var a00, a01, a02, a03;\n var a10, a11, a12, a13;\n var a20, a21, a22, a23;\n if (a === out) {\n out[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\n out[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\n out[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\n out[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\n } else {\n a00 = a[0];\n a01 = a[1];\n a02 = a[2];\n a03 = a[3];\n a10 = a[4];\n a11 = a[5];\n a12 = a[6];\n a13 = a[7];\n a20 = a[8];\n a21 = a[9];\n a22 = a[10];\n a23 = a[11];\n out[0] = a00;\n out[1] = a01;\n out[2] = a02;\n out[3] = a03;\n out[4] = a10;\n out[5] = a11;\n out[6] = a12;\n out[7] = a13;\n out[8] = a20;\n out[9] = a21;\n out[10] = a22;\n out[11] = a23;\n out[12] = a00 * x + a10 * y + a20 * z + a[12];\n out[13] = a01 * x + a11 * y + a21 * z + a[13];\n out[14] = a02 * x + a12 * y + a22 * z + a[14];\n out[15] = a03 * x + a13 * y + a23 * z + a[15];\n }\n return out;\n}\nfunction $8c678e942362b0b9$export$dcdf75081b88279d(out, a, v) {\n var x = v[0], y = v[1], z = v[2];\n out[0] = a[0] * x;\n out[1] = a[1] * x;\n out[2] = a[2] * x;\n out[3] = a[3] * x;\n out[4] = a[4] * y;\n out[5] = a[5] * y;\n out[6] = a[6] * y;\n out[7] = a[7] * y;\n out[8] = a[8] * z;\n out[9] = a[9] * z;\n out[10] = a[10] * z;\n out[11] = a[11] * z;\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\nfunction $8c678e942362b0b9$export$bb628a54ab399bc9(out, a, rad, axis) {\n var x = axis[0], y = axis[1], z = axis[2];\n var len = Math.hypot(x, y, z);\n var s, c, t;\n var a00, a01, a02, a03;\n var a10, a11, a12, a13;\n var a20, a21, a22, a23;\n var b00, b01, b02;\n var b10, b11, b12;\n var b20, b21, b22;\n if (len < $rqjzO.EPSILON) return null;\n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n s = Math.sin(rad);\n c = Math.cos(rad);\n t = 1 - c;\n a00 = a[0];\n a01 = a[1];\n a02 = a[2];\n a03 = a[3];\n a10 = a[4];\n a11 = a[5];\n a12 = a[6];\n a13 = a[7];\n a20 = a[8];\n a21 = a[9];\n a22 = a[10];\n a23 = a[11]; // Construct the elements of the rotation matrix\n b00 = x * x * t + c;\n b01 = y * x * t + z * s;\n b02 = z * x * t - y * s;\n b10 = x * y * t - z * s;\n b11 = y * y * t + c;\n b12 = z * y * t + x * s;\n b20 = x * z * t + y * s;\n b21 = y * z * t - x * s;\n b22 = z * z * t + c; // Perform rotation-specific matrix multiplication\n out[0] = a00 * b00 + a10 * b01 + a20 * b02;\n out[1] = a01 * b00 + a11 * b01 + a21 * b02;\n out[2] = a02 * b00 + a12 * b01 + a22 * b02;\n out[3] = a03 * b00 + a13 * b01 + a23 * b02;\n out[4] = a00 * b10 + a10 * b11 + a20 * b12;\n out[5] = a01 * b10 + a11 * b11 + a21 * b12;\n out[6] = a02 * b10 + a12 * b11 + a22 * b12;\n out[7] = a03 * b10 + a13 * b11 + a23 * b12;\n out[8] = a00 * b20 + a10 * b21 + a20 * b22;\n out[9] = a01 * b20 + a11 * b21 + a21 * b22;\n out[10] = a02 * b20 + a12 * b21 + a22 * b22;\n out[11] = a03 * b20 + a13 * b21 + a23 * b22;\n if (a !== out) {\n // If the source and destination differ, copy the unchanged last row\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n return out;\n}\nfunction $8c678e942362b0b9$export$a59c8716592e09af(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n if (a !== out) {\n // If the source and destination differ, copy the unchanged rows\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n out[4] = a10 * c + a20 * s;\n out[5] = a11 * c + a21 * s;\n out[6] = a12 * c + a22 * s;\n out[7] = a13 * c + a23 * s;\n out[8] = a20 * c - a10 * s;\n out[9] = a21 * c - a11 * s;\n out[10] = a22 * c - a12 * s;\n out[11] = a23 * c - a13 * s;\n return out;\n}\nfunction $8c678e942362b0b9$export$cf71e4d4ca4d1cfd(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n if (a !== out) {\n // If the source and destination differ, copy the unchanged rows\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n out[0] = a00 * c - a20 * s;\n out[1] = a01 * c - a21 * s;\n out[2] = a02 * c - a22 * s;\n out[3] = a03 * c - a23 * s;\n out[8] = a00 * s + a20 * c;\n out[9] = a01 * s + a21 * c;\n out[10] = a02 * s + a22 * c;\n out[11] = a03 * s + a23 * c;\n return out;\n}\nfunction $8c678e942362b0b9$export$ea6eae3365de5b9c(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n if (a !== out) {\n // If the source and destination differ, copy the unchanged last row\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n out[0] = a00 * c + a10 * s;\n out[1] = a01 * c + a11 * s;\n out[2] = a02 * c + a12 * s;\n out[3] = a03 * c + a13 * s;\n out[4] = a10 * c - a00 * s;\n out[5] = a11 * c - a01 * s;\n out[6] = a12 * c - a02 * s;\n out[7] = a13 * c - a03 * s;\n return out;\n}\nfunction $8c678e942362b0b9$export$bc9e79e74e9fddf6(out, v) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\nfunction $8c678e942362b0b9$export$832ca188ffb1955d(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = v[1];\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = v[2];\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\nfunction $8c678e942362b0b9$export$926fc125ff3c666c(out, rad, axis) {\n var x = axis[0], y = axis[1], z = axis[2];\n var len = Math.hypot(x, y, z);\n var s, c, t;\n if (len < $rqjzO.EPSILON) return null;\n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n s = Math.sin(rad);\n c = Math.cos(rad);\n t = 1 - c; // Perform rotation-specific matrix multiplication\n out[0] = x * x * t + c;\n out[1] = y * x * t + z * s;\n out[2] = z * x * t - y * s;\n out[3] = 0;\n out[4] = x * y * t - z * s;\n out[5] = y * y * t + c;\n out[6] = z * y * t + x * s;\n out[7] = 0;\n out[8] = x * z * t + y * s;\n out[9] = y * z * t - x * s;\n out[10] = z * z * t + c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\nfunction $8c678e942362b0b9$export$dd47cc2f828c32ef(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = c;\n out[6] = s;\n out[7] = 0;\n out[8] = 0;\n out[9] = -s;\n out[10] = c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\nfunction $8c678e942362b0b9$export$7dc997d67d2b7f33(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n out[0] = c;\n out[1] = 0;\n out[2] = -s;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = s;\n out[9] = 0;\n out[10] = c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\nfunction $8c678e942362b0b9$export$ad5ddaedc8f405df(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n out[0] = c;\n out[1] = s;\n out[2] = 0;\n out[3] = 0;\n out[4] = -s;\n out[5] = c;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\nfunction $8c678e942362b0b9$export$9545ac307f2a256b(out, q, v) {\n // Quaternion math\n var x = q[0], y = q[1], z = q[2], w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - (yy + zz);\n out[1] = xy + wz;\n out[2] = xz - wy;\n out[3] = 0;\n out[4] = xy - wz;\n out[5] = 1 - (xx + zz);\n out[6] = yz + wx;\n out[7] = 0;\n out[8] = xz + wy;\n out[9] = yz - wx;\n out[10] = 1 - (xx + yy);\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\nfunction $8c678e942362b0b9$export$ff497f2be31cc6a(out, a) {\n var translation = new $rqjzO.ARRAY_TYPE(3);\n var bx = -a[0], by = -a[1], bz = -a[2], bw = a[3], ax = a[4], ay = a[5], az = a[6], aw = a[7];\n var magnitude = bx * bx + by * by + bz * bz + bw * bw; //Only scale if it makes sense\n if (magnitude > 0) {\n translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2 / magnitude;\n translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2 / magnitude;\n translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2 / magnitude;\n } else {\n translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2;\n translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2;\n translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2;\n }\n $8c678e942362b0b9$export$9545ac307f2a256b(out, a, translation);\n return out;\n}\nfunction $8c678e942362b0b9$export$202e99f82f7f0395(out, mat) {\n out[0] = mat[12];\n out[1] = mat[13];\n out[2] = mat[14];\n return out;\n}\nfunction $8c678e942362b0b9$export$71dc54d92bd04b57(out, mat) {\n var m11 = mat[0];\n var m12 = mat[1];\n var m13 = mat[2];\n var m21 = mat[4];\n var m22 = mat[5];\n var m23 = mat[6];\n var m31 = mat[8];\n var m32 = mat[9];\n var m33 = mat[10];\n out[0] = Math.hypot(m11, m12, m13);\n out[1] = Math.hypot(m21, m22, m23);\n out[2] = Math.hypot(m31, m32, m33);\n return out;\n}\nfunction $8c678e942362b0b9$export$df3937d3b537df0a(out, mat) {\n var scaling = new $rqjzO.ARRAY_TYPE(3);\n $8c678e942362b0b9$export$71dc54d92bd04b57(scaling, mat);\n var is1 = 1 / scaling[0];\n var is2 = 1 / scaling[1];\n var is3 = 1 / scaling[2];\n var sm11 = mat[0] * is1;\n var sm12 = mat[1] * is2;\n var sm13 = mat[2] * is3;\n var sm21 = mat[4] * is1;\n var sm22 = mat[5] * is2;\n var sm23 = mat[6] * is3;\n var sm31 = mat[8] * is1;\n var sm32 = mat[9] * is2;\n var sm33 = mat[10] * is3;\n var trace = sm11 + sm22 + sm33;\n var S = 0;\n if (trace > 0) {\n S = Math.sqrt(trace + 1.0) * 2;\n out[3] = 0.25 * S;\n out[0] = (sm23 - sm32) / S;\n out[1] = (sm31 - sm13) / S;\n out[2] = (sm12 - sm21) / S;\n } else if (sm11 > sm22 && sm11 > sm33) {\n S = Math.sqrt(1.0 + sm11 - sm22 - sm33) * 2;\n out[3] = (sm23 - sm32) / S;\n out[0] = 0.25 * S;\n out[1] = (sm12 + sm21) / S;\n out[2] = (sm31 + sm13) / S;\n } else if (sm22 > sm33) {\n S = Math.sqrt(1.0 + sm22 - sm11 - sm33) * 2;\n out[3] = (sm31 - sm13) / S;\n out[0] = (sm12 + sm21) / S;\n out[1] = 0.25 * S;\n out[2] = (sm23 + sm32) / S;\n } else {\n S = Math.sqrt(1.0 + sm33 - sm11 - sm22) * 2;\n out[3] = (sm12 - sm21) / S;\n out[0] = (sm31 + sm13) / S;\n out[1] = (sm23 + sm32) / S;\n out[2] = 0.25 * S;\n }\n return out;\n}\nfunction $8c678e942362b0b9$export$ddf9c55c9f2be172(out, q, v, s) {\n // Quaternion math\n var x = q[0], y = q[1], z = q[2], w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n var sx = s[0];\n var sy = s[1];\n var sz = s[2];\n out[0] = (1 - (yy + zz)) * sx;\n out[1] = (xy + wz) * sx;\n out[2] = (xz - wy) * sx;\n out[3] = 0;\n out[4] = (xy - wz) * sy;\n out[5] = (1 - (xx + zz)) * sy;\n out[6] = (yz + wx) * sy;\n out[7] = 0;\n out[8] = (xz + wy) * sz;\n out[9] = (yz - wx) * sz;\n out[10] = (1 - (xx + yy)) * sz;\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\nfunction $8c678e942362b0b9$export$1def1f860edc4b1f(out, q, v, s, o) {\n // Quaternion math\n var x = q[0], y = q[1], z = q[2], w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n var sx = s[0];\n var sy = s[1];\n var sz = s[2];\n var ox = o[0];\n var oy = o[1];\n var oz = o[2];\n var out0 = (1 - (yy + zz)) * sx;\n var out1 = (xy + wz) * sx;\n var out2 = (xz - wy) * sx;\n var out4 = (xy - wz) * sy;\n var out5 = (1 - (xx + zz)) * sy;\n var out6 = (yz + wx) * sy;\n var out8 = (xz + wy) * sz;\n var out9 = (yz - wx) * sz;\n var out10 = (1 - (xx + yy)) * sz;\n out[0] = out0;\n out[1] = out1;\n out[2] = out2;\n out[3] = 0;\n out[4] = out4;\n out[5] = out5;\n out[6] = out6;\n out[7] = 0;\n out[8] = out8;\n out[9] = out9;\n out[10] = out10;\n out[11] = 0;\n out[12] = v[0] + ox - (out0 * ox + out4 * oy + out8 * oz);\n out[13] = v[1] + oy - (out1 * ox + out5 * oy + out9 * oz);\n out[14] = v[2] + oz - (out2 * ox + out6 * oy + out10 * oz);\n out[15] = 1;\n return out;\n}\nfunction $8c678e942362b0b9$export$2ff2bbe382249af7(out, q) {\n var x = q[0], y = q[1], z = q[2], w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var yx = y * x2;\n var yy = y * y2;\n var zx = z * x2;\n var zy = z * y2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - yy - zz;\n out[1] = yx + wz;\n out[2] = zx - wy;\n out[3] = 0;\n out[4] = yx - wz;\n out[5] = 1 - xx - zz;\n out[6] = zy + wx;\n out[7] = 0;\n out[8] = zx + wy;\n out[9] = zy - wx;\n out[10] = 1 - xx - yy;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\nfunction $8c678e942362b0b9$export$89b5708c387cac6c(out, left, right, bottom, top, near, far) {\n var rl = 1 / (right - left);\n var tb = 1 / (top - bottom);\n var nf = 1 / (near - far);\n out[0] = near * 2 * rl;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = near * 2 * tb;\n out[6] = 0;\n out[7] = 0;\n out[8] = (right + left) * rl;\n out[9] = (top + bottom) * tb;\n out[10] = (far + near) * nf;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[14] = far * near * 2 * nf;\n out[15] = 0;\n return out;\n}\nfunction $8c678e942362b0b9$export$541149539f3a4684(out, fovy, aspect, near, far) {\n var f = 1.0 / Math.tan(fovy / 2), nf;\n out[0] = f / aspect;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = f;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[15] = 0;\n if (far != null && far !== Infinity) {\n nf = 1 / (near - far);\n out[10] = (far + near) * nf;\n out[14] = 2 * far * near * nf;\n } else {\n out[10] = -1;\n out[14] = -2 * near;\n }\n return out;\n}\nfunction $8c678e942362b0b9$export$58ae211c788e338f(out, fov, near, far) {\n var upTan = Math.tan(fov.upDegrees * Math.PI / 180.0);\n var downTan = Math.tan(fov.downDegrees * Math.PI / 180.0);\n var leftTan = Math.tan(fov.leftDegrees * Math.PI / 180.0);\n var rightTan = Math.tan(fov.rightDegrees * Math.PI / 180.0);\n var xScale = 2.0 / (leftTan + rightTan);\n var yScale = 2.0 / (upTan + downTan);\n out[0] = xScale;\n out[1] = 0.0;\n out[2] = 0.0;\n out[3] = 0.0;\n out[4] = 0.0;\n out[5] = yScale;\n out[6] = 0.0;\n out[7] = 0.0;\n out[8] = -((leftTan - rightTan) * xScale * 0.5);\n out[9] = (upTan - downTan) * yScale * 0.5;\n out[10] = far / (near - far);\n out[11] = -1;\n out[12] = 0.0;\n out[13] = 0.0;\n out[14] = far * near / (near - far);\n out[15] = 0.0;\n return out;\n}\nfunction $8c678e942362b0b9$export$4f2167e613cfc87b(out, left, right, bottom, top, near, far) {\n var lr = 1 / (left - right);\n var bt = 1 / (bottom - top);\n var nf = 1 / (near - far);\n out[0] = -2 * lr;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = -2 * bt;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 2 * nf;\n out[11] = 0;\n out[12] = (left + right) * lr;\n out[13] = (top + bottom) * bt;\n out[14] = (far + near) * nf;\n out[15] = 1;\n return out;\n}\nfunction $8c678e942362b0b9$export$d924e14fd6d9aa66(out, eye, center, up) {\n var x0, x1, x2, y0, y1, y2, z0, z1, z2, len;\n var eyex = eye[0];\n var eyey = eye[1];\n var eyez = eye[2];\n var upx = up[0];\n var upy = up[1];\n var upz = up[2];\n var centerx = center[0];\n var centery = center[1];\n var centerz = center[2];\n if (Math.abs(eyex - centerx) < $rqjzO.EPSILON && Math.abs(eyey - centery) < $rqjzO.EPSILON && Math.abs(eyez - centerz) < $rqjzO.EPSILON) return $8c678e942362b0b9$export$f0954fd7d5368655(out);\n z0 = eyex - centerx;\n z1 = eyey - centery;\n z2 = eyez - centerz;\n len = 1 / Math.hypot(z0, z1, z2);\n z0 *= len;\n z1 *= len;\n z2 *= len;\n x0 = upy * z2 - upz * z1;\n x1 = upz * z0 - upx * z2;\n x2 = upx * z1 - upy * z0;\n len = Math.hypot(x0, x1, x2);\n if (!len) {\n x0 = 0;\n x1 = 0;\n x2 = 0;\n } else {\n len = 1 / len;\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n y0 = z1 * x2 - z2 * x1;\n y1 = z2 * x0 - z0 * x2;\n y2 = z0 * x1 - z1 * x0;\n len = Math.hypot(y0, y1, y2);\n if (!len) {\n y0 = 0;\n y1 = 0;\n y2 = 0;\n } else {\n len = 1 / len;\n y0 *= len;\n y1 *= len;\n y2 *= len;\n }\n out[0] = x0;\n out[1] = y0;\n out[2] = z0;\n out[3] = 0;\n out[4] = x1;\n out[5] = y1;\n out[6] = z1;\n out[7] = 0;\n out[8] = x2;\n out[9] = y2;\n out[10] = z2;\n out[11] = 0;\n out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);\n out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);\n out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);\n out[15] = 1;\n return out;\n}\nfunction $8c678e942362b0b9$export$aa67782f4dc9e52c(out, eye, target, up) {\n var eyex = eye[0], eyey = eye[1], eyez = eye[2], upx = up[0], upy = up[1], upz = up[2];\n var z0 = eyex - target[0], z1 = eyey - target[1], z2 = eyez - target[2];\n var len = z0 * z0 + z1 * z1 + z2 * z2;\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n z0 *= len;\n z1 *= len;\n z2 *= len;\n }\n var x0 = upy * z2 - upz * z1, x1 = upz * z0 - upx * z2, x2 = upx * z1 - upy * z0;\n len = x0 * x0 + x1 * x1 + x2 * x2;\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n out[0] = x0;\n out[1] = x1;\n out[2] = x2;\n out[3] = 0;\n out[4] = z1 * x2 - z2 * x1;\n out[5] = z2 * x0 - z0 * x2;\n out[6] = z0 * x1 - z1 * x0;\n out[7] = 0;\n out[8] = z0;\n out[9] = z1;\n out[10] = z2;\n out[11] = 0;\n out[12] = eyex;\n out[13] = eyey;\n out[14] = eyez;\n out[15] = 1;\n return out;\n}\nfunction $8c678e942362b0b9$export$42d51816ce590c93(a) {\n return \"mat4(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \", \" + a[6] + \", \" + a[7] + \", \" + a[8] + \", \" + a[9] + \", \" + a[10] + \", \" + a[11] + \", \" + a[12] + \", \" + a[13] + \", \" + a[14] + \", \" + a[15] + \")\";\n}\nfunction $8c678e942362b0b9$export$326827e8268e9cdb(a) {\n return Math.hypot(a[0], a[1], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\n}\nfunction $8c678e942362b0b9$export$e16d8520af44a096(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n out[6] = a[6] + b[6];\n out[7] = a[7] + b[7];\n out[8] = a[8] + b[8];\n out[9] = a[9] + b[9];\n out[10] = a[10] + b[10];\n out[11] = a[11] + b[11];\n out[12] = a[12] + b[12];\n out[13] = a[13] + b[13];\n out[14] = a[14] + b[14];\n out[15] = a[15] + b[15];\n return out;\n}\nfunction $8c678e942362b0b9$export$4e2d2ead65e5f7e3(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n out[4] = a[4] - b[4];\n out[5] = a[5] - b[5];\n out[6] = a[6] - b[6];\n out[7] = a[7] - b[7];\n out[8] = a[8] - b[8];\n out[9] = a[9] - b[9];\n out[10] = a[10] - b[10];\n out[11] = a[11] - b[11];\n out[12] = a[12] - b[12];\n out[13] = a[13] - b[13];\n out[14] = a[14] - b[14];\n out[15] = a[15] - b[15];\n return out;\n}\nfunction $8c678e942362b0b9$export$c697bed75648cdb7(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n out[6] = a[6] * b;\n out[7] = a[7] * b;\n out[8] = a[8] * b;\n out[9] = a[9] * b;\n out[10] = a[10] * b;\n out[11] = a[11] * b;\n out[12] = a[12] * b;\n out[13] = a[13] * b;\n out[14] = a[14] * b;\n out[15] = a[15] * b;\n return out;\n}\nfunction $8c678e942362b0b9$export$553579f63bdd7137(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n out[4] = a[4] + b[4] * scale;\n out[5] = a[5] + b[5] * scale;\n out[6] = a[6] + b[6] * scale;\n out[7] = a[7] + b[7] * scale;\n out[8] = a[8] + b[8] * scale;\n out[9] = a[9] + b[9] * scale;\n out[10] = a[10] + b[10] * scale;\n out[11] = a[11] + b[11] * scale;\n out[12] = a[12] + b[12] * scale;\n out[13] = a[13] + b[13] * scale;\n out[14] = a[14] + b[14] * scale;\n out[15] = a[15] + b[15] * scale;\n return out;\n}\nfunction $8c678e942362b0b9$export$f2599a5cf1109d8(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8] && a[9] === b[9] && a[10] === b[10] && a[11] === b[11] && a[12] === b[12] && a[13] === b[13] && a[14] === b[14] && a[15] === b[15];\n}\nfunction $8c678e942362b0b9$export$e9bab7fafb253603(a, b) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3];\n var a4 = a[4], a5 = a[5], a6 = a[6], a7 = a[7];\n var a8 = a[8], a9 = a[9], a10 = a[10], a11 = a[11];\n var a12 = a[12], a13 = a[13], a14 = a[14], a15 = a[15];\n var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3];\n var b4 = b[4], b5 = b[5], b6 = b[6], b7 = b[7];\n var b8 = b[8], b9 = b[9], b10 = b[10], b11 = b[11];\n var b12 = b[12], b13 = b[13], b14 = b[14], b15 = b[15];\n return Math.abs(a0 - b0) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a8), Math.abs(b8)) && Math.abs(a9 - b9) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a9), Math.abs(b9)) && Math.abs(a10 - b10) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a10), Math.abs(b10)) && Math.abs(a11 - b11) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a11), Math.abs(b11)) && Math.abs(a12 - b12) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a12), Math.abs(b12)) && Math.abs(a13 - b13) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a13), Math.abs(b13)) && Math.abs(a14 - b14) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a14), Math.abs(b14)) && Math.abs(a15 - b15) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a15), Math.abs(b15));\n}\nvar $8c678e942362b0b9$export$6e3a27864ab166fe = $8c678e942362b0b9$export$2060d2db72cce88f;\nvar $8c678e942362b0b9$export$f93b5905241a7cca = $8c678e942362b0b9$export$4e2d2ead65e5f7e3;\n\n});\nparcelRegister(\"rqjzO\", function(module, exports) {\n\n$parcel$export(module.exports, \"EPSILON\", function () { return $0526ef4aedbd7991$export$fd293b15f47e270; });\n$parcel$export(module.exports, \"ARRAY_TYPE\", function () { return $0526ef4aedbd7991$export$b67359430d3b1b2; });\n$parcel$export(module.exports, \"RANDOM\", function () { return $0526ef4aedbd7991$export$5ada478c8a628231; });\n$parcel$export(module.exports, \"setMatrixArrayType\", function () { return $0526ef4aedbd7991$export$cb2c0eb57f5e532c; });\n$parcel$export(module.exports, \"toRadian\", function () { return $0526ef4aedbd7991$export$408b8ee5959eefd5; });\n$parcel$export(module.exports, \"equals\", function () { return $0526ef4aedbd7991$export$e9bab7fafb253603; });\n/**\r\n * Common utilities\r\n * @module glMatrix\r\n */ // Configuration Constants\nvar $0526ef4aedbd7991$export$fd293b15f47e270 = 0.000001;\nvar $0526ef4aedbd7991$export$b67359430d3b1b2 = typeof Float32Array !== \"undefined\" ? Float32Array : Array;\nvar $0526ef4aedbd7991$export$5ada478c8a628231 = Math.random;\nfunction $0526ef4aedbd7991$export$cb2c0eb57f5e532c(type) {\n $0526ef4aedbd7991$export$b67359430d3b1b2 = type;\n}\nvar $0526ef4aedbd7991$var$degree = Math.PI / 180;\nfunction $0526ef4aedbd7991$export$408b8ee5959eefd5(a) {\n return a * $0526ef4aedbd7991$var$degree;\n}\nfunction $0526ef4aedbd7991$export$e9bab7fafb253603(a, b) {\n return Math.abs(a - b) <= $0526ef4aedbd7991$export$fd293b15f47e270 * Math.max(1.0, Math.abs(a), Math.abs(b));\n}\nif (!Math.hypot) Math.hypot = function() {\n var y = 0, i = arguments.length;\n while(i--)y += arguments[i] * arguments[i];\n return Math.sqrt(y);\n};\n\n});\n\n\nparcelRegister(\"fwwPx\", function(module, exports) {\n\n$parcel$export(module.exports, \"create\", function () { return $b4d34f945b36eb1f$export$185802fd694ee1f5; });\n$parcel$export(module.exports, \"clone\", function () { return $b4d34f945b36eb1f$export$9cd59f9826255e47; });\n$parcel$export(module.exports, \"length\", function () { return $b4d34f945b36eb1f$export$f24224f1c91d8156; });\n$parcel$export(module.exports, \"fromValues\", function () { return $b4d34f945b36eb1f$export$a82be99ed2a44a7d; });\n$parcel$export(module.exports, \"copy\", function () { return $b4d34f945b36eb1f$export$784d13d8ee351f07; });\n$parcel$export(module.exports, \"set\", function () { return $b4d34f945b36eb1f$export$adaa4cf7ef1b65be; });\n$parcel$export(module.exports, \"add\", function () { return $b4d34f945b36eb1f$export$e16d8520af44a096; });\n$parcel$export(module.exports, \"subtract\", function () { return $b4d34f945b36eb1f$export$4e2d2ead65e5f7e3; });\n$parcel$export(module.exports, \"multiply\", function () { return $b4d34f945b36eb1f$export$2060d2db72cce88f; });\n$parcel$export(module.exports, \"divide\", function () { return $b4d34f945b36eb1f$export$cd007d971a5a2143; });\n$parcel$export(module.exports, \"ceil\", function () { return $b4d34f945b36eb1f$export$803ce6b71a0a94b2; });\n$parcel$export(module.exports, \"floor\", function () { return $b4d34f945b36eb1f$export$a3fe094919f356fd; });\n$parcel$export(module.exports, \"min\", function () { return $b4d34f945b36eb1f$export$96ec731ed4dcb222; });\n$parcel$export(module.exports, \"max\", function () { return $b4d34f945b36eb1f$export$8960430cfd85939f; });\n$parcel$export(module.exports, \"round\", function () { return $b4d34f945b36eb1f$export$2077e0241d6afd3c; });\n$parcel$export(module.exports, \"scale\", function () { return $b4d34f945b36eb1f$export$dcdf75081b88279d; });\n$parcel$export(module.exports, \"scaleAndAdd\", function () { return $b4d34f945b36eb1f$export$19cedf1da84ba854; });\n$parcel$export(module.exports, \"distance\", function () { return $b4d34f945b36eb1f$export$9f17032d917177de; });\n$parcel$export(module.exports, \"squaredDistance\", function () { return $b4d34f945b36eb1f$export$88e6ebb4fe54f538; });\n$parcel$export(module.exports, \"squaredLength\", function () { return $b4d34f945b36eb1f$export$ab44e1323ffc8376; });\n$parcel$export(module.exports, \"negate\", function () { return $b4d34f945b36eb1f$export$aef51622e549b8b0; });\n$parcel$export(module.exports, \"inverse\", function () { return $b4d34f945b36eb1f$export$70ae2c07e401031b; });\n$parcel$export(module.exports, \"normalize\", function () { return $b4d34f945b36eb1f$export$a3295358bff77e; });\n$parcel$export(module.exports, \"dot\", function () { return $b4d34f945b36eb1f$export$94132a0e348806d4; });\n$parcel$export(module.exports, \"cross\", function () { return $b4d34f945b36eb1f$export$bb646b20bb93d339; });\n$parcel$export(module.exports, \"lerp\", function () { return $b4d34f945b36eb1f$export$3a89f8d6f6bf6c9f; });\n$parcel$export(module.exports, \"hermite\", function () { return $b4d34f945b36eb1f$export$ae8865616f30561c; });\n$parcel$export(module.exports, \"bezier\", function () { return $b4d34f945b36eb1f$export$b9c5f84610baddaf; });\n$parcel$export(module.exports, \"random\", function () { return $b4d34f945b36eb1f$export$4385e60b38654f68; });\n$parcel$export(module.exports, \"transformMat4\", function () { return $b4d34f945b36eb1f$export$5ffbd13800309d59; });\n$parcel$export(module.exports, \"transformMat3\", function () { return $b4d34f945b36eb1f$export$f0bfa0a0024626ee; });\n$parcel$export(module.exports, \"transformQuat\", function () { return $b4d34f945b36eb1f$export$c32adef9e939ce85; });\n$parcel$export(module.exports, \"rotateX\", function () { return $b4d34f945b36eb1f$export$a59c8716592e09af; });\n$parcel$export(module.exports, \"rotateY\", function () { return $b4d34f945b36eb1f$export$cf71e4d4ca4d1cfd; });\n$parcel$export(module.exports, \"rotateZ\", function () { return $b4d34f945b36eb1f$export$ea6eae3365de5b9c; });\n$parcel$export(module.exports, \"angle\", function () { return $b4d34f945b36eb1f$export$944b09d2ad10b378; });\n$parcel$export(module.exports, \"zero\", function () { return $b4d34f945b36eb1f$export$7f9972325ebfd559; });\n$parcel$export(module.exports, \"str\", function () { return $b4d34f945b36eb1f$export$42d51816ce590c93; });\n$parcel$export(module.exports, \"exactEquals\", function () { return $b4d34f945b36eb1f$export$f2599a5cf1109d8; });\n$parcel$export(module.exports, \"equals\", function () { return $b4d34f945b36eb1f$export$e9bab7fafb253603; });\n$parcel$export(module.exports, \"sub\", function () { return $b4d34f945b36eb1f$export$f93b5905241a7cca; });\n$parcel$export(module.exports, \"mul\", function () { return $b4d34f945b36eb1f$export$6e3a27864ab166fe; });\n$parcel$export(module.exports, \"div\", function () { return $b4d34f945b36eb1f$export$159d9494db57879b; });\n$parcel$export(module.exports, \"dist\", function () { return $b4d34f945b36eb1f$export$6c4a311cc157c764; });\n$parcel$export(module.exports, \"sqrDist\", function () { return $b4d34f945b36eb1f$export$2422cd6c492a8b3a; });\n$parcel$export(module.exports, \"len\", function () { return $b4d34f945b36eb1f$export$fc1400facf92c78; });\n$parcel$export(module.exports, \"sqrLen\", function () { return $b4d34f945b36eb1f$export$99d8dd3f32a3435; });\n$parcel$export(module.exports, \"forEach\", function () { return $b4d34f945b36eb1f$export$4b80e395e36b5a56; });\n\nvar $rqjzO = parcelRequire(\"rqjzO\");\nfunction $b4d34f945b36eb1f$export$185802fd694ee1f5() {\n var out = new $rqjzO.ARRAY_TYPE(3);\n if ($rqjzO.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n }\n return out;\n}\nfunction $b4d34f945b36eb1f$export$9cd59f9826255e47(a) {\n var out = new $rqjzO.ARRAY_TYPE(3);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n return out;\n}\nfunction $b4d34f945b36eb1f$export$f24224f1c91d8156(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n return Math.hypot(x, y, z);\n}\nfunction $b4d34f945b36eb1f$export$a82be99ed2a44a7d(x, y, z) {\n var out = new $rqjzO.ARRAY_TYPE(3);\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n}\nfunction $b4d34f945b36eb1f$export$784d13d8ee351f07(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n return out;\n}\nfunction $b4d34f945b36eb1f$export$adaa4cf7ef1b65be(out, x, y, z) {\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n}\nfunction $b4d34f945b36eb1f$export$e16d8520af44a096(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n return out;\n}\nfunction $b4d34f945b36eb1f$export$4e2d2ead65e5f7e3(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n return out;\n}\nfunction $b4d34f945b36eb1f$export$2060d2db72cce88f(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n out[2] = a[2] * b[2];\n return out;\n}\nfunction $b4d34f945b36eb1f$export$cd007d971a5a2143(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n out[2] = a[2] / b[2];\n return out;\n}\nfunction $b4d34f945b36eb1f$export$803ce6b71a0a94b2(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n out[2] = Math.ceil(a[2]);\n return out;\n}\nfunction $b4d34f945b36eb1f$export$a3fe094919f356fd(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n out[2] = Math.floor(a[2]);\n return out;\n}\nfunction $b4d34f945b36eb1f$export$96ec731ed4dcb222(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n out[2] = Math.min(a[2], b[2]);\n return out;\n}\nfunction $b4d34f945b36eb1f$export$8960430cfd85939f(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n out[2] = Math.max(a[2], b[2]);\n return out;\n}\nfunction $b4d34f945b36eb1f$export$2077e0241d6afd3c(out, a) {\n out[0] = Math.round(a[0]);\n out[1] = Math.round(a[1]);\n out[2] = Math.round(a[2]);\n return out;\n}\nfunction $b4d34f945b36eb1f$export$dcdf75081b88279d(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n return out;\n}\nfunction $b4d34f945b36eb1f$export$19cedf1da84ba854(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n return out;\n}\nfunction $b4d34f945b36eb1f$export$9f17032d917177de(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n return Math.hypot(x, y, z);\n}\nfunction $b4d34f945b36eb1f$export$88e6ebb4fe54f538(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n return x * x + y * y + z * z;\n}\nfunction $b4d34f945b36eb1f$export$ab44e1323ffc8376(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n return x * x + y * y + z * z;\n}\nfunction $b4d34f945b36eb1f$export$aef51622e549b8b0(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n return out;\n}\nfunction $b4d34f945b36eb1f$export$70ae2c07e401031b(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n out[2] = 1.0 / a[2];\n return out;\n}\nfunction $b4d34f945b36eb1f$export$a3295358bff77e(out, a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var len = x * x + y * y + z * z;\n if (len > 0) //TODO: evaluate use of glm_invsqrt here?\n len = 1 / Math.sqrt(len);\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n out[2] = a[2] * len;\n return out;\n}\nfunction $b4d34f945b36eb1f$export$94132a0e348806d4(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n}\nfunction $b4d34f945b36eb1f$export$bb646b20bb93d339(out, a, b) {\n var ax = a[0], ay = a[1], az = a[2];\n var bx = b[0], by = b[1], bz = b[2];\n out[0] = ay * bz - az * by;\n out[1] = az * bx - ax * bz;\n out[2] = ax * by - ay * bx;\n return out;\n}\nfunction $b4d34f945b36eb1f$export$3a89f8d6f6bf6c9f(out, a, b, t) {\n var ax = a[0];\n var ay = a[1];\n var az = a[2];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n out[2] = az + t * (b[2] - az);\n return out;\n}\nfunction $b4d34f945b36eb1f$export$ae8865616f30561c(out, a, b, c, d, t) {\n var factorTimes2 = t * t;\n var factor1 = factorTimes2 * (2 * t - 3) + 1;\n var factor2 = factorTimes2 * (t - 2) + t;\n var factor3 = factorTimes2 * (t - 1);\n var factor4 = factorTimes2 * (3 - 2 * t);\n out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;\n out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;\n out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;\n return out;\n}\nfunction $b4d34f945b36eb1f$export$b9c5f84610baddaf(out, a, b, c, d, t) {\n var inverseFactor = 1 - t;\n var inverseFactorTimesTwo = inverseFactor * inverseFactor;\n var factorTimes2 = t * t;\n var factor1 = inverseFactorTimesTwo * inverseFactor;\n var factor2 = 3 * t * inverseFactorTimesTwo;\n var factor3 = 3 * factorTimes2 * inverseFactor;\n var factor4 = factorTimes2 * t;\n out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;\n out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;\n out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;\n return out;\n}\nfunction $b4d34f945b36eb1f$export$4385e60b38654f68(out, scale) {\n scale = scale || 1.0;\n var r = $rqjzO.RANDOM() * 2.0 * Math.PI;\n var z = $rqjzO.RANDOM() * 2.0 - 1.0;\n var zScale = Math.sqrt(1.0 - z * z) * scale;\n out[0] = Math.cos(r) * zScale;\n out[1] = Math.sin(r) * zScale;\n out[2] = z * scale;\n return out;\n}\nfunction $b4d34f945b36eb1f$export$5ffbd13800309d59(out, a, m) {\n var x = a[0], y = a[1], z = a[2];\n var w = m[3] * x + m[7] * y + m[11] * z + m[15];\n w = w || 1.0;\n out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w;\n out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w;\n out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w;\n return out;\n}\nfunction $b4d34f945b36eb1f$export$f0bfa0a0024626ee(out, a, m) {\n var x = a[0], y = a[1], z = a[2];\n out[0] = x * m[0] + y * m[3] + z * m[6];\n out[1] = x * m[1] + y * m[4] + z * m[7];\n out[2] = x * m[2] + y * m[5] + z * m[8];\n return out;\n}\nfunction $b4d34f945b36eb1f$export$c32adef9e939ce85(out, a, q) {\n // benchmarks: https://jsperf.com/quaternion-transform-vec3-implementations-fixed\n var qx = q[0], qy = q[1], qz = q[2], qw = q[3];\n var x = a[0], y = a[1], z = a[2]; // var qvec = [qx, qy, qz];\n // var uv = vec3.cross([], qvec, a);\n var uvx = qy * z - qz * y, uvy = qz * x - qx * z, uvz = qx * y - qy * x; // var uuv = vec3.cross([], qvec, uv);\n var uuvx = qy * uvz - qz * uvy, uuvy = qz * uvx - qx * uvz, uuvz = qx * uvy - qy * uvx; // vec3.scale(uv, uv, 2 * w);\n var w2 = qw * 2;\n uvx *= w2;\n uvy *= w2;\n uvz *= w2; // vec3.scale(uuv, uuv, 2);\n uuvx *= 2;\n uuvy *= 2;\n uuvz *= 2; // return vec3.add(out, a, vec3.add(out, uv, uuv));\n out[0] = x + uvx + uuvx;\n out[1] = y + uvy + uuvy;\n out[2] = z + uvz + uuvz;\n return out;\n}\nfunction $b4d34f945b36eb1f$export$a59c8716592e09af(out, a, b, c) {\n var p = [], r = []; //Translate point to the origin\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n r[0] = p[0];\n r[1] = p[1] * Math.cos(c) - p[2] * Math.sin(c);\n r[2] = p[1] * Math.sin(c) + p[2] * Math.cos(c); //translate to correct position\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n}\nfunction $b4d34f945b36eb1f$export$cf71e4d4ca4d1cfd(out, a, b, c) {\n var p = [], r = []; //Translate point to the origin\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n r[0] = p[2] * Math.sin(c) + p[0] * Math.cos(c);\n r[1] = p[1];\n r[2] = p[2] * Math.cos(c) - p[0] * Math.sin(c); //translate to correct position\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n}\nfunction $b4d34f945b36eb1f$export$ea6eae3365de5b9c(out, a, b, c) {\n var p = [], r = []; //Translate point to the origin\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n r[0] = p[0] * Math.cos(c) - p[1] * Math.sin(c);\n r[1] = p[0] * Math.sin(c) + p[1] * Math.cos(c);\n r[2] = p[2]; //translate to correct position\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n}\nfunction $b4d34f945b36eb1f$export$944b09d2ad10b378(a, b) {\n var tempA = $b4d34f945b36eb1f$export$a82be99ed2a44a7d(a[0], a[1], a[2]);\n var tempB = $b4d34f945b36eb1f$export$a82be99ed2a44a7d(b[0], b[1], b[2]);\n $b4d34f945b36eb1f$export$a3295358bff77e(tempA, tempA);\n $b4d34f945b36eb1f$export$a3295358bff77e(tempB, tempB);\n var cosine = $b4d34f945b36eb1f$export$94132a0e348806d4(tempA, tempB);\n if (cosine > 1.0) return 0;\n else if (cosine < -1) return Math.PI;\n else return Math.acos(cosine);\n}\nfunction $b4d34f945b36eb1f$export$7f9972325ebfd559(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n out[2] = 0.0;\n return out;\n}\nfunction $b4d34f945b36eb1f$export$42d51816ce590c93(a) {\n return \"vec3(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \")\";\n}\nfunction $b4d34f945b36eb1f$export$f2599a5cf1109d8(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2];\n}\nfunction $b4d34f945b36eb1f$export$e9bab7fafb253603(a, b) {\n var a0 = a[0], a1 = a[1], a2 = a[2];\n var b0 = b[0], b1 = b[1], b2 = b[2];\n return Math.abs(a0 - b0) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2));\n}\nvar $b4d34f945b36eb1f$export$f93b5905241a7cca = $b4d34f945b36eb1f$export$4e2d2ead65e5f7e3;\nvar $b4d34f945b36eb1f$export$6e3a27864ab166fe = $b4d34f945b36eb1f$export$2060d2db72cce88f;\nvar $b4d34f945b36eb1f$export$159d9494db57879b = $b4d34f945b36eb1f$export$cd007d971a5a2143;\nvar $b4d34f945b36eb1f$export$6c4a311cc157c764 = $b4d34f945b36eb1f$export$9f17032d917177de;\nvar $b4d34f945b36eb1f$export$2422cd6c492a8b3a = $b4d34f945b36eb1f$export$88e6ebb4fe54f538;\nvar $b4d34f945b36eb1f$export$fc1400facf92c78 = $b4d34f945b36eb1f$export$f24224f1c91d8156;\nvar $b4d34f945b36eb1f$export$99d8dd3f32a3435 = $b4d34f945b36eb1f$export$ab44e1323ffc8376;\nvar $b4d34f945b36eb1f$export$4b80e395e36b5a56 = function() {\n var vec = $b4d34f945b36eb1f$export$185802fd694ee1f5();\n return function(a, stride, offset, count, fn, arg) {\n var i, l;\n if (!stride) stride = 3;\n if (!offset) offset = 0;\n if (count) l = Math.min(count * stride + offset, a.length);\n else l = a.length;\n for(i = offset; i < l; i += stride){\n vec[0] = a[i];\n vec[1] = a[i + 1];\n vec[2] = a[i + 2];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n a[i + 2] = vec[2];\n }\n return a;\n };\n}();\n\n});\n\nparcelRegister(\"3KYUN\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n// These are used to set the WebGl depth for a tile.\nvar $2bc4eb70f599d6df$var$MAX_LAYERS = 256; // Max number of layers per stage.\nvar $2bc4eb70f599d6df$var$MAX_LEVELS = 256; // Max number of levels per layer.\n\nvar $eCQUD = parcelRequire(\"eCQUD\");\n\nvar $c3mW8 = parcelRequire(\"c3mW8\");\nvar $fwwPx = parcelRequire(\"fwwPx\");\nvar $8QvoZ = parcelRequire(\"8QvoZ\");\nvar $2bc4eb70f599d6df$require$vec4 = $8QvoZ;\n\nvar $c3mW8 = parcelRequire(\"c3mW8\");\nvar $fwwPx = parcelRequire(\"fwwPx\");\nvar $8QvoZ = parcelRequire(\"8QvoZ\");\nvar $2bc4eb70f599d6df$require$vec3 = $fwwPx;\n\nvar $c3mW8 = parcelRequire(\"c3mW8\");\nvar $fwwPx = parcelRequire(\"fwwPx\");\nvar $8QvoZ = parcelRequire(\"8QvoZ\");\nvar $2bc4eb70f599d6df$require$mat4 = $c3mW8;\nfunction $2bc4eb70f599d6df$var$createShader(gl, type, src) {\n var shader = gl.createShader(type);\n gl.shaderSource(shader, src);\n gl.compileShader(shader);\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) throw gl.getShaderInfoLog(shader);\n return shader;\n}\nfunction $2bc4eb70f599d6df$var$createShaderProgram(gl, vertexSrc, fragmentSrc, attribList, uniformList) {\n var vertexShader = $2bc4eb70f599d6df$var$createShader(gl, gl.VERTEX_SHADER, vertexSrc);\n var fragmentShader = $2bc4eb70f599d6df$var$createShader(gl, gl.FRAGMENT_SHADER, fragmentSrc);\n var shaderProgram = gl.createProgram();\n gl.attachShader(shaderProgram, vertexShader);\n gl.attachShader(shaderProgram, fragmentShader);\n gl.linkProgram(shaderProgram);\n if (!gl.getProgramParameter(shaderProgram, gl.LINK_STATUS)) throw gl.getProgramInfoLog(shaderProgram);\n for(var i = 0; i < attribList.length; i++){\n var attrib = attribList[i];\n shaderProgram[attrib] = gl.getAttribLocation(shaderProgram, attrib);\n if (shaderProgram[attrib] === -1) throw new Error(\"Shader program has no \" + attrib + \" attribute\");\n }\n for(var j = 0; j < uniformList.length; j++){\n var uniform = uniformList[j];\n shaderProgram[uniform] = gl.getUniformLocation(shaderProgram, uniform);\n if (shaderProgram[uniform] === -1) throw new Error(\"Shader program has no \" + uniform + \" uniform\");\n }\n return shaderProgram;\n}\nfunction $2bc4eb70f599d6df$var$destroyShaderProgram(gl, shaderProgram) {\n var shaderList = gl.getAttachedShaders(shaderProgram);\n for(var i = 0; i < shaderList.length; i++){\n var shader = shaderList[i];\n gl.detachShader(shaderProgram, shader);\n gl.deleteShader(shader);\n }\n gl.deleteProgram(shaderProgram);\n}\nfunction $2bc4eb70f599d6df$var$createConstantBuffer(gl, target, usage, value) {\n var buffer = gl.createBuffer();\n gl.bindBuffer(target, buffer);\n gl.bufferData(target, value, usage);\n return buffer;\n}\nfunction $2bc4eb70f599d6df$var$createConstantBuffers(gl, vertexIndices, vertexPositions, textureCoords) {\n return {\n vertexIndices: $2bc4eb70f599d6df$var$createConstantBuffer(gl, gl.ELEMENT_ARRAY_BUFFER, gl.STATIC_DRAW, new Uint16Array(vertexIndices)),\n vertexPositions: $2bc4eb70f599d6df$var$createConstantBuffer(gl, gl.ARRAY_BUFFER, gl.STATIC_DRAW, new Float32Array(vertexPositions)),\n textureCoords: $2bc4eb70f599d6df$var$createConstantBuffer(gl, gl.ARRAY_BUFFER, gl.STATIC_DRAW, new Float32Array(textureCoords))\n };\n}\nfunction $2bc4eb70f599d6df$var$destroyConstantBuffers(gl, constantBuffers) {\n gl.deleteBuffer(constantBuffers.vertexIndices);\n gl.deleteBuffer(constantBuffers.vertexPositions);\n gl.deleteBuffer(constantBuffers.textureCoords);\n}\nfunction $2bc4eb70f599d6df$var$enableAttributes(gl, shaderProgram) {\n var numAttrs = gl.getProgramParameter(shaderProgram, gl.ACTIVE_ATTRIBUTES);\n for(var i = 0; i < numAttrs; i++)gl.enableVertexAttribArray(i);\n}\nfunction $2bc4eb70f599d6df$var$disableAttributes(gl, shaderProgram) {\n var numAttrs = gl.getProgramParameter(shaderProgram, gl.ACTIVE_ATTRIBUTES);\n for(var i = 0; i < numAttrs; i++)gl.disableVertexAttribArray(i);\n}\nfunction $2bc4eb70f599d6df$var$setTexture(gl, shaderProgram, texture) {\n gl.activeTexture(gl.TEXTURE0);\n gl.bindTexture(gl.TEXTURE_2D, texture._texture);\n gl.uniform1i(shaderProgram.uSampler, 0);\n}\nfunction $2bc4eb70f599d6df$var$setDepth(gl, shaderProgram, layerZ, tileZ) {\n var depth = ((layerZ + 1) * $2bc4eb70f599d6df$var$MAX_LEVELS - tileZ) / ($2bc4eb70f599d6df$var$MAX_LEVELS * $2bc4eb70f599d6df$var$MAX_LAYERS);\n gl.uniform1f(shaderProgram.uDepth, depth);\n}\nvar $2bc4eb70f599d6df$var$defaultOpacity = 1.0;\nvar $2bc4eb70f599d6df$var$defaultColorOffset = $2bc4eb70f599d6df$require$vec4.create();\nvar $2bc4eb70f599d6df$var$defaultColorMatrix = $2bc4eb70f599d6df$require$mat4.create();\n$2bc4eb70f599d6df$require$mat4.identity($2bc4eb70f599d6df$var$defaultColorMatrix);\nfunction $2bc4eb70f599d6df$var$setupPixelEffectUniforms(gl, effects, uniforms) {\n var opacity = $2bc4eb70f599d6df$var$defaultOpacity;\n if (effects && effects.opacity != null) opacity = effects.opacity;\n gl.uniform1f(uniforms.opacity, opacity);\n var colorOffset = $2bc4eb70f599d6df$var$defaultColorOffset;\n if (effects && effects.colorOffset) colorOffset = effects.colorOffset;\n gl.uniform4fv(uniforms.colorOffset, colorOffset);\n var colorMatrix = $2bc4eb70f599d6df$var$defaultColorMatrix;\n if (effects && effects.colorMatrix) colorMatrix = effects.colorMatrix;\n gl.uniformMatrix4fv(uniforms.colorMatrix, false, colorMatrix);\n}\n// Temporary vectors for setViewport.\nvar $2bc4eb70f599d6df$var$translateVector = $2bc4eb70f599d6df$require$vec3.create();\nvar $2bc4eb70f599d6df$var$scaleVector = $2bc4eb70f599d6df$require$vec3.create();\n// Sets the WebGL viewport and returns a viewport clamping compensation matrix.\n//\n// Negative viewport origin coordinates cause rendering issues. Letting the\n// viewport dimensions extend beyond the visible area do not seem to cause\n// rendering issues, but they may still have an impact on performance.\n// Therefore, when the scene's rect is not fully contained in the rendering\n// area, we clamp the viewport to the rendering area, and return a compensation\n// matrix to scale and translate vertices accordingly.\nfunction $2bc4eb70f599d6df$var$setViewport(gl, layer, rect, viewportMatrix) {\n if (rect.x === 0 && rect.width === 1 && rect.y === 0 && rect.height === 1) {\n // Fast path for full rect.\n gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);\n $2bc4eb70f599d6df$require$mat4.identity(viewportMatrix);\n return;\n }\n var offsetX = rect.x;\n var clampedOffsetX = $eCQUD(offsetX, 0, 1);\n var leftExcess = clampedOffsetX - offsetX;\n var maxClampedWidth = 1 - clampedOffsetX;\n var clampedWidth = $eCQUD(rect.width - leftExcess, 0, maxClampedWidth);\n var rightExcess = rect.width - clampedWidth;\n var offsetY = 1 - rect.height - rect.y;\n var clampedOffsetY = $eCQUD(offsetY, 0, 1);\n var bottomExcess = clampedOffsetY - offsetY;\n var maxClampedHeight = 1 - clampedOffsetY;\n var clampedHeight = $eCQUD(rect.height - bottomExcess, 0, maxClampedHeight);\n var topExcess = rect.height - clampedHeight;\n $2bc4eb70f599d6df$require$vec3.set($2bc4eb70f599d6df$var$scaleVector, rect.width / clampedWidth, rect.height / clampedHeight, 1);\n $2bc4eb70f599d6df$require$vec3.set($2bc4eb70f599d6df$var$translateVector, (rightExcess - leftExcess) / clampedWidth, (topExcess - bottomExcess) / clampedHeight, 0);\n $2bc4eb70f599d6df$require$mat4.identity(viewportMatrix);\n $2bc4eb70f599d6df$require$mat4.translate(viewportMatrix, viewportMatrix, $2bc4eb70f599d6df$var$translateVector);\n $2bc4eb70f599d6df$require$mat4.scale(viewportMatrix, viewportMatrix, $2bc4eb70f599d6df$var$scaleVector);\n gl.viewport(gl.drawingBufferWidth * clampedOffsetX, gl.drawingBufferHeight * clampedOffsetY, gl.drawingBufferWidth * clampedWidth, gl.drawingBufferHeight * clampedHeight);\n}\nmodule.exports = {\n createShaderProgram: $2bc4eb70f599d6df$var$createShaderProgram,\n destroyShaderProgram: $2bc4eb70f599d6df$var$destroyShaderProgram,\n createConstantBuffers: $2bc4eb70f599d6df$var$createConstantBuffers,\n destroyConstantBuffers: $2bc4eb70f599d6df$var$destroyConstantBuffers,\n enableAttributes: $2bc4eb70f599d6df$var$enableAttributes,\n disableAttributes: $2bc4eb70f599d6df$var$disableAttributes,\n setTexture: $2bc4eb70f599d6df$var$setTexture,\n setDepth: $2bc4eb70f599d6df$var$setDepth,\n setViewport: $2bc4eb70f599d6df$var$setViewport,\n setupPixelEffectUniforms: $2bc4eb70f599d6df$var$setupPixelEffectUniforms\n};\n\n});\nparcelRegister(\"eCQUD\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\nfunction $aa5da89748021ec3$var$clamp(value, min, max) {\n return Math.min(Math.max(value, min), max);\n}\nmodule.exports = $aa5da89748021ec3$var$clamp;\n\n});\n\nparcelRegister(\"8QvoZ\", function(module, exports) {\n\n$parcel$export(module.exports, \"create\", function () { return $670b89df6ca628ce$export$185802fd694ee1f5; });\n$parcel$export(module.exports, \"clone\", function () { return $670b89df6ca628ce$export$9cd59f9826255e47; });\n$parcel$export(module.exports, \"fromValues\", function () { return $670b89df6ca628ce$export$a82be99ed2a44a7d; });\n$parcel$export(module.exports, \"copy\", function () { return $670b89df6ca628ce$export$784d13d8ee351f07; });\n$parcel$export(module.exports, \"set\", function () { return $670b89df6ca628ce$export$adaa4cf7ef1b65be; });\n$parcel$export(module.exports, \"add\", function () { return $670b89df6ca628ce$export$e16d8520af44a096; });\n$parcel$export(module.exports, \"subtract\", function () { return $670b89df6ca628ce$export$4e2d2ead65e5f7e3; });\n$parcel$export(module.exports, \"multiply\", function () { return $670b89df6ca628ce$export$2060d2db72cce88f; });\n$parcel$export(module.exports, \"divide\", function () { return $670b89df6ca628ce$export$cd007d971a5a2143; });\n$parcel$export(module.exports, \"ceil\", function () { return $670b89df6ca628ce$export$803ce6b71a0a94b2; });\n$parcel$export(module.exports, \"floor\", function () { return $670b89df6ca628ce$export$a3fe094919f356fd; });\n$parcel$export(module.exports, \"min\", function () { return $670b89df6ca628ce$export$96ec731ed4dcb222; });\n$parcel$export(module.exports, \"max\", function () { return $670b89df6ca628ce$export$8960430cfd85939f; });\n$parcel$export(module.exports, \"round\", function () { return $670b89df6ca628ce$export$2077e0241d6afd3c; });\n$parcel$export(module.exports, \"scale\", function () { return $670b89df6ca628ce$export$dcdf75081b88279d; });\n$parcel$export(module.exports, \"scaleAndAdd\", function () { return $670b89df6ca628ce$export$19cedf1da84ba854; });\n$parcel$export(module.exports, \"distance\", function () { return $670b89df6ca628ce$export$9f17032d917177de; });\n$parcel$export(module.exports, \"squaredDistance\", function () { return $670b89df6ca628ce$export$88e6ebb4fe54f538; });\n$parcel$export(module.exports, \"length\", function () { return $670b89df6ca628ce$export$f24224f1c91d8156; });\n$parcel$export(module.exports, \"squaredLength\", function () { return $670b89df6ca628ce$export$ab44e1323ffc8376; });\n$parcel$export(module.exports, \"negate\", function () { return $670b89df6ca628ce$export$aef51622e549b8b0; });\n$parcel$export(module.exports, \"inverse\", function () { return $670b89df6ca628ce$export$70ae2c07e401031b; });\n$parcel$export(module.exports, \"normalize\", function () { return $670b89df6ca628ce$export$a3295358bff77e; });\n$parcel$export(module.exports, \"dot\", function () { return $670b89df6ca628ce$export$94132a0e348806d4; });\n$parcel$export(module.exports, \"cross\", function () { return $670b89df6ca628ce$export$bb646b20bb93d339; });\n$parcel$export(module.exports, \"lerp\", function () { return $670b89df6ca628ce$export$3a89f8d6f6bf6c9f; });\n$parcel$export(module.exports, \"random\", function () { return $670b89df6ca628ce$export$4385e60b38654f68; });\n$parcel$export(module.exports, \"transformMat4\", function () { return $670b89df6ca628ce$export$5ffbd13800309d59; });\n$parcel$export(module.exports, \"transformQuat\", function () { return $670b89df6ca628ce$export$c32adef9e939ce85; });\n$parcel$export(module.exports, \"zero\", function () { return $670b89df6ca628ce$export$7f9972325ebfd559; });\n$parcel$export(module.exports, \"str\", function () { return $670b89df6ca628ce$export$42d51816ce590c93; });\n$parcel$export(module.exports, \"exactEquals\", function () { return $670b89df6ca628ce$export$f2599a5cf1109d8; });\n$parcel$export(module.exports, \"equals\", function () { return $670b89df6ca628ce$export$e9bab7fafb253603; });\n$parcel$export(module.exports, \"sub\", function () { return $670b89df6ca628ce$export$f93b5905241a7cca; });\n$parcel$export(module.exports, \"mul\", function () { return $670b89df6ca628ce$export$6e3a27864ab166fe; });\n$parcel$export(module.exports, \"div\", function () { return $670b89df6ca628ce$export$159d9494db57879b; });\n$parcel$export(module.exports, \"dist\", function () { return $670b89df6ca628ce$export$6c4a311cc157c764; });\n$parcel$export(module.exports, \"sqrDist\", function () { return $670b89df6ca628ce$export$2422cd6c492a8b3a; });\n$parcel$export(module.exports, \"len\", function () { return $670b89df6ca628ce$export$fc1400facf92c78; });\n$parcel$export(module.exports, \"sqrLen\", function () { return $670b89df6ca628ce$export$99d8dd3f32a3435; });\n$parcel$export(module.exports, \"forEach\", function () { return $670b89df6ca628ce$export$4b80e395e36b5a56; });\n\nvar $rqjzO = parcelRequire(\"rqjzO\");\nfunction $670b89df6ca628ce$export$185802fd694ee1f5() {\n var out = new $rqjzO.ARRAY_TYPE(4);\n if ($rqjzO.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n }\n return out;\n}\nfunction $670b89df6ca628ce$export$9cd59f9826255e47(a) {\n var out = new $rqjzO.ARRAY_TYPE(4);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\nfunction $670b89df6ca628ce$export$a82be99ed2a44a7d(x, y, z, w) {\n var out = new $rqjzO.ARRAY_TYPE(4);\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = w;\n return out;\n}\nfunction $670b89df6ca628ce$export$784d13d8ee351f07(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\nfunction $670b89df6ca628ce$export$adaa4cf7ef1b65be(out, x, y, z, w) {\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = w;\n return out;\n}\nfunction $670b89df6ca628ce$export$e16d8520af44a096(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n return out;\n}\nfunction $670b89df6ca628ce$export$4e2d2ead65e5f7e3(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n return out;\n}\nfunction $670b89df6ca628ce$export$2060d2db72cce88f(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n out[2] = a[2] * b[2];\n out[3] = a[3] * b[3];\n return out;\n}\nfunction $670b89df6ca628ce$export$cd007d971a5a2143(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n out[2] = a[2] / b[2];\n out[3] = a[3] / b[3];\n return out;\n}\nfunction $670b89df6ca628ce$export$803ce6b71a0a94b2(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n out[2] = Math.ceil(a[2]);\n out[3] = Math.ceil(a[3]);\n return out;\n}\nfunction $670b89df6ca628ce$export$a3fe094919f356fd(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n out[2] = Math.floor(a[2]);\n out[3] = Math.floor(a[3]);\n return out;\n}\nfunction $670b89df6ca628ce$export$96ec731ed4dcb222(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n out[2] = Math.min(a[2], b[2]);\n out[3] = Math.min(a[3], b[3]);\n return out;\n}\nfunction $670b89df6ca628ce$export$8960430cfd85939f(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n out[2] = Math.max(a[2], b[2]);\n out[3] = Math.max(a[3], b[3]);\n return out;\n}\nfunction $670b89df6ca628ce$export$2077e0241d6afd3c(out, a) {\n out[0] = Math.round(a[0]);\n out[1] = Math.round(a[1]);\n out[2] = Math.round(a[2]);\n out[3] = Math.round(a[3]);\n return out;\n}\nfunction $670b89df6ca628ce$export$dcdf75081b88279d(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n return out;\n}\nfunction $670b89df6ca628ce$export$19cedf1da84ba854(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n return out;\n}\nfunction $670b89df6ca628ce$export$9f17032d917177de(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n var w = b[3] - a[3];\n return Math.hypot(x, y, z, w);\n}\nfunction $670b89df6ca628ce$export$88e6ebb4fe54f538(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n var w = b[3] - a[3];\n return x * x + y * y + z * z + w * w;\n}\nfunction $670b89df6ca628ce$export$f24224f1c91d8156(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var w = a[3];\n return Math.hypot(x, y, z, w);\n}\nfunction $670b89df6ca628ce$export$ab44e1323ffc8376(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var w = a[3];\n return x * x + y * y + z * z + w * w;\n}\nfunction $670b89df6ca628ce$export$aef51622e549b8b0(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = -a[3];\n return out;\n}\nfunction $670b89df6ca628ce$export$70ae2c07e401031b(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n out[2] = 1.0 / a[2];\n out[3] = 1.0 / a[3];\n return out;\n}\nfunction $670b89df6ca628ce$export$a3295358bff77e(out, a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var w = a[3];\n var len = x * x + y * y + z * z + w * w;\n if (len > 0) len = 1 / Math.sqrt(len);\n out[0] = x * len;\n out[1] = y * len;\n out[2] = z * len;\n out[3] = w * len;\n return out;\n}\nfunction $670b89df6ca628ce$export$94132a0e348806d4(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];\n}\nfunction $670b89df6ca628ce$export$bb646b20bb93d339(out, u, v, w) {\n var A = v[0] * w[1] - v[1] * w[0], B = v[0] * w[2] - v[2] * w[0], C = v[0] * w[3] - v[3] * w[0], D = v[1] * w[2] - v[2] * w[1], E = v[1] * w[3] - v[3] * w[1], F = v[2] * w[3] - v[3] * w[2];\n var G = u[0];\n var H = u[1];\n var I = u[2];\n var J = u[3];\n out[0] = H * F - I * E + J * D;\n out[1] = -(G * F) + I * C - J * B;\n out[2] = G * E - H * C + J * A;\n out[3] = -(G * D) + H * B - I * A;\n return out;\n}\nfunction $670b89df6ca628ce$export$3a89f8d6f6bf6c9f(out, a, b, t) {\n var ax = a[0];\n var ay = a[1];\n var az = a[2];\n var aw = a[3];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n out[2] = az + t * (b[2] - az);\n out[3] = aw + t * (b[3] - aw);\n return out;\n}\nfunction $670b89df6ca628ce$export$4385e60b38654f68(out, scale) {\n scale = scale || 1.0; // Marsaglia, George. Choosing a Point from the Surface of a\n // Sphere. Ann. Math. Statist. 43 (1972), no. 2, 645--646.\n // http://projecteuclid.org/euclid.aoms/1177692644;\n var v1, v2, v3, v4;\n var s1, s2;\n do {\n v1 = $rqjzO.RANDOM() * 2 - 1;\n v2 = $rqjzO.RANDOM() * 2 - 1;\n s1 = v1 * v1 + v2 * v2;\n }while (s1 >= 1);\n do {\n v3 = $rqjzO.RANDOM() * 2 - 1;\n v4 = $rqjzO.RANDOM() * 2 - 1;\n s2 = v3 * v3 + v4 * v4;\n }while (s2 >= 1);\n var d = Math.sqrt((1 - s1) / s2);\n out[0] = scale * v1;\n out[1] = scale * v2;\n out[2] = scale * v3 * d;\n out[3] = scale * v4 * d;\n return out;\n}\nfunction $670b89df6ca628ce$export$5ffbd13800309d59(out, a, m) {\n var x = a[0], y = a[1], z = a[2], w = a[3];\n out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\n out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\n out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\n out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\n return out;\n}\nfunction $670b89df6ca628ce$export$c32adef9e939ce85(out, a, q) {\n var x = a[0], y = a[1], z = a[2];\n var qx = q[0], qy = q[1], qz = q[2], qw = q[3]; // calculate quat * vec\n var ix = qw * x + qy * z - qz * y;\n var iy = qw * y + qz * x - qx * z;\n var iz = qw * z + qx * y - qy * x;\n var iw = -qx * x - qy * y - qz * z; // calculate result * inverse quat\n out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n out[3] = a[3];\n return out;\n}\nfunction $670b89df6ca628ce$export$7f9972325ebfd559(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n out[2] = 0.0;\n out[3] = 0.0;\n return out;\n}\nfunction $670b89df6ca628ce$export$42d51816ce590c93(a) {\n return \"vec4(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \")\";\n}\nfunction $670b89df6ca628ce$export$f2599a5cf1109d8(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3];\n}\nfunction $670b89df6ca628ce$export$e9bab7fafb253603(a, b) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3];\n var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3];\n return Math.abs(a0 - b0) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3));\n}\nvar $670b89df6ca628ce$export$f93b5905241a7cca = $670b89df6ca628ce$export$4e2d2ead65e5f7e3;\nvar $670b89df6ca628ce$export$6e3a27864ab166fe = $670b89df6ca628ce$export$2060d2db72cce88f;\nvar $670b89df6ca628ce$export$159d9494db57879b = $670b89df6ca628ce$export$cd007d971a5a2143;\nvar $670b89df6ca628ce$export$6c4a311cc157c764 = $670b89df6ca628ce$export$9f17032d917177de;\nvar $670b89df6ca628ce$export$2422cd6c492a8b3a = $670b89df6ca628ce$export$88e6ebb4fe54f538;\nvar $670b89df6ca628ce$export$fc1400facf92c78 = $670b89df6ca628ce$export$f24224f1c91d8156;\nvar $670b89df6ca628ce$export$99d8dd3f32a3435 = $670b89df6ca628ce$export$ab44e1323ffc8376;\nvar $670b89df6ca628ce$export$4b80e395e36b5a56 = function() {\n var vec = $670b89df6ca628ce$export$185802fd694ee1f5();\n return function(a, stride, offset, count, fn, arg) {\n var i, l;\n if (!stride) stride = 4;\n if (!offset) offset = 0;\n if (count) l = Math.min(count * stride + offset, a.length);\n else l = a.length;\n for(i = offset; i < l; i += stride){\n vec[0] = a[i];\n vec[1] = a[i + 1];\n vec[2] = a[i + 2];\n vec[3] = a[i + 3];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n a[i + 2] = vec[2];\n a[i + 3] = vec[3];\n }\n return a;\n };\n}();\n\n});\n\n\nparcelRegister(\"o1WjV\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\nmodule.exports = [\n \"attribute vec3 aVertexPosition;\",\n \"attribute vec2 aTextureCoord;\",\n \"uniform float uDepth;\",\n \"uniform mat4 uViewportMatrix;\",\n \"uniform mat4 uProjMatrix;\",\n \"varying vec2 vTextureCoord;\",\n \"void main(void) {\",\n \" gl_Position = uViewportMatrix * uProjMatrix * vec4(aVertexPosition.xy, 0.0, 1.0);\",\n \" gl_Position.z = uDepth * gl_Position.w;\",\n \" vTextureCoord = aTextureCoord;\",\n \"}\"\n].join(\"\\n\");\n\n});\n\nparcelRegister(\"7d8BE\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\nmodule.exports = [\n \"#ifdef GL_FRAGMENT_PRECISION_HIGH\",\n \"precision highp float;\",\n \"#else\",\n \"precision mediump float;\",\n \"#endif\",\n \"uniform sampler2D uSampler;\",\n \"uniform float uOpacity;\",\n \"uniform vec4 uColorOffset;\",\n \"uniform mat4 uColorMatrix;\",\n \"varying vec2 vTextureCoord;\",\n \"void main(void) {\",\n \" vec4 color = texture2D(uSampler, vTextureCoord) * uColorMatrix + uColorOffset;\",\n \" gl_FragColor = vec4(color.rgba * uOpacity);\",\n \"}\"\n].join(\"\\n\");\n\n});\n\n\n\nparcelRegister(\"6yDfP\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $bKQXE = parcelRequire(\"bKQXE\");\n\nvar $Yar88 = parcelRequire(\"Yar88\");\n/**\n * @class WebGlFlatRenderer\n * @implements Renderer\n * @classdesc\n *\n * A renderer for {@link FlatGeometry} and {@link FlatView}, appropriate for a\n * {@link WebGlStage}.\n *\n * Most users do not need to instantiate this class. Renderers are created and\n * destroyed by {@link Stage} as necessary.\n */ function $4c645e1e9e1de633$var$WebGlFlatRenderer() {\n this.constructor.super_.apply(this, arguments);\n}\n$Yar88($4c645e1e9e1de633$var$WebGlFlatRenderer, $bKQXE);\nmodule.exports = $4c645e1e9e1de633$var$WebGlFlatRenderer;\n\n});\n\nparcelRegister(\"iIThc\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $c3mW8 = parcelRequire(\"c3mW8\");\nvar $da1736cd2fd385ef$require$mat4 = $c3mW8;\n\nvar $2Xxut = parcelRequire(\"2Xxut\");\n\nvar $3KYUN = parcelRequire(\"3KYUN\");\nvar $da1736cd2fd385ef$var$createConstantBuffers = $3KYUN.createConstantBuffers;\nvar $da1736cd2fd385ef$var$destroyConstantBuffers = $3KYUN.destroyConstantBuffers;\nvar $da1736cd2fd385ef$var$createShaderProgram = $3KYUN.createShaderProgram;\nvar $da1736cd2fd385ef$var$destroyShaderProgram = $3KYUN.destroyShaderProgram;\nvar $da1736cd2fd385ef$var$enableAttributes = $3KYUN.enableAttributes;\nvar $da1736cd2fd385ef$var$disableAttributes = $3KYUN.disableAttributes;\nvar $da1736cd2fd385ef$var$setViewport = $3KYUN.setViewport;\nvar $da1736cd2fd385ef$var$setupPixelEffectUniforms = $3KYUN.setupPixelEffectUniforms;\nvar $da1736cd2fd385ef$var$setDepth = $3KYUN.setDepth;\nvar $da1736cd2fd385ef$var$setTexture = $3KYUN.setTexture;\n\nvar $aVswm = parcelRequire(\"aVswm\");\n\nvar $3C2IP = parcelRequire(\"3C2IP\");\nvar $da1736cd2fd385ef$var$vertexIndices = [\n 0,\n 1,\n 2,\n 0,\n 2,\n 3\n];\nvar $da1736cd2fd385ef$var$vertexPositions = [\n -1,\n -1,\n 0.0,\n 1.0,\n -1,\n 0.0,\n 1.0,\n 1.0,\n 0.0,\n -1,\n 1.0,\n 0.0\n];\nvar $da1736cd2fd385ef$var$textureCoords = [\n 0.0,\n 0.0,\n 1.0,\n 0.0,\n 1.0,\n 1.0,\n 0.0,\n 1.0\n];\nvar $da1736cd2fd385ef$var$attribList = [\n \"aVertexPosition\"\n];\nvar $da1736cd2fd385ef$var$uniformList = [\n \"uDepth\",\n \"uOpacity\",\n \"uSampler\",\n \"uInvProjMatrix\",\n \"uViewportMatrix\",\n \"uColorOffset\",\n \"uColorMatrix\",\n \"uTextureX\",\n \"uTextureY\",\n \"uTextureWidth\",\n \"uTextureHeight\"\n];\n/**\n * @class WebGlEquirectRenderer\n * @implements Renderer\n * @classdesc\n *\n * A renderer for {@link EquirectGeometry} and {@link RectilinearView},\n * appropriate for {@link WebGlStage}.\n *\n * Most users do not need to instantiate this class. Renderers are created and\n * destroyed by {@link Stage} as necessary.\n */ function $da1736cd2fd385ef$var$WebGlEquirectRenderer(gl) {\n this.gl = gl;\n // The inverse projection matrix.\n this.invProjMatrix = $da1736cd2fd385ef$require$mat4.create();\n // The viewport matrix responsible for viewport clamping.\n // See setViewport() for an explanation of how it works.\n this.viewportMatrix = $da1736cd2fd385ef$require$mat4.create();\n this.constantBuffers = $da1736cd2fd385ef$var$createConstantBuffers(gl, $da1736cd2fd385ef$var$vertexIndices, $da1736cd2fd385ef$var$vertexPositions, $da1736cd2fd385ef$var$textureCoords);\n this.shaderProgram = $da1736cd2fd385ef$var$createShaderProgram(gl, $aVswm, $3C2IP, $da1736cd2fd385ef$var$attribList, $da1736cd2fd385ef$var$uniformList);\n}\n$da1736cd2fd385ef$var$WebGlEquirectRenderer.prototype.destroy = function() {\n $da1736cd2fd385ef$var$destroyConstantBuffers(this.gl, this.constantBuffers);\n $da1736cd2fd385ef$var$destroyShaderProgram(this.gl, this.shaderProgram);\n $2Xxut(this);\n};\n$da1736cd2fd385ef$var$WebGlEquirectRenderer.prototype.startLayer = function(layer, rect) {\n var gl = this.gl;\n var shaderProgram = this.shaderProgram;\n var constantBuffers = this.constantBuffers;\n var invProjMatrix = this.invProjMatrix;\n var viewportMatrix = this.viewportMatrix;\n gl.useProgram(shaderProgram);\n $da1736cd2fd385ef$var$enableAttributes(gl, shaderProgram);\n $da1736cd2fd385ef$var$setViewport(gl, layer, rect, viewportMatrix);\n gl.uniformMatrix4fv(shaderProgram.uViewportMatrix, false, viewportMatrix);\n gl.bindBuffer(gl.ARRAY_BUFFER, constantBuffers.vertexPositions);\n gl.vertexAttribPointer(shaderProgram.aVertexPosition, 3, gl.FLOAT, gl.FALSE, 0, 0);\n gl.bindBuffer(gl.ARRAY_BUFFER, constantBuffers.textureCoords);\n // Compute and set the inverse projection matrix.\n $da1736cd2fd385ef$require$mat4.copy(invProjMatrix, layer.view().projection());\n $da1736cd2fd385ef$require$mat4.invert(invProjMatrix, invProjMatrix);\n gl.uniformMatrix4fv(shaderProgram.uInvProjMatrix, false, invProjMatrix);\n // Compute and set the texture scale and crop offsets.\n var textureCrop = layer.effects().textureCrop || {};\n var textureX = textureCrop.x != null ? textureCrop.x : 0;\n var textureY = textureCrop.y != null ? textureCrop.y : 0;\n var textureWidth = textureCrop.width != null ? textureCrop.width : 1;\n var textureHeight = textureCrop.height != null ? textureCrop.height : 1;\n gl.uniform1f(shaderProgram.uTextureX, textureX);\n gl.uniform1f(shaderProgram.uTextureY, textureY);\n gl.uniform1f(shaderProgram.uTextureWidth, textureWidth);\n gl.uniform1f(shaderProgram.uTextureHeight, textureHeight);\n $da1736cd2fd385ef$var$setupPixelEffectUniforms(gl, layer.effects(), {\n opacity: shaderProgram.uOpacity,\n colorOffset: shaderProgram.uColorOffset,\n colorMatrix: shaderProgram.uColorMatrix\n });\n};\n$da1736cd2fd385ef$var$WebGlEquirectRenderer.prototype.endLayer = function(layer, rect) {\n var gl = this.gl;\n var shaderProgram = this.shaderProgram;\n $da1736cd2fd385ef$var$disableAttributes(gl, shaderProgram);\n};\n$da1736cd2fd385ef$var$WebGlEquirectRenderer.prototype.renderTile = function(tile, texture, layer, layerZ) {\n var gl = this.gl;\n var shaderProgram = this.shaderProgram;\n var constantBuffers = this.constantBuffers;\n $da1736cd2fd385ef$var$setDepth(gl, shaderProgram, layerZ, tile.z);\n $da1736cd2fd385ef$var$setTexture(gl, shaderProgram, texture);\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, constantBuffers.vertexIndices);\n gl.drawElements(gl.TRIANGLES, $da1736cd2fd385ef$var$vertexIndices.length, gl.UNSIGNED_SHORT, 0);\n};\nmodule.exports = $da1736cd2fd385ef$var$WebGlEquirectRenderer;\n\n});\nparcelRegister(\"aVswm\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\nmodule.exports = [\n \"attribute vec3 aVertexPosition;\",\n \"uniform float uDepth;\",\n \"uniform mat4 uViewportMatrix;\",\n \"uniform mat4 uInvProjMatrix;\",\n \"varying vec4 vRay;\",\n \"void main(void) {\",\n \" vRay = uInvProjMatrix * vec4(aVertexPosition.xy, 1.0, 1.0);\",\n \" gl_Position = uViewportMatrix * vec4(aVertexPosition.xy, uDepth, 1.0);\",\n \"}\"\n].join(\"\\n\");\n\n});\n\nparcelRegister(\"3C2IP\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\nmodule.exports = [\n \"#ifdef GL_FRAGMENT_PRECISION_HIGH\",\n \"precision highp float;\",\n \"#else\",\n \"precision mediump float\",\n \"#endif\",\n \"uniform sampler2D uSampler;\",\n \"uniform float uOpacity;\",\n \"uniform float uTextureX;\",\n \"uniform float uTextureY;\",\n \"uniform float uTextureWidth;\",\n \"uniform float uTextureHeight;\",\n \"uniform vec4 uColorOffset;\",\n \"uniform mat4 uColorMatrix;\",\n \"varying vec4 vRay;\",\n \"const float PI = 3.14159265358979323846264;\",\n \"void main(void) {\",\n \" float r = inversesqrt(vRay.x * vRay.x + vRay.y * vRay.y + vRay.z * vRay.z);\",\n \" float phi = acos(vRay.y * r);\",\n \" float theta = atan(vRay.x, -1.0*vRay.z);\",\n \" float s = 0.5 + 0.5 * theta / PI;\",\n \" float t = 1.0 - phi / PI;\",\n \" s = s * uTextureWidth + uTextureX;\",\n \" t = t * uTextureHeight + uTextureY;\",\n \" vec4 color = texture2D(uSampler, vec2(s, t)) * uColorMatrix + uColorOffset;\",\n \" gl_FragColor = vec4(color.rgba * uOpacity);\",\n \"}\"\n].join(\"\\n\");\n\n});\n\n\nparcelRegister(\"48tXO\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $4QGnk = parcelRequire(\"4QGnk\");\nvar $302f26ecbc1518d9$require$CubeTile = $4QGnk.Tile;\n\nvar $iv3ES = parcelRequire(\"iv3ES\");\n\nvar $asoyN = parcelRequire(\"asoyN\");\n\nvar $Yar88 = parcelRequire(\"Yar88\");\n/**\n * @class CssCubeRenderer\n * @implements Renderer\n * @classdesc\n *\n * A renderer for {@link CubeGeometry} and {@link RectilinearView}, appropriate\n * for a {@link CssStage}.\n *\n * Most users do not need to instantiate this class. Renderers are created and\n * destroyed by {@link Stage} as necessary.\n */ function $302f26ecbc1518d9$var$CssCubeRenderer(root, quirks) {\n this.constructor.super_.call(this, root, quirks, $302f26ecbc1518d9$require$CubeTile);\n}\n$Yar88($302f26ecbc1518d9$var$CssCubeRenderer, $iv3ES);\n$302f26ecbc1518d9$var$CssCubeRenderer.prototype.calculateTransform = function(tile, texture, view) {\n var padSize = this._browserQuirks.padSize;\n var reverseLevelDepth = this._browserQuirks.reverseLevelDepth;\n var perspectiveNudge = this._browserQuirks.perspectiveNudge;\n var transform = \"\";\n // Calculate the cube size for this level.\n var cubeSize = reverseLevelDepth ? 256 - tile.z : tile.levelWidth();\n // Place top left corner of tile at viewport center to serve as the center\n // of rotation.\n // We do not rotate about the center of the tile because, for some mysterious\n // reason, this seems to occasionally crash Chrome.\n var size = view.size();\n var viewportWidth = size.width;\n var viewportHeight = size.height;\n transform += \"translate3d(\" + $asoyN(viewportWidth / 2) + \"px, \" + $asoyN(viewportHeight / 2) + \"px, 0px) \";\n // Set the perspective depth.\n var perspective = 0.5 * viewportHeight / Math.tan(view.fov() / 2);\n var distance = perspective + perspectiveNudge;\n transform += \"perspective(\" + $asoyN(perspective) + \"px) translateZ(\" + $asoyN(distance) + \"px) \";\n // Set the camera rotation.\n var viewRotZ = -view.roll();\n var viewRotX = -view.pitch();\n var viewRotY = view.yaw();\n transform += \"rotateZ(\" + $asoyN(viewRotZ) + \"rad) rotateX(\" + $asoyN(viewRotX) + \"rad) rotateY(\" + $asoyN(viewRotY) + \"rad) \";\n // Set the cube face orientation.\n var tileRotX = -tile.rotX();\n var tileRotY = tile.rotY();\n transform += \"rotateX(\" + $asoyN(tileRotX) + \"rad) rotateY(\" + $asoyN(tileRotY) + \"rad) \";\n // Move tile into its position within the cube face.\n var cornerX = tile.centerX() - tile.scaleX() / 2;\n var cornerY = -(tile.centerY() + tile.scaleY() / 2);\n var translX = cornerX * cubeSize;\n var translY = cornerY * cubeSize;\n var translZ = -cubeSize / 2;\n transform += \"translate3d(\" + $asoyN(translX) + \"px, \" + $asoyN(translY) + \"px, \" + $asoyN(translZ) + \"px) \";\n // Scale tile into correct size.\n if (reverseLevelDepth) {\n var scaleX = cubeSize * tile.scaleX() / tile.width();\n var scaleY = cubeSize * tile.scaleY() / tile.height();\n transform += \"scale(\" + $asoyN(scaleX) + \", \" + $asoyN(scaleY) + \") \";\n }\n // Compensate for padding around the tile.\n var padLeft = tile.padLeft() ? padSize : 0;\n var padTop = tile.padTop() ? padSize : 0;\n if (padLeft !== 0 || padTop !== 0) transform += \"translate3d(\" + $asoyN(-padLeft) + \"px, \" + $asoyN(-padTop) + \"px, 0) \";\n return transform;\n};\nmodule.exports = $302f26ecbc1518d9$var$CssCubeRenderer;\n\n});\nparcelRegister(\"4QGnk\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $Yar88 = parcelRequire(\"Yar88\");\n\nvar $4j7qz = parcelRequire(\"4j7qz\");\n\nvar $1tXVZ = parcelRequire(\"1tXVZ\");\n\nvar $dW5wO = parcelRequire(\"dW5wO\");\n\nvar $4tCa7 = parcelRequire(\"4tCa7\");\n\nvar $4rFjs = parcelRequire(\"4rFjs\");\nvar $387ce39a02ed0988$require$makeLevelList = $4rFjs.makeLevelList;\n\nvar $4rFjs = parcelRequire(\"4rFjs\");\nvar $387ce39a02ed0988$require$makeSelectableLevelList = $4rFjs.makeSelectableLevelList;\n\nvar $eCQUD = parcelRequire(\"eCQUD\");\n\nvar $3nhrd = parcelRequire(\"3nhrd\");\n\nvar $fXp6t = parcelRequire(\"fXp6t\");\n\nvar $fwwPx = parcelRequire(\"fwwPx\");\nvar $8QvoZ = parcelRequire(\"8QvoZ\");\nvar $387ce39a02ed0988$require$vec3 = $fwwPx;\n\nvar $fwwPx = parcelRequire(\"fwwPx\");\nvar $8QvoZ = parcelRequire(\"8QvoZ\");\nvar $387ce39a02ed0988$require$vec4 = $8QvoZ;\nvar $387ce39a02ed0988$var$neighborsCacheSize = 64;\n// Some renderer implementations require tiles to be padded around with\n// repeated pixels to prevent the appearance of visible seams between tiles.\n//\n// In order to prevent the padding from being visible, the tiles must be\n// padded and stacked such that the padding on one of the sides, when present,\n// stacks below the neighboring tile on that side.\n//\n// The padding rules are as follows:\n// * Define a tile to be X-marginal if it contacts the X-edge of its cube face.\n// * Pad top if the tile is top-marginal and the face is F or U.\n// * Pad bottom unless the tile is bottom-marginal or the face is F or D.\n// * Pad left if the tile is left-marginal and the face is F, L, U or D.\n// * Pad right unless the tile is right-marginal or the face is F, R, U or D.\n//\n// The stacking rules are as follows:\n// * Within an image, stack smaller zoom levels below larger zoom levels.\n// * Within a level, stack tiles bottom to top in FUDLRB face order.\n// * Within a face, stack tiles bottom to top in ascending Y coordinate order.\n// * Within a row, stack tiles bottom to top in ascending X coordinate order.\n//\n// Crucially, these rules affect the implementation of the tile cmp() method,\n// which determines the stacking order, and of the pad*() tile methods, which\n// determine the amount of padding on each of the four sides of a tile.\n// Initials for cube faces in stacking order.\nvar $387ce39a02ed0988$var$faceList = \"fudlrb\";\n// Rotation of each face, relative to the front face.\nvar $387ce39a02ed0988$var$faceRotation = {\n f: {\n x: 0,\n y: 0\n },\n b: {\n x: 0,\n y: Math.PI\n },\n l: {\n x: 0,\n y: Math.PI / 2\n },\n r: {\n x: 0,\n y: -Math.PI / 2\n },\n u: {\n x: Math.PI / 2,\n y: 0\n },\n d: {\n x: -Math.PI / 2,\n y: 0\n }\n};\n// Zero vector.\nvar $387ce39a02ed0988$var$origin = $387ce39a02ed0988$require$vec3.create();\n// Rotate a vector in ZXY order.\nfunction $387ce39a02ed0988$var$rotateVector(vec, z, x, y) {\n if (z) $387ce39a02ed0988$require$vec3.rotateZ(vec, vec, $387ce39a02ed0988$var$origin, z);\n if (x) $387ce39a02ed0988$require$vec3.rotateX(vec, vec, $387ce39a02ed0988$var$origin, x);\n if (y) $387ce39a02ed0988$require$vec3.rotateY(vec, vec, $387ce39a02ed0988$var$origin, y);\n}\n// Normalized vectors pointing to the center of each face.\nvar $387ce39a02ed0988$var$faceVectors = {};\nfor(var $387ce39a02ed0988$var$i = 0; $387ce39a02ed0988$var$i < $387ce39a02ed0988$var$faceList.length; $387ce39a02ed0988$var$i++){\n var $387ce39a02ed0988$var$face = $387ce39a02ed0988$var$faceList[$387ce39a02ed0988$var$i];\n var $387ce39a02ed0988$var$rotation = $387ce39a02ed0988$var$faceRotation[$387ce39a02ed0988$var$face];\n var $387ce39a02ed0988$var$v = $387ce39a02ed0988$require$vec3.fromValues(0, 0, -1);\n $387ce39a02ed0988$var$rotateVector($387ce39a02ed0988$var$v, 0, $387ce39a02ed0988$var$rotation.x, $387ce39a02ed0988$var$rotation.y);\n $387ce39a02ed0988$var$faceVectors[$387ce39a02ed0988$var$face] = $387ce39a02ed0988$var$v;\n}\n// Map each face to its adjacent faces.\n// The order is as suggested by the front face.\nvar $387ce39a02ed0988$var$adjacentFace = {\n f: [\n \"l\",\n \"r\",\n \"u\",\n \"d\"\n ],\n b: [\n \"r\",\n \"l\",\n \"u\",\n \"d\"\n ],\n l: [\n \"b\",\n \"f\",\n \"u\",\n \"d\"\n ],\n r: [\n \"f\",\n \"b\",\n \"u\",\n \"d\"\n ],\n u: [\n \"l\",\n \"r\",\n \"b\",\n \"f\"\n ],\n d: [\n \"l\",\n \"r\",\n \"f\",\n \"b\"\n ]\n};\n// Offsets to apply to the (x,y) coordinates of a tile to get its neighbors.\nvar $387ce39a02ed0988$var$neighborOffsets = [\n [\n 0,\n 1\n ],\n [\n 1,\n 0\n ],\n [\n 0,\n -1\n ],\n [\n -1,\n 0\n ] // left\n];\n/**\n * @class CubeTile\n * @implements Tile\n * @classdesc\n *\n * A tile in a @{CubeGeometry}.\n */ function $387ce39a02ed0988$var$CubeTile(face, x, y, z, geometry) {\n this.face = face;\n this.x = x;\n this.y = y;\n this.z = z;\n this._geometry = geometry;\n this._level = geometry.levelList[z];\n}\n$387ce39a02ed0988$var$CubeTile.prototype.rotX = function() {\n return $387ce39a02ed0988$var$faceRotation[this.face].x;\n};\n$387ce39a02ed0988$var$CubeTile.prototype.rotY = function() {\n return $387ce39a02ed0988$var$faceRotation[this.face].y;\n};\n$387ce39a02ed0988$var$CubeTile.prototype.centerX = function() {\n return (this.x + 0.5) / this._level.numHorizontalTiles() - 0.5;\n};\n$387ce39a02ed0988$var$CubeTile.prototype.centerY = function() {\n return 0.5 - (this.y + 0.5) / this._level.numVerticalTiles();\n};\n$387ce39a02ed0988$var$CubeTile.prototype.scaleX = function() {\n return 1 / this._level.numHorizontalTiles();\n};\n$387ce39a02ed0988$var$CubeTile.prototype.scaleY = function() {\n return 1 / this._level.numVerticalTiles();\n};\n$387ce39a02ed0988$var$CubeTile.prototype.width = function() {\n return this._level.tileWidth();\n};\n$387ce39a02ed0988$var$CubeTile.prototype.height = function() {\n return this._level.tileHeight();\n};\n$387ce39a02ed0988$var$CubeTile.prototype.levelWidth = function() {\n return this._level.width();\n};\n$387ce39a02ed0988$var$CubeTile.prototype.levelHeight = function() {\n return this._level.height();\n};\n$387ce39a02ed0988$var$CubeTile.prototype.atTopLevel = function() {\n return this.z === 0;\n};\n$387ce39a02ed0988$var$CubeTile.prototype.atBottomLevel = function() {\n return this.z === this._geometry.levelList.length - 1;\n};\n$387ce39a02ed0988$var$CubeTile.prototype.atTopEdge = function() {\n return this.y === 0;\n};\n$387ce39a02ed0988$var$CubeTile.prototype.atBottomEdge = function() {\n return this.y === this._level.numVerticalTiles() - 1;\n};\n$387ce39a02ed0988$var$CubeTile.prototype.atLeftEdge = function() {\n return this.x === 0;\n};\n$387ce39a02ed0988$var$CubeTile.prototype.atRightEdge = function() {\n return this.x === this._level.numHorizontalTiles() - 1;\n};\n$387ce39a02ed0988$var$CubeTile.prototype.padTop = function() {\n return this.atTopEdge() && /[fu]/.test(this.face);\n};\n$387ce39a02ed0988$var$CubeTile.prototype.padBottom = function() {\n return !this.atBottomEdge() || /[fd]/.test(this.face);\n};\n$387ce39a02ed0988$var$CubeTile.prototype.padLeft = function() {\n return this.atLeftEdge() && /[flud]/.test(this.face);\n};\n$387ce39a02ed0988$var$CubeTile.prototype.padRight = function() {\n return !this.atRightEdge() || /[frud]/.test(this.face);\n};\n$387ce39a02ed0988$var$CubeTile.prototype.vertices = function(result) {\n if (!result) result = [\n $387ce39a02ed0988$require$vec3.create(),\n $387ce39a02ed0988$require$vec3.create(),\n $387ce39a02ed0988$require$vec3.create(),\n $387ce39a02ed0988$require$vec3.create()\n ];\n var rot = $387ce39a02ed0988$var$faceRotation[this.face];\n function makeVertex(vec, x, y) {\n $387ce39a02ed0988$require$vec3.set(vec, x, y, -0.5);\n $387ce39a02ed0988$var$rotateVector(vec, 0, rot.x, rot.y);\n }\n var left = this.centerX() - this.scaleX() / 2;\n var right = this.centerX() + this.scaleX() / 2;\n var bottom = this.centerY() - this.scaleY() / 2;\n var top = this.centerY() + this.scaleY() / 2;\n makeVertex(result[0], left, top);\n makeVertex(result[1], right, top);\n makeVertex(result[2], right, bottom);\n makeVertex(result[3], left, bottom);\n return result;\n};\n$387ce39a02ed0988$var$CubeTile.prototype.parent = function() {\n if (this.atTopLevel()) return null;\n var face = this.face;\n var z = this.z;\n var x = this.x;\n var y = this.y;\n var geometry = this._geometry;\n var level = geometry.levelList[z];\n var parentLevel = geometry.levelList[z - 1];\n var tileX = Math.floor(x / level.numHorizontalTiles() * parentLevel.numHorizontalTiles());\n var tileY = Math.floor(y / level.numVerticalTiles() * parentLevel.numVerticalTiles());\n var tileZ = z - 1;\n return new $387ce39a02ed0988$var$CubeTile(face, tileX, tileY, tileZ, geometry);\n};\n$387ce39a02ed0988$var$CubeTile.prototype.children = function(result) {\n if (this.atBottomLevel()) return null;\n var face = this.face;\n var z = this.z;\n var x = this.x;\n var y = this.y;\n var geometry = this._geometry;\n var level = geometry.levelList[z];\n var childLevel = geometry.levelList[z + 1];\n var nHoriz = childLevel.numHorizontalTiles() / level.numHorizontalTiles();\n var nVert = childLevel.numVerticalTiles() / level.numVerticalTiles();\n result = result || [];\n for(var h = 0; h < nHoriz; h++)for(var v = 0; v < nVert; v++){\n var tileX = nHoriz * x + h;\n var tileY = nVert * y + v;\n var tileZ = z + 1;\n result.push(new $387ce39a02ed0988$var$CubeTile(face, tileX, tileY, tileZ, geometry));\n }\n return result;\n};\n$387ce39a02ed0988$var$CubeTile.prototype.neighbors = function() {\n var geometry = this._geometry;\n var cache = geometry._neighborsCache;\n // Satisfy from cache when available.\n var cachedResult = cache.get(this);\n if (cachedResult) return cachedResult;\n var vec = geometry._vec;\n var face = this.face;\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var level = this._level;\n var numX = level.numHorizontalTiles();\n var numY = level.numVerticalTiles();\n var result = [];\n for(var i = 0; i < $387ce39a02ed0988$var$neighborOffsets.length; i++){\n var xOffset = $387ce39a02ed0988$var$neighborOffsets[i][0];\n var yOffset = $387ce39a02ed0988$var$neighborOffsets[i][1];\n var newX = x + xOffset;\n var newY = y + yOffset;\n var newZ = z;\n var newFace = face;\n if (newX < 0 || newX >= numX || newY < 0 || newY >= numY) {\n // If the neighboring tile belongs to a different face, calculate a\n // vector pointing to the edge between the two faces at the point the\n // tile and its neighbor meet, and convert it into tile coordinates for\n // the neighboring face.\n var xCoord = this.centerX();\n var yCoord = this.centerY();\n // First, calculate the vector as if the initial tile belongs to the\n // front face, so that the tile x,y coordinates map directly into the\n // x,y axes.\n if (newX < 0) {\n $387ce39a02ed0988$require$vec3.set(vec, -0.5, yCoord, -0.5);\n newFace = $387ce39a02ed0988$var$adjacentFace[face][0];\n } else if (newX >= numX) {\n $387ce39a02ed0988$require$vec3.set(vec, 0.5, yCoord, -0.5);\n newFace = $387ce39a02ed0988$var$adjacentFace[face][1];\n } else if (newY < 0) {\n $387ce39a02ed0988$require$vec3.set(vec, xCoord, 0.5, -0.5);\n newFace = $387ce39a02ed0988$var$adjacentFace[face][2];\n } else if (newY >= numY) {\n $387ce39a02ed0988$require$vec3.set(vec, xCoord, -0.5, -0.5);\n newFace = $387ce39a02ed0988$var$adjacentFace[face][3];\n }\n var rot;\n // Then, rotate the vector into the actual face the initial tile\n // belongs to.\n rot = $387ce39a02ed0988$var$faceRotation[face];\n $387ce39a02ed0988$var$rotateVector(vec, 0, rot.x, rot.y);\n // Finally, rotate the vector from the neighboring face into the front\n // face. Again, this is so that the neighboring tile x,y coordinates\n // map directly into the x,y axes.\n rot = $387ce39a02ed0988$var$faceRotation[newFace];\n $387ce39a02ed0988$var$rotateVector(vec, 0, -rot.x, -rot.y);\n // Calculate the neighboring tile coordinates.\n newX = $eCQUD(Math.floor((0.5 + vec[0]) * numX), 0, numX - 1);\n newY = $eCQUD(Math.floor((0.5 - vec[1]) * numY), 0, numY - 1);\n }\n result.push(new $387ce39a02ed0988$var$CubeTile(newFace, newX, newY, newZ, geometry));\n }\n // Store into cache to satisfy future requests.\n cache.set(this, result);\n return result;\n};\n$387ce39a02ed0988$var$CubeTile.prototype.hash = function() {\n return $4j7qz($387ce39a02ed0988$var$faceList.indexOf(this.face), this.z, this.y, this.x);\n};\n$387ce39a02ed0988$var$CubeTile.prototype.equals = function(that) {\n return this.geometry === that.geometry && this.face === that.face && this.z === that.z && this.y === that.y && this.x === that.x;\n};\n$387ce39a02ed0988$var$CubeTile.prototype.cmp = function(that) {\n return $3nhrd(this.z, that.z) || $3nhrd($387ce39a02ed0988$var$faceList.indexOf(this.face), $387ce39a02ed0988$var$faceList.indexOf(that.face)) || $3nhrd(this.y, that.y) || $3nhrd(this.x, that.x);\n};\n$387ce39a02ed0988$var$CubeTile.prototype.str = function() {\n return \"CubeTile(\" + tile.face + \", \" + tile.x + \", \" + tile.y + \", \" + tile.z + \")\";\n};\nfunction $387ce39a02ed0988$var$CubeLevel(levelProperties) {\n this.constructor.super_.call(this, levelProperties);\n this._size = levelProperties.size;\n this._tileSize = levelProperties.tileSize;\n if (this._size % this._tileSize !== 0) throw new Error(\"Level size is not multiple of tile size: \" + this._size + \" \" + this._tileSize);\n}\n$Yar88($387ce39a02ed0988$var$CubeLevel, $4tCa7);\n$387ce39a02ed0988$var$CubeLevel.prototype.width = function() {\n return this._size;\n};\n$387ce39a02ed0988$var$CubeLevel.prototype.height = function() {\n return this._size;\n};\n$387ce39a02ed0988$var$CubeLevel.prototype.tileWidth = function() {\n return this._tileSize;\n};\n$387ce39a02ed0988$var$CubeLevel.prototype.tileHeight = function() {\n return this._tileSize;\n};\n$387ce39a02ed0988$var$CubeLevel.prototype._validateWithParentLevel = function(parentLevel) {\n var width = this.width();\n var height = this.height();\n var tileWidth = this.tileWidth();\n var tileHeight = this.tileHeight();\n var numHorizontal = this.numHorizontalTiles();\n var numVertical = this.numVerticalTiles();\n var parentWidth = parentLevel.width();\n var parentHeight = parentLevel.height();\n var parentTileWidth = parentLevel.tileWidth();\n var parentTileHeight = parentLevel.tileHeight();\n var parentNumHorizontal = parentLevel.numHorizontalTiles();\n var parentNumVertical = parentLevel.numVerticalTiles();\n if (width % parentWidth !== 0) throw new Error(\"Level width must be multiple of parent level: \" + width + \" vs. \" + parentWidth);\n if (height % parentHeight !== 0) throw new Error(\"Level height must be multiple of parent level: \" + height + \" vs. \" + parentHeight);\n if (numHorizontal % parentNumHorizontal !== 0) throw new Error(\"Number of horizontal tiles must be multiple of parent level: \" + numHorizontal + \" (\" + width + \"/\" + tileWidth + \")\" + \" vs. \" + parentNumHorizontal + \" (\" + parentWidth + \"/\" + parentTileWidth + \")\");\n if (numVertical % parentNumVertical !== 0) throw new Error(\"Number of vertical tiles must be multiple of parent level: \" + numVertical + \" (\" + height + \"/\" + tileHeight + \")\" + \" vs. \" + parentNumVertical + \" (\" + parentHeight + \"/\" + parentTileHeight + \")\");\n};\n/**\n * @class CubeGeometry\n * @implements Geometry\n * @classdesc\n *\n * A {@link Geometry} implementation suitable for tiled cube images with\n * multiple resolution levels.\n *\n * The following restrictions apply:\n * - All tiles in a level must be square and form a rectangular grid;\n * - The size of a level must be a multiple of the tile size;\n * - The size of a level must be a multiple of the parent level size;\n * - The number of tiles in a level must be a multiple of the number of tiles\n * in the parent level.\n *\n * @param {Object[]} levelPropertiesList Level description\n * @param {number} levelPropertiesList[].size Cube face size in pixels\n * @param {number} levelPropertiesList[].tileSize Tile size in pixels\n */ function $387ce39a02ed0988$var$CubeGeometry(levelPropertiesList) {\n if ($fXp6t(levelPropertiesList) !== \"array\") throw new Error(\"Level list must be an array\");\n this.levelList = $387ce39a02ed0988$require$makeLevelList(levelPropertiesList, $387ce39a02ed0988$var$CubeLevel);\n this.selectableLevelList = $387ce39a02ed0988$require$makeSelectableLevelList(this.levelList);\n for(var i = 1; i < this.levelList.length; i++)this.levelList[i]._validateWithParentLevel(this.levelList[i - 1]);\n this._tileSearcher = new $1tXVZ(this);\n this._neighborsCache = new $dW5wO($387ce39a02ed0988$var$neighborsCacheSize);\n this._vec = $387ce39a02ed0988$require$vec4.create();\n this._viewSize = {};\n}\n$387ce39a02ed0988$var$CubeGeometry.prototype.maxTileSize = function() {\n var maxTileSize = 0;\n for(var i = 0; i < this.levelList.length; i++){\n var level = this.levelList[i];\n maxTileSize = Math.max(maxTileSize, level.tileWidth, level.tileHeight);\n }\n return maxTileSize;\n};\n$387ce39a02ed0988$var$CubeGeometry.prototype.levelTiles = function(level, result) {\n var levelIndex = this.levelList.indexOf(level);\n var maxX = level.numHorizontalTiles() - 1;\n var maxY = level.numVerticalTiles() - 1;\n result = result || [];\n for(var f = 0; f < $387ce39a02ed0988$var$faceList.length; f++){\n var face = $387ce39a02ed0988$var$faceList[f];\n for(var x = 0; x <= maxX; x++)for(var y = 0; y <= maxY; y++)result.push(new $387ce39a02ed0988$var$CubeTile(face, x, y, levelIndex, this));\n }\n return result;\n};\n$387ce39a02ed0988$var$CubeGeometry.prototype._closestTile = function(view, level) {\n var ray = this._vec;\n // Compute a view ray into the central screen point.\n $387ce39a02ed0988$require$vec4.set(ray, 0, 0, 1, 1);\n $387ce39a02ed0988$require$vec4.transformMat4(ray, ray, view.inverseProjection());\n var minAngle = Infinity;\n var closestFace = null;\n // Find the face whose vector makes a minimal angle with the view ray.\n // This is the face into which the view ray points.\n for(var face in $387ce39a02ed0988$var$faceVectors){\n var vector = $387ce39a02ed0988$var$faceVectors[face];\n // For a small angle between two normalized vectors, angle ~ 1-cos(angle).\n var angle = 1 - $387ce39a02ed0988$require$vec3.dot(vector, ray);\n if (angle < minAngle) {\n minAngle = angle;\n closestFace = face;\n }\n }\n // Project view ray onto cube, i.e., normalize the coordinate with\n // largest absolute value to ±0.5.\n var max = Math.max(Math.abs(ray[0]), Math.abs(ray[1]), Math.abs(ray[2])) / 0.5;\n for(var i = 0; i < 3; i++)ray[i] = ray[i] / max;\n // Rotate view ray into front face.\n var rot = $387ce39a02ed0988$var$faceRotation[closestFace];\n $387ce39a02ed0988$var$rotateVector(ray, 0, -rot.x, -rot.y);\n // Get the desired zoom level.\n var tileZ = this.levelList.indexOf(level);\n var numX = level.numHorizontalTiles();\n var numY = level.numVerticalTiles();\n // Find the coordinates of the tile that the view ray points into.\n var tileX = $eCQUD(Math.floor((0.5 + ray[0]) * numX), 0, numX - 1);\n var tileY = $eCQUD(Math.floor((0.5 - ray[1]) * numY), 0, numY - 1);\n return new $387ce39a02ed0988$var$CubeTile(closestFace, tileX, tileY, tileZ, this);\n};\n$387ce39a02ed0988$var$CubeGeometry.prototype.visibleTiles = function(view, level, result) {\n var viewSize = this._viewSize;\n var tileSearcher = this._tileSearcher;\n result = result || [];\n view.size(viewSize);\n if (viewSize.width === 0 || viewSize.height === 0) // No tiles are visible if the viewport is empty.\n return result;\n var startingTile = this._closestTile(view, level);\n var count = tileSearcher.search(view, startingTile, result);\n if (!count) throw new Error(\"Starting tile is not visible\");\n return result;\n};\n$387ce39a02ed0988$var$CubeGeometry.Tile = $387ce39a02ed0988$var$CubeGeometry.prototype.Tile = $387ce39a02ed0988$var$CubeTile;\n$387ce39a02ed0988$var$CubeGeometry.type = $387ce39a02ed0988$var$CubeGeometry.prototype.type = \"cube\";\n$387ce39a02ed0988$var$CubeTile.type = $387ce39a02ed0988$var$CubeTile.prototype.type = \"cube\";\nmodule.exports = $387ce39a02ed0988$var$CubeGeometry;\n\n});\nparcelRegister(\"4j7qz\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n// Jenkins one-at-a-time hash\n// http://www.burtleburtle.net/bob/hash/doobs.html\n// Input: an array of integers\n// Output: an integer\nfunction $322eb2c0f4220044$var$hash() {\n var h = 0;\n for(var i = 0; i < arguments.length; i++){\n var k = arguments[i];\n h += k;\n h += k << 10;\n h ^= k >> 6;\n }\n h += h << 3;\n h ^= h >> 11;\n h += h << 15;\n return h >= 0 ? h : -h;\n}\nmodule.exports = $322eb2c0f4220044$var$hash;\n\n});\n\nparcelRegister(\"1tXVZ\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $fio2g = parcelRequire(\"fio2g\");\n/**\n * @class TileSearcher\n * @classdesc\n *\n * A TileSearcher performs searches for visible tiles.\n */ function $1146fd93dd0182e7$var$TileSearcher() {\n // Stack of tiles to be explored.\n this._stack = [];\n // Set of already explored tiles.\n this._visited = new $fio2g();\n // Tile vertices. Allocated by Tile#vertices on first use.\n this._vertices = null;\n}\n/**\n * Performs a search for visible tiles by starting at a given tile and\n * recursively exploring neighbors until no more visible tiles are found.\n *\n * @param {View} view The view used to deem whether a tile is visible.\n * @param {Tile} tile The starting tile.\n * @param {Tile[]} result An array to append the visible tiles to, including the\n * starting tile when visible. Existing array members are preserved.\n * @return {number} The number of visible tiles found.\n */ $1146fd93dd0182e7$var$TileSearcher.prototype.search = function(view, startingTile, result) {\n var stack = this._stack;\n var visited = this._visited;\n var vertices = this._vertices;\n var count = 0;\n // Clear internal state.\n this._clear();\n stack.push(startingTile);\n while(stack.length > 0){\n var tile = stack.pop();\n if (visited.has(tile)) continue;\n if (!view.intersects(tile.vertices(vertices))) continue;\n // Mark tile as visited.\n visited.add(tile);\n // Add neighbors to the stack of tiles to explore.\n var neighbors = tile.neighbors();\n for(var i = 0; i < neighbors.length; i++)stack.push(neighbors[i]);\n // Add to result.\n result.push(tile);\n count++;\n }\n // Reuse the vertices array in future searches.\n this._vertices = vertices;\n // Clear internal state.\n this._clear();\n return count;\n};\n$1146fd93dd0182e7$var$TileSearcher.prototype._clear = function() {\n this._stack.length = 0;\n this._visited.clear();\n};\nmodule.exports = $1146fd93dd0182e7$var$TileSearcher;\n\n});\nparcelRegister(\"fio2g\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $iZgBB = parcelRequire(\"iZgBB\");\nvar $b22b2e6b2a6620cd$var$defaultCapacity = 64;\n// A set data structure for elements implementing hash() and equals().\n// The capacity, if given, is just a hint; the set is allowed to exceed it, but\n// performance may suffer.\nfunction $b22b2e6b2a6620cd$var$Set(capacity) {\n if (capacity != null && (!isFinite(capacity) || Math.floor(capacity) !== capacity || capacity < 1)) throw new Error(\"Set: invalid capacity\");\n this._capacity = this._capacity || $b22b2e6b2a6620cd$var$defaultCapacity;\n this._buckets = [];\n for(var i = 0; i < this._capacity; i++)this._buckets.push([]);\n this._size = 0;\n}\n// Adds an element, replacing an existing element.\n// Returns the replaced element, or null if no element was replaced.\n$b22b2e6b2a6620cd$var$Set.prototype.add = function(element) {\n var h = $iZgBB(element.hash(), this._capacity);\n var bucket = this._buckets[h];\n for(var i = 0; i < bucket.length; i++){\n var existingElement = bucket[i];\n if (element.equals(existingElement)) {\n bucket[i] = element;\n return existingElement;\n }\n }\n bucket.push(element);\n this._size++;\n return null;\n};\n// Removes an element.\n// Returns the removed element, or null if the element was not found.\n$b22b2e6b2a6620cd$var$Set.prototype.remove = function(element) {\n var h = $iZgBB(element.hash(), this._capacity);\n var bucket = this._buckets[h];\n for(var i = 0; i < bucket.length; i++){\n var existingElement = bucket[i];\n if (element.equals(existingElement)) {\n // Splice manually to avoid Array#splice return value allocation.\n for(var j = i; j < bucket.length - 1; j++)bucket[j] = bucket[j + 1];\n bucket.length = bucket.length - 1;\n this._size--;\n return existingElement;\n }\n }\n return null;\n};\n// Returns whether an element is in the set.\n$b22b2e6b2a6620cd$var$Set.prototype.has = function(element) {\n var h = $iZgBB(element.hash(), this._capacity);\n var bucket = this._buckets[h];\n for(var i = 0; i < bucket.length; i++){\n var existingElement = bucket[i];\n if (element.equals(existingElement)) return true;\n }\n return false;\n};\n// Returns the number of elements in the set.\n$b22b2e6b2a6620cd$var$Set.prototype.size = function() {\n return this._size;\n};\n// Removes all elements from the set.\n$b22b2e6b2a6620cd$var$Set.prototype.clear = function() {\n for(var i = 0; i < this._capacity; i++)this._buckets[i].length = 0;\n this._size = 0;\n};\n// Calls fn(element) for each element in the set, in an unspecified order.\n// Returns the number of times fn was called.\n// The result is unspecified if the set is mutated during iteration.\n$b22b2e6b2a6620cd$var$Set.prototype.forEach = function(fn) {\n var count = 0;\n for(var i = 0; i < this._capacity; i++){\n var bucket = this._buckets[i];\n for(var j = 0; j < bucket.length; j++){\n fn(bucket[j]);\n count += 1;\n }\n }\n return count;\n};\nmodule.exports = $b22b2e6b2a6620cd$var$Set;\n\n});\nparcelRegister(\"iZgBB\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n/**\n * Modulo operation\n *\n * @memberof util\n * @param {Number} dividend\n * @param {Number} divisor\n * @returns {Number} Value in range `[0,divisor[`\n */ function $dd2ace05bbe02279$var$mod(a, b) {\n return (+a % (b = +b) + b) % b;\n}\nmodule.exports = $dd2ace05bbe02279$var$mod;\n\n});\n\n\n\nparcelRegister(\"dW5wO\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $iZgBB = parcelRequire(\"iZgBB\");\n// An LruMap holds up to a maximum number of key-value pairs, ordered by their\n// time of insertion. When the addition of a key-value pair would cause the\n// capacity to be exceeded, the oldest key-value pair in the set is evicted.\n// As a special case, an LruMap with zero capacity always rejects the insertion\n// of a key-value pair.\n//\n// Keys must implement hash() and equals(). Note that the implementation doesn't\n// currently use hash(), but a future version might.\nfunction $a254faf283c27d31$var$LruMap(capacity) {\n if (!isFinite(capacity) || Math.floor(capacity) !== capacity || capacity < 0) throw new Error(\"LruMap: invalid capacity\");\n this._capacity = capacity;\n // Keys and values are stored in circular arrays ordered by decreasing age.\n // Start is the index of the oldest key/value and size is the number of valid\n // key/values; the region containing valid keys/values may wrap around.\n this._keys = new Array(this._capacity);\n this._values = new Array(this._capacity);\n this._start = 0;\n this._size = 0;\n}\n$a254faf283c27d31$var$LruMap.prototype._index = function(i) {\n return $iZgBB(this._start + i, this._capacity);\n};\n// Returns the value associated to the specified key, or null if not found.\n$a254faf283c27d31$var$LruMap.prototype.get = function(key) {\n for(var i = 0; i < this._size; i++){\n var existingKey = this._keys[this._index(i)];\n if (key.equals(existingKey)) return this._values[this._index(i)];\n }\n return null;\n};\n// Associates the specified value with the specified key, possibly replacing the\n// currently associated value. The key-value pair becomes the newest. If the map\n// is at capacity, the oldest key-value pair is removed. Returns the removed\n// key, or null otherwise. If the capacity is zero, does nothing and returns\n// the key.\n$a254faf283c27d31$var$LruMap.prototype.set = function(key, value) {\n if (this._capacity === 0) return key;\n this.del(key);\n var evictedKey = this._size === this._capacity ? this._keys[this._index(0)] : null;\n this._keys[this._index(this._size)] = key;\n this._values[this._index(this._size)] = value;\n if (this._size < this._capacity) this._size++;\n else this._start = this._index(1);\n return evictedKey;\n};\n// Removes the key-value pair associated with the specified key.\n// Returns the removed value, or null if not found.\n$a254faf283c27d31$var$LruMap.prototype.del = function(key) {\n for(var i = 0; i < this._size; i++)if (key.equals(this._keys[this._index(i)])) {\n var existingValue = this._values[this._index(i)];\n for(var j = i; j < this._size - 1; j++){\n this._keys[this._index(j)] = this._keys[this._index(j + 1)];\n this._values[this._index(j)] = this._values[this._index(j + 1)];\n }\n this._size--;\n return existingValue;\n }\n return null;\n};\n// Returns whether there is a value associated with the specified key.\n$a254faf283c27d31$var$LruMap.prototype.has = function(key) {\n for(var i = 0; i < this._size; i++){\n if (key.equals(this._keys[this._index(i)])) return true;\n }\n return false;\n};\n// Returns the number of key-value pairs in the map.\n$a254faf283c27d31$var$LruMap.prototype.size = function() {\n return this._size;\n};\n// Removes all key-value pairs from the map.\n$a254faf283c27d31$var$LruMap.prototype.clear = function() {\n this._keys.length = 0;\n this._values.length = 0;\n this._start = 0;\n this._size = 0;\n};\n// Calls fn(key, value) for each item in the map, in an unspecified order.\n// Returns the number of times fn was called.\n// The result is unspecified if the map is mutated during iteration.\n$a254faf283c27d31$var$LruMap.prototype.forEach = function(fn) {\n var count = 0;\n for(var i = 0; i < this._size; i++){\n fn(this._keys[this._index(i)], this._values[this._index(i)]);\n count += 1;\n }\n return count;\n};\nmodule.exports = $a254faf283c27d31$var$LruMap;\n\n});\n\nparcelRegister(\"4tCa7\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\nfunction $3427791892b79f43$var$Level(levelProperties) {\n this._fallbackOnly = !!levelProperties.fallbackOnly;\n}\n$3427791892b79f43$var$Level.prototype.numHorizontalTiles = function() {\n return Math.ceil(this.width() / this.tileWidth());\n};\n$3427791892b79f43$var$Level.prototype.numVerticalTiles = function() {\n return Math.ceil(this.height() / this.tileHeight());\n};\n$3427791892b79f43$var$Level.prototype.fallbackOnly = function() {\n return this._fallbackOnly;\n};\nmodule.exports = $3427791892b79f43$var$Level;\n\n});\n\nparcelRegister(\"4rFjs\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $3nhrd = parcelRequire(\"3nhrd\");\nfunction $33c9baebe74e4420$var$makeLevelList(levelPropertiesList, LevelClass) {\n var list = [];\n for(var i = 0; i < levelPropertiesList.length; i++)list.push(new LevelClass(levelPropertiesList[i]));\n list.sort(function(level1, level2) {\n return $3nhrd(level1.width(), level2.width());\n });\n return list;\n}\nfunction $33c9baebe74e4420$var$makeSelectableLevelList(levelList) {\n var list = [];\n for(var i = 0; i < levelList.length; i++)if (!levelList[i]._fallbackOnly) list.push(levelList[i]);\n if (!list.length) throw new Error(\"No selectable levels in list\");\n return list;\n}\nmodule.exports = {\n makeLevelList: $33c9baebe74e4420$var$makeLevelList,\n makeSelectableLevelList: $33c9baebe74e4420$var$makeSelectableLevelList\n};\n\n});\nparcelRegister(\"3nhrd\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\nfunction $27510be60f338f4c$var$cmp(x, y) {\n if (x < y) return -1;\n if (x > y) return 1;\n return 0;\n}\nmodule.exports = $27510be60f338f4c$var$cmp;\n\n});\n\n\nparcelRegister(\"fXp6t\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\nfunction $b9dfd6b301a50546$var$type(x) {\n var typ = typeof x;\n if (typ === \"object\") {\n if (x === null) return \"null\";\n if (Object.prototype.toString.call(x) === \"[object Array]\") return \"array\";\n if (Object.prototype.toString.call(x) === \"[object RegExp]\") return \"regexp\";\n }\n return typ;\n}\nmodule.exports = $b9dfd6b301a50546$var$type;\n\n});\n\n\nparcelRegister(\"iv3ES\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $jOYf3 = parcelRequire(\"jOYf3\");\n\nvar $asoyN = parcelRequire(\"asoyN\");\n\nvar $dBMHD = parcelRequire(\"dBMHD\");\nvar $d77df5b8fa140bee$require$setOverflowHidden = $dBMHD.setOverflowHidden;\n\nvar $dBMHD = parcelRequire(\"dBMHD\");\nvar $d77df5b8fa140bee$require$setNoPointerEvents = $dBMHD.setNoPointerEvents;\n\nvar $dBMHD = parcelRequire(\"dBMHD\");\nvar $d77df5b8fa140bee$require$setNullTransform = $dBMHD.setNullTransform;\n\nvar $dBMHD = parcelRequire(\"dBMHD\");\nvar $d77df5b8fa140bee$require$setTransform = $dBMHD.setTransform;\n\nvar $2Xxut = parcelRequire(\"2Xxut\");\nvar $d77df5b8fa140bee$var$debug = typeof MARZIPANODEBUG !== \"undefined\" && MARZIPANODEBUG.css;\nfunction $d77df5b8fa140bee$var$tileCmp(a, b) {\n return a.cmp(b);\n}\nfunction $d77df5b8fa140bee$var$CssBaseRenderer(root, quirks, tileClass) {\n this._root = root;\n this._browserQuirks = quirks;\n // Create a container for this renderer's tiles, so we can style them\n // as a whole separately from other renderers in the same stage.\n var domElement = document.createElement(\"div\");\n root.appendChild(domElement);\n domElement.style.position = \"absolute\";\n // For some weird reason, this prevents flickering on Safari Desktop.\n $d77df5b8fa140bee$require$setOverflowHidden(domElement);\n // Prevent touch events on tiles from messing up pinching gestures on iOS.\n $d77df5b8fa140bee$require$setNoPointerEvents(domElement);\n if (this._browserQuirks.useNullTransform) $d77df5b8fa140bee$require$setNullTransform(domElement);\n this.domElement = domElement;\n this._oldTileList = [];\n this._newTileList = [];\n this._textureMap = new $jOYf3();\n}\n$d77df5b8fa140bee$var$CssBaseRenderer.prototype.destroy = function() {\n this._root.removeChild(this.domElement);\n $2Xxut(this);\n};\n$d77df5b8fa140bee$var$CssBaseRenderer.prototype.startLayer = function(layer, rect) {\n var domElement = this.domElement;\n // Set viewport effect.\n var stageWidth = this._root.clientWidth;\n var stageHeight = this._root.clientHeight;\n domElement.style.left = $asoyN(stageWidth * rect.left) + \"px\";\n domElement.style.top = $asoyN(stageHeight * rect.top) + \"px\";\n domElement.style.width = $asoyN(stageWidth * rect.width) + \"px\";\n domElement.style.height = $asoyN(stageHeight * rect.height) + \"px\";\n // Set opacity effect.\n var opacity = 1.0;\n var effects = layer.effects();\n if (effects && effects.opacity != null) opacity = effects.opacity;\n domElement.style.opacity = opacity;\n // Clear temporary variables.\n this._newTileList.length = 0;\n this._textureMap.clear();\n};\n$d77df5b8fa140bee$var$CssBaseRenderer.prototype.renderTile = function(tile, texture) {\n this._newTileList.push(tile);\n this._textureMap.set(tile, texture);\n};\n$d77df5b8fa140bee$var$CssBaseRenderer.prototype.endLayer = function(layer, rect) {\n var domElement = this.domElement;\n var oldTileList = this._oldTileList;\n var newTileList = this._newTileList;\n var textureMap = this._textureMap;\n var oldIndex, newIndex, oldTile, newTile;\n var texture, canvas;\n var currentNode, nextNode;\n var view = layer.view();\n // Iterate the old and new tile lists in a consistent order and perform\n // insertions and removals as we go. This minimizes the number of DOM\n // operations performed.\n // Neither the tile list nor the texture list may contain duplicates,\n // otherwise this logic will fail.\n // Consistency check.\n if (domElement.children.length !== oldTileList.length) throw new Error(\"DOM not in sync with tile list\");\n newTileList.sort($d77df5b8fa140bee$var$tileCmp);\n oldIndex = 0;\n oldTile = oldTileList[oldIndex];\n currentNode = domElement.firstChild;\n for(newIndex = 0; newIndex < newTileList.length; newIndex++){\n newTile = newTileList[newIndex];\n // Iterate old list until it catches up with the new list.\n while(oldIndex < oldTileList.length){\n if (oldTile.cmp(newTile) >= 0) break;\n // Tile is no longer visible.\n // Remove it from the DOM.\n nextNode = currentNode.nextSibling;\n domElement.removeChild(currentNode);\n currentNode = nextNode;\n oldTile = oldTileList[++oldIndex];\n }\n // Get the texture for the current tile.\n texture = textureMap.get(newTile);\n canvas = texture ? texture._canvas : null;\n // Consistency check.\n if (!canvas) throw new Error(\"Rendering tile with missing texture\");\n if (oldTile && oldTile.cmp(newTile) === 0) {\n // The old and new tile are the same.\n // Consistency check.\n if (canvas != currentNode) throw new Error(\"DOM not in sync with tile list\");\n currentNode = currentNode.nextSibling;\n oldTile = oldTileList[++oldIndex];\n } else // The new tile comes before the old tile.\n // Insert it into the DOM.\n domElement.insertBefore(canvas, currentNode);\n // Set the CSS transform on the current tile.\n $d77df5b8fa140bee$require$setTransform(canvas, this.calculateTransform(newTile, texture, view));\n if ($d77df5b8fa140bee$var$debug) canvas.setAttribute(\"data-tile\", newTile.str());\n }\n // Remove trailing tiles that are no longer visible from the DOM.\n while(currentNode){\n nextNode = currentNode.nextSibling;\n domElement.removeChild(currentNode);\n currentNode = nextNode;\n }\n // Consistenty check.\n if (domElement.children.length !== newTileList.length) throw new Error(\"DOM not in sync with tile list\");\n // The old and new tile lists swap roles between iterations.\n var tmp = this._oldTileList;\n this._oldTileList = this._newTileList;\n this._newTileList = tmp;\n};\nmodule.exports = $d77df5b8fa140bee$var$CssBaseRenderer;\n\n});\nparcelRegister(\"jOYf3\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $iZgBB = parcelRequire(\"iZgBB\");\nvar $e6e16a93a5a6d2ce$var$defaultCapacity = 64;\n// A map data structure for keys implementing hash() and equals() and arbitrary\n// values. The capacity, if given, is just a hint; the map is allowed to exceed\n// it, but performance may suffer.\nfunction $e6e16a93a5a6d2ce$var$Map(capacity) {\n if (capacity != null && (!isFinite(capacity) || Math.floor(capacity) !== capacity || capacity < 1)) throw new Error(\"Map: invalid capacity\");\n this._capacity = capacity || $e6e16a93a5a6d2ce$var$defaultCapacity;\n this._keyBuckets = [];\n this._valBuckets = [];\n for(var i = 0; i < this._capacity; i++){\n this._keyBuckets.push([]);\n this._valBuckets.push([]);\n }\n this._size = 0;\n}\n// Returns the value associated with the specified key, or null if not found.\n$e6e16a93a5a6d2ce$var$Map.prototype.get = function(key) {\n var h = $iZgBB(key.hash(), this._capacity);\n var keyBucket = this._keyBuckets[h];\n for(var i = 0; i < keyBucket.length; i++){\n var existingKey = keyBucket[i];\n if (key.equals(existingKey)) {\n var valBucket = this._valBuckets[h];\n var existingValue = valBucket[i];\n return existingValue;\n }\n }\n return null;\n};\n// Associates the specified value with the specified key, possibly replacing the\n// currently associated value.\n// Returns the replaced value, or null if no value was replaced.\n$e6e16a93a5a6d2ce$var$Map.prototype.set = function(key, val) {\n var h = $iZgBB(key.hash(), this._capacity);\n var keyBucket = this._keyBuckets[h];\n var valBucket = this._valBuckets[h];\n for(var i = 0; i < keyBucket.length; i++){\n var existingKey = keyBucket[i];\n if (key.equals(existingKey)) {\n var existingValue = valBucket[i];\n keyBucket[i] = key;\n valBucket[i] = val;\n return existingValue;\n }\n }\n keyBucket.push(key);\n valBucket.push(val);\n this._size++;\n return null;\n};\n// Removes the key-value pair associated with the specified key.\n// Returns the removed value, or null if not found.\n$e6e16a93a5a6d2ce$var$Map.prototype.del = function(key) {\n var h = $iZgBB(key.hash(), this._capacity);\n var keyBucket = this._keyBuckets[h];\n var valBucket = this._valBuckets[h];\n for(var i = 0; i < keyBucket.length; i++){\n var existingKey = keyBucket[i];\n if (key.equals(existingKey)) {\n var existingValue = valBucket[i];\n // Splice manually to avoid Array#splice return value allocation.\n for(var j = i; j < keyBucket.length - 1; j++){\n keyBucket[j] = keyBucket[j + 1];\n valBucket[j] = valBucket[j + 1];\n }\n keyBucket.length = keyBucket.length - 1;\n valBucket.length = valBucket.length - 1;\n this._size--;\n return existingValue;\n }\n }\n return null;\n};\n// Returns whether there is a value associated with the specified key.\n$e6e16a93a5a6d2ce$var$Map.prototype.has = function(key) {\n var h = $iZgBB(key.hash(), this._capacity);\n var keyBucket = this._keyBuckets[h];\n for(var i = 0; i < keyBucket.length; i++){\n var existingKey = keyBucket[i];\n if (key.equals(existingKey)) return true;\n }\n return false;\n};\n// Returns the number of key-value pairs in the map.\n$e6e16a93a5a6d2ce$var$Map.prototype.size = function() {\n return this._size;\n};\n// Removes all key-value pairs from the map.\n$e6e16a93a5a6d2ce$var$Map.prototype.clear = function() {\n for(var i = 0; i < this._capacity; i++){\n this._keyBuckets[i].length = 0;\n this._valBuckets[i].length = 0;\n }\n this._size = 0;\n};\n// Calls fn(key, value) for each key-value pair in the map, in an unspecified\n// order. Returns the number of times fn was called.\n// The result is unspecified if the map is mutated during iteration.\n$e6e16a93a5a6d2ce$var$Map.prototype.forEach = function(fn) {\n var count = 0;\n for(var i = 0; i < this._capacity; i++){\n var keyBucket = this._keyBuckets[i];\n var valBucket = this._valBuckets[i];\n for(var j = 0; j < keyBucket.length; j++){\n fn(keyBucket[j], valBucket[j]);\n count += 1;\n }\n }\n return count;\n};\nmodule.exports = $e6e16a93a5a6d2ce$var$Map;\n\n});\n\nparcelRegister(\"asoyN\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n// Convert a number to a string in decimal notation.\nfunction $79cf9210aca8fb7b$var$decimal(x) {\n // Double-precision floats have 15 significant decimal digits.\n return x.toPrecision(15);\n}\nmodule.exports = $79cf9210aca8fb7b$var$decimal;\n\n});\n\n\n\nparcelRegister(\"aYyo6\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $l1BkT = parcelRequire(\"l1BkT\");\nvar $7fda2eaa0ce1864f$require$FlatTile = $l1BkT.Tile;\n\nvar $iv3ES = parcelRequire(\"iv3ES\");\n\nvar $asoyN = parcelRequire(\"asoyN\");\n\nvar $Yar88 = parcelRequire(\"Yar88\");\n/**\n * @class CssFlatRenderer\n * @implements Renderer\n * @classdesc\n *\n * A renderer for {@link FlatGeometry} and {@link FlatView}, appropriate for a\n * {@link CssStage}.\n *\n * Most users do not need to instantiate this class. Renderers are created and\n * destroyed by {@link Stage} as necessary.\n */ function $7fda2eaa0ce1864f$var$CssFlatRenderer(root, quirks) {\n this.constructor.super_.call(this, root, quirks, $7fda2eaa0ce1864f$require$FlatTile);\n}\n$Yar88($7fda2eaa0ce1864f$var$CssFlatRenderer, $iv3ES);\n$7fda2eaa0ce1864f$var$CssFlatRenderer.prototype.calculateTransform = function(tile, texture, view) {\n var padSize = this._browserQuirks.padSize;\n var transform = \"\";\n // Place top left corner of tile at the center of the viewport.\n var viewportWidth = view.width();\n var viewportHeight = view.height();\n transform += \"translateX(\" + $asoyN(viewportWidth / 2) + \"px) translateY(\" + $asoyN(viewportHeight / 2) + \"px) \";\n // Determine the zoom factor.\n var zoomX = viewportWidth / view._zoomX();\n var zoomY = viewportHeight / view._zoomY();\n // Move tile into its position within the image.\n var cornerX = tile.centerX() - tile.scaleX() / 2 + 0.5;\n var cornerY = 0.5 - tile.centerY() - tile.scaleY() / 2;\n var translX = cornerX * zoomX;\n var translY = cornerY * zoomY;\n transform += \"translateX(\" + $asoyN(translX) + \"px) translateY(\" + $asoyN(translY) + \"px) \";\n // Apply view offsets.\n var offX = -view.x() * zoomX;\n var offY = -view.y() * zoomY;\n transform += \"translateX(\" + $asoyN(offX) + \"px) translateY(\" + $asoyN(offY) + \"px) \";\n // Compensate for padding around the tile.\n var padLeft = tile.padLeft() ? padSize : 0;\n var padTop = tile.padTop() ? padSize : 0;\n if (padLeft !== 0 || padTop !== 0) transform += \"translateX(\" + $asoyN(-padLeft) + \"px) translateY(\" + $asoyN(-padTop) + \"px) \";\n // Scale tile into correct size.\n var scaleX = zoomX / tile.levelWidth();\n var scaleY = zoomY / tile.levelHeight();\n transform += \"scale(\" + $asoyN(scaleX) + \", \" + $asoyN(scaleY) + \") \";\n return transform;\n};\nmodule.exports = $7fda2eaa0ce1864f$var$CssFlatRenderer;\n\n});\nparcelRegister(\"l1BkT\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $Yar88 = parcelRequire(\"Yar88\");\n\nvar $4j7qz = parcelRequire(\"4j7qz\");\n\nvar $1tXVZ = parcelRequire(\"1tXVZ\");\n\nvar $dW5wO = parcelRequire(\"dW5wO\");\n\nvar $4tCa7 = parcelRequire(\"4tCa7\");\n\nvar $4rFjs = parcelRequire(\"4rFjs\");\nvar $f4e6a71b0e40022d$require$makeLevelList = $4rFjs.makeLevelList;\n\nvar $4rFjs = parcelRequire(\"4rFjs\");\nvar $f4e6a71b0e40022d$require$makeSelectableLevelList = $4rFjs.makeSelectableLevelList;\n\nvar $eCQUD = parcelRequire(\"eCQUD\");\n\nvar $iZgBB = parcelRequire(\"iZgBB\");\n\nvar $3nhrd = parcelRequire(\"3nhrd\");\n\nvar $fXp6t = parcelRequire(\"fXp6t\");\n\nvar $5VJvE = parcelRequire(\"5VJvE\");\nvar $8QvoZ = parcelRequire(\"8QvoZ\");\nvar $f4e6a71b0e40022d$require$vec2 = $5VJvE;\n\nvar $5VJvE = parcelRequire(\"5VJvE\");\nvar $8QvoZ = parcelRequire(\"8QvoZ\");\nvar $f4e6a71b0e40022d$require$vec4 = $8QvoZ;\nvar $f4e6a71b0e40022d$var$neighborsCacheSize = 64;\n// Some renderer implementations require tiles to be padded around with\n// repeated pixels to prevent the appearance of visible seams between tiles.\n//\n// In order to prevent the padding from being visible, the tiles must be\n// padded and stacked such that the padding on one of the sides, when present,\n// stacks below the neighboring tile on that side.\n//\n// Padding rules:\n// * Pad tiles on the right and on the bottom.\n//\n// Stacking rules:\n// * Within an image, stack smaller zoom levels below larger zoom levels.\n// * Within a level, stack tiles bottom to top in ascending Y coordinate order.\n// * Within a row, stack tiles bottom to top in ascending X coordinate order.\n// Offsets to apply to the (x,y) coordinates of a tile to get its neighbors.\nvar $f4e6a71b0e40022d$var$neighborOffsets = [\n [\n 0,\n 1\n ],\n [\n 1,\n 0\n ],\n [\n 0,\n -1\n ],\n [\n -1,\n 0\n ] // left\n];\n/**\n * @class FlatTile\n * @implements Tile\n * @classdesc\n *\n * A tile in a {@link FlatGeometry}.\n */ function $f4e6a71b0e40022d$var$FlatTile(x, y, z, geometry) {\n this.x = x;\n this.y = y;\n this.z = z;\n this._geometry = geometry;\n this._level = geometry.levelList[z];\n}\n$f4e6a71b0e40022d$var$FlatTile.prototype.rotX = function() {\n return 0;\n};\n$f4e6a71b0e40022d$var$FlatTile.prototype.rotY = function() {\n return 0;\n};\n$f4e6a71b0e40022d$var$FlatTile.prototype.centerX = function() {\n var levelWidth = this._level.width();\n var tileWidth = this._level.tileWidth();\n return (this.x * tileWidth + 0.5 * this.width()) / levelWidth - 0.5;\n};\n$f4e6a71b0e40022d$var$FlatTile.prototype.centerY = function() {\n var levelHeight = this._level.height();\n var tileHeight = this._level.tileHeight();\n return 0.5 - (this.y * tileHeight + 0.5 * this.height()) / levelHeight;\n};\n$f4e6a71b0e40022d$var$FlatTile.prototype.scaleX = function() {\n var levelWidth = this._level.width();\n return this.width() / levelWidth;\n};\n$f4e6a71b0e40022d$var$FlatTile.prototype.scaleY = function() {\n var levelHeight = this._level.height();\n return this.height() / levelHeight;\n};\n$f4e6a71b0e40022d$var$FlatTile.prototype.width = function() {\n var levelWidth = this._level.width();\n var tileWidth = this._level.tileWidth();\n if (this.atRightEdge()) {\n var widthRemainder = $iZgBB(levelWidth, tileWidth);\n return widthRemainder || tileWidth;\n } else return tileWidth;\n};\n$f4e6a71b0e40022d$var$FlatTile.prototype.height = function() {\n var levelHeight = this._level.height();\n var tileHeight = this._level.tileHeight();\n if (this.atBottomEdge()) {\n var heightRemainder = $iZgBB(levelHeight, tileHeight);\n return heightRemainder || tileHeight;\n } else return tileHeight;\n};\n$f4e6a71b0e40022d$var$FlatTile.prototype.levelWidth = function() {\n return this._level.width();\n};\n$f4e6a71b0e40022d$var$FlatTile.prototype.levelHeight = function() {\n return this._level.height();\n};\n$f4e6a71b0e40022d$var$FlatTile.prototype.atTopLevel = function() {\n return this.z === 0;\n};\n$f4e6a71b0e40022d$var$FlatTile.prototype.atBottomLevel = function() {\n return this.z === this._geometry.levelList.length - 1;\n};\n$f4e6a71b0e40022d$var$FlatTile.prototype.atTopEdge = function() {\n return this.y === 0;\n};\n$f4e6a71b0e40022d$var$FlatTile.prototype.atBottomEdge = function() {\n return this.y === this._level.numVerticalTiles() - 1;\n};\n$f4e6a71b0e40022d$var$FlatTile.prototype.atLeftEdge = function() {\n return this.x === 0;\n};\n$f4e6a71b0e40022d$var$FlatTile.prototype.atRightEdge = function() {\n return this.x === this._level.numHorizontalTiles() - 1;\n};\n$f4e6a71b0e40022d$var$FlatTile.prototype.padTop = function() {\n return false;\n};\n$f4e6a71b0e40022d$var$FlatTile.prototype.padBottom = function() {\n return !this.atBottomEdge();\n};\n$f4e6a71b0e40022d$var$FlatTile.prototype.padLeft = function() {\n return false;\n};\n$f4e6a71b0e40022d$var$FlatTile.prototype.padRight = function() {\n return !this.atRightEdge();\n};\n$f4e6a71b0e40022d$var$FlatTile.prototype.vertices = function(result) {\n if (!result) result = [\n $f4e6a71b0e40022d$require$vec2.create(),\n $f4e6a71b0e40022d$require$vec2.create(),\n $f4e6a71b0e40022d$require$vec2.create(),\n $f4e6a71b0e40022d$require$vec2.create()\n ];\n var left = this.centerX() - this.scaleX() / 2;\n var right = this.centerX() + this.scaleX() / 2;\n var bottom = this.centerY() - this.scaleY() / 2;\n var top = this.centerY() + this.scaleY() / 2;\n $f4e6a71b0e40022d$require$vec2.set(result[0], left, top);\n $f4e6a71b0e40022d$require$vec2.set(result[1], right, top);\n $f4e6a71b0e40022d$require$vec2.set(result[2], right, bottom);\n $f4e6a71b0e40022d$require$vec2.set(result[3], left, bottom);\n return result;\n};\n$f4e6a71b0e40022d$var$FlatTile.prototype.parent = function() {\n if (this.atTopLevel()) return null;\n var geometry = this._geometry;\n var z = this.z - 1;\n // TODO: Currently assuming each level is double the size of previous one.\n // Fix to support other multiples.\n var x = Math.floor(this.x / 2);\n var y = Math.floor(this.y / 2);\n return new $f4e6a71b0e40022d$var$FlatTile(x, y, z, geometry);\n};\n$f4e6a71b0e40022d$var$FlatTile.prototype.children = function(result) {\n if (this.atBottomLevel()) return null;\n var geometry = this._geometry;\n var z = this.z + 1;\n result = result || [];\n // TODO: Currently assuming each level is double the size of previous one.\n // Fix to support other multiples.\n result.push(new $f4e6a71b0e40022d$var$FlatTile(2 * this.x, 2 * this.y, z, geometry));\n result.push(new $f4e6a71b0e40022d$var$FlatTile(2 * this.x, 2 * this.y + 1, z, geometry));\n result.push(new $f4e6a71b0e40022d$var$FlatTile(2 * this.x + 1, 2 * this.y, z, geometry));\n result.push(new $f4e6a71b0e40022d$var$FlatTile(2 * this.x + 1, 2 * this.y + 1, z, geometry));\n return result;\n};\n$f4e6a71b0e40022d$var$FlatTile.prototype.neighbors = function() {\n var geometry = this._geometry;\n var cache = geometry._neighborsCache;\n // Satisfy from cache when available.\n var cachedResult = cache.get(this);\n if (cachedResult) return cachedResult;\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var level = this._level;\n var numX = level.numHorizontalTiles() - 1;\n var numY = level.numVerticalTiles() - 1;\n var result = [];\n for(var i = 0; i < $f4e6a71b0e40022d$var$neighborOffsets.length; i++){\n var xOffset = $f4e6a71b0e40022d$var$neighborOffsets[i][0];\n var yOffset = $f4e6a71b0e40022d$var$neighborOffsets[i][1];\n var newX = x + xOffset;\n var newY = y + yOffset;\n var newZ = z;\n if (0 <= newX && newX <= numX && 0 <= newY && newY <= numY) result.push(new $f4e6a71b0e40022d$var$FlatTile(newX, newY, newZ, geometry));\n }\n // Store into cache to satisfy future requests.\n cache.set(this, result);\n return result;\n};\n$f4e6a71b0e40022d$var$FlatTile.prototype.hash = function() {\n return $4j7qz(this.z, this.y, this.x);\n};\n$f4e6a71b0e40022d$var$FlatTile.prototype.equals = function(that) {\n return this.geometry === that.geometry && this.z === that.z && this.y === that.y && this.x === that.x;\n};\n$f4e6a71b0e40022d$var$FlatTile.prototype.cmp = function(that) {\n return $3nhrd(this.z, that.z) || $3nhrd(this.y, that.y) || $3nhrd(this.x, that.x);\n};\n$f4e6a71b0e40022d$var$FlatTile.prototype.str = function() {\n return \"FlatTile(\" + tile.x + \", \" + tile.y + \", \" + tile.z + \")\";\n};\nfunction $f4e6a71b0e40022d$var$FlatLevel(levelProperties) {\n this.constructor.super_.call(this, levelProperties);\n this._width = levelProperties.width;\n this._height = levelProperties.height;\n this._tileWidth = levelProperties.tileWidth;\n this._tileHeight = levelProperties.tileHeight;\n}\n$Yar88($f4e6a71b0e40022d$var$FlatLevel, $4tCa7);\n$f4e6a71b0e40022d$var$FlatLevel.prototype.width = function() {\n return this._width;\n};\n$f4e6a71b0e40022d$var$FlatLevel.prototype.height = function() {\n return this._height;\n};\n$f4e6a71b0e40022d$var$FlatLevel.prototype.tileWidth = function() {\n return this._tileWidth;\n};\n$f4e6a71b0e40022d$var$FlatLevel.prototype.tileHeight = function() {\n return this._tileHeight;\n};\n$f4e6a71b0e40022d$var$FlatLevel.prototype._validateWithParentLevel = function(parentLevel) {\n var width = this.width();\n var height = this.height();\n var tileWidth = this.tileWidth();\n var tileHeight = this.tileHeight();\n var parentWidth = parentLevel.width();\n var parentHeight = parentLevel.height();\n var parentTileWidth = parentLevel.tileWidth();\n var parentTileHeight = parentLevel.tileHeight();\n if (width % parentWidth !== 0) return new Error(\"Level width must be multiple of parent level: \" + width + \" vs. \" + parentWidth);\n if (height % parentHeight !== 0) return new Error(\"Level height must be multiple of parent level: \" + height + \" vs. \" + parentHeight);\n if (tileWidth % parentTileWidth !== 0) return new Error(\"Level tile width must be multiple of parent level: \" + tileWidth + \" vs. \" + parentTileWidth);\n if (tileHeight % parentTileHeight !== 0) return new Error(\"Level tile height must be multiple of parent level: \" + tileHeight + \" vs. \" + parentTileHeight);\n};\n/**\n * @class FlatGeometry\n * @implements Geometry\n * @classdesc\n *\n * A {@link Geometry} implementation suitable for tiled flat images with\n * multiple resolution levels.\n *\n * The following restrictions apply:\n * - All tiles must be square, except when in the last row or column position,\n * and must form a rectangular grid;\n * - The width and height of a level must be multiples of the parent level\n * width and height.\n *\n * @param {Object[]} levelPropertiesList Level description\n * @param {number} levelPropertiesList[].width Level width in pixels\n * @param {number} levelPropertiesList[].tileWidth Tile width in pixels for\n * square tiles\n * @param {number} levelPropertiesList[].height Level height in pixels\n * @param {number} levelPropertiesList[].tileHeight Tile height in pixels for\n * square tiles\n */ function $f4e6a71b0e40022d$var$FlatGeometry(levelPropertiesList) {\n if ($fXp6t(levelPropertiesList) !== \"array\") throw new Error(\"Level list must be an array\");\n this.levelList = $f4e6a71b0e40022d$require$makeLevelList(levelPropertiesList, $f4e6a71b0e40022d$var$FlatLevel);\n this.selectableLevelList = $f4e6a71b0e40022d$require$makeSelectableLevelList(this.levelList);\n for(var i = 1; i < this.levelList.length; i++)this.levelList[i]._validateWithParentLevel(this.levelList[i - 1]);\n this._tileSearcher = new $1tXVZ(this);\n this._neighborsCache = new $dW5wO($f4e6a71b0e40022d$var$neighborsCacheSize);\n this._vec = $f4e6a71b0e40022d$require$vec4.create();\n this._viewSize = {};\n}\n$f4e6a71b0e40022d$var$FlatGeometry.prototype.maxTileSize = function() {\n var maxTileSize = 0;\n for(var i = 0; i < this.levelList.length; i++){\n var level = this.levelList[i];\n maxTileSize = Math.max(maxTileSize, level.tileWidth, level.tileHeight);\n }\n return maxTileSize;\n};\n$f4e6a71b0e40022d$var$FlatGeometry.prototype.levelTiles = function(level, result) {\n var levelIndex = this.levelList.indexOf(level);\n var maxX = level.numHorizontalTiles() - 1;\n var maxY = level.numVerticalTiles() - 1;\n if (!result) result = [];\n for(var x = 0; x <= maxX; x++)for(var y = 0; y <= maxY; y++)result.push(new $f4e6a71b0e40022d$var$FlatTile(x, y, levelIndex, this));\n return result;\n};\n$f4e6a71b0e40022d$var$FlatGeometry.prototype._closestTile = function(view, level) {\n var ray = this._vec;\n // Compute a view ray into the central screen point.\n $f4e6a71b0e40022d$require$vec4.set(ray, 0, 0, 1, 1);\n $f4e6a71b0e40022d$require$vec4.transformMat4(ray, ray, view.inverseProjection());\n // Compute the image coordinates that the view ray points into.\n var x = 0.5 + ray[0];\n var y = 0.5 - ray[1];\n // Get the desired zoom level.\n var tileZ = this.levelList.indexOf(level);\n var levelWidth = level.width();\n var levelHeight = level.height();\n var tileWidth = level.tileWidth();\n var tileHeight = level.tileHeight();\n var numX = level.numHorizontalTiles();\n var numY = level.numVerticalTiles();\n // Find the coordinates of the tile that the view ray points into.\n var tileX = $eCQUD(Math.floor(x * levelWidth / tileWidth), 0, numX - 1);\n var tileY = $eCQUD(Math.floor(y * levelHeight / tileHeight), 0, numY - 1);\n return new $f4e6a71b0e40022d$var$FlatTile(tileX, tileY, tileZ, this);\n};\n$f4e6a71b0e40022d$var$FlatGeometry.prototype.visibleTiles = function(view, level, result) {\n var viewSize = this._viewSize;\n var tileSearcher = this._tileSearcher;\n result = result || [];\n view.size(viewSize);\n if (viewSize.width === 0 || viewSize.height === 0) // No tiles are visible if the viewport is empty.\n return result;\n var startingTile = this._closestTile(view, level);\n var count = tileSearcher.search(view, startingTile, result);\n if (!count) throw new Error(\"Starting tile is not visible\");\n return result;\n};\n$f4e6a71b0e40022d$var$FlatGeometry.Tile = $f4e6a71b0e40022d$var$FlatGeometry.prototype.Tile = $f4e6a71b0e40022d$var$FlatTile;\n$f4e6a71b0e40022d$var$FlatGeometry.type = $f4e6a71b0e40022d$var$FlatGeometry.prototype.type = \"flat\";\n$f4e6a71b0e40022d$var$FlatTile.type = $f4e6a71b0e40022d$var$FlatTile.prototype.type = \"flat\";\nmodule.exports = $f4e6a71b0e40022d$var$FlatGeometry;\n\n});\nparcelRegister(\"5VJvE\", function(module, exports) {\n\n$parcel$export(module.exports, \"create\", function () { return $451593d984d40c98$export$185802fd694ee1f5; });\n$parcel$export(module.exports, \"clone\", function () { return $451593d984d40c98$export$9cd59f9826255e47; });\n$parcel$export(module.exports, \"fromValues\", function () { return $451593d984d40c98$export$a82be99ed2a44a7d; });\n$parcel$export(module.exports, \"copy\", function () { return $451593d984d40c98$export$784d13d8ee351f07; });\n$parcel$export(module.exports, \"set\", function () { return $451593d984d40c98$export$adaa4cf7ef1b65be; });\n$parcel$export(module.exports, \"add\", function () { return $451593d984d40c98$export$e16d8520af44a096; });\n$parcel$export(module.exports, \"subtract\", function () { return $451593d984d40c98$export$4e2d2ead65e5f7e3; });\n$parcel$export(module.exports, \"multiply\", function () { return $451593d984d40c98$export$2060d2db72cce88f; });\n$parcel$export(module.exports, \"divide\", function () { return $451593d984d40c98$export$cd007d971a5a2143; });\n$parcel$export(module.exports, \"ceil\", function () { return $451593d984d40c98$export$803ce6b71a0a94b2; });\n$parcel$export(module.exports, \"floor\", function () { return $451593d984d40c98$export$a3fe094919f356fd; });\n$parcel$export(module.exports, \"min\", function () { return $451593d984d40c98$export$96ec731ed4dcb222; });\n$parcel$export(module.exports, \"max\", function () { return $451593d984d40c98$export$8960430cfd85939f; });\n$parcel$export(module.exports, \"round\", function () { return $451593d984d40c98$export$2077e0241d6afd3c; });\n$parcel$export(module.exports, \"scale\", function () { return $451593d984d40c98$export$dcdf75081b88279d; });\n$parcel$export(module.exports, \"scaleAndAdd\", function () { return $451593d984d40c98$export$19cedf1da84ba854; });\n$parcel$export(module.exports, \"distance\", function () { return $451593d984d40c98$export$9f17032d917177de; });\n$parcel$export(module.exports, \"squaredDistance\", function () { return $451593d984d40c98$export$88e6ebb4fe54f538; });\n$parcel$export(module.exports, \"length\", function () { return $451593d984d40c98$export$f24224f1c91d8156; });\n$parcel$export(module.exports, \"squaredLength\", function () { return $451593d984d40c98$export$ab44e1323ffc8376; });\n$parcel$export(module.exports, \"negate\", function () { return $451593d984d40c98$export$aef51622e549b8b0; });\n$parcel$export(module.exports, \"inverse\", function () { return $451593d984d40c98$export$70ae2c07e401031b; });\n$parcel$export(module.exports, \"normalize\", function () { return $451593d984d40c98$export$a3295358bff77e; });\n$parcel$export(module.exports, \"dot\", function () { return $451593d984d40c98$export$94132a0e348806d4; });\n$parcel$export(module.exports, \"cross\", function () { return $451593d984d40c98$export$bb646b20bb93d339; });\n$parcel$export(module.exports, \"lerp\", function () { return $451593d984d40c98$export$3a89f8d6f6bf6c9f; });\n$parcel$export(module.exports, \"random\", function () { return $451593d984d40c98$export$4385e60b38654f68; });\n$parcel$export(module.exports, \"transformMat2\", function () { return $451593d984d40c98$export$b732428d73874bfc; });\n$parcel$export(module.exports, \"transformMat2d\", function () { return $451593d984d40c98$export$3e55bc4b3707dfd3; });\n$parcel$export(module.exports, \"transformMat3\", function () { return $451593d984d40c98$export$f0bfa0a0024626ee; });\n$parcel$export(module.exports, \"transformMat4\", function () { return $451593d984d40c98$export$5ffbd13800309d59; });\n$parcel$export(module.exports, \"rotate\", function () { return $451593d984d40c98$export$bb628a54ab399bc9; });\n$parcel$export(module.exports, \"angle\", function () { return $451593d984d40c98$export$944b09d2ad10b378; });\n$parcel$export(module.exports, \"zero\", function () { return $451593d984d40c98$export$7f9972325ebfd559; });\n$parcel$export(module.exports, \"str\", function () { return $451593d984d40c98$export$42d51816ce590c93; });\n$parcel$export(module.exports, \"exactEquals\", function () { return $451593d984d40c98$export$f2599a5cf1109d8; });\n$parcel$export(module.exports, \"equals\", function () { return $451593d984d40c98$export$e9bab7fafb253603; });\n$parcel$export(module.exports, \"len\", function () { return $451593d984d40c98$export$fc1400facf92c78; });\n$parcel$export(module.exports, \"sub\", function () { return $451593d984d40c98$export$f93b5905241a7cca; });\n$parcel$export(module.exports, \"mul\", function () { return $451593d984d40c98$export$6e3a27864ab166fe; });\n$parcel$export(module.exports, \"div\", function () { return $451593d984d40c98$export$159d9494db57879b; });\n$parcel$export(module.exports, \"dist\", function () { return $451593d984d40c98$export$6c4a311cc157c764; });\n$parcel$export(module.exports, \"sqrDist\", function () { return $451593d984d40c98$export$2422cd6c492a8b3a; });\n$parcel$export(module.exports, \"sqrLen\", function () { return $451593d984d40c98$export$99d8dd3f32a3435; });\n$parcel$export(module.exports, \"forEach\", function () { return $451593d984d40c98$export$4b80e395e36b5a56; });\n\nvar $rqjzO = parcelRequire(\"rqjzO\");\nfunction $451593d984d40c98$export$185802fd694ee1f5() {\n var out = new $rqjzO.ARRAY_TYPE(2);\n if ($rqjzO.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n }\n return out;\n}\nfunction $451593d984d40c98$export$9cd59f9826255e47(a) {\n var out = new $rqjzO.ARRAY_TYPE(2);\n out[0] = a[0];\n out[1] = a[1];\n return out;\n}\nfunction $451593d984d40c98$export$a82be99ed2a44a7d(x, y) {\n var out = new $rqjzO.ARRAY_TYPE(2);\n out[0] = x;\n out[1] = y;\n return out;\n}\nfunction $451593d984d40c98$export$784d13d8ee351f07(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n return out;\n}\nfunction $451593d984d40c98$export$adaa4cf7ef1b65be(out, x, y) {\n out[0] = x;\n out[1] = y;\n return out;\n}\nfunction $451593d984d40c98$export$e16d8520af44a096(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n return out;\n}\nfunction $451593d984d40c98$export$4e2d2ead65e5f7e3(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n return out;\n}\nfunction $451593d984d40c98$export$2060d2db72cce88f(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n return out;\n}\nfunction $451593d984d40c98$export$cd007d971a5a2143(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n return out;\n}\nfunction $451593d984d40c98$export$803ce6b71a0a94b2(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n return out;\n}\nfunction $451593d984d40c98$export$a3fe094919f356fd(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n return out;\n}\nfunction $451593d984d40c98$export$96ec731ed4dcb222(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n return out;\n}\nfunction $451593d984d40c98$export$8960430cfd85939f(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n return out;\n}\nfunction $451593d984d40c98$export$2077e0241d6afd3c(out, a) {\n out[0] = Math.round(a[0]);\n out[1] = Math.round(a[1]);\n return out;\n}\nfunction $451593d984d40c98$export$dcdf75081b88279d(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n return out;\n}\nfunction $451593d984d40c98$export$19cedf1da84ba854(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n return out;\n}\nfunction $451593d984d40c98$export$9f17032d917177de(a, b) {\n var x = b[0] - a[0], y = b[1] - a[1];\n return Math.hypot(x, y);\n}\nfunction $451593d984d40c98$export$88e6ebb4fe54f538(a, b) {\n var x = b[0] - a[0], y = b[1] - a[1];\n return x * x + y * y;\n}\nfunction $451593d984d40c98$export$f24224f1c91d8156(a) {\n var x = a[0], y = a[1];\n return Math.hypot(x, y);\n}\nfunction $451593d984d40c98$export$ab44e1323ffc8376(a) {\n var x = a[0], y = a[1];\n return x * x + y * y;\n}\nfunction $451593d984d40c98$export$aef51622e549b8b0(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n return out;\n}\nfunction $451593d984d40c98$export$70ae2c07e401031b(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n return out;\n}\nfunction $451593d984d40c98$export$a3295358bff77e(out, a) {\n var x = a[0], y = a[1];\n var len = x * x + y * y;\n if (len > 0) //TODO: evaluate use of glm_invsqrt here?\n len = 1 / Math.sqrt(len);\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n return out;\n}\nfunction $451593d984d40c98$export$94132a0e348806d4(a, b) {\n return a[0] * b[0] + a[1] * b[1];\n}\nfunction $451593d984d40c98$export$bb646b20bb93d339(out, a, b) {\n var z = a[0] * b[1] - a[1] * b[0];\n out[0] = out[1] = 0;\n out[2] = z;\n return out;\n}\nfunction $451593d984d40c98$export$3a89f8d6f6bf6c9f(out, a, b, t) {\n var ax = a[0], ay = a[1];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n return out;\n}\nfunction $451593d984d40c98$export$4385e60b38654f68(out, scale) {\n scale = scale || 1.0;\n var r = $rqjzO.RANDOM() * 2.0 * Math.PI;\n out[0] = Math.cos(r) * scale;\n out[1] = Math.sin(r) * scale;\n return out;\n}\nfunction $451593d984d40c98$export$b732428d73874bfc(out, a, m) {\n var x = a[0], y = a[1];\n out[0] = m[0] * x + m[2] * y;\n out[1] = m[1] * x + m[3] * y;\n return out;\n}\nfunction $451593d984d40c98$export$3e55bc4b3707dfd3(out, a, m) {\n var x = a[0], y = a[1];\n out[0] = m[0] * x + m[2] * y + m[4];\n out[1] = m[1] * x + m[3] * y + m[5];\n return out;\n}\nfunction $451593d984d40c98$export$f0bfa0a0024626ee(out, a, m) {\n var x = a[0], y = a[1];\n out[0] = m[0] * x + m[3] * y + m[6];\n out[1] = m[1] * x + m[4] * y + m[7];\n return out;\n}\nfunction $451593d984d40c98$export$5ffbd13800309d59(out, a, m) {\n var x = a[0];\n var y = a[1];\n out[0] = m[0] * x + m[4] * y + m[12];\n out[1] = m[1] * x + m[5] * y + m[13];\n return out;\n}\nfunction $451593d984d40c98$export$bb628a54ab399bc9(out, a, b, c) {\n //Translate point to the origin\n var p0 = a[0] - b[0], p1 = a[1] - b[1], sinC = Math.sin(c), cosC = Math.cos(c); //perform rotation and translate to correct position\n out[0] = p0 * cosC - p1 * sinC + b[0];\n out[1] = p0 * sinC + p1 * cosC + b[1];\n return out;\n}\nfunction $451593d984d40c98$export$944b09d2ad10b378(a, b) {\n var x1 = a[0], y1 = a[1], x2 = b[0], y2 = b[1];\n var len1 = x1 * x1 + y1 * y1;\n if (len1 > 0) //TODO: evaluate use of glm_invsqrt here?\n len1 = 1 / Math.sqrt(len1);\n var len2 = x2 * x2 + y2 * y2;\n if (len2 > 0) //TODO: evaluate use of glm_invsqrt here?\n len2 = 1 / Math.sqrt(len2);\n var cosine = (x1 * x2 + y1 * y2) * len1 * len2;\n if (cosine > 1.0) return 0;\n else if (cosine < -1) return Math.PI;\n else return Math.acos(cosine);\n}\nfunction $451593d984d40c98$export$7f9972325ebfd559(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n return out;\n}\nfunction $451593d984d40c98$export$42d51816ce590c93(a) {\n return \"vec2(\" + a[0] + \", \" + a[1] + \")\";\n}\nfunction $451593d984d40c98$export$f2599a5cf1109d8(a, b) {\n return a[0] === b[0] && a[1] === b[1];\n}\nfunction $451593d984d40c98$export$e9bab7fafb253603(a, b) {\n var a0 = a[0], a1 = a[1];\n var b0 = b[0], b1 = b[1];\n return Math.abs(a0 - b0) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1));\n}\nvar $451593d984d40c98$export$fc1400facf92c78 = $451593d984d40c98$export$f24224f1c91d8156;\nvar $451593d984d40c98$export$f93b5905241a7cca = $451593d984d40c98$export$4e2d2ead65e5f7e3;\nvar $451593d984d40c98$export$6e3a27864ab166fe = $451593d984d40c98$export$2060d2db72cce88f;\nvar $451593d984d40c98$export$159d9494db57879b = $451593d984d40c98$export$cd007d971a5a2143;\nvar $451593d984d40c98$export$6c4a311cc157c764 = $451593d984d40c98$export$9f17032d917177de;\nvar $451593d984d40c98$export$2422cd6c492a8b3a = $451593d984d40c98$export$88e6ebb4fe54f538;\nvar $451593d984d40c98$export$99d8dd3f32a3435 = $451593d984d40c98$export$ab44e1323ffc8376;\nvar $451593d984d40c98$export$4b80e395e36b5a56 = function() {\n var vec = $451593d984d40c98$export$185802fd694ee1f5();\n return function(a, stride, offset, count, fn, arg) {\n var i, l;\n if (!stride) stride = 2;\n if (!offset) offset = 0;\n if (count) l = Math.min(count * stride + offset, a.length);\n else l = a.length;\n for(i = offset; i < l; i += stride){\n vec[0] = a[i];\n vec[1] = a[i + 1];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n }\n return a;\n };\n}();\n\n});\n\n\n\nparcelRegister(\"aK6y2\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $de14n = parcelRequire(\"de14n\");\n\nvar $4QGnk = parcelRequire(\"4QGnk\");\nvar $7d23478d77fbbf43$require$CubeTile = $4QGnk.Tile;\n\nvar $Yar88 = parcelRequire(\"Yar88\");\n\nvar $jSacE = parcelRequire(\"jSacE\");\n/**\n * @class FlashCubeRenderer\n * @implements Renderer\n * @classdesc\n *\n * A renderer for {@link CubeGeometry} and {@link RectilinearView}, appropriate\n * for a {@link FlashStage}.\n *\n * Most users do not need to instantiate this class. Renderers are created and\n * destroyed by {@link Stage} as necessary.\n */ function $7d23478d77fbbf43$var$FlashCubeRenderer(flashElement, layerId, quirks) {\n this.constructor.super_.call(this, flashElement, layerId, quirks, $7d23478d77fbbf43$require$CubeTile);\n this._flashTileList = [];\n}\n$Yar88($7d23478d77fbbf43$var$FlashCubeRenderer, $de14n);\n$7d23478d77fbbf43$var$FlashCubeRenderer.prototype._renderOnFlash = function(layer, rect) {\n var flashElement = this._flashElement;\n var layerId = this._layerId;\n var padSize = this._quirks.padSize;\n var tileList = this._tileList;\n var textureMap = this._textureMap;\n var flashTileList = this._flashTileList;\n flashTileList.length = 0;\n for(var i = 0; i < tileList.length; i++){\n var tile = tileList[i];\n var texture = textureMap.get(tile);\n if (!texture) throw new Error(\"Rendering tile with missing texture\");\n // Get padding sizes.\n var padTop = tile.padTop() ? padSize : 0;\n var padBottom = tile.padBottom() ? padSize : 0;\n var padLeft = tile.padLeft() ? padSize : 0;\n var padRight = tile.padRight() ? padSize : 0;\n flashTileList.push({\n textureId: texture._textureId,\n face: tile.face,\n width: tile.width(),\n height: tile.height(),\n centerX: tile.centerX(),\n centerY: tile.centerY(),\n rotX: $jSacE(tile.rotX()),\n rotY: $jSacE(tile.rotY()),\n levelSize: tile.levelWidth(),\n padTop: padTop,\n padBottom: padBottom,\n padLeft: padLeft,\n padRight: padRight\n });\n }\n // Get viewport position and size.\n var stageWidth = this._flashElement.clientWidth;\n var stageHeight = this._flashElement.clientHeight;\n var viewportX = stageWidth * rect.x;\n var viewportY = stageHeight * rect.y;\n var viewportWidth = stageWidth * rect.width;\n var viewportHeight = stageHeight * rect.height;\n // Get opacity value.\n var opacity = 1.0;\n var effects = layer.effects();\n if (effects && effects.opacity != null) opacity = effects.opacity;\n // Get view parameters.\n var view = layer.view();\n var yaw = view.yaw();\n var pitch = view.pitch();\n var roll = view.roll();\n var fov = view.fov();\n flashElement.drawCubeTiles(layerId, viewportWidth, viewportHeight, viewportX, viewportY, opacity, yaw, pitch, roll, fov, flashTileList);\n};\nmodule.exports = $7d23478d77fbbf43$var$FlashCubeRenderer;\n\n});\nparcelRegister(\"de14n\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $jOYf3 = parcelRequire(\"jOYf3\");\n\nvar $2Xxut = parcelRequire(\"2Xxut\");\nfunction $9a0d699020b8474a$var$tileCmp(a, b) {\n return a.cmp(b);\n}\nfunction $9a0d699020b8474a$var$FlashBaseRenderer(flashElement, layerId, quirks, tileClass) {\n this._flashElement = flashElement;\n this._layerId = layerId;\n this._quirks = quirks;\n this._tileList = [];\n this._textureMap = new $jOYf3();\n // Whether the Flash layer for this renderer has already been created\n // by calling flashElement.createLayer(). Note that we cannot do this\n // right here because Flash may not be initialized yet.\n this._layerCreated = false;\n}\n$9a0d699020b8474a$var$FlashBaseRenderer.prototype.destroy = function() {\n if (this._layerCreated) this._flashElement.destroyLayer(this._layerId);\n $2Xxut(this);\n};\n$9a0d699020b8474a$var$FlashBaseRenderer.prototype.startLayer = function(layer, rect) {\n if (!this._flashElement.isReady || !this._flashElement.isReady()) return;\n if (!this._layerCreated) {\n this._flashElement.createLayer(this._layerId);\n this._layerCreated = true;\n }\n this._tileList.length = 0;\n this._textureMap.clear();\n};\n$9a0d699020b8474a$var$FlashBaseRenderer.prototype.renderTile = function(tile, texture) {\n this._tileList.push(tile);\n this._textureMap.set(tile, texture);\n};\n$9a0d699020b8474a$var$FlashBaseRenderer.prototype.endLayer = function(layer, rect) {\n if (!this._flashElement.isReady || !this._flashElement.isReady()) return;\n // Sort tiles so they are rendered in an order coherent with their padding.\n var tileList = this._tileList;\n tileList.sort($9a0d699020b8474a$var$tileCmp);\n this._renderOnFlash(layer, rect);\n};\nmodule.exports = $9a0d699020b8474a$var$FlashBaseRenderer;\n\n});\n\nparcelRegister(\"jSacE\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n/**\n * @memberof util\n * @param {number} rad\n * @return {number}\n */ function $e77af99022ab2a34$var$radToDeg(rad) {\n return rad * 180 / Math.PI;\n}\nmodule.exports = $e77af99022ab2a34$var$radToDeg;\n\n});\n\n\nparcelRegister(\"51qT1\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $de14n = parcelRequire(\"de14n\");\n\nvar $l1BkT = parcelRequire(\"l1BkT\");\nvar $3a81e6d75d4723be$require$FlatTile = $l1BkT.Tile;\n\nvar $Yar88 = parcelRequire(\"Yar88\");\n/**\n * @class FlashFlatRenderer\n * @implements Renderer\n * @classdesc\n *\n * A renderer for {@link FlatGeometry} and {@link FlatView}, appropriate for a\n * {@link FlashStage}.\n *\n * Most users do not need to instantiate this class. Renderers are created and\n * destroyed by {@link Stage} as necessary.\n */ function $3a81e6d75d4723be$var$FlashFlatRenderer(flashElement, layerId, quirks) {\n this.constructor.super_.call(this, flashElement, layerId, quirks, $3a81e6d75d4723be$require$FlatTile);\n this._flashTileList = [];\n}\n$Yar88($3a81e6d75d4723be$var$FlashFlatRenderer, $de14n);\n$3a81e6d75d4723be$var$FlashFlatRenderer.prototype._renderOnFlash = function(layer, rect) {\n var flashElement = this._flashElement;\n var layerId = this._layerId;\n var padSize = this._quirks.padSize;\n var tileList = this._tileList;\n var textureMap = this._textureMap;\n var flashTileList = this._flashTileList;\n flashTileList.length = 0;\n for(var i = 0; i < tileList.length; i++){\n var tile = tileList[i];\n var texture = textureMap.get(tile);\n if (!texture) throw new Error(\"Rendering tile with missing texture\");\n // Get padding sizes.\n var padTop = tile.padTop() ? padSize : 0;\n var padBottom = tile.padBottom() ? padSize : 0;\n var padLeft = tile.padLeft() ? padSize : 0;\n var padRight = tile.padRight() ? padSize : 0;\n flashTileList.push({\n textureId: texture._textureId,\n width: tile.width(),\n height: tile.height(),\n centerX: tile.centerX(),\n centerY: tile.centerY(),\n scaleX: tile.scaleX(),\n scaleY: tile.scaleY(),\n levelWidth: tile.levelWidth(),\n levelHeight: tile.levelHeight(),\n padTop: padTop,\n padBottom: padBottom,\n padLeft: padLeft,\n padRight: padRight\n });\n }\n // Get viewport position and size.\n var stageWidth = this._flashElement.clientWidth;\n var stageHeight = this._flashElement.clientHeight;\n var viewportX = stageWidth * rect.x;\n var viewportY = stageHeight * rect.y;\n var viewportWidth = stageWidth * rect.width;\n var viewportHeight = stageHeight * rect.height;\n // Get opacity value.\n var opacity = 1.0;\n var effects = layer.effects();\n if (effects && effects.opacity != null) opacity = effects.opacity;\n // Get view parameters.\n var view = layer.view();\n var x = view.x();\n var y = view.y();\n var zoomX = view._zoomX();\n var zoomY = view._zoomY();\n flashElement.drawFlatTiles(layerId, viewportWidth, viewportHeight, viewportX, viewportY, opacity, x, y, zoomX, zoomY, flashTileList);\n};\nmodule.exports = $3a81e6d75d4723be$var$FlashFlatRenderer;\n\n});\n\nparcelRegister(\"kjZKr\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $b7h3a = parcelRequire(\"b7h3a\");\n\nvar $6yDfP = parcelRequire(\"6yDfP\");\n\nvar $iIThc = parcelRequire(\"iIThc\");\n\nvar $48tXO = parcelRequire(\"48tXO\");\n\nvar $aYyo6 = parcelRequire(\"aYyo6\");\n\nvar $aK6y2 = parcelRequire(\"aK6y2\");\n\nvar $51qT1 = parcelRequire(\"51qT1\");\n/**\n * Registers all known renderers for the given stage type into that stage.\n * Most users will not need to register renderers, as {@link Viewer} does it for\n * them.\n *\n * @param {Stage} stage The stage where the renderers are to be registered.\n * @throws An error if the stage type is unknown.\n */ function $ecb57adc64cae261$var$registerDefaultRenderers(stage) {\n switch(stage.type){\n case \"webgl\":\n stage.registerRenderer(\"flat\", \"flat\", $6yDfP);\n stage.registerRenderer(\"cube\", \"rectilinear\", $b7h3a);\n stage.registerRenderer(\"equirect\", \"rectilinear\", $iIThc);\n break;\n case \"css\":\n stage.registerRenderer(\"flat\", \"flat\", $aYyo6);\n stage.registerRenderer(\"cube\", \"rectilinear\", $48tXO);\n break;\n case \"flash\":\n stage.registerRenderer(\"flat\", \"flat\", $51qT1);\n stage.registerRenderer(\"cube\", \"rectilinear\", $aK6y2);\n break;\n default:\n throw new Error(\"Unknown stage type: \" + stage.type);\n }\n}\nmodule.exports = $ecb57adc64cae261$var$registerDefaultRenderers;\n\n});\n\nparcelRegister(\"bI46y\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $Yar88 = parcelRequire(\"Yar88\");\n\nvar $4j7qz = parcelRequire(\"4j7qz\");\n\nvar $3nhrd = parcelRequire(\"3nhrd\");\n\nvar $4rFjs = parcelRequire(\"4rFjs\");\n\nvar $4tCa7 = parcelRequire(\"4tCa7\");\n\nvar $fXp6t = parcelRequire(\"fXp6t\");\n/**\n * @class EquirectTile\n * @implements Tile\n * @classdesc\n *\n * A tile in an @{EquirectGeometry}.\n */ function $8866fcddc892b476$var$EquirectTile(z, geometry) {\n this.z = z;\n this._geometry = geometry;\n this._level = geometry.levelList[z];\n}\n$8866fcddc892b476$var$EquirectTile.prototype.rotX = function() {\n return 0;\n};\n$8866fcddc892b476$var$EquirectTile.prototype.rotY = function() {\n return 0;\n};\n$8866fcddc892b476$var$EquirectTile.prototype.centerX = function() {\n return 0.5;\n};\n$8866fcddc892b476$var$EquirectTile.prototype.centerY = function() {\n return 0.5;\n};\n$8866fcddc892b476$var$EquirectTile.prototype.scaleX = function() {\n return 1;\n};\n$8866fcddc892b476$var$EquirectTile.prototype.scaleY = function() {\n return 1;\n};\n$8866fcddc892b476$var$EquirectTile.prototype.width = function() {\n return this._level.tileWidth();\n};\n$8866fcddc892b476$var$EquirectTile.prototype.height = function() {\n return this._level.tileHeight();\n};\n$8866fcddc892b476$var$EquirectTile.prototype.levelWidth = function() {\n return this._level.width();\n};\n$8866fcddc892b476$var$EquirectTile.prototype.levelHeight = function() {\n return this._level.height();\n};\n$8866fcddc892b476$var$EquirectTile.prototype.atTopLevel = function() {\n return this.z === 0;\n};\n$8866fcddc892b476$var$EquirectTile.prototype.atBottomLevel = function() {\n return this.z === this._geometry.levelList.length - 1;\n};\n$8866fcddc892b476$var$EquirectTile.prototype.atTopEdge = function() {\n return true;\n};\n$8866fcddc892b476$var$EquirectTile.prototype.atBottomEdge = function() {\n return true;\n};\n$8866fcddc892b476$var$EquirectTile.prototype.atLeftEdge = function() {\n return true;\n};\n$8866fcddc892b476$var$EquirectTile.prototype.atRightEdge = function() {\n return true;\n};\n$8866fcddc892b476$var$EquirectTile.prototype.padTop = function() {\n return false;\n};\n$8866fcddc892b476$var$EquirectTile.prototype.padBottom = function() {\n return false;\n};\n$8866fcddc892b476$var$EquirectTile.prototype.padLeft = function() {\n return false;\n};\n$8866fcddc892b476$var$EquirectTile.prototype.padRight = function() {\n return false;\n};\n$8866fcddc892b476$var$EquirectTile.prototype.parent = function() {\n if (this.atTopLevel()) return null;\n return new $8866fcddc892b476$var$EquirectTile(this.z - 1, this._geometry);\n};\n$8866fcddc892b476$var$EquirectTile.prototype.children = function(result) {\n if (this.atBottomLevel()) return null;\n result = result || [];\n result.push(new $8866fcddc892b476$var$EquirectTile(this.z + 1, this._geometry));\n return result;\n};\n$8866fcddc892b476$var$EquirectTile.prototype.neighbors = function() {\n return [];\n};\n$8866fcddc892b476$var$EquirectTile.prototype.hash = function() {\n return $4j7qz(this.z);\n};\n$8866fcddc892b476$var$EquirectTile.prototype.equals = function(that) {\n return this.geometry === that.geometry && this.z === that.z;\n};\n$8866fcddc892b476$var$EquirectTile.prototype.cmp = function(that) {\n return $3nhrd(this.z, that.z);\n};\n$8866fcddc892b476$var$EquirectTile.prototype.str = function() {\n return \"EquirectTile(\" + tile.z + \")\";\n};\nfunction $8866fcddc892b476$var$EquirectLevel(levelProperties) {\n this.constructor.super_.call(this, levelProperties);\n this._width = levelProperties.width;\n}\n$Yar88($8866fcddc892b476$var$EquirectLevel, $4tCa7);\n$8866fcddc892b476$var$EquirectLevel.prototype.width = function() {\n return this._width;\n};\n$8866fcddc892b476$var$EquirectLevel.prototype.height = function() {\n return this._width / 2;\n};\n$8866fcddc892b476$var$EquirectLevel.prototype.tileWidth = function() {\n return this._width;\n};\n$8866fcddc892b476$var$EquirectLevel.prototype.tileHeight = function() {\n return this._width / 2;\n};\n/**\n * @class EquirectGeometry\n * @implements Geometry\n * @classdesc\n *\n * A {@link Geometry} implementation suitable for equirectangular images with a\n * 2:1 aspect ratio.\n *\n * @param {Object[]} levelPropertiesList Level description\n * @param {number} levelPropertiesList[].width Level width in pixels\n*/ function $8866fcddc892b476$var$EquirectGeometry(levelPropertiesList) {\n if ($fXp6t(levelPropertiesList) !== \"array\") throw new Error(\"Level list must be an array\");\n this.levelList = $4rFjs.makeLevelList(levelPropertiesList, $8866fcddc892b476$var$EquirectLevel);\n this.selectableLevelList = $4rFjs.makeSelectableLevelList(this.levelList);\n}\n$8866fcddc892b476$var$EquirectGeometry.prototype.maxTileSize = function() {\n var maxTileSize = 0;\n for(var i = 0; i < this.levelList.length; i++){\n var level = this.levelList[i];\n maxTileSize = Math.max(maxTileSize, level.tileWidth, level.tileHeight);\n }\n return maxTileSize;\n};\n$8866fcddc892b476$var$EquirectGeometry.prototype.levelTiles = function(level, result) {\n var levelIndex = this.levelList.indexOf(level);\n result = result || [];\n result.push(new $8866fcddc892b476$var$EquirectTile(levelIndex, this));\n return result;\n};\n$8866fcddc892b476$var$EquirectGeometry.prototype.visibleTiles = function(view, level, result) {\n var tile1 = new $8866fcddc892b476$var$EquirectTile(this.levelList.indexOf(level), this);\n result = result || [];\n result.length = 0;\n result.push(tile1);\n};\n$8866fcddc892b476$var$EquirectGeometry.Tile = $8866fcddc892b476$var$EquirectGeometry.prototype.Tile = $8866fcddc892b476$var$EquirectTile;\n$8866fcddc892b476$var$EquirectGeometry.type = $8866fcddc892b476$var$EquirectGeometry.prototype.type = \"equirect\";\n$8866fcddc892b476$var$EquirectTile.type = $8866fcddc892b476$var$EquirectTile.prototype.type = \"equirect\";\nmodule.exports = $8866fcddc892b476$var$EquirectGeometry;\n\n});\n\nparcelRegister(\"63xsq\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $6mia6 = parcelRequire(\"6mia6\");\n\nvar $c3mW8 = parcelRequire(\"c3mW8\");\nvar $8QvoZ = parcelRequire(\"8QvoZ\");\nvar $468cf9d9bfd41e18$require$mat4 = $c3mW8;\n\nvar $c3mW8 = parcelRequire(\"c3mW8\");\nvar $8QvoZ = parcelRequire(\"8QvoZ\");\nvar $468cf9d9bfd41e18$require$vec4 = $8QvoZ;\n\nvar $lNra6 = parcelRequire(\"lNra6\");\n\nvar $hmySL = parcelRequire(\"hmySL\");\n\nvar $iZgBB = parcelRequire(\"iZgBB\");\n\nvar $0OTzd = parcelRequire(\"0OTzd\");\n\nvar $eCQUD = parcelRequire(\"eCQUD\");\n\nvar $asoyN = parcelRequire(\"asoyN\");\n\nvar $arsG2 = parcelRequire(\"arsG2\");\n\nvar $2Xxut = parcelRequire(\"2Xxut\");\n// Default viewport dimensions.\n// Start with zero to ensure that those values are handled correctly.\nvar $468cf9d9bfd41e18$var$defaultWidth = 0;\nvar $468cf9d9bfd41e18$var$defaultHeight = 0;\n// Default view parameters.\nvar $468cf9d9bfd41e18$var$defaultYaw = 0;\nvar $468cf9d9bfd41e18$var$defaultPitch = 0;\nvar $468cf9d9bfd41e18$var$defaultRoll = 0;\nvar $468cf9d9bfd41e18$var$defaultFov = Math.PI / 4;\nvar $468cf9d9bfd41e18$var$defaultProjectionCenterX = 0;\nvar $468cf9d9bfd41e18$var$defaultProjectionCenterY = 0;\n// A fov of exactly 0 or π breaks some computations, so we constrain it to the\n// [fovLimitEpsilon, π - fovLimitEpsilon] interval. We use 6 decimal places for\n// the epsilon value to avoid broken rendering due to loss of precision in\n// floating point computations.\nvar $468cf9d9bfd41e18$var$fovLimitEpsilon = 0.000001;\n/**\n * @interface RectilinearViewParams\n *\n * A camera configuration for a {@link RectilinearView}.\n *\n * @property {number} yaw The yaw angle, in the [-π, π] range.\n * When `yaw < 0`, the view rotates to the left.\n * When `yaw > 0`, the view rotates to the right.\n *\n * @property {number} pitch The pitch angle, in the [-π, π] range.\n * When `pitch < 0`, the view rotates downwards.\n * When `pitch > 0`, the view rotates upwards.\n *\n * @property {number} roll The roll angle, in the [-π, π] range.\n * When `roll < 0`, the view rotates clockwise.\n * When `roll > 0`, the view rotates counter-clockwise.\n *\n * @property {fov} fov The vertical field of view, in the [0, π] range.\n */ /**\n * @interface RectilinearViewCoords\n *\n * The position of a point in a 360° image.\n *\n * @property {number} yaw The yaw angle, in the [-π, π] range.\n * @property {number} pitch The pitch angle, in the [-π, π] range.\n */ /**\n * @typedef {function} RectilinearViewLimiter\n *\n * View limiter for a {@link RectilinearView}.\n *\n * A view limiter is a function that receives a {@link RectilinearViewParams}\n * object, optionally modifies it in place, and returns it. It can be used to\n * enforce constraints on the view parameters.\n *\n * See {@link RectilinearView.limit} for commonly used limiters. They may be\n * composed together or with user-defined limiters with {@link util.compose}.\n *\n * @param {RectilinearViewParams} params\n * @return {RectilinearViewParams}\n */ /**\n * @class RectilinearView\n * @implements View\n * @classdesc\n *\n * A {@link View} implementing a rectilinear projection for 360° images.\n *\n * @param {RectilinearViewParams=} params The initial view parameters. If\n * unspecified, defaults to `{yaw: 0, pitch: 0, roll: 0, fov: Math.PI/4 }`.\n * @param {RectilinearViewLimiter=} limiter The view limiter. If unspecified,\n * no view limiting is applied. See {@link RectilinearView.limit} for\n * commonly used limiters.\n */ function $468cf9d9bfd41e18$var$RectilinearView(params, limiter) {\n // The initial values for the view parameters.\n this._yaw = params && params.yaw != null ? params.yaw : $468cf9d9bfd41e18$var$defaultYaw;\n this._pitch = params && params.pitch != null ? params.pitch : $468cf9d9bfd41e18$var$defaultPitch;\n this._roll = params && params.roll != null ? params.roll : $468cf9d9bfd41e18$var$defaultRoll;\n this._fov = params && params.fov != null ? params.fov : $468cf9d9bfd41e18$var$defaultFov;\n this._width = params && params.width != null ? params.width : $468cf9d9bfd41e18$var$defaultWidth;\n this._height = params && params.height != null ? params.height : $468cf9d9bfd41e18$var$defaultHeight;\n this._projectionCenterX = params && params.projectionCenterX != null ? params.projectionCenterX : $468cf9d9bfd41e18$var$defaultProjectionCenterX;\n this._projectionCenterY = params && params.projectionCenterY != null ? params.projectionCenterY : $468cf9d9bfd41e18$var$defaultProjectionCenterY;\n // The initial value for the view limiter.\n this._limiter = limiter || null;\n // The last calculated projection matrix and its inverse.\n this._projMatrix = $468cf9d9bfd41e18$require$mat4.create();\n this._invProjMatrix = $468cf9d9bfd41e18$require$mat4.create();\n // The last calculated view frustum.\n this._frustum = [\n $468cf9d9bfd41e18$require$vec4.create(),\n $468cf9d9bfd41e18$require$vec4.create(),\n $468cf9d9bfd41e18$require$vec4.create(),\n $468cf9d9bfd41e18$require$vec4.create(),\n $468cf9d9bfd41e18$require$vec4.create() // camera\n ];\n // Whether the projection matrices and the view frustum need to be updated.\n this._projectionChanged = true;\n // Temporary variables used for calculations.\n this._params = {};\n this._fovs = {};\n this._tmpVec = $468cf9d9bfd41e18$require$vec4.create();\n // Force view limiting on initial parameters.\n this._update();\n}\n$6mia6($468cf9d9bfd41e18$var$RectilinearView);\n/**\n * Destructor.\n */ $468cf9d9bfd41e18$var$RectilinearView.prototype.destroy = function() {\n $2Xxut(this);\n};\n/**\n * Get the yaw angle.\n * @return {number}\n */ $468cf9d9bfd41e18$var$RectilinearView.prototype.yaw = function() {\n return this._yaw;\n};\n/**\n * Get the pitch angle.\n * @return {number}\n */ $468cf9d9bfd41e18$var$RectilinearView.prototype.pitch = function() {\n return this._pitch;\n};\n/**\n * Get the roll angle.\n * @return {number}\n */ $468cf9d9bfd41e18$var$RectilinearView.prototype.roll = function() {\n return this._roll;\n};\n$468cf9d9bfd41e18$var$RectilinearView.prototype.projectionCenterX = function() {\n return this._projectionCenterX;\n};\n$468cf9d9bfd41e18$var$RectilinearView.prototype.projectionCenterY = function() {\n return this._projectionCenterY;\n};\n/**\n * Get the fov value.\n * @return {number}\n */ $468cf9d9bfd41e18$var$RectilinearView.prototype.fov = function() {\n return this._fov;\n};\n/**\n * Get the viewport width.\n * @return {number}\n */ $468cf9d9bfd41e18$var$RectilinearView.prototype.width = function() {\n return this._width;\n};\n/**\n * Get the viewport height.\n * @return {number}\n */ $468cf9d9bfd41e18$var$RectilinearView.prototype.height = function() {\n return this._height;\n};\n/**\n * Get the viewport dimensions. If an argument is supplied, it is filled in with\n * the result and returned. Otherwise, a fresh object is filled in and returned.\n * @param {Size=} size\n * @return {Size}\n */ $468cf9d9bfd41e18$var$RectilinearView.prototype.size = function(size) {\n size = size || {};\n size.width = this._width;\n size.height = this._height;\n return size;\n};\n/**\n * Get the view parameters. If an argument is supplied, it is filled in with the\n * result and returned. Otherwise, a fresh object is filled in and returned.\n * @param {RectilinearViewParams=} obj\n * @return {RectilinearViewParams}\n */ $468cf9d9bfd41e18$var$RectilinearView.prototype.parameters = function(params) {\n params = params || {};\n params.yaw = this._yaw;\n params.pitch = this._pitch;\n params.roll = this._roll;\n params.fov = this._fov;\n return params;\n};\n/**\n * Get the view limiter, or null if unset.\n * @return {?RectilinearViewLimiter}\n */ $468cf9d9bfd41e18$var$RectilinearView.prototype.limiter = function() {\n return this._limiter;\n};\n/**\n * Set the yaw angle.\n * @param {number} yaw\n */ $468cf9d9bfd41e18$var$RectilinearView.prototype.setYaw = function(yaw) {\n this._resetParams();\n this._params.yaw = yaw;\n this._update(this._params);\n};\n/**\n * Set the pitch angle.\n * @param {number} pitch\n */ $468cf9d9bfd41e18$var$RectilinearView.prototype.setPitch = function(pitch) {\n this._resetParams();\n this._params.pitch = pitch;\n this._update(this._params);\n};\n/**\n * Set the roll angle.\n * @param {number} roll\n */ $468cf9d9bfd41e18$var$RectilinearView.prototype.setRoll = function(roll) {\n this._resetParams();\n this._params.roll = roll;\n this._update(this._params);\n};\n/**\n * Set the fov value.\n * @param {number} fov\n */ $468cf9d9bfd41e18$var$RectilinearView.prototype.setFov = function(fov) {\n this._resetParams();\n this._params.fov = fov;\n this._update(this._params);\n};\n$468cf9d9bfd41e18$var$RectilinearView.prototype.setProjectionCenterX = function(projectionCenterX) {\n this._resetParams();\n this._params.projectionCenterX = projectionCenterX;\n this._update(this._params);\n};\n$468cf9d9bfd41e18$var$RectilinearView.prototype.setProjectionCenterY = function(projectionCenterY) {\n this._resetParams();\n this._params.projectionCenterY = projectionCenterY;\n this._update(this._params);\n};\n/**\n * Add yawOffset to the current yaw value.\n * @param {number} yawOffset\n */ $468cf9d9bfd41e18$var$RectilinearView.prototype.offsetYaw = function(yawOffset) {\n this.setYaw(this._yaw + yawOffset);\n};\n/**\n * Add pitchOffset to the current pitch value.\n * @param {number} pitchOffset\n */ $468cf9d9bfd41e18$var$RectilinearView.prototype.offsetPitch = function(pitchOffset) {\n this.setPitch(this._pitch + pitchOffset);\n};\n/**\n * Add rollOffset to the current roll value.\n * @param {number} rollOffset\n */ $468cf9d9bfd41e18$var$RectilinearView.prototype.offsetRoll = function(rollOffset) {\n this.setRoll(this._roll + rollOffset);\n};\n/**\n * Add fovOffset to the current fov value.\n * @param {number} fovOffset\n */ $468cf9d9bfd41e18$var$RectilinearView.prototype.offsetFov = function(fovOffset) {\n this.setFov(this._fov + fovOffset);\n};\n/**\n * Set the viewport dimensions.\n * @param {Size} size\n */ $468cf9d9bfd41e18$var$RectilinearView.prototype.setSize = function(size) {\n this._resetParams();\n this._params.width = size.width;\n this._params.height = size.height;\n this._update(this._params);\n};\n/**\n * Set the view parameters. Unspecified parameters are left unchanged.\n * @param {RectilinearViewParameters} params\n */ $468cf9d9bfd41e18$var$RectilinearView.prototype.setParameters = function(params) {\n this._resetParams();\n this._params.yaw = params.yaw;\n this._params.pitch = params.pitch;\n this._params.roll = params.roll;\n this._params.fov = params.fov;\n this._params.projectionCenterX = params.projectionCenterX;\n this._params.projectionCenterY = params.projectionCenterY;\n this._update(this._params);\n};\n/**\n * Set the view limiter.\n * @param {?RectilinearViewLimiter} limiter The new limiter, or null to unset.\n */ $468cf9d9bfd41e18$var$RectilinearView.prototype.setLimiter = function(limiter) {\n this._limiter = limiter || null;\n this._update();\n};\n$468cf9d9bfd41e18$var$RectilinearView.prototype._resetParams = function() {\n var params = this._params;\n params.yaw = null;\n params.pitch = null;\n params.roll = null;\n params.fov = null;\n params.width = null;\n params.height = null;\n};\n$468cf9d9bfd41e18$var$RectilinearView.prototype._update = function(params) {\n // Avoid object allocation when no parameters are supplied.\n if (params == null) {\n this._resetParams();\n params = this._params;\n }\n // Save old parameters for later comparison.\n var oldYaw = this._yaw;\n var oldPitch = this._pitch;\n var oldRoll = this._roll;\n var oldFov = this._fov;\n var oldProjectionCenterX = this._projectionCenterX;\n var oldProjectionCenterY = this._projectionCenterY;\n var oldWidth = this._width;\n var oldHeight = this._height;\n // Fill in object with the new set of parameters to pass into the limiter.\n params.yaw = params.yaw != null ? params.yaw : oldYaw;\n params.pitch = params.pitch != null ? params.pitch : oldPitch;\n params.roll = params.roll != null ? params.roll : oldRoll;\n params.fov = params.fov != null ? params.fov : oldFov;\n params.width = params.width != null ? params.width : oldWidth;\n params.height = params.height != null ? params.height : oldHeight;\n params.projectionCenterX = params.projectionCenterX != null ? params.projectionCenterX : oldProjectionCenterX;\n params.projectionCenterY = params.projectionCenterY != null ? params.projectionCenterY : oldProjectionCenterY;\n // Apply view limiting when defined.\n if (this._limiter) {\n params = this._limiter(params);\n if (!params) throw new Error(\"Bad view limiter\");\n }\n // Normalize parameters.\n params = this._normalize(params);\n // Grab the limited parameters.\n var newYaw = params.yaw;\n var newPitch = params.pitch;\n var newRoll = params.roll;\n var newFov = params.fov;\n var newWidth = params.width;\n var newHeight = params.height;\n var newProjectionCenterX = params.projectionCenterX;\n var newProjectionCenterY = params.projectionCenterY;\n // Consistency check.\n if (!$0OTzd(newYaw) || !$0OTzd(newPitch) || !$0OTzd(newRoll) || !$0OTzd(newFov) || !$0OTzd(newWidth) || !$0OTzd(newHeight) || !$0OTzd(newProjectionCenterX) || !$0OTzd(newProjectionCenterY)) throw new Error(\"Bad view - suspect a broken limiter\");\n // Update parameters.\n this._yaw = newYaw;\n this._pitch = newPitch;\n this._roll = newRoll;\n this._fov = newFov;\n this._width = newWidth;\n this._height = newHeight;\n this._projectionCenterX = newProjectionCenterX;\n this._projectionCenterY = newProjectionCenterY;\n // Check whether the parameters changed and emit the corresponding events.\n if (newYaw !== oldYaw || newPitch !== oldPitch || newRoll !== oldRoll || newFov !== oldFov || newWidth !== oldWidth || newHeight !== oldHeight || newProjectionCenterX !== oldProjectionCenterX || newProjectionCenterY !== oldProjectionCenterY) {\n this._projectionChanged = true;\n this.emit(\"change\");\n }\n if (newWidth !== oldWidth || newHeight !== oldHeight) this.emit(\"resize\");\n};\n$468cf9d9bfd41e18$var$RectilinearView.prototype._normalize = function(params) {\n this._normalizeCoordinates(params);\n // Make sure that neither the horizontal nor the vertical fields of view\n // exceed π - fovLimitEpsilon.\n var hfovPi = $hmySL.htov(Math.PI, params.width, params.height);\n var maxFov = isNaN(hfovPi) ? Math.PI : Math.min(Math.PI, hfovPi);\n params.fov = $eCQUD(params.fov, $468cf9d9bfd41e18$var$fovLimitEpsilon, maxFov - $468cf9d9bfd41e18$var$fovLimitEpsilon);\n return params;\n};\n$468cf9d9bfd41e18$var$RectilinearView.prototype._normalizeCoordinates = function(params) {\n // Constrain yaw, pitch and roll to the [-π, π] interval.\n if (\"yaw\" in params) params.yaw = $iZgBB(params.yaw - Math.PI, -2 * Math.PI) + Math.PI;\n if (\"pitch\" in params) params.pitch = $iZgBB(params.pitch - Math.PI, -2 * Math.PI) + Math.PI;\n if (\"roll\" in params) params.roll = $iZgBB(params.roll - Math.PI, -2 * Math.PI) + Math.PI;\n return params;\n};\n/**\n * Normalize view coordinates so that they are the closest to the current view.\n * Useful for tweening the view through the shortest path. If a result argument\n * is supplied, it is filled in with the result and returned. Otherwise, a fresh\n * object is filled in and returned.\n *\n * @param {RectilinearViewCoords} coords The view coordinates.\n * @param {RectilinearViewCoords} result The result argument for the normalized\n * view coordinates.\n */ $468cf9d9bfd41e18$var$RectilinearView.prototype.normalizeToClosest = function(coords, result) {\n var viewYaw = this._yaw;\n var viewPitch = this._pitch;\n var coordYaw = coords.yaw;\n var coordPitch = coords.pitch;\n // Check if the yaw is closer after subtracting or adding a full circle.\n var prevYaw = coordYaw - 2 * Math.PI;\n var nextYaw = coordYaw + 2 * Math.PI;\n if (Math.abs(prevYaw - viewYaw) < Math.abs(coordYaw - viewYaw)) coordYaw = prevYaw;\n else if (Math.abs(nextYaw - viewYaw) < Math.abs(coordYaw - viewYaw)) coordYaw = nextYaw;\n // Check if the pitch is closer after subtracting or adding a full circle.\n var prevPitch = coordPitch - 2 * Math.PI;\n var nextPitch = coordPitch + 2 * Math.PI;\n if (Math.abs(prevPitch - viewPitch) < Math.abs(coordPitch - viewPitch)) coordPitch = prevPitch;\n else if (Math.abs(prevPitch - viewPitch) < Math.abs(coordPitch - viewPitch)) coordPitch = nextPitch;\n result = result || {};\n result.yaw = coordYaw;\n result.pitch = coordPitch;\n return result;\n};\n$468cf9d9bfd41e18$var$RectilinearView.prototype.updateWithControlParameters = function(parameters) {\n // axisScaledX and axisScaledY are scaled according to their own axis\n // x and y are scaled by the same value\n // If the viewport dimensions are zero, assume a square viewport\n // when converting from hfov to vfov.\n var vfov = this._fov;\n var hfov = $hmySL.vtoh(vfov, this._width, this._height);\n if (isNaN(hfov)) hfov = vfov;\n // TODO: revisit this after we rethink the control parameters.\n this.offsetYaw(parameters.axisScaledX * hfov + parameters.x * 2 * hfov + parameters.yaw);\n this.offsetPitch(parameters.axisScaledY * vfov + parameters.y * 2 * hfov + parameters.pitch);\n this.offsetRoll(-parameters.roll);\n this.offsetFov(parameters.zoom * vfov);\n};\n$468cf9d9bfd41e18$var$RectilinearView.prototype._updateProjection = function() {\n var projMatrix = this._projMatrix;\n var invProjMatrix = this._invProjMatrix;\n var frustum = this._frustum;\n if (this._projectionChanged) {\n var width = this._width;\n var height = this._height;\n var vfov = this._fov;\n var hfov = $hmySL.vtoh(vfov, width, height);\n var aspect = width / height;\n var projectionCenterX = this._projectionCenterX;\n var projectionCenterY = this._projectionCenterY;\n if (projectionCenterX !== 0 || projectionCenterY !== 0) {\n var offsetAngleX = Math.atan(projectionCenterX * 2 * Math.tan(hfov / 2));\n var offsetAngleY = Math.atan(projectionCenterY * 2 * Math.tan(vfov / 2));\n var fovs = this._fovs;\n fovs.leftDegrees = (hfov / 2 + offsetAngleX) * 180 / Math.PI;\n fovs.rightDegrees = (hfov / 2 - offsetAngleX) * 180 / Math.PI;\n fovs.upDegrees = (vfov / 2 + offsetAngleY) * 180 / Math.PI;\n fovs.downDegrees = (vfov / 2 - offsetAngleY) * 180 / Math.PI;\n $468cf9d9bfd41e18$require$mat4.perspectiveFromFieldOfView(projMatrix, fovs, -1, 1);\n } else $468cf9d9bfd41e18$require$mat4.perspective(projMatrix, vfov, aspect, -1, 1);\n $468cf9d9bfd41e18$require$mat4.rotateZ(projMatrix, projMatrix, this._roll);\n $468cf9d9bfd41e18$require$mat4.rotateX(projMatrix, projMatrix, this._pitch);\n $468cf9d9bfd41e18$require$mat4.rotateY(projMatrix, projMatrix, this._yaw);\n $468cf9d9bfd41e18$require$mat4.invert(invProjMatrix, projMatrix);\n this._matrixToFrustum(projMatrix, frustum);\n this._projectionChanged = false;\n }\n};\n$468cf9d9bfd41e18$var$RectilinearView.prototype._matrixToFrustum = function(p, f) {\n // Extract frustum planes from projection matrix.\n // http://www8.cs.umu.se/kurser/5DV051/HT12/lab/plane_extraction.pdf\n $468cf9d9bfd41e18$require$vec4.set(f[0], p[3] + p[0], p[7] + p[4], p[11] + p[8], 0); // left\n $468cf9d9bfd41e18$require$vec4.set(f[1], p[3] - p[0], p[7] - p[4], p[11] - p[8], 0); // right\n $468cf9d9bfd41e18$require$vec4.set(f[2], p[3] + p[1], p[7] + p[5], p[11] + p[9], 0); // top\n $468cf9d9bfd41e18$require$vec4.set(f[3], p[3] - p[1], p[7] - p[5], p[11] - p[9], 0); // bottom\n $468cf9d9bfd41e18$require$vec4.set(f[4], p[3] + p[2], p[7] + p[6], p[11] + p[10], 0); // camera\n};\n/**\n * Returns the projection matrix for the current view.\n * @returns {mat4}\n */ $468cf9d9bfd41e18$var$RectilinearView.prototype.projection = function() {\n this._updateProjection();\n return this._projMatrix;\n};\n/**\n * Returns the inverse projection matrix for the current view.\n * @returns {mat4}\n */ $468cf9d9bfd41e18$var$RectilinearView.prototype.inverseProjection = function() {\n this._updateProjection();\n return this._invProjMatrix;\n};\n/**\n * Return whether the view frustum intersects the given rectangle.\n *\n * This function may return false positives, but never false negatives.\n * It is used for frustum culling, i.e., excluding invisible tiles from the\n * rendering process.\n *\n * @param {vec2[]} rectangle The vertices of the rectangle.\n */ $468cf9d9bfd41e18$var$RectilinearView.prototype.intersects = function(rectangle) {\n this._updateProjection();\n var frustum = this._frustum;\n var vertex = this._tmpVec;\n // Check whether the rectangle is on the outer side of any of the frustum\n // planes. This is a sufficient condition, though not necessary, for the\n // rectangle to be completely outside the frustum.\n for(var i = 0; i < frustum.length; i++){\n var plane = frustum[i];\n var inside = false;\n for(var j = 0; j < rectangle.length; j++){\n var corner = rectangle[j];\n $468cf9d9bfd41e18$require$vec4.set(vertex, corner[0], corner[1], corner[2], 0);\n if ($468cf9d9bfd41e18$require$vec4.dot(plane, vertex) >= 0) inside = true;\n }\n if (!inside) return false;\n }\n return true;\n};\n/**\n * Select the level that should be used to render the view.\n * @param {Level[]} levelList the list of levels from which to select.\n * @return {Level} the selected level.\n */ $468cf9d9bfd41e18$var$RectilinearView.prototype.selectLevel = function(levelList) {\n // Multiply the viewport width by the device pixel ratio to get the required\n // horizontal resolution in pixels.\n //\n // Calculate the fraction of a cube face that would be visible given the\n // current vertical field of view. Then, for each level, multiply by the\n // level height to get the height in pixels of the portion that would be\n // visible.\n //\n // Search for the smallest level that satifies the the required height,\n // falling back on the largest level if none do.\n var requiredPixels = $lNra6() * this._height;\n var coverFactor = Math.tan(0.5 * this._fov);\n for(var i = 0; i < levelList.length; i++){\n var level = levelList[i];\n if (coverFactor * level.height() >= requiredPixels) return level;\n }\n return levelList[levelList.length - 1];\n};\n/**\n * Convert view parameters into screen position. If a result argument is\n * provided, it is filled in and returned. Otherwise, a fresh object is filled\n * in and returned.\n *\n * @param {RectilinearViewCoords} coords The view coordinates.\n * @param {Coords=} result The result argument for the screen coordinates.\n * @return {Coords}\n */ $468cf9d9bfd41e18$var$RectilinearView.prototype.coordinatesToScreen = function(coords, result) {\n var ray = this._tmpVec;\n if (!result) result = {};\n var width = this._width;\n var height = this._height;\n // Undefined on a null viewport.\n if (width <= 0 || height <= 0) {\n result.x = null;\n result.y = null;\n return null;\n }\n // Compute view ray pointing into the (yaw, pitch) direction.\n var yaw = coords.yaw;\n var pitch = coords.pitch;\n var x = Math.sin(yaw) * Math.cos(pitch);\n var y = -Math.sin(coords.pitch);\n var z = -Math.cos(yaw) * Math.cos(pitch);\n $468cf9d9bfd41e18$require$vec4.set(ray, x, y, z, 1);\n // Project view ray onto clip space.\n $468cf9d9bfd41e18$require$vec4.transformMat4(ray, ray, this.projection());\n // w in clip space equals -z in camera space.\n if (ray[3] >= 0) {\n // Point is in front of camera.\n // Convert to viewport coordinates.\n result.x = width * (ray[0] / ray[3] + 1) / 2;\n result.y = height * (1 - ray[1] / ray[3]) / 2;\n } else {\n // Point is behind camera.\n result.x = null;\n result.y = null;\n return null;\n }\n return result;\n};\n/**\n * Convert screen coordinates into view coordinates. If a result argument is\n * provided, it is filled in with the result and returned. Otherwise, a fresh\n * object is filled in and returned.\n *\n * @param {Coords} coords The screen coordinates.\n * @param {RectilinearViewCoords=} result The view coordinates.\n * @return {RectilinearViewCoords}\n */ $468cf9d9bfd41e18$var$RectilinearView.prototype.screenToCoordinates = function(coords, result) {\n var ray = this._tmpVec;\n if (!result) result = {};\n var width = this._width;\n var height = this._height;\n // Convert viewport coordinates to clip space.\n var vecx = 2 * coords.x / width - 1;\n var vecy = 1 - 2 * coords.y / height;\n $468cf9d9bfd41e18$require$vec4.set(ray, vecx, vecy, 1, 1);\n // Project back to world space.\n $468cf9d9bfd41e18$require$vec4.transformMat4(ray, ray, this.inverseProjection());\n // Convert to spherical coordinates.\n var r = Math.sqrt(ray[0] * ray[0] + ray[1] * ray[1] + ray[2] * ray[2]);\n result.yaw = Math.atan2(ray[0], -ray[2]);\n result.pitch = Math.acos(ray[1] / r) - Math.PI / 2;\n this._normalizeCoordinates(result);\n return result;\n};\n/**\n * Calculate the perspective transform required to position an element with\n * perspective.\n *\n * @param {RectilinearViewCoords} coords The view coordinates.\n * @param {number} radius Radius of the sphere embedding the element.\n * @param {string} extraTransforms Extra transformations to be applied after\n * the element is positioned. This may be used to rotate the element.\n * @return {string} The CSS 3D transform to be applied to the element.\n */ $468cf9d9bfd41e18$var$RectilinearView.prototype.coordinatesToPerspectiveTransform = function(coords, radius, extraTransforms) {\n extraTransforms = extraTransforms || \"\";\n var height = this._height;\n var width = this._width;\n var fov = this._fov;\n var perspective = 0.5 * height / Math.tan(fov / 2);\n var transform = \"\";\n // Center hotspot in screen.\n transform += \"translateX(\" + $asoyN(width / 2) + \"px) \";\n transform += \"translateY(\" + $asoyN(height / 2) + \"px) \";\n transform += \"translateX(-50%) translateY(-50%) \";\n // Set the perspective depth.\n transform += \"perspective(\" + $asoyN(perspective) + \"px) \";\n transform += \"translateZ(\" + $asoyN(perspective) + \"px) \";\n // Set the camera rotation.\n transform += \"rotateZ(\" + $asoyN(-this._roll) + \"rad) \";\n transform += \"rotateX(\" + $asoyN(-this._pitch) + \"rad) \";\n transform += \"rotateY(\" + $asoyN(this._yaw) + \"rad) \";\n // Set the hotspot rotation.\n transform += \"rotateY(\" + $asoyN(-coords.yaw) + \"rad) \";\n transform += \"rotateX(\" + $asoyN(coords.pitch) + \"rad) \";\n // Move back to sphere.\n transform += \"translateZ(\" + $asoyN(-radius) + \"px) \";\n // Apply the extra transformations\n transform += extraTransforms + \" \";\n return transform;\n};\n/**\n * Factory functions for view limiters. See {@link RectilinearViewLimiter}.\n * @namespace\n */ $468cf9d9bfd41e18$var$RectilinearView.limit = {\n /**\n * Returns a view limiter that constrains the yaw angle.\n * @param {number} min The minimum yaw value.\n * @param {number} max The maximum yaw value.\n * @return {RectilinearViewLimiter}\n */ yaw: function(min, max) {\n return function limitYaw(params) {\n params.yaw = $eCQUD(params.yaw, min, max);\n return params;\n };\n },\n /**\n * Returns a view limiter that constrains the pitch angle.\n * @param {number} min The minimum pitch value.\n * @param {number} max The maximum pitch value.\n * @return {RectilinearViewLimiter}\n */ pitch: function(min, max) {\n return function limitPitch(params) {\n params.pitch = $eCQUD(params.pitch, min, max);\n return params;\n };\n },\n /**\n * Returns a view limiter that constrains the roll angle.\n * @param {number} min The minimum roll value.\n * @param {number} max The maximum roll value.\n * @return {RectilinearViewLimiter}\n */ roll: function(min, max) {\n return function limitRoll(params) {\n params.roll = $eCQUD(params.roll, min, max);\n return params;\n };\n },\n /**\n * Returns a view limiter that constrains the horizontal field of view.\n * @param {number} min The minimum horizontal field of view.\n * @param {number} max The maximum horizontal field of view.\n * @return {RectilinearViewLimiter}\n */ hfov: function(min, max) {\n return function limitHfov(params) {\n var width = params.width;\n var height = params.height;\n if (width > 0 && height > 0) {\n var vmin = $hmySL.htov(min, width, height);\n var vmax = $hmySL.htov(max, width, height);\n params.fov = $eCQUD(params.fov, vmin, vmax);\n }\n return params;\n };\n },\n /**\n * Returns a view limiter that constrains the vertical field of view.\n * @param {number} min The minimum vertical field of view.\n * @param {number} max The maximum vertical field of view.\n * @return {RectilinearViewLimiter}\n */ vfov: function(min, max) {\n return function limitVfov(params) {\n params.fov = $eCQUD(params.fov, min, max);\n return params;\n };\n },\n /**\n * Returns a view limiter that prevents zooming in beyond the given\n * resolution.\n * @param {number} size The cube face width in pixels or, equivalently, one\n * fourth of the equirectangular width in pixels.\n * @return {RectilinearViewLimiter}\n */ resolution: function(size) {\n return function limitResolution(params) {\n var height = params.height;\n if (height) {\n var requiredPixels = $lNra6() * height;\n var minFov = 2 * Math.atan(requiredPixels / size);\n params.fov = $eCQUD(params.fov, minFov, Infinity);\n }\n return params;\n };\n },\n /**\n * Returns a view limiter that limits the horizontal and vertical field of\n * view, prevents zooming in past the image resolution, and limits the pitch\n * range to prevent the camera wrapping around at the poles. These are the\n * most common view constraints for a 360° panorama.\n * @param {number} maxResolution The cube face width in pixels or,\n * equivalently, one fourth of the equirectangular width in pixels.\n * @param {number} maxVFov The maximum vertical field of view.\n * @param {number} [maxHFov=maxVFov] The maximum horizontal field of view.\n * @return {RectilinearViewLimiter}\n */ traditional: function(maxResolution, maxVFov, maxHFov) {\n maxHFov = maxHFov != null ? maxHFov : maxVFov;\n return $arsG2($468cf9d9bfd41e18$var$RectilinearView.limit.resolution(maxResolution), $468cf9d9bfd41e18$var$RectilinearView.limit.vfov(0, maxVFov), $468cf9d9bfd41e18$var$RectilinearView.limit.hfov(0, maxHFov), $468cf9d9bfd41e18$var$RectilinearView.limit.pitch(-Math.PI / 2, Math.PI / 2));\n }\n};\n$468cf9d9bfd41e18$var$RectilinearView.type = $468cf9d9bfd41e18$var$RectilinearView.prototype.type = \"rectilinear\";\nmodule.exports = $468cf9d9bfd41e18$var$RectilinearView;\n\n});\nparcelRegister(\"hmySL\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n/**\n * Convert fov\n *\n * For example, to convert from hfov to vfov one would call \n * `convert(hfov, width, height)`\n *\n * @param {number} fov\n * @param {number} fromDimension\n * @param {number} toDimension\n * @return {number}\n * @memberof util.convertFov\n */ function $ca3f8ca1d42e4409$var$convert(fov, fromDimension, toDimension) {\n return 2 * Math.atan(toDimension * Math.tan(fov / 2) / fromDimension);\n}\n/**\n * @param {number} fov\n * @param {number} fromDimension\n * @param {number} toDimension\n * @return {number}\n * @memberof util.convertFov\n */ function $ca3f8ca1d42e4409$var$htov(fov, width, height) {\n return $ca3f8ca1d42e4409$var$convert(fov, width, height);\n}\n/**\n * @param {number} fov\n * @param {number} fromDimension\n * @param {number} toDimension\n * @return {number}\n * @memberof util.convertFov\n */ function $ca3f8ca1d42e4409$var$htod(fov, width, height) {\n return $ca3f8ca1d42e4409$var$convert(fov, width, Math.sqrt(width * width + height * height));\n}\n/**\n * @param {number} fov\n * @param {number} fromDimension\n * @param {number} toDimension\n * @return {number}\n * @memberof util.convertFov\n */ function $ca3f8ca1d42e4409$var$vtoh(fov, width, height) {\n return $ca3f8ca1d42e4409$var$convert(fov, height, width);\n}\n/**\n * @param {number} fov\n * @param {number} fromDimension\n * @param {number} toDimension\n * @return {number}\n * @memberof util.convertFov\n */ function $ca3f8ca1d42e4409$var$vtod(fov, width, height) {\n return $ca3f8ca1d42e4409$var$convert(fov, height, Math.sqrt(width * width + height * height));\n}\n/**\n * @param {number} fov\n * @param {number} fromDimension\n * @param {number} toDimension\n * @return {number}\n * @memberof util.convertFov\n */ function $ca3f8ca1d42e4409$var$dtoh(fov, width, height) {\n return $ca3f8ca1d42e4409$var$convert(fov, Math.sqrt(width * width + height * height), width);\n}\n/**\n * @param {number} fov\n * @param {number} fromDimension\n * @param {number} toDimension\n * @return {number}\n * @memberof util.convertFov\n */ function $ca3f8ca1d42e4409$var$dtov(fov, width, height) {\n return $ca3f8ca1d42e4409$var$convert(fov, Math.sqrt(width * width + height * height), height);\n}\n/**\n * @namespace util.convertFov\n */ module.exports = {\n convert: $ca3f8ca1d42e4409$var$convert,\n htov: $ca3f8ca1d42e4409$var$htov,\n htod: $ca3f8ca1d42e4409$var$htod,\n vtoh: $ca3f8ca1d42e4409$var$vtoh,\n vtod: $ca3f8ca1d42e4409$var$vtod,\n dtoh: $ca3f8ca1d42e4409$var$dtoh,\n dtov: $ca3f8ca1d42e4409$var$dtov\n};\n\n});\n\nparcelRegister(\"0OTzd\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\nfunction $00277aefd4c26732$var$real(x) {\n return typeof x === \"number\" && isFinite(x);\n}\nmodule.exports = $00277aefd4c26732$var$real;\n\n});\n\nparcelRegister(\"arsG2\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n/**\n * Compose multiple functions\n *\n * `compose(f, g)` returns `function(x) { return f(g(x)); }`\n *\n * @memberof util\n * @param {Function[]} functions The functions to compose\n * @return {Function}\n */ function $79a2aba5a3e184cb$var$compose() {\n var fnList = arguments;\n return function composed(initialArg) {\n var ret = initialArg;\n for(var i = 0; i < fnList.length; i++){\n var fn = fnList[i];\n ret = fn.call(null, ret);\n }\n return ret;\n };\n}\nmodule.exports = $79a2aba5a3e184cb$var$compose;\n\n});\n\n\nparcelRegister(\"9iOfn\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $6mia6 = parcelRequire(\"6mia6\");\n\nvar $c3mW8 = parcelRequire(\"c3mW8\");\nvar $8QvoZ = parcelRequire(\"8QvoZ\");\nvar $6c5cc58465138606$require$mat4 = $c3mW8;\n\nvar $c3mW8 = parcelRequire(\"c3mW8\");\nvar $8QvoZ = parcelRequire(\"8QvoZ\");\nvar $6c5cc58465138606$require$vec4 = $8QvoZ;\n\nvar $lNra6 = parcelRequire(\"lNra6\");\n\nvar $0OTzd = parcelRequire(\"0OTzd\");\n\nvar $eCQUD = parcelRequire(\"eCQUD\");\n\nvar $2Xxut = parcelRequire(\"2Xxut\");\n// Default viewport dimensions.\n// Start with zero to ensure that those values are handled correctly.\nvar $6c5cc58465138606$var$defaultWidth = 0;\nvar $6c5cc58465138606$var$defaultHeight = 0;\n// Default view parameters.\nvar $6c5cc58465138606$var$defaultX = 0.5;\nvar $6c5cc58465138606$var$defaultY = 0.5;\nvar $6c5cc58465138606$var$defaultZoom = 1;\n// Constant values used to simplify the frustum culling logic.\n// planeAxes[i] indicates the coordinate value that defines a frustum plane.\n// planeCmp[i] indicates how point and plane coordinates should be compared\n// to determine whether the point is on the outer side of the plane.\nvar $6c5cc58465138606$var$planeAxes = [\n 1,\n 0,\n 1,\n 0 // left\n];\nvar $6c5cc58465138606$var$planeCmp = [\n -1,\n -1,\n 1,\n 1 // left\n];\n// A zoom of exactly 0 breaks some computations, so we force a minimum positive\n// value. We use 6 decimal places for the epsilon value to avoid broken\n// rendering due to loss of precision in floating point computations.\nvar $6c5cc58465138606$var$zoomLimitEpsilon = 0.000001;\n/**\n * @interface FlatViewParams\n *\n * A camera configuration for a {@link FlatView}.\n *\n * @property {number} x The horizontal coordinate of the image point displayed\n * at the viewport center, in the [0, 1] range.\n * When `x === 0.5`, the image is centered horizontally.\n * When `x === 0`, the left edge of the image is at the viewport center.\n * When `x === 1`, the right edge of the image is at the viewport center.\n * @property {number} y The vertical coordinate of the image point displayed at\n * the viewport center, in the [0, 1] range.\n * When `y === 0.5`, the image is centered vertically.\n * When `y === 0`, the top edge of the image is at the viewport center.\n * When `y === 1`, the bottom edge of the image is at the viewport center.\n * @property {number} zoom The horizontal zoom, in the [0, ∞) range.\n * When `zoom === 1`, the viewport is as wide as the image.\n * When `zoom < 1`, the image is zoomed in.\n * When `zoom > 1`, the image is zoomed out.\n * @property {number} mediaAspectRatio The image aspect ratio.\n * When `mediaAspectRatio === 1`, the image width equals its height.\n * When `mediaAspectRatio < 1`, the image width is less than its height.\n * When `mediaAspectRatio > 1`, the image height is less than its width.\n */ /**\n * @interface FlatViewCoords\n *\n * The position of a point in a flat image.\n *\n * @property {number} x The horizontal coordinate, in the [0, 1] range.\n * @property {number} y The vertical coordinate, in the [0, 1] range.\n */ /**\n * @typedef {function} FlatViewLimiter\n *\n * View limiter for a {@link FlatView}.\n *\n * A view limiter is a function that receives a {@link FlatViewParams} object,\n * optionally modifies it in place, and returns it. It can be used to enforce\n * constraints on the view parameters.\n *\n * See {@link FlatView.limit} for commonly used limiters. They may be composed\n * together or with user-defined limiters with {@link util.compose}.\n *\n * @param {FlatViewParams} params\n * @return {FlatViewParams}\n */ /**\n * @class FlatView\n * @implements View\n * @classdesc\n *\n * A {@link View} implementing an orthogonal projection for flat images.\n *\n * @param {FlatViewParams} params The initial view parameters. The\n * `mediaAspectRatio` parameter must always be set. The other parameters\n * default to `{x: 0.5, y: 0.5, z: 1 }` if unspecified.\n * @param {FlatViewLimiter=} limiter The view limiter. If unspecified, no view\n * limiting is applied. See {@link FlatView.limit} for commonly used\n * limiters.\n */ function $6c5cc58465138606$var$FlatView(params, limiter) {\n // Require an aspect ratio to be specified.\n if (!(params && params.mediaAspectRatio != null)) throw new Error(\"mediaAspectRatio must be defined\");\n // The initial values for the view parameters.\n this._x = params && params.x != null ? params.x : $6c5cc58465138606$var$defaultX;\n this._y = params && params.y != null ? params.y : $6c5cc58465138606$var$defaultY;\n this._zoom = params && params.zoom != null ? params.zoom : $6c5cc58465138606$var$defaultZoom;\n this._mediaAspectRatio = params.mediaAspectRatio;\n this._width = params && params.width != null ? params.width : $6c5cc58465138606$var$defaultWidth;\n this._height = params && params.height != null ? params.height : $6c5cc58465138606$var$defaultHeight;\n // The initial value for the view limiter.\n this._limiter = limiter || null;\n // The last calculated projection matrix and its inverse.\n this._projMatrix = $6c5cc58465138606$require$mat4.create();\n this._invProjMatrix = $6c5cc58465138606$require$mat4.create();\n // The last calculated view frustum.\n this._frustum = [\n 0,\n 0,\n 0,\n 0 // left\n ];\n // Whether the projection matrices and view frustum need to be updated.\n this._projectionChanged = true;\n // Temporary variables used for calculations.\n this._params = {};\n this._vec = $6c5cc58465138606$require$vec4.create();\n // Force view limiting on initial parameters.\n this._update();\n}\n$6mia6($6c5cc58465138606$var$FlatView);\n/**\n * Destructor.\n */ $6c5cc58465138606$var$FlatView.prototype.destroy = function() {\n $2Xxut(this);\n};\n/**\n * Get the x parameter.\n * @return {number}\n */ $6c5cc58465138606$var$FlatView.prototype.x = function() {\n return this._x;\n};\n/**\n * Get the y parameter.\n * @return {number}\n */ $6c5cc58465138606$var$FlatView.prototype.y = function() {\n return this._y;\n};\n/**\n * Get the zoom value.\n * @return {number}\n */ $6c5cc58465138606$var$FlatView.prototype.zoom = function() {\n return this._zoom;\n};\n/**\n * Get the media aspect ratio.\n * @return {number}\n */ $6c5cc58465138606$var$FlatView.prototype.mediaAspectRatio = function() {\n return this._mediaAspectRatio;\n};\n/**\n * Get the viewport width.\n * @return {number}\n */ $6c5cc58465138606$var$FlatView.prototype.width = function() {\n return this._width;\n};\n/**\n * Get the viewport height.\n * @return {number}\n */ $6c5cc58465138606$var$FlatView.prototype.height = function() {\n return this._height;\n};\n/**\n * Get the viewport dimensions. If an argument is supplied, it is filled in with\n * the result and returned. Otherwise, a fresh object is filled in and returned.\n * @param {Size=} size\n * @return {Size}\n */ $6c5cc58465138606$var$FlatView.prototype.size = function(size) {\n size = size || {};\n size.width = this._width;\n size.height = this._height;\n return size;\n};\n/**\n * Get the view parameters. If an argument is supplied, it is filled in with the\n * result and returned. Otherwise, a fresh object is filled in and returned.\n * @param {FlatViewParams=} params\n * @return {FlatViewParams}\n */ $6c5cc58465138606$var$FlatView.prototype.parameters = function(params) {\n params = params || {};\n params.x = this._x;\n params.y = this._y;\n params.zoom = this._zoom;\n params.mediaAspectRatio = this._mediaAspectRatio;\n return params;\n};\n/**\n * Get the view limiter, or null if unset.\n * @return {?FlatViewLimiter}\n */ $6c5cc58465138606$var$FlatView.prototype.limiter = function() {\n return this._limiter;\n};\n/**\n * Set the x parameter.\n * @param {number} x\n */ $6c5cc58465138606$var$FlatView.prototype.setX = function(x) {\n this._resetParams();\n this._params.x = x;\n this._update(this._params);\n};\n/**\n * Set the y parameter.\n * @param {number} y\n */ $6c5cc58465138606$var$FlatView.prototype.setY = function(y) {\n this._resetParams();\n this._params.y = y;\n this._update(this._params);\n};\n/**\n * Set the zoom value.\n * @param {number} zoom\n */ $6c5cc58465138606$var$FlatView.prototype.setZoom = function(zoom) {\n this._resetParams();\n this._params.zoom = zoom;\n this._update(this._params);\n};\n/**\n * Add xOffset to the x parameter.\n * @param {number} xOffset\n */ $6c5cc58465138606$var$FlatView.prototype.offsetX = function(xOffset) {\n this.setX(this._x + xOffset);\n};\n/**\n * Add yOffset to the y parameter.\n * @param {number} yOffset\n */ $6c5cc58465138606$var$FlatView.prototype.offsetY = function(yOffset) {\n this.setY(this._y + yOffset);\n};\n/**\n * Add zoomOffset to the zoom value.\n * @param {number} zoomOffset\n */ $6c5cc58465138606$var$FlatView.prototype.offsetZoom = function(zoomOffset) {\n this.setZoom(this._zoom + zoomOffset);\n};\n/**\n * Set the media aspect ratio.\n * @param {number} mediaAspectRatio\n */ $6c5cc58465138606$var$FlatView.prototype.setMediaAspectRatio = function(mediaAspectRatio) {\n this._resetParams();\n this._params.mediaAspectRatio = mediaAspectRatio;\n this._update(this._params);\n};\n/**\n * Set the viewport dimensions.\n * @param {Size} size\n */ $6c5cc58465138606$var$FlatView.prototype.setSize = function(size) {\n this._resetParams();\n this._params.width = size.width;\n this._params.height = size.height;\n this._update(this._params);\n};\n/**\n * Set the view parameters. Unspecified parameters are left unchanged.\n * @param {FlatViewParameters} params\n */ $6c5cc58465138606$var$FlatView.prototype.setParameters = function(params) {\n this._resetParams();\n this._params.x = params.x;\n this._params.y = params.y;\n this._params.zoom = params.zoom;\n this._params.mediaAspectRatio = params.mediaAspectRatio;\n this._update(this._params);\n};\n/**\n * Set the view limiter.\n * @param {?FlatViewLimiter} limiter The new limiter, or null to unset.\n */ $6c5cc58465138606$var$FlatView.prototype.setLimiter = function(limiter) {\n this._limiter = limiter || null;\n this._update();\n};\n$6c5cc58465138606$var$FlatView.prototype._resetParams = function() {\n var params = this._params;\n params.x = null;\n params.y = null;\n params.zoom = null;\n params.mediaAspectRatio = null;\n params.width = null;\n params.height = null;\n};\n$6c5cc58465138606$var$FlatView.prototype._update = function(params) {\n // Avoid object allocation when no parameters are supplied.\n if (params == null) {\n this._resetParams();\n params = this._params;\n }\n // Save old parameters for later comparison.\n var oldX = this._x;\n var oldY = this._y;\n var oldZoom = this._zoom;\n var oldMediaAspectRatio = this._mediaAspectRatio;\n var oldWidth = this._width;\n var oldHeight = this._height;\n // Fill in object with the new set of parameters to pass into the limiter.\n params.x = params.x != null ? params.x : oldX;\n params.y = params.y != null ? params.y : oldY;\n params.zoom = params.zoom != null ? params.zoom : oldZoom;\n params.mediaAspectRatio = params.mediaAspectRatio != null ? params.mediaAspectRatio : oldMediaAspectRatio;\n params.width = params.width != null ? params.width : oldWidth;\n params.height = params.height != null ? params.height : oldHeight;\n // Apply view limiting when defined.\n if (this._limiter) {\n params = this._limiter(params);\n if (!params) throw new Error(\"Bad view limiter\");\n }\n // Grab the limited parameters.\n var newX = params.x;\n var newY = params.y;\n var newZoom = params.zoom;\n var newMediaAspectRatio = params.mediaAspectRatio;\n var newWidth = params.width;\n var newHeight = params.height;\n // Consistency check.\n if (!$0OTzd(newX) || !$0OTzd(newY) || !$0OTzd(newZoom) || !$0OTzd(newMediaAspectRatio) || !$0OTzd(newWidth) || !$0OTzd(newHeight)) throw new Error(\"Bad view - suspect a broken limiter\");\n // Constrain zoom.\n newZoom = $eCQUD(newZoom, $6c5cc58465138606$var$zoomLimitEpsilon, Infinity);\n // Update parameters.\n this._x = newX;\n this._y = newY;\n this._zoom = newZoom;\n this._mediaAspectRatio = newMediaAspectRatio;\n this._width = newWidth;\n this._height = newHeight;\n // Check whether the parameters changed and emit the corresponding events.\n if (newX !== oldX || newY !== oldY || newZoom !== oldZoom || newMediaAspectRatio !== oldMediaAspectRatio || newWidth !== oldWidth || newHeight !== oldHeight) {\n this._projectionChanged = true;\n this.emit(\"change\");\n }\n if (newWidth !== oldWidth || newHeight !== oldHeight) this.emit(\"resize\");\n};\n$6c5cc58465138606$var$FlatView.prototype._zoomX = function() {\n return this._zoom;\n};\n$6c5cc58465138606$var$FlatView.prototype._zoomY = function() {\n var mediaAspectRatio = this._mediaAspectRatio;\n var aspect = this._width / this._height;\n var zoomX = this._zoom;\n var zoomY = zoomX * mediaAspectRatio / aspect;\n if (isNaN(zoomY)) zoomY = zoomX;\n return zoomY;\n};\n$6c5cc58465138606$var$FlatView.prototype.updateWithControlParameters = function(parameters) {\n var scale = this.zoom();\n var zoomX = this._zoomX();\n var zoomY = this._zoomY();\n // TODO: should the scale be the same for both axes?\n this.offsetX(parameters.axisScaledX * zoomX + parameters.x * scale);\n this.offsetY(parameters.axisScaledY * zoomY + parameters.y * scale);\n this.offsetZoom(parameters.zoom * scale);\n};\n$6c5cc58465138606$var$FlatView.prototype._updateProjection = function() {\n var projMatrix = this._projMatrix;\n var invProjMatrix = this._invProjMatrix;\n var frustum = this._frustum;\n // Recalculate projection matrix when required.\n if (this._projectionChanged) {\n var x = this._x;\n var y = this._y;\n var zoomX = this._zoomX();\n var zoomY = this._zoomY();\n // Recalculate view frustum.\n var top = frustum[0] = 0.5 - y + 0.5 * zoomY;\n var right = frustum[1] = x - 0.5 + 0.5 * zoomX;\n var bottom = frustum[2] = 0.5 - y - 0.5 * zoomY;\n var left = frustum[3] = x - 0.5 - 0.5 * zoomX;\n // Recalculate projection matrix and its inverse.\n $6c5cc58465138606$require$mat4.ortho(projMatrix, left, right, bottom, top, -1, 1);\n $6c5cc58465138606$require$mat4.invert(invProjMatrix, projMatrix);\n this._projectionChanged = false;\n }\n};\n/**\n * Returns the projection matrix for the current view.\n * @returns {mat4}\n */ $6c5cc58465138606$var$FlatView.prototype.projection = function() {\n this._updateProjection();\n return this._projMatrix;\n};\n/**\n * Returns the inverse projection matrix for the current view.\n * @returns {mat4}\n */ $6c5cc58465138606$var$FlatView.prototype.inverseProjection = function() {\n this._updateProjection();\n return this._invProjMatrix;\n};\n/**\n * Return whether the view frustum intersects the given rectangle.\n *\n * This function may return false positives, but never false negatives.\n * It is used for frustum culling, i.e., excluding invisible tiles from the\n * rendering process.\n *\n * @param {vec3[]} rectangle The vertices of the rectangle.\n */ $6c5cc58465138606$var$FlatView.prototype.intersects = function(rectangle) {\n this._updateProjection();\n var frustum = this._frustum;\n // Check whether the rectangle is on the outer side of any of the frustum\n // planes. This is a sufficient condition, though not necessary, for the\n // rectangle to be completely outside the fruouter\n for(var i = 0; i < frustum.length; i++){\n var limit = frustum[i];\n var axis = $6c5cc58465138606$var$planeAxes[i];\n var cmp = $6c5cc58465138606$var$planeCmp[i];\n var inside = false;\n for(var j = 0; j < rectangle.length; j++){\n var vertex = rectangle[j];\n if (cmp < 0 && vertex[axis] < limit || cmp > 0 && vertex[axis] > limit) {\n inside = true;\n break;\n }\n }\n if (!inside) return false;\n }\n return true;\n};\n/**\n * Select the level that should be used to render the view.\n * @param {Level[]} levelList the list of levels from which to select.\n * @return {Level} the selected level.\n */ $6c5cc58465138606$var$FlatView.prototype.selectLevel = function(levels) {\n // Multiply the viewport width by the device pixel ratio to get the required\n // horizontal resolution in pixels.\n //\n // Calculate the fraction of the image that would be visible at the current\n // zoom value. Then, for each level, multiply by the level width to get the\n // width in pixels of the portion that would be visible.\n //\n // Search for the smallest level that satifies the the required width,\n // falling back on the largest level if none do.\n var requiredPixels = $lNra6() * this.width();\n var zoomFactor = this._zoom;\n for(var i = 0; i < levels.length; i++){\n var level = levels[i];\n if (zoomFactor * level.width() >= requiredPixels) return level;\n }\n return levels[levels.length - 1];\n};\n/**\n * Convert view coordinates into screen coordinates. If a result argument is\n * provided, it is filled in and returned. Otherwise, a fresh object is filled\n * in and returned.\n *\n * @param {FlatViewCoords} coords The view coordinates.\n * @param {Coords=} result The result argument for the screen coordinates.\n * @return {Coords}\n */ $6c5cc58465138606$var$FlatView.prototype.coordinatesToScreen = function(coords, result) {\n var ray = this._vec;\n if (!result) result = {};\n var width = this._width;\n var height = this._height;\n // Undefined on a null viewport.\n if (width <= 0 || height <= 0) {\n result.x = null;\n result.y = null;\n return null;\n }\n // Extract coordinates from argument, filling in default values.\n var x = coords && coords.x != null ? coords.x : $6c5cc58465138606$var$defaultX;\n var y = coords && coords.y != null ? coords.y : $6c5cc58465138606$var$defaultY;\n // Project view ray onto clip space.\n $6c5cc58465138606$require$vec4.set(ray, x - 0.5, 0.5 - y, -1, 1);\n $6c5cc58465138606$require$vec4.transformMat4(ray, ray, this.projection());\n // Calculate perspective divide.\n for(var i = 0; i < 3; i++)ray[i] /= ray[3];\n // Convert to viewport coordinates and return.\n result.x = width * (ray[0] + 1) / 2;\n result.y = height * (1 - ray[1]) / 2;\n return result;\n};\n/**\n * Convert screen coordinates into view coordinates. If a result argument is\n * provided, it is filled in with the result and returned. Otherwise, a fresh\n * object is filled in and returned.\n *\n * @param {Coords} coords The screen coordinates.\n * @param {FlatViewCoords=} result The result argument for the view coordinates.\n * @return {FlatViewCoords}\n */ $6c5cc58465138606$var$FlatView.prototype.screenToCoordinates = function(coords, result) {\n var ray = this._vec;\n if (!result) result = {};\n var width = this._width;\n var height = this._height;\n // Convert viewport coordinates to clip space.\n var vecx = 2 * coords.x / width - 1;\n var vecy = 1 - 2 * coords.y / height;\n $6c5cc58465138606$require$vec4.set(ray, vecx, vecy, 1, 1);\n // Project back to world space.\n $6c5cc58465138606$require$vec4.transformMat4(ray, ray, this.inverseProjection());\n // Convert to flat coordinates.\n result.x = 0.5 + ray[0];\n result.y = 0.5 - ray[1];\n return result;\n};\n/**\n * Factory functions for view limiters. See {@link FlatViewLimiter}.\n * @namespace\n */ $6c5cc58465138606$var$FlatView.limit = {\n /**\n * Returns a view limiter that constrains the x parameter.\n * @param {number} min The minimum x value.\n * @param {number} max The maximum y value.\n * @return {FlatViewLimiter}\n */ x: function(min, max) {\n return function limitX(params) {\n params.x = $eCQUD(params.x, min, max);\n return params;\n };\n },\n /**\n * Return a view limiter that constrains the y parameter.\n * @param {number} min The minimum y value.\n * @param {number} max The maximum y value.\n * @return {FlatViewLimiter}\n */ y: function(min, max) {\n return function limitY(params) {\n params.y = $eCQUD(params.y, min, max);\n return params;\n };\n },\n /**\n * Returns a view limiter than constrains the zoom parameter.\n * @param {number} min The minimum zoom value.\n * @param {number} max The maximum zoom value.\n * @return {FlatViewLimiter}\n */ zoom: function(min, max) {\n return function limitZoom(params) {\n params.zoom = $eCQUD(params.zoom, min, max);\n return params;\n };\n },\n /**\n * Returns a view limiter that prevents zooming in beyond the given\n * resolution.\n * @param {number} size The image width in pixels.\n * @return {FlatViewLimiter}\n */ resolution: function(size) {\n return function limitResolution(params) {\n if (params.width <= 0 || params.height <= 0) return params;\n var width = params.width;\n var minZoom = $lNra6() * width / size;\n params.zoom = $eCQUD(params.zoom, minZoom, Infinity);\n return params;\n };\n },\n /**\n * Returns a view limiter that constrains the values of the x parameter that\n * are inside the viewport.\n * @param {number} min The minimum x value.\n * @param {number} max The maximum x value.\n * @return {FlatViewLimiter}\n */ visibleX: function(min, max) {\n return function limitVisibleX(params) {\n // Calculate the zoom value that makes the specified range fully visible.\n var maxZoom = max - min;\n // Clamp zoom to the maximum value.\n if (params.zoom > maxZoom) params.zoom = maxZoom;\n // Bound X such that the image is visible up to the range edges.\n var minX = min + 0.5 * params.zoom;\n var maxX = max - 0.5 * params.zoom;\n params.x = $eCQUD(params.x, minX, maxX);\n return params;\n };\n },\n /**\n * Returns a view limiter that constrains the values of the y parameter that\n * are inside the viewport.\n * @param {number} min The minimum y value.\n * @param {number} max The maximum y value.\n * @return {FlatViewLimiter}\n */ visibleY: function(min, max) {\n return function limitVisibleY(params) {\n // Do nothing for a null viewport.\n if (params.width <= 0 || params.height <= 0) return params;\n // Calculate the X to Y conversion factor.\n var viewportAspectRatio = params.width / params.height;\n var factor = viewportAspectRatio / params.mediaAspectRatio;\n // Calculate the zoom value that makes the specified range fully visible.\n var maxZoom = (max - min) * factor;\n // Clamp zoom to the maximum value.\n if (params.zoom > maxZoom) params.zoom = maxZoom;\n // Bound Y such that the image is visible up to the range edges.\n var minY = min + 0.5 * params.zoom / factor;\n var maxY = max - 0.5 * params.zoom / factor;\n params.y = $eCQUD(params.y, minY, maxY);\n return params;\n };\n },\n /**\n * Returns a view limiter that constrains the zoom parameter such that\n * zooming out is prevented beyond the point at which the image is fully\n * visible. Unless the image and the viewport have the same aspect ratio,\n * this will cause bands to appear around the image.\n * @return {FlatViewLimiter}\n */ letterbox: function() {\n return function limitLetterbox(params) {\n if (params.width <= 0 || params.height <= 0) return params;\n var viewportAspectRatio = params.width / params.height;\n var fullWidthZoom = 1.0;\n var fullHeightZoom = viewportAspectRatio / params.mediaAspectRatio;\n // If the image is wider than the viewport, limit the horizontal zoom to\n // the image width.\n if (params.mediaAspectRatio >= viewportAspectRatio) params.zoom = Math.min(params.zoom, fullWidthZoom);\n // If the image is narrower than the viewport, limit the vertical zoom to\n // the image height.\n if (params.mediaAspectRatio <= viewportAspectRatio) params.zoom = Math.min(params.zoom, fullHeightZoom);\n // If the full image width is visible, limit x to the central point.\n // Else, bound x such that image is visible up to the horizontal edges.\n var minX, maxX;\n if (params.zoom > fullWidthZoom) minX = maxX = 0.5;\n else {\n minX = 0.0 + 0.5 * params.zoom / fullWidthZoom;\n maxX = 1.0 - 0.5 * params.zoom / fullWidthZoom;\n }\n // If the full image height is visible, limit y to the central point.\n // Else, bound y such that image is visible up to the vertical edges.\n var minY, maxY;\n if (params.zoom > fullHeightZoom) minY = maxY = 0.5;\n else {\n minY = 0.0 + 0.5 * params.zoom / fullHeightZoom;\n maxY = 1.0 - 0.5 * params.zoom / fullHeightZoom;\n }\n // Clamp x and y into the calculated bounds.\n params.x = $eCQUD(params.x, minX, maxX);\n params.y = $eCQUD(params.y, minY, maxY);\n return params;\n };\n }\n};\n$6c5cc58465138606$var$FlatView.type = $6c5cc58465138606$var$FlatView.prototype.type = \"flat\";\nmodule.exports = $6c5cc58465138606$var$FlatView;\n\n});\n\nparcelRegister(\"3vK5M\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $6mia6 = parcelRequire(\"6mia6\");\n\nvar $1Cfry = parcelRequire(\"1Cfry\");\n\nvar $aPjjN = parcelRequire(\"aPjjN\");\n\nvar $61A4i = parcelRequire(\"61A4i\");\n\nvar $7OILR = parcelRequire(\"7OILR\");\n\nvar $azWbw = parcelRequire(\"azWbw\");\n// Map template properties to their corresponding tile properties.\nvar $28e805513a7c304b$var$templateProperties = {\n x: \"x\",\n y: \"y\",\n z: \"z\",\n f: \"face\"\n};\n// Default face order for cube maps.\nvar $28e805513a7c304b$var$defaultCubeMapFaceOrder = \"bdflru\";\n// Default maximum number of concurrent requests.\nvar $28e805513a7c304b$var$defaultConcurrency = 4;\n// Default milliseconds to wait before retrying failed requests.\nvar $28e805513a7c304b$var$defaultRetryDelay = 10000;\n/**\n * @class ImageUrlSource\n * @implements Source\n * @classdesc\n *\n * A {@link Source} that loads {@link Asset assets} from images given a URL and\n * a crop rectangle.\n *\n * @param {Function} sourceFromTile Function that receives a tile and returns\n * a `{ url, rect }` object, where `url` is an image URL and `rect`, when\n * present, is an `{ x, y, width, height }` object in normalized coordinates\n * denoting the portion of the image to use.\n * @param {Object} opts\n * @param {number} [opts.concurrency=4] Maximum number of tiles to request at\n * the same time. The limit is per {@link ImageSourceUrl} instance.\n * @param {number} [opts.retryDelay=10000] Time in milliseconds to wait before\n * retrying a failed request.\n */ function $28e805513a7c304b$var$ImageUrlSource(sourceFromTile, opts) {\n opts = opts ? opts : {};\n this._loadPool = new $aPjjN({\n concurrency: opts.concurrency || $28e805513a7c304b$var$defaultConcurrency\n });\n this._retryDelay = opts.retryDelay || $28e805513a7c304b$var$defaultRetryDelay;\n this._retryMap = {};\n this._sourceFromTile = sourceFromTile;\n}\n$6mia6($28e805513a7c304b$var$ImageUrlSource);\n$28e805513a7c304b$var$ImageUrlSource.prototype.loadAsset = function(stage, tile, done) {\n var self = this;\n var retryDelay = this._retryDelay;\n var retryMap = this._retryMap;\n var tileSource = this._sourceFromTile(tile);\n var url = tileSource.url;\n var rect = tileSource.rect;\n var loadImage = stage.loadImage.bind(stage, url, rect);\n var loadFn = function(done) {\n // TODO: Deduplicate load requests for the same URL. Although the browser\n // might be smart enough to avoid duplicate requests, they are still unduly\n // impacted by the concurrency parameter.\n return self._loadPool.push(loadImage, function(err, asset) {\n if (err) {\n if (err instanceof $1Cfry) {\n // If a network error occurred, wait before retrying.\n retryMap[url] = $azWbw();\n self.emit(\"networkError\", asset, err);\n }\n done(err, tile);\n } else {\n // On a successful fetch, forget the previous timeout.\n delete retryMap[url];\n done(null, tile, asset);\n }\n });\n };\n // Check whether we are retrying a failed request.\n var delayAmount;\n var lastTime = retryMap[url];\n if (lastTime != null) {\n var currentTime = $azWbw();\n var elapsed = currentTime - lastTime;\n if (elapsed < retryDelay) // Wait before retrying.\n delayAmount = retryDelay - elapsed;\n else {\n // Retry timeout expired; perform the request at once.\n delayAmount = 0;\n delete retryMap[url];\n }\n }\n var delayFn = $7OILR.bind(null, delayAmount);\n return $61A4i(delayFn, loadFn)(done);\n};\n/**\n * Creates an ImageUrlSource from a string template.\n *\n * @param {String} url Tile URL template, which may contain the following\n * placeholders:\n * - `{f}` : tile face (one of `b`, `d`, `f`, `l`, `r`, `u`)\n * - `{z}` : tile level index (0 is the smallest level)\n * - `{x}` : tile horizontal index\n * - `{y}` : tile vertical index\n * @param {Object} opts In addition to the options already supported by the\n * {@link ImageUrlSource} constructor.\n * @param {String} opts.cubeMapPreviewUrl URL to use as the preview level.\n * This must be a single image containing six cube faces laid out\n * vertically according to the face order parameter.\n * @param {String} [opts.cubeMapPreviewFaceOrder='bdflru'] Face order within\n * the preview image.\n */ $28e805513a7c304b$var$ImageUrlSource.fromString = function(url, opts) {\n opts = opts || {};\n var faceOrder = opts && opts.cubeMapPreviewFaceOrder || $28e805513a7c304b$var$defaultCubeMapFaceOrder;\n var urlFn = opts.cubeMapPreviewUrl ? withPreview : withoutPreview;\n return new $28e805513a7c304b$var$ImageUrlSource(urlFn, opts);\n function withoutPreview(tile) {\n var tileUrl = url;\n for(var property in $28e805513a7c304b$var$templateProperties){\n var templateProperty = $28e805513a7c304b$var$templateProperties[property];\n var regExp = $28e805513a7c304b$var$propertyRegExp(property);\n var valueFromTile = tile.hasOwnProperty(templateProperty) ? tile[templateProperty] : \"\";\n tileUrl = tileUrl.replace(regExp, valueFromTile);\n }\n return {\n url: tileUrl\n };\n }\n function withPreview(tile) {\n if (tile.z === 0) return cubeMapUrl(tile);\n else return withoutPreview(tile);\n }\n function cubeMapUrl(tile) {\n var y = faceOrder.indexOf(tile.face) / 6;\n return {\n url: opts.cubeMapPreviewUrl,\n rect: {\n x: 0,\n y: y,\n width: 1,\n height: 1 / 6\n }\n };\n }\n};\nfunction $28e805513a7c304b$var$propertyRegExp(property) {\n var regExpStr = \"\\\\{(\" + property + \")\\\\}\";\n return new RegExp(regExpStr, \"g\");\n}\nmodule.exports = $28e805513a7c304b$var$ImageUrlSource;\n\n});\nparcelRegister(\"aPjjN\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $hluEj = parcelRequire(\"hluEj\");\n\nvar $iZgBB = parcelRequire(\"iZgBB\");\nfunction $7e1da70263e469ef$var$WorkPool(opts) {\n this._concurrency = opts && opts.concurrency || 1;\n this._paused = opts && !!opts.paused || false;\n this._pool = [];\n for(var i = 0; i < this._concurrency; i++)this._pool.push(new $hluEj(opts));\n this._next = 0;\n}\n$7e1da70263e469ef$var$WorkPool.prototype.length = function() {\n var len = 0;\n for(var i = 0; i < this._pool.length; i++)len += this._pool[i].length();\n return len;\n};\n$7e1da70263e469ef$var$WorkPool.prototype.push = function(fn, cb) {\n var i = this._next;\n var cancel = this._pool[i].push(fn, cb);\n this._next = $iZgBB(this._next + 1, this._concurrency);\n return cancel;\n};\n$7e1da70263e469ef$var$WorkPool.prototype.pause = function() {\n if (!this._paused) {\n this._paused = true;\n for(var i = 0; i < this._concurrency; i++)this._pool[i].pause();\n }\n};\n$7e1da70263e469ef$var$WorkPool.prototype.resume = function() {\n if (this._paused) {\n this._paused = false;\n for(var i = 0; i < this._concurrency; i++)this._pool[i].resume();\n }\n};\nmodule.exports = $7e1da70263e469ef$var$WorkPool;\n\n});\n\nparcelRegister(\"61A4i\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $exIfG = parcelRequire(\"exIfG\");\n// Return a function that executes its arguments (which should be cancelables)\n// in sequence, so that each of them passes its return values to the next.\n// Execution is aborted if one of the functions returns an error; in that case\n// the last function in the sequence is called with the error.\n// See util/cancelize.js for an explanation of what cancelables are.\nfunction $462ed0808f68dc36$var$chain() {\n // The list of functions to chain together.\n var argList = Array.prototype.slice.call(arguments, 0);\n return function chained() {\n // List of remaining functions to be executed.\n // Make a copy of the original list so we can mutate the former while\n // preserving the latter intact for future invocations of the chain.\n var fnList = argList.slice(0);\n // Currently executing function.\n var fn = null;\n // Cancel method for the currently executing function.\n var cfn = null;\n // Arguments for the first function.\n var args = arguments.length ? Array.prototype.slice.call(arguments, 0, arguments.length - 1) : [];\n // Callback for the chain.\n var done = arguments.length ? arguments[arguments.length - 1] : $exIfG;\n // Execute the next function in the chain.\n // Receives the error and return values from the previous function.\n function exec() {\n // Extract error from arguments.\n var err = arguments[0];\n // Abort chain on error.\n if (err) {\n fn = cfn = null;\n done.apply(null, arguments);\n return;\n }\n // Terminate if there are no functions left in the chain.\n if (!fnList.length) {\n fn = cfn = null;\n done.apply(null, arguments);\n return;\n }\n // Advance to the next function in the chain.\n fn = fnList.shift();\n var _fn = fn;\n // Extract arguments to pass into the next function.\n var ret = Array.prototype.slice.call(arguments, 1);\n // Call next function with previous return value and call back exec.\n ret.push(exec);\n var _cfn = fn.apply(null, ret); // fn(null, ret..., exec)\n // Detect when fn has completed synchronously and do not clobber the\n // internal state in that case. You're not expected to understand this.\n if (_fn !== fn) return;\n // Remember the cancel method for the currently executing function.\n // Detect chaining on non-cancellable function.\n if (typeof _cfn !== \"function\") throw new Error(\"chain: chaining on non-cancellable function\");\n else cfn = _cfn;\n }\n // Cancel chain execution.\n function cancel() {\n if (cfn) cfn.apply(null, arguments);\n }\n // Start chain execution.\n // We call exec as if linking from a previous function in the chain,\n // except that the error is always null. As a consequence, chaining on an\n // empty list yields the identity function.\n args.unshift(null);\n exec.apply(null, args); // exec(null, args...)\n return cancel;\n };\n}\nmodule.exports = $462ed0808f68dc36$var$chain;\n\n});\nparcelRegister(\"exIfG\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\nfunction $a9667944b3fbadf4$var$noop() {}\nmodule.exports = $a9667944b3fbadf4$var$noop;\n\n});\n\n\nparcelRegister(\"7OILR\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n// Perform a cancelable delay.\n// See util/cancelize.js for an explanation of what cancelables are.\nfunction $5b0fee843f2ef954$var$delay(ms, done) {\n // Work around IE8 bug whereby a setTimeout callback may still be called\n // after the corresponding clearTimeout is invoked.\n var timer = null;\n function finish() {\n if (timer != null) {\n timer = null;\n done(null);\n }\n }\n function cancel() {\n if (timer != null) {\n clearTimeout(timer);\n timer = null;\n done.apply(null, arguments);\n }\n }\n timer = setTimeout(finish, ms);\n return cancel;\n}\nmodule.exports = $5b0fee843f2ef954$var$delay;\n\n});\n\n\nparcelRegister(\"lEiVO\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n/**\n * @class SingleAssetSource\n * @implements Source\n * @classdesc\n *\n * A {@link Source} that always provides the same {@link Asset}.\n *\n * @param {Asset} asset The asset.\n*/ function $041139e224bfcfad$var$SingleAssetSource(asset) {\n this._asset = asset;\n}\n$041139e224bfcfad$var$SingleAssetSource.prototype.asset = function() {\n return this._asset;\n};\n$041139e224bfcfad$var$SingleAssetSource.prototype.loadAsset = function(stage, tile, done) {\n var self = this;\n var timeout = setTimeout(function() {\n done(null, tile, self._asset);\n }, 0);\n function cancel() {\n clearTimeout(timeout);\n done.apply(null, arguments);\n }\n return cancel;\n};\nmodule.exports = $041139e224bfcfad$var$SingleAssetSource;\n\n});\n\nparcelRegister(\"iB2Tl\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $4Qk7S = parcelRequire(\"4Qk7S\");\n\nvar $Yar88 = parcelRequire(\"Yar88\");\n\nvar $6mia6 = parcelRequire(\"6mia6\");\n\nvar $2Xxut = parcelRequire(\"2Xxut\");\n/**\n * @class DynamicAsset\n * @implements Asset\n * @extends StaticAsset\n * @classdesc\n *\n * A mutable {@link Asset} compatible with {@link WebGlStage} and\n * {@link CssStage}.\n *\n * @param {HTMLImageElement|HTMLCanvasElement|ImageBitmap} element The\n * underlying pixel source.\n * @throws If the pixel source is unsupported.\n */ function $d89decebabfcc15e$var$DynamicAsset(element) {\n this.constructor.super_.call(this, element);\n this._timestamp = 0;\n}\n$Yar88($d89decebabfcc15e$var$DynamicAsset, $4Qk7S);\n$6mia6($d89decebabfcc15e$var$DynamicAsset);\n/**\n * Destructor.\n */ $d89decebabfcc15e$var$DynamicAsset.prototype.destroy = function() {\n $2Xxut(this);\n};\n$d89decebabfcc15e$var$DynamicAsset.prototype.timestamp = function() {\n return this._timestamp;\n};\n$d89decebabfcc15e$var$DynamicAsset.prototype.isDynamic = function() {\n return true;\n};\n/**\n * Marks the asset dirty, signaling that the contents of the underlying pixel\n * source have changed.\n *\n * @throws If the asset is not dynamic.\n */ $d89decebabfcc15e$var$DynamicAsset.prototype.markDirty = function() {\n this._timestamp++;\n this.emit(\"change\");\n};\nmodule.exports = $d89decebabfcc15e$var$DynamicAsset;\n\n});\n\nparcelRegister(\"8U6hQ\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $jOYf3 = parcelRequire(\"jOYf3\");\n\nvar $fio2g = parcelRequire(\"fio2g\");\n\nvar $eyQFW = parcelRequire(\"eyQFW\");\n\nvar $6mia6 = parcelRequire(\"6mia6\");\n\nvar $9eJDl = parcelRequire(\"9eJDl\");\n\nvar $2uuGq = parcelRequire(\"2uuGq\");\n\nvar $61A4i = parcelRequire(\"61A4i\");\n\nvar $Yar88 = parcelRequire(\"Yar88\");\n\nvar $2Xxut = parcelRequire(\"2Xxut\");\nvar $67b86e256734db6e$var$debug = typeof MARZIPANODEBUG !== \"undefined\" && MARZIPANODEBUG.textureStore;\n// A Stage informs the TextureStore about the set of visible tiles during a\n// frame by calling startFrame, markTile and endFrame. In a particular frame,\n// TextureStore expects one or more calls to startFrame, followed by zero or\n// more calls to markTile, followed by one or more calls to endFrame. The\n// number of calls to startFrame and endFrame must match. Calls to other\n// TextureStore methods may be freely interleaved with this sequence.\n//\n// At any given time, TextureStore is in one of four states. The START state\n// corresponds to the interval between the first startFrame and the first\n// markTile of a frame. The MARK state corresponds to the interval between the\n// first markTile and the first endFrame. The END state corresponds to the\n// interval between the first and the last endFrame. At any other time, the\n// TextureStore is in the IDLE state.\nvar $67b86e256734db6e$var$State = {\n IDLE: 0,\n START: 1,\n MARK: 2,\n END: 3\n};\nvar $67b86e256734db6e$var$defaultOptions = {\n // Maximum number of cached textures for previously visible tiles.\n previouslyVisibleCacheSize: 512\n};\n// Assign an id to each operation so we can track its state.\n// We actually only need this in debug mode, but the code is less convoluted\n// if we track unconditionally, and the performance hit is minimal anyway.\nvar $67b86e256734db6e$var$nextId = 0;\n// Distinguishes a cancellation from other kinds of errors.\nfunction $67b86e256734db6e$var$CancelError() {}\n$Yar88($67b86e256734db6e$var$CancelError, Error);\n/**\n * @class TextureStoreItem\n * @classdesc\n *\n * An item saved in a {@link TextureStore}.\n *\n * Clients do not need to instantiate this. It is automatically instantiated by\n * a {@link TextureStore} to manage the lifetime of a stored item: loading,\n * refreshing, unloading and emitting associated events.\n *\n * @param {TextureStore} store The underlying {@link TextureStore}.\n * @param {Tile} tile The underlying tile.\n */ function $67b86e256734db6e$var$TextureStoreItem(store, tile) {\n var self = this;\n var id = $67b86e256734db6e$var$nextId++;\n self._id = id;\n self._store = store;\n self._tile = tile;\n self._asset = null;\n self._texture = null;\n self._changeHandler = function() {\n store.emit(\"textureInvalid\", tile);\n };\n var source = store.source();\n var stage = store.stage();\n var loadAsset = source.loadAsset.bind(source);\n var createTexture = stage.createTexture.bind(stage);\n // Retry loading the asset until it succeeds, then create the texture from it.\n // This process may be canceled at any point by calling the destroy() method.\n var fn = $61A4i($2uuGq(loadAsset), createTexture);\n store.emit(\"textureStartLoad\", tile);\n if ($67b86e256734db6e$var$debug) console.log(\"loading\", id, tile);\n self._cancel = fn(stage, tile, function(err, _tile, asset, texture) {\n // Make sure we do not call cancel after the operation is complete.\n self._cancel = null;\n if (err) {\n // The loading process was interrupted by an error.\n // This could either be because the texture creation failed, or because\n // the operation was canceled before the loading was complete.\n // Destroy the asset and texture, if they exist.\n if (asset) asset.destroy();\n if (texture) texture.destroy();\n // Emit events.\n if (err instanceof $67b86e256734db6e$var$CancelError) {\n store.emit(\"textureCancel\", tile);\n if ($67b86e256734db6e$var$debug) console.log(\"cancel\", id, tile);\n } else {\n store.emit(\"textureError\", tile, err);\n if ($67b86e256734db6e$var$debug) console.log(\"error\", id, tile);\n }\n return;\n }\n // Save a local reference to the texture.\n self._texture = texture;\n // If the asset is dynamic, save a local reference to it and set up a\n // handler to be called whenever it changes. Otherwise, destroy the asset\n // as we won't be needing it any longer.\n if (asset.isDynamic()) {\n self._asset = asset;\n asset.addEventListener(\"change\", self._changeHandler);\n } else asset.destroy();\n // Emit event.\n store.emit(\"textureLoad\", tile);\n if ($67b86e256734db6e$var$debug) console.log(\"load\", id, tile);\n });\n}\n$67b86e256734db6e$var$TextureStoreItem.prototype.asset = function() {\n return this._asset;\n};\n$67b86e256734db6e$var$TextureStoreItem.prototype.texture = function() {\n return this._texture;\n};\n$67b86e256734db6e$var$TextureStoreItem.prototype.destroy = function() {\n var id = this._id;\n var store = this._store;\n var tile = this._tile;\n var asset = this._asset;\n var texture = this._texture;\n var cancel = this._cancel;\n if (cancel) {\n // The texture is still loading, so cancel it.\n cancel(new $67b86e256734db6e$var$CancelError(\"Texture load cancelled\"));\n return;\n }\n // Destroy asset.\n if (asset) {\n asset.removeEventListener(\"change\", this._changeHandler);\n asset.destroy();\n }\n // Destroy texture.\n if (texture) texture.destroy();\n // Emit event.\n store.emit(\"textureUnload\", tile);\n if ($67b86e256734db6e$var$debug) console.log(\"unload\", id, tile);\n $2Xxut(this);\n};\n$6mia6($67b86e256734db6e$var$TextureStoreItem);\n/**\n * Signals that a texture has started to load.\n *\n * This event is followed by either {@link TextureStore#textureLoad},\n * {@link TextureStore#textureError} or {@link TextureStore#textureCancel}.\n *\n * @event TextureStore#textureStartLoad\n * @param {Tile} tile The tile for which the texture has started to load.\n */ /**\n * Signals that a texture has been loaded.\n *\n * @event TextureStore#textureLoad\n * @param {Tile} tile The tile for which the texture was loaded.\n */ /**\n * Signals that a texture has been unloaded.\n *\n * @event TextureStore#textureUnload\n * @param {Tile} tile The tile for which the texture was unloaded.\n */ /**\n * Signals that a texture has been invalidated.\n *\n * This event may be raised for a texture with an underlying dynamic asset. It\n * may only occur while the texture is loaded, i.e., in between\n * {@link TextureStore#textureLoad} and {@link TextureStore#textureUnload}.\n *\n * @event TextureStore#textureInvalid\n * @param {Tile} tile The tile for which the texture was invalidated.\n */ /**\n * Signals that loading a texture has been cancelled.\n *\n * This event may follow {@link TextureStore#textureStartLoad} if the texture\n * becomes unnecessary before it finishes loading.\n *\n * @event TextureStore#textureCancel\n * @param {Tile} tile The tile for which the texture loading was cancelled.\n */ /**\n * Signals that loading a texture has failed.\n *\n * This event may follow {@link TextureStore#textureStartLoad} if the texture\n * fails to load.\n *\n * @event TextureStore#textureError\n * @param {Tile} tile The tile for which the texture loading has failed.\n */ /**\n * @class TextureStore\n * @classdesc\n *\n * A TextureStore maintains a cache of textures used to render a {@link Layer}.\n *\n * A {@link Stage} communicates with the TextureStore through the startFrame(),\n * markTile() and endFrame() methods, which indicate the tiles that are visible\n * in the current frame. Textures for visible tiles are loaded and retained\n * as long as the tiles remain visible. A limited amount of textures whose\n * tiles were previously visible are cached according to an LRU policy. Tiles\n * may be pinned to keep their respective textures cached even when they are\n * invisible; these textures do not count towards the previously visible limit.\n *\n * Multiple layers belonging to the same underlying {@link WebGlStage} may\n * share the same TextureStore. Layers belonging to distinct {@link WebGlStage}\n * instances, or belonging to a {@link CssStage} or a {@link FlashStage},\n * may not do so due to restrictions on the use of textures across stages.\n *\n * @param {Source} source The underlying source.\n * @param {Stage} stage The underlying stage.\n * @param {Object} opts Options.\n * @param {Number} [opts.previouslyVisibleCacheSize=32] The maximum number of\n * previously visible textures to cache according to an LRU policy.\n */ function $67b86e256734db6e$var$TextureStore(source, stage, opts) {\n opts = $9eJDl(opts || {}, $67b86e256734db6e$var$defaultOptions);\n this._source = source;\n this._stage = stage;\n // The current state.\n this._state = $67b86e256734db6e$var$State.IDLE;\n // The number of startFrame calls yet to be matched by endFrame calls during\n // the current frame.\n this._delimCount = 0;\n // The cache proper: map cached tiles to their respective textures/assets.\n this._itemMap = new $jOYf3();\n // The subset of cached tiles that are currently visible.\n this._visible = new $fio2g();\n // The subset of cached tiles that were visible recently, but are not\n // visible right now. Newly inserted tiles replace older ones.\n this._previouslyVisible = new $eyQFW(opts.previouslyVisibleCacheSize);\n // The subset of cached tiles that should never be evicted from the cache.\n // A tile may be pinned more than once; map each tile into a reference count.\n this._pinMap = new $jOYf3();\n // Temporary variables.\n this._newVisible = new $fio2g();\n this._noLongerVisible = [];\n this._visibleAgain = [];\n this._evicted = [];\n}\n$6mia6($67b86e256734db6e$var$TextureStore);\n/**\n * Destructor.\n */ $67b86e256734db6e$var$TextureStore.prototype.destroy = function() {\n this.clear();\n $2Xxut(this);\n};\n/**\n * Return the underlying {@link Stage}.\n * @return {Stage}\n */ $67b86e256734db6e$var$TextureStore.prototype.stage = function() {\n return this._stage;\n};\n/**\n * Return the underlying {@link Source}.\n * @return {Source}\n */ $67b86e256734db6e$var$TextureStore.prototype.source = function() {\n return this._source;\n};\n/**\n * Remove all textures from the TextureStore, including pinned textures.\n */ $67b86e256734db6e$var$TextureStore.prototype.clear = function() {\n var self = this;\n // Collect list of tiles to be evicted.\n self._evicted.length = 0;\n self._itemMap.forEach(function(tile) {\n self._evicted.push(tile);\n });\n // Evict tiles.\n self._evicted.forEach(function(tile) {\n self._unloadTile(tile);\n });\n // Clear all internal state.\n self._itemMap.clear();\n self._visible.clear();\n self._previouslyVisible.clear();\n self._pinMap.clear();\n self._newVisible.clear();\n self._noLongerVisible.length = 0;\n self._visibleAgain.length = 0;\n self._evicted.length = 0;\n};\n/**\n * Remove all textures in the TextureStore, excluding unpinned textures.\n */ $67b86e256734db6e$var$TextureStore.prototype.clearNotPinned = function() {\n var self = this;\n // Collect list of tiles to be evicted.\n self._evicted.length = 0;\n self._itemMap.forEach(function(tile) {\n if (!self._pinMap.has(tile)) self._evicted.push(tile);\n });\n // Evict tiles.\n self._evicted.forEach(function(tile) {\n self._unloadTile(tile);\n });\n // Clear all caches except the pinned set.\n self._visible.clear();\n self._previouslyVisible.clear();\n // Clear temporary variables.\n self._evicted.length = 0;\n};\n/**\n * Signal the beginning of a frame. Called from {@link Stage}.\n */ $67b86e256734db6e$var$TextureStore.prototype.startFrame = function() {\n // Check that we are in an appropriate state.\n if (this._state !== $67b86e256734db6e$var$State.IDLE && this._state !== $67b86e256734db6e$var$State.START) throw new Error(\"TextureStore: startFrame called out of sequence\");\n // Enter the START state, if not already there.\n this._state = $67b86e256734db6e$var$State.START;\n // Expect one more endFrame call.\n this._delimCount++;\n};\n/**\n * Mark a tile as visible within the current frame. Called from {@link Stage}.\n * @param {Tile} tile The tile to mark.\n */ $67b86e256734db6e$var$TextureStore.prototype.markTile = function(tile) {\n // Check that we are in an appropriate state.\n if (this._state !== $67b86e256734db6e$var$State.START && this._state !== $67b86e256734db6e$var$State.MARK) throw new Error(\"TextureStore: markTile called out of sequence\");\n // Enter the MARK state, if not already there.\n this._state = $67b86e256734db6e$var$State.MARK;\n // Refresh texture for dynamic assets.\n var item = this._itemMap.get(tile);\n var texture = item && item.texture();\n var asset = item && item.asset();\n if (texture && asset) texture.refresh(tile, asset);\n // Add tile to the visible set.\n this._newVisible.add(tile);\n};\n/**\n * Signal the end of a frame. Called from {@link Stage}.\n */ $67b86e256734db6e$var$TextureStore.prototype.endFrame = function() {\n // Check that we are in an appropriate state.\n if (this._state !== $67b86e256734db6e$var$State.START && this._state !== $67b86e256734db6e$var$State.MARK && this._state !== $67b86e256734db6e$var$State.END) throw new Error(\"TextureStore: endFrame called out of sequence\");\n // Enter the END state, if not already there.\n this._state = $67b86e256734db6e$var$State.END;\n // Expect one less call to endFrame.\n this._delimCount--;\n // If no further calls are expected, process frame and enter the IDLE state.\n if (!this._delimCount) {\n this._update();\n this._state = $67b86e256734db6e$var$State.IDLE;\n }\n};\n$67b86e256734db6e$var$TextureStore.prototype._update = function() {\n var self = this;\n // Calculate the set of tiles that used to be visible but no longer are.\n self._noLongerVisible.length = 0;\n self._visible.forEach(function(tile) {\n if (!self._newVisible.has(tile)) self._noLongerVisible.push(tile);\n });\n // Calculate the set of tiles that were visible recently and have become\n // visible again.\n self._visibleAgain.length = 0;\n self._newVisible.forEach(function(tile) {\n if (self._previouslyVisible.has(tile)) self._visibleAgain.push(tile);\n });\n // Remove tiles that have become visible again from the list of previously\n // visible tiles.\n self._visibleAgain.forEach(function(tile) {\n self._previouslyVisible.remove(tile);\n });\n // Cancel loading of tiles that are no longer visible.\n // Move no longer visible tiles with a loaded texture into the previously\n // visible set, and collect the tiles evicted from the latter.\n self._evicted.length = 0;\n self._noLongerVisible.forEach(function(tile) {\n var item = self._itemMap.get(tile);\n var texture = item && item.texture();\n if (texture) {\n var otherTile = self._previouslyVisible.add(tile);\n if (otherTile != null) self._evicted.push(otherTile);\n } else if (item) self._unloadTile(tile);\n });\n // Unload evicted tiles, unless they are pinned.\n self._evicted.forEach(function(tile) {\n if (!self._pinMap.has(tile)) self._unloadTile(tile);\n });\n // Load visible tiles that are not already in the store.\n // Refresh texture on visible tiles for dynamic assets.\n self._newVisible.forEach(function(tile) {\n var item = self._itemMap.get(tile);\n if (!item) self._loadTile(tile);\n });\n // Swap the old visible set with the new one.\n var tmp = self._visible;\n self._visible = self._newVisible;\n self._newVisible = tmp;\n // Clear the new visible set.\n self._newVisible.clear();\n // Clear temporary variables.\n self._noLongerVisible.length = 0;\n self._visibleAgain.length = 0;\n self._evicted.length = 0;\n};\n$67b86e256734db6e$var$TextureStore.prototype._loadTile = function(tile) {\n if (this._itemMap.has(tile)) throw new Error(\"TextureStore: loading texture already in cache\");\n var item = new $67b86e256734db6e$var$TextureStoreItem(this, tile);\n this._itemMap.set(tile, item);\n};\n$67b86e256734db6e$var$TextureStore.prototype._unloadTile = function(tile) {\n var item = this._itemMap.del(tile);\n if (!item) throw new Error(\"TextureStore: unloading texture not in cache\");\n item.destroy();\n};\n$67b86e256734db6e$var$TextureStore.prototype.asset = function(tile) {\n var item = this._itemMap.get(tile);\n if (item) return item.asset();\n return null;\n};\n$67b86e256734db6e$var$TextureStore.prototype.texture = function(tile) {\n var item = this._itemMap.get(tile);\n if (item) return item.texture();\n return null;\n};\n/**\n * Pin a tile. Textures for pinned tiles are never evicted from the store.\n * Upon pinning, the texture is created if not already present. Pins are\n * reference-counted; a tile may be pinned multiple times and must be unpinned\n * the corresponding number of times. Pinning is useful e.g. to ensure that\n * the lowest-resolution level of an image is always available to fall back\n * onto.\n * @param {Tile} tile the tile to pin\n * @returns {number} the pin reference count.\n */ $67b86e256734db6e$var$TextureStore.prototype.pin = function(tile) {\n // Increment reference count.\n var count = (this._pinMap.get(tile) || 0) + 1;\n this._pinMap.set(tile, count);\n // If the texture for the tile is not present, load it now.\n if (!this._itemMap.has(tile)) this._loadTile(tile);\n return count;\n};\n/**\n * Unpin a tile. Pins are reference-counted; a tile may be pinned multiple\n * times and must be unpinned the corresponding number of times.\n * @param {Tile} tile the tile to unpin\n * @returns {number} the pin reference count.\n */ $67b86e256734db6e$var$TextureStore.prototype.unpin = function(tile) {\n var count = this._pinMap.get(tile);\n // Consistency check.\n if (!count) throw new Error(\"TextureStore: unpin when not pinned\");\n else {\n // Decrement reference count.\n count--;\n if (count > 0) this._pinMap.set(tile, count);\n else {\n this._pinMap.del(tile);\n // If the tile does not belong to either the visible or previously\n // visible sets, evict it from the cache.\n if (!this._visible.has(tile) && !this._previouslyVisible.has(tile)) this._unloadTile(tile);\n }\n }\n return count;\n};\n/**\n * Return type for {@link TextureStore#query}.\n * @typedef {Object} TileState\n * @property {boolean} visible Whether the tile is in the visible set.\n * @property {boolean} previouslyVisible Whether the tile is in the previously\n * visible set.\n * @property {boolean} hasAsset Whether the asset for the tile is present.\n * @property {boolean} hasTexture Whether the texture for the tile is present.\n * @property {boolean} pinned Whether the tile is in the pinned set.\n * @property {number} pinCount The pin reference count for the tile.\n */ /**\n * Return the state of a tile.\n * @param {Tile} tile The tile to query.\n * @return {TileState}\n */ $67b86e256734db6e$var$TextureStore.prototype.query = function(tile) {\n var item = this._itemMap.get(tile);\n var pinCount = this._pinMap.get(tile) || 0;\n return {\n visible: this._visible.has(tile),\n previouslyVisible: this._previouslyVisible.has(tile),\n hasAsset: item != null && item.asset() != null,\n hasTexture: item != null && item.texture() != null,\n pinned: pinCount !== 0,\n pinCount: pinCount\n };\n};\nmodule.exports = $67b86e256734db6e$var$TextureStore;\n\n});\nparcelRegister(\"eyQFW\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $iZgBB = parcelRequire(\"iZgBB\");\n// An LruSet holds up to a maximum number of elements, ordered by their time of\n// insertion. When the addition of an element would cause the capacity to be\n// exceeded, the oldest element in the set is evicted. As a special case, an\n// LruSet with zero capacity always rejects the insertion of an element.\n//\n// Elements must implement hash() and equals(). Note that the implementation\n// doesn't currently use hash(), but a future version might.\nfunction $a99d19ed639f6ebc$var$LruSet(capacity) {\n if (!isFinite(capacity) || Math.floor(capacity) !== capacity || capacity < 0) throw new Error(\"LruSet: invalid capacity\");\n this._capacity = capacity;\n // Elements are stored in a circular array ordered by decreasing age.\n // Start is the index of the oldest element and size is the number of valid\n // elements; the region containing valid elements may wrap around.\n this._elements = new Array(this._capacity);\n this._start = 0;\n this._size = 0;\n}\n$a99d19ed639f6ebc$var$LruSet.prototype._index = function(i) {\n return $iZgBB(this._start + i, this._capacity);\n};\n// Adds an element into the set, possibly replacing an equal element already in\n// the set. The element becomes the newest. If the set is at capacity, the\n// oldest element is removed. Returns the removed element if it does not equal\n// the inserted element, or null otherwise. If the capacity is zero, does\n// nothing and returns the element.\n$a99d19ed639f6ebc$var$LruSet.prototype.add = function(element) {\n if (this._capacity === 0) return element;\n this.remove(element);\n var evictedElement = this._size === this._capacity ? this._elements[this._index(0)] : null;\n this._elements[this._index(this._size)] = element;\n if (this._size < this._capacity) this._size++;\n else this._start = this._index(1);\n return evictedElement;\n};\n// Removes an element from the set.\n// Returns the removed element, or null if the element was not found.\n$a99d19ed639f6ebc$var$LruSet.prototype.remove = function(element) {\n for(var i = 0; i < this._size; i++){\n var existingElement = this._elements[this._index(i)];\n if (element.equals(existingElement)) {\n for(var j = i; j < this._size - 1; j++)this._elements[this._index(j)] = this._elements[this._index(j + 1)];\n this._size--;\n return existingElement;\n }\n }\n return null;\n};\n// Returns whether an element is in the set.\n$a99d19ed639f6ebc$var$LruSet.prototype.has = function(element) {\n for(var i = 0; i < this._size; i++){\n if (element.equals(this._elements[this._index(i)])) return true;\n }\n return false;\n};\n// Returns the number of elements in the set.\n$a99d19ed639f6ebc$var$LruSet.prototype.size = function() {\n return this._size;\n};\n// Removes all elements from the set.\n$a99d19ed639f6ebc$var$LruSet.prototype.clear = function() {\n this._elements.length = 0;\n this._start = 0;\n this._size = 0;\n};\n// Calls fn(element) for each element in the set, in an unspecified order.\n// Returns the number of times fn was called.\n// The result is unspecified if the set is mutated during iteration.\n$a99d19ed639f6ebc$var$LruSet.prototype.forEach = function(fn) {\n var count = 0;\n for(var i = 0; i < this._size; i++){\n fn(this._elements[this._index(i)]);\n count += 1;\n }\n return count;\n};\nmodule.exports = $a99d19ed639f6ebc$var$LruSet;\n\n});\n\nparcelRegister(\"9eJDl\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\nfunction $6b98d1c1215cc19d$var$defaults(obj, defaultsObj) {\n for(var key in defaultsObj)if (!(key in obj)) obj[key] = defaultsObj[key];\n return obj;\n}\nmodule.exports = $6b98d1c1215cc19d$var$defaults;\n\n});\n\nparcelRegister(\"2uuGq\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $exIfG = parcelRequire(\"exIfG\");\n// Return a cancelable function that executes fn in a loop until it returns\n// successfully.\nfunction $1d062f298142bf4e$var$retry(fn) {\n return function retried() {\n var args = arguments.length ? Array.prototype.slice.call(arguments, 0, arguments.length - 1) : [];\n var done = arguments.length ? arguments[arguments.length - 1] : $exIfG;\n var cfn = null;\n var canceled = false;\n function exec() {\n var err = arguments[0];\n if (!err || canceled) done.apply(null, arguments);\n else cfn = fn.apply(null, args);\n }\n args.push(exec);\n exec(true);\n return function cancel() {\n canceled = true;\n cfn.apply(null, arguments);\n };\n };\n}\nmodule.exports = $1d062f298142bf4e$var$retry;\n\n});\n\n\nparcelRegister(\"gouN9\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $6mia6 = parcelRequire(\"6mia6\");\n\nvar $iozi5 = parcelRequire(\"iozi5\");\n\nvar $2Xxut = parcelRequire(\"2Xxut\");\n/**\n * Signals that the layer has been rendered.\n *\n * @param {boolean} stable Whether all tiles were successfully rendered without\n * missing textures or resorting to fallbacks.\n * @event Layer#renderComplete\n */ /**\n * @class Layer\n * @classdesc\n *\n * A Layer is a combination of {@link Source}, {@link Geometry}, {@link View}\n * and {@link TextureStore} that may be added into a {@link Stage} and rendered\n * with {@link Effects}.\n *\n * @param {Source} source\n * @param {Geometry} geometry\n * @param {View} view\n * @param {TextureStore} textureStore\n * @param {Object} opts\n * @param {Effects} opts.effects\n*/ function $bef6c5d7db09d718$var$Layer(source, geometry, view, textureStore, opts) {\n opts = opts || {};\n var self = this;\n this._source = source;\n this._geometry = geometry;\n this._view = view;\n this._textureStore = textureStore;\n this._effects = opts.effects || {};\n this._fixedLevelIndex = null;\n this._viewChangeHandler = function() {\n self.emit(\"viewChange\", self.view());\n };\n this._view.addEventListener(\"change\", this._viewChangeHandler);\n this._textureStoreChangeHandler = function() {\n self.emit(\"textureStoreChange\", self.textureStore());\n };\n this._textureStore.addEventListener(\"textureLoad\", this._textureStoreChangeHandler);\n this._textureStore.addEventListener(\"textureError\", this._textureStoreChangeHandler);\n this._textureStore.addEventListener(\"textureInvalid\", this._textureStoreChangeHandler);\n}\n$6mia6($bef6c5d7db09d718$var$Layer);\n/**\n * Destructor.\n */ $bef6c5d7db09d718$var$Layer.prototype.destroy = function() {\n this._view.removeEventListener(\"change\", this._viewChangeHandler);\n this._textureStore.removeEventListener(\"textureLoad\", this._textureStoreChangeHandler);\n this._textureStore.removeEventListener(\"textureError\", this._textureStoreChangeHandler);\n this._textureStore.removeEventListener(\"textureInvalid\", this._textureStoreChangeHandler);\n $2Xxut(this);\n};\n/**\n * Returns the underlying {@link Source source}.\n * @return {Source}\n */ $bef6c5d7db09d718$var$Layer.prototype.source = function() {\n return this._source;\n};\n/**\n * Returns the underlying {@link Geometry geometry}.\n * @return {Geometry}\n */ $bef6c5d7db09d718$var$Layer.prototype.geometry = function() {\n return this._geometry;\n};\n/**\n * Returns the underlying {@link View view}.\n * @return {View}\n */ $bef6c5d7db09d718$var$Layer.prototype.view = function() {\n return this._view;\n};\n/**\n * Returns the underlying {@link TextureStore texture store}.\n * @return {TextureStore}\n */ $bef6c5d7db09d718$var$Layer.prototype.textureStore = function() {\n return this._textureStore;\n};\n/**\n * Returns the currently set {@link Effects effects}.\n * @return {Effects}\n */ $bef6c5d7db09d718$var$Layer.prototype.effects = function() {\n return this._effects;\n};\n/**\n * Sets the {@link Effects effects}.\n * @param {Effects} effects\n */ $bef6c5d7db09d718$var$Layer.prototype.setEffects = function(effects) {\n this._effects = effects;\n this.emit(\"effectsChange\", this._effects);\n};\n/**\n * Merges effects into the currently set ones. The merge is non-recursive; for\n * instance, if current effects are `{ rect: { relativeWidth: 0.5 } }`,\n * calling this method with `{ rect: { relativeX: 0.5 }}` will reset\n * `rect.relativeWidth`.\n *\n * @param {Effects} effects\n */ $bef6c5d7db09d718$var$Layer.prototype.mergeEffects = function(effects) {\n $iozi5(this._effects, effects);\n this.emit(\"effectsChange\", this._effects);\n};\n/**\n * Returns the fixed level index.\n * @return {(number|null)}\n */ $bef6c5d7db09d718$var$Layer.prototype.fixedLevel = function() {\n return this._fixedLevelIndex;\n};\n/**\n * Sets the fixed level index. When set, the corresponding level will be\n * used regardless of the view parameters. Unset with a null argument.\n *\n * @param {(number|null)} levelIndex\n * @throws An error if the level index is out of range.\n */ $bef6c5d7db09d718$var$Layer.prototype.setFixedLevel = function(levelIndex) {\n if (levelIndex !== this._fixedLevelIndex) {\n if (levelIndex != null && (levelIndex >= this._geometry.levelList.length || levelIndex < 0)) throw new Error(\"Level index out of range: \" + levelIndex);\n this._fixedLevelIndex = levelIndex;\n this.emit(\"fixedLevelChange\", this._fixedLevelIndex);\n }\n};\n$bef6c5d7db09d718$var$Layer.prototype._selectLevel = function() {\n var level;\n if (this._fixedLevelIndex != null) level = this._geometry.levelList[this._fixedLevelIndex];\n else level = this._view.selectLevel(this._geometry.selectableLevelList);\n return level;\n};\n$bef6c5d7db09d718$var$Layer.prototype.visibleTiles = function(result) {\n var level = this._selectLevel();\n return this._geometry.visibleTiles(this._view, level, result);\n};\n/**\n * Pin a whole level into the texture store.\n * @param {Number} levelIndex\n */ $bef6c5d7db09d718$var$Layer.prototype.pinLevel = function(levelIndex) {\n var level = this._geometry.levelList[levelIndex];\n var tiles = this._geometry.levelTiles(level);\n for(var i = 0; i < tiles.length; i++)this._textureStore.pin(tiles[i]);\n};\n/**\n * Unpin a whole level from the texture store.\n * @param {Number} levelIndex\n */ $bef6c5d7db09d718$var$Layer.prototype.unpinLevel = function(levelIndex) {\n var level = this._geometry.levelList[levelIndex];\n var tiles = this._geometry.levelTiles(level);\n for(var i = 0; i < tiles.length; i++)this._textureStore.unpin(tiles[i]);\n};\n/**\n * Pin the first level. Equivalent to `pinLevel(0)`.\n */ $bef6c5d7db09d718$var$Layer.prototype.pinFirstLevel = function() {\n return this.pinLevel(0);\n};\n/**\n * Unpin the first level. Equivalent to `unpinLevel(0)`.\n */ $bef6c5d7db09d718$var$Layer.prototype.unpinFirstLevel = function() {\n return this.unpinLevel(0);\n};\nmodule.exports = $bef6c5d7db09d718$var$Layer;\n\n});\nparcelRegister(\"iozi5\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\nfunction $d645d7e268a03d13$var$extend(obj, sourceObj) {\n for(var key in sourceObj)obj[key] = sourceObj[key];\n return obj;\n}\nmodule.exports = $d645d7e268a03d13$var$extend;\n\n});\n\n\nparcelRegister(\"h0UOQ\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $6mia6 = parcelRequire(\"6mia6\");\n\nvar $2Xxut = parcelRequire(\"2Xxut\");\n/**\n * Signals that {@link Stage#render} is about to be called.\n * @event RenderLoop#beforeRender\n */ /**\n * Signals that {@link Stage#render} has just been called.\n * @event RenderLoop#afterRender\n */ /**\n * @class RenderLoop\n * @classdesc\n *\n * A RenderLoop wraps a {@link Stage} and calls {@link Stage#render} on the next\n * frame whenever it fires {@link Stage#renderInvalid}. It may be started and\n * stopped, and is initially in the stopped state, in which no call to\n * {@link Stage#render} occurs.\n *\n * @listens Stage#renderInvalid\n *\n * @param {Stage} stage\n */ function $c62e82d490c40b15$var$RenderLoop(stage) {\n var self = this;\n // The stage wrapped by the loop.\n this._stage = stage;\n // Whether the loop is running.\n this._running = false;\n // Whether the loop is currently rendering.\n this._rendering = false;\n // The current requestAnimationFrame handle.\n this._requestHandle = null;\n // The callback passed into requestAnimationFrame.\n this._boundLoop = this._loop.bind(this);\n // Handler for renderInvalid events emitted by the stage.\n this._renderInvalidHandler = function() {\n // If we are already rendering, there's no need to schedule a new render\n // on the next frame.\n if (!self._rendering) self.renderOnNextFrame();\n };\n // Handle renderInvalid events emitted by the stage.\n this._stage.addEventListener(\"renderInvalid\", this._renderInvalidHandler);\n}\n$6mia6($c62e82d490c40b15$var$RenderLoop);\n/**\n * Destructor.\n */ $c62e82d490c40b15$var$RenderLoop.prototype.destroy = function() {\n this.stop();\n this._stage.removeEventListener(\"renderInvalid\", this._renderInvalidHandler);\n $2Xxut(this);\n};\n/**\n * Returns the underlying stage.\n * @return {Stage}\n */ $c62e82d490c40b15$var$RenderLoop.prototype.stage = function() {\n return this._stage;\n};\n/**\n * Starts the render loop.\n */ $c62e82d490c40b15$var$RenderLoop.prototype.start = function() {\n this._running = true;\n this.renderOnNextFrame();\n};\n/**\n * Stops the render loop.\n */ $c62e82d490c40b15$var$RenderLoop.prototype.stop = function() {\n if (this._requestHandle) {\n window.cancelAnimationFrame(this._requestHandle);\n this._requestHandle = null;\n }\n this._running = false;\n};\n/**\n * Forces the stage to render on the next frame, even if its contents remain\n * valid. Does nothing if the loop is stopped.\n */ $c62e82d490c40b15$var$RenderLoop.prototype.renderOnNextFrame = function() {\n if (this._running && !this._requestHandle) this._requestHandle = window.requestAnimationFrame(this._boundLoop);\n};\n$c62e82d490c40b15$var$RenderLoop.prototype._loop = function() {\n if (!this._running) throw new Error(\"Render loop running while in stopped state\");\n this._requestHandle = null;\n this._rendering = true;\n this.emit(\"beforeRender\");\n this._rendering = false;\n this._stage.render();\n this.emit(\"afterRender\");\n};\nmodule.exports = $c62e82d490c40b15$var$RenderLoop;\n\n});\n\nparcelRegister(\"kniT1\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $6mia6 = parcelRequire(\"6mia6\");\n\nvar $bqWZD = parcelRequire(\"bqWZD\");\n\nvar $2Xxut = parcelRequire(\"2Xxut\");\n/**\n * @class KeyControlMethod\n * @implements ControlMethod\n * @classdesc\n *\n * Sets the velocity and friction of a single parameter by pressing and\n * unpressing a key.\n *\n * @param {number} keyCode Key which activates the method when pressed\n * @param {string} parameter The parameter to be controlled (e.g. `x`, `y` or `zoom`)\n * @param {number} velocity Velocity at which the parameter changes. Use a\n * negative number for opposite direction\n * @param {number} friction Friction at which the parameter stops\n * @param {Element} [element=document] DOM element where the key events are listened to\n */ function $ed549b163b1d230d$var$KeyControlMethod(keyCode, parameter, velocity, friction, element) {\n if (!keyCode) throw new Error(\"KeyControlMethod: keyCode must be defined\");\n if (!parameter) throw new Error(\"KeyControlMethod: parameter must be defined\");\n if (!velocity) throw new Error(\"KeyControlMethod: velocity must be defined\");\n if (!friction) throw new Error(\"KeyControlMethod: friction must be defined\");\n element = element || document;\n this._keyCode = keyCode;\n this._parameter = parameter;\n this._velocity = velocity;\n this._friction = friction;\n this._element = element;\n this._keydownHandler = this._handlePress.bind(this);\n this._keyupHandler = this._handleRelease.bind(this);\n this._blurHandler = this._handleBlur.bind(this);\n this._element.addEventListener(\"keydown\", this._keydownHandler);\n this._element.addEventListener(\"keyup\", this._keyupHandler);\n window.addEventListener(\"blur\", this._blurHandler);\n this._dynamics = new $bqWZD();\n this._pressing = false;\n}\n$6mia6($ed549b163b1d230d$var$KeyControlMethod);\n/**\n * Destructor.\n */ $ed549b163b1d230d$var$KeyControlMethod.prototype.destroy = function() {\n this._element.removeEventListener(\"keydown\", this._keydownHandler);\n this._element.removeEventListener(\"keyup\", this._keyupHandler);\n window.removeEventListener(\"blur\", this._blurHandler);\n $2Xxut(this);\n};\n$ed549b163b1d230d$var$KeyControlMethod.prototype._handlePress = function(e) {\n if (e.keyCode !== this._keyCode) return;\n this._pressing = true;\n this._dynamics.velocity = this._velocity;\n this._dynamics.friction = 0;\n this.emit(\"parameterDynamics\", this._parameter, this._dynamics);\n this.emit(\"active\");\n};\n$ed549b163b1d230d$var$KeyControlMethod.prototype._handleRelease = function(e) {\n if (e.keyCode !== this._keyCode) return;\n if (this._pressing) {\n this._dynamics.friction = this._friction;\n this.emit(\"parameterDynamics\", this._parameter, this._dynamics);\n this.emit(\"inactive\");\n }\n this._pressing = false;\n};\n$ed549b163b1d230d$var$KeyControlMethod.prototype._handleBlur = function() {\n this._dynamics.velocity = 0;\n this.emit(\"parameterDynamics\", this._parameter, this._dynamics);\n this.emit(\"inactive\");\n this._pressing = false;\n};\nmodule.exports = $ed549b163b1d230d$var$KeyControlMethod;\n\n});\nparcelRegister(\"bqWZD\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n/**\n * @class Dynamics\n * @classdesc\n *\n * Represents how a control parameter changes. Used in the events emitted by\n * {@link ControlMethod}.\n *\n * @property {number} offset Parameter changed by a fixed value\n * @property {number} velocity Parameter is changing at this velocity\n * @property {number} friction The velocity will decrease at this rate\n */ function $852fe23eeece1a4d$var$Dynamics() {\n this.velocity = null;\n this.friction = null;\n this.offset = null;\n}\n$852fe23eeece1a4d$var$Dynamics.equals = function(d1, d2) {\n return d1.velocity === d2.velocity && d1.friction === d2.friction && d1.offset === d2.offset;\n};\n$852fe23eeece1a4d$var$Dynamics.prototype.equals = function(other) {\n return $852fe23eeece1a4d$var$Dynamics.equals(this, other);\n};\n$852fe23eeece1a4d$var$Dynamics.prototype.update = function(other, elapsed) {\n if (other.offset) {\n // If other has an offset, make this.offset a number instead of null\n this.offset = this.offset || 0;\n this.offset += other.offset;\n }\n var offsetFromVelocity = this.offsetFromVelocity(elapsed);\n if (offsetFromVelocity) {\n // If there is an offset to add from the velocity, make this offset a number instead of null\n this.offset = this.offset || 0;\n this.offset += offsetFromVelocity;\n }\n this.velocity = other.velocity;\n this.friction = other.friction;\n};\n$852fe23eeece1a4d$var$Dynamics.prototype.reset = function() {\n this.velocity = null;\n this.friction = null;\n this.offset = null;\n};\n$852fe23eeece1a4d$var$Dynamics.prototype.velocityAfter = function(elapsed) {\n if (!this.velocity) return null;\n if (this.friction) return $852fe23eeece1a4d$var$decreaseAbs(this.velocity, this.friction * elapsed);\n return this.velocity;\n};\n$852fe23eeece1a4d$var$Dynamics.prototype.offsetFromVelocity = function(elapsed) {\n elapsed = Math.min(elapsed, this.nullVelocityTime());\n var velocityEnd = this.velocityAfter(elapsed);\n var averageVelocity = (this.velocity + velocityEnd) / 2;\n return averageVelocity * elapsed;\n};\n$852fe23eeece1a4d$var$Dynamics.prototype.nullVelocityTime = function() {\n if (this.velocity == null) return 0;\n if (this.velocity && !this.friction) return Infinity;\n return Math.abs(this.velocity / this.friction);\n};\nfunction $852fe23eeece1a4d$var$decreaseAbs(num, dec) {\n if (num < 0) return Math.min(0, num + dec);\n if (num > 0) return Math.max(0, num - dec);\n return 0;\n}\nmodule.exports = $852fe23eeece1a4d$var$Dynamics;\n\n});\n\n\nparcelRegister(\"efdW7\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $6mia6 = parcelRequire(\"6mia6\");\n\nvar $bqWZD = parcelRequire(\"bqWZD\");\n\nvar $8BNHT = parcelRequire(\"8BNHT\");\n\nvar $9eJDl = parcelRequire(\"9eJDl\");\n\nvar $nc4qC = parcelRequire(\"nc4qC\");\nvar $a5ed46dfd02f4481$require$maxFriction = $nc4qC.maxFriction;\n\nvar $2Xxut = parcelRequire(\"2Xxut\");\nvar $a5ed46dfd02f4481$var$defaultOptions = {\n friction: 6,\n maxFrictionTime: 0.3\n};\nvar $a5ed46dfd02f4481$var$debug = typeof MARZIPANODEBUG !== \"undefined\" && MARZIPANODEBUG.controls;\n/**\n * @class DragControlMethod\n * @implements ControlMethod\n * @classdesc\n *\n * Controls the view by clicking/tapping and dragging.\n *\n * @param {Element} element Element to listen for events.\n * @param {string} pointerType Which Hammer.js pointer type to use (e.g.\n * `mouse` or `touch`).\n * @param {Object} opts\n * @param {number} opts.friction\n * @param {number} opts.maxFrictionTime\n */ function $a5ed46dfd02f4481$var$DragControlMethod(element, pointerType, opts) {\n this._element = element;\n this._opts = $9eJDl(opts || {}, $a5ed46dfd02f4481$var$defaultOptions);\n this._startEvent = null;\n this._lastEvent = null;\n this._active = false;\n this._dynamics = {\n x: new $bqWZD(),\n y: new $bqWZD()\n };\n this._hammer = $8BNHT.get(element, pointerType);\n this._hammer.on(\"hammer.input\", this._handleHammerEvent.bind(this));\n this._hammer.on(\"panstart\", this._handleStart.bind(this));\n this._hammer.on(\"panmove\", this._handleMove.bind(this));\n this._hammer.on(\"panend\", this._handleEnd.bind(this));\n this._hammer.on(\"pancancel\", this._handleEnd.bind(this));\n}\n$6mia6($a5ed46dfd02f4481$var$DragControlMethod);\n/**\n * Destructor.\n */ $a5ed46dfd02f4481$var$DragControlMethod.prototype.destroy = function() {\n this._hammer.release();\n $2Xxut(this);\n};\n$a5ed46dfd02f4481$var$DragControlMethod.prototype._handleHammerEvent = function(e) {\n if (e.isFirst) {\n if ($a5ed46dfd02f4481$var$debug && this._active) throw new Error(\"DragControlMethod active detected when already active\");\n this._active = true;\n this.emit(\"active\");\n }\n if (e.isFinal) {\n if ($a5ed46dfd02f4481$var$debug && !this._active) throw new Error(\"DragControlMethod inactive detected when already inactive\");\n this._active = false;\n this.emit(\"inactive\");\n }\n};\n$a5ed46dfd02f4481$var$DragControlMethod.prototype._handleStart = function(e) {\n // Prevent this event from dragging other DOM elements, causing\n // unexpected behavior on Chrome.\n e.preventDefault();\n this._startEvent = e;\n};\n$a5ed46dfd02f4481$var$DragControlMethod.prototype._handleMove = function(e) {\n // Prevent this event from dragging other DOM elements, causing\n // unexpected behavior on Chrome.\n e.preventDefault();\n if (this._startEvent) {\n this._updateDynamicsMove(e);\n this.emit(\"parameterDynamics\", \"axisScaledX\", this._dynamics.x);\n this.emit(\"parameterDynamics\", \"axisScaledY\", this._dynamics.y);\n }\n};\n$a5ed46dfd02f4481$var$DragControlMethod.prototype._handleEnd = function(e) {\n // Prevent this event from dragging other DOM elements, causing\n // unexpected behavior on Chrome.\n e.preventDefault();\n if (this._startEvent) {\n this._updateDynamicsRelease(e);\n this.emit(\"parameterDynamics\", \"axisScaledX\", this._dynamics.x);\n this.emit(\"parameterDynamics\", \"axisScaledY\", this._dynamics.y);\n }\n this._startEvent = false;\n this._lastEvent = false;\n};\n$a5ed46dfd02f4481$var$DragControlMethod.prototype._updateDynamicsMove = function(e) {\n var x = e.deltaX;\n var y = e.deltaY;\n // When a second finger touches the screen, panstart sometimes has a large\n // offset at start; subtract that offset to prevent a sudden jump.\n var eventToSubtract = this._lastEvent || this._startEvent;\n if (eventToSubtract) {\n x -= eventToSubtract.deltaX;\n y -= eventToSubtract.deltaY;\n }\n var elementRect = this._element.getBoundingClientRect();\n var width = elementRect.right - elementRect.left;\n var height = elementRect.bottom - elementRect.top;\n x /= width;\n y /= height;\n this._dynamics.x.reset();\n this._dynamics.y.reset();\n this._dynamics.x.offset = -x;\n this._dynamics.y.offset = -y;\n this._lastEvent = e;\n};\nvar $a5ed46dfd02f4481$var$tmpReleaseFriction = [\n null,\n null\n];\n$a5ed46dfd02f4481$var$DragControlMethod.prototype._updateDynamicsRelease = function(e) {\n var elementRect = this._element.getBoundingClientRect();\n var width = elementRect.right - elementRect.left;\n var height = elementRect.bottom - elementRect.top;\n var x = 1000 * e.velocityX / width;\n var y = 1000 * e.velocityY / height;\n this._dynamics.x.reset();\n this._dynamics.y.reset();\n this._dynamics.x.velocity = x;\n this._dynamics.y.velocity = y;\n $a5ed46dfd02f4481$require$maxFriction(this._opts.friction, this._dynamics.x.velocity, this._dynamics.y.velocity, this._opts.maxFrictionTime, $a5ed46dfd02f4481$var$tmpReleaseFriction);\n this._dynamics.x.friction = $a5ed46dfd02f4481$var$tmpReleaseFriction[0];\n this._dynamics.y.friction = $a5ed46dfd02f4481$var$tmpReleaseFriction[1];\n};\nmodule.exports = $a5ed46dfd02f4481$var$DragControlMethod;\n\n});\nparcelRegister(\"8BNHT\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $bTkIC = parcelRequire(\"bTkIC\");\n\nvar $W9Vbx = parcelRequire(\"W9Vbx\");\nvar $6448562f3462d0fe$var$nextId = 1;\nvar $6448562f3462d0fe$var$idProperty = \"MarzipanoHammerElementId\";\nfunction $6448562f3462d0fe$var$getKeyForElementAndType(element, type) {\n if (!element[$6448562f3462d0fe$var$idProperty]) element[$6448562f3462d0fe$var$idProperty] = $6448562f3462d0fe$var$nextId++;\n return type + element[$6448562f3462d0fe$var$idProperty];\n}\n/**\n * @class HammerGestures\n * @classdesc\n *\n * Manages Hammer.js instances. One instance is created for each combination of\n * DOM element and pointer type.\n */ function $6448562f3462d0fe$var$HammerGestures() {\n this._managers = {};\n this._refCount = {};\n}\n$6448562f3462d0fe$var$HammerGestures.prototype.get = function(element, type) {\n var key = $6448562f3462d0fe$var$getKeyForElementAndType(element, type);\n if (!this._managers[key]) {\n this._managers[key] = this._createManager(element, type);\n this._refCount[key] = 0;\n }\n this._refCount[key]++;\n return new $6448562f3462d0fe$var$HammerGesturesHandle(this, this._managers[key], element, type);\n};\n$6448562f3462d0fe$var$HammerGestures.prototype._createManager = function(element, type) {\n var manager = new $bTkIC.Manager(element);\n // Managers are created with different parameters for different pointer\n // types.\n if (type === \"mouse\") manager.add(new $bTkIC.Pan({\n direction: $bTkIC.DIRECTION_ALL,\n threshold: 0\n }));\n else if (type === \"touch\" || type === \"pen\" || type === \"kinect\") {\n // On touch one wants to have both panning and pinching. The panning\n // recognizer needs a threshold to allow the pinch to be recognized.\n manager.add(new $bTkIC.Pan({\n direction: $bTkIC.DIRECTION_ALL,\n threshold: 20,\n pointers: 1\n }));\n if (!($W9Vbx.msie && parseFloat($W9Vbx.version) < 10)) // Do not add pinch to IE8-9 to prevent focus issues which prevent wheel scrolling from\n // working.\n manager.add(new $bTkIC.Pinch());\n }\n return manager;\n};\n$6448562f3462d0fe$var$HammerGestures.prototype._releaseHandle = function(element, type) {\n var key = $6448562f3462d0fe$var$getKeyForElementAndType(element, type);\n if (this._refCount[key]) {\n this._refCount[key]--;\n if (!this._refCount[key]) {\n this._managers[key].destroy();\n delete this._managers[key];\n delete this._refCount[key];\n }\n }\n};\nfunction $6448562f3462d0fe$var$HammerGesturesHandle(hammerGestures, manager, element, type) {\n this._manager = manager;\n this._element = element;\n this._type = type;\n this._hammerGestures = hammerGestures;\n this._eventHandlers = [];\n}\n$6448562f3462d0fe$var$HammerGesturesHandle.prototype.on = function(events, handler) {\n var type = this._type;\n var handlerFilteredEvents = function(e) {\n if (type === e.pointerType) handler(e);\n };\n this._eventHandlers.push({\n events: events,\n handler: handlerFilteredEvents\n });\n this._manager.on(events, handlerFilteredEvents);\n};\n$6448562f3462d0fe$var$HammerGesturesHandle.prototype.release = function() {\n for(var i = 0; i < this._eventHandlers.length; i++){\n var eventHandler = this._eventHandlers[i];\n this._manager.off(eventHandler.events, eventHandler.handler);\n }\n this._hammerGestures._releaseHandle(this._element, this._type);\n this._manager = null;\n this._element = null;\n this._type = null;\n this._hammerGestures = null;\n};\n$6448562f3462d0fe$var$HammerGesturesHandle.prototype.manager = function() {\n return this._manager;\n};\nmodule.exports = new $6448562f3462d0fe$var$HammerGestures();\n\n});\nparcelRegister(\"bTkIC\", function(module, exports) {\n/*! Hammer.JS - v2.0.4 - 2014-09-28\r\n * http://hammerjs.github.io/\r\n *\r\n * Copyright (c) 2014 Jorik Tangelder;\r\n * Licensed under the MIT license */ (function(window1, document1, exportName, undefined) {\n \"use strict\";\n var VENDOR_PREFIXES = [\n \"\",\n \"webkit\",\n \"moz\",\n \"MS\",\n \"ms\",\n \"o\"\n ];\n var TEST_ELEMENT = document1.createElement(\"div\");\n var TYPE_FUNCTION = \"function\";\n var round = Math.round;\n var abs = Math.abs;\n var now = Date.now;\n /**\r\n * set a timeout with a given scope\r\n * @param {Function} fn\r\n * @param {Number} timeout\r\n * @param {Object} context\r\n * @returns {number}\r\n */ function setTimeoutContext(fn, timeout, context) {\n return setTimeout(bindFn(fn, context), timeout);\n }\n /**\r\n * if the argument is an array, we want to execute the fn on each entry\r\n * if it aint an array we don't want to do a thing.\r\n * this is used by all the methods that accept a single and array argument.\r\n * @param {*|Array} arg\r\n * @param {String} fn\r\n * @param {Object} [context]\r\n * @returns {Boolean}\r\n */ function invokeArrayArg(arg, fn, context) {\n if (Array.isArray(arg)) {\n each(arg, context[fn], context);\n return true;\n }\n return false;\n }\n /**\r\n * walk objects and arrays\r\n * @param {Object} obj\r\n * @param {Function} iterator\r\n * @param {Object} context\r\n */ function each(obj, iterator, context) {\n var i;\n if (!obj) return;\n if (obj.forEach) obj.forEach(iterator, context);\n else if (obj.length !== undefined) {\n i = 0;\n while(i < obj.length){\n iterator.call(context, obj[i], i, obj);\n i++;\n }\n } else for(i in obj)obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj);\n }\n /**\r\n * extend object.\r\n * means that properties in dest will be overwritten by the ones in src.\r\n * @param {Object} dest\r\n * @param {Object} src\r\n * @param {Boolean} [merge]\r\n * @returns {Object} dest\r\n */ function extend(dest, src, merge) {\n var keys = Object.keys(src);\n var i = 0;\n while(i < keys.length){\n if (!merge || merge && dest[keys[i]] === undefined) dest[keys[i]] = src[keys[i]];\n i++;\n }\n return dest;\n }\n /**\r\n * merge the values from src in the dest.\r\n * means that properties that exist in dest will not be overwritten by src\r\n * @param {Object} dest\r\n * @param {Object} src\r\n * @returns {Object} dest\r\n */ function merge(dest, src) {\n return extend(dest, src, true);\n }\n /**\r\n * simple class inheritance\r\n * @param {Function} child\r\n * @param {Function} base\r\n * @param {Object} [properties]\r\n */ function inherit(child, base, properties) {\n var baseP = base.prototype, childP;\n childP = child.prototype = Object.create(baseP);\n childP.constructor = child;\n childP._super = baseP;\n if (properties) extend(childP, properties);\n }\n /**\r\n * simple function bind\r\n * @param {Function} fn\r\n * @param {Object} context\r\n * @returns {Function}\r\n */ function bindFn(fn, context) {\n return function boundFn() {\n return fn.apply(context, arguments);\n };\n }\n /**\r\n * let a boolean value also be a function that must return a boolean\r\n * this first item in args will be used as the context\r\n * @param {Boolean|Function} val\r\n * @param {Array} [args]\r\n * @returns {Boolean}\r\n */ function boolOrFn(val, args) {\n if (typeof val == TYPE_FUNCTION) return val.apply(args ? args[0] || undefined : undefined, args);\n return val;\n }\n /**\r\n * use the val2 when val1 is undefined\r\n * @param {*} val1\r\n * @param {*} val2\r\n * @returns {*}\r\n */ function ifUndefined(val1, val2) {\n return val1 === undefined ? val2 : val1;\n }\n /**\r\n * addEventListener with multiple events at once\r\n * @param {EventTarget} target\r\n * @param {String} types\r\n * @param {Function} handler\r\n */ function addEventListeners(target, types, handler) {\n each(splitStr(types), function(type) {\n target.addEventListener(type, handler, false);\n });\n }\n /**\r\n * removeEventListener with multiple events at once\r\n * @param {EventTarget} target\r\n * @param {String} types\r\n * @param {Function} handler\r\n */ function removeEventListeners(target, types, handler) {\n each(splitStr(types), function(type) {\n target.removeEventListener(type, handler, false);\n });\n }\n /**\r\n * find if a node is in the given parent\r\n * @method hasParent\r\n * @param {HTMLElement} node\r\n * @param {HTMLElement} parent\r\n * @return {Boolean} found\r\n */ function hasParent(node, parent) {\n while(node){\n if (node == parent) return true;\n node = node.parentNode;\n }\n return false;\n }\n /**\r\n * small indexOf wrapper\r\n * @param {String} str\r\n * @param {String} find\r\n * @returns {Boolean} found\r\n */ function inStr(str, find) {\n return str.indexOf(find) > -1;\n }\n /**\r\n * split string on whitespace\r\n * @param {String} str\r\n * @returns {Array} words\r\n */ function splitStr(str) {\n return str.trim().split(/\\s+/g);\n }\n /**\r\n * find if a array contains the object using indexOf or a simple polyFill\r\n * @param {Array} src\r\n * @param {String} find\r\n * @param {String} [findByKey]\r\n * @return {Boolean|Number} false when not found, or the index\r\n */ function inArray(src, find, findByKey) {\n if (src.indexOf && !findByKey) return src.indexOf(find);\n else {\n var i = 0;\n while(i < src.length){\n if (findByKey && src[i][findByKey] == find || !findByKey && src[i] === find) return i;\n i++;\n }\n return -1;\n }\n }\n /**\r\n * convert array-like objects to real arrays\r\n * @param {Object} obj\r\n * @returns {Array}\r\n */ function toArray(obj) {\n return Array.prototype.slice.call(obj, 0);\n }\n /**\r\n * unique array with objects based on a key (like 'id') or just by the array's value\r\n * @param {Array} src [{id:1},{id:2},{id:1}]\r\n * @param {String} [key]\r\n * @param {Boolean} [sort=False]\r\n * @returns {Array} [{id:1},{id:2}]\r\n */ function uniqueArray(src, key, sort) {\n var results = [];\n var values = [];\n var i = 0;\n while(i < src.length){\n var val = key ? src[i][key] : src[i];\n if (inArray(values, val) < 0) results.push(src[i]);\n values[i] = val;\n i++;\n }\n if (sort) {\n if (!key) results = results.sort();\n else results = results.sort(function sortUniqueArray(a, b) {\n return a[key] > b[key];\n });\n }\n return results;\n }\n /**\r\n * get the prefixed property\r\n * @param {Object} obj\r\n * @param {String} property\r\n * @returns {String|Undefined} prefixed\r\n */ function prefixed(obj, property) {\n var prefix, prop;\n var camelProp = property[0].toUpperCase() + property.slice(1);\n var i = 0;\n while(i < VENDOR_PREFIXES.length){\n prefix = VENDOR_PREFIXES[i];\n prop = prefix ? prefix + camelProp : property;\n if (prop in obj) return prop;\n i++;\n }\n return undefined;\n }\n /**\r\n * get a unique id\r\n * @returns {number} uniqueId\r\n */ var _uniqueId = 1;\n function uniqueId() {\n return _uniqueId++;\n }\n /**\r\n * get the window object of an element\r\n * @param {HTMLElement} element\r\n * @returns {DocumentView|Window}\r\n */ function getWindowForElement(element) {\n var doc = element.ownerDocument;\n return doc.defaultView || doc.parentWindow;\n }\n var MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i;\n var SUPPORT_TOUCH = \"ontouchstart\" in window1;\n var SUPPORT_POINTER_EVENTS = prefixed(window1, \"PointerEvent\") !== undefined;\n var SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent);\n var INPUT_TYPE_TOUCH = \"touch\";\n var INPUT_TYPE_PEN = \"pen\";\n var INPUT_TYPE_MOUSE = \"mouse\";\n var INPUT_TYPE_KINECT = \"kinect\";\n var COMPUTE_INTERVAL = 25;\n var INPUT_START = 1;\n var INPUT_MOVE = 2;\n var INPUT_END = 4;\n var INPUT_CANCEL = 8;\n var DIRECTION_NONE = 1;\n var DIRECTION_LEFT = 2;\n var DIRECTION_RIGHT = 4;\n var DIRECTION_UP = 8;\n var DIRECTION_DOWN = 16;\n var DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT;\n var DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN;\n var DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL;\n var PROPS_XY = [\n \"x\",\n \"y\"\n ];\n var PROPS_CLIENT_XY = [\n \"clientX\",\n \"clientY\"\n ];\n /**\r\n * create new input type manager\r\n * @param {Manager} manager\r\n * @param {Function} callback\r\n * @returns {Input}\r\n * @constructor\r\n */ function Input(manager, callback) {\n var self = this;\n this.manager = manager;\n this.callback = callback;\n this.element = manager.element;\n this.target = manager.options.inputTarget;\n // smaller wrapper around the handler, for the scope and the enabled state of the manager,\n // so when disabled the input events are completely bypassed.\n this.domHandler = function(ev) {\n if (boolOrFn(manager.options.enable, [\n manager\n ])) self.handler(ev);\n };\n this.init();\n }\n Input.prototype = {\n /**\r\n * should handle the inputEvent data and trigger the callback\r\n * @virtual\r\n */ handler: function() {},\n /**\r\n * bind the events\r\n */ init: function() {\n this.evEl && addEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n },\n /**\r\n * unbind the events\r\n */ destroy: function() {\n this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n }\n };\n /**\r\n * create new input type manager\r\n * called by the Manager constructor\r\n * @param {Hammer} manager\r\n * @returns {Input}\r\n */ function createInputInstance(manager) {\n var Type;\n var inputClass = manager.options.inputClass;\n if (inputClass) Type = inputClass;\n else if (SUPPORT_POINTER_EVENTS) Type = PointerEventInput;\n else if (SUPPORT_ONLY_TOUCH) Type = TouchInput;\n else if (!SUPPORT_TOUCH) Type = MouseInput;\n else Type = TouchMouseInput;\n return new Type(manager, inputHandler);\n }\n /**\r\n * handle input events\r\n * @param {Manager} manager\r\n * @param {String} eventType\r\n * @param {Object} input\r\n */ function inputHandler(manager, eventType, input) {\n var pointersLen = input.pointers.length;\n var changedPointersLen = input.changedPointers.length;\n var isFirst = eventType & INPUT_START && pointersLen - changedPointersLen === 0;\n var isFinal = eventType & (INPUT_END | INPUT_CANCEL) && pointersLen - changedPointersLen === 0;\n input.isFirst = !!isFirst;\n input.isFinal = !!isFinal;\n if (isFirst) manager.session = {};\n // source event is the normalized value of the domEvents\n // like 'touchstart, mouseup, pointerdown'\n input.eventType = eventType;\n // compute scale, rotation etc\n computeInputData(manager, input);\n // emit secret event\n manager.emit(\"hammer.input\", input);\n manager.recognize(input);\n manager.session.prevInput = input;\n }\n /**\r\n * extend the data with some usable properties like scale, rotate, velocity etc\r\n * @param {Object} manager\r\n * @param {Object} input\r\n */ function computeInputData(manager, input) {\n var session = manager.session;\n var pointers = input.pointers;\n var pointersLength = pointers.length;\n // store the first input to calculate the distance and direction\n if (!session.firstInput) session.firstInput = simpleCloneInputData(input);\n // to compute scale and rotation we need to store the multiple touches\n if (pointersLength > 1 && !session.firstMultiple) session.firstMultiple = simpleCloneInputData(input);\n else if (pointersLength === 1) session.firstMultiple = false;\n var firstInput = session.firstInput;\n var firstMultiple = session.firstMultiple;\n var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center;\n var center = input.center = getCenter(pointers);\n input.timeStamp = now();\n input.deltaTime = input.timeStamp - firstInput.timeStamp;\n input.angle = getAngle(offsetCenter, center);\n input.distance = getDistance(offsetCenter, center);\n computeDeltaXY(session, input);\n input.offsetDirection = getDirection(input.deltaX, input.deltaY);\n input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1;\n input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0;\n computeIntervalInputData(session, input);\n // find the correct target\n var target = manager.element;\n if (hasParent(input.srcEvent.target, target)) target = input.srcEvent.target;\n input.target = target;\n }\n function computeDeltaXY(session, input) {\n var center = input.center;\n var offset = session.offsetDelta || {};\n var prevDelta = session.prevDelta || {};\n var prevInput = session.prevInput || {};\n if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) {\n prevDelta = session.prevDelta = {\n x: prevInput.deltaX || 0,\n y: prevInput.deltaY || 0\n };\n offset = session.offsetDelta = {\n x: center.x,\n y: center.y\n };\n }\n input.deltaX = prevDelta.x + (center.x - offset.x);\n input.deltaY = prevDelta.y + (center.y - offset.y);\n }\n /**\r\n * velocity is calculated every x ms\r\n * @param {Object} session\r\n * @param {Object} input\r\n */ function computeIntervalInputData(session, input) {\n var last = session.lastInterval || input, deltaTime = input.timeStamp - last.timeStamp, velocity, velocityX, velocityY, direction;\n if (input.eventType != INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) {\n var deltaX = last.deltaX - input.deltaX;\n var deltaY = last.deltaY - input.deltaY;\n var v = getVelocity(deltaTime, deltaX, deltaY);\n velocityX = v.x;\n velocityY = v.y;\n velocity = abs(v.x) > abs(v.y) ? v.x : v.y;\n direction = getDirection(deltaX, deltaY);\n session.lastInterval = input;\n } else {\n // use latest velocity info if it doesn't overtake a minimum period\n velocity = last.velocity;\n velocityX = last.velocityX;\n velocityY = last.velocityY;\n direction = last.direction;\n }\n input.velocity = velocity;\n input.velocityX = velocityX;\n input.velocityY = velocityY;\n input.direction = direction;\n }\n /**\r\n * create a simple clone from the input used for storage of firstInput and firstMultiple\r\n * @param {Object} input\r\n * @returns {Object} clonedInputData\r\n */ function simpleCloneInputData(input) {\n // make a simple copy of the pointers because we will get a reference if we don't\n // we only need clientXY for the calculations\n var pointers = [];\n var i = 0;\n while(i < input.pointers.length){\n pointers[i] = {\n clientX: round(input.pointers[i].clientX),\n clientY: round(input.pointers[i].clientY)\n };\n i++;\n }\n return {\n timeStamp: now(),\n pointers: pointers,\n center: getCenter(pointers),\n deltaX: input.deltaX,\n deltaY: input.deltaY\n };\n }\n /**\r\n * get the center of all the pointers\r\n * @param {Array} pointers\r\n * @return {Object} center contains `x` and `y` properties\r\n */ function getCenter(pointers) {\n var pointersLength = pointers.length;\n // no need to loop when only one touch\n if (pointersLength === 1) return {\n x: round(pointers[0].clientX),\n y: round(pointers[0].clientY)\n };\n var x = 0, y = 0, i = 0;\n while(i < pointersLength){\n x += pointers[i].clientX;\n y += pointers[i].clientY;\n i++;\n }\n return {\n x: round(x / pointersLength),\n y: round(y / pointersLength)\n };\n }\n /**\r\n * calculate the velocity between two points. unit is in px per ms.\r\n * @param {Number} deltaTime\r\n * @param {Number} x\r\n * @param {Number} y\r\n * @return {Object} velocity `x` and `y`\r\n */ function getVelocity(deltaTime, x, y) {\n return {\n x: x / deltaTime || 0,\n y: y / deltaTime || 0\n };\n }\n /**\r\n * get the direction between two points\r\n * @param {Number} x\r\n * @param {Number} y\r\n * @return {Number} direction\r\n */ function getDirection(x, y) {\n if (x === y) return DIRECTION_NONE;\n if (abs(x) >= abs(y)) return x > 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;\n return y > 0 ? DIRECTION_UP : DIRECTION_DOWN;\n }\n /**\r\n * calculate the absolute distance between two points\r\n * @param {Object} p1 {x, y}\r\n * @param {Object} p2 {x, y}\r\n * @param {Array} [props] containing x and y keys\r\n * @return {Number} distance\r\n */ function getDistance(p1, p2, props) {\n if (!props) props = PROPS_XY;\n var x = p2[props[0]] - p1[props[0]], y = p2[props[1]] - p1[props[1]];\n return Math.sqrt(x * x + y * y);\n }\n /**\r\n * calculate the angle between two coordinates\r\n * @param {Object} p1\r\n * @param {Object} p2\r\n * @param {Array} [props] containing x and y keys\r\n * @return {Number} angle\r\n */ function getAngle(p1, p2, props) {\n if (!props) props = PROPS_XY;\n var x = p2[props[0]] - p1[props[0]], y = p2[props[1]] - p1[props[1]];\n return Math.atan2(y, x) * 180 / Math.PI;\n }\n /**\r\n * calculate the rotation degrees between two pointersets\r\n * @param {Array} start array of pointers\r\n * @param {Array} end array of pointers\r\n * @return {Number} rotation\r\n */ function getRotation(start, end) {\n return getAngle(end[1], end[0], PROPS_CLIENT_XY) - getAngle(start[1], start[0], PROPS_CLIENT_XY);\n }\n /**\r\n * calculate the scale factor between two pointersets\r\n * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out\r\n * @param {Array} start array of pointers\r\n * @param {Array} end array of pointers\r\n * @return {Number} scale\r\n */ function getScale(start, end) {\n return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY);\n }\n var MOUSE_INPUT_MAP = {\n mousedown: INPUT_START,\n mousemove: INPUT_MOVE,\n mouseup: INPUT_END\n };\n var MOUSE_ELEMENT_EVENTS = \"mousedown\";\n var MOUSE_WINDOW_EVENTS = \"mousemove mouseup\";\n /**\r\n * Mouse events input\r\n * @constructor\r\n * @extends Input\r\n */ function MouseInput() {\n this.evEl = MOUSE_ELEMENT_EVENTS;\n this.evWin = MOUSE_WINDOW_EVENTS;\n this.allow = true; // used by Input.TouchMouse to disable mouse events\n this.pressed = false; // mousedown state\n Input.apply(this, arguments);\n }\n inherit(MouseInput, Input, {\n /**\r\n * handle mouse events\r\n * @param {Object} ev\r\n */ handler: function MEhandler(ev) {\n var eventType = MOUSE_INPUT_MAP[ev.type];\n // on start we want to have the left mouse button down\n if (eventType & INPUT_START && ev.button === 0) this.pressed = true;\n if (eventType & INPUT_MOVE && ev.which !== 1) eventType = INPUT_END;\n // mouse must be down, and mouse events are allowed (see the TouchMouse input)\n if (!this.pressed || !this.allow) return;\n if (eventType & INPUT_END) this.pressed = false;\n this.callback(this.manager, eventType, {\n pointers: [\n ev\n ],\n changedPointers: [\n ev\n ],\n pointerType: INPUT_TYPE_MOUSE,\n srcEvent: ev\n });\n }\n });\n var POINTER_INPUT_MAP = {\n pointerdown: INPUT_START,\n pointermove: INPUT_MOVE,\n pointerup: INPUT_END,\n pointercancel: INPUT_CANCEL,\n pointerout: INPUT_CANCEL\n };\n // in IE10 the pointer types is defined as an enum\n var IE10_POINTER_TYPE_ENUM = {\n 2: INPUT_TYPE_TOUCH,\n 3: INPUT_TYPE_PEN,\n 4: INPUT_TYPE_MOUSE,\n 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816\n };\n var POINTER_ELEMENT_EVENTS = \"pointerdown\";\n var POINTER_WINDOW_EVENTS = \"pointermove pointerup pointercancel\";\n // IE10 has prefixed support, and case-sensitive\n if (window1.MSPointerEvent) {\n POINTER_ELEMENT_EVENTS = \"MSPointerDown\";\n POINTER_WINDOW_EVENTS = \"MSPointerMove MSPointerUp MSPointerCancel\";\n }\n /**\r\n * Pointer events input\r\n * @constructor\r\n * @extends Input\r\n */ function PointerEventInput() {\n this.evEl = POINTER_ELEMENT_EVENTS;\n this.evWin = POINTER_WINDOW_EVENTS;\n Input.apply(this, arguments);\n this.store = this.manager.session.pointerEvents = [];\n }\n inherit(PointerEventInput, Input, {\n /**\r\n * handle mouse events\r\n * @param {Object} ev\r\n */ handler: function PEhandler(ev) {\n var store = this.store;\n var removePointer = false;\n var eventTypeNormalized = ev.type.toLowerCase().replace(\"ms\", \"\");\n var eventType = POINTER_INPUT_MAP[eventTypeNormalized];\n var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType;\n var isTouch = pointerType == INPUT_TYPE_TOUCH;\n // get index of the event in the store\n var storeIndex = inArray(store, ev.pointerId, \"pointerId\");\n // start and mouse must be down\n if (eventType & INPUT_START && (ev.button === 0 || isTouch)) {\n if (storeIndex < 0) {\n store.push(ev);\n storeIndex = store.length - 1;\n }\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) removePointer = true;\n // it not found, so the pointer hasn't been down (so it's probably a hover)\n if (storeIndex < 0) return;\n // update the event in the store\n store[storeIndex] = ev;\n this.callback(this.manager, eventType, {\n pointers: store,\n changedPointers: [\n ev\n ],\n pointerType: pointerType,\n srcEvent: ev\n });\n if (removePointer) // remove from the store\n store.splice(storeIndex, 1);\n }\n });\n var SINGLE_TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n };\n var SINGLE_TOUCH_TARGET_EVENTS = \"touchstart\";\n var SINGLE_TOUCH_WINDOW_EVENTS = \"touchstart touchmove touchend touchcancel\";\n /**\r\n * Touch events input\r\n * @constructor\r\n * @extends Input\r\n */ function SingleTouchInput() {\n this.evTarget = SINGLE_TOUCH_TARGET_EVENTS;\n this.evWin = SINGLE_TOUCH_WINDOW_EVENTS;\n this.started = false;\n Input.apply(this, arguments);\n }\n inherit(SingleTouchInput, Input, {\n handler: function TEhandler(ev) {\n var type = SINGLE_TOUCH_INPUT_MAP[ev.type];\n // should we handle the touch events?\n if (type === INPUT_START) this.started = true;\n if (!this.started) return;\n var touches = normalizeSingleTouches.call(this, ev, type);\n // when done, reset the started state\n if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) this.started = false;\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n }\n });\n /**\r\n * @this {TouchInput}\r\n * @param {Object} ev\r\n * @param {Number} type flag\r\n * @returns {undefined|Array} [all, changed]\r\n */ function normalizeSingleTouches(ev, type) {\n var all = toArray(ev.touches);\n var changed = toArray(ev.changedTouches);\n if (type & (INPUT_END | INPUT_CANCEL)) all = uniqueArray(all.concat(changed), \"identifier\", true);\n return [\n all,\n changed\n ];\n }\n var TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n };\n var TOUCH_TARGET_EVENTS = \"touchstart touchmove touchend touchcancel\";\n /**\r\n * Multi-user touch events input\r\n * @constructor\r\n * @extends Input\r\n */ function TouchInput() {\n this.evTarget = TOUCH_TARGET_EVENTS;\n this.targetIds = {};\n Input.apply(this, arguments);\n }\n inherit(TouchInput, Input, {\n handler: function MTEhandler(ev) {\n var type = TOUCH_INPUT_MAP[ev.type];\n var touches = getTouches.call(this, ev, type);\n if (!touches) return;\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n }\n });\n /**\r\n * @this {TouchInput}\r\n * @param {Object} ev\r\n * @param {Number} type flag\r\n * @returns {undefined|Array} [all, changed]\r\n */ function getTouches(ev, type) {\n var allTouches = toArray(ev.touches);\n var targetIds = this.targetIds;\n // when there is only one touch, the process can be simplified\n if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) {\n targetIds[allTouches[0].identifier] = true;\n return [\n allTouches,\n allTouches\n ];\n }\n var i, targetTouches, changedTouches = toArray(ev.changedTouches), changedTargetTouches = [], target = this.target;\n // get target touches from touches\n targetTouches = allTouches.filter(function(touch) {\n return hasParent(touch.target, target);\n });\n // collect touches\n if (type === INPUT_START) {\n i = 0;\n while(i < targetTouches.length){\n targetIds[targetTouches[i].identifier] = true;\n i++;\n }\n }\n // filter changed touches to only contain touches that exist in the collected target ids\n i = 0;\n while(i < changedTouches.length){\n if (targetIds[changedTouches[i].identifier]) changedTargetTouches.push(changedTouches[i]);\n // cleanup removed touches\n if (type & (INPUT_END | INPUT_CANCEL)) delete targetIds[changedTouches[i].identifier];\n i++;\n }\n if (!changedTargetTouches.length) return;\n return [\n // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'\n uniqueArray(targetTouches.concat(changedTargetTouches), \"identifier\", true),\n changedTargetTouches\n ];\n }\n /**\r\n * Combined touch and mouse input\r\n *\r\n * Touch has a higher priority then mouse, and while touching no mouse events are allowed.\r\n * This because touch devices also emit mouse events while doing a touch.\r\n *\r\n * @constructor\r\n * @extends Input\r\n */ function TouchMouseInput() {\n Input.apply(this, arguments);\n var handler = bindFn(this.handler, this);\n this.touch = new TouchInput(this.manager, handler);\n this.mouse = new MouseInput(this.manager, handler);\n }\n inherit(TouchMouseInput, Input, {\n /**\r\n * handle mouse and touch events\r\n * @param {Hammer} manager\r\n * @param {String} inputEvent\r\n * @param {Object} inputData\r\n */ handler: function TMEhandler(manager, inputEvent, inputData) {\n var isTouch = inputData.pointerType == INPUT_TYPE_TOUCH, isMouse = inputData.pointerType == INPUT_TYPE_MOUSE;\n // when we're in a touch event, so block all upcoming mouse events\n // most mobile browser also emit mouseevents, right after touchstart\n if (isTouch) this.mouse.allow = false;\n else if (isMouse && !this.mouse.allow) return;\n // reset the allowMouse when we're done\n if (inputEvent & (INPUT_END | INPUT_CANCEL)) this.mouse.allow = true;\n this.callback(manager, inputEvent, inputData);\n },\n /**\r\n * remove the event listeners\r\n */ destroy: function destroy() {\n this.touch.destroy();\n this.mouse.destroy();\n }\n });\n var PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, \"touchAction\");\n var NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined;\n // magical touchAction value\n var TOUCH_ACTION_COMPUTE = \"compute\";\n var TOUCH_ACTION_AUTO = \"auto\";\n var TOUCH_ACTION_MANIPULATION = \"manipulation\"; // not implemented\n var TOUCH_ACTION_NONE = \"none\";\n var TOUCH_ACTION_PAN_X = \"pan-x\";\n var TOUCH_ACTION_PAN_Y = \"pan-y\";\n /**\r\n * Touch Action\r\n * sets the touchAction property or uses the js alternative\r\n * @param {Manager} manager\r\n * @param {String} value\r\n * @constructor\r\n */ function TouchAction(manager, value) {\n this.manager = manager;\n this.set(value);\n }\n TouchAction.prototype = {\n /**\r\n * set the touchAction value on the element or enable the polyfill\r\n * @param {String} value\r\n */ set: function(value) {\n // find out the touch-action by the event handlers\n if (value == TOUCH_ACTION_COMPUTE) value = this.compute();\n if (NATIVE_TOUCH_ACTION) this.manager.element.style[PREFIXED_TOUCH_ACTION] = value;\n this.actions = value.toLowerCase().trim();\n },\n /**\r\n * just re-set the touchAction value\r\n */ update: function() {\n this.set(this.manager.options.touchAction);\n },\n /**\r\n * compute the value for the touchAction property based on the recognizer's settings\r\n * @returns {String} value\r\n */ compute: function() {\n var actions = [];\n each(this.manager.recognizers, function(recognizer) {\n if (boolOrFn(recognizer.options.enable, [\n recognizer\n ])) actions = actions.concat(recognizer.getTouchAction());\n });\n return cleanTouchActions(actions.join(\" \"));\n },\n /**\r\n * this method is called on each input cycle and provides the preventing of the browser behavior\r\n * @param {Object} input\r\n */ preventDefaults: function(input) {\n // not needed with native support for the touchAction property\n if (NATIVE_TOUCH_ACTION) return;\n var srcEvent = input.srcEvent;\n var direction = input.offsetDirection;\n // if the touch action did prevented once this session\n if (this.manager.session.prevented) {\n srcEvent.preventDefault();\n return;\n }\n var actions = this.actions;\n var hasNone = inStr(actions, TOUCH_ACTION_NONE);\n var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y);\n var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X);\n if (hasNone || hasPanY && direction & DIRECTION_HORIZONTAL || hasPanX && direction & DIRECTION_VERTICAL) return this.preventSrc(srcEvent);\n },\n /**\r\n * call preventDefault to prevent the browser's default behavior (scrolling in most cases)\r\n * @param {Object} srcEvent\r\n */ preventSrc: function(srcEvent) {\n this.manager.session.prevented = true;\n srcEvent.preventDefault();\n }\n };\n /**\r\n * when the touchActions are collected they are not a valid value, so we need to clean things up. *\r\n * @param {String} actions\r\n * @returns {*}\r\n */ function cleanTouchActions(actions) {\n // none\n if (inStr(actions, TOUCH_ACTION_NONE)) return TOUCH_ACTION_NONE;\n var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X);\n var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y);\n // pan-x and pan-y can be combined\n if (hasPanX && hasPanY) return TOUCH_ACTION_PAN_X + \" \" + TOUCH_ACTION_PAN_Y;\n // pan-x OR pan-y\n if (hasPanX || hasPanY) return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y;\n // manipulation\n if (inStr(actions, TOUCH_ACTION_MANIPULATION)) return TOUCH_ACTION_MANIPULATION;\n return TOUCH_ACTION_AUTO;\n }\n /**\r\n * Recognizer flow explained; *\r\n * All recognizers have the initial state of POSSIBLE when a input session starts.\r\n * The definition of a input session is from the first input until the last input, with all it's movement in it. *\r\n * Example session for mouse-input: mousedown -> mousemove -> mouseup\r\n *\r\n * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed\r\n * which determines with state it should be.\r\n *\r\n * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to\r\n * POSSIBLE to give it another change on the next cycle.\r\n *\r\n * Possible\r\n * |\r\n * +-----+---------------+\r\n * | |\r\n * +-----+-----+ |\r\n * | | |\r\n * Failed Cancelled |\r\n * +-------+------+\r\n * | |\r\n * Recognized Began\r\n * |\r\n * Changed\r\n * |\r\n * Ended/Recognized\r\n */ var STATE_POSSIBLE = 1;\n var STATE_BEGAN = 2;\n var STATE_CHANGED = 4;\n var STATE_ENDED = 8;\n var STATE_RECOGNIZED = STATE_ENDED;\n var STATE_CANCELLED = 16;\n var STATE_FAILED = 32;\n /**\r\n * Recognizer\r\n * Every recognizer needs to extend from this class.\r\n * @constructor\r\n * @param {Object} options\r\n */ function Recognizer(options) {\n this.id = uniqueId();\n this.manager = null;\n this.options = merge(options || {}, this.defaults);\n // default is enable true\n this.options.enable = ifUndefined(this.options.enable, true);\n this.state = STATE_POSSIBLE;\n this.simultaneous = {};\n this.requireFail = [];\n }\n Recognizer.prototype = {\n /**\r\n * @virtual\r\n * @type {Object}\r\n */ defaults: {},\n /**\r\n * set options\r\n * @param {Object} options\r\n * @return {Recognizer}\r\n */ set: function(options) {\n extend(this.options, options);\n // also update the touchAction, in case something changed about the directions/enabled state\n this.manager && this.manager.touchAction.update();\n return this;\n },\n /**\r\n * recognize simultaneous with an other recognizer.\r\n * @param {Recognizer} otherRecognizer\r\n * @returns {Recognizer} this\r\n */ recognizeWith: function(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, \"recognizeWith\", this)) return this;\n var simultaneous = this.simultaneous;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n if (!simultaneous[otherRecognizer.id]) {\n simultaneous[otherRecognizer.id] = otherRecognizer;\n otherRecognizer.recognizeWith(this);\n }\n return this;\n },\n /**\r\n * drop the simultaneous link. it doesnt remove the link on the other recognizer.\r\n * @param {Recognizer} otherRecognizer\r\n * @returns {Recognizer} this\r\n */ dropRecognizeWith: function(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, \"dropRecognizeWith\", this)) return this;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n delete this.simultaneous[otherRecognizer.id];\n return this;\n },\n /**\r\n * recognizer can only run when an other is failing\r\n * @param {Recognizer} otherRecognizer\r\n * @returns {Recognizer} this\r\n */ requireFailure: function(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, \"requireFailure\", this)) return this;\n var requireFail = this.requireFail;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n if (inArray(requireFail, otherRecognizer) === -1) {\n requireFail.push(otherRecognizer);\n otherRecognizer.requireFailure(this);\n }\n return this;\n },\n /**\r\n * drop the requireFailure link. it does not remove the link on the other recognizer.\r\n * @param {Recognizer} otherRecognizer\r\n * @returns {Recognizer} this\r\n */ dropRequireFailure: function(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, \"dropRequireFailure\", this)) return this;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n var index = inArray(this.requireFail, otherRecognizer);\n if (index > -1) this.requireFail.splice(index, 1);\n return this;\n },\n /**\r\n * has require failures boolean\r\n * @returns {boolean}\r\n */ hasRequireFailures: function() {\n return this.requireFail.length > 0;\n },\n /**\r\n * if the recognizer can recognize simultaneous with an other recognizer\r\n * @param {Recognizer} otherRecognizer\r\n * @returns {Boolean}\r\n */ canRecognizeWith: function(otherRecognizer) {\n return !!this.simultaneous[otherRecognizer.id];\n },\n /**\r\n * You should use `tryEmit` instead of `emit` directly to check\r\n * that all the needed recognizers has failed before emitting.\r\n * @param {Object} input\r\n */ emit: function(input) {\n var self = this;\n var state = this.state;\n function emit(withState) {\n self.manager.emit(self.options.event + (withState ? stateStr(state) : \"\"), input);\n }\n // 'panstart' and 'panmove'\n if (state < STATE_ENDED) emit(true);\n emit(); // simple 'eventName' events\n // panend and pancancel\n if (state >= STATE_ENDED) emit(true);\n },\n /**\r\n * Check that all the require failure recognizers has failed,\r\n * if true, it emits a gesture event,\r\n * otherwise, setup the state to FAILED.\r\n * @param {Object} input\r\n */ tryEmit: function(input) {\n if (this.canEmit()) return this.emit(input);\n // it's failing anyway\n this.state = STATE_FAILED;\n },\n /**\r\n * can we emit?\r\n * @returns {boolean}\r\n */ canEmit: function() {\n var i = 0;\n while(i < this.requireFail.length){\n if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) return false;\n i++;\n }\n return true;\n },\n /**\r\n * update the recognizer\r\n * @param {Object} inputData\r\n */ recognize: function(inputData) {\n // make a new copy of the inputData\n // so we can change the inputData without messing up the other recognizers\n var inputDataClone = extend({}, inputData);\n // is is enabled and allow recognizing?\n if (!boolOrFn(this.options.enable, [\n this,\n inputDataClone\n ])) {\n this.reset();\n this.state = STATE_FAILED;\n return;\n }\n // reset when we've reached the end\n if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) this.state = STATE_POSSIBLE;\n this.state = this.process(inputDataClone);\n // the recognizer has recognized a gesture\n // so trigger an event\n if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) this.tryEmit(inputDataClone);\n },\n /**\r\n * return the state of the recognizer\r\n * the actual recognizing happens in this method\r\n * @virtual\r\n * @param {Object} inputData\r\n * @returns {Const} STATE\r\n */ process: function(inputData) {},\n /**\r\n * return the preferred touch-action\r\n * @virtual\r\n * @returns {Array}\r\n */ getTouchAction: function() {},\n /**\r\n * called when the gesture isn't allowed to recognize\r\n * like when another is being recognized or it is disabled\r\n * @virtual\r\n */ reset: function() {}\n };\n /**\r\n * get a usable string, used as event postfix\r\n * @param {Const} state\r\n * @returns {String} state\r\n */ function stateStr(state) {\n if (state & STATE_CANCELLED) return \"cancel\";\n else if (state & STATE_ENDED) return \"end\";\n else if (state & STATE_CHANGED) return \"move\";\n else if (state & STATE_BEGAN) return \"start\";\n return \"\";\n }\n /**\r\n * direction cons to string\r\n * @param {Const} direction\r\n * @returns {String}\r\n */ function directionStr(direction) {\n if (direction == DIRECTION_DOWN) return \"down\";\n else if (direction == DIRECTION_UP) return \"up\";\n else if (direction == DIRECTION_LEFT) return \"left\";\n else if (direction == DIRECTION_RIGHT) return \"right\";\n return \"\";\n }\n /**\r\n * get a recognizer by name if it is bound to a manager\r\n * @param {Recognizer|String} otherRecognizer\r\n * @param {Recognizer} recognizer\r\n * @returns {Recognizer}\r\n */ function getRecognizerByNameIfManager(otherRecognizer, recognizer) {\n var manager = recognizer.manager;\n if (manager) return manager.get(otherRecognizer);\n return otherRecognizer;\n }\n /**\r\n * This recognizer is just used as a base for the simple attribute recognizers.\r\n * @constructor\r\n * @extends Recognizer\r\n */ function AttrRecognizer() {\n Recognizer.apply(this, arguments);\n }\n inherit(AttrRecognizer, Recognizer, {\n /**\r\n * @namespace\r\n * @memberof AttrRecognizer\r\n */ defaults: {\n /**\r\n * @type {Number}\r\n * @default 1\r\n */ pointers: 1\n },\n /**\r\n * Used to check if it the recognizer receives valid input, like input.distance > 10.\r\n * @memberof AttrRecognizer\r\n * @param {Object} input\r\n * @returns {Boolean} recognized\r\n */ attrTest: function(input) {\n var optionPointers = this.options.pointers;\n return optionPointers === 0 || input.pointers.length === optionPointers;\n },\n /**\r\n * Process the input and return the state for the recognizer\r\n * @memberof AttrRecognizer\r\n * @param {Object} input\r\n * @returns {*} State\r\n */ process: function(input) {\n var state = this.state;\n var eventType = input.eventType;\n var isRecognized = state & (STATE_BEGAN | STATE_CHANGED);\n var isValid = this.attrTest(input);\n // on cancel input and we've recognized before, return STATE_CANCELLED\n if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) return state | STATE_CANCELLED;\n else if (isRecognized || isValid) {\n if (eventType & INPUT_END) return state | STATE_ENDED;\n else if (!(state & STATE_BEGAN)) return STATE_BEGAN;\n return state | STATE_CHANGED;\n }\n return STATE_FAILED;\n }\n });\n /**\r\n * Pan\r\n * Recognized when the pointer is down and moved in the allowed direction.\r\n * @constructor\r\n * @extends AttrRecognizer\r\n */ function PanRecognizer() {\n AttrRecognizer.apply(this, arguments);\n this.pX = null;\n this.pY = null;\n }\n inherit(PanRecognizer, AttrRecognizer, {\n /**\r\n * @namespace\r\n * @memberof PanRecognizer\r\n */ defaults: {\n event: \"pan\",\n threshold: 10,\n pointers: 1,\n direction: DIRECTION_ALL\n },\n getTouchAction: function() {\n var direction = this.options.direction;\n var actions = [];\n if (direction & DIRECTION_HORIZONTAL) actions.push(TOUCH_ACTION_PAN_Y);\n if (direction & DIRECTION_VERTICAL) actions.push(TOUCH_ACTION_PAN_X);\n return actions;\n },\n directionTest: function(input) {\n var options = this.options;\n var hasMoved = true;\n var distance = input.distance;\n var direction = input.direction;\n var x = input.deltaX;\n var y = input.deltaY;\n // lock to axis?\n if (!(direction & options.direction)) {\n if (options.direction & DIRECTION_HORIZONTAL) {\n direction = x === 0 ? DIRECTION_NONE : x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;\n hasMoved = x != this.pX;\n distance = Math.abs(input.deltaX);\n } else {\n direction = y === 0 ? DIRECTION_NONE : y < 0 ? DIRECTION_UP : DIRECTION_DOWN;\n hasMoved = y != this.pY;\n distance = Math.abs(input.deltaY);\n }\n }\n input.direction = direction;\n return hasMoved && distance > options.threshold && direction & options.direction;\n },\n attrTest: function(input) {\n return AttrRecognizer.prototype.attrTest.call(this, input) && (this.state & STATE_BEGAN || !(this.state & STATE_BEGAN) && this.directionTest(input));\n },\n emit: function(input) {\n this.pX = input.deltaX;\n this.pY = input.deltaY;\n var direction = directionStr(input.direction);\n if (direction) this.manager.emit(this.options.event + direction, input);\n this._super.emit.call(this, input);\n }\n });\n /**\r\n * Pinch\r\n * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out).\r\n * @constructor\r\n * @extends AttrRecognizer\r\n */ function PinchRecognizer() {\n AttrRecognizer.apply(this, arguments);\n }\n inherit(PinchRecognizer, AttrRecognizer, {\n /**\r\n * @namespace\r\n * @memberof PinchRecognizer\r\n */ defaults: {\n event: \"pinch\",\n threshold: 0,\n pointers: 2\n },\n getTouchAction: function() {\n return [\n TOUCH_ACTION_NONE\n ];\n },\n attrTest: function(input) {\n return this._super.attrTest.call(this, input) && (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN);\n },\n emit: function(input) {\n this._super.emit.call(this, input);\n if (input.scale !== 1) {\n var inOut = input.scale < 1 ? \"in\" : \"out\";\n this.manager.emit(this.options.event + inOut, input);\n }\n }\n });\n /**\r\n * Press\r\n * Recognized when the pointer is down for x ms without any movement.\r\n * @constructor\r\n * @extends Recognizer\r\n */ function PressRecognizer() {\n Recognizer.apply(this, arguments);\n this._timer = null;\n this._input = null;\n }\n inherit(PressRecognizer, Recognizer, {\n /**\r\n * @namespace\r\n * @memberof PressRecognizer\r\n */ defaults: {\n event: \"press\",\n pointers: 1,\n time: 500,\n threshold: 5 // a minimal movement is ok, but keep it low\n },\n getTouchAction: function() {\n return [\n TOUCH_ACTION_AUTO\n ];\n },\n process: function(input) {\n var options = this.options;\n var validPointers = input.pointers.length === options.pointers;\n var validMovement = input.distance < options.threshold;\n var validTime = input.deltaTime > options.time;\n this._input = input;\n // we only allow little movement\n // and we've reached an end event, so a tap is possible\n if (!validMovement || !validPointers || input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime) this.reset();\n else if (input.eventType & INPUT_START) {\n this.reset();\n this._timer = setTimeoutContext(function() {\n this.state = STATE_RECOGNIZED;\n this.tryEmit();\n }, options.time, this);\n } else if (input.eventType & INPUT_END) return STATE_RECOGNIZED;\n return STATE_FAILED;\n },\n reset: function() {\n clearTimeout(this._timer);\n },\n emit: function(input) {\n if (this.state !== STATE_RECOGNIZED) return;\n if (input && input.eventType & INPUT_END) this.manager.emit(this.options.event + \"up\", input);\n else {\n this._input.timeStamp = now();\n this.manager.emit(this.options.event, this._input);\n }\n }\n });\n /**\r\n * Rotate\r\n * Recognized when two or more pointer are moving in a circular motion.\r\n * @constructor\r\n * @extends AttrRecognizer\r\n */ function RotateRecognizer() {\n AttrRecognizer.apply(this, arguments);\n }\n inherit(RotateRecognizer, AttrRecognizer, {\n /**\r\n * @namespace\r\n * @memberof RotateRecognizer\r\n */ defaults: {\n event: \"rotate\",\n threshold: 0,\n pointers: 2\n },\n getTouchAction: function() {\n return [\n TOUCH_ACTION_NONE\n ];\n },\n attrTest: function(input) {\n return this._super.attrTest.call(this, input) && (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN);\n }\n });\n /**\r\n * Swipe\r\n * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction.\r\n * @constructor\r\n * @extends AttrRecognizer\r\n */ function SwipeRecognizer() {\n AttrRecognizer.apply(this, arguments);\n }\n inherit(SwipeRecognizer, AttrRecognizer, {\n /**\r\n * @namespace\r\n * @memberof SwipeRecognizer\r\n */ defaults: {\n event: \"swipe\",\n threshold: 10,\n velocity: 0.65,\n direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL,\n pointers: 1\n },\n getTouchAction: function() {\n return PanRecognizer.prototype.getTouchAction.call(this);\n },\n attrTest: function(input) {\n var direction = this.options.direction;\n var velocity;\n if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) velocity = input.velocity;\n else if (direction & DIRECTION_HORIZONTAL) velocity = input.velocityX;\n else if (direction & DIRECTION_VERTICAL) velocity = input.velocityY;\n return this._super.attrTest.call(this, input) && direction & input.direction && input.distance > this.options.threshold && abs(velocity) > this.options.velocity && input.eventType & INPUT_END;\n },\n emit: function(input) {\n var direction = directionStr(input.direction);\n if (direction) this.manager.emit(this.options.event + direction, input);\n this.manager.emit(this.options.event, input);\n }\n });\n /**\r\n * A tap is ecognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur\r\n * between the given interval and position. The delay option can be used to recognize multi-taps without firing\r\n * a single tap.\r\n *\r\n * The eventData from the emitted event contains the property `tapCount`, which contains the amount of\r\n * multi-taps being recognized.\r\n * @constructor\r\n * @extends Recognizer\r\n */ function TapRecognizer() {\n Recognizer.apply(this, arguments);\n // previous time and center,\n // used for tap counting\n this.pTime = false;\n this.pCenter = false;\n this._timer = null;\n this._input = null;\n this.count = 0;\n }\n inherit(TapRecognizer, Recognizer, {\n /**\r\n * @namespace\r\n * @memberof PinchRecognizer\r\n */ defaults: {\n event: \"tap\",\n pointers: 1,\n taps: 1,\n interval: 300,\n time: 250,\n threshold: 2,\n posThreshold: 10 // a multi-tap can be a bit off the initial position\n },\n getTouchAction: function() {\n return [\n TOUCH_ACTION_MANIPULATION\n ];\n },\n process: function(input) {\n var options = this.options;\n var validPointers = input.pointers.length === options.pointers;\n var validMovement = input.distance < options.threshold;\n var validTouchTime = input.deltaTime < options.time;\n this.reset();\n if (input.eventType & INPUT_START && this.count === 0) return this.failTimeout();\n // we only allow little movement\n // and we've reached an end event, so a tap is possible\n if (validMovement && validTouchTime && validPointers) {\n if (input.eventType != INPUT_END) return this.failTimeout();\n var validInterval = this.pTime ? input.timeStamp - this.pTime < options.interval : true;\n var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold;\n this.pTime = input.timeStamp;\n this.pCenter = input.center;\n if (!validMultiTap || !validInterval) this.count = 1;\n else this.count += 1;\n this._input = input;\n // if tap count matches we have recognized it,\n // else it has began recognizing...\n var tapCount = this.count % options.taps;\n if (tapCount === 0) {\n // no failing requirements, immediately trigger the tap event\n // or wait as long as the multitap interval to trigger\n if (!this.hasRequireFailures()) return STATE_RECOGNIZED;\n else {\n this._timer = setTimeoutContext(function() {\n this.state = STATE_RECOGNIZED;\n this.tryEmit();\n }, options.interval, this);\n return STATE_BEGAN;\n }\n }\n }\n return STATE_FAILED;\n },\n failTimeout: function() {\n this._timer = setTimeoutContext(function() {\n this.state = STATE_FAILED;\n }, this.options.interval, this);\n return STATE_FAILED;\n },\n reset: function() {\n clearTimeout(this._timer);\n },\n emit: function() {\n if (this.state == STATE_RECOGNIZED) {\n this._input.tapCount = this.count;\n this.manager.emit(this.options.event, this._input);\n }\n }\n });\n /**\r\n * Simple way to create an manager with a default set of recognizers.\r\n * @param {HTMLElement} element\r\n * @param {Object} [options]\r\n * @constructor\r\n */ function Hammer(element, options) {\n options = options || {};\n options.recognizers = ifUndefined(options.recognizers, Hammer.defaults.preset);\n return new Manager(element, options);\n }\n /**\r\n * @const {string}\r\n */ Hammer.VERSION = \"2.0.4\";\n /**\r\n * default settings\r\n * @namespace\r\n */ Hammer.defaults = {\n /**\r\n * set if DOM events are being triggered.\r\n * But this is slower and unused by simple implementations, so disabled by default.\r\n * @type {Boolean}\r\n * @default false\r\n */ domEvents: false,\n /**\r\n * The value for the touchAction property/fallback.\r\n * When set to `compute` it will magically set the correct value based on the added recognizers.\r\n * @type {String}\r\n * @default compute\r\n */ touchAction: TOUCH_ACTION_COMPUTE,\n /**\r\n * @type {Boolean}\r\n * @default true\r\n */ enable: true,\n /**\r\n * EXPERIMENTAL FEATURE -- can be removed/changed\r\n * Change the parent input target element.\r\n * If Null, then it is being set the to main element.\r\n * @type {Null|EventTarget}\r\n * @default null\r\n */ inputTarget: null,\n /**\r\n * force an input class\r\n * @type {Null|Function}\r\n * @default null\r\n */ inputClass: null,\n /**\r\n * Default recognizer setup when calling `Hammer()`\r\n * When creating a new Manager these will be skipped.\r\n * @type {Array}\r\n */ preset: [\n // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]\n [\n RotateRecognizer,\n {\n enable: false\n }\n ],\n [\n PinchRecognizer,\n {\n enable: false\n },\n [\n \"rotate\"\n ]\n ],\n [\n SwipeRecognizer,\n {\n direction: DIRECTION_HORIZONTAL\n }\n ],\n [\n PanRecognizer,\n {\n direction: DIRECTION_HORIZONTAL\n },\n [\n \"swipe\"\n ]\n ],\n [\n TapRecognizer\n ],\n [\n TapRecognizer,\n {\n event: \"doubletap\",\n taps: 2\n },\n [\n \"tap\"\n ]\n ],\n [\n PressRecognizer\n ]\n ],\n /**\r\n * Some CSS properties can be used to improve the working of Hammer.\r\n * Add them to this method and they will be set when creating a new Manager.\r\n * @namespace\r\n */ cssProps: {\n /**\r\n * Disables text selection to improve the dragging gesture. Mainly for desktop browsers.\r\n * @type {String}\r\n * @default 'none'\r\n */ userSelect: \"none\",\n /**\r\n * Disable the Windows Phone grippers when pressing an element.\r\n * @type {String}\r\n * @default 'none'\r\n */ touchSelect: \"none\",\n /**\r\n * Disables the default callout shown when you touch and hold a touch target.\r\n * On iOS, when you touch and hold a touch target such as a link, Safari displays\r\n * a callout containing information about the link. This property allows you to disable that callout.\r\n * @type {String}\r\n * @default 'none'\r\n */ touchCallout: \"none\",\n /**\r\n * Specifies whether zooming is enabled. Used by IE10>\r\n * @type {String}\r\n * @default 'none'\r\n */ contentZooming: \"none\",\n /**\r\n * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers.\r\n * @type {String}\r\n * @default 'none'\r\n */ userDrag: \"none\",\n /**\r\n * Overrides the highlight color shown when the user taps a link or a JavaScript\r\n * clickable element in iOS. This property obeys the alpha value, if specified.\r\n * @type {String}\r\n * @default 'rgba(0,0,0,0)'\r\n */ tapHighlightColor: \"rgba(0,0,0,0)\"\n }\n };\n var STOP = 1;\n var FORCED_STOP = 2;\n /**\r\n * Manager\r\n * @param {HTMLElement} element\r\n * @param {Object} [options]\r\n * @constructor\r\n */ function Manager(element, options) {\n options = options || {};\n this.options = merge(options, Hammer.defaults);\n this.options.inputTarget = this.options.inputTarget || element;\n this.handlers = {};\n this.session = {};\n this.recognizers = [];\n this.element = element;\n this.input = createInputInstance(this);\n this.touchAction = new TouchAction(this, this.options.touchAction);\n toggleCssProps(this, true);\n each(options.recognizers, function(item) {\n var recognizer = this.add(new item[0](item[1]));\n item[2] && recognizer.recognizeWith(item[2]);\n item[3] && recognizer.requireFailure(item[3]);\n }, this);\n }\n Manager.prototype = {\n /**\r\n * set options\r\n * @param {Object} options\r\n * @returns {Manager}\r\n */ set: function(options) {\n extend(this.options, options);\n // Options that need a little more setup\n if (options.touchAction) this.touchAction.update();\n if (options.inputTarget) {\n // Clean up existing event listeners and reinitialize\n this.input.destroy();\n this.input.target = options.inputTarget;\n this.input.init();\n }\n return this;\n },\n /**\r\n * stop recognizing for this session.\r\n * This session will be discarded, when a new [input]start event is fired.\r\n * When forced, the recognizer cycle is stopped immediately.\r\n * @param {Boolean} [force]\r\n */ stop: function(force) {\n this.session.stopped = force ? FORCED_STOP : STOP;\n },\n /**\r\n * run the recognizers!\r\n * called by the inputHandler function on every movement of the pointers (touches)\r\n * it walks through all the recognizers and tries to detect the gesture that is being made\r\n * @param {Object} inputData\r\n */ recognize: function(inputData) {\n var session = this.session;\n if (session.stopped) return;\n // run the touch-action polyfill\n this.touchAction.preventDefaults(inputData);\n var recognizer;\n var recognizers = this.recognizers;\n // this holds the recognizer that is being recognized.\n // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED\n // if no recognizer is detecting a thing, it is set to `null`\n var curRecognizer = session.curRecognizer;\n // reset when the last recognizer is recognized\n // or when we're in a new session\n if (!curRecognizer || curRecognizer && curRecognizer.state & STATE_RECOGNIZED) curRecognizer = session.curRecognizer = null;\n var i = 0;\n while(i < recognizers.length){\n recognizer = recognizers[i];\n // find out if we are allowed try to recognize the input for this one.\n // 1. allow if the session is NOT forced stopped (see the .stop() method)\n // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one\n // that is being recognized.\n // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer.\n // this can be setup with the `recognizeWith()` method on the recognizer.\n if (session.stopped !== FORCED_STOP && (!curRecognizer || recognizer == curRecognizer || // 2\n recognizer.canRecognizeWith(curRecognizer))) recognizer.recognize(inputData);\n else recognizer.reset();\n // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the\n // current active recognizer. but only if we don't already have an active recognizer\n if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) curRecognizer = session.curRecognizer = recognizer;\n i++;\n }\n },\n /**\r\n * get a recognizer by its event name.\r\n * @param {Recognizer|String} recognizer\r\n * @returns {Recognizer|Null}\r\n */ get: function(recognizer) {\n if (recognizer instanceof Recognizer) return recognizer;\n var recognizers = this.recognizers;\n for(var i = 0; i < recognizers.length; i++){\n if (recognizers[i].options.event == recognizer) return recognizers[i];\n }\n return null;\n },\n /**\r\n * add a recognizer to the manager\r\n * existing recognizers with the same event name will be removed\r\n * @param {Recognizer} recognizer\r\n * @returns {Recognizer|Manager}\r\n */ add: function(recognizer) {\n if (invokeArrayArg(recognizer, \"add\", this)) return this;\n // remove existing\n var existing = this.get(recognizer.options.event);\n if (existing) this.remove(existing);\n this.recognizers.push(recognizer);\n recognizer.manager = this;\n this.touchAction.update();\n return recognizer;\n },\n /**\r\n * remove a recognizer by name or instance\r\n * @param {Recognizer|String} recognizer\r\n * @returns {Manager}\r\n */ remove: function(recognizer) {\n if (invokeArrayArg(recognizer, \"remove\", this)) return this;\n var recognizers = this.recognizers;\n recognizer = this.get(recognizer);\n recognizers.splice(inArray(recognizers, recognizer), 1);\n this.touchAction.update();\n return this;\n },\n /**\r\n * bind event\r\n * @param {String} events\r\n * @param {Function} handler\r\n * @returns {EventEmitter} this\r\n */ on: function(events, handler) {\n var handlers = this.handlers;\n each(splitStr(events), function(event) {\n handlers[event] = handlers[event] || [];\n handlers[event].push(handler);\n });\n return this;\n },\n /**\r\n * unbind event, leave emit blank to remove all handlers\r\n * @param {String} events\r\n * @param {Function} [handler]\r\n * @returns {EventEmitter} this\r\n */ off: function(events, handler) {\n var handlers = this.handlers;\n each(splitStr(events), function(event) {\n if (!handler) delete handlers[event];\n else handlers[event].splice(inArray(handlers[event], handler), 1);\n });\n return this;\n },\n /**\r\n * emit event to the listeners\r\n * @param {String} event\r\n * @param {Object} data\r\n */ emit: function(event, data) {\n // we also want to trigger dom events\n if (this.options.domEvents) triggerDomEvent(event, data);\n // no handlers, so skip it all\n var handlers = this.handlers[event] && this.handlers[event].slice();\n if (!handlers || !handlers.length) return;\n data.type = event;\n data.preventDefault = function() {\n data.srcEvent.preventDefault();\n };\n var i = 0;\n while(i < handlers.length){\n handlers[i](data);\n i++;\n }\n },\n /**\r\n * destroy the manager and unbinds all events\r\n * it doesn't unbind dom events, that is the user own responsibility\r\n */ destroy: function() {\n this.element && toggleCssProps(this, false);\n this.handlers = {};\n this.session = {};\n this.input.destroy();\n this.element = null;\n }\n };\n /**\r\n * add/remove the css properties as defined in manager.options.cssProps\r\n * @param {Manager} manager\r\n * @param {Boolean} add\r\n */ function toggleCssProps(manager, add) {\n var element = manager.element;\n each(manager.options.cssProps, function(value, name) {\n element.style[prefixed(element.style, name)] = add ? value : \"\";\n });\n }\n /**\r\n * trigger dom event\r\n * @param {String} event\r\n * @param {Object} data\r\n */ function triggerDomEvent(event, data) {\n var gestureEvent = document1.createEvent(\"Event\");\n gestureEvent.initEvent(event, true, true);\n gestureEvent.gesture = data;\n data.target.dispatchEvent(gestureEvent);\n }\n extend(Hammer, {\n INPUT_START: INPUT_START,\n INPUT_MOVE: INPUT_MOVE,\n INPUT_END: INPUT_END,\n INPUT_CANCEL: INPUT_CANCEL,\n STATE_POSSIBLE: STATE_POSSIBLE,\n STATE_BEGAN: STATE_BEGAN,\n STATE_CHANGED: STATE_CHANGED,\n STATE_ENDED: STATE_ENDED,\n STATE_RECOGNIZED: STATE_RECOGNIZED,\n STATE_CANCELLED: STATE_CANCELLED,\n STATE_FAILED: STATE_FAILED,\n DIRECTION_NONE: DIRECTION_NONE,\n DIRECTION_LEFT: DIRECTION_LEFT,\n DIRECTION_RIGHT: DIRECTION_RIGHT,\n DIRECTION_UP: DIRECTION_UP,\n DIRECTION_DOWN: DIRECTION_DOWN,\n DIRECTION_HORIZONTAL: DIRECTION_HORIZONTAL,\n DIRECTION_VERTICAL: DIRECTION_VERTICAL,\n DIRECTION_ALL: DIRECTION_ALL,\n Manager: Manager,\n Input: Input,\n TouchAction: TouchAction,\n TouchInput: TouchInput,\n MouseInput: MouseInput,\n PointerEventInput: PointerEventInput,\n TouchMouseInput: TouchMouseInput,\n SingleTouchInput: SingleTouchInput,\n Recognizer: Recognizer,\n AttrRecognizer: AttrRecognizer,\n Tap: TapRecognizer,\n Pan: PanRecognizer,\n Swipe: SwipeRecognizer,\n Pinch: PinchRecognizer,\n Rotate: RotateRecognizer,\n Press: PressRecognizer,\n on: addEventListeners,\n off: removeEventListeners,\n each: each,\n merge: merge,\n extend: extend,\n inherit: inherit,\n bindFn: bindFn,\n prefixed: prefixed\n });\n if (typeof define == TYPE_FUNCTION && define.amd) define(function() {\n return Hammer;\n });\n else if (0, module.exports) module.exports = Hammer;\n else window1[exportName] = Hammer;\n})(window, document, \"Hammer\");\n\n});\n\n\nparcelRegister(\"nc4qC\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\nfunction $045b83082a3bcfd4$var$maxFriction(friction, velocityX, velocityY, maxFrictionTime, result) {\n var velocity = Math.sqrt(Math.pow(velocityX, 2) + Math.pow(velocityY, 2));\n friction = Math.max(friction, velocity / maxFrictionTime);\n $045b83082a3bcfd4$var$changeVectorNorm(velocityX, velocityY, friction, result);\n result[0] = Math.abs(result[0]);\n result[1] = Math.abs(result[1]);\n}\nfunction $045b83082a3bcfd4$var$changeVectorNorm(x, y, n, result) {\n var theta = Math.atan(y / x);\n result[0] = n * Math.cos(theta);\n result[1] = n * Math.sin(theta);\n}\nmodule.exports = {\n maxFriction: $045b83082a3bcfd4$var$maxFriction,\n changeVectorNorm: $045b83082a3bcfd4$var$changeVectorNorm\n};\n\n});\n\n\nparcelRegister(\"kjQCu\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $6mia6 = parcelRequire(\"6mia6\");\n\nvar $bqWZD = parcelRequire(\"bqWZD\");\n\nvar $8BNHT = parcelRequire(\"8BNHT\");\n\nvar $9eJDl = parcelRequire(\"9eJDl\");\n\nvar $nc4qC = parcelRequire(\"nc4qC\");\nvar $ecae663044f8fa73$require$maxFriction = $nc4qC.maxFriction;\n\nvar $2Xxut = parcelRequire(\"2Xxut\");\nvar $ecae663044f8fa73$var$defaultOptions = {\n speed: 8,\n friction: 6,\n maxFrictionTime: 0.3\n};\n/**\n * @class QtvrControlMethod\n * @implements ControlMethod\n * @classdesc\n *\n * Controls the view by holding the mouse button down and moving it.\n * Also known as \"QTVR\" control mode.\n *\n * @param {Element} element Element to listen for events.\n * @param {string} pointerType Which Hammer.js pointer type to use (e.g.\n * `mouse` or `touch`).\n * @param {Object} opts\n * @param {number} opts.speed\n * @param {number} opts.friction\n * @param {number} opts.maxFrictionTime\n */ // TODO: allow speed not change linearly with distance to click spot.\n// Quadratic or other would allow a larger speed range.\nfunction $ecae663044f8fa73$var$QtvrControlMethod(element, pointerType, opts) {\n this._element = element;\n this._opts = $9eJDl(opts || {}, $ecae663044f8fa73$var$defaultOptions);\n this._active = false;\n this._hammer = $8BNHT.get(element, pointerType);\n this._dynamics = {\n x: new $bqWZD(),\n y: new $bqWZD()\n };\n this._hammer.on(\"panstart\", this._handleStart.bind(this));\n this._hammer.on(\"panmove\", this._handleMove.bind(this));\n this._hammer.on(\"panend\", this._handleRelease.bind(this));\n this._hammer.on(\"pancancel\", this._handleRelease.bind(this));\n}\n$6mia6($ecae663044f8fa73$var$QtvrControlMethod);\n/**\n * Destructor.\n */ $ecae663044f8fa73$var$QtvrControlMethod.prototype.destroy = function() {\n this._hammer.release();\n $2Xxut(this);\n};\n$ecae663044f8fa73$var$QtvrControlMethod.prototype._handleStart = function(e) {\n // Prevent event dragging other DOM elements and causing strange behavior on Chrome\n e.preventDefault();\n if (!this._active) {\n this._active = true;\n this.emit(\"active\");\n }\n};\n$ecae663044f8fa73$var$QtvrControlMethod.prototype._handleMove = function(e) {\n // Prevent event dragging other DOM elements and causing strange behavior on Chrome\n e.preventDefault();\n this._updateDynamics(e, false);\n};\n$ecae663044f8fa73$var$QtvrControlMethod.prototype._handleRelease = function(e) {\n // Prevent event dragging other DOM elements and causing strange behavior on Chrome\n e.preventDefault();\n this._updateDynamics(e, true);\n if (this._active) {\n this._active = false;\n this.emit(\"inactive\");\n }\n};\nvar $ecae663044f8fa73$var$tmpReleaseFriction = [\n null,\n null\n];\n$ecae663044f8fa73$var$QtvrControlMethod.prototype._updateDynamics = function(e, release) {\n var elementRect = this._element.getBoundingClientRect();\n var width = elementRect.right - elementRect.left;\n var height = elementRect.bottom - elementRect.top;\n var maxDim = Math.max(width, height);\n var x = e.deltaX / maxDim * this._opts.speed;\n var y = e.deltaY / maxDim * this._opts.speed;\n this._dynamics.x.reset();\n this._dynamics.y.reset();\n this._dynamics.x.velocity = x;\n this._dynamics.y.velocity = y;\n if (release) {\n $ecae663044f8fa73$require$maxFriction(this._opts.friction, this._dynamics.x.velocity, this._dynamics.y.velocity, this._opts.maxFrictionTime, $ecae663044f8fa73$var$tmpReleaseFriction);\n this._dynamics.x.friction = $ecae663044f8fa73$var$tmpReleaseFriction[0];\n this._dynamics.y.friction = $ecae663044f8fa73$var$tmpReleaseFriction[1];\n }\n this.emit(\"parameterDynamics\", \"x\", this._dynamics.x);\n this.emit(\"parameterDynamics\", \"y\", this._dynamics.y);\n};\nmodule.exports = $ecae663044f8fa73$var$QtvrControlMethod;\n\n});\n\nparcelRegister(\"fCy8Y\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $6mia6 = parcelRequire(\"6mia6\");\n\nvar $bqWZD = parcelRequire(\"bqWZD\");\n\nvar $7ATuC = parcelRequire(\"7ATuC\");\n\nvar $9eJDl = parcelRequire(\"9eJDl\");\n\nvar $2Xxut = parcelRequire(\"2Xxut\");\nvar $b5f4e3da61565ba3$var$defaultOptions = {\n frictionTime: 0.2,\n zoomDelta: 0.001\n};\n/**\n * @class ScrollZoomControlMethod\n * @implements ControlMethod\n * @classdesc\n *\n * Controls the fov/zoom through the mouse wheel.\n *\n * @param {Element} element Element to listen for events.\n * @param {Object} opts\n * @param {number} [opts.frictionTime=0.2]\n * @param {number} [opts.zoomDelta=0.001]\n */ function $b5f4e3da61565ba3$var$ScrollZoomControlMethod(element, opts) {\n this._opts = $9eJDl(opts || {}, $b5f4e3da61565ba3$var$defaultOptions);\n this._dynamics = new $bqWZD();\n this._eventList = [];\n var fn = this._opts.frictionTime ? this.withSmoothing : this.withoutSmoothing;\n this._wheelListener = new $7ATuC(element, fn.bind(this));\n}\n$6mia6($b5f4e3da61565ba3$var$ScrollZoomControlMethod);\n/**\n * Destructor.\n */ $b5f4e3da61565ba3$var$ScrollZoomControlMethod.prototype.destroy = function() {\n this._wheelListener.destroy();\n $2Xxut(this);\n};\n$b5f4e3da61565ba3$var$ScrollZoomControlMethod.prototype.withoutSmoothing = function(e) {\n this._dynamics.offset = $b5f4e3da61565ba3$var$wheelEventDelta(e) * this._opts.zoomDelta;\n this.emit(\"parameterDynamics\", \"zoom\", this._dynamics);\n e.preventDefault();\n this.emit(\"active\");\n this.emit(\"inactive\");\n};\n$b5f4e3da61565ba3$var$ScrollZoomControlMethod.prototype.withSmoothing = function(e) {\n var currentTime = e.timeStamp;\n // Record event.\n this._eventList.push(e);\n // Remove events whose smoothing has already expired.\n while(this._eventList[0].timeStamp < currentTime - this._opts.frictionTime * 1000)this._eventList.shift(0);\n // Get the current velocity from the recorded events.\n // Each wheel movement causes a velocity of change/frictionTime during frictionTime.\n var velocity = 0;\n for(var i = 0; i < this._eventList.length; i++){\n var zoomChangeFromEvent = $b5f4e3da61565ba3$var$wheelEventDelta(this._eventList[i]) * this._opts.zoomDelta;\n velocity += zoomChangeFromEvent / this._opts.frictionTime;\n }\n this._dynamics.velocity = velocity;\n this._dynamics.friction = Math.abs(velocity) / this._opts.frictionTime;\n this.emit(\"parameterDynamics\", \"zoom\", this._dynamics);\n e.preventDefault();\n this.emit(\"active\");\n this.emit(\"inactive\");\n};\nfunction $b5f4e3da61565ba3$var$wheelEventDelta(e) {\n var multiplier = e.deltaMode == 1 ? 20 : 1;\n return e.deltaY * multiplier;\n}\nmodule.exports = $b5f4e3da61565ba3$var$ScrollZoomControlMethod;\n\n});\nparcelRegister(\"7ATuC\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $2Xxut = parcelRequire(\"2Xxut\");\n// Cross-browser mouse wheel event listener.\n// Adapted from: https://developer.mozilla.org/en-US/docs/Web/Events/wheel\n// This version requires eventShim.\nfunction $5876f0ebe6370ef5$var$WheelListener(elem, callback, useCapture) {\n var eventName = $5876f0ebe6370ef5$var$getEventName();\n if (eventName === \"wheel\") {\n this._fun = callback;\n this._elem = elem;\n this._elem.addEventListener(\"wheel\", this._fun, useCapture);\n } else if (eventName === \"mousewheel\") {\n this._fun = $5876f0ebe6370ef5$var$fallbackHandler(callback);\n this._elem = elem;\n this._elem.addEventListener(\"mousewheel\", this._fun, useCapture);\n } else throw new Error(\"Browser does not support mouse wheel events\");\n}\n/**\n * Destructor.\n */ $5876f0ebe6370ef5$var$WheelListener.prototype.destroy = function() {\n this._elem.removeEventListener($5876f0ebe6370ef5$var$getEventName(), this._fun);\n $2Xxut(this);\n};\nfunction $5876f0ebe6370ef5$var$fallbackHandler(callback) {\n return function handleWheelEvent(originalEvent) {\n if (!originalEvent) originalEvent = window.event;\n // Create a normalized event object.\n var event = {\n originalEvent: originalEvent,\n target: originalEvent.target || originalEvent.srcElement,\n type: \"wheel\",\n deltaMode: 1,\n deltaX: 0,\n deltaZ: 0,\n timeStamp: originalEvent.timeStamp || Date.now(),\n preventDefault: originalEvent.preventDefault.bind(originalEvent)\n };\n // Calculate deltaY.\n event.deltaY = -0.025 * originalEvent.wheelDelta;\n if (originalEvent.wheelDeltaX) // Calculate deltaX.\n event.deltaX = -0.025 * originalEvent.wheelDeltaX;\n // Fire the callback.\n return callback(event);\n };\n}\n// Detect the supported wheel event name and cache the result.\nvar $5876f0ebe6370ef5$var$eventName;\nfunction $5876f0ebe6370ef5$var$getEventName() {\n if ($5876f0ebe6370ef5$var$eventName !== undefined) return $5876f0ebe6370ef5$var$eventName;\n if (\"onwheel\" in document.createElement(\"div\")) // Modern browsers support 'wheel'.\n return $5876f0ebe6370ef5$var$eventName = \"wheel\";\n else if (document.onmousewheel !== undefined) // Webkit and IE support at least 'mousewheel'.\n return $5876f0ebe6370ef5$var$eventName = \"mousewheel\";\n else return $5876f0ebe6370ef5$var$eventName = null;\n}\nmodule.exports = $5876f0ebe6370ef5$var$WheelListener;\n\n});\n\n\nparcelRegister(\"2cyzb\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $6mia6 = parcelRequire(\"6mia6\");\n\nvar $bqWZD = parcelRequire(\"bqWZD\");\n\nvar $8BNHT = parcelRequire(\"8BNHT\");\n\nvar $2Xxut = parcelRequire(\"2Xxut\");\n/**\n * @class PinchZoomControlMethod\n * @implements ControlMethod\n * @classdesc\n *\n * Control the view fov/zoom by pinching with two fingers.\n *\n * @param {Element} element Element to listen for events.\n * @param {string} pointerType Which Hammer.js pointer type to use\n * @param {Object} opts\n */ function $19a783f2820e6203$var$PinchZoomControlMethod(element, pointerType, opts) {\n this._hammer = $8BNHT.get(element, pointerType);\n this._lastEvent = null;\n this._active = false;\n this._dynamics = new $bqWZD();\n this._hammer.on(\"pinchstart\", this._handleStart.bind(this));\n this._hammer.on(\"pinch\", this._handleEvent.bind(this));\n this._hammer.on(\"pinchend\", this._handleEnd.bind(this));\n this._hammer.on(\"pinchcancel\", this._handleEnd.bind(this));\n}\n$6mia6($19a783f2820e6203$var$PinchZoomControlMethod);\n/**\n * Destructor.\n */ $19a783f2820e6203$var$PinchZoomControlMethod.prototype.destroy = function() {\n this._hammer.release();\n $2Xxut(this);\n};\n$19a783f2820e6203$var$PinchZoomControlMethod.prototype._handleStart = function() {\n if (!this._active) {\n this._active = true;\n this.emit(\"active\");\n }\n};\n$19a783f2820e6203$var$PinchZoomControlMethod.prototype._handleEnd = function() {\n this._lastEvent = null;\n if (this._active) {\n this._active = false;\n this.emit(\"inactive\");\n }\n};\n$19a783f2820e6203$var$PinchZoomControlMethod.prototype._handleEvent = function(e) {\n var scale = e.scale;\n if (this._lastEvent) scale /= this._lastEvent.scale;\n this._dynamics.offset = (scale - 1) * -1;\n this.emit(\"parameterDynamics\", \"zoom\", this._dynamics);\n this._lastEvent = e;\n};\nmodule.exports = $19a783f2820e6203$var$PinchZoomControlMethod;\n\n});\n\nparcelRegister(\"joYne\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $6mia6 = parcelRequire(\"6mia6\");\n\nvar $bqWZD = parcelRequire(\"bqWZD\");\n\nvar $2Xxut = parcelRequire(\"2Xxut\");\n/**\n * @class VelocityControlMethod\n * @implements ControlMethod\n * @classdesc\n *\n * Sets the velocity and friction of a single parameter.\n *\n * The user should emit 'active' and 'inactive' events if required.\n *\n * @param {String} parameter The parameter to be controlled (e.g. `x`, `y` or `zoom`)\n*/ function $e1ff1729d3bd9a06$var$VelocityControlMethod(parameter) {\n if (!parameter) throw new Error(\"VelocityControlMethod: parameter must be defined\");\n this._parameter = parameter;\n this._dynamics = new $bqWZD();\n}\n$6mia6($e1ff1729d3bd9a06$var$VelocityControlMethod);\n/**\n * Destructor.\n */ $e1ff1729d3bd9a06$var$VelocityControlMethod.prototype.destroy = function() {\n $2Xxut(this);\n};\n/**\n * Set the parameter's velocity.\n * @param {Number} velocity\n */ $e1ff1729d3bd9a06$var$VelocityControlMethod.prototype.setVelocity = function(velocity) {\n this._dynamics.velocity = velocity;\n this.emit(\"parameterDynamics\", this._parameter, this._dynamics);\n};\n/**\n * Set the parameter's friction.\n * @param {Number} friction\n */ $e1ff1729d3bd9a06$var$VelocityControlMethod.prototype.setFriction = function(friction) {\n this._dynamics.friction = friction;\n this.emit(\"parameterDynamics\", this._parameter, this._dynamics);\n};\nmodule.exports = $e1ff1729d3bd9a06$var$VelocityControlMethod;\n\n});\n\nparcelRegister(\"b7OCs\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $6mia6 = parcelRequire(\"6mia6\");\n\nvar $bqWZD = parcelRequire(\"bqWZD\");\n\nvar $2Xxut = parcelRequire(\"2Xxut\");\n/**\n * @class ElementPressControlMethod\n * @implements ControlMethod\n * @classdesc\n *\n * Sets the velocity and friction of a single parameter by pressing and\n * unpressing a DOM element.\n *\n * @param {Element} element Element which activates the method when pressed\n * @param {string} parameter The parameter to be controlled (e.g. `x`, `y` or `zoom`)\n * @param {number} velocity Velocity at which the parameter changes. Use a\n * negative number for opposite direction\n * @param {number} friction Friction at which the parameter stops\n*/ function $81979d1588a0081d$var$ElementPressControlMethod(element, parameter, velocity, friction) {\n if (!element) throw new Error(\"ElementPressControlMethod: element must be defined\");\n if (!parameter) throw new Error(\"ElementPressControlMethod: parameter must be defined\");\n if (!velocity) throw new Error(\"ElementPressControlMethod: velocity must be defined\");\n if (!friction) throw new Error(\"ElementPressControlMethod: friction must be defined\");\n this._element = element;\n this._pressHandler = this._handlePress.bind(this);\n this._releaseHandler = this._handleRelease.bind(this);\n element.addEventListener(\"mousedown\", this._pressHandler);\n element.addEventListener(\"mouseup\", this._releaseHandler);\n element.addEventListener(\"mouseleave\", this._releaseHandler);\n element.addEventListener(\"touchstart\", this._pressHandler);\n element.addEventListener(\"touchmove\", this._releaseHandler);\n element.addEventListener(\"touchend\", this._releaseHandler);\n this._parameter = parameter;\n this._velocity = velocity;\n this._friction = friction;\n this._dynamics = new $bqWZD();\n this._pressing = false;\n}\n$6mia6($81979d1588a0081d$var$ElementPressControlMethod);\n/**\n * Destructor.\n */ $81979d1588a0081d$var$ElementPressControlMethod.prototype.destroy = function() {\n this._element.removeEventListener(\"mousedown\", this._pressHandler);\n this._element.removeEventListener(\"mouseup\", this._releaseHandler);\n this._element.removeEventListener(\"mouseleave\", this._releaseHandler);\n this._element.removeEventListener(\"touchstart\", this._pressHandler);\n this._element.removeEventListener(\"touchmove\", this._releaseHandler);\n this._element.removeEventListener(\"touchend\", this._releaseHandler);\n $2Xxut(this);\n};\n$81979d1588a0081d$var$ElementPressControlMethod.prototype._handlePress = function() {\n this._pressing = true;\n this._dynamics.velocity = this._velocity;\n this._dynamics.friction = 0;\n this.emit(\"parameterDynamics\", this._parameter, this._dynamics);\n this.emit(\"active\");\n};\n$81979d1588a0081d$var$ElementPressControlMethod.prototype._handleRelease = function() {\n if (this._pressing) {\n this._dynamics.friction = this._friction;\n this.emit(\"parameterDynamics\", this._parameter, this._dynamics);\n this.emit(\"inactive\");\n }\n this._pressing = false;\n};\nmodule.exports = $81979d1588a0081d$var$ElementPressControlMethod;\n\n});\n\nparcelRegister(\"rtmgR\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $6mia6 = parcelRequire(\"6mia6\");\n\nvar $gSThV = parcelRequire(\"gSThV\");\n\nvar $2Xxut = parcelRequire(\"2Xxut\");\nvar $05294ba8e72eb558$var$debug = typeof MARZIPANODEBUG !== \"undefined\" && MARZIPANODEBUG.controls;\n/**\n * @class Controls\n * @classdesc\n *\n * Set of controls which affect a view (e.g. keyboard, touch)\n *\n * {@link ControlMethod} instances can be registered on this class. The methods\n * are then combined to calculate the final parameters to change the {@link View}.\n *\n * Controls is attached to a {@link RenderLoop}. Currently it affects the\n * {@link view} of all {@link Layer} on the {@link Stage} of the\n * {@link RenderLoop} it is attached to. A more flexible API may be provided\n * in the future.\n *\n * The ControlMethod instances are registered with an id and may be enabled,\n * disabled and unregistered using that id. The whole Control can also be\n * enabled or disabled.\n *\n */ function $05294ba8e72eb558$var$Controls(opts) {\n opts = opts || {};\n this._methods = {};\n this._methodGroups = {};\n this._composer = new $gSThV();\n // Whether the controls are enabled.\n this._enabled = opts && opts.enabled ? !!opts.enabled : true;\n // How many control methods are enabled and in the active state.\n this._activeCount = 0;\n this.updatedViews_ = [];\n this._attachedRenderLoop = null;\n}\n$6mia6($05294ba8e72eb558$var$Controls);\n/**\n * Destructor.\n */ $05294ba8e72eb558$var$Controls.prototype.destroy = function() {\n this.detach();\n this._composer.destroy();\n $2Xxut(this);\n};\n/**\n * @return {ControlMethod[]} List of registered @{link ControlMethod instances}\n */ $05294ba8e72eb558$var$Controls.prototype.methods = function() {\n var obj = {};\n for(var id in this._methods)obj[id] = this._methods[id];\n return obj;\n};\n/**\n * @param {String} id\n * @return {ControlMethod}\n */ $05294ba8e72eb558$var$Controls.prototype.method = function(id) {\n return this._methods[id];\n};\n/**\n * @param {String} id\n * @param {ControlMethod} instance\n * @param {Boolean} [enable=false]\n */ $05294ba8e72eb558$var$Controls.prototype.registerMethod = function(id, instance, enable) {\n if (this._methods[id]) throw new Error(\"Control method already registered with id \" + id);\n this._methods[id] = {\n instance: instance,\n enabled: false,\n active: false,\n activeHandler: this._handleActive.bind(this, id),\n inactiveHandler: this._handleInactive.bind(this, id)\n };\n if (enable) this.enableMethod(id, instance);\n};\n/**\n * @param {String} id\n */ $05294ba8e72eb558$var$Controls.prototype.unregisterMethod = function(id) {\n var method = this._methods[id];\n if (!method) throw new Error(\"No control method registered with id \" + id);\n if (method.enabled) this.disableMethod(id);\n delete this._methods[id];\n};\n/**\n * @param {String} id\n */ $05294ba8e72eb558$var$Controls.prototype.enableMethod = function(id) {\n var method = this._methods[id];\n if (!method) throw new Error(\"No control method registered with id \" + id);\n if (method.enabled) return;\n method.enabled = true;\n if (method.active) this._incrementActiveCount();\n this._listen(id);\n this._updateComposer();\n this.emit(\"methodEnabled\", id);\n};\n/**\n * @param {String} id\n */ $05294ba8e72eb558$var$Controls.prototype.disableMethod = function(id) {\n var method = this._methods[id];\n if (!method) throw new Error(\"No control method registered with id \" + id);\n if (!method.enabled) return;\n method.enabled = false;\n if (method.active) this._decrementActiveCount();\n this._unlisten(id);\n this._updateComposer();\n this.emit(\"methodDisabled\", id);\n};\n/**\n * Create a method group, which can be used to more conveniently enable or\n * disable several control methods at once\n * @param {String} groupId\n * @param {String[]} methodIds\n */ $05294ba8e72eb558$var$Controls.prototype.addMethodGroup = function(groupId, methodIds) {\n this._methodGroups[groupId] = methodIds;\n};\n/**\n * @param {String} groupId\n */ $05294ba8e72eb558$var$Controls.prototype.removeMethodGroup = function(id) {\n delete this._methodGroups[id];\n};\n/**\n * @return {ControlMethodGroup[]} List of control method groups\n */ $05294ba8e72eb558$var$Controls.prototype.methodGroups = function() {\n var obj = {};\n for(var id in this._methodGroups)obj[id] = this._methodGroups[id];\n return obj;\n};\n/**\n * Enables all the control methods in the group\n * @param {String} groupId\n */ $05294ba8e72eb558$var$Controls.prototype.enableMethodGroup = function(id) {\n var self = this;\n self._methodGroups[id].forEach(function(methodId) {\n self.enableMethod(methodId);\n });\n};\n/**\n * Disables all the control methods in the group\n * @param {String} groupId\n */ $05294ba8e72eb558$var$Controls.prototype.disableMethodGroup = function(id) {\n var self = this;\n self._methodGroups[id].forEach(function(methodId) {\n self.disableMethod(methodId);\n });\n};\n/**\n * @returns {Boolean}\n */ $05294ba8e72eb558$var$Controls.prototype.enabled = function() {\n return this._enabled;\n};\n/**\n * Enables the controls\n */ $05294ba8e72eb558$var$Controls.prototype.enable = function() {\n if (this._enabled) return;\n this._enabled = true;\n if (this._activeCount > 0) this.emit(\"active\");\n this.emit(\"enabled\");\n this._updateComposer();\n};\n/**\n * Disables the controls\n */ $05294ba8e72eb558$var$Controls.prototype.disable = function() {\n if (!this._enabled) return;\n this._enabled = false;\n if (this._activeCount > 0) this.emit(\"inactive\");\n this.emit(\"disabled\");\n this._updateComposer();\n};\n/**\n * Attaches the controls to a {@link RenderLoop}. The RenderLoop will be woken\n * up when the controls are activated\n *\n * @param {RenderLoop}\n */ $05294ba8e72eb558$var$Controls.prototype.attach = function(renderLoop) {\n if (this._attachedRenderLoop) this.detach();\n this._attachedRenderLoop = renderLoop;\n this._beforeRenderHandler = this._updateViewsWithControls.bind(this);\n this._changeHandler = renderLoop.renderOnNextFrame.bind(renderLoop);\n this._attachedRenderLoop.addEventListener(\"beforeRender\", this._beforeRenderHandler);\n this._composer.addEventListener(\"change\", this._changeHandler);\n};\n/**\n * Detaches the controls\n */ $05294ba8e72eb558$var$Controls.prototype.detach = function() {\n if (!this._attachedRenderLoop) return;\n this._attachedRenderLoop.removeEventListener(\"beforeRender\", this._beforeRenderHandler);\n this._composer.removeEventListener(\"change\", this._changeHandler);\n this._beforeRenderHandler = null;\n this._changeHandler = null;\n this._attachedRenderLoop = null;\n};\n/**\n * @param {Boolean}\n */ $05294ba8e72eb558$var$Controls.prototype.attached = function() {\n return this._attachedRenderLoop != null;\n};\n$05294ba8e72eb558$var$Controls.prototype._listen = function(id) {\n var method = this._methods[id];\n if (!method) throw new Error(\"Bad method id\");\n method.instance.addEventListener(\"active\", method.activeHandler);\n method.instance.addEventListener(\"inactive\", method.inactiveHandler);\n};\n$05294ba8e72eb558$var$Controls.prototype._unlisten = function(id) {\n var method = this._methods[id];\n if (!method) throw new Error(\"Bad method id\");\n method.instance.removeEventListener(\"active\", method.activeHandler);\n method.instance.removeEventListener(\"inactive\", method.inactiveHandler);\n};\n$05294ba8e72eb558$var$Controls.prototype._handleActive = function(id) {\n var method = this._methods[id];\n if (!method) throw new Error(\"Bad method id\");\n if (!method.enabled) throw new Error(\"Should not receive event from disabled control method\");\n if (!method.active) {\n method.active = true;\n this._incrementActiveCount();\n }\n};\n$05294ba8e72eb558$var$Controls.prototype._handleInactive = function(id) {\n var method = this._methods[id];\n if (!method) throw new Error(\"Bad method id\");\n if (!method.enabled) throw new Error(\"Should not receive event from disabled control method\");\n if (method.active) {\n method.active = false;\n this._decrementActiveCount();\n }\n};\n$05294ba8e72eb558$var$Controls.prototype._incrementActiveCount = function() {\n this._activeCount++;\n if ($05294ba8e72eb558$var$debug) this._checkActiveCount();\n if (this._enabled && this._activeCount === 1) this.emit(\"active\");\n};\n$05294ba8e72eb558$var$Controls.prototype._decrementActiveCount = function() {\n this._activeCount--;\n if ($05294ba8e72eb558$var$debug) this._checkActiveCount();\n if (this._enabled && this._activeCount === 0) this.emit(\"inactive\");\n};\n$05294ba8e72eb558$var$Controls.prototype._checkActiveCount = function() {\n var count = 0;\n for(var id in this._methods){\n var method = this._methods[id];\n if (method.enabled && method.active) count++;\n }\n if (count != this._activeCount) throw new Error(\"Bad control state\");\n};\n$05294ba8e72eb558$var$Controls.prototype._updateComposer = function() {\n var composer = this._composer;\n for(var id in this._methods){\n var method = this._methods[id];\n var enabled = this._enabled && method.enabled;\n if (enabled && !composer.has(method.instance)) composer.add(method.instance);\n if (!enabled && composer.has(method.instance)) composer.remove(method.instance);\n }\n};\n$05294ba8e72eb558$var$Controls.prototype._updateViewsWithControls = function() {\n var controlData = this._composer.offsets();\n if (controlData.changing) this._attachedRenderLoop.renderOnNextFrame();\n // Update each view at most once, even when shared by multiple layers.\n // The number of views is expected to be small, so use an array to keep track.\n this.updatedViews_.length = 0;\n var layers = this._attachedRenderLoop.stage().listLayers();\n for(var i = 0; i < layers.length; i++){\n var view = layers[i].view();\n if (this.updatedViews_.indexOf(view) < 0) {\n layers[i].view().updateWithControlParameters(controlData.offsets);\n this.updatedViews_.push(view);\n }\n }\n};\nmodule.exports = $05294ba8e72eb558$var$Controls;\n\n});\nparcelRegister(\"gSThV\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $6mia6 = parcelRequire(\"6mia6\");\n\nvar $bqWZD = parcelRequire(\"bqWZD\");\n\nvar $azWbw = parcelRequire(\"azWbw\");\n\nvar $2Xxut = parcelRequire(\"2Xxut\");\n/**\n * @class ControlComposer\n * @classdesc\n *\n * Combines changes in parameters triggered by multiple {@link ControlMethod}\n * instances.\n *\n * @listens ControlMethod#parameterDynamics\n */ function $c4ac938ec0efcd4f$var$ControlComposer(opts) {\n opts = opts || {};\n this._methods = [];\n this._parameters = [\n \"x\",\n \"y\",\n \"axisScaledX\",\n \"axisScaledY\",\n \"zoom\",\n \"yaw\",\n \"pitch\",\n \"roll\"\n ];\n this._now = opts.nowForTesting || $azWbw;\n this._composedOffsets = {};\n this._composeReturn = {\n offsets: this._composedOffsets,\n changing: null\n };\n}\n$6mia6($c4ac938ec0efcd4f$var$ControlComposer);\n$c4ac938ec0efcd4f$var$ControlComposer.prototype.add = function(instance) {\n if (this.has(instance)) return;\n var dynamics = {};\n this._parameters.forEach(function(parameter) {\n dynamics[parameter] = {\n dynamics: new $bqWZD(),\n time: null\n };\n });\n var parameterDynamicsHandler = this._updateDynamics.bind(this, dynamics);\n var method = {\n instance: instance,\n dynamics: dynamics,\n parameterDynamicsHandler: parameterDynamicsHandler\n };\n instance.addEventListener(\"parameterDynamics\", parameterDynamicsHandler);\n this._methods.push(method);\n};\n$c4ac938ec0efcd4f$var$ControlComposer.prototype.remove = function(instance) {\n var index = this._indexOfInstance(instance);\n if (index >= 0) {\n var method = this._methods.splice(index, 1)[0];\n method.instance.removeEventListener(\"parameterDynamics\", method.parameterDynamicsHandler);\n }\n};\n$c4ac938ec0efcd4f$var$ControlComposer.prototype.has = function(instance) {\n return this._indexOfInstance(instance) >= 0;\n};\n$c4ac938ec0efcd4f$var$ControlComposer.prototype._indexOfInstance = function(instance) {\n for(var i = 0; i < this._methods.length; i++){\n if (this._methods[i].instance === instance) return i;\n }\n return -1;\n};\n$c4ac938ec0efcd4f$var$ControlComposer.prototype.list = function() {\n var instances = [];\n for(var i = 0; i < this._methods.length; i++)instances.push(this._methods[i].instance);\n return instances;\n};\n$c4ac938ec0efcd4f$var$ControlComposer.prototype._updateDynamics = function(storedDynamics, parameter, dynamics) {\n var parameterDynamics = storedDynamics[parameter];\n if (!parameterDynamics) throw new Error(\"Unknown control parameter \" + parameter);\n var newTime = this._now();\n parameterDynamics.dynamics.update(dynamics, (newTime - parameterDynamics.time) / 1000);\n parameterDynamics.time = newTime;\n this.emit(\"change\");\n};\n$c4ac938ec0efcd4f$var$ControlComposer.prototype._resetComposedOffsets = function() {\n for(var i = 0; i < this._parameters.length; i++)this._composedOffsets[this._parameters[i]] = 0;\n};\n$c4ac938ec0efcd4f$var$ControlComposer.prototype.offsets = function() {\n var parameter;\n var changing = false;\n var currentTime = this._now();\n this._resetComposedOffsets();\n for(var i = 0; i < this._methods.length; i++){\n var methodDynamics = this._methods[i].dynamics;\n for(var p = 0; p < this._parameters.length; p++){\n parameter = this._parameters[p];\n var parameterDynamics = methodDynamics[parameter];\n var dynamics = parameterDynamics.dynamics;\n // Add offset to composed offset\n if (dynamics.offset != null) {\n this._composedOffsets[parameter] += dynamics.offset;\n // Reset offset\n dynamics.offset = null;\n }\n // Calculate offset from velocity and add it\n var elapsed = (currentTime - parameterDynamics.time) / 1000;\n var offsetFromVelocity = dynamics.offsetFromVelocity(elapsed);\n if (offsetFromVelocity) this._composedOffsets[parameter] += offsetFromVelocity;\n // Update velocity on dynamics\n var currentVelocity = dynamics.velocityAfter(elapsed);\n dynamics.velocity = currentVelocity;\n // If there is still a velocity, set changing\n if (currentVelocity) changing = true;\n parameterDynamics.time = currentTime;\n }\n }\n this._composeReturn.changing = changing;\n return this._composeReturn;\n};\n$c4ac938ec0efcd4f$var$ControlComposer.prototype.destroy = function() {\n var instances = this.list();\n for(var i = 0; i < instances.length; i++)this.remove(instances[i]);\n $2Xxut(this);\n};\nmodule.exports = $c4ac938ec0efcd4f$var$ControlComposer;\n\n});\n\n\nparcelRegister(\"kkazn\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $W9Vbx = parcelRequire(\"W9Vbx\");\n\nvar $6mia6 = parcelRequire(\"6mia6\");\n\nvar $h0UOQ = parcelRequire(\"h0UOQ\");\n\nvar $rtmgR = parcelRequire(\"rtmgR\");\n\nvar $9kjMi = parcelRequire(\"9kjMi\");\n\nvar $460G7 = parcelRequire(\"460G7\");\n\nvar $jgcBG = parcelRequire(\"jgcBG\");\n\nvar $kgURn = parcelRequire(\"kgURn\");\n\nvar $lUg8r = parcelRequire(\"lUg8r\");\n\nvar $1dJzJ = parcelRequire(\"1dJzJ\");\n\nvar $8BNHT = parcelRequire(\"8BNHT\");\n\nvar $9aEkC = parcelRequire(\"9aEkC\");\n\nvar $kjZKr = parcelRequire(\"kjZKr\");\n\nvar $dBMHD = parcelRequire(\"dBMHD\");\nvar $ecbddfc8b3d27744$require$setOverflowHidden = $dBMHD.setOverflowHidden;\n\nvar $dBMHD = parcelRequire(\"dBMHD\");\nvar $ecbddfc8b3d27744$require$setAbsolute = $dBMHD.setAbsolute;\n\nvar $dBMHD = parcelRequire(\"dBMHD\");\nvar $ecbddfc8b3d27744$require$setFullSize = $dBMHD.setFullSize;\n\nvar $dBMHD = parcelRequire(\"dBMHD\");\nvar $ecbddfc8b3d27744$require$setBlocking = $dBMHD.setBlocking;\n\nvar $28mhx = parcelRequire(\"28mhx\");\n\nvar $exIfG = parcelRequire(\"exIfG\");\n\nvar $2Xxut = parcelRequire(\"2Xxut\");\nvar $ecbddfc8b3d27744$var$stageMap = {\n webgl: $jgcBG,\n css: $kgURn,\n flash: $lUg8r\n};\nvar $ecbddfc8b3d27744$var$stagePrefList = [\n $jgcBG,\n $kgURn,\n $lUg8r\n];\n/**\n * Signals that the current scene has changed.\n * @event Viewer#sceneChange\n */ /**\n * Signals that the view of the current scene has changed. See\n * {@link View#event:change}.\n * @event Viewer#viewChange\n */ /**\n * @class Viewer\n * @classdesc\n *\n * A Viewer is a container for multiple {@link Scene scenes} to be displayed\n * inside a {@link Stage stage} contained in the DOM.\n *\n * Scenes may be created by calling {@link Viewer#createScene}. Except during a\n * scene switch, a single one of them, called the current scene, is visible.\n * Calling {@link Viewer#switchScene} sets the current scene and switches to it.\n *\n * @param {Element} domElement The DOM element to contain the stage.\n * @param {Object} opts Viewer creation options.\n * @param {(null|'webgl'|'css'|'flash')} [opts.stageType=null] The type of stage\n * to create. The default is to choose the most appropriate type depending\n * on the browser capabilities.\n * @param {Object} opts.controls Options to be passed to\n * {@link registerDefaultControls}.\n * @param {Object} opts.stage Options to be passed to the {@link Stage}\n * constructor.\n * @param {Object} opts.cursors Cursor options.\n * @param {Object} opts.cursors.drag Drag cursor options to be passed to the\n * {@link ControlCursor} constructor.\n */ function $ecbddfc8b3d27744$var$Viewer(domElement, opts) {\n opts = opts || {};\n this._domElement = domElement;\n // Add `overflow: hidden` to the domElement.\n $ecbddfc8b3d27744$require$setOverflowHidden(domElement);\n // Select the stage type to use.\n var Stage;\n if (opts.stageType) {\n // If a specific stage type was specified, use that one.\n Stage = $ecbddfc8b3d27744$var$stageMap[opts.stageType];\n if (!Stage) throw new Error(\"Unknown stage type: \" + opts.stageType);\n } else {\n // Choose the best supported stage according to the default preference\n // order. Note that this may yield an unsupported stage for some\n // geometry/view combinations. Client code is expected to pass in a\n // specific stage type in those cases.\n for(var i = 0; i < $ecbddfc8b3d27744$var$stagePrefList.length; i++)if ($ecbddfc8b3d27744$var$stagePrefList[i].supported()) {\n Stage = $ecbddfc8b3d27744$var$stagePrefList[i];\n break;\n }\n if (!Stage) throw new Error(\"None of the stage types are supported\");\n }\n // Create stage.\n this._stage = new Stage(opts.stage);\n // Register the default renderers for the selected stage.\n $kjZKr(this._stage);\n // Add the stage element into the DOM.\n this._domElement.appendChild(this._stage.domElement());\n // Create control container.\n // Controls cannot be placed directly on the root DOM element because\n // Hammer.js will prevent click events from reaching the elements beneath.\n // The hotspot containers will be added inside the controls container.\n this._controlContainer = document.createElement(\"div\");\n $ecbddfc8b3d27744$require$setAbsolute(this._controlContainer);\n $ecbddfc8b3d27744$require$setFullSize(this._controlContainer);\n // Prevent bounce scroll effect on iOS.\n // Applied only for iOS, as Android's events must have the default action to allow interaction with hotspots.\n if ($W9Vbx.ios) this._controlContainer.addEventListener(\"touchmove\", function(event) {\n event.preventDefault();\n });\n // Old IE does not detect mouse events on elements without background\n // Add a child element to the controls with full width, a background color\n // and opacity 0\n var controlCapture = document.createElement(\"div\");\n $ecbddfc8b3d27744$require$setAbsolute(controlCapture);\n $ecbddfc8b3d27744$require$setFullSize(controlCapture);\n $ecbddfc8b3d27744$require$setBlocking(controlCapture);\n this._controlContainer.appendChild(controlCapture);\n domElement.appendChild(this._controlContainer);\n // Respond to window size changes.\n this._size = {};\n this.updateSize();\n this._updateSizeListener = this.updateSize.bind(this);\n window.addEventListener(\"resize\", this._updateSizeListener);\n // Create render loop.\n this._renderLoop = new $h0UOQ(this._stage);\n // Create the controls and register them with the render loop.\n this._controls = new $rtmgR();\n this._controlMethods = $9aEkC(this._controls, this._controlContainer, opts.controls);\n this._controls.attach(this._renderLoop);\n // Expose HammerJS.\n this._hammerManagerTouch = $8BNHT.get(this._controlContainer, \"touch\");\n this._hammerManagerMouse = $8BNHT.get(this._controlContainer, \"mouse\");\n // Initialize drag cursor.\n this._dragCursor = new $1dJzJ(this._controls, \"mouseViewDrag\", domElement, opts.cursors && opts.cursors.drag || {});\n // Start the render loop.\n this._renderLoop.start();\n // Scene list.\n this._scenes = [];\n // The currently visible scene.\n // During a scene transition, this is the scene being switched to.\n this._currentScene = null;\n // The scene being switched from during a scene transition.\n // This is necessary to update the layers correctly when they are added or\n // removed during a transition.\n this._replacedScene = null;\n // The current transition.\n this._cancelCurrentTween = null;\n // The event listener fired when the current scene layers change.\n // This is attached to the correct scene whenever the current scene changes.\n this._layerChangeHandler = this._updateSceneLayers.bind(this);\n // The event listener fired when the current scene view changes.\n // This is attached to the correct scene whenever the current scene changes.\n this._viewChangeHandler = this.emit.bind(this, \"viewChange\");\n // Setup the idle timer.\n // By default, the timer has an infinite duration so it does nothing.\n this._idleTimer = new $460G7();\n this._idleTimer.start();\n // Reset the timer whenever the view changes.\n this._resetIdleTimerHandler = this._resetIdleTimer.bind(this);\n this.addEventListener(\"viewChange\", this._resetIdleTimerHandler);\n // Start the idle movement when the idle timer fires.\n this._triggerIdleTimerHandler = this._triggerIdleTimer.bind(this);\n this._idleTimer.addEventListener(\"timeout\", this._triggerIdleTimerHandler);\n // Stop an ongoing movement when the controls are activated or when the\n // scene changes.\n this._stopMovementHandler = this.stopMovement.bind(this);\n this._controls.addEventListener(\"active\", this._stopMovementHandler);\n this.addEventListener(\"sceneChange\", this._stopMovementHandler);\n // The currently programmed idle movement.\n this._idleMovement = null;\n}\n$6mia6($ecbddfc8b3d27744$var$Viewer);\n/**\n * Destructor.\n */ $ecbddfc8b3d27744$var$Viewer.prototype.destroy = function() {\n window.removeEventListener(\"resize\", this._updateSizeListener);\n if (this._currentScene) this._removeSceneEventListeners(this._currentScene);\n if (this._replacedScene) this._removeSceneEventListeners(this._replacedScene);\n this._dragCursor.destroy();\n for(var methodName in this._controlMethods)this._controlMethods[methodName].destroy();\n while(this._scenes.length)this.destroyScene(this._scenes[0]);\n // The Flash renderer must be torn down before the element is removed from\n // the DOM, so all scenes must have been destroyed before this point.\n this._domElement.removeChild(this._stage.domElement());\n this._stage.destroy();\n this._renderLoop.destroy();\n this._controls.destroy();\n this._controls = null;\n if (this._cancelCurrentTween) this._cancelCurrentTween();\n $2Xxut(this);\n};\n/**\n * Updates the stage size to fill the containing element.\n *\n * This method is automatically called when the browser window is resized.\n * Most clients won't need to explicitly call it to keep the size up to date.\n */ $ecbddfc8b3d27744$var$Viewer.prototype.updateSize = function() {\n var size = this._size;\n size.width = this._domElement.clientWidth;\n size.height = this._domElement.clientHeight;\n this._stage.setSize(size);\n};\n/**\n * Returns the underlying {@link Stage stage}.\n * @return {Stage}\n */ $ecbddfc8b3d27744$var$Viewer.prototype.stage = function() {\n return this._stage;\n};\n/**\n * Returns the underlying {@link RenderLoop render loop}.\n * @return {RenderLoop}\n */ $ecbddfc8b3d27744$var$Viewer.prototype.renderLoop = function() {\n return this._renderLoop;\n};\n/**\n * Returns the underlying {@link Controls controls}.\n * @return {Controls}\n */ $ecbddfc8b3d27744$var$Viewer.prototype.controls = function() {\n return this._controls;\n};\n/**\n * Returns the underlying DOM element.\n * @return {Element}\n */ $ecbddfc8b3d27744$var$Viewer.prototype.domElement = function() {\n return this._domElement;\n};\n/**\n * Creates a new {@link Scene scene} with a single layer and adds it to the\n * viewer.\n *\n * The current scene does not change. To switch to the scene, call\n * {@link Viewer#switchScene}.\n *\n * @param {Object} opts Scene creation options.\n * @param {View} opts.view The scene's underlying {@link View}.\n * @param {Source} opts.source The layer's underlying {@link Source}.\n * @param {Geometry} opts.geometry The layer's underlying {@link Geometry}.\n * @param {boolean} [opts.pinFirstLevel=false] Whether to pin the first level to\n * provide a fallback of last resort, at the cost of memory consumption.\n * @param {Object} [opts.textureStoreOpts={}] Options to pass to the\n * {@link TextureStore} constructor.\n * @param {Object} [opts.layerOpts={}] Options to pass to the {@link Layer}\n * constructor.\n * @return {Scene}\n */ $ecbddfc8b3d27744$var$Viewer.prototype.createScene = function(opts) {\n opts = opts || {};\n var scene = this.createEmptyScene({\n view: opts.view\n });\n scene.createLayer({\n source: opts.source,\n geometry: opts.geometry,\n pinFirstLevel: opts.pinFirstLevel,\n textureStoreOpts: opts.textureStoreOpts,\n layerOpts: opts.layerOpts\n });\n return scene;\n};\n/**\n * Creates a new {@link Scene scene} with no layers and adds it to the viewer.\n *\n * Layers may be added to the scene by calling {@link Scene#createLayer}.\n * However, if the scene has a single layer, it is simpler to call\n * {@link Viewer#createScene} instead of this method.\n *\n * The current scene does not change. To switch to the scene, call\n * {@link Viewer#switchScene}.\n *\n * @param {Object} opts Scene creation options.\n * @param {View} opts.view The scene's underlying {@link View}.\n * @return {Scene}\n */ $ecbddfc8b3d27744$var$Viewer.prototype.createEmptyScene = function(opts) {\n opts = opts || {};\n var scene = new $9kjMi(this, opts.view);\n this._scenes.push(scene);\n return scene;\n};\n$ecbddfc8b3d27744$var$Viewer.prototype._updateSceneLayers = function() {\n var i;\n var layer;\n var stage = this._stage;\n var currentScene = this._currentScene;\n var replacedScene = this._replacedScene;\n var oldLayers = stage.listLayers();\n // The stage contains layers from at most two scenes: the current one, on top,\n // and the one currently being switched away from, on the bottom.\n var newLayers = [];\n if (replacedScene) newLayers = newLayers.concat(replacedScene.listLayers());\n if (currentScene) newLayers = newLayers.concat(currentScene.listLayers());\n // A single layer can be added or removed from the scene at a time.\n if (Math.abs(oldLayers.length - newLayers.length) !== 1) throw new Error(\"Stage and scene out of sync\");\n if (newLayers.length < oldLayers.length) // A layer was removed.\n for(i = 0; i < oldLayers.length; i++){\n layer = oldLayers[i];\n if (newLayers.indexOf(layer) < 0) {\n this._removeLayerFromStage(layer);\n break;\n }\n }\n if (newLayers.length > oldLayers.length) // A layer was added.\n for(i = 0; i < newLayers.length; i++){\n layer = newLayers[i];\n if (oldLayers.indexOf(layer) < 0) this._addLayerToStage(layer, i);\n }\n// TODO: When in the middle of a scene transition, call the transition update\n// function immediately to prevent an added layer from flashing with the wrong\n// opacity.\n};\n$ecbddfc8b3d27744$var$Viewer.prototype._addLayerToStage = function(layer, i) {\n // Pin the first level to ensure a fallback while the layer is visible.\n // Note that this is distinct from the `pinFirstLevel` option passed to\n // createScene(), which pins the layer even when it's not visible.\n layer.pinFirstLevel();\n this._stage.addLayer(layer, i);\n};\n$ecbddfc8b3d27744$var$Viewer.prototype._removeLayerFromStage = function(layer) {\n this._stage.removeLayer(layer);\n layer.unpinFirstLevel();\n layer.textureStore().clearNotPinned();\n};\n$ecbddfc8b3d27744$var$Viewer.prototype._addSceneEventListeners = function(scene) {\n scene.addEventListener(\"layerChange\", this._layerChangeHandler);\n scene.addEventListener(\"viewChange\", this._viewChangeHandler);\n};\n$ecbddfc8b3d27744$var$Viewer.prototype._removeSceneEventListeners = function(scene) {\n scene.removeEventListener(\"layerChange\", this._layerChangeHandler);\n scene.removeEventListener(\"viewChange\", this._viewChangeHandler);\n};\n/**\n * Destroys a {@link Scene scene} and removes it from the viewer.\n * @param {Scene} scene\n */ $ecbddfc8b3d27744$var$Viewer.prototype.destroyScene = function(scene) {\n var i = this._scenes.indexOf(scene);\n if (i < 0) throw new Error(\"No such scene in viewer\");\n var j;\n var layers;\n if (this._currentScene === scene) {\n // The destroyed scene is the current scene.\n // Remove event listeners, remove layers from stage and cancel transition.\n this._removeSceneEventListeners(scene);\n layers = scene.listLayers();\n for(j = 0; j < layers.length; j++)this._removeLayerFromStage(layers[j]);\n if (this._cancelCurrentTween) {\n this._cancelCurrentTween();\n this._cancelCurrentTween = null;\n }\n this._currentScene = null;\n this.emit(\"sceneChange\");\n }\n if (this._replacedScene === scene) {\n // The destroyed scene is being switched away from.\n // Remove event listeners and remove layers from stage.\n this._removeSceneEventListeners(scene);\n layers = scene.listLayers();\n for(j = 0; j < layers.length; j++)this._removeLayerFromStage(layers[j]);\n this._replacedScene = null;\n }\n this._scenes.splice(i, 1);\n scene.destroy();\n};\n/**\n * Destroys all {@link Scene scenes} and removes them from the viewer.\n */ $ecbddfc8b3d27744$var$Viewer.prototype.destroyAllScenes = function() {\n while(this._scenes.length > 0)this.destroyScene(this._scenes[0]);\n};\n/**\n * Returns whether the viewer contains a {@link Scene scene}.\n * @param {Scene} scene\n * @return {boolean}\n */ $ecbddfc8b3d27744$var$Viewer.prototype.hasScene = function(scene) {\n return this._scenes.indexOf(scene) >= 0;\n};\n/**\n * Returns a list of all {@link Scene scenes}.\n * @return {Scene[]}\n */ $ecbddfc8b3d27744$var$Viewer.prototype.listScenes = function() {\n return [].concat(this._scenes);\n};\n/**\n * Returns the current {@link Scene scene}, or null if there isn't one.\n *\n * To change the current scene, call {@link Viewer#switchScene}.\n *\n * @return {Scene}\n */ $ecbddfc8b3d27744$var$Viewer.prototype.scene = function() {\n return this._currentScene;\n};\n/**\n * Returns the {@link View view} for the current {@link Scene scene}, or null\n * if there isn't one.\n * @return {View}\n */ $ecbddfc8b3d27744$var$Viewer.prototype.view = function() {\n var scene = this._currentScene;\n if (scene) return scene.view();\n return null;\n};\n/**\n * Tweens the {@link View view} for the current {@link Scene scene}.\n *\n * This method is equivalent to calling {@link Scene#lookTo} on the current\n * scene.\n *\n * @param {Object} opts Options to pass into {@link Scene#lookTo}.\n * @param {function} done Function to call when the tween is complete.\n */ $ecbddfc8b3d27744$var$Viewer.prototype.lookTo = function(params, opts, done) {\n // TODO: is it an error to call lookTo when no scene is displayed?\n var scene = this._currentScene;\n if (scene) scene.lookTo(params, opts, done);\n};\n/**\n * Starts a movement, possibly replacing the current movement.\n *\n * This method is equivalent to calling {@link Scene#startMovement} on the\n * current scene. If there is no current scene, this is a no-op.\n *\n * @param {function} fn The movement function.\n * @param {function} done Function to be called when the movement finishes or is\n * interrupted.\n */ $ecbddfc8b3d27744$var$Viewer.prototype.startMovement = function(fn, done) {\n var scene = this._currentScene;\n if (!scene) return;\n scene.startMovement(fn, done);\n};\n/**\n * Stops the current movement.\n *\n * This method is equivalent to calling {@link Scene#stopMovement} on the\n * current scene. If there is no current scene, this is a no-op.\n */ $ecbddfc8b3d27744$var$Viewer.prototype.stopMovement = function() {\n var scene = this._currentScene;\n if (!scene) return;\n scene.stopMovement();\n};\n/**\n * Returns the current movement.\n *\n * This method is equivalent to calling {@link Scene#movement} on the\n * current scene. If there is no current scene, this is a no-op.\n *\n * @return {function}\n */ $ecbddfc8b3d27744$var$Viewer.prototype.movement = function() {\n var scene = this._currentScene;\n if (!scene) return;\n return scene.movement();\n};\n/**\n * Schedules an idle movement to be automatically started when the view remains\n * unchanged for the given timeout period.\n *\n * Changing the view while the idle movement is active stops the movement and\n * schedules it to start again after the same timeout period. To disable it\n * permanently, call with a null movement or an infinite timeout.\n *\n * @param {number} timeout Timeout period in milliseconds.\n * @param {function} movement Automatic movement function, or null to disable.\n */ $ecbddfc8b3d27744$var$Viewer.prototype.setIdleMovement = function(timeout, movement) {\n this._idleTimer.setDuration(timeout);\n this._idleMovement = movement;\n};\n/**\n * Stops the idle movement. It will be started again after the timeout set by\n * {@link Viewer#setIdleMovement}.\n */ $ecbddfc8b3d27744$var$Viewer.prototype.breakIdleMovement = function() {\n this.stopMovement();\n this._resetIdleTimer();\n};\n$ecbddfc8b3d27744$var$Viewer.prototype._resetIdleTimer = function() {\n this._idleTimer.start();\n};\n$ecbddfc8b3d27744$var$Viewer.prototype._triggerIdleTimer = function() {\n var idleMovement = this._idleMovement;\n if (!idleMovement) return;\n this.startMovement(idleMovement);\n};\nvar $ecbddfc8b3d27744$var$defaultSwitchDuration = 1000;\nfunction $ecbddfc8b3d27744$var$defaultTransitionUpdate(val, newScene, oldScene) {\n var layers = newScene.listLayers();\n layers.forEach(function(layer) {\n layer.mergeEffects({\n opacity: val\n });\n });\n newScene._hotspotContainer.domElement().style.opacity = val;\n}\n/**\n * Switches to another {@link Scene scene} with a fade transition. This scene\n * becomes the current one.\n *\n * If a transition is already taking place, it is interrupted before the new one\n * starts.\n *\n * @param {Scene} newScene The scene to switch to.\n * @param {Object} opts Transition options.\n * @param {number} [opts.transitionDuration=1000] Transition duration, in\n * milliseconds.\n * @param {number} [opts.transitionUpdate=defaultTransitionUpdate]\n * Transition update function, with signature `f(t, newScene, oldScene)`.\n * This function is called on each frame with `t` increasing from 0 to 1.\n * An initial call with `t=0` and a final call with `t=1` are guaranteed.\n * The default function sets the opacity of the new scene to `t`.\n * @param {function} done Function to call when the transition finishes or is\n * interrupted. If the new scene is equal to the old one, no transition\n * takes place, but this function is still called.\n */ $ecbddfc8b3d27744$var$Viewer.prototype.switchScene = function(newScene, opts, done) {\n var self = this;\n opts = opts || {};\n done = done || $exIfG;\n var stage = this._stage;\n var oldScene = this._currentScene;\n // Do nothing if the target scene is the current one.\n if (oldScene === newScene) {\n done();\n return;\n }\n if (this._scenes.indexOf(newScene) < 0) throw new Error(\"No such scene in viewer\");\n // Cancel an already ongoing transition. This ensures that the stage contains\n // layers from exactly one scene before the transition begins.\n if (this._cancelCurrentTween) {\n this._cancelCurrentTween();\n this._cancelCurrentTween = null;\n }\n var oldSceneLayers = oldScene ? oldScene.listLayers() : [];\n var newSceneLayers = newScene.listLayers();\n var stageLayers = stage.listLayers();\n // Check that the stage contains exactly as many layers as the current scene,\n // and that the top layer is the right one. If this test fails, either there\n // is a bug or the user tried to modify the stage concurrently.\n if (oldScene && (stageLayers.length !== oldSceneLayers.length || stageLayers.length > 1 && stageLayers[0] != oldSceneLayers[0])) throw new Error(\"Stage not in sync with viewer\");\n // Get the transition parameters.\n var duration = opts.transitionDuration != null ? opts.transitionDuration : $ecbddfc8b3d27744$var$defaultSwitchDuration;\n var update = opts.transitionUpdate != null ? opts.transitionUpdate : $ecbddfc8b3d27744$var$defaultTransitionUpdate;\n // Add new scene layers into the stage before starting the transition.\n for(var i = 0; i < newSceneLayers.length; i++)this._addLayerToStage(newSceneLayers[i]);\n // Update function to be called on every frame.\n function tweenUpdate(val) {\n update(val, newScene, oldScene);\n }\n // Once the transition is complete, remove old scene layers from the stage and\n // remove the event listeners. If the old scene was destroyed during the\n // transition, this has already been taken care of. Otherwise, we still need\n // to get a fresh copy of the scene's layers, since they might have changed\n // during the transition.\n function tweenDone() {\n if (self._replacedScene) {\n self._removeSceneEventListeners(self._replacedScene);\n oldSceneLayers = self._replacedScene.listLayers();\n for(var i = 0; i < oldSceneLayers.length; i++)self._removeLayerFromStage(oldSceneLayers[i]);\n self._replacedScene = null;\n }\n self._cancelCurrentTween = null;\n done();\n }\n // Store the cancelable for the transition.\n this._cancelCurrentTween = $28mhx(duration, tweenUpdate, tweenDone);\n // Update the current and replaced scene.\n this._currentScene = newScene;\n this._replacedScene = oldScene;\n // Emit scene and view change events.\n this.emit(\"sceneChange\");\n this.emit(\"viewChange\");\n // Add event listeners to the new scene.\n // Note that event listeners can only be removed from the old scene once the\n // transition is complete, since layers might get added or removed in the\n // interim.\n this._addSceneEventListeners(newScene);\n};\nmodule.exports = $ecbddfc8b3d27744$var$Viewer;\n\n});\nparcelRegister(\"9kjMi\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $gouN9 = parcelRequire(\"gouN9\");\n\nvar $8U6hQ = parcelRequire(\"8U6hQ\");\n\nvar $a3AC3 = parcelRequire(\"a3AC3\");\n\nvar $6mia6 = parcelRequire(\"6mia6\");\n\nvar $azWbw = parcelRequire(\"azWbw\");\n\nvar $exIfG = parcelRequire(\"exIfG\");\n\nvar $fXp6t = parcelRequire(\"fXp6t\");\n\nvar $9eJDl = parcelRequire(\"9eJDl\");\n\nvar $2Xxut = parcelRequire(\"2Xxut\");\n/**\n * Signals that the scene's view has changed. See {@link View#event:change}.\n * @event Scene#viewChange\n */ /**\n * Signals that the scene's layers have changed.\n * @event Scene#layerChange\n */ /**\n * @class Scene\n * @classdesc\n *\n * A Scene is a stack of {@link Layer layers} sharing the same {@link View view}\n * and {@link HotspotContainer hotspot container}. It belongs to the\n * {@link Viewer viewer} inside which it is displayed.\n *\n * Clients should call {@link Viewer#createScene} instead of invoking the\n * constructor directly.\n *\n * @param {Viewer} viewer The viewer this scene belongs to.\n * @param {View} view The scene's underlying view.\n */ function $6ca552c9bda8c935$var$Scene(viewer, view) {\n this._viewer = viewer;\n this._view = view;\n this._layers = [];\n // Hotspot container. Assume it occupies a full rect.\n this._hotspotContainer = new $a3AC3(viewer._controlContainer, viewer.stage(), this._view, viewer.renderLoop());\n // The current movement.\n this._movement = null;\n this._movementStartTime = null;\n this._movementStep = null;\n this._movementParams = null;\n this._movementCallback = null;\n // Event listener for updating the view according to the current movement.\n // The listener is set/unset on the render loop when a movement starts/stops.\n this._updateMovementHandler = this._updateMovement.bind(this);\n // Show or hide hotspots when scene changes.\n this._updateHotspotContainerHandler = this._updateHotspotContainer.bind(this);\n this._viewer.addEventListener(\"sceneChange\", this._updateHotspotContainerHandler);\n // Emit event when view changes.\n this._viewChangeHandler = this.emit.bind(this, \"viewChange\");\n this._view.addEventListener(\"change\", this._viewChangeHandler);\n // Update the hotspot container.\n this._updateHotspotContainer();\n}\n$6mia6($6ca552c9bda8c935$var$Scene);\n/**\n * Destructor. Clients should call {@link Viewer#destroyScene} instead.\n */ $6ca552c9bda8c935$var$Scene.prototype.destroy = function() {\n this._view.removeEventListener(\"change\", this._viewChangeHandler);\n this._viewer.removeEventListener(\"sceneChange\", this._updateHotspotContainerHandler);\n if (this._movement) this.stopMovement();\n this._hotspotContainer.destroy();\n this.destroyAllLayers();\n $2Xxut(this);\n};\n/**\n * Returns the {@link HotspotContainer hotspot container} for the scene.\n * @return {Layer}\n */ $6ca552c9bda8c935$var$Scene.prototype.hotspotContainer = function() {\n return this._hotspotContainer;\n};\n/**\n * Returns the first of the {@link Layer layers} belonging to the scene, or\n * null if the scene has no layers.\n *\n * This method is equivalent to `Scene#listLayers[0]`. It may be removed in the\n * future.\n *\n * @return {Layer}\n */ $6ca552c9bda8c935$var$Scene.prototype.layer = function() {\n return this._layers[0];\n};\n/**\n* Returns a list of all {@link Layer layers} belonging to the scene. The\n* returned list is in display order, background to foreground.\n* @return {Layer[]}\n */ $6ca552c9bda8c935$var$Scene.prototype.listLayers = function() {\n return [].concat(this._layers);\n};\n/**\n * Returns the scene's underlying {@link View view}.\n * @return {View}\n */ $6ca552c9bda8c935$var$Scene.prototype.view = function() {\n return this._view;\n};\n/**\n * Returns the {@link Viewer viewer} the scene belongs to.\n * @return {Viewer}\n */ $6ca552c9bda8c935$var$Scene.prototype.viewer = function() {\n return this._viewer;\n};\n/**\n * Returns whether the scene is currently visible.\n * @return {boolean}\n */ $6ca552c9bda8c935$var$Scene.prototype.visible = function() {\n return this._viewer.scene() === this;\n};\n/**\n * Creates a new {@link Layer layer} and adds it into the scene in the\n * foreground position.\n *\n * @param {Object} opts Layer creation options.\n * @param {Source} opts.source The layer's underlying {@link Source}.\n * @param {Source} opts.geometry The layer's underlying {@link Geometry}.\n * @param {boolean} [opts.pinFirstLevel=false] Whether to pin the first level to\n * provide a fallback of last resort, at the cost of memory consumption.\n * @param {Object} [opts.textureStoreOpts={}] Options to pass to the\n * {@link TextureStore} constructor.\n * @param {Object} [opts.layerOpts={}] Options to pass to the {@link Layer}\n * constructor.\n * @return {Layer}\n */ $6ca552c9bda8c935$var$Scene.prototype.createLayer = function(opts) {\n opts = opts || {};\n var textureStoreOpts = opts.textureStoreOpts || {};\n var layerOpts = opts.layerOpts || {};\n var source = opts.source;\n var geometry = opts.geometry;\n var view = this._view;\n var stage = this._viewer.stage();\n var textureStore = new $8U6hQ(source, stage, textureStoreOpts);\n var layer = new $gouN9(source, geometry, view, textureStore, layerOpts);\n this._layers.push(layer);\n if (opts.pinFirstLevel) layer.pinFirstLevel();\n // Signal that the layers have changed.\n this.emit(\"layerChange\");\n return layer;\n};\n/**\n * Destroys a {@link Layer layer} and removes it from the scene.\n * @param {Layer} layer\n * @throws An error if the layer does not belong to the scene.\n */ $6ca552c9bda8c935$var$Scene.prototype.destroyLayer = function(layer) {\n var i = this._layers.indexOf(layer);\n if (i < 0) throw new Error(\"No such layer in scene\");\n this._layers.splice(i, 1);\n // Signal that the layers have changed.\n this.emit(\"layerChange\");\n layer.textureStore().destroy();\n layer.destroy();\n};\n/**\n * Destroys all {@link Layer layers} and removes them from the scene.\n */ $6ca552c9bda8c935$var$Scene.prototype.destroyAllLayers = function() {\n while(this._layers.length > 0)this.destroyLayer(this._layers[0]);\n};\n/**\n * Switches to the scene.\n *\n * This is equivalent to calling {@link Viewer#switchScene} on this scene.\n *\n * @param {Object} opts Options to pass into {@link Viewer#switchScene}.\n * @param {function} done Function to call when the switch is complete.\n */ $6ca552c9bda8c935$var$Scene.prototype.switchTo = function(opts, done) {\n return this._viewer.switchScene(this, opts, done);\n};\n/**\n * Tweens the scene's underlying {@link View view}.\n *\n * @param {Object} params Target view parameters.\n * @param {Object} opts Transition options.\n * @param {function} [opts.ease=easeInOutQuad] Tween easing function\n * @param {number} [opts.controlsInterrupt=false] allow controls to interrupt\n * an ongoing tween.\n * @param {number} [opts.transitionDuration=1000] Tween duration, in\n * milliseconds.\n * @param {number} [opts.closest=true] Whether to tween through the shortest\n * path between the initial and final view parameters. This requires\n * {@link View#normalizeToClosest} to be implemented, and does nothing\n * otherwise.\n * @param {function} done Function to call when the tween finishes or is\n * interrupted.\n */ $6ca552c9bda8c935$var$Scene.prototype.lookTo = function(params, opts, done) {\n opts = opts || {};\n done = done || $exIfG;\n if ($fXp6t(params) !== \"object\") throw new Error(\"Target view parameters must be an object\");\n // Quadratic in/out easing.\n var easeInOutQuad = function(k) {\n if ((k *= 2) < 1) return 0.5 * k * k;\n return -0.5 * (--k * (k - 2) - 1);\n };\n var ease = opts.ease != null ? opts.ease : easeInOutQuad;\n var controlsInterrupt = opts.controlsInterrupt != null ? opts.controlsInterrupt : false;\n var duration = opts.transitionDuration != null ? opts.transitionDuration : 1000;\n var shortest = opts.shortest != null ? opts.shortest : true;\n var view = this._view;\n var initialParams = view.parameters();\n var finalParams = {};\n $9eJDl(finalParams, params);\n $9eJDl(finalParams, initialParams);\n // Tween through the shortest path if requested.\n // The view must implement the normalizeToClosest() method.\n if (shortest && view.normalizeToClosest) view.normalizeToClosest(finalParams, finalParams);\n var movement = function() {\n var finalUpdate = false;\n return function(params, elapsed) {\n if (elapsed >= duration && finalUpdate) return null;\n var delta = Math.min(elapsed / duration, 1);\n for(var param in params){\n var start = initialParams[param];\n var end = finalParams[param];\n params[param] = start + ease(delta) * (end - start);\n }\n finalUpdate = elapsed >= duration;\n return params;\n };\n };\n var reenableControls = this._viewer.controls().enabled();\n if (!controlsInterrupt) this._viewer.controls().disable();\n this.startMovement(movement, function() {\n if (reenableControls) this._viewer.controls().enable();\n done();\n });\n};\n/**\n * Starts a movement, possibly replacing the current movement.\n *\n * @param {function} fn The movement function.\n * @param {function} done Function to be called when the movement finishes or is\n * interrupted.\n */ $6ca552c9bda8c935$var$Scene.prototype.startMovement = function(fn, done) {\n var renderLoop = this._viewer.renderLoop();\n if (this._movement) this.stopMovement();\n var step = fn();\n if (typeof step !== \"function\") throw new Error(\"Bad movement\");\n this._movement = fn;\n this._movementStep = step;\n this._movementStartTime = $azWbw();\n this._movementParams = {};\n this._movementCallback = done;\n renderLoop.addEventListener(\"beforeRender\", this._updateMovementHandler);\n renderLoop.renderOnNextFrame();\n};\n/**\n * Stops the current movement.\n */ $6ca552c9bda8c935$var$Scene.prototype.stopMovement = function() {\n var renderLoop = this._viewer.renderLoop();\n if (!this._movement) return;\n if (this._movementCallback) this._movementCallback();\n renderLoop.removeEventListener(\"beforeRender\", this._updateMovementHandler);\n this._movement = null;\n this._movementStep = null;\n this._movementStartTime = null;\n this._movementParams = null;\n this._movementCallback = null;\n};\n/**\n * Returns the current movement.\n * @return {function}\n */ $6ca552c9bda8c935$var$Scene.prototype.movement = function() {\n return this._movement;\n};\n$6ca552c9bda8c935$var$Scene.prototype._updateMovement = function() {\n if (!this._movement) throw new Error(\"Should not call update\");\n var renderLoop = this._viewer.renderLoop();\n var view = this._view;\n var elapsed = $azWbw() - this._movementStartTime;\n var step = this._movementStep;\n var params = this._movementParams;\n params = view.parameters(params);\n params = step(params, elapsed);\n if (params == null) this.stopMovement();\n else {\n view.setParameters(params);\n renderLoop.renderOnNextFrame();\n }\n};\n$6ca552c9bda8c935$var$Scene.prototype._updateHotspotContainer = function() {\n if (this.visible()) this._hotspotContainer.show();\n else this._hotspotContainer.hide();\n};\nmodule.exports = $6ca552c9bda8c935$var$Scene;\n\n});\nparcelRegister(\"a3AC3\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $6mia6 = parcelRequire(\"6mia6\");\n\nvar $028gl = parcelRequire(\"028gl\");\n\nvar $8pjZz = parcelRequire(\"8pjZz\");\n\nvar $emB94 = parcelRequire(\"emB94\");\n\nvar $eC4zG = parcelRequire(\"eC4zG\");\n\nvar $752695bb2a9c28d8$require$setAbsolute = (parcelRequire(\"dBMHD\")).setAbsolute;\n\nvar $752695bb2a9c28d8$require$setOverflowHidden = (parcelRequire(\"dBMHD\")).setOverflowHidden;\n\nvar $752695bb2a9c28d8$require$setOverflowVisible = (parcelRequire(\"dBMHD\")).setOverflowVisible;\n\nvar $752695bb2a9c28d8$require$setNullSize = (parcelRequire(\"dBMHD\")).setNullSize;\n\nvar $752695bb2a9c28d8$require$setPixelSize = (parcelRequire(\"dBMHD\")).setPixelSize;\n\nvar $752695bb2a9c28d8$var$setPointerEvents = (parcelRequire(\"dBMHD\")).setWithVendorPrefix(\"pointer-events\");\n\nvar $2Xxut = parcelRequire(\"2Xxut\");\n/**\n * Signals that a hotspot has been created or destroyed on the container.\n * @event HotspotContainer#hotspotsChange\n */ /**\n * @class HotspotContainer\n * @classdesc\n *\n * Creates a DOM element to hold {@link Hotspot hotspots} and updates their\n * position when necessary.\n *\n * @param {Element} parentDomElement The DOM element inside which the container\n * should be created.\n * @param {Stage} stage The underlying stage.\n * @param {View} view The view according to which the hotspots are positioned.\n * @param {RenderLoop} renderLoop The render loop indicating when the hotspots\n * must be rendered.\n * @param {Object} opts\n * @param {RectSpec} opts.rect Rectangular region covered by the container. See\n * {@link Effects#rect}.\n */ function $752695bb2a9c28d8$var$HotspotContainer(parentDomElement, stage, view, renderLoop, opts) {\n opts = opts || {};\n this._parentDomElement = parentDomElement;\n this._stage = stage;\n this._view = view;\n this._renderLoop = renderLoop;\n // Hotspot list.\n this._hotspots = [];\n // Whether the hotspot container should be visible.\n // It may still be hidden if a rect effect is set on a browser without\n // pointer-events support.\n this._visible = true;\n // The current rect.\n this._rect = opts.rect;\n // Whether the visibility or the rect have changed since the last DOM update.\n this._visibilityOrRectChanged = true;\n // The last seen stage dimensions.\n this._stageWidth = null;\n this._stageHeight = null;\n // Temporary variable to hold the calculated position and size.\n this._tmpRect = {};\n // Wrapper element. When the rect effect is set, the wrapper will have nonzero\n // dimensions and `pointer-events: none` so that hotspots outside the rect are\n // hidden, but no mouse events are hijacked. The exception is browsers without\n // pointer-events support, where we refuse to show the hotspots when a rect is\n // set as it would prevent the controls from receiving mouse events.\n this._hotspotContainerWrapper = document.createElement(\"div\");\n $752695bb2a9c28d8$require$setAbsolute(this._hotspotContainerWrapper);\n $752695bb2a9c28d8$var$setPointerEvents(this._hotspotContainerWrapper, \"none\");\n this._parentDomElement.appendChild(this._hotspotContainerWrapper);\n // Hotspot container element. It has zero dimensions and `pointer-events: all`\n // to override the `pointer-events: none` on the wrapper and allow hotspots to\n // be interacted with.\n this._hotspotContainer = document.createElement(\"div\");\n $752695bb2a9c28d8$require$setAbsolute(this._hotspotContainer);\n $752695bb2a9c28d8$var$setPointerEvents(this._hotspotContainer, \"all\");\n this._hotspotContainerWrapper.appendChild(this._hotspotContainer);\n // Update when the hotspots change or scene is re-rendered.\n this._updateHandler = this._update.bind(this);\n this._renderLoop.addEventListener(\"afterRender\", this._updateHandler);\n}\n$6mia6($752695bb2a9c28d8$var$HotspotContainer);\n/**\n * Destructor.\n */ $752695bb2a9c28d8$var$HotspotContainer.prototype.destroy = function() {\n while(this._hotspots.length)this.destroyHotspot(this._hotspots[0]);\n this._parentDomElement.removeChild(this._hotspotContainerWrapper);\n this._renderLoop.removeEventListener(\"afterRender\", this._updateHandler);\n $2Xxut(this);\n};\n/**\n * @return {Element}\n */ $752695bb2a9c28d8$var$HotspotContainer.prototype.domElement = function() {\n return this._hotspotContainer;\n};\n/**\n * @param {Rect} rect\n */ $752695bb2a9c28d8$var$HotspotContainer.prototype.setRect = function(rect) {\n if (rect && !$emB94() && typeof console !== \"undefined\") console.warn(\"Using a rect effect is not fully supported on this browser. Hotspots may not be shown.\");\n this._rect = rect;\n this._visibilityOrRectChanged = true;\n};\n/**\n * @return {Rect}\n */ $752695bb2a9c28d8$var$HotspotContainer.prototype.rect = function() {\n return this._rect;\n};\n/**\n * Creates a new hotspot in this container.\n *\n * @param {Element} domElement DOM element to use for the hotspot\n * @param {Object} coords The hotspot coordinates.\n * Use {@link RectilinearViewCoords}` for a {@link RectilinearView} or\n * {@link FlatViewCoords} for a {@link FlatView}.\n * @param {Object} opts Options in the same format as the `opts` argument to\n * the {@link Hotspot} constructor.\n * @return {Hotspot}\n */ $752695bb2a9c28d8$var$HotspotContainer.prototype.createHotspot = function(domElement, coords, opts) {\n coords = coords || {};\n var hotspot = new $028gl(domElement, this._hotspotContainer, this._view, coords, opts);\n this._hotspots.push(hotspot);\n hotspot._update();\n this.emit(\"hotspotsChange\");\n return hotspot;\n};\n/**\n * @param {Hotspot} hotspot\n * @return {boolean}\n */ $752695bb2a9c28d8$var$HotspotContainer.prototype.hasHotspot = function(hotspot) {\n return this._hotspots.indexOf(hotspot) >= 0;\n};\n/**\n * @return {Hotspot[]}\n */ $752695bb2a9c28d8$var$HotspotContainer.prototype.listHotspots = function() {\n return [].concat(this._hotspots);\n};\n/**\n * Removes a hotspot from the container.\n *\n * @param {Hotspot} hotspot\n */ $752695bb2a9c28d8$var$HotspotContainer.prototype.destroyHotspot = function(hotspot) {\n var i = this._hotspots.indexOf(hotspot);\n if (i < 0) throw new Error(\"No such hotspot\");\n this._hotspots.splice(i, 1);\n hotspot.destroy();\n this.emit(\"hotspotsChange\");\n};\n/**\n * Hide the container's DOM element, causing every contained {@link Hotspot} to\n * be hidden.\n */ $752695bb2a9c28d8$var$HotspotContainer.prototype.hide = function() {\n if (this._visible) {\n this._visible = false;\n this._visibilityOrRectChanged = true;\n this._update();\n }\n};\n/**\n * Show the container's DOM element, causing every contained {@link Hotspot} to\n * be shown.\n */ $752695bb2a9c28d8$var$HotspotContainer.prototype.show = function() {\n if (!this._visible) {\n this._visible = true;\n this._visibilityOrRectChanged = true;\n this._update();\n }\n};\n$752695bb2a9c28d8$var$HotspotContainer.prototype._update = function() {\n var wrapper = this._hotspotContainerWrapper;\n var width = this._stage.width();\n var height = this._stage.height();\n var tmpRect = this._tmpRect;\n // Avoid updating the wrapper DOM unless necessary.\n if (this._visibilityOrRectChanged || this._rect && (width !== this._stageWidth || height !== this._stageHeight)) {\n var visible = this._visible && !(this._rect && !$emB94());\n wrapper.style.display = visible ? \"block\" : \"none\";\n if (visible) {\n if (this._rect) {\n $8pjZz(width, height, this._rect, tmpRect);\n $eC4zG(wrapper, width * tmpRect.x, height * tmpRect.y);\n $752695bb2a9c28d8$require$setPixelSize(wrapper, width * tmpRect.width, height * tmpRect.height);\n $752695bb2a9c28d8$require$setOverflowHidden(wrapper);\n } else {\n $eC4zG(wrapper, 0, 0);\n $752695bb2a9c28d8$require$setNullSize(wrapper);\n $752695bb2a9c28d8$require$setOverflowVisible(wrapper);\n }\n }\n this._stageWidth = width;\n this._stageHeight = height;\n this._visibilityOrRectChanged = false;\n }\n // Update hotspots unconditionally, as the view parameters may have changed.\n for(var i = 0; i < this._hotspots.length; i++)this._hotspots[i]._update();\n};\nmodule.exports = $752695bb2a9c28d8$var$HotspotContainer;\n\n});\nparcelRegister(\"028gl\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $6mia6 = parcelRequire(\"6mia6\");\n\nvar $3owNE = parcelRequire(\"3owNE\");\n\nvar $eC4zG = parcelRequire(\"eC4zG\");\n\nvar $dBMHD = parcelRequire(\"dBMHD\");\nvar $006698c92bcc7dff$require$setTransform = $dBMHD.setTransform;\n\nvar $2Xxut = parcelRequire(\"2Xxut\");\n/**\n * @class Hotspot\n * @classdesc\n *\n * A Hotspot allows a DOM element to be placed at a fixed position in the\n * image. The position is updated automatically when the {@link View view}\n * changes.\n *\n * Positioning is performed with the `transform` CSS property when available,\n * falling back to the `position`, `left` and `top` properties when not.\n * In both cases, the top left corner of the element is placed in the requested\n * position; clients are expected to use additional children elements or other\n * CSS properties to achieve more sophisticated layouts.\n *\n * There are two kinds of hotspots: regular and embedded. A regular hotspot\n * does not change size depending on the zoom level. An embedded hotspot is\n * displayed at a fixed size relative to the panorama, always covering the\n * same portion of the image. Embedded hotspots require CSS 3D transform\n * support.\n *\n * Clients should call {@link HotspotContainer#createHotspot} instead of\n * invoking the constructor directly.\n *\n * @param {Element} domElement The DOM element.\n * @param {View} view The view.\n * @param {Object} coords The hotspot coordinates.\n * Use {@link RectilinearViewCoords} for a {@link RectilinearView} or\n * {@link FlatViewCoords} for a {@link FlatView}.\n * @param {Object} opts Additional options.\n * @param {Object} opts.perspective Perspective options for embedded hotspots.\n * @param {number} [opts.perspective.radius=null] If set, embed the hotspot\n * into the image by transforming it into the surface of a sphere with this\n * radius.\n * @param {string} [opts.perspective.extraTransforms=null] If set, append this\n * value to the CSS `transform` property used to position the hotspot. This\n * may be used to rotate an embedded hotspot.\n */ function $006698c92bcc7dff$var$Hotspot(domElement, parentDomElement, view, coords, opts) {\n opts = opts || {};\n opts.perspective = opts.perspective || {};\n opts.perspective.extraTransforms = opts.perspective.extraTransforms != null ? opts.perspective.extraTransforms : \"\";\n if ((opts.perspective.radius || opts.perspective.extraTransforms) && !$3owNE()) throw new Error(\"CSS transforms on hotspots are not supported on this browser\");\n this._domElement = domElement;\n this._parentDomElement = parentDomElement;\n this._view = view;\n this._coords = {};\n this._perspective = {};\n this.setPosition(coords);\n // Add hotspot into the DOM.\n this._parentDomElement.appendChild(this._domElement);\n this.setPerspective(opts.perspective);\n // Whether the hotspot is visible.\n // The hotspot may still be hidden if it's inside a hidden HotspotContainer.\n this._visible = true;\n // The current calculated screen position.\n this._position = {\n x: 0,\n y: 0\n };\n}\n$6mia6($006698c92bcc7dff$var$Hotspot);\n/**\n * Destructor.\n * Clients should call {@link HotspotContainer#destroyHotspot} instead.\n */ $006698c92bcc7dff$var$Hotspot.prototype.destroy = function() {\n this._parentDomElement.removeChild(this._domElement);\n $2Xxut(this);\n};\n/**\n * @return {Element}\n */ $006698c92bcc7dff$var$Hotspot.prototype.domElement = function() {\n return this._domElement;\n};\n/**\n * @return {Object}\n */ $006698c92bcc7dff$var$Hotspot.prototype.position = function() {\n return this._coords;\n};\n/**\n * @param {Object} coords\n */ $006698c92bcc7dff$var$Hotspot.prototype.setPosition = function(coords) {\n for(var key in coords)this._coords[key] = coords[key];\n this._update();\n// TODO: We should probably emit a hotspotsChange event on the parent\n// HotspotContainer. What's the best way to do so?\n};\n/**\n * @return {Object}\n */ $006698c92bcc7dff$var$Hotspot.prototype.perspective = function() {\n return this._perspective;\n};\n/**\n * @param {Object}\n */ $006698c92bcc7dff$var$Hotspot.prototype.setPerspective = function(perspective) {\n for(var key in perspective)this._perspective[key] = perspective[key];\n this._update();\n};\n/**\n * Show the hotspot\n */ $006698c92bcc7dff$var$Hotspot.prototype.show = function() {\n if (!this._visible) {\n this._visible = true;\n this._update();\n }\n};\n/**\n * Hide the hotspot\n */ $006698c92bcc7dff$var$Hotspot.prototype.hide = function() {\n if (this._visible) {\n this._visible = false;\n this._update();\n }\n};\n$006698c92bcc7dff$var$Hotspot.prototype._update = function() {\n var element = this._domElement;\n var params = this._coords;\n var position = this._position;\n var x, y;\n var isVisible = false;\n if (this._visible) {\n var view = this._view;\n if (this._perspective.radius) {\n // Hotspots that are embedded in the panorama may be visible even when\n // positioned behind the camera.\n isVisible = true;\n this._setEmbeddedPosition(view, params);\n } else {\n // Regular hotspots are only visible when positioned in front of the\n // camera. Note that they may be partially visible when positioned outside\n // the viewport.\n view.coordinatesToScreen(params, position);\n x = position.x;\n y = position.y;\n if (x != null && y != null) {\n isVisible = true;\n this._setPosition(x, y);\n }\n }\n }\n // Show if visible, hide if not.\n if (isVisible) {\n element.style.display = \"block\";\n element.style.position = \"absolute\";\n } else {\n element.style.display = \"none\";\n element.style.position = \"\";\n }\n};\n$006698c92bcc7dff$var$Hotspot.prototype._setEmbeddedPosition = function(view, params) {\n var transform = view.coordinatesToPerspectiveTransform(params, this._perspective.radius, this._perspective.extraTransforms);\n $006698c92bcc7dff$require$setTransform(this._domElement, transform);\n};\n$006698c92bcc7dff$var$Hotspot.prototype._setPosition = function(x, y) {\n $eC4zG(this._domElement, x, y, this._perspective.extraTransforms);\n};\nmodule.exports = $006698c92bcc7dff$var$Hotspot;\n\n});\nparcelRegister(\"eC4zG\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $3owNE = parcelRequire(\"3owNE\");\n\nvar $dBMHD = parcelRequire(\"dBMHD\");\nvar $aa3829baedec433a$require$setTransform = $dBMHD.setTransform;\n\nvar $dBMHD = parcelRequire(\"dBMHD\");\nvar $aa3829baedec433a$require$setPixelPosition = $dBMHD.setPixelPosition;\n\nvar $asoyN = parcelRequire(\"asoyN\");\n// This cannot belong in util/dom.js because support/Css also depends on it\n// and it would cause a circular dependency.\nfunction $aa3829baedec433a$var$positionAbsolutely(element, x, y, extraTransforms) {\n extraTransforms = extraTransforms || \"\";\n if ($3owNE()) {\n // Use CSS 3D transforms when the browser supports them.\n // A translateZ(0) transform improves performance on Chrome by creating a\n // new layer for the element, which prevents unnecessary repaints.\n var transform = \"translateX(\" + $asoyN(x) + \"px) translateY(\" + $asoyN(y) + \"px) translateZ(0) \" + extraTransforms;\n $aa3829baedec433a$require$setTransform(element, transform);\n } else // Fall back to absolute positioning.\n $aa3829baedec433a$require$setPixelPosition(element, x, y);\n}\nmodule.exports = $aa3829baedec433a$var$positionAbsolutely;\n\n});\n\n\nparcelRegister(\"emB94\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $W9Vbx = parcelRequire(\"W9Vbx\");\n// Detect CSS pointer-events support.\nfunction $a74fef1002bdcb47$var$checkCssPointerEventsSupported() {\n // Check for existence of CSS property.\n var style = document.createElement(\"a\").style;\n style.cssText = \"pointer-events:auto\";\n var hasCssProperty = style.pointerEvents === \"auto\";\n // The above result is spurious on emulation mode for IE 8-10.\n var isOldIE = $W9Vbx.msie && parseFloat($W9Vbx.version) < 11;\n return hasCssProperty && !isOldIE;\n}\n// Cache result.\nvar $a74fef1002bdcb47$var$supported;\nfunction $a74fef1002bdcb47$var$cssPointerEventsSupported() {\n if ($a74fef1002bdcb47$var$supported !== undefined) return $a74fef1002bdcb47$var$supported;\n return $a74fef1002bdcb47$var$supported = $a74fef1002bdcb47$var$checkCssPointerEventsSupported();\n}\nmodule.exports = $a74fef1002bdcb47$var$cssPointerEventsSupported;\n\n});\n\n\n\nparcelRegister(\"460G7\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $6mia6 = parcelRequire(\"6mia6\");\n\nvar $9eJDl = parcelRequire(\"9eJDl\");\n\nvar $azWbw = parcelRequire(\"azWbw\");\nvar $2fb83fa82b12c3d0$var$defaultOptions = {\n duration: Infinity\n};\n/**\n * Signals a timeout.\n * @event Timer#timeout\n */ /**\n * @class Timer\n * @classdesc\n *\n * A Timer provides a mechanism to receive an event after a timeout.\n *\n * A timer has a set duration, and is either started or stopped at a given time.\n * The timer is initially stopped. When the timer is started, a timeout event is\n * scheduled to fire once the set duration elapses. When the timer is stopped,\n * the scheduled timeout event is cancelled. When a timeout event fires, the\n * timer returns to the stopped state.\n *\n * @param {number} [opts.duration=Infinity] Timeout in milliseconds.\n */ function $2fb83fa82b12c3d0$var$Timer(opts) {\n opts = $9eJDl(opts || {}, $2fb83fa82b12c3d0$var$defaultOptions);\n this._duration = opts.duration;\n this._startTime = null;\n this._handle = null;\n this._check = this._check.bind(this);\n}\n$6mia6($2fb83fa82b12c3d0$var$Timer);\n/**\n * Starts the timer. If the timer is already started, this has the effect of\n * stopping and starting again (i.e. resetting the timer).\n */ $2fb83fa82b12c3d0$var$Timer.prototype.start = function() {\n this._startTime = $azWbw();\n if (this._handle == null && this._duration < Infinity) this._setup(this._duration);\n};\n/**\n * Returns whether the timer is in the started state.\n * @return {boolean}\n */ $2fb83fa82b12c3d0$var$Timer.prototype.started = function() {\n return this._startTime != null;\n};\n/**\n * Stops the timer.\n */ $2fb83fa82b12c3d0$var$Timer.prototype.stop = function() {\n this._startTime = null;\n if (this._handle != null) {\n clearTimeout(this._handle);\n this._handle = null;\n }\n};\n$2fb83fa82b12c3d0$var$Timer.prototype._setup = function(interval) {\n this._handle = setTimeout(this._check, interval);\n};\n$2fb83fa82b12c3d0$var$Timer.prototype._teardown = function() {\n clearTimeout(this._handle);\n this._handle = null;\n};\n$2fb83fa82b12c3d0$var$Timer.prototype._check = function() {\n var currentTime = $azWbw();\n var elapsed = currentTime - this._startTime;\n var remaining = this._duration - elapsed;\n this._teardown();\n if (remaining <= 0) {\n this.emit(\"timeout\");\n this._startTime = null;\n } else if (remaining < Infinity) this._setup(remaining);\n};\n/**\n * Returns the currently set duration.\n */ $2fb83fa82b12c3d0$var$Timer.prototype.duration = function() {\n return this._duration;\n};\n/**\n * Sets the duration. If the timer is already started, the timeout event is\n * rescheduled to occur once the new duration has elapsed since the last call\n * to start. In particular, if an amount of time larger than the new duration\n * has already elapsed, the timeout event fires immediately.\n * @param {number}\n */ $2fb83fa82b12c3d0$var$Timer.prototype.setDuration = function(duration) {\n this._duration = duration;\n if (this._startTime != null) this._check();\n};\nmodule.exports = $2fb83fa82b12c3d0$var$Timer;\n\n});\n\nparcelRegister(\"1dJzJ\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $9eJDl = parcelRequire(\"9eJDl\");\n\nvar $2Xxut = parcelRequire(\"2Xxut\");\nvar $0e3a5ba42d387393$var$defaultOpts = {\n active: \"move\",\n inactive: \"default\",\n disabled: \"default\"\n};\n/**\n * @class ControlCursor\n * @classdesc\n *\n * Sets the CSS cursor on a DOM element according to the state of a\n * {@link ControlMethod}.\n *\n * @param {Controls} controls Controls instance containing the control method.\n * @param {string} id ID of the control method.\n * @param {Element} element DOM element where the cursor should be set.\n * @param {Object} opts The control cursors. Each field must be a valid value\n * for the `cursor` CSS property.\n * @param {string} [opts.active='move'] Cursor to set when the control method\n * is enabled and active.\n * @param {string} [opts.inactive='default'] Cursor to set when the control\n * method is enabled and inactive.\n * @param {string} [opts.disabled='default'] Cursor to set when the control\n * method is disabled.\n */ function $0e3a5ba42d387393$var$ControlCursor(controls, id, element, opts) {\n opts = $9eJDl(opts || {}, $0e3a5ba42d387393$var$defaultOpts);\n // TODO: This class may misbehave if the control method is unregistered and a\n // different control method is registered under the same id.\n this._element = element;\n this._controls = controls;\n this._id = id;\n this._attached = false;\n this._setActiveCursor = this._setCursor.bind(this, opts.active);\n this._setInactiveCursor = this._setCursor.bind(this, opts.inactive);\n this._setDisabledCursor = this._setCursor.bind(this, opts.disabled);\n this._setOriginalCursor = this._setCursor.bind(this, this._element.style.cursor);\n this._updateAttachmentHandler = this._updateAttachment.bind(this);\n controls.addEventListener(\"methodEnabled\", this._updateAttachmentHandler);\n controls.addEventListener(\"methodDisabled\", this._updateAttachmentHandler);\n controls.addEventListener(\"enabled\", this._updateAttachmentHandler);\n controls.addEventListener(\"disabled\", this._updateAttachmentHandler);\n this._updateAttachment();\n}\n/**\n * Destructor.\n */ $0e3a5ba42d387393$var$ControlCursor.prototype.destroy = function() {\n this._detachFromControlMethod(this._controls.method(this._id));\n this._setOriginalCursor();\n this._controls.removeEventListener(\"methodEnabled\", this._updateAttachmentHandler);\n this._controls.removeEventListener(\"methodDisabled\", this._updateAttachmentHandler);\n this._controls.removeEventListener(\"enabled\", this._updateAttachmentHandler);\n this._controls.removeEventListener(\"disabled\", this._updateAttachmentHandler);\n $2Xxut(this);\n};\n$0e3a5ba42d387393$var$ControlCursor.prototype._updateAttachment = function() {\n var controls = this._controls;\n var id = this._id;\n if (controls.enabled() && controls.method(id).enabled) this._attachToControlMethod(controls.method(id));\n else this._detachFromControlMethod(controls.method(id));\n};\n$0e3a5ba42d387393$var$ControlCursor.prototype._attachToControlMethod = function(controlMethod) {\n if (!this._attached) {\n controlMethod.instance.addEventListener(\"active\", this._setActiveCursor);\n controlMethod.instance.addEventListener(\"inactive\", this._setInactiveCursor);\n if (controlMethod.active) this._setActiveCursor();\n else this._setInactiveCursor();\n this._attached = true;\n }\n};\n$0e3a5ba42d387393$var$ControlCursor.prototype._detachFromControlMethod = function(controlMethod) {\n if (this._attached) {\n controlMethod.instance.removeEventListener(\"active\", this._setActiveCursor);\n controlMethod.instance.removeEventListener(\"inactive\", this._setInactiveCursor);\n this._setDisabledCursor();\n this._attached = false;\n }\n};\n$0e3a5ba42d387393$var$ControlCursor.prototype._setCursor = function(cursor) {\n this._element.style.cursor = cursor;\n};\nmodule.exports = $0e3a5ba42d387393$var$ControlCursor;\n\n});\n\nparcelRegister(\"9aEkC\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $9eJDl = parcelRequire(\"9eJDl\");\n\nvar $efdW7 = parcelRequire(\"efdW7\");\n\nvar $kjQCu = parcelRequire(\"kjQCu\");\n\nvar $fCy8Y = parcelRequire(\"fCy8Y\");\n\nvar $2cyzb = parcelRequire(\"2cyzb\");\n\nvar $kniT1 = parcelRequire(\"kniT1\");\nvar $6ad4553db4969957$var$defaultOptions = {\n mouseViewMode: \"drag\"\n};\n/**\n * Instantiate and register some commonly used {@link ControlMethod} instances.\n *\n * The following instances are registered:\n * - mouseViewDrag\n * - mouseViewQtvr\n * - touchView\n * - pinch\n * - arrowKeys\n * - plusMinusKeys\n * - wasdKeys\n * - qeKeys\n *\n * @param {Controls} controls Where to register the instances.\n * @param {Element} element Element to listen for events.\n * @param {Object} opts\n * @param {'drag'|'qtvr'} mouseViewMode\n */ function $6ad4553db4969957$var$registerDefaultControls(controls, element, opts) {\n opts = $9eJDl(opts || {}, $6ad4553db4969957$var$defaultOptions);\n var controlMethods = {\n mouseViewDrag: new $efdW7(element, \"mouse\"),\n mouseViewQtvr: new $kjQCu(element, \"mouse\"),\n touchView: new $efdW7(element, \"touch\"),\n pinch: new $2cyzb(element, \"touch\"),\n leftArrowKey: new $kniT1(37, \"x\", -0.7, 3),\n rightArrowKey: new $kniT1(39, \"x\", 0.7, 3),\n upArrowKey: new $kniT1(38, \"y\", -0.7, 3),\n downArrowKey: new $kniT1(40, \"y\", 0.7, 3),\n plusKey: new $kniT1(107, \"zoom\", -0.7, 3),\n minusKey: new $kniT1(109, \"zoom\", 0.7, 3),\n wKey: new $kniT1(87, \"y\", -0.7, 3),\n aKey: new $kniT1(65, \"x\", -0.7, 3),\n sKey: new $kniT1(83, \"y\", 0.7, 3),\n dKey: new $kniT1(68, \"x\", 0.7, 3),\n qKey: new $kniT1(81, \"roll\", 0.7, 3),\n eKey: new $kniT1(69, \"roll\", -0.7, 3)\n };\n if (opts.scrollZoom !== false) controlMethods.scrollZoom = new $fCy8Y(element); //{ frictionTime: 0 }\n var controlMethodGroups = {\n arrowKeys: [\n \"leftArrowKey\",\n \"rightArrowKey\",\n \"upArrowKey\",\n \"downArrowKey\"\n ],\n plusMinusKeys: [\n \"plusKey\",\n \"minusKey\"\n ],\n wasdKeys: [\n \"wKey\",\n \"aKey\",\n \"sKey\",\n \"dKey\"\n ],\n qeKeys: [\n \"qKey\",\n \"eKey\"\n ]\n };\n var enabledControls = [\n \"scrollZoom\",\n \"touchView\",\n \"pinch\"\n ];\n switch(opts.mouseViewMode){\n case \"drag\":\n enabledControls.push(\"mouseViewDrag\");\n break;\n case \"qtvr\":\n enabledControls.push(\"mouseViewQtvr\");\n break;\n default:\n throw new Error(\"Unknown mouse view mode: \" + opts.mouseViewMode);\n }\n for(var id in controlMethods){\n var method = controlMethods[id];\n controls.registerMethod(id, method);\n if (enabledControls.indexOf(id) >= 0) controls.enableMethod(id);\n }\n for(var groupId in controlMethodGroups){\n var methodGroup = controlMethodGroups[groupId];\n controls.addMethodGroup(groupId, methodGroup);\n }\n return controlMethods;\n}\nmodule.exports = $6ad4553db4969957$var$registerDefaultControls;\n\n});\n\nparcelRegister(\"28mhx\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $azWbw = parcelRequire(\"azWbw\");\nfunction $18dd9cd7bf18fb2e$var$tween(duration, update, done) {\n var cancelled = false;\n var startTime = $azWbw();\n function runUpdate() {\n if (cancelled) return;\n var tweenVal = ($azWbw() - startTime) / duration;\n if (tweenVal < 1) {\n update(tweenVal);\n requestAnimationFrame(runUpdate);\n } else {\n update(1);\n done();\n }\n }\n update(0);\n requestAnimationFrame(runUpdate);\n return function cancel() {\n cancelled = true;\n done.apply(null, arguments);\n };\n}\nmodule.exports = $18dd9cd7bf18fb2e$var$tween;\n\n});\n\n\nparcelRegister(\"j8BiC\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $c3mW8 = parcelRequire(\"c3mW8\");\nvar $8QvoZ = parcelRequire(\"8QvoZ\");\nvar $deebb28bbaed009d$require$vec4 = $8QvoZ;\n\nvar $c3mW8 = parcelRequire(\"c3mW8\");\nvar $8QvoZ = parcelRequire(\"8QvoZ\");\nvar $deebb28bbaed009d$require$mat4 = $c3mW8;\n/**\n * Helper functions for color transformation {@link Effects}.\n *\n * References:\n *\n * - [ColorMatrix Guide](http://docs.rainmeter.net/tips/colormatrix-guide)\n * - [Matrix Operations for Image Processing](http://www.graficaobscura.com/matrix/index.html)\n * - [WebGLImageFilter](https://github.com/phoboslab/WebGLImageFilter)\n * - [glfx.js](https://github.com/evanw/glfx.js)\n *\n * @namespace colorEffects\n */ /**\n * A vector and matrix corresponding to an identity transformation.\n *\n * @param {Object} result Object to store result\n * @param {vec4} result.colorOffset Array with zeroes.\n * @param {mat4} result.colorMatrix Identity matrix.\n *\n * @memberof colorEffects\n */ function $deebb28bbaed009d$var$identity(resultArg) {\n var result = resultArg || {};\n result.colorOffset = result.colorOffset || $deebb28bbaed009d$require$vec4.create();\n result.colorMatrix = result.colorMatrix || $deebb28bbaed009d$require$mat4.create();\n return result;\n}\n/**\n * Apply color effects to a single pixel\n *\n * @param {vec4} pixel Values in range [0,1]\n * @param {Object} effect\n * @param {vec4} effect.colorOffset\n * @param {mat4} effect.colorMatrix\n * @param {vec4} result Object to store result\n *\n * @memberof colorEffects\n */ function $deebb28bbaed009d$var$applyToPixel(pixel, effect, result) {\n $deebb28bbaed009d$var$vec4TransformMat4Transposed(result, pixel, effect.colorMatrix);\n $deebb28bbaed009d$require$vec4.add(result, result, effect.colorOffset);\n}\n// Oddly, the colorTransform matrix needs to be transposed to be used with\n// vec4.transformMat4. It is strange that transformMat4 dosn't work the same\n// way as multiplying on the shader.\n// TODO: investigate this further\nfunction $deebb28bbaed009d$var$vec4TransformMat4Transposed(out, a, m) {\n var x = a[0], y = a[1], z = a[2], w = a[3];\n out[0] = m[0] * x + m[1] * y + m[2] * z + m[3] * w;\n out[1] = m[4] * x + m[5] * y + m[6] * z + m[7] * w;\n out[2] = m[8] * x + m[9] * y + m[10] * z + m[11] * w;\n out[3] = m[12] * x + m[13] * y + m[14] * z + m[15] * w;\n return out;\n}\n/**\n * Apply color effects to an ImageData\n *\n * @param {ImageData} imageData This object will be mutated\n * @param {Object} effect\n * @param {vec4} effect.colorOffset\n * @param {mat4} effect.colorMatrix\n *\n * @memberof colorEffects\n */ var $deebb28bbaed009d$var$tmpPixel = $deebb28bbaed009d$require$vec4.create();\nfunction $deebb28bbaed009d$var$applyToImageData(imageData, effect) {\n var width = imageData.width;\n var height = imageData.height;\n var data = imageData.data;\n for(var i = 0; i < width * height; i++){\n $deebb28bbaed009d$require$vec4.set($deebb28bbaed009d$var$tmpPixel, data[i * 4 + 0] / 255, data[i * 4 + 1] / 255, data[i * 4 + 2] / 255, data[i * 4 + 3] / 255);\n $deebb28bbaed009d$var$applyToPixel($deebb28bbaed009d$var$tmpPixel, effect, $deebb28bbaed009d$var$tmpPixel);\n data[i * 4 + 0] = $deebb28bbaed009d$var$tmpPixel[0] * 255;\n data[i * 4 + 1] = $deebb28bbaed009d$var$tmpPixel[1] * 255;\n data[i * 4 + 2] = $deebb28bbaed009d$var$tmpPixel[2] * 255;\n data[i * 4 + 3] = $deebb28bbaed009d$var$tmpPixel[3] * 255;\n }\n}\nmodule.exports = {\n identity: $deebb28bbaed009d$var$identity,\n applyToPixel: $deebb28bbaed009d$var$applyToPixel,\n applyToImageData: $deebb28bbaed009d$var$applyToImageData\n};\n\n});\n\nparcelRegister(\"eoK70\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n\nvar $9eJDl = parcelRequire(\"9eJDl\");\nvar $a7b71372e62ccc29$var$defaultSpeed = 0.1;\nvar $a7b71372e62ccc29$var$defaultAccel = 0.01;\nvar $a7b71372e62ccc29$var$defaultOptions = {\n yawSpeed: $a7b71372e62ccc29$var$defaultSpeed,\n pitchSpeed: $a7b71372e62ccc29$var$defaultSpeed,\n fovSpeed: $a7b71372e62ccc29$var$defaultSpeed,\n yawAccel: $a7b71372e62ccc29$var$defaultAccel,\n pitchAccel: $a7b71372e62ccc29$var$defaultAccel,\n fovAccel: $a7b71372e62ccc29$var$defaultAccel,\n targetPitch: 0,\n targetFov: null\n};\n/**\n * @param {Object} opts\n * @param {Number} [opts.yawSpeed=0.1] Yaw maximum speed\n * @param {Number} [opts.pitchSpeed=0.1] Pitch maximum speed\n * @param {Number} [opts.fovSpeed=0.1] Fov maximum speed\n * @param {Number} [opts.yawAccel=0.01] Yaw acceleration\n * @param {Number} [opts.pitchAccel=0.01] Pitch acceleration\n * @param {Number} [opts.fovAccel=0.01] Fov acceleration\n * @param {Number} [opts.targetPitch=0] Value that pitch converges to. `null` means that the pitch will not change.\n * @param {Number} [opts.targetFov=null] Value that fov converges to. `null` means that the fov will not change.\n * @returns Movement function that can be passed to {@link Viewer#setIdleMovement} or {@link Scene#startMovement}\n*/ function $a7b71372e62ccc29$var$autorotate(opts) {\n opts = $9eJDl(opts || {}, $a7b71372e62ccc29$var$defaultOptions);\n var yawSpeed = opts.yawSpeed;\n var pitchSpeed = opts.pitchSpeed;\n var fovSpeed = opts.fovSpeed;\n var yawAccel = opts.yawAccel;\n var pitchAccel = opts.pitchAccel;\n var fovAccel = opts.fovAccel;\n var targetPitch = opts.targetPitch;\n var targetFov = opts.targetFov;\n return function start() {\n var lastTime = 0;\n var lastYawSpeed = 0;\n var lastPitchSpeed = 0;\n var lastFovSpeed = 0;\n var currentYawSpeed = 0;\n var currentPitchSpeed = 0;\n var currentFovSpeed = 0;\n var timeDelta;\n var yawDelta;\n var pitchDelta;\n var fovDelta;\n return function step(params, currentTime) {\n timeDelta = (currentTime - lastTime) / 1000;\n currentYawSpeed = Math.min(lastYawSpeed + timeDelta * yawAccel, yawSpeed);\n yawDelta = currentYawSpeed * timeDelta;\n params.yaw = params.yaw + yawDelta;\n if (targetPitch != null && params.pitch !== targetPitch) {\n var pitchThresh = 0.5 * lastPitchSpeed * lastPitchSpeed / pitchAccel;\n if (Math.abs(targetPitch - params.pitch) > pitchThresh) // Acceleration phase\n currentPitchSpeed = Math.min(lastPitchSpeed + timeDelta * pitchAccel, pitchSpeed);\n else // Deceleration phase\n currentPitchSpeed = Math.max(lastPitchSpeed - timeDelta * pitchAccel, 0);\n // currentPitchSpeed is the absolute value (>= 0)\n pitchDelta = currentPitchSpeed * timeDelta;\n if (targetPitch < params.pitch) params.pitch = Math.max(targetPitch, params.pitch - pitchDelta);\n if (targetPitch > params.pitch) params.pitch = Math.min(targetPitch, params.pitch + pitchDelta);\n }\n if (targetFov != null && params.fov !== targetPitch) {\n var fovThresh = 0.5 * lastFovSpeed * lastFovSpeed / fovAccel;\n if (Math.abs(targetFov - params.fov) > fovThresh) // Acceleration phase\n currentFovSpeed = Math.min(lastFovSpeed + timeDelta * fovAccel, fovSpeed);\n else // Deceleration phase\n currentFovSpeed = Math.max(lastFovSpeed - timeDelta * fovAccel, 0);\n // currentFovSpeed is the absolute value (>= 0)\n fovDelta = currentFovSpeed * timeDelta;\n if (targetFov < params.fov) params.fov = Math.max(targetFov, params.fov - fovDelta);\n if (targetFov > params.fov) params.fov = Math.min(targetFov, params.fov + fovDelta);\n }\n lastTime = currentTime;\n lastYawSpeed = currentYawSpeed;\n lastPitchSpeed = currentPitchSpeed;\n lastFovSpeed = currentFovSpeed;\n return params;\n };\n };\n}\nmodule.exports = $a7b71372e62ccc29$var$autorotate;\n\n});\n\nparcelRegister(\"82Ddh\", function(module, exports) {\n/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \"use strict\";\n/**\n * @memberof util\n * @param {number} deg\n * @return {number}\n */ function $5daced8ae2d4e021$var$degToRad(deg) {\n return deg * Math.PI / 180;\n}\nmodule.exports = $5daced8ae2d4e021$var$degToRad;\n\n});\n\nparcelRegister(\"d1IHX\", function(module, exports) {\n\n$parcel$export(module.exports, \"glMatrix\", function () { return (parcelRequire(\"rqjzO\")); });\n$parcel$export(module.exports, \"mat2\", function () { return (parcelRequire(\"fuSIX\")); });\n$parcel$export(module.exports, \"mat2d\", function () { return (parcelRequire(\"kERd8\")); });\n$parcel$export(module.exports, \"mat3\", function () { return (parcelRequire(\"67rGA\")); });\n$parcel$export(module.exports, \"mat4\", function () { return (parcelRequire(\"c3mW8\")); });\n$parcel$export(module.exports, \"quat\", function () { return (parcelRequire(\"f8Ox0\")); });\n$parcel$export(module.exports, \"quat2\", function () { return (parcelRequire(\"89cfF\")); });\n$parcel$export(module.exports, \"vec2\", function () { return (parcelRequire(\"5VJvE\")); });\n$parcel$export(module.exports, \"vec3\", function () { return (parcelRequire(\"fwwPx\")); });\n$parcel$export(module.exports, \"vec4\", function () { return (parcelRequire(\"8QvoZ\")); });\n\nvar $rqjzO = parcelRequire(\"rqjzO\");\n\nvar $fuSIX = parcelRequire(\"fuSIX\");\n\nvar $kERd8 = parcelRequire(\"kERd8\");\n\nvar $67rGA = parcelRequire(\"67rGA\");\n\nvar $c3mW8 = parcelRequire(\"c3mW8\");\n\nvar $f8Ox0 = parcelRequire(\"f8Ox0\");\n\nvar $89cfF = parcelRequire(\"89cfF\");\n\nvar $5VJvE = parcelRequire(\"5VJvE\");\n\nvar $fwwPx = parcelRequire(\"fwwPx\");\n\nvar $8QvoZ = parcelRequire(\"8QvoZ\");\n\n});\nparcelRegister(\"fuSIX\", function(module, exports) {\n\n$parcel$export(module.exports, \"create\", function () { return $b4841b6800dd1e2b$export$185802fd694ee1f5; });\n$parcel$export(module.exports, \"clone\", function () { return $b4841b6800dd1e2b$export$9cd59f9826255e47; });\n$parcel$export(module.exports, \"copy\", function () { return $b4841b6800dd1e2b$export$784d13d8ee351f07; });\n$parcel$export(module.exports, \"identity\", function () { return $b4841b6800dd1e2b$export$f0954fd7d5368655; });\n$parcel$export(module.exports, \"fromValues\", function () { return $b4841b6800dd1e2b$export$a82be99ed2a44a7d; });\n$parcel$export(module.exports, \"set\", function () { return $b4841b6800dd1e2b$export$adaa4cf7ef1b65be; });\n$parcel$export(module.exports, \"transpose\", function () { return $b4841b6800dd1e2b$export$9cb09a71b7d66923; });\n$parcel$export(module.exports, \"invert\", function () { return $b4841b6800dd1e2b$export$6897c284b6f9f4dc; });\n$parcel$export(module.exports, \"adjoint\", function () { return $b4841b6800dd1e2b$export$33f3c024b4ae00a1; });\n$parcel$export(module.exports, \"determinant\", function () { return $b4841b6800dd1e2b$export$a04698f914c55ed9; });\n$parcel$export(module.exports, \"multiply\", function () { return $b4841b6800dd1e2b$export$2060d2db72cce88f; });\n$parcel$export(module.exports, \"rotate\", function () { return $b4841b6800dd1e2b$export$bb628a54ab399bc9; });\n$parcel$export(module.exports, \"scale\", function () { return $b4841b6800dd1e2b$export$dcdf75081b88279d; });\n$parcel$export(module.exports, \"fromRotation\", function () { return $b4841b6800dd1e2b$export$926fc125ff3c666c; });\n$parcel$export(module.exports, \"fromScaling\", function () { return $b4841b6800dd1e2b$export$832ca188ffb1955d; });\n$parcel$export(module.exports, \"str\", function () { return $b4841b6800dd1e2b$export$42d51816ce590c93; });\n$parcel$export(module.exports, \"frob\", function () { return $b4841b6800dd1e2b$export$326827e8268e9cdb; });\n$parcel$export(module.exports, \"LDU\", function () { return $b4841b6800dd1e2b$export$c7126d0da24b9100; });\n$parcel$export(module.exports, \"add\", function () { return $b4841b6800dd1e2b$export$e16d8520af44a096; });\n$parcel$export(module.exports, \"subtract\", function () { return $b4841b6800dd1e2b$export$4e2d2ead65e5f7e3; });\n$parcel$export(module.exports, \"exactEquals\", function () { return $b4841b6800dd1e2b$export$f2599a5cf1109d8; });\n$parcel$export(module.exports, \"equals\", function () { return $b4841b6800dd1e2b$export$e9bab7fafb253603; });\n$parcel$export(module.exports, \"multiplyScalar\", function () { return $b4841b6800dd1e2b$export$c697bed75648cdb7; });\n$parcel$export(module.exports, \"multiplyScalarAndAdd\", function () { return $b4841b6800dd1e2b$export$553579f63bdd7137; });\n$parcel$export(module.exports, \"mul\", function () { return $b4841b6800dd1e2b$export$6e3a27864ab166fe; });\n$parcel$export(module.exports, \"sub\", function () { return $b4841b6800dd1e2b$export$f93b5905241a7cca; });\n\nvar $rqjzO = parcelRequire(\"rqjzO\");\nfunction $b4841b6800dd1e2b$export$185802fd694ee1f5() {\n var out = new $rqjzO.ARRAY_TYPE(4);\n if ($rqjzO.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n }\n out[0] = 1;\n out[3] = 1;\n return out;\n}\nfunction $b4841b6800dd1e2b$export$9cd59f9826255e47(a) {\n var out = new $rqjzO.ARRAY_TYPE(4);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\nfunction $b4841b6800dd1e2b$export$784d13d8ee351f07(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\nfunction $b4841b6800dd1e2b$export$f0954fd7d5368655(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n}\nfunction $b4841b6800dd1e2b$export$a82be99ed2a44a7d(m00, m01, m10, m11) {\n var out = new $rqjzO.ARRAY_TYPE(4);\n out[0] = m00;\n out[1] = m01;\n out[2] = m10;\n out[3] = m11;\n return out;\n}\nfunction $b4841b6800dd1e2b$export$adaa4cf7ef1b65be(out, m00, m01, m10, m11) {\n out[0] = m00;\n out[1] = m01;\n out[2] = m10;\n out[3] = m11;\n return out;\n}\nfunction $b4841b6800dd1e2b$export$9cb09a71b7d66923(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache\n // some values\n if (out === a) {\n var a1 = a[1];\n out[1] = a[2];\n out[2] = a1;\n } else {\n out[0] = a[0];\n out[1] = a[2];\n out[2] = a[1];\n out[3] = a[3];\n }\n return out;\n}\nfunction $b4841b6800dd1e2b$export$6897c284b6f9f4dc(out, a) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3]; // Calculate the determinant\n var det = a0 * a3 - a2 * a1;\n if (!det) return null;\n det = 1.0 / det;\n out[0] = a3 * det;\n out[1] = -a1 * det;\n out[2] = -a2 * det;\n out[3] = a0 * det;\n return out;\n}\nfunction $b4841b6800dd1e2b$export$33f3c024b4ae00a1(out, a) {\n // Caching this value is nessecary if out == a\n var a0 = a[0];\n out[0] = a[3];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = a0;\n return out;\n}\nfunction $b4841b6800dd1e2b$export$a04698f914c55ed9(a) {\n return a[0] * a[3] - a[2] * a[1];\n}\nfunction $b4841b6800dd1e2b$export$2060d2db72cce88f(out, a, b) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3];\n var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3];\n out[0] = a0 * b0 + a2 * b1;\n out[1] = a1 * b0 + a3 * b1;\n out[2] = a0 * b2 + a2 * b3;\n out[3] = a1 * b2 + a3 * b3;\n return out;\n}\nfunction $b4841b6800dd1e2b$export$bb628a54ab399bc9(out, a, rad) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3];\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n out[0] = a0 * c + a2 * s;\n out[1] = a1 * c + a3 * s;\n out[2] = a0 * -s + a2 * c;\n out[3] = a1 * -s + a3 * c;\n return out;\n}\nfunction $b4841b6800dd1e2b$export$dcdf75081b88279d(out, a, v) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3];\n var v0 = v[0], v1 = v[1];\n out[0] = a0 * v0;\n out[1] = a1 * v0;\n out[2] = a2 * v1;\n out[3] = a3 * v1;\n return out;\n}\nfunction $b4841b6800dd1e2b$export$926fc125ff3c666c(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n out[0] = c;\n out[1] = s;\n out[2] = -s;\n out[3] = c;\n return out;\n}\nfunction $b4841b6800dd1e2b$export$832ca188ffb1955d(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = v[1];\n return out;\n}\nfunction $b4841b6800dd1e2b$export$42d51816ce590c93(a) {\n return \"mat2(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \")\";\n}\nfunction $b4841b6800dd1e2b$export$326827e8268e9cdb(a) {\n return Math.hypot(a[0], a[1], a[2], a[3]);\n}\nfunction $b4841b6800dd1e2b$export$c7126d0da24b9100(L, D, U, a) {\n L[2] = a[2] / a[0];\n U[0] = a[0];\n U[1] = a[1];\n U[3] = a[3] - L[2] * U[1];\n return [\n L,\n D,\n U\n ];\n}\nfunction $b4841b6800dd1e2b$export$e16d8520af44a096(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n return out;\n}\nfunction $b4841b6800dd1e2b$export$4e2d2ead65e5f7e3(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n return out;\n}\nfunction $b4841b6800dd1e2b$export$f2599a5cf1109d8(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3];\n}\nfunction $b4841b6800dd1e2b$export$e9bab7fafb253603(a, b) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3];\n var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3];\n return Math.abs(a0 - b0) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3));\n}\nfunction $b4841b6800dd1e2b$export$c697bed75648cdb7(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n return out;\n}\nfunction $b4841b6800dd1e2b$export$553579f63bdd7137(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n return out;\n}\nvar $b4841b6800dd1e2b$export$6e3a27864ab166fe = $b4841b6800dd1e2b$export$2060d2db72cce88f;\nvar $b4841b6800dd1e2b$export$f93b5905241a7cca = $b4841b6800dd1e2b$export$4e2d2ead65e5f7e3;\n\n});\n\nparcelRegister(\"kERd8\", function(module, exports) {\n\n$parcel$export(module.exports, \"create\", function () { return $f0a0d1a73421ff92$export$185802fd694ee1f5; });\n$parcel$export(module.exports, \"clone\", function () { return $f0a0d1a73421ff92$export$9cd59f9826255e47; });\n$parcel$export(module.exports, \"copy\", function () { return $f0a0d1a73421ff92$export$784d13d8ee351f07; });\n$parcel$export(module.exports, \"identity\", function () { return $f0a0d1a73421ff92$export$f0954fd7d5368655; });\n$parcel$export(module.exports, \"fromValues\", function () { return $f0a0d1a73421ff92$export$a82be99ed2a44a7d; });\n$parcel$export(module.exports, \"set\", function () { return $f0a0d1a73421ff92$export$adaa4cf7ef1b65be; });\n$parcel$export(module.exports, \"invert\", function () { return $f0a0d1a73421ff92$export$6897c284b6f9f4dc; });\n$parcel$export(module.exports, \"determinant\", function () { return $f0a0d1a73421ff92$export$a04698f914c55ed9; });\n$parcel$export(module.exports, \"multiply\", function () { return $f0a0d1a73421ff92$export$2060d2db72cce88f; });\n$parcel$export(module.exports, \"rotate\", function () { return $f0a0d1a73421ff92$export$bb628a54ab399bc9; });\n$parcel$export(module.exports, \"scale\", function () { return $f0a0d1a73421ff92$export$dcdf75081b88279d; });\n$parcel$export(module.exports, \"translate\", function () { return $f0a0d1a73421ff92$export$d73ee8ef04f5226a; });\n$parcel$export(module.exports, \"fromRotation\", function () { return $f0a0d1a73421ff92$export$926fc125ff3c666c; });\n$parcel$export(module.exports, \"fromScaling\", function () { return $f0a0d1a73421ff92$export$832ca188ffb1955d; });\n$parcel$export(module.exports, \"fromTranslation\", function () { return $f0a0d1a73421ff92$export$bc9e79e74e9fddf6; });\n$parcel$export(module.exports, \"str\", function () { return $f0a0d1a73421ff92$export$42d51816ce590c93; });\n$parcel$export(module.exports, \"frob\", function () { return $f0a0d1a73421ff92$export$326827e8268e9cdb; });\n$parcel$export(module.exports, \"add\", function () { return $f0a0d1a73421ff92$export$e16d8520af44a096; });\n$parcel$export(module.exports, \"subtract\", function () { return $f0a0d1a73421ff92$export$4e2d2ead65e5f7e3; });\n$parcel$export(module.exports, \"multiplyScalar\", function () { return $f0a0d1a73421ff92$export$c697bed75648cdb7; });\n$parcel$export(module.exports, \"multiplyScalarAndAdd\", function () { return $f0a0d1a73421ff92$export$553579f63bdd7137; });\n$parcel$export(module.exports, \"exactEquals\", function () { return $f0a0d1a73421ff92$export$f2599a5cf1109d8; });\n$parcel$export(module.exports, \"equals\", function () { return $f0a0d1a73421ff92$export$e9bab7fafb253603; });\n$parcel$export(module.exports, \"mul\", function () { return $f0a0d1a73421ff92$export$6e3a27864ab166fe; });\n$parcel$export(module.exports, \"sub\", function () { return $f0a0d1a73421ff92$export$f93b5905241a7cca; });\n\nvar $rqjzO = parcelRequire(\"rqjzO\");\nfunction $f0a0d1a73421ff92$export$185802fd694ee1f5() {\n var out = new $rqjzO.ARRAY_TYPE(6);\n if ($rqjzO.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n out[4] = 0;\n out[5] = 0;\n }\n out[0] = 1;\n out[3] = 1;\n return out;\n}\nfunction $f0a0d1a73421ff92$export$9cd59f9826255e47(a) {\n var out = new $rqjzO.ARRAY_TYPE(6);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n return out;\n}\nfunction $f0a0d1a73421ff92$export$784d13d8ee351f07(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n return out;\n}\nfunction $f0a0d1a73421ff92$export$f0954fd7d5368655(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = 0;\n out[5] = 0;\n return out;\n}\nfunction $f0a0d1a73421ff92$export$a82be99ed2a44a7d(a, b, c, d, tx, ty) {\n var out = new $rqjzO.ARRAY_TYPE(6);\n out[0] = a;\n out[1] = b;\n out[2] = c;\n out[3] = d;\n out[4] = tx;\n out[5] = ty;\n return out;\n}\nfunction $f0a0d1a73421ff92$export$adaa4cf7ef1b65be(out, a, b, c, d, tx, ty) {\n out[0] = a;\n out[1] = b;\n out[2] = c;\n out[3] = d;\n out[4] = tx;\n out[5] = ty;\n return out;\n}\nfunction $f0a0d1a73421ff92$export$6897c284b6f9f4dc(out, a) {\n var aa = a[0], ab = a[1], ac = a[2], ad = a[3];\n var atx = a[4], aty = a[5];\n var det = aa * ad - ab * ac;\n if (!det) return null;\n det = 1.0 / det;\n out[0] = ad * det;\n out[1] = -ab * det;\n out[2] = -ac * det;\n out[3] = aa * det;\n out[4] = (ac * aty - ad * atx) * det;\n out[5] = (ab * atx - aa * aty) * det;\n return out;\n}\nfunction $f0a0d1a73421ff92$export$a04698f914c55ed9(a) {\n return a[0] * a[3] - a[1] * a[2];\n}\nfunction $f0a0d1a73421ff92$export$2060d2db72cce88f(out, a, b) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5];\n var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5];\n out[0] = a0 * b0 + a2 * b1;\n out[1] = a1 * b0 + a3 * b1;\n out[2] = a0 * b2 + a2 * b3;\n out[3] = a1 * b2 + a3 * b3;\n out[4] = a0 * b4 + a2 * b5 + a4;\n out[5] = a1 * b4 + a3 * b5 + a5;\n return out;\n}\nfunction $f0a0d1a73421ff92$export$bb628a54ab399bc9(out, a, rad) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5];\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n out[0] = a0 * c + a2 * s;\n out[1] = a1 * c + a3 * s;\n out[2] = a0 * -s + a2 * c;\n out[3] = a1 * -s + a3 * c;\n out[4] = a4;\n out[5] = a5;\n return out;\n}\nfunction $f0a0d1a73421ff92$export$dcdf75081b88279d(out, a, v) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5];\n var v0 = v[0], v1 = v[1];\n out[0] = a0 * v0;\n out[1] = a1 * v0;\n out[2] = a2 * v1;\n out[3] = a3 * v1;\n out[4] = a4;\n out[5] = a5;\n return out;\n}\nfunction $f0a0d1a73421ff92$export$d73ee8ef04f5226a(out, a, v) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5];\n var v0 = v[0], v1 = v[1];\n out[0] = a0;\n out[1] = a1;\n out[2] = a2;\n out[3] = a3;\n out[4] = a0 * v0 + a2 * v1 + a4;\n out[5] = a1 * v0 + a3 * v1 + a5;\n return out;\n}\nfunction $f0a0d1a73421ff92$export$926fc125ff3c666c(out, rad) {\n var s = Math.sin(rad), c = Math.cos(rad);\n out[0] = c;\n out[1] = s;\n out[2] = -s;\n out[3] = c;\n out[4] = 0;\n out[5] = 0;\n return out;\n}\nfunction $f0a0d1a73421ff92$export$832ca188ffb1955d(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = v[1];\n out[4] = 0;\n out[5] = 0;\n return out;\n}\nfunction $f0a0d1a73421ff92$export$bc9e79e74e9fddf6(out, v) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = v[0];\n out[5] = v[1];\n return out;\n}\nfunction $f0a0d1a73421ff92$export$42d51816ce590c93(a) {\n return \"mat2d(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \")\";\n}\nfunction $f0a0d1a73421ff92$export$326827e8268e9cdb(a) {\n return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], 1);\n}\nfunction $f0a0d1a73421ff92$export$e16d8520af44a096(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n return out;\n}\nfunction $f0a0d1a73421ff92$export$4e2d2ead65e5f7e3(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n out[4] = a[4] - b[4];\n out[5] = a[5] - b[5];\n return out;\n}\nfunction $f0a0d1a73421ff92$export$c697bed75648cdb7(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n return out;\n}\nfunction $f0a0d1a73421ff92$export$553579f63bdd7137(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n out[4] = a[4] + b[4] * scale;\n out[5] = a[5] + b[5] * scale;\n return out;\n}\nfunction $f0a0d1a73421ff92$export$f2599a5cf1109d8(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5];\n}\nfunction $f0a0d1a73421ff92$export$e9bab7fafb253603(a, b) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5];\n var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5];\n return Math.abs(a0 - b0) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5));\n}\nvar $f0a0d1a73421ff92$export$6e3a27864ab166fe = $f0a0d1a73421ff92$export$2060d2db72cce88f;\nvar $f0a0d1a73421ff92$export$f93b5905241a7cca = $f0a0d1a73421ff92$export$4e2d2ead65e5f7e3;\n\n});\n\nparcelRegister(\"67rGA\", function(module, exports) {\n\n$parcel$export(module.exports, \"create\", function () { return $4748df579585fbcb$export$185802fd694ee1f5; });\n$parcel$export(module.exports, \"fromMat4\", function () { return $4748df579585fbcb$export$b4ad467060d346fe; });\n$parcel$export(module.exports, \"clone\", function () { return $4748df579585fbcb$export$9cd59f9826255e47; });\n$parcel$export(module.exports, \"copy\", function () { return $4748df579585fbcb$export$784d13d8ee351f07; });\n$parcel$export(module.exports, \"fromValues\", function () { return $4748df579585fbcb$export$a82be99ed2a44a7d; });\n$parcel$export(module.exports, \"set\", function () { return $4748df579585fbcb$export$adaa4cf7ef1b65be; });\n$parcel$export(module.exports, \"identity\", function () { return $4748df579585fbcb$export$f0954fd7d5368655; });\n$parcel$export(module.exports, \"transpose\", function () { return $4748df579585fbcb$export$9cb09a71b7d66923; });\n$parcel$export(module.exports, \"invert\", function () { return $4748df579585fbcb$export$6897c284b6f9f4dc; });\n$parcel$export(module.exports, \"adjoint\", function () { return $4748df579585fbcb$export$33f3c024b4ae00a1; });\n$parcel$export(module.exports, \"determinant\", function () { return $4748df579585fbcb$export$a04698f914c55ed9; });\n$parcel$export(module.exports, \"multiply\", function () { return $4748df579585fbcb$export$2060d2db72cce88f; });\n$parcel$export(module.exports, \"translate\", function () { return $4748df579585fbcb$export$d73ee8ef04f5226a; });\n$parcel$export(module.exports, \"rotate\", function () { return $4748df579585fbcb$export$bb628a54ab399bc9; });\n$parcel$export(module.exports, \"scale\", function () { return $4748df579585fbcb$export$dcdf75081b88279d; });\n$parcel$export(module.exports, \"fromTranslation\", function () { return $4748df579585fbcb$export$bc9e79e74e9fddf6; });\n$parcel$export(module.exports, \"fromRotation\", function () { return $4748df579585fbcb$export$926fc125ff3c666c; });\n$parcel$export(module.exports, \"fromScaling\", function () { return $4748df579585fbcb$export$832ca188ffb1955d; });\n$parcel$export(module.exports, \"fromMat2d\", function () { return $4748df579585fbcb$export$68f5977575fae9bf; });\n$parcel$export(module.exports, \"fromQuat\", function () { return $4748df579585fbcb$export$2ff2bbe382249af7; });\n$parcel$export(module.exports, \"normalFromMat4\", function () { return $4748df579585fbcb$export$966b25ab6dc1b1f9; });\n$parcel$export(module.exports, \"projection\", function () { return $4748df579585fbcb$export$b74061472fe7c07; });\n$parcel$export(module.exports, \"str\", function () { return $4748df579585fbcb$export$42d51816ce590c93; });\n$parcel$export(module.exports, \"frob\", function () { return $4748df579585fbcb$export$326827e8268e9cdb; });\n$parcel$export(module.exports, \"add\", function () { return $4748df579585fbcb$export$e16d8520af44a096; });\n$parcel$export(module.exports, \"subtract\", function () { return $4748df579585fbcb$export$4e2d2ead65e5f7e3; });\n$parcel$export(module.exports, \"multiplyScalar\", function () { return $4748df579585fbcb$export$c697bed75648cdb7; });\n$parcel$export(module.exports, \"multiplyScalarAndAdd\", function () { return $4748df579585fbcb$export$553579f63bdd7137; });\n$parcel$export(module.exports, \"exactEquals\", function () { return $4748df579585fbcb$export$f2599a5cf1109d8; });\n$parcel$export(module.exports, \"equals\", function () { return $4748df579585fbcb$export$e9bab7fafb253603; });\n$parcel$export(module.exports, \"mul\", function () { return $4748df579585fbcb$export$6e3a27864ab166fe; });\n$parcel$export(module.exports, \"sub\", function () { return $4748df579585fbcb$export$f93b5905241a7cca; });\n\nvar $rqjzO = parcelRequire(\"rqjzO\");\nfunction $4748df579585fbcb$export$185802fd694ee1f5() {\n var out = new $rqjzO.ARRAY_TYPE(9);\n if ($rqjzO.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n }\n out[0] = 1;\n out[4] = 1;\n out[8] = 1;\n return out;\n}\nfunction $4748df579585fbcb$export$b4ad467060d346fe(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[4];\n out[4] = a[5];\n out[5] = a[6];\n out[6] = a[8];\n out[7] = a[9];\n out[8] = a[10];\n return out;\n}\nfunction $4748df579585fbcb$export$9cd59f9826255e47(a) {\n var out = new $rqjzO.ARRAY_TYPE(9);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n}\nfunction $4748df579585fbcb$export$784d13d8ee351f07(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n}\nfunction $4748df579585fbcb$export$a82be99ed2a44a7d(m00, m01, m02, m10, m11, m12, m20, m21, m22) {\n var out = new $rqjzO.ARRAY_TYPE(9);\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m10;\n out[4] = m11;\n out[5] = m12;\n out[6] = m20;\n out[7] = m21;\n out[8] = m22;\n return out;\n}\nfunction $4748df579585fbcb$export$adaa4cf7ef1b65be(out, m00, m01, m02, m10, m11, m12, m20, m21, m22) {\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m10;\n out[4] = m11;\n out[5] = m12;\n out[6] = m20;\n out[7] = m21;\n out[8] = m22;\n return out;\n}\nfunction $4748df579585fbcb$export$f0954fd7d5368655(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 1;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n}\nfunction $4748df579585fbcb$export$9cb09a71b7d66923(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n var a01 = a[1], a02 = a[2], a12 = a[5];\n out[1] = a[3];\n out[2] = a[6];\n out[3] = a01;\n out[5] = a[7];\n out[6] = a02;\n out[7] = a12;\n } else {\n out[0] = a[0];\n out[1] = a[3];\n out[2] = a[6];\n out[3] = a[1];\n out[4] = a[4];\n out[5] = a[7];\n out[6] = a[2];\n out[7] = a[5];\n out[8] = a[8];\n }\n return out;\n}\nfunction $4748df579585fbcb$export$6897c284b6f9f4dc(out, a) {\n var a00 = a[0], a01 = a[1], a02 = a[2];\n var a10 = a[3], a11 = a[4], a12 = a[5];\n var a20 = a[6], a21 = a[7], a22 = a[8];\n var b01 = a22 * a11 - a12 * a21;\n var b11 = -a22 * a10 + a12 * a20;\n var b21 = a21 * a10 - a11 * a20; // Calculate the determinant\n var det = a00 * b01 + a01 * b11 + a02 * b21;\n if (!det) return null;\n det = 1.0 / det;\n out[0] = b01 * det;\n out[1] = (-a22 * a01 + a02 * a21) * det;\n out[2] = (a12 * a01 - a02 * a11) * det;\n out[3] = b11 * det;\n out[4] = (a22 * a00 - a02 * a20) * det;\n out[5] = (-a12 * a00 + a02 * a10) * det;\n out[6] = b21 * det;\n out[7] = (-a21 * a00 + a01 * a20) * det;\n out[8] = (a11 * a00 - a01 * a10) * det;\n return out;\n}\nfunction $4748df579585fbcb$export$33f3c024b4ae00a1(out, a) {\n var a00 = a[0], a01 = a[1], a02 = a[2];\n var a10 = a[3], a11 = a[4], a12 = a[5];\n var a20 = a[6], a21 = a[7], a22 = a[8];\n out[0] = a11 * a22 - a12 * a21;\n out[1] = a02 * a21 - a01 * a22;\n out[2] = a01 * a12 - a02 * a11;\n out[3] = a12 * a20 - a10 * a22;\n out[4] = a00 * a22 - a02 * a20;\n out[5] = a02 * a10 - a00 * a12;\n out[6] = a10 * a21 - a11 * a20;\n out[7] = a01 * a20 - a00 * a21;\n out[8] = a00 * a11 - a01 * a10;\n return out;\n}\nfunction $4748df579585fbcb$export$a04698f914c55ed9(a) {\n var a00 = a[0], a01 = a[1], a02 = a[2];\n var a10 = a[3], a11 = a[4], a12 = a[5];\n var a20 = a[6], a21 = a[7], a22 = a[8];\n return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\n}\nfunction $4748df579585fbcb$export$2060d2db72cce88f(out, a, b) {\n var a00 = a[0], a01 = a[1], a02 = a[2];\n var a10 = a[3], a11 = a[4], a12 = a[5];\n var a20 = a[6], a21 = a[7], a22 = a[8];\n var b00 = b[0], b01 = b[1], b02 = b[2];\n var b10 = b[3], b11 = b[4], b12 = b[5];\n var b20 = b[6], b21 = b[7], b22 = b[8];\n out[0] = b00 * a00 + b01 * a10 + b02 * a20;\n out[1] = b00 * a01 + b01 * a11 + b02 * a21;\n out[2] = b00 * a02 + b01 * a12 + b02 * a22;\n out[3] = b10 * a00 + b11 * a10 + b12 * a20;\n out[4] = b10 * a01 + b11 * a11 + b12 * a21;\n out[5] = b10 * a02 + b11 * a12 + b12 * a22;\n out[6] = b20 * a00 + b21 * a10 + b22 * a20;\n out[7] = b20 * a01 + b21 * a11 + b22 * a21;\n out[8] = b20 * a02 + b21 * a12 + b22 * a22;\n return out;\n}\nfunction $4748df579585fbcb$export$d73ee8ef04f5226a(out, a, v) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a10 = a[3], a11 = a[4], a12 = a[5], a20 = a[6], a21 = a[7], a22 = a[8], x = v[0], y = v[1];\n out[0] = a00;\n out[1] = a01;\n out[2] = a02;\n out[3] = a10;\n out[4] = a11;\n out[5] = a12;\n out[6] = x * a00 + y * a10 + a20;\n out[7] = x * a01 + y * a11 + a21;\n out[8] = x * a02 + y * a12 + a22;\n return out;\n}\nfunction $4748df579585fbcb$export$bb628a54ab399bc9(out, a, rad) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a10 = a[3], a11 = a[4], a12 = a[5], a20 = a[6], a21 = a[7], a22 = a[8], s = Math.sin(rad), c = Math.cos(rad);\n out[0] = c * a00 + s * a10;\n out[1] = c * a01 + s * a11;\n out[2] = c * a02 + s * a12;\n out[3] = c * a10 - s * a00;\n out[4] = c * a11 - s * a01;\n out[5] = c * a12 - s * a02;\n out[6] = a20;\n out[7] = a21;\n out[8] = a22;\n return out;\n}\nfunction $4748df579585fbcb$export$dcdf75081b88279d(out, a, v) {\n var x = v[0], y = v[1];\n out[0] = x * a[0];\n out[1] = x * a[1];\n out[2] = x * a[2];\n out[3] = y * a[3];\n out[4] = y * a[4];\n out[5] = y * a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n}\nfunction $4748df579585fbcb$export$bc9e79e74e9fddf6(out, v) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 1;\n out[5] = 0;\n out[6] = v[0];\n out[7] = v[1];\n out[8] = 1;\n return out;\n}\nfunction $4748df579585fbcb$export$926fc125ff3c666c(out, rad) {\n var s = Math.sin(rad), c = Math.cos(rad);\n out[0] = c;\n out[1] = s;\n out[2] = 0;\n out[3] = -s;\n out[4] = c;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n}\nfunction $4748df579585fbcb$export$832ca188ffb1955d(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = v[1];\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n}\nfunction $4748df579585fbcb$export$68f5977575fae9bf(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = 0;\n out[3] = a[2];\n out[4] = a[3];\n out[5] = 0;\n out[6] = a[4];\n out[7] = a[5];\n out[8] = 1;\n return out;\n}\nfunction $4748df579585fbcb$export$2ff2bbe382249af7(out, q) {\n var x = q[0], y = q[1], z = q[2], w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var yx = y * x2;\n var yy = y * y2;\n var zx = z * x2;\n var zy = z * y2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - yy - zz;\n out[3] = yx - wz;\n out[6] = zx + wy;\n out[1] = yx + wz;\n out[4] = 1 - xx - zz;\n out[7] = zy - wx;\n out[2] = zx - wy;\n out[5] = zy + wx;\n out[8] = 1 - xx - yy;\n return out;\n}\nfunction $4748df579585fbcb$export$966b25ab6dc1b1f9(out, a) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3];\n var a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7];\n var a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11];\n var a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n if (!det) return null;\n det = 1.0 / det;\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n return out;\n}\nfunction $4748df579585fbcb$export$b74061472fe7c07(out, width, height) {\n out[0] = 2 / width;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = -2 / height;\n out[5] = 0;\n out[6] = -1;\n out[7] = 1;\n out[8] = 1;\n return out;\n}\nfunction $4748df579585fbcb$export$42d51816ce590c93(a) {\n return \"mat3(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \", \" + a[6] + \", \" + a[7] + \", \" + a[8] + \")\";\n}\nfunction $4748df579585fbcb$export$326827e8268e9cdb(a) {\n return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]);\n}\nfunction $4748df579585fbcb$export$e16d8520af44a096(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n out[6] = a[6] + b[6];\n out[7] = a[7] + b[7];\n out[8] = a[8] + b[8];\n return out;\n}\nfunction $4748df579585fbcb$export$4e2d2ead65e5f7e3(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n out[4] = a[4] - b[4];\n out[5] = a[5] - b[5];\n out[6] = a[6] - b[6];\n out[7] = a[7] - b[7];\n out[8] = a[8] - b[8];\n return out;\n}\nfunction $4748df579585fbcb$export$c697bed75648cdb7(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n out[6] = a[6] * b;\n out[7] = a[7] * b;\n out[8] = a[8] * b;\n return out;\n}\nfunction $4748df579585fbcb$export$553579f63bdd7137(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n out[4] = a[4] + b[4] * scale;\n out[5] = a[5] + b[5] * scale;\n out[6] = a[6] + b[6] * scale;\n out[7] = a[7] + b[7] * scale;\n out[8] = a[8] + b[8] * scale;\n return out;\n}\nfunction $4748df579585fbcb$export$f2599a5cf1109d8(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8];\n}\nfunction $4748df579585fbcb$export$e9bab7fafb253603(a, b) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5], a6 = a[6], a7 = a[7], a8 = a[8];\n var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5], b6 = b[6], b7 = b[7], b8 = b[8];\n return Math.abs(a0 - b0) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a8), Math.abs(b8));\n}\nvar $4748df579585fbcb$export$6e3a27864ab166fe = $4748df579585fbcb$export$2060d2db72cce88f;\nvar $4748df579585fbcb$export$f93b5905241a7cca = $4748df579585fbcb$export$4e2d2ead65e5f7e3;\n\n});\n\nparcelRegister(\"f8Ox0\", function(module, exports) {\n\n$parcel$export(module.exports, \"create\", function () { return $b05eccd75d26bd5a$export$185802fd694ee1f5; });\n$parcel$export(module.exports, \"identity\", function () { return $b05eccd75d26bd5a$export$f0954fd7d5368655; });\n$parcel$export(module.exports, \"setAxisAngle\", function () { return $b05eccd75d26bd5a$export$4286ddefc8f49512; });\n$parcel$export(module.exports, \"getAxisAngle\", function () { return $b05eccd75d26bd5a$export$3f70be5e7d7dc51; });\n$parcel$export(module.exports, \"getAngle\", function () { return $b05eccd75d26bd5a$export$b363da9ded343252; });\n$parcel$export(module.exports, \"dot\", function () { return $b05eccd75d26bd5a$export$94132a0e348806d4; });\n$parcel$export(module.exports, \"multiply\", function () { return $b05eccd75d26bd5a$export$2060d2db72cce88f; });\n$parcel$export(module.exports, \"rotateX\", function () { return $b05eccd75d26bd5a$export$a59c8716592e09af; });\n$parcel$export(module.exports, \"rotateY\", function () { return $b05eccd75d26bd5a$export$cf71e4d4ca4d1cfd; });\n$parcel$export(module.exports, \"rotateZ\", function () { return $b05eccd75d26bd5a$export$ea6eae3365de5b9c; });\n$parcel$export(module.exports, \"calculateW\", function () { return $b05eccd75d26bd5a$export$fb72b72e8d764d4e; });\n$parcel$export(module.exports, \"exp\", function () { return $b05eccd75d26bd5a$export$b310ec824aaee37f; });\n$parcel$export(module.exports, \"ln\", function () { return $b05eccd75d26bd5a$export$876cb1b29620556f; });\n$parcel$export(module.exports, \"pow\", function () { return $b05eccd75d26bd5a$export$9c297f60e22e3389; });\n$parcel$export(module.exports, \"scale\", function () { return $b05eccd75d26bd5a$export$dcdf75081b88279d; });\n$parcel$export(module.exports, \"slerp\", function () { return $b05eccd75d26bd5a$export$1544d9bc2995de08; });\n$parcel$export(module.exports, \"random\", function () { return $b05eccd75d26bd5a$export$4385e60b38654f68; });\n$parcel$export(module.exports, \"invert\", function () { return $b05eccd75d26bd5a$export$6897c284b6f9f4dc; });\n$parcel$export(module.exports, \"conjugate\", function () { return $b05eccd75d26bd5a$export$7679f47e72c62560; });\n$parcel$export(module.exports, \"fromMat3\", function () { return $b05eccd75d26bd5a$export$272a1eb8e5a4b55b; });\n$parcel$export(module.exports, \"fromEuler\", function () { return $b05eccd75d26bd5a$export$7a404a587ea85af; });\n$parcel$export(module.exports, \"str\", function () { return $b05eccd75d26bd5a$export$42d51816ce590c93; });\n$parcel$export(module.exports, \"clone\", function () { return $b05eccd75d26bd5a$export$9cd59f9826255e47; });\n$parcel$export(module.exports, \"fromValues\", function () { return $b05eccd75d26bd5a$export$a82be99ed2a44a7d; });\n$parcel$export(module.exports, \"copy\", function () { return $b05eccd75d26bd5a$export$784d13d8ee351f07; });\n$parcel$export(module.exports, \"set\", function () { return $b05eccd75d26bd5a$export$adaa4cf7ef1b65be; });\n$parcel$export(module.exports, \"add\", function () { return $b05eccd75d26bd5a$export$e16d8520af44a096; });\n$parcel$export(module.exports, \"mul\", function () { return $b05eccd75d26bd5a$export$6e3a27864ab166fe; });\n$parcel$export(module.exports, \"lerp\", function () { return $b05eccd75d26bd5a$export$3a89f8d6f6bf6c9f; });\n$parcel$export(module.exports, \"length\", function () { return $b05eccd75d26bd5a$export$f24224f1c91d8156; });\n$parcel$export(module.exports, \"len\", function () { return $b05eccd75d26bd5a$export$fc1400facf92c78; });\n$parcel$export(module.exports, \"squaredLength\", function () { return $b05eccd75d26bd5a$export$ab44e1323ffc8376; });\n$parcel$export(module.exports, \"sqrLen\", function () { return $b05eccd75d26bd5a$export$99d8dd3f32a3435; });\n$parcel$export(module.exports, \"normalize\", function () { return $b05eccd75d26bd5a$export$a3295358bff77e; });\n$parcel$export(module.exports, \"exactEquals\", function () { return $b05eccd75d26bd5a$export$f2599a5cf1109d8; });\n$parcel$export(module.exports, \"equals\", function () { return $b05eccd75d26bd5a$export$e9bab7fafb253603; });\n$parcel$export(module.exports, \"rotationTo\", function () { return $b05eccd75d26bd5a$export$72d66f5842c00904; });\n$parcel$export(module.exports, \"sqlerp\", function () { return $b05eccd75d26bd5a$export$699b0866ca50f6cb; });\n$parcel$export(module.exports, \"setAxes\", function () { return $b05eccd75d26bd5a$export$937ca0a544b2d712; });\n\nvar $rqjzO = parcelRequire(\"rqjzO\");\n\nvar $67rGA = parcelRequire(\"67rGA\");\n\nvar $fwwPx = parcelRequire(\"fwwPx\");\n\nvar $8QvoZ = parcelRequire(\"8QvoZ\");\nfunction $b05eccd75d26bd5a$export$185802fd694ee1f5() {\n var out = new $rqjzO.ARRAY_TYPE(4);\n if ($rqjzO.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n }\n out[3] = 1;\n return out;\n}\nfunction $b05eccd75d26bd5a$export$f0954fd7d5368655(out) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n}\nfunction $b05eccd75d26bd5a$export$4286ddefc8f49512(out, axis, rad) {\n rad = rad * 0.5;\n var s = Math.sin(rad);\n out[0] = s * axis[0];\n out[1] = s * axis[1];\n out[2] = s * axis[2];\n out[3] = Math.cos(rad);\n return out;\n}\nfunction $b05eccd75d26bd5a$export$3f70be5e7d7dc51(out_axis, q) {\n var rad = Math.acos(q[3]) * 2.0;\n var s = Math.sin(rad / 2.0);\n if (s > $rqjzO.EPSILON) {\n out_axis[0] = q[0] / s;\n out_axis[1] = q[1] / s;\n out_axis[2] = q[2] / s;\n } else {\n // If s is zero, return any axis (no rotation - axis does not matter)\n out_axis[0] = 1;\n out_axis[1] = 0;\n out_axis[2] = 0;\n }\n return rad;\n}\nfunction $b05eccd75d26bd5a$export$b363da9ded343252(a, b) {\n var dotproduct = $b05eccd75d26bd5a$export$94132a0e348806d4(a, b);\n return Math.acos(2 * dotproduct * dotproduct - 1);\n}\nfunction $b05eccd75d26bd5a$export$2060d2db72cce88f(out, a, b) {\n var ax = a[0], ay = a[1], az = a[2], aw = a[3];\n var bx = b[0], by = b[1], bz = b[2], bw = b[3];\n out[0] = ax * bw + aw * bx + ay * bz - az * by;\n out[1] = ay * bw + aw * by + az * bx - ax * bz;\n out[2] = az * bw + aw * bz + ax * by - ay * bx;\n out[3] = aw * bw - ax * bx - ay * by - az * bz;\n return out;\n}\nfunction $b05eccd75d26bd5a$export$a59c8716592e09af(out, a, rad) {\n rad *= 0.5;\n var ax = a[0], ay = a[1], az = a[2], aw = a[3];\n var bx = Math.sin(rad), bw = Math.cos(rad);\n out[0] = ax * bw + aw * bx;\n out[1] = ay * bw + az * bx;\n out[2] = az * bw - ay * bx;\n out[3] = aw * bw - ax * bx;\n return out;\n}\nfunction $b05eccd75d26bd5a$export$cf71e4d4ca4d1cfd(out, a, rad) {\n rad *= 0.5;\n var ax = a[0], ay = a[1], az = a[2], aw = a[3];\n var by = Math.sin(rad), bw = Math.cos(rad);\n out[0] = ax * bw - az * by;\n out[1] = ay * bw + aw * by;\n out[2] = az * bw + ax * by;\n out[3] = aw * bw - ay * by;\n return out;\n}\nfunction $b05eccd75d26bd5a$export$ea6eae3365de5b9c(out, a, rad) {\n rad *= 0.5;\n var ax = a[0], ay = a[1], az = a[2], aw = a[3];\n var bz = Math.sin(rad), bw = Math.cos(rad);\n out[0] = ax * bw + ay * bz;\n out[1] = ay * bw - ax * bz;\n out[2] = az * bw + aw * bz;\n out[3] = aw * bw - az * bz;\n return out;\n}\nfunction $b05eccd75d26bd5a$export$fb72b72e8d764d4e(out, a) {\n var x = a[0], y = a[1], z = a[2];\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z));\n return out;\n}\nfunction $b05eccd75d26bd5a$export$b310ec824aaee37f(out, a) {\n var x = a[0], y = a[1], z = a[2], w = a[3];\n var r = Math.sqrt(x * x + y * y + z * z);\n var et = Math.exp(w);\n var s = r > 0 ? et * Math.sin(r) / r : 0;\n out[0] = x * s;\n out[1] = y * s;\n out[2] = z * s;\n out[3] = et * Math.cos(r);\n return out;\n}\nfunction $b05eccd75d26bd5a$export$876cb1b29620556f(out, a) {\n var x = a[0], y = a[1], z = a[2], w = a[3];\n var r = Math.sqrt(x * x + y * y + z * z);\n var t = r > 0 ? Math.atan2(r, w) / r : 0;\n out[0] = x * t;\n out[1] = y * t;\n out[2] = z * t;\n out[3] = 0.5 * Math.log(x * x + y * y + z * z + w * w);\n return out;\n}\nfunction $b05eccd75d26bd5a$export$9c297f60e22e3389(out, a, b) {\n $b05eccd75d26bd5a$export$876cb1b29620556f(out, a);\n $b05eccd75d26bd5a$export$dcdf75081b88279d(out, out, b);\n $b05eccd75d26bd5a$export$b310ec824aaee37f(out, out);\n return out;\n}\nfunction $b05eccd75d26bd5a$export$1544d9bc2995de08(out, a, b, t) {\n // benchmarks:\n // http://jsperf.com/quaternion-slerp-implementations\n var ax = a[0], ay = a[1], az = a[2], aw = a[3];\n var bx = b[0], by = b[1], bz = b[2], bw = b[3];\n var omega, cosom, sinom, scale0, scale1; // calc cosine\n cosom = ax * bx + ay * by + az * bz + aw * bw; // adjust signs (if necessary)\n if (cosom < 0.0) {\n cosom = -cosom;\n bx = -bx;\n by = -by;\n bz = -bz;\n bw = -bw;\n } // calculate coefficients\n if (1.0 - cosom > $rqjzO.EPSILON) {\n // standard case (slerp)\n omega = Math.acos(cosom);\n sinom = Math.sin(omega);\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\n scale1 = Math.sin(t * omega) / sinom;\n } else {\n // \"from\" and \"to\" quaternions are very close\n // ... so we can do a linear interpolation\n scale0 = 1.0 - t;\n scale1 = t;\n } // calculate final values\n out[0] = scale0 * ax + scale1 * bx;\n out[1] = scale0 * ay + scale1 * by;\n out[2] = scale0 * az + scale1 * bz;\n out[3] = scale0 * aw + scale1 * bw;\n return out;\n}\nfunction $b05eccd75d26bd5a$export$4385e60b38654f68(out) {\n // Implementation of http://planning.cs.uiuc.edu/node198.html\n // TODO: Calling random 3 times is probably not the fastest solution\n var u1 = $rqjzO.RANDOM();\n var u2 = $rqjzO.RANDOM();\n var u3 = $rqjzO.RANDOM();\n var sqrt1MinusU1 = Math.sqrt(1 - u1);\n var sqrtU1 = Math.sqrt(u1);\n out[0] = sqrt1MinusU1 * Math.sin(2.0 * Math.PI * u2);\n out[1] = sqrt1MinusU1 * Math.cos(2.0 * Math.PI * u2);\n out[2] = sqrtU1 * Math.sin(2.0 * Math.PI * u3);\n out[3] = sqrtU1 * Math.cos(2.0 * Math.PI * u3);\n return out;\n}\nfunction $b05eccd75d26bd5a$export$6897c284b6f9f4dc(out, a) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3];\n var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3;\n var invDot = dot ? 1.0 / dot : 0; // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0\n out[0] = -a0 * invDot;\n out[1] = -a1 * invDot;\n out[2] = -a2 * invDot;\n out[3] = a3 * invDot;\n return out;\n}\nfunction $b05eccd75d26bd5a$export$7679f47e72c62560(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = a[3];\n return out;\n}\nfunction $b05eccd75d26bd5a$export$272a1eb8e5a4b55b(out, m) {\n // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\n // article \"Quaternion Calculus and Fast Animation\".\n var fTrace = m[0] + m[4] + m[8];\n var fRoot;\n if (fTrace > 0.0) {\n // |w| > 1/2, may as well choose w > 1/2\n fRoot = Math.sqrt(fTrace + 1.0); // 2w\n out[3] = 0.5 * fRoot;\n fRoot = 0.5 / fRoot; // 1/(4w)\n out[0] = (m[5] - m[7]) * fRoot;\n out[1] = (m[6] - m[2]) * fRoot;\n out[2] = (m[1] - m[3]) * fRoot;\n } else {\n // |w| <= 1/2\n var i = 0;\n if (m[4] > m[0]) i = 1;\n if (m[8] > m[i * 3 + i]) i = 2;\n var j = (i + 1) % 3;\n var k = (i + 2) % 3;\n fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1.0);\n out[i] = 0.5 * fRoot;\n fRoot = 0.5 / fRoot;\n out[3] = (m[j * 3 + k] - m[k * 3 + j]) * fRoot;\n out[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot;\n out[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot;\n }\n return out;\n}\nfunction $b05eccd75d26bd5a$export$7a404a587ea85af(out, x, y, z) {\n var halfToRad = 0.5 * Math.PI / 180.0;\n x *= halfToRad;\n y *= halfToRad;\n z *= halfToRad;\n var sx = Math.sin(x);\n var cx = Math.cos(x);\n var sy = Math.sin(y);\n var cy = Math.cos(y);\n var sz = Math.sin(z);\n var cz = Math.cos(z);\n out[0] = sx * cy * cz - cx * sy * sz;\n out[1] = cx * sy * cz + sx * cy * sz;\n out[2] = cx * cy * sz - sx * sy * cz;\n out[3] = cx * cy * cz + sx * sy * sz;\n return out;\n}\nfunction $b05eccd75d26bd5a$export$42d51816ce590c93(a) {\n return \"quat(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \")\";\n}\nvar $b05eccd75d26bd5a$export$9cd59f9826255e47 = $8QvoZ.clone;\nvar $b05eccd75d26bd5a$export$a82be99ed2a44a7d = $8QvoZ.fromValues;\nvar $b05eccd75d26bd5a$export$784d13d8ee351f07 = $8QvoZ.copy;\nvar $b05eccd75d26bd5a$export$adaa4cf7ef1b65be = $8QvoZ.set;\nvar $b05eccd75d26bd5a$export$e16d8520af44a096 = $8QvoZ.add;\nvar $b05eccd75d26bd5a$export$6e3a27864ab166fe = $b05eccd75d26bd5a$export$2060d2db72cce88f;\nvar $b05eccd75d26bd5a$export$dcdf75081b88279d = $8QvoZ.scale;\nvar $b05eccd75d26bd5a$export$94132a0e348806d4 = $8QvoZ.dot;\nvar $b05eccd75d26bd5a$export$3a89f8d6f6bf6c9f = $8QvoZ.lerp;\nvar $b05eccd75d26bd5a$export$f24224f1c91d8156 = $8QvoZ.length;\nvar $b05eccd75d26bd5a$export$fc1400facf92c78 = $b05eccd75d26bd5a$export$f24224f1c91d8156;\nvar $b05eccd75d26bd5a$export$ab44e1323ffc8376 = $8QvoZ.squaredLength;\nvar $b05eccd75d26bd5a$export$99d8dd3f32a3435 = $b05eccd75d26bd5a$export$ab44e1323ffc8376;\nvar $b05eccd75d26bd5a$export$a3295358bff77e = $8QvoZ.normalize;\nvar $b05eccd75d26bd5a$export$f2599a5cf1109d8 = $8QvoZ.exactEquals;\nvar $b05eccd75d26bd5a$export$e9bab7fafb253603 = $8QvoZ.equals;\nvar $b05eccd75d26bd5a$export$72d66f5842c00904 = function() {\n var tmpvec3 = $fwwPx.create();\n var xUnitVec3 = $fwwPx.fromValues(1, 0, 0);\n var yUnitVec3 = $fwwPx.fromValues(0, 1, 0);\n return function(out, a, b) {\n var dot = $fwwPx.dot(a, b);\n if (dot < -0.999999) {\n $fwwPx.cross(tmpvec3, xUnitVec3, a);\n if ($fwwPx.len(tmpvec3) < 0.000001) $fwwPx.cross(tmpvec3, yUnitVec3, a);\n $fwwPx.normalize(tmpvec3, tmpvec3);\n $b05eccd75d26bd5a$export$4286ddefc8f49512(out, tmpvec3, Math.PI);\n return out;\n } else if (dot > 0.999999) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n } else {\n $fwwPx.cross(tmpvec3, a, b);\n out[0] = tmpvec3[0];\n out[1] = tmpvec3[1];\n out[2] = tmpvec3[2];\n out[3] = 1 + dot;\n return $b05eccd75d26bd5a$export$a3295358bff77e(out, out);\n }\n };\n}();\nvar $b05eccd75d26bd5a$export$699b0866ca50f6cb = function() {\n var temp1 = $b05eccd75d26bd5a$export$185802fd694ee1f5();\n var temp2 = $b05eccd75d26bd5a$export$185802fd694ee1f5();\n return function(out, a, b, c, d, t) {\n $b05eccd75d26bd5a$export$1544d9bc2995de08(temp1, a, d, t);\n $b05eccd75d26bd5a$export$1544d9bc2995de08(temp2, b, c, t);\n $b05eccd75d26bd5a$export$1544d9bc2995de08(out, temp1, temp2, 2 * t * (1 - t));\n return out;\n };\n}();\nvar $b05eccd75d26bd5a$export$937ca0a544b2d712 = function() {\n var matr = $67rGA.create();\n return function(out, view, right, up) {\n matr[0] = right[0];\n matr[3] = right[1];\n matr[6] = right[2];\n matr[1] = up[0];\n matr[4] = up[1];\n matr[7] = up[2];\n matr[2] = -view[0];\n matr[5] = -view[1];\n matr[8] = -view[2];\n return $b05eccd75d26bd5a$export$a3295358bff77e(out, $b05eccd75d26bd5a$export$272a1eb8e5a4b55b(out, matr));\n };\n}();\n\n});\n\nparcelRegister(\"89cfF\", function(module, exports) {\n\n$parcel$export(module.exports, \"create\", function () { return $5ee8aaf15329a338$export$185802fd694ee1f5; });\n$parcel$export(module.exports, \"clone\", function () { return $5ee8aaf15329a338$export$9cd59f9826255e47; });\n$parcel$export(module.exports, \"fromValues\", function () { return $5ee8aaf15329a338$export$a82be99ed2a44a7d; });\n$parcel$export(module.exports, \"fromRotationTranslationValues\", function () { return $5ee8aaf15329a338$export$31d4759777f5e259; });\n$parcel$export(module.exports, \"fromRotationTranslation\", function () { return $5ee8aaf15329a338$export$9545ac307f2a256b; });\n$parcel$export(module.exports, \"fromTranslation\", function () { return $5ee8aaf15329a338$export$bc9e79e74e9fddf6; });\n$parcel$export(module.exports, \"fromRotation\", function () { return $5ee8aaf15329a338$export$926fc125ff3c666c; });\n$parcel$export(module.exports, \"fromMat4\", function () { return $5ee8aaf15329a338$export$b4ad467060d346fe; });\n$parcel$export(module.exports, \"copy\", function () { return $5ee8aaf15329a338$export$784d13d8ee351f07; });\n$parcel$export(module.exports, \"identity\", function () { return $5ee8aaf15329a338$export$f0954fd7d5368655; });\n$parcel$export(module.exports, \"set\", function () { return $5ee8aaf15329a338$export$adaa4cf7ef1b65be; });\n$parcel$export(module.exports, \"getReal\", function () { return $5ee8aaf15329a338$export$850568f5e3cdb212; });\n$parcel$export(module.exports, \"getDual\", function () { return $5ee8aaf15329a338$export$6b62e6fd886a6462; });\n$parcel$export(module.exports, \"setReal\", function () { return $5ee8aaf15329a338$export$611329ee5753c868; });\n$parcel$export(module.exports, \"setDual\", function () { return $5ee8aaf15329a338$export$c5d0e0cf08580c3f; });\n$parcel$export(module.exports, \"getTranslation\", function () { return $5ee8aaf15329a338$export$202e99f82f7f0395; });\n$parcel$export(module.exports, \"translate\", function () { return $5ee8aaf15329a338$export$d73ee8ef04f5226a; });\n$parcel$export(module.exports, \"rotateX\", function () { return $5ee8aaf15329a338$export$a59c8716592e09af; });\n$parcel$export(module.exports, \"rotateY\", function () { return $5ee8aaf15329a338$export$cf71e4d4ca4d1cfd; });\n$parcel$export(module.exports, \"rotateZ\", function () { return $5ee8aaf15329a338$export$ea6eae3365de5b9c; });\n$parcel$export(module.exports, \"rotateByQuatAppend\", function () { return $5ee8aaf15329a338$export$7da74d4771545cc5; });\n$parcel$export(module.exports, \"rotateByQuatPrepend\", function () { return $5ee8aaf15329a338$export$82e307635ffa6e66; });\n$parcel$export(module.exports, \"rotateAroundAxis\", function () { return $5ee8aaf15329a338$export$1b0030ab84d46e01; });\n$parcel$export(module.exports, \"add\", function () { return $5ee8aaf15329a338$export$e16d8520af44a096; });\n$parcel$export(module.exports, \"multiply\", function () { return $5ee8aaf15329a338$export$2060d2db72cce88f; });\n$parcel$export(module.exports, \"mul\", function () { return $5ee8aaf15329a338$export$6e3a27864ab166fe; });\n$parcel$export(module.exports, \"scale\", function () { return $5ee8aaf15329a338$export$dcdf75081b88279d; });\n$parcel$export(module.exports, \"dot\", function () { return $5ee8aaf15329a338$export$94132a0e348806d4; });\n$parcel$export(module.exports, \"lerp\", function () { return $5ee8aaf15329a338$export$3a89f8d6f6bf6c9f; });\n$parcel$export(module.exports, \"invert\", function () { return $5ee8aaf15329a338$export$6897c284b6f9f4dc; });\n$parcel$export(module.exports, \"squaredLength\", function () { return $5ee8aaf15329a338$export$ab44e1323ffc8376; });\n$parcel$export(module.exports, \"conjugate\", function () { return $5ee8aaf15329a338$export$7679f47e72c62560; });\n$parcel$export(module.exports, \"length\", function () { return $5ee8aaf15329a338$export$f24224f1c91d8156; });\n$parcel$export(module.exports, \"len\", function () { return $5ee8aaf15329a338$export$fc1400facf92c78; });\n$parcel$export(module.exports, \"sqrLen\", function () { return $5ee8aaf15329a338$export$99d8dd3f32a3435; });\n$parcel$export(module.exports, \"normalize\", function () { return $5ee8aaf15329a338$export$a3295358bff77e; });\n$parcel$export(module.exports, \"str\", function () { return $5ee8aaf15329a338$export$42d51816ce590c93; });\n$parcel$export(module.exports, \"exactEquals\", function () { return $5ee8aaf15329a338$export$f2599a5cf1109d8; });\n$parcel$export(module.exports, \"equals\", function () { return $5ee8aaf15329a338$export$e9bab7fafb253603; });\n\nvar $rqjzO = parcelRequire(\"rqjzO\");\n\nvar $f8Ox0 = parcelRequire(\"f8Ox0\");\n\nvar $c3mW8 = parcelRequire(\"c3mW8\");\nfunction $5ee8aaf15329a338$export$185802fd694ee1f5() {\n var dq = new $rqjzO.ARRAY_TYPE(8);\n if ($rqjzO.ARRAY_TYPE != Float32Array) {\n dq[0] = 0;\n dq[1] = 0;\n dq[2] = 0;\n dq[4] = 0;\n dq[5] = 0;\n dq[6] = 0;\n dq[7] = 0;\n }\n dq[3] = 1;\n return dq;\n}\nfunction $5ee8aaf15329a338$export$9cd59f9826255e47(a) {\n var dq = new $rqjzO.ARRAY_TYPE(8);\n dq[0] = a[0];\n dq[1] = a[1];\n dq[2] = a[2];\n dq[3] = a[3];\n dq[4] = a[4];\n dq[5] = a[5];\n dq[6] = a[6];\n dq[7] = a[7];\n return dq;\n}\nfunction $5ee8aaf15329a338$export$a82be99ed2a44a7d(x1, y1, z1, w1, x2, y2, z2, w2) {\n var dq = new $rqjzO.ARRAY_TYPE(8);\n dq[0] = x1;\n dq[1] = y1;\n dq[2] = z1;\n dq[3] = w1;\n dq[4] = x2;\n dq[5] = y2;\n dq[6] = z2;\n dq[7] = w2;\n return dq;\n}\nfunction $5ee8aaf15329a338$export$31d4759777f5e259(x1, y1, z1, w1, x2, y2, z2) {\n var dq = new $rqjzO.ARRAY_TYPE(8);\n dq[0] = x1;\n dq[1] = y1;\n dq[2] = z1;\n dq[3] = w1;\n var ax = x2 * 0.5, ay = y2 * 0.5, az = z2 * 0.5;\n dq[4] = ax * w1 + ay * z1 - az * y1;\n dq[5] = ay * w1 + az * x1 - ax * z1;\n dq[6] = az * w1 + ax * y1 - ay * x1;\n dq[7] = -ax * x1 - ay * y1 - az * z1;\n return dq;\n}\nfunction $5ee8aaf15329a338$export$9545ac307f2a256b(out, q, t) {\n var ax = t[0] * 0.5, ay = t[1] * 0.5, az = t[2] * 0.5, bx = q[0], by = q[1], bz = q[2], bw = q[3];\n out[0] = bx;\n out[1] = by;\n out[2] = bz;\n out[3] = bw;\n out[4] = ax * bw + ay * bz - az * by;\n out[5] = ay * bw + az * bx - ax * bz;\n out[6] = az * bw + ax * by - ay * bx;\n out[7] = -ax * bx - ay * by - az * bz;\n return out;\n}\nfunction $5ee8aaf15329a338$export$bc9e79e74e9fddf6(out, t) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = t[0] * 0.5;\n out[5] = t[1] * 0.5;\n out[6] = t[2] * 0.5;\n out[7] = 0;\n return out;\n}\nfunction $5ee8aaf15329a338$export$926fc125ff3c666c(out, q) {\n out[0] = q[0];\n out[1] = q[1];\n out[2] = q[2];\n out[3] = q[3];\n out[4] = 0;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n return out;\n}\nfunction $5ee8aaf15329a338$export$b4ad467060d346fe(out, a) {\n //TODO Optimize this\n var outer = $f8Ox0.create();\n $c3mW8.getRotation(outer, a);\n var t = new $rqjzO.ARRAY_TYPE(3);\n $c3mW8.getTranslation(t, a);\n $5ee8aaf15329a338$export$9545ac307f2a256b(out, outer, t);\n return out;\n}\nfunction $5ee8aaf15329a338$export$784d13d8ee351f07(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n return out;\n}\nfunction $5ee8aaf15329a338$export$f0954fd7d5368655(out) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = 0;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n return out;\n}\nfunction $5ee8aaf15329a338$export$adaa4cf7ef1b65be(out, x1, y1, z1, w1, x2, y2, z2, w2) {\n out[0] = x1;\n out[1] = y1;\n out[2] = z1;\n out[3] = w1;\n out[4] = x2;\n out[5] = y2;\n out[6] = z2;\n out[7] = w2;\n return out;\n}\nvar $5ee8aaf15329a338$export$850568f5e3cdb212 = $f8Ox0.copy;\nfunction $5ee8aaf15329a338$export$6b62e6fd886a6462(out, a) {\n out[0] = a[4];\n out[1] = a[5];\n out[2] = a[6];\n out[3] = a[7];\n return out;\n}\nvar $5ee8aaf15329a338$export$611329ee5753c868 = $f8Ox0.copy;\nfunction $5ee8aaf15329a338$export$c5d0e0cf08580c3f(out, q) {\n out[4] = q[0];\n out[5] = q[1];\n out[6] = q[2];\n out[7] = q[3];\n return out;\n}\nfunction $5ee8aaf15329a338$export$202e99f82f7f0395(out, a) {\n var ax = a[4], ay = a[5], az = a[6], aw = a[7], bx = -a[0], by = -a[1], bz = -a[2], bw = a[3];\n out[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2;\n out[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2;\n out[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2;\n return out;\n}\nfunction $5ee8aaf15329a338$export$d73ee8ef04f5226a(out, a, v) {\n var ax1 = a[0], ay1 = a[1], az1 = a[2], aw1 = a[3], bx1 = v[0] * 0.5, by1 = v[1] * 0.5, bz1 = v[2] * 0.5, ax2 = a[4], ay2 = a[5], az2 = a[6], aw2 = a[7];\n out[0] = ax1;\n out[1] = ay1;\n out[2] = az1;\n out[3] = aw1;\n out[4] = aw1 * bx1 + ay1 * bz1 - az1 * by1 + ax2;\n out[5] = aw1 * by1 + az1 * bx1 - ax1 * bz1 + ay2;\n out[6] = aw1 * bz1 + ax1 * by1 - ay1 * bx1 + az2;\n out[7] = -ax1 * bx1 - ay1 * by1 - az1 * bz1 + aw2;\n return out;\n}\nfunction $5ee8aaf15329a338$export$a59c8716592e09af(out, a, rad) {\n var bx = -a[0], by = -a[1], bz = -a[2], bw = a[3], ax = a[4], ay = a[5], az = a[6], aw = a[7], ax1 = ax * bw + aw * bx + ay * bz - az * by, ay1 = ay * bw + aw * by + az * bx - ax * bz, az1 = az * bw + aw * bz + ax * by - ay * bx, aw1 = aw * bw - ax * bx - ay * by - az * bz;\n $f8Ox0.rotateX(out, a, rad);\n bx = out[0];\n by = out[1];\n bz = out[2];\n bw = out[3];\n out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;\n out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;\n out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;\n out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;\n return out;\n}\nfunction $5ee8aaf15329a338$export$cf71e4d4ca4d1cfd(out, a, rad) {\n var bx = -a[0], by = -a[1], bz = -a[2], bw = a[3], ax = a[4], ay = a[5], az = a[6], aw = a[7], ax1 = ax * bw + aw * bx + ay * bz - az * by, ay1 = ay * bw + aw * by + az * bx - ax * bz, az1 = az * bw + aw * bz + ax * by - ay * bx, aw1 = aw * bw - ax * bx - ay * by - az * bz;\n $f8Ox0.rotateY(out, a, rad);\n bx = out[0];\n by = out[1];\n bz = out[2];\n bw = out[3];\n out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;\n out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;\n out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;\n out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;\n return out;\n}\nfunction $5ee8aaf15329a338$export$ea6eae3365de5b9c(out, a, rad) {\n var bx = -a[0], by = -a[1], bz = -a[2], bw = a[3], ax = a[4], ay = a[5], az = a[6], aw = a[7], ax1 = ax * bw + aw * bx + ay * bz - az * by, ay1 = ay * bw + aw * by + az * bx - ax * bz, az1 = az * bw + aw * bz + ax * by - ay * bx, aw1 = aw * bw - ax * bx - ay * by - az * bz;\n $f8Ox0.rotateZ(out, a, rad);\n bx = out[0];\n by = out[1];\n bz = out[2];\n bw = out[3];\n out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;\n out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;\n out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;\n out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;\n return out;\n}\nfunction $5ee8aaf15329a338$export$7da74d4771545cc5(out, a, q) {\n var qx = q[0], qy = q[1], qz = q[2], qw = q[3], ax = a[0], ay = a[1], az = a[2], aw = a[3];\n out[0] = ax * qw + aw * qx + ay * qz - az * qy;\n out[1] = ay * qw + aw * qy + az * qx - ax * qz;\n out[2] = az * qw + aw * qz + ax * qy - ay * qx;\n out[3] = aw * qw - ax * qx - ay * qy - az * qz;\n ax = a[4];\n ay = a[5];\n az = a[6];\n aw = a[7];\n out[4] = ax * qw + aw * qx + ay * qz - az * qy;\n out[5] = ay * qw + aw * qy + az * qx - ax * qz;\n out[6] = az * qw + aw * qz + ax * qy - ay * qx;\n out[7] = aw * qw - ax * qx - ay * qy - az * qz;\n return out;\n}\nfunction $5ee8aaf15329a338$export$82e307635ffa6e66(out, q, a) {\n var qx = q[0], qy = q[1], qz = q[2], qw = q[3], bx = a[0], by = a[1], bz = a[2], bw = a[3];\n out[0] = qx * bw + qw * bx + qy * bz - qz * by;\n out[1] = qy * bw + qw * by + qz * bx - qx * bz;\n out[2] = qz * bw + qw * bz + qx * by - qy * bx;\n out[3] = qw * bw - qx * bx - qy * by - qz * bz;\n bx = a[4];\n by = a[5];\n bz = a[6];\n bw = a[7];\n out[4] = qx * bw + qw * bx + qy * bz - qz * by;\n out[5] = qy * bw + qw * by + qz * bx - qx * bz;\n out[6] = qz * bw + qw * bz + qx * by - qy * bx;\n out[7] = qw * bw - qx * bx - qy * by - qz * bz;\n return out;\n}\nfunction $5ee8aaf15329a338$export$1b0030ab84d46e01(out, a, axis, rad) {\n //Special case for rad = 0\n if (Math.abs(rad) < $rqjzO.EPSILON) return $5ee8aaf15329a338$export$784d13d8ee351f07(out, a);\n var axisLength = Math.hypot(axis[0], axis[1], axis[2]);\n rad = rad * 0.5;\n var s = Math.sin(rad);\n var bx = s * axis[0] / axisLength;\n var by = s * axis[1] / axisLength;\n var bz = s * axis[2] / axisLength;\n var bw = Math.cos(rad);\n var ax1 = a[0], ay1 = a[1], az1 = a[2], aw1 = a[3];\n out[0] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;\n out[1] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;\n out[2] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;\n out[3] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;\n var ax = a[4], ay = a[5], az = a[6], aw = a[7];\n out[4] = ax * bw + aw * bx + ay * bz - az * by;\n out[5] = ay * bw + aw * by + az * bx - ax * bz;\n out[6] = az * bw + aw * bz + ax * by - ay * bx;\n out[7] = aw * bw - ax * bx - ay * by - az * bz;\n return out;\n}\nfunction $5ee8aaf15329a338$export$e16d8520af44a096(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n out[6] = a[6] + b[6];\n out[7] = a[7] + b[7];\n return out;\n}\nfunction $5ee8aaf15329a338$export$2060d2db72cce88f(out, a, b) {\n var ax0 = a[0], ay0 = a[1], az0 = a[2], aw0 = a[3], bx1 = b[4], by1 = b[5], bz1 = b[6], bw1 = b[7], ax1 = a[4], ay1 = a[5], az1 = a[6], aw1 = a[7], bx0 = b[0], by0 = b[1], bz0 = b[2], bw0 = b[3];\n out[0] = ax0 * bw0 + aw0 * bx0 + ay0 * bz0 - az0 * by0;\n out[1] = ay0 * bw0 + aw0 * by0 + az0 * bx0 - ax0 * bz0;\n out[2] = az0 * bw0 + aw0 * bz0 + ax0 * by0 - ay0 * bx0;\n out[3] = aw0 * bw0 - ax0 * bx0 - ay0 * by0 - az0 * bz0;\n out[4] = ax0 * bw1 + aw0 * bx1 + ay0 * bz1 - az0 * by1 + ax1 * bw0 + aw1 * bx0 + ay1 * bz0 - az1 * by0;\n out[5] = ay0 * bw1 + aw0 * by1 + az0 * bx1 - ax0 * bz1 + ay1 * bw0 + aw1 * by0 + az1 * bx0 - ax1 * bz0;\n out[6] = az0 * bw1 + aw0 * bz1 + ax0 * by1 - ay0 * bx1 + az1 * bw0 + aw1 * bz0 + ax1 * by0 - ay1 * bx0;\n out[7] = aw0 * bw1 - ax0 * bx1 - ay0 * by1 - az0 * bz1 + aw1 * bw0 - ax1 * bx0 - ay1 * by0 - az1 * bz0;\n return out;\n}\nvar $5ee8aaf15329a338$export$6e3a27864ab166fe = $5ee8aaf15329a338$export$2060d2db72cce88f;\nfunction $5ee8aaf15329a338$export$dcdf75081b88279d(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n out[6] = a[6] * b;\n out[7] = a[7] * b;\n return out;\n}\nvar $5ee8aaf15329a338$export$94132a0e348806d4 = $f8Ox0.dot;\nfunction $5ee8aaf15329a338$export$3a89f8d6f6bf6c9f(out, a, b, t) {\n var mt = 1 - t;\n if ($5ee8aaf15329a338$export$94132a0e348806d4(a, b) < 0) t = -t;\n out[0] = a[0] * mt + b[0] * t;\n out[1] = a[1] * mt + b[1] * t;\n out[2] = a[2] * mt + b[2] * t;\n out[3] = a[3] * mt + b[3] * t;\n out[4] = a[4] * mt + b[4] * t;\n out[5] = a[5] * mt + b[5] * t;\n out[6] = a[6] * mt + b[6] * t;\n out[7] = a[7] * mt + b[7] * t;\n return out;\n}\nfunction $5ee8aaf15329a338$export$6897c284b6f9f4dc(out, a) {\n var sqlen = $5ee8aaf15329a338$export$ab44e1323ffc8376(a);\n out[0] = -a[0] / sqlen;\n out[1] = -a[1] / sqlen;\n out[2] = -a[2] / sqlen;\n out[3] = a[3] / sqlen;\n out[4] = -a[4] / sqlen;\n out[5] = -a[5] / sqlen;\n out[6] = -a[6] / sqlen;\n out[7] = a[7] / sqlen;\n return out;\n}\nfunction $5ee8aaf15329a338$export$7679f47e72c62560(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = a[3];\n out[4] = -a[4];\n out[5] = -a[5];\n out[6] = -a[6];\n out[7] = a[7];\n return out;\n}\nvar $5ee8aaf15329a338$export$f24224f1c91d8156 = $f8Ox0.length;\nvar $5ee8aaf15329a338$export$fc1400facf92c78 = $5ee8aaf15329a338$export$f24224f1c91d8156;\nvar $5ee8aaf15329a338$export$ab44e1323ffc8376 = $f8Ox0.squaredLength;\nvar $5ee8aaf15329a338$export$99d8dd3f32a3435 = $5ee8aaf15329a338$export$ab44e1323ffc8376;\nfunction $5ee8aaf15329a338$export$a3295358bff77e(out, a) {\n var magnitude = $5ee8aaf15329a338$export$ab44e1323ffc8376(a);\n if (magnitude > 0) {\n magnitude = Math.sqrt(magnitude);\n var a0 = a[0] / magnitude;\n var a1 = a[1] / magnitude;\n var a2 = a[2] / magnitude;\n var a3 = a[3] / magnitude;\n var b0 = a[4];\n var b1 = a[5];\n var b2 = a[6];\n var b3 = a[7];\n var a_dot_b = a0 * b0 + a1 * b1 + a2 * b2 + a3 * b3;\n out[0] = a0;\n out[1] = a1;\n out[2] = a2;\n out[3] = a3;\n out[4] = (b0 - a0 * a_dot_b) / magnitude;\n out[5] = (b1 - a1 * a_dot_b) / magnitude;\n out[6] = (b2 - a2 * a_dot_b) / magnitude;\n out[7] = (b3 - a3 * a_dot_b) / magnitude;\n }\n return out;\n}\nfunction $5ee8aaf15329a338$export$42d51816ce590c93(a) {\n return \"quat2(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \", \" + a[6] + \", \" + a[7] + \")\";\n}\nfunction $5ee8aaf15329a338$export$f2599a5cf1109d8(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7];\n}\nfunction $5ee8aaf15329a338$export$e9bab7fafb253603(a, b) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5], a6 = a[6], a7 = a[7];\n var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5], b6 = b[6], b7 = b[7];\n return Math.abs(a0 - b0) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= $rqjzO.EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7));\n}\n\n});\n\n\n\n\n\nparcelRequire(\"96HUf\");\n\n//# sourceMappingURL=index.e9cecaf3.js.map\n","import { SCENES } from \"./data/index.js\";\nimport * as Marzipano from \"marzipano\";\n\nconst panoElement = document.getElementById(\"pano\")\nexport const resetSceneButton = document.getElementById(\"request-view-reset\");\n\nconst viewerOpts = {\n controls: {\n mouseViewMode: \"drag\",\n scrollZoom: true,\n },\n};\n\nexport const viewer = new Marzipano.Viewer(panoElement, viewerOpts);\n\n\nif (process.env.NODE_ENV === 'development') {\n\t// this outputs coordinates of yaw/pitch on click\n\tdocument.addEventListener('click', (e) => {\n\t\tvar view = viewer.view()\n\t\tlet x = e.clientX\n\t\tlet y = e.clientY\n\t\tconsole.log(view.screenToCoordinates({ x, y }))\n\t})\n}\n\n// const tourLinkHotspot = SCENES[0].linkHotspots[0]\nconst tourInfoHotspot = SCENES[0].infoHotspots[0]\n\n// const tourLinkHotspotLookToValues = {\n// yaw: tourLinkHotspot?.yaw,\n// pitch: tourLinkHotspot?.pitch,\n// rotation: tourLinkHotspot?.rotation\n// };\n\n\nconst tourLookToInfoHotspot = {\n yaw: tourInfoHotspot?.yaw,\n pitch: tourInfoHotspot?.pitch,\n rotation: tourInfoHotspot?.rotation\n};\n\nexport const data = {\n scenes: SCENES,\n\n name: `Pampered Chef - ${process.env.COLLECTION_NAME} VR Kitchen`,\n settings: {\n mouseViewMode: \"drag\",\n autorotateEnabled: false,\n fullscreenButton: false,\n },\n tourParams: {\n tourSection1: tourLookToInfoHotspot,\n // tourSection2: tourLinkHotspotLookToValues,\n },\n};\n\n","import { KITCHEN_ISLAND } from \"./2-kitchen-island\";\n\nexport const SCENES = [\n KITCHEN_ISLAND\n];\n","export const KITCHEN_ISLAND = {\n\tid: '2-kitchen-island',\n\tname: 'Kitchen Island',\n\tlevels: [\n\t\t{\n\t\t\ttileSize: 256,\n\t\t\tsize: 256,\n\t\t\tfallbackOnly: true,\n\t\t},\n\t\t{\n\t\t\ttileSize: 512,\n\t\t\tsize: 512,\n\t\t},\n\t\t{\n\t\t\ttileSize: 512,\n\t\t\tsize: 1024,\n\t\t},\n\t\t{\n\t\t\ttileSize: 512,\n\t\t\tsize: 2048,\n\t\t},\n\t],\n\tfaceSize: 2048,\n\tinitialViewParameters: {\n\t\tyaw: -0.0005943935503509579,\n\t\tpitch: 0.6074701054373062,\n\t\tfov: 1.1252406777618285,\n\t},\n\tlinkHotspots: [\n\t],\n\tinfoHotspots: [\n\t\t{\n\t\t\tclass: 'intro-starter',\n\t\t\tyaw: -0.6296041741844114,\n\t\t\tpitch: 0.6541907464738905,\n\t\t\ttitle: 'Stoneware Starter Set',\n\t\t\ttext: `\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t

    Stoneware Starter Set (#100292)

    \n\t\t\t\t\t\t\t\t\tYou can make perfect pizzas every time with the Pizza Stone, create easy \n\t\t\t\t\t\t\t\t\tsheet-pan dinners on the Stone Bar Pan, and bake delicious banana bread \n\t\t\t\t\t\t\t\t\tin the Stone Loaf Pan.\n\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\tGreat for new cooks, first-time homeowners, college students, and empty \n\t\t\t\t\t\t\t\t\tnesters ready to refresh their kitchen!\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t`,\n\t\t\timages: [\n\t\t\t\t`\"vrk-fall24-kitchen-stoneware-set-02.jpg\"`,\n\t\t\t\t`\"vrk-fall24-kitchen-stoneware-set-03.jpg\"`,\n\t\t\t\t`\"vrk-fall24-kitchen-stoneware-set-04.jpg\"`,\n\t\t\t],\n\t\t\tvideos: [\n\t\t\t\t`
`,\n\t\t\t],\n\t\t},\n\t\t{\n\t\t\tyaw: 0.09754898793619304,\n\t\t\tpitch: 0.5661444781747988,\n\t\t\ttitle: 'Cutlery Basics Set',\n\t\t\ttext: `\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t

    Cutlery Basics Set (#101419)

    \n\t\t\t\t\t\t\t\t\tAll the essential cutting tools new kitchens need. First, you need a few \n\t\t\t\t\t\t\t\t\tdifferent size cutting boards for any prep task. Then, a variety of knife sizes \n\t\t\t\t\t\t\t\t\tand styles for a variety of foods—the right knife for the job makes a \n\t\t\t\t\t\t\t\t\tdifference! And lastly, quality steak knives for enjoying those heartier meals.\n\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\tGreat for new cooks, first-time homeowners, college students, and empty \n\t\t\t\t\t\t\t\t\tnesters ready to refresh their kitchen!\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t`,\n\t\t\timages: [\n\t\t\t\t`\"vrk-fall24-kitchen-cutlery-set-02.jpg\"`,\n\t\t\t\t`\"vrk-fall24-kitchen-cutlery-set-03.jpg\"`,\n\t\t\t\t`\"vrk-fall24-kitchen-cutlery-set-04.jpg\"`,\n\t\t\t],\n\t\t\tvideos: [\n\t\t\t\t`
`\n\t\t\t],\n\t\t},\n\t\t{\n\t\t\tyaw: 0.5808080655022643,\n\t\t\tpitch: 0.5253043154516455,\n\t\t\ttitle: 'Cookie Baking Set',\n\t\t\ttext: `\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t

    Cookie Baking Set (#101420)

    \n\t\t\t\t\t\t\t\t\tThe perfect way to get into baking or stock your kitchen with quality baking \n\t\t\t\t\t\t\t\t\tessentials.\n\t\t\t\t\t\t\t\t\tWith two heavy-duty Cookie Sheets to bake up a storm, a Medium Scoop \n\t\t\t\t\t\t\t\t\tfor perfectly portioned cookies, two Stackable Cooling Racks for cooling \n\t\t\t\t\t\t\t\t\tand decorating, and a Teal Mini Nylon Serving Spatula to easy move and \n\t\t\t\t\t\t\t\t\tserve your delicious creations.\n\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\tGreat for new cooks, first-time homeowners, college students, and empty \n\t\t\t\t\t\t\t\t\tnesters ready to refresh their kitchen!\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t`,\n\t\t\timages: [\n\t\t\t\t`\"vrk-fall24-kitchen-cookie-set-01.jpg\"`,\n\t\t\t\t`\"vrk-fall24-kitchen-cookie-set-02.jpg\"`,\n\t\t\t\t`\"vrk-fall24-kitchen-cookie-set-03.jpg\"`,\n\t\t\t\t`\"vrk-fall24-kitchen-cookie-set-04.jpg\"`,\n\t\t\t],\n\t\t},\n\t\t{\n\t\t\tyaw: -0.3836619982848326, \n\t\t\tpitch: 0.20475223119669828,\n\t\t\ttitle: 'Utensil Starter Set',\n\t\t\ttext: `\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t

    Utensil Starter Set (#101418)

    \n\t\t\t\t\t\t\t\t\tEvery cook needs quality kitchen essentials. This set has a mix of durable, \n\t\t\t\t\t\t\t\t\tsilicone basics, along with a few multi-functional tools that make it super \n\t\t\t\t\t\t\t\t\teasy to do many tasks with just one tool, and less dishes! All together, they \n\t\t\t\t\t\t\t\t\teasily fit into the compact and sleek utensil holder that looks great on any \n\t\t\t\t\t\t\t\t\tcounter.\n\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\tGreat for new cooks, first-time homeowners, college students, and empty \n\t\t\t\t\t\t\t\t\tnesters ready to refresh their kitchen!\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t`,\n\t\t\timages: [\n\t\t\t\t`\"vrk-fall24-kitchen-utensil-set-03.jpg\"`,\n\t\t\t\t`\"vrk-fall24-kitchen-utensil-set-04.jpg\"`,\n\t\t\t],\n\t\t\tvideos: [\n\t\t\t\t`
`,\n\t\t\t\t`
`,\n\t\t\t],\n\t\t},\n\t\t{\n\t\t\tyaw: 0.012833724448508832, \n\t\t\tpitch: 0.11378186415693747,\n\t\t\ttitle: 'Brilliance Cookware Set',\n\t\t\ttext: `\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t

    5-Piece Brilliance Nonstick Cookware Set (#100772)

    \n\t\t\t\t\t\t\t\t\tStart your cookware collection or add a pop of color to it with this five-piece \n\t\t\t\t\t\t\t\t\tset! It includes all the basic pieces you'll need to make delicious, no-fuss \n\t\t\t\t\t\t\t\t\tmeals every day. With high-quality nonstick coatings on the inside and \n\t\t\t\t\t\t\t\t\toutside of this cookware, you can be sure your food will slide right out—and \n\t\t\t\t\t\t\t\t\tbecause it's dishwasher-safe, cleanup has never been easier.\n\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\tGreat for new cooks, first-time homeowners, college students, and empty \n\t\t\t\t\t\t\t\t\tnesters ready to refresh their kitchen!\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t`,\n\t\t\timages: [\n\t\t\t\t`\"vrk-fall24-kitchen-cookware-03.jpg\"`,\n\t\t\t\t`\"vrk-fall24-kitchen-cookware-04.jpg\"`,\n\t\t\t],\n\t\t\tvideos: [\n\t\t\t\t`
`,\n\t\t\t\t`
`,\n\t\t\t],\n\t\t}\n\t],\n};\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nmodule.exports = {\n\n // Stages.\n WebGlStage: require('./stages/WebGl'),\n CssStage: require('./stages/Css'),\n FlashStage: require('./stages/Flash'),\n\n // Renderers.\n WebGlCubeRenderer: require('./renderers/WebGlCube'),\n WebGlFlatRenderer: require('./renderers/WebGlFlat'),\n WebGlEquirectRenderer: require('./renderers/WebGlEquirect'),\n CssCubeRenderer: require('./renderers/CssCube'),\n CssFlatRenderer: require('./renderers/CssFlat'),\n FlashCubeRenderer: require('./renderers/FlashCube'),\n FlashFlatRenderer: require('./renderers/FlashFlat'),\n registerDefaultRenderers: require('./renderers/registerDefaultRenderers'),\n\n // Geometries.\n CubeGeometry: require('./geometries/Cube'),\n FlatGeometry: require('./geometries/Flat'),\n EquirectGeometry: require('./geometries/Equirect'),\n\n // Views.\n RectilinearView: require('./views/Rectilinear'),\n FlatView: require('./views/Flat'),\n\n // Sources.\n ImageUrlSource: require('./sources/ImageUrl'),\n SingleAssetSource: require('./sources/SingleAsset'),\n\n // Assets.\n StaticAsset: require('./assets/Static'),\n DynamicAsset: require('./assets/Dynamic'),\n\n // Texture store.\n TextureStore: require('./TextureStore'),\n\n // Layer.\n Layer: require('./Layer'),\n\n // Render loop.\n RenderLoop: require('./RenderLoop'),\n\n // Controls.\n KeyControlMethod: require('./controls/Key'),\n DragControlMethod: require('./controls/Drag'),\n QtvrControlMethod: require('./controls/Qtvr'),\n ScrollZoomControlMethod: require('./controls/ScrollZoom'),\n PinchZoomControlMethod: require('./controls/PinchZoom'),\n VelocityControlMethod: require('./controls/Velocity'),\n ElementPressControlMethod: require('./controls/ElementPress'),\n Controls: require('./controls/Controls'),\n Dynamics: require('./controls/Dynamics'),\n\n // High-level API.\n Viewer: require('./Viewer'),\n Scene: require('./Scene'),\n\n // Hotspots.\n Hotspot: require('./Hotspot'),\n HotspotContainer: require('./HotspotContainer'),\n\n // Effects.\n colorEffects: require('./colorEffects'),\n\n // Miscellaneous functions.\n registerDefaultControls: require('./controls/registerDefaultControls'),\n autorotate: require('./autorotate'),\n\n // Utility functions.\n util: {\n async: require('./util/async'),\n cancelize: require('./util/cancelize'),\n chain: require('./util/chain'),\n clamp: require('./util/clamp'),\n clearOwnProperties: require('./util/clearOwnProperties'),\n cmp: require('./util/cmp'),\n compose: require('./util/compose'),\n convertFov: require('./util/convertFov'),\n decimal: require('./util/decimal'),\n defaults: require('./util/defaults'),\n defer: require('./util/defer'),\n degToRad: require('./util/degToRad'),\n delay: require('./util/delay'),\n dom: require('./util/dom'),\n extend: require('./util/extend'),\n hash: require('./util/hash'),\n inherits: require('./util/inherits'),\n mod: require('./util/mod'),\n noop: require('./util/noop'),\n now: require('./util/now'),\n once: require('./util/once'),\n pixelRatio: require('./util/pixelRatio'),\n radToDeg: require('./util/radToDeg'),\n real: require('./util/real'),\n retry: require('./util/retry'),\n tween: require('./util/tween'),\n type: require('./util/type')\n },\n\n // Expose dependencies for clients to use.\n dependencies: {\n bowser: require('bowser'),\n glMatrix: require('gl-matrix'),\n eventEmitter: require('minimal-event-emitter'),\n hammerjs: require('hammerjs')\n }\n};\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar Stage = require('./Stage');\nvar HtmlImageLoader = require('../loaders/HtmlImage');\nvar webGlSupported = require('../support/WebGl');\nvar browser = require('bowser');\nvar inherits = require('../util/inherits');\nvar pixelRatio = require('../util/pixelRatio');\nvar ispot = require('../util/ispot');\nvar setAbsolute = require('../util/dom').setAbsolute;\nvar setFullSize = require('../util/dom').setFullSize;\nvar clearOwnProperties = require('../util/clearOwnProperties');\n\nvar debug = typeof MARZIPANODEBUG !== 'undefined' && MARZIPANODEBUG.webGl;\n\n\n// Browser-specific workarounds.\nvar browserQuirks = {\n // Whether to use texImage2D instead of texSubImage2D when repainting an\n // existing texture from a video element. On most browsers texSubImage2D is\n // faster, but on Chrome the performance degrades significantly. See:\n // https://bugs.chromium.org/p/chromium/issues/detail?id=612542\n videoUseTexImage2D: browser.chrome\n};\n\n\nfunction initWebGlContext(canvas, opts) {\n var options = {\n alpha: true,\n premultipliedAlpha: true,\n antialias: !!(opts && opts.antialias),\n preserveDrawingBuffer: !!(opts && opts.preserveDrawingBuffer)\n };\n\n if (debug && typeof WebGLDebugUtils !== 'undefined') {\n console.log('Using WebGL lost context simulator');\n canvas = WebGLDebugUtils.makeLostContextSimulatingCanvas(canvas);\n }\n\n // Keep support/WebGl.js in sync with this.\n var gl = (canvas.getContext) && (canvas.getContext('webgl', options) || canvas.getContext('experimental-webgl', options));\n\n if (!gl) {\n throw new Error('Could not get WebGL context');\n }\n\n if (debug && typeof WebGLDebugUtils !== \"undefined\") {\n gl = WebGLDebugUtils.makeDebugContext(gl);\n console.log('Using WebGL debug context');\n }\n\n return gl;\n}\n\n/**\n * @class WebGlStage\n * @extends Stage\n * @classdesc\n *\n * A {@link Stage} implementation using WebGl.\n *\n * @param {Object} opts\n * @param {boolean} [opts.antialias=false]\n * @param {boolean} [opts.preserveDrawingBuffer=false]\n * @param {boolean} [opts.generateMipmaps=false]\n *\n * The `antialias` and `preserveDrawingBuffer` options control the WebGL\n * context attributes of the same name. The `alpha` and `premultipliedAlpha`\n * WebGL context attributes are set to their default true value and cannot\n * be overriden; this allows semitransparent textures to be composited with\n * the page. See:\n * https://www.khronos.org/registry/webgl/specs/1.0/#WEBGLCONTEXTATTRIBUTES\n *\n * The `generateMipmaps` option controls texture mipmap generation. Mipmaps\n * may improve rendering quality, at the cost of increased memory usage.\n * Due to technical limitations, they are only generated for textures whose\n * dimensions are a power of two. See:\n * https://www.khronos.org/webgl/wiki/WebGL_and_OpenGL_Differences#Non-Power_of_Two_Texture_Support\n *\n * Also see the available {@link Stage} options.\n */\nfunction WebGlStage(opts) {\n opts = opts || {};\n\n var self = this;\n\n this.constructor.super_.call(this, opts);\n\n this._generateMipmaps = opts.generateMipmaps != null ?\n opts.generateMipmaps : false;\n\n this._loader = new HtmlImageLoader(this);\n\n this._domElement = document.createElement('canvas');\n\n setAbsolute(this._domElement);\n setFullSize(this._domElement);\n\n this._gl = initWebGlContext(this._domElement, opts);\n\n this._handleContextLoss = function() {\n self.emit('webglcontextlost');\n self._gl = null;\n };\n\n // Handle WebGl context loss.\n this._domElement.addEventListener('webglcontextlost', this._handleContextLoss);\n\n // WebGl renderers are singletons for a given stage. This list stores the\n // existing renderers so they can be reused across layers with the same\n // geometry and view type.\n this._rendererInstances = [];\n}\n\ninherits(WebGlStage, Stage);\n\n\n/**\n * Destructor.\n */\nWebGlStage.prototype.destroy = function() {\n this._domElement.removeEventListener('webglcontextlost', this._handleContextLoss);\n // Delegate clearing own properties to the Stage destructor.\n this.constructor.super_.prototype.destroy.call(this);\n};\n\n\nWebGlStage.supported = function() {\n return webGlSupported();\n};\n\n\n/**\n * Returns the underlying DOM element.\n *\n * @return {Element}\n */\nWebGlStage.prototype.domElement = function() {\n return this._domElement;\n};\n\n\n/**\n * Returns the underlying WebGL rendering context.\n *\n * @return {WebGLRenderingContext }\n */\nWebGlStage.prototype.webGlContext = function() {\n return this._gl;\n};\n\n\nWebGlStage.prototype.setSizeForType = function() {\n // Update the size of the canvas coordinate space.\n //\n // The size is obtained by taking the stage dimensions, which are set in CSS\n // pixels, and multiplying them by the device pixel ratio. Crucially, this\n // must be the only place where the WebGL rendering pipeline accesses the\n // pixel ratio; subsequent uses should reference the `drawingBufferWidth` and\n // `drawingBufferHeight` properties on the WebGLRenderingContext. Failing to\n // do so will break the rendering if the pixel ratio changes but the stage\n // size does not, e.g. when moving the window across screens.\n var ratio = pixelRatio();\n this._domElement.width = ratio * this._width;\n this._domElement.height = ratio * this._height;\n};\n\n\nWebGlStage.prototype.loadImage = function(url, rect, done) {\n return this._loader.loadImage(url, rect, done);\n};\n\n\nWebGlStage.prototype.maxTextureSize = function() {\n return this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE);\n};\n\n\nWebGlStage.prototype.validateLayer = function(layer) {\n var tileSize = layer.geometry().maxTileSize();\n var maxTextureSize = this.maxTextureSize();\n if (tileSize > maxTextureSize) {\n throw new Error('Layer has level with tile size larger than maximum texture size (' + tileSize + ' vs. ' + maxTextureSize + ')');\n }\n};\n\n\nWebGlStage.prototype.createRenderer = function(Renderer) {\n var rendererInstances = this._rendererInstances;\n for (var i = 0; i < rendererInstances.length; i++) {\n if (rendererInstances[i] instanceof Renderer) {\n return rendererInstances[i];\n }\n }\n var renderer = new Renderer(this._gl);\n rendererInstances.push(renderer);\n return renderer;\n};\n\n\nWebGlStage.prototype.destroyRenderer = function(renderer) {\n var rendererInstances = this._rendererInstances;\n if (this._renderers.indexOf(renderer) < 0) {\n renderer.destroy();\n var index = rendererInstances.indexOf(renderer);\n if (index >= 0) {\n rendererInstances.splice(index, 1);\n }\n }\n};\n\n\nWebGlStage.prototype.startFrame = function() {\n\n var gl = this._gl;\n\n if (!gl) {\n throw new Error('Bad WebGL context - maybe context was lost?');\n }\n\n // Set the WebGL viewport.\n gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);\n\n // Clear framebuffer.\n gl.clearColor(0.0, 0.0, 0.0, 0.0);\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n\n // Enable depth testing.\n gl.enable(gl.DEPTH_TEST);\n\n // Enable blending. ONE and ONE_MINUS_SRC_ALPHA are the right choices for\n // premultiplied textures.\n gl.enable(gl.BLEND);\n gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n\n};\n\n\nWebGlStage.prototype.endFrame = function() {};\n\n\nWebGlStage.prototype.takeSnapshot = function (options) {\n\n // Validate passed argument\n if (typeof options !== 'object' || options == null) {\n options = {};\n }\n\n var quality = options.quality;\n\n // Set default quality if it is not passed\n if (typeof quality == 'undefined') {\n quality = 75;\n }\n\n // Throw if quality is of invlid type or out of bounds\n if (typeof quality !== 'number' || quality < 0 || quality > 100) {\n throw new Error('WebGLStage: Snapshot quality needs to be a number between 0 and 100');\n }\n\n // Canvas method \"toDataURL\" needs to be called in the same\n // context as where the actual rendering is done. Hence this.\n this.render();\n\n // Return the snapshot\n return this._domElement.toDataURL('image/jpeg',quality/100);\n}\n\n\nWebGlStage.type = WebGlStage.prototype.type = 'webgl';\n\n\nfunction WebGlTexture(stage, tile, asset) {\n this._stage = stage;\n this._gl = stage._gl;\n this._texture = null;\n this._timestamp = null;\n this._width = this._height = null;\n this.refresh(tile, asset);\n}\n\n\nWebGlTexture.prototype.refresh = function(tile, asset) {\n\n var gl = this._gl;\n var stage = this._stage;\n var texture;\n\n // Check whether the texture needs to be updated.\n var timestamp = asset.timestamp();\n if (timestamp === this._timestamp) {\n return;\n }\n\n // Get asset element.\n var element = asset.element();\n\n // Get asset dimensions.\n var width = asset.width();\n var height = asset.height();\n\n if (width !== this._width || height !== this._height) {\n\n // If the texture dimensions have changed since the last refresh, create\n // a new texture with the correct size.\n\n // Check if texture dimensions would exceed the maximum texture size.\n var maxSize = stage.maxTextureSize();\n if (width > maxSize) {\n throw new Error('Texture width larger than max size (' + width + ' vs. ' + maxSize + ')');\n }\n if (height > maxSize) {\n throw new Error('Texture height larger than max size (' + height + ' vs. ' + maxSize + ')');\n }\n\n // Delete the current texture if it exists.\n // This is necessary for Chrome on Android. If it isn't done the textures\n // do not render when the size changes.\n if (this._texture) {\n gl.deleteTexture(texture);\n }\n\n // The texture must be premultiplied by alpha to ensure correct blending of\n // semitransparent textures. For details, see:\n // http://www.realtimerendering.com/blog/gpus-prefer-premultiplication/\n texture = this._texture = gl.createTexture();\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, element);\n\n } else {\n\n // If the texture dimensions remain the same, repaint the existing texture.\n // Repainting with texSubImage2D is usually faster than with texImage2D,\n // except in the case noted in browserQuirks.\n\n texture = this._texture;\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);\n\n if (element instanceof HTMLVideoElement && browserQuirks.videoUseTexImage2D) {\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, element);\n } else {\n gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, element);\n }\n\n }\n\n // Generate mipmap if the corresponding stage option is set and the texture\n // dimensions are powers of two.\n if (stage._generateMipmaps && ispot(width) && ispot(height)) {\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR_MIPMAP_LINEAR);\n gl.generateMipmap(gl.TEXTURE_2D);\n } else {\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n }\n\n // Clamp texture to edges.\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n\n // Unbind texture.\n gl.bindTexture(gl.TEXTURE_2D, null);\n\n // Update texture dimensions and timestamp.\n this._timestamp = timestamp;\n this._width = width;\n this._height = height;\n\n};\n\n\nWebGlTexture.prototype.destroy = function() {\n if (this._texture) {\n this._gl.deleteTexture(this._texture);\n }\n clearOwnProperties(this);\n};\n\n\nWebGlStage.TextureClass = WebGlStage.prototype.TextureClass = WebGlTexture;\n\n\nmodule.exports = WebGlStage;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar eventEmitter = require('minimal-event-emitter');\nvar WorkQueue = require('../collections/WorkQueue');\nvar calcRect = require('../util/calcRect');\nvar async = require('../util/async');\nvar cancelize = require('../util/cancelize');\nvar clearOwnProperties = require('../util/clearOwnProperties');\n\nvar RendererRegistry = require('./RendererRegistry');\n\nfunction forwardTileCmp(t1, t2) {\n return t1.cmp(t2);\n}\n\nfunction reverseTileCmp(t1, t2) {\n return -t1.cmp(t2);\n}\n\n/**\n * Signals that the stage has been rendered.\n *\n * @param {boolean} stable Whether all tiles were successfully rendered without\n * missing textures or resorting to fallbacks.\n * @event Stage#renderComplete\n */\n\n/**\n * Signals that the contents of the stage have been invalidated and must be\n * rendered again.\n *\n * This is used by the {@link RenderLoop} implementation.\n *\n * @event Stage#renderInvalid\n */\n\n/**\n * @interface Stage\n * @classdesc\n *\n * A Stage is a container with the ability to render a stack of\n * {@link Layer layers}.\n *\n * This is a superclass containing logic that is common to all implementations;\n * it should never be instantiated directly. Instead, use one of the\n * subclasses: {@link WebGlStage}, {@link CssStage} or {@link FlashStage}.\n *\n * @param {Object} opts\n * @param {boolean} [opts.progressive=false]\n *\n * Options listed here may be passed into the `opts` constructor argument of\n * subclasses.\n *\n * The `progressive` option controls whether resolution levels are loaded in\n * order, from lowest to highest. This results in a more pleasing effect when\n * zooming past several levels in a large panoramas, but consumes additional\n * bandwidth.\n */\nfunction Stage(opts) {\n this._progressive = !!(opts && opts.progressive);\n\n // The list of layers in display order (background to foreground).\n this._layers = [];\n\n // The list of renderers; the i-th renderer is for the i-th layer.\n this._renderers = [];\n\n // The lists of tiles to load and render, populated during render().\n this._tilesToLoad = [];\n this._tilesToRender = [];\n\n // Temporary tile lists.\n this._tmpVisible = [];\n this._tmpChildren = [];\n\n // Cached stage dimensions.\n // Start with zero, which inhibits rendering until setSize() is called.\n this._width = 0;\n this._height = 0;\n\n // Temporary variable for rect.\n this._tmpRect = {};\n\n // Temporary variable for size.\n this._tmpSize = {};\n\n // Work queue for createTexture.\n this._createTextureWorkQueue = new WorkQueue();\n\n // Function to emit event when render parameters have changed.\n this._emitRenderInvalid = this._emitRenderInvalid.bind(this);\n\n // The renderer registry maps each geometry/view pair into the respective\n // Renderer class.\n this._rendererRegistry = new RendererRegistry();\n}\n\neventEmitter(Stage);\n\n\n/**\n * Destructor.\n */\nStage.prototype.destroy = function() {\n this.removeAllLayers();\n clearOwnProperties(this);\n};\n\n\n/**\n * Registers a {@link Renderer} for the given {@link Geometry} and {@link View}\n * type.\n *\n * The {@link registerDefaultRenderers} utility function may be used to\n * register all known renderers for a stage type into that stage. Most users\n * will not need to register renderers, as {@link Viewer} does it for them.\n *\n * @param {string} geometryType The geometry type, as given by\n * {@link Geometry#type}.\n * @param {string} viewType The view type, as given by {@link View#type}.\n * @param {*} Renderer The renderer class.\n */\nStage.prototype.registerRenderer = function(geometryType, viewType, Renderer) {\n return this._rendererRegistry.set(geometryType, viewType, Renderer);\n};\n\n\n/**\n * Returns the underlying DOM element.\n *\n * Must be overridden by subclasses.\n *\n * @return {Element}\n */\nStage.prototype.domElement = function() {\n throw new Error('Stage implementation must override domElement');\n};\n\n\n/**\n * Get the stage width.\n * @return {number}\n */\nStage.prototype.width = function() {\n return this._width;\n};\n\n\n/**\n * Get the stage height.\n * @return {number}\n */\nStage.prototype.height = function() {\n return this._height;\n};\n\n\n/**\n * Get the stage dimensions. If an argument is supplied, it is filled in with\n * the result and returned. Otherwise, a fresh object is filled in and returned.\n *\n * @param {Size=} size\n */\nStage.prototype.size = function(size) {\n size = size || {};\n size.width = this._width;\n size.height = this._height;\n return size;\n};\n\n\n/**\n * Set the stage dimensions.\n *\n * This contains the size update logic common to all stage types. Subclasses\n * must define the {@link Stage#setSizeForType} method to perform their own\n * logic.\n *\n * @param {Size} size\n */\nStage.prototype.setSize = function(size) {\n this._width = size.width;\n this._height = size.height;\n\n this.setSizeForType(); // must be defined by subclasses.\n\n this.emit('resize');\n this._emitRenderInvalid();\n};\n\n\n/**\n * Call {@link Stage#setSize} instead.\n *\n * This contains the size update logic specific to a stage type. It is called by\n * {@link Stage#setSize} after the base class has been updated to reflect the\n * new size, but before any events are emitted.\n *\n * @param {Size} size\n */\nStage.prototype.setSizeForType = function(size) {\n throw new Error('Stage implementation must override setSizeForType');\n};\n\n\n/**\n * Loads an {@link Asset} from an image.\n * @param {string} url The image URL.\n * @param {?Rect} rect A {@link Rect} describing a portion of the image, or null\n * to use the full image.\n * @param {function(?Error, Asset)} done The callback.\n * @return {function()} A function to cancel loading.\n */\nStage.prototype.loadImage = function() {\n throw new Error('Stage implementation must override loadImage');\n};\n\n\nStage.prototype._emitRenderInvalid = function() {\n this.emit('renderInvalid');\n};\n\n\n/**\n * Verifies that the layer is valid for this stage, throwing an exception\n * otherwise.\n *\n * @param {Layer} layer\n * @throws {Error} If the layer is not valid for this stage.\n */\nStage.prototype.validateLayer = function(layer) {\n throw new Error('Stage implementation must override validateLayer');\n};\n\n\n/**\n * Returns a list of all {@link Layer layers} belonging to the stage. The\n * returned list is in display order, background to foreground.\n * @return {Layer[]}\n */\nStage.prototype.listLayers = function() {\n // Return a copy to prevent unintended mutation by the caller.\n return [].concat(this._layers);\n};\n\n\n/**\n * Return whether a {@link Layer layer} belongs to the stage.\n * @param {Layer} layer\n * @return {boolean}\n */\nStage.prototype.hasLayer = function(layer) {\n return this._layers.indexOf(layer) >= 0;\n};\n\n\n/**\n * Adds a {@link Layer layer} into the stage.\n * @param {Layer} layer The layer to add.\n * @param {number|undefined} i The optional position, where 0 ≤ i ≤ n and n is\n * the current number of layers. The default is n, which inserts at the\n * top of the display stack.\n * @throws An error if the layer already belongs to the stage or if the position\n * is invalid.\n */\nStage.prototype.addLayer = function(layer, i) {\n if (this._layers.indexOf(layer) >= 0) {\n throw new Error('Layer already in stage');\n }\n\n if (i == null) {\n i = this._layers.length;\n }\n if (i < 0 || i > this._layers.length) {\n throw new Error('Invalid layer position');\n }\n\n this.validateLayer(layer); // must be defined by subclasses.\n\n var geometryType = layer.geometry().type;\n var viewType = layer.view().type;\n var rendererClass = this._rendererRegistry.get(geometryType, viewType);\n if (!rendererClass) {\n throw new Error('No ' + this.type + ' renderer avaiable for ' +\n geometryType + ' geometry and ' + viewType + ' view');\n }\n var renderer = this.createRenderer(rendererClass);\n\n this._layers.splice(i, 0, layer);\n this._renderers.splice(i, 0, renderer);\n\n // Listeners for render invalid.\n layer.addEventListener('viewChange', this._emitRenderInvalid);\n layer.addEventListener('effectsChange', this._emitRenderInvalid);\n layer.addEventListener('fixedLevelChange', this._emitRenderInvalid);\n layer.addEventListener('textureStoreChange', this._emitRenderInvalid);\n\n this._emitRenderInvalid();\n};\n\n\n/**\n * Moves a {@link Layer layer} into a different position in the display stack.\n * @param {Layer} layer The layer to move.\n * @param {number} i The position, where 0 ≤ i ≤ n-1 and n is the current number\n * of layers.\n * @throws An error if the layer does not belong to the stage or if the position\n * is invalid.\n */\nStage.prototype.moveLayer = function(layer, i) {\n var index = this._layers.indexOf(layer);\n if (index < 0) {\n throw new Error('No such layer in stage');\n }\n\n if (i < 0 || i >= this._layers.length) {\n throw new Error('Invalid layer position');\n }\n\n layer = this._layers.splice(index, 1)[0];\n var renderer = this._renderers.splice(index, 1)[0];\n\n this._layers.splice(i, 0, layer);\n this._renderers.splice(i, 0, renderer);\n\n this._emitRenderInvalid();\n};\n\n\n/**\n * Removes a {@link Layer} from the stage.\n * @param {Layer} layer The layer to remove.\n * @throws An error if the layer does not belong to the stage.\n */\nStage.prototype.removeLayer = function(layer) {\n var index = this._layers.indexOf(layer);\n if (index < 0) {\n throw new Error('No such layer in stage');\n }\n\n var removedLayer = this._layers.splice(index, 1)[0];\n var renderer = this._renderers.splice(index, 1)[0];\n\n this.destroyRenderer(renderer);\n\n removedLayer.removeEventListener('viewChange', this._emitRenderInvalid);\n removedLayer.removeEventListener('effectsChange', this._emitRenderInvalid);\n removedLayer.removeEventListener('fixedLevelChange', this._emitRenderInvalid);\n removedLayer.removeEventListener('textureStoreChange', this._emitRenderInvalid);\n\n this._emitRenderInvalid();\n};\n\n\n/**\n * Removes all {@link Layer layers} from the stage.\n */\nStage.prototype.removeAllLayers = function() {\n while (this._layers.length > 0) {\n this.removeLayer(this._layers[0]);\n }\n};\n\n\n/**\n * Called before a frame is rendered.\n *\n * Must be overridden by subclasses.\n */\nStage.prototype.startFrame = function() {\n throw new Error('Stage implementation must override startFrame');\n};\n\n\n/**\n * Called after a frame is rendered.\n *\n * Must be overridden by subclasses.\n */\nStage.prototype.endFrame = function() {\n throw new Error('Stage implementation must override endFrame');\n};\n\n\n/**\n * Render the current frame. Usually called from a {@link RenderLoop}.\n *\n * This contains the rendering logic common to all stage types. Subclasses\n * define the startFrame() and endFrame() methods to perform their own logic.\n */\nStage.prototype.render = function() {\n var i, j;\n\n var tilesToLoad = this._tilesToLoad;\n var tilesToRender = this._tilesToRender;\n\n var stableStage = true;\n var stableLayer;\n\n // Get the stage dimensions.\n var width = this._width;\n var height = this._height;\n\n var rect = this._tmpRect;\n var size = this._tmpSize;\n\n if (width <= 0 || height <= 0) {\n return;\n }\n\n this.startFrame(); // defined by subclasses\n\n // Signal start of frame to the texture stores.\n for (i = 0; i < this._layers.length; i++) {\n this._layers[i].textureStore().startFrame();\n }\n\n // Render layers.\n for (i = 0; i < this._layers.length; i++) {\n var layer = this._layers[i];\n var effects = layer.effects();\n var view = layer.view();\n var textureStore = layer.textureStore();\n var renderer = this._renderers[i];\n var depth = this._layers.length - i;\n var tile, texture;\n\n // Convert the rect effect into a normalized rect.\n // TODO: avoid doing this on every frame.\n calcRect(width, height, effects && effects.rect, rect);\n\n if (rect.width <= 0 || rect.height <= 0) {\n // Skip rendering on a null viewport.\n continue;\n }\n\n // Update the view size.\n size.width = rect.width * this._width;\n size.height = rect.height * this._height;\n view.setSize(size);\n\n // Signal start of layer to the renderer.\n renderer.startLayer(layer, rect);\n\n // We render with both alpha blending and depth testing enabled. Thus, when\n // rendering a subsequent pixel at the same location than an existing one,\n // the subsequent pixel gets discarded unless it has smaller depth, and is\n // otherwise composited with the existing pixel.\n //\n // When using fallback tiles to fill a gap in the preferred resolution\n // level, we prefer higher resolution fallbacks to lower resolution ones.\n // However, where fallbacks overlap, we want higher resolution ones to\n // prevail, and we don't want multiple fallbacks to be composited with each\n // other, as that would produce a bad result when semitransparent textures\n // are involved.\n //\n // In order to achieve this within the constraints of alpha blending and\n // depth testing, the depth of a tile must be inversely proportional to its\n // resolution, and higher-resolution tiles must be rendered before lower-\n // resolution ones.\n\n // Collect the lists of tiles to load and render.\n stableLayer = this._collectTiles(layer, textureStore);\n\n // Mark all the tiles whose textures must be loaded.\n // This will either trigger loading (for textures not yet loaded) or\n // prevent unloading (for textures already loaded).\n for (j = 0; j < tilesToLoad.length; j++) {\n tile = tilesToLoad[j];\n textureStore.markTile(tile);\n }\n\n // Render tiles.\n for (j = 0; j < tilesToRender.length; j++) {\n tile = tilesToRender[j];\n texture = textureStore.texture(tile);\n renderer.renderTile(tile, texture, layer, depth);\n }\n\n layer.emit('renderComplete', stableLayer);\n if (!stableLayer) {\n stableStage = false;\n }\n\n // Signal end of layer to the renderer.\n renderer.endLayer(layer, rect);\n }\n\n // Signal end of frame to the texture stores.\n for (i = 0; i < this._layers.length; i++) {\n this._layers[i].textureStore().endFrame();\n }\n\n this.endFrame(); // defined by subclasses\n\n this.emit('renderComplete', stableStage);\n};\n\nStage.prototype._collectTiles = function(layer, textureStore) {\n var tilesToLoad = this._tilesToLoad;\n var tilesToRender = this._tilesToRender;\n var tmpVisible = this._tmpVisible;\n\n tilesToLoad.length = 0;\n tilesToRender.length = 0;\n tmpVisible.length = 0;\n\n layer.visibleTiles(tmpVisible);\n\n var isStable = true;\n\n for (var i = 0; i < tmpVisible.length; i++) {\n var tile = tmpVisible[i];\n var needsFallback;\n this._collectTileToLoad(tile);\n if (textureStore.texture(tile)) {\n // The preferred texture is available.\n // No fallback is required.\n needsFallback = false;\n this._collectTileToRender(tile);\n } else {\n // The preferred texture is unavailable.\n // Collect children for rendering as a fallback.\n needsFallback = this._collectChildren(tile, textureStore);\n isStable = false;\n }\n // Collect all parents for loading, and the closest parent for rendering if\n // a fallback is required.\n this._collectParents(tile, textureStore, needsFallback);\n }\n\n // Sort tiles to load in ascending resolution order.\n tilesToLoad.sort(forwardTileCmp);\n\n // Sort tiles to render in descending resolution order.\n tilesToRender.sort(reverseTileCmp);\n\n return isStable;\n};\n\nStage.prototype._collectChildren = function(tile, textureStore) {\n var tmpChildren = this._tmpChildren;\n\n var needsFallback = true;\n\n // Fall back as many levels as necessary on single-child geometries, but do\n // not go beyond immediate children on multiple-child geometries, to avoid\n // exploring an exponential number of tiles.\n do {\n tmpChildren.length = 0;\n if (!tile.children(tmpChildren)) {\n break;\n }\n needsFallback = false;\n for (var i = 0; i < tmpChildren.length; i++) {\n tile = tmpChildren[i];\n if (textureStore.texture(tile)) {\n this._collectTileToLoad(tile);\n this._collectTileToRender(tile);\n } else {\n needsFallback = true;\n }\n }\n } while (needsFallback && tmpChildren.length === 1)\n\n return needsFallback;\n};\n\nStage.prototype._collectParents = function(tile, textureStore, needsFallback) {\n // Recursively visit parent tiles until:\n // - all parents have been marked for loading, if progressive rendering is\n // enabled; and\n // - at least one parent has been marked for both loading and rendering, if\n // a fallback is required.\n var needsLoading = this._progressive;\n while ((needsLoading || needsFallback) && (tile = tile.parent()) != null) {\n if (needsFallback) {\n if (textureStore.texture(tile)) {\n this._collectTileToRender(tile);\n needsFallback = false;\n } else if (!this._progressive) {\n continue;\n }\n }\n if (!this._collectTileToLoad(tile)) {\n needsLoading = false;\n }\n }\n return needsFallback;\n};\n\nStage.prototype._collectTileToLoad = function(tile) {\n return this._collectTileIntoList(tile, this._tilesToLoad);\n};\n\nStage.prototype._collectTileToRender = function(tile) {\n return this._collectTileIntoList(tile, this._tilesToRender);\n};\n\nStage.prototype._collectTileIntoList = function(tile, tileList) {\n // TODO: Investigate whether it's worth it to make this better than O(n²).\n var found = false;\n for (var i = 0; i < tileList.length; i++) {\n if (tile.equals(tileList[i])) {\n found = true;\n break;\n }\n }\n if (!found) {\n tileList.push(tile);\n }\n return !found;\n};\n\n/**\n * Create a texture for the given tile and asset. Called by {@link TextureStore}.\n * @param {Tile} tile\n * @param {Asset} asset\n * @param {Function} done\n */\nStage.prototype.createTexture = function(tile, asset, done) {\n\n var self = this;\n\n function makeTexture() {\n return new self.TextureClass(self, tile, asset);\n }\n\n var fn = cancelize(async(makeTexture));\n\n return this._createTextureWorkQueue.push(fn, function(err, texture) {\n done(err, tile, asset, texture);\n });\n\n};\n\n/**\n * The stage type, used to determine the appropriate renderer for a given\n * geometry and view.\n *\n * Known values are `\"webgl\"`, `\"css\"` and `\"flash\"`.\n *\n * See also {@link Stage#registerRenderer}.\n *\n * @property {string}\n * @name Stage#type\n */\n\nmodule.exports = Stage;\n","'use strict';\n\n/**\n * @class\n * @classdesc Minimalistic event emitter mixin.\n */\nfunction EventEmitter() {}\n\n/**\n * Registers an event listener for the specified event. If the listener has\n * already been registered for the event, this is a no-op.\n *\n * @param {string} name The event name.\n * @param {function} fn The listener function.\n */\nEventEmitter.prototype.addEventListener = function(name, fn) {\n var eventMap = this.__events = this.__events || {};\n var handlerList = eventMap[name] = eventMap[name] || [];\n if (handlerList.indexOf(fn) < 0) {\n handlerList.push(fn);\n }\n};\n\n/**\n * Unregisters an event listener from the specified event. If the listener\n * hasn't been registered for the event, this is a no-op.\n *\n * @param {string} name The event name.\n * @param {function} fn The listener function.\n */\nEventEmitter.prototype.removeEventListener = function(name, fn) {\n var eventMap = this.__events = this.__events || {};\n var handlerList = eventMap[name];\n if (handlerList) {\n var index = handlerList.indexOf(fn);\n if (index >= 0) {\n handlerList.splice(index, 1);\n }\n }\n};\n\n/**\n * Emits an event, causing all registered event listeners for that event to be\n * called in registration order.\n *\n * @param {string} name The event name.\n * @param {...*} var_args Arguments to call listeners with.\n */\nEventEmitter.prototype.emit = function(name, var_args) {\n var eventMap = this.__events = this.__events || {};\n var handlerList = eventMap[name];\n var args = Array.prototype.slice.call(arguments, 1);\n if (handlerList) {\n for (var i = 0; i < handlerList.length; i++) {\n var fn = handlerList[i];\n fn.apply(this, args);\n }\n }\n};\n\n/**\n * Mixes in {@link EventEmitter} into a constructor function.\n *\n * @param {function} ctor The constructor function.\n */\nfunction eventEmitter(ctor) {\n for (var prop in EventEmitter.prototype) {\n if (EventEmitter.prototype.hasOwnProperty(prop)) {\n ctor.prototype[prop] = EventEmitter.prototype[prop];\n }\n }\n}\n\nmodule.exports = eventEmitter;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar now = require('../util/now');\n\n\nfunction WorkTask(fn, cb) {\n this.fn = fn;\n this.cb = cb;\n this.cfn = null;\n}\n\n\nfunction WorkQueue(opts) {\n this._queue = [];\n this._delay = opts && opts.delay || 0;\n this._paused = opts && !!opts.paused || false;\n this._currentTask = null;\n this._lastFinished = null;\n}\n\n\nWorkQueue.prototype.length = function() {\n return this._queue.length;\n};\n\n\nWorkQueue.prototype.push = function(fn, cb) {\n\n var task = new WorkTask(fn, cb);\n\n var cancel = this._cancel.bind(this, task);\n\n // Push the task into the queue.\n this._queue.push(task);\n\n // Run the task if idle.\n this._next();\n\n return cancel;\n\n};\n\n\nWorkQueue.prototype.pause = function() {\n if (!this._paused) {\n this._paused = true;\n }\n};\n\n\nWorkQueue.prototype.resume = function() {\n if (this._paused) {\n this._paused = false;\n this._next();\n }\n};\n\n\nWorkQueue.prototype._start = function(task) {\n\n // Consistency check.\n if (this._currentTask) {\n throw new Error('WorkQueue: called start while running task');\n }\n\n // Mark queue as busy, so that concurrent tasks wait.\n this._currentTask = task;\n\n // Execute the task.\n var finish = this._finish.bind(this, task);\n task.cfn = task.fn(finish);\n\n // Detect when a non-cancellable function has been queued.\n if (typeof task.cfn !== 'function') {\n throw new Error('WorkQueue: function is not cancellable');\n }\n\n};\n\n\nWorkQueue.prototype._finish = function(task) {\n\n var args = Array.prototype.slice.call(arguments, 1);\n\n // Consistency check.\n if (this._currentTask !== task) {\n throw new Error('WorkQueue: called finish on wrong task');\n }\n\n // Call the task callback on the return values.\n task.cb.apply(null, args);\n\n // Mark as not busy and record task finish time, then advance to next task.\n this._currentTask = null;\n this._lastFinished = now();\n this._next();\n\n};\n\n\nWorkQueue.prototype._cancel = function(task) {\n\n var args = Array.prototype.slice.call(arguments, 1);\n\n if (this._currentTask === task) {\n\n // Cancel running task. Because cancel passes control to the _finish\n // callback we passed into fn, the cleanup logic will be handled there.\n task.cfn.apply(null, args);\n\n } else {\n\n // Remove task from queue.\n var pos = this._queue.indexOf(task);\n if (pos >= 0) {\n this._queue.splice(pos, 1);\n task.cb.apply(null, args);\n }\n\n }\n\n};\n\n\nWorkQueue.prototype._next = function() {\n\n if (this._paused) {\n // Do not start tasks while paused.\n return;\n }\n\n if (!this._queue.length) {\n // No tasks to run.\n return;\n }\n\n if (this._currentTask) {\n // Will be called again when the current task finishes.\n return;\n }\n\n if (this._lastFinished != null) {\n var elapsed = now() - this._lastFinished;\n var remaining = this._delay - elapsed;\n if (remaining > 0) {\n // Too soon. Run again after the inter-task delay.\n setTimeout(this._next.bind(this), remaining);\n return;\n }\n }\n\n // Run the next task.\n var task = this._queue.shift();\n this._start(task);\n\n};\n\n\nmodule.exports = WorkQueue;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nfunction getNow() {\n if (typeof performance !== 'undefined' && performance.now) {\n return function performanceNow() {\n return performance.now();\n };\n }\n return function dateNow() {\n return Date.now();\n };\n}\n\nmodule.exports = getNow();\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\n/**\n * Converts a {@link RectSpec} into an equivalent {@link Rect}.\n *\n * A {@link RectSpec} is a convenient user API format, providing default values\n * and the flexibility of specifying absolute, relative or mixed dimensions.\n *\n * A {@link Rect} is a more convenient format for the rendering pipeline. It is\n * always expressed in normalized coordinates, and all its properties are\n * guaranteed to be present.\n *\n * @param {number} totalWidth The total width of the rendering area in pixels.\n * @param {number} totalHeight The total height of the rendering area in pixels.\n * @param {RectSpec} spec The input spec, defaulting to the full rendering area\n * if null or undefined.\n * @param {Rect} result The output spec. If the argument is present, it is\n * filled in and returned; otherwise, a fresh object is returned.\n */\nfunction calcRect(totalWidth, totalHeight, spec, result) {\n\n result = result || {};\n\n var width;\n if (spec != null && spec.absoluteWidth != null) {\n width = spec.absoluteWidth / totalWidth;\n } else if (spec != null && spec.relativeWidth != null) {\n width = spec.relativeWidth;\n } else {\n width = 1;\n }\n\n var height;\n if (spec && spec.absoluteHeight != null) {\n height = spec.absoluteHeight / totalHeight;\n } else if (spec != null && spec.relativeHeight != null) {\n height = spec.relativeHeight;\n } else {\n height = 1;\n }\n\n var x;\n if (spec != null && spec.absoluteX != null) {\n x = spec.absoluteX / totalWidth;\n } else if (spec != null && spec.relativeX != null) {\n x = spec.relativeX;\n } else {\n x = 0;\n }\n\n var y;\n if (spec != null && spec.absoluteY != null) {\n y = spec.absoluteY / totalHeight;\n } else if (spec != null && spec.relativeY != null) {\n y = spec.relativeY;\n } else {\n y = 0;\n }\n\n result.x = x;\n result.y = y;\n result.width = width;\n result.height = height;\n\n return result;\n}\n\nmodule.exports = calcRect;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\n// Transform a synchronous function into an asynchronous one.\nfunction async(fn) {\n return function asynced(done) {\n var err, ret;\n try {\n ret = fn();\n } catch (e) {\n err = e;\n } finally {\n if (err) {\n done(err);\n } else {\n done(null, ret);\n }\n }\n };\n}\n\nmodule.exports = async;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar once = require('./once');\n\n// A cancelable function is an asynchronous function (i.e., one whose last\n// argument is a callback receiving an error plus zero or more return values)\n// that (synchronously) returns a cancel() function. Calling cancel() should\n// abort the asynchronous operation and call the callback with the arguments\n// that were passed into cancel(). Calling cancel() twice, as with callbacks,\n// is not guaranteed to be safe.\n\n// Wrap a non-cancellable asynchronous function into a cancelable one.\n//\n// Calling cancel() on the returned function will not interrupt the execution\n// of the original function; it will merely ignore its return value.\n//\n// Usually, instead of wrapping your function, you want to implement cancel()\n// yourself in order to have some abort logic. This utility function provides a\n// straighforward solution for cases in which no custom abort logic is required.\nfunction cancelize(fn) {\n return function cancelized() {\n if (!arguments.length) {\n throw new Error('cancelized: expected at least one argument');\n }\n var args = Array.prototype.slice.call(arguments, 0);\n var done = args[args.length - 1] = once(args[args.length - 1]);\n\n function cancel() {\n done.apply(null, arguments);\n }\n\n fn.apply(null, args);\n\n return cancel;\n };\n}\n\nmodule.exports = cancelize;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nfunction once(fn) {\n var called = false;\n var value;\n return function onced() {\n if (!called) {\n called = true;\n value = fn.apply(null, arguments);\n }\n return value;\n };\n}\n\nmodule.exports = once;","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\n// Sets an object's own properties to undefined. This may be called by\n// destructors to avoid retaining references and help detect incorrect use of\n// destroyed instances.\nfunction clearOwnProperties(obj) {\n for (var prop in obj) {\n if (obj.hasOwnProperty(prop)) {\n obj[prop] = undefined;\n }\n }\n}\n\nmodule.exports = clearOwnProperties;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\n/**\n * @class RendererRegistry\n * @classdesc\n *\n * A RendererRegistry maps pairs of {@link Geometry} and {@link View} type into\n * the appropriate {@link Renderer} class. It is used by a {@link Stage} to\n * determine the appropriate renderer for a {@link Layer}.\n *\n * See also {@link Stage#registerRenderer}.\n */\nfunction RendererRegistry() {\n this._renderers = {};\n}\n\n/**\n * Registers a renderer for the given geometry and view type.\n * @param {string} geometryType The geometry type, as given by\n * {@link Geometry#type}.\n * @param {string} viewType The view type, as given by {@link View#type}.\n * @param {*} Renderer The renderer class.\n */\nRendererRegistry.prototype.set = function(geometryType, viewType, Renderer) {\n if (!this._renderers[geometryType]) {\n this._renderers[geometryType] = {};\n }\n this._renderers[geometryType][viewType] = Renderer;\n};\n\n/**\n * Retrieves the renderer for the given geometry and view type.\n * @param {string} geometryType The geometry type, as given by\n * {@link Geometry#type}.\n * @param {string} viewType The view type, as given by {@link View#type}.\n * @param {*} Renderer The renderer class, or null if no such renderer has been\n * registered.\n */\nRendererRegistry.prototype.get = function(geometryType, viewType) {\n var Renderer = this._renderers[geometryType] &&\n this._renderers[geometryType][viewType];\n return Renderer || null;\n};\n\nmodule.exports = RendererRegistry;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar StaticAsset = require('../assets/Static');\nvar NetworkError = require('../NetworkError');\nvar once = require('../util/once');\n\n// N.B. HtmlImageLoader is broken on IE8 for images that require resizing, due\n// to the unavailable HTML5 canvas element and the naturalWidth/naturalHeight\n// properties of image elements. This is currently not a problem because the\n// HTML-based renderers (WebGL and CSS) do not work on IE8 anyway. It could\n// become a problem in the future if we decide to support CSS rendering of flat\n// panoramas on IE8.\n\n// TODO: Move the load queue into the loader.\n\n/**\n * @class HtmlImageLoader\n * @implements ImageLoader\n * @classdesc\n *\n * A {@link Loader} for HTML images.\n *\n * @param {Stage} stage The stage which is going to request images to be loaded.\n */\nfunction HtmlImageLoader(stage) {\n if (stage.type !== 'webgl' && stage.type !== 'css') {\n throw new Error('Stage type incompatible with loader');\n }\n this._stage = stage;\n}\n\n/**\n * Loads an {@link Asset} from an image.\n * @param {string} url The image URL.\n * @param {?Rect} rect A {@link Rect} describing a portion of the image, or null\n * to use the full image.\n * @param {function(?Error, Asset)} done The callback.\n * @return {function()} A function to cancel loading.\n */\nHtmlImageLoader.prototype.loadImage = function(url, rect, done) {\n var img = new Image();\n\n // Allow cross-domain image loading.\n // This is required to be able to create WebGL textures from images fetched\n // from a different domain. Note that setting the crossorigin attribute to\n // 'anonymous' will trigger a CORS preflight for cross-domain requests, but no\n // credentials (cookies or HTTP auth) will be sent; to do so, the attribute\n // would have to be set to 'use-credentials' instead. Unfortunately, this is\n // not a safe choice, as it causes requests to fail when the response contains\n // an Access-Control-Allow-Origin header with a wildcard. See the section\n // \"Credentialed requests and wildcards\" on:\n // https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS\n img.crossOrigin = 'anonymous';\n\n var x = rect && rect.x || 0;\n var y = rect && rect.y || 0;\n var width = rect && rect.width || 1;\n var height = rect && rect.height || 1;\n\n done = once(done);\n\n img.onload = function() {\n if (x === 0 && y === 0 && width === 1 && height === 1) {\n done(null, new StaticAsset(img));\n }\n else {\n x *= img.naturalWidth;\n y *= img.naturalHeight;\n width *= img.naturalWidth;\n height *= img.naturalHeight;\n\n var canvas = document.createElement('canvas');\n canvas.width = width;\n canvas.height = height;\n var context = canvas.getContext('2d');\n\n context.drawImage(img, x, y, width, height, 0, 0, width, height);\n\n done(null, new StaticAsset(canvas));\n }\n };\n\n img.onerror = function() {\n // TODO: is there any way to distinguish a network error from other\n // kinds of errors? For now we always return NetworkError since this\n // prevents images to be retried continuously while we are offline.\n done(new NetworkError('Network error: ' + url));\n };\n\n img.src = url;\n\n function cancel() {\n img.onload = img.onerror = null;\n img.src = '';\n done.apply(null, arguments);\n }\n\n return cancel;\n};\n\nmodule.exports = HtmlImageLoader;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar global = require('../util/global');\nvar eventEmitter = require('minimal-event-emitter');\nvar clearOwnProperties = require('../util/clearOwnProperties');\n\nvar propertyMap = {\n HTMLImageElement: ['naturalWidth', 'naturalHeight'],\n HTMLCanvasElement: ['width', 'height'],\n ImageBitmap: ['width', 'height']\n};\n\n/**\n * @class StaticAsset\n * @implements Asset\n * @classdesc\n *\n * An immutable {@link Asset} compatible with {@link WebGlStage} and\n * {@link CssStage}.\n *\n * @param {HTMLImageElement|HTMLCanvasElement|ImageBitmap} element The\n * underlying pixel source.\n * @throws If the pixel source is unsupported.\n */\nfunction StaticAsset(element) {\n var supported = false;\n for (var type in propertyMap) {\n if (global[type] && element instanceof global[type]) {\n supported = true;\n this._widthProp = propertyMap[type][0];\n this._heightProp = propertyMap[type][1];\n break;\n }\n }\n if (!supported) {\n throw new Error('Unsupported pixel source');\n }\n\n this._element = element;\n}\n\neventEmitter(StaticAsset);\n\n/**\n * Destructor.\n */\nStaticAsset.prototype.destroy = function() {\n clearOwnProperties(this);\n};\n\nStaticAsset.prototype.element = function() {\n return this._element;\n};\n\nStaticAsset.prototype.width = function() {\n return this._element[this._widthProp];\n};\n\nStaticAsset.prototype.height = function() {\n return this._element[this._heightProp];\n};\n\nStaticAsset.prototype.timestamp = function() {\n return 0;\n};\n\nStaticAsset.prototype.isDynamic = function() {\n return false;\n};\n\nmodule.exports = StaticAsset;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\n// The global object.\nvar globalObject = (function() {\n if (typeof window !== 'undefined') {\n return window;\n }\n if (typeof self !== 'undefined') {\n return self;\n }\n if (typeof global !== 'undefined') {\n return global;\n }\n return null;\n})();\n\nmodule.exports = globalObject;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar inherits = require('./util/inherits');\n\n/**\n * @class NetworkError\n * @extends {Error}\n * @classdesc\n *\n * Signals an error that occurred while fetching a URL. This is used by\n * {@link Loader loaders} to distinguish network failures from other errors.\n */\nfunction NetworkError(message) {\n // See: https://stackoverflow.com/questions/1382107/whats-a-good-way-to-extend-error-in-javascript\n this.constructor.super_.apply(this, arguments);\n this.message = message;\n}\n\ninherits(NetworkError, Error);\n\nmodule.exports = NetworkError;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\n// Make ctor a subclass of superCtor.\n// Do not depend on ES5 Object.create semantics because of older browsers.\nfunction inherits(ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function() {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n}\n\nmodule.exports = inherits;","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\n// Detect WebGl support.\n// Keep stages/WebGl.js in sync with this.\nfunction checkWebGlSupported() {\n var canvas = document.createElement('canvas');\n var gl = canvas.getContext && (canvas.getContext('webgl') ||\n canvas.getContext('experimental-webgl'));\n return !!gl;\n}\n\n// Cache result.\nvar supported;\nfunction webGlSupported() {\n if (supported !== undefined) {\n return supported;\n }\n return (supported = checkWebGlSupported());\n}\n\nmodule.exports = webGlSupported;\n","!function(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define([],t):\"object\"==typeof exports?exports.bowser=t():e.bowser=t()}(this,(function(){return function(e){var t={};function r(i){if(t[i])return t[i].exports;var n=t[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,\"a\",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p=\"\",r(r.s=90)}({17:function(e,t,r){\"use strict\";t.__esModule=!0,t.default=void 0;var i=r(18),n=function(){function e(){}return e.getFirstMatch=function(e,t){var r=t.match(e);return r&&r.length>0&&r[1]||\"\"},e.getSecondMatch=function(e,t){var r=t.match(e);return r&&r.length>1&&r[2]||\"\"},e.matchAndReturnConst=function(e,t,r){if(e.test(t))return r},e.getWindowsVersionName=function(e){switch(e){case\"NT\":return\"NT\";case\"XP\":return\"XP\";case\"NT 5.0\":return\"2000\";case\"NT 5.1\":return\"XP\";case\"NT 5.2\":return\"2003\";case\"NT 6.0\":return\"Vista\";case\"NT 6.1\":return\"7\";case\"NT 6.2\":return\"8\";case\"NT 6.3\":return\"8.1\";case\"NT 10.0\":return\"10\";default:return}},e.getMacOSVersionName=function(e){var t=e.split(\".\").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return\"Leopard\";case 6:return\"Snow Leopard\";case 7:return\"Lion\";case 8:return\"Mountain Lion\";case 9:return\"Mavericks\";case 10:return\"Yosemite\";case 11:return\"El Capitan\";case 12:return\"Sierra\";case 13:return\"High Sierra\";case 14:return\"Mojave\";case 15:return\"Catalina\";default:return}},e.getAndroidVersionName=function(e){var t=e.split(\".\").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?\"Cupcake\":1===t[0]&&t[1]>=6?\"Donut\":2===t[0]&&t[1]<2?\"Eclair\":2===t[0]&&2===t[1]?\"Froyo\":2===t[0]&&t[1]>2?\"Gingerbread\":3===t[0]?\"Honeycomb\":4===t[0]&&t[1]<1?\"Ice Cream Sandwich\":4===t[0]&&t[1]<4?\"Jelly Bean\":4===t[0]&&t[1]>=4?\"KitKat\":5===t[0]?\"Lollipop\":6===t[0]?\"Marshmallow\":7===t[0]?\"Nougat\":8===t[0]?\"Oreo\":9===t[0]?\"Pie\":void 0},e.getVersionPrecision=function(e){return e.split(\".\").length},e.compareVersions=function(t,r,i){void 0===i&&(i=!1);var n=e.getVersionPrecision(t),s=e.getVersionPrecision(r),o=Math.max(n,s),a=0,u=e.map([t,r],(function(t){var r=o-e.getVersionPrecision(t),i=t+new Array(r+1).join(\".0\");return e.map(i.split(\".\"),(function(e){return new Array(20-e.length).join(\"0\")+e})).reverse()}));for(i&&(a=o-Math.min(n,s)),o-=1;o>=a;){if(u[0][o]>u[1][o])return 1;if(u[0][o]===u[1][o]){if(o===a)return 0;o-=1}else if(u[0][o]0){var o=Object.keys(r),a=o.find((function(e){return t.isOS(e)}));if(a){var u=this.satisfies(r[a]);if(void 0!==u)return u}var d=o.find((function(e){return t.isPlatform(e)}));if(d){var c=this.satisfies(r[d]);if(void 0!==c)return c}}if(s>0){var f=Object.keys(n).find((function(e){return t.isBrowser(e,!0)}));if(void 0!==f)return this.compareVersion(n[f])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var r=this.getBrowserName().toLowerCase(),i=e.toLowerCase(),n=a.default.getBrowserTypeByAlias(i);return t&&n&&(i=n.toLowerCase()),i===r},t.compareVersion=function(e){var t=[0],r=e,i=!1,n=this.getBrowserVersion();if(\"string\"==typeof n)return\">\"===e[0]||\"<\"===e[0]?(r=e.substr(1),\"=\"===e[1]?(i=!0,r=e.substr(2)):t=[],\">\"===e[0]?t.push(1):t.push(-1)):\"=\"===e[0]?r=e.substr(1):\"~\"===e[0]&&(i=!0,r=e.substr(1)),t.indexOf(a.default.compareVersions(n,r,i))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e){return this.isBrowser(e)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=d,e.exports=t.default},92:function(e,t,r){\"use strict\";t.__esModule=!0,t.default=void 0;var i,n=(i=r(17))&&i.__esModule?i:{default:i};var s=/version\\/(\\d+(\\.?_?\\d+)+)/i,o=[{test:[/googlebot/i],describe:function(e){var t={name:\"Googlebot\"},r=n.default.getFirstMatch(/googlebot\\/(\\d+(\\.\\d+))/i,e)||n.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/opera/i],describe:function(e){var t={name:\"Opera\"},r=n.default.getFirstMatch(s,e)||n.default.getFirstMatch(/(?:opera)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opr\\/|opios/i],describe:function(e){var t={name:\"Opera\"},r=n.default.getFirstMatch(/(?:opr|opios)[\\s/](\\S+)/i,e)||n.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:\"Samsung Internet for Android\"},r=n.default.getFirstMatch(s,e)||n.default.getFirstMatch(/(?:SamsungBrowser)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Whale/i],describe:function(e){var t={name:\"NAVER Whale Browser\"},r=n.default.getFirstMatch(s,e)||n.default.getFirstMatch(/(?:whale)[\\s/](\\d+(?:\\.\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:\"MZ Browser\"},r=n.default.getFirstMatch(/(?:MZBrowser)[\\s/](\\d+(?:\\.\\d+)+)/i,e)||n.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/focus/i],describe:function(e){var t={name:\"Focus\"},r=n.default.getFirstMatch(/(?:focus)[\\s/](\\d+(?:\\.\\d+)+)/i,e)||n.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/swing/i],describe:function(e){var t={name:\"Swing\"},r=n.default.getFirstMatch(/(?:swing)[\\s/](\\d+(?:\\.\\d+)+)/i,e)||n.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/coast/i],describe:function(e){var t={name:\"Opera Coast\"},r=n.default.getFirstMatch(s,e)||n.default.getFirstMatch(/(?:coast)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/yabrowser/i],describe:function(e){var t={name:\"Yandex Browser\"},r=n.default.getFirstMatch(/(?:yabrowser)[\\s/](\\d+(\\.?_?\\d+)+)/i,e)||n.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:\"UC Browser\"},r=n.default.getFirstMatch(s,e)||n.default.getFirstMatch(/(?:ucbrowser)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:\"Maxthon\"},r=n.default.getFirstMatch(s,e)||n.default.getFirstMatch(/(?:Maxthon|mxios)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/epiphany/i],describe:function(e){var t={name:\"Epiphany\"},r=n.default.getFirstMatch(s,e)||n.default.getFirstMatch(/(?:epiphany)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/puffin/i],describe:function(e){var t={name:\"Puffin\"},r=n.default.getFirstMatch(s,e)||n.default.getFirstMatch(/(?:puffin)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sleipnir/i],describe:function(e){var t={name:\"Sleipnir\"},r=n.default.getFirstMatch(s,e)||n.default.getFirstMatch(/(?:sleipnir)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/k-meleon/i],describe:function(e){var t={name:\"K-Meleon\"},r=n.default.getFirstMatch(s,e)||n.default.getFirstMatch(/(?:k-meleon)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/micromessenger/i],describe:function(e){var t={name:\"WeChat\"},r=n.default.getFirstMatch(/(?:micromessenger)[\\s/](\\d+(\\.?_?\\d+)+)/i,e)||n.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?\"QQ Browser Lite\":\"QQ Browser\"},r=n.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\\d+(\\.?_?\\d+)+)/i,e)||n.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/msie|trident/i],describe:function(e){var t={name:\"Internet Explorer\"},r=n.default.getFirstMatch(/(?:msie |rv:)(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/\\sedg\\//i],describe:function(e){var t={name:\"Microsoft Edge\"},r=n.default.getFirstMatch(/\\sedg\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:\"Microsoft Edge\"},r=n.default.getSecondMatch(/edg([ea]|ios)\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/vivaldi/i],describe:function(e){var t={name:\"Vivaldi\"},r=n.default.getFirstMatch(/vivaldi\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/seamonkey/i],describe:function(e){var t={name:\"SeaMonkey\"},r=n.default.getFirstMatch(/seamonkey\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sailfish/i],describe:function(e){var t={name:\"Sailfish\"},r=n.default.getFirstMatch(/sailfish\\s?browser\\/(\\d+(\\.\\d+)?)/i,e);return r&&(t.version=r),t}},{test:[/silk/i],describe:function(e){var t={name:\"Amazon Silk\"},r=n.default.getFirstMatch(/silk\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/phantom/i],describe:function(e){var t={name:\"PhantomJS\"},r=n.default.getFirstMatch(/phantomjs\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/slimerjs/i],describe:function(e){var t={name:\"SlimerJS\"},r=n.default.getFirstMatch(/slimerjs\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/blackberry|\\bbb\\d+/i,/rim\\stablet/i],describe:function(e){var t={name:\"BlackBerry\"},r=n.default.getFirstMatch(s,e)||n.default.getFirstMatch(/blackberry[\\d]+\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:\"WebOS Browser\"},r=n.default.getFirstMatch(s,e)||n.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/bada/i],describe:function(e){var t={name:\"Bada\"},r=n.default.getFirstMatch(/dolfin\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/tizen/i],describe:function(e){var t={name:\"Tizen\"},r=n.default.getFirstMatch(/(?:tizen\\s?)?browser\\/(\\d+(\\.?_?\\d+)+)/i,e)||n.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/qupzilla/i],describe:function(e){var t={name:\"QupZilla\"},r=n.default.getFirstMatch(/(?:qupzilla)[\\s/](\\d+(\\.?_?\\d+)+)/i,e)||n.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:\"Firefox\"},r=n.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/chromium/i],describe:function(e){var t={name:\"Chromium\"},r=n.default.getFirstMatch(/(?:chromium)[\\s/](\\d+(\\.?_?\\d+)+)/i,e)||n.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:\"Chrome\"},r=n.default.getFirstMatch(/(?:chrome|crios|crmo)\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/GSA/i],describe:function(e){var t={name:\"Google Search\"},r=n.default.getFirstMatch(/(?:GSA)\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t={name:\"Android Browser\"},r=n.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/playstation 4/i],describe:function(e){var t={name:\"PlayStation 4\"},r=n.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:\"Safari\"},r=n.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search(\"\\\\(\")?/^(.*)\\/(.*)[ \\t]\\((.*)/:/^(.*)\\/(.*) /;return{name:n.default.getFirstMatch(t,e),version:n.default.getSecondMatch(t,e)}}}];t.default=o,e.exports=t.default},93:function(e,t,r){\"use strict\";t.__esModule=!0,t.default=void 0;var i,n=(i=r(17))&&i.__esModule?i:{default:i},s=r(18);var o=[{test:[/Roku\\/DVP/],describe:function(e){var t=n.default.getFirstMatch(/Roku\\/DVP-(\\d+\\.\\d+)/i,e);return{name:s.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=n.default.getFirstMatch(/windows phone (?:os)?\\s?(\\d+(\\.\\d+)*)/i,e);return{name:s.OS_MAP.WindowsPhone,version:t}}},{test:[/windows/i],describe:function(e){var t=n.default.getFirstMatch(/Windows ((NT|XP)( \\d\\d?.\\d)?)/i,e),r=n.default.getWindowsVersionName(t);return{name:s.OS_MAP.Windows,version:t,versionName:r}}},{test:[/macintosh/i],describe:function(e){var t=n.default.getFirstMatch(/mac os x (\\d+(\\.?_?\\d+)+)/i,e).replace(/[_\\s]/g,\".\"),r=n.default.getMacOSVersionName(t),i={name:s.OS_MAP.MacOS,version:t};return r&&(i.versionName=r),i}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=n.default.getFirstMatch(/os (\\d+([_\\s]\\d+)*) like mac os x/i,e).replace(/[_\\s]/g,\".\");return{name:s.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t=n.default.getFirstMatch(/android[\\s/-](\\d+(\\.\\d+)*)/i,e),r=n.default.getAndroidVersionName(t),i={name:s.OS_MAP.Android,version:t};return r&&(i.versionName=r),i}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=n.default.getFirstMatch(/(?:web|hpw)[o0]s\\/(\\d+(\\.\\d+)*)/i,e),r={name:s.OS_MAP.WebOS};return t&&t.length&&(r.version=t),r}},{test:[/blackberry|\\bbb\\d+/i,/rim\\stablet/i],describe:function(e){var t=n.default.getFirstMatch(/rim\\stablet\\sos\\s(\\d+(\\.\\d+)*)/i,e)||n.default.getFirstMatch(/blackberry\\d+\\/(\\d+([_\\s]\\d+)*)/i,e)||n.default.getFirstMatch(/\\bbb(\\d+)/i,e);return{name:s.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=n.default.getFirstMatch(/bada\\/(\\d+(\\.\\d+)*)/i,e);return{name:s.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=n.default.getFirstMatch(/tizen[/\\s](\\d+(\\.\\d+)*)/i,e);return{name:s.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:s.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:s.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=n.default.getFirstMatch(/PlayStation 4[/\\s](\\d+(\\.\\d+)*)/i,e);return{name:s.OS_MAP.PlayStation4,version:t}}}];t.default=o,e.exports=t.default},94:function(e,t,r){\"use strict\";t.__esModule=!0,t.default=void 0;var i,n=(i=r(17))&&i.__esModule?i:{default:i},s=r(18);var o=[{test:[/googlebot/i],describe:function(){return{type:\"bot\",vendor:\"Google\"}}},{test:[/huawei/i],describe:function(e){var t=n.default.getFirstMatch(/(can-l01)/i,e)&&\"Nova\",r={type:s.PLATFORMS_MAP.mobile,vendor:\"Huawei\"};return t&&(r.model=t),r}},{test:[/nexus\\s*(?:7|8|9|10).*/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:\"Nexus\"}}},{test:[/ipad/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:\"Apple\",model:\"iPad\"}}},{test:[/kftt build/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:\"Amazon\",model:\"Kindle Fire HD 7\"}}},{test:[/silk/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:\"Amazon\"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),r=e.test(/like (ipod|iphone)/i);return t&&!r},describe:function(e){var t=n.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:s.PLATFORMS_MAP.mobile,vendor:\"Apple\",model:t}}},{test:[/nexus\\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:\"Nexus\"}}},{test:[/[^-]mobi/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return\"blackberry\"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:\"BlackBerry\"}}},{test:function(e){return\"bada\"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return\"windows phone\"===e.getBrowserName()},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:\"Microsoft\"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(\".\")[0]);return\"android\"===e.getOSName(!0)&&t>=3},describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){return\"android\"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return\"macos\"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop,vendor:\"Apple\"}}},{test:function(e){return\"windows\"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return\"linux\"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return\"playstation 4\"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}},{test:function(e){return\"roku\"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}}];t.default=o,e.exports=t.default},95:function(e,t,r){\"use strict\";t.__esModule=!0,t.default=void 0;var i,n=(i=r(17))&&i.__esModule?i:{default:i},s=r(18);var o=[{test:function(e){return\"microsoft edge\"===e.getBrowserName(!0)},describe:function(e){if(/\\sedg\\//i.test(e))return{name:s.ENGINE_MAP.Blink};var t=n.default.getFirstMatch(/edge\\/(\\d+(\\.?_?\\d+)+)/i,e);return{name:s.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:s.ENGINE_MAP.Trident},r=n.default.getFirstMatch(/trident\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:s.ENGINE_MAP.Presto},r=n.default.getFirstMatch(/presto\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=e.test(/gecko/i),r=e.test(/like gecko/i);return t&&!r},describe:function(e){var t={name:s.ENGINE_MAP.Gecko},r=n.default.getFirstMatch(/gecko\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(apple)?webkit\\/537\\.36/i],describe:function(){return{name:s.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:s.ENGINE_MAP.WebKit},r=n.default.getFirstMatch(/webkit\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}}];t.default=o,e.exports=t.default}})}));","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar defaultPixelRatio = 1;\n\nfunction pixelRatio() {\n if (typeof window !== 'undefined') {\n if (window.devicePixelRatio) {\n return window.devicePixelRatio;\n }\n else {\n var screen = window.screen;\n if (screen && screen.deviceXDPI && screen.logicalXDPI) {\n return screen.deviceXDPI / screen.logicalXDPI;\n } else if (screen && screen.systemXDPI && screen.logicalXDPI) {\n return screen.systemXDPI / screen.logicalXDPI;\n }\n }\n }\n return defaultPixelRatio;\n}\n\nmodule.exports = pixelRatio;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\n// Returns whether n is a power of two.\nfunction ispot(n) {\n return (n & (n - 1)) == 0;\n}\n\nmodule.exports = ispot;","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\n\nfunction prefixProperty(property) {\n\n var style = document.documentElement.style;\n var prefixList = ['Moz', 'Webkit', 'Khtml', 'O', 'ms'];\n\n for (var i = 0; i < prefixList.length; i++) {\n var prefix = prefixList[i];\n var capitalizedProperty = property[0].toUpperCase() + property.slice(1);\n var prefixedProperty = prefix + capitalizedProperty;\n\n if (prefixedProperty in style) {\n return prefixedProperty;\n }\n }\n\n return property;\n\n}\n\n\nfunction getWithVendorPrefix(property) {\n var prefixedProperty = prefixProperty(property);\n return function getPropertyWithVendorPrefix(element) {\n return element.style[prefixedProperty];\n };\n\n}\n\n\nfunction setWithVendorPrefix(property) {\n var prefixedProperty = prefixProperty(property);\n return function setPropertyWithVendorPrefix(element, val) {\n return (element.style[prefixedProperty] = val);\n };\n}\n\n\nvar setTransform = setWithVendorPrefix('transform');\nvar setTransformOrigin = setWithVendorPrefix('transformOrigin');\n\n\nfunction setNullTransform(element) {\n setTransform(element, 'translateZ(0)');\n}\n\n\nfunction setNullTransformOrigin(element) {\n setTransformOrigin(element, '0 0 0');\n}\n\n\nfunction setAbsolute(element) {\n element.style.position = 'absolute';\n}\n\n\nfunction setPixelPosition(element, x, y) {\n element.style.left = x + 'px';\n element.style.top = y + 'px';\n}\n\n\nfunction setPixelSize(element, width, height) {\n element.style.width = width + 'px';\n element.style.height = height + 'px';\n}\n\n\nfunction setNullSize(element) {\n element.style.width = element.style.height = 0;\n}\n\n\nfunction setFullSize(element) {\n element.style.width = element.style.height = '100%';\n}\n\n\nfunction setOverflowHidden(element) {\n element.style.overflow = 'hidden';\n}\n\n\nfunction setOverflowVisible(element) {\n element.style.overflow = 'visible';\n}\n\n\nfunction setNoPointerEvents(element) {\n element.style.pointerEvents = 'none';\n}\n\n\nfunction setBlocking(element) {\n element.style.backgroundColor = '#000';\n element.style.opacity = '0';\n element.style.filter = 'alpha(opacity=0)';\n}\n\n\nmodule.exports = {\n prefixProperty: prefixProperty,\n getWithVendorPrefix: getWithVendorPrefix,\n setWithVendorPrefix: setWithVendorPrefix,\n setTransform: setTransform,\n setTransformOrigin: setTransformOrigin,\n setNullTransform: setNullTransform,\n setNullTransformOrigin: setNullTransformOrigin,\n setAbsolute: setAbsolute,\n setPixelPosition: setPixelPosition,\n setPixelSize: setPixelSize,\n setNullSize: setNullSize,\n setFullSize: setFullSize,\n setOverflowHidden: setOverflowHidden,\n setOverflowVisible: setOverflowVisible,\n setNoPointerEvents: setNoPointerEvents,\n setBlocking: setBlocking\n};\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar Stage = require('./Stage');\nvar HtmlImageLoader = require('../loaders/HtmlImage');\nvar cssSupported = require('../support/Css');\nvar browser = require('bowser');\nvar inherits = require('../util/inherits');\nvar setAbsolute = require('../util/dom').setAbsolute;\nvar setFullSize = require('../util/dom').setFullSize;\nvar setNullTransformOrigin = require('../util/dom').setNullTransformOrigin;\nvar clearOwnProperties = require('../util/clearOwnProperties');\n\n\n// Browser-specific workarounds.\nvar browserQuirks = {\n\n // On most browsers we need to pad the tile edges with repeated pixels so\n // that the borders between neighboring tiles aren't apparent.\n // On iOS this isn't required, but we must disable it because the padding is\n // incorrectly rendered on top of the neighboring tile.\n padSize: browser.ios ? 0 : 3,\n\n // In order to prevent fallback tiles from overlapping their children, iOS\n // requires smaller zoom levels to be placed below larger zoom levels in\n // the CSS 3D coordinate space.\n reverseLevelDepth: browser.ios,\n\n // A null transform on the layer element is required so that transitions\n // between layers work on iOS.\n useNullTransform: browser.ios,\n\n // On Webkit and Gecko browsers, some tiles become invisible at certain\n // angles, usually non-floor tiles when looking straight down. Setting the\n // translateZ following the perspective transform to a slightly larger value\n // than the latter seems to work around this glitch.\n perspectiveNudge: browser.webkit || browser.gecko ? 0.001 : 0\n\n};\n\n\n/**\n * @class CssStage\n * @extends Stage\n * @classdesc\n *\n * A {@link Stage} implementation using CSS 3D Transforms.\n *\n * @param {Object} opts\n *\n * Also see the available {@link Stage} options.\n */\nfunction CssStage(opts) {\n this.constructor.super_.call(this, opts);\n\n this._loader = new HtmlImageLoader(this);\n\n this._domElement = document.createElement('div');\n\n setAbsolute(this._domElement);\n setFullSize(this._domElement);\n\n // N.B. the CSS stage requires device adaptation to be configured through\n // the tag on the containing document.\n // Failure to do so will cause clipping and padding bugs to occur,\n // at least on iOS <= 7.\n}\n\ninherits(CssStage, Stage);\n\n\n/**\n * Destructor.\n */\nCssStage.prototype.destroy = function() {\n // Delegate clearing own properties to the Stage destructor.\n this.constructor.super_.prototype.destroy.call(this);\n};\n\n\nCssStage.supported = function() {\n return cssSupported();\n};\n\n\n/**\n * Returns the underlying DOM element.\n *\n * @return {Element}\n */\nCssStage.prototype.domElement = function() {\n return this._domElement;\n};\n\n\nCssStage.prototype.setSizeForType = function() {};\n\n\nCssStage.prototype.loadImage = function(url, rect, done) {\n return this._loader.loadImage(url, rect, done);\n};\n\n\nCssStage.prototype.validateLayer = function(layer) {\n return; // always valid\n};\n\n\nCssStage.prototype.createRenderer = function(Renderer) {\n return new Renderer(this._domElement, browserQuirks);\n};\n\nCssStage.prototype.destroyRenderer = function(renderer) {\n renderer.destroy();\n};\n\n\nCssStage.prototype.startFrame = function() {};\n\n\nCssStage.prototype.endFrame = function() {};\n\n\nCssStage.prototype.takeSnapshot = function() {\n throw new Error('CssStage: takeSnapshot not implemented');\n};\n\n\nCssStage.type = CssStage.prototype.type = 'css';\n\n\nfunction CssTexture(stage, tile, asset) {\n\n var canvas = document.createElement('canvas');\n setAbsolute(canvas);\n setNullTransformOrigin(canvas);\n\n this._canvas = canvas;\n this._timestamp = null;\n this.refresh(tile, asset);\n\n}\n\n\nCssTexture.prototype.refresh = function(tile, asset) {\n\n // Check whether the texture needs to be updated.\n var timestamp = asset.timestamp();\n if (timestamp === this._timestamp) {\n return;\n }\n this._timestamp = timestamp;\n\n var canvas = this._canvas;\n var ctx = canvas.getContext('2d');\n\n // Get asset element.\n var element = asset.element();\n\n // Get tile dimensions.\n var tileWidth = tile.width();\n var tileHeight = tile.height();\n\n // Get padding sizes.\n var padSize = browserQuirks.padSize;\n var padTop = tile.padTop() ? padSize : 0;\n var padBottom = tile.padBottom() ? padSize : 0;\n var padLeft = tile.padLeft() ? padSize : 0;\n var padRight = tile.padRight() ? padSize : 0;\n\n // Set canvas size.\n canvas.width = padLeft + tileWidth + padRight;\n canvas.height = padTop + tileHeight + padBottom;\n\n // Draw image.\n ctx.drawImage(element, padLeft, padTop, tileWidth, tileHeight);\n\n var i;\n\n // Draw top padding.\n for (i = 0; i < padTop; i++) {\n ctx.drawImage(canvas, padLeft, padTop, tileWidth, 1,\n padLeft, i, tileWidth, 1);\n }\n\n // Draw left padding.\n for (i = 0; i < padLeft; i++) {\n ctx.drawImage(canvas, padLeft, padTop, 1, tileHeight,\n i, padTop, 1, tileHeight);\n }\n\n // Draw bottom padding.\n for (i = 0; i < padBottom; i++) {\n ctx.drawImage(canvas, padLeft, padTop + tileHeight - 1, tileWidth, 1,\n padLeft, padTop + tileHeight + i, tileWidth, 1);\n }\n\n // Draw right padding.\n for (i = 0; i < padRight; i++) {\n ctx.drawImage(canvas, padLeft + tileWidth - 1, padTop, 1, tileHeight,\n padLeft + tileWidth + i, padTop, 1, tileHeight);\n }\n\n};\n\n\nCssTexture.prototype.destroy = function() {\n // TODO: investigate whether keeping a pool of canvases instead of\n // creating new ones on demand improves performance.\n clearOwnProperties(this);\n};\n\n\nCssStage.TextureClass = CssStage.prototype.TextureClass = CssTexture;\n\n\nmodule.exports = CssStage;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar prefixProperty = require('../util/dom').prefixProperty;\n\n// Detect CSS 3D transforms support. Adapted from Modernizr.\nfunction checkCssSupported() {\n // First, check if the 'perspective' CSS property or a vendor-prefixed\n // variant is available.\n var perspectiveProperty = prefixProperty('perspective');\n var el = document.createElement('div');\n var supported = typeof el.style[perspectiveProperty] !== 'undefined';\n\n // Certain versions of Chrome disable 3D transforms even though the CSS\n // property exists. In those cases, we use the following media query,\n // which only succeeds if the feature is indeed enabled.\n if (supported && perspectiveProperty === 'WebkitPerspective') {\n var id = '__marzipano_test_css3d_support__';\n var st = document.createElement('style');\n st.textContent = '@media(-webkit-transform-3d){#' + id + '{height: 3px;})';\n document.getElementsByTagName('head')[0].appendChild(st);\n el.id = id;\n document.body.appendChild(el);\n // The offsetHeight seems to be different than 3 at some zoom levels on\n // Chrome (and maybe other browsers). Test for > 0 instead.\n supported = el.offsetHeight > 0;\n st.parentNode.removeChild(st);\n el.parentNode.removeChild(el);\n }\n\n return supported;\n}\n\n// Cache result.\nvar supported;\nfunction cssSupported() {\n if (supported !== undefined) {\n return supported;\n }\n return (supported = checkCssSupported());\n}\n\nmodule.exports = cssSupported;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar Stage = require('./Stage');\nvar FlashImageLoader = require('../loaders/FlashImage');\nvar flashSupported = require('../support/Flash');\nvar WorkQueue = require('../collections/WorkQueue');\nvar inherits = require('../util/inherits');\nvar defer = require('../util/defer');\nvar setAbsolute = require('../util/dom').setAbsolute;\nvar setFullSize = require('../util/dom').setFullSize;\nvar setBlocking = require('../util/dom').setBlocking;\nvar clearOwnProperties = require('../util/clearOwnProperties');\n\n// Default Flash wmode.\nvar defaultWMode = 'transparent';\n\n// Default Flash SWF path. By default, expect the SWF to be named marzipano.swf\n// and located in the same directory as the current script. The default path\n// may be overridden by passing the `swfPath` option into the Viewer or Stage\n// constructor.\nvar defaultSwfPath = function() {\n var script = document.currentScript;\n if (!script) {\n // This will produce the wrong result if the current script is loaded with\n // the `async` or `defer` options, or exec'ed from a string. The user is\n // expected to supply a custom `swfPath` in these cases.\n var scripts = document.getElementsByTagName('script');\n script = scripts.length ? scripts[scripts.length-1] : null;\n }\n if (!script) {\n return null;\n }\n var path = script.src;\n var slash = path.lastIndexOf('/');\n if (slash >= 0) {\n path = path.slice(0, slash + 1);\n } else {\n path = '';\n }\n return path + 'marzipano.swf';\n}();\n\n// Callbacks must be exposed in a global object to be called from Flash.\n// The global object maps each stage ID into the respective callbacks.\n// To prevent multiple Marzipano instances from clobbering the callbacks\n// for each other's stages, the next available stage ID must be shared among\n// the instances. We cache this value in a special property of the global\n// callback object.\nvar callbackObjectName = 'MarzipanoFlashCallbackMap';\nif (!(callbackObjectName in window)) {\n window[callbackObjectName] = { __next: 0 };\n}\n\n// Get the next available Flash stage ID.\nfunction nextFlashStageId() {\n return window[callbackObjectName].__next++;\n}\n\n// Names of the callbacks called from Flash. Presently there is only one.\nvar callbackNames = [ 'imageLoaded' ];\n\n// Browser-specific workarounds.\nvar flashQuirks = {\n // How many repeated pixels to add around tile edges to suppress visible seams.\n padSize: 3\n};\n\n/**\n * @class FlashStage\n * @extends Stage\n * @classdesc\n *\n * A {@link Stage} implementation using Flash.\n *\n * @param {Object} opts\n * @param {string} [opts.wmode='transparent']\n * @param {string} [opts.swfPath]\n *\n * The `wmode` option controls transparency, layering and compositing of the\n * Flash element into the web page. For more information see:\n * http://helpx.adobe.com/flash/kb/flash-object-embed-tag-attributes.html\n *\n * The `swfPath` option denotes the path to the `marzipano.swf` file. It\n * defaults to the location of `marzipano.js` by looking for a script tag with\n * that name.\n *\n * Also see the available {@link Stage} options.\n */\nfunction FlashStage(opts) {\n this.constructor.super_.call(this, opts);\n\n this._wmode = opts && opts.wmode || defaultWMode;\n this._swfPath = opts && opts.swfPath || defaultSwfPath;\n\n if (!defaultSwfPath) {\n throw new Error('Missing SWF path');\n }\n\n // Setup JavaScript callbacks to be called from Flash land when\n // asynchronous operations terminate.\n this._flashStageId = nextFlashStageId();\n this._callbacksObj = window[callbackObjectName][this._flashStageId] = {};\n this._stageCallbacksObjVarName = callbackObjectName + '[' + this._flashStageId + ']';\n this._callbackListeners = {};\n for (var i = 0; i < callbackNames.length; i++) {\n this._callbacksObj[callbackNames[i]] = this._callListeners(callbackNames[i]);\n }\n\n this._loader = new FlashImageLoader(this);\n\n // Queue for loadImage calls.\n // The queue starts paused so that loadImage calls occurring before Flash\n // is ready do not start right away (as they would fail).\n // TODO: This is awkward. The stage must signal that it's ready to load\n // images, but queuing should otherwise be implemented by the loader.\n this._loadImageQueue = new WorkQueue();\n this._loadImageQueue.pause();\n\n // Whether flash is ready to be called from JavaScript.\n this._flashReady = false;\n\n // Add an ID to each renderer/layer, so that it can be identified within\n // the ActionScript program.\n this._nextLayerId = 0;\n\n // Create the DOM elements.\n var elements = createDomElements(this._swfPath, this._flashStageId, this._stageCallbacksObjVarName);\n this._domElement = elements.root;\n this._blockingElement = elements.blocking;\n this._flashElement = elements.flash;\n\n // Wake up the render loop when we are ready (only after element is added to the DOM)\n this._checkReadyTimer = setInterval(this._checkReady.bind(this), 50);\n}\n\ninherits(FlashStage, Stage);\n\n\n/**\n * Destructor.\n */\nFlashStage.prototype.destroy = function() {\n window[callbackObjectName][this._flashStageId] = null;\n if (this._checkReadyTimer != null) {\n clearInterval(this._checkReadyTimer);\n }\n // Delegate clearing own properties to the Stage destructor.\n this.constructor.super_.prototype.destroy.call(this);\n};\n\n\nFlashStage.supported = function() {\n return flashSupported();\n};\n\n\n/**\n * Returns the underlying DOM element.\n * @return {Element}\n */\nFlashStage.prototype.domElement = function() {\n return this._domElement;\n};\n\n\n/**\n * Returns the underlying Flash element.\n * @return {Element}\n */\nFlashStage.prototype.flashElement = function() {\n return this._flashElement;\n};\n\n\nFlashStage.prototype.setSizeForType = function() {};\n\n\nFlashStage.prototype.loadImage = function(url, rect, done) {\n // TODO: Move the queuing into the loader, which avoids this nonsense.\n var loadFn = this._loader.loadImage.bind(this._loader, url, rect);\n return this._loadImageQueue.push(loadFn, done);\n};\n\n\nFlashStage.prototype.validateLayer = function(layer) {\n return; // always valid\n};\n\n\nFlashStage.prototype.addFlashCallbackListener = function(callbackName, f) {\n this._callbackListeners[callbackName] = this._callbackListeners[callbackName] || [];\n this._callbackListeners[callbackName].push(f);\n};\n\n\nFlashStage.prototype.removeFlashCallbackListener = function(callbackName, f) {\n var listeners = this._callbackListeners[callbackName] || [];\n var index = listeners.indexOf(f);\n if (index >= 0) {\n listeners.splice(index, 1);\n }\n};\n\n\nFlashStage.prototype._callListeners = function(callbackName) {\n\n var self = this;\n\n return function callListeners() {\n var listeners = self._callbackListeners[callbackName] || [];\n for (var i = 0; i < listeners.length; i++) {\n // JavaScript executed on calls from Flash does not throw exceptions.\n // Executing the callback in a new stack frame fixes this.\n var listener = listeners[i];\n defer(listener, arguments);\n }\n };\n};\n\n\nFlashStage.prototype._checkReady = function() {\n if (!this._flashElement ||\n !this._flashElement.isReady ||\n !this._flashElement.isReady()) {\n // Not ready yet.\n return false;\n }\n\n // Mark as ready.\n this._flashReady = true;\n\n // Disable interval timer.\n clearTimeout(this._checkReadyTimer);\n this._checkReadyTimer = null;\n\n // Resume image loading queue.\n this._loadImageQueue.resume();\n\n // Force next render.\n this.emit('renderInvalid');\n\n return true;\n};\n\n\nfunction createDomElements(swfPath, id, stageCallbacksObjVarName) {\n var rootElement = document.createElement('div');\n setAbsolute(rootElement);\n setFullSize(rootElement);\n\n // The Flash object must have `id` and `name` attributes, otherwise\n // ExternalInterface calls will not work.\n var elementId = \"marzipano-flash-stage-\" + id;\n\n var objectStr = '';\n\n var paramsStr = '';\n paramsStr += '';\n paramsStr += '';\n paramsStr += '';\n paramsStr += '';\n\n objectStr += paramsStr;\n objectStr += '';\n\n // Embed Flash into the DOM.\n // Adding children into an element doesn't work, so we create a\n // temporary element and set its innerHTML.\n var tmpElement = document.createElement('div');\n tmpElement.innerHTML = objectStr;\n var flashElement = tmpElement.firstChild;\n setAbsolute(flashElement);\n setFullSize(flashElement);\n rootElement.appendChild(flashElement);\n\n // Create blocking element to prevent events from being caught by Flash.\n var blockingElement = document.createElement('div');\n setAbsolute(blockingElement);\n setFullSize(blockingElement);\n setBlocking(blockingElement);\n rootElement.appendChild(blockingElement);\n\n return { root: rootElement, flash: flashElement, blocking: blockingElement };\n}\n\n\nFlashStage.prototype.createRenderer = function(Renderer) {\n return new Renderer(this._flashElement, ++this._nextLayerId, flashQuirks);\n};\n\n\nFlashStage.prototype.destroyRenderer = function(renderer) {\n renderer.destroy();\n};\n\n\nFlashStage.prototype.startFrame = function() {};\n\n\nFlashStage.prototype.endFrame = function() {};\n\n\nFlashStage.prototype.takeSnapshot = function (options) {\n // Validate argument.\n if (typeof options !== 'object' || options == null) {\n options = {};\n }\n\n var quality = options.quality;\n\n // Set default quality if it is not passed in.\n if (typeof quality == 'undefined') {\n quality = 75;\n }\n\n // Throw if quality is of invlid type or out of bounds.\n if (typeof quality !== 'number' || quality < 0 || quality > 100) {\n throw new Error('FlashStage: Snapshot quality needs to be a number between 0 and 100');\n }\n\n // Return the snapshot by executing a flash-exported method.\n return this._flashElement.takeSnapshot(quality);\n};\n\n\nFlashStage.type = FlashStage.prototype.type = 'flash';\n\n\nfunction FlashTexture(stage, tile, asset) {\n\n // Get image id.\n var imageId = asset.element();\n\n // Get tile dimensions.\n var tileWidth = tile.width();\n var tileHeight = tile.height();\n\n // Get padding sizes.\n var padSize = flashQuirks.padSize;\n var padTop = tile.padTop() ? padSize : 0;\n var padBottom = tile.padBottom() ? padSize : 0;\n var padLeft = tile.padLeft() ? padSize : 0;\n var padRight = tile.padRight() ? padSize : 0;\n\n var textureId = stage._flashElement.createTexture(imageId, tileWidth, tileHeight, padTop, padBottom, padLeft, padRight);\n\n this._stage = stage;\n this._textureId = textureId;\n}\n\n\nFlashTexture.prototype.refresh = function(tile, asset) {\n // TODO: This is required for the Flash stage to support dynamic textures.\n // However, there are currently no dynamic textures that work with the\n // Flash stage.\n};\n\n\nFlashTexture.prototype.destroy = function() {\n this._stage._flashElement.destroyTexture(this._textureId);\n clearOwnProperties(this);\n};\n\n\nFlashStage.TextureClass = FlashStage.prototype.TextureClass = FlashTexture;\n\n\nmodule.exports = FlashStage;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar FlashAsset = require('../assets/Flash');\nvar NetworkError = require('../NetworkError');\nvar once = require('../util/once');\n\n// TODO: Move the load queue into the loader.\n\n/**\n * @class FlashImageLoader\n * @implements ImageLoader\n * @classdesc\n *\n * A {@link Loader} for Flash images.\n *\n * @param {Stage} stage The stage which is going to request images to be loaded.\n */\nfunction FlashImageLoader(stage) {\n if (stage.type !== 'flash') {\n throw new Error('Stage type incompatible with loader');\n }\n this._stage = stage;\n}\n\n/**\n * Loads an {@link Asset} from an image.\n * @param {string} url The image URL.\n * @param {?Rect} rect A {@link Rect} describing a portion of the image, or null\n * to use the full image.\n * @param {function(?Error, Asset)} done The callback.\n * @return {function()} A function to cancel loading.\n */\nFlashImageLoader.prototype.loadImage = function(url, rect, done) {\n var stage = this._stage;\n var flashElement = stage.flashElement();\n\n var x = rect && rect.x || 0;\n var y = rect && rect.y || 0;\n var width = rect && rect.width || 1;\n var height = rect && rect.height || 1;\n\n var imageId = flashElement.loadImage(url, width, height, x, y);\n\n done = once(done);\n\n // TODO: use a single callback for all imageLoaded events.\n\n function callback(err, callbackId) {\n // There is a single callback for all load events, so make sure this\n // is the right one.\n if (callbackId !== imageId) {\n return;\n }\n\n stage.removeFlashCallbackListener('imageLoaded', callback);\n\n // TODO: is there any way to distinguish a network error from other\n // kinds of errors? For now we always return NetworkError since this\n // prevents images to be retried continuously while we are offline.\n if (err) {\n done(new NetworkError('Network error: ' + url));\n } else {\n done(null, new FlashAsset(flashElement, imageId));\n }\n }\n\n stage.addFlashCallbackListener('imageLoaded', callback);\n\n function cancel() {\n flashElement.cancelImage(imageId);\n stage.removeFlashCallbackListener('imageLoaded', callback);\n done.apply(null, arguments);\n }\n\n return cancel;\n};\n\nmodule.exports = FlashImageLoader;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar eventEmitter = require('minimal-event-emitter');\nvar clearOwnProperties = require('../util/clearOwnProperties');\n\n/**\n * @class FlashAsset\n * @implements Asset\n * @classdesc\n *\n * An immutable {@link Asset} compatible with {@link FlashStage}.\n * \n * The asset's underlying pixel source is a unique image ID associated with\n * a Flash application.\n *\n * @param {Element} flashElement The HTML element for the Flash application.\n * @param {number} imageId The unique image ID inside the Flash application.\n */\nfunction FlashAsset(flashElement, imageId) {\n this._flashElement = flashElement;\n this._imageId = imageId;\n}\n\neventEmitter(FlashAsset);\n\n/**\n * Destructor.\n */\nFlashAsset.prototype.destroy = function() {\n this._flashElement.unloadImage(this._imageId);\n clearOwnProperties(this);\n};\n\nFlashAsset.prototype.element = function() {\n return this._imageId;\n};\n\nFlashAsset.prototype.width = function() {\n // Not actually used anywhere.\n return 0;\n};\n\nFlashAsset.prototype.height = function() {\n // Not actually used anywhere.\n return 0;\n};\n\nFlashAsset.prototype.timestamp = function() {\n return 0;\n};\n\nFlashAsset.prototype.isDynamic = function() {\n return false;\n};\n\nmodule.exports = FlashAsset;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\n// Detect supported Flash version. Returns [major, minor, rev] or null.\n// Adapted from https://code.google.com/p/swfobject\nfunction detectFlashVersion() {\n var playerVersion = null;\n\n var plugins = navigator.plugins;\n var mimeTypes = navigator.mimeTypes;\n\n var d = null;\n\n if (plugins && plugins['Shockwave Flash'] && mimeTypes &&\n mimeTypes['application/x-shockwave-flash'] &&\n mimeTypes['application/x-shockwave-flash'].enabledPlugin) {\n d = plugins['Shockwave Flash'].description;\n d = d.replace(/^.*\\s+(\\S+\\s+\\S+$)/, '$1');\n playerVersion = [0, 0, 0];\n playerVersion[0] = parseInt(d.replace(/^(.*)\\..*$/, '$1'), 10);\n playerVersion[1] = parseInt(d.replace(/^.*\\.(.*)\\s.*$/, '$1'), 10);\n playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, '$1'), 10) : 0;\n }\n else if (window.ActiveXObject) {\n try {\n var a = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');\n if (a && (d = a.GetVariable('$version'))) {\n d = d.split(' ')[1].split(',');\n playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];\n }\n }\n catch (e) {}\n }\n\n return playerVersion;\n}\n\n// Flash support detection.\nfunction checkFlashSupported() {\n var version = detectFlashVersion();\n // Only support 10.1 and above. Flash 10.0 does not work for some reason.\n return version && (version[0] >= 11 || (version[0] === 10 && version[1] >= 1));\n}\n\n// Cache result.\nvar supported;\nfunction flashSupported() {\n if (supported !== undefined) {\n return supported;\n }\n return (supported = checkFlashSupported());\n}\n\nmodule.exports = flashSupported;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nfunction defer(fn, args) {\n function deferred() {\n if (args && args.length > 0) {\n fn.apply(null, args);\n } else {\n fn();\n }\n }\n setTimeout(deferred, 0);\n}\n\nmodule.exports = defer;","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar WebGlBaseRenderer = require('./WebGlBase');\nvar inherits = require('../util/inherits');\n\n/**\n * @class WebGlCubeRenderer\n * @implements Renderer\n * @classdesc\n *\n * A renderer for {@link CubeGeometry} and {@link RectilinearView}, appropriate\n * for a {@link WebGlStage}.\n *\n * Most users do not need to instantiate this class. Renderers are created and\n * destroyed by {@link Stage} as necessary.\n */\nfunction WebGlCubeRenderer() {\n this.constructor.super_.apply(this, arguments);\n}\n\ninherits(WebGlCubeRenderer, WebGlBaseRenderer);\n\nmodule.exports = WebGlCubeRenderer;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar mat4 = require('gl-matrix').mat4;\nvar vec3 = require('gl-matrix').vec3;\nvar clearOwnProperties = require('../util/clearOwnProperties');\n\nvar WebGlCommon = require('./WebGlCommon');\nvar createConstantBuffers = WebGlCommon.createConstantBuffers;\nvar destroyConstantBuffers = WebGlCommon.destroyConstantBuffers;\nvar createShaderProgram = WebGlCommon.createShaderProgram;\nvar destroyShaderProgram = WebGlCommon.destroyShaderProgram;\nvar enableAttributes = WebGlCommon.enableAttributes;\nvar disableAttributes = WebGlCommon.disableAttributes;\nvar setViewport = WebGlCommon.setViewport;\nvar setupPixelEffectUniforms = WebGlCommon.setupPixelEffectUniforms;\n\nvar setDepth = WebGlCommon.setDepth;\nvar setTexture = WebGlCommon.setTexture;\n\nvar vertexSrc = require('../shaders/vertexNormal');\nvar fragmentSrc = require('../shaders/fragmentNormal');\n\nvar vertexIndices = [0, 1, 2, 0, 2, 3];\nvar vertexPositions = [-0.5, -0.5, 0.0, 0.5, -0.5, 0.0, 0.5, 0.5, 0.0, -0.5, 0.5, 0.0];\nvar textureCoords = [0.0, 0.0, 1.0, 0.0, 1.0, 1.0, 0.0, 1.0];\n\nvar attribList = ['aVertexPosition', 'aTextureCoord'];\nvar uniformList = [\n 'uDepth', 'uOpacity', 'uSampler', 'uProjMatrix', 'uViewportMatrix',\n 'uColorOffset', 'uColorMatrix'\n];\n\n\nfunction WebGlBaseRenderer(gl) {\n this.gl = gl;\n\n // The projection matrix positions the tiles in world space.\n // We compute it in Javascript because lack of precision in the vertex shader\n // causes seams to appear between adjacent tiles at large zoom levels.\n this.projMatrix = mat4.create();\n\n // The viewport matrix responsible for viewport clamping.\n // See setViewport() for an explanation of how it works.\n this.viewportMatrix = mat4.create();\n\n // Translation and scale vectors for tiles.\n this.translateVector = vec3.create();\n this.scaleVector = vec3.create();\n\n this.constantBuffers = createConstantBuffers(gl, vertexIndices, vertexPositions, textureCoords);\n\n this.shaderProgram = createShaderProgram(gl, vertexSrc, fragmentSrc, attribList, uniformList);\n}\n\nWebGlBaseRenderer.prototype.destroy = function() {\n destroyConstantBuffers(this.gl, this.constantBuffers);\n destroyShaderProgram(this.gl, this.shaderProgram);\n clearOwnProperties(this);\n};\n\nWebGlBaseRenderer.prototype.startLayer = function(layer, rect) {\n var gl = this.gl;\n var shaderProgram = this.shaderProgram;\n var constantBuffers = this.constantBuffers;\n var viewportMatrix = this.viewportMatrix;\n\n gl.useProgram(shaderProgram);\n\n enableAttributes(gl, shaderProgram);\n\n setViewport(gl, layer, rect, viewportMatrix);\n gl.uniformMatrix4fv(shaderProgram.uViewportMatrix, false, viewportMatrix);\n\n gl.bindBuffer(gl.ARRAY_BUFFER, constantBuffers.vertexPositions);\n gl.vertexAttribPointer(shaderProgram.aVertexPosition, 3, gl.FLOAT, gl.FALSE, 0, 0);\n gl.bindBuffer(gl.ARRAY_BUFFER, constantBuffers.textureCoords);\n gl.vertexAttribPointer(shaderProgram.aTextureCoord, 2, gl.FLOAT, gl.FALSE, 0, 0);\n\n setupPixelEffectUniforms(gl, layer.effects(), {\n opacity: shaderProgram.uOpacity,\n colorOffset: shaderProgram.uColorOffset,\n colorMatrix: shaderProgram.uColorMatrix\n });\n};\n\n\nWebGlBaseRenderer.prototype.endLayer = function(layer, rect) {\n var gl = this.gl;\n var shaderProgram = this.shaderProgram;\n disableAttributes(gl, shaderProgram);\n};\n\n\nWebGlBaseRenderer.prototype.renderTile = function(tile, texture, layer, layerZ) {\n var gl = this.gl;\n var shaderProgram = this.shaderProgram;\n var constantBuffers = this.constantBuffers;\n var projMatrix = this.projMatrix;\n var translateVector = this.translateVector;\n var scaleVector = this.scaleVector;\n\n translateVector[0] = tile.centerX();\n translateVector[1] = tile.centerY();\n translateVector[2] = -0.5;\n\n scaleVector[0] = tile.scaleX();\n scaleVector[1] = tile.scaleY();\n scaleVector[2] = 1.0;\n\n mat4.copy(projMatrix, layer.view().projection());\n mat4.rotateX(projMatrix, projMatrix, tile.rotX());\n mat4.rotateY(projMatrix, projMatrix, tile.rotY());\n mat4.translate(projMatrix, projMatrix, translateVector);\n mat4.scale(projMatrix, projMatrix, scaleVector);\n\n gl.uniformMatrix4fv(shaderProgram.uProjMatrix, false, projMatrix);\n\n setDepth(gl, shaderProgram, layerZ, tile.z);\n\n setTexture(gl, shaderProgram, texture);\n\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, constantBuffers.vertexIndices);\n gl.drawElements(gl.TRIANGLES, vertexIndices.length, gl.UNSIGNED_SHORT, 0);\n};\n\n\nmodule.exports = WebGlBaseRenderer;\n","import * as glMatrix from \"./common.js\";\n/**\r\n * 4x4 Matrix
Format: column-major, when typed out it looks like row-major
The matrices are being post multiplied.\r\n * @module mat4\r\n */\n\n/**\r\n * Creates a new identity mat4\r\n *\r\n * @returns {mat4} a new 4x4 matrix\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(16);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n }\n\n out[0] = 1;\n out[5] = 1;\n out[10] = 1;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a new mat4 initialized with values from an existing matrix\r\n *\r\n * @param {mat4} a matrix to clone\r\n * @returns {mat4} a new 4x4 matrix\r\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(16);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n/**\r\n * Copy the values from one mat4 to another\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {mat4} a the source matrix\r\n * @returns {mat4} out\r\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n/**\r\n * Create a new mat4 with the given values\r\n *\r\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\r\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\r\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\r\n * @param {Number} m03 Component in column 0, row 3 position (index 3)\r\n * @param {Number} m10 Component in column 1, row 0 position (index 4)\r\n * @param {Number} m11 Component in column 1, row 1 position (index 5)\r\n * @param {Number} m12 Component in column 1, row 2 position (index 6)\r\n * @param {Number} m13 Component in column 1, row 3 position (index 7)\r\n * @param {Number} m20 Component in column 2, row 0 position (index 8)\r\n * @param {Number} m21 Component in column 2, row 1 position (index 9)\r\n * @param {Number} m22 Component in column 2, row 2 position (index 10)\r\n * @param {Number} m23 Component in column 2, row 3 position (index 11)\r\n * @param {Number} m30 Component in column 3, row 0 position (index 12)\r\n * @param {Number} m31 Component in column 3, row 1 position (index 13)\r\n * @param {Number} m32 Component in column 3, row 2 position (index 14)\r\n * @param {Number} m33 Component in column 3, row 3 position (index 15)\r\n * @returns {mat4} A new mat4\r\n */\n\nexport function fromValues(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {\n var out = new glMatrix.ARRAY_TYPE(16);\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n return out;\n}\n/**\r\n * Set the components of a mat4 to the given values\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\r\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\r\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\r\n * @param {Number} m03 Component in column 0, row 3 position (index 3)\r\n * @param {Number} m10 Component in column 1, row 0 position (index 4)\r\n * @param {Number} m11 Component in column 1, row 1 position (index 5)\r\n * @param {Number} m12 Component in column 1, row 2 position (index 6)\r\n * @param {Number} m13 Component in column 1, row 3 position (index 7)\r\n * @param {Number} m20 Component in column 2, row 0 position (index 8)\r\n * @param {Number} m21 Component in column 2, row 1 position (index 9)\r\n * @param {Number} m22 Component in column 2, row 2 position (index 10)\r\n * @param {Number} m23 Component in column 2, row 3 position (index 11)\r\n * @param {Number} m30 Component in column 3, row 0 position (index 12)\r\n * @param {Number} m31 Component in column 3, row 1 position (index 13)\r\n * @param {Number} m32 Component in column 3, row 2 position (index 14)\r\n * @param {Number} m33 Component in column 3, row 3 position (index 15)\r\n * @returns {mat4} out\r\n */\n\nexport function set(out, m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n return out;\n}\n/**\r\n * Set a mat4 to the identity matrix\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @returns {mat4} out\r\n */\n\nexport function identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Transpose the values of a mat4\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {mat4} a the source matrix\r\n * @returns {mat4} out\r\n */\n\nexport function transpose(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n var a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a12 = a[6],\n a13 = a[7];\n var a23 = a[11];\n out[1] = a[4];\n out[2] = a[8];\n out[3] = a[12];\n out[4] = a01;\n out[6] = a[9];\n out[7] = a[13];\n out[8] = a02;\n out[9] = a12;\n out[11] = a[14];\n out[12] = a03;\n out[13] = a13;\n out[14] = a23;\n } else {\n out[0] = a[0];\n out[1] = a[4];\n out[2] = a[8];\n out[3] = a[12];\n out[4] = a[1];\n out[5] = a[5];\n out[6] = a[9];\n out[7] = a[13];\n out[8] = a[2];\n out[9] = a[6];\n out[10] = a[10];\n out[11] = a[14];\n out[12] = a[3];\n out[13] = a[7];\n out[14] = a[11];\n out[15] = a[15];\n }\n\n return out;\n}\n/**\r\n * Inverts a mat4\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {mat4} a the source matrix\r\n * @returns {mat4} out\r\n */\n\nexport function invert(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (!det) {\n return null;\n }\n\n det = 1.0 / det;\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\n out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\n out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\n out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\n out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\n out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\n out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\n return out;\n}\n/**\r\n * Calculates the adjugate of a mat4\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {mat4} a the source matrix\r\n * @returns {mat4} out\r\n */\n\nexport function adjoint(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n out[0] = a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22);\n out[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22));\n out[2] = a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12);\n out[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12));\n out[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22));\n out[5] = a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22);\n out[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12));\n out[7] = a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12);\n out[8] = a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21);\n out[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21));\n out[10] = a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11);\n out[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11));\n out[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21));\n out[13] = a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21);\n out[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11));\n out[15] = a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11);\n return out;\n}\n/**\r\n * Calculates the determinant of a mat4\r\n *\r\n * @param {mat4} a the source matrix\r\n * @returns {Number} determinant of a\r\n */\n\nexport function determinant(a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n}\n/**\r\n * Multiplies two mat4s\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {mat4} a the first operand\r\n * @param {mat4} b the second operand\r\n * @returns {mat4} out\r\n */\n\nexport function multiply(out, a, b) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15]; // Cache only the current line of the second matrix\n\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n out[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[4];\n b1 = b[5];\n b2 = b[6];\n b3 = b[7];\n out[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[8];\n b1 = b[9];\n b2 = b[10];\n b3 = b[11];\n out[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[12];\n b1 = b[13];\n b2 = b[14];\n b3 = b[15];\n out[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n return out;\n}\n/**\r\n * Translate a mat4 by the given vector\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {mat4} a the matrix to translate\r\n * @param {vec3} v vector to translate by\r\n * @returns {mat4} out\r\n */\n\nexport function translate(out, a, v) {\n var x = v[0],\n y = v[1],\n z = v[2];\n var a00, a01, a02, a03;\n var a10, a11, a12, a13;\n var a20, a21, a22, a23;\n\n if (a === out) {\n out[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\n out[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\n out[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\n out[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\n } else {\n a00 = a[0];\n a01 = a[1];\n a02 = a[2];\n a03 = a[3];\n a10 = a[4];\n a11 = a[5];\n a12 = a[6];\n a13 = a[7];\n a20 = a[8];\n a21 = a[9];\n a22 = a[10];\n a23 = a[11];\n out[0] = a00;\n out[1] = a01;\n out[2] = a02;\n out[3] = a03;\n out[4] = a10;\n out[5] = a11;\n out[6] = a12;\n out[7] = a13;\n out[8] = a20;\n out[9] = a21;\n out[10] = a22;\n out[11] = a23;\n out[12] = a00 * x + a10 * y + a20 * z + a[12];\n out[13] = a01 * x + a11 * y + a21 * z + a[13];\n out[14] = a02 * x + a12 * y + a22 * z + a[14];\n out[15] = a03 * x + a13 * y + a23 * z + a[15];\n }\n\n return out;\n}\n/**\r\n * Scales the mat4 by the dimensions in the given vec3 not using vectorization\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {mat4} a the matrix to scale\r\n * @param {vec3} v the vec3 to scale the matrix by\r\n * @returns {mat4} out\r\n **/\n\nexport function scale(out, a, v) {\n var x = v[0],\n y = v[1],\n z = v[2];\n out[0] = a[0] * x;\n out[1] = a[1] * x;\n out[2] = a[2] * x;\n out[3] = a[3] * x;\n out[4] = a[4] * y;\n out[5] = a[5] * y;\n out[6] = a[6] * y;\n out[7] = a[7] * y;\n out[8] = a[8] * z;\n out[9] = a[9] * z;\n out[10] = a[10] * z;\n out[11] = a[11] * z;\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n/**\r\n * Rotates a mat4 by the given angle around the given axis\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {mat4} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @param {vec3} axis the axis to rotate around\r\n * @returns {mat4} out\r\n */\n\nexport function rotate(out, a, rad, axis) {\n var x = axis[0],\n y = axis[1],\n z = axis[2];\n var len = Math.hypot(x, y, z);\n var s, c, t;\n var a00, a01, a02, a03;\n var a10, a11, a12, a13;\n var a20, a21, a22, a23;\n var b00, b01, b02;\n var b10, b11, b12;\n var b20, b21, b22;\n\n if (len < glMatrix.EPSILON) {\n return null;\n }\n\n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n s = Math.sin(rad);\n c = Math.cos(rad);\n t = 1 - c;\n a00 = a[0];\n a01 = a[1];\n a02 = a[2];\n a03 = a[3];\n a10 = a[4];\n a11 = a[5];\n a12 = a[6];\n a13 = a[7];\n a20 = a[8];\n a21 = a[9];\n a22 = a[10];\n a23 = a[11]; // Construct the elements of the rotation matrix\n\n b00 = x * x * t + c;\n b01 = y * x * t + z * s;\n b02 = z * x * t - y * s;\n b10 = x * y * t - z * s;\n b11 = y * y * t + c;\n b12 = z * y * t + x * s;\n b20 = x * z * t + y * s;\n b21 = y * z * t - x * s;\n b22 = z * z * t + c; // Perform rotation-specific matrix multiplication\n\n out[0] = a00 * b00 + a10 * b01 + a20 * b02;\n out[1] = a01 * b00 + a11 * b01 + a21 * b02;\n out[2] = a02 * b00 + a12 * b01 + a22 * b02;\n out[3] = a03 * b00 + a13 * b01 + a23 * b02;\n out[4] = a00 * b10 + a10 * b11 + a20 * b12;\n out[5] = a01 * b10 + a11 * b11 + a21 * b12;\n out[6] = a02 * b10 + a12 * b11 + a22 * b12;\n out[7] = a03 * b10 + a13 * b11 + a23 * b12;\n out[8] = a00 * b20 + a10 * b21 + a20 * b22;\n out[9] = a01 * b20 + a11 * b21 + a21 * b22;\n out[10] = a02 * b20 + a12 * b21 + a22 * b22;\n out[11] = a03 * b20 + a13 * b21 + a23 * b22;\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged last row\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n\n return out;\n}\n/**\r\n * Rotates a matrix by the given angle around the X axis\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {mat4} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function rotateX(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged rows\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n\n\n out[4] = a10 * c + a20 * s;\n out[5] = a11 * c + a21 * s;\n out[6] = a12 * c + a22 * s;\n out[7] = a13 * c + a23 * s;\n out[8] = a20 * c - a10 * s;\n out[9] = a21 * c - a11 * s;\n out[10] = a22 * c - a12 * s;\n out[11] = a23 * c - a13 * s;\n return out;\n}\n/**\r\n * Rotates a matrix by the given angle around the Y axis\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {mat4} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function rotateY(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged rows\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n\n\n out[0] = a00 * c - a20 * s;\n out[1] = a01 * c - a21 * s;\n out[2] = a02 * c - a22 * s;\n out[3] = a03 * c - a23 * s;\n out[8] = a00 * s + a20 * c;\n out[9] = a01 * s + a21 * c;\n out[10] = a02 * s + a22 * c;\n out[11] = a03 * s + a23 * c;\n return out;\n}\n/**\r\n * Rotates a matrix by the given angle around the Z axis\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {mat4} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function rotateZ(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged last row\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n\n\n out[0] = a00 * c + a10 * s;\n out[1] = a01 * c + a11 * s;\n out[2] = a02 * c + a12 * s;\n out[3] = a03 * c + a13 * s;\n out[4] = a10 * c - a00 * s;\n out[5] = a11 * c - a01 * s;\n out[6] = a12 * c - a02 * s;\n out[7] = a13 * c - a03 * s;\n return out;\n}\n/**\r\n * Creates a matrix from a vector translation\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.translate(dest, dest, vec);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {vec3} v Translation vector\r\n * @returns {mat4} out\r\n */\n\nexport function fromTranslation(out, v) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from a vector scaling\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.scale(dest, dest, vec);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {vec3} v Scaling vector\r\n * @returns {mat4} out\r\n */\n\nexport function fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = v[1];\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = v[2];\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from a given angle around a given axis\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.rotate(dest, dest, rad, axis);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @param {vec3} axis the axis to rotate around\r\n * @returns {mat4} out\r\n */\n\nexport function fromRotation(out, rad, axis) {\n var x = axis[0],\n y = axis[1],\n z = axis[2];\n var len = Math.hypot(x, y, z);\n var s, c, t;\n\n if (len < glMatrix.EPSILON) {\n return null;\n }\n\n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n s = Math.sin(rad);\n c = Math.cos(rad);\n t = 1 - c; // Perform rotation-specific matrix multiplication\n\n out[0] = x * x * t + c;\n out[1] = y * x * t + z * s;\n out[2] = z * x * t - y * s;\n out[3] = 0;\n out[4] = x * y * t - z * s;\n out[5] = y * y * t + c;\n out[6] = z * y * t + x * s;\n out[7] = 0;\n out[8] = x * z * t + y * s;\n out[9] = y * z * t - x * s;\n out[10] = z * z * t + c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from the given angle around the X axis\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.rotateX(dest, dest, rad);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function fromXRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = c;\n out[6] = s;\n out[7] = 0;\n out[8] = 0;\n out[9] = -s;\n out[10] = c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from the given angle around the Y axis\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.rotateY(dest, dest, rad);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function fromYRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n\n out[0] = c;\n out[1] = 0;\n out[2] = -s;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = s;\n out[9] = 0;\n out[10] = c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from the given angle around the Z axis\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.rotateZ(dest, dest, rad);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function fromZRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n\n out[0] = c;\n out[1] = s;\n out[2] = 0;\n out[3] = 0;\n out[4] = -s;\n out[5] = c;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from a quaternion rotation and vector translation\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.translate(dest, vec);\r\n * let quatMat = mat4.create();\r\n * quat4.toMat4(quat, quatMat);\r\n * mat4.multiply(dest, quatMat);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {quat4} q Rotation quaternion\r\n * @param {vec3} v Translation vector\r\n * @returns {mat4} out\r\n */\n\nexport function fromRotationTranslation(out, q, v) {\n // Quaternion math\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - (yy + zz);\n out[1] = xy + wz;\n out[2] = xz - wy;\n out[3] = 0;\n out[4] = xy - wz;\n out[5] = 1 - (xx + zz);\n out[6] = yz + wx;\n out[7] = 0;\n out[8] = xz + wy;\n out[9] = yz - wx;\n out[10] = 1 - (xx + yy);\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a new mat4 from a dual quat.\r\n *\r\n * @param {mat4} out Matrix\r\n * @param {quat2} a Dual Quaternion\r\n * @returns {mat4} mat4 receiving operation result\r\n */\n\nexport function fromQuat2(out, a) {\n var translation = new glMatrix.ARRAY_TYPE(3);\n var bx = -a[0],\n by = -a[1],\n bz = -a[2],\n bw = a[3],\n ax = a[4],\n ay = a[5],\n az = a[6],\n aw = a[7];\n var magnitude = bx * bx + by * by + bz * bz + bw * bw; //Only scale if it makes sense\n\n if (magnitude > 0) {\n translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2 / magnitude;\n translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2 / magnitude;\n translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2 / magnitude;\n } else {\n translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2;\n translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2;\n translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2;\n }\n\n fromRotationTranslation(out, a, translation);\n return out;\n}\n/**\r\n * Returns the translation vector component of a transformation\r\n * matrix. If a matrix is built with fromRotationTranslation,\r\n * the returned vector will be the same as the translation vector\r\n * originally supplied.\r\n * @param {vec3} out Vector to receive translation component\r\n * @param {mat4} mat Matrix to be decomposed (input)\r\n * @return {vec3} out\r\n */\n\nexport function getTranslation(out, mat) {\n out[0] = mat[12];\n out[1] = mat[13];\n out[2] = mat[14];\n return out;\n}\n/**\r\n * Returns the scaling factor component of a transformation\r\n * matrix. If a matrix is built with fromRotationTranslationScale\r\n * with a normalized Quaternion paramter, the returned vector will be\r\n * the same as the scaling vector\r\n * originally supplied.\r\n * @param {vec3} out Vector to receive scaling factor component\r\n * @param {mat4} mat Matrix to be decomposed (input)\r\n * @return {vec3} out\r\n */\n\nexport function getScaling(out, mat) {\n var m11 = mat[0];\n var m12 = mat[1];\n var m13 = mat[2];\n var m21 = mat[4];\n var m22 = mat[5];\n var m23 = mat[6];\n var m31 = mat[8];\n var m32 = mat[9];\n var m33 = mat[10];\n out[0] = Math.hypot(m11, m12, m13);\n out[1] = Math.hypot(m21, m22, m23);\n out[2] = Math.hypot(m31, m32, m33);\n return out;\n}\n/**\r\n * Returns a quaternion representing the rotational component\r\n * of a transformation matrix. If a matrix is built with\r\n * fromRotationTranslation, the returned quaternion will be the\r\n * same as the quaternion originally supplied.\r\n * @param {quat} out Quaternion to receive the rotation component\r\n * @param {mat4} mat Matrix to be decomposed (input)\r\n * @return {quat} out\r\n */\n\nexport function getRotation(out, mat) {\n var scaling = new glMatrix.ARRAY_TYPE(3);\n getScaling(scaling, mat);\n var is1 = 1 / scaling[0];\n var is2 = 1 / scaling[1];\n var is3 = 1 / scaling[2];\n var sm11 = mat[0] * is1;\n var sm12 = mat[1] * is2;\n var sm13 = mat[2] * is3;\n var sm21 = mat[4] * is1;\n var sm22 = mat[5] * is2;\n var sm23 = mat[6] * is3;\n var sm31 = mat[8] * is1;\n var sm32 = mat[9] * is2;\n var sm33 = mat[10] * is3;\n var trace = sm11 + sm22 + sm33;\n var S = 0;\n\n if (trace > 0) {\n S = Math.sqrt(trace + 1.0) * 2;\n out[3] = 0.25 * S;\n out[0] = (sm23 - sm32) / S;\n out[1] = (sm31 - sm13) / S;\n out[2] = (sm12 - sm21) / S;\n } else if (sm11 > sm22 && sm11 > sm33) {\n S = Math.sqrt(1.0 + sm11 - sm22 - sm33) * 2;\n out[3] = (sm23 - sm32) / S;\n out[0] = 0.25 * S;\n out[1] = (sm12 + sm21) / S;\n out[2] = (sm31 + sm13) / S;\n } else if (sm22 > sm33) {\n S = Math.sqrt(1.0 + sm22 - sm11 - sm33) * 2;\n out[3] = (sm31 - sm13) / S;\n out[0] = (sm12 + sm21) / S;\n out[1] = 0.25 * S;\n out[2] = (sm23 + sm32) / S;\n } else {\n S = Math.sqrt(1.0 + sm33 - sm11 - sm22) * 2;\n out[3] = (sm12 - sm21) / S;\n out[0] = (sm31 + sm13) / S;\n out[1] = (sm23 + sm32) / S;\n out[2] = 0.25 * S;\n }\n\n return out;\n}\n/**\r\n * Creates a matrix from a quaternion rotation, vector translation and vector scale\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.translate(dest, vec);\r\n * let quatMat = mat4.create();\r\n * quat4.toMat4(quat, quatMat);\r\n * mat4.multiply(dest, quatMat);\r\n * mat4.scale(dest, scale)\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {quat4} q Rotation quaternion\r\n * @param {vec3} v Translation vector\r\n * @param {vec3} s Scaling vector\r\n * @returns {mat4} out\r\n */\n\nexport function fromRotationTranslationScale(out, q, v, s) {\n // Quaternion math\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n var sx = s[0];\n var sy = s[1];\n var sz = s[2];\n out[0] = (1 - (yy + zz)) * sx;\n out[1] = (xy + wz) * sx;\n out[2] = (xz - wy) * sx;\n out[3] = 0;\n out[4] = (xy - wz) * sy;\n out[5] = (1 - (xx + zz)) * sy;\n out[6] = (yz + wx) * sy;\n out[7] = 0;\n out[8] = (xz + wy) * sz;\n out[9] = (yz - wx) * sz;\n out[10] = (1 - (xx + yy)) * sz;\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from a quaternion rotation, vector translation and vector scale, rotating and scaling around the given origin\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.translate(dest, vec);\r\n * mat4.translate(dest, origin);\r\n * let quatMat = mat4.create();\r\n * quat4.toMat4(quat, quatMat);\r\n * mat4.multiply(dest, quatMat);\r\n * mat4.scale(dest, scale)\r\n * mat4.translate(dest, negativeOrigin);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {quat4} q Rotation quaternion\r\n * @param {vec3} v Translation vector\r\n * @param {vec3} s Scaling vector\r\n * @param {vec3} o The origin vector around which to scale and rotate\r\n * @returns {mat4} out\r\n */\n\nexport function fromRotationTranslationScaleOrigin(out, q, v, s, o) {\n // Quaternion math\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n var sx = s[0];\n var sy = s[1];\n var sz = s[2];\n var ox = o[0];\n var oy = o[1];\n var oz = o[2];\n var out0 = (1 - (yy + zz)) * sx;\n var out1 = (xy + wz) * sx;\n var out2 = (xz - wy) * sx;\n var out4 = (xy - wz) * sy;\n var out5 = (1 - (xx + zz)) * sy;\n var out6 = (yz + wx) * sy;\n var out8 = (xz + wy) * sz;\n var out9 = (yz - wx) * sz;\n var out10 = (1 - (xx + yy)) * sz;\n out[0] = out0;\n out[1] = out1;\n out[2] = out2;\n out[3] = 0;\n out[4] = out4;\n out[5] = out5;\n out[6] = out6;\n out[7] = 0;\n out[8] = out8;\n out[9] = out9;\n out[10] = out10;\n out[11] = 0;\n out[12] = v[0] + ox - (out0 * ox + out4 * oy + out8 * oz);\n out[13] = v[1] + oy - (out1 * ox + out5 * oy + out9 * oz);\n out[14] = v[2] + oz - (out2 * ox + out6 * oy + out10 * oz);\n out[15] = 1;\n return out;\n}\n/**\r\n * Calculates a 4x4 matrix from the given quaternion\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {quat} q Quaternion to create matrix from\r\n *\r\n * @returns {mat4} out\r\n */\n\nexport function fromQuat(out, q) {\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var yx = y * x2;\n var yy = y * y2;\n var zx = z * x2;\n var zy = z * y2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - yy - zz;\n out[1] = yx + wz;\n out[2] = zx - wy;\n out[3] = 0;\n out[4] = yx - wz;\n out[5] = 1 - xx - zz;\n out[6] = zy + wx;\n out[7] = 0;\n out[8] = zx + wy;\n out[9] = zy - wx;\n out[10] = 1 - xx - yy;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Generates a frustum matrix with the given bounds\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {Number} left Left bound of the frustum\r\n * @param {Number} right Right bound of the frustum\r\n * @param {Number} bottom Bottom bound of the frustum\r\n * @param {Number} top Top bound of the frustum\r\n * @param {Number} near Near bound of the frustum\r\n * @param {Number} far Far bound of the frustum\r\n * @returns {mat4} out\r\n */\n\nexport function frustum(out, left, right, bottom, top, near, far) {\n var rl = 1 / (right - left);\n var tb = 1 / (top - bottom);\n var nf = 1 / (near - far);\n out[0] = near * 2 * rl;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = near * 2 * tb;\n out[6] = 0;\n out[7] = 0;\n out[8] = (right + left) * rl;\n out[9] = (top + bottom) * tb;\n out[10] = (far + near) * nf;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[14] = far * near * 2 * nf;\n out[15] = 0;\n return out;\n}\n/**\r\n * Generates a perspective projection matrix with the given bounds.\r\n * Passing null/undefined/no value for far will generate infinite projection matrix.\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {number} fovy Vertical field of view in radians\r\n * @param {number} aspect Aspect ratio. typically viewport width/height\r\n * @param {number} near Near bound of the frustum\r\n * @param {number} far Far bound of the frustum, can be null or Infinity\r\n * @returns {mat4} out\r\n */\n\nexport function perspective(out, fovy, aspect, near, far) {\n var f = 1.0 / Math.tan(fovy / 2),\n nf;\n out[0] = f / aspect;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = f;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[15] = 0;\n\n if (far != null && far !== Infinity) {\n nf = 1 / (near - far);\n out[10] = (far + near) * nf;\n out[14] = 2 * far * near * nf;\n } else {\n out[10] = -1;\n out[14] = -2 * near;\n }\n\n return out;\n}\n/**\r\n * Generates a perspective projection matrix with the given field of view.\r\n * This is primarily useful for generating projection matrices to be used\r\n * with the still experiemental WebVR API.\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {Object} fov Object containing the following values: upDegrees, downDegrees, leftDegrees, rightDegrees\r\n * @param {number} near Near bound of the frustum\r\n * @param {number} far Far bound of the frustum\r\n * @returns {mat4} out\r\n */\n\nexport function perspectiveFromFieldOfView(out, fov, near, far) {\n var upTan = Math.tan(fov.upDegrees * Math.PI / 180.0);\n var downTan = Math.tan(fov.downDegrees * Math.PI / 180.0);\n var leftTan = Math.tan(fov.leftDegrees * Math.PI / 180.0);\n var rightTan = Math.tan(fov.rightDegrees * Math.PI / 180.0);\n var xScale = 2.0 / (leftTan + rightTan);\n var yScale = 2.0 / (upTan + downTan);\n out[0] = xScale;\n out[1] = 0.0;\n out[2] = 0.0;\n out[3] = 0.0;\n out[4] = 0.0;\n out[5] = yScale;\n out[6] = 0.0;\n out[7] = 0.0;\n out[8] = -((leftTan - rightTan) * xScale * 0.5);\n out[9] = (upTan - downTan) * yScale * 0.5;\n out[10] = far / (near - far);\n out[11] = -1.0;\n out[12] = 0.0;\n out[13] = 0.0;\n out[14] = far * near / (near - far);\n out[15] = 0.0;\n return out;\n}\n/**\r\n * Generates a orthogonal projection matrix with the given bounds\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {number} left Left bound of the frustum\r\n * @param {number} right Right bound of the frustum\r\n * @param {number} bottom Bottom bound of the frustum\r\n * @param {number} top Top bound of the frustum\r\n * @param {number} near Near bound of the frustum\r\n * @param {number} far Far bound of the frustum\r\n * @returns {mat4} out\r\n */\n\nexport function ortho(out, left, right, bottom, top, near, far) {\n var lr = 1 / (left - right);\n var bt = 1 / (bottom - top);\n var nf = 1 / (near - far);\n out[0] = -2 * lr;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = -2 * bt;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 2 * nf;\n out[11] = 0;\n out[12] = (left + right) * lr;\n out[13] = (top + bottom) * bt;\n out[14] = (far + near) * nf;\n out[15] = 1;\n return out;\n}\n/**\r\n * Generates a look-at matrix with the given eye position, focal point, and up axis.\r\n * If you want a matrix that actually makes an object look at another object, you should use targetTo instead.\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {vec3} eye Position of the viewer\r\n * @param {vec3} center Point the viewer is looking at\r\n * @param {vec3} up vec3 pointing up\r\n * @returns {mat4} out\r\n */\n\nexport function lookAt(out, eye, center, up) {\n var x0, x1, x2, y0, y1, y2, z0, z1, z2, len;\n var eyex = eye[0];\n var eyey = eye[1];\n var eyez = eye[2];\n var upx = up[0];\n var upy = up[1];\n var upz = up[2];\n var centerx = center[0];\n var centery = center[1];\n var centerz = center[2];\n\n if (Math.abs(eyex - centerx) < glMatrix.EPSILON && Math.abs(eyey - centery) < glMatrix.EPSILON && Math.abs(eyez - centerz) < glMatrix.EPSILON) {\n return identity(out);\n }\n\n z0 = eyex - centerx;\n z1 = eyey - centery;\n z2 = eyez - centerz;\n len = 1 / Math.hypot(z0, z1, z2);\n z0 *= len;\n z1 *= len;\n z2 *= len;\n x0 = upy * z2 - upz * z1;\n x1 = upz * z0 - upx * z2;\n x2 = upx * z1 - upy * z0;\n len = Math.hypot(x0, x1, x2);\n\n if (!len) {\n x0 = 0;\n x1 = 0;\n x2 = 0;\n } else {\n len = 1 / len;\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n\n y0 = z1 * x2 - z2 * x1;\n y1 = z2 * x0 - z0 * x2;\n y2 = z0 * x1 - z1 * x0;\n len = Math.hypot(y0, y1, y2);\n\n if (!len) {\n y0 = 0;\n y1 = 0;\n y2 = 0;\n } else {\n len = 1 / len;\n y0 *= len;\n y1 *= len;\n y2 *= len;\n }\n\n out[0] = x0;\n out[1] = y0;\n out[2] = z0;\n out[3] = 0;\n out[4] = x1;\n out[5] = y1;\n out[6] = z1;\n out[7] = 0;\n out[8] = x2;\n out[9] = y2;\n out[10] = z2;\n out[11] = 0;\n out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);\n out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);\n out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);\n out[15] = 1;\n return out;\n}\n/**\r\n * Generates a matrix that makes something look at something else.\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {vec3} eye Position of the viewer\r\n * @param {vec3} center Point the viewer is looking at\r\n * @param {vec3} up vec3 pointing up\r\n * @returns {mat4} out\r\n */\n\nexport function targetTo(out, eye, target, up) {\n var eyex = eye[0],\n eyey = eye[1],\n eyez = eye[2],\n upx = up[0],\n upy = up[1],\n upz = up[2];\n var z0 = eyex - target[0],\n z1 = eyey - target[1],\n z2 = eyez - target[2];\n var len = z0 * z0 + z1 * z1 + z2 * z2;\n\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n z0 *= len;\n z1 *= len;\n z2 *= len;\n }\n\n var x0 = upy * z2 - upz * z1,\n x1 = upz * z0 - upx * z2,\n x2 = upx * z1 - upy * z0;\n len = x0 * x0 + x1 * x1 + x2 * x2;\n\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n\n out[0] = x0;\n out[1] = x1;\n out[2] = x2;\n out[3] = 0;\n out[4] = z1 * x2 - z2 * x1;\n out[5] = z2 * x0 - z0 * x2;\n out[6] = z0 * x1 - z1 * x0;\n out[7] = 0;\n out[8] = z0;\n out[9] = z1;\n out[10] = z2;\n out[11] = 0;\n out[12] = eyex;\n out[13] = eyey;\n out[14] = eyez;\n out[15] = 1;\n return out;\n}\n;\n/**\r\n * Returns a string representation of a mat4\r\n *\r\n * @param {mat4} a matrix to represent as a string\r\n * @returns {String} string representation of the matrix\r\n */\n\nexport function str(a) {\n return 'mat4(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ', ' + a[4] + ', ' + a[5] + ', ' + a[6] + ', ' + a[7] + ', ' + a[8] + ', ' + a[9] + ', ' + a[10] + ', ' + a[11] + ', ' + a[12] + ', ' + a[13] + ', ' + a[14] + ', ' + a[15] + ')';\n}\n/**\r\n * Returns Frobenius norm of a mat4\r\n *\r\n * @param {mat4} a the matrix to calculate Frobenius norm of\r\n * @returns {Number} Frobenius norm\r\n */\n\nexport function frob(a) {\n return Math.hypot(a[0], a[1], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\n}\n/**\r\n * Adds two mat4's\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {mat4} a the first operand\r\n * @param {mat4} b the second operand\r\n * @returns {mat4} out\r\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n out[6] = a[6] + b[6];\n out[7] = a[7] + b[7];\n out[8] = a[8] + b[8];\n out[9] = a[9] + b[9];\n out[10] = a[10] + b[10];\n out[11] = a[11] + b[11];\n out[12] = a[12] + b[12];\n out[13] = a[13] + b[13];\n out[14] = a[14] + b[14];\n out[15] = a[15] + b[15];\n return out;\n}\n/**\r\n * Subtracts matrix b from matrix a\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {mat4} a the first operand\r\n * @param {mat4} b the second operand\r\n * @returns {mat4} out\r\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n out[4] = a[4] - b[4];\n out[5] = a[5] - b[5];\n out[6] = a[6] - b[6];\n out[7] = a[7] - b[7];\n out[8] = a[8] - b[8];\n out[9] = a[9] - b[9];\n out[10] = a[10] - b[10];\n out[11] = a[11] - b[11];\n out[12] = a[12] - b[12];\n out[13] = a[13] - b[13];\n out[14] = a[14] - b[14];\n out[15] = a[15] - b[15];\n return out;\n}\n/**\r\n * Multiply each element of the matrix by a scalar.\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {mat4} a the matrix to scale\r\n * @param {Number} b amount to scale the matrix's elements by\r\n * @returns {mat4} out\r\n */\n\nexport function multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n out[6] = a[6] * b;\n out[7] = a[7] * b;\n out[8] = a[8] * b;\n out[9] = a[9] * b;\n out[10] = a[10] * b;\n out[11] = a[11] * b;\n out[12] = a[12] * b;\n out[13] = a[13] * b;\n out[14] = a[14] * b;\n out[15] = a[15] * b;\n return out;\n}\n/**\r\n * Adds two mat4's after multiplying each element of the second operand by a scalar value.\r\n *\r\n * @param {mat4} out the receiving vector\r\n * @param {mat4} a the first operand\r\n * @param {mat4} b the second operand\r\n * @param {Number} scale the amount to scale b's elements by before adding\r\n * @returns {mat4} out\r\n */\n\nexport function multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n out[4] = a[4] + b[4] * scale;\n out[5] = a[5] + b[5] * scale;\n out[6] = a[6] + b[6] * scale;\n out[7] = a[7] + b[7] * scale;\n out[8] = a[8] + b[8] * scale;\n out[9] = a[9] + b[9] * scale;\n out[10] = a[10] + b[10] * scale;\n out[11] = a[11] + b[11] * scale;\n out[12] = a[12] + b[12] * scale;\n out[13] = a[13] + b[13] * scale;\n out[14] = a[14] + b[14] * scale;\n out[15] = a[15] + b[15] * scale;\n return out;\n}\n/**\r\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\r\n *\r\n * @param {mat4} a The first matrix.\r\n * @param {mat4} b The second matrix.\r\n * @returns {Boolean} True if the matrices are equal, false otherwise.\r\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8] && a[9] === b[9] && a[10] === b[10] && a[11] === b[11] && a[12] === b[12] && a[13] === b[13] && a[14] === b[14] && a[15] === b[15];\n}\n/**\r\n * Returns whether or not the matrices have approximately the same elements in the same position.\r\n *\r\n * @param {mat4} a The first matrix.\r\n * @param {mat4} b The second matrix.\r\n * @returns {Boolean} True if the matrices are equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var a4 = a[4],\n a5 = a[5],\n a6 = a[6],\n a7 = a[7];\n var a8 = a[8],\n a9 = a[9],\n a10 = a[10],\n a11 = a[11];\n var a12 = a[12],\n a13 = a[13],\n a14 = a[14],\n a15 = a[15];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n var b4 = b[4],\n b5 = b[5],\n b6 = b[6],\n b7 = b[7];\n var b8 = b[8],\n b9 = b[9],\n b10 = b[10],\n b11 = b[11];\n var b12 = b[12],\n b13 = b[13],\n b14 = b[14],\n b15 = b[15];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a8), Math.abs(b8)) && Math.abs(a9 - b9) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a9), Math.abs(b9)) && Math.abs(a10 - b10) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a10), Math.abs(b10)) && Math.abs(a11 - b11) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a11), Math.abs(b11)) && Math.abs(a12 - b12) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a12), Math.abs(b12)) && Math.abs(a13 - b13) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a13), Math.abs(b13)) && Math.abs(a14 - b14) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a14), Math.abs(b14)) && Math.abs(a15 - b15) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a15), Math.abs(b15));\n}\n/**\r\n * Alias for {@link mat4.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Alias for {@link mat4.subtract}\r\n * @function\r\n */\n\nexport var sub = subtract;","/**\r\n * Common utilities\r\n * @module glMatrix\r\n */\n// Configuration Constants\nexport var EPSILON = 0.000001;\nexport var ARRAY_TYPE = typeof Float32Array !== 'undefined' ? Float32Array : Array;\nexport var RANDOM = Math.random;\n/**\r\n * Sets the type of array used when creating new vectors and matrices\r\n *\r\n * @param {Type} type Array type, such as Float32Array or Array\r\n */\n\nexport function setMatrixArrayType(type) {\n ARRAY_TYPE = type;\n}\nvar degree = Math.PI / 180;\n/**\r\n * Convert Degree To Radian\r\n *\r\n * @param {Number} a Angle in Degrees\r\n */\n\nexport function toRadian(a) {\n return a * degree;\n}\n/**\r\n * Tests whether or not the arguments have approximately the same value, within an absolute\r\n * or relative tolerance of glMatrix.EPSILON (an absolute tolerance is used for values less\r\n * than or equal to 1.0, and a relative tolerance is used for larger values)\r\n *\r\n * @param {Number} a The first number to test.\r\n * @param {Number} b The second number to test.\r\n * @returns {Boolean} True if the numbers are approximately equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n return Math.abs(a - b) <= EPSILON * Math.max(1.0, Math.abs(a), Math.abs(b));\n}\nif (!Math.hypot) Math.hypot = function () {\n var y = 0,\n i = arguments.length;\n\n while (i--) {\n y += arguments[i] * arguments[i];\n }\n\n return Math.sqrt(y);\n};","import * as glMatrix from \"./common.js\";\n/**\r\n * 3 Dimensional Vector\r\n * @module vec3\r\n */\n\n/**\r\n * Creates a new, empty vec3\r\n *\r\n * @returns {vec3} a new 3D vector\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(3);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n }\n\n return out;\n}\n/**\r\n * Creates a new vec3 initialized with values from an existing vector\r\n *\r\n * @param {vec3} a vector to clone\r\n * @returns {vec3} a new 3D vector\r\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(3);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n return out;\n}\n/**\r\n * Calculates the length of a vec3\r\n *\r\n * @param {vec3} a vector to calculate length of\r\n * @returns {Number} length of a\r\n */\n\nexport function length(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n return Math.hypot(x, y, z);\n}\n/**\r\n * Creates a new vec3 initialized with the given values\r\n *\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @param {Number} z Z component\r\n * @returns {vec3} a new 3D vector\r\n */\n\nexport function fromValues(x, y, z) {\n var out = new glMatrix.ARRAY_TYPE(3);\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n}\n/**\r\n * Copy the values from one vec3 to another\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a the source vector\r\n * @returns {vec3} out\r\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n return out;\n}\n/**\r\n * Set the components of a vec3 to the given values\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @param {Number} z Z component\r\n * @returns {vec3} out\r\n */\n\nexport function set(out, x, y, z) {\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n}\n/**\r\n * Adds two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a the first operand\r\n * @param {vec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n return out;\n}\n/**\r\n * Subtracts vector b from vector a\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a the first operand\r\n * @param {vec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n return out;\n}\n/**\r\n * Multiplies two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a the first operand\r\n * @param {vec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n out[2] = a[2] * b[2];\n return out;\n}\n/**\r\n * Divides two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a the first operand\r\n * @param {vec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n out[2] = a[2] / b[2];\n return out;\n}\n/**\r\n * Math.ceil the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a vector to ceil\r\n * @returns {vec3} out\r\n */\n\nexport function ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n out[2] = Math.ceil(a[2]);\n return out;\n}\n/**\r\n * Math.floor the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a vector to floor\r\n * @returns {vec3} out\r\n */\n\nexport function floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n out[2] = Math.floor(a[2]);\n return out;\n}\n/**\r\n * Returns the minimum of two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a the first operand\r\n * @param {vec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n out[2] = Math.min(a[2], b[2]);\n return out;\n}\n/**\r\n * Returns the maximum of two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a the first operand\r\n * @param {vec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n out[2] = Math.max(a[2], b[2]);\n return out;\n}\n/**\r\n * Math.round the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a vector to round\r\n * @returns {vec3} out\r\n */\n\nexport function round(out, a) {\n out[0] = Math.round(a[0]);\n out[1] = Math.round(a[1]);\n out[2] = Math.round(a[2]);\n return out;\n}\n/**\r\n * Scales a vec3 by a scalar number\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a the vector to scale\r\n * @param {Number} b amount to scale the vector by\r\n * @returns {vec3} out\r\n */\n\nexport function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n return out;\n}\n/**\r\n * Adds two vec3's after scaling the second operand by a scalar value\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a the first operand\r\n * @param {vec3} b the second operand\r\n * @param {Number} scale the amount to scale b by before adding\r\n * @returns {vec3} out\r\n */\n\nexport function scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n return out;\n}\n/**\r\n * Calculates the euclidian distance between two vec3's\r\n *\r\n * @param {vec3} a the first operand\r\n * @param {vec3} b the second operand\r\n * @returns {Number} distance between a and b\r\n */\n\nexport function distance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n return Math.hypot(x, y, z);\n}\n/**\r\n * Calculates the squared euclidian distance between two vec3's\r\n *\r\n * @param {vec3} a the first operand\r\n * @param {vec3} b the second operand\r\n * @returns {Number} squared distance between a and b\r\n */\n\nexport function squaredDistance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n return x * x + y * y + z * z;\n}\n/**\r\n * Calculates the squared length of a vec3\r\n *\r\n * @param {vec3} a vector to calculate squared length of\r\n * @returns {Number} squared length of a\r\n */\n\nexport function squaredLength(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n return x * x + y * y + z * z;\n}\n/**\r\n * Negates the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a vector to negate\r\n * @returns {vec3} out\r\n */\n\nexport function negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n return out;\n}\n/**\r\n * Returns the inverse of the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a vector to invert\r\n * @returns {vec3} out\r\n */\n\nexport function inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n out[2] = 1.0 / a[2];\n return out;\n}\n/**\r\n * Normalize a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a vector to normalize\r\n * @returns {vec3} out\r\n */\n\nexport function normalize(out, a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var len = x * x + y * y + z * z;\n\n if (len > 0) {\n //TODO: evaluate use of glm_invsqrt here?\n len = 1 / Math.sqrt(len);\n }\n\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n out[2] = a[2] * len;\n return out;\n}\n/**\r\n * Calculates the dot product of two vec3's\r\n *\r\n * @param {vec3} a the first operand\r\n * @param {vec3} b the second operand\r\n * @returns {Number} dot product of a and b\r\n */\n\nexport function dot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n}\n/**\r\n * Computes the cross product of two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a the first operand\r\n * @param {vec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function cross(out, a, b) {\n var ax = a[0],\n ay = a[1],\n az = a[2];\n var bx = b[0],\n by = b[1],\n bz = b[2];\n out[0] = ay * bz - az * by;\n out[1] = az * bx - ax * bz;\n out[2] = ax * by - ay * bx;\n return out;\n}\n/**\r\n * Performs a linear interpolation between two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a the first operand\r\n * @param {vec3} b the second operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {vec3} out\r\n */\n\nexport function lerp(out, a, b, t) {\n var ax = a[0];\n var ay = a[1];\n var az = a[2];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n out[2] = az + t * (b[2] - az);\n return out;\n}\n/**\r\n * Performs a hermite interpolation with two control points\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a the first operand\r\n * @param {vec3} b the second operand\r\n * @param {vec3} c the third operand\r\n * @param {vec3} d the fourth operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {vec3} out\r\n */\n\nexport function hermite(out, a, b, c, d, t) {\n var factorTimes2 = t * t;\n var factor1 = factorTimes2 * (2 * t - 3) + 1;\n var factor2 = factorTimes2 * (t - 2) + t;\n var factor3 = factorTimes2 * (t - 1);\n var factor4 = factorTimes2 * (3 - 2 * t);\n out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;\n out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;\n out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;\n return out;\n}\n/**\r\n * Performs a bezier interpolation with two control points\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a the first operand\r\n * @param {vec3} b the second operand\r\n * @param {vec3} c the third operand\r\n * @param {vec3} d the fourth operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {vec3} out\r\n */\n\nexport function bezier(out, a, b, c, d, t) {\n var inverseFactor = 1 - t;\n var inverseFactorTimesTwo = inverseFactor * inverseFactor;\n var factorTimes2 = t * t;\n var factor1 = inverseFactorTimesTwo * inverseFactor;\n var factor2 = 3 * t * inverseFactorTimesTwo;\n var factor3 = 3 * factorTimes2 * inverseFactor;\n var factor4 = factorTimes2 * t;\n out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;\n out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;\n out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;\n return out;\n}\n/**\r\n * Generates a random vector with the given scale\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\r\n * @returns {vec3} out\r\n */\n\nexport function random(out, scale) {\n scale = scale || 1.0;\n var r = glMatrix.RANDOM() * 2.0 * Math.PI;\n var z = glMatrix.RANDOM() * 2.0 - 1.0;\n var zScale = Math.sqrt(1.0 - z * z) * scale;\n out[0] = Math.cos(r) * zScale;\n out[1] = Math.sin(r) * zScale;\n out[2] = z * scale;\n return out;\n}\n/**\r\n * Transforms the vec3 with a mat4.\r\n * 4th vector component is implicitly '1'\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a the vector to transform\r\n * @param {mat4} m matrix to transform with\r\n * @returns {vec3} out\r\n */\n\nexport function transformMat4(out, a, m) {\n var x = a[0],\n y = a[1],\n z = a[2];\n var w = m[3] * x + m[7] * y + m[11] * z + m[15];\n w = w || 1.0;\n out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w;\n out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w;\n out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w;\n return out;\n}\n/**\r\n * Transforms the vec3 with a mat3.\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a the vector to transform\r\n * @param {mat3} m the 3x3 matrix to transform with\r\n * @returns {vec3} out\r\n */\n\nexport function transformMat3(out, a, m) {\n var x = a[0],\n y = a[1],\n z = a[2];\n out[0] = x * m[0] + y * m[3] + z * m[6];\n out[1] = x * m[1] + y * m[4] + z * m[7];\n out[2] = x * m[2] + y * m[5] + z * m[8];\n return out;\n}\n/**\r\n * Transforms the vec3 with a quat\r\n * Can also be used for dual quaternions. (Multiply it with the real part)\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a the vector to transform\r\n * @param {quat} q quaternion to transform with\r\n * @returns {vec3} out\r\n */\n\nexport function transformQuat(out, a, q) {\n // benchmarks: https://jsperf.com/quaternion-transform-vec3-implementations-fixed\n var qx = q[0],\n qy = q[1],\n qz = q[2],\n qw = q[3];\n var x = a[0],\n y = a[1],\n z = a[2]; // var qvec = [qx, qy, qz];\n // var uv = vec3.cross([], qvec, a);\n\n var uvx = qy * z - qz * y,\n uvy = qz * x - qx * z,\n uvz = qx * y - qy * x; // var uuv = vec3.cross([], qvec, uv);\n\n var uuvx = qy * uvz - qz * uvy,\n uuvy = qz * uvx - qx * uvz,\n uuvz = qx * uvy - qy * uvx; // vec3.scale(uv, uv, 2 * w);\n\n var w2 = qw * 2;\n uvx *= w2;\n uvy *= w2;\n uvz *= w2; // vec3.scale(uuv, uuv, 2);\n\n uuvx *= 2;\n uuvy *= 2;\n uuvz *= 2; // return vec3.add(out, a, vec3.add(out, uv, uuv));\n\n out[0] = x + uvx + uuvx;\n out[1] = y + uvy + uuvy;\n out[2] = z + uvz + uuvz;\n return out;\n}\n/**\r\n * Rotate a 3D vector around the x-axis\r\n * @param {vec3} out The receiving vec3\r\n * @param {vec3} a The vec3 point to rotate\r\n * @param {vec3} b The origin of the rotation\r\n * @param {Number} c The angle of rotation\r\n * @returns {vec3} out\r\n */\n\nexport function rotateX(out, a, b, c) {\n var p = [],\n r = []; //Translate point to the origin\n\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n\n r[0] = p[0];\n r[1] = p[1] * Math.cos(c) - p[2] * Math.sin(c);\n r[2] = p[1] * Math.sin(c) + p[2] * Math.cos(c); //translate to correct position\n\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n}\n/**\r\n * Rotate a 3D vector around the y-axis\r\n * @param {vec3} out The receiving vec3\r\n * @param {vec3} a The vec3 point to rotate\r\n * @param {vec3} b The origin of the rotation\r\n * @param {Number} c The angle of rotation\r\n * @returns {vec3} out\r\n */\n\nexport function rotateY(out, a, b, c) {\n var p = [],\n r = []; //Translate point to the origin\n\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n\n r[0] = p[2] * Math.sin(c) + p[0] * Math.cos(c);\n r[1] = p[1];\n r[2] = p[2] * Math.cos(c) - p[0] * Math.sin(c); //translate to correct position\n\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n}\n/**\r\n * Rotate a 3D vector around the z-axis\r\n * @param {vec3} out The receiving vec3\r\n * @param {vec3} a The vec3 point to rotate\r\n * @param {vec3} b The origin of the rotation\r\n * @param {Number} c The angle of rotation\r\n * @returns {vec3} out\r\n */\n\nexport function rotateZ(out, a, b, c) {\n var p = [],\n r = []; //Translate point to the origin\n\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n\n r[0] = p[0] * Math.cos(c) - p[1] * Math.sin(c);\n r[1] = p[0] * Math.sin(c) + p[1] * Math.cos(c);\n r[2] = p[2]; //translate to correct position\n\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n}\n/**\r\n * Get the angle between two 3D vectors\r\n * @param {vec3} a The first operand\r\n * @param {vec3} b The second operand\r\n * @returns {Number} The angle in radians\r\n */\n\nexport function angle(a, b) {\n var tempA = fromValues(a[0], a[1], a[2]);\n var tempB = fromValues(b[0], b[1], b[2]);\n normalize(tempA, tempA);\n normalize(tempB, tempB);\n var cosine = dot(tempA, tempB);\n\n if (cosine > 1.0) {\n return 0;\n } else if (cosine < -1.0) {\n return Math.PI;\n } else {\n return Math.acos(cosine);\n }\n}\n/**\r\n * Set the components of a vec3 to zero\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @returns {vec3} out\r\n */\n\nexport function zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n out[2] = 0.0;\n return out;\n}\n/**\r\n * Returns a string representation of a vector\r\n *\r\n * @param {vec3} a vector to represent as a string\r\n * @returns {String} string representation of the vector\r\n */\n\nexport function str(a) {\n return 'vec3(' + a[0] + ', ' + a[1] + ', ' + a[2] + ')';\n}\n/**\r\n * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)\r\n *\r\n * @param {vec3} a The first vector.\r\n * @param {vec3} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2];\n}\n/**\r\n * Returns whether or not the vectors have approximately the same elements in the same position.\r\n *\r\n * @param {vec3} a The first vector.\r\n * @param {vec3} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2));\n}\n/**\r\n * Alias for {@link vec3.subtract}\r\n * @function\r\n */\n\nexport var sub = subtract;\n/**\r\n * Alias for {@link vec3.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Alias for {@link vec3.divide}\r\n * @function\r\n */\n\nexport var div = divide;\n/**\r\n * Alias for {@link vec3.distance}\r\n * @function\r\n */\n\nexport var dist = distance;\n/**\r\n * Alias for {@link vec3.squaredDistance}\r\n * @function\r\n */\n\nexport var sqrDist = squaredDistance;\n/**\r\n * Alias for {@link vec3.length}\r\n * @function\r\n */\n\nexport var len = length;\n/**\r\n * Alias for {@link vec3.squaredLength}\r\n * @function\r\n */\n\nexport var sqrLen = squaredLength;\n/**\r\n * Perform some operation over an array of vec3s.\r\n *\r\n * @param {Array} a the array of vectors to iterate over\r\n * @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed\r\n * @param {Number} offset Number of elements to skip at the beginning of the array\r\n * @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array\r\n * @param {Function} fn Function to call for each vector in the array\r\n * @param {Object} [arg] additional argument to pass to fn\r\n * @returns {Array} a\r\n * @function\r\n */\n\nexport var forEach = function () {\n var vec = create();\n return function (a, stride, offset, count, fn, arg) {\n var i, l;\n\n if (!stride) {\n stride = 3;\n }\n\n if (!offset) {\n offset = 0;\n }\n\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n } else {\n l = a.length;\n }\n\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n vec[2] = a[i + 2];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n a[i + 2] = vec[2];\n }\n\n return a;\n };\n}();","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\n// These are used to set the WebGl depth for a tile.\nvar MAX_LAYERS = 256; // Max number of layers per stage.\nvar MAX_LEVELS = 256; // Max number of levels per layer.\n\nvar clamp = require('../util/clamp');\nvar vec4 = require('gl-matrix').vec4;\nvar vec3 = require('gl-matrix').vec3;\nvar mat4 = require('gl-matrix').mat4;\n\n\nfunction createShader(gl, type, src) {\n var shader = gl.createShader(type);\n gl.shaderSource(shader, src);\n gl.compileShader(shader);\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n throw gl.getShaderInfoLog(shader);\n }\n return shader;\n}\n\n\nfunction createShaderProgram(gl, vertexSrc, fragmentSrc, attribList, uniformList) {\n\n var vertexShader = createShader(gl, gl.VERTEX_SHADER, vertexSrc);\n var fragmentShader = createShader(gl, gl.FRAGMENT_SHADER, fragmentSrc);\n\n var shaderProgram = gl.createProgram();\n\n gl.attachShader(shaderProgram, vertexShader);\n gl.attachShader(shaderProgram, fragmentShader);\n gl.linkProgram(shaderProgram);\n\n if (!gl.getProgramParameter(shaderProgram, gl.LINK_STATUS)) {\n throw gl.getProgramInfoLog(shaderProgram);\n }\n\n for (var i = 0; i < attribList.length; i++) {\n var attrib = attribList[i];\n shaderProgram[attrib] = gl.getAttribLocation(shaderProgram, attrib);\n if (shaderProgram[attrib] === -1) {\n throw new Error('Shader program has no ' + attrib + ' attribute');\n }\n }\n\n for (var j = 0; j < uniformList.length; j++) {\n var uniform = uniformList[j];\n shaderProgram[uniform] = gl.getUniformLocation(shaderProgram, uniform);\n if (shaderProgram[uniform] === -1) {\n throw new Error('Shader program has no ' + uniform + ' uniform');\n }\n }\n\n return shaderProgram;\n}\n\n\nfunction destroyShaderProgram(gl, shaderProgram) {\n var shaderList = gl.getAttachedShaders(shaderProgram);\n for (var i = 0; i < shaderList.length; i++) {\n var shader = shaderList[i];\n gl.detachShader(shaderProgram, shader);\n gl.deleteShader(shader);\n }\n gl.deleteProgram(shaderProgram);\n}\n\n\nfunction createConstantBuffer(gl, target, usage, value) {\n var buffer = gl.createBuffer();\n gl.bindBuffer(target, buffer);\n gl.bufferData(target, value, usage);\n return buffer;\n}\n\n\nfunction createConstantBuffers(gl, vertexIndices, vertexPositions, textureCoords) {\n return {\n vertexIndices: createConstantBuffer(gl, gl.ELEMENT_ARRAY_BUFFER, gl.STATIC_DRAW, new Uint16Array(vertexIndices)),\n vertexPositions: createConstantBuffer(gl, gl.ARRAY_BUFFER, gl.STATIC_DRAW, new Float32Array(vertexPositions)),\n textureCoords: createConstantBuffer(gl, gl.ARRAY_BUFFER, gl.STATIC_DRAW, new Float32Array(textureCoords))\n };\n}\n\n\nfunction destroyConstantBuffers(gl, constantBuffers) {\n gl.deleteBuffer(constantBuffers.vertexIndices);\n gl.deleteBuffer(constantBuffers.vertexPositions);\n gl.deleteBuffer(constantBuffers.textureCoords);\n}\n\n\nfunction enableAttributes(gl, shaderProgram) {\n var numAttrs = gl.getProgramParameter(shaderProgram, gl.ACTIVE_ATTRIBUTES);\n for (var i = 0; i < numAttrs; i++) {\n gl.enableVertexAttribArray(i);\n }\n}\n\n\nfunction disableAttributes(gl, shaderProgram) {\n var numAttrs = gl.getProgramParameter(shaderProgram, gl.ACTIVE_ATTRIBUTES);\n for (var i = 0; i < numAttrs; i++) {\n gl.disableVertexAttribArray(i);\n }\n}\n\n\nfunction setTexture(gl, shaderProgram, texture) {\n gl.activeTexture(gl.TEXTURE0);\n gl.bindTexture(gl.TEXTURE_2D, texture._texture);\n gl.uniform1i(shaderProgram.uSampler, 0);\n}\n\n\nfunction setDepth(gl, shaderProgram, layerZ, tileZ) {\n var depth = (((layerZ + 1) * MAX_LEVELS) - tileZ) / (MAX_LEVELS * MAX_LAYERS);\n gl.uniform1f(shaderProgram.uDepth, depth);\n}\n\n\nvar defaultOpacity = 1.0;\nvar defaultColorOffset = vec4.create();\nvar defaultColorMatrix = mat4.create();\nmat4.identity(defaultColorMatrix);\n\nfunction setupPixelEffectUniforms(gl, effects, uniforms) {\n var opacity = defaultOpacity;\n if (effects && effects.opacity != null) {\n opacity = effects.opacity;\n }\n gl.uniform1f(uniforms.opacity, opacity);\n\n var colorOffset = defaultColorOffset;\n if (effects && effects.colorOffset) {\n colorOffset = effects.colorOffset;\n }\n gl.uniform4fv(uniforms.colorOffset, colorOffset);\n\n var colorMatrix = defaultColorMatrix;\n if (effects && effects.colorMatrix) {\n colorMatrix = effects.colorMatrix;\n }\n gl.uniformMatrix4fv(uniforms.colorMatrix, false, colorMatrix);\n}\n\n\n// Temporary vectors for setViewport.\nvar translateVector = vec3.create();\nvar scaleVector = vec3.create();\n\n\n// Sets the WebGL viewport and returns a viewport clamping compensation matrix.\n//\n// Negative viewport origin coordinates cause rendering issues. Letting the\n// viewport dimensions extend beyond the visible area do not seem to cause\n// rendering issues, but they may still have an impact on performance.\n// Therefore, when the scene's rect is not fully contained in the rendering\n// area, we clamp the viewport to the rendering area, and return a compensation\n// matrix to scale and translate vertices accordingly.\nfunction setViewport(gl, layer, rect, viewportMatrix) {\n if (rect.x === 0 && rect.width === 1 && rect.y === 0 && rect.height === 1) {\n // Fast path for full rect.\n gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);\n mat4.identity(viewportMatrix);\n return;\n }\n\n var offsetX = rect.x;\n var clampedOffsetX = clamp(offsetX, 0, 1);\n var leftExcess = clampedOffsetX - offsetX;\n var maxClampedWidth = 1 - clampedOffsetX;\n var clampedWidth = clamp(rect.width - leftExcess, 0, maxClampedWidth);\n var rightExcess = rect.width - clampedWidth;\n\n var offsetY = 1 - rect.height - rect.y;\n var clampedOffsetY = clamp(offsetY, 0, 1);\n var bottomExcess = clampedOffsetY - offsetY;\n var maxClampedHeight = 1 - clampedOffsetY;\n var clampedHeight = clamp(rect.height - bottomExcess, 0, maxClampedHeight);\n var topExcess = rect.height - clampedHeight;\n\n vec3.set(\n scaleVector,\n rect.width / clampedWidth,\n rect.height / clampedHeight,\n 1);\n\n vec3.set(\n translateVector,\n (rightExcess - leftExcess) / clampedWidth,\n (topExcess - bottomExcess) / clampedHeight,\n 0);\n\n mat4.identity(viewportMatrix);\n mat4.translate(viewportMatrix, viewportMatrix, translateVector);\n mat4.scale(viewportMatrix, viewportMatrix, scaleVector);\n\n gl.viewport(gl.drawingBufferWidth * clampedOffsetX,\n gl.drawingBufferHeight * clampedOffsetY,\n gl.drawingBufferWidth * clampedWidth,\n gl.drawingBufferHeight * clampedHeight);\n}\n\nmodule.exports = {\n createShaderProgram: createShaderProgram,\n destroyShaderProgram: destroyShaderProgram,\n createConstantBuffers: createConstantBuffers,\n destroyConstantBuffers: destroyConstantBuffers,\n enableAttributes: enableAttributes,\n disableAttributes: disableAttributes,\n setTexture: setTexture,\n setDepth: setDepth,\n setViewport: setViewport,\n setupPixelEffectUniforms: setupPixelEffectUniforms\n};\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nfunction clamp(value, min, max) {\n return Math.min(Math.max(value, min), max);\n}\n\nmodule.exports = clamp;","import * as glMatrix from \"./common.js\";\n/**\r\n * 4 Dimensional Vector\r\n * @module vec4\r\n */\n\n/**\r\n * Creates a new, empty vec4\r\n *\r\n * @returns {vec4} a new 4D vector\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(4);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n }\n\n return out;\n}\n/**\r\n * Creates a new vec4 initialized with values from an existing vector\r\n *\r\n * @param {vec4} a vector to clone\r\n * @returns {vec4} a new 4D vector\r\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(4);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\n/**\r\n * Creates a new vec4 initialized with the given values\r\n *\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @param {Number} z Z component\r\n * @param {Number} w W component\r\n * @returns {vec4} a new 4D vector\r\n */\n\nexport function fromValues(x, y, z, w) {\n var out = new glMatrix.ARRAY_TYPE(4);\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = w;\n return out;\n}\n/**\r\n * Copy the values from one vec4 to another\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {vec4} a the source vector\r\n * @returns {vec4} out\r\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\n/**\r\n * Set the components of a vec4 to the given values\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @param {Number} z Z component\r\n * @param {Number} w W component\r\n * @returns {vec4} out\r\n */\n\nexport function set(out, x, y, z, w) {\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = w;\n return out;\n}\n/**\r\n * Adds two vec4's\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {vec4} a the first operand\r\n * @param {vec4} b the second operand\r\n * @returns {vec4} out\r\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n return out;\n}\n/**\r\n * Subtracts vector b from vector a\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {vec4} a the first operand\r\n * @param {vec4} b the second operand\r\n * @returns {vec4} out\r\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n return out;\n}\n/**\r\n * Multiplies two vec4's\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {vec4} a the first operand\r\n * @param {vec4} b the second operand\r\n * @returns {vec4} out\r\n */\n\nexport function multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n out[2] = a[2] * b[2];\n out[3] = a[3] * b[3];\n return out;\n}\n/**\r\n * Divides two vec4's\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {vec4} a the first operand\r\n * @param {vec4} b the second operand\r\n * @returns {vec4} out\r\n */\n\nexport function divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n out[2] = a[2] / b[2];\n out[3] = a[3] / b[3];\n return out;\n}\n/**\r\n * Math.ceil the components of a vec4\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {vec4} a vector to ceil\r\n * @returns {vec4} out\r\n */\n\nexport function ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n out[2] = Math.ceil(a[2]);\n out[3] = Math.ceil(a[3]);\n return out;\n}\n/**\r\n * Math.floor the components of a vec4\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {vec4} a vector to floor\r\n * @returns {vec4} out\r\n */\n\nexport function floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n out[2] = Math.floor(a[2]);\n out[3] = Math.floor(a[3]);\n return out;\n}\n/**\r\n * Returns the minimum of two vec4's\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {vec4} a the first operand\r\n * @param {vec4} b the second operand\r\n * @returns {vec4} out\r\n */\n\nexport function min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n out[2] = Math.min(a[2], b[2]);\n out[3] = Math.min(a[3], b[3]);\n return out;\n}\n/**\r\n * Returns the maximum of two vec4's\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {vec4} a the first operand\r\n * @param {vec4} b the second operand\r\n * @returns {vec4} out\r\n */\n\nexport function max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n out[2] = Math.max(a[2], b[2]);\n out[3] = Math.max(a[3], b[3]);\n return out;\n}\n/**\r\n * Math.round the components of a vec4\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {vec4} a vector to round\r\n * @returns {vec4} out\r\n */\n\nexport function round(out, a) {\n out[0] = Math.round(a[0]);\n out[1] = Math.round(a[1]);\n out[2] = Math.round(a[2]);\n out[3] = Math.round(a[3]);\n return out;\n}\n/**\r\n * Scales a vec4 by a scalar number\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {vec4} a the vector to scale\r\n * @param {Number} b amount to scale the vector by\r\n * @returns {vec4} out\r\n */\n\nexport function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n return out;\n}\n/**\r\n * Adds two vec4's after scaling the second operand by a scalar value\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {vec4} a the first operand\r\n * @param {vec4} b the second operand\r\n * @param {Number} scale the amount to scale b by before adding\r\n * @returns {vec4} out\r\n */\n\nexport function scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n return out;\n}\n/**\r\n * Calculates the euclidian distance between two vec4's\r\n *\r\n * @param {vec4} a the first operand\r\n * @param {vec4} b the second operand\r\n * @returns {Number} distance between a and b\r\n */\n\nexport function distance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n var w = b[3] - a[3];\n return Math.hypot(x, y, z, w);\n}\n/**\r\n * Calculates the squared euclidian distance between two vec4's\r\n *\r\n * @param {vec4} a the first operand\r\n * @param {vec4} b the second operand\r\n * @returns {Number} squared distance between a and b\r\n */\n\nexport function squaredDistance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n var w = b[3] - a[3];\n return x * x + y * y + z * z + w * w;\n}\n/**\r\n * Calculates the length of a vec4\r\n *\r\n * @param {vec4} a vector to calculate length of\r\n * @returns {Number} length of a\r\n */\n\nexport function length(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var w = a[3];\n return Math.hypot(x, y, z, w);\n}\n/**\r\n * Calculates the squared length of a vec4\r\n *\r\n * @param {vec4} a vector to calculate squared length of\r\n * @returns {Number} squared length of a\r\n */\n\nexport function squaredLength(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var w = a[3];\n return x * x + y * y + z * z + w * w;\n}\n/**\r\n * Negates the components of a vec4\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {vec4} a vector to negate\r\n * @returns {vec4} out\r\n */\n\nexport function negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = -a[3];\n return out;\n}\n/**\r\n * Returns the inverse of the components of a vec4\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {vec4} a vector to invert\r\n * @returns {vec4} out\r\n */\n\nexport function inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n out[2] = 1.0 / a[2];\n out[3] = 1.0 / a[3];\n return out;\n}\n/**\r\n * Normalize a vec4\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {vec4} a vector to normalize\r\n * @returns {vec4} out\r\n */\n\nexport function normalize(out, a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var w = a[3];\n var len = x * x + y * y + z * z + w * w;\n\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n }\n\n out[0] = x * len;\n out[1] = y * len;\n out[2] = z * len;\n out[3] = w * len;\n return out;\n}\n/**\r\n * Calculates the dot product of two vec4's\r\n *\r\n * @param {vec4} a the first operand\r\n * @param {vec4} b the second operand\r\n * @returns {Number} dot product of a and b\r\n */\n\nexport function dot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];\n}\n/**\r\n * Returns the cross-product of three vectors in a 4-dimensional space\r\n *\r\n * @param {vec4} result the receiving vector\r\n * @param {vec4} U the first vector\r\n * @param {vec4} V the second vector\r\n * @param {vec4} W the third vector\r\n * @returns {vec4} result\r\n */\n\nexport function cross(out, u, v, w) {\n var A = v[0] * w[1] - v[1] * w[0],\n B = v[0] * w[2] - v[2] * w[0],\n C = v[0] * w[3] - v[3] * w[0],\n D = v[1] * w[2] - v[2] * w[1],\n E = v[1] * w[3] - v[3] * w[1],\n F = v[2] * w[3] - v[3] * w[2];\n var G = u[0];\n var H = u[1];\n var I = u[2];\n var J = u[3];\n out[0] = H * F - I * E + J * D;\n out[1] = -(G * F) + I * C - J * B;\n out[2] = G * E - H * C + J * A;\n out[3] = -(G * D) + H * B - I * A;\n return out;\n}\n;\n/**\r\n * Performs a linear interpolation between two vec4's\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {vec4} a the first operand\r\n * @param {vec4} b the second operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {vec4} out\r\n */\n\nexport function lerp(out, a, b, t) {\n var ax = a[0];\n var ay = a[1];\n var az = a[2];\n var aw = a[3];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n out[2] = az + t * (b[2] - az);\n out[3] = aw + t * (b[3] - aw);\n return out;\n}\n/**\r\n * Generates a random vector with the given scale\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\r\n * @returns {vec4} out\r\n */\n\nexport function random(out, scale) {\n scale = scale || 1.0; // Marsaglia, George. Choosing a Point from the Surface of a\n // Sphere. Ann. Math. Statist. 43 (1972), no. 2, 645--646.\n // http://projecteuclid.org/euclid.aoms/1177692644;\n\n var v1, v2, v3, v4;\n var s1, s2;\n\n do {\n v1 = glMatrix.RANDOM() * 2 - 1;\n v2 = glMatrix.RANDOM() * 2 - 1;\n s1 = v1 * v1 + v2 * v2;\n } while (s1 >= 1);\n\n do {\n v3 = glMatrix.RANDOM() * 2 - 1;\n v4 = glMatrix.RANDOM() * 2 - 1;\n s2 = v3 * v3 + v4 * v4;\n } while (s2 >= 1);\n\n var d = Math.sqrt((1 - s1) / s2);\n out[0] = scale * v1;\n out[1] = scale * v2;\n out[2] = scale * v3 * d;\n out[3] = scale * v4 * d;\n return out;\n}\n/**\r\n * Transforms the vec4 with a mat4.\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {vec4} a the vector to transform\r\n * @param {mat4} m matrix to transform with\r\n * @returns {vec4} out\r\n */\n\nexport function transformMat4(out, a, m) {\n var x = a[0],\n y = a[1],\n z = a[2],\n w = a[3];\n out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\n out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\n out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\n out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\n return out;\n}\n/**\r\n * Transforms the vec4 with a quat\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {vec4} a the vector to transform\r\n * @param {quat} q quaternion to transform with\r\n * @returns {vec4} out\r\n */\n\nexport function transformQuat(out, a, q) {\n var x = a[0],\n y = a[1],\n z = a[2];\n var qx = q[0],\n qy = q[1],\n qz = q[2],\n qw = q[3]; // calculate quat * vec\n\n var ix = qw * x + qy * z - qz * y;\n var iy = qw * y + qz * x - qx * z;\n var iz = qw * z + qx * y - qy * x;\n var iw = -qx * x - qy * y - qz * z; // calculate result * inverse quat\n\n out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n out[3] = a[3];\n return out;\n}\n/**\r\n * Set the components of a vec4 to zero\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @returns {vec4} out\r\n */\n\nexport function zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n out[2] = 0.0;\n out[3] = 0.0;\n return out;\n}\n/**\r\n * Returns a string representation of a vector\r\n *\r\n * @param {vec4} a vector to represent as a string\r\n * @returns {String} string representation of the vector\r\n */\n\nexport function str(a) {\n return 'vec4(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')';\n}\n/**\r\n * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)\r\n *\r\n * @param {vec4} a The first vector.\r\n * @param {vec4} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3];\n}\n/**\r\n * Returns whether or not the vectors have approximately the same elements in the same position.\r\n *\r\n * @param {vec4} a The first vector.\r\n * @param {vec4} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3));\n}\n/**\r\n * Alias for {@link vec4.subtract}\r\n * @function\r\n */\n\nexport var sub = subtract;\n/**\r\n * Alias for {@link vec4.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Alias for {@link vec4.divide}\r\n * @function\r\n */\n\nexport var div = divide;\n/**\r\n * Alias for {@link vec4.distance}\r\n * @function\r\n */\n\nexport var dist = distance;\n/**\r\n * Alias for {@link vec4.squaredDistance}\r\n * @function\r\n */\n\nexport var sqrDist = squaredDistance;\n/**\r\n * Alias for {@link vec4.length}\r\n * @function\r\n */\n\nexport var len = length;\n/**\r\n * Alias for {@link vec4.squaredLength}\r\n * @function\r\n */\n\nexport var sqrLen = squaredLength;\n/**\r\n * Perform some operation over an array of vec4s.\r\n *\r\n * @param {Array} a the array of vectors to iterate over\r\n * @param {Number} stride Number of elements between the start of each vec4. If 0 assumes tightly packed\r\n * @param {Number} offset Number of elements to skip at the beginning of the array\r\n * @param {Number} count Number of vec4s to iterate over. If 0 iterates over entire array\r\n * @param {Function} fn Function to call for each vector in the array\r\n * @param {Object} [arg] additional argument to pass to fn\r\n * @returns {Array} a\r\n * @function\r\n */\n\nexport var forEach = function () {\n var vec = create();\n return function (a, stride, offset, count, fn, arg) {\n var i, l;\n\n if (!stride) {\n stride = 4;\n }\n\n if (!offset) {\n offset = 0;\n }\n\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n } else {\n l = a.length;\n }\n\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n vec[2] = a[i + 2];\n vec[3] = a[i + 3];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n a[i + 2] = vec[2];\n a[i + 3] = vec[3];\n }\n\n return a;\n };\n}();","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nmodule.exports = [\n'attribute vec3 aVertexPosition;',\n'attribute vec2 aTextureCoord;',\n\n'uniform float uDepth;',\n'uniform mat4 uViewportMatrix;',\n'uniform mat4 uProjMatrix;',\n\n'varying vec2 vTextureCoord;',\n\n'void main(void) {',\n' gl_Position = uViewportMatrix * uProjMatrix * vec4(aVertexPosition.xy, 0.0, 1.0);',\n' gl_Position.z = uDepth * gl_Position.w;',\n' vTextureCoord = aTextureCoord;',\n'}'\n].join('\\n');\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nmodule.exports = [\n'#ifdef GL_FRAGMENT_PRECISION_HIGH',\n'precision highp float;',\n'#else',\n'precision mediump float;',\n'#endif',\n\n'uniform sampler2D uSampler;',\n'uniform float uOpacity;',\n'uniform vec4 uColorOffset;',\n'uniform mat4 uColorMatrix;',\n\n'varying vec2 vTextureCoord;',\n\n'void main(void) {',\n' vec4 color = texture2D(uSampler, vTextureCoord) * uColorMatrix + uColorOffset;',\n' gl_FragColor = vec4(color.rgba * uOpacity);',\n'}'\n].join('\\n');\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar WebGlBaseRenderer = require('./WebGlBase');\nvar inherits = require('../util/inherits');\n\n/**\n * @class WebGlFlatRenderer\n * @implements Renderer\n * @classdesc\n *\n * A renderer for {@link FlatGeometry} and {@link FlatView}, appropriate for a\n * {@link WebGlStage}.\n *\n * Most users do not need to instantiate this class. Renderers are created and\n * destroyed by {@link Stage} as necessary.\n */\nfunction WebGlFlatRenderer() {\n this.constructor.super_.apply(this, arguments);\n}\n\ninherits(WebGlFlatRenderer, WebGlBaseRenderer);\n\nmodule.exports = WebGlFlatRenderer;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar mat4 = require('gl-matrix').mat4;\nvar clearOwnProperties = require('../util/clearOwnProperties');\n\nvar WebGlCommon = require('./WebGlCommon');\nvar createConstantBuffers = WebGlCommon.createConstantBuffers;\nvar destroyConstantBuffers = WebGlCommon.destroyConstantBuffers;\nvar createShaderProgram = WebGlCommon.createShaderProgram;\nvar destroyShaderProgram = WebGlCommon.destroyShaderProgram;\nvar enableAttributes = WebGlCommon.enableAttributes;\nvar disableAttributes = WebGlCommon.disableAttributes;\nvar setViewport = WebGlCommon.setViewport;\nvar setupPixelEffectUniforms = WebGlCommon.setupPixelEffectUniforms;\n\nvar setDepth = WebGlCommon.setDepth;\nvar setTexture = WebGlCommon.setTexture;\n\nvar vertexSrc = require('../shaders/vertexEquirect');\nvar fragmentSrc = require('../shaders/fragmentEquirect');\n\nvar vertexIndices = [0, 1, 2, 0, 2, 3];\nvar vertexPositions = [-1.0, -1.0, 0.0, 1.0, -1.0, 0.0, 1.0, 1.0, 0.0, -1.0, 1.0, 0.0];\nvar textureCoords = [0.0, 0.0, 1.0, 0.0, 1.0, 1.0, 0.0, 1.0];\n\nvar attribList = ['aVertexPosition'];\nvar uniformList = [\n 'uDepth', 'uOpacity', 'uSampler', 'uInvProjMatrix', 'uViewportMatrix',\n 'uColorOffset', 'uColorMatrix', 'uTextureX', 'uTextureY', 'uTextureWidth',\n 'uTextureHeight'\n];\n\n\n/**\n * @class WebGlEquirectRenderer\n * @implements Renderer\n * @classdesc\n *\n * A renderer for {@link EquirectGeometry} and {@link RectilinearView},\n * appropriate for {@link WebGlStage}.\n *\n * Most users do not need to instantiate this class. Renderers are created and\n * destroyed by {@link Stage} as necessary.\n */\nfunction WebGlEquirectRenderer(gl) {\n this.gl = gl;\n\n // The inverse projection matrix.\n this.invProjMatrix = mat4.create();\n\n // The viewport matrix responsible for viewport clamping.\n // See setViewport() for an explanation of how it works.\n this.viewportMatrix = mat4.create();\n\n this.constantBuffers = createConstantBuffers(gl, vertexIndices, vertexPositions, textureCoords);\n\n this.shaderProgram = createShaderProgram(gl, vertexSrc, fragmentSrc, attribList, uniformList);\n}\n\nWebGlEquirectRenderer.prototype.destroy = function() {\n destroyConstantBuffers(this.gl, this.constantBuffers);\n destroyShaderProgram(this.gl, this.shaderProgram);\n clearOwnProperties(this);\n};\n\n\nWebGlEquirectRenderer.prototype.startLayer = function(layer, rect) {\n var gl = this.gl;\n var shaderProgram = this.shaderProgram;\n var constantBuffers = this.constantBuffers;\n var invProjMatrix = this.invProjMatrix;\n var viewportMatrix = this.viewportMatrix;\n\n gl.useProgram(shaderProgram);\n\n enableAttributes(gl, shaderProgram);\n\n setViewport(gl, layer, rect, viewportMatrix);\n gl.uniformMatrix4fv(shaderProgram.uViewportMatrix, false, viewportMatrix);\n\n gl.bindBuffer(gl.ARRAY_BUFFER, constantBuffers.vertexPositions);\n gl.vertexAttribPointer(shaderProgram.aVertexPosition, 3, gl.FLOAT, gl.FALSE, 0, 0);\n gl.bindBuffer(gl.ARRAY_BUFFER, constantBuffers.textureCoords);\n\n // Compute and set the inverse projection matrix.\n mat4.copy(invProjMatrix, layer.view().projection());\n mat4.invert(invProjMatrix, invProjMatrix);\n\n gl.uniformMatrix4fv(shaderProgram.uInvProjMatrix, false, invProjMatrix);\n\n // Compute and set the texture scale and crop offsets.\n var textureCrop = layer.effects().textureCrop || {};\n var textureX = textureCrop.x != null ? textureCrop.x : 0;\n var textureY = textureCrop.y != null ? textureCrop.y : 0;\n var textureWidth = textureCrop.width != null ? textureCrop.width : 1;\n var textureHeight = textureCrop.height != null ? textureCrop.height : 1;\n\n gl.uniform1f(shaderProgram.uTextureX, textureX);\n gl.uniform1f(shaderProgram.uTextureY, textureY);\n gl.uniform1f(shaderProgram.uTextureWidth, textureWidth);\n gl.uniform1f(shaderProgram.uTextureHeight, textureHeight);\n\n setupPixelEffectUniforms(gl, layer.effects(), {\n opacity: shaderProgram.uOpacity,\n colorOffset: shaderProgram.uColorOffset,\n colorMatrix: shaderProgram.uColorMatrix\n });\n};\n\n\nWebGlEquirectRenderer.prototype.endLayer = function(layer, rect) {\n var gl = this.gl;\n var shaderProgram = this.shaderProgram;\n disableAttributes(gl, shaderProgram);\n};\n\n\nWebGlEquirectRenderer.prototype.renderTile = function(tile, texture, layer, layerZ) {\n var gl = this.gl;\n var shaderProgram = this.shaderProgram;\n var constantBuffers = this.constantBuffers;\n\n setDepth(gl, shaderProgram, layerZ, tile.z);\n\n setTexture(gl, shaderProgram, texture);\n\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, constantBuffers.vertexIndices);\n gl.drawElements(gl.TRIANGLES, vertexIndices.length, gl.UNSIGNED_SHORT, 0);\n};\n\n\nmodule.exports = WebGlEquirectRenderer;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nmodule.exports = [\n'attribute vec3 aVertexPosition;',\n\n'uniform float uDepth;',\n'uniform mat4 uViewportMatrix;',\n'uniform mat4 uInvProjMatrix;',\n\n'varying vec4 vRay;',\n\n'void main(void) {',\n' vRay = uInvProjMatrix * vec4(aVertexPosition.xy, 1.0, 1.0);',\n' gl_Position = uViewportMatrix * vec4(aVertexPosition.xy, uDepth, 1.0);',\n'}'\n].join('\\n');\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nmodule.exports = [\n'#ifdef GL_FRAGMENT_PRECISION_HIGH',\n'precision highp float;',\n'#else',\n'precision mediump float',\n'#endif',\n\n'uniform sampler2D uSampler;',\n'uniform float uOpacity;',\n'uniform float uTextureX;',\n'uniform float uTextureY;',\n'uniform float uTextureWidth;',\n'uniform float uTextureHeight;',\n'uniform vec4 uColorOffset;',\n'uniform mat4 uColorMatrix;',\n\n'varying vec4 vRay;',\n\n'const float PI = 3.14159265358979323846264;',\n\n'void main(void) {',\n' float r = inversesqrt(vRay.x * vRay.x + vRay.y * vRay.y + vRay.z * vRay.z);',\n' float phi = acos(vRay.y * r);',\n' float theta = atan(vRay.x, -1.0*vRay.z);',\n' float s = 0.5 + 0.5 * theta / PI;',\n' float t = 1.0 - phi / PI;',\n\n' s = s * uTextureWidth + uTextureX;',\n' t = t * uTextureHeight + uTextureY;',\n\n' vec4 color = texture2D(uSampler, vec2(s, t)) * uColorMatrix + uColorOffset;',\n' gl_FragColor = vec4(color.rgba * uOpacity);',\n'}'\n].join('\\n');\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar CubeTile = require('../geometries/Cube').Tile;\nvar CssBaseRenderer = require('./CssBase');\nvar decimal = require('../util/decimal');\nvar inherits = require('../util/inherits');\n\n\n/**\n * @class CssCubeRenderer\n * @implements Renderer\n * @classdesc\n *\n * A renderer for {@link CubeGeometry} and {@link RectilinearView}, appropriate\n * for a {@link CssStage}.\n *\n * Most users do not need to instantiate this class. Renderers are created and\n * destroyed by {@link Stage} as necessary.\n */\nfunction CssCubeRenderer(root, quirks) {\n this.constructor.super_.call(this, root, quirks, CubeTile);\n}\n\ninherits(CssCubeRenderer, CssBaseRenderer);\n\n\nCssCubeRenderer.prototype.calculateTransform = function(tile, texture, view) {\n\n var padSize = this._browserQuirks.padSize;\n var reverseLevelDepth = this._browserQuirks.reverseLevelDepth;\n var perspectiveNudge = this._browserQuirks.perspectiveNudge;\n\n var transform = '';\n\n // Calculate the cube size for this level.\n var cubeSize = reverseLevelDepth ? 256 - tile.z : tile.levelWidth();\n\n // Place top left corner of tile at viewport center to serve as the center\n // of rotation.\n // We do not rotate about the center of the tile because, for some mysterious\n // reason, this seems to occasionally crash Chrome.\n var size = view.size();\n var viewportWidth = size.width;\n var viewportHeight = size.height;\n transform += 'translate3d(' + decimal(viewportWidth/2) + 'px, ' + decimal(viewportHeight/2) + 'px, 0px) ';\n\n // Set the perspective depth.\n var perspective = 0.5 * viewportHeight / Math.tan(view.fov() / 2);\n var distance = perspective + perspectiveNudge;\n transform += 'perspective(' + decimal(perspective) + 'px) translateZ(' + decimal(distance) + 'px) ';\n\n // Set the camera rotation.\n var viewRotZ = -view.roll();\n var viewRotX = -view.pitch();\n var viewRotY = view.yaw();\n transform += 'rotateZ(' + decimal(viewRotZ) + 'rad) rotateX(' + decimal(viewRotX) + 'rad) rotateY(' + decimal(viewRotY) + 'rad) ';\n\n // Set the cube face orientation.\n var tileRotX = -tile.rotX();\n var tileRotY = tile.rotY();\n transform += 'rotateX(' + decimal(tileRotX) + 'rad) rotateY(' + decimal(tileRotY) + 'rad) ';\n\n // Move tile into its position within the cube face.\n var cornerX = tile.centerX() - tile.scaleX() / 2;\n var cornerY = -(tile.centerY() + tile.scaleY() / 2);\n var translX = cornerX * cubeSize;\n var translY = cornerY * cubeSize;\n var translZ = -cubeSize / 2;\n transform += 'translate3d(' + decimal(translX) + 'px, ' + decimal(translY) + 'px, ' + decimal(translZ) + 'px) ';\n\n // Scale tile into correct size.\n if (reverseLevelDepth) {\n var scaleX = cubeSize * tile.scaleX() / tile.width();\n var scaleY = cubeSize * tile.scaleY() / tile.height();\n transform += 'scale(' + decimal(scaleX) + ', ' + decimal(scaleY) + ') ';\n }\n\n // Compensate for padding around the tile.\n var padLeft = tile.padLeft() ? padSize : 0;\n var padTop = tile.padTop() ? padSize : 0;\n if (padLeft !== 0 || padTop !== 0) {\n transform += 'translate3d(' + decimal(-padLeft) + 'px, ' + decimal(-padTop) + 'px, 0) ';\n }\n\n return transform;\n\n};\n\n\nmodule.exports = CssCubeRenderer;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar inherits = require('../util/inherits');\nvar hash = require('../util/hash');\nvar TileSearcher = require('../TileSearcher');\nvar LruMap = require('../collections/LruMap');\nvar Level = require('./Level');\nvar makeLevelList = require('./common').makeLevelList;\nvar makeSelectableLevelList = require('./common').makeSelectableLevelList;\nvar clamp = require('../util/clamp');\nvar cmp = require('../util/cmp');\nvar type = require('../util/type');\nvar vec3 = require('gl-matrix').vec3;\nvar vec4 = require('gl-matrix').vec4;\n\nvar neighborsCacheSize = 64;\n\n// Some renderer implementations require tiles to be padded around with\n// repeated pixels to prevent the appearance of visible seams between tiles.\n//\n// In order to prevent the padding from being visible, the tiles must be\n// padded and stacked such that the padding on one of the sides, when present,\n// stacks below the neighboring tile on that side.\n//\n// The padding rules are as follows:\n// * Define a tile to be X-marginal if it contacts the X-edge of its cube face.\n// * Pad top if the tile is top-marginal and the face is F or U.\n// * Pad bottom unless the tile is bottom-marginal or the face is F or D.\n// * Pad left if the tile is left-marginal and the face is F, L, U or D.\n// * Pad right unless the tile is right-marginal or the face is F, R, U or D.\n//\n// The stacking rules are as follows:\n// * Within an image, stack smaller zoom levels below larger zoom levels.\n// * Within a level, stack tiles bottom to top in FUDLRB face order.\n// * Within a face, stack tiles bottom to top in ascending Y coordinate order.\n// * Within a row, stack tiles bottom to top in ascending X coordinate order.\n//\n// Crucially, these rules affect the implementation of the tile cmp() method,\n// which determines the stacking order, and of the pad*() tile methods, which\n// determine the amount of padding on each of the four sides of a tile.\n\n// Initials for cube faces in stacking order.\nvar faceList = 'fudlrb';\n\n// Rotation of each face, relative to the front face.\nvar faceRotation = {\n f: { x: 0, y: 0 },\n b: { x: 0, y: Math.PI },\n l: { x: 0, y: Math.PI/2 },\n r: { x: 0, y: -Math.PI/2 },\n u: { x: Math.PI/2, y: 0 },\n d: { x: -Math.PI/2, y: 0 }\n};\n\n// Zero vector.\nvar origin = vec3.create();\n\n// Rotate a vector in ZXY order.\nfunction rotateVector(vec, z, x, y) {\n if (z) {\n vec3.rotateZ(vec, vec, origin, z);\n }\n if (x) {\n vec3.rotateX(vec, vec, origin, x);\n }\n if (y) {\n vec3.rotateY(vec, vec, origin, y);\n }\n}\n\n// Normalized vectors pointing to the center of each face.\nvar faceVectors = {};\nfor (var i = 0; i < faceList.length; i++) {\n var face = faceList[i];\n var rotation = faceRotation[face];\n var v = vec3.fromValues(0, 0, -1);\n rotateVector(v, 0, rotation.x, rotation.y);\n faceVectors[face] = v;\n}\n\n// Map each face to its adjacent faces.\n// The order is as suggested by the front face.\nvar adjacentFace = {\n f: [ 'l', 'r', 'u', 'd' ],\n b: [ 'r', 'l', 'u', 'd' ],\n l: [ 'b', 'f', 'u', 'd' ],\n r: [ 'f', 'b', 'u', 'd' ],\n u: [ 'l', 'r', 'b', 'f' ],\n d: [ 'l', 'r', 'f', 'b' ]\n};\n\n// Offsets to apply to the (x,y) coordinates of a tile to get its neighbors.\nvar neighborOffsets = [\n [ 0, 1 ], // top\n [ 1, 0 ], // right\n [ 0, -1 ], // bottom\n [ -1, 0 ] // left\n];\n\n\n/**\n * @class CubeTile\n * @implements Tile\n * @classdesc\n *\n * A tile in a @{CubeGeometry}.\n */\nfunction CubeTile(face, x, y, z, geometry) {\n this.face = face;\n this.x = x;\n this.y = y;\n this.z = z;\n this._geometry = geometry;\n this._level = geometry.levelList[z];\n}\n\n\nCubeTile.prototype.rotX = function() {\n return faceRotation[this.face].x;\n};\n\n\nCubeTile.prototype.rotY = function() {\n return faceRotation[this.face].y;\n};\n\n\nCubeTile.prototype.centerX = function() {\n return (this.x + 0.5) / this._level.numHorizontalTiles() - 0.5;\n};\n\n\nCubeTile.prototype.centerY = function() {\n return 0.5 - (this.y + 0.5) / this._level.numVerticalTiles();\n};\n\n\nCubeTile.prototype.scaleX = function() {\n return 1 / this._level.numHorizontalTiles();\n};\n\n\nCubeTile.prototype.scaleY = function() {\n return 1 / this._level.numVerticalTiles();\n};\n\n\nCubeTile.prototype.width = function() {\n return this._level.tileWidth();\n};\n\n\nCubeTile.prototype.height = function() {\n return this._level.tileHeight();\n};\n\n\nCubeTile.prototype.levelWidth = function() {\n return this._level.width();\n};\n\n\nCubeTile.prototype.levelHeight = function() {\n return this._level.height();\n};\n\n\nCubeTile.prototype.atTopLevel = function() {\n return this.z === 0;\n};\n\n\nCubeTile.prototype.atBottomLevel = function() {\n return this.z === this._geometry.levelList.length - 1;\n};\n\n\nCubeTile.prototype.atTopEdge = function() {\n return this.y === 0;\n};\n\n\nCubeTile.prototype.atBottomEdge = function() {\n return this.y === this._level.numVerticalTiles() - 1;\n};\n\n\nCubeTile.prototype.atLeftEdge = function() {\n return this.x === 0;\n};\n\n\nCubeTile.prototype.atRightEdge = function() {\n return this.x === this._level.numHorizontalTiles() - 1;\n};\n\n\nCubeTile.prototype.padTop = function() {\n return this.atTopEdge() && /[fu]/.test(this.face);\n};\n\n\nCubeTile.prototype.padBottom = function() {\n return !this.atBottomEdge() || /[fd]/.test(this.face);\n};\n\n\nCubeTile.prototype.padLeft = function() {\n return this.atLeftEdge() && /[flud]/.test(this.face);\n};\n\n\nCubeTile.prototype.padRight = function() {\n return !this.atRightEdge() || /[frud]/.test(this.face);\n};\n\n\nCubeTile.prototype.vertices = function(result) {\n if (!result) {\n result = [vec3.create(), vec3.create(), vec3.create(), vec3.create()];\n }\n\n var rot = faceRotation[this.face];\n\n function makeVertex(vec, x, y) {\n vec3.set(vec, x, y, -0.5);\n rotateVector(vec, 0, rot.x, rot.y);\n }\n\n var left = this.centerX() - this.scaleX() / 2;\n var right = this.centerX() + this.scaleX() / 2;\n var bottom = this.centerY() - this.scaleY() / 2;\n var top = this.centerY() + this.scaleY() / 2;\n\n makeVertex(result[0], left, top);\n makeVertex(result[1], right, top);\n makeVertex(result[2], right, bottom);\n makeVertex(result[3], left, bottom);\n\n return result;\n};\n\n\nCubeTile.prototype.parent = function() {\n\n if (this.atTopLevel()) {\n return null;\n }\n\n var face = this.face;\n var z = this.z;\n var x = this.x;\n var y = this.y;\n\n var geometry = this._geometry;\n var level = geometry.levelList[z];\n var parentLevel = geometry.levelList[z-1];\n\n var tileX = Math.floor(x / level.numHorizontalTiles() * parentLevel.numHorizontalTiles());\n var tileY = Math.floor(y / level.numVerticalTiles() * parentLevel.numVerticalTiles());\n var tileZ = z-1;\n\n return new CubeTile(face, tileX, tileY, tileZ, geometry);\n\n};\n\n\nCubeTile.prototype.children = function(result) {\n\n if (this.atBottomLevel()) {\n return null;\n }\n\n var face = this.face;\n var z = this.z;\n var x = this.x;\n var y = this.y;\n\n var geometry = this._geometry;\n var level = geometry.levelList[z];\n var childLevel = geometry.levelList[z+1];\n\n var nHoriz = childLevel.numHorizontalTiles() / level.numHorizontalTiles();\n var nVert = childLevel.numVerticalTiles() / level.numVerticalTiles();\n\n result = result || [];\n\n for (var h = 0; h < nHoriz; h++) {\n for (var v = 0; v < nVert; v++) {\n var tileX = nHoriz * x + h;\n var tileY = nVert * y + v;\n var tileZ = z+1;\n result.push(new CubeTile(face, tileX, tileY, tileZ, geometry));\n }\n }\n\n return result;\n\n};\n\n\nCubeTile.prototype.neighbors = function() {\n\n var geometry = this._geometry;\n var cache = geometry._neighborsCache;\n\n // Satisfy from cache when available.\n var cachedResult = cache.get(this);\n if (cachedResult) {\n return cachedResult;\n }\n\n var vec = geometry._vec;\n\n var face = this.face;\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var level = this._level;\n\n var numX = level.numHorizontalTiles();\n var numY = level.numVerticalTiles();\n\n var result = [];\n\n for (var i = 0; i < neighborOffsets.length; i++) {\n var xOffset = neighborOffsets[i][0];\n var yOffset = neighborOffsets[i][1];\n\n var newX = x + xOffset;\n var newY = y + yOffset;\n var newZ = z;\n var newFace = face;\n\n if (newX < 0 || newX >= numX || newY < 0 || newY >= numY) {\n\n // If the neighboring tile belongs to a different face, calculate a\n // vector pointing to the edge between the two faces at the point the\n // tile and its neighbor meet, and convert it into tile coordinates for\n // the neighboring face.\n\n var xCoord = this.centerX();\n var yCoord = this.centerY();\n\n // First, calculate the vector as if the initial tile belongs to the\n // front face, so that the tile x,y coordinates map directly into the\n // x,y axes.\n\n if (newX < 0) {\n vec3.set(vec, -0.5, yCoord, -0.5);\n newFace = adjacentFace[face][0];\n } else if (newX >= numX) {\n vec3.set(vec, 0.5, yCoord, -0.5);\n newFace = adjacentFace[face][1];\n } else if (newY < 0) {\n vec3.set(vec, xCoord, 0.5, -0.5);\n newFace = adjacentFace[face][2];\n } else if (newY >= numY) {\n vec3.set(vec, xCoord, -0.5, -0.5);\n newFace = adjacentFace[face][3];\n }\n\n var rot;\n\n // Then, rotate the vector into the actual face the initial tile\n // belongs to.\n\n rot = faceRotation[face];\n rotateVector(vec, 0, rot.x, rot.y);\n\n // Finally, rotate the vector from the neighboring face into the front\n // face. Again, this is so that the neighboring tile x,y coordinates\n // map directly into the x,y axes.\n\n rot = faceRotation[newFace];\n rotateVector(vec, 0, -rot.x, -rot.y);\n\n // Calculate the neighboring tile coordinates.\n\n newX = clamp(Math.floor((0.5 + vec[0]) * numX), 0, numX - 1);\n newY = clamp(Math.floor((0.5 - vec[1]) * numY), 0, numY - 1);\n }\n\n result.push(new CubeTile(newFace, newX, newY, newZ, geometry));\n }\n\n // Store into cache to satisfy future requests.\n cache.set(this, result);\n\n return result;\n\n};\n\n\nCubeTile.prototype.hash = function() {\n return hash(faceList.indexOf(this.face), this.z, this.y, this.x);\n};\n\n\nCubeTile.prototype.equals = function(that) {\n return (this.geometry === that.geometry &&\n this.face === that.face &&\n this.z === that.z &&\n this.y === that.y &&\n this.x === that.x);\n};\n\n\nCubeTile.prototype.cmp = function(that) {\n return (cmp(this.z, that.z) ||\n cmp(faceList.indexOf(this.face), faceList.indexOf(that.face)) ||\n cmp(this.y, that.y) || cmp(this.x, that.x));\n};\n\n\nCubeTile.prototype.str = function() {\n return 'CubeTile(' + tile.face + ', ' + tile.x + ', ' + tile.y + ', ' + tile.z + ')';\n};\n\n\nfunction CubeLevel(levelProperties) {\n this.constructor.super_.call(this, levelProperties);\n\n this._size = levelProperties.size;\n this._tileSize = levelProperties.tileSize;\n\n if (this._size % this._tileSize !== 0) {\n throw new Error('Level size is not multiple of tile size: ' +\n this._size + ' ' + this._tileSize);\n }\n}\n\ninherits(CubeLevel, Level);\n\n\nCubeLevel.prototype.width = function() {\n return this._size;\n};\n\n\nCubeLevel.prototype.height = function() {\n return this._size;\n};\n\n\nCubeLevel.prototype.tileWidth = function() {\n return this._tileSize;\n};\n\n\nCubeLevel.prototype.tileHeight = function() {\n return this._tileSize;\n};\n\n\nCubeLevel.prototype._validateWithParentLevel = function(parentLevel) {\n\n var width = this.width();\n var height = this.height();\n var tileWidth = this.tileWidth();\n var tileHeight = this.tileHeight();\n var numHorizontal = this.numHorizontalTiles();\n var numVertical = this.numVerticalTiles();\n\n var parentWidth = parentLevel.width();\n var parentHeight = parentLevel.height();\n var parentTileWidth = parentLevel.tileWidth();\n var parentTileHeight = parentLevel.tileHeight();\n var parentNumHorizontal = parentLevel.numHorizontalTiles();\n var parentNumVertical = parentLevel.numVerticalTiles();\n\n if (width % parentWidth !== 0) {\n throw new Error('Level width must be multiple of parent level: ' +\n width + ' vs. ' + parentWidth);\n }\n\n if (height % parentHeight !== 0) {\n throw new Error('Level height must be multiple of parent level: ' +\n height + ' vs. ' + parentHeight);\n }\n\n if (numHorizontal % parentNumHorizontal !== 0) {\n throw new Error('Number of horizontal tiles must be multiple of parent level: ' +\n numHorizontal + \" (\" + width + '/' + tileWidth + ')' + \" vs. \" +\n parentNumHorizontal + \" (\" + parentWidth + '/' + parentTileWidth + ')');\n }\n\n if (numVertical % parentNumVertical !== 0) {\n throw new Error('Number of vertical tiles must be multiple of parent level: ' +\n numVertical + \" (\" + height + '/' + tileHeight + ')' + \" vs. \" +\n parentNumVertical + \" (\" + parentHeight + '/' + parentTileHeight + ')');\n }\n\n};\n\n\n/**\n * @class CubeGeometry\n * @implements Geometry\n * @classdesc\n *\n * A {@link Geometry} implementation suitable for tiled cube images with\n * multiple resolution levels.\n *\n * The following restrictions apply:\n * - All tiles in a level must be square and form a rectangular grid;\n * - The size of a level must be a multiple of the tile size;\n * - The size of a level must be a multiple of the parent level size;\n * - The number of tiles in a level must be a multiple of the number of tiles\n * in the parent level.\n *\n * @param {Object[]} levelPropertiesList Level description\n * @param {number} levelPropertiesList[].size Cube face size in pixels\n * @param {number} levelPropertiesList[].tileSize Tile size in pixels\n */\nfunction CubeGeometry(levelPropertiesList) {\n if (type(levelPropertiesList) !== 'array') {\n throw new Error('Level list must be an array');\n }\n\n this.levelList = makeLevelList(levelPropertiesList, CubeLevel);\n this.selectableLevelList = makeSelectableLevelList(this.levelList);\n\n for (var i = 1; i < this.levelList.length; i++) {\n this.levelList[i]._validateWithParentLevel(this.levelList[i-1]);\n }\n\n this._tileSearcher = new TileSearcher(this);\n\n this._neighborsCache = new LruMap(neighborsCacheSize);\n\n this._vec = vec4.create();\n\n this._viewSize = {};\n}\n\n\nCubeGeometry.prototype.maxTileSize = function() {\n var maxTileSize = 0;\n for (var i = 0; i < this.levelList.length; i++) {\n var level = this.levelList[i];\n maxTileSize = Math.max(maxTileSize, level.tileWidth, level.tileHeight);\n }\n return maxTileSize;\n};\n\n\nCubeGeometry.prototype.levelTiles = function(level, result) {\n\n var levelIndex = this.levelList.indexOf(level);\n var maxX = level.numHorizontalTiles() - 1;\n var maxY = level.numVerticalTiles() - 1;\n\n result = result || [];\n\n for (var f = 0; f < faceList.length; f++) {\n var face = faceList[f];\n for (var x = 0; x <= maxX; x++) {\n for (var y = 0; y <= maxY; y++) {\n result.push(new CubeTile(face, x, y, levelIndex, this));\n }\n }\n }\n\n return result;\n\n};\n\n\nCubeGeometry.prototype._closestTile = function(view, level) {\n var ray = this._vec;\n\n // Compute a view ray into the central screen point.\n vec4.set(ray, 0, 0, 1, 1);\n vec4.transformMat4(ray, ray, view.inverseProjection());\n\n var minAngle = Infinity;\n var closestFace = null;\n\n // Find the face whose vector makes a minimal angle with the view ray.\n // This is the face into which the view ray points.\n for (var face in faceVectors) {\n var vector = faceVectors[face];\n // For a small angle between two normalized vectors, angle ~ 1-cos(angle).\n var angle = 1 - vec3.dot(vector, ray);\n if (angle < minAngle) {\n minAngle = angle;\n closestFace = face;\n }\n }\n\n // Project view ray onto cube, i.e., normalize the coordinate with\n // largest absolute value to ±0.5.\n var max = Math.max(Math.abs(ray[0]), Math.abs(ray[1]), Math.abs(ray[2])) / 0.5;\n for (var i = 0; i < 3; i++) {\n ray[i] = ray[i] / max;\n }\n\n // Rotate view ray into front face.\n var rot = faceRotation[closestFace];\n rotateVector(ray, 0, -rot.x, -rot.y);\n\n // Get the desired zoom level.\n var tileZ = this.levelList.indexOf(level);\n var numX = level.numHorizontalTiles();\n var numY = level.numVerticalTiles();\n\n // Find the coordinates of the tile that the view ray points into.\n var tileX = clamp(Math.floor((0.5 + ray[0]) * numX), 0, numX - 1);\n var tileY = clamp(Math.floor((0.5 - ray[1]) * numY), 0, numY - 1);\n\n return new CubeTile(closestFace, tileX, tileY, tileZ, this);\n};\n\n\nCubeGeometry.prototype.visibleTiles = function(view, level, result) {\n var viewSize = this._viewSize;\n var tileSearcher = this._tileSearcher;\n\n result = result || [];\n\n view.size(viewSize);\n if (viewSize.width === 0 || viewSize.height === 0) {\n // No tiles are visible if the viewport is empty.\n return result;\n }\n\n var startingTile = this._closestTile(view, level);\n var count = tileSearcher.search(view, startingTile, result);\n if (!count) {\n throw new Error('Starting tile is not visible');\n }\n\n return result;\n};\n\n\nCubeGeometry.Tile = CubeGeometry.prototype.Tile = CubeTile;\nCubeGeometry.type = CubeGeometry.prototype.type = 'cube';\nCubeTile.type = CubeTile.prototype.type = 'cube';\n\n\nmodule.exports = CubeGeometry;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\n// Jenkins one-at-a-time hash\n// http://www.burtleburtle.net/bob/hash/doobs.html\n// Input: an array of integers\n// Output: an integer\n\nfunction hash() {\n var h = 0;\n for (var i = 0; i < arguments.length; i++) {\n var k = arguments[i];\n h += k;\n h += k << 10;\n h ^= k >> 6;\n }\n h += h << 3;\n h ^= h >> 11;\n h += h << 15;\n return h >= 0 ? h : -h;\n}\n\nmodule.exports = hash;","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar Set = require('./collections/Set');\n\n/**\n * @class TileSearcher\n * @classdesc\n *\n * A TileSearcher performs searches for visible tiles.\n */\nfunction TileSearcher() {\n // Stack of tiles to be explored.\n this._stack = [];\n\n // Set of already explored tiles.\n this._visited = new Set();\n\n // Tile vertices. Allocated by Tile#vertices on first use.\n this._vertices = null;\n}\n\n/**\n * Performs a search for visible tiles by starting at a given tile and\n * recursively exploring neighbors until no more visible tiles are found.\n *\n * @param {View} view The view used to deem whether a tile is visible.\n * @param {Tile} tile The starting tile.\n * @param {Tile[]} result An array to append the visible tiles to, including the\n * starting tile when visible. Existing array members are preserved.\n * @return {number} The number of visible tiles found.\n */\nTileSearcher.prototype.search = function(view, startingTile, result) {\n var stack = this._stack;\n var visited = this._visited;\n var vertices = this._vertices;\n\n var count = 0;\n\n // Clear internal state.\n this._clear();\n\n stack.push(startingTile);\n\n while (stack.length > 0) {\n var tile = stack.pop();\n\n if (visited.has(tile)) {\n // Skip already visited tile.\n continue;\n }\n\n if (!view.intersects(tile.vertices(vertices))) {\n // Skip non-visible tile.\n continue;\n }\n\n // Mark tile as visited.\n visited.add(tile);\n\n // Add neighbors to the stack of tiles to explore.\n var neighbors = tile.neighbors();\n for (var i = 0; i < neighbors.length; i++) {\n stack.push(neighbors[i]);\n }\n\n // Add to result.\n result.push(tile);\n\n count++;\n }\n\n // Reuse the vertices array in future searches.\n this._vertices = vertices;\n\n // Clear internal state.\n this._clear();\n\n return count;\n};\n\nTileSearcher.prototype._clear = function() {\n this._stack.length = 0;\n this._visited.clear();\n};\n\nmodule.exports = TileSearcher;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar mod = require('../util/mod');\n\nvar defaultCapacity = 64;\n\n// A set data structure for elements implementing hash() and equals().\n// The capacity, if given, is just a hint; the set is allowed to exceed it, but\n// performance may suffer.\nfunction Set(capacity) {\n if (capacity != null &&\n (!isFinite(capacity) || Math.floor(capacity) !== capacity || capacity < 1)) {\n throw new Error('Set: invalid capacity');\n }\n this._capacity = this._capacity || defaultCapacity;\n\n this._buckets = [];\n for (var i = 0; i < this._capacity; i++) {\n this._buckets.push([]);\n }\n this._size = 0;\n}\n\n// Adds an element, replacing an existing element.\n// Returns the replaced element, or null if no element was replaced.\nSet.prototype.add = function(element) {\n var h = mod(element.hash(), this._capacity);\n var bucket = this._buckets[h];\n for (var i = 0; i < bucket.length; i++) {\n var existingElement = bucket[i];\n if (element.equals(existingElement)) {\n bucket[i] = element;\n return existingElement;\n }\n }\n bucket.push(element);\n this._size++;\n return null;\n};\n\n// Removes an element.\n// Returns the removed element, or null if the element was not found.\nSet.prototype.remove = function(element) {\n var h = mod(element.hash(), this._capacity);\n var bucket = this._buckets[h];\n for (var i = 0; i < bucket.length; i++) {\n var existingElement = bucket[i];\n if (element.equals(existingElement)) {\n // Splice manually to avoid Array#splice return value allocation.\n for (var j = i; j < bucket.length - 1; j++) {\n bucket[j] = bucket[j+1];\n }\n bucket.length = bucket.length - 1;\n this._size--;\n return existingElement;\n }\n }\n return null;\n};\n\n// Returns whether an element is in the set.\nSet.prototype.has = function(element) {\n var h = mod(element.hash(), this._capacity);\n var bucket = this._buckets[h];\n for (var i = 0; i < bucket.length; i++) {\n var existingElement = bucket[i];\n if (element.equals(existingElement)) {\n return true;\n }\n }\n return false;\n};\n\n// Returns the number of elements in the set.\nSet.prototype.size = function() {\n return this._size;\n};\n\n// Removes all elements from the set.\nSet.prototype.clear = function() {\n for (var i = 0; i < this._capacity; i++) {\n this._buckets[i].length = 0;\n }\n this._size = 0;\n};\n\n// Calls fn(element) for each element in the set, in an unspecified order.\n// Returns the number of times fn was called.\n// The result is unspecified if the set is mutated during iteration.\nSet.prototype.forEach = function(fn) {\n var count = 0;\n for (var i = 0; i < this._capacity; i++) {\n var bucket = this._buckets[i];\n for (var j = 0; j < bucket.length; j++) {\n fn(bucket[j]);\n count += 1;\n }\n }\n return count;\n};\n\nmodule.exports = Set;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\n/**\n * Modulo operation\n *\n * @memberof util\n * @param {Number} dividend\n * @param {Number} divisor\n * @returns {Number} Value in range `[0,divisor[`\n */\nfunction mod(a, b) {\n return (+a % (b = +b) + b) % b;\n}\n\nmodule.exports = mod;","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar mod = require('../util/mod');\n\n// An LruMap holds up to a maximum number of key-value pairs, ordered by their\n// time of insertion. When the addition of a key-value pair would cause the\n// capacity to be exceeded, the oldest key-value pair in the set is evicted.\n// As a special case, an LruMap with zero capacity always rejects the insertion\n// of a key-value pair.\n//\n// Keys must implement hash() and equals(). Note that the implementation doesn't\n// currently use hash(), but a future version might.\nfunction LruMap(capacity) {\n if (!isFinite(capacity) || Math.floor(capacity) !== capacity || capacity < 0) {\n throw new Error('LruMap: invalid capacity');\n }\n this._capacity = capacity;\n\n // Keys and values are stored in circular arrays ordered by decreasing age.\n // Start is the index of the oldest key/value and size is the number of valid\n // key/values; the region containing valid keys/values may wrap around.\n this._keys = new Array(this._capacity);\n this._values = new Array(this._capacity);\n this._start = 0;\n this._size = 0;\n}\n\nLruMap.prototype._index = function(i) {\n return mod(this._start + i, this._capacity);\n};\n\n// Returns the value associated to the specified key, or null if not found.\nLruMap.prototype.get = function(key) {\n for (var i = 0; i < this._size; i++) {\n var existingKey = this._keys[this._index(i)];\n if (key.equals(existingKey)) {\n return this._values[this._index(i)];\n }\n }\n return null;\n};\n\n// Associates the specified value with the specified key, possibly replacing the\n// currently associated value. The key-value pair becomes the newest. If the map\n// is at capacity, the oldest key-value pair is removed. Returns the removed\n// key, or null otherwise. If the capacity is zero, does nothing and returns\n// the key.\nLruMap.prototype.set = function(key, value) {\n if (this._capacity === 0) {\n return key;\n }\n this.del(key);\n var evictedKey =\n this._size === this._capacity ? this._keys[this._index(0)] : null;\n this._keys[this._index(this._size)] = key;\n this._values[this._index(this._size)] = value;\n if (this._size < this._capacity) {\n this._size++;\n } else {\n this._start = this._index(1);\n }\n return evictedKey;\n};\n\n// Removes the key-value pair associated with the specified key.\n// Returns the removed value, or null if not found.\nLruMap.prototype.del = function(key) {\n for (var i = 0; i < this._size; i++) {\n if (key.equals(this._keys[this._index(i)])) {\n var existingValue = this._values[this._index(i)];\n for (var j = i; j < this._size - 1; j++) {\n this._keys[this._index(j)] = this._keys[this._index(j + 1)];\n this._values[this._index(j)] = this._values[this._index(j + 1)];\n }\n this._size--;\n return existingValue;\n }\n }\n return null;\n};\n\n// Returns whether there is a value associated with the specified key.\nLruMap.prototype.has = function(key) {\n for (var i = 0; i < this._size; i++) {\n if (key.equals(this._keys[this._index(i)])) {\n return true;\n }\n }\n return false;\n};\n\n// Returns the number of key-value pairs in the map.\nLruMap.prototype.size = function() {\n return this._size;\n};\n\n// Removes all key-value pairs from the map.\nLruMap.prototype.clear = function() {\n this._keys.length = 0;\n this._values.length = 0;\n this._start = 0;\n this._size = 0;\n};\n\n// Calls fn(key, value) for each item in the map, in an unspecified order.\n// Returns the number of times fn was called.\n// The result is unspecified if the map is mutated during iteration.\nLruMap.prototype.forEach = function(fn) {\n var count = 0;\n for (var i = 0; i < this._size; i++) {\n fn(this._keys[this._index(i)], this._values[this._index(i)]);\n count += 1;\n }\n return count;\n};\n\nmodule.exports = LruMap;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nfunction Level(levelProperties) {\n this._fallbackOnly = !!levelProperties.fallbackOnly;\n}\n\nLevel.prototype.numHorizontalTiles = function() {\n return Math.ceil(this.width() / this.tileWidth());\n};\n\nLevel.prototype.numVerticalTiles = function() {\n return Math.ceil(this.height() / this.tileHeight());\n};\n\nLevel.prototype.fallbackOnly = function() {\n return this._fallbackOnly;\n};\n\nmodule.exports = Level;","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar cmp = require('../util/cmp');\n\nfunction makeLevelList(levelPropertiesList, LevelClass) {\n var list = [];\n\n for (var i = 0; i < levelPropertiesList.length; i++) {\n list.push(new LevelClass(levelPropertiesList[i]));\n }\n\n list.sort(function(level1, level2) {\n return cmp(level1.width(), level2.width());\n });\n\n return list;\n}\n\nfunction makeSelectableLevelList(levelList) {\n var list = [];\n\n for (var i = 0; i < levelList.length; i++) {\n if (!levelList[i]._fallbackOnly) {\n list.push(levelList[i]);\n }\n }\n\n if (!list.length) {\n throw new Error('No selectable levels in list');\n }\n\n return list;\n}\n\nmodule.exports = {\n makeLevelList: makeLevelList,\n makeSelectableLevelList: makeSelectableLevelList\n};\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nfunction cmp(x, y) {\n if (x < y) {\n return -1;\n }\n if (x > y) {\n return 1;\n }\n return 0;\n}\n\nmodule.exports = cmp;","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nfunction type(x) {\n var typ = typeof x;\n if (typ === 'object') {\n if (x === null) {\n return 'null';\n }\n if (Object.prototype.toString.call(x) === '[object Array]') {\n return 'array';\n }\n if (Object.prototype.toString.call(x) === '[object RegExp]') {\n return 'regexp';\n }\n }\n return typ;\n}\n\nmodule.exports = type;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar Map = require('../collections/Map');\nvar decimal = require('../util/decimal');\nvar setOverflowHidden = require('../util/dom').setOverflowHidden;\nvar setNoPointerEvents = require('../util/dom').setNoPointerEvents;\nvar setNullTransform = require('../util/dom').setNullTransform;\nvar setTransform = require('../util/dom').setTransform;\nvar clearOwnProperties = require('../util/clearOwnProperties');\n\nvar debug = typeof MARZIPANODEBUG !== 'undefined' && MARZIPANODEBUG.css;\n\n\nfunction tileCmp(a, b) {\n return a.cmp(b);\n}\n\n\nfunction CssBaseRenderer(root, quirks, tileClass) {\n\n this._root = root;\n\n this._browserQuirks = quirks;\n\n // Create a container for this renderer's tiles, so we can style them\n // as a whole separately from other renderers in the same stage.\n var domElement = document.createElement('div');\n root.appendChild(domElement);\n\n domElement.style.position = 'absolute';\n\n // For some weird reason, this prevents flickering on Safari Desktop.\n setOverflowHidden(domElement);\n\n // Prevent touch events on tiles from messing up pinching gestures on iOS.\n setNoPointerEvents(domElement);\n\n if (this._browserQuirks.useNullTransform) {\n setNullTransform(domElement);\n }\n\n this.domElement = domElement;\n\n this._oldTileList = [];\n this._newTileList = [];\n\n this._textureMap = new Map();\n}\n\n\nCssBaseRenderer.prototype.destroy = function() {\n this._root.removeChild(this.domElement);\n clearOwnProperties(this);\n};\n\n\nCssBaseRenderer.prototype.startLayer = function(layer, rect) {\n var domElement = this.domElement;\n\n // Set viewport effect.\n var stageWidth = this._root.clientWidth;\n var stageHeight = this._root.clientHeight;\n domElement.style.left = decimal(stageWidth * rect.left) + 'px';\n domElement.style.top = decimal(stageHeight * rect.top) + 'px';\n domElement.style.width = decimal(stageWidth * rect.width) + 'px';\n domElement.style.height = decimal(stageHeight * rect.height) + 'px';\n\n // Set opacity effect.\n var opacity = 1.0;\n var effects = layer.effects();\n if (effects && effects.opacity != null) {\n opacity = effects.opacity;\n }\n domElement.style.opacity = opacity;\n\n // Clear temporary variables.\n this._newTileList.length = 0;\n this._textureMap.clear();\n};\n\n\nCssBaseRenderer.prototype.renderTile = function(tile, texture) {\n this._newTileList.push(tile);\n this._textureMap.set(tile, texture);\n};\n\n\nCssBaseRenderer.prototype.endLayer = function(layer, rect) {\n\n var domElement = this.domElement;\n var oldTileList = this._oldTileList;\n var newTileList = this._newTileList;\n var textureMap = this._textureMap;\n var oldIndex, newIndex, oldTile, newTile;\n var texture, canvas;\n var currentNode, nextNode;\n\n var view = layer.view();\n\n // Iterate the old and new tile lists in a consistent order and perform\n // insertions and removals as we go. This minimizes the number of DOM\n // operations performed.\n\n // Neither the tile list nor the texture list may contain duplicates,\n // otherwise this logic will fail.\n\n // Consistency check.\n if (domElement.children.length !== oldTileList.length) {\n throw new Error('DOM not in sync with tile list');\n }\n\n newTileList.sort(tileCmp);\n\n oldIndex = 0;\n oldTile = oldTileList[oldIndex];\n currentNode = domElement.firstChild;\n\n for (newIndex = 0; newIndex < newTileList.length; newIndex++) {\n\n newTile = newTileList[newIndex];\n\n // Iterate old list until it catches up with the new list.\n while (oldIndex < oldTileList.length) {\n\n if (oldTile.cmp(newTile) >= 0) {\n // Caught up.\n break;\n }\n\n // Tile is no longer visible.\n // Remove it from the DOM.\n nextNode = currentNode.nextSibling;\n domElement.removeChild(currentNode);\n currentNode = nextNode;\n oldTile = oldTileList[++oldIndex];\n }\n\n // Get the texture for the current tile.\n texture = textureMap.get(newTile);\n canvas = texture ? texture._canvas : null;\n\n // Consistency check.\n if (!canvas) {\n throw new Error('Rendering tile with missing texture');\n }\n\n if (oldTile && oldTile.cmp(newTile) === 0) {\n // The old and new tile are the same.\n\n // Consistency check.\n if (canvas != currentNode) {\n throw new Error('DOM not in sync with tile list');\n }\n\n currentNode = currentNode.nextSibling;\n oldTile = oldTileList[++oldIndex];\n\n } else {\n // The new tile comes before the old tile.\n // Insert it into the DOM.\n domElement.insertBefore(canvas, currentNode);\n }\n\n // Set the CSS transform on the current tile.\n setTransform(canvas, this.calculateTransform(newTile, texture, view));\n\n if (debug) {\n canvas.setAttribute('data-tile', newTile.str());\n }\n }\n\n // Remove trailing tiles that are no longer visible from the DOM.\n while (currentNode) {\n nextNode = currentNode.nextSibling;\n domElement.removeChild(currentNode);\n currentNode = nextNode;\n }\n\n // Consistenty check.\n if (domElement.children.length !== newTileList.length) {\n throw new Error('DOM not in sync with tile list');\n }\n\n // The old and new tile lists swap roles between iterations.\n var tmp = this._oldTileList;\n this._oldTileList = this._newTileList;\n this._newTileList = tmp;\n};\n\n\nmodule.exports = CssBaseRenderer;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar mod = require('../util/mod');\n\nvar defaultCapacity = 64;\n\n// A map data structure for keys implementing hash() and equals() and arbitrary\n// values. The capacity, if given, is just a hint; the map is allowed to exceed\n// it, but performance may suffer.\nfunction Map(capacity) {\n if (capacity != null &&\n (!isFinite(capacity) || Math.floor(capacity) !== capacity || capacity < 1)) {\n throw new Error('Map: invalid capacity');\n }\n this._capacity = capacity || defaultCapacity;\n\n this._keyBuckets = [];\n this._valBuckets = [];\n for (var i = 0; i < this._capacity; i++) {\n this._keyBuckets.push([]);\n this._valBuckets.push([]);\n }\n this._size = 0;\n}\n\n// Returns the value associated with the specified key, or null if not found.\nMap.prototype.get = function(key) {\n var h = mod(key.hash(), this._capacity);\n var keyBucket = this._keyBuckets[h];\n for (var i = 0; i < keyBucket.length; i++) {\n var existingKey = keyBucket[i];\n if (key.equals(existingKey)) {\n var valBucket = this._valBuckets[h];\n var existingValue = valBucket[i];\n return existingValue;\n }\n }\n return null;\n};\n\n// Associates the specified value with the specified key, possibly replacing the\n// currently associated value.\n// Returns the replaced value, or null if no value was replaced.\nMap.prototype.set = function(key, val) {\n var h = mod(key.hash(), this._capacity);\n var keyBucket = this._keyBuckets[h];\n var valBucket = this._valBuckets[h];\n for (var i = 0; i < keyBucket.length; i++) {\n var existingKey = keyBucket[i];\n if (key.equals(existingKey)) {\n var existingValue = valBucket[i];\n keyBucket[i] = key;\n valBucket[i] = val;\n return existingValue;\n }\n }\n keyBucket.push(key);\n valBucket.push(val);\n this._size++;\n return null;\n};\n\n// Removes the key-value pair associated with the specified key.\n// Returns the removed value, or null if not found.\nMap.prototype.del = function(key) {\n var h = mod(key.hash(), this._capacity);\n var keyBucket = this._keyBuckets[h];\n var valBucket = this._valBuckets[h];\n for (var i = 0; i < keyBucket.length; i++) {\n var existingKey = keyBucket[i];\n if (key.equals(existingKey)) {\n var existingValue = valBucket[i];\n // Splice manually to avoid Array#splice return value allocation.\n for (var j = i; j < keyBucket.length - 1; j++) {\n keyBucket[j] = keyBucket[j+1];\n valBucket[j] = valBucket[j+1];\n }\n keyBucket.length = keyBucket.length - 1;\n valBucket.length = valBucket.length - 1;\n this._size--;\n return existingValue;\n }\n }\n return null;\n};\n\n// Returns whether there is a value associated with the specified key.\nMap.prototype.has = function(key) {\n var h = mod(key.hash(), this._capacity);\n var keyBucket = this._keyBuckets[h];\n for (var i = 0; i < keyBucket.length; i++) {\n var existingKey = keyBucket[i];\n if (key.equals(existingKey)) {\n return true;\n }\n }\n return false;\n};\n\n// Returns the number of key-value pairs in the map.\nMap.prototype.size = function() {\n return this._size;\n};\n\n// Removes all key-value pairs from the map.\nMap.prototype.clear = function() {\n for (var i = 0; i < this._capacity; i++) {\n this._keyBuckets[i].length = 0;\n this._valBuckets[i].length = 0;\n }\n this._size = 0;\n};\n\n// Calls fn(key, value) for each key-value pair in the map, in an unspecified\n// order. Returns the number of times fn was called.\n// The result is unspecified if the map is mutated during iteration.\nMap.prototype.forEach = function(fn) {\n var count = 0;\n for (var i = 0; i < this._capacity; i++) {\n var keyBucket = this._keyBuckets[i];\n var valBucket = this._valBuckets[i];\n for (var j = 0; j < keyBucket.length; j++) {\n fn(keyBucket[j], valBucket[j]);\n count += 1;\n }\n }\n return count;\n};\n\nmodule.exports = Map;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\n// Convert a number to a string in decimal notation.\nfunction decimal(x) {\n // Double-precision floats have 15 significant decimal digits.\n return x.toPrecision(15);\n}\n\nmodule.exports = decimal;","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar FlatTile = require('../geometries/Flat').Tile;\nvar CssBaseRenderer = require('./CssBase');\nvar decimal = require('../util/decimal');\nvar inherits = require('../util/inherits');\n\n\n/**\n * @class CssFlatRenderer\n * @implements Renderer\n * @classdesc\n *\n * A renderer for {@link FlatGeometry} and {@link FlatView}, appropriate for a\n * {@link CssStage}.\n *\n * Most users do not need to instantiate this class. Renderers are created and\n * destroyed by {@link Stage} as necessary.\n */\nfunction CssFlatRenderer(root, quirks) {\n this.constructor.super_.call(this, root, quirks, FlatTile);\n}\n\ninherits(CssFlatRenderer, CssBaseRenderer);\n\n\nCssFlatRenderer.prototype.calculateTransform = function(tile, texture, view) {\n\n var padSize = this._browserQuirks.padSize;\n\n var transform = '';\n\n // Place top left corner of tile at the center of the viewport.\n var viewportWidth = view.width();\n var viewportHeight = view.height();\n transform += 'translateX(' + decimal(viewportWidth/2) + 'px) translateY(' + decimal(viewportHeight/2) + 'px) ';\n\n // Determine the zoom factor.\n var zoomX = viewportWidth / view._zoomX();\n var zoomY = viewportHeight / view._zoomY();\n\n // Move tile into its position within the image.\n var cornerX = tile.centerX() - tile.scaleX() / 2 + 0.5;\n var cornerY = 0.5 - tile.centerY() - tile.scaleY() / 2;\n var translX = cornerX * zoomX;\n var translY = cornerY * zoomY;\n transform += 'translateX(' + decimal(translX) + 'px) translateY(' + decimal(translY) + 'px) ';\n\n // Apply view offsets.\n var offX = -view.x() * zoomX;\n var offY = -view.y() * zoomY;\n transform += 'translateX(' + decimal(offX) + 'px) translateY(' + decimal(offY) + 'px) ';\n\n // Compensate for padding around the tile.\n var padLeft = tile.padLeft() ? padSize : 0;\n var padTop = tile.padTop() ? padSize : 0;\n if (padLeft !== 0 || padTop !== 0) {\n transform += 'translateX(' + decimal(-padLeft) + 'px) translateY(' + decimal(-padTop) + 'px) ';\n }\n\n // Scale tile into correct size.\n var scaleX = zoomX / tile.levelWidth();\n var scaleY = zoomY / tile.levelHeight();\n transform += 'scale(' + decimal(scaleX) + ', ' + decimal(scaleY) + ') ';\n\n return transform;\n\n};\n\n\nmodule.exports = CssFlatRenderer;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar inherits = require('../util/inherits');\nvar hash = require('../util/hash');\nvar TileSearcher = require('../TileSearcher');\nvar LruMap = require('../collections/LruMap');\nvar Level = require('./Level');\nvar makeLevelList = require('./common').makeLevelList;\nvar makeSelectableLevelList = require('./common').makeSelectableLevelList;\nvar clamp = require('../util/clamp');\nvar mod = require('../util/mod');\nvar cmp = require('../util/cmp');\nvar type = require('../util/type');\nvar vec2 = require('gl-matrix').vec2;\nvar vec4 = require('gl-matrix').vec4;\n\nvar neighborsCacheSize = 64;\n\n// Some renderer implementations require tiles to be padded around with\n// repeated pixels to prevent the appearance of visible seams between tiles.\n//\n// In order to prevent the padding from being visible, the tiles must be\n// padded and stacked such that the padding on one of the sides, when present,\n// stacks below the neighboring tile on that side.\n//\n// Padding rules:\n// * Pad tiles on the right and on the bottom.\n//\n// Stacking rules:\n// * Within an image, stack smaller zoom levels below larger zoom levels.\n// * Within a level, stack tiles bottom to top in ascending Y coordinate order.\n// * Within a row, stack tiles bottom to top in ascending X coordinate order.\n\n// Offsets to apply to the (x,y) coordinates of a tile to get its neighbors.\nvar neighborOffsets = [\n [ 0, 1 ], // top\n [ 1, 0 ], // right\n [ 0, -1 ], // bottom\n [ -1, 0 ] // left\n];\n\n\n/**\n * @class FlatTile\n * @implements Tile\n * @classdesc\n *\n * A tile in a {@link FlatGeometry}.\n */\nfunction FlatTile(x, y, z, geometry) {\n this.x = x;\n this.y = y;\n this.z = z;\n this._geometry = geometry;\n this._level = geometry.levelList[z];\n}\n\n\nFlatTile.prototype.rotX = function() {\n return 0;\n};\n\n\nFlatTile.prototype.rotY = function() {\n return 0;\n};\n\n\nFlatTile.prototype.centerX = function() {\n var levelWidth = this._level.width();\n var tileWidth = this._level.tileWidth();\n return (this.x * tileWidth + 0.5 * this.width()) / levelWidth - 0.5;\n};\n\n\nFlatTile.prototype.centerY = function() {\n var levelHeight = this._level.height();\n var tileHeight = this._level.tileHeight();\n return 0.5 - (this.y * tileHeight + 0.5 * this.height()) / levelHeight;\n};\n\n\nFlatTile.prototype.scaleX = function() {\n var levelWidth = this._level.width();\n return this.width() / levelWidth;\n};\n\n\nFlatTile.prototype.scaleY = function() {\n var levelHeight = this._level.height();\n return this.height() / levelHeight;\n};\n\n\nFlatTile.prototype.width = function() {\n var levelWidth = this._level.width();\n var tileWidth = this._level.tileWidth();\n if (this.atRightEdge()) {\n var widthRemainder = mod(levelWidth, tileWidth);\n return widthRemainder || tileWidth;\n } else {\n return tileWidth;\n }\n};\n\n\nFlatTile.prototype.height = function() {\n var levelHeight = this._level.height();\n var tileHeight = this._level.tileHeight();\n if (this.atBottomEdge()) {\n var heightRemainder = mod(levelHeight, tileHeight);\n return heightRemainder || tileHeight;\n } else {\n return tileHeight;\n }\n};\n\n\nFlatTile.prototype.levelWidth = function() {\n return this._level.width();\n};\n\n\nFlatTile.prototype.levelHeight = function() {\n return this._level.height();\n};\n\n\nFlatTile.prototype.atTopLevel = function() {\n return this.z === 0;\n};\n\n\nFlatTile.prototype.atBottomLevel = function() {\n return this.z === this._geometry.levelList.length - 1;\n};\n\n\nFlatTile.prototype.atTopEdge = function() {\n return this.y === 0;\n};\n\n\nFlatTile.prototype.atBottomEdge = function() {\n return this.y === this._level.numVerticalTiles() - 1;\n};\n\n\nFlatTile.prototype.atLeftEdge = function() {\n return this.x === 0;\n};\n\n\nFlatTile.prototype.atRightEdge = function() {\n return this.x === this._level.numHorizontalTiles() - 1;\n};\n\n\nFlatTile.prototype.padTop = function() {\n return false;\n};\n\n\nFlatTile.prototype.padBottom = function() {\n return !this.atBottomEdge();\n};\n\n\nFlatTile.prototype.padLeft = function() {\n return false;\n};\n\n\nFlatTile.prototype.padRight = function() {\n return !this.atRightEdge();\n};\n\n\nFlatTile.prototype.vertices = function(result) {\n if (!result) {\n result = [vec2.create(), vec2.create(), vec2.create(), vec2.create()];\n }\n\n var left = this.centerX() - this.scaleX() / 2;\n var right = this.centerX() + this.scaleX() / 2;\n var bottom = this.centerY() - this.scaleY() / 2;\n var top = this.centerY() + this.scaleY() / 2;\n\n vec2.set(result[0], left, top);\n vec2.set(result[1], right, top);\n vec2.set(result[2], right, bottom);\n vec2.set(result[3], left, bottom);\n\n return result;\n};\n\n\nFlatTile.prototype.parent = function() {\n\n\n if (this.atTopLevel()) {\n return null;\n }\n\n var geometry = this._geometry;\n\n var z = this.z - 1;\n // TODO: Currently assuming each level is double the size of previous one.\n // Fix to support other multiples.\n var x = Math.floor(this.x / 2);\n var y = Math.floor(this.y / 2);\n\n return new FlatTile(x, y, z, geometry);\n\n};\n\n\nFlatTile.prototype.children = function(result) {\n if (this.atBottomLevel()) {\n return null;\n }\n\n var geometry = this._geometry;\n var z = this.z + 1;\n\n result = result || [];\n\n // TODO: Currently assuming each level is double the size of previous one.\n // Fix to support other multiples.\n result.push(new FlatTile(2*this.x , 2*this.y , z, geometry));\n result.push(new FlatTile(2*this.x , 2*this.y+1, z, geometry));\n result.push(new FlatTile(2*this.x+1, 2*this.y , z, geometry));\n result.push(new FlatTile(2*this.x+1, 2*this.y+1, z, geometry));\n\n return result;\n\n};\n\n\nFlatTile.prototype.neighbors = function() {\n\n var geometry = this._geometry;\n var cache = geometry._neighborsCache;\n\n // Satisfy from cache when available.\n var cachedResult = cache.get(this);\n if (cachedResult) {\n return cachedResult;\n }\n\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var level = this._level;\n\n var numX = level.numHorizontalTiles() - 1;\n var numY = level.numVerticalTiles() - 1;\n\n var result = [];\n\n for (var i = 0; i < neighborOffsets.length; i++) {\n var xOffset = neighborOffsets[i][0];\n var yOffset = neighborOffsets[i][1];\n\n var newX = x + xOffset;\n var newY = y + yOffset;\n var newZ = z;\n\n if (0 <= newX && newX <= numX && 0 <= newY && newY <= numY) {\n result.push(new FlatTile(newX, newY, newZ, geometry));\n }\n }\n\n // Store into cache to satisfy future requests.\n cache.set(this, result);\n\n return result;\n\n};\n\n\nFlatTile.prototype.hash = function() {\n return hash(this.z, this.y, this.x);\n};\n\n\nFlatTile.prototype.equals = function(that) {\n return (this.geometry === that.geometry &&\n this.z === that.z && this.y === that.y && this.x === that.x);\n};\n\n\nFlatTile.prototype.cmp = function(that) {\n return (cmp(this.z, that.z) || cmp(this.y, that.y) || cmp(this.x, that.x));\n};\n\n\nFlatTile.prototype.str = function() {\n return 'FlatTile(' + tile.x + ', ' + tile.y + ', ' + tile.z + ')';\n};\n\n\nfunction FlatLevel(levelProperties) {\n this.constructor.super_.call(this, levelProperties);\n\n this._width = levelProperties.width;\n this._height = levelProperties.height;\n this._tileWidth = levelProperties.tileWidth;\n this._tileHeight = levelProperties.tileHeight;\n}\n\ninherits(FlatLevel, Level);\n\n\nFlatLevel.prototype.width = function() {\n return this._width;\n};\n\n\nFlatLevel.prototype.height = function() {\n return this._height;\n};\n\n\nFlatLevel.prototype.tileWidth = function() {\n return this._tileWidth;\n};\n\n\nFlatLevel.prototype.tileHeight = function() {\n return this._tileHeight;\n};\n\n\nFlatLevel.prototype._validateWithParentLevel = function(parentLevel) {\n\n var width = this.width();\n var height = this.height();\n var tileWidth = this.tileWidth();\n var tileHeight = this.tileHeight();\n\n var parentWidth = parentLevel.width();\n var parentHeight = parentLevel.height();\n var parentTileWidth = parentLevel.tileWidth();\n var parentTileHeight = parentLevel.tileHeight();\n\n if (width % parentWidth !== 0) {\n return new Error('Level width must be multiple of parent level: ' +\n width + ' vs. ' + parentWidth);\n }\n\n if (height % parentHeight !== 0) {\n return new Error('Level height must be multiple of parent level: ' +\n height + ' vs. ' + parentHeight);\n }\n\n if (tileWidth % parentTileWidth !== 0) {\n return new Error('Level tile width must be multiple of parent level: ' +\n tileWidth + ' vs. ' + parentTileWidth);\n }\n\n if (tileHeight % parentTileHeight !== 0) {\n return new Error('Level tile height must be multiple of parent level: ' +\n tileHeight + ' vs. ' + parentTileHeight);\n }\n\n};\n\n\n/**\n * @class FlatGeometry\n * @implements Geometry\n * @classdesc\n *\n * A {@link Geometry} implementation suitable for tiled flat images with\n * multiple resolution levels.\n *\n * The following restrictions apply:\n * - All tiles must be square, except when in the last row or column position,\n * and must form a rectangular grid;\n * - The width and height of a level must be multiples of the parent level\n * width and height.\n *\n * @param {Object[]} levelPropertiesList Level description\n * @param {number} levelPropertiesList[].width Level width in pixels\n * @param {number} levelPropertiesList[].tileWidth Tile width in pixels for\n * square tiles\n * @param {number} levelPropertiesList[].height Level height in pixels\n * @param {number} levelPropertiesList[].tileHeight Tile height in pixels for\n * square tiles\n */\nfunction FlatGeometry(levelPropertiesList) {\n if (type(levelPropertiesList) !== 'array') {\n throw new Error('Level list must be an array');\n }\n\n this.levelList = makeLevelList(levelPropertiesList, FlatLevel);\n this.selectableLevelList = makeSelectableLevelList(this.levelList);\n\n for (var i = 1; i < this.levelList.length; i++) {\n this.levelList[i]._validateWithParentLevel(this.levelList[i-1]);\n }\n\n this._tileSearcher = new TileSearcher(this);\n\n this._neighborsCache = new LruMap(neighborsCacheSize);\n\n this._vec = vec4.create();\n\n this._viewSize = {};\n}\n\n\nFlatGeometry.prototype.maxTileSize = function() {\n var maxTileSize = 0;\n for (var i = 0; i < this.levelList.length; i++) {\n var level = this.levelList[i];\n maxTileSize = Math.max(maxTileSize, level.tileWidth, level.tileHeight);\n }\n return maxTileSize;\n};\n\n\nFlatGeometry.prototype.levelTiles = function(level, result) {\n\n var levelIndex = this.levelList.indexOf(level);\n var maxX = level.numHorizontalTiles() - 1;\n var maxY = level.numVerticalTiles() - 1;\n\n if (!result) {\n result = [];\n }\n\n for (var x = 0; x <= maxX; x++) {\n for (var y = 0; y <= maxY; y++) {\n result.push(new FlatTile(x, y, levelIndex, this));\n }\n }\n\n return result;\n\n};\n\n\nFlatGeometry.prototype._closestTile = function(view, level) {\n var ray = this._vec;\n\n // Compute a view ray into the central screen point.\n vec4.set(ray, 0, 0, 1, 1);\n vec4.transformMat4(ray, ray, view.inverseProjection());\n\n // Compute the image coordinates that the view ray points into.\n var x = 0.5 + ray[0];\n var y = 0.5 - ray[1];\n\n // Get the desired zoom level.\n var tileZ = this.levelList.indexOf(level);\n var levelWidth = level.width();\n var levelHeight = level.height();\n var tileWidth = level.tileWidth();\n var tileHeight = level.tileHeight();\n var numX = level.numHorizontalTiles();\n var numY = level.numVerticalTiles();\n\n // Find the coordinates of the tile that the view ray points into.\n var tileX = clamp(Math.floor(x * levelWidth / tileWidth), 0, numX - 1);\n var tileY = clamp(Math.floor(y * levelHeight / tileHeight), 0, numY - 1);\n\n return new FlatTile(tileX, tileY, tileZ, this);\n};\n\n\nFlatGeometry.prototype.visibleTiles = function(view, level, result) {\n var viewSize = this._viewSize;\n var tileSearcher = this._tileSearcher;\n\n result = result || [];\n\n view.size(viewSize);\n if (viewSize.width === 0 || viewSize.height === 0) {\n // No tiles are visible if the viewport is empty.\n return result;\n }\n\n var startingTile = this._closestTile(view, level);\n var count = tileSearcher.search(view, startingTile, result);\n if (!count) {\n throw new Error('Starting tile is not visible');\n }\n\n return result;\n};\n\n\nFlatGeometry.Tile = FlatGeometry.prototype.Tile = FlatTile;\nFlatGeometry.type = FlatGeometry.prototype.type = 'flat';\nFlatTile.type = FlatTile.prototype.type = 'flat';\n\n\nmodule.exports = FlatGeometry;\n","import * as glMatrix from \"./common.js\";\n/**\r\n * 2 Dimensional Vector\r\n * @module vec2\r\n */\n\n/**\r\n * Creates a new, empty vec2\r\n *\r\n * @returns {vec2} a new 2D vector\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(2);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n }\n\n return out;\n}\n/**\r\n * Creates a new vec2 initialized with values from an existing vector\r\n *\r\n * @param {vec2} a vector to clone\r\n * @returns {vec2} a new 2D vector\r\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(2);\n out[0] = a[0];\n out[1] = a[1];\n return out;\n}\n/**\r\n * Creates a new vec2 initialized with the given values\r\n *\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @returns {vec2} a new 2D vector\r\n */\n\nexport function fromValues(x, y) {\n var out = new glMatrix.ARRAY_TYPE(2);\n out[0] = x;\n out[1] = y;\n return out;\n}\n/**\r\n * Copy the values from one vec2 to another\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a the source vector\r\n * @returns {vec2} out\r\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n return out;\n}\n/**\r\n * Set the components of a vec2 to the given values\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @returns {vec2} out\r\n */\n\nexport function set(out, x, y) {\n out[0] = x;\n out[1] = y;\n return out;\n}\n/**\r\n * Adds two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a the first operand\r\n * @param {vec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n return out;\n}\n/**\r\n * Subtracts vector b from vector a\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a the first operand\r\n * @param {vec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n return out;\n}\n/**\r\n * Multiplies two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a the first operand\r\n * @param {vec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n return out;\n}\n/**\r\n * Divides two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a the first operand\r\n * @param {vec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n return out;\n}\n/**\r\n * Math.ceil the components of a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a vector to ceil\r\n * @returns {vec2} out\r\n */\n\nexport function ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n return out;\n}\n/**\r\n * Math.floor the components of a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a vector to floor\r\n * @returns {vec2} out\r\n */\n\nexport function floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n return out;\n}\n/**\r\n * Returns the minimum of two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a the first operand\r\n * @param {vec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n return out;\n}\n/**\r\n * Returns the maximum of two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a the first operand\r\n * @param {vec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n return out;\n}\n/**\r\n * Math.round the components of a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a vector to round\r\n * @returns {vec2} out\r\n */\n\nexport function round(out, a) {\n out[0] = Math.round(a[0]);\n out[1] = Math.round(a[1]);\n return out;\n}\n/**\r\n * Scales a vec2 by a scalar number\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a the vector to scale\r\n * @param {Number} b amount to scale the vector by\r\n * @returns {vec2} out\r\n */\n\nexport function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n return out;\n}\n/**\r\n * Adds two vec2's after scaling the second operand by a scalar value\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a the first operand\r\n * @param {vec2} b the second operand\r\n * @param {Number} scale the amount to scale b by before adding\r\n * @returns {vec2} out\r\n */\n\nexport function scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n return out;\n}\n/**\r\n * Calculates the euclidian distance between two vec2's\r\n *\r\n * @param {vec2} a the first operand\r\n * @param {vec2} b the second operand\r\n * @returns {Number} distance between a and b\r\n */\n\nexport function distance(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1];\n return Math.hypot(x, y);\n}\n/**\r\n * Calculates the squared euclidian distance between two vec2's\r\n *\r\n * @param {vec2} a the first operand\r\n * @param {vec2} b the second operand\r\n * @returns {Number} squared distance between a and b\r\n */\n\nexport function squaredDistance(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1];\n return x * x + y * y;\n}\n/**\r\n * Calculates the length of a vec2\r\n *\r\n * @param {vec2} a vector to calculate length of\r\n * @returns {Number} length of a\r\n */\n\nexport function length(a) {\n var x = a[0],\n y = a[1];\n return Math.hypot(x, y);\n}\n/**\r\n * Calculates the squared length of a vec2\r\n *\r\n * @param {vec2} a vector to calculate squared length of\r\n * @returns {Number} squared length of a\r\n */\n\nexport function squaredLength(a) {\n var x = a[0],\n y = a[1];\n return x * x + y * y;\n}\n/**\r\n * Negates the components of a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a vector to negate\r\n * @returns {vec2} out\r\n */\n\nexport function negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n return out;\n}\n/**\r\n * Returns the inverse of the components of a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a vector to invert\r\n * @returns {vec2} out\r\n */\n\nexport function inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n return out;\n}\n/**\r\n * Normalize a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a vector to normalize\r\n * @returns {vec2} out\r\n */\n\nexport function normalize(out, a) {\n var x = a[0],\n y = a[1];\n var len = x * x + y * y;\n\n if (len > 0) {\n //TODO: evaluate use of glm_invsqrt here?\n len = 1 / Math.sqrt(len);\n }\n\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n return out;\n}\n/**\r\n * Calculates the dot product of two vec2's\r\n *\r\n * @param {vec2} a the first operand\r\n * @param {vec2} b the second operand\r\n * @returns {Number} dot product of a and b\r\n */\n\nexport function dot(a, b) {\n return a[0] * b[0] + a[1] * b[1];\n}\n/**\r\n * Computes the cross product of two vec2's\r\n * Note that the cross product must by definition produce a 3D vector\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec2} a the first operand\r\n * @param {vec2} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function cross(out, a, b) {\n var z = a[0] * b[1] - a[1] * b[0];\n out[0] = out[1] = 0;\n out[2] = z;\n return out;\n}\n/**\r\n * Performs a linear interpolation between two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a the first operand\r\n * @param {vec2} b the second operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {vec2} out\r\n */\n\nexport function lerp(out, a, b, t) {\n var ax = a[0],\n ay = a[1];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n return out;\n}\n/**\r\n * Generates a random vector with the given scale\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\r\n * @returns {vec2} out\r\n */\n\nexport function random(out, scale) {\n scale = scale || 1.0;\n var r = glMatrix.RANDOM() * 2.0 * Math.PI;\n out[0] = Math.cos(r) * scale;\n out[1] = Math.sin(r) * scale;\n return out;\n}\n/**\r\n * Transforms the vec2 with a mat2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a the vector to transform\r\n * @param {mat2} m matrix to transform with\r\n * @returns {vec2} out\r\n */\n\nexport function transformMat2(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[2] * y;\n out[1] = m[1] * x + m[3] * y;\n return out;\n}\n/**\r\n * Transforms the vec2 with a mat2d\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a the vector to transform\r\n * @param {mat2d} m matrix to transform with\r\n * @returns {vec2} out\r\n */\n\nexport function transformMat2d(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[2] * y + m[4];\n out[1] = m[1] * x + m[3] * y + m[5];\n return out;\n}\n/**\r\n * Transforms the vec2 with a mat3\r\n * 3rd vector component is implicitly '1'\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a the vector to transform\r\n * @param {mat3} m matrix to transform with\r\n * @returns {vec2} out\r\n */\n\nexport function transformMat3(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[3] * y + m[6];\n out[1] = m[1] * x + m[4] * y + m[7];\n return out;\n}\n/**\r\n * Transforms the vec2 with a mat4\r\n * 3rd vector component is implicitly '0'\r\n * 4th vector component is implicitly '1'\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a the vector to transform\r\n * @param {mat4} m matrix to transform with\r\n * @returns {vec2} out\r\n */\n\nexport function transformMat4(out, a, m) {\n var x = a[0];\n var y = a[1];\n out[0] = m[0] * x + m[4] * y + m[12];\n out[1] = m[1] * x + m[5] * y + m[13];\n return out;\n}\n/**\r\n * Rotate a 2D vector\r\n * @param {vec2} out The receiving vec2\r\n * @param {vec2} a The vec2 point to rotate\r\n * @param {vec2} b The origin of the rotation\r\n * @param {Number} c The angle of rotation\r\n * @returns {vec2} out\r\n */\n\nexport function rotate(out, a, b, c) {\n //Translate point to the origin\n var p0 = a[0] - b[0],\n p1 = a[1] - b[1],\n sinC = Math.sin(c),\n cosC = Math.cos(c); //perform rotation and translate to correct position\n\n out[0] = p0 * cosC - p1 * sinC + b[0];\n out[1] = p0 * sinC + p1 * cosC + b[1];\n return out;\n}\n/**\r\n * Get the angle between two 2D vectors\r\n * @param {vec2} a The first operand\r\n * @param {vec2} b The second operand\r\n * @returns {Number} The angle in radians\r\n */\n\nexport function angle(a, b) {\n var x1 = a[0],\n y1 = a[1],\n x2 = b[0],\n y2 = b[1];\n var len1 = x1 * x1 + y1 * y1;\n\n if (len1 > 0) {\n //TODO: evaluate use of glm_invsqrt here?\n len1 = 1 / Math.sqrt(len1);\n }\n\n var len2 = x2 * x2 + y2 * y2;\n\n if (len2 > 0) {\n //TODO: evaluate use of glm_invsqrt here?\n len2 = 1 / Math.sqrt(len2);\n }\n\n var cosine = (x1 * x2 + y1 * y2) * len1 * len2;\n\n if (cosine > 1.0) {\n return 0;\n } else if (cosine < -1.0) {\n return Math.PI;\n } else {\n return Math.acos(cosine);\n }\n}\n/**\r\n * Set the components of a vec2 to zero\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @returns {vec2} out\r\n */\n\nexport function zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n return out;\n}\n/**\r\n * Returns a string representation of a vector\r\n *\r\n * @param {vec2} a vector to represent as a string\r\n * @returns {String} string representation of the vector\r\n */\n\nexport function str(a) {\n return 'vec2(' + a[0] + ', ' + a[1] + ')';\n}\n/**\r\n * Returns whether or not the vectors exactly have the same elements in the same position (when compared with ===)\r\n *\r\n * @param {vec2} a The first vector.\r\n * @param {vec2} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1];\n}\n/**\r\n * Returns whether or not the vectors have approximately the same elements in the same position.\r\n *\r\n * @param {vec2} a The first vector.\r\n * @param {vec2} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1];\n var b0 = b[0],\n b1 = b[1];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1));\n}\n/**\r\n * Alias for {@link vec2.length}\r\n * @function\r\n */\n\nexport var len = length;\n/**\r\n * Alias for {@link vec2.subtract}\r\n * @function\r\n */\n\nexport var sub = subtract;\n/**\r\n * Alias for {@link vec2.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Alias for {@link vec2.divide}\r\n * @function\r\n */\n\nexport var div = divide;\n/**\r\n * Alias for {@link vec2.distance}\r\n * @function\r\n */\n\nexport var dist = distance;\n/**\r\n * Alias for {@link vec2.squaredDistance}\r\n * @function\r\n */\n\nexport var sqrDist = squaredDistance;\n/**\r\n * Alias for {@link vec2.squaredLength}\r\n * @function\r\n */\n\nexport var sqrLen = squaredLength;\n/**\r\n * Perform some operation over an array of vec2s.\r\n *\r\n * @param {Array} a the array of vectors to iterate over\r\n * @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed\r\n * @param {Number} offset Number of elements to skip at the beginning of the array\r\n * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array\r\n * @param {Function} fn Function to call for each vector in the array\r\n * @param {Object} [arg] additional argument to pass to fn\r\n * @returns {Array} a\r\n * @function\r\n */\n\nexport var forEach = function () {\n var vec = create();\n return function (a, stride, offset, count, fn, arg) {\n var i, l;\n\n if (!stride) {\n stride = 2;\n }\n\n if (!offset) {\n offset = 0;\n }\n\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n } else {\n l = a.length;\n }\n\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n }\n\n return a;\n };\n}();","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar FlashBaseRenderer = require('./FlashBase');\nvar CubeTile = require('../geometries/Cube').Tile;\nvar inherits = require('../util/inherits');\n\nvar radToDeg = require('../util/radToDeg');\n\n\n/**\n * @class FlashCubeRenderer\n * @implements Renderer\n * @classdesc\n *\n * A renderer for {@link CubeGeometry} and {@link RectilinearView}, appropriate\n * for a {@link FlashStage}.\n *\n * Most users do not need to instantiate this class. Renderers are created and\n * destroyed by {@link Stage} as necessary.\n */\nfunction FlashCubeRenderer(flashElement, layerId, quirks) {\n this.constructor.super_.call(this, flashElement, layerId, quirks, CubeTile);\n this._flashTileList = [];\n}\n\ninherits(FlashCubeRenderer, FlashBaseRenderer);\n\n\nFlashCubeRenderer.prototype._renderOnFlash = function(layer, rect) {\n\n var flashElement = this._flashElement;\n var layerId = this._layerId;\n var padSize = this._quirks.padSize;\n\n var tileList = this._tileList;\n var textureMap = this._textureMap;\n\n var flashTileList = this._flashTileList;\n flashTileList.length = 0;\n\n for (var i = 0; i < tileList.length; i++) {\n var tile = tileList[i];\n var texture = textureMap.get(tile);\n if (!texture) {\n throw new Error('Rendering tile with missing texture');\n }\n\n // Get padding sizes.\n var padTop = tile.padTop() ? padSize : 0;\n var padBottom = tile.padBottom() ? padSize : 0;\n var padLeft = tile.padLeft() ? padSize : 0;\n var padRight = tile.padRight() ? padSize : 0;\n\n flashTileList.push({\n textureId: texture._textureId,\n face: tile.face,\n width: tile.width(),\n height: tile.height(),\n centerX: tile.centerX(),\n centerY: tile.centerY(),\n rotX: radToDeg(tile.rotX()),\n rotY: radToDeg(tile.rotY()),\n levelSize: tile.levelWidth(),\n padTop: padTop,\n padBottom: padBottom,\n padLeft: padLeft,\n padRight: padRight\n });\n }\n\n // Get viewport position and size.\n var stageWidth = this._flashElement.clientWidth;\n var stageHeight = this._flashElement.clientHeight;\n var viewportX = stageWidth * rect.x;\n var viewportY = stageHeight * rect.y;\n var viewportWidth = stageWidth * rect.width;\n var viewportHeight = stageHeight * rect.height;\n\n // Get opacity value.\n var opacity = 1.0;\n var effects = layer.effects();\n if (effects && effects.opacity != null) {\n opacity = effects.opacity;\n }\n\n // Get view parameters.\n var view = layer.view();\n var yaw = view.yaw();\n var pitch = view.pitch();\n var roll = view.roll();\n var fov = view.fov();\n\n flashElement.drawCubeTiles(\n layerId, viewportWidth, viewportHeight, viewportX, viewportY, opacity,\n yaw, pitch, roll, fov, flashTileList);\n};\n\n\nmodule.exports = FlashCubeRenderer;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar Map = require('../collections/Map');\nvar clearOwnProperties = require('../util/clearOwnProperties');\n\n\nfunction tileCmp(a, b) {\n return a.cmp(b);\n}\n\n\nfunction FlashBaseRenderer(flashElement, layerId, quirks, tileClass) {\n\n this._flashElement = flashElement;\n this._layerId = layerId;\n this._quirks = quirks;\n\n this._tileList = [];\n\n this._textureMap = new Map();\n\n // Whether the Flash layer for this renderer has already been created\n // by calling flashElement.createLayer(). Note that we cannot do this\n // right here because Flash may not be initialized yet.\n this._layerCreated = false;\n}\n\n\nFlashBaseRenderer.prototype.destroy = function() {\n if (this._layerCreated) {\n this._flashElement.destroyLayer(this._layerId);\n }\n clearOwnProperties(this);\n};\n\n\nFlashBaseRenderer.prototype.startLayer = function(layer, rect) {\n if (!this._flashElement.isReady || !this._flashElement.isReady()) {\n return;\n }\n if (!this._layerCreated) {\n this._flashElement.createLayer(this._layerId);\n this._layerCreated = true;\n }\n this._tileList.length = 0;\n this._textureMap.clear();\n};\n\n\nFlashBaseRenderer.prototype.renderTile = function(tile, texture) {\n this._tileList.push(tile);\n this._textureMap.set(tile, texture);\n};\n\n\nFlashBaseRenderer.prototype.endLayer = function(layer, rect) {\n if (!this._flashElement.isReady || !this._flashElement.isReady()) {\n return;\n }\n\n // Sort tiles so they are rendered in an order coherent with their padding.\n var tileList = this._tileList;\n tileList.sort(tileCmp);\n\n this._renderOnFlash(layer, rect);\n};\n\n\nmodule.exports = FlashBaseRenderer;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\n/**\n * @memberof util\n * @param {number} rad\n * @return {number}\n */\nfunction radToDeg(rad) {\n return rad * 180 / Math.PI;\n}\n\nmodule.exports = radToDeg;","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar FlashBaseRenderer = require('./FlashBase');\nvar FlatTile = require('../geometries/Flat').Tile;\nvar inherits = require('../util/inherits');\n\n\n/**\n * @class FlashFlatRenderer\n * @implements Renderer\n * @classdesc\n *\n * A renderer for {@link FlatGeometry} and {@link FlatView}, appropriate for a\n * {@link FlashStage}.\n *\n * Most users do not need to instantiate this class. Renderers are created and\n * destroyed by {@link Stage} as necessary.\n */\nfunction FlashFlatRenderer(flashElement, layerId, quirks) {\n this.constructor.super_.call(this, flashElement, layerId, quirks, FlatTile);\n this._flashTileList = [];\n}\n\ninherits(FlashFlatRenderer, FlashBaseRenderer);\n\n\nFlashFlatRenderer.prototype._renderOnFlash = function(layer, rect) {\n\n var flashElement = this._flashElement;\n var layerId = this._layerId;\n var padSize = this._quirks.padSize;\n\n var tileList = this._tileList;\n var textureMap = this._textureMap;\n\n var flashTileList = this._flashTileList;\n flashTileList.length = 0;\n\n for (var i = 0; i < tileList.length; i++) {\n var tile = tileList[i];\n var texture = textureMap.get(tile);\n if (!texture) {\n throw new Error('Rendering tile with missing texture');\n }\n\n // Get padding sizes.\n var padTop = tile.padTop() ? padSize : 0;\n var padBottom = tile.padBottom() ? padSize : 0;\n var padLeft = tile.padLeft() ? padSize : 0;\n var padRight = tile.padRight() ? padSize : 0;\n\n flashTileList.push({\n textureId: texture._textureId,\n width: tile.width(),\n height: tile.height(),\n centerX: tile.centerX(),\n centerY: tile.centerY(),\n scaleX: tile.scaleX(),\n scaleY: tile.scaleY(),\n levelWidth: tile.levelWidth(),\n levelHeight: tile.levelHeight(),\n padTop: padTop,\n padBottom: padBottom,\n padLeft: padLeft,\n padRight: padRight\n });\n }\n\n // Get viewport position and size.\n var stageWidth = this._flashElement.clientWidth;\n var stageHeight = this._flashElement.clientHeight;\n var viewportX = stageWidth * rect.x;\n var viewportY = stageHeight * rect.y;\n var viewportWidth = stageWidth * rect.width;\n var viewportHeight = stageHeight * rect.height;\n\n // Get opacity value.\n var opacity = 1.0;\n var effects = layer.effects();\n if (effects && effects.opacity != null) {\n opacity = effects.opacity;\n }\n\n // Get view parameters.\n var view = layer.view();\n var x = view.x();\n var y = view.y();\n var zoomX = view._zoomX();\n var zoomY = view._zoomY();\n\n flashElement.drawFlatTiles(\n layerId, viewportWidth, viewportHeight, viewportX, viewportY, opacity,\n x, y, zoomX, zoomY, flashTileList);\n};\n\n\nmodule.exports = FlashFlatRenderer;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar WebGlCube = require('./WebGlCube');\nvar WebGlFlat = require('./WebGlFlat');\nvar WebGlEquirect = require('./WebGlEquirect');\n\nvar CssCube = require('./CssCube');\nvar CssFlat = require('./CssFlat');\n\nvar FlashCube = require('./FlashCube');\nvar FlashFlat = require('./FlashFlat');\n\n/**\n * Registers all known renderers for the given stage type into that stage.\n * Most users will not need to register renderers, as {@link Viewer} does it for\n * them.\n *\n * @param {Stage} stage The stage where the renderers are to be registered.\n * @throws An error if the stage type is unknown.\n */\nfunction registerDefaultRenderers(stage) {\n switch (stage.type) {\n case 'webgl':\n stage.registerRenderer('flat', 'flat', WebGlFlat);\n stage.registerRenderer('cube', 'rectilinear', WebGlCube);\n stage.registerRenderer('equirect', 'rectilinear', WebGlEquirect);\n break;\n case 'css':\n stage.registerRenderer('flat', 'flat', CssFlat);\n stage.registerRenderer('cube', 'rectilinear', CssCube);\n break;\n case 'flash':\n stage.registerRenderer('flat', 'flat', FlashFlat);\n stage.registerRenderer('cube', 'rectilinear', FlashCube);\n break;\n default:\n throw new Error('Unknown stage type: ' + stage.type);\n }\n}\n\nmodule.exports = registerDefaultRenderers;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar inherits = require('../util/inherits');\nvar hash = require('../util/hash');\nvar cmp = require('../util/cmp');\nvar common = require('./common');\nvar Level = require('./Level');\nvar type = require('../util/type');\n\n\n/**\n * @class EquirectTile\n * @implements Tile\n * @classdesc\n *\n * A tile in an @{EquirectGeometry}.\n */\nfunction EquirectTile(z, geometry) {\n this.z = z;\n this._geometry = geometry;\n this._level = geometry.levelList[z];\n}\n\n\nEquirectTile.prototype.rotX = function() {\n return 0;\n};\n\n\nEquirectTile.prototype.rotY = function() {\n return 0;\n};\n\n\nEquirectTile.prototype.centerX = function() {\n return 0.5;\n};\n\n\nEquirectTile.prototype.centerY = function() {\n return 0.5;\n};\n\n\nEquirectTile.prototype.scaleX = function() {\n return 1;\n};\n\n\nEquirectTile.prototype.scaleY = function() {\n return 1;\n};\n\n\nEquirectTile.prototype.width = function() {\n return this._level.tileWidth();\n};\n\n\nEquirectTile.prototype.height = function() {\n return this._level.tileHeight();\n};\n\n\nEquirectTile.prototype.levelWidth = function() {\n return this._level.width();\n};\n\n\nEquirectTile.prototype.levelHeight = function() {\n return this._level.height();\n};\n\n\nEquirectTile.prototype.atTopLevel = function() {\n return this.z === 0;\n};\n\n\nEquirectTile.prototype.atBottomLevel = function() {\n return this.z === this._geometry.levelList.length - 1;\n};\n\n\nEquirectTile.prototype.atTopEdge = function() {\n return true;\n};\n\n\nEquirectTile.prototype.atBottomEdge = function() {\n return true;\n};\n\n\nEquirectTile.prototype.atLeftEdge = function() {\n return true;\n};\n\n\nEquirectTile.prototype.atRightEdge = function() {\n return true;\n};\n\n\nEquirectTile.prototype.padTop = function() {\n return false;\n};\n\n\nEquirectTile.prototype.padBottom = function() {\n return false;\n};\n\n\nEquirectTile.prototype.padLeft = function() {\n return false;\n};\n\n\nEquirectTile.prototype.padRight = function() {\n return false;\n};\n\n\nEquirectTile.prototype.parent = function() {\n if (this.atTopLevel()) {\n return null;\n }\n return new EquirectTile(this.z - 1, this._geometry);\n};\n\n\nEquirectTile.prototype.children = function(result) {\n if (this.atBottomLevel()) {\n return null;\n }\n result = result || [];\n result.push(new EquirectTile(this.z + 1, this._geometry));\n return result;\n};\n\n\nEquirectTile.prototype.neighbors = function() {\n return [];\n};\n\n\nEquirectTile.prototype.hash = function() {\n return hash(this.z);\n};\n\n\nEquirectTile.prototype.equals = function(that) {\n return this.geometry === that.geometry && this.z === that.z;\n};\n\n\nEquirectTile.prototype.cmp = function(that) {\n return cmp(this.z, that.z);\n};\n\n\nEquirectTile.prototype.str = function() {\n return 'EquirectTile(' + tile.z + ')';\n};\n\n\nfunction EquirectLevel(levelProperties) {\n this.constructor.super_.call(this, levelProperties);\n this._width = levelProperties.width;\n}\n\ninherits(EquirectLevel, Level);\n\n\nEquirectLevel.prototype.width = function() {\n return this._width;\n};\n\n\nEquirectLevel.prototype.height = function() {\n return this._width/2;\n};\n\n\nEquirectLevel.prototype.tileWidth = function() {\n return this._width;\n};\n\n\nEquirectLevel.prototype.tileHeight = function() {\n return this._width/2;\n};\n\n\n/**\n * @class EquirectGeometry\n * @implements Geometry\n * @classdesc\n *\n * A {@link Geometry} implementation suitable for equirectangular images with a\n * 2:1 aspect ratio.\n *\n * @param {Object[]} levelPropertiesList Level description\n * @param {number} levelPropertiesList[].width Level width in pixels\n*/\nfunction EquirectGeometry(levelPropertiesList) {\n if (type(levelPropertiesList) !== 'array') {\n throw new Error('Level list must be an array');\n }\n\n this.levelList = common.makeLevelList(levelPropertiesList, EquirectLevel);\n this.selectableLevelList = common.makeSelectableLevelList(this.levelList);\n}\n\n\nEquirectGeometry.prototype.maxTileSize = function() {\n var maxTileSize = 0;\n for (var i = 0; i < this.levelList.length; i++) {\n var level = this.levelList[i];\n maxTileSize = Math.max(maxTileSize, level.tileWidth, level.tileHeight);\n }\n return maxTileSize;\n};\n\n\nEquirectGeometry.prototype.levelTiles = function(level, result) {\n var levelIndex = this.levelList.indexOf(level);\n result = result || [];\n result.push(new EquirectTile(levelIndex, this));\n return result;\n};\n\n\nEquirectGeometry.prototype.visibleTiles = function(view, level, result) {\n var tile = new EquirectTile(this.levelList.indexOf(level), this);\n result = result || [];\n result.length = 0;\n result.push(tile);\n};\n\n\nEquirectGeometry.Tile = EquirectGeometry.prototype.Tile = EquirectTile;\nEquirectGeometry.type = EquirectGeometry.prototype.type = 'equirect';\nEquirectTile.type = EquirectTile.prototype.type = 'equirect';\n\n\nmodule.exports = EquirectGeometry;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar eventEmitter = require('minimal-event-emitter');\nvar mat4 = require('gl-matrix').mat4;\nvar vec4 = require('gl-matrix').vec4;\nvar pixelRatio = require('../util/pixelRatio');\nvar convertFov = require('../util/convertFov');\nvar mod = require('../util/mod');\nvar real = require('../util/real');\nvar clamp = require('../util/clamp');\nvar decimal = require('../util/decimal');\nvar compose = require('../util/compose');\nvar clearOwnProperties = require('../util/clearOwnProperties');\n\n// Default viewport dimensions.\n// Start with zero to ensure that those values are handled correctly.\nvar defaultWidth = 0;\nvar defaultHeight = 0;\n\n// Default view parameters.\nvar defaultYaw = 0;\nvar defaultPitch = 0;\nvar defaultRoll = 0;\nvar defaultFov = Math.PI/4;\nvar defaultProjectionCenterX = 0;\nvar defaultProjectionCenterY = 0;\n\n// A fov of exactly 0 or π breaks some computations, so we constrain it to the\n// [fovLimitEpsilon, π - fovLimitEpsilon] interval. We use 6 decimal places for\n// the epsilon value to avoid broken rendering due to loss of precision in\n// floating point computations.\nvar fovLimitEpsilon = 0.000001;\n\n\n/**\n * @interface RectilinearViewParams\n *\n * A camera configuration for a {@link RectilinearView}.\n *\n * @property {number} yaw The yaw angle, in the [-π, π] range.\n * When `yaw < 0`, the view rotates to the left.\n * When `yaw > 0`, the view rotates to the right.\n *\n * @property {number} pitch The pitch angle, in the [-π, π] range.\n * When `pitch < 0`, the view rotates downwards.\n * When `pitch > 0`, the view rotates upwards.\n *\n * @property {number} roll The roll angle, in the [-π, π] range.\n * When `roll < 0`, the view rotates clockwise.\n * When `roll > 0`, the view rotates counter-clockwise.\n *\n * @property {fov} fov The vertical field of view, in the [0, π] range.\n */\n\n\n/**\n * @interface RectilinearViewCoords\n *\n * The position of a point in a 360° image.\n *\n * @property {number} yaw The yaw angle, in the [-π, π] range.\n * @property {number} pitch The pitch angle, in the [-π, π] range.\n */\n\n\n/**\n * @typedef {function} RectilinearViewLimiter\n *\n * View limiter for a {@link RectilinearView}.\n *\n * A view limiter is a function that receives a {@link RectilinearViewParams}\n * object, optionally modifies it in place, and returns it. It can be used to\n * enforce constraints on the view parameters.\n *\n * See {@link RectilinearView.limit} for commonly used limiters. They may be\n * composed together or with user-defined limiters with {@link util.compose}.\n *\n * @param {RectilinearViewParams} params\n * @return {RectilinearViewParams}\n */\n\n/**\n * @class RectilinearView\n * @implements View\n * @classdesc\n *\n * A {@link View} implementing a rectilinear projection for 360° images.\n *\n * @param {RectilinearViewParams=} params The initial view parameters. If\n * unspecified, defaults to `{yaw: 0, pitch: 0, roll: 0, fov: Math.PI/4 }`.\n * @param {RectilinearViewLimiter=} limiter The view limiter. If unspecified,\n * no view limiting is applied. See {@link RectilinearView.limit} for\n * commonly used limiters.\n */\nfunction RectilinearView(params, limiter) {\n // The initial values for the view parameters.\n this._yaw = params && params.yaw != null ? params.yaw : defaultYaw;\n this._pitch = params && params.pitch != null ? params.pitch : defaultPitch;\n this._roll = params && params.roll != null ? params.roll : defaultRoll;\n this._fov = params && params.fov != null ? params.fov : defaultFov;\n this._width = params && params.width != null ?\n params.width : defaultWidth;\n this._height = params && params.height != null ?\n params.height : defaultHeight;\n this._projectionCenterX = params && params.projectionCenterX != null ?\n params.projectionCenterX : defaultProjectionCenterX;\n this._projectionCenterY = params && params.projectionCenterY != null ?\n params.projectionCenterY : defaultProjectionCenterY;\n\n // The initial value for the view limiter.\n this._limiter = limiter || null;\n\n // The last calculated projection matrix and its inverse.\n this._projMatrix = mat4.create();\n this._invProjMatrix = mat4.create();\n\n // The last calculated view frustum.\n this._frustum = [\n vec4.create(), // left\n vec4.create(), // right\n vec4.create(), // bottom\n vec4.create(), // top\n vec4.create() // camera\n ];\n\n // Whether the projection matrices and the view frustum need to be updated.\n this._projectionChanged = true;\n\n // Temporary variables used for calculations.\n this._params = {};\n this._fovs = {};\n this._tmpVec = vec4.create();\n\n // Force view limiting on initial parameters.\n this._update();\n}\n\neventEmitter(RectilinearView);\n\n\n/**\n * Destructor.\n */\nRectilinearView.prototype.destroy = function() {\n clearOwnProperties(this);\n};\n\n\n/**\n * Get the yaw angle.\n * @return {number}\n */\nRectilinearView.prototype.yaw = function() {\n return this._yaw;\n};\n\n\n/**\n * Get the pitch angle.\n * @return {number}\n */\nRectilinearView.prototype.pitch = function() {\n return this._pitch;\n};\n\n\n/**\n * Get the roll angle.\n * @return {number}\n */\nRectilinearView.prototype.roll = function() {\n return this._roll;\n};\n\n\nRectilinearView.prototype.projectionCenterX = function() {\n return this._projectionCenterX;\n};\n\n\nRectilinearView.prototype.projectionCenterY = function() {\n return this._projectionCenterY;\n};\n\n\n/**\n * Get the fov value.\n * @return {number}\n */\nRectilinearView.prototype.fov = function() {\n return this._fov;\n};\n\n\n/**\n * Get the viewport width.\n * @return {number}\n */\nRectilinearView.prototype.width = function() {\n return this._width;\n};\n\n\n/**\n * Get the viewport height.\n * @return {number}\n */\nRectilinearView.prototype.height = function() {\n return this._height;\n};\n\n\n/**\n * Get the viewport dimensions. If an argument is supplied, it is filled in with\n * the result and returned. Otherwise, a fresh object is filled in and returned.\n * @param {Size=} size\n * @return {Size}\n */\nRectilinearView.prototype.size = function(size) {\n size = size || {};\n size.width = this._width;\n size.height = this._height;\n return size;\n};\n\n\n/**\n * Get the view parameters. If an argument is supplied, it is filled in with the\n * result and returned. Otherwise, a fresh object is filled in and returned.\n * @param {RectilinearViewParams=} obj\n * @return {RectilinearViewParams}\n */\nRectilinearView.prototype.parameters = function(params) {\n params = params || {};\n params.yaw = this._yaw;\n params.pitch = this._pitch;\n params.roll = this._roll;\n params.fov = this._fov;\n return params;\n};\n\n\n/**\n * Get the view limiter, or null if unset.\n * @return {?RectilinearViewLimiter}\n */\nRectilinearView.prototype.limiter = function() {\n return this._limiter;\n};\n\n\n/**\n * Set the yaw angle.\n * @param {number} yaw\n */\nRectilinearView.prototype.setYaw = function(yaw) {\n this._resetParams();\n this._params.yaw = yaw;\n this._update(this._params);\n};\n\n\n/**\n * Set the pitch angle.\n * @param {number} pitch\n */\nRectilinearView.prototype.setPitch = function(pitch) {\n this._resetParams();\n this._params.pitch = pitch;\n this._update(this._params);\n};\n\n\n/**\n * Set the roll angle.\n * @param {number} roll\n */\nRectilinearView.prototype.setRoll = function(roll) {\n this._resetParams();\n this._params.roll = roll;\n this._update(this._params);\n};\n\n\n/**\n * Set the fov value.\n * @param {number} fov\n */\nRectilinearView.prototype.setFov = function(fov) {\n this._resetParams();\n this._params.fov = fov;\n this._update(this._params);\n};\n\n\nRectilinearView.prototype.setProjectionCenterX = function(projectionCenterX) {\n this._resetParams();\n this._params.projectionCenterX = projectionCenterX;\n this._update(this._params);\n};\n\n\nRectilinearView.prototype.setProjectionCenterY = function(projectionCenterY) {\n this._resetParams();\n this._params.projectionCenterY = projectionCenterY;\n this._update(this._params);\n};\n\n\n/**\n * Add yawOffset to the current yaw value.\n * @param {number} yawOffset\n */\nRectilinearView.prototype.offsetYaw = function(yawOffset) {\n this.setYaw(this._yaw + yawOffset);\n};\n\n\n/**\n * Add pitchOffset to the current pitch value.\n * @param {number} pitchOffset\n */\nRectilinearView.prototype.offsetPitch = function(pitchOffset) {\n this.setPitch(this._pitch + pitchOffset);\n};\n\n\n/**\n * Add rollOffset to the current roll value.\n * @param {number} rollOffset\n */\nRectilinearView.prototype.offsetRoll = function(rollOffset) {\n this.setRoll(this._roll + rollOffset);\n};\n\n\n/**\n * Add fovOffset to the current fov value.\n * @param {number} fovOffset\n */\nRectilinearView.prototype.offsetFov = function(fovOffset) {\n this.setFov(this._fov + fovOffset);\n};\n\n\n/**\n * Set the viewport dimensions.\n * @param {Size} size\n */\nRectilinearView.prototype.setSize = function(size) {\n this._resetParams();\n this._params.width = size.width;\n this._params.height = size.height;\n this._update(this._params);\n};\n\n\n/**\n * Set the view parameters. Unspecified parameters are left unchanged.\n * @param {RectilinearViewParameters} params\n */\nRectilinearView.prototype.setParameters = function(params) {\n this._resetParams();\n this._params.yaw = params.yaw;\n this._params.pitch = params.pitch;\n this._params.roll = params.roll;\n this._params.fov = params.fov;\n this._params.projectionCenterX = params.projectionCenterX;\n this._params.projectionCenterY = params.projectionCenterY;\n this._update(this._params);\n};\n\n\n/**\n * Set the view limiter.\n * @param {?RectilinearViewLimiter} limiter The new limiter, or null to unset.\n */\nRectilinearView.prototype.setLimiter = function(limiter) {\n this._limiter = limiter || null;\n this._update();\n};\n\n\nRectilinearView.prototype._resetParams = function() {\n var params = this._params;\n params.yaw = null;\n params.pitch = null;\n params.roll = null;\n params.fov = null;\n params.width = null;\n params.height = null;\n};\n\n\nRectilinearView.prototype._update = function(params) {\n\n // Avoid object allocation when no parameters are supplied.\n if (params == null) {\n this._resetParams();\n params = this._params;\n }\n\n // Save old parameters for later comparison.\n var oldYaw = this._yaw;\n var oldPitch = this._pitch;\n var oldRoll = this._roll;\n var oldFov = this._fov;\n var oldProjectionCenterX = this._projectionCenterX;\n var oldProjectionCenterY = this._projectionCenterY;\n var oldWidth = this._width;\n var oldHeight = this._height;\n\n // Fill in object with the new set of parameters to pass into the limiter.\n params.yaw = params.yaw != null ? params.yaw : oldYaw;\n params.pitch = params.pitch != null ? params.pitch : oldPitch;\n params.roll = params.roll != null ? params.roll : oldRoll;\n params.fov = params.fov != null ? params.fov : oldFov;\n params.width = params.width != null ? params.width : oldWidth;\n params.height = params.height != null ? params.height : oldHeight;\n params.projectionCenterX = params.projectionCenterX != null ?\n params.projectionCenterX : oldProjectionCenterX;\n params.projectionCenterY = params.projectionCenterY != null ?\n params.projectionCenterY : oldProjectionCenterY;\n\n // Apply view limiting when defined.\n if (this._limiter) {\n params = this._limiter(params);\n if (!params) {\n throw new Error('Bad view limiter');\n }\n }\n\n // Normalize parameters.\n params = this._normalize(params);\n\n // Grab the limited parameters.\n var newYaw = params.yaw;\n var newPitch = params.pitch;\n var newRoll = params.roll;\n var newFov = params.fov;\n var newWidth = params.width;\n var newHeight = params.height;\n var newProjectionCenterX = params.projectionCenterX;\n var newProjectionCenterY = params.projectionCenterY;\n\n // Consistency check.\n if (!real(newYaw) || !real(newPitch) || !real(newRoll) ||\n !real(newFov) || !real(newWidth) || !real(newHeight) ||\n !real(newProjectionCenterX) || !real(newProjectionCenterY)) {\n throw new Error('Bad view - suspect a broken limiter');\n }\n\n // Update parameters.\n this._yaw = newYaw;\n this._pitch = newPitch;\n this._roll = newRoll;\n this._fov = newFov;\n this._width = newWidth;\n this._height = newHeight;\n this._projectionCenterX = newProjectionCenterX;\n this._projectionCenterY = newProjectionCenterY;\n\n // Check whether the parameters changed and emit the corresponding events.\n if (newYaw !== oldYaw || newPitch !== oldPitch || newRoll !== oldRoll ||\n newFov !== oldFov || newWidth !== oldWidth || newHeight !== oldHeight ||\n newProjectionCenterX !== oldProjectionCenterX ||\n newProjectionCenterY !== oldProjectionCenterY) {\n this._projectionChanged = true;\n this.emit('change');\n }\n if (newWidth !== oldWidth || newHeight !== oldHeight) {\n this.emit('resize');\n }\n\n};\n\n\nRectilinearView.prototype._normalize = function(params) {\n\n this._normalizeCoordinates(params);\n\n // Make sure that neither the horizontal nor the vertical fields of view\n // exceed π - fovLimitEpsilon.\n var hfovPi = convertFov.htov(Math.PI, params.width, params.height);\n var maxFov = isNaN(hfovPi) ? Math.PI : Math.min(Math.PI, hfovPi);\n params.fov = clamp(params.fov, fovLimitEpsilon, maxFov - fovLimitEpsilon);\n\n return params;\n};\n\n\nRectilinearView.prototype._normalizeCoordinates = function(params) {\n // Constrain yaw, pitch and roll to the [-π, π] interval.\n if ('yaw' in params) {\n params.yaw = mod(params.yaw - Math.PI, -2*Math.PI) + Math.PI;\n }\n if ('pitch' in params) {\n params.pitch = mod(params.pitch - Math.PI, -2*Math.PI) + Math.PI;\n }\n if ('roll' in params) {\n params.roll = mod(params.roll - Math.PI, -2*Math.PI) + Math.PI;\n }\n return params;\n};\n\n\n/**\n * Normalize view coordinates so that they are the closest to the current view.\n * Useful for tweening the view through the shortest path. If a result argument\n * is supplied, it is filled in with the result and returned. Otherwise, a fresh\n * object is filled in and returned.\n *\n * @param {RectilinearViewCoords} coords The view coordinates.\n * @param {RectilinearViewCoords} result The result argument for the normalized\n * view coordinates.\n */\nRectilinearView.prototype.normalizeToClosest = function(coords, result) {\n\n var viewYaw = this._yaw;\n var viewPitch = this._pitch;\n\n var coordYaw = coords.yaw;\n var coordPitch = coords.pitch;\n\n // Check if the yaw is closer after subtracting or adding a full circle.\n var prevYaw = coordYaw - 2*Math.PI;\n var nextYaw = coordYaw + 2*Math.PI;\n if (Math.abs(prevYaw - viewYaw) < Math.abs(coordYaw - viewYaw)) {\n coordYaw = prevYaw;\n }\n else if (Math.abs(nextYaw - viewYaw) < Math.abs(coordYaw - viewYaw)) {\n coordYaw = nextYaw;\n }\n\n // Check if the pitch is closer after subtracting or adding a full circle.\n var prevPitch = coordPitch - 2*Math.PI;\n var nextPitch = coordPitch + 2*Math.PI;\n if (Math.abs(prevPitch - viewPitch) < Math.abs(coordPitch - viewPitch)) {\n coordPitch = prevPitch;\n }\n else if (Math.abs(prevPitch - viewPitch) < Math.abs(coordPitch - viewPitch)) {\n coordPitch = nextPitch;\n }\n\n result = result || {};\n result.yaw = coordYaw;\n result.pitch = coordPitch;\n return result;\n\n};\n\n\nRectilinearView.prototype.updateWithControlParameters = function(parameters) {\n // axisScaledX and axisScaledY are scaled according to their own axis\n // x and y are scaled by the same value\n\n // If the viewport dimensions are zero, assume a square viewport\n // when converting from hfov to vfov.\n var vfov = this._fov;\n var hfov = convertFov.vtoh(vfov, this._width, this._height);\n if (isNaN(hfov)) {\n hfov = vfov;\n }\n\n // TODO: revisit this after we rethink the control parameters.\n this.offsetYaw(parameters.axisScaledX * hfov + parameters.x * 2 * hfov + parameters.yaw);\n this.offsetPitch(parameters.axisScaledY * vfov + parameters.y * 2 * hfov + parameters.pitch);\n this.offsetRoll(-parameters.roll);\n this.offsetFov(parameters.zoom * vfov);\n};\n\n\nRectilinearView.prototype._updateProjection = function() {\n var projMatrix = this._projMatrix;\n var invProjMatrix = this._invProjMatrix;\n var frustum = this._frustum;\n\n if (this._projectionChanged) {\n var width = this._width;\n var height = this._height;\n\n var vfov = this._fov;\n var hfov = convertFov.vtoh(vfov, width, height);\n var aspect = width / height;\n\n var projectionCenterX = this._projectionCenterX;\n var projectionCenterY = this._projectionCenterY;\n\n if (projectionCenterX !== 0 || projectionCenterY !== 0) {\n var offsetAngleX = Math.atan(projectionCenterX * 2 * Math.tan(hfov/2));\n var offsetAngleY = Math.atan(projectionCenterY * 2 * Math.tan(vfov/2));\n var fovs = this._fovs;\n fovs.leftDegrees = (hfov/2 + offsetAngleX) * 180/Math.PI;\n fovs.rightDegrees = (hfov/2 - offsetAngleX) * 180/Math.PI;\n fovs.upDegrees = (vfov/2 + offsetAngleY) * 180/Math.PI;\n fovs.downDegrees = (vfov/2 - offsetAngleY) * 180/Math.PI;\n mat4.perspectiveFromFieldOfView(projMatrix, fovs, -1, 1);\n } else {\n mat4.perspective(projMatrix, vfov, aspect, -1, 1);\n }\n\n mat4.rotateZ(projMatrix, projMatrix, this._roll);\n mat4.rotateX(projMatrix, projMatrix, this._pitch);\n mat4.rotateY(projMatrix, projMatrix, this._yaw);\n\n mat4.invert(invProjMatrix, projMatrix);\n\n this._matrixToFrustum(projMatrix, frustum);\n\n this._projectionChanged = false;\n }\n};\n\n\nRectilinearView.prototype._matrixToFrustum = function(p, f) {\n // Extract frustum planes from projection matrix.\n // http://www8.cs.umu.se/kurser/5DV051/HT12/lab/plane_extraction.pdf\n vec4.set(f[0], p[3] + p[0], p[7] + p[4], p[11] + p[8], 0); // left\n vec4.set(f[1], p[3] - p[0], p[7] - p[4], p[11] - p[8], 0); // right\n vec4.set(f[2], p[3] + p[1], p[7] + p[5], p[11] + p[9], 0); // top\n vec4.set(f[3], p[3] - p[1], p[7] - p[5], p[11] - p[9], 0); // bottom\n vec4.set(f[4], p[3] + p[2], p[7] + p[6], p[11] + p[10], 0); // camera\n};\n\n\n/**\n * Returns the projection matrix for the current view.\n * @returns {mat4}\n */\nRectilinearView.prototype.projection = function() {\n this._updateProjection();\n return this._projMatrix;\n};\n\n\n/**\n * Returns the inverse projection matrix for the current view.\n * @returns {mat4}\n */\nRectilinearView.prototype.inverseProjection = function() {\n this._updateProjection();\n return this._invProjMatrix;\n};\n\n\n/**\n * Return whether the view frustum intersects the given rectangle.\n *\n * This function may return false positives, but never false negatives.\n * It is used for frustum culling, i.e., excluding invisible tiles from the\n * rendering process.\n *\n * @param {vec2[]} rectangle The vertices of the rectangle.\n */\nRectilinearView.prototype.intersects = function(rectangle) {\n this._updateProjection();\n\n var frustum = this._frustum;\n var vertex = this._tmpVec;\n\n // Check whether the rectangle is on the outer side of any of the frustum\n // planes. This is a sufficient condition, though not necessary, for the\n // rectangle to be completely outside the frustum.\n for (var i = 0; i < frustum.length; i++) {\n var plane = frustum[i];\n var inside = false;\n for (var j = 0; j < rectangle.length; j++) {\n var corner = rectangle[j];\n vec4.set(vertex, corner[0], corner[1], corner[2], 0);\n if (vec4.dot(plane, vertex) >= 0) {\n inside = true;\n }\n }\n if (!inside) {\n return false;\n }\n }\n return true;\n};\n\n\n/**\n * Select the level that should be used to render the view.\n * @param {Level[]} levelList the list of levels from which to select.\n * @return {Level} the selected level.\n */\nRectilinearView.prototype.selectLevel = function(levelList) {\n\n // Multiply the viewport width by the device pixel ratio to get the required\n // horizontal resolution in pixels.\n //\n // Calculate the fraction of a cube face that would be visible given the\n // current vertical field of view. Then, for each level, multiply by the\n // level height to get the height in pixels of the portion that would be\n // visible.\n //\n // Search for the smallest level that satifies the the required height,\n // falling back on the largest level if none do.\n\n var requiredPixels = pixelRatio() * this._height;\n var coverFactor = Math.tan(0.5 * this._fov);\n\n for (var i = 0; i < levelList.length; i++) {\n var level = levelList[i];\n if (coverFactor * level.height() >= requiredPixels) {\n return level;\n }\n }\n\n return levelList[levelList.length - 1];\n\n};\n\n\n/**\n * Convert view parameters into screen position. If a result argument is\n * provided, it is filled in and returned. Otherwise, a fresh object is filled\n * in and returned.\n *\n * @param {RectilinearViewCoords} coords The view coordinates.\n * @param {Coords=} result The result argument for the screen coordinates.\n * @return {Coords}\n */\nRectilinearView.prototype.coordinatesToScreen = function(coords, result) {\n var ray = this._tmpVec;\n\n if (!result) {\n result = {};\n }\n\n var width = this._width;\n var height = this._height;\n\n // Undefined on a null viewport.\n if (width <= 0 || height <= 0) {\n result.x = null;\n result.y = null;\n return null;\n }\n\n // Compute view ray pointing into the (yaw, pitch) direction.\n var yaw = coords.yaw;\n var pitch = coords.pitch;\n var x = Math.sin(yaw) * Math.cos(pitch);\n var y = -Math.sin(coords.pitch);\n var z = -Math.cos(yaw) * Math.cos(pitch);\n vec4.set(ray, x, y, z, 1);\n\n // Project view ray onto clip space.\n vec4.transformMat4(ray, ray, this.projection());\n\n // w in clip space equals -z in camera space.\n if (ray[3] >= 0) {\n // Point is in front of camera.\n // Convert to viewport coordinates.\n result.x = width * (ray[0] / ray[3] + 1) / 2;\n result.y = height * (1 - ray[1] / ray[3]) / 2;\n } else {\n // Point is behind camera.\n result.x = null;\n result.y = null;\n return null;\n }\n\n return result;\n};\n\n\n/**\n * Convert screen coordinates into view coordinates. If a result argument is\n * provided, it is filled in with the result and returned. Otherwise, a fresh\n * object is filled in and returned.\n *\n * @param {Coords} coords The screen coordinates.\n * @param {RectilinearViewCoords=} result The view coordinates.\n * @return {RectilinearViewCoords}\n */\nRectilinearView.prototype.screenToCoordinates = function(coords, result) {\n var ray = this._tmpVec;\n\n if (!result) {\n result = {};\n }\n\n var width = this._width;\n var height = this._height;\n\n // Convert viewport coordinates to clip space.\n var vecx = 2 * coords.x / width - 1;\n var vecy = 1 - 2 * coords.y / height;\n vec4.set(ray, vecx, vecy, 1, 1);\n\n // Project back to world space.\n vec4.transformMat4(ray, ray, this.inverseProjection());\n\n // Convert to spherical coordinates.\n var r = Math.sqrt(ray[0] * ray[0] + ray[1] * ray[1] + ray[2] * ray[2]);\n result.yaw = Math.atan2(ray[0], -ray[2]);\n result.pitch = Math.acos(ray[1] / r) - Math.PI/2;\n\n this._normalizeCoordinates(result);\n\n return result;\n};\n\n\n/**\n * Calculate the perspective transform required to position an element with\n * perspective.\n *\n * @param {RectilinearViewCoords} coords The view coordinates.\n * @param {number} radius Radius of the sphere embedding the element.\n * @param {string} extraTransforms Extra transformations to be applied after\n * the element is positioned. This may be used to rotate the element.\n * @return {string} The CSS 3D transform to be applied to the element.\n */\nRectilinearView.prototype.coordinatesToPerspectiveTransform = function(\n coords, radius, extraTransforms) {\n extraTransforms = extraTransforms || \"\";\n\n var height = this._height;\n var width = this._width;\n var fov = this._fov;\n var perspective = 0.5 * height / Math.tan(fov / 2);\n\n var transform = '';\n\n // Center hotspot in screen.\n transform += 'translateX(' + decimal(width/2) + 'px) ';\n transform += 'translateY(' + decimal(height/2) + 'px) ';\n transform += 'translateX(-50%) translateY(-50%) ';\n\n // Set the perspective depth.\n transform += 'perspective(' + decimal(perspective) + 'px) ';\n transform += 'translateZ(' + decimal(perspective) + 'px) ';\n\n // Set the camera rotation.\n transform += 'rotateZ(' + decimal(-this._roll) + 'rad) ';\n transform += 'rotateX(' + decimal(-this._pitch) + 'rad) ';\n transform += 'rotateY(' + decimal(this._yaw) + 'rad) ';\n\n // Set the hotspot rotation.\n transform += 'rotateY(' + decimal(-coords.yaw) + 'rad) ';\n transform += 'rotateX(' + decimal(coords.pitch) + 'rad) ';\n\n // Move back to sphere.\n transform += 'translateZ(' + decimal(-radius) + 'px) ';\n\n // Apply the extra transformations\n transform += extraTransforms + ' ';\n\n return transform;\n};\n\n\n/**\n * Factory functions for view limiters. See {@link RectilinearViewLimiter}.\n * @namespace\n */\nRectilinearView.limit = {\n\n /**\n * Returns a view limiter that constrains the yaw angle.\n * @param {number} min The minimum yaw value.\n * @param {number} max The maximum yaw value.\n * @return {RectilinearViewLimiter}\n */\n yaw: function(min, max) {\n return function limitYaw(params) {\n params.yaw = clamp(params.yaw, min, max);\n return params;\n };\n },\n\n /**\n * Returns a view limiter that constrains the pitch angle.\n * @param {number} min The minimum pitch value.\n * @param {number} max The maximum pitch value.\n * @return {RectilinearViewLimiter}\n */\n pitch: function(min, max) {\n return function limitPitch(params) {\n params.pitch = clamp(params.pitch, min, max);\n return params;\n };\n },\n\n /**\n * Returns a view limiter that constrains the roll angle.\n * @param {number} min The minimum roll value.\n * @param {number} max The maximum roll value.\n * @return {RectilinearViewLimiter}\n */\n roll: function(min, max) {\n return function limitRoll(params) {\n params.roll = clamp(params.roll, min, max);\n return params;\n };\n },\n\n /**\n * Returns a view limiter that constrains the horizontal field of view.\n * @param {number} min The minimum horizontal field of view.\n * @param {number} max The maximum horizontal field of view.\n * @return {RectilinearViewLimiter}\n */\n hfov: function(min, max) {\n return function limitHfov(params) {\n var width = params.width;\n var height = params.height;\n if (width > 0 && height > 0) {\n var vmin = convertFov.htov(min, width, height);\n var vmax = convertFov.htov(max, width, height);\n params.fov = clamp(params.fov, vmin, vmax);\n }\n return params;\n };\n },\n\n /**\n * Returns a view limiter that constrains the vertical field of view.\n * @param {number} min The minimum vertical field of view.\n * @param {number} max The maximum vertical field of view.\n * @return {RectilinearViewLimiter}\n */\n vfov: function(min, max) {\n return function limitVfov(params) {\n params.fov = clamp(params.fov, min, max);\n return params;\n };\n },\n\n /**\n * Returns a view limiter that prevents zooming in beyond the given\n * resolution.\n * @param {number} size The cube face width in pixels or, equivalently, one\n * fourth of the equirectangular width in pixels.\n * @return {RectilinearViewLimiter}\n */\n resolution: function(size) {\n return function limitResolution(params) {\n var height = params.height;\n if (height) {\n var requiredPixels = pixelRatio() * height;\n var minFov = 2 * Math.atan(requiredPixels / size);\n params.fov = clamp(params.fov, minFov, Infinity);\n }\n return params;\n };\n },\n\n /**\n * Returns a view limiter that limits the horizontal and vertical field of\n * view, prevents zooming in past the image resolution, and limits the pitch\n * range to prevent the camera wrapping around at the poles. These are the\n * most common view constraints for a 360° panorama.\n * @param {number} maxResolution The cube face width in pixels or,\n * equivalently, one fourth of the equirectangular width in pixels.\n * @param {number} maxVFov The maximum vertical field of view.\n * @param {number} [maxHFov=maxVFov] The maximum horizontal field of view.\n * @return {RectilinearViewLimiter}\n */\n traditional: function(maxResolution, maxVFov, maxHFov) {\n maxHFov = maxHFov != null ? maxHFov : maxVFov;\n\n return compose(\n RectilinearView.limit.resolution(maxResolution),\n RectilinearView.limit.vfov(0, maxVFov),\n RectilinearView.limit.hfov(0, maxHFov),\n RectilinearView.limit.pitch(-Math.PI/2, Math.PI/2));\n }\n\n};\n\n\nRectilinearView.type = RectilinearView.prototype.type = 'rectilinear';\n\n\nmodule.exports = RectilinearView;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\n/**\n * Convert fov\n *\n * For example, to convert from hfov to vfov one would call \n * `convert(hfov, width, height)`\n *\n * @param {number} fov\n * @param {number} fromDimension\n * @param {number} toDimension\n * @return {number}\n * @memberof util.convertFov\n */\nfunction convert(fov, fromDimension, toDimension) {\n return 2 * Math.atan(toDimension * Math.tan(fov / 2) / fromDimension);\n}\n\n/**\n * @param {number} fov\n * @param {number} fromDimension\n * @param {number} toDimension\n * @return {number}\n * @memberof util.convertFov\n */\nfunction htov(fov, width, height) {\n return convert(fov, width, height);\n}\n\n/**\n * @param {number} fov\n * @param {number} fromDimension\n * @param {number} toDimension\n * @return {number}\n * @memberof util.convertFov\n */\nfunction htod(fov, width, height) {\n return convert(fov, width, Math.sqrt(width * width + height * height));\n}\n\n/**\n * @param {number} fov\n * @param {number} fromDimension\n * @param {number} toDimension\n * @return {number}\n * @memberof util.convertFov\n */\nfunction vtoh(fov, width, height) {\n return convert(fov, height, width);\n}\n\n/**\n * @param {number} fov\n * @param {number} fromDimension\n * @param {number} toDimension\n * @return {number}\n * @memberof util.convertFov\n */\nfunction vtod(fov, width, height) {\n return convert(fov, height, Math.sqrt(width * width + height * height));\n}\n\n/**\n * @param {number} fov\n * @param {number} fromDimension\n * @param {number} toDimension\n * @return {number}\n * @memberof util.convertFov\n */\nfunction dtoh(fov, width, height) {\n return convert(fov, Math.sqrt(width * width + height * height), width);\n}\n\n/**\n * @param {number} fov\n * @param {number} fromDimension\n * @param {number} toDimension\n * @return {number}\n * @memberof util.convertFov\n */\nfunction dtov(fov, width, height) {\n return convert(fov, Math.sqrt(width * width + height * height), height);\n}\n\n/**\n * @namespace util.convertFov\n */\nmodule.exports = {\n convert: convert,\n htov: htov,\n htod: htod,\n vtoh: vtoh,\n vtod: vtod,\n dtoh: dtoh,\n dtov: dtov\n};\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nfunction real(x) {\n return typeof x === 'number' && isFinite(x);\n}\n\nmodule.exports = real;","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\n/**\n * Compose multiple functions\n *\n * `compose(f, g)` returns `function(x) { return f(g(x)); }`\n *\n * @memberof util\n * @param {Function[]} functions The functions to compose\n * @return {Function}\n */\nfunction compose() {\n var fnList = arguments;\n return function composed(initialArg) {\n var ret = initialArg;\n for (var i = 0; i < fnList.length; i++) {\n var fn = fnList[i];\n ret = fn.call(null, ret);\n }\n return ret;\n };\n}\n\nmodule.exports = compose;","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar eventEmitter = require('minimal-event-emitter');\nvar mat4 = require('gl-matrix').mat4;\nvar vec4 = require('gl-matrix').vec4;\nvar pixelRatio = require('../util/pixelRatio');\nvar real = require('../util/real');\nvar clamp = require('../util/clamp');\nvar clearOwnProperties = require('../util/clearOwnProperties');\n\n// Default viewport dimensions.\n// Start with zero to ensure that those values are handled correctly.\nvar defaultWidth = 0;\nvar defaultHeight = 0;\n\n// Default view parameters.\nvar defaultX = 0.5;\nvar defaultY = 0.5;\nvar defaultZoom = 1;\n\n// Constant values used to simplify the frustum culling logic.\n// planeAxes[i] indicates the coordinate value that defines a frustum plane.\n// planeCmp[i] indicates how point and plane coordinates should be compared\n// to determine whether the point is on the outer side of the plane.\nvar planeAxes = [\n 1, // top\n 0, // right\n 1, // bottom\n 0 // left\n];\nvar planeCmp = [\n -1, // top\n -1, // right\n 1, // bottom\n 1 // left\n];\n\n// A zoom of exactly 0 breaks some computations, so we force a minimum positive\n// value. We use 6 decimal places for the epsilon value to avoid broken\n// rendering due to loss of precision in floating point computations.\nvar zoomLimitEpsilon = 0.000001;\n\n\n/**\n * @interface FlatViewParams\n *\n * A camera configuration for a {@link FlatView}.\n *\n * @property {number} x The horizontal coordinate of the image point displayed\n * at the viewport center, in the [0, 1] range.\n * When `x === 0.5`, the image is centered horizontally.\n * When `x === 0`, the left edge of the image is at the viewport center.\n * When `x === 1`, the right edge of the image is at the viewport center.\n * @property {number} y The vertical coordinate of the image point displayed at\n * the viewport center, in the [0, 1] range.\n * When `y === 0.5`, the image is centered vertically.\n * When `y === 0`, the top edge of the image is at the viewport center.\n * When `y === 1`, the bottom edge of the image is at the viewport center.\n * @property {number} zoom The horizontal zoom, in the [0, ∞) range.\n * When `zoom === 1`, the viewport is as wide as the image.\n * When `zoom < 1`, the image is zoomed in.\n * When `zoom > 1`, the image is zoomed out.\n * @property {number} mediaAspectRatio The image aspect ratio.\n * When `mediaAspectRatio === 1`, the image width equals its height.\n * When `mediaAspectRatio < 1`, the image width is less than its height.\n * When `mediaAspectRatio > 1`, the image height is less than its width.\n */\n\n\n/**\n * @interface FlatViewCoords\n *\n * The position of a point in a flat image.\n *\n * @property {number} x The horizontal coordinate, in the [0, 1] range.\n * @property {number} y The vertical coordinate, in the [0, 1] range.\n */\n\n\n/**\n * @typedef {function} FlatViewLimiter\n *\n * View limiter for a {@link FlatView}.\n *\n * A view limiter is a function that receives a {@link FlatViewParams} object,\n * optionally modifies it in place, and returns it. It can be used to enforce\n * constraints on the view parameters.\n *\n * See {@link FlatView.limit} for commonly used limiters. They may be composed\n * together or with user-defined limiters with {@link util.compose}.\n *\n * @param {FlatViewParams} params\n * @return {FlatViewParams}\n */\n\n\n/**\n * @class FlatView\n * @implements View\n * @classdesc\n *\n * A {@link View} implementing an orthogonal projection for flat images.\n *\n * @param {FlatViewParams} params The initial view parameters. The\n * `mediaAspectRatio` parameter must always be set. The other parameters\n * default to `{x: 0.5, y: 0.5, z: 1 }` if unspecified.\n * @param {FlatViewLimiter=} limiter The view limiter. If unspecified, no view\n * limiting is applied. See {@link FlatView.limit} for commonly used\n * limiters.\n */\nfunction FlatView(params, limiter) {\n // Require an aspect ratio to be specified.\n if (!(params && params.mediaAspectRatio != null)) {\n throw new Error('mediaAspectRatio must be defined');\n }\n\n // The initial values for the view parameters.\n this._x = params && params.x != null ? params.x : defaultX;\n this._y = params && params.y != null ? params.y : defaultY;\n this._zoom = params && params.zoom != null ? params.zoom : defaultZoom;\n this._mediaAspectRatio = params.mediaAspectRatio;\n this._width = params && params.width != null ?\n params.width : defaultWidth;\n this._height = params && params.height != null ?\n params.height : defaultHeight;\n\n // The initial value for the view limiter.\n this._limiter = limiter || null;\n\n // The last calculated projection matrix and its inverse.\n this._projMatrix = mat4.create();\n this._invProjMatrix = mat4.create();\n\n // The last calculated view frustum.\n this._frustum = [\n 0, // top\n 0, // right\n 0, // bottom\n 0 // left\n ];\n\n // Whether the projection matrices and view frustum need to be updated.\n this._projectionChanged = true;\n\n // Temporary variables used for calculations.\n this._params = {};\n this._vec = vec4.create();\n\n // Force view limiting on initial parameters.\n this._update();\n}\n\neventEmitter(FlatView);\n\n\n/**\n * Destructor.\n */\nFlatView.prototype.destroy = function() {\n clearOwnProperties(this);\n};\n\n\n/**\n * Get the x parameter.\n * @return {number}\n */\nFlatView.prototype.x = function() {\n return this._x;\n};\n\n\n/**\n * Get the y parameter.\n * @return {number}\n */\nFlatView.prototype.y = function() {\n return this._y;\n};\n\n\n/**\n * Get the zoom value.\n * @return {number}\n */\nFlatView.prototype.zoom = function() {\n return this._zoom;\n};\n\n\n/**\n * Get the media aspect ratio.\n * @return {number}\n */\nFlatView.prototype.mediaAspectRatio = function() {\n return this._mediaAspectRatio;\n};\n\n\n/**\n * Get the viewport width.\n * @return {number}\n */\nFlatView.prototype.width = function() {\n return this._width;\n};\n\n\n/**\n * Get the viewport height.\n * @return {number}\n */\nFlatView.prototype.height = function() {\n return this._height;\n};\n\n\n/**\n * Get the viewport dimensions. If an argument is supplied, it is filled in with\n * the result and returned. Otherwise, a fresh object is filled in and returned.\n * @param {Size=} size\n * @return {Size}\n */\nFlatView.prototype.size = function(size) {\n size = size || {};\n size.width = this._width;\n size.height = this._height;\n return size;\n};\n\n\n/**\n * Get the view parameters. If an argument is supplied, it is filled in with the\n * result and returned. Otherwise, a fresh object is filled in and returned.\n * @param {FlatViewParams=} params\n * @return {FlatViewParams}\n */\nFlatView.prototype.parameters = function(params) {\n params = params || {};\n params.x = this._x;\n params.y = this._y;\n params.zoom = this._zoom;\n params.mediaAspectRatio = this._mediaAspectRatio;\n return params;\n};\n\n\n/**\n * Get the view limiter, or null if unset.\n * @return {?FlatViewLimiter}\n */\nFlatView.prototype.limiter = function() {\n return this._limiter;\n};\n\n\n/**\n * Set the x parameter.\n * @param {number} x\n */\nFlatView.prototype.setX = function(x) {\n this._resetParams();\n this._params.x = x;\n this._update(this._params);\n};\n\n\n/**\n * Set the y parameter.\n * @param {number} y\n */\nFlatView.prototype.setY = function(y) {\n this._resetParams();\n this._params.y = y;\n this._update(this._params);\n};\n\n\n/**\n * Set the zoom value.\n * @param {number} zoom\n */\nFlatView.prototype.setZoom = function(zoom) {\n this._resetParams();\n this._params.zoom = zoom;\n this._update(this._params);\n};\n\n\n/**\n * Add xOffset to the x parameter.\n * @param {number} xOffset\n */\nFlatView.prototype.offsetX = function(xOffset) {\n this.setX(this._x + xOffset);\n};\n\n\n/**\n * Add yOffset to the y parameter.\n * @param {number} yOffset\n */\nFlatView.prototype.offsetY = function(yOffset)\n{\n this.setY(this._y + yOffset);\n};\n\n\n/**\n * Add zoomOffset to the zoom value.\n * @param {number} zoomOffset\n */\nFlatView.prototype.offsetZoom = function(zoomOffset) {\n this.setZoom(this._zoom + zoomOffset);\n};\n\n\n/**\n * Set the media aspect ratio.\n * @param {number} mediaAspectRatio\n */\nFlatView.prototype.setMediaAspectRatio = function(mediaAspectRatio) {\n this._resetParams();\n this._params.mediaAspectRatio = mediaAspectRatio;\n this._update(this._params);\n};\n\n\n/**\n * Set the viewport dimensions.\n * @param {Size} size\n */\nFlatView.prototype.setSize = function(size) {\n this._resetParams();\n this._params.width = size.width;\n this._params.height = size.height;\n this._update(this._params);\n};\n\n\n/**\n * Set the view parameters. Unspecified parameters are left unchanged.\n * @param {FlatViewParameters} params\n */\nFlatView.prototype.setParameters = function(params) {\n this._resetParams();\n this._params.x = params.x;\n this._params.y = params.y;\n this._params.zoom = params.zoom;\n this._params.mediaAspectRatio = params.mediaAspectRatio;\n this._update(this._params);\n};\n\n\n/**\n * Set the view limiter.\n * @param {?FlatViewLimiter} limiter The new limiter, or null to unset.\n */\nFlatView.prototype.setLimiter = function(limiter) {\n this._limiter = limiter || null;\n this._update();\n};\n\n\nFlatView.prototype._resetParams = function() {\n var params = this._params;\n params.x = null;\n params.y = null;\n params.zoom = null;\n params.mediaAspectRatio = null;\n params.width = null;\n params.height = null;\n};\n\n\nFlatView.prototype._update = function(params) {\n\n // Avoid object allocation when no parameters are supplied.\n if (params == null) {\n this._resetParams();\n params = this._params;\n }\n\n // Save old parameters for later comparison.\n var oldX = this._x;\n var oldY = this._y;\n var oldZoom = this._zoom;\n var oldMediaAspectRatio = this._mediaAspectRatio;\n var oldWidth = this._width;\n var oldHeight = this._height;\n\n // Fill in object with the new set of parameters to pass into the limiter.\n params.x = params.x != null ? params.x : oldX;\n params.y = params.y != null ? params.y : oldY;\n params.zoom = params.zoom != null ? params.zoom : oldZoom;\n params.mediaAspectRatio = params.mediaAspectRatio != null ?\n params.mediaAspectRatio : oldMediaAspectRatio;\n params.width = params.width != null ? params.width : oldWidth;\n params.height = params.height != null ? params.height : oldHeight;\n\n // Apply view limiting when defined.\n if (this._limiter) {\n params = this._limiter(params);\n if (!params) {\n throw new Error('Bad view limiter');\n }\n }\n\n // Grab the limited parameters.\n var newX = params.x;\n var newY = params.y;\n var newZoom = params.zoom;\n var newMediaAspectRatio = params.mediaAspectRatio;\n var newWidth = params.width;\n var newHeight = params.height;\n\n // Consistency check.\n if (!real(newX) || !real(newY) || !real(newZoom) ||\n !real(newMediaAspectRatio) || !real(newWidth) || !real(newHeight)) {\n throw new Error('Bad view - suspect a broken limiter');\n }\n\n // Constrain zoom.\n newZoom = clamp(newZoom, zoomLimitEpsilon, Infinity);\n\n // Update parameters.\n this._x = newX;\n this._y = newY;\n this._zoom = newZoom;\n this._mediaAspectRatio = newMediaAspectRatio;\n this._width = newWidth;\n this._height = newHeight;\n\n // Check whether the parameters changed and emit the corresponding events.\n if (newX !== oldX || newY !== oldY || newZoom !== oldZoom ||\n newMediaAspectRatio !== oldMediaAspectRatio ||\n newWidth !== oldWidth || newHeight !== oldHeight) {\n this._projectionChanged = true;\n this.emit('change');\n }\n if (newWidth !== oldWidth || newHeight !== oldHeight) {\n this.emit('resize');\n }\n\n};\n\n\nFlatView.prototype._zoomX = function() {\n return this._zoom;\n};\n\n\nFlatView.prototype._zoomY = function() {\n var mediaAspectRatio = this._mediaAspectRatio;\n var aspect = this._width / this._height;\n var zoomX = this._zoom;\n var zoomY = zoomX * mediaAspectRatio / aspect;\n if (isNaN(zoomY)) {\n zoomY = zoomX;\n }\n return zoomY;\n};\n\n\nFlatView.prototype.updateWithControlParameters = function(parameters) {\n var scale = this.zoom();\n var zoomX = this._zoomX();\n var zoomY = this._zoomY();\n\n // TODO: should the scale be the same for both axes?\n this.offsetX(parameters.axisScaledX * zoomX + parameters.x * scale);\n this.offsetY(parameters.axisScaledY * zoomY + parameters.y * scale);\n this.offsetZoom(parameters.zoom * scale);\n};\n\n\nFlatView.prototype._updateProjection = function() {\n var projMatrix = this._projMatrix;\n var invProjMatrix = this._invProjMatrix;\n var frustum = this._frustum;\n\n // Recalculate projection matrix when required.\n if (this._projectionChanged) {\n var x = this._x;\n var y = this._y;\n var zoomX = this._zoomX();\n var zoomY = this._zoomY();\n\n // Recalculate view frustum.\n var top = frustum[0] = (0.5 - y) + 0.5 * zoomY;\n var right = frustum[1] = (x - 0.5) + 0.5 * zoomX;\n var bottom = frustum[2] = (0.5 - y) - 0.5 * zoomY;\n var left = frustum[3] = (x - 0.5) - 0.5 * zoomX;\n\n // Recalculate projection matrix and its inverse.\n mat4.ortho(projMatrix, left, right, bottom, top, -1, 1);\n mat4.invert(invProjMatrix, projMatrix);\n\n this._projectionChanged = false;\n }\n};\n\n\n/**\n * Returns the projection matrix for the current view.\n * @returns {mat4}\n */\nFlatView.prototype.projection = function() {\n this._updateProjection();\n return this._projMatrix;\n};\n\n\n/**\n * Returns the inverse projection matrix for the current view.\n * @returns {mat4}\n */\nFlatView.prototype.inverseProjection = function() {\n this._updateProjection();\n return this._invProjMatrix;\n};\n\n\n/**\n * Return whether the view frustum intersects the given rectangle.\n *\n * This function may return false positives, but never false negatives.\n * It is used for frustum culling, i.e., excluding invisible tiles from the\n * rendering process.\n *\n * @param {vec3[]} rectangle The vertices of the rectangle.\n */\nFlatView.prototype.intersects = function(rectangle) {\n this._updateProjection();\n\n var frustum = this._frustum;\n\n // Check whether the rectangle is on the outer side of any of the frustum\n // planes. This is a sufficient condition, though not necessary, for the\n // rectangle to be completely outside the fruouter\n for (var i = 0; i < frustum.length; i++) {\n var limit = frustum[i];\n var axis = planeAxes[i];\n var cmp = planeCmp[i];\n var inside = false;\n for (var j = 0; j < rectangle.length; j++) {\n var vertex = rectangle[j];\n if (cmp < 0 && vertex[axis] < limit || cmp > 0 && vertex[axis] > limit) {\n inside = true;\n break;\n }\n }\n if (!inside) {\n return false;\n }\n }\n return true;\n};\n\n\n/**\n * Select the level that should be used to render the view.\n * @param {Level[]} levelList the list of levels from which to select.\n * @return {Level} the selected level.\n */\nFlatView.prototype.selectLevel = function(levels) {\n\n // Multiply the viewport width by the device pixel ratio to get the required\n // horizontal resolution in pixels.\n //\n // Calculate the fraction of the image that would be visible at the current\n // zoom value. Then, for each level, multiply by the level width to get the\n // width in pixels of the portion that would be visible.\n //\n // Search for the smallest level that satifies the the required width,\n // falling back on the largest level if none do.\n\n var requiredPixels = pixelRatio() * this.width();\n var zoomFactor = this._zoom;\n\n for (var i = 0; i < levels.length; i++) {\n var level = levels[i];\n if (zoomFactor * level.width() >= requiredPixels) {\n return level;\n }\n }\n\n return levels[levels.length - 1];\n\n};\n\n\n/**\n * Convert view coordinates into screen coordinates. If a result argument is\n * provided, it is filled in and returned. Otherwise, a fresh object is filled\n * in and returned.\n *\n * @param {FlatViewCoords} coords The view coordinates.\n * @param {Coords=} result The result argument for the screen coordinates.\n * @return {Coords}\n */\nFlatView.prototype.coordinatesToScreen = function(coords, result) {\n var ray = this._vec;\n\n if (!result) {\n result = {};\n }\n\n var width = this._width;\n var height = this._height;\n\n // Undefined on a null viewport.\n if (width <= 0 || height <= 0) {\n result.x = null;\n result.y = null;\n return null;\n }\n\n // Extract coordinates from argument, filling in default values.\n var x = coords && coords.x != null ? coords.x : defaultX;\n var y = coords && coords.y != null ? coords.y : defaultY;\n\n // Project view ray onto clip space.\n vec4.set(ray, x - 0.5, 0.5 - y, -1, 1);\n vec4.transformMat4(ray, ray, this.projection());\n\n // Calculate perspective divide.\n for (var i = 0; i < 3; i++) {\n ray[i] /= ray[3];\n }\n\n // Convert to viewport coordinates and return.\n result.x = width * (ray[0] + 1) / 2;\n result.y = height * (1 - ray[1]) / 2;\n\n return result;\n};\n\n\n/**\n * Convert screen coordinates into view coordinates. If a result argument is\n * provided, it is filled in with the result and returned. Otherwise, a fresh\n * object is filled in and returned.\n *\n * @param {Coords} coords The screen coordinates.\n * @param {FlatViewCoords=} result The result argument for the view coordinates.\n * @return {FlatViewCoords}\n */\nFlatView.prototype.screenToCoordinates = function(coords, result) {\n var ray = this._vec;\n\n if (!result) {\n result = {};\n }\n\n var width = this._width;\n var height = this._height;\n\n // Convert viewport coordinates to clip space.\n var vecx = 2 * coords.x / width - 1;\n var vecy = 1 - 2 * coords.y / height;\n vec4.set(ray, vecx, vecy, 1, 1);\n\n // Project back to world space.\n vec4.transformMat4(ray, ray, this.inverseProjection());\n\n // Convert to flat coordinates.\n result.x = 0.5 + ray[0];\n result.y = 0.5 - ray[1];\n\n return result;\n};\n\n\n/**\n * Factory functions for view limiters. See {@link FlatViewLimiter}.\n * @namespace\n */\nFlatView.limit = {\n\n /**\n * Returns a view limiter that constrains the x parameter.\n * @param {number} min The minimum x value.\n * @param {number} max The maximum y value.\n * @return {FlatViewLimiter}\n */\n x: function(min, max) {\n return function limitX(params) {\n params.x = clamp(params.x, min, max);\n return params;\n };\n },\n\n /**\n * Return a view limiter that constrains the y parameter.\n * @param {number} min The minimum y value.\n * @param {number} max The maximum y value.\n * @return {FlatViewLimiter}\n */\n y: function(min, max) {\n return function limitY(params) {\n params.y = clamp(params.y, min, max);\n return params;\n };\n },\n\n /**\n * Returns a view limiter than constrains the zoom parameter.\n * @param {number} min The minimum zoom value.\n * @param {number} max The maximum zoom value.\n * @return {FlatViewLimiter}\n */\n zoom: function(min, max) {\n return function limitZoom(params) {\n params.zoom = clamp(params.zoom, min, max);\n return params;\n };\n },\n\n /**\n * Returns a view limiter that prevents zooming in beyond the given\n * resolution.\n * @param {number} size The image width in pixels.\n * @return {FlatViewLimiter}\n */\n resolution: function(size) {\n return function limitResolution(params) {\n if (params.width <= 0 || params.height <= 0) {\n return params;\n }\n var width = params.width;\n var minZoom = pixelRatio() * width / size;\n params.zoom = clamp(params.zoom, minZoom, Infinity);\n return params;\n };\n },\n\n /**\n * Returns a view limiter that constrains the values of the x parameter that\n * are inside the viewport.\n * @param {number} min The minimum x value.\n * @param {number} max The maximum x value.\n * @return {FlatViewLimiter}\n */\n visibleX: function(min, max) {\n return function limitVisibleX(params) {\n // Calculate the zoom value that makes the specified range fully visible.\n var maxZoom = max - min;\n\n // Clamp zoom to the maximum value.\n if (params.zoom > maxZoom) {\n params.zoom = maxZoom;\n }\n\n // Bound X such that the image is visible up to the range edges.\n var minX = min + 0.5 * params.zoom;\n var maxX = max - 0.5 * params.zoom;\n params.x = clamp(params.x, minX, maxX);\n\n return params;\n };\n },\n\n /**\n * Returns a view limiter that constrains the values of the y parameter that\n * are inside the viewport.\n * @param {number} min The minimum y value.\n * @param {number} max The maximum y value.\n * @return {FlatViewLimiter}\n */\n visibleY: function(min, max) {\n return function limitVisibleY(params) {\n\n // Do nothing for a null viewport.\n if (params.width <= 0 || params.height <= 0) {\n return params;\n }\n\n // Calculate the X to Y conversion factor.\n var viewportAspectRatio = params.width / params.height;\n var factor = viewportAspectRatio / params.mediaAspectRatio;\n\n // Calculate the zoom value that makes the specified range fully visible.\n var maxZoom = (max - min) * factor;\n\n // Clamp zoom to the maximum value.\n if (params.zoom > maxZoom) {\n params.zoom = maxZoom;\n }\n\n // Bound Y such that the image is visible up to the range edges.\n var minY = min + 0.5 * params.zoom / factor;\n var maxY = max - 0.5 * params.zoom / factor;\n params.y = clamp(params.y, minY, maxY);\n\n return params;\n };\n },\n\n\n /**\n * Returns a view limiter that constrains the zoom parameter such that\n * zooming out is prevented beyond the point at which the image is fully\n * visible. Unless the image and the viewport have the same aspect ratio,\n * this will cause bands to appear around the image.\n * @return {FlatViewLimiter}\n */\n letterbox: function() {\n return function limitLetterbox(params) {\n if(params.width <= 0 || params.height <= 0) {\n return params;\n }\n var viewportAspectRatio = params.width / params.height;\n\n var fullWidthZoom = 1.0;\n var fullHeightZoom = viewportAspectRatio / params.mediaAspectRatio;\n\n // If the image is wider than the viewport, limit the horizontal zoom to\n // the image width.\n if (params.mediaAspectRatio >= viewportAspectRatio) {\n params.zoom = Math.min(params.zoom, fullWidthZoom);\n }\n\n // If the image is narrower than the viewport, limit the vertical zoom to\n // the image height.\n if (params.mediaAspectRatio <= viewportAspectRatio) {\n params.zoom = Math.min(params.zoom, fullHeightZoom);\n }\n\n // If the full image width is visible, limit x to the central point.\n // Else, bound x such that image is visible up to the horizontal edges.\n var minX, maxX;\n if (params.zoom > fullWidthZoom) {\n minX = maxX = 0.5;\n } else {\n minX = 0.0 + 0.5 * params.zoom / fullWidthZoom;\n maxX = 1.0 - 0.5 * params.zoom / fullWidthZoom;\n }\n\n // If the full image height is visible, limit y to the central point.\n // Else, bound y such that image is visible up to the vertical edges.\n var minY, maxY;\n if (params.zoom > fullHeightZoom) {\n minY = maxY = 0.5;\n } else {\n minY = 0.0 + 0.5 * params.zoom / fullHeightZoom;\n maxY = 1.0 - 0.5 * params.zoom / fullHeightZoom;\n }\n\n // Clamp x and y into the calculated bounds.\n params.x = clamp(params.x, minX, maxX);\n params.y = clamp(params.y, minY, maxY);\n\n return params;\n };\n }\n\n};\n\n\nFlatView.type = FlatView.prototype.type = 'flat';\n\n\nmodule.exports = FlatView;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar eventEmitter = require('minimal-event-emitter');\nvar NetworkError = require('../NetworkError');\nvar WorkPool = require('../collections/WorkPool');\nvar chain = require('../util/chain');\nvar delay = require('../util/delay');\nvar now = require('../util/now');\n\n\n// Map template properties to their corresponding tile properties.\nvar templateProperties = {\n x: 'x',\n y: 'y',\n z: 'z',\n f: 'face'\n};\n\n// Default face order for cube maps.\nvar defaultCubeMapFaceOrder = 'bdflru';\n\n// Default maximum number of concurrent requests.\nvar defaultConcurrency = 4;\n\n// Default milliseconds to wait before retrying failed requests.\nvar defaultRetryDelay = 10000;\n\n\n/**\n * @class ImageUrlSource\n * @implements Source\n * @classdesc\n *\n * A {@link Source} that loads {@link Asset assets} from images given a URL and\n * a crop rectangle.\n *\n * @param {Function} sourceFromTile Function that receives a tile and returns\n * a `{ url, rect }` object, where `url` is an image URL and `rect`, when\n * present, is an `{ x, y, width, height }` object in normalized coordinates\n * denoting the portion of the image to use.\n * @param {Object} opts\n * @param {number} [opts.concurrency=4] Maximum number of tiles to request at\n * the same time. The limit is per {@link ImageSourceUrl} instance.\n * @param {number} [opts.retryDelay=10000] Time in milliseconds to wait before\n * retrying a failed request.\n */\nfunction ImageUrlSource(sourceFromTile, opts) {\n\n opts = opts ? opts : {};\n\n this._loadPool = new WorkPool({\n concurrency: opts.concurrency || defaultConcurrency\n });\n\n this._retryDelay = opts.retryDelay || defaultRetryDelay;\n this._retryMap = {};\n\n this._sourceFromTile = sourceFromTile;\n}\n\neventEmitter(ImageUrlSource);\n\n\nImageUrlSource.prototype.loadAsset = function(stage, tile, done) {\n\n var self = this;\n\n var retryDelay = this._retryDelay;\n var retryMap = this._retryMap;\n\n var tileSource = this._sourceFromTile(tile);\n var url = tileSource.url;\n var rect = tileSource.rect;\n\n var loadImage = stage.loadImage.bind(stage, url, rect);\n\n var loadFn = function(done) {\n // TODO: Deduplicate load requests for the same URL. Although the browser\n // might be smart enough to avoid duplicate requests, they are still unduly\n // impacted by the concurrency parameter.\n return self._loadPool.push(loadImage, function(err, asset) {\n if (err) {\n if (err instanceof NetworkError) {\n // If a network error occurred, wait before retrying.\n retryMap[url] = now();\n self.emit('networkError', asset, err);\n }\n done(err, tile);\n } else {\n // On a successful fetch, forget the previous timeout.\n delete retryMap[url];\n done(null, tile, asset);\n }\n });\n };\n\n // Check whether we are retrying a failed request.\n var delayAmount;\n var lastTime = retryMap[url];\n if (lastTime != null) {\n var currentTime = now();\n var elapsed = currentTime - lastTime;\n if (elapsed < retryDelay) {\n // Wait before retrying.\n delayAmount = retryDelay - elapsed;\n } else {\n // Retry timeout expired; perform the request at once.\n delayAmount = 0;\n delete retryMap[url];\n }\n }\n\n var delayFn = delay.bind(null, delayAmount);\n\n return chain(delayFn, loadFn)(done);\n};\n\n\n/**\n * Creates an ImageUrlSource from a string template.\n *\n * @param {String} url Tile URL template, which may contain the following\n * placeholders:\n * - `{f}` : tile face (one of `b`, `d`, `f`, `l`, `r`, `u`)\n * - `{z}` : tile level index (0 is the smallest level)\n * - `{x}` : tile horizontal index\n * - `{y}` : tile vertical index\n * @param {Object} opts In addition to the options already supported by the\n * {@link ImageUrlSource} constructor.\n * @param {String} opts.cubeMapPreviewUrl URL to use as the preview level.\n * This must be a single image containing six cube faces laid out\n * vertically according to the face order parameter.\n * @param {String} [opts.cubeMapPreviewFaceOrder='bdflru'] Face order within\n * the preview image.\n */\nImageUrlSource.fromString = function(url, opts) {\n opts = opts || {};\n\n var faceOrder = opts && opts.cubeMapPreviewFaceOrder || defaultCubeMapFaceOrder;\n\n var urlFn = opts.cubeMapPreviewUrl ? withPreview : withoutPreview;\n\n return new ImageUrlSource(urlFn, opts);\n\n function withoutPreview(tile) {\n var tileUrl = url;\n\n for (var property in templateProperties) {\n var templateProperty = templateProperties[property];\n var regExp = propertyRegExp(property);\n var valueFromTile = tile.hasOwnProperty(templateProperty) ? tile[templateProperty] : '';\n tileUrl = tileUrl.replace(regExp, valueFromTile);\n }\n\n return { url: tileUrl };\n }\n\n function withPreview(tile) {\n if (tile.z === 0) {\n return cubeMapUrl(tile);\n }\n else {\n return withoutPreview(tile);\n }\n }\n\n function cubeMapUrl(tile) {\n var y = faceOrder.indexOf(tile.face) / 6;\n return {\n url: opts.cubeMapPreviewUrl,\n rect: { x: 0, y: y, width: 1, height: 1/6 }\n };\n }\n};\n\nfunction propertyRegExp(property) {\n var regExpStr = '\\\\{(' + property + ')\\\\}';\n return new RegExp(regExpStr, 'g');\n}\n\nmodule.exports = ImageUrlSource;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar WorkQueue = require('./WorkQueue');\nvar mod = require('../util/mod');\n\n\nfunction WorkPool(opts) {\n this._concurrency = opts && opts.concurrency || 1;\n this._paused = opts && !!opts.paused || false;\n\n this._pool = [];\n for (var i = 0; i < this._concurrency; i++) {\n this._pool.push(new WorkQueue(opts));\n }\n\n this._next = 0;\n}\n\n\nWorkPool.prototype.length = function() {\n var len = 0;\n for (var i = 0; i < this._pool.length; i++) {\n len += this._pool[i].length();\n }\n return len;\n};\n\n\nWorkPool.prototype.push = function(fn, cb) {\n var i = this._next;\n var cancel = this._pool[i].push(fn, cb);\n this._next = mod(this._next + 1, this._concurrency);\n return cancel;\n};\n\n\nWorkPool.prototype.pause = function() {\n if (!this._paused) {\n this._paused = true;\n for (var i = 0; i < this._concurrency; i++) {\n this._pool[i].pause();\n }\n }\n};\n\n\nWorkPool.prototype.resume = function() {\n if (this._paused) {\n this._paused = false;\n for (var i = 0; i < this._concurrency; i++) {\n this._pool[i].resume();\n }\n }\n};\n\n\nmodule.exports = WorkPool;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar noop = require('./noop');\n\n// Return a function that executes its arguments (which should be cancelables)\n// in sequence, so that each of them passes its return values to the next.\n// Execution is aborted if one of the functions returns an error; in that case\n// the last function in the sequence is called with the error.\n// See util/cancelize.js for an explanation of what cancelables are.\nfunction chain() {\n\n // The list of functions to chain together.\n var argList = Array.prototype.slice.call(arguments, 0);\n\n return function chained() {\n\n // List of remaining functions to be executed.\n // Make a copy of the original list so we can mutate the former while\n // preserving the latter intact for future invocations of the chain.\n var fnList = argList.slice(0);\n\n // Currently executing function.\n var fn = null;\n\n // Cancel method for the currently executing function.\n var cfn = null;\n\n // Arguments for the first function.\n var args = arguments.length ? Array.prototype.slice.call(arguments, 0, arguments.length - 1) : [];\n\n // Callback for the chain.\n var done = arguments.length ? arguments[arguments.length - 1] : noop;\n\n // Execute the next function in the chain.\n // Receives the error and return values from the previous function.\n function exec() {\n\n // Extract error from arguments.\n var err = arguments[0];\n\n // Abort chain on error.\n if (err) {\n fn = cfn = null;\n done.apply(null, arguments);\n return;\n }\n\n // Terminate if there are no functions left in the chain.\n if (!fnList.length) {\n fn = cfn = null;\n done.apply(null, arguments);\n return;\n }\n\n // Advance to the next function in the chain.\n fn = fnList.shift();\n var _fn = fn;\n\n // Extract arguments to pass into the next function.\n var ret = Array.prototype.slice.call(arguments, 1);\n\n // Call next function with previous return value and call back exec.\n ret.push(exec);\n var _cfn = fn.apply(null, ret); // fn(null, ret..., exec)\n\n // Detect when fn has completed synchronously and do not clobber the\n // internal state in that case. You're not expected to understand this.\n if (_fn !== fn) {\n return;\n }\n\n // Remember the cancel method for the currently executing function.\n // Detect chaining on non-cancellable function.\n if (typeof _cfn !== 'function') {\n throw new Error('chain: chaining on non-cancellable function');\n } else {\n cfn = _cfn;\n }\n\n }\n\n // Cancel chain execution.\n function cancel() {\n if (cfn) {\n cfn.apply(null, arguments);\n }\n }\n\n // Start chain execution.\n // We call exec as if linking from a previous function in the chain,\n // except that the error is always null. As a consequence, chaining on an\n // empty list yields the identity function.\n args.unshift(null);\n exec.apply(null, args); // exec(null, args...)\n\n return cancel;\n\n };\n\n}\n\nmodule.exports = chain;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nfunction noop() {}\n\nmodule.exports = noop;","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\n// Perform a cancelable delay.\n// See util/cancelize.js for an explanation of what cancelables are.\nfunction delay(ms, done) {\n\n // Work around IE8 bug whereby a setTimeout callback may still be called\n // after the corresponding clearTimeout is invoked.\n var timer = null;\n\n function finish() {\n if (timer != null) {\n timer = null;\n done(null);\n }\n }\n\n function cancel() {\n if (timer != null) {\n clearTimeout(timer);\n timer = null;\n done.apply(null, arguments);\n }\n }\n\n timer = setTimeout(finish, ms);\n\n return cancel;\n\n}\n\nmodule.exports = delay;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\n/**\n * @class SingleAssetSource\n * @implements Source\n * @classdesc\n *\n * A {@link Source} that always provides the same {@link Asset}.\n *\n * @param {Asset} asset The asset.\n*/\nfunction SingleAssetSource(asset) {\n this._asset = asset;\n}\n\nSingleAssetSource.prototype.asset = function() {\n return this._asset;\n};\n\nSingleAssetSource.prototype.loadAsset = function(stage, tile, done) {\n var self = this;\n\n var timeout = setTimeout(function() {\n done(null, tile, self._asset);\n }, 0);\n\n function cancel() {\n clearTimeout(timeout);\n done.apply(null, arguments);\n }\n\n return cancel;\n};\n\nmodule.exports = SingleAssetSource;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar StaticAsset = require('./Static');\nvar inherits = require('../util/inherits');\nvar eventEmitter = require('minimal-event-emitter');\nvar clearOwnProperties = require('../util/clearOwnProperties');\n\n/**\n * @class DynamicAsset\n * @implements Asset\n * @extends StaticAsset\n * @classdesc\n *\n * A mutable {@link Asset} compatible with {@link WebGlStage} and\n * {@link CssStage}.\n *\n * @param {HTMLImageElement|HTMLCanvasElement|ImageBitmap} element The\n * underlying pixel source.\n * @throws If the pixel source is unsupported.\n */\nfunction DynamicAsset(element) {\n this.constructor.super_.call(this, element);\n this._timestamp = 0;\n}\n\ninherits(DynamicAsset, StaticAsset);\neventEmitter(DynamicAsset);\n\n/**\n * Destructor.\n */\nDynamicAsset.prototype.destroy = function() {\n clearOwnProperties(this);\n};\n\nDynamicAsset.prototype.timestamp = function() {\n return this._timestamp;\n};\n\nDynamicAsset.prototype.isDynamic = function() {\n return true;\n};\n\n/**\n * Marks the asset dirty, signaling that the contents of the underlying pixel\n * source have changed.\n *\n * @throws If the asset is not dynamic.\n */\nDynamicAsset.prototype.markDirty = function() {\n this._timestamp++;\n this.emit('change');\n};\n\nmodule.exports = DynamicAsset;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar Map = require('./collections/Map');\nvar Set = require('./collections/Set');\nvar LruSet = require('./collections/LruSet');\nvar eventEmitter = require('minimal-event-emitter');\nvar defaults = require('./util/defaults');\nvar retry = require('./util/retry');\nvar chain = require('./util/chain');\nvar inherits = require('./util/inherits');\nvar clearOwnProperties = require('./util/clearOwnProperties');\n\nvar debug = typeof MARZIPANODEBUG !== 'undefined' && MARZIPANODEBUG.textureStore;\n\n\n// A Stage informs the TextureStore about the set of visible tiles during a\n// frame by calling startFrame, markTile and endFrame. In a particular frame,\n// TextureStore expects one or more calls to startFrame, followed by zero or\n// more calls to markTile, followed by one or more calls to endFrame. The\n// number of calls to startFrame and endFrame must match. Calls to other\n// TextureStore methods may be freely interleaved with this sequence.\n//\n// At any given time, TextureStore is in one of four states. The START state\n// corresponds to the interval between the first startFrame and the first\n// markTile of a frame. The MARK state corresponds to the interval between the\n// first markTile and the first endFrame. The END state corresponds to the\n// interval between the first and the last endFrame. At any other time, the\n// TextureStore is in the IDLE state.\nvar State = {\n IDLE: 0,\n START: 1,\n MARK: 2,\n END: 3\n};\n\n\nvar defaultOptions = {\n // Maximum number of cached textures for previously visible tiles.\n previouslyVisibleCacheSize: 512\n};\n\n\n// Assign an id to each operation so we can track its state.\n// We actually only need this in debug mode, but the code is less convoluted\n// if we track unconditionally, and the performance hit is minimal anyway.\nvar nextId = 0;\n\n\n// Distinguishes a cancellation from other kinds of errors.\nfunction CancelError() {}\ninherits(CancelError, Error);\n\n\n/**\n * @class TextureStoreItem\n * @classdesc\n *\n * An item saved in a {@link TextureStore}.\n *\n * Clients do not need to instantiate this. It is automatically instantiated by\n * a {@link TextureStore} to manage the lifetime of a stored item: loading,\n * refreshing, unloading and emitting associated events.\n *\n * @param {TextureStore} store The underlying {@link TextureStore}.\n * @param {Tile} tile The underlying tile.\n */\nfunction TextureStoreItem(store, tile) {\n\n var self = this;\n\n var id = nextId++;\n\n self._id = id;\n self._store = store;\n self._tile = tile;\n\n self._asset = null;\n self._texture = null;\n\n self._changeHandler = function() {\n store.emit('textureInvalid', tile);\n };\n\n var source = store.source();\n var stage = store.stage();\n\n var loadAsset = source.loadAsset.bind(source);\n var createTexture = stage.createTexture.bind(stage);\n\n // Retry loading the asset until it succeeds, then create the texture from it.\n // This process may be canceled at any point by calling the destroy() method.\n var fn = chain(retry(loadAsset), createTexture);\n\n store.emit('textureStartLoad', tile);\n if (debug) {\n console.log('loading', id, tile);\n }\n\n self._cancel = fn(stage, tile, function(err, _tile, asset, texture) {\n\n // Make sure we do not call cancel after the operation is complete.\n self._cancel = null;\n\n if (err) {\n // The loading process was interrupted by an error.\n // This could either be because the texture creation failed, or because\n // the operation was canceled before the loading was complete.\n\n // Destroy the asset and texture, if they exist.\n if (asset) {\n asset.destroy();\n }\n if (texture) {\n texture.destroy();\n }\n\n // Emit events.\n if (err instanceof CancelError) {\n store.emit('textureCancel', tile);\n if (debug) {\n console.log('cancel', id, tile);\n }\n } else {\n store.emit('textureError', tile, err);\n if (debug) {\n console.log('error', id, tile);\n }\n }\n\n return;\n }\n\n // Save a local reference to the texture.\n self._texture = texture;\n\n // If the asset is dynamic, save a local reference to it and set up a\n // handler to be called whenever it changes. Otherwise, destroy the asset\n // as we won't be needing it any longer.\n if (asset.isDynamic()) {\n self._asset = asset;\n asset.addEventListener('change', self._changeHandler);\n } else {\n asset.destroy();\n }\n\n // Emit event.\n store.emit('textureLoad', tile);\n if (debug) {\n console.log('load', id, tile);\n }\n });\n\n}\n\n\nTextureStoreItem.prototype.asset = function() {\n return this._asset;\n};\n\n\nTextureStoreItem.prototype.texture = function() {\n return this._texture;\n};\n\n\nTextureStoreItem.prototype.destroy = function() {\n var id = this._id;\n var store = this._store;\n var tile = this._tile;\n var asset = this._asset;\n var texture = this._texture;\n var cancel = this._cancel;\n\n if (cancel) {\n // The texture is still loading, so cancel it.\n cancel(new CancelError('Texture load cancelled'));\n return;\n }\n\n // Destroy asset.\n if (asset) {\n asset.removeEventListener('change', this._changeHandler);\n asset.destroy();\n }\n\n // Destroy texture.\n if (texture) {\n texture.destroy();\n }\n\n // Emit event.\n store.emit('textureUnload', tile);\n if (debug) {\n console.log('unload', id, tile);\n }\n\n clearOwnProperties(this);\n};\n\neventEmitter(TextureStoreItem);\n\n/**\n * Signals that a texture has started to load.\n *\n * This event is followed by either {@link TextureStore#textureLoad},\n * {@link TextureStore#textureError} or {@link TextureStore#textureCancel}.\n *\n * @event TextureStore#textureStartLoad\n * @param {Tile} tile The tile for which the texture has started to load.\n */\n\n/**\n * Signals that a texture has been loaded.\n *\n * @event TextureStore#textureLoad\n * @param {Tile} tile The tile for which the texture was loaded.\n */\n\n/**\n * Signals that a texture has been unloaded.\n *\n * @event TextureStore#textureUnload\n * @param {Tile} tile The tile for which the texture was unloaded.\n */\n\n/**\n * Signals that a texture has been invalidated.\n *\n * This event may be raised for a texture with an underlying dynamic asset. It\n * may only occur while the texture is loaded, i.e., in between\n * {@link TextureStore#textureLoad} and {@link TextureStore#textureUnload}.\n *\n * @event TextureStore#textureInvalid\n * @param {Tile} tile The tile for which the texture was invalidated.\n */\n\n/**\n * Signals that loading a texture has been cancelled.\n *\n * This event may follow {@link TextureStore#textureStartLoad} if the texture\n * becomes unnecessary before it finishes loading.\n *\n * @event TextureStore#textureCancel\n * @param {Tile} tile The tile for which the texture loading was cancelled.\n */\n\n/**\n * Signals that loading a texture has failed.\n *\n * This event may follow {@link TextureStore#textureStartLoad} if the texture\n * fails to load.\n *\n * @event TextureStore#textureError\n * @param {Tile} tile The tile for which the texture loading has failed.\n */\n\n/**\n * @class TextureStore\n * @classdesc\n *\n * A TextureStore maintains a cache of textures used to render a {@link Layer}.\n *\n * A {@link Stage} communicates with the TextureStore through the startFrame(),\n * markTile() and endFrame() methods, which indicate the tiles that are visible\n * in the current frame. Textures for visible tiles are loaded and retained\n * as long as the tiles remain visible. A limited amount of textures whose\n * tiles were previously visible are cached according to an LRU policy. Tiles\n * may be pinned to keep their respective textures cached even when they are\n * invisible; these textures do not count towards the previously visible limit.\n *\n * Multiple layers belonging to the same underlying {@link WebGlStage} may\n * share the same TextureStore. Layers belonging to distinct {@link WebGlStage}\n * instances, or belonging to a {@link CssStage} or a {@link FlashStage},\n * may not do so due to restrictions on the use of textures across stages.\n *\n * @param {Source} source The underlying source.\n * @param {Stage} stage The underlying stage.\n * @param {Object} opts Options.\n * @param {Number} [opts.previouslyVisibleCacheSize=32] The maximum number of\n * previously visible textures to cache according to an LRU policy.\n */\nfunction TextureStore(source, stage, opts) {\n opts = defaults(opts || {}, defaultOptions);\n\n this._source = source;\n this._stage = stage;\n\n // The current state.\n this._state = State.IDLE;\n\n // The number of startFrame calls yet to be matched by endFrame calls during\n // the current frame.\n this._delimCount = 0;\n\n // The cache proper: map cached tiles to their respective textures/assets.\n this._itemMap = new Map();\n\n // The subset of cached tiles that are currently visible.\n this._visible = new Set();\n\n // The subset of cached tiles that were visible recently, but are not\n // visible right now. Newly inserted tiles replace older ones.\n this._previouslyVisible = new LruSet(opts.previouslyVisibleCacheSize);\n\n // The subset of cached tiles that should never be evicted from the cache.\n // A tile may be pinned more than once; map each tile into a reference count.\n this._pinMap = new Map();\n\n // Temporary variables.\n this._newVisible = new Set();\n this._noLongerVisible = [];\n this._visibleAgain = [];\n this._evicted = [];\n}\n\neventEmitter(TextureStore);\n\n\n/**\n * Destructor.\n */\nTextureStore.prototype.destroy = function() {\n this.clear();\n clearOwnProperties(this);\n};\n\n\n/**\n * Return the underlying {@link Stage}.\n * @return {Stage}\n */\nTextureStore.prototype.stage = function() {\n return this._stage;\n};\n\n\n/**\n * Return the underlying {@link Source}.\n * @return {Source}\n */\nTextureStore.prototype.source = function() {\n return this._source;\n};\n\n\n/**\n * Remove all textures from the TextureStore, including pinned textures.\n */\nTextureStore.prototype.clear = function() {\n var self = this;\n\n // Collect list of tiles to be evicted.\n self._evicted.length = 0;\n self._itemMap.forEach(function(tile) {\n self._evicted.push(tile);\n });\n\n // Evict tiles.\n self._evicted.forEach(function(tile) {\n self._unloadTile(tile);\n });\n\n // Clear all internal state.\n self._itemMap.clear();\n self._visible.clear();\n self._previouslyVisible.clear();\n self._pinMap.clear();\n self._newVisible.clear();\n self._noLongerVisible.length = 0;\n self._visibleAgain.length = 0;\n self._evicted.length = 0;\n};\n\n\n/**\n * Remove all textures in the TextureStore, excluding unpinned textures.\n */\nTextureStore.prototype.clearNotPinned = function() {\n var self = this;\n\n // Collect list of tiles to be evicted.\n self._evicted.length = 0;\n self._itemMap.forEach(function(tile) {\n if (!self._pinMap.has(tile)) {\n self._evicted.push(tile);\n }\n });\n\n // Evict tiles.\n self._evicted.forEach(function(tile) {\n self._unloadTile(tile);\n });\n\n // Clear all caches except the pinned set.\n self._visible.clear();\n self._previouslyVisible.clear();\n\n // Clear temporary variables.\n self._evicted.length = 0;\n};\n\n\n/**\n * Signal the beginning of a frame. Called from {@link Stage}.\n */\nTextureStore.prototype.startFrame = function() {\n // Check that we are in an appropriate state.\n if (this._state !== State.IDLE && this._state !== State.START) {\n throw new Error('TextureStore: startFrame called out of sequence');\n }\n\n // Enter the START state, if not already there.\n this._state = State.START;\n\n // Expect one more endFrame call.\n this._delimCount++;\n};\n\n\n/**\n * Mark a tile as visible within the current frame. Called from {@link Stage}.\n * @param {Tile} tile The tile to mark.\n */\nTextureStore.prototype.markTile = function(tile) {\n // Check that we are in an appropriate state.\n if (this._state !== State.START && this._state !== State.MARK) {\n throw new Error('TextureStore: markTile called out of sequence');\n }\n\n // Enter the MARK state, if not already there.\n this._state = State.MARK;\n\n // Refresh texture for dynamic assets.\n var item = this._itemMap.get(tile);\n var texture = item && item.texture();\n var asset = item && item.asset();\n if (texture && asset) {\n texture.refresh(tile, asset);\n }\n\n // Add tile to the visible set.\n this._newVisible.add(tile);\n};\n\n\n/**\n * Signal the end of a frame. Called from {@link Stage}.\n */\nTextureStore.prototype.endFrame = function() {\n // Check that we are in an appropriate state.\n if (this._state !== State.START && this._state !== State.MARK && this._state !== State.END) {\n throw new Error('TextureStore: endFrame called out of sequence');\n }\n\n // Enter the END state, if not already there.\n this._state = State.END;\n\n // Expect one less call to endFrame.\n this._delimCount--;\n\n // If no further calls are expected, process frame and enter the IDLE state.\n if (!this._delimCount) {\n this._update();\n this._state = State.IDLE;\n }\n};\n\n\nTextureStore.prototype._update = function() {\n var self = this;\n\n // Calculate the set of tiles that used to be visible but no longer are.\n self._noLongerVisible.length = 0;\n self._visible.forEach(function(tile) {\n if (!self._newVisible.has(tile)) {\n self._noLongerVisible.push(tile);\n }\n });\n\n // Calculate the set of tiles that were visible recently and have become\n // visible again.\n self._visibleAgain.length = 0;\n self._newVisible.forEach(function(tile) {\n if (self._previouslyVisible.has(tile)) {\n self._visibleAgain.push(tile);\n }\n });\n\n // Remove tiles that have become visible again from the list of previously\n // visible tiles.\n self._visibleAgain.forEach(function(tile) {\n self._previouslyVisible.remove(tile);\n });\n\n // Cancel loading of tiles that are no longer visible.\n // Move no longer visible tiles with a loaded texture into the previously\n // visible set, and collect the tiles evicted from the latter.\n self._evicted.length = 0;\n self._noLongerVisible.forEach(function(tile) {\n var item = self._itemMap.get(tile);\n var texture = item && item.texture();\n if (texture) {\n var otherTile = self._previouslyVisible.add(tile);\n if (otherTile != null) {\n self._evicted.push(otherTile);\n }\n } else if (item) {\n self._unloadTile(tile);\n }\n });\n\n // Unload evicted tiles, unless they are pinned.\n self._evicted.forEach(function(tile) {\n if (!self._pinMap.has(tile)) {\n self._unloadTile(tile);\n }\n });\n\n // Load visible tiles that are not already in the store.\n // Refresh texture on visible tiles for dynamic assets.\n self._newVisible.forEach(function(tile) {\n var item = self._itemMap.get(tile);\n if (!item) {\n self._loadTile(tile);\n }\n });\n\n // Swap the old visible set with the new one.\n var tmp = self._visible;\n self._visible = self._newVisible;\n self._newVisible = tmp;\n\n // Clear the new visible set.\n self._newVisible.clear();\n\n // Clear temporary variables.\n self._noLongerVisible.length = 0;\n self._visibleAgain.length = 0;\n self._evicted.length = 0;\n};\n\n\nTextureStore.prototype._loadTile = function(tile) {\n if (this._itemMap.has(tile)) {\n throw new Error('TextureStore: loading texture already in cache');\n }\n var item = new TextureStoreItem(this, tile);\n this._itemMap.set(tile, item);\n};\n\n\nTextureStore.prototype._unloadTile = function(tile) {\n var item = this._itemMap.del(tile);\n if (!item) {\n throw new Error('TextureStore: unloading texture not in cache');\n }\n item.destroy();\n};\n\n\nTextureStore.prototype.asset = function(tile) {\n var item = this._itemMap.get(tile);\n if (item) {\n return item.asset();\n }\n return null;\n};\n\n\nTextureStore.prototype.texture = function(tile) {\n var item = this._itemMap.get(tile);\n if (item) {\n return item.texture();\n }\n return null;\n};\n\n\n/**\n * Pin a tile. Textures for pinned tiles are never evicted from the store.\n * Upon pinning, the texture is created if not already present. Pins are\n * reference-counted; a tile may be pinned multiple times and must be unpinned\n * the corresponding number of times. Pinning is useful e.g. to ensure that\n * the lowest-resolution level of an image is always available to fall back\n * onto.\n * @param {Tile} tile the tile to pin\n * @returns {number} the pin reference count.\n */\nTextureStore.prototype.pin = function(tile) {\n // Increment reference count.\n var count = (this._pinMap.get(tile) || 0) + 1;\n this._pinMap.set(tile, count);\n // If the texture for the tile is not present, load it now.\n if (!this._itemMap.has(tile)) {\n this._loadTile(tile);\n }\n return count;\n};\n\n\n/**\n * Unpin a tile. Pins are reference-counted; a tile may be pinned multiple\n * times and must be unpinned the corresponding number of times.\n * @param {Tile} tile the tile to unpin\n * @returns {number} the pin reference count.\n */\nTextureStore.prototype.unpin = function(tile) {\n var count = this._pinMap.get(tile);\n // Consistency check.\n if (!count) {\n throw new Error('TextureStore: unpin when not pinned');\n } else {\n // Decrement reference count.\n count--;\n if (count > 0) {\n this._pinMap.set(tile, count);\n } else {\n this._pinMap.del(tile);\n // If the tile does not belong to either the visible or previously\n // visible sets, evict it from the cache.\n if (!this._visible.has(tile) && !this._previouslyVisible.has(tile)) {\n this._unloadTile(tile);\n }\n }\n }\n return count;\n};\n\n\n/**\n * Return type for {@link TextureStore#query}.\n * @typedef {Object} TileState\n * @property {boolean} visible Whether the tile is in the visible set.\n * @property {boolean} previouslyVisible Whether the tile is in the previously\n * visible set.\n * @property {boolean} hasAsset Whether the asset for the tile is present.\n * @property {boolean} hasTexture Whether the texture for the tile is present.\n * @property {boolean} pinned Whether the tile is in the pinned set.\n * @property {number} pinCount The pin reference count for the tile.\n */\n\n\n/**\n * Return the state of a tile.\n * @param {Tile} tile The tile to query.\n * @return {TileState}\n */\nTextureStore.prototype.query = function(tile) {\n var item = this._itemMap.get(tile);\n var pinCount = this._pinMap.get(tile) || 0;\n return {\n visible: this._visible.has(tile),\n previouslyVisible: this._previouslyVisible.has(tile),\n hasAsset: item != null && item.asset() != null,\n hasTexture: item != null && item.texture() != null,\n pinned: pinCount !== 0,\n pinCount: pinCount\n };\n};\n\n\nmodule.exports = TextureStore;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar mod = require('../util/mod');\n\n// An LruSet holds up to a maximum number of elements, ordered by their time of\n// insertion. When the addition of an element would cause the capacity to be\n// exceeded, the oldest element in the set is evicted. As a special case, an\n// LruSet with zero capacity always rejects the insertion of an element.\n//\n// Elements must implement hash() and equals(). Note that the implementation\n// doesn't currently use hash(), but a future version might.\nfunction LruSet(capacity) {\n if (!isFinite(capacity) || Math.floor(capacity) !== capacity || capacity < 0) {\n throw new Error('LruSet: invalid capacity');\n }\n this._capacity = capacity;\n\n // Elements are stored in a circular array ordered by decreasing age.\n // Start is the index of the oldest element and size is the number of valid\n // elements; the region containing valid elements may wrap around.\n this._elements = new Array(this._capacity);\n this._start = 0;\n this._size = 0;\n}\n\nLruSet.prototype._index = function(i) {\n return mod(this._start + i, this._capacity);\n};\n\n// Adds an element into the set, possibly replacing an equal element already in\n// the set. The element becomes the newest. If the set is at capacity, the\n// oldest element is removed. Returns the removed element if it does not equal\n// the inserted element, or null otherwise. If the capacity is zero, does\n// nothing and returns the element.\nLruSet.prototype.add = function(element) {\n if (this._capacity === 0) {\n return element;\n }\n this.remove(element);\n var evictedElement =\n this._size === this._capacity ? this._elements[this._index(0)] : null;\n this._elements[this._index(this._size)] = element;\n if (this._size < this._capacity) {\n this._size++;\n } else {\n this._start = this._index(1);\n }\n return evictedElement;\n};\n\n// Removes an element from the set.\n// Returns the removed element, or null if the element was not found.\nLruSet.prototype.remove = function(element) {\n for (var i = 0; i < this._size; i++) {\n var existingElement = this._elements[this._index(i)];\n if (element.equals(existingElement)) {\n for (var j = i; j < this._size - 1; j++) {\n this._elements[this._index(j)] = this._elements[this._index(j + 1)];\n }\n this._size--;\n return existingElement;\n }\n }\n return null;\n};\n\n// Returns whether an element is in the set.\nLruSet.prototype.has = function(element) {\n for (var i = 0; i < this._size; i++) {\n if (element.equals(this._elements[this._index(i)])) {\n return true;\n }\n }\n return false;\n};\n\n// Returns the number of elements in the set.\nLruSet.prototype.size = function() {\n return this._size;\n};\n\n// Removes all elements from the set.\nLruSet.prototype.clear = function() {\n this._elements.length = 0;\n this._start = 0;\n this._size = 0;\n};\n\n// Calls fn(element) for each element in the set, in an unspecified order.\n// Returns the number of times fn was called.\n// The result is unspecified if the set is mutated during iteration.\nLruSet.prototype.forEach = function(fn) {\n var count = 0;\n for (var i = 0; i < this._size; i++) {\n fn(this._elements[this._index(i)]);\n count += 1;\n }\n return count;\n};\n\nmodule.exports = LruSet;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nfunction defaults(obj, defaultsObj) {\n for (var key in defaultsObj) {\n if (!(key in obj)) {\n obj[key] = defaultsObj[key];\n }\n }\n return obj;\n}\n\nmodule.exports = defaults;","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar noop = require('./noop');\n\n// Return a cancelable function that executes fn in a loop until it returns\n// successfully.\nfunction retry(fn) {\n\n return function retried() {\n\n var args = arguments.length ? Array.prototype.slice.call(arguments, 0, arguments.length - 1) : [];\n var done = arguments.length ? arguments[arguments.length - 1] : noop;\n\n var cfn = null;\n var canceled = false;\n\n function exec() {\n var err = arguments[0];\n if (!err || canceled) {\n done.apply(null, arguments);\n } else {\n cfn = fn.apply(null, args);\n }\n }\n\n args.push(exec);\n exec(true);\n\n return function cancel() {\n canceled = true;\n cfn.apply(null, arguments);\n };\n\n };\n\n}\n\nmodule.exports = retry;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\n\nvar eventEmitter = require('minimal-event-emitter');\nvar extend = require('./util/extend');\nvar clearOwnProperties = require('./util/clearOwnProperties');\n\n/**\n * Signals that the layer has been rendered.\n *\n * @param {boolean} stable Whether all tiles were successfully rendered without\n * missing textures or resorting to fallbacks.\n * @event Layer#renderComplete\n */\n\n/**\n * @class Layer\n * @classdesc\n *\n * A Layer is a combination of {@link Source}, {@link Geometry}, {@link View}\n * and {@link TextureStore} that may be added into a {@link Stage} and rendered\n * with {@link Effects}.\n *\n * @param {Source} source\n * @param {Geometry} geometry\n * @param {View} view\n * @param {TextureStore} textureStore\n * @param {Object} opts\n * @param {Effects} opts.effects\n*/\nfunction Layer(source, geometry, view, textureStore, opts) {\n opts = opts || {};\n\n var self = this;\n\n this._source = source;\n this._geometry = geometry;\n this._view = view;\n this._textureStore = textureStore;\n\n this._effects = opts.effects || {};\n\n this._fixedLevelIndex = null;\n\n this._viewChangeHandler = function() {\n self.emit('viewChange', self.view());\n };\n\n this._view.addEventListener('change', this._viewChangeHandler);\n\n this._textureStoreChangeHandler = function() {\n self.emit('textureStoreChange', self.textureStore());\n };\n\n this._textureStore.addEventListener('textureLoad',\n this._textureStoreChangeHandler);\n this._textureStore.addEventListener('textureError',\n this._textureStoreChangeHandler);\n this._textureStore.addEventListener('textureInvalid',\n this._textureStoreChangeHandler);\n}\n\neventEmitter(Layer);\n\n\n/**\n * Destructor.\n */\nLayer.prototype.destroy = function() {\n this._view.removeEventListener('change', this._viewChangeHandler);\n this._textureStore.removeEventListener('textureLoad',\n this._textureStoreChangeHandler);\n this._textureStore.removeEventListener('textureError',\n this._textureStoreChangeHandler);\n this._textureStore.removeEventListener('textureInvalid',\n this._textureStoreChangeHandler);\n clearOwnProperties(this);\n};\n\n\n/**\n * Returns the underlying {@link Source source}.\n * @return {Source}\n */\nLayer.prototype.source = function() {\n return this._source;\n};\n\n\n/**\n * Returns the underlying {@link Geometry geometry}.\n * @return {Geometry}\n */\nLayer.prototype.geometry = function() {\n return this._geometry;\n};\n\n\n/**\n * Returns the underlying {@link View view}.\n * @return {View}\n */\nLayer.prototype.view = function() {\n return this._view;\n};\n\n\n/**\n * Returns the underlying {@link TextureStore texture store}.\n * @return {TextureStore}\n */\nLayer.prototype.textureStore = function() {\n return this._textureStore;\n};\n\n\n/**\n * Returns the currently set {@link Effects effects}.\n * @return {Effects}\n */\nLayer.prototype.effects = function() {\n return this._effects;\n};\n\n\n/**\n * Sets the {@link Effects effects}.\n * @param {Effects} effects\n */\nLayer.prototype.setEffects = function(effects) {\n this._effects = effects;\n this.emit('effectsChange', this._effects);\n};\n\n\n/**\n * Merges effects into the currently set ones. The merge is non-recursive; for\n * instance, if current effects are `{ rect: { relativeWidth: 0.5 } }`,\n * calling this method with `{ rect: { relativeX: 0.5 }}` will reset\n * `rect.relativeWidth`.\n *\n * @param {Effects} effects\n */\nLayer.prototype.mergeEffects = function(effects) {\n extend(this._effects, effects);\n this.emit('effectsChange', this._effects);\n};\n\n\n/**\n * Returns the fixed level index.\n * @return {(number|null)}\n */\nLayer.prototype.fixedLevel = function() {\n return this._fixedLevelIndex;\n};\n\n\n/**\n * Sets the fixed level index. When set, the corresponding level will be\n * used regardless of the view parameters. Unset with a null argument.\n *\n * @param {(number|null)} levelIndex\n * @throws An error if the level index is out of range.\n */\nLayer.prototype.setFixedLevel = function(levelIndex) {\n if (levelIndex !== this._fixedLevelIndex) {\n if (levelIndex != null && (levelIndex >= this._geometry.levelList.length ||\n levelIndex < 0)) {\n throw new Error(\"Level index out of range: \" + levelIndex);\n }\n this._fixedLevelIndex = levelIndex;\n this.emit('fixedLevelChange', this._fixedLevelIndex);\n }\n};\n\n\nLayer.prototype._selectLevel = function() {\n var level;\n if (this._fixedLevelIndex != null) {\n level = this._geometry.levelList[this._fixedLevelIndex];\n } else {\n level = this._view.selectLevel(this._geometry.selectableLevelList);\n }\n return level;\n};\n\n\nLayer.prototype.visibleTiles = function(result) {\n var level = this._selectLevel();\n return this._geometry.visibleTiles(this._view, level, result);\n};\n\n\n/**\n * Pin a whole level into the texture store.\n * @param {Number} levelIndex\n */\nLayer.prototype.pinLevel = function(levelIndex) {\n var level = this._geometry.levelList[levelIndex];\n var tiles = this._geometry.levelTiles(level);\n for (var i = 0; i < tiles.length; i++) {\n this._textureStore.pin(tiles[i]);\n }\n};\n\n\n/**\n * Unpin a whole level from the texture store.\n * @param {Number} levelIndex\n */\nLayer.prototype.unpinLevel = function(levelIndex) {\n var level = this._geometry.levelList[levelIndex];\n var tiles = this._geometry.levelTiles(level);\n for (var i = 0; i < tiles.length; i++) {\n this._textureStore.unpin(tiles[i]);\n }\n};\n\n\n/**\n * Pin the first level. Equivalent to `pinLevel(0)`.\n */\nLayer.prototype.pinFirstLevel = function() {\n return this.pinLevel(0);\n};\n\n\n/**\n * Unpin the first level. Equivalent to `unpinLevel(0)`.\n */\nLayer.prototype.unpinFirstLevel = function() {\n return this.unpinLevel(0);\n};\n\n\nmodule.exports = Layer;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nfunction extend(obj, sourceObj) {\n for (var key in sourceObj) {\n obj[key] = sourceObj[key];\n }\n return obj;\n}\n\nmodule.exports = extend;","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar eventEmitter = require('minimal-event-emitter');\nvar clearOwnProperties = require('./util/clearOwnProperties');\n\n/**\n * Signals that {@link Stage#render} is about to be called.\n * @event RenderLoop#beforeRender\n */\n\n/**\n * Signals that {@link Stage#render} has just been called.\n * @event RenderLoop#afterRender\n */\n\n/**\n * @class RenderLoop\n * @classdesc\n *\n * A RenderLoop wraps a {@link Stage} and calls {@link Stage#render} on the next\n * frame whenever it fires {@link Stage#renderInvalid}. It may be started and\n * stopped, and is initially in the stopped state, in which no call to\n * {@link Stage#render} occurs.\n *\n * @listens Stage#renderInvalid\n *\n * @param {Stage} stage\n */\nfunction RenderLoop(stage) {\n\n var self = this;\n\n // The stage wrapped by the loop.\n this._stage = stage;\n\n // Whether the loop is running.\n this._running = false;\n\n // Whether the loop is currently rendering.\n this._rendering = false;\n\n // The current requestAnimationFrame handle.\n this._requestHandle = null;\n\n // The callback passed into requestAnimationFrame.\n this._boundLoop = this._loop.bind(this);\n\n // Handler for renderInvalid events emitted by the stage.\n this._renderInvalidHandler = function() {\n // If we are already rendering, there's no need to schedule a new render\n // on the next frame.\n if (!self._rendering) {\n self.renderOnNextFrame();\n }\n };\n\n // Handle renderInvalid events emitted by the stage.\n this._stage.addEventListener('renderInvalid', this._renderInvalidHandler);\n\n}\n\neventEmitter(RenderLoop);\n\n\n/**\n * Destructor.\n */\nRenderLoop.prototype.destroy = function() {\n this.stop();\n this._stage.removeEventListener('renderInvalid', this._renderInvalidHandler);\n clearOwnProperties(this);\n};\n\n\n/**\n * Returns the underlying stage.\n * @return {Stage}\n */\nRenderLoop.prototype.stage = function() {\n return this._stage;\n};\n\n\n/**\n * Starts the render loop.\n */\nRenderLoop.prototype.start = function() {\n this._running = true;\n this.renderOnNextFrame();\n};\n\n\n/**\n * Stops the render loop.\n */\nRenderLoop.prototype.stop = function() {\n if (this._requestHandle) {\n window.cancelAnimationFrame(this._requestHandle);\n this._requestHandle = null;\n }\n this._running = false;\n};\n\n\n/**\n * Forces the stage to render on the next frame, even if its contents remain\n * valid. Does nothing if the loop is stopped.\n */\nRenderLoop.prototype.renderOnNextFrame = function() {\n if (this._running && !this._requestHandle) {\n this._requestHandle = window.requestAnimationFrame(this._boundLoop);\n }\n};\n\n\nRenderLoop.prototype._loop = function() {\n if (!this._running) {\n throw new Error('Render loop running while in stopped state');\n }\n this._requestHandle = null;\n this._rendering = true;\n this.emit('beforeRender');\n this._rendering = false;\n this._stage.render();\n this.emit('afterRender');\n};\n\n\nmodule.exports = RenderLoop;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar eventEmitter = require('minimal-event-emitter');\nvar Dynamics = require('./Dynamics');\nvar clearOwnProperties = require('../util/clearOwnProperties');\n\n/**\n * @class KeyControlMethod\n * @implements ControlMethod\n * @classdesc\n *\n * Sets the velocity and friction of a single parameter by pressing and\n * unpressing a key.\n *\n * @param {number} keyCode Key which activates the method when pressed\n * @param {string} parameter The parameter to be controlled (e.g. `x`, `y` or `zoom`)\n * @param {number} velocity Velocity at which the parameter changes. Use a\n * negative number for opposite direction\n * @param {number} friction Friction at which the parameter stops\n * @param {Element} [element=document] DOM element where the key events are listened to\n */\nfunction KeyControlMethod(keyCode, parameter, velocity, friction, element) {\n if(!keyCode) {\n throw new Error(\"KeyControlMethod: keyCode must be defined\");\n }\n if(!parameter) {\n throw new Error(\"KeyControlMethod: parameter must be defined\");\n }\n if(!velocity) {\n throw new Error(\"KeyControlMethod: velocity must be defined\");\n }\n if(!friction) {\n throw new Error(\"KeyControlMethod: friction must be defined\");\n }\n\n element = element || document;\n\n this._keyCode = keyCode;\n this._parameter = parameter;\n this._velocity = velocity;\n this._friction = friction;\n this._element = element;\n\n this._keydownHandler = this._handlePress.bind(this);\n this._keyupHandler = this._handleRelease.bind(this);\n this._blurHandler = this._handleBlur.bind(this);\n\n this._element.addEventListener('keydown', this._keydownHandler);\n this._element.addEventListener('keyup', this._keyupHandler);\n window.addEventListener('blur', this._blurHandler);\n\n this._dynamics = new Dynamics();\n this._pressing = false;\n}\neventEmitter(KeyControlMethod);\n\n/**\n * Destructor.\n */\nKeyControlMethod.prototype.destroy = function() {\n this._element.removeEventListener('keydown', this._keydownHandler);\n this._element.removeEventListener('keyup', this._keyupHandler);\n window.removeEventListener('blur', this._blurHandler);\n clearOwnProperties(this);\n};\n\nKeyControlMethod.prototype._handlePress = function(e) {\n if(e.keyCode !== this._keyCode) { return; }\n\n this._pressing = true;\n\n this._dynamics.velocity = this._velocity;\n this._dynamics.friction = 0;\n this.emit('parameterDynamics', this._parameter, this._dynamics);\n this.emit('active');\n};\n\nKeyControlMethod.prototype._handleRelease = function(e) {\n if(e.keyCode !== this._keyCode) { return; }\n\n if(this._pressing) {\n this._dynamics.friction = this._friction;\n this.emit('parameterDynamics', this._parameter, this._dynamics);\n this.emit('inactive');\n }\n\n this._pressing = false;\n};\n\nKeyControlMethod.prototype._handleBlur = function() {\n this._dynamics.velocity = 0;\n this.emit('parameterDynamics', this._parameter, this._dynamics);\n this.emit('inactive');\n\n this._pressing = false;\n};\n\nmodule.exports = KeyControlMethod;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\n/**\n * @class Dynamics\n * @classdesc\n *\n * Represents how a control parameter changes. Used in the events emitted by\n * {@link ControlMethod}.\n *\n * @property {number} offset Parameter changed by a fixed value\n * @property {number} velocity Parameter is changing at this velocity\n * @property {number} friction The velocity will decrease at this rate\n */\nfunction Dynamics() {\n this.velocity = null;\n this.friction = null;\n this.offset = null;\n}\n\nDynamics.equals = function(d1, d2) {\n return d1.velocity === d2.velocity && d1.friction === d2.friction && d1.offset === d2.offset;\n};\n\nDynamics.prototype.equals = function(other) {\n return Dynamics.equals(this, other);\n};\n\nDynamics.prototype.update = function(other, elapsed) {\n if (other.offset) {\n // If other has an offset, make this.offset a number instead of null\n this.offset = this.offset || 0;\n this.offset += other.offset;\n }\n\n var offsetFromVelocity = this.offsetFromVelocity(elapsed);\n if (offsetFromVelocity) {\n // If there is an offset to add from the velocity, make this offset a number instead of null\n this.offset = this.offset || 0;\n this.offset += offsetFromVelocity;\n }\n\n this.velocity = other.velocity;\n this.friction = other.friction;\n};\n\nDynamics.prototype.reset = function() {\n this.velocity = null;\n this.friction = null;\n this.offset = null;\n};\n\n\nDynamics.prototype.velocityAfter = function(elapsed) {\n if (!this.velocity) {\n return null;\n }\n if (this.friction) {\n return decreaseAbs(this.velocity, this.friction *elapsed);\n }\n return this.velocity;\n};\n\nDynamics.prototype.offsetFromVelocity = function(elapsed) {\n elapsed = Math.min(elapsed, this.nullVelocityTime());\n\n var velocityEnd = this.velocityAfter(elapsed);\n var averageVelocity = (this.velocity + velocityEnd) / 2;\n\n return averageVelocity * elapsed;\n};\n\n\nDynamics.prototype.nullVelocityTime = function() {\n if (this.velocity == null) {\n return 0;\n }\n if (this.velocity && !this.friction) {\n return Infinity;\n }\n return Math.abs(this.velocity / this.friction);\n};\n\nfunction decreaseAbs(num, dec) {\n if (num < 0) {\n return Math.min(0, num + dec);\n }\n if (num > 0) {\n return Math.max(0, num - dec);\n }\n return 0;\n}\n\nmodule.exports = Dynamics;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar eventEmitter = require('minimal-event-emitter');\nvar Dynamics = require('./Dynamics');\nvar HammerGestures = require('./HammerGestures');\nvar defaults = require('../util/defaults');\nvar maxFriction = require('./util').maxFriction;\nvar clearOwnProperties = require('../util/clearOwnProperties');\n\nvar defaultOptions = {\n friction: 6,\n maxFrictionTime: 0.3\n};\n\nvar debug = typeof MARZIPANODEBUG !== 'undefined' && MARZIPANODEBUG.controls;\n\n/**\n * @class DragControlMethod\n * @implements ControlMethod\n * @classdesc\n *\n * Controls the view by clicking/tapping and dragging.\n *\n * @param {Element} element Element to listen for events.\n * @param {string} pointerType Which Hammer.js pointer type to use (e.g.\n * `mouse` or `touch`).\n * @param {Object} opts\n * @param {number} opts.friction\n * @param {number} opts.maxFrictionTime\n */\nfunction DragControlMethod(element, pointerType, opts) {\n this._element = element;\n\n this._opts = defaults(opts || {}, defaultOptions);\n\n this._startEvent = null;\n this._lastEvent = null;\n\n this._active = false;\n\n this._dynamics = {\n x: new Dynamics(),\n y: new Dynamics()\n };\n\n this._hammer = HammerGestures.get(element, pointerType);\n\n this._hammer.on(\"hammer.input\", this._handleHammerEvent.bind(this));\n\n this._hammer.on('panstart', this._handleStart.bind(this));\n this._hammer.on('panmove', this._handleMove.bind(this));\n this._hammer.on('panend', this._handleEnd.bind(this));\n this._hammer.on('pancancel', this._handleEnd.bind(this));\n\n}\n\neventEmitter(DragControlMethod);\n\n/**\n * Destructor.\n */\nDragControlMethod.prototype.destroy = function() {\n this._hammer.release();\n clearOwnProperties(this);\n};\n\nDragControlMethod.prototype._handleHammerEvent = function(e) {\n if (e.isFirst) {\n if (debug && this._active) {\n throw new Error('DragControlMethod active detected when already active');\n }\n this._active = true;\n this.emit('active');\n }\n if (e.isFinal) {\n if (debug && !this._active) {\n throw new Error('DragControlMethod inactive detected when already inactive');\n }\n this._active = false;\n this.emit('inactive');\n }\n};\n\nDragControlMethod.prototype._handleStart = function(e) {\n // Prevent this event from dragging other DOM elements, causing\n // unexpected behavior on Chrome.\n e.preventDefault();\n\n this._startEvent = e;\n};\n\n\nDragControlMethod.prototype._handleMove = function(e) {\n // Prevent this event from dragging other DOM elements, causing\n // unexpected behavior on Chrome.\n e.preventDefault();\n\n if (this._startEvent) {\n this._updateDynamicsMove(e);\n this.emit('parameterDynamics', 'axisScaledX', this._dynamics.x);\n this.emit('parameterDynamics', 'axisScaledY', this._dynamics.y);\n }\n};\n\n\nDragControlMethod.prototype._handleEnd = function(e) {\n // Prevent this event from dragging other DOM elements, causing\n // unexpected behavior on Chrome.\n e.preventDefault();\n\n if (this._startEvent) {\n this._updateDynamicsRelease(e);\n this.emit('parameterDynamics', 'axisScaledX', this._dynamics.x);\n this.emit('parameterDynamics', 'axisScaledY', this._dynamics.y);\n }\n\n this._startEvent = false;\n this._lastEvent = false;\n};\n\n\nDragControlMethod.prototype._updateDynamicsMove = function(e) {\n var x = e.deltaX;\n var y = e.deltaY;\n\n // When a second finger touches the screen, panstart sometimes has a large\n // offset at start; subtract that offset to prevent a sudden jump.\n var eventToSubtract = this._lastEvent || this._startEvent;\n\n if (eventToSubtract) {\n x -= eventToSubtract.deltaX;\n y -= eventToSubtract.deltaY;\n }\n\n var elementRect = this._element.getBoundingClientRect();\n var width = elementRect.right - elementRect.left;\n var height = elementRect.bottom - elementRect.top;\n\n x /= width;\n y /= height;\n\n this._dynamics.x.reset();\n this._dynamics.y.reset();\n this._dynamics.x.offset = -x;\n this._dynamics.y.offset = -y;\n\n this._lastEvent = e;\n};\n\n\nvar tmpReleaseFriction = [ null, null ];\nDragControlMethod.prototype._updateDynamicsRelease = function(e) {\n var elementRect = this._element.getBoundingClientRect();\n var width = elementRect.right - elementRect.left;\n var height = elementRect.bottom - elementRect.top;\n\n var x = 1000 * e.velocityX / width;\n var y = 1000 * e.velocityY / height;\n\n this._dynamics.x.reset();\n this._dynamics.y.reset();\n this._dynamics.x.velocity = x;\n this._dynamics.y.velocity = y;\n\n maxFriction(this._opts.friction, this._dynamics.x.velocity, this._dynamics.y.velocity, this._opts.maxFrictionTime, tmpReleaseFriction);\n this._dynamics.x.friction = tmpReleaseFriction[0];\n this._dynamics.y.friction = tmpReleaseFriction[1];\n};\n\n\nmodule.exports = DragControlMethod;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar Hammer = require('hammerjs');\nvar browser = require('bowser');\n\nvar nextId = 1;\nvar idProperty = 'MarzipanoHammerElementId';\nfunction getKeyForElementAndType(element, type) {\n if (!element[idProperty]) {\n element[idProperty] = nextId++;\n }\n return type + element[idProperty];\n}\n\n\n/**\n * @class HammerGestures\n * @classdesc\n *\n * Manages Hammer.js instances. One instance is created for each combination of\n * DOM element and pointer type.\n */\nfunction HammerGestures() {\n this._managers = {};\n this._refCount = {};\n}\n\n\nHammerGestures.prototype.get = function(element, type) {\n var key = getKeyForElementAndType(element, type);\n if (!this._managers[key]) {\n this._managers[key] = this._createManager(element, type);\n this._refCount[key] = 0;\n }\n this._refCount[key]++;\n return new HammerGesturesHandle(this, this._managers[key], element, type);\n};\n\n\nHammerGestures.prototype._createManager = function(element, type) {\n var manager = new Hammer.Manager(element);\n\n // Managers are created with different parameters for different pointer\n // types.\n if (type === 'mouse') {\n manager.add(new Hammer.Pan({ direction: Hammer.DIRECTION_ALL, threshold: 0 }));\n }\n else if (type === 'touch' || type === 'pen' || type === 'kinect') {\n // On touch one wants to have both panning and pinching. The panning\n // recognizer needs a threshold to allow the pinch to be recognized.\n manager.add(new Hammer.Pan({ direction: Hammer.DIRECTION_ALL, threshold: 20, pointers: 1 }));\n if (!(browser.msie && parseFloat(browser.version) < 10)) {\n // Do not add pinch to IE8-9 to prevent focus issues which prevent wheel scrolling from\n // working.\n manager.add(new Hammer.Pinch());\n }\n }\n\n return manager;\n};\n\n\nHammerGestures.prototype._releaseHandle = function(element, type) {\n var key = getKeyForElementAndType(element, type);\n if (this._refCount[key]) {\n this._refCount[key]--;\n if (!this._refCount[key]) {\n this._managers[key].destroy();\n delete this._managers[key];\n delete this._refCount[key];\n }\n }\n};\n\n\nfunction HammerGesturesHandle(hammerGestures, manager, element, type) {\n this._manager = manager;\n this._element = element;\n this._type = type;\n this._hammerGestures = hammerGestures;\n this._eventHandlers = [];\n}\n\n\nHammerGesturesHandle.prototype.on = function(events, handler) {\n var type = this._type;\n var handlerFilteredEvents = function(e) {\n if (type === e.pointerType) {\n handler(e);\n }\n };\n\n this._eventHandlers.push({ events: events, handler: handlerFilteredEvents });\n this._manager.on(events, handlerFilteredEvents);\n};\n\n\nHammerGesturesHandle.prototype.release = function() {\n for (var i = 0; i < this._eventHandlers.length; i++) {\n var eventHandler = this._eventHandlers[i];\n this._manager.off(eventHandler.events, eventHandler.handler);\n }\n\n this._hammerGestures._releaseHandle(this._element, this._type);\n this._manager = null;\n this._element = null;\n this._type = null;\n this._hammerGestures = null;\n};\n\n\nHammerGesturesHandle.prototype.manager = function() {\n return this._manager;\n};\n\n\nmodule.exports = new HammerGestures();\n","/*! Hammer.JS - v2.0.4 - 2014-09-28\r\n * http://hammerjs.github.io/\r\n *\r\n * Copyright (c) 2014 Jorik Tangelder;\r\n * Licensed under the MIT license */\r\n(function(window, document, exportName, undefined) {\r\n 'use strict';\r\n\r\nvar VENDOR_PREFIXES = ['', 'webkit', 'moz', 'MS', 'ms', 'o'];\r\nvar TEST_ELEMENT = document.createElement('div');\r\n\r\nvar TYPE_FUNCTION = 'function';\r\n\r\nvar round = Math.round;\r\nvar abs = Math.abs;\r\nvar now = Date.now;\r\n\r\n/**\r\n * set a timeout with a given scope\r\n * @param {Function} fn\r\n * @param {Number} timeout\r\n * @param {Object} context\r\n * @returns {number}\r\n */\r\nfunction setTimeoutContext(fn, timeout, context) {\r\n return setTimeout(bindFn(fn, context), timeout);\r\n}\r\n\r\n/**\r\n * if the argument is an array, we want to execute the fn on each entry\r\n * if it aint an array we don't want to do a thing.\r\n * this is used by all the methods that accept a single and array argument.\r\n * @param {*|Array} arg\r\n * @param {String} fn\r\n * @param {Object} [context]\r\n * @returns {Boolean}\r\n */\r\nfunction invokeArrayArg(arg, fn, context) {\r\n if (Array.isArray(arg)) {\r\n each(arg, context[fn], context);\r\n return true;\r\n }\r\n return false;\r\n}\r\n\r\n/**\r\n * walk objects and arrays\r\n * @param {Object} obj\r\n * @param {Function} iterator\r\n * @param {Object} context\r\n */\r\nfunction each(obj, iterator, context) {\r\n var i;\r\n\r\n if (!obj) {\r\n return;\r\n }\r\n\r\n if (obj.forEach) {\r\n obj.forEach(iterator, context);\r\n } else if (obj.length !== undefined) {\r\n i = 0;\r\n while (i < obj.length) {\r\n iterator.call(context, obj[i], i, obj);\r\n i++;\r\n }\r\n } else {\r\n for (i in obj) {\r\n obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj);\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * extend object.\r\n * means that properties in dest will be overwritten by the ones in src.\r\n * @param {Object} dest\r\n * @param {Object} src\r\n * @param {Boolean} [merge]\r\n * @returns {Object} dest\r\n */\r\nfunction extend(dest, src, merge) {\r\n var keys = Object.keys(src);\r\n var i = 0;\r\n while (i < keys.length) {\r\n if (!merge || (merge && dest[keys[i]] === undefined)) {\r\n dest[keys[i]] = src[keys[i]];\r\n }\r\n i++;\r\n }\r\n return dest;\r\n}\r\n\r\n/**\r\n * merge the values from src in the dest.\r\n * means that properties that exist in dest will not be overwritten by src\r\n * @param {Object} dest\r\n * @param {Object} src\r\n * @returns {Object} dest\r\n */\r\nfunction merge(dest, src) {\r\n return extend(dest, src, true);\r\n}\r\n\r\n/**\r\n * simple class inheritance\r\n * @param {Function} child\r\n * @param {Function} base\r\n * @param {Object} [properties]\r\n */\r\nfunction inherit(child, base, properties) {\r\n var baseP = base.prototype,\r\n childP;\r\n\r\n childP = child.prototype = Object.create(baseP);\r\n childP.constructor = child;\r\n childP._super = baseP;\r\n\r\n if (properties) {\r\n extend(childP, properties);\r\n }\r\n}\r\n\r\n/**\r\n * simple function bind\r\n * @param {Function} fn\r\n * @param {Object} context\r\n * @returns {Function}\r\n */\r\nfunction bindFn(fn, context) {\r\n return function boundFn() {\r\n return fn.apply(context, arguments);\r\n };\r\n}\r\n\r\n/**\r\n * let a boolean value also be a function that must return a boolean\r\n * this first item in args will be used as the context\r\n * @param {Boolean|Function} val\r\n * @param {Array} [args]\r\n * @returns {Boolean}\r\n */\r\nfunction boolOrFn(val, args) {\r\n if (typeof val == TYPE_FUNCTION) {\r\n return val.apply(args ? args[0] || undefined : undefined, args);\r\n }\r\n return val;\r\n}\r\n\r\n/**\r\n * use the val2 when val1 is undefined\r\n * @param {*} val1\r\n * @param {*} val2\r\n * @returns {*}\r\n */\r\nfunction ifUndefined(val1, val2) {\r\n return (val1 === undefined) ? val2 : val1;\r\n}\r\n\r\n/**\r\n * addEventListener with multiple events at once\r\n * @param {EventTarget} target\r\n * @param {String} types\r\n * @param {Function} handler\r\n */\r\nfunction addEventListeners(target, types, handler) {\r\n each(splitStr(types), function(type) {\r\n target.addEventListener(type, handler, false);\r\n });\r\n}\r\n\r\n/**\r\n * removeEventListener with multiple events at once\r\n * @param {EventTarget} target\r\n * @param {String} types\r\n * @param {Function} handler\r\n */\r\nfunction removeEventListeners(target, types, handler) {\r\n each(splitStr(types), function(type) {\r\n target.removeEventListener(type, handler, false);\r\n });\r\n}\r\n\r\n/**\r\n * find if a node is in the given parent\r\n * @method hasParent\r\n * @param {HTMLElement} node\r\n * @param {HTMLElement} parent\r\n * @return {Boolean} found\r\n */\r\nfunction hasParent(node, parent) {\r\n while (node) {\r\n if (node == parent) {\r\n return true;\r\n }\r\n node = node.parentNode;\r\n }\r\n return false;\r\n}\r\n\r\n/**\r\n * small indexOf wrapper\r\n * @param {String} str\r\n * @param {String} find\r\n * @returns {Boolean} found\r\n */\r\nfunction inStr(str, find) {\r\n return str.indexOf(find) > -1;\r\n}\r\n\r\n/**\r\n * split string on whitespace\r\n * @param {String} str\r\n * @returns {Array} words\r\n */\r\nfunction splitStr(str) {\r\n return str.trim().split(/\\s+/g);\r\n}\r\n\r\n/**\r\n * find if a array contains the object using indexOf or a simple polyFill\r\n * @param {Array} src\r\n * @param {String} find\r\n * @param {String} [findByKey]\r\n * @return {Boolean|Number} false when not found, or the index\r\n */\r\nfunction inArray(src, find, findByKey) {\r\n if (src.indexOf && !findByKey) {\r\n return src.indexOf(find);\r\n } else {\r\n var i = 0;\r\n while (i < src.length) {\r\n if ((findByKey && src[i][findByKey] == find) || (!findByKey && src[i] === find)) {\r\n return i;\r\n }\r\n i++;\r\n }\r\n return -1;\r\n }\r\n}\r\n\r\n/**\r\n * convert array-like objects to real arrays\r\n * @param {Object} obj\r\n * @returns {Array}\r\n */\r\nfunction toArray(obj) {\r\n return Array.prototype.slice.call(obj, 0);\r\n}\r\n\r\n/**\r\n * unique array with objects based on a key (like 'id') or just by the array's value\r\n * @param {Array} src [{id:1},{id:2},{id:1}]\r\n * @param {String} [key]\r\n * @param {Boolean} [sort=False]\r\n * @returns {Array} [{id:1},{id:2}]\r\n */\r\nfunction uniqueArray(src, key, sort) {\r\n var results = [];\r\n var values = [];\r\n var i = 0;\r\n\r\n while (i < src.length) {\r\n var val = key ? src[i][key] : src[i];\r\n if (inArray(values, val) < 0) {\r\n results.push(src[i]);\r\n }\r\n values[i] = val;\r\n i++;\r\n }\r\n\r\n if (sort) {\r\n if (!key) {\r\n results = results.sort();\r\n } else {\r\n results = results.sort(function sortUniqueArray(a, b) {\r\n return a[key] > b[key];\r\n });\r\n }\r\n }\r\n\r\n return results;\r\n}\r\n\r\n/**\r\n * get the prefixed property\r\n * @param {Object} obj\r\n * @param {String} property\r\n * @returns {String|Undefined} prefixed\r\n */\r\nfunction prefixed(obj, property) {\r\n var prefix, prop;\r\n var camelProp = property[0].toUpperCase() + property.slice(1);\r\n\r\n var i = 0;\r\n while (i < VENDOR_PREFIXES.length) {\r\n prefix = VENDOR_PREFIXES[i];\r\n prop = (prefix) ? prefix + camelProp : property;\r\n\r\n if (prop in obj) {\r\n return prop;\r\n }\r\n i++;\r\n }\r\n return undefined;\r\n}\r\n\r\n/**\r\n * get a unique id\r\n * @returns {number} uniqueId\r\n */\r\nvar _uniqueId = 1;\r\nfunction uniqueId() {\r\n return _uniqueId++;\r\n}\r\n\r\n/**\r\n * get the window object of an element\r\n * @param {HTMLElement} element\r\n * @returns {DocumentView|Window}\r\n */\r\nfunction getWindowForElement(element) {\r\n var doc = element.ownerDocument;\r\n return (doc.defaultView || doc.parentWindow);\r\n}\r\n\r\nvar MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i;\r\n\r\nvar SUPPORT_TOUCH = ('ontouchstart' in window);\r\nvar SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined;\r\nvar SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent);\r\n\r\nvar INPUT_TYPE_TOUCH = 'touch';\r\nvar INPUT_TYPE_PEN = 'pen';\r\nvar INPUT_TYPE_MOUSE = 'mouse';\r\nvar INPUT_TYPE_KINECT = 'kinect';\r\n\r\nvar COMPUTE_INTERVAL = 25;\r\n\r\nvar INPUT_START = 1;\r\nvar INPUT_MOVE = 2;\r\nvar INPUT_END = 4;\r\nvar INPUT_CANCEL = 8;\r\n\r\nvar DIRECTION_NONE = 1;\r\nvar DIRECTION_LEFT = 2;\r\nvar DIRECTION_RIGHT = 4;\r\nvar DIRECTION_UP = 8;\r\nvar DIRECTION_DOWN = 16;\r\n\r\nvar DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT;\r\nvar DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN;\r\nvar DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL;\r\n\r\nvar PROPS_XY = ['x', 'y'];\r\nvar PROPS_CLIENT_XY = ['clientX', 'clientY'];\r\n\r\n/**\r\n * create new input type manager\r\n * @param {Manager} manager\r\n * @param {Function} callback\r\n * @returns {Input}\r\n * @constructor\r\n */\r\nfunction Input(manager, callback) {\r\n var self = this;\r\n this.manager = manager;\r\n this.callback = callback;\r\n this.element = manager.element;\r\n this.target = manager.options.inputTarget;\r\n\r\n // smaller wrapper around the handler, for the scope and the enabled state of the manager,\r\n // so when disabled the input events are completely bypassed.\r\n this.domHandler = function(ev) {\r\n if (boolOrFn(manager.options.enable, [manager])) {\r\n self.handler(ev);\r\n }\r\n };\r\n\r\n this.init();\r\n\r\n}\r\n\r\nInput.prototype = {\r\n /**\r\n * should handle the inputEvent data and trigger the callback\r\n * @virtual\r\n */\r\n handler: function() { },\r\n\r\n /**\r\n * bind the events\r\n */\r\n init: function() {\r\n this.evEl && addEventListeners(this.element, this.evEl, this.domHandler);\r\n this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler);\r\n this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\r\n },\r\n\r\n /**\r\n * unbind the events\r\n */\r\n destroy: function() {\r\n this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler);\r\n this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler);\r\n this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\r\n }\r\n};\r\n\r\n/**\r\n * create new input type manager\r\n * called by the Manager constructor\r\n * @param {Hammer} manager\r\n * @returns {Input}\r\n */\r\nfunction createInputInstance(manager) {\r\n var Type;\r\n var inputClass = manager.options.inputClass;\r\n\r\n if (inputClass) {\r\n Type = inputClass;\r\n } else if (SUPPORT_POINTER_EVENTS) {\r\n Type = PointerEventInput;\r\n } else if (SUPPORT_ONLY_TOUCH) {\r\n Type = TouchInput;\r\n } else if (!SUPPORT_TOUCH) {\r\n Type = MouseInput;\r\n } else {\r\n Type = TouchMouseInput;\r\n }\r\n return new (Type)(manager, inputHandler);\r\n}\r\n\r\n/**\r\n * handle input events\r\n * @param {Manager} manager\r\n * @param {String} eventType\r\n * @param {Object} input\r\n */\r\nfunction inputHandler(manager, eventType, input) {\r\n var pointersLen = input.pointers.length;\r\n var changedPointersLen = input.changedPointers.length;\r\n var isFirst = (eventType & INPUT_START && (pointersLen - changedPointersLen === 0));\r\n var isFinal = (eventType & (INPUT_END | INPUT_CANCEL) && (pointersLen - changedPointersLen === 0));\r\n\r\n input.isFirst = !!isFirst;\r\n input.isFinal = !!isFinal;\r\n\r\n if (isFirst) {\r\n manager.session = {};\r\n }\r\n\r\n // source event is the normalized value of the domEvents\r\n // like 'touchstart, mouseup, pointerdown'\r\n input.eventType = eventType;\r\n\r\n // compute scale, rotation etc\r\n computeInputData(manager, input);\r\n\r\n // emit secret event\r\n manager.emit('hammer.input', input);\r\n\r\n manager.recognize(input);\r\n manager.session.prevInput = input;\r\n}\r\n\r\n/**\r\n * extend the data with some usable properties like scale, rotate, velocity etc\r\n * @param {Object} manager\r\n * @param {Object} input\r\n */\r\nfunction computeInputData(manager, input) {\r\n var session = manager.session;\r\n var pointers = input.pointers;\r\n var pointersLength = pointers.length;\r\n\r\n // store the first input to calculate the distance and direction\r\n if (!session.firstInput) {\r\n session.firstInput = simpleCloneInputData(input);\r\n }\r\n\r\n // to compute scale and rotation we need to store the multiple touches\r\n if (pointersLength > 1 && !session.firstMultiple) {\r\n session.firstMultiple = simpleCloneInputData(input);\r\n } else if (pointersLength === 1) {\r\n session.firstMultiple = false;\r\n }\r\n\r\n var firstInput = session.firstInput;\r\n var firstMultiple = session.firstMultiple;\r\n var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center;\r\n\r\n var center = input.center = getCenter(pointers);\r\n input.timeStamp = now();\r\n input.deltaTime = input.timeStamp - firstInput.timeStamp;\r\n\r\n input.angle = getAngle(offsetCenter, center);\r\n input.distance = getDistance(offsetCenter, center);\r\n\r\n computeDeltaXY(session, input);\r\n input.offsetDirection = getDirection(input.deltaX, input.deltaY);\r\n\r\n input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1;\r\n input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0;\r\n\r\n computeIntervalInputData(session, input);\r\n\r\n // find the correct target\r\n var target = manager.element;\r\n if (hasParent(input.srcEvent.target, target)) {\r\n target = input.srcEvent.target;\r\n }\r\n input.target = target;\r\n}\r\n\r\nfunction computeDeltaXY(session, input) {\r\n var center = input.center;\r\n var offset = session.offsetDelta || {};\r\n var prevDelta = session.prevDelta || {};\r\n var prevInput = session.prevInput || {};\r\n\r\n if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) {\r\n prevDelta = session.prevDelta = {\r\n x: prevInput.deltaX || 0,\r\n y: prevInput.deltaY || 0\r\n };\r\n\r\n offset = session.offsetDelta = {\r\n x: center.x,\r\n y: center.y\r\n };\r\n }\r\n\r\n input.deltaX = prevDelta.x + (center.x - offset.x);\r\n input.deltaY = prevDelta.y + (center.y - offset.y);\r\n}\r\n\r\n/**\r\n * velocity is calculated every x ms\r\n * @param {Object} session\r\n * @param {Object} input\r\n */\r\nfunction computeIntervalInputData(session, input) {\r\n var last = session.lastInterval || input,\r\n deltaTime = input.timeStamp - last.timeStamp,\r\n velocity, velocityX, velocityY, direction;\r\n\r\n if (input.eventType != INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) {\r\n var deltaX = last.deltaX - input.deltaX;\r\n var deltaY = last.deltaY - input.deltaY;\r\n\r\n var v = getVelocity(deltaTime, deltaX, deltaY);\r\n velocityX = v.x;\r\n velocityY = v.y;\r\n velocity = (abs(v.x) > abs(v.y)) ? v.x : v.y;\r\n direction = getDirection(deltaX, deltaY);\r\n\r\n session.lastInterval = input;\r\n } else {\r\n // use latest velocity info if it doesn't overtake a minimum period\r\n velocity = last.velocity;\r\n velocityX = last.velocityX;\r\n velocityY = last.velocityY;\r\n direction = last.direction;\r\n }\r\n\r\n input.velocity = velocity;\r\n input.velocityX = velocityX;\r\n input.velocityY = velocityY;\r\n input.direction = direction;\r\n}\r\n\r\n/**\r\n * create a simple clone from the input used for storage of firstInput and firstMultiple\r\n * @param {Object} input\r\n * @returns {Object} clonedInputData\r\n */\r\nfunction simpleCloneInputData(input) {\r\n // make a simple copy of the pointers because we will get a reference if we don't\r\n // we only need clientXY for the calculations\r\n var pointers = [];\r\n var i = 0;\r\n while (i < input.pointers.length) {\r\n pointers[i] = {\r\n clientX: round(input.pointers[i].clientX),\r\n clientY: round(input.pointers[i].clientY)\r\n };\r\n i++;\r\n }\r\n\r\n return {\r\n timeStamp: now(),\r\n pointers: pointers,\r\n center: getCenter(pointers),\r\n deltaX: input.deltaX,\r\n deltaY: input.deltaY\r\n };\r\n}\r\n\r\n/**\r\n * get the center of all the pointers\r\n * @param {Array} pointers\r\n * @return {Object} center contains `x` and `y` properties\r\n */\r\nfunction getCenter(pointers) {\r\n var pointersLength = pointers.length;\r\n\r\n // no need to loop when only one touch\r\n if (pointersLength === 1) {\r\n return {\r\n x: round(pointers[0].clientX),\r\n y: round(pointers[0].clientY)\r\n };\r\n }\r\n\r\n var x = 0, y = 0, i = 0;\r\n while (i < pointersLength) {\r\n x += pointers[i].clientX;\r\n y += pointers[i].clientY;\r\n i++;\r\n }\r\n\r\n return {\r\n x: round(x / pointersLength),\r\n y: round(y / pointersLength)\r\n };\r\n}\r\n\r\n/**\r\n * calculate the velocity between two points. unit is in px per ms.\r\n * @param {Number} deltaTime\r\n * @param {Number} x\r\n * @param {Number} y\r\n * @return {Object} velocity `x` and `y`\r\n */\r\nfunction getVelocity(deltaTime, x, y) {\r\n return {\r\n x: x / deltaTime || 0,\r\n y: y / deltaTime || 0\r\n };\r\n}\r\n\r\n/**\r\n * get the direction between two points\r\n * @param {Number} x\r\n * @param {Number} y\r\n * @return {Number} direction\r\n */\r\nfunction getDirection(x, y) {\r\n if (x === y) {\r\n return DIRECTION_NONE;\r\n }\r\n\r\n if (abs(x) >= abs(y)) {\r\n return x > 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;\r\n }\r\n return y > 0 ? DIRECTION_UP : DIRECTION_DOWN;\r\n}\r\n\r\n/**\r\n * calculate the absolute distance between two points\r\n * @param {Object} p1 {x, y}\r\n * @param {Object} p2 {x, y}\r\n * @param {Array} [props] containing x and y keys\r\n * @return {Number} distance\r\n */\r\nfunction getDistance(p1, p2, props) {\r\n if (!props) {\r\n props = PROPS_XY;\r\n }\r\n var x = p2[props[0]] - p1[props[0]],\r\n y = p2[props[1]] - p1[props[1]];\r\n\r\n return Math.sqrt((x * x) + (y * y));\r\n}\r\n\r\n/**\r\n * calculate the angle between two coordinates\r\n * @param {Object} p1\r\n * @param {Object} p2\r\n * @param {Array} [props] containing x and y keys\r\n * @return {Number} angle\r\n */\r\nfunction getAngle(p1, p2, props) {\r\n if (!props) {\r\n props = PROPS_XY;\r\n }\r\n var x = p2[props[0]] - p1[props[0]],\r\n y = p2[props[1]] - p1[props[1]];\r\n return Math.atan2(y, x) * 180 / Math.PI;\r\n}\r\n\r\n/**\r\n * calculate the rotation degrees between two pointersets\r\n * @param {Array} start array of pointers\r\n * @param {Array} end array of pointers\r\n * @return {Number} rotation\r\n */\r\nfunction getRotation(start, end) {\r\n return getAngle(end[1], end[0], PROPS_CLIENT_XY) - getAngle(start[1], start[0], PROPS_CLIENT_XY);\r\n}\r\n\r\n/**\r\n * calculate the scale factor between two pointersets\r\n * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out\r\n * @param {Array} start array of pointers\r\n * @param {Array} end array of pointers\r\n * @return {Number} scale\r\n */\r\nfunction getScale(start, end) {\r\n return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY);\r\n}\r\n\r\nvar MOUSE_INPUT_MAP = {\r\n mousedown: INPUT_START,\r\n mousemove: INPUT_MOVE,\r\n mouseup: INPUT_END\r\n};\r\n\r\nvar MOUSE_ELEMENT_EVENTS = 'mousedown';\r\nvar MOUSE_WINDOW_EVENTS = 'mousemove mouseup';\r\n\r\n/**\r\n * Mouse events input\r\n * @constructor\r\n * @extends Input\r\n */\r\nfunction MouseInput() {\r\n this.evEl = MOUSE_ELEMENT_EVENTS;\r\n this.evWin = MOUSE_WINDOW_EVENTS;\r\n\r\n this.allow = true; // used by Input.TouchMouse to disable mouse events\r\n this.pressed = false; // mousedown state\r\n\r\n Input.apply(this, arguments);\r\n}\r\n\r\ninherit(MouseInput, Input, {\r\n /**\r\n * handle mouse events\r\n * @param {Object} ev\r\n */\r\n handler: function MEhandler(ev) {\r\n var eventType = MOUSE_INPUT_MAP[ev.type];\r\n\r\n // on start we want to have the left mouse button down\r\n if (eventType & INPUT_START && ev.button === 0) {\r\n this.pressed = true;\r\n }\r\n\r\n if (eventType & INPUT_MOVE && ev.which !== 1) {\r\n eventType = INPUT_END;\r\n }\r\n\r\n // mouse must be down, and mouse events are allowed (see the TouchMouse input)\r\n if (!this.pressed || !this.allow) {\r\n return;\r\n }\r\n\r\n if (eventType & INPUT_END) {\r\n this.pressed = false;\r\n }\r\n\r\n this.callback(this.manager, eventType, {\r\n pointers: [ev],\r\n changedPointers: [ev],\r\n pointerType: INPUT_TYPE_MOUSE,\r\n srcEvent: ev\r\n });\r\n }\r\n});\r\n\r\nvar POINTER_INPUT_MAP = {\r\n pointerdown: INPUT_START,\r\n pointermove: INPUT_MOVE,\r\n pointerup: INPUT_END,\r\n pointercancel: INPUT_CANCEL,\r\n pointerout: INPUT_CANCEL\r\n};\r\n\r\n// in IE10 the pointer types is defined as an enum\r\nvar IE10_POINTER_TYPE_ENUM = {\r\n 2: INPUT_TYPE_TOUCH,\r\n 3: INPUT_TYPE_PEN,\r\n 4: INPUT_TYPE_MOUSE,\r\n 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816\r\n};\r\n\r\nvar POINTER_ELEMENT_EVENTS = 'pointerdown';\r\nvar POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel';\r\n\r\n// IE10 has prefixed support, and case-sensitive\r\nif (window.MSPointerEvent) {\r\n POINTER_ELEMENT_EVENTS = 'MSPointerDown';\r\n POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel';\r\n}\r\n\r\n/**\r\n * Pointer events input\r\n * @constructor\r\n * @extends Input\r\n */\r\nfunction PointerEventInput() {\r\n this.evEl = POINTER_ELEMENT_EVENTS;\r\n this.evWin = POINTER_WINDOW_EVENTS;\r\n\r\n Input.apply(this, arguments);\r\n\r\n this.store = (this.manager.session.pointerEvents = []);\r\n}\r\n\r\ninherit(PointerEventInput, Input, {\r\n /**\r\n * handle mouse events\r\n * @param {Object} ev\r\n */\r\n handler: function PEhandler(ev) {\r\n var store = this.store;\r\n var removePointer = false;\r\n\r\n var eventTypeNormalized = ev.type.toLowerCase().replace('ms', '');\r\n var eventType = POINTER_INPUT_MAP[eventTypeNormalized];\r\n var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType;\r\n\r\n var isTouch = (pointerType == INPUT_TYPE_TOUCH);\r\n\r\n // get index of the event in the store\r\n var storeIndex = inArray(store, ev.pointerId, 'pointerId');\r\n\r\n // start and mouse must be down\r\n if (eventType & INPUT_START && (ev.button === 0 || isTouch)) {\r\n if (storeIndex < 0) {\r\n store.push(ev);\r\n storeIndex = store.length - 1;\r\n }\r\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\r\n removePointer = true;\r\n }\r\n\r\n // it not found, so the pointer hasn't been down (so it's probably a hover)\r\n if (storeIndex < 0) {\r\n return;\r\n }\r\n\r\n // update the event in the store\r\n store[storeIndex] = ev;\r\n\r\n this.callback(this.manager, eventType, {\r\n pointers: store,\r\n changedPointers: [ev],\r\n pointerType: pointerType,\r\n srcEvent: ev\r\n });\r\n\r\n if (removePointer) {\r\n // remove from the store\r\n store.splice(storeIndex, 1);\r\n }\r\n }\r\n});\r\n\r\nvar SINGLE_TOUCH_INPUT_MAP = {\r\n touchstart: INPUT_START,\r\n touchmove: INPUT_MOVE,\r\n touchend: INPUT_END,\r\n touchcancel: INPUT_CANCEL\r\n};\r\n\r\nvar SINGLE_TOUCH_TARGET_EVENTS = 'touchstart';\r\nvar SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel';\r\n\r\n/**\r\n * Touch events input\r\n * @constructor\r\n * @extends Input\r\n */\r\nfunction SingleTouchInput() {\r\n this.evTarget = SINGLE_TOUCH_TARGET_EVENTS;\r\n this.evWin = SINGLE_TOUCH_WINDOW_EVENTS;\r\n this.started = false;\r\n\r\n Input.apply(this, arguments);\r\n}\r\n\r\ninherit(SingleTouchInput, Input, {\r\n handler: function TEhandler(ev) {\r\n var type = SINGLE_TOUCH_INPUT_MAP[ev.type];\r\n\r\n // should we handle the touch events?\r\n if (type === INPUT_START) {\r\n this.started = true;\r\n }\r\n\r\n if (!this.started) {\r\n return;\r\n }\r\n\r\n var touches = normalizeSingleTouches.call(this, ev, type);\r\n\r\n // when done, reset the started state\r\n if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) {\r\n this.started = false;\r\n }\r\n\r\n this.callback(this.manager, type, {\r\n pointers: touches[0],\r\n changedPointers: touches[1],\r\n pointerType: INPUT_TYPE_TOUCH,\r\n srcEvent: ev\r\n });\r\n }\r\n});\r\n\r\n/**\r\n * @this {TouchInput}\r\n * @param {Object} ev\r\n * @param {Number} type flag\r\n * @returns {undefined|Array} [all, changed]\r\n */\r\nfunction normalizeSingleTouches(ev, type) {\r\n var all = toArray(ev.touches);\r\n var changed = toArray(ev.changedTouches);\r\n\r\n if (type & (INPUT_END | INPUT_CANCEL)) {\r\n all = uniqueArray(all.concat(changed), 'identifier', true);\r\n }\r\n\r\n return [all, changed];\r\n}\r\n\r\nvar TOUCH_INPUT_MAP = {\r\n touchstart: INPUT_START,\r\n touchmove: INPUT_MOVE,\r\n touchend: INPUT_END,\r\n touchcancel: INPUT_CANCEL\r\n};\r\n\r\nvar TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel';\r\n\r\n/**\r\n * Multi-user touch events input\r\n * @constructor\r\n * @extends Input\r\n */\r\nfunction TouchInput() {\r\n this.evTarget = TOUCH_TARGET_EVENTS;\r\n this.targetIds = {};\r\n\r\n Input.apply(this, arguments);\r\n}\r\n\r\ninherit(TouchInput, Input, {\r\n handler: function MTEhandler(ev) {\r\n var type = TOUCH_INPUT_MAP[ev.type];\r\n var touches = getTouches.call(this, ev, type);\r\n if (!touches) {\r\n return;\r\n }\r\n\r\n this.callback(this.manager, type, {\r\n pointers: touches[0],\r\n changedPointers: touches[1],\r\n pointerType: INPUT_TYPE_TOUCH,\r\n srcEvent: ev\r\n });\r\n }\r\n});\r\n\r\n/**\r\n * @this {TouchInput}\r\n * @param {Object} ev\r\n * @param {Number} type flag\r\n * @returns {undefined|Array} [all, changed]\r\n */\r\nfunction getTouches(ev, type) {\r\n var allTouches = toArray(ev.touches);\r\n var targetIds = this.targetIds;\r\n\r\n // when there is only one touch, the process can be simplified\r\n if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) {\r\n targetIds[allTouches[0].identifier] = true;\r\n return [allTouches, allTouches];\r\n }\r\n\r\n var i,\r\n targetTouches,\r\n changedTouches = toArray(ev.changedTouches),\r\n changedTargetTouches = [],\r\n target = this.target;\r\n\r\n // get target touches from touches\r\n targetTouches = allTouches.filter(function(touch) {\r\n return hasParent(touch.target, target);\r\n });\r\n\r\n // collect touches\r\n if (type === INPUT_START) {\r\n i = 0;\r\n while (i < targetTouches.length) {\r\n targetIds[targetTouches[i].identifier] = true;\r\n i++;\r\n }\r\n }\r\n\r\n // filter changed touches to only contain touches that exist in the collected target ids\r\n i = 0;\r\n while (i < changedTouches.length) {\r\n if (targetIds[changedTouches[i].identifier]) {\r\n changedTargetTouches.push(changedTouches[i]);\r\n }\r\n\r\n // cleanup removed touches\r\n if (type & (INPUT_END | INPUT_CANCEL)) {\r\n delete targetIds[changedTouches[i].identifier];\r\n }\r\n i++;\r\n }\r\n\r\n if (!changedTargetTouches.length) {\r\n return;\r\n }\r\n\r\n return [\r\n // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'\r\n uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true),\r\n changedTargetTouches\r\n ];\r\n}\r\n\r\n/**\r\n * Combined touch and mouse input\r\n *\r\n * Touch has a higher priority then mouse, and while touching no mouse events are allowed.\r\n * This because touch devices also emit mouse events while doing a touch.\r\n *\r\n * @constructor\r\n * @extends Input\r\n */\r\nfunction TouchMouseInput() {\r\n Input.apply(this, arguments);\r\n\r\n var handler = bindFn(this.handler, this);\r\n this.touch = new TouchInput(this.manager, handler);\r\n this.mouse = new MouseInput(this.manager, handler);\r\n}\r\n\r\ninherit(TouchMouseInput, Input, {\r\n /**\r\n * handle mouse and touch events\r\n * @param {Hammer} manager\r\n * @param {String} inputEvent\r\n * @param {Object} inputData\r\n */\r\n handler: function TMEhandler(manager, inputEvent, inputData) {\r\n var isTouch = (inputData.pointerType == INPUT_TYPE_TOUCH),\r\n isMouse = (inputData.pointerType == INPUT_TYPE_MOUSE);\r\n\r\n // when we're in a touch event, so block all upcoming mouse events\r\n // most mobile browser also emit mouseevents, right after touchstart\r\n if (isTouch) {\r\n this.mouse.allow = false;\r\n } else if (isMouse && !this.mouse.allow) {\r\n return;\r\n }\r\n\r\n // reset the allowMouse when we're done\r\n if (inputEvent & (INPUT_END | INPUT_CANCEL)) {\r\n this.mouse.allow = true;\r\n }\r\n\r\n this.callback(manager, inputEvent, inputData);\r\n },\r\n\r\n /**\r\n * remove the event listeners\r\n */\r\n destroy: function destroy() {\r\n this.touch.destroy();\r\n this.mouse.destroy();\r\n }\r\n});\r\n\r\nvar PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction');\r\nvar NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined;\r\n\r\n// magical touchAction value\r\nvar TOUCH_ACTION_COMPUTE = 'compute';\r\nvar TOUCH_ACTION_AUTO = 'auto';\r\nvar TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented\r\nvar TOUCH_ACTION_NONE = 'none';\r\nvar TOUCH_ACTION_PAN_X = 'pan-x';\r\nvar TOUCH_ACTION_PAN_Y = 'pan-y';\r\n\r\n/**\r\n * Touch Action\r\n * sets the touchAction property or uses the js alternative\r\n * @param {Manager} manager\r\n * @param {String} value\r\n * @constructor\r\n */\r\nfunction TouchAction(manager, value) {\r\n this.manager = manager;\r\n this.set(value);\r\n}\r\n\r\nTouchAction.prototype = {\r\n /**\r\n * set the touchAction value on the element or enable the polyfill\r\n * @param {String} value\r\n */\r\n set: function(value) {\r\n // find out the touch-action by the event handlers\r\n if (value == TOUCH_ACTION_COMPUTE) {\r\n value = this.compute();\r\n }\r\n\r\n if (NATIVE_TOUCH_ACTION) {\r\n this.manager.element.style[PREFIXED_TOUCH_ACTION] = value;\r\n }\r\n this.actions = value.toLowerCase().trim();\r\n },\r\n\r\n /**\r\n * just re-set the touchAction value\r\n */\r\n update: function() {\r\n this.set(this.manager.options.touchAction);\r\n },\r\n\r\n /**\r\n * compute the value for the touchAction property based on the recognizer's settings\r\n * @returns {String} value\r\n */\r\n compute: function() {\r\n var actions = [];\r\n each(this.manager.recognizers, function(recognizer) {\r\n if (boolOrFn(recognizer.options.enable, [recognizer])) {\r\n actions = actions.concat(recognizer.getTouchAction());\r\n }\r\n });\r\n return cleanTouchActions(actions.join(' '));\r\n },\r\n\r\n /**\r\n * this method is called on each input cycle and provides the preventing of the browser behavior\r\n * @param {Object} input\r\n */\r\n preventDefaults: function(input) {\r\n // not needed with native support for the touchAction property\r\n if (NATIVE_TOUCH_ACTION) {\r\n return;\r\n }\r\n\r\n var srcEvent = input.srcEvent;\r\n var direction = input.offsetDirection;\r\n\r\n // if the touch action did prevented once this session\r\n if (this.manager.session.prevented) {\r\n srcEvent.preventDefault();\r\n return;\r\n }\r\n\r\n var actions = this.actions;\r\n var hasNone = inStr(actions, TOUCH_ACTION_NONE);\r\n var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y);\r\n var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X);\r\n\r\n if (hasNone ||\r\n (hasPanY && direction & DIRECTION_HORIZONTAL) ||\r\n (hasPanX && direction & DIRECTION_VERTICAL)) {\r\n return this.preventSrc(srcEvent);\r\n }\r\n },\r\n\r\n /**\r\n * call preventDefault to prevent the browser's default behavior (scrolling in most cases)\r\n * @param {Object} srcEvent\r\n */\r\n preventSrc: function(srcEvent) {\r\n this.manager.session.prevented = true;\r\n srcEvent.preventDefault();\r\n }\r\n};\r\n\r\n/**\r\n * when the touchActions are collected they are not a valid value, so we need to clean things up. *\r\n * @param {String} actions\r\n * @returns {*}\r\n */\r\nfunction cleanTouchActions(actions) {\r\n // none\r\n if (inStr(actions, TOUCH_ACTION_NONE)) {\r\n return TOUCH_ACTION_NONE;\r\n }\r\n\r\n var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X);\r\n var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y);\r\n\r\n // pan-x and pan-y can be combined\r\n if (hasPanX && hasPanY) {\r\n return TOUCH_ACTION_PAN_X + ' ' + TOUCH_ACTION_PAN_Y;\r\n }\r\n\r\n // pan-x OR pan-y\r\n if (hasPanX || hasPanY) {\r\n return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y;\r\n }\r\n\r\n // manipulation\r\n if (inStr(actions, TOUCH_ACTION_MANIPULATION)) {\r\n return TOUCH_ACTION_MANIPULATION;\r\n }\r\n\r\n return TOUCH_ACTION_AUTO;\r\n}\r\n\r\n/**\r\n * Recognizer flow explained; *\r\n * All recognizers have the initial state of POSSIBLE when a input session starts.\r\n * The definition of a input session is from the first input until the last input, with all it's movement in it. *\r\n * Example session for mouse-input: mousedown -> mousemove -> mouseup\r\n *\r\n * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed\r\n * which determines with state it should be.\r\n *\r\n * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to\r\n * POSSIBLE to give it another change on the next cycle.\r\n *\r\n * Possible\r\n * |\r\n * +-----+---------------+\r\n * | |\r\n * +-----+-----+ |\r\n * | | |\r\n * Failed Cancelled |\r\n * +-------+------+\r\n * | |\r\n * Recognized Began\r\n * |\r\n * Changed\r\n * |\r\n * Ended/Recognized\r\n */\r\nvar STATE_POSSIBLE = 1;\r\nvar STATE_BEGAN = 2;\r\nvar STATE_CHANGED = 4;\r\nvar STATE_ENDED = 8;\r\nvar STATE_RECOGNIZED = STATE_ENDED;\r\nvar STATE_CANCELLED = 16;\r\nvar STATE_FAILED = 32;\r\n\r\n/**\r\n * Recognizer\r\n * Every recognizer needs to extend from this class.\r\n * @constructor\r\n * @param {Object} options\r\n */\r\nfunction Recognizer(options) {\r\n this.id = uniqueId();\r\n\r\n this.manager = null;\r\n this.options = merge(options || {}, this.defaults);\r\n\r\n // default is enable true\r\n this.options.enable = ifUndefined(this.options.enable, true);\r\n\r\n this.state = STATE_POSSIBLE;\r\n\r\n this.simultaneous = {};\r\n this.requireFail = [];\r\n}\r\n\r\nRecognizer.prototype = {\r\n /**\r\n * @virtual\r\n * @type {Object}\r\n */\r\n defaults: {},\r\n\r\n /**\r\n * set options\r\n * @param {Object} options\r\n * @return {Recognizer}\r\n */\r\n set: function(options) {\r\n extend(this.options, options);\r\n\r\n // also update the touchAction, in case something changed about the directions/enabled state\r\n this.manager && this.manager.touchAction.update();\r\n return this;\r\n },\r\n\r\n /**\r\n * recognize simultaneous with an other recognizer.\r\n * @param {Recognizer} otherRecognizer\r\n * @returns {Recognizer} this\r\n */\r\n recognizeWith: function(otherRecognizer) {\r\n if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) {\r\n return this;\r\n }\r\n\r\n var simultaneous = this.simultaneous;\r\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\r\n if (!simultaneous[otherRecognizer.id]) {\r\n simultaneous[otherRecognizer.id] = otherRecognizer;\r\n otherRecognizer.recognizeWith(this);\r\n }\r\n return this;\r\n },\r\n\r\n /**\r\n * drop the simultaneous link. it doesnt remove the link on the other recognizer.\r\n * @param {Recognizer} otherRecognizer\r\n * @returns {Recognizer} this\r\n */\r\n dropRecognizeWith: function(otherRecognizer) {\r\n if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) {\r\n return this;\r\n }\r\n\r\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\r\n delete this.simultaneous[otherRecognizer.id];\r\n return this;\r\n },\r\n\r\n /**\r\n * recognizer can only run when an other is failing\r\n * @param {Recognizer} otherRecognizer\r\n * @returns {Recognizer} this\r\n */\r\n requireFailure: function(otherRecognizer) {\r\n if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) {\r\n return this;\r\n }\r\n\r\n var requireFail = this.requireFail;\r\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\r\n if (inArray(requireFail, otherRecognizer) === -1) {\r\n requireFail.push(otherRecognizer);\r\n otherRecognizer.requireFailure(this);\r\n }\r\n return this;\r\n },\r\n\r\n /**\r\n * drop the requireFailure link. it does not remove the link on the other recognizer.\r\n * @param {Recognizer} otherRecognizer\r\n * @returns {Recognizer} this\r\n */\r\n dropRequireFailure: function(otherRecognizer) {\r\n if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) {\r\n return this;\r\n }\r\n\r\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\r\n var index = inArray(this.requireFail, otherRecognizer);\r\n if (index > -1) {\r\n this.requireFail.splice(index, 1);\r\n }\r\n return this;\r\n },\r\n\r\n /**\r\n * has require failures boolean\r\n * @returns {boolean}\r\n */\r\n hasRequireFailures: function() {\r\n return this.requireFail.length > 0;\r\n },\r\n\r\n /**\r\n * if the recognizer can recognize simultaneous with an other recognizer\r\n * @param {Recognizer} otherRecognizer\r\n * @returns {Boolean}\r\n */\r\n canRecognizeWith: function(otherRecognizer) {\r\n return !!this.simultaneous[otherRecognizer.id];\r\n },\r\n\r\n /**\r\n * You should use `tryEmit` instead of `emit` directly to check\r\n * that all the needed recognizers has failed before emitting.\r\n * @param {Object} input\r\n */\r\n emit: function(input) {\r\n var self = this;\r\n var state = this.state;\r\n\r\n function emit(withState) {\r\n self.manager.emit(self.options.event + (withState ? stateStr(state) : ''), input);\r\n }\r\n\r\n // 'panstart' and 'panmove'\r\n if (state < STATE_ENDED) {\r\n emit(true);\r\n }\r\n\r\n emit(); // simple 'eventName' events\r\n\r\n // panend and pancancel\r\n if (state >= STATE_ENDED) {\r\n emit(true);\r\n }\r\n },\r\n\r\n /**\r\n * Check that all the require failure recognizers has failed,\r\n * if true, it emits a gesture event,\r\n * otherwise, setup the state to FAILED.\r\n * @param {Object} input\r\n */\r\n tryEmit: function(input) {\r\n if (this.canEmit()) {\r\n return this.emit(input);\r\n }\r\n // it's failing anyway\r\n this.state = STATE_FAILED;\r\n },\r\n\r\n /**\r\n * can we emit?\r\n * @returns {boolean}\r\n */\r\n canEmit: function() {\r\n var i = 0;\r\n while (i < this.requireFail.length) {\r\n if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) {\r\n return false;\r\n }\r\n i++;\r\n }\r\n return true;\r\n },\r\n\r\n /**\r\n * update the recognizer\r\n * @param {Object} inputData\r\n */\r\n recognize: function(inputData) {\r\n // make a new copy of the inputData\r\n // so we can change the inputData without messing up the other recognizers\r\n var inputDataClone = extend({}, inputData);\r\n\r\n // is is enabled and allow recognizing?\r\n if (!boolOrFn(this.options.enable, [this, inputDataClone])) {\r\n this.reset();\r\n this.state = STATE_FAILED;\r\n return;\r\n }\r\n\r\n // reset when we've reached the end\r\n if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) {\r\n this.state = STATE_POSSIBLE;\r\n }\r\n\r\n this.state = this.process(inputDataClone);\r\n\r\n // the recognizer has recognized a gesture\r\n // so trigger an event\r\n if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) {\r\n this.tryEmit(inputDataClone);\r\n }\r\n },\r\n\r\n /**\r\n * return the state of the recognizer\r\n * the actual recognizing happens in this method\r\n * @virtual\r\n * @param {Object} inputData\r\n * @returns {Const} STATE\r\n */\r\n process: function(inputData) { }, // jshint ignore:line\r\n\r\n /**\r\n * return the preferred touch-action\r\n * @virtual\r\n * @returns {Array}\r\n */\r\n getTouchAction: function() { },\r\n\r\n /**\r\n * called when the gesture isn't allowed to recognize\r\n * like when another is being recognized or it is disabled\r\n * @virtual\r\n */\r\n reset: function() { }\r\n};\r\n\r\n/**\r\n * get a usable string, used as event postfix\r\n * @param {Const} state\r\n * @returns {String} state\r\n */\r\nfunction stateStr(state) {\r\n if (state & STATE_CANCELLED) {\r\n return 'cancel';\r\n } else if (state & STATE_ENDED) {\r\n return 'end';\r\n } else if (state & STATE_CHANGED) {\r\n return 'move';\r\n } else if (state & STATE_BEGAN) {\r\n return 'start';\r\n }\r\n return '';\r\n}\r\n\r\n/**\r\n * direction cons to string\r\n * @param {Const} direction\r\n * @returns {String}\r\n */\r\nfunction directionStr(direction) {\r\n if (direction == DIRECTION_DOWN) {\r\n return 'down';\r\n } else if (direction == DIRECTION_UP) {\r\n return 'up';\r\n } else if (direction == DIRECTION_LEFT) {\r\n return 'left';\r\n } else if (direction == DIRECTION_RIGHT) {\r\n return 'right';\r\n }\r\n return '';\r\n}\r\n\r\n/**\r\n * get a recognizer by name if it is bound to a manager\r\n * @param {Recognizer|String} otherRecognizer\r\n * @param {Recognizer} recognizer\r\n * @returns {Recognizer}\r\n */\r\nfunction getRecognizerByNameIfManager(otherRecognizer, recognizer) {\r\n var manager = recognizer.manager;\r\n if (manager) {\r\n return manager.get(otherRecognizer);\r\n }\r\n return otherRecognizer;\r\n}\r\n\r\n/**\r\n * This recognizer is just used as a base for the simple attribute recognizers.\r\n * @constructor\r\n * @extends Recognizer\r\n */\r\nfunction AttrRecognizer() {\r\n Recognizer.apply(this, arguments);\r\n}\r\n\r\ninherit(AttrRecognizer, Recognizer, {\r\n /**\r\n * @namespace\r\n * @memberof AttrRecognizer\r\n */\r\n defaults: {\r\n /**\r\n * @type {Number}\r\n * @default 1\r\n */\r\n pointers: 1\r\n },\r\n\r\n /**\r\n * Used to check if it the recognizer receives valid input, like input.distance > 10.\r\n * @memberof AttrRecognizer\r\n * @param {Object} input\r\n * @returns {Boolean} recognized\r\n */\r\n attrTest: function(input) {\r\n var optionPointers = this.options.pointers;\r\n return optionPointers === 0 || input.pointers.length === optionPointers;\r\n },\r\n\r\n /**\r\n * Process the input and return the state for the recognizer\r\n * @memberof AttrRecognizer\r\n * @param {Object} input\r\n * @returns {*} State\r\n */\r\n process: function(input) {\r\n var state = this.state;\r\n var eventType = input.eventType;\r\n\r\n var isRecognized = state & (STATE_BEGAN | STATE_CHANGED);\r\n var isValid = this.attrTest(input);\r\n\r\n // on cancel input and we've recognized before, return STATE_CANCELLED\r\n if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) {\r\n return state | STATE_CANCELLED;\r\n } else if (isRecognized || isValid) {\r\n if (eventType & INPUT_END) {\r\n return state | STATE_ENDED;\r\n } else if (!(state & STATE_BEGAN)) {\r\n return STATE_BEGAN;\r\n }\r\n return state | STATE_CHANGED;\r\n }\r\n return STATE_FAILED;\r\n }\r\n});\r\n\r\n/**\r\n * Pan\r\n * Recognized when the pointer is down and moved in the allowed direction.\r\n * @constructor\r\n * @extends AttrRecognizer\r\n */\r\nfunction PanRecognizer() {\r\n AttrRecognizer.apply(this, arguments);\r\n\r\n this.pX = null;\r\n this.pY = null;\r\n}\r\n\r\ninherit(PanRecognizer, AttrRecognizer, {\r\n /**\r\n * @namespace\r\n * @memberof PanRecognizer\r\n */\r\n defaults: {\r\n event: 'pan',\r\n threshold: 10,\r\n pointers: 1,\r\n direction: DIRECTION_ALL\r\n },\r\n\r\n getTouchAction: function() {\r\n var direction = this.options.direction;\r\n var actions = [];\r\n if (direction & DIRECTION_HORIZONTAL) {\r\n actions.push(TOUCH_ACTION_PAN_Y);\r\n }\r\n if (direction & DIRECTION_VERTICAL) {\r\n actions.push(TOUCH_ACTION_PAN_X);\r\n }\r\n return actions;\r\n },\r\n\r\n directionTest: function(input) {\r\n var options = this.options;\r\n var hasMoved = true;\r\n var distance = input.distance;\r\n var direction = input.direction;\r\n var x = input.deltaX;\r\n var y = input.deltaY;\r\n\r\n // lock to axis?\r\n if (!(direction & options.direction)) {\r\n if (options.direction & DIRECTION_HORIZONTAL) {\r\n direction = (x === 0) ? DIRECTION_NONE : (x < 0) ? DIRECTION_LEFT : DIRECTION_RIGHT;\r\n hasMoved = x != this.pX;\r\n distance = Math.abs(input.deltaX);\r\n } else {\r\n direction = (y === 0) ? DIRECTION_NONE : (y < 0) ? DIRECTION_UP : DIRECTION_DOWN;\r\n hasMoved = y != this.pY;\r\n distance = Math.abs(input.deltaY);\r\n }\r\n }\r\n input.direction = direction;\r\n return hasMoved && distance > options.threshold && direction & options.direction;\r\n },\r\n\r\n attrTest: function(input) {\r\n return AttrRecognizer.prototype.attrTest.call(this, input) &&\r\n (this.state & STATE_BEGAN || (!(this.state & STATE_BEGAN) && this.directionTest(input)));\r\n },\r\n\r\n emit: function(input) {\r\n this.pX = input.deltaX;\r\n this.pY = input.deltaY;\r\n\r\n var direction = directionStr(input.direction);\r\n if (direction) {\r\n this.manager.emit(this.options.event + direction, input);\r\n }\r\n\r\n this._super.emit.call(this, input);\r\n }\r\n});\r\n\r\n/**\r\n * Pinch\r\n * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out).\r\n * @constructor\r\n * @extends AttrRecognizer\r\n */\r\nfunction PinchRecognizer() {\r\n AttrRecognizer.apply(this, arguments);\r\n}\r\n\r\ninherit(PinchRecognizer, AttrRecognizer, {\r\n /**\r\n * @namespace\r\n * @memberof PinchRecognizer\r\n */\r\n defaults: {\r\n event: 'pinch',\r\n threshold: 0,\r\n pointers: 2\r\n },\r\n\r\n getTouchAction: function() {\r\n return [TOUCH_ACTION_NONE];\r\n },\r\n\r\n attrTest: function(input) {\r\n return this._super.attrTest.call(this, input) &&\r\n (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN);\r\n },\r\n\r\n emit: function(input) {\r\n this._super.emit.call(this, input);\r\n if (input.scale !== 1) {\r\n var inOut = input.scale < 1 ? 'in' : 'out';\r\n this.manager.emit(this.options.event + inOut, input);\r\n }\r\n }\r\n});\r\n\r\n/**\r\n * Press\r\n * Recognized when the pointer is down for x ms without any movement.\r\n * @constructor\r\n * @extends Recognizer\r\n */\r\nfunction PressRecognizer() {\r\n Recognizer.apply(this, arguments);\r\n\r\n this._timer = null;\r\n this._input = null;\r\n}\r\n\r\ninherit(PressRecognizer, Recognizer, {\r\n /**\r\n * @namespace\r\n * @memberof PressRecognizer\r\n */\r\n defaults: {\r\n event: 'press',\r\n pointers: 1,\r\n time: 500, // minimal time of the pointer to be pressed\r\n threshold: 5 // a minimal movement is ok, but keep it low\r\n },\r\n\r\n getTouchAction: function() {\r\n return [TOUCH_ACTION_AUTO];\r\n },\r\n\r\n process: function(input) {\r\n var options = this.options;\r\n var validPointers = input.pointers.length === options.pointers;\r\n var validMovement = input.distance < options.threshold;\r\n var validTime = input.deltaTime > options.time;\r\n\r\n this._input = input;\r\n\r\n // we only allow little movement\r\n // and we've reached an end event, so a tap is possible\r\n if (!validMovement || !validPointers || (input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime)) {\r\n this.reset();\r\n } else if (input.eventType & INPUT_START) {\r\n this.reset();\r\n this._timer = setTimeoutContext(function() {\r\n this.state = STATE_RECOGNIZED;\r\n this.tryEmit();\r\n }, options.time, this);\r\n } else if (input.eventType & INPUT_END) {\r\n return STATE_RECOGNIZED;\r\n }\r\n return STATE_FAILED;\r\n },\r\n\r\n reset: function() {\r\n clearTimeout(this._timer);\r\n },\r\n\r\n emit: function(input) {\r\n if (this.state !== STATE_RECOGNIZED) {\r\n return;\r\n }\r\n\r\n if (input && (input.eventType & INPUT_END)) {\r\n this.manager.emit(this.options.event + 'up', input);\r\n } else {\r\n this._input.timeStamp = now();\r\n this.manager.emit(this.options.event, this._input);\r\n }\r\n }\r\n});\r\n\r\n/**\r\n * Rotate\r\n * Recognized when two or more pointer are moving in a circular motion.\r\n * @constructor\r\n * @extends AttrRecognizer\r\n */\r\nfunction RotateRecognizer() {\r\n AttrRecognizer.apply(this, arguments);\r\n}\r\n\r\ninherit(RotateRecognizer, AttrRecognizer, {\r\n /**\r\n * @namespace\r\n * @memberof RotateRecognizer\r\n */\r\n defaults: {\r\n event: 'rotate',\r\n threshold: 0,\r\n pointers: 2\r\n },\r\n\r\n getTouchAction: function() {\r\n return [TOUCH_ACTION_NONE];\r\n },\r\n\r\n attrTest: function(input) {\r\n return this._super.attrTest.call(this, input) &&\r\n (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN);\r\n }\r\n});\r\n\r\n/**\r\n * Swipe\r\n * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction.\r\n * @constructor\r\n * @extends AttrRecognizer\r\n */\r\nfunction SwipeRecognizer() {\r\n AttrRecognizer.apply(this, arguments);\r\n}\r\n\r\ninherit(SwipeRecognizer, AttrRecognizer, {\r\n /**\r\n * @namespace\r\n * @memberof SwipeRecognizer\r\n */\r\n defaults: {\r\n event: 'swipe',\r\n threshold: 10,\r\n velocity: 0.65,\r\n direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL,\r\n pointers: 1\r\n },\r\n\r\n getTouchAction: function() {\r\n return PanRecognizer.prototype.getTouchAction.call(this);\r\n },\r\n\r\n attrTest: function(input) {\r\n var direction = this.options.direction;\r\n var velocity;\r\n\r\n if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) {\r\n velocity = input.velocity;\r\n } else if (direction & DIRECTION_HORIZONTAL) {\r\n velocity = input.velocityX;\r\n } else if (direction & DIRECTION_VERTICAL) {\r\n velocity = input.velocityY;\r\n }\r\n\r\n return this._super.attrTest.call(this, input) &&\r\n direction & input.direction &&\r\n input.distance > this.options.threshold &&\r\n abs(velocity) > this.options.velocity && input.eventType & INPUT_END;\r\n },\r\n\r\n emit: function(input) {\r\n var direction = directionStr(input.direction);\r\n if (direction) {\r\n this.manager.emit(this.options.event + direction, input);\r\n }\r\n\r\n this.manager.emit(this.options.event, input);\r\n }\r\n});\r\n\r\n/**\r\n * A tap is ecognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur\r\n * between the given interval and position. The delay option can be used to recognize multi-taps without firing\r\n * a single tap.\r\n *\r\n * The eventData from the emitted event contains the property `tapCount`, which contains the amount of\r\n * multi-taps being recognized.\r\n * @constructor\r\n * @extends Recognizer\r\n */\r\nfunction TapRecognizer() {\r\n Recognizer.apply(this, arguments);\r\n\r\n // previous time and center,\r\n // used for tap counting\r\n this.pTime = false;\r\n this.pCenter = false;\r\n\r\n this._timer = null;\r\n this._input = null;\r\n this.count = 0;\r\n}\r\n\r\ninherit(TapRecognizer, Recognizer, {\r\n /**\r\n * @namespace\r\n * @memberof PinchRecognizer\r\n */\r\n defaults: {\r\n event: 'tap',\r\n pointers: 1,\r\n taps: 1,\r\n interval: 300, // max time between the multi-tap taps\r\n time: 250, // max time of the pointer to be down (like finger on the screen)\r\n threshold: 2, // a minimal movement is ok, but keep it low\r\n posThreshold: 10 // a multi-tap can be a bit off the initial position\r\n },\r\n\r\n getTouchAction: function() {\r\n return [TOUCH_ACTION_MANIPULATION];\r\n },\r\n\r\n process: function(input) {\r\n var options = this.options;\r\n\r\n var validPointers = input.pointers.length === options.pointers;\r\n var validMovement = input.distance < options.threshold;\r\n var validTouchTime = input.deltaTime < options.time;\r\n\r\n this.reset();\r\n\r\n if ((input.eventType & INPUT_START) && (this.count === 0)) {\r\n return this.failTimeout();\r\n }\r\n\r\n // we only allow little movement\r\n // and we've reached an end event, so a tap is possible\r\n if (validMovement && validTouchTime && validPointers) {\r\n if (input.eventType != INPUT_END) {\r\n return this.failTimeout();\r\n }\r\n\r\n var validInterval = this.pTime ? (input.timeStamp - this.pTime < options.interval) : true;\r\n var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold;\r\n\r\n this.pTime = input.timeStamp;\r\n this.pCenter = input.center;\r\n\r\n if (!validMultiTap || !validInterval) {\r\n this.count = 1;\r\n } else {\r\n this.count += 1;\r\n }\r\n\r\n this._input = input;\r\n\r\n // if tap count matches we have recognized it,\r\n // else it has began recognizing...\r\n var tapCount = this.count % options.taps;\r\n if (tapCount === 0) {\r\n // no failing requirements, immediately trigger the tap event\r\n // or wait as long as the multitap interval to trigger\r\n if (!this.hasRequireFailures()) {\r\n return STATE_RECOGNIZED;\r\n } else {\r\n this._timer = setTimeoutContext(function() {\r\n this.state = STATE_RECOGNIZED;\r\n this.tryEmit();\r\n }, options.interval, this);\r\n return STATE_BEGAN;\r\n }\r\n }\r\n }\r\n return STATE_FAILED;\r\n },\r\n\r\n failTimeout: function() {\r\n this._timer = setTimeoutContext(function() {\r\n this.state = STATE_FAILED;\r\n }, this.options.interval, this);\r\n return STATE_FAILED;\r\n },\r\n\r\n reset: function() {\r\n clearTimeout(this._timer);\r\n },\r\n\r\n emit: function() {\r\n if (this.state == STATE_RECOGNIZED ) {\r\n this._input.tapCount = this.count;\r\n this.manager.emit(this.options.event, this._input);\r\n }\r\n }\r\n});\r\n\r\n/**\r\n * Simple way to create an manager with a default set of recognizers.\r\n * @param {HTMLElement} element\r\n * @param {Object} [options]\r\n * @constructor\r\n */\r\nfunction Hammer(element, options) {\r\n options = options || {};\r\n options.recognizers = ifUndefined(options.recognizers, Hammer.defaults.preset);\r\n return new Manager(element, options);\r\n}\r\n\r\n/**\r\n * @const {string}\r\n */\r\nHammer.VERSION = '2.0.4';\r\n\r\n/**\r\n * default settings\r\n * @namespace\r\n */\r\nHammer.defaults = {\r\n /**\r\n * set if DOM events are being triggered.\r\n * But this is slower and unused by simple implementations, so disabled by default.\r\n * @type {Boolean}\r\n * @default false\r\n */\r\n domEvents: false,\r\n\r\n /**\r\n * The value for the touchAction property/fallback.\r\n * When set to `compute` it will magically set the correct value based on the added recognizers.\r\n * @type {String}\r\n * @default compute\r\n */\r\n touchAction: TOUCH_ACTION_COMPUTE,\r\n\r\n /**\r\n * @type {Boolean}\r\n * @default true\r\n */\r\n enable: true,\r\n\r\n /**\r\n * EXPERIMENTAL FEATURE -- can be removed/changed\r\n * Change the parent input target element.\r\n * If Null, then it is being set the to main element.\r\n * @type {Null|EventTarget}\r\n * @default null\r\n */\r\n inputTarget: null,\r\n\r\n /**\r\n * force an input class\r\n * @type {Null|Function}\r\n * @default null\r\n */\r\n inputClass: null,\r\n\r\n /**\r\n * Default recognizer setup when calling `Hammer()`\r\n * When creating a new Manager these will be skipped.\r\n * @type {Array}\r\n */\r\n preset: [\r\n // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]\r\n [RotateRecognizer, { enable: false }],\r\n [PinchRecognizer, { enable: false }, ['rotate']],\r\n [SwipeRecognizer,{ direction: DIRECTION_HORIZONTAL }],\r\n [PanRecognizer, { direction: DIRECTION_HORIZONTAL }, ['swipe']],\r\n [TapRecognizer],\r\n [TapRecognizer, { event: 'doubletap', taps: 2 }, ['tap']],\r\n [PressRecognizer]\r\n ],\r\n\r\n /**\r\n * Some CSS properties can be used to improve the working of Hammer.\r\n * Add them to this method and they will be set when creating a new Manager.\r\n * @namespace\r\n */\r\n cssProps: {\r\n /**\r\n * Disables text selection to improve the dragging gesture. Mainly for desktop browsers.\r\n * @type {String}\r\n * @default 'none'\r\n */\r\n userSelect: 'none',\r\n\r\n /**\r\n * Disable the Windows Phone grippers when pressing an element.\r\n * @type {String}\r\n * @default 'none'\r\n */\r\n touchSelect: 'none',\r\n\r\n /**\r\n * Disables the default callout shown when you touch and hold a touch target.\r\n * On iOS, when you touch and hold a touch target such as a link, Safari displays\r\n * a callout containing information about the link. This property allows you to disable that callout.\r\n * @type {String}\r\n * @default 'none'\r\n */\r\n touchCallout: 'none',\r\n\r\n /**\r\n * Specifies whether zooming is enabled. Used by IE10>\r\n * @type {String}\r\n * @default 'none'\r\n */\r\n contentZooming: 'none',\r\n\r\n /**\r\n * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers.\r\n * @type {String}\r\n * @default 'none'\r\n */\r\n userDrag: 'none',\r\n\r\n /**\r\n * Overrides the highlight color shown when the user taps a link or a JavaScript\r\n * clickable element in iOS. This property obeys the alpha value, if specified.\r\n * @type {String}\r\n * @default 'rgba(0,0,0,0)'\r\n */\r\n tapHighlightColor: 'rgba(0,0,0,0)'\r\n }\r\n};\r\n\r\nvar STOP = 1;\r\nvar FORCED_STOP = 2;\r\n\r\n/**\r\n * Manager\r\n * @param {HTMLElement} element\r\n * @param {Object} [options]\r\n * @constructor\r\n */\r\nfunction Manager(element, options) {\r\n options = options || {};\r\n\r\n this.options = merge(options, Hammer.defaults);\r\n this.options.inputTarget = this.options.inputTarget || element;\r\n\r\n this.handlers = {};\r\n this.session = {};\r\n this.recognizers = [];\r\n\r\n this.element = element;\r\n this.input = createInputInstance(this);\r\n this.touchAction = new TouchAction(this, this.options.touchAction);\r\n\r\n toggleCssProps(this, true);\r\n\r\n each(options.recognizers, function(item) {\r\n var recognizer = this.add(new (item[0])(item[1]));\r\n item[2] && recognizer.recognizeWith(item[2]);\r\n item[3] && recognizer.requireFailure(item[3]);\r\n }, this);\r\n}\r\n\r\nManager.prototype = {\r\n /**\r\n * set options\r\n * @param {Object} options\r\n * @returns {Manager}\r\n */\r\n set: function(options) {\r\n extend(this.options, options);\r\n\r\n // Options that need a little more setup\r\n if (options.touchAction) {\r\n this.touchAction.update();\r\n }\r\n if (options.inputTarget) {\r\n // Clean up existing event listeners and reinitialize\r\n this.input.destroy();\r\n this.input.target = options.inputTarget;\r\n this.input.init();\r\n }\r\n return this;\r\n },\r\n\r\n /**\r\n * stop recognizing for this session.\r\n * This session will be discarded, when a new [input]start event is fired.\r\n * When forced, the recognizer cycle is stopped immediately.\r\n * @param {Boolean} [force]\r\n */\r\n stop: function(force) {\r\n this.session.stopped = force ? FORCED_STOP : STOP;\r\n },\r\n\r\n /**\r\n * run the recognizers!\r\n * called by the inputHandler function on every movement of the pointers (touches)\r\n * it walks through all the recognizers and tries to detect the gesture that is being made\r\n * @param {Object} inputData\r\n */\r\n recognize: function(inputData) {\r\n var session = this.session;\r\n if (session.stopped) {\r\n return;\r\n }\r\n\r\n // run the touch-action polyfill\r\n this.touchAction.preventDefaults(inputData);\r\n\r\n var recognizer;\r\n var recognizers = this.recognizers;\r\n\r\n // this holds the recognizer that is being recognized.\r\n // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED\r\n // if no recognizer is detecting a thing, it is set to `null`\r\n var curRecognizer = session.curRecognizer;\r\n\r\n // reset when the last recognizer is recognized\r\n // or when we're in a new session\r\n if (!curRecognizer || (curRecognizer && curRecognizer.state & STATE_RECOGNIZED)) {\r\n curRecognizer = session.curRecognizer = null;\r\n }\r\n\r\n var i = 0;\r\n while (i < recognizers.length) {\r\n recognizer = recognizers[i];\r\n\r\n // find out if we are allowed try to recognize the input for this one.\r\n // 1. allow if the session is NOT forced stopped (see the .stop() method)\r\n // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one\r\n // that is being recognized.\r\n // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer.\r\n // this can be setup with the `recognizeWith()` method on the recognizer.\r\n if (session.stopped !== FORCED_STOP && ( // 1\r\n !curRecognizer || recognizer == curRecognizer || // 2\r\n recognizer.canRecognizeWith(curRecognizer))) { // 3\r\n recognizer.recognize(inputData);\r\n } else {\r\n recognizer.reset();\r\n }\r\n\r\n // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the\r\n // current active recognizer. but only if we don't already have an active recognizer\r\n if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) {\r\n curRecognizer = session.curRecognizer = recognizer;\r\n }\r\n i++;\r\n }\r\n },\r\n\r\n /**\r\n * get a recognizer by its event name.\r\n * @param {Recognizer|String} recognizer\r\n * @returns {Recognizer|Null}\r\n */\r\n get: function(recognizer) {\r\n if (recognizer instanceof Recognizer) {\r\n return recognizer;\r\n }\r\n\r\n var recognizers = this.recognizers;\r\n for (var i = 0; i < recognizers.length; i++) {\r\n if (recognizers[i].options.event == recognizer) {\r\n return recognizers[i];\r\n }\r\n }\r\n return null;\r\n },\r\n\r\n /**\r\n * add a recognizer to the manager\r\n * existing recognizers with the same event name will be removed\r\n * @param {Recognizer} recognizer\r\n * @returns {Recognizer|Manager}\r\n */\r\n add: function(recognizer) {\r\n if (invokeArrayArg(recognizer, 'add', this)) {\r\n return this;\r\n }\r\n\r\n // remove existing\r\n var existing = this.get(recognizer.options.event);\r\n if (existing) {\r\n this.remove(existing);\r\n }\r\n\r\n this.recognizers.push(recognizer);\r\n recognizer.manager = this;\r\n\r\n this.touchAction.update();\r\n return recognizer;\r\n },\r\n\r\n /**\r\n * remove a recognizer by name or instance\r\n * @param {Recognizer|String} recognizer\r\n * @returns {Manager}\r\n */\r\n remove: function(recognizer) {\r\n if (invokeArrayArg(recognizer, 'remove', this)) {\r\n return this;\r\n }\r\n\r\n var recognizers = this.recognizers;\r\n recognizer = this.get(recognizer);\r\n recognizers.splice(inArray(recognizers, recognizer), 1);\r\n\r\n this.touchAction.update();\r\n return this;\r\n },\r\n\r\n /**\r\n * bind event\r\n * @param {String} events\r\n * @param {Function} handler\r\n * @returns {EventEmitter} this\r\n */\r\n on: function(events, handler) {\r\n var handlers = this.handlers;\r\n each(splitStr(events), function(event) {\r\n handlers[event] = handlers[event] || [];\r\n handlers[event].push(handler);\r\n });\r\n return this;\r\n },\r\n\r\n /**\r\n * unbind event, leave emit blank to remove all handlers\r\n * @param {String} events\r\n * @param {Function} [handler]\r\n * @returns {EventEmitter} this\r\n */\r\n off: function(events, handler) {\r\n var handlers = this.handlers;\r\n each(splitStr(events), function(event) {\r\n if (!handler) {\r\n delete handlers[event];\r\n } else {\r\n handlers[event].splice(inArray(handlers[event], handler), 1);\r\n }\r\n });\r\n return this;\r\n },\r\n\r\n /**\r\n * emit event to the listeners\r\n * @param {String} event\r\n * @param {Object} data\r\n */\r\n emit: function(event, data) {\r\n // we also want to trigger dom events\r\n if (this.options.domEvents) {\r\n triggerDomEvent(event, data);\r\n }\r\n\r\n // no handlers, so skip it all\r\n var handlers = this.handlers[event] && this.handlers[event].slice();\r\n if (!handlers || !handlers.length) {\r\n return;\r\n }\r\n\r\n data.type = event;\r\n data.preventDefault = function() {\r\n data.srcEvent.preventDefault();\r\n };\r\n\r\n var i = 0;\r\n while (i < handlers.length) {\r\n handlers[i](data);\r\n i++;\r\n }\r\n },\r\n\r\n /**\r\n * destroy the manager and unbinds all events\r\n * it doesn't unbind dom events, that is the user own responsibility\r\n */\r\n destroy: function() {\r\n this.element && toggleCssProps(this, false);\r\n\r\n this.handlers = {};\r\n this.session = {};\r\n this.input.destroy();\r\n this.element = null;\r\n }\r\n};\r\n\r\n/**\r\n * add/remove the css properties as defined in manager.options.cssProps\r\n * @param {Manager} manager\r\n * @param {Boolean} add\r\n */\r\nfunction toggleCssProps(manager, add) {\r\n var element = manager.element;\r\n each(manager.options.cssProps, function(value, name) {\r\n element.style[prefixed(element.style, name)] = add ? value : '';\r\n });\r\n}\r\n\r\n/**\r\n * trigger dom event\r\n * @param {String} event\r\n * @param {Object} data\r\n */\r\nfunction triggerDomEvent(event, data) {\r\n var gestureEvent = document.createEvent('Event');\r\n gestureEvent.initEvent(event, true, true);\r\n gestureEvent.gesture = data;\r\n data.target.dispatchEvent(gestureEvent);\r\n}\r\n\r\nextend(Hammer, {\r\n INPUT_START: INPUT_START,\r\n INPUT_MOVE: INPUT_MOVE,\r\n INPUT_END: INPUT_END,\r\n INPUT_CANCEL: INPUT_CANCEL,\r\n\r\n STATE_POSSIBLE: STATE_POSSIBLE,\r\n STATE_BEGAN: STATE_BEGAN,\r\n STATE_CHANGED: STATE_CHANGED,\r\n STATE_ENDED: STATE_ENDED,\r\n STATE_RECOGNIZED: STATE_RECOGNIZED,\r\n STATE_CANCELLED: STATE_CANCELLED,\r\n STATE_FAILED: STATE_FAILED,\r\n\r\n DIRECTION_NONE: DIRECTION_NONE,\r\n DIRECTION_LEFT: DIRECTION_LEFT,\r\n DIRECTION_RIGHT: DIRECTION_RIGHT,\r\n DIRECTION_UP: DIRECTION_UP,\r\n DIRECTION_DOWN: DIRECTION_DOWN,\r\n DIRECTION_HORIZONTAL: DIRECTION_HORIZONTAL,\r\n DIRECTION_VERTICAL: DIRECTION_VERTICAL,\r\n DIRECTION_ALL: DIRECTION_ALL,\r\n\r\n Manager: Manager,\r\n Input: Input,\r\n TouchAction: TouchAction,\r\n\r\n TouchInput: TouchInput,\r\n MouseInput: MouseInput,\r\n PointerEventInput: PointerEventInput,\r\n TouchMouseInput: TouchMouseInput,\r\n SingleTouchInput: SingleTouchInput,\r\n\r\n Recognizer: Recognizer,\r\n AttrRecognizer: AttrRecognizer,\r\n Tap: TapRecognizer,\r\n Pan: PanRecognizer,\r\n Swipe: SwipeRecognizer,\r\n Pinch: PinchRecognizer,\r\n Rotate: RotateRecognizer,\r\n Press: PressRecognizer,\r\n\r\n on: addEventListeners,\r\n off: removeEventListeners,\r\n each: each,\r\n merge: merge,\r\n extend: extend,\r\n inherit: inherit,\r\n bindFn: bindFn,\r\n prefixed: prefixed\r\n});\r\n\r\nif (typeof define == TYPE_FUNCTION && define.amd) {\r\n define(function() {\r\n return Hammer;\r\n });\r\n} else if (typeof module != 'undefined' && module.exports) {\r\n module.exports = Hammer;\r\n} else {\r\n window[exportName] = Hammer;\r\n}\r\n\r\n})(window, document, 'Hammer');\r\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nfunction maxFriction(friction, velocityX, velocityY, maxFrictionTime, result) {\n var velocity = Math.sqrt(Math.pow(velocityX,2) + Math.pow(velocityY,2));\n friction = Math.max(friction, velocity/maxFrictionTime);\n changeVectorNorm(velocityX, velocityY, friction, result);\n result[0] = Math.abs(result[0]);\n result[1] = Math.abs(result[1]);\n}\n\nfunction changeVectorNorm(x, y, n, result) {\n var theta = Math.atan(y/x);\n result[0] = n * Math.cos(theta);\n result[1] = n * Math.sin(theta);\n}\n\nmodule.exports = {\n maxFriction: maxFriction,\n changeVectorNorm: changeVectorNorm\n};","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar eventEmitter = require('minimal-event-emitter');\nvar Dynamics = require('./Dynamics');\nvar HammerGestures = require('./HammerGestures');\nvar defaults = require('../util/defaults');\nvar maxFriction = require('./util').maxFriction;\nvar clearOwnProperties = require('../util/clearOwnProperties');\n\n\nvar defaultOptions = {\n speed: 8,\n friction: 6,\n maxFrictionTime: 0.3\n};\n\n\n/**\n * @class QtvrControlMethod\n * @implements ControlMethod\n * @classdesc\n *\n * Controls the view by holding the mouse button down and moving it.\n * Also known as \"QTVR\" control mode.\n *\n * @param {Element} element Element to listen for events.\n * @param {string} pointerType Which Hammer.js pointer type to use (e.g.\n * `mouse` or `touch`).\n * @param {Object} opts\n * @param {number} opts.speed\n * @param {number} opts.friction\n * @param {number} opts.maxFrictionTime\n */\n// TODO: allow speed not change linearly with distance to click spot.\n// Quadratic or other would allow a larger speed range.\nfunction QtvrControlMethod(element, pointerType, opts) {\n this._element = element;\n\n this._opts = defaults(opts || {}, defaultOptions);\n\n this._active = false;\n\n this._hammer = HammerGestures.get(element, pointerType);\n\n this._dynamics = {\n x: new Dynamics(),\n y: new Dynamics()\n };\n\n this._hammer.on('panstart', this._handleStart.bind(this));\n this._hammer.on('panmove', this._handleMove.bind(this));\n this._hammer.on('panend', this._handleRelease.bind(this));\n this._hammer.on('pancancel', this._handleRelease.bind(this));\n}\n\neventEmitter(QtvrControlMethod);\n\n/**\n * Destructor.\n */\nQtvrControlMethod.prototype.destroy = function() {\n this._hammer.release();\n clearOwnProperties(this);\n};\n\n\nQtvrControlMethod.prototype._handleStart = function(e) {\n // Prevent event dragging other DOM elements and causing strange behavior on Chrome\n e.preventDefault();\n\n if (!this._active) {\n this._active = true;\n this.emit('active');\n }\n};\n\n\nQtvrControlMethod.prototype._handleMove = function(e) {\n // Prevent event dragging other DOM elements and causing strange behavior on Chrome\n e.preventDefault();\n\n this._updateDynamics(e, false);\n};\n\n\nQtvrControlMethod.prototype._handleRelease = function(e) {\n // Prevent event dragging other DOM elements and causing strange behavior on Chrome\n e.preventDefault();\n\n this._updateDynamics(e, true);\n\n if (this._active) {\n this._active = false;\n this.emit('inactive');\n }\n};\n\n\nvar tmpReleaseFriction = [ null, null ];\nQtvrControlMethod.prototype._updateDynamics = function(e, release) {\n var elementRect = this._element.getBoundingClientRect();\n var width = elementRect.right - elementRect.left;\n var height = elementRect.bottom - elementRect.top;\n var maxDim = Math.max(width, height);\n\n var x = e.deltaX / maxDim * this._opts.speed;\n var y = e.deltaY / maxDim * this._opts.speed;\n\n this._dynamics.x.reset();\n this._dynamics.y.reset();\n this._dynamics.x.velocity = x;\n this._dynamics.y.velocity = y;\n\n if (release) {\n maxFriction(this._opts.friction, this._dynamics.x.velocity, this._dynamics.y.velocity, this._opts.maxFrictionTime, tmpReleaseFriction);\n this._dynamics.x.friction = tmpReleaseFriction[0];\n this._dynamics.y.friction = tmpReleaseFriction[1];\n }\n\n this.emit('parameterDynamics', 'x', this._dynamics.x);\n this.emit('parameterDynamics', 'y', this._dynamics.y);\n};\n\n\nmodule.exports = QtvrControlMethod;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar eventEmitter = require('minimal-event-emitter');\nvar Dynamics = require('./Dynamics');\nvar WheelListener = require('./WheelListener');\nvar defaults = require('../util/defaults');\nvar clearOwnProperties = require('../util/clearOwnProperties');\n\nvar defaultOptions = {\n frictionTime: 0.2,\n zoomDelta: 0.001\n};\n\n/**\n * @class ScrollZoomControlMethod\n * @implements ControlMethod\n * @classdesc\n *\n * Controls the fov/zoom through the mouse wheel.\n *\n * @param {Element} element Element to listen for events.\n * @param {Object} opts\n * @param {number} [opts.frictionTime=0.2]\n * @param {number} [opts.zoomDelta=0.001]\n */\nfunction ScrollZoomControlMethod(element, opts) {\n this._opts = defaults(opts || {}, defaultOptions);\n\n this._dynamics = new Dynamics();\n\n this._eventList = [];\n\n var fn = this._opts.frictionTime ? this.withSmoothing : this.withoutSmoothing;\n this._wheelListener = new WheelListener(element, fn.bind(this));\n}\n\neventEmitter(ScrollZoomControlMethod);\n\n/**\n * Destructor.\n */\nScrollZoomControlMethod.prototype.destroy = function() {\n this._wheelListener.destroy();\n clearOwnProperties(this);\n};\n\n\nScrollZoomControlMethod.prototype.withoutSmoothing = function(e) {\n this._dynamics.offset = wheelEventDelta(e) * this._opts.zoomDelta;\n this.emit('parameterDynamics', 'zoom', this._dynamics);\n\n e.preventDefault();\n\n this.emit('active');\n this.emit('inactive');\n};\n\n\nScrollZoomControlMethod.prototype.withSmoothing = function(e) {\n var currentTime = e.timeStamp;\n\n // Record event.\n this._eventList.push(e);\n\n // Remove events whose smoothing has already expired.\n while (this._eventList[0].timeStamp < currentTime - this._opts.frictionTime*1000) {\n this._eventList.shift(0);\n }\n\n // Get the current velocity from the recorded events.\n // Each wheel movement causes a velocity of change/frictionTime during frictionTime.\n var velocity = 0;\n for (var i = 0; i < this._eventList.length; i++) {\n var zoomChangeFromEvent = wheelEventDelta(this._eventList[i]) * this._opts.zoomDelta;\n velocity += zoomChangeFromEvent / this._opts.frictionTime;\n }\n\n this._dynamics.velocity = velocity;\n this._dynamics.friction = Math.abs(velocity) / this._opts.frictionTime;\n\n this.emit('parameterDynamics', 'zoom', this._dynamics);\n\n e.preventDefault();\n\n this.emit('active');\n this.emit('inactive');\n};\n\n\nfunction wheelEventDelta(e) {\n var multiplier = e.deltaMode == 1 ? 20 : 1;\n return e.deltaY * multiplier;\n}\n\n\nmodule.exports = ScrollZoomControlMethod;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar clearOwnProperties = require('../util/clearOwnProperties');\n\n// Cross-browser mouse wheel event listener.\n// Adapted from: https://developer.mozilla.org/en-US/docs/Web/Events/wheel\n// This version requires eventShim.\nfunction WheelListener(elem, callback, useCapture) {\n var eventName = getEventName();\n\n if (eventName === 'wheel') {\n this._fun = callback;\n this._elem = elem;\n this._elem.addEventListener('wheel', this._fun, useCapture);\n } else if (eventName === 'mousewheel') {\n this._fun = fallbackHandler(callback);\n this._elem = elem;\n this._elem.addEventListener('mousewheel', this._fun, useCapture);\n } else {\n throw new Error('Browser does not support mouse wheel events');\n }\n}\n\n/**\n * Destructor.\n */\nWheelListener.prototype.destroy = function() {\n this._elem.removeEventListener(getEventName(), this._fun);\n clearOwnProperties(this);\n};\n\nfunction fallbackHandler(callback) {\n return function handleWheelEvent(originalEvent) {\n if (!originalEvent) {\n originalEvent = window.event;\n }\n\n // Create a normalized event object.\n var event = {\n originalEvent: originalEvent,\n target: originalEvent.target || originalEvent.srcElement,\n type: \"wheel\",\n deltaMode: 1,\n deltaX: 0,\n deltaZ: 0,\n timeStamp: originalEvent.timeStamp || Date.now(),\n preventDefault: originalEvent.preventDefault.bind(originalEvent)\n };\n\n // Calculate deltaY.\n event.deltaY = - 1/40 * originalEvent.wheelDelta;\n if (originalEvent.wheelDeltaX) {\n // Calculate deltaX.\n event.deltaX = - 1/40 * originalEvent.wheelDeltaX;\n }\n\n // Fire the callback.\n return callback(event);\n };\n}\n\n// Detect the supported wheel event name and cache the result.\nvar eventName;\nfunction getEventName() {\n if (eventName !== undefined) {\n return eventName;\n }\n if ('onwheel' in document.createElement('div')) {\n // Modern browsers support 'wheel'.\n return (eventName = 'wheel');\n } else if (document.onmousewheel !== undefined) {\n // Webkit and IE support at least 'mousewheel'.\n return (eventName = 'mousewheel');\n } else {\n return (eventName = null);\n }\n}\n\nmodule.exports = WheelListener;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar eventEmitter = require('minimal-event-emitter');\nvar Dynamics = require('./Dynamics');\nvar HammerGestures = require('./HammerGestures');\nvar clearOwnProperties = require('../util/clearOwnProperties');\n\n/**\n * @class PinchZoomControlMethod\n * @implements ControlMethod\n * @classdesc\n *\n * Control the view fov/zoom by pinching with two fingers.\n *\n * @param {Element} element Element to listen for events.\n * @param {string} pointerType Which Hammer.js pointer type to use\n * @param {Object} opts\n */\nfunction PinchZoomControlMethod(element, pointerType, opts) {\n this._hammer = HammerGestures.get(element, pointerType);\n\n this._lastEvent = null;\n\n this._active = false;\n\n this._dynamics = new Dynamics();\n\n this._hammer.on('pinchstart', this._handleStart.bind(this));\n this._hammer.on('pinch', this._handleEvent.bind(this));\n this._hammer.on('pinchend', this._handleEnd.bind(this));\n this._hammer.on('pinchcancel', this._handleEnd.bind(this));\n}\n\neventEmitter(PinchZoomControlMethod);\n\n/**\n * Destructor.\n */\nPinchZoomControlMethod.prototype.destroy = function() {\n this._hammer.release();\n clearOwnProperties(this);\n};\n\n\nPinchZoomControlMethod.prototype._handleStart = function() {\n if (!this._active) {\n this._active = true;\n this.emit('active');\n }\n};\n\n\nPinchZoomControlMethod.prototype._handleEnd = function() {\n this._lastEvent = null;\n\n if (this._active) {\n this._active = false;\n this.emit('inactive');\n }\n};\n\n\nPinchZoomControlMethod.prototype._handleEvent = function(e) {\n var scale = e.scale;\n\n if (this._lastEvent) {\n scale /= this._lastEvent.scale;\n }\n\n this._dynamics.offset = (scale - 1) * -1;\n this.emit('parameterDynamics', 'zoom', this._dynamics);\n\n this._lastEvent = e;\n};\n\n\nmodule.exports = PinchZoomControlMethod;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar eventEmitter = require('minimal-event-emitter');\nvar Dynamics = require('./Dynamics');\nvar clearOwnProperties = require('../util/clearOwnProperties');\n\n/**\n * @class VelocityControlMethod\n * @implements ControlMethod\n * @classdesc\n *\n * Sets the velocity and friction of a single parameter.\n *\n * The user should emit 'active' and 'inactive' events if required.\n *\n * @param {String} parameter The parameter to be controlled (e.g. `x`, `y` or `zoom`)\n*/\nfunction VelocityControlMethod(parameter) {\n if(!parameter) {\n throw new Error(\"VelocityControlMethod: parameter must be defined\");\n }\n\n this._parameter = parameter;\n this._dynamics = new Dynamics();\n}\neventEmitter(VelocityControlMethod);\n\n/**\n * Destructor.\n */\nVelocityControlMethod.prototype.destroy = function() {\n clearOwnProperties(this);\n};\n\n/**\n * Set the parameter's velocity.\n * @param {Number} velocity\n */\nVelocityControlMethod.prototype.setVelocity = function(velocity) {\n this._dynamics.velocity = velocity;\n this.emit('parameterDynamics', this._parameter, this._dynamics);\n};\n\n/**\n * Set the parameter's friction.\n * @param {Number} friction\n */\nVelocityControlMethod.prototype.setFriction = function(friction) {\n this._dynamics.friction = friction;\n this.emit('parameterDynamics', this._parameter, this._dynamics);\n};\n\nmodule.exports = VelocityControlMethod;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar eventEmitter = require('minimal-event-emitter');\nvar Dynamics = require('./Dynamics');\nvar clearOwnProperties = require('../util/clearOwnProperties');\n\n/**\n * @class ElementPressControlMethod\n * @implements ControlMethod\n * @classdesc\n *\n * Sets the velocity and friction of a single parameter by pressing and\n * unpressing a DOM element.\n *\n * @param {Element} element Element which activates the method when pressed\n * @param {string} parameter The parameter to be controlled (e.g. `x`, `y` or `zoom`)\n * @param {number} velocity Velocity at which the parameter changes. Use a\n * negative number for opposite direction\n * @param {number} friction Friction at which the parameter stops\n*/\nfunction ElementPressControlMethod(element, parameter, velocity, friction) {\n if(!element) {\n throw new Error(\"ElementPressControlMethod: element must be defined\");\n }\n if(!parameter) {\n throw new Error(\"ElementPressControlMethod: parameter must be defined\");\n }\n if(!velocity) {\n throw new Error(\"ElementPressControlMethod: velocity must be defined\");\n }\n if(!friction) {\n throw new Error(\"ElementPressControlMethod: friction must be defined\");\n }\n\n this._element = element;\n\n this._pressHandler = this._handlePress.bind(this);\n this._releaseHandler = this._handleRelease.bind(this);\n\n element.addEventListener('mousedown', this._pressHandler);\n element.addEventListener('mouseup', this._releaseHandler);\n element.addEventListener('mouseleave', this._releaseHandler);\n element.addEventListener('touchstart', this._pressHandler);\n element.addEventListener('touchmove', this._releaseHandler);\n element.addEventListener('touchend', this._releaseHandler);\n\n this._parameter = parameter;\n this._velocity = velocity;\n this._friction = friction;\n this._dynamics = new Dynamics();\n\n this._pressing = false;\n}\neventEmitter(ElementPressControlMethod);\n\n/**\n * Destructor.\n */\nElementPressControlMethod.prototype.destroy = function() {\n this._element.removeEventListener('mousedown', this._pressHandler);\n this._element.removeEventListener('mouseup', this._releaseHandler);\n this._element.removeEventListener('mouseleave', this._releaseHandler);\n this._element.removeEventListener('touchstart', this._pressHandler);\n this._element.removeEventListener('touchmove', this._releaseHandler);\n this._element.removeEventListener('touchend', this._releaseHandler);\n clearOwnProperties(this);\n};\n\nElementPressControlMethod.prototype._handlePress = function() {\n this._pressing = true;\n\n this._dynamics.velocity = this._velocity;\n this._dynamics.friction = 0;\n this.emit('parameterDynamics', this._parameter, this._dynamics);\n this.emit('active');\n};\n\nElementPressControlMethod.prototype._handleRelease = function() {\n if(this._pressing) {\n this._dynamics.friction = this._friction;\n this.emit('parameterDynamics', this._parameter, this._dynamics);\n this.emit('inactive');\n }\n\n this._pressing = false;\n};\n\nmodule.exports = ElementPressControlMethod;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar eventEmitter = require('minimal-event-emitter');\nvar Composer = require('./Composer');\nvar clearOwnProperties = require('../util/clearOwnProperties');\n\nvar debug = typeof MARZIPANODEBUG !== 'undefined' && MARZIPANODEBUG.controls;\n\n/**\n * @class Controls\n * @classdesc\n *\n * Set of controls which affect a view (e.g. keyboard, touch)\n *\n * {@link ControlMethod} instances can be registered on this class. The methods\n * are then combined to calculate the final parameters to change the {@link View}.\n *\n * Controls is attached to a {@link RenderLoop}. Currently it affects the\n * {@link view} of all {@link Layer} on the {@link Stage} of the\n * {@link RenderLoop} it is attached to. A more flexible API may be provided\n * in the future.\n *\n * The ControlMethod instances are registered with an id and may be enabled,\n * disabled and unregistered using that id. The whole Control can also be\n * enabled or disabled.\n *\n */\nfunction Controls(opts) {\n opts = opts || {};\n\n this._methods = {};\n this._methodGroups = {};\n this._composer = new Composer();\n\n // Whether the controls are enabled.\n this._enabled = (opts && opts.enabled) ? !!opts.enabled : true;\n\n // How many control methods are enabled and in the active state.\n this._activeCount = 0;\n\n this.updatedViews_ = [];\n\n this._attachedRenderLoop = null;\n}\n\neventEmitter(Controls);\n\n/**\n * Destructor.\n */\nControls.prototype.destroy = function() {\n this.detach();\n this._composer.destroy();\n clearOwnProperties(this);\n};\n\n\n/**\n * @return {ControlMethod[]} List of registered @{link ControlMethod instances}\n */\nControls.prototype.methods = function() {\n var obj = {};\n for (var id in this._methods) {\n obj[id] = this._methods[id];\n }\n return obj;\n};\n\n/**\n * @param {String} id\n * @return {ControlMethod}\n */\nControls.prototype.method = function(id) {\n return this._methods[id];\n};\n\n/**\n * @param {String} id\n * @param {ControlMethod} instance\n * @param {Boolean} [enable=false]\n */\nControls.prototype.registerMethod = function(id, instance, enable) {\n if (this._methods[id]) {\n throw new Error('Control method already registered with id ' + id);\n }\n\n this._methods[id] = {\n instance: instance,\n enabled: false,\n active: false,\n activeHandler: this._handleActive.bind(this, id),\n inactiveHandler: this._handleInactive.bind(this, id)\n };\n\n if(enable) {\n this.enableMethod(id, instance);\n }\n};\n\n\n/**\n * @param {String} id\n */\nControls.prototype.unregisterMethod = function(id) {\n var method = this._methods[id];\n if (!method) {\n throw new Error('No control method registered with id ' + id);\n }\n if (method.enabled) {\n this.disableMethod(id);\n }\n delete this._methods[id];\n};\n\n/**\n * @param {String} id\n */\nControls.prototype.enableMethod = function(id) {\n var method = this._methods[id];\n if (!method) {\n throw new Error('No control method registered with id ' + id);\n }\n if (method.enabled) {\n return;\n }\n method.enabled = true;\n if (method.active) {\n this._incrementActiveCount();\n }\n this._listen(id);\n this._updateComposer();\n this.emit('methodEnabled', id);\n};\n\n\n/**\n * @param {String} id\n */\nControls.prototype.disableMethod = function(id) {\n var method = this._methods[id];\n if (!method) {\n throw new Error('No control method registered with id ' + id);\n }\n if (!method.enabled) {\n return;\n }\n method.enabled = false;\n if (method.active) {\n this._decrementActiveCount();\n }\n this._unlisten(id);\n this._updateComposer();\n this.emit('methodDisabled', id);\n};\n\n\n/**\n * Create a method group, which can be used to more conveniently enable or\n * disable several control methods at once\n * @param {String} groupId\n * @param {String[]} methodIds\n */\nControls.prototype.addMethodGroup = function(groupId, methodIds) {\n this._methodGroups[groupId] = methodIds;\n}\n\n/**\n * @param {String} groupId\n */\nControls.prototype.removeMethodGroup = function(id) {\n delete this._methodGroups[id];\n}\n\n/**\n * @return {ControlMethodGroup[]} List of control method groups\n */\nControls.prototype.methodGroups = function() {\n var obj = {};\n for (var id in this._methodGroups) {\n obj[id] = this._methodGroups[id];\n }\n return obj;\n}\n\n/**\n * Enables all the control methods in the group\n * @param {String} groupId\n */\nControls.prototype.enableMethodGroup = function(id) {\n var self = this;\n self._methodGroups[id].forEach(function(methodId) {\n self.enableMethod(methodId);\n });\n}\n\n/**\n * Disables all the control methods in the group\n * @param {String} groupId\n */\nControls.prototype.disableMethodGroup = function(id) {\n var self = this;\n self._methodGroups[id].forEach(function(methodId) {\n self.disableMethod(methodId);\n });\n}\n\n/**\n * @returns {Boolean}\n */\nControls.prototype.enabled = function() {\n return this._enabled;\n};\n\n/**\n * Enables the controls\n */\nControls.prototype.enable = function() {\n if (this._enabled) {\n return;\n }\n this._enabled = true;\n if (this._activeCount > 0) {\n this.emit('active');\n }\n this.emit('enabled');\n this._updateComposer();\n};\n\n\n/**\n * Disables the controls\n */\nControls.prototype.disable = function() {\n if (!this._enabled) {\n return;\n }\n this._enabled = false;\n if (this._activeCount > 0) {\n this.emit('inactive');\n }\n this.emit('disabled');\n this._updateComposer();\n};\n\n\n\n/**\n * Attaches the controls to a {@link RenderLoop}. The RenderLoop will be woken\n * up when the controls are activated\n *\n * @param {RenderLoop}\n */\nControls.prototype.attach = function(renderLoop) {\n if (this._attachedRenderLoop) {\n this.detach();\n }\n\n this._attachedRenderLoop = renderLoop;\n this._beforeRenderHandler = this._updateViewsWithControls.bind(this);\n this._changeHandler = renderLoop.renderOnNextFrame.bind(renderLoop);\n\n this._attachedRenderLoop.addEventListener('beforeRender', this._beforeRenderHandler);\n this._composer.addEventListener('change', this._changeHandler);\n};\n\n/**\n * Detaches the controls\n */\nControls.prototype.detach = function() {\n if (!this._attachedRenderLoop) {\n return;\n }\n\n this._attachedRenderLoop.removeEventListener('beforeRender', this._beforeRenderHandler);\n this._composer.removeEventListener('change', this._changeHandler);\n\n this._beforeRenderHandler = null;\n this._changeHandler = null;\n this._attachedRenderLoop = null;\n};\n\n/**\n * @param {Boolean}\n */\nControls.prototype.attached = function() {\n return this._attachedRenderLoop != null;\n};\n\n\nControls.prototype._listen = function(id) {\n var method = this._methods[id];\n if (!method) {\n throw new Error('Bad method id');\n }\n method.instance.addEventListener('active', method.activeHandler);\n method.instance.addEventListener('inactive', method.inactiveHandler);\n};\n\n\nControls.prototype._unlisten = function(id) {\n var method = this._methods[id];\n if (!method) {\n throw new Error('Bad method id');\n }\n method.instance.removeEventListener('active', method.activeHandler);\n method.instance.removeEventListener('inactive', method.inactiveHandler);\n};\n\n\nControls.prototype._handleActive = function(id) {\n var method = this._methods[id];\n if (!method) {\n throw new Error('Bad method id');\n }\n if (!method.enabled) {\n throw new Error('Should not receive event from disabled control method');\n }\n if (!method.active) {\n method.active = true;\n this._incrementActiveCount();\n }\n};\n\n\nControls.prototype._handleInactive = function(id) {\n var method = this._methods[id];\n if (!method) {\n throw new Error('Bad method id');\n }\n if (!method.enabled) {\n throw new Error('Should not receive event from disabled control method');\n }\n if (method.active) {\n method.active = false;\n this._decrementActiveCount();\n }\n};\n\n\nControls.prototype._incrementActiveCount = function() {\n this._activeCount++;\n if (debug) {\n this._checkActiveCount();\n }\n if (this._enabled && this._activeCount === 1) {\n this.emit('active');\n }\n};\n\n\nControls.prototype._decrementActiveCount = function() {\n this._activeCount--;\n if (debug) {\n this._checkActiveCount();\n }\n if (this._enabled && this._activeCount === 0) {\n this.emit('inactive');\n }\n};\n\n\nControls.prototype._checkActiveCount = function() {\n var count = 0;\n for (var id in this._methods) {\n var method = this._methods[id];\n if (method.enabled && method.active) {\n count++;\n }\n }\n if (count != this._activeCount) {\n throw new Error('Bad control state');\n }\n};\n\n\nControls.prototype._updateComposer = function() {\n var composer = this._composer;\n\n for (var id in this._methods) {\n var method = this._methods[id];\n var enabled = this._enabled && method.enabled;\n\n if (enabled && !composer.has(method.instance)) {\n composer.add(method.instance);\n }\n if (!enabled && composer.has(method.instance)) {\n composer.remove(method.instance);\n }\n }\n};\n\n\nControls.prototype._updateViewsWithControls = function() {\n var controlData = this._composer.offsets();\n if (controlData.changing) {\n this._attachedRenderLoop.renderOnNextFrame();\n }\n\n // Update each view at most once, even when shared by multiple layers.\n // The number of views is expected to be small, so use an array to keep track.\n this.updatedViews_.length = 0;\n\n var layers = this._attachedRenderLoop.stage().listLayers();\n for (var i = 0; i < layers.length; i++) {\n var view = layers[i].view();\n if (this.updatedViews_.indexOf(view) < 0) {\n layers[i].view().updateWithControlParameters(controlData.offsets);\n this.updatedViews_.push(view);\n }\n }\n};\n\n\nmodule.exports = Controls;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar eventEmitter = require('minimal-event-emitter');\nvar Dynamics = require('./Dynamics');\nvar now = require('../util/now');\nvar clearOwnProperties = require('../util/clearOwnProperties');\n\n/**\n * @class ControlComposer\n * @classdesc\n *\n * Combines changes in parameters triggered by multiple {@link ControlMethod}\n * instances.\n *\n * @listens ControlMethod#parameterDynamics\n */\nfunction ControlComposer(opts) {\n opts = opts || {};\n\n this._methods = [];\n\n this._parameters = [ 'x' ,'y', 'axisScaledX', 'axisScaledY', 'zoom', 'yaw', 'pitch', 'roll' ];\n\n this._now = opts.nowForTesting || now;\n\n this._composedOffsets = { };\n\n this._composeReturn = { offsets: this._composedOffsets, changing: null };\n}\n\neventEmitter(ControlComposer);\n\n\nControlComposer.prototype.add = function(instance) {\n if (this.has(instance)) {\n return;\n }\n\n var dynamics = {};\n this._parameters.forEach(function(parameter) {\n dynamics[parameter] = {\n dynamics: new Dynamics(),\n time: null\n };\n });\n\n var parameterDynamicsHandler = this._updateDynamics.bind(this, dynamics);\n\n var method = {\n instance: instance,\n dynamics: dynamics,\n parameterDynamicsHandler: parameterDynamicsHandler\n };\n\n instance.addEventListener('parameterDynamics', parameterDynamicsHandler);\n\n this._methods.push(method);\n};\n\n\nControlComposer.prototype.remove = function(instance) {\n var index = this._indexOfInstance(instance);\n if (index >= 0) {\n var method = this._methods.splice(index, 1)[0];\n method.instance.removeEventListener('parameterDynamics', method.parameterDynamicsHandler);\n }\n};\n\n\nControlComposer.prototype.has = function(instance) {\n return this._indexOfInstance(instance) >= 0;\n};\n\n\nControlComposer.prototype._indexOfInstance = function(instance) {\n for (var i = 0; i < this._methods.length; i++) {\n if (this._methods[i].instance === instance) {\n return i;\n }\n }\n return -1;\n};\n\n\nControlComposer.prototype.list = function() {\n var instances = [];\n for (var i = 0; i < this._methods.length; i++) {\n instances.push(this._methods[i].instance);\n }\n return instances;\n};\n\n\nControlComposer.prototype._updateDynamics = function(storedDynamics, parameter, dynamics) {\n var parameterDynamics = storedDynamics[parameter];\n\n if (!parameterDynamics) {\n throw new Error(\"Unknown control parameter \" + parameter);\n }\n\n var newTime = this._now();\n parameterDynamics.dynamics.update(dynamics, (newTime - parameterDynamics.time)/1000);\n parameterDynamics.time = newTime;\n\n this.emit('change');\n};\n\n\nControlComposer.prototype._resetComposedOffsets = function() {\n for (var i = 0; i < this._parameters.length; i++) {\n this._composedOffsets[this._parameters[i]] = 0;\n }\n};\n\n\nControlComposer.prototype.offsets = function() {\n var parameter;\n var changing = false;\n\n var currentTime = this._now();\n\n this._resetComposedOffsets();\n\n for (var i = 0; i < this._methods.length; i++) {\n var methodDynamics = this._methods[i].dynamics;\n\n for (var p = 0; p < this._parameters.length; p++) {\n parameter = this._parameters[p];\n var parameterDynamics = methodDynamics[parameter];\n var dynamics = parameterDynamics.dynamics;\n\n\n // Add offset to composed offset\n if (dynamics.offset != null) {\n this._composedOffsets[parameter] += dynamics.offset;\n // Reset offset\n dynamics.offset = null;\n }\n\n // Calculate offset from velocity and add it\n var elapsed = (currentTime - parameterDynamics.time)/1000;\n var offsetFromVelocity = dynamics.offsetFromVelocity(elapsed);\n\n if(offsetFromVelocity) {\n this._composedOffsets[parameter] += offsetFromVelocity;\n }\n\n // Update velocity on dynamics\n var currentVelocity = dynamics.velocityAfter(elapsed);\n dynamics.velocity = currentVelocity;\n\n // If there is still a velocity, set changing\n if(currentVelocity) {\n changing = true;\n }\n\n parameterDynamics.time = currentTime;\n }\n }\n\n this._composeReturn.changing = changing;\n return this._composeReturn;\n};\n\n\nControlComposer.prototype.destroy = function() {\n var instances = this.list();\n for (var i = 0; i < instances.length; i++) {\n this.remove(instances[i]);\n }\n\n clearOwnProperties(this);\n};\n\n\nmodule.exports = ControlComposer;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar browser = require('bowser');\nvar eventEmitter = require('minimal-event-emitter');\n\nvar RenderLoop = require('./RenderLoop');\nvar Controls = require('./controls/Controls');\nvar Scene = require('./Scene');\nvar Timer = require('./Timer');\n\nvar WebGlStage = require('./stages/WebGl');\nvar CssStage = require('./stages/Css');\nvar FlashStage = require('./stages/Flash');\n\nvar ControlCursor = require('./controls/ControlCursor');\nvar HammerGestures = require('./controls/HammerGestures');\n\nvar registerDefaultControls = require('./controls/registerDefaultControls');\nvar registerDefaultRenderers = require('./renderers/registerDefaultRenderers');\n\nvar setOverflowHidden = require('./util/dom').setOverflowHidden;\nvar setAbsolute = require('./util/dom').setAbsolute;\nvar setFullSize = require('./util/dom').setFullSize;\nvar setBlocking = require('./util/dom').setBlocking;\n\nvar tween = require('./util/tween');\nvar noop = require('./util/noop');\nvar clearOwnProperties = require('./util/clearOwnProperties');\n\nvar stageMap = {\n webgl: WebGlStage,\n css: CssStage,\n flash: FlashStage\n};\n\nvar stagePrefList = [\n WebGlStage,\n CssStage,\n FlashStage\n];\n\n/**\n * Signals that the current scene has changed.\n * @event Viewer#sceneChange\n */\n\n/**\n * Signals that the view of the current scene has changed. See\n * {@link View#event:change}.\n * @event Viewer#viewChange\n */\n\n/**\n * @class Viewer\n * @classdesc\n *\n * A Viewer is a container for multiple {@link Scene scenes} to be displayed\n * inside a {@link Stage stage} contained in the DOM.\n *\n * Scenes may be created by calling {@link Viewer#createScene}. Except during a\n * scene switch, a single one of them, called the current scene, is visible.\n * Calling {@link Viewer#switchScene} sets the current scene and switches to it.\n *\n * @param {Element} domElement The DOM element to contain the stage.\n * @param {Object} opts Viewer creation options.\n * @param {(null|'webgl'|'css'|'flash')} [opts.stageType=null] The type of stage\n * to create. The default is to choose the most appropriate type depending\n * on the browser capabilities.\n * @param {Object} opts.controls Options to be passed to\n * {@link registerDefaultControls}.\n * @param {Object} opts.stage Options to be passed to the {@link Stage}\n * constructor.\n * @param {Object} opts.cursors Cursor options.\n * @param {Object} opts.cursors.drag Drag cursor options to be passed to the\n * {@link ControlCursor} constructor.\n */\nfunction Viewer(domElement, opts) {\n opts = opts || {};\n\n this._domElement = domElement;\n\n // Add `overflow: hidden` to the domElement.\n setOverflowHidden(domElement);\n\n // Select the stage type to use.\n var Stage;\n if (opts.stageType) {\n // If a specific stage type was specified, use that one.\n Stage = stageMap[opts.stageType];\n if (!Stage) {\n throw new Error('Unknown stage type: ' + opts.stageType);\n }\n } else {\n // Choose the best supported stage according to the default preference\n // order. Note that this may yield an unsupported stage for some\n // geometry/view combinations. Client code is expected to pass in a\n // specific stage type in those cases.\n for (var i = 0; i < stagePrefList.length; i++) {\n if (stagePrefList[i].supported()) {\n Stage = stagePrefList[i];\n break;\n }\n }\n if (!Stage) {\n throw new Error('None of the stage types are supported');\n }\n }\n\n // Create stage.\n this._stage = new Stage(opts.stage);\n\n // Register the default renderers for the selected stage.\n registerDefaultRenderers(this._stage);\n\n // Add the stage element into the DOM.\n this._domElement.appendChild(this._stage.domElement());\n\n // Create control container.\n // Controls cannot be placed directly on the root DOM element because\n // Hammer.js will prevent click events from reaching the elements beneath.\n\n // The hotspot containers will be added inside the controls container.\n this._controlContainer = document.createElement('div');\n setAbsolute(this._controlContainer);\n setFullSize(this._controlContainer);\n\n // Prevent bounce scroll effect on iOS.\n // Applied only for iOS, as Android's events must have the default action to allow interaction with hotspots.\n if (browser.ios) {\n this._controlContainer.addEventListener('touchmove', function(event) {\n event.preventDefault();\n });\n }\n\n\n // Old IE does not detect mouse events on elements without background\n // Add a child element to the controls with full width, a background color\n // and opacity 0\n var controlCapture = document.createElement('div');\n setAbsolute(controlCapture);\n setFullSize(controlCapture);\n setBlocking(controlCapture);\n\n this._controlContainer.appendChild(controlCapture);\n domElement.appendChild(this._controlContainer);\n\n // Respond to window size changes.\n this._size = {};\n this.updateSize();\n this._updateSizeListener = this.updateSize.bind(this);\n window.addEventListener('resize', this._updateSizeListener);\n\n // Create render loop.\n this._renderLoop = new RenderLoop(this._stage);\n\n // Create the controls and register them with the render loop.\n this._controls = new Controls();\n this._controlMethods = registerDefaultControls(this._controls, this._controlContainer, opts.controls);\n this._controls.attach(this._renderLoop);\n\n // Expose HammerJS.\n this._hammerManagerTouch = HammerGestures.get(this._controlContainer, 'touch');\n this._hammerManagerMouse = HammerGestures.get(this._controlContainer, 'mouse');\n\n // Initialize drag cursor.\n this._dragCursor = new ControlCursor(this._controls, 'mouseViewDrag', domElement, opts.cursors && opts.cursors.drag || {});\n\n // Start the render loop.\n this._renderLoop.start();\n\n // Scene list.\n this._scenes = [];\n\n // The currently visible scene.\n // During a scene transition, this is the scene being switched to.\n this._currentScene = null;\n\n // The scene being switched from during a scene transition.\n // This is necessary to update the layers correctly when they are added or\n // removed during a transition.\n this._replacedScene = null;\n\n // The current transition.\n this._cancelCurrentTween = null;\n\n // The event listener fired when the current scene layers change.\n // This is attached to the correct scene whenever the current scene changes.\n this._layerChangeHandler = this._updateSceneLayers.bind(this);\n\n // The event listener fired when the current scene view changes.\n // This is attached to the correct scene whenever the current scene changes.\n this._viewChangeHandler = this.emit.bind(this, 'viewChange');\n\n // Setup the idle timer.\n // By default, the timer has an infinite duration so it does nothing.\n this._idleTimer = new Timer();\n this._idleTimer.start();\n\n // Reset the timer whenever the view changes.\n this._resetIdleTimerHandler = this._resetIdleTimer.bind(this);\n this.addEventListener('viewChange', this._resetIdleTimerHandler);\n\n // Start the idle movement when the idle timer fires.\n this._triggerIdleTimerHandler = this._triggerIdleTimer.bind(this);\n this._idleTimer.addEventListener('timeout', this._triggerIdleTimerHandler);\n\n // Stop an ongoing movement when the controls are activated or when the\n // scene changes.\n this._stopMovementHandler = this.stopMovement.bind(this);\n this._controls.addEventListener('active', this._stopMovementHandler);\n this.addEventListener('sceneChange', this._stopMovementHandler);\n\n // The currently programmed idle movement.\n this._idleMovement = null;\n}\n\neventEmitter(Viewer);\n\n\n/**\n * Destructor.\n */\nViewer.prototype.destroy = function() {\n\n window.removeEventListener('resize', this._updateSizeListener);\n\n if (this._currentScene) {\n this._removeSceneEventListeners(this._currentScene);\n }\n\n if (this._replacedScene) {\n this._removeSceneEventListeners(this._replacedScene);\n }\n\n this._dragCursor.destroy();\n\n for (var methodName in this._controlMethods) {\n this._controlMethods[methodName].destroy();\n }\n\n while (this._scenes.length) {\n this.destroyScene(this._scenes[0]);\n }\n\n // The Flash renderer must be torn down before the element is removed from\n // the DOM, so all scenes must have been destroyed before this point.\n this._domElement.removeChild(this._stage.domElement());\n\n this._stage.destroy();\n this._renderLoop.destroy();\n this._controls.destroy();\n this._controls = null;\n\n if (this._cancelCurrentTween) {\n this._cancelCurrentTween();\n }\n\n clearOwnProperties(this);\n};\n\n\n/**\n * Updates the stage size to fill the containing element.\n *\n * This method is automatically called when the browser window is resized.\n * Most clients won't need to explicitly call it to keep the size up to date.\n */\nViewer.prototype.updateSize = function() {\n var size = this._size;\n size.width = this._domElement.clientWidth;\n size.height = this._domElement.clientHeight;\n this._stage.setSize(size);\n};\n\n\n/**\n * Returns the underlying {@link Stage stage}.\n * @return {Stage}\n */\nViewer.prototype.stage = function() {\n return this._stage;\n};\n\n\n/**\n * Returns the underlying {@link RenderLoop render loop}.\n * @return {RenderLoop}\n */\nViewer.prototype.renderLoop = function() {\n return this._renderLoop;\n};\n\n\n/**\n * Returns the underlying {@link Controls controls}.\n * @return {Controls}\n */\nViewer.prototype.controls = function() {\n return this._controls;\n};\n\n\n/**\n * Returns the underlying DOM element.\n * @return {Element}\n */\nViewer.prototype.domElement = function() {\n return this._domElement;\n};\n\n\n/**\n * Creates a new {@link Scene scene} with a single layer and adds it to the\n * viewer.\n *\n * The current scene does not change. To switch to the scene, call\n * {@link Viewer#switchScene}.\n *\n * @param {Object} opts Scene creation options.\n * @param {View} opts.view The scene's underlying {@link View}.\n * @param {Source} opts.source The layer's underlying {@link Source}.\n * @param {Geometry} opts.geometry The layer's underlying {@link Geometry}.\n * @param {boolean} [opts.pinFirstLevel=false] Whether to pin the first level to\n * provide a fallback of last resort, at the cost of memory consumption.\n * @param {Object} [opts.textureStoreOpts={}] Options to pass to the\n * {@link TextureStore} constructor.\n * @param {Object} [opts.layerOpts={}] Options to pass to the {@link Layer}\n * constructor.\n * @return {Scene}\n */\nViewer.prototype.createScene = function(opts) {\n opts = opts || {};\n\n var scene = this.createEmptyScene({ view: opts.view });\n\n scene.createLayer({\n source: opts.source,\n geometry: opts.geometry,\n pinFirstLevel: opts.pinFirstLevel,\n textureStoreOpts: opts.textureStoreOpts,\n layerOpts: opts.layerOpts\n });\n\n return scene;\n};\n\n\n/**\n * Creates a new {@link Scene scene} with no layers and adds it to the viewer.\n *\n * Layers may be added to the scene by calling {@link Scene#createLayer}.\n * However, if the scene has a single layer, it is simpler to call\n * {@link Viewer#createScene} instead of this method.\n *\n * The current scene does not change. To switch to the scene, call\n * {@link Viewer#switchScene}.\n *\n * @param {Object} opts Scene creation options.\n * @param {View} opts.view The scene's underlying {@link View}.\n * @return {Scene}\n */\nViewer.prototype.createEmptyScene = function(opts) {\n opts = opts || {};\n\n var scene = new Scene(this, opts.view);\n this._scenes.push(scene);\n\n return scene;\n};\n\n\nViewer.prototype._updateSceneLayers = function() {\n var i;\n var layer;\n\n var stage = this._stage;\n var currentScene = this._currentScene;\n var replacedScene = this._replacedScene;\n\n var oldLayers = stage.listLayers();\n\n // The stage contains layers from at most two scenes: the current one, on top,\n // and the one currently being switched away from, on the bottom.\n var newLayers = [];\n if (replacedScene) {\n newLayers = newLayers.concat(replacedScene.listLayers());\n }\n if (currentScene) {\n newLayers = newLayers.concat(currentScene.listLayers());\n }\n\n // A single layer can be added or removed from the scene at a time.\n if (Math.abs(oldLayers.length - newLayers.length) !== 1) {\n throw new Error('Stage and scene out of sync');\n }\n\n if (newLayers.length < oldLayers.length) {\n // A layer was removed.\n for (i = 0; i < oldLayers.length; i++) {\n layer = oldLayers[i];\n if (newLayers.indexOf(layer) < 0) {\n this._removeLayerFromStage(layer);\n break;\n }\n }\n }\n if (newLayers.length > oldLayers.length) {\n // A layer was added.\n for (i = 0; i < newLayers.length; i++) {\n layer = newLayers[i];\n if (oldLayers.indexOf(layer) < 0) {\n this._addLayerToStage(layer, i);\n }\n }\n }\n\n // TODO: When in the middle of a scene transition, call the transition update\n // function immediately to prevent an added layer from flashing with the wrong\n // opacity.\n};\n\n\nViewer.prototype._addLayerToStage = function(layer, i) {\n // Pin the first level to ensure a fallback while the layer is visible.\n // Note that this is distinct from the `pinFirstLevel` option passed to\n // createScene(), which pins the layer even when it's not visible.\n layer.pinFirstLevel();\n this._stage.addLayer(layer, i);\n};\n\n\nViewer.prototype._removeLayerFromStage = function(layer) {\n this._stage.removeLayer(layer);\n layer.unpinFirstLevel();\n layer.textureStore().clearNotPinned();\n};\n\n\nViewer.prototype._addSceneEventListeners = function(scene) {\n scene.addEventListener('layerChange', this._layerChangeHandler);\n scene.addEventListener('viewChange', this._viewChangeHandler);\n};\n\n\nViewer.prototype._removeSceneEventListeners = function(scene) {\n scene.removeEventListener('layerChange', this._layerChangeHandler);\n scene.removeEventListener('viewChange', this._viewChangeHandler);\n};\n\n\n/**\n * Destroys a {@link Scene scene} and removes it from the viewer.\n * @param {Scene} scene\n */\nViewer.prototype.destroyScene = function(scene) {\n var i = this._scenes.indexOf(scene);\n if (i < 0) {\n throw new Error('No such scene in viewer');\n }\n\n var j;\n var layers;\n\n if (this._currentScene === scene) {\n // The destroyed scene is the current scene.\n // Remove event listeners, remove layers from stage and cancel transition.\n this._removeSceneEventListeners(scene);\n layers = scene.listLayers();\n for (j = 0; j < layers.length; j++) {\n this._removeLayerFromStage(layers[j]);\n }\n if (this._cancelCurrentTween) {\n this._cancelCurrentTween();\n this._cancelCurrentTween = null;\n }\n this._currentScene = null;\n this.emit('sceneChange');\n }\n\n if (this._replacedScene === scene) {\n // The destroyed scene is being switched away from.\n // Remove event listeners and remove layers from stage.\n this._removeSceneEventListeners(scene);\n layers = scene.listLayers();\n for (j = 0; j < layers.length; j++) {\n this._removeLayerFromStage(layers[j]);\n }\n this._replacedScene = null;\n }\n\n this._scenes.splice(i, 1);\n\n scene.destroy();\n};\n\n\n/**\n * Destroys all {@link Scene scenes} and removes them from the viewer.\n */\nViewer.prototype.destroyAllScenes = function() {\n while (this._scenes.length > 0) {\n this.destroyScene(this._scenes[0]);\n }\n};\n\n\n/**\n * Returns whether the viewer contains a {@link Scene scene}.\n * @param {Scene} scene\n * @return {boolean}\n */\nViewer.prototype.hasScene = function(scene) {\n return this._scenes.indexOf(scene) >= 0;\n};\n\n\n/**\n * Returns a list of all {@link Scene scenes}.\n * @return {Scene[]}\n */\nViewer.prototype.listScenes = function() {\n return [].concat(this._scenes);\n};\n\n\n/**\n * Returns the current {@link Scene scene}, or null if there isn't one.\n *\n * To change the current scene, call {@link Viewer#switchScene}.\n *\n * @return {Scene}\n */\nViewer.prototype.scene = function() {\n return this._currentScene;\n};\n\n\n/**\n * Returns the {@link View view} for the current {@link Scene scene}, or null\n * if there isn't one.\n * @return {View}\n */\nViewer.prototype.view = function() {\n var scene = this._currentScene;\n if (scene) {\n return scene.view();\n }\n return null;\n};\n\n\n/**\n * Tweens the {@link View view} for the current {@link Scene scene}.\n *\n * This method is equivalent to calling {@link Scene#lookTo} on the current\n * scene.\n *\n * @param {Object} opts Options to pass into {@link Scene#lookTo}.\n * @param {function} done Function to call when the tween is complete.\n */\nViewer.prototype.lookTo = function(params, opts, done) {\n // TODO: is it an error to call lookTo when no scene is displayed?\n var scene = this._currentScene;\n if (scene) {\n scene.lookTo(params, opts, done);\n }\n};\n\n\n/**\n * Starts a movement, possibly replacing the current movement.\n *\n * This method is equivalent to calling {@link Scene#startMovement} on the\n * current scene. If there is no current scene, this is a no-op.\n *\n * @param {function} fn The movement function.\n * @param {function} done Function to be called when the movement finishes or is\n * interrupted.\n */\nViewer.prototype.startMovement = function(fn, done) {\n var scene = this._currentScene;\n if (!scene) {\n return;\n }\n scene.startMovement(fn, done);\n};\n\n\n/**\n * Stops the current movement.\n *\n * This method is equivalent to calling {@link Scene#stopMovement} on the\n * current scene. If there is no current scene, this is a no-op.\n */\nViewer.prototype.stopMovement = function() {\n var scene = this._currentScene;\n if (!scene) {\n return;\n }\n scene.stopMovement();\n};\n\n\n/**\n * Returns the current movement.\n *\n * This method is equivalent to calling {@link Scene#movement} on the\n * current scene. If there is no current scene, this is a no-op.\n *\n * @return {function}\n */\nViewer.prototype.movement = function() {\n var scene = this._currentScene;\n if (!scene) {\n return;\n }\n return scene.movement();\n};\n\n\n/**\n * Schedules an idle movement to be automatically started when the view remains\n * unchanged for the given timeout period.\n *\n * Changing the view while the idle movement is active stops the movement and\n * schedules it to start again after the same timeout period. To disable it\n * permanently, call with a null movement or an infinite timeout.\n *\n * @param {number} timeout Timeout period in milliseconds.\n * @param {function} movement Automatic movement function, or null to disable.\n */\nViewer.prototype.setIdleMovement = function(timeout, movement) {\n this._idleTimer.setDuration(timeout);\n this._idleMovement = movement;\n};\n\n\n/**\n * Stops the idle movement. It will be started again after the timeout set by\n * {@link Viewer#setIdleMovement}.\n */\nViewer.prototype.breakIdleMovement = function() {\n this.stopMovement();\n this._resetIdleTimer();\n};\n\n\nViewer.prototype._resetIdleTimer = function() {\n this._idleTimer.start();\n};\n\n\nViewer.prototype._triggerIdleTimer = function() {\n var idleMovement = this._idleMovement;\n if (!idleMovement) {\n return;\n }\n this.startMovement(idleMovement);\n};\n\n\nvar defaultSwitchDuration = 1000;\n\nfunction defaultTransitionUpdate(val, newScene, oldScene) {\n var layers = newScene.listLayers();\n layers.forEach(function(layer) {\n layer.mergeEffects({ opacity: val });\n });\n\n newScene._hotspotContainer.domElement().style.opacity = val;\n}\n\n\n/**\n * Switches to another {@link Scene scene} with a fade transition. This scene\n * becomes the current one.\n *\n * If a transition is already taking place, it is interrupted before the new one\n * starts.\n *\n * @param {Scene} newScene The scene to switch to.\n * @param {Object} opts Transition options.\n * @param {number} [opts.transitionDuration=1000] Transition duration, in\n * milliseconds.\n * @param {number} [opts.transitionUpdate=defaultTransitionUpdate]\n * Transition update function, with signature `f(t, newScene, oldScene)`.\n * This function is called on each frame with `t` increasing from 0 to 1.\n * An initial call with `t=0` and a final call with `t=1` are guaranteed.\n * The default function sets the opacity of the new scene to `t`.\n * @param {function} done Function to call when the transition finishes or is\n * interrupted. If the new scene is equal to the old one, no transition\n * takes place, but this function is still called.\n */\nViewer.prototype.switchScene = function(newScene, opts, done) {\n var self = this;\n\n opts = opts || {};\n done = done || noop;\n\n var stage = this._stage;\n\n var oldScene = this._currentScene;\n\n // Do nothing if the target scene is the current one.\n if (oldScene === newScene) {\n done();\n return;\n }\n\n if (this._scenes.indexOf(newScene) < 0) {\n throw new Error('No such scene in viewer');\n }\n\n // Cancel an already ongoing transition. This ensures that the stage contains\n // layers from exactly one scene before the transition begins.\n if (this._cancelCurrentTween) {\n this._cancelCurrentTween();\n this._cancelCurrentTween = null;\n }\n\n var oldSceneLayers = oldScene ? oldScene.listLayers() : [];\n var newSceneLayers = newScene.listLayers();\n var stageLayers = stage.listLayers();\n\n // Check that the stage contains exactly as many layers as the current scene,\n // and that the top layer is the right one. If this test fails, either there\n // is a bug or the user tried to modify the stage concurrently.\n if (oldScene && ((stageLayers.length !== oldSceneLayers.length) ||\n (stageLayers.length > 1 && stageLayers[0] != oldSceneLayers[0]))) {\n throw new Error('Stage not in sync with viewer');\n }\n\n // Get the transition parameters.\n var duration = opts.transitionDuration != null ?\n opts.transitionDuration : defaultSwitchDuration;\n var update = opts.transitionUpdate != null ?\n opts.transitionUpdate : defaultTransitionUpdate;\n\n // Add new scene layers into the stage before starting the transition.\n for (var i = 0; i < newSceneLayers.length; i++) {\n this._addLayerToStage(newSceneLayers[i]);\n }\n\n // Update function to be called on every frame.\n function tweenUpdate(val) {\n update(val, newScene, oldScene);\n }\n\n // Once the transition is complete, remove old scene layers from the stage and\n // remove the event listeners. If the old scene was destroyed during the\n // transition, this has already been taken care of. Otherwise, we still need\n // to get a fresh copy of the scene's layers, since they might have changed\n // during the transition.\n function tweenDone() {\n if (self._replacedScene) {\n self._removeSceneEventListeners(self._replacedScene);\n oldSceneLayers = self._replacedScene.listLayers();\n for (var i = 0; i < oldSceneLayers.length; i++) {\n self._removeLayerFromStage(oldSceneLayers[i]);\n }\n self._replacedScene = null;\n }\n self._cancelCurrentTween = null;\n done();\n }\n\n // Store the cancelable for the transition.\n this._cancelCurrentTween = tween(duration, tweenUpdate, tweenDone);\n\n // Update the current and replaced scene.\n this._currentScene = newScene;\n this._replacedScene = oldScene;\n\n // Emit scene and view change events.\n this.emit('sceneChange');\n this.emit('viewChange');\n\n // Add event listeners to the new scene.\n // Note that event listeners can only be removed from the old scene once the\n // transition is complete, since layers might get added or removed in the\n // interim.\n this._addSceneEventListeners(newScene);\n};\n\n\nmodule.exports = Viewer;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar Layer = require('./Layer');\nvar TextureStore = require('./TextureStore');\nvar HotspotContainer = require('./HotspotContainer');\nvar eventEmitter = require('minimal-event-emitter');\nvar now = require('./util/now');\nvar noop = require('./util/noop');\nvar type = require('./util/type');\nvar defaults = require('./util/defaults');\nvar clearOwnProperties = require('./util/clearOwnProperties');\n\n/**\n * Signals that the scene's view has changed. See {@link View#event:change}.\n * @event Scene#viewChange\n */\n\n/**\n * Signals that the scene's layers have changed.\n * @event Scene#layerChange\n */\n\n/**\n * @class Scene\n * @classdesc\n *\n * A Scene is a stack of {@link Layer layers} sharing the same {@link View view}\n * and {@link HotspotContainer hotspot container}. It belongs to the\n * {@link Viewer viewer} inside which it is displayed.\n *\n * Clients should call {@link Viewer#createScene} instead of invoking the\n * constructor directly.\n *\n * @param {Viewer} viewer The viewer this scene belongs to.\n * @param {View} view The scene's underlying view.\n */\nfunction Scene(viewer, view) {\n this._viewer = viewer;\n this._view = view;\n this._layers = [];\n\n // Hotspot container. Assume it occupies a full rect.\n this._hotspotContainer = new HotspotContainer(\n viewer._controlContainer,\n viewer.stage(),\n this._view,\n viewer.renderLoop());\n\n // The current movement.\n this._movement = null;\n this._movementStartTime = null;\n this._movementStep = null;\n this._movementParams = null;\n this._movementCallback = null;\n\n // Event listener for updating the view according to the current movement.\n // The listener is set/unset on the render loop when a movement starts/stops.\n this._updateMovementHandler = this._updateMovement.bind(this);\n\n // Show or hide hotspots when scene changes.\n this._updateHotspotContainerHandler = this._updateHotspotContainer.bind(this);\n this._viewer.addEventListener('sceneChange', this._updateHotspotContainerHandler);\n\n // Emit event when view changes.\n this._viewChangeHandler = this.emit.bind(this, 'viewChange');\n this._view.addEventListener('change', this._viewChangeHandler);\n\n // Update the hotspot container.\n this._updateHotspotContainer();\n}\n\neventEmitter(Scene);\n\n\n/**\n * Destructor. Clients should call {@link Viewer#destroyScene} instead.\n */\nScene.prototype.destroy = function() {\n this._view.removeEventListener('change', this._viewChangeHandler);\n this._viewer.removeEventListener('sceneChange', this._updateHotspotContainerHandler);\n\n if (this._movement) {\n this.stopMovement();\n }\n\n this._hotspotContainer.destroy();\n\n this.destroyAllLayers();\n\n clearOwnProperties(this);\n};\n\n\n\n/**\n * Returns the {@link HotspotContainer hotspot container} for the scene.\n * @return {Layer}\n */\nScene.prototype.hotspotContainer = function() {\n return this._hotspotContainer;\n};\n\n/**\n * Returns the first of the {@link Layer layers} belonging to the scene, or\n * null if the scene has no layers.\n *\n * This method is equivalent to `Scene#listLayers[0]`. It may be removed in the\n * future.\n *\n * @return {Layer}\n */\nScene.prototype.layer = function() {\n return this._layers[0];\n};\n\n/**\n* Returns a list of all {@link Layer layers} belonging to the scene. The\n* returned list is in display order, background to foreground.\n* @return {Layer[]}\n */\nScene.prototype.listLayers = function() {\n return [].concat(this._layers);\n};\n\n\n/**\n * Returns the scene's underlying {@link View view}.\n * @return {View}\n */\nScene.prototype.view = function() {\n return this._view;\n};\n\n\n/**\n * Returns the {@link Viewer viewer} the scene belongs to.\n * @return {Viewer}\n */\nScene.prototype.viewer = function() {\n return this._viewer;\n};\n\n\n/**\n * Returns whether the scene is currently visible.\n * @return {boolean}\n */\nScene.prototype.visible = function() {\n return this._viewer.scene() === this;\n};\n\n\n/**\n * Creates a new {@link Layer layer} and adds it into the scene in the\n * foreground position.\n *\n * @param {Object} opts Layer creation options.\n * @param {Source} opts.source The layer's underlying {@link Source}.\n * @param {Source} opts.geometry The layer's underlying {@link Geometry}.\n * @param {boolean} [opts.pinFirstLevel=false] Whether to pin the first level to\n * provide a fallback of last resort, at the cost of memory consumption.\n * @param {Object} [opts.textureStoreOpts={}] Options to pass to the\n * {@link TextureStore} constructor.\n * @param {Object} [opts.layerOpts={}] Options to pass to the {@link Layer}\n * constructor.\n * @return {Layer}\n */\nScene.prototype.createLayer = function(opts) {\n opts = opts || {};\n\n var textureStoreOpts = opts.textureStoreOpts || {};\n var layerOpts = opts.layerOpts || {};\n\n var source = opts.source;\n var geometry = opts.geometry;\n var view = this._view;\n var stage = this._viewer.stage();\n var textureStore = new TextureStore(source, stage, textureStoreOpts);\n var layer = new Layer(source, geometry, view, textureStore, layerOpts);\n\n this._layers.push(layer);\n\n if (opts.pinFirstLevel) {\n layer.pinFirstLevel();\n }\n\n // Signal that the layers have changed.\n this.emit('layerChange');\n\n return layer;\n};\n\n\n/**\n * Destroys a {@link Layer layer} and removes it from the scene.\n * @param {Layer} layer\n * @throws An error if the layer does not belong to the scene.\n */\nScene.prototype.destroyLayer = function(layer) {\n var i = this._layers.indexOf(layer);\n if (i < 0) {\n throw new Error('No such layer in scene');\n }\n\n this._layers.splice(i, 1);\n\n // Signal that the layers have changed.\n this.emit('layerChange');\n\n layer.textureStore().destroy();\n layer.destroy();\n};\n\n\n/**\n * Destroys all {@link Layer layers} and removes them from the scene.\n */\nScene.prototype.destroyAllLayers = function() {\n while (this._layers.length > 0) {\n this.destroyLayer(this._layers[0]);\n }\n};\n\n\n/**\n * Switches to the scene.\n *\n * This is equivalent to calling {@link Viewer#switchScene} on this scene.\n *\n * @param {Object} opts Options to pass into {@link Viewer#switchScene}.\n * @param {function} done Function to call when the switch is complete.\n */\nScene.prototype.switchTo = function(opts, done) {\n return this._viewer.switchScene(this, opts, done);\n};\n\n\n/**\n * Tweens the scene's underlying {@link View view}.\n *\n * @param {Object} params Target view parameters.\n * @param {Object} opts Transition options.\n * @param {function} [opts.ease=easeInOutQuad] Tween easing function\n * @param {number} [opts.controlsInterrupt=false] allow controls to interrupt\n * an ongoing tween.\n * @param {number} [opts.transitionDuration=1000] Tween duration, in\n * milliseconds.\n * @param {number} [opts.closest=true] Whether to tween through the shortest\n * path between the initial and final view parameters. This requires\n * {@link View#normalizeToClosest} to be implemented, and does nothing\n * otherwise.\n * @param {function} done Function to call when the tween finishes or is\n * interrupted.\n */\nScene.prototype.lookTo = function(params, opts, done) {\n opts = opts || {};\n done = done || noop;\n\n if (type(params) !== 'object') {\n throw new Error(\"Target view parameters must be an object\");\n }\n\n // Quadratic in/out easing.\n var easeInOutQuad = function (k) {\n if ((k *= 2) < 1) {\n return 0.5 * k * k;\n }\n return -0.5 * (--k * (k - 2) - 1);\n };\n\n var ease = opts.ease != null ? opts.ease : easeInOutQuad;\n var controlsInterrupt = opts.controlsInterrupt != null ? opts.controlsInterrupt : false;\n var duration = opts.transitionDuration != null ? opts.transitionDuration : 1000;\n var shortest = opts.shortest != null ? opts.shortest : true;\n\n var view = this._view;\n\n var initialParams = view.parameters();\n\n var finalParams = {};\n defaults(finalParams, params);\n defaults(finalParams, initialParams);\n\n // Tween through the shortest path if requested.\n // The view must implement the normalizeToClosest() method.\n if (shortest && view.normalizeToClosest) {\n view.normalizeToClosest(finalParams, finalParams);\n }\n\n var movement = function() {\n\n var finalUpdate = false;\n\n return function(params, elapsed) {\n\n if (elapsed >= duration && finalUpdate) {\n return null;\n }\n\n var delta = Math.min(elapsed / duration, 1);\n\n for (var param in params) {\n var start = initialParams[param];\n var end = finalParams[param];\n params[param] = start + ease(delta) * (end - start);\n }\n\n finalUpdate = elapsed >= duration;\n\n return params;\n\n };\n };\n\n var reenableControls = this._viewer.controls().enabled();\n\n if (!controlsInterrupt) {\n this._viewer.controls().disable();\n }\n\n this.startMovement(movement, function() {\n if (reenableControls) {\n this._viewer.controls().enable();\n }\n done();\n });\n\n};\n\n\n/**\n * Starts a movement, possibly replacing the current movement.\n *\n * @param {function} fn The movement function.\n * @param {function} done Function to be called when the movement finishes or is\n * interrupted.\n */\nScene.prototype.startMovement = function(fn, done) {\n\n var renderLoop = this._viewer.renderLoop();\n\n if (this._movement) {\n this.stopMovement();\n }\n\n var step = fn();\n if (typeof step !== 'function') {\n throw new Error('Bad movement');\n }\n\n this._movement = fn;\n this._movementStep = step;\n this._movementStartTime = now();\n this._movementParams = {};\n this._movementCallback = done;\n\n renderLoop.addEventListener('beforeRender', this._updateMovementHandler);\n renderLoop.renderOnNextFrame();\n};\n\n\n/**\n * Stops the current movement.\n */\nScene.prototype.stopMovement = function() {\n\n var renderLoop = this._viewer.renderLoop();\n\n if (!this._movement) {\n return;\n }\n\n if (this._movementCallback) {\n this._movementCallback();\n }\n\n renderLoop.removeEventListener('beforeRender', this._updateMovementHandler);\n\n this._movement = null;\n this._movementStep = null;\n this._movementStartTime = null;\n this._movementParams = null;\n this._movementCallback = null;\n};\n\n\n/**\n * Returns the current movement.\n * @return {function}\n */\nScene.prototype.movement = function() {\n return this._movement;\n};\n\n\nScene.prototype._updateMovement = function() {\n\n if (!this._movement) {\n throw new Error('Should not call update');\n }\n\n var renderLoop = this._viewer.renderLoop();\n var view = this._view;\n\n var elapsed = now() - this._movementStartTime;\n var step = this._movementStep;\n var params = this._movementParams;\n\n params = view.parameters(params);\n params = step(params, elapsed);\n if (params == null) {\n this.stopMovement();\n } else {\n view.setParameters(params);\n renderLoop.renderOnNextFrame();\n }\n\n};\n\n\nScene.prototype._updateHotspotContainer = function() {\n if (this.visible()) {\n this._hotspotContainer.show();\n } else {\n this._hotspotContainer.hide();\n }\n};\n\n\nmodule.exports = Scene;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar eventEmitter = require('minimal-event-emitter');\nvar Hotspot = require('./Hotspot');\nvar calcRect = require('./util/calcRect');\nvar cssPointerEventsSupported = require('./support/cssPointerEvents');\nvar positionAbsolutely = require('./util/positionAbsolutely');\nvar setAbsolute = require('./util/dom').setAbsolute;\nvar setOverflowHidden = require('./util/dom').setOverflowHidden;\nvar setOverflowVisible = require('./util/dom').setOverflowVisible;\nvar setNullSize = require('./util/dom').setNullSize;\nvar setPixelSize = require('./util/dom').setPixelSize;\nvar setPointerEvents = require('./util/dom').setWithVendorPrefix('pointer-events');\nvar clearOwnProperties = require('./util/clearOwnProperties');\n\n/**\n * Signals that a hotspot has been created or destroyed on the container.\n * @event HotspotContainer#hotspotsChange\n */\n\n/**\n * @class HotspotContainer\n * @classdesc\n *\n * Creates a DOM element to hold {@link Hotspot hotspots} and updates their\n * position when necessary.\n *\n * @param {Element} parentDomElement The DOM element inside which the container\n * should be created.\n * @param {Stage} stage The underlying stage.\n * @param {View} view The view according to which the hotspots are positioned.\n * @param {RenderLoop} renderLoop The render loop indicating when the hotspots\n * must be rendered.\n * @param {Object} opts\n * @param {RectSpec} opts.rect Rectangular region covered by the container. See\n * {@link Effects#rect}.\n */\nfunction HotspotContainer(parentDomElement, stage, view, renderLoop, opts) {\n opts = opts || {};\n\n this._parentDomElement = parentDomElement;\n this._stage = stage;\n this._view = view;\n this._renderLoop = renderLoop;\n\n // Hotspot list.\n this._hotspots = [];\n\n // Whether the hotspot container should be visible.\n // It may still be hidden if a rect effect is set on a browser without\n // pointer-events support.\n this._visible = true;\n\n // The current rect.\n this._rect = opts.rect;\n\n // Whether the visibility or the rect have changed since the last DOM update.\n this._visibilityOrRectChanged = true;\n\n // The last seen stage dimensions.\n this._stageWidth = null;\n this._stageHeight = null;\n\n // Temporary variable to hold the calculated position and size.\n this._tmpRect = {};\n\n // Wrapper element. When the rect effect is set, the wrapper will have nonzero\n // dimensions and `pointer-events: none` so that hotspots outside the rect are\n // hidden, but no mouse events are hijacked. The exception is browsers without\n // pointer-events support, where we refuse to show the hotspots when a rect is\n // set as it would prevent the controls from receiving mouse events.\n this._hotspotContainerWrapper = document.createElement('div');\n setAbsolute(this._hotspotContainerWrapper);\n setPointerEvents(this._hotspotContainerWrapper, 'none');\n this._parentDomElement.appendChild(this._hotspotContainerWrapper);\n\n // Hotspot container element. It has zero dimensions and `pointer-events: all`\n // to override the `pointer-events: none` on the wrapper and allow hotspots to\n // be interacted with.\n this._hotspotContainer = document.createElement('div');\n setAbsolute(this._hotspotContainer);\n setPointerEvents(this._hotspotContainer, 'all');\n this._hotspotContainerWrapper.appendChild(this._hotspotContainer);\n\n // Update when the hotspots change or scene is re-rendered.\n this._updateHandler = this._update.bind(this);\n this._renderLoop.addEventListener('afterRender', this._updateHandler);\n}\n\neventEmitter(HotspotContainer);\n\n\n/**\n * Destructor.\n */\nHotspotContainer.prototype.destroy = function() {\n while (this._hotspots.length) {\n this.destroyHotspot(this._hotspots[0]);\n }\n\n this._parentDomElement.removeChild(this._hotspotContainerWrapper);\n\n this._renderLoop.removeEventListener('afterRender', this._updateHandler);\n\n clearOwnProperties(this);\n};\n\n\n/**\n * @return {Element}\n */\nHotspotContainer.prototype.domElement = function() {\n return this._hotspotContainer;\n};\n\n\n/**\n * @param {Rect} rect\n */\nHotspotContainer.prototype.setRect = function(rect) {\n if (rect && !cssPointerEventsSupported() && typeof console !== 'undefined') {\n console.warn(\n \"Using a rect effect is not fully supported on this browser. \" +\n \"Hotspots may not be shown.\")\n }\n this._rect = rect;\n this._visibilityOrRectChanged = true;\n};\n\n\n/**\n * @return {Rect}\n */\nHotspotContainer.prototype.rect = function() {\n return this._rect;\n};\n\n\n/**\n * Creates a new hotspot in this container.\n *\n * @param {Element} domElement DOM element to use for the hotspot\n * @param {Object} coords The hotspot coordinates.\n * Use {@link RectilinearViewCoords}` for a {@link RectilinearView} or\n * {@link FlatViewCoords} for a {@link FlatView}.\n * @param {Object} opts Options in the same format as the `opts` argument to\n * the {@link Hotspot} constructor.\n * @return {Hotspot}\n */\nHotspotContainer.prototype.createHotspot = function(domElement, coords, opts) {\n coords = coords || {};\n\n var hotspot = new Hotspot(\n domElement, this._hotspotContainer, this._view, coords, opts);\n this._hotspots.push(hotspot);\n hotspot._update();\n\n this.emit('hotspotsChange');\n\n return hotspot;\n};\n\n\n/**\n * @param {Hotspot} hotspot\n * @return {boolean}\n */\nHotspotContainer.prototype.hasHotspot = function(hotspot) {\n return this._hotspots.indexOf(hotspot) >= 0;\n};\n\n\n/**\n * @return {Hotspot[]}\n */\nHotspotContainer.prototype.listHotspots = function() {\n return [].concat(this._hotspots);\n};\n\n\n/**\n * Removes a hotspot from the container.\n *\n * @param {Hotspot} hotspot\n */\nHotspotContainer.prototype.destroyHotspot = function(hotspot) {\n var i = this._hotspots.indexOf(hotspot);\n if (i < 0) {\n throw new Error('No such hotspot');\n }\n this._hotspots.splice(i, 1);\n\n hotspot.destroy();\n this.emit('hotspotsChange');\n};\n\n\n/**\n * Hide the container's DOM element, causing every contained {@link Hotspot} to\n * be hidden.\n */\nHotspotContainer.prototype.hide = function() {\n if (this._visible) {\n this._visible = false;\n this._visibilityOrRectChanged = true;\n this._update();\n }\n};\n\n\n/**\n * Show the container's DOM element, causing every contained {@link Hotspot} to\n * be shown.\n */\nHotspotContainer.prototype.show = function() {\n if (!this._visible) {\n this._visible = true;\n this._visibilityOrRectChanged = true;\n this._update();\n }\n};\n\n\nHotspotContainer.prototype._update = function() {\n var wrapper = this._hotspotContainerWrapper;\n var width = this._stage.width();\n var height = this._stage.height();\n var tmpRect = this._tmpRect;\n\n // Avoid updating the wrapper DOM unless necessary.\n if (this._visibilityOrRectChanged ||\n (this._rect && (width !== this._stageWidth || height !== this._stageHeight))) {\n var visible = this._visible && !(this._rect && !cssPointerEventsSupported());\n wrapper.style.display = visible ? 'block' : 'none';\n\n if (visible) {\n if (this._rect) {\n calcRect(width, height, this._rect, tmpRect);\n positionAbsolutely(wrapper, width * tmpRect.x, height * tmpRect.y);\n setPixelSize(wrapper, width * tmpRect.width, height * tmpRect.height);\n setOverflowHidden(wrapper);\n } else {\n positionAbsolutely(wrapper, 0, 0);\n setNullSize(wrapper);\n setOverflowVisible(wrapper);\n }\n }\n\n this._stageWidth = width;\n this._stageHeight = height;\n this._visibilityOrRectChanged = false;\n }\n\n // Update hotspots unconditionally, as the view parameters may have changed.\n for (var i = 0; i < this._hotspots.length; i++) {\n this._hotspots[i]._update();\n }\n};\n\n\nmodule.exports = HotspotContainer;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar eventEmitter = require('minimal-event-emitter');\nvar cssSupported = require('./support/Css');\nvar positionAbsolutely = require('./util/positionAbsolutely');\nvar setTransform = require('./util/dom').setTransform;\nvar clearOwnProperties = require('./util/clearOwnProperties');\n\n/**\n * @class Hotspot\n * @classdesc\n *\n * A Hotspot allows a DOM element to be placed at a fixed position in the\n * image. The position is updated automatically when the {@link View view}\n * changes.\n *\n * Positioning is performed with the `transform` CSS property when available,\n * falling back to the `position`, `left` and `top` properties when not.\n * In both cases, the top left corner of the element is placed in the requested\n * position; clients are expected to use additional children elements or other\n * CSS properties to achieve more sophisticated layouts.\n *\n * There are two kinds of hotspots: regular and embedded. A regular hotspot\n * does not change size depending on the zoom level. An embedded hotspot is\n * displayed at a fixed size relative to the panorama, always covering the\n * same portion of the image. Embedded hotspots require CSS 3D transform\n * support.\n *\n * Clients should call {@link HotspotContainer#createHotspot} instead of\n * invoking the constructor directly.\n *\n * @param {Element} domElement The DOM element.\n * @param {View} view The view.\n * @param {Object} coords The hotspot coordinates.\n * Use {@link RectilinearViewCoords} for a {@link RectilinearView} or\n * {@link FlatViewCoords} for a {@link FlatView}.\n * @param {Object} opts Additional options.\n * @param {Object} opts.perspective Perspective options for embedded hotspots.\n * @param {number} [opts.perspective.radius=null] If set, embed the hotspot\n * into the image by transforming it into the surface of a sphere with this\n * radius.\n * @param {string} [opts.perspective.extraTransforms=null] If set, append this\n * value to the CSS `transform` property used to position the hotspot. This\n * may be used to rotate an embedded hotspot.\n */\nfunction Hotspot(domElement, parentDomElement, view, coords, opts) {\n\n opts = opts || {};\n opts.perspective = opts.perspective || {};\n opts.perspective.extraTransforms =\n opts.perspective.extraTransforms != null ? opts.perspective.extraTransforms : \"\";\n\n if ((opts.perspective.radius || opts.perspective.extraTransforms) && !cssSupported()) {\n throw new Error('CSS transforms on hotspots are not supported on this browser');\n }\n\n this._domElement = domElement;\n this._parentDomElement = parentDomElement;\n this._view = view;\n this._coords = {};\n this._perspective = {};\n\n this.setPosition(coords);\n\n // Add hotspot into the DOM.\n this._parentDomElement.appendChild(this._domElement);\n\n this.setPerspective(opts.perspective);\n\n // Whether the hotspot is visible.\n // The hotspot may still be hidden if it's inside a hidden HotspotContainer.\n this._visible = true;\n\n // The current calculated screen position.\n this._position = { x: 0, y: 0 };\n}\n\neventEmitter(Hotspot);\n\n\n/**\n * Destructor.\n * Clients should call {@link HotspotContainer#destroyHotspot} instead.\n */\nHotspot.prototype.destroy = function() {\n this._parentDomElement.removeChild(this._domElement);\n clearOwnProperties(this);\n};\n\n\n/**\n * @return {Element}\n */\nHotspot.prototype.domElement = function() {\n return this._domElement;\n};\n\n\n/**\n * @return {Object}\n */\nHotspot.prototype.position = function() {\n return this._coords;\n};\n\n\n/**\n * @param {Object} coords\n */\nHotspot.prototype.setPosition = function(coords) {\n for (var key in coords) {\n this._coords[key] = coords[key];\n }\n this._update();\n // TODO: We should probably emit a hotspotsChange event on the parent\n // HotspotContainer. What's the best way to do so?\n};\n\n\n/**\n * @return {Object}\n */\nHotspot.prototype.perspective = function() {\n return this._perspective;\n};\n\n\n/**\n * @param {Object}\n */\nHotspot.prototype.setPerspective = function(perspective) {\n for (var key in perspective) {\n this._perspective[key] = perspective[key];\n }\n this._update();\n};\n\n\n/**\n * Show the hotspot\n */\nHotspot.prototype.show = function() {\n if (!this._visible) {\n this._visible = true;\n this._update();\n }\n};\n\n\n/**\n * Hide the hotspot\n */\nHotspot.prototype.hide = function() {\n if (this._visible) {\n this._visible = false;\n this._update();\n }\n};\n\n\nHotspot.prototype._update = function() {\n var element = this._domElement;\n\n var params = this._coords;\n var position = this._position;\n var x, y;\n\n var isVisible = false;\n\n if (this._visible) {\n var view = this._view;\n\n if (this._perspective.radius) {\n // Hotspots that are embedded in the panorama may be visible even when\n // positioned behind the camera.\n isVisible = true;\n this._setEmbeddedPosition(view, params);\n } else {\n // Regular hotspots are only visible when positioned in front of the\n // camera. Note that they may be partially visible when positioned outside\n // the viewport.\n view.coordinatesToScreen(params, position);\n x = position.x;\n y = position.y;\n\n if (x != null && y != null) {\n isVisible = true;\n this._setPosition(x, y);\n }\n }\n }\n\n // Show if visible, hide if not.\n if (isVisible) {\n element.style.display = 'block';\n element.style.position = 'absolute';\n }\n else {\n element.style.display = 'none';\n element.style.position = '';\n }\n\n};\n\n\nHotspot.prototype._setEmbeddedPosition = function(view, params) {\n var transform = view.coordinatesToPerspectiveTransform(\n params, this._perspective.radius, this._perspective.extraTransforms);\n setTransform(this._domElement, transform);\n};\n\n\nHotspot.prototype._setPosition = function(x, y) {\n positionAbsolutely(this._domElement, x, y, this._perspective.extraTransforms);\n};\n\n\nmodule.exports = Hotspot;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar cssSupported = require('../support/Css');\nvar setTransform = require('./dom').setTransform;\nvar setPixelPosition = require('./dom').setPixelPosition;\nvar decimal = require('./decimal');\n\n// This cannot belong in util/dom.js because support/Css also depends on it\n// and it would cause a circular dependency.\n\nfunction positionAbsolutely(element, x, y, extraTransforms) {\n extraTransforms = extraTransforms || '';\n if (cssSupported()) {\n // Use CSS 3D transforms when the browser supports them.\n // A translateZ(0) transform improves performance on Chrome by creating a\n // new layer for the element, which prevents unnecessary repaints.\n var transform = 'translateX(' + decimal(x) + 'px) translateY(' + decimal(y) + 'px) translateZ(0) ' + extraTransforms;\n setTransform(element, transform);\n } else {\n // Fall back to absolute positioning.\n setPixelPosition(element, x, y);\n }\n}\n\nmodule.exports = positionAbsolutely;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar browser = require('bowser');\n\n// Detect CSS pointer-events support.\nfunction checkCssPointerEventsSupported() {\n\n // Check for existence of CSS property.\n var style = document.createElement('a').style;\n style.cssText = 'pointer-events:auto';\n var hasCssProperty = style.pointerEvents === 'auto';\n\n // The above result is spurious on emulation mode for IE 8-10.\n var isOldIE = browser.msie && parseFloat(browser.version) < 11;\n\n return hasCssProperty && !isOldIE;\n}\n\n// Cache result.\nvar supported;\nfunction cssPointerEventsSupported() {\n if (supported !== undefined) {\n return supported;\n }\n return (supported = checkCssPointerEventsSupported());\n}\n\nmodule.exports = cssPointerEventsSupported;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar eventEmitter = require('minimal-event-emitter');\nvar defaults = require('./util/defaults');\nvar now = require('./util/now');\n\nvar defaultOptions = {\n duration: Infinity\n};\n\n\n/**\n * Signals a timeout.\n * @event Timer#timeout\n */\n\n\n/**\n * @class Timer\n * @classdesc\n *\n * A Timer provides a mechanism to receive an event after a timeout.\n *\n * A timer has a set duration, and is either started or stopped at a given time.\n * The timer is initially stopped. When the timer is started, a timeout event is\n * scheduled to fire once the set duration elapses. When the timer is stopped,\n * the scheduled timeout event is cancelled. When a timeout event fires, the\n * timer returns to the stopped state.\n *\n * @param {number} [opts.duration=Infinity] Timeout in milliseconds.\n */\nfunction Timer(opts) {\n\n opts = defaults(opts || {}, defaultOptions);\n\n this._duration = opts.duration;\n\n this._startTime = null;\n\n this._handle = null;\n\n this._check = this._check.bind(this);\n\n}\n\neventEmitter(Timer);\n\n\n/**\n * Starts the timer. If the timer is already started, this has the effect of\n * stopping and starting again (i.e. resetting the timer).\n */\nTimer.prototype.start = function() {\n this._startTime = now();\n if (this._handle == null && this._duration < Infinity) {\n this._setup(this._duration);\n }\n};\n\n\n/**\n * Returns whether the timer is in the started state.\n * @return {boolean}\n */\nTimer.prototype.started = function() {\n return this._startTime != null;\n};\n\n\n/**\n * Stops the timer.\n */\nTimer.prototype.stop = function() {\n this._startTime = null;\n if (this._handle != null) {\n clearTimeout(this._handle);\n this._handle = null;\n }\n};\n\n\nTimer.prototype._setup = function(interval) {\n this._handle = setTimeout(this._check, interval);\n};\n\n\nTimer.prototype._teardown = function() {\n clearTimeout(this._handle);\n this._handle = null;\n};\n\n\nTimer.prototype._check = function() {\n var currentTime = now();\n var elapsed = currentTime - this._startTime;\n var remaining = this._duration - elapsed;\n\n this._teardown();\n\n if (remaining <= 0) {\n this.emit('timeout');\n this._startTime = null;\n } else if (remaining < Infinity) {\n this._setup(remaining);\n }\n};\n\n\n/**\n * Returns the currently set duration.\n */\nTimer.prototype.duration = function() {\n return this._duration;\n};\n\n\n/**\n * Sets the duration. If the timer is already started, the timeout event is\n * rescheduled to occur once the new duration has elapsed since the last call\n * to start. In particular, if an amount of time larger than the new duration\n * has already elapsed, the timeout event fires immediately.\n * @param {number}\n */\nTimer.prototype.setDuration = function(duration) {\n this._duration = duration;\n if (this._startTime != null) {\n this._check();\n }\n};\n\n\nmodule.exports = Timer;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar defaults = require('../util/defaults');\nvar clearOwnProperties = require('../util/clearOwnProperties');\n\nvar defaultOpts = {\n active: 'move',\n inactive: 'default',\n disabled: 'default'\n};\n\n/**\n * @class ControlCursor\n * @classdesc\n *\n * Sets the CSS cursor on a DOM element according to the state of a\n * {@link ControlMethod}.\n *\n * @param {Controls} controls Controls instance containing the control method.\n * @param {string} id ID of the control method.\n * @param {Element} element DOM element where the cursor should be set.\n * @param {Object} opts The control cursors. Each field must be a valid value\n * for the `cursor` CSS property.\n * @param {string} [opts.active='move'] Cursor to set when the control method\n * is enabled and active.\n * @param {string} [opts.inactive='default'] Cursor to set when the control\n * method is enabled and inactive.\n * @param {string} [opts.disabled='default'] Cursor to set when the control\n * method is disabled.\n */\nfunction ControlCursor(controls, id, element, opts) {\n opts = defaults(opts || {}, defaultOpts);\n\n // TODO: This class may misbehave if the control method is unregistered and a\n // different control method is registered under the same id.\n\n this._element = element;\n this._controls = controls;\n this._id = id;\n\n this._attached = false;\n\n this._setActiveCursor = this._setCursor.bind(this, opts.active);\n this._setInactiveCursor = this._setCursor.bind(this, opts.inactive);\n this._setDisabledCursor = this._setCursor.bind(this, opts.disabled);\n this._setOriginalCursor = this._setCursor.bind(this, this._element.style.cursor);\n\n this._updateAttachmentHandler = this._updateAttachment.bind(this);\n\n controls.addEventListener('methodEnabled', this._updateAttachmentHandler);\n controls.addEventListener('methodDisabled', this._updateAttachmentHandler);\n controls.addEventListener('enabled', this._updateAttachmentHandler);\n controls.addEventListener('disabled', this._updateAttachmentHandler);\n\n this._updateAttachment();\n}\n\n/**\n * Destructor.\n */\nControlCursor.prototype.destroy = function() {\n this._detachFromControlMethod(this._controls.method(this._id));\n this._setOriginalCursor();\n\n this._controls.removeEventListener('methodEnabled',\n this._updateAttachmentHandler);\n this._controls.removeEventListener('methodDisabled',\n this._updateAttachmentHandler);\n this._controls.removeEventListener('enabled',\n this._updateAttachmentHandler);\n this._controls.removeEventListener('disabled',\n this._updateAttachmentHandler);\n\n clearOwnProperties(this);\n};\n\nControlCursor.prototype._updateAttachment = function() {\n var controls = this._controls;\n var id = this._id;\n if (controls.enabled() && controls.method(id).enabled) {\n this._attachToControlMethod(controls.method(id));\n } else {\n this._detachFromControlMethod(controls.method(id));\n }\n};\n\nControlCursor.prototype._attachToControlMethod = function(controlMethod) {\n if (!this._attached) {\n controlMethod.instance.addEventListener('active', this._setActiveCursor);\n controlMethod.instance.addEventListener('inactive', this._setInactiveCursor);\n\n if (controlMethod.active) {\n this._setActiveCursor();\n } else {\n this._setInactiveCursor();\n }\n\n this._attached = true;\n }\n};\n\nControlCursor.prototype._detachFromControlMethod = function(controlMethod) {\n if (this._attached) {\n controlMethod.instance.removeEventListener('active', this._setActiveCursor);\n controlMethod.instance.removeEventListener('inactive', this._setInactiveCursor);\n\n this._setDisabledCursor();\n\n this._attached = false;\n }\n};\n\nControlCursor.prototype._setCursor = function(cursor) {\n this._element.style.cursor = cursor;\n}\n\nmodule.exports = ControlCursor;\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar defaults = require('../util/defaults');\nvar DragControlMethod = require('./Drag');\nvar QtvrControlMethod = require('./Qtvr');\nvar ScrollZoomControlMethod = require('./ScrollZoom');\nvar PinchZoomControlMethod = require('./PinchZoom');\nvar KeyControlMethod = require('./Key');\n\nvar defaultOptions = {\n mouseViewMode: 'drag'\n};\n\n/**\n * Instantiate and register some commonly used {@link ControlMethod} instances.\n *\n * The following instances are registered:\n * - mouseViewDrag\n * - mouseViewQtvr\n * - touchView\n * - pinch\n * - arrowKeys\n * - plusMinusKeys\n * - wasdKeys\n * - qeKeys\n *\n * @param {Controls} controls Where to register the instances.\n * @param {Element} element Element to listen for events.\n * @param {Object} opts\n * @param {'drag'|'qtvr'} mouseViewMode\n */\nfunction registerDefaultControls(controls, element, opts) {\n opts = defaults(opts || {}, defaultOptions);\n\n var controlMethods = {\n mouseViewDrag: new DragControlMethod(element, 'mouse'),\n mouseViewQtvr: new QtvrControlMethod(element, 'mouse'),\n touchView: new DragControlMethod(element, 'touch'),\n pinch: new PinchZoomControlMethod(element, 'touch'),\n\n leftArrowKey: new KeyControlMethod(37, 'x', -0.7, 3),\n rightArrowKey: new KeyControlMethod(39, 'x', 0.7, 3),\n upArrowKey: new KeyControlMethod(38, 'y', -0.7, 3),\n downArrowKey: new KeyControlMethod(40, 'y', 0.7, 3),\n plusKey: new KeyControlMethod(107, 'zoom', -0.7, 3),\n minusKey: new KeyControlMethod(109, 'zoom', 0.7, 3),\n\n wKey: new KeyControlMethod(87, 'y', -0.7, 3),\n aKey: new KeyControlMethod(65, 'x', -0.7, 3),\n sKey: new KeyControlMethod(83, 'y', 0.7, 3),\n dKey: new KeyControlMethod(68, 'x', 0.7, 3),\n qKey: new KeyControlMethod(81, 'roll', 0.7, 3),\n eKey: new KeyControlMethod(69, 'roll', -0.7, 3)\n };\n\n if(opts.scrollZoom !== false) {\n controlMethods.scrollZoom = new ScrollZoomControlMethod(element); //{ frictionTime: 0 }\n }\n\n var controlMethodGroups = {\n arrowKeys: [ 'leftArrowKey', 'rightArrowKey', 'upArrowKey', 'downArrowKey' ],\n plusMinusKeys: [ 'plusKey', 'minusKey' ],\n wasdKeys: [ 'wKey', 'aKey', 'sKey', 'dKey' ],\n qeKeys: [ 'qKey', 'eKey' ]\n };\n\n\n var enabledControls = [ 'scrollZoom', 'touchView', 'pinch' ];\n switch (opts.mouseViewMode) {\n case 'drag':\n enabledControls.push('mouseViewDrag');\n break;\n case 'qtvr':\n enabledControls.push('mouseViewQtvr');\n break;\n default:\n throw new Error(\"Unknown mouse view mode: \" + opts.mouseViewMode);\n }\n\n for (var id in controlMethods) {\n var method = controlMethods[id];\n controls.registerMethod(id, method);\n if (enabledControls.indexOf(id) >= 0) {\n controls.enableMethod(id);\n }\n }\n\n for (var groupId in controlMethodGroups) {\n var methodGroup = controlMethodGroups[groupId];\n controls.addMethodGroup(groupId, methodGroup);\n }\n\n return controlMethods;\n}\n\nmodule.exports = registerDefaultControls;","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar now = require('./now');\n\nfunction tween(duration, update, done) {\n var cancelled = false;\n\n var startTime = now();\n\n function runUpdate() {\n if(cancelled) { return; }\n var tweenVal = (now() - startTime)/duration;\n if(tweenVal < 1) {\n update(tweenVal);\n requestAnimationFrame(runUpdate);\n }\n else {\n update(1);\n done();\n }\n }\n\n update(0);\n requestAnimationFrame(runUpdate);\n\n return function cancel() {\n cancelled = true;\n done.apply(null, arguments);\n }\n}\n\nmodule.exports = tween;","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar vec4 = require('gl-matrix').vec4;\nvar mat4 = require('gl-matrix').mat4;\n\n/**\n * Helper functions for color transformation {@link Effects}.\n *\n * References:\n *\n * - [ColorMatrix Guide](http://docs.rainmeter.net/tips/colormatrix-guide)\n * - [Matrix Operations for Image Processing](http://www.graficaobscura.com/matrix/index.html)\n * - [WebGLImageFilter](https://github.com/phoboslab/WebGLImageFilter)\n * - [glfx.js](https://github.com/evanw/glfx.js)\n *\n * @namespace colorEffects\n */\n\n/**\n * A vector and matrix corresponding to an identity transformation.\n *\n * @param {Object} result Object to store result\n * @param {vec4} result.colorOffset Array with zeroes.\n * @param {mat4} result.colorMatrix Identity matrix.\n *\n * @memberof colorEffects\n */\nfunction identity(resultArg) {\n var result = resultArg || {};\n result.colorOffset = result.colorOffset || vec4.create();\n result.colorMatrix = result.colorMatrix || mat4.create();\n return result;\n}\n\n/**\n * Apply color effects to a single pixel\n *\n * @param {vec4} pixel Values in range [0,1]\n * @param {Object} effect\n * @param {vec4} effect.colorOffset\n * @param {mat4} effect.colorMatrix\n * @param {vec4} result Object to store result\n *\n * @memberof colorEffects\n */\nfunction applyToPixel(pixel, effect, result) {\n vec4TransformMat4Transposed(result, pixel, effect.colorMatrix);\n vec4.add(result, result, effect.colorOffset);\n}\n\n// Oddly, the colorTransform matrix needs to be transposed to be used with\n// vec4.transformMat4. It is strange that transformMat4 dosn't work the same\n// way as multiplying on the shader.\n// TODO: investigate this further\nfunction vec4TransformMat4Transposed(out, a, m) {\n var x = a[0], y = a[1], z = a[2], w = a[3];\n out[0] = m[0] * x + m[1] * y + m[2] * z + m[3] * w;\n out[1] = m[4] * x + m[5] * y + m[6] * z + m[7] * w;\n out[2] = m[8] * x + m[9] * y + m[10] * z + m[11] * w;\n out[3] = m[12] * x + m[13] * y + m[14] * z + m[15] * w;\n return out;\n}\n\n/**\n * Apply color effects to an ImageData\n *\n * @param {ImageData} imageData This object will be mutated\n * @param {Object} effect\n * @param {vec4} effect.colorOffset\n * @param {mat4} effect.colorMatrix\n *\n * @memberof colorEffects\n */\nvar tmpPixel = vec4.create();\nfunction applyToImageData(imageData, effect) {\n var width = imageData.width;\n var height = imageData.height;\n var data = imageData.data;\n\n for(var i = 0; i < width * height; i++) {\n vec4.set(tmpPixel, data[i*4+0]/255, data[i*4+1]/255, data[i*4+2]/255, data[i*4+3]/255);\n applyToPixel(tmpPixel, effect, tmpPixel);\n data[i*4+0] = tmpPixel[0]*255;\n data[i*4+1] = tmpPixel[1]*255;\n data[i*4+2] = tmpPixel[2]*255;\n data[i*4+3] = tmpPixel[3]*255;\n }\n}\n\nmodule.exports = {\n identity: identity,\n applyToPixel: applyToPixel,\n applyToImageData: applyToImageData\n};\n","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nvar defaults = require('./util/defaults');\n\nvar defaultSpeed = 0.1;\nvar defaultAccel = 0.01;\n\nvar defaultOptions = {\n yawSpeed: defaultSpeed,\n pitchSpeed: defaultSpeed,\n fovSpeed: defaultSpeed,\n yawAccel: defaultAccel,\n pitchAccel: defaultAccel,\n fovAccel: defaultAccel,\n targetPitch: 0,\n targetFov: null\n};\n\n/**\n * @param {Object} opts\n * @param {Number} [opts.yawSpeed=0.1] Yaw maximum speed\n * @param {Number} [opts.pitchSpeed=0.1] Pitch maximum speed\n * @param {Number} [opts.fovSpeed=0.1] Fov maximum speed\n * @param {Number} [opts.yawAccel=0.01] Yaw acceleration\n * @param {Number} [opts.pitchAccel=0.01] Pitch acceleration\n * @param {Number} [opts.fovAccel=0.01] Fov acceleration\n * @param {Number} [opts.targetPitch=0] Value that pitch converges to. `null` means that the pitch will not change.\n * @param {Number} [opts.targetFov=null] Value that fov converges to. `null` means that the fov will not change.\n * @returns Movement function that can be passed to {@link Viewer#setIdleMovement} or {@link Scene#startMovement}\n*/\nfunction autorotate(opts) {\n\n opts = defaults(opts || {}, defaultOptions);\n\n var yawSpeed = opts.yawSpeed;\n var pitchSpeed = opts.pitchSpeed;\n var fovSpeed = opts.fovSpeed;\n var yawAccel = opts.yawAccel;\n var pitchAccel = opts.pitchAccel;\n var fovAccel = opts.fovAccel;\n var targetPitch = opts.targetPitch;\n var targetFov = opts.targetFov;\n\n return function start() {\n\n var lastTime = 0;\n var lastYawSpeed = 0;\n var lastPitchSpeed = 0;\n var lastFovSpeed = 0;\n\n var currentYawSpeed = 0;\n var currentPitchSpeed = 0;\n var currentFovSpeed = 0;\n\n var timeDelta;\n var yawDelta;\n var pitchDelta;\n var fovDelta;\n\n return function step(params, currentTime) {\n\n timeDelta = (currentTime - lastTime) / 1000;\n currentYawSpeed = Math.min(lastYawSpeed + timeDelta * yawAccel, yawSpeed);\n yawDelta = currentYawSpeed * timeDelta;\n params.yaw = params.yaw + yawDelta;\n\n if (targetPitch != null && params.pitch !== targetPitch) {\n var pitchThresh = 0.5 * lastPitchSpeed * lastPitchSpeed / pitchAccel;\n if (Math.abs(targetPitch - params.pitch) > pitchThresh) {\n // Acceleration phase\n currentPitchSpeed = Math.min(lastPitchSpeed + timeDelta * pitchAccel, pitchSpeed);\n } else {\n // Deceleration phase\n currentPitchSpeed = Math.max(lastPitchSpeed - timeDelta * pitchAccel, 0);\n }\n // currentPitchSpeed is the absolute value (>= 0)\n pitchDelta = currentPitchSpeed * timeDelta;\n if (targetPitch < params.pitch) {\n params.pitch = Math.max(targetPitch, params.pitch - pitchDelta);\n }\n if (targetPitch > params.pitch) {\n params.pitch = Math.min(targetPitch, params.pitch + pitchDelta);\n }\n }\n\n if (targetFov != null && params.fov !== targetPitch) {\n var fovThresh = 0.5 * lastFovSpeed * lastFovSpeed / fovAccel;\n if (Math.abs(targetFov - params.fov) > fovThresh) {\n // Acceleration phase\n currentFovSpeed = Math.min(lastFovSpeed + timeDelta * fovAccel, fovSpeed);\n } else {\n // Deceleration phase\n currentFovSpeed = Math.max(lastFovSpeed - timeDelta * fovAccel, 0);\n }\n // currentFovSpeed is the absolute value (>= 0)\n fovDelta = currentFovSpeed * timeDelta;\n if (targetFov < params.fov) {\n params.fov = Math.max(targetFov, params.fov - fovDelta);\n }\n if (targetFov > params.fov) {\n params.fov = Math.min(targetFov, params.fov + fovDelta);\n }\n }\n\n lastTime = currentTime;\n lastYawSpeed = currentYawSpeed;\n lastPitchSpeed = currentPitchSpeed;\n lastFovSpeed = currentFovSpeed;\n\n return params;\n\n };\n\n };\n\n}\n\nmodule.exports = autorotate;","/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\n/**\n * @memberof util\n * @param {number} deg\n * @return {number}\n */\nfunction degToRad(deg) {\n return deg * Math.PI / 180;\n}\n\nmodule.exports = degToRad;","import * as glMatrix from \"./common.js\";\nimport * as mat2 from \"./mat2.js\";\nimport * as mat2d from \"./mat2d.js\";\nimport * as mat3 from \"./mat3.js\";\nimport * as mat4 from \"./mat4.js\";\nimport * as quat from \"./quat.js\";\nimport * as quat2 from \"./quat2.js\";\nimport * as vec2 from \"./vec2.js\";\nimport * as vec3 from \"./vec3.js\";\nimport * as vec4 from \"./vec4.js\";\nexport { glMatrix, mat2, mat2d, mat3, mat4, quat, quat2, vec2, vec3, vec4 };","import * as glMatrix from \"./common.js\";\n/**\r\n * 2x2 Matrix\r\n * @module mat2\r\n */\n\n/**\r\n * Creates a new identity mat2\r\n *\r\n * @returns {mat2} a new 2x2 matrix\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(4);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n }\n\n out[0] = 1;\n out[3] = 1;\n return out;\n}\n/**\r\n * Creates a new mat2 initialized with values from an existing matrix\r\n *\r\n * @param {mat2} a matrix to clone\r\n * @returns {mat2} a new 2x2 matrix\r\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(4);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\n/**\r\n * Copy the values from one mat2 to another\r\n *\r\n * @param {mat2} out the receiving matrix\r\n * @param {mat2} a the source matrix\r\n * @returns {mat2} out\r\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\n/**\r\n * Set a mat2 to the identity matrix\r\n *\r\n * @param {mat2} out the receiving matrix\r\n * @returns {mat2} out\r\n */\n\nexport function identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n}\n/**\r\n * Create a new mat2 with the given values\r\n *\r\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\r\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\r\n * @param {Number} m10 Component in column 1, row 0 position (index 2)\r\n * @param {Number} m11 Component in column 1, row 1 position (index 3)\r\n * @returns {mat2} out A new 2x2 matrix\r\n */\n\nexport function fromValues(m00, m01, m10, m11) {\n var out = new glMatrix.ARRAY_TYPE(4);\n out[0] = m00;\n out[1] = m01;\n out[2] = m10;\n out[3] = m11;\n return out;\n}\n/**\r\n * Set the components of a mat2 to the given values\r\n *\r\n * @param {mat2} out the receiving matrix\r\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\r\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\r\n * @param {Number} m10 Component in column 1, row 0 position (index 2)\r\n * @param {Number} m11 Component in column 1, row 1 position (index 3)\r\n * @returns {mat2} out\r\n */\n\nexport function set(out, m00, m01, m10, m11) {\n out[0] = m00;\n out[1] = m01;\n out[2] = m10;\n out[3] = m11;\n return out;\n}\n/**\r\n * Transpose the values of a mat2\r\n *\r\n * @param {mat2} out the receiving matrix\r\n * @param {mat2} a the source matrix\r\n * @returns {mat2} out\r\n */\n\nexport function transpose(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache\n // some values\n if (out === a) {\n var a1 = a[1];\n out[1] = a[2];\n out[2] = a1;\n } else {\n out[0] = a[0];\n out[1] = a[2];\n out[2] = a[1];\n out[3] = a[3];\n }\n\n return out;\n}\n/**\r\n * Inverts a mat2\r\n *\r\n * @param {mat2} out the receiving matrix\r\n * @param {mat2} a the source matrix\r\n * @returns {mat2} out\r\n */\n\nexport function invert(out, a) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3]; // Calculate the determinant\n\n var det = a0 * a3 - a2 * a1;\n\n if (!det) {\n return null;\n }\n\n det = 1.0 / det;\n out[0] = a3 * det;\n out[1] = -a1 * det;\n out[2] = -a2 * det;\n out[3] = a0 * det;\n return out;\n}\n/**\r\n * Calculates the adjugate of a mat2\r\n *\r\n * @param {mat2} out the receiving matrix\r\n * @param {mat2} a the source matrix\r\n * @returns {mat2} out\r\n */\n\nexport function adjoint(out, a) {\n // Caching this value is nessecary if out == a\n var a0 = a[0];\n out[0] = a[3];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = a0;\n return out;\n}\n/**\r\n * Calculates the determinant of a mat2\r\n *\r\n * @param {mat2} a the source matrix\r\n * @returns {Number} determinant of a\r\n */\n\nexport function determinant(a) {\n return a[0] * a[3] - a[2] * a[1];\n}\n/**\r\n * Multiplies two mat2's\r\n *\r\n * @param {mat2} out the receiving matrix\r\n * @param {mat2} a the first operand\r\n * @param {mat2} b the second operand\r\n * @returns {mat2} out\r\n */\n\nexport function multiply(out, a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n out[0] = a0 * b0 + a2 * b1;\n out[1] = a1 * b0 + a3 * b1;\n out[2] = a0 * b2 + a2 * b3;\n out[3] = a1 * b2 + a3 * b3;\n return out;\n}\n/**\r\n * Rotates a mat2 by the given angle\r\n *\r\n * @param {mat2} out the receiving matrix\r\n * @param {mat2} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat2} out\r\n */\n\nexport function rotate(out, a, rad) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n out[0] = a0 * c + a2 * s;\n out[1] = a1 * c + a3 * s;\n out[2] = a0 * -s + a2 * c;\n out[3] = a1 * -s + a3 * c;\n return out;\n}\n/**\r\n * Scales the mat2 by the dimensions in the given vec2\r\n *\r\n * @param {mat2} out the receiving matrix\r\n * @param {mat2} a the matrix to rotate\r\n * @param {vec2} v the vec2 to scale the matrix by\r\n * @returns {mat2} out\r\n **/\n\nexport function scale(out, a, v) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var v0 = v[0],\n v1 = v[1];\n out[0] = a0 * v0;\n out[1] = a1 * v0;\n out[2] = a2 * v1;\n out[3] = a3 * v1;\n return out;\n}\n/**\r\n * Creates a matrix from a given angle\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat2.identity(dest);\r\n * mat2.rotate(dest, dest, rad);\r\n *\r\n * @param {mat2} out mat2 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat2} out\r\n */\n\nexport function fromRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n out[0] = c;\n out[1] = s;\n out[2] = -s;\n out[3] = c;\n return out;\n}\n/**\r\n * Creates a matrix from a vector scaling\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat2.identity(dest);\r\n * mat2.scale(dest, dest, vec);\r\n *\r\n * @param {mat2} out mat2 receiving operation result\r\n * @param {vec2} v Scaling vector\r\n * @returns {mat2} out\r\n */\n\nexport function fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = v[1];\n return out;\n}\n/**\r\n * Returns a string representation of a mat2\r\n *\r\n * @param {mat2} a matrix to represent as a string\r\n * @returns {String} string representation of the matrix\r\n */\n\nexport function str(a) {\n return 'mat2(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')';\n}\n/**\r\n * Returns Frobenius norm of a mat2\r\n *\r\n * @param {mat2} a the matrix to calculate Frobenius norm of\r\n * @returns {Number} Frobenius norm\r\n */\n\nexport function frob(a) {\n return Math.hypot(a[0], a[1], a[2], a[3]);\n}\n/**\r\n * Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix\r\n * @param {mat2} L the lower triangular matrix\r\n * @param {mat2} D the diagonal matrix\r\n * @param {mat2} U the upper triangular matrix\r\n * @param {mat2} a the input matrix to factorize\r\n */\n\nexport function LDU(L, D, U, a) {\n L[2] = a[2] / a[0];\n U[0] = a[0];\n U[1] = a[1];\n U[3] = a[3] - L[2] * U[1];\n return [L, D, U];\n}\n/**\r\n * Adds two mat2's\r\n *\r\n * @param {mat2} out the receiving matrix\r\n * @param {mat2} a the first operand\r\n * @param {mat2} b the second operand\r\n * @returns {mat2} out\r\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n return out;\n}\n/**\r\n * Subtracts matrix b from matrix a\r\n *\r\n * @param {mat2} out the receiving matrix\r\n * @param {mat2} a the first operand\r\n * @param {mat2} b the second operand\r\n * @returns {mat2} out\r\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n return out;\n}\n/**\r\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\r\n *\r\n * @param {mat2} a The first matrix.\r\n * @param {mat2} b The second matrix.\r\n * @returns {Boolean} True if the matrices are equal, false otherwise.\r\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3];\n}\n/**\r\n * Returns whether or not the matrices have approximately the same elements in the same position.\r\n *\r\n * @param {mat2} a The first matrix.\r\n * @param {mat2} b The second matrix.\r\n * @returns {Boolean} True if the matrices are equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3));\n}\n/**\r\n * Multiply each element of the matrix by a scalar.\r\n *\r\n * @param {mat2} out the receiving matrix\r\n * @param {mat2} a the matrix to scale\r\n * @param {Number} b amount to scale the matrix's elements by\r\n * @returns {mat2} out\r\n */\n\nexport function multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n return out;\n}\n/**\r\n * Adds two mat2's after multiplying each element of the second operand by a scalar value.\r\n *\r\n * @param {mat2} out the receiving vector\r\n * @param {mat2} a the first operand\r\n * @param {mat2} b the second operand\r\n * @param {Number} scale the amount to scale b's elements by before adding\r\n * @returns {mat2} out\r\n */\n\nexport function multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n return out;\n}\n/**\r\n * Alias for {@link mat2.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Alias for {@link mat2.subtract}\r\n * @function\r\n */\n\nexport var sub = subtract;","import * as glMatrix from \"./common.js\";\n/**\r\n * 2x3 Matrix\r\n * @module mat2d\r\n *\r\n * @description\r\n * A mat2d contains six elements defined as:\r\n *
\r\n * [a, b, c,\r\n *  d, tx, ty]\r\n * 
\r\n * This is a short form for the 3x3 matrix:\r\n *
\r\n * [a, b, 0,\r\n *  c, d, 0,\r\n *  tx, ty, 1]\r\n * 
\r\n * The last column is ignored so the array is shorter and operations are faster.\r\n */\n\n/**\r\n * Creates a new identity mat2d\r\n *\r\n * @returns {mat2d} a new 2x3 matrix\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(6);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n out[4] = 0;\n out[5] = 0;\n }\n\n out[0] = 1;\n out[3] = 1;\n return out;\n}\n/**\r\n * Creates a new mat2d initialized with values from an existing matrix\r\n *\r\n * @param {mat2d} a matrix to clone\r\n * @returns {mat2d} a new 2x3 matrix\r\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(6);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n return out;\n}\n/**\r\n * Copy the values from one mat2d to another\r\n *\r\n * @param {mat2d} out the receiving matrix\r\n * @param {mat2d} a the source matrix\r\n * @returns {mat2d} out\r\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n return out;\n}\n/**\r\n * Set a mat2d to the identity matrix\r\n *\r\n * @param {mat2d} out the receiving matrix\r\n * @returns {mat2d} out\r\n */\n\nexport function identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = 0;\n out[5] = 0;\n return out;\n}\n/**\r\n * Create a new mat2d with the given values\r\n *\r\n * @param {Number} a Component A (index 0)\r\n * @param {Number} b Component B (index 1)\r\n * @param {Number} c Component C (index 2)\r\n * @param {Number} d Component D (index 3)\r\n * @param {Number} tx Component TX (index 4)\r\n * @param {Number} ty Component TY (index 5)\r\n * @returns {mat2d} A new mat2d\r\n */\n\nexport function fromValues(a, b, c, d, tx, ty) {\n var out = new glMatrix.ARRAY_TYPE(6);\n out[0] = a;\n out[1] = b;\n out[2] = c;\n out[3] = d;\n out[4] = tx;\n out[5] = ty;\n return out;\n}\n/**\r\n * Set the components of a mat2d to the given values\r\n *\r\n * @param {mat2d} out the receiving matrix\r\n * @param {Number} a Component A (index 0)\r\n * @param {Number} b Component B (index 1)\r\n * @param {Number} c Component C (index 2)\r\n * @param {Number} d Component D (index 3)\r\n * @param {Number} tx Component TX (index 4)\r\n * @param {Number} ty Component TY (index 5)\r\n * @returns {mat2d} out\r\n */\n\nexport function set(out, a, b, c, d, tx, ty) {\n out[0] = a;\n out[1] = b;\n out[2] = c;\n out[3] = d;\n out[4] = tx;\n out[5] = ty;\n return out;\n}\n/**\r\n * Inverts a mat2d\r\n *\r\n * @param {mat2d} out the receiving matrix\r\n * @param {mat2d} a the source matrix\r\n * @returns {mat2d} out\r\n */\n\nexport function invert(out, a) {\n var aa = a[0],\n ab = a[1],\n ac = a[2],\n ad = a[3];\n var atx = a[4],\n aty = a[5];\n var det = aa * ad - ab * ac;\n\n if (!det) {\n return null;\n }\n\n det = 1.0 / det;\n out[0] = ad * det;\n out[1] = -ab * det;\n out[2] = -ac * det;\n out[3] = aa * det;\n out[4] = (ac * aty - ad * atx) * det;\n out[5] = (ab * atx - aa * aty) * det;\n return out;\n}\n/**\r\n * Calculates the determinant of a mat2d\r\n *\r\n * @param {mat2d} a the source matrix\r\n * @returns {Number} determinant of a\r\n */\n\nexport function determinant(a) {\n return a[0] * a[3] - a[1] * a[2];\n}\n/**\r\n * Multiplies two mat2d's\r\n *\r\n * @param {mat2d} out the receiving matrix\r\n * @param {mat2d} a the first operand\r\n * @param {mat2d} b the second operand\r\n * @returns {mat2d} out\r\n */\n\nexport function multiply(out, a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3],\n a4 = a[4],\n a5 = a[5];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3],\n b4 = b[4],\n b5 = b[5];\n out[0] = a0 * b0 + a2 * b1;\n out[1] = a1 * b0 + a3 * b1;\n out[2] = a0 * b2 + a2 * b3;\n out[3] = a1 * b2 + a3 * b3;\n out[4] = a0 * b4 + a2 * b5 + a4;\n out[5] = a1 * b4 + a3 * b5 + a5;\n return out;\n}\n/**\r\n * Rotates a mat2d by the given angle\r\n *\r\n * @param {mat2d} out the receiving matrix\r\n * @param {mat2d} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat2d} out\r\n */\n\nexport function rotate(out, a, rad) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3],\n a4 = a[4],\n a5 = a[5];\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n out[0] = a0 * c + a2 * s;\n out[1] = a1 * c + a3 * s;\n out[2] = a0 * -s + a2 * c;\n out[3] = a1 * -s + a3 * c;\n out[4] = a4;\n out[5] = a5;\n return out;\n}\n/**\r\n * Scales the mat2d by the dimensions in the given vec2\r\n *\r\n * @param {mat2d} out the receiving matrix\r\n * @param {mat2d} a the matrix to translate\r\n * @param {vec2} v the vec2 to scale the matrix by\r\n * @returns {mat2d} out\r\n **/\n\nexport function scale(out, a, v) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3],\n a4 = a[4],\n a5 = a[5];\n var v0 = v[0],\n v1 = v[1];\n out[0] = a0 * v0;\n out[1] = a1 * v0;\n out[2] = a2 * v1;\n out[3] = a3 * v1;\n out[4] = a4;\n out[5] = a5;\n return out;\n}\n/**\r\n * Translates the mat2d by the dimensions in the given vec2\r\n *\r\n * @param {mat2d} out the receiving matrix\r\n * @param {mat2d} a the matrix to translate\r\n * @param {vec2} v the vec2 to translate the matrix by\r\n * @returns {mat2d} out\r\n **/\n\nexport function translate(out, a, v) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3],\n a4 = a[4],\n a5 = a[5];\n var v0 = v[0],\n v1 = v[1];\n out[0] = a0;\n out[1] = a1;\n out[2] = a2;\n out[3] = a3;\n out[4] = a0 * v0 + a2 * v1 + a4;\n out[5] = a1 * v0 + a3 * v1 + a5;\n return out;\n}\n/**\r\n * Creates a matrix from a given angle\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat2d.identity(dest);\r\n * mat2d.rotate(dest, dest, rad);\r\n *\r\n * @param {mat2d} out mat2d receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat2d} out\r\n */\n\nexport function fromRotation(out, rad) {\n var s = Math.sin(rad),\n c = Math.cos(rad);\n out[0] = c;\n out[1] = s;\n out[2] = -s;\n out[3] = c;\n out[4] = 0;\n out[5] = 0;\n return out;\n}\n/**\r\n * Creates a matrix from a vector scaling\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat2d.identity(dest);\r\n * mat2d.scale(dest, dest, vec);\r\n *\r\n * @param {mat2d} out mat2d receiving operation result\r\n * @param {vec2} v Scaling vector\r\n * @returns {mat2d} out\r\n */\n\nexport function fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = v[1];\n out[4] = 0;\n out[5] = 0;\n return out;\n}\n/**\r\n * Creates a matrix from a vector translation\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat2d.identity(dest);\r\n * mat2d.translate(dest, dest, vec);\r\n *\r\n * @param {mat2d} out mat2d receiving operation result\r\n * @param {vec2} v Translation vector\r\n * @returns {mat2d} out\r\n */\n\nexport function fromTranslation(out, v) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = v[0];\n out[5] = v[1];\n return out;\n}\n/**\r\n * Returns a string representation of a mat2d\r\n *\r\n * @param {mat2d} a matrix to represent as a string\r\n * @returns {String} string representation of the matrix\r\n */\n\nexport function str(a) {\n return 'mat2d(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ', ' + a[4] + ', ' + a[5] + ')';\n}\n/**\r\n * Returns Frobenius norm of a mat2d\r\n *\r\n * @param {mat2d} a the matrix to calculate Frobenius norm of\r\n * @returns {Number} Frobenius norm\r\n */\n\nexport function frob(a) {\n return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], 1);\n}\n/**\r\n * Adds two mat2d's\r\n *\r\n * @param {mat2d} out the receiving matrix\r\n * @param {mat2d} a the first operand\r\n * @param {mat2d} b the second operand\r\n * @returns {mat2d} out\r\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n return out;\n}\n/**\r\n * Subtracts matrix b from matrix a\r\n *\r\n * @param {mat2d} out the receiving matrix\r\n * @param {mat2d} a the first operand\r\n * @param {mat2d} b the second operand\r\n * @returns {mat2d} out\r\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n out[4] = a[4] - b[4];\n out[5] = a[5] - b[5];\n return out;\n}\n/**\r\n * Multiply each element of the matrix by a scalar.\r\n *\r\n * @param {mat2d} out the receiving matrix\r\n * @param {mat2d} a the matrix to scale\r\n * @param {Number} b amount to scale the matrix's elements by\r\n * @returns {mat2d} out\r\n */\n\nexport function multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n return out;\n}\n/**\r\n * Adds two mat2d's after multiplying each element of the second operand by a scalar value.\r\n *\r\n * @param {mat2d} out the receiving vector\r\n * @param {mat2d} a the first operand\r\n * @param {mat2d} b the second operand\r\n * @param {Number} scale the amount to scale b's elements by before adding\r\n * @returns {mat2d} out\r\n */\n\nexport function multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n out[4] = a[4] + b[4] * scale;\n out[5] = a[5] + b[5] * scale;\n return out;\n}\n/**\r\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\r\n *\r\n * @param {mat2d} a The first matrix.\r\n * @param {mat2d} b The second matrix.\r\n * @returns {Boolean} True if the matrices are equal, false otherwise.\r\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5];\n}\n/**\r\n * Returns whether or not the matrices have approximately the same elements in the same position.\r\n *\r\n * @param {mat2d} a The first matrix.\r\n * @param {mat2d} b The second matrix.\r\n * @returns {Boolean} True if the matrices are equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3],\n a4 = a[4],\n a5 = a[5];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3],\n b4 = b[4],\n b5 = b[5];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5));\n}\n/**\r\n * Alias for {@link mat2d.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Alias for {@link mat2d.subtract}\r\n * @function\r\n */\n\nexport var sub = subtract;","import * as glMatrix from \"./common.js\";\n/**\r\n * 3x3 Matrix\r\n * @module mat3\r\n */\n\n/**\r\n * Creates a new identity mat3\r\n *\r\n * @returns {mat3} a new 3x3 matrix\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(9);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n }\n\n out[0] = 1;\n out[4] = 1;\n out[8] = 1;\n return out;\n}\n/**\r\n * Copies the upper-left 3x3 values into the given mat3.\r\n *\r\n * @param {mat3} out the receiving 3x3 matrix\r\n * @param {mat4} a the source 4x4 matrix\r\n * @returns {mat3} out\r\n */\n\nexport function fromMat4(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[4];\n out[4] = a[5];\n out[5] = a[6];\n out[6] = a[8];\n out[7] = a[9];\n out[8] = a[10];\n return out;\n}\n/**\r\n * Creates a new mat3 initialized with values from an existing matrix\r\n *\r\n * @param {mat3} a matrix to clone\r\n * @returns {mat3} a new 3x3 matrix\r\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(9);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n}\n/**\r\n * Copy the values from one mat3 to another\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {mat3} a the source matrix\r\n * @returns {mat3} out\r\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n}\n/**\r\n * Create a new mat3 with the given values\r\n *\r\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\r\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\r\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\r\n * @param {Number} m10 Component in column 1, row 0 position (index 3)\r\n * @param {Number} m11 Component in column 1, row 1 position (index 4)\r\n * @param {Number} m12 Component in column 1, row 2 position (index 5)\r\n * @param {Number} m20 Component in column 2, row 0 position (index 6)\r\n * @param {Number} m21 Component in column 2, row 1 position (index 7)\r\n * @param {Number} m22 Component in column 2, row 2 position (index 8)\r\n * @returns {mat3} A new mat3\r\n */\n\nexport function fromValues(m00, m01, m02, m10, m11, m12, m20, m21, m22) {\n var out = new glMatrix.ARRAY_TYPE(9);\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m10;\n out[4] = m11;\n out[5] = m12;\n out[6] = m20;\n out[7] = m21;\n out[8] = m22;\n return out;\n}\n/**\r\n * Set the components of a mat3 to the given values\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\r\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\r\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\r\n * @param {Number} m10 Component in column 1, row 0 position (index 3)\r\n * @param {Number} m11 Component in column 1, row 1 position (index 4)\r\n * @param {Number} m12 Component in column 1, row 2 position (index 5)\r\n * @param {Number} m20 Component in column 2, row 0 position (index 6)\r\n * @param {Number} m21 Component in column 2, row 1 position (index 7)\r\n * @param {Number} m22 Component in column 2, row 2 position (index 8)\r\n * @returns {mat3} out\r\n */\n\nexport function set(out, m00, m01, m02, m10, m11, m12, m20, m21, m22) {\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m10;\n out[4] = m11;\n out[5] = m12;\n out[6] = m20;\n out[7] = m21;\n out[8] = m22;\n return out;\n}\n/**\r\n * Set a mat3 to the identity matrix\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @returns {mat3} out\r\n */\n\nexport function identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 1;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n}\n/**\r\n * Transpose the values of a mat3\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {mat3} a the source matrix\r\n * @returns {mat3} out\r\n */\n\nexport function transpose(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n var a01 = a[1],\n a02 = a[2],\n a12 = a[5];\n out[1] = a[3];\n out[2] = a[6];\n out[3] = a01;\n out[5] = a[7];\n out[6] = a02;\n out[7] = a12;\n } else {\n out[0] = a[0];\n out[1] = a[3];\n out[2] = a[6];\n out[3] = a[1];\n out[4] = a[4];\n out[5] = a[7];\n out[6] = a[2];\n out[7] = a[5];\n out[8] = a[8];\n }\n\n return out;\n}\n/**\r\n * Inverts a mat3\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {mat3} a the source matrix\r\n * @returns {mat3} out\r\n */\n\nexport function invert(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2];\n var a10 = a[3],\n a11 = a[4],\n a12 = a[5];\n var a20 = a[6],\n a21 = a[7],\n a22 = a[8];\n var b01 = a22 * a11 - a12 * a21;\n var b11 = -a22 * a10 + a12 * a20;\n var b21 = a21 * a10 - a11 * a20; // Calculate the determinant\n\n var det = a00 * b01 + a01 * b11 + a02 * b21;\n\n if (!det) {\n return null;\n }\n\n det = 1.0 / det;\n out[0] = b01 * det;\n out[1] = (-a22 * a01 + a02 * a21) * det;\n out[2] = (a12 * a01 - a02 * a11) * det;\n out[3] = b11 * det;\n out[4] = (a22 * a00 - a02 * a20) * det;\n out[5] = (-a12 * a00 + a02 * a10) * det;\n out[6] = b21 * det;\n out[7] = (-a21 * a00 + a01 * a20) * det;\n out[8] = (a11 * a00 - a01 * a10) * det;\n return out;\n}\n/**\r\n * Calculates the adjugate of a mat3\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {mat3} a the source matrix\r\n * @returns {mat3} out\r\n */\n\nexport function adjoint(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2];\n var a10 = a[3],\n a11 = a[4],\n a12 = a[5];\n var a20 = a[6],\n a21 = a[7],\n a22 = a[8];\n out[0] = a11 * a22 - a12 * a21;\n out[1] = a02 * a21 - a01 * a22;\n out[2] = a01 * a12 - a02 * a11;\n out[3] = a12 * a20 - a10 * a22;\n out[4] = a00 * a22 - a02 * a20;\n out[5] = a02 * a10 - a00 * a12;\n out[6] = a10 * a21 - a11 * a20;\n out[7] = a01 * a20 - a00 * a21;\n out[8] = a00 * a11 - a01 * a10;\n return out;\n}\n/**\r\n * Calculates the determinant of a mat3\r\n *\r\n * @param {mat3} a the source matrix\r\n * @returns {Number} determinant of a\r\n */\n\nexport function determinant(a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2];\n var a10 = a[3],\n a11 = a[4],\n a12 = a[5];\n var a20 = a[6],\n a21 = a[7],\n a22 = a[8];\n return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\n}\n/**\r\n * Multiplies two mat3's\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {mat3} a the first operand\r\n * @param {mat3} b the second operand\r\n * @returns {mat3} out\r\n */\n\nexport function multiply(out, a, b) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2];\n var a10 = a[3],\n a11 = a[4],\n a12 = a[5];\n var a20 = a[6],\n a21 = a[7],\n a22 = a[8];\n var b00 = b[0],\n b01 = b[1],\n b02 = b[2];\n var b10 = b[3],\n b11 = b[4],\n b12 = b[5];\n var b20 = b[6],\n b21 = b[7],\n b22 = b[8];\n out[0] = b00 * a00 + b01 * a10 + b02 * a20;\n out[1] = b00 * a01 + b01 * a11 + b02 * a21;\n out[2] = b00 * a02 + b01 * a12 + b02 * a22;\n out[3] = b10 * a00 + b11 * a10 + b12 * a20;\n out[4] = b10 * a01 + b11 * a11 + b12 * a21;\n out[5] = b10 * a02 + b11 * a12 + b12 * a22;\n out[6] = b20 * a00 + b21 * a10 + b22 * a20;\n out[7] = b20 * a01 + b21 * a11 + b22 * a21;\n out[8] = b20 * a02 + b21 * a12 + b22 * a22;\n return out;\n}\n/**\r\n * Translate a mat3 by the given vector\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {mat3} a the matrix to translate\r\n * @param {vec2} v vector to translate by\r\n * @returns {mat3} out\r\n */\n\nexport function translate(out, a, v) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a10 = a[3],\n a11 = a[4],\n a12 = a[5],\n a20 = a[6],\n a21 = a[7],\n a22 = a[8],\n x = v[0],\n y = v[1];\n out[0] = a00;\n out[1] = a01;\n out[2] = a02;\n out[3] = a10;\n out[4] = a11;\n out[5] = a12;\n out[6] = x * a00 + y * a10 + a20;\n out[7] = x * a01 + y * a11 + a21;\n out[8] = x * a02 + y * a12 + a22;\n return out;\n}\n/**\r\n * Rotates a mat3 by the given angle\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {mat3} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat3} out\r\n */\n\nexport function rotate(out, a, rad) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a10 = a[3],\n a11 = a[4],\n a12 = a[5],\n a20 = a[6],\n a21 = a[7],\n a22 = a[8],\n s = Math.sin(rad),\n c = Math.cos(rad);\n out[0] = c * a00 + s * a10;\n out[1] = c * a01 + s * a11;\n out[2] = c * a02 + s * a12;\n out[3] = c * a10 - s * a00;\n out[4] = c * a11 - s * a01;\n out[5] = c * a12 - s * a02;\n out[6] = a20;\n out[7] = a21;\n out[8] = a22;\n return out;\n}\n;\n/**\r\n * Scales the mat3 by the dimensions in the given vec2\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {mat3} a the matrix to rotate\r\n * @param {vec2} v the vec2 to scale the matrix by\r\n * @returns {mat3} out\r\n **/\n\nexport function scale(out, a, v) {\n var x = v[0],\n y = v[1];\n out[0] = x * a[0];\n out[1] = x * a[1];\n out[2] = x * a[2];\n out[3] = y * a[3];\n out[4] = y * a[4];\n out[5] = y * a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n}\n/**\r\n * Creates a matrix from a vector translation\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat3.identity(dest);\r\n * mat3.translate(dest, dest, vec);\r\n *\r\n * @param {mat3} out mat3 receiving operation result\r\n * @param {vec2} v Translation vector\r\n * @returns {mat3} out\r\n */\n\nexport function fromTranslation(out, v) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 1;\n out[5] = 0;\n out[6] = v[0];\n out[7] = v[1];\n out[8] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from a given angle\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat3.identity(dest);\r\n * mat3.rotate(dest, dest, rad);\r\n *\r\n * @param {mat3} out mat3 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat3} out\r\n */\n\nexport function fromRotation(out, rad) {\n var s = Math.sin(rad),\n c = Math.cos(rad);\n out[0] = c;\n out[1] = s;\n out[2] = 0;\n out[3] = -s;\n out[4] = c;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from a vector scaling\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat3.identity(dest);\r\n * mat3.scale(dest, dest, vec);\r\n *\r\n * @param {mat3} out mat3 receiving operation result\r\n * @param {vec2} v Scaling vector\r\n * @returns {mat3} out\r\n */\n\nexport function fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = v[1];\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n}\n/**\r\n * Copies the values from a mat2d into a mat3\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {mat2d} a the matrix to copy\r\n * @returns {mat3} out\r\n **/\n\nexport function fromMat2d(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = 0;\n out[3] = a[2];\n out[4] = a[3];\n out[5] = 0;\n out[6] = a[4];\n out[7] = a[5];\n out[8] = 1;\n return out;\n}\n/**\r\n* Calculates a 3x3 matrix from the given quaternion\r\n*\r\n* @param {mat3} out mat3 receiving operation result\r\n* @param {quat} q Quaternion to create matrix from\r\n*\r\n* @returns {mat3} out\r\n*/\n\nexport function fromQuat(out, q) {\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var yx = y * x2;\n var yy = y * y2;\n var zx = z * x2;\n var zy = z * y2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - yy - zz;\n out[3] = yx - wz;\n out[6] = zx + wy;\n out[1] = yx + wz;\n out[4] = 1 - xx - zz;\n out[7] = zy - wx;\n out[2] = zx - wy;\n out[5] = zy + wx;\n out[8] = 1 - xx - yy;\n return out;\n}\n/**\r\n* Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix\r\n*\r\n* @param {mat3} out mat3 receiving operation result\r\n* @param {mat4} a Mat4 to derive the normal matrix from\r\n*\r\n* @returns {mat3} out\r\n*/\n\nexport function normalFromMat4(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (!det) {\n return null;\n }\n\n det = 1.0 / det;\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n return out;\n}\n/**\r\n * Generates a 2D projection matrix with the given bounds\r\n *\r\n * @param {mat3} out mat3 frustum matrix will be written into\r\n * @param {number} width Width of your gl context\r\n * @param {number} height Height of gl context\r\n * @returns {mat3} out\r\n */\n\nexport function projection(out, width, height) {\n out[0] = 2 / width;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = -2 / height;\n out[5] = 0;\n out[6] = -1;\n out[7] = 1;\n out[8] = 1;\n return out;\n}\n/**\r\n * Returns a string representation of a mat3\r\n *\r\n * @param {mat3} a matrix to represent as a string\r\n * @returns {String} string representation of the matrix\r\n */\n\nexport function str(a) {\n return 'mat3(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ', ' + a[4] + ', ' + a[5] + ', ' + a[6] + ', ' + a[7] + ', ' + a[8] + ')';\n}\n/**\r\n * Returns Frobenius norm of a mat3\r\n *\r\n * @param {mat3} a the matrix to calculate Frobenius norm of\r\n * @returns {Number} Frobenius norm\r\n */\n\nexport function frob(a) {\n return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]);\n}\n/**\r\n * Adds two mat3's\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {mat3} a the first operand\r\n * @param {mat3} b the second operand\r\n * @returns {mat3} out\r\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n out[6] = a[6] + b[6];\n out[7] = a[7] + b[7];\n out[8] = a[8] + b[8];\n return out;\n}\n/**\r\n * Subtracts matrix b from matrix a\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {mat3} a the first operand\r\n * @param {mat3} b the second operand\r\n * @returns {mat3} out\r\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n out[4] = a[4] - b[4];\n out[5] = a[5] - b[5];\n out[6] = a[6] - b[6];\n out[7] = a[7] - b[7];\n out[8] = a[8] - b[8];\n return out;\n}\n/**\r\n * Multiply each element of the matrix by a scalar.\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {mat3} a the matrix to scale\r\n * @param {Number} b amount to scale the matrix's elements by\r\n * @returns {mat3} out\r\n */\n\nexport function multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n out[6] = a[6] * b;\n out[7] = a[7] * b;\n out[8] = a[8] * b;\n return out;\n}\n/**\r\n * Adds two mat3's after multiplying each element of the second operand by a scalar value.\r\n *\r\n * @param {mat3} out the receiving vector\r\n * @param {mat3} a the first operand\r\n * @param {mat3} b the second operand\r\n * @param {Number} scale the amount to scale b's elements by before adding\r\n * @returns {mat3} out\r\n */\n\nexport function multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n out[4] = a[4] + b[4] * scale;\n out[5] = a[5] + b[5] * scale;\n out[6] = a[6] + b[6] * scale;\n out[7] = a[7] + b[7] * scale;\n out[8] = a[8] + b[8] * scale;\n return out;\n}\n/**\r\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\r\n *\r\n * @param {mat3} a The first matrix.\r\n * @param {mat3} b The second matrix.\r\n * @returns {Boolean} True if the matrices are equal, false otherwise.\r\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8];\n}\n/**\r\n * Returns whether or not the matrices have approximately the same elements in the same position.\r\n *\r\n * @param {mat3} a The first matrix.\r\n * @param {mat3} b The second matrix.\r\n * @returns {Boolean} True if the matrices are equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3],\n a4 = a[4],\n a5 = a[5],\n a6 = a[6],\n a7 = a[7],\n a8 = a[8];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3],\n b4 = b[4],\n b5 = b[5],\n b6 = b[6],\n b7 = b[7],\n b8 = b[8];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a8), Math.abs(b8));\n}\n/**\r\n * Alias for {@link mat3.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Alias for {@link mat3.subtract}\r\n * @function\r\n */\n\nexport var sub = subtract;","import * as glMatrix from \"./common.js\";\nimport * as mat3 from \"./mat3.js\";\nimport * as vec3 from \"./vec3.js\";\nimport * as vec4 from \"./vec4.js\";\n/**\r\n * Quaternion\r\n * @module quat\r\n */\n\n/**\r\n * Creates a new identity quat\r\n *\r\n * @returns {quat} a new quaternion\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(4);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n }\n\n out[3] = 1;\n return out;\n}\n/**\r\n * Set a quat to the identity quaternion\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @returns {quat} out\r\n */\n\nexport function identity(out) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n}\n/**\r\n * Sets a quat from the given angle and rotation axis,\r\n * then returns it.\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {vec3} axis the axis around which to rotate\r\n * @param {Number} rad the angle in radians\r\n * @returns {quat} out\r\n **/\n\nexport function setAxisAngle(out, axis, rad) {\n rad = rad * 0.5;\n var s = Math.sin(rad);\n out[0] = s * axis[0];\n out[1] = s * axis[1];\n out[2] = s * axis[2];\n out[3] = Math.cos(rad);\n return out;\n}\n/**\r\n * Gets the rotation axis and angle for a given\r\n * quaternion. If a quaternion is created with\r\n * setAxisAngle, this method will return the same\r\n * values as providied in the original parameter list\r\n * OR functionally equivalent values.\r\n * Example: The quaternion formed by axis [0, 0, 1] and\r\n * angle -90 is the same as the quaternion formed by\r\n * [0, 0, 1] and 270. This method favors the latter.\r\n * @param {vec3} out_axis Vector receiving the axis of rotation\r\n * @param {quat} q Quaternion to be decomposed\r\n * @return {Number} Angle, in radians, of the rotation\r\n */\n\nexport function getAxisAngle(out_axis, q) {\n var rad = Math.acos(q[3]) * 2.0;\n var s = Math.sin(rad / 2.0);\n\n if (s > glMatrix.EPSILON) {\n out_axis[0] = q[0] / s;\n out_axis[1] = q[1] / s;\n out_axis[2] = q[2] / s;\n } else {\n // If s is zero, return any axis (no rotation - axis does not matter)\n out_axis[0] = 1;\n out_axis[1] = 0;\n out_axis[2] = 0;\n }\n\n return rad;\n}\n/**\r\n * Gets the angular distance between two unit quaternions\r\n *\r\n * @param {quat} a Origin unit quaternion \r\n * @param {quat} b Destination unit quaternion\r\n * @return {Number} Angle, in radians, between the two quaternions\r\n */\n\nexport function getAngle(a, b) {\n var dotproduct = dot(a, b);\n return Math.acos(2 * dotproduct * dotproduct - 1);\n}\n/**\r\n * Multiplies two quat's\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {quat} a the first operand\r\n * @param {quat} b the second operand\r\n * @returns {quat} out\r\n */\n\nexport function multiply(out, a, b) {\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n var bx = b[0],\n by = b[1],\n bz = b[2],\n bw = b[3];\n out[0] = ax * bw + aw * bx + ay * bz - az * by;\n out[1] = ay * bw + aw * by + az * bx - ax * bz;\n out[2] = az * bw + aw * bz + ax * by - ay * bx;\n out[3] = aw * bw - ax * bx - ay * by - az * bz;\n return out;\n}\n/**\r\n * Rotates a quaternion by the given angle about the X axis\r\n *\r\n * @param {quat} out quat receiving operation result\r\n * @param {quat} a quat to rotate\r\n * @param {number} rad angle (in radians) to rotate\r\n * @returns {quat} out\r\n */\n\nexport function rotateX(out, a, rad) {\n rad *= 0.5;\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n var bx = Math.sin(rad),\n bw = Math.cos(rad);\n out[0] = ax * bw + aw * bx;\n out[1] = ay * bw + az * bx;\n out[2] = az * bw - ay * bx;\n out[3] = aw * bw - ax * bx;\n return out;\n}\n/**\r\n * Rotates a quaternion by the given angle about the Y axis\r\n *\r\n * @param {quat} out quat receiving operation result\r\n * @param {quat} a quat to rotate\r\n * @param {number} rad angle (in radians) to rotate\r\n * @returns {quat} out\r\n */\n\nexport function rotateY(out, a, rad) {\n rad *= 0.5;\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n var by = Math.sin(rad),\n bw = Math.cos(rad);\n out[0] = ax * bw - az * by;\n out[1] = ay * bw + aw * by;\n out[2] = az * bw + ax * by;\n out[3] = aw * bw - ay * by;\n return out;\n}\n/**\r\n * Rotates a quaternion by the given angle about the Z axis\r\n *\r\n * @param {quat} out quat receiving operation result\r\n * @param {quat} a quat to rotate\r\n * @param {number} rad angle (in radians) to rotate\r\n * @returns {quat} out\r\n */\n\nexport function rotateZ(out, a, rad) {\n rad *= 0.5;\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n var bz = Math.sin(rad),\n bw = Math.cos(rad);\n out[0] = ax * bw + ay * bz;\n out[1] = ay * bw - ax * bz;\n out[2] = az * bw + aw * bz;\n out[3] = aw * bw - az * bz;\n return out;\n}\n/**\r\n * Calculates the W component of a quat from the X, Y, and Z components.\r\n * Assumes that quaternion is 1 unit in length.\r\n * Any existing W component will be ignored.\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {quat} a quat to calculate W component of\r\n * @returns {quat} out\r\n */\n\nexport function calculateW(out, a) {\n var x = a[0],\n y = a[1],\n z = a[2];\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z));\n return out;\n}\n/**\r\n * Calculate the exponential of a unit quaternion.\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {quat} a quat to calculate the exponential of\r\n * @returns {quat} out\r\n */\n\nexport function exp(out, a) {\n var x = a[0],\n y = a[1],\n z = a[2],\n w = a[3];\n var r = Math.sqrt(x * x + y * y + z * z);\n var et = Math.exp(w);\n var s = r > 0 ? et * Math.sin(r) / r : 0;\n out[0] = x * s;\n out[1] = y * s;\n out[2] = z * s;\n out[3] = et * Math.cos(r);\n return out;\n}\n/**\r\n * Calculate the natural logarithm of a unit quaternion.\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {quat} a quat to calculate the exponential of\r\n * @returns {quat} out\r\n */\n\nexport function ln(out, a) {\n var x = a[0],\n y = a[1],\n z = a[2],\n w = a[3];\n var r = Math.sqrt(x * x + y * y + z * z);\n var t = r > 0 ? Math.atan2(r, w) / r : 0;\n out[0] = x * t;\n out[1] = y * t;\n out[2] = z * t;\n out[3] = 0.5 * Math.log(x * x + y * y + z * z + w * w);\n return out;\n}\n/**\r\n * Calculate the scalar power of a unit quaternion.\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {quat} a quat to calculate the exponential of\r\n * @param {Number} b amount to scale the quaternion by\r\n * @returns {quat} out\r\n */\n\nexport function pow(out, a, b) {\n ln(out, a);\n scale(out, out, b);\n exp(out, out);\n return out;\n}\n/**\r\n * Performs a spherical linear interpolation between two quat\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {quat} a the first operand\r\n * @param {quat} b the second operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {quat} out\r\n */\n\nexport function slerp(out, a, b, t) {\n // benchmarks:\n // http://jsperf.com/quaternion-slerp-implementations\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n var bx = b[0],\n by = b[1],\n bz = b[2],\n bw = b[3];\n var omega, cosom, sinom, scale0, scale1; // calc cosine\n\n cosom = ax * bx + ay * by + az * bz + aw * bw; // adjust signs (if necessary)\n\n if (cosom < 0.0) {\n cosom = -cosom;\n bx = -bx;\n by = -by;\n bz = -bz;\n bw = -bw;\n } // calculate coefficients\n\n\n if (1.0 - cosom > glMatrix.EPSILON) {\n // standard case (slerp)\n omega = Math.acos(cosom);\n sinom = Math.sin(omega);\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\n scale1 = Math.sin(t * omega) / sinom;\n } else {\n // \"from\" and \"to\" quaternions are very close\n // ... so we can do a linear interpolation\n scale0 = 1.0 - t;\n scale1 = t;\n } // calculate final values\n\n\n out[0] = scale0 * ax + scale1 * bx;\n out[1] = scale0 * ay + scale1 * by;\n out[2] = scale0 * az + scale1 * bz;\n out[3] = scale0 * aw + scale1 * bw;\n return out;\n}\n/**\r\n * Generates a random unit quaternion\r\n * \r\n * @param {quat} out the receiving quaternion\r\n * @returns {quat} out\r\n */\n\nexport function random(out) {\n // Implementation of http://planning.cs.uiuc.edu/node198.html\n // TODO: Calling random 3 times is probably not the fastest solution\n var u1 = glMatrix.RANDOM();\n var u2 = glMatrix.RANDOM();\n var u3 = glMatrix.RANDOM();\n var sqrt1MinusU1 = Math.sqrt(1 - u1);\n var sqrtU1 = Math.sqrt(u1);\n out[0] = sqrt1MinusU1 * Math.sin(2.0 * Math.PI * u2);\n out[1] = sqrt1MinusU1 * Math.cos(2.0 * Math.PI * u2);\n out[2] = sqrtU1 * Math.sin(2.0 * Math.PI * u3);\n out[3] = sqrtU1 * Math.cos(2.0 * Math.PI * u3);\n return out;\n}\n/**\r\n * Calculates the inverse of a quat\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {quat} a quat to calculate inverse of\r\n * @returns {quat} out\r\n */\n\nexport function invert(out, a) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3;\n var invDot = dot ? 1.0 / dot : 0; // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0\n\n out[0] = -a0 * invDot;\n out[1] = -a1 * invDot;\n out[2] = -a2 * invDot;\n out[3] = a3 * invDot;\n return out;\n}\n/**\r\n * Calculates the conjugate of a quat\r\n * If the quaternion is normalized, this function is faster than quat.inverse and produces the same result.\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {quat} a quat to calculate conjugate of\r\n * @returns {quat} out\r\n */\n\nexport function conjugate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = a[3];\n return out;\n}\n/**\r\n * Creates a quaternion from the given 3x3 rotation matrix.\r\n *\r\n * NOTE: The resultant quaternion is not normalized, so you should be sure\r\n * to renormalize the quaternion yourself where necessary.\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {mat3} m rotation matrix\r\n * @returns {quat} out\r\n * @function\r\n */\n\nexport function fromMat3(out, m) {\n // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\n // article \"Quaternion Calculus and Fast Animation\".\n var fTrace = m[0] + m[4] + m[8];\n var fRoot;\n\n if (fTrace > 0.0) {\n // |w| > 1/2, may as well choose w > 1/2\n fRoot = Math.sqrt(fTrace + 1.0); // 2w\n\n out[3] = 0.5 * fRoot;\n fRoot = 0.5 / fRoot; // 1/(4w)\n\n out[0] = (m[5] - m[7]) * fRoot;\n out[1] = (m[6] - m[2]) * fRoot;\n out[2] = (m[1] - m[3]) * fRoot;\n } else {\n // |w| <= 1/2\n var i = 0;\n if (m[4] > m[0]) i = 1;\n if (m[8] > m[i * 3 + i]) i = 2;\n var j = (i + 1) % 3;\n var k = (i + 2) % 3;\n fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1.0);\n out[i] = 0.5 * fRoot;\n fRoot = 0.5 / fRoot;\n out[3] = (m[j * 3 + k] - m[k * 3 + j]) * fRoot;\n out[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot;\n out[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot;\n }\n\n return out;\n}\n/**\r\n * Creates a quaternion from the given euler angle x, y, z.\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {x} Angle to rotate around X axis in degrees.\r\n * @param {y} Angle to rotate around Y axis in degrees.\r\n * @param {z} Angle to rotate around Z axis in degrees.\r\n * @returns {quat} out\r\n * @function\r\n */\n\nexport function fromEuler(out, x, y, z) {\n var halfToRad = 0.5 * Math.PI / 180.0;\n x *= halfToRad;\n y *= halfToRad;\n z *= halfToRad;\n var sx = Math.sin(x);\n var cx = Math.cos(x);\n var sy = Math.sin(y);\n var cy = Math.cos(y);\n var sz = Math.sin(z);\n var cz = Math.cos(z);\n out[0] = sx * cy * cz - cx * sy * sz;\n out[1] = cx * sy * cz + sx * cy * sz;\n out[2] = cx * cy * sz - sx * sy * cz;\n out[3] = cx * cy * cz + sx * sy * sz;\n return out;\n}\n/**\r\n * Returns a string representation of a quatenion\r\n *\r\n * @param {quat} a vector to represent as a string\r\n * @returns {String} string representation of the vector\r\n */\n\nexport function str(a) {\n return 'quat(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')';\n}\n/**\r\n * Creates a new quat initialized with values from an existing quaternion\r\n *\r\n * @param {quat} a quaternion to clone\r\n * @returns {quat} a new quaternion\r\n * @function\r\n */\n\nexport var clone = vec4.clone;\n/**\r\n * Creates a new quat initialized with the given values\r\n *\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @param {Number} z Z component\r\n * @param {Number} w W component\r\n * @returns {quat} a new quaternion\r\n * @function\r\n */\n\nexport var fromValues = vec4.fromValues;\n/**\r\n * Copy the values from one quat to another\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {quat} a the source quaternion\r\n * @returns {quat} out\r\n * @function\r\n */\n\nexport var copy = vec4.copy;\n/**\r\n * Set the components of a quat to the given values\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @param {Number} z Z component\r\n * @param {Number} w W component\r\n * @returns {quat} out\r\n * @function\r\n */\n\nexport var set = vec4.set;\n/**\r\n * Adds two quat's\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {quat} a the first operand\r\n * @param {quat} b the second operand\r\n * @returns {quat} out\r\n * @function\r\n */\n\nexport var add = vec4.add;\n/**\r\n * Alias for {@link quat.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Scales a quat by a scalar number\r\n *\r\n * @param {quat} out the receiving vector\r\n * @param {quat} a the vector to scale\r\n * @param {Number} b amount to scale the vector by\r\n * @returns {quat} out\r\n * @function\r\n */\n\nexport var scale = vec4.scale;\n/**\r\n * Calculates the dot product of two quat's\r\n *\r\n * @param {quat} a the first operand\r\n * @param {quat} b the second operand\r\n * @returns {Number} dot product of a and b\r\n * @function\r\n */\n\nexport var dot = vec4.dot;\n/**\r\n * Performs a linear interpolation between two quat's\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {quat} a the first operand\r\n * @param {quat} b the second operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {quat} out\r\n * @function\r\n */\n\nexport var lerp = vec4.lerp;\n/**\r\n * Calculates the length of a quat\r\n *\r\n * @param {quat} a vector to calculate length of\r\n * @returns {Number} length of a\r\n */\n\nexport var length = vec4.length;\n/**\r\n * Alias for {@link quat.length}\r\n * @function\r\n */\n\nexport var len = length;\n/**\r\n * Calculates the squared length of a quat\r\n *\r\n * @param {quat} a vector to calculate squared length of\r\n * @returns {Number} squared length of a\r\n * @function\r\n */\n\nexport var squaredLength = vec4.squaredLength;\n/**\r\n * Alias for {@link quat.squaredLength}\r\n * @function\r\n */\n\nexport var sqrLen = squaredLength;\n/**\r\n * Normalize a quat\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {quat} a quaternion to normalize\r\n * @returns {quat} out\r\n * @function\r\n */\n\nexport var normalize = vec4.normalize;\n/**\r\n * Returns whether or not the quaternions have exactly the same elements in the same position (when compared with ===)\r\n *\r\n * @param {quat} a The first quaternion.\r\n * @param {quat} b The second quaternion.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport var exactEquals = vec4.exactEquals;\n/**\r\n * Returns whether or not the quaternions have approximately the same elements in the same position.\r\n *\r\n * @param {quat} a The first vector.\r\n * @param {quat} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport var equals = vec4.equals;\n/**\r\n * Sets a quaternion to represent the shortest rotation from one\r\n * vector to another.\r\n *\r\n * Both vectors are assumed to be unit length.\r\n *\r\n * @param {quat} out the receiving quaternion.\r\n * @param {vec3} a the initial vector\r\n * @param {vec3} b the destination vector\r\n * @returns {quat} out\r\n */\n\nexport var rotationTo = function () {\n var tmpvec3 = vec3.create();\n var xUnitVec3 = vec3.fromValues(1, 0, 0);\n var yUnitVec3 = vec3.fromValues(0, 1, 0);\n return function (out, a, b) {\n var dot = vec3.dot(a, b);\n\n if (dot < -0.999999) {\n vec3.cross(tmpvec3, xUnitVec3, a);\n if (vec3.len(tmpvec3) < 0.000001) vec3.cross(tmpvec3, yUnitVec3, a);\n vec3.normalize(tmpvec3, tmpvec3);\n setAxisAngle(out, tmpvec3, Math.PI);\n return out;\n } else if (dot > 0.999999) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n } else {\n vec3.cross(tmpvec3, a, b);\n out[0] = tmpvec3[0];\n out[1] = tmpvec3[1];\n out[2] = tmpvec3[2];\n out[3] = 1 + dot;\n return normalize(out, out);\n }\n };\n}();\n/**\r\n * Performs a spherical linear interpolation with two control points\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {quat} a the first operand\r\n * @param {quat} b the second operand\r\n * @param {quat} c the third operand\r\n * @param {quat} d the fourth operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {quat} out\r\n */\n\nexport var sqlerp = function () {\n var temp1 = create();\n var temp2 = create();\n return function (out, a, b, c, d, t) {\n slerp(temp1, a, d, t);\n slerp(temp2, b, c, t);\n slerp(out, temp1, temp2, 2 * t * (1 - t));\n return out;\n };\n}();\n/**\r\n * Sets the specified quaternion with values corresponding to the given\r\n * axes. Each axis is a vec3 and is expected to be unit length and\r\n * perpendicular to all other specified axes.\r\n *\r\n * @param {vec3} view the vector representing the viewing direction\r\n * @param {vec3} right the vector representing the local \"right\" direction\r\n * @param {vec3} up the vector representing the local \"up\" direction\r\n * @returns {quat} out\r\n */\n\nexport var setAxes = function () {\n var matr = mat3.create();\n return function (out, view, right, up) {\n matr[0] = right[0];\n matr[3] = right[1];\n matr[6] = right[2];\n matr[1] = up[0];\n matr[4] = up[1];\n matr[7] = up[2];\n matr[2] = -view[0];\n matr[5] = -view[1];\n matr[8] = -view[2];\n return normalize(out, fromMat3(out, matr));\n };\n}();","import * as glMatrix from \"./common.js\";\nimport * as quat from \"./quat.js\";\nimport * as mat4 from \"./mat4.js\";\n/**\r\n * Dual Quaternion
\r\n * Format: [real, dual]
\r\n * Quaternion format: XYZW
\r\n * Make sure to have normalized dual quaternions, otherwise the functions may not work as intended.
\r\n * @module quat2\r\n */\n\n/**\r\n * Creates a new identity dual quat\r\n *\r\n * @returns {quat2} a new dual quaternion [real -> rotation, dual -> translation]\r\n */\n\nexport function create() {\n var dq = new glMatrix.ARRAY_TYPE(8);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n dq[0] = 0;\n dq[1] = 0;\n dq[2] = 0;\n dq[4] = 0;\n dq[5] = 0;\n dq[6] = 0;\n dq[7] = 0;\n }\n\n dq[3] = 1;\n return dq;\n}\n/**\r\n * Creates a new quat initialized with values from an existing quaternion\r\n *\r\n * @param {quat2} a dual quaternion to clone\r\n * @returns {quat2} new dual quaternion\r\n * @function\r\n */\n\nexport function clone(a) {\n var dq = new glMatrix.ARRAY_TYPE(8);\n dq[0] = a[0];\n dq[1] = a[1];\n dq[2] = a[2];\n dq[3] = a[3];\n dq[4] = a[4];\n dq[5] = a[5];\n dq[6] = a[6];\n dq[7] = a[7];\n return dq;\n}\n/**\r\n * Creates a new dual quat initialized with the given values\r\n *\r\n * @param {Number} x1 X component\r\n * @param {Number} y1 Y component\r\n * @param {Number} z1 Z component\r\n * @param {Number} w1 W component\r\n * @param {Number} x2 X component\r\n * @param {Number} y2 Y component\r\n * @param {Number} z2 Z component\r\n * @param {Number} w2 W component\r\n * @returns {quat2} new dual quaternion\r\n * @function\r\n */\n\nexport function fromValues(x1, y1, z1, w1, x2, y2, z2, w2) {\n var dq = new glMatrix.ARRAY_TYPE(8);\n dq[0] = x1;\n dq[1] = y1;\n dq[2] = z1;\n dq[3] = w1;\n dq[4] = x2;\n dq[5] = y2;\n dq[6] = z2;\n dq[7] = w2;\n return dq;\n}\n/**\r\n * Creates a new dual quat from the given values (quat and translation)\r\n *\r\n * @param {Number} x1 X component\r\n * @param {Number} y1 Y component\r\n * @param {Number} z1 Z component\r\n * @param {Number} w1 W component\r\n * @param {Number} x2 X component (translation)\r\n * @param {Number} y2 Y component (translation)\r\n * @param {Number} z2 Z component (translation)\r\n * @returns {quat2} new dual quaternion\r\n * @function\r\n */\n\nexport function fromRotationTranslationValues(x1, y1, z1, w1, x2, y2, z2) {\n var dq = new glMatrix.ARRAY_TYPE(8);\n dq[0] = x1;\n dq[1] = y1;\n dq[2] = z1;\n dq[3] = w1;\n var ax = x2 * 0.5,\n ay = y2 * 0.5,\n az = z2 * 0.5;\n dq[4] = ax * w1 + ay * z1 - az * y1;\n dq[5] = ay * w1 + az * x1 - ax * z1;\n dq[6] = az * w1 + ax * y1 - ay * x1;\n dq[7] = -ax * x1 - ay * y1 - az * z1;\n return dq;\n}\n/**\r\n * Creates a dual quat from a quaternion and a translation\r\n *\r\n * @param {quat2} dual quaternion receiving operation result\r\n * @param {quat} q a normalized quaternion\r\n * @param {vec3} t tranlation vector\r\n * @returns {quat2} dual quaternion receiving operation result\r\n * @function\r\n */\n\nexport function fromRotationTranslation(out, q, t) {\n var ax = t[0] * 0.5,\n ay = t[1] * 0.5,\n az = t[2] * 0.5,\n bx = q[0],\n by = q[1],\n bz = q[2],\n bw = q[3];\n out[0] = bx;\n out[1] = by;\n out[2] = bz;\n out[3] = bw;\n out[4] = ax * bw + ay * bz - az * by;\n out[5] = ay * bw + az * bx - ax * bz;\n out[6] = az * bw + ax * by - ay * bx;\n out[7] = -ax * bx - ay * by - az * bz;\n return out;\n}\n/**\r\n * Creates a dual quat from a translation\r\n *\r\n * @param {quat2} dual quaternion receiving operation result\r\n * @param {vec3} t translation vector\r\n * @returns {quat2} dual quaternion receiving operation result\r\n * @function\r\n */\n\nexport function fromTranslation(out, t) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = t[0] * 0.5;\n out[5] = t[1] * 0.5;\n out[6] = t[2] * 0.5;\n out[7] = 0;\n return out;\n}\n/**\r\n * Creates a dual quat from a quaternion\r\n *\r\n * @param {quat2} dual quaternion receiving operation result\r\n * @param {quat} q the quaternion\r\n * @returns {quat2} dual quaternion receiving operation result\r\n * @function\r\n */\n\nexport function fromRotation(out, q) {\n out[0] = q[0];\n out[1] = q[1];\n out[2] = q[2];\n out[3] = q[3];\n out[4] = 0;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n return out;\n}\n/**\r\n * Creates a new dual quat from a matrix (4x4)\r\n *\r\n * @param {quat2} out the dual quaternion\r\n * @param {mat4} a the matrix\r\n * @returns {quat2} dual quat receiving operation result\r\n * @function\r\n */\n\nexport function fromMat4(out, a) {\n //TODO Optimize this\n var outer = quat.create();\n mat4.getRotation(outer, a);\n var t = new glMatrix.ARRAY_TYPE(3);\n mat4.getTranslation(t, a);\n fromRotationTranslation(out, outer, t);\n return out;\n}\n/**\r\n * Copy the values from one dual quat to another\r\n *\r\n * @param {quat2} out the receiving dual quaternion\r\n * @param {quat2} a the source dual quaternion\r\n * @returns {quat2} out\r\n * @function\r\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n return out;\n}\n/**\r\n * Set a dual quat to the identity dual quaternion\r\n *\r\n * @param {quat2} out the receiving quaternion\r\n * @returns {quat2} out\r\n */\n\nexport function identity(out) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = 0;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n return out;\n}\n/**\r\n * Set the components of a dual quat to the given values\r\n *\r\n * @param {quat2} out the receiving quaternion\r\n * @param {Number} x1 X component\r\n * @param {Number} y1 Y component\r\n * @param {Number} z1 Z component\r\n * @param {Number} w1 W component\r\n * @param {Number} x2 X component\r\n * @param {Number} y2 Y component\r\n * @param {Number} z2 Z component\r\n * @param {Number} w2 W component\r\n * @returns {quat2} out\r\n * @function\r\n */\n\nexport function set(out, x1, y1, z1, w1, x2, y2, z2, w2) {\n out[0] = x1;\n out[1] = y1;\n out[2] = z1;\n out[3] = w1;\n out[4] = x2;\n out[5] = y2;\n out[6] = z2;\n out[7] = w2;\n return out;\n}\n/**\r\n * Gets the real part of a dual quat\r\n * @param {quat} out real part\r\n * @param {quat2} a Dual Quaternion\r\n * @return {quat} real part\r\n */\n\nexport var getReal = quat.copy;\n/**\r\n * Gets the dual part of a dual quat\r\n * @param {quat} out dual part\r\n * @param {quat2} a Dual Quaternion\r\n * @return {quat} dual part\r\n */\n\nexport function getDual(out, a) {\n out[0] = a[4];\n out[1] = a[5];\n out[2] = a[6];\n out[3] = a[7];\n return out;\n}\n/**\r\n * Set the real component of a dual quat to the given quaternion\r\n *\r\n * @param {quat2} out the receiving quaternion\r\n * @param {quat} q a quaternion representing the real part\r\n * @returns {quat2} out\r\n * @function\r\n */\n\nexport var setReal = quat.copy;\n/**\r\n * Set the dual component of a dual quat to the given quaternion\r\n *\r\n * @param {quat2} out the receiving quaternion\r\n * @param {quat} q a quaternion representing the dual part\r\n * @returns {quat2} out\r\n * @function\r\n */\n\nexport function setDual(out, q) {\n out[4] = q[0];\n out[5] = q[1];\n out[6] = q[2];\n out[7] = q[3];\n return out;\n}\n/**\r\n * Gets the translation of a normalized dual quat\r\n * @param {vec3} out translation\r\n * @param {quat2} a Dual Quaternion to be decomposed\r\n * @return {vec3} translation\r\n */\n\nexport function getTranslation(out, a) {\n var ax = a[4],\n ay = a[5],\n az = a[6],\n aw = a[7],\n bx = -a[0],\n by = -a[1],\n bz = -a[2],\n bw = a[3];\n out[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2;\n out[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2;\n out[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2;\n return out;\n}\n/**\r\n * Translates a dual quat by the given vector\r\n *\r\n * @param {quat2} out the receiving dual quaternion\r\n * @param {quat2} a the dual quaternion to translate\r\n * @param {vec3} v vector to translate by\r\n * @returns {quat2} out\r\n */\n\nexport function translate(out, a, v) {\n var ax1 = a[0],\n ay1 = a[1],\n az1 = a[2],\n aw1 = a[3],\n bx1 = v[0] * 0.5,\n by1 = v[1] * 0.5,\n bz1 = v[2] * 0.5,\n ax2 = a[4],\n ay2 = a[5],\n az2 = a[6],\n aw2 = a[7];\n out[0] = ax1;\n out[1] = ay1;\n out[2] = az1;\n out[3] = aw1;\n out[4] = aw1 * bx1 + ay1 * bz1 - az1 * by1 + ax2;\n out[5] = aw1 * by1 + az1 * bx1 - ax1 * bz1 + ay2;\n out[6] = aw1 * bz1 + ax1 * by1 - ay1 * bx1 + az2;\n out[7] = -ax1 * bx1 - ay1 * by1 - az1 * bz1 + aw2;\n return out;\n}\n/**\r\n * Rotates a dual quat around the X axis\r\n *\r\n * @param {quat2} out the receiving dual quaternion\r\n * @param {quat2} a the dual quaternion to rotate\r\n * @param {number} rad how far should the rotation be\r\n * @returns {quat2} out\r\n */\n\nexport function rotateX(out, a, rad) {\n var bx = -a[0],\n by = -a[1],\n bz = -a[2],\n bw = a[3],\n ax = a[4],\n ay = a[5],\n az = a[6],\n aw = a[7],\n ax1 = ax * bw + aw * bx + ay * bz - az * by,\n ay1 = ay * bw + aw * by + az * bx - ax * bz,\n az1 = az * bw + aw * bz + ax * by - ay * bx,\n aw1 = aw * bw - ax * bx - ay * by - az * bz;\n quat.rotateX(out, a, rad);\n bx = out[0];\n by = out[1];\n bz = out[2];\n bw = out[3];\n out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;\n out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;\n out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;\n out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;\n return out;\n}\n/**\r\n * Rotates a dual quat around the Y axis\r\n *\r\n * @param {quat2} out the receiving dual quaternion\r\n * @param {quat2} a the dual quaternion to rotate\r\n * @param {number} rad how far should the rotation be\r\n * @returns {quat2} out\r\n */\n\nexport function rotateY(out, a, rad) {\n var bx = -a[0],\n by = -a[1],\n bz = -a[2],\n bw = a[3],\n ax = a[4],\n ay = a[5],\n az = a[6],\n aw = a[7],\n ax1 = ax * bw + aw * bx + ay * bz - az * by,\n ay1 = ay * bw + aw * by + az * bx - ax * bz,\n az1 = az * bw + aw * bz + ax * by - ay * bx,\n aw1 = aw * bw - ax * bx - ay * by - az * bz;\n quat.rotateY(out, a, rad);\n bx = out[0];\n by = out[1];\n bz = out[2];\n bw = out[3];\n out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;\n out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;\n out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;\n out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;\n return out;\n}\n/**\r\n * Rotates a dual quat around the Z axis\r\n *\r\n * @param {quat2} out the receiving dual quaternion\r\n * @param {quat2} a the dual quaternion to rotate\r\n * @param {number} rad how far should the rotation be\r\n * @returns {quat2} out\r\n */\n\nexport function rotateZ(out, a, rad) {\n var bx = -a[0],\n by = -a[1],\n bz = -a[2],\n bw = a[3],\n ax = a[4],\n ay = a[5],\n az = a[6],\n aw = a[7],\n ax1 = ax * bw + aw * bx + ay * bz - az * by,\n ay1 = ay * bw + aw * by + az * bx - ax * bz,\n az1 = az * bw + aw * bz + ax * by - ay * bx,\n aw1 = aw * bw - ax * bx - ay * by - az * bz;\n quat.rotateZ(out, a, rad);\n bx = out[0];\n by = out[1];\n bz = out[2];\n bw = out[3];\n out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;\n out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;\n out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;\n out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;\n return out;\n}\n/**\r\n * Rotates a dual quat by a given quaternion (a * q)\r\n *\r\n * @param {quat2} out the receiving dual quaternion\r\n * @param {quat2} a the dual quaternion to rotate\r\n * @param {quat} q quaternion to rotate by\r\n * @returns {quat2} out\r\n */\n\nexport function rotateByQuatAppend(out, a, q) {\n var qx = q[0],\n qy = q[1],\n qz = q[2],\n qw = q[3],\n ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n out[0] = ax * qw + aw * qx + ay * qz - az * qy;\n out[1] = ay * qw + aw * qy + az * qx - ax * qz;\n out[2] = az * qw + aw * qz + ax * qy - ay * qx;\n out[3] = aw * qw - ax * qx - ay * qy - az * qz;\n ax = a[4];\n ay = a[5];\n az = a[6];\n aw = a[7];\n out[4] = ax * qw + aw * qx + ay * qz - az * qy;\n out[5] = ay * qw + aw * qy + az * qx - ax * qz;\n out[6] = az * qw + aw * qz + ax * qy - ay * qx;\n out[7] = aw * qw - ax * qx - ay * qy - az * qz;\n return out;\n}\n/**\r\n * Rotates a dual quat by a given quaternion (q * a)\r\n *\r\n * @param {quat2} out the receiving dual quaternion\r\n * @param {quat} q quaternion to rotate by\r\n * @param {quat2} a the dual quaternion to rotate\r\n * @returns {quat2} out\r\n */\n\nexport function rotateByQuatPrepend(out, q, a) {\n var qx = q[0],\n qy = q[1],\n qz = q[2],\n qw = q[3],\n bx = a[0],\n by = a[1],\n bz = a[2],\n bw = a[3];\n out[0] = qx * bw + qw * bx + qy * bz - qz * by;\n out[1] = qy * bw + qw * by + qz * bx - qx * bz;\n out[2] = qz * bw + qw * bz + qx * by - qy * bx;\n out[3] = qw * bw - qx * bx - qy * by - qz * bz;\n bx = a[4];\n by = a[5];\n bz = a[6];\n bw = a[7];\n out[4] = qx * bw + qw * bx + qy * bz - qz * by;\n out[5] = qy * bw + qw * by + qz * bx - qx * bz;\n out[6] = qz * bw + qw * bz + qx * by - qy * bx;\n out[7] = qw * bw - qx * bx - qy * by - qz * bz;\n return out;\n}\n/**\r\n * Rotates a dual quat around a given axis. Does the normalisation automatically\r\n *\r\n * @param {quat2} out the receiving dual quaternion\r\n * @param {quat2} a the dual quaternion to rotate\r\n * @param {vec3} axis the axis to rotate around\r\n * @param {Number} rad how far the rotation should be\r\n * @returns {quat2} out\r\n */\n\nexport function rotateAroundAxis(out, a, axis, rad) {\n //Special case for rad = 0\n if (Math.abs(rad) < glMatrix.EPSILON) {\n return copy(out, a);\n }\n\n var axisLength = Math.hypot(axis[0], axis[1], axis[2]);\n rad = rad * 0.5;\n var s = Math.sin(rad);\n var bx = s * axis[0] / axisLength;\n var by = s * axis[1] / axisLength;\n var bz = s * axis[2] / axisLength;\n var bw = Math.cos(rad);\n var ax1 = a[0],\n ay1 = a[1],\n az1 = a[2],\n aw1 = a[3];\n out[0] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;\n out[1] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;\n out[2] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;\n out[3] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;\n var ax = a[4],\n ay = a[5],\n az = a[6],\n aw = a[7];\n out[4] = ax * bw + aw * bx + ay * bz - az * by;\n out[5] = ay * bw + aw * by + az * bx - ax * bz;\n out[6] = az * bw + aw * bz + ax * by - ay * bx;\n out[7] = aw * bw - ax * bx - ay * by - az * bz;\n return out;\n}\n/**\r\n * Adds two dual quat's\r\n *\r\n * @param {quat2} out the receiving dual quaternion\r\n * @param {quat2} a the first operand\r\n * @param {quat2} b the second operand\r\n * @returns {quat2} out\r\n * @function\r\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n out[6] = a[6] + b[6];\n out[7] = a[7] + b[7];\n return out;\n}\n/**\r\n * Multiplies two dual quat's\r\n *\r\n * @param {quat2} out the receiving dual quaternion\r\n * @param {quat2} a the first operand\r\n * @param {quat2} b the second operand\r\n * @returns {quat2} out\r\n */\n\nexport function multiply(out, a, b) {\n var ax0 = a[0],\n ay0 = a[1],\n az0 = a[2],\n aw0 = a[3],\n bx1 = b[4],\n by1 = b[5],\n bz1 = b[6],\n bw1 = b[7],\n ax1 = a[4],\n ay1 = a[5],\n az1 = a[6],\n aw1 = a[7],\n bx0 = b[0],\n by0 = b[1],\n bz0 = b[2],\n bw0 = b[3];\n out[0] = ax0 * bw0 + aw0 * bx0 + ay0 * bz0 - az0 * by0;\n out[1] = ay0 * bw0 + aw0 * by0 + az0 * bx0 - ax0 * bz0;\n out[2] = az0 * bw0 + aw0 * bz0 + ax0 * by0 - ay0 * bx0;\n out[3] = aw0 * bw0 - ax0 * bx0 - ay0 * by0 - az0 * bz0;\n out[4] = ax0 * bw1 + aw0 * bx1 + ay0 * bz1 - az0 * by1 + ax1 * bw0 + aw1 * bx0 + ay1 * bz0 - az1 * by0;\n out[5] = ay0 * bw1 + aw0 * by1 + az0 * bx1 - ax0 * bz1 + ay1 * bw0 + aw1 * by0 + az1 * bx0 - ax1 * bz0;\n out[6] = az0 * bw1 + aw0 * bz1 + ax0 * by1 - ay0 * bx1 + az1 * bw0 + aw1 * bz0 + ax1 * by0 - ay1 * bx0;\n out[7] = aw0 * bw1 - ax0 * bx1 - ay0 * by1 - az0 * bz1 + aw1 * bw0 - ax1 * bx0 - ay1 * by0 - az1 * bz0;\n return out;\n}\n/**\r\n * Alias for {@link quat2.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Scales a dual quat by a scalar number\r\n *\r\n * @param {quat2} out the receiving dual quat\r\n * @param {quat2} a the dual quat to scale\r\n * @param {Number} b amount to scale the dual quat by\r\n * @returns {quat2} out\r\n * @function\r\n */\n\nexport function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n out[6] = a[6] * b;\n out[7] = a[7] * b;\n return out;\n}\n/**\r\n * Calculates the dot product of two dual quat's (The dot product of the real parts)\r\n *\r\n * @param {quat2} a the first operand\r\n * @param {quat2} b the second operand\r\n * @returns {Number} dot product of a and b\r\n * @function\r\n */\n\nexport var dot = quat.dot;\n/**\r\n * Performs a linear interpolation between two dual quats's\r\n * NOTE: The resulting dual quaternions won't always be normalized (The error is most noticeable when t = 0.5)\r\n *\r\n * @param {quat2} out the receiving dual quat\r\n * @param {quat2} a the first operand\r\n * @param {quat2} b the second operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {quat2} out\r\n */\n\nexport function lerp(out, a, b, t) {\n var mt = 1 - t;\n if (dot(a, b) < 0) t = -t;\n out[0] = a[0] * mt + b[0] * t;\n out[1] = a[1] * mt + b[1] * t;\n out[2] = a[2] * mt + b[2] * t;\n out[3] = a[3] * mt + b[3] * t;\n out[4] = a[4] * mt + b[4] * t;\n out[5] = a[5] * mt + b[5] * t;\n out[6] = a[6] * mt + b[6] * t;\n out[7] = a[7] * mt + b[7] * t;\n return out;\n}\n/**\r\n * Calculates the inverse of a dual quat. If they are normalized, conjugate is cheaper\r\n *\r\n * @param {quat2} out the receiving dual quaternion\r\n * @param {quat2} a dual quat to calculate inverse of\r\n * @returns {quat2} out\r\n */\n\nexport function invert(out, a) {\n var sqlen = squaredLength(a);\n out[0] = -a[0] / sqlen;\n out[1] = -a[1] / sqlen;\n out[2] = -a[2] / sqlen;\n out[3] = a[3] / sqlen;\n out[4] = -a[4] / sqlen;\n out[5] = -a[5] / sqlen;\n out[6] = -a[6] / sqlen;\n out[7] = a[7] / sqlen;\n return out;\n}\n/**\r\n * Calculates the conjugate of a dual quat\r\n * If the dual quaternion is normalized, this function is faster than quat2.inverse and produces the same result.\r\n *\r\n * @param {quat2} out the receiving quaternion\r\n * @param {quat2} a quat to calculate conjugate of\r\n * @returns {quat2} out\r\n */\n\nexport function conjugate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = a[3];\n out[4] = -a[4];\n out[5] = -a[5];\n out[6] = -a[6];\n out[7] = a[7];\n return out;\n}\n/**\r\n * Calculates the length of a dual quat\r\n *\r\n * @param {quat2} a dual quat to calculate length of\r\n * @returns {Number} length of a\r\n * @function\r\n */\n\nexport var length = quat.length;\n/**\r\n * Alias for {@link quat2.length}\r\n * @function\r\n */\n\nexport var len = length;\n/**\r\n * Calculates the squared length of a dual quat\r\n *\r\n * @param {quat2} a dual quat to calculate squared length of\r\n * @returns {Number} squared length of a\r\n * @function\r\n */\n\nexport var squaredLength = quat.squaredLength;\n/**\r\n * Alias for {@link quat2.squaredLength}\r\n * @function\r\n */\n\nexport var sqrLen = squaredLength;\n/**\r\n * Normalize a dual quat\r\n *\r\n * @param {quat2} out the receiving dual quaternion\r\n * @param {quat2} a dual quaternion to normalize\r\n * @returns {quat2} out\r\n * @function\r\n */\n\nexport function normalize(out, a) {\n var magnitude = squaredLength(a);\n\n if (magnitude > 0) {\n magnitude = Math.sqrt(magnitude);\n var a0 = a[0] / magnitude;\n var a1 = a[1] / magnitude;\n var a2 = a[2] / magnitude;\n var a3 = a[3] / magnitude;\n var b0 = a[4];\n var b1 = a[5];\n var b2 = a[6];\n var b3 = a[7];\n var a_dot_b = a0 * b0 + a1 * b1 + a2 * b2 + a3 * b3;\n out[0] = a0;\n out[1] = a1;\n out[2] = a2;\n out[3] = a3;\n out[4] = (b0 - a0 * a_dot_b) / magnitude;\n out[5] = (b1 - a1 * a_dot_b) / magnitude;\n out[6] = (b2 - a2 * a_dot_b) / magnitude;\n out[7] = (b3 - a3 * a_dot_b) / magnitude;\n }\n\n return out;\n}\n/**\r\n * Returns a string representation of a dual quatenion\r\n *\r\n * @param {quat2} a dual quaternion to represent as a string\r\n * @returns {String} string representation of the dual quat\r\n */\n\nexport function str(a) {\n return 'quat2(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ', ' + a[4] + ', ' + a[5] + ', ' + a[6] + ', ' + a[7] + ')';\n}\n/**\r\n * Returns whether or not the dual quaternions have exactly the same elements in the same position (when compared with ===)\r\n *\r\n * @param {quat2} a the first dual quaternion.\r\n * @param {quat2} b the second dual quaternion.\r\n * @returns {Boolean} true if the dual quaternions are equal, false otherwise.\r\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7];\n}\n/**\r\n * Returns whether or not the dual quaternions have approximately the same elements in the same position.\r\n *\r\n * @param {quat2} a the first dual quat.\r\n * @param {quat2} b the second dual quat.\r\n * @returns {Boolean} true if the dual quats are equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3],\n a4 = a[4],\n a5 = a[5],\n a6 = a[6],\n a7 = a[7];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3],\n b4 = b[4],\n b5 = b[5],\n b6 = b[6],\n b7 = b[7];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7));\n}"],"names":["$parcel$export","e","n","v","s","Object","defineProperty","get","set","enumerable","configurable","$parcel$global","globalThis","self","window","global","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","parcelRegister","$6a16bb76f73d4368$export$8da03248cdcfe1a3","$6a16bb76f73d4368$export$7dea6024c4894e8e","$6a16bb76f73d4368$export$4051a07651545597","$emWKU","$d94HJ","$6a16bb76f73d4368$var$panoElement","document","getElementById","Viewer","controls","mouseViewMode","scrollZoom","$6a16bb76f73d4368$var$tourInfoHotspot","SCENES","infoHotspots","$6a16bb76f73d4368$var$tourLookToInfoHotspot","yaw","pitch","rotation","scenes","name","settings","autorotateEnabled","fullscreenButton","tourParams","tourSection1","$a760b26c56c09f66$export$d3112996f706f1c","$cy4lp","KITCHEN_ISLAND","$922c07b81080a7a2$export$c7323ca0efd38c6","levels","tileSize","size","fallbackOnly","faceSize","initialViewParameters","fov","linkHotspots","class","title","text","images","videos","WebGlStage","CssStage","FlashStage","WebGlCubeRenderer","WebGlFlatRenderer","WebGlEquirectRenderer","CssCubeRenderer","CssFlatRenderer","FlashCubeRenderer","FlashFlatRenderer","registerDefaultRenderers","CubeGeometry","FlatGeometry","EquirectGeometry","RectilinearView","FlatView","ImageUrlSource","SingleAssetSource","StaticAsset","DynamicAsset","TextureStore","Layer","RenderLoop","KeyControlMethod","DragControlMethod","QtvrControlMethod","ScrollZoomControlMethod","PinchZoomControlMethod","VelocityControlMethod","ElementPressControlMethod","Controls","Dynamics","Scene","Hotspot","HotspotContainer","colorEffects","registerDefaultControls","autorotate","util","async","cancelize","chain","clamp","clearOwnProperties","cmp","compose","convertFov","decimal","defaults","defer","degToRad","delay","dom","extend","hash","inherits","mod","noop","now","once","pixelRatio","radToDeg","real","retry","tween","type","dependencies","bowser","glMatrix","eventEmitter","hammerjs","$7wjV9","$5k1DD","$dfwu4","$W9Vbx","$Yar88","$lNra6","$6InGT","$dBMHD","$e0594a60b4b76785$require$setAbsolute","setAbsolute","$e0594a60b4b76785$require$setFullSize","setFullSize","$2Xxut","$e0594a60b4b76785$var$debug","MARZIPANODEBUG","webGl","$e0594a60b4b76785$var$browserQuirks","videoUseTexImage2D","chrome","$e0594a60b4b76785$var$WebGlStage","opts","constructor","super_","_generateMipmaps","generateMipmaps","_loader","_domElement","createElement","_gl","$e0594a60b4b76785$var$initWebGlContext","canvas","options","alpha","premultipliedAlpha","antialias","preserveDrawingBuffer","WebGLDebugUtils","console","log","makeLostContextSimulatingCanvas","gl","getContext","makeDebugContext","_handleContextLoss","emit","addEventListener","_rendererInstances","$e0594a60b4b76785$var$WebGlTexture","stage","tile","asset","_stage","_texture","_timestamp","_width","_height","refresh","prototype","destroy","removeEventListener","supported","domElement","webGlContext","setSizeForType","ratio","width","height","loadImage","url","rect","done","maxTextureSize","getParameter","MAX_TEXTURE_SIZE","validateLayer","layer","geometry","maxTileSize","createRenderer","Renderer","rendererInstances","i","length","renderer","push","destroyRenderer","_renderers","indexOf","index","splice","startFrame","viewport","drawingBufferWidth","drawingBufferHeight","clearColor","clear","COLOR_BUFFER_BIT","DEPTH_BUFFER_BIT","enable","DEPTH_TEST","BLEND","blendFunc","ONE","ONE_MINUS_SRC_ALPHA","endFrame","takeSnapshot","quality","render","toDataURL","texture","timestamp","element","maxSize","deleteTexture","createTexture","bindTexture","TEXTURE_2D","pixelStorei","UNPACK_FLIP_Y_WEBGL","UNPACK_PREMULTIPLY_ALPHA_WEBGL","texImage2D","RGBA","UNSIGNED_BYTE","HTMLVideoElement","texSubImage2D","texParameteri","TEXTURE_MAG_FILTER","LINEAR","TEXTURE_MIN_FILTER","LINEAR_MIPMAP_LINEAR","generateMipmap","TEXTURE_WRAP_S","CLAMP_TO_EDGE","TEXTURE_WRAP_T","TextureClass","$6mia6","$hluEj","$8pjZz","$11mTq","$bMUVO","$bYEal","$579af966673ff6bc$var$forwardTileCmp","t1","t2","$579af966673ff6bc$var$reverseTileCmp","$579af966673ff6bc$var$Stage","_progressive","progressive","_layers","_tilesToLoad","_tilesToRender","_tmpVisible","_tmpChildren","_tmpRect","_tmpSize","_createTextureWorkQueue","_emitRenderInvalid","bind","_rendererRegistry","removeAllLayers","registerRenderer","geometryType","viewType","setSize","listLayers","concat","hasLayer","addLayer","view","rendererClass","moveLayer","removeLayer","removedLayer","tilesToLoad","tilesToRender","stableStage","textureStore","j","stableLayer","effects","depth","startLayer","_collectTiles","markTile","renderTile","endLayer","tmpVisible","visibleTiles","isStable","needsFallback","_collectTileToLoad","_collectTileToRender","_collectChildren","_collectParents","sort","tmpChildren","children","needsLoading","parent","_collectTileIntoList","tileList","found","equals","fn","$4a12e2b927a9c278$var$EventEmitter","eventMap","__events","handlerList","var_args","args","Array","slice","arguments","apply","ctor","prop","hasOwnProperty","$azWbw","$ca0c2c24c302e94b$var$WorkTask","cb","cfn","$ca0c2c24c302e94b$var$WorkQueue","_queue","_delay","_paused","paused","_currentTask","_lastFinished","task","cancel","_cancel","_next","pause","resume","_start","finish","_finish","pos","elapsed","remaining","setTimeout","shift","performance","Date","totalWidth","totalHeight","spec","result","x","y","absoluteWidth","relativeWidth","absoluteHeight","relativeHeight","absoluteX","relativeX","absoluteY","relativeY","ret","$9ZuRa","value","called","obj","undefined","$8b847468f6b3fd4c$var$RendererRegistry","$4Qk7S","$1Cfry","$3e00175a50caf80a$var$HtmlImageLoader","img","Image","crossOrigin","onload","naturalWidth","naturalHeight","context","drawImage","onerror","src","$h87tj","$386ba157d397599a$var$propertyMap","HTMLImageElement","HTMLCanvasElement","ImageBitmap","$386ba157d397599a$var$StaticAsset","_widthProp","_heightProp","_element","isDynamic","$c788fac48c2ce4e4$var$globalObject","$12d551cd80a2a729$var$NetworkError","message","superCtor","TempCtor","$9a55dfbeb821c235$var$supported","t","r","l","m","c","d","o","Symbol","toStringTag","__esModule","create","default","p","getFirstMatch","match","getSecondMatch","matchAndReturnConst","test","getWindowsVersionName","getMacOSVersionName","split","map","parseInt","getAndroidVersionName","getVersionPrecision","compareVersions","Math","max","a","u","join","reverse","min","getBrowserAlias","BROWSER_ALIASES_MAP","getBrowserTypeByAlias","BROWSER_MAP","ENGINE_MAP","OS_MAP","PLATFORMS_MAP","Bada","BlackBerry","Chrome","Chromium","Epiphany","Firefox","Focus","Generic","Googlebot","Maxthon","Opera","PhantomJS","Puffin","QupZilla","QQ","QQLite","Safari","Sailfish","SeaMonkey","Sleipnir","Swing","Tizen","Vivaldi","WeChat","Roku","amazon_silk","android","bada","blackberry","chromium","epiphany","firefox","focus","generic","googlebot","google_search","ie","k_meleon","maxthon","edge","mz","naver","opera","opera_coast","phantomjs","puffin","qupzilla","qq","qqlite","safari","sailfish","samsung_internet","seamonkey","sleipnir","swing","tizen","uc","vivaldi","webos","wechat","yandex","tablet","mobile","desktop","tv","WindowsPhone","Windows","MacOS","iOS","Android","WebOS","Linux","ChromeOS","PlayStation4","EdgeHTML","Blink","Trident","Presto","Gecko","WebKit","getParser","parse","getResult","writable","key","_ua","parsedResult","getUA","parseBrowser","browser","find","some","describe","getBrowser","getBrowserName","String","toLowerCase","getBrowserVersion","version","getOS","os","parseOS","getOSName","getOSVersion","getPlatform","platform","parsePlatform","getPlatformType","getEngine","engine","parseEngine","getEngineName","assign","satisfies","keys","forEach","isOS","isPlatform","f","isBrowser","compareVersion","substr","isEngine","is","search","versionName","replace","vendor","model","Number","devicePixelRatio","screen","deviceXDPI","logicalXDPI","systemXDPI","$9e84826b89c9752f$var$prefixProperty","property","style","documentElement","prefixList","prefixedProperty","prefix","toUpperCase","$9e84826b89c9752f$var$setWithVendorPrefix","val","$9e84826b89c9752f$var$setTransform","$9e84826b89c9752f$var$setTransformOrigin","prefixProperty","getWithVendorPrefix","setWithVendorPrefix","setTransform","setTransformOrigin","setNullTransform","setNullTransformOrigin","position","setPixelPosition","left","top","setPixelSize","setNullSize","setOverflowHidden","overflow","setOverflowVisible","setNoPointerEvents","pointerEvents","setBlocking","backgroundColor","opacity","filter","$3owNE","$ec21687300627257$require$setAbsolute","$ec21687300627257$require$setFullSize","$ec21687300627257$require$setNullTransformOrigin","$ec21687300627257$var$browserQuirks","padSize","ios","reverseLevelDepth","useNullTransform","perspectiveNudge","webkit","gecko","$ec21687300627257$var$CssStage","$ec21687300627257$var$CssTexture","_canvas","ctx","tileWidth","tileHeight","padTop","padBottom","padLeft","padRight","$278d0e5ef4071395$var$supported","$278d0e5ef4071395$require$prefixProperty","$278d0e5ef4071395$var$checkCssSupported","perspectiveProperty","el","st","textContent","getElementsByTagName","appendChild","body","offsetHeight","parentNode","removeChild","$54X95","$1IPfd","$9aPxp","$ff2b580a383d48d8$require$setAbsolute","$ff2b580a383d48d8$require$setFullSize","$ff2b580a383d48d8$require$setBlocking","$ff2b580a383d48d8$var$defaultSwfPath","script","currentScript","scripts","path","slash","lastIndexOf","$ff2b580a383d48d8$var$callbackObjectName","__next","$ff2b580a383d48d8$var$callbackNames","$ff2b580a383d48d8$var$flashQuirks","$ff2b580a383d48d8$var$FlashStage","_wmode","wmode","_swfPath","swfPath","_flashStageId","_callbacksObj","_stageCallbacksObjVarName","_callbackListeners","stageCallbacksObjVarName","rootElement","elementId","objectStr","tmpElement","flashElement","blockingElement","_callListeners","_loadImageQueue","_flashReady","_nextLayerId","elements","innerHTML","firstChild","root","flash","blocking","_blockingElement","_flashElement","_checkReadyTimer","setInterval","_checkReady","$ff2b580a383d48d8$var$FlashTexture","imageId","textureId","_textureId","clearInterval","loadFn","addFlashCallbackListener","callbackName","removeFlashCallbackListener","listeners","isReady","clearTimeout","destroyTexture","$3S0Tf","$3b2b348b66bf18e8$var$FlashImageLoader","callback","callbackId","cancelImage","$2d171afb078671be$var$FlashAsset","_imageId","unloadImage","$1411a68d9347b03f$var$supported","$1411a68d9347b03f$var$detectFlashVersion","playerVersion","plugins","navigator","mimeTypes","enabledPlugin","description","ActiveXObject","GetVariable","$bKQXE","$817d92f1c56df95d$var$WebGlCubeRenderer","$c3mW8","$fwwPx","$88ed1296090d26cd$require$mat4","$88ed1296090d26cd$require$vec3","$3KYUN","$88ed1296090d26cd$var$createConstantBuffers","createConstantBuffers","$88ed1296090d26cd$var$destroyConstantBuffers","destroyConstantBuffers","$88ed1296090d26cd$var$createShaderProgram","createShaderProgram","$88ed1296090d26cd$var$destroyShaderProgram","destroyShaderProgram","$88ed1296090d26cd$var$enableAttributes","enableAttributes","$88ed1296090d26cd$var$disableAttributes","disableAttributes","$88ed1296090d26cd$var$setViewport","setViewport","$88ed1296090d26cd$var$setupPixelEffectUniforms","setupPixelEffectUniforms","$88ed1296090d26cd$var$setDepth","setDepth","$88ed1296090d26cd$var$setTexture","setTexture","$o1WjV","$7d8BE","$88ed1296090d26cd$var$vertexIndices","$88ed1296090d26cd$var$vertexPositions","$88ed1296090d26cd$var$textureCoords","$88ed1296090d26cd$var$attribList","$88ed1296090d26cd$var$uniformList","$88ed1296090d26cd$var$WebGlBaseRenderer","projMatrix","viewportMatrix","translateVector","scaleVector","constantBuffers","shaderProgram","useProgram","uniformMatrix4fv","uViewportMatrix","bindBuffer","ARRAY_BUFFER","vertexPositions","vertexAttribPointer","aVertexPosition","FLOAT","FALSE","textureCoords","aTextureCoord","uOpacity","colorOffset","uColorOffset","colorMatrix","uColorMatrix","layerZ","centerX","centerY","scaleX","scaleY","copy","projection","rotateX","rotX","rotateY","rotY","translate","scale","uProjMatrix","z","ELEMENT_ARRAY_BUFFER","vertexIndices","drawElements","TRIANGLES","UNSIGNED_SHORT","$8c678e942362b0b9$export$185802fd694ee1f5","$8c678e942362b0b9$export$9cd59f9826255e47","$8c678e942362b0b9$export$784d13d8ee351f07","$8c678e942362b0b9$export$a82be99ed2a44a7d","$8c678e942362b0b9$export$adaa4cf7ef1b65be","$8c678e942362b0b9$export$f0954fd7d5368655","$8c678e942362b0b9$export$9cb09a71b7d66923","$8c678e942362b0b9$export$6897c284b6f9f4dc","$8c678e942362b0b9$export$33f3c024b4ae00a1","$8c678e942362b0b9$export$a04698f914c55ed9","$8c678e942362b0b9$export$2060d2db72cce88f","$8c678e942362b0b9$export$d73ee8ef04f5226a","$8c678e942362b0b9$export$dcdf75081b88279d","$8c678e942362b0b9$export$bb628a54ab399bc9","$8c678e942362b0b9$export$a59c8716592e09af","$8c678e942362b0b9$export$cf71e4d4ca4d1cfd","$8c678e942362b0b9$export$ea6eae3365de5b9c","$8c678e942362b0b9$export$bc9e79e74e9fddf6","$8c678e942362b0b9$export$832ca188ffb1955d","$8c678e942362b0b9$export$926fc125ff3c666c","$8c678e942362b0b9$export$dd47cc2f828c32ef","$8c678e942362b0b9$export$7dc997d67d2b7f33","$8c678e942362b0b9$export$ad5ddaedc8f405df","$8c678e942362b0b9$export$9545ac307f2a256b","$8c678e942362b0b9$export$ff497f2be31cc6a","$8c678e942362b0b9$export$202e99f82f7f0395","$8c678e942362b0b9$export$71dc54d92bd04b57","$8c678e942362b0b9$export$df3937d3b537df0a","$8c678e942362b0b9$export$ddf9c55c9f2be172","$8c678e942362b0b9$export$1def1f860edc4b1f","$8c678e942362b0b9$export$2ff2bbe382249af7","$8c678e942362b0b9$export$89b5708c387cac6c","$8c678e942362b0b9$export$541149539f3a4684","$8c678e942362b0b9$export$58ae211c788e338f","$8c678e942362b0b9$export$4f2167e613cfc87b","$8c678e942362b0b9$export$d924e14fd6d9aa66","$8c678e942362b0b9$export$aa67782f4dc9e52c","$8c678e942362b0b9$export$42d51816ce590c93","$8c678e942362b0b9$export$326827e8268e9cdb","$8c678e942362b0b9$export$e16d8520af44a096","$8c678e942362b0b9$export$4e2d2ead65e5f7e3","$8c678e942362b0b9$export$c697bed75648cdb7","$8c678e942362b0b9$export$553579f63bdd7137","$8c678e942362b0b9$export$f2599a5cf1109d8","$8c678e942362b0b9$export$e9bab7fafb253603","$8c678e942362b0b9$export$6e3a27864ab166fe","$8c678e942362b0b9$export$f93b5905241a7cca","$rqjzO","out","ARRAY_TYPE","Float32Array","m00","m01","m02","m03","m10","m11","m12","m13","m20","m21","m22","m23","m30","m31","m32","m33","a01","a02","a03","a12","a13","a23","a00","a10","a11","a20","a21","a22","a30","a31","a32","a33","b00","b01","b02","b03","b04","b05","b06","b07","b08","b09","b10","b11","det","b","b0","b1","b2","b3","rad","axis","b12","b20","b21","b22","len","hypot","EPSILON","sin","cos","q","w","x2","y2","z2","xx","xy","xz","yy","yz","zz","wx","wy","wz","translation","bx","by","bz","bw","ax","ay","az","aw","magnitude","mat","scaling","is1","is2","is3","sm11","sm12","sm13","sm21","sm22","sm23","sm31","sm32","sm33","trace","S","sqrt","sx","sy","sz","ox","oy","oz","out0","out1","out2","out4","out5","out6","out8","out9","out10","yx","zx","zy","right","bottom","near","far","rl","tb","nf","fovy","aspect","tan","Infinity","upTan","upDegrees","PI","downTan","downDegrees","leftTan","leftDegrees","rightTan","rightDegrees","xScale","yScale","lr","bt","eye","center","up","x0","x1","y0","y1","z0","z1","eyex","eyey","eyez","upx","upy","upz","centerx","centery","centerz","abs","target","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","a14","a15","b4","b5","b6","b7","b8","b9","b13","b14","b15","$0526ef4aedbd7991$export$fd293b15f47e270","$0526ef4aedbd7991$export$b67359430d3b1b2","$0526ef4aedbd7991$export$5ada478c8a628231","$0526ef4aedbd7991$export$cb2c0eb57f5e532c","$0526ef4aedbd7991$export$408b8ee5959eefd5","$0526ef4aedbd7991$export$e9bab7fafb253603","random","$0526ef4aedbd7991$var$degree","$b4d34f945b36eb1f$export$185802fd694ee1f5","$b4d34f945b36eb1f$export$9cd59f9826255e47","$b4d34f945b36eb1f$export$f24224f1c91d8156","$b4d34f945b36eb1f$export$a82be99ed2a44a7d","$b4d34f945b36eb1f$export$784d13d8ee351f07","$b4d34f945b36eb1f$export$adaa4cf7ef1b65be","$b4d34f945b36eb1f$export$e16d8520af44a096","$b4d34f945b36eb1f$export$4e2d2ead65e5f7e3","$b4d34f945b36eb1f$export$2060d2db72cce88f","$b4d34f945b36eb1f$export$cd007d971a5a2143","$b4d34f945b36eb1f$export$803ce6b71a0a94b2","$b4d34f945b36eb1f$export$a3fe094919f356fd","$b4d34f945b36eb1f$export$96ec731ed4dcb222","$b4d34f945b36eb1f$export$8960430cfd85939f","$b4d34f945b36eb1f$export$2077e0241d6afd3c","$b4d34f945b36eb1f$export$dcdf75081b88279d","$b4d34f945b36eb1f$export$19cedf1da84ba854","$b4d34f945b36eb1f$export$9f17032d917177de","$b4d34f945b36eb1f$export$88e6ebb4fe54f538","$b4d34f945b36eb1f$export$ab44e1323ffc8376","$b4d34f945b36eb1f$export$aef51622e549b8b0","$b4d34f945b36eb1f$export$70ae2c07e401031b","$b4d34f945b36eb1f$export$a3295358bff77e","$b4d34f945b36eb1f$export$94132a0e348806d4","$b4d34f945b36eb1f$export$bb646b20bb93d339","$b4d34f945b36eb1f$export$3a89f8d6f6bf6c9f","$b4d34f945b36eb1f$export$ae8865616f30561c","$b4d34f945b36eb1f$export$b9c5f84610baddaf","$b4d34f945b36eb1f$export$4385e60b38654f68","$b4d34f945b36eb1f$export$5ffbd13800309d59","$b4d34f945b36eb1f$export$f0bfa0a0024626ee","$b4d34f945b36eb1f$export$c32adef9e939ce85","$b4d34f945b36eb1f$export$a59c8716592e09af","$b4d34f945b36eb1f$export$cf71e4d4ca4d1cfd","$b4d34f945b36eb1f$export$ea6eae3365de5b9c","$b4d34f945b36eb1f$export$944b09d2ad10b378","$b4d34f945b36eb1f$export$7f9972325ebfd559","$b4d34f945b36eb1f$export$42d51816ce590c93","$b4d34f945b36eb1f$export$f2599a5cf1109d8","$b4d34f945b36eb1f$export$e9bab7fafb253603","$b4d34f945b36eb1f$export$f93b5905241a7cca","$b4d34f945b36eb1f$export$6e3a27864ab166fe","$b4d34f945b36eb1f$export$159d9494db57879b","$b4d34f945b36eb1f$export$6c4a311cc157c764","$b4d34f945b36eb1f$export$2422cd6c492a8b3a","$b4d34f945b36eb1f$export$fc1400facf92c78","$b4d34f945b36eb1f$export$99d8dd3f32a3435","$b4d34f945b36eb1f$export$4b80e395e36b5a56","vec","ceil","floor","round","factorTimes2","factor1","factor2","factor3","factor4","inverseFactor","inverseFactorTimesTwo","RANDOM","zScale","qx","qy","qz","qw","uvx","uvy","uvz","uuvx","uuvy","uuvz","w2","tempA","tempB","cosine","acos","stride","offset","count","arg","$eCQUD","$8QvoZ","$2bc4eb70f599d6df$require$vec4","$2bc4eb70f599d6df$require$vec3","$2bc4eb70f599d6df$require$mat4","$2bc4eb70f599d6df$var$createShader","shader","createShader","shaderSource","compileShader","getShaderParameter","COMPILE_STATUS","getShaderInfoLog","$2bc4eb70f599d6df$var$createConstantBuffer","usage","buffer","createBuffer","bufferData","$2bc4eb70f599d6df$var$defaultColorOffset","$2bc4eb70f599d6df$var$defaultColorMatrix","identity","$2bc4eb70f599d6df$var$translateVector","$2bc4eb70f599d6df$var$scaleVector","vertexSrc","fragmentSrc","attribList","uniformList","vertexShader","VERTEX_SHADER","fragmentShader","FRAGMENT_SHADER","createProgram","attachShader","linkProgram","getProgramParameter","LINK_STATUS","getProgramInfoLog","attrib","getAttribLocation","uniform","getUniformLocation","shaderList","getAttachedShaders","detachShader","deleteShader","deleteProgram","STATIC_DRAW","Uint16Array","deleteBuffer","numAttrs","ACTIVE_ATTRIBUTES","enableVertexAttribArray","disableVertexAttribArray","activeTexture","TEXTURE0","uniform1i","uSampler","tileZ","uniform1f","uDepth","$2bc4eb70f599d6df$var$MAX_LEVELS","offsetX","clampedOffsetX","leftExcess","clampedWidth","rightExcess","offsetY","clampedOffsetY","bottomExcess","clampedHeight","topExcess","uniforms","uniform4fv","$670b89df6ca628ce$export$185802fd694ee1f5","$670b89df6ca628ce$export$9cd59f9826255e47","$670b89df6ca628ce$export$a82be99ed2a44a7d","$670b89df6ca628ce$export$784d13d8ee351f07","$670b89df6ca628ce$export$adaa4cf7ef1b65be","$670b89df6ca628ce$export$e16d8520af44a096","$670b89df6ca628ce$export$4e2d2ead65e5f7e3","$670b89df6ca628ce$export$2060d2db72cce88f","$670b89df6ca628ce$export$cd007d971a5a2143","$670b89df6ca628ce$export$803ce6b71a0a94b2","$670b89df6ca628ce$export$a3fe094919f356fd","$670b89df6ca628ce$export$96ec731ed4dcb222","$670b89df6ca628ce$export$8960430cfd85939f","$670b89df6ca628ce$export$2077e0241d6afd3c","$670b89df6ca628ce$export$dcdf75081b88279d","$670b89df6ca628ce$export$19cedf1da84ba854","$670b89df6ca628ce$export$9f17032d917177de","$670b89df6ca628ce$export$88e6ebb4fe54f538","$670b89df6ca628ce$export$f24224f1c91d8156","$670b89df6ca628ce$export$ab44e1323ffc8376","$670b89df6ca628ce$export$aef51622e549b8b0","$670b89df6ca628ce$export$70ae2c07e401031b","$670b89df6ca628ce$export$a3295358bff77e","$670b89df6ca628ce$export$94132a0e348806d4","$670b89df6ca628ce$export$bb646b20bb93d339","$670b89df6ca628ce$export$3a89f8d6f6bf6c9f","$670b89df6ca628ce$export$4385e60b38654f68","$670b89df6ca628ce$export$5ffbd13800309d59","$670b89df6ca628ce$export$c32adef9e939ce85","$670b89df6ca628ce$export$7f9972325ebfd559","$670b89df6ca628ce$export$42d51816ce590c93","$670b89df6ca628ce$export$f2599a5cf1109d8","$670b89df6ca628ce$export$e9bab7fafb253603","$670b89df6ca628ce$export$f93b5905241a7cca","$670b89df6ca628ce$export$6e3a27864ab166fe","$670b89df6ca628ce$export$159d9494db57879b","$670b89df6ca628ce$export$6c4a311cc157c764","$670b89df6ca628ce$export$2422cd6c492a8b3a","$670b89df6ca628ce$export$fc1400facf92c78","$670b89df6ca628ce$export$99d8dd3f32a3435","$670b89df6ca628ce$export$4b80e395e36b5a56","A","B","C","D","E","F","G","H","I","J","s1","v1","v2","s2","v3","v4","ix","iy","iz","iw","$4c645e1e9e1de633$var$WebGlFlatRenderer","$da1736cd2fd385ef$var$createConstantBuffers","$da1736cd2fd385ef$var$destroyConstantBuffers","$da1736cd2fd385ef$var$createShaderProgram","$da1736cd2fd385ef$var$destroyShaderProgram","$da1736cd2fd385ef$var$enableAttributes","$da1736cd2fd385ef$var$disableAttributes","$da1736cd2fd385ef$var$setViewport","$da1736cd2fd385ef$var$setupPixelEffectUniforms","$da1736cd2fd385ef$var$setDepth","$da1736cd2fd385ef$var$setTexture","$aVswm","$3C2IP","$da1736cd2fd385ef$var$vertexIndices","$da1736cd2fd385ef$var$vertexPositions","$da1736cd2fd385ef$var$textureCoords","$da1736cd2fd385ef$var$attribList","$da1736cd2fd385ef$var$uniformList","$da1736cd2fd385ef$var$WebGlEquirectRenderer","invProjMatrix","$da1736cd2fd385ef$require$mat4","invert","uInvProjMatrix","textureCrop","textureX","textureY","textureWidth","textureHeight","uTextureX","uTextureY","uTextureWidth","uTextureHeight","$302f26ecbc1518d9$require$CubeTile","$4QGnk","Tile","$iv3ES","$asoyN","$302f26ecbc1518d9$var$CssCubeRenderer","quirks","calculateTransform","_browserQuirks","transform","cubeSize","levelWidth","viewportWidth","viewportHeight","perspective","viewRotZ","roll","viewRotX","viewRotY","tileRotX","tileRotY","cornerX","cornerY","$4j7qz","$1tXVZ","$dW5wO","$4tCa7","$4rFjs","$387ce39a02ed0988$require$makeLevelList","makeLevelList","$387ce39a02ed0988$require$makeSelectableLevelList","makeSelectableLevelList","$3nhrd","$fXp6t","$387ce39a02ed0988$require$vec3","$387ce39a02ed0988$require$vec4","$387ce39a02ed0988$var$faceList","$387ce39a02ed0988$var$faceRotation","$387ce39a02ed0988$var$origin","$387ce39a02ed0988$var$rotateVector","rotateZ","$387ce39a02ed0988$var$faceVectors","$387ce39a02ed0988$var$i","$387ce39a02ed0988$var$face","$387ce39a02ed0988$var$rotation","$387ce39a02ed0988$var$v","fromValues","$387ce39a02ed0988$var$adjacentFace","$387ce39a02ed0988$var$neighborOffsets","$387ce39a02ed0988$var$CubeTile","face","_geometry","_level","levelList","$387ce39a02ed0988$var$CubeLevel","levelProperties","_size","_tileSize","$387ce39a02ed0988$var$CubeGeometry","levelPropertiesList","selectableLevelList","_validateWithParentLevel","_tileSearcher","_neighborsCache","_vec","_viewSize","numHorizontalTiles","numVerticalTiles","levelHeight","atTopLevel","atBottomLevel","atTopEdge","atBottomEdge","atLeftEdge","atRightEdge","vertices","rot","makeVertex","level","parentLevel","childLevel","nHoriz","nVert","h","tileX","tileY","neighbors","cache","cachedResult","numX","numY","xOffset","yOffset","newX","newY","newFace","xCoord","yCoord","that","str","numHorizontal","numVertical","parentWidth","parentHeight","parentTileWidth","parentTileHeight","parentNumHorizontal","parentNumVertical","levelTiles","levelIndex","maxX","maxY","_closestTile","ray","transformMat4","inverseProjection","minAngle","closestFace","vector","angle","dot","viewSize","tileSearcher","startingTile","k","$fio2g","$1146fd93dd0182e7$var$TileSearcher","_stack","_visited","_vertices","stack","visited","_clear","pop","has","intersects","add","$iZgBB","$b22b2e6b2a6620cd$var$Set","capacity","isFinite","_capacity","_buckets","bucket","existingElement","remove","$a254faf283c27d31$var$LruMap","_keys","_values","_index","existingKey","del","evictedKey","existingValue","$3427791892b79f43$var$Level","_fallbackOnly","LevelClass","list","level1","level2","typ","toString","$jOYf3","$d77df5b8fa140bee$require$setOverflowHidden","$d77df5b8fa140bee$require$setNoPointerEvents","$d77df5b8fa140bee$require$setNullTransform","$d77df5b8fa140bee$require$setTransform","$d77df5b8fa140bee$var$debug","css","$d77df5b8fa140bee$var$tileCmp","$d77df5b8fa140bee$var$CssBaseRenderer","tileClass","_root","_oldTileList","_newTileList","_textureMap","stageWidth","clientWidth","stageHeight","clientHeight","oldIndex","newIndex","oldTile","newTile","currentNode","nextNode","oldTileList","newTileList","textureMap","nextSibling","insertBefore","setAttribute","tmp","$e6e16a93a5a6d2ce$var$Map","_keyBuckets","_valBuckets","keyBucket","valBucket","toPrecision","$7fda2eaa0ce1864f$require$FlatTile","$l1BkT","$7fda2eaa0ce1864f$var$CssFlatRenderer","zoomX","_zoomX","zoomY","_zoomY","offX","offY","$f4e6a71b0e40022d$require$makeLevelList","$f4e6a71b0e40022d$require$makeSelectableLevelList","$5VJvE","$f4e6a71b0e40022d$require$vec2","$f4e6a71b0e40022d$require$vec4","$f4e6a71b0e40022d$var$neighborOffsets","$f4e6a71b0e40022d$var$FlatTile","$f4e6a71b0e40022d$var$FlatLevel","_tileWidth","_tileHeight","$f4e6a71b0e40022d$var$FlatGeometry","$451593d984d40c98$export$185802fd694ee1f5","$451593d984d40c98$export$9cd59f9826255e47","$451593d984d40c98$export$a82be99ed2a44a7d","$451593d984d40c98$export$784d13d8ee351f07","$451593d984d40c98$export$adaa4cf7ef1b65be","$451593d984d40c98$export$e16d8520af44a096","$451593d984d40c98$export$4e2d2ead65e5f7e3","$451593d984d40c98$export$2060d2db72cce88f","$451593d984d40c98$export$cd007d971a5a2143","$451593d984d40c98$export$803ce6b71a0a94b2","$451593d984d40c98$export$a3fe094919f356fd","$451593d984d40c98$export$96ec731ed4dcb222","$451593d984d40c98$export$8960430cfd85939f","$451593d984d40c98$export$2077e0241d6afd3c","$451593d984d40c98$export$dcdf75081b88279d","$451593d984d40c98$export$19cedf1da84ba854","$451593d984d40c98$export$9f17032d917177de","$451593d984d40c98$export$88e6ebb4fe54f538","$451593d984d40c98$export$f24224f1c91d8156","$451593d984d40c98$export$ab44e1323ffc8376","$451593d984d40c98$export$aef51622e549b8b0","$451593d984d40c98$export$70ae2c07e401031b","$451593d984d40c98$export$a3295358bff77e","$451593d984d40c98$export$94132a0e348806d4","$451593d984d40c98$export$bb646b20bb93d339","$451593d984d40c98$export$3a89f8d6f6bf6c9f","$451593d984d40c98$export$4385e60b38654f68","$451593d984d40c98$export$b732428d73874bfc","$451593d984d40c98$export$3e55bc4b3707dfd3","$451593d984d40c98$export$f0bfa0a0024626ee","$451593d984d40c98$export$5ffbd13800309d59","$451593d984d40c98$export$bb628a54ab399bc9","$451593d984d40c98$export$944b09d2ad10b378","$451593d984d40c98$export$7f9972325ebfd559","$451593d984d40c98$export$42d51816ce590c93","$451593d984d40c98$export$f2599a5cf1109d8","$451593d984d40c98$export$e9bab7fafb253603","$451593d984d40c98$export$fc1400facf92c78","$451593d984d40c98$export$f93b5905241a7cca","$451593d984d40c98$export$6e3a27864ab166fe","$451593d984d40c98$export$159d9494db57879b","$451593d984d40c98$export$6c4a311cc157c764","$451593d984d40c98$export$2422cd6c492a8b3a","$451593d984d40c98$export$99d8dd3f32a3435","$451593d984d40c98$export$4b80e395e36b5a56","p0","p1","sinC","cosC","len1","len2","$de14n","$7d23478d77fbbf43$require$CubeTile","$jSacE","$7d23478d77fbbf43$var$FlashCubeRenderer","layerId","_flashTileList","_renderOnFlash","_layerId","_quirks","_tileList","flashTileList","levelSize","viewportX","viewportY","drawCubeTiles","$9a0d699020b8474a$var$tileCmp","$9a0d699020b8474a$var$FlashBaseRenderer","_layerCreated","destroyLayer","createLayer","$3a81e6d75d4723be$require$FlatTile","$3a81e6d75d4723be$var$FlashFlatRenderer","drawFlatTiles","$b7h3a","$6yDfP","$iIThc","$48tXO","$aYyo6","$aK6y2","$51qT1","$8866fcddc892b476$var$EquirectTile","$8866fcddc892b476$var$EquirectLevel","$8866fcddc892b476$var$EquirectGeometry","tile1","$468cf9d9bfd41e18$require$mat4","$468cf9d9bfd41e18$require$vec4","$hmySL","$0OTzd","$arsG2","$468cf9d9bfd41e18$var$defaultFov","$468cf9d9bfd41e18$var$RectilinearView","params","limiter","_yaw","_pitch","_roll","_fov","_projectionCenterX","projectionCenterX","_projectionCenterY","projectionCenterY","_limiter","_projMatrix","_invProjMatrix","_frustum","_projectionChanged","_params","_fovs","_tmpVec","_update","parameters","setYaw","_resetParams","setPitch","setRoll","setFov","setProjectionCenterX","setProjectionCenterY","offsetYaw","yawOffset","offsetPitch","pitchOffset","offsetRoll","rollOffset","offsetFov","fovOffset","setParameters","setLimiter","oldYaw","oldPitch","oldRoll","oldFov","oldProjectionCenterX","oldProjectionCenterY","oldWidth","oldHeight","newYaw","_normalize","newPitch","newRoll","newFov","newWidth","newHeight","newProjectionCenterX","newProjectionCenterY","_normalizeCoordinates","hfovPi","htov","maxFov","isNaN","normalizeToClosest","coords","viewYaw","viewPitch","coordYaw","coordPitch","prevYaw","nextYaw","prevPitch","nextPitch","updateWithControlParameters","vfov","hfov","vtoh","axisScaledX","axisScaledY","zoom","_updateProjection","frustum","offsetAngleX","atan","offsetAngleY","fovs","perspectiveFromFieldOfView","_matrixToFrustum","rectangle","vertex","plane","inside","corner","selectLevel","requiredPixels","coverFactor","coordinatesToScreen","screenToCoordinates","vecx","vecy","atan2","coordinatesToPerspectiveTransform","radius","extraTransforms","limit","vmin","vmax","resolution","minFov","traditional","maxResolution","maxVFov","maxHFov","$ca3f8ca1d42e4409$var$convert","fromDimension","toDimension","convert","htod","vtod","dtoh","dtov","fnList","initialArg","$6c5cc58465138606$require$mat4","$6c5cc58465138606$require$vec4","$6c5cc58465138606$var$planeAxes","$6c5cc58465138606$var$planeCmp","$6c5cc58465138606$var$FlatView","mediaAspectRatio","_x","_y","_zoom","_mediaAspectRatio","setX","setY","setZoom","offsetZoom","zoomOffset","setMediaAspectRatio","oldX","oldY","oldZoom","oldMediaAspectRatio","newZoom","newMediaAspectRatio","ortho","zoomFactor","minZoom","visibleX","maxZoom","minX","visibleY","factor","viewportAspectRatio","minY","letterbox","fullHeightZoom","$aPjjN","$61A4i","$7OILR","$28e805513a7c304b$var$templateProperties","$28e805513a7c304b$var$ImageUrlSource","sourceFromTile","_loadPool","concurrency","_retryDelay","retryDelay","_retryMap","_sourceFromTile","loadAsset","delayAmount","retryMap","tileSource","lastTime","currentTime","fromString","faceOrder","cubeMapPreviewFaceOrder","cubeMapPreviewUrl","withoutPreview","tileUrl","templateProperty","regExp","RegExp","valueFromTile","$7e1da70263e469ef$var$WorkPool","_concurrency","_pool","$exIfG","argList","unshift","exec","_fn","_cfn","ms","timer","$041139e224bfcfad$var$SingleAssetSource","_asset","timeout","$d89decebabfcc15e$var$DynamicAsset","markDirty","$eyQFW","$9eJDl","$2uuGq","$67b86e256734db6e$var$debug","$67b86e256734db6e$var$State","IDLE","START","MARK","END","$67b86e256734db6e$var$defaultOptions","previouslyVisibleCacheSize","$67b86e256734db6e$var$nextId","$67b86e256734db6e$var$CancelError","$67b86e256734db6e$var$TextureStoreItem","store","_id","_store","_tile","_changeHandler","source","$67b86e256734db6e$var$TextureStore","_source","_state","_delimCount","_itemMap","_visible","_previouslyVisible","_pinMap","_newVisible","_noLongerVisible","_visibleAgain","_evicted","_unloadTile","clearNotPinned","item","otherTile","_loadTile","pin","unpin","query","pinCount","visible","previouslyVisible","hasAsset","hasTexture","pinned","$a99d19ed639f6ebc$var$LruSet","_elements","evictedElement","defaultsObj","canceled","$iozi5","$bef6c5d7db09d718$var$Layer","_view","_textureStore","_effects","_fixedLevelIndex","_viewChangeHandler","_textureStoreChangeHandler","setEffects","mergeEffects","fixedLevel","setFixedLevel","_selectLevel","pinLevel","tiles","unpinLevel","pinFirstLevel","unpinFirstLevel","sourceObj","$c62e82d490c40b15$var$RenderLoop","_running","_rendering","_requestHandle","_boundLoop","_loop","_renderInvalidHandler","renderOnNextFrame","stop","start","cancelAnimationFrame","requestAnimationFrame","$bqWZD","$ed549b163b1d230d$var$KeyControlMethod","keyCode","parameter","velocity","friction","_keyCode","_parameter","_velocity","_friction","_keydownHandler","_handlePress","_keyupHandler","_handleRelease","_blurHandler","_handleBlur","_dynamics","_pressing","$852fe23eeece1a4d$var$Dynamics","d1","d2","other","update","offsetFromVelocity","reset","velocityAfter","num","dec","nullVelocityTime","velocityEnd","averageVelocity","$8BNHT","$a5ed46dfd02f4481$require$maxFriction","$nc4qC","maxFriction","$a5ed46dfd02f4481$var$defaultOptions","maxFrictionTime","$a5ed46dfd02f4481$var$debug","$a5ed46dfd02f4481$var$DragControlMethod","pointerType","_opts","_startEvent","_lastEvent","_active","_hammer","on","_handleHammerEvent","_handleStart","_handleMove","_handleEnd","release","isFirst","isFinal","preventDefault","_updateDynamicsMove","_updateDynamicsRelease","deltaX","deltaY","eventToSubtract","elementRect","getBoundingClientRect","$a5ed46dfd02f4481$var$tmpReleaseFriction","velocityX","velocityY","$bTkIC","$6448562f3462d0fe$var$nextId","$6448562f3462d0fe$var$idProperty","$6448562f3462d0fe$var$getKeyForElementAndType","$6448562f3462d0fe$var$HammerGestures","_managers","_refCount","$6448562f3462d0fe$var$HammerGesturesHandle","hammerGestures","manager","_manager","_type","_hammerGestures","_eventHandlers","_createManager","Manager","Pan","direction","DIRECTION_ALL","threshold","pointers","msie","parseFloat","Pinch","_releaseHandle","events","handler","handlerFilteredEvents","eventHandler","off","window1","document1","exportName","VENDOR_PREFIXES","TEST_ELEMENT","TYPE_FUNCTION","setTimeoutContext","bindFn","invokeArrayArg","isArray","each","iterator","dest","merge","inherit","child","base","properties","childP","baseP","_super","boolOrFn","addEventListeners","types","splitStr","removeEventListeners","hasParent","node","inStr","trim","inArray","findByKey","toArray","uniqueArray","results","values","prefixed","camelProp","_uniqueId","getWindowForElement","doc","ownerDocument","defaultView","parentWindow","SUPPORT_TOUCH","SUPPORT_POINTER_EVENTS","SUPPORT_ONLY_TOUCH","MOBILE_REGEX","userAgent","INPUT_TYPE_TOUCH","INPUT_TYPE_MOUSE","PROPS_XY","PROPS_CLIENT_XY","Input","inputTarget","domHandler","ev","inputHandler","eventType","input","session","pointersLength","firstInput","firstMultiple","offsetCenter","prevDelta","prevInput","pointersLen","changedPointersLen","changedPointers","INPUT_END","simpleCloneInputData","getCenter","timeStamp","deltaTime","getAngle","distance","getDistance","offsetDelta","offsetDirection","getDirection","end","computeIntervalInputData","last","lastInterval","srcEvent","recognize","clientX","clientY","p2","props","evEl","evTarget","evWin","MOUSE_INPUT_MAP","mousedown","mousemove","mouseup","MouseInput","allow","pressed","button","which","POINTER_INPUT_MAP","pointerdown","pointermove","pointerup","pointercancel","pointerout","IE10_POINTER_TYPE_ENUM","POINTER_ELEMENT_EVENTS","POINTER_WINDOW_EVENTS","PointerEventInput","MSPointerEvent","removePointer","isTouch","storeIndex","pointerId","SINGLE_TOUCH_INPUT_MAP","touchstart","touchmove","touchend","touchcancel","SingleTouchInput","started","normalizeSingleTouches","all","touches","changed","changedTouches","TOUCH_INPUT_MAP","TouchInput","targetIds","getTouches","allTouches","INPUT_START","identifier","targetTouches","changedTargetTouches","touch","TouchMouseInput","mouse","inputEvent","inputData","isMouse","PREFIXED_TOUCH_ACTION","NATIVE_TOUCH_ACTION","TOUCH_ACTION_COMPUTE","TOUCH_ACTION_AUTO","TOUCH_ACTION_MANIPULATION","TOUCH_ACTION_NONE","TOUCH_ACTION_PAN_X","TOUCH_ACTION_PAN_Y","TouchAction","Recognizer","val1","state","simultaneous","requireFail","directionStr","getRecognizerByNameIfManager","otherRecognizer","recognizer","AttrRecognizer","PanRecognizer","pX","pY","PinchRecognizer","PressRecognizer","_timer","_input","RotateRecognizer","SwipeRecognizer","TapRecognizer","pTime","pCenter","Hammer","val2","recognizers","preset","inputClass","handlers","touchAction","toggleCssProps","recognizeWith","requireFailure","cssProps","compute","actions","getTouchAction","cleanTouchActions","hasPanX","hasPanY","preventDefaults","prevented","hasNone","DIRECTION_LEFT","DIRECTION_UP","preventSrc","dropRecognizeWith","dropRequireFailure","hasRequireFailures","canRecognizeWith","withState","event","tryEmit","canEmit","STATE_FAILED","inputDataClone","STATE_RECOGNIZED","process","STATE_BEGAN","attrTest","optionPointers","isRecognized","isValid","DIRECTION_HORIZONTAL","directionTest","hasMoved","inOut","time","validPointers","validMovement","validTime","taps","interval","posThreshold","validTouchTime","failTimeout","validInterval","validMultiTap","tapCount","VERSION","domEvents","userSelect","touchSelect","touchCallout","contentZooming","userDrag","tapHighlightColor","force","stopped","curRecognizer","existing","data","gestureEvent","createEvent","initEvent","gesture","dispatchEvent","INPUT_MOVE","INPUT_CANCEL","STATE_POSSIBLE","STATE_CHANGED","STATE_ENDED","STATE_CANCELLED","DIRECTION_NONE","DIRECTION_RIGHT","DIRECTION_DOWN","DIRECTION_VERTICAL","Tap","Swipe","Rotate","Press","define","amd","$045b83082a3bcfd4$var$changeVectorNorm","theta","pow","changeVectorNorm","$ecae663044f8fa73$require$maxFriction","$ecae663044f8fa73$var$defaultOptions","speed","$ecae663044f8fa73$var$QtvrControlMethod","_updateDynamics","$ecae663044f8fa73$var$tmpReleaseFriction","maxDim","$7ATuC","$b5f4e3da61565ba3$var$defaultOptions","frictionTime","zoomDelta","$b5f4e3da61565ba3$var$ScrollZoomControlMethod","_eventList","withSmoothing","withoutSmoothing","_wheelListener","$b5f4e3da61565ba3$var$wheelEventDelta","multiplier","deltaMode","zoomChangeFromEvent","$5876f0ebe6370ef5$var$eventName","$5876f0ebe6370ef5$var$WheelListener","elem","useCapture","eventName","$5876f0ebe6370ef5$var$getEventName","_fun","_elem","originalEvent","srcElement","deltaZ","wheelDelta","wheelDeltaX","onmousewheel","$19a783f2820e6203$var$PinchZoomControlMethod","_handleEvent","$e1ff1729d3bd9a06$var$VelocityControlMethod","setVelocity","setFriction","$81979d1588a0081d$var$ElementPressControlMethod","_pressHandler","_releaseHandler","$gSThV","$05294ba8e72eb558$var$debug","$05294ba8e72eb558$var$Controls","_methods","_methodGroups","_composer","_enabled","enabled","_activeCount","updatedViews_","_attachedRenderLoop","detach","methods","method","registerMethod","instance","active","activeHandler","_handleActive","inactiveHandler","_handleInactive","enableMethod","unregisterMethod","disableMethod","_incrementActiveCount","_listen","_updateComposer","_decrementActiveCount","_unlisten","addMethodGroup","groupId","methodIds","removeMethodGroup","methodGroups","enableMethodGroup","methodId","disableMethodGroup","disable","attach","renderLoop","_beforeRenderHandler","_updateViewsWithControls","attached","_checkActiveCount","composer","controlData","offsets","changing","layers","$c4ac938ec0efcd4f$var$ControlComposer","_parameters","_now","nowForTesting","_composedOffsets","_composeReturn","dynamics","parameterDynamicsHandler","_indexOfInstance","instances","storedDynamics","parameterDynamics","newTime","_resetComposedOffsets","methodDynamics","currentVelocity","$h0UOQ","$rtmgR","$9kjMi","$460G7","$jgcBG","$kgURn","$lUg8r","$1dJzJ","$9aEkC","$kjZKr","$ecbddfc8b3d27744$require$setOverflowHidden","$ecbddfc8b3d27744$require$setAbsolute","$ecbddfc8b3d27744$require$setFullSize","$ecbddfc8b3d27744$require$setBlocking","$28mhx","$ecbddfc8b3d27744$var$stageMap","webgl","$ecbddfc8b3d27744$var$stagePrefList","$ecbddfc8b3d27744$var$Viewer","stageType","Stage","_controlContainer","controlCapture","updateSize","_updateSizeListener","_renderLoop","_controls","_controlMethods","_hammerManagerTouch","_hammerManagerMouse","_dragCursor","cursors","drag","_scenes","_currentScene","_replacedScene","_cancelCurrentTween","_layerChangeHandler","_updateSceneLayers","_idleTimer","_resetIdleTimerHandler","_resetIdleTimer","_triggerIdleTimerHandler","_triggerIdleTimer","_stopMovementHandler","stopMovement","_idleMovement","$ecbddfc8b3d27744$var$defaultTransitionUpdate","newScene","oldScene","_hotspotContainer","methodName","_removeSceneEventListeners","destroyScene","createScene","scene","createEmptyScene","textureStoreOpts","layerOpts","currentScene","replacedScene","oldLayers","newLayers","_removeLayerFromStage","_addLayerToStage","_addSceneEventListeners","destroyAllScenes","hasScene","listScenes","lookTo","startMovement","movement","setIdleMovement","setDuration","breakIdleMovement","idleMovement","switchScene","oldSceneLayers","newSceneLayers","stageLayers","duration","transitionDuration","transitionUpdate","$gouN9","$8U6hQ","$a3AC3","$6ca552c9bda8c935$var$Scene","viewer","_viewer","_movement","_movementStartTime","_movementStep","_movementParams","_movementCallback","_updateMovementHandler","_updateMovement","_updateHotspotContainerHandler","_updateHotspotContainer","destroyAllLayers","hotspotContainer","switchTo","ease","controlsInterrupt","shortest","initialParams","finalParams","reenableControls","finalUpdate","delta","param","step","show","hide","$028gl","$emB94","$eC4zG","$752695bb2a9c28d8$require$setAbsolute","$752695bb2a9c28d8$require$setOverflowHidden","$752695bb2a9c28d8$require$setOverflowVisible","$752695bb2a9c28d8$require$setNullSize","$752695bb2a9c28d8$require$setPixelSize","$752695bb2a9c28d8$var$setPointerEvents","$752695bb2a9c28d8$var$HotspotContainer","parentDomElement","_parentDomElement","_hotspots","_rect","_visibilityOrRectChanged","_stageWidth","_stageHeight","_hotspotContainerWrapper","_updateHandler","destroyHotspot","setRect","warn","createHotspot","hotspot","hasHotspot","listHotspots","wrapper","tmpRect","display","$006698c92bcc7dff$require$setTransform","$006698c92bcc7dff$var$Hotspot","_coords","_perspective","setPosition","setPerspective","_position","isVisible","_setEmbeddedPosition","_setPosition","$aa3829baedec433a$require$setTransform","$aa3829baedec433a$require$setPixelPosition","$a74fef1002bdcb47$var$supported","hasCssProperty","isOldIE","cssText","$2fb83fa82b12c3d0$var$defaultOptions","$2fb83fa82b12c3d0$var$Timer","_duration","_startTime","_handle","_check","_setup","_teardown","$0e3a5ba42d387393$var$defaultOpts","inactive","disabled","$0e3a5ba42d387393$var$ControlCursor","_attached","_setActiveCursor","_setCursor","_setInactiveCursor","_setDisabledCursor","_setOriginalCursor","cursor","_updateAttachmentHandler","_updateAttachment","_detachFromControlMethod","_attachToControlMethod","controlMethod","$efdW7","$kjQCu","$fCy8Y","$2cyzb","$kniT1","$6ad4553db4969957$var$defaultOptions","controlMethods","mouseViewDrag","mouseViewQtvr","touchView","pinch","leftArrowKey","rightArrowKey","upArrowKey","downArrowKey","plusKey","minusKey","wKey","aKey","sKey","dKey","qKey","eKey","controlMethodGroups","arrowKeys","plusMinusKeys","wasdKeys","qeKeys","enabledControls","methodGroup","cancelled","startTime","runUpdate","tweenVal","$deebb28bbaed009d$require$vec4","$deebb28bbaed009d$require$mat4","$deebb28bbaed009d$var$applyToPixel","pixel","effect","$deebb28bbaed009d$var$tmpPixel","resultArg","applyToPixel","applyToImageData","imageData","$a7b71372e62ccc29$var$defaultOptions","yawSpeed","pitchSpeed","fovSpeed","yawAccel","pitchAccel","fovAccel","targetPitch","targetFov","timeDelta","yawDelta","pitchDelta","fovDelta","lastYawSpeed","lastPitchSpeed","lastFovSpeed","currentYawSpeed","currentPitchSpeed","currentFovSpeed","pitchThresh","fovThresh","deg","$b4841b6800dd1e2b$export$185802fd694ee1f5","$b4841b6800dd1e2b$export$9cd59f9826255e47","$b4841b6800dd1e2b$export$784d13d8ee351f07","$b4841b6800dd1e2b$export$f0954fd7d5368655","$b4841b6800dd1e2b$export$a82be99ed2a44a7d","$b4841b6800dd1e2b$export$adaa4cf7ef1b65be","$b4841b6800dd1e2b$export$9cb09a71b7d66923","$b4841b6800dd1e2b$export$6897c284b6f9f4dc","$b4841b6800dd1e2b$export$33f3c024b4ae00a1","$b4841b6800dd1e2b$export$a04698f914c55ed9","$b4841b6800dd1e2b$export$2060d2db72cce88f","$b4841b6800dd1e2b$export$bb628a54ab399bc9","$b4841b6800dd1e2b$export$dcdf75081b88279d","$b4841b6800dd1e2b$export$926fc125ff3c666c","$b4841b6800dd1e2b$export$832ca188ffb1955d","$b4841b6800dd1e2b$export$42d51816ce590c93","$b4841b6800dd1e2b$export$326827e8268e9cdb","$b4841b6800dd1e2b$export$c7126d0da24b9100","$b4841b6800dd1e2b$export$e16d8520af44a096","$b4841b6800dd1e2b$export$4e2d2ead65e5f7e3","$b4841b6800dd1e2b$export$f2599a5cf1109d8","$b4841b6800dd1e2b$export$e9bab7fafb253603","$b4841b6800dd1e2b$export$c697bed75648cdb7","$b4841b6800dd1e2b$export$553579f63bdd7137","$b4841b6800dd1e2b$export$6e3a27864ab166fe","$b4841b6800dd1e2b$export$f93b5905241a7cca","v0","L","U","$f0a0d1a73421ff92$export$185802fd694ee1f5","$f0a0d1a73421ff92$export$9cd59f9826255e47","$f0a0d1a73421ff92$export$784d13d8ee351f07","$f0a0d1a73421ff92$export$f0954fd7d5368655","$f0a0d1a73421ff92$export$a82be99ed2a44a7d","$f0a0d1a73421ff92$export$adaa4cf7ef1b65be","$f0a0d1a73421ff92$export$6897c284b6f9f4dc","$f0a0d1a73421ff92$export$a04698f914c55ed9","$f0a0d1a73421ff92$export$2060d2db72cce88f","$f0a0d1a73421ff92$export$bb628a54ab399bc9","$f0a0d1a73421ff92$export$dcdf75081b88279d","$f0a0d1a73421ff92$export$d73ee8ef04f5226a","$f0a0d1a73421ff92$export$926fc125ff3c666c","$f0a0d1a73421ff92$export$832ca188ffb1955d","$f0a0d1a73421ff92$export$bc9e79e74e9fddf6","$f0a0d1a73421ff92$export$42d51816ce590c93","$f0a0d1a73421ff92$export$326827e8268e9cdb","$f0a0d1a73421ff92$export$e16d8520af44a096","$f0a0d1a73421ff92$export$4e2d2ead65e5f7e3","$f0a0d1a73421ff92$export$c697bed75648cdb7","$f0a0d1a73421ff92$export$553579f63bdd7137","$f0a0d1a73421ff92$export$f2599a5cf1109d8","$f0a0d1a73421ff92$export$e9bab7fafb253603","$f0a0d1a73421ff92$export$6e3a27864ab166fe","$f0a0d1a73421ff92$export$f93b5905241a7cca","tx","ty","aa","ab","ac","ad","atx","aty","$4748df579585fbcb$export$185802fd694ee1f5","$4748df579585fbcb$export$b4ad467060d346fe","$4748df579585fbcb$export$9cd59f9826255e47","$4748df579585fbcb$export$784d13d8ee351f07","$4748df579585fbcb$export$a82be99ed2a44a7d","$4748df579585fbcb$export$adaa4cf7ef1b65be","$4748df579585fbcb$export$f0954fd7d5368655","$4748df579585fbcb$export$9cb09a71b7d66923","$4748df579585fbcb$export$6897c284b6f9f4dc","$4748df579585fbcb$export$33f3c024b4ae00a1","$4748df579585fbcb$export$a04698f914c55ed9","$4748df579585fbcb$export$2060d2db72cce88f","$4748df579585fbcb$export$d73ee8ef04f5226a","$4748df579585fbcb$export$bb628a54ab399bc9","$4748df579585fbcb$export$dcdf75081b88279d","$4748df579585fbcb$export$bc9e79e74e9fddf6","$4748df579585fbcb$export$926fc125ff3c666c","$4748df579585fbcb$export$832ca188ffb1955d","$4748df579585fbcb$export$68f5977575fae9bf","$4748df579585fbcb$export$2ff2bbe382249af7","$4748df579585fbcb$export$966b25ab6dc1b1f9","$4748df579585fbcb$export$b74061472fe7c07","$4748df579585fbcb$export$42d51816ce590c93","$4748df579585fbcb$export$326827e8268e9cdb","$4748df579585fbcb$export$e16d8520af44a096","$4748df579585fbcb$export$4e2d2ead65e5f7e3","$4748df579585fbcb$export$c697bed75648cdb7","$4748df579585fbcb$export$553579f63bdd7137","$4748df579585fbcb$export$f2599a5cf1109d8","$4748df579585fbcb$export$e9bab7fafb253603","$4748df579585fbcb$export$6e3a27864ab166fe","$4748df579585fbcb$export$f93b5905241a7cca","$b05eccd75d26bd5a$export$185802fd694ee1f5","$b05eccd75d26bd5a$export$f0954fd7d5368655","$b05eccd75d26bd5a$export$4286ddefc8f49512","$b05eccd75d26bd5a$export$3f70be5e7d7dc51","$b05eccd75d26bd5a$export$b363da9ded343252","$b05eccd75d26bd5a$export$94132a0e348806d4","$b05eccd75d26bd5a$export$2060d2db72cce88f","$b05eccd75d26bd5a$export$a59c8716592e09af","$b05eccd75d26bd5a$export$cf71e4d4ca4d1cfd","$b05eccd75d26bd5a$export$ea6eae3365de5b9c","$b05eccd75d26bd5a$export$fb72b72e8d764d4e","$b05eccd75d26bd5a$export$b310ec824aaee37f","$b05eccd75d26bd5a$export$876cb1b29620556f","$b05eccd75d26bd5a$export$9c297f60e22e3389","$b05eccd75d26bd5a$export$dcdf75081b88279d","$b05eccd75d26bd5a$export$1544d9bc2995de08","$b05eccd75d26bd5a$export$4385e60b38654f68","$b05eccd75d26bd5a$export$6897c284b6f9f4dc","$b05eccd75d26bd5a$export$7679f47e72c62560","$b05eccd75d26bd5a$export$272a1eb8e5a4b55b","$b05eccd75d26bd5a$export$7a404a587ea85af","$b05eccd75d26bd5a$export$42d51816ce590c93","$b05eccd75d26bd5a$export$9cd59f9826255e47","$b05eccd75d26bd5a$export$a82be99ed2a44a7d","$b05eccd75d26bd5a$export$784d13d8ee351f07","$b05eccd75d26bd5a$export$adaa4cf7ef1b65be","$b05eccd75d26bd5a$export$e16d8520af44a096","$b05eccd75d26bd5a$export$6e3a27864ab166fe","$b05eccd75d26bd5a$export$3a89f8d6f6bf6c9f","$b05eccd75d26bd5a$export$f24224f1c91d8156","$b05eccd75d26bd5a$export$fc1400facf92c78","$b05eccd75d26bd5a$export$ab44e1323ffc8376","$b05eccd75d26bd5a$export$99d8dd3f32a3435","$b05eccd75d26bd5a$export$a3295358bff77e","$b05eccd75d26bd5a$export$f2599a5cf1109d8","$b05eccd75d26bd5a$export$e9bab7fafb253603","$b05eccd75d26bd5a$export$72d66f5842c00904","$b05eccd75d26bd5a$export$699b0866ca50f6cb","$b05eccd75d26bd5a$export$937ca0a544b2d712","tmpvec3","xUnitVec3","yUnitVec3","temp1","temp2","matr","$67rGA","out_axis","dotproduct","et","exp","omega","cosom","sinom","scale0","scale1","u1","u2","u3","sqrt1MinusU1","sqrtU1","invDot","fRoot","fTrace","halfToRad","cx","cy","cz","clone","lerp","squaredLength","normalize","exactEquals","cross","$5ee8aaf15329a338$export$185802fd694ee1f5","$5ee8aaf15329a338$export$9cd59f9826255e47","$5ee8aaf15329a338$export$a82be99ed2a44a7d","$5ee8aaf15329a338$export$31d4759777f5e259","$5ee8aaf15329a338$export$9545ac307f2a256b","$5ee8aaf15329a338$export$bc9e79e74e9fddf6","$5ee8aaf15329a338$export$926fc125ff3c666c","$5ee8aaf15329a338$export$b4ad467060d346fe","$5ee8aaf15329a338$export$784d13d8ee351f07","$5ee8aaf15329a338$export$f0954fd7d5368655","$5ee8aaf15329a338$export$adaa4cf7ef1b65be","$5ee8aaf15329a338$export$850568f5e3cdb212","$5ee8aaf15329a338$export$6b62e6fd886a6462","$5ee8aaf15329a338$export$611329ee5753c868","$5ee8aaf15329a338$export$c5d0e0cf08580c3f","$5ee8aaf15329a338$export$202e99f82f7f0395","$5ee8aaf15329a338$export$d73ee8ef04f5226a","$5ee8aaf15329a338$export$a59c8716592e09af","$5ee8aaf15329a338$export$cf71e4d4ca4d1cfd","$5ee8aaf15329a338$export$ea6eae3365de5b9c","$5ee8aaf15329a338$export$7da74d4771545cc5","$5ee8aaf15329a338$export$82e307635ffa6e66","$5ee8aaf15329a338$export$1b0030ab84d46e01","$5ee8aaf15329a338$export$e16d8520af44a096","$5ee8aaf15329a338$export$2060d2db72cce88f","$5ee8aaf15329a338$export$6e3a27864ab166fe","$5ee8aaf15329a338$export$dcdf75081b88279d","$5ee8aaf15329a338$export$94132a0e348806d4","$5ee8aaf15329a338$export$3a89f8d6f6bf6c9f","$5ee8aaf15329a338$export$6897c284b6f9f4dc","$5ee8aaf15329a338$export$ab44e1323ffc8376","$5ee8aaf15329a338$export$7679f47e72c62560","$5ee8aaf15329a338$export$f24224f1c91d8156","$5ee8aaf15329a338$export$fc1400facf92c78","$5ee8aaf15329a338$export$99d8dd3f32a3435","$5ee8aaf15329a338$export$a3295358bff77e","$5ee8aaf15329a338$export$42d51816ce590c93","$5ee8aaf15329a338$export$f2599a5cf1109d8","$5ee8aaf15329a338$export$e9bab7fafb253603","$f8Ox0","dq","w1","outer","getRotation","getTranslation","ax1","ay1","az1","aw1","bx1","by1","bz1","ax2","ay2","az2","aw2","axisLength","ax0","ay0","az0","aw0","bw1","bx0","by0","bz0","bw0","mt","sqlen","a_dot_b"],"version":3,"file":"index.e9cecaf3.js.map"}