@vcmap/ui 5.0.0-rc.18 → 5.0.0-rc.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/build/build.js +2 -2
- package/build/buildCesium.js +3 -3
- package/build/buildHelpers.js +2 -1
- package/config/base.config.json +0 -4
- package/config/dev.config.json +35 -14
- package/config/www.config.json +4 -0
- package/dist/assets/cesium/Workers/ArcType-ce2e50ab.js +37 -0
- package/dist/assets/cesium/Workers/AttributeCompression-b646d393.js +716 -0
- package/dist/assets/cesium/Workers/AxisAlignedBoundingBox-ff186ccc.js +258 -0
- package/dist/assets/cesium/Workers/BoundingRectangle-be5924f4.js +369 -0
- package/dist/assets/cesium/Workers/BoxGeometry-12eeccaf.js +884 -0
- package/dist/assets/cesium/Workers/Check-666ab1a0.js +290 -0
- package/dist/assets/cesium/Workers/Color-a84038cb.js +2262 -0
- package/dist/assets/cesium/Workers/ComponentDatatype-f7b11d02.js +341 -0
- package/dist/assets/cesium/Workers/CoplanarPolygonGeometryLibrary-3272c1b3.js +132 -0
- package/dist/assets/cesium/Workers/CorridorGeometryLibrary-0170e093.js +498 -0
- package/dist/assets/cesium/Workers/CylinderGeometry-7c5da648.js +467 -0
- package/dist/assets/cesium/Workers/CylinderGeometryLibrary-372c07d8.js +63 -0
- package/dist/assets/cesium/Workers/EllipseGeometry-797d580e.js +1304 -0
- package/dist/assets/cesium/Workers/EllipseGeometryLibrary-2939e1dc.js +366 -0
- package/dist/assets/cesium/Workers/EllipseOutlineGeometry-8b50870f.js +443 -0
- package/dist/assets/cesium/Workers/EllipsoidGeodesic-98c62a56.js +520 -0
- package/dist/assets/cesium/Workers/EllipsoidGeometry-21c0e3a5.js +637 -0
- package/dist/assets/cesium/Workers/EllipsoidOutlineGeometry-eff247c8.js +454 -0
- package/dist/assets/cesium/Workers/EllipsoidRhumbLine-19756602.js +741 -0
- package/dist/assets/cesium/Workers/EllipsoidTangentPlane-214683dc.js +373 -0
- package/dist/assets/cesium/Workers/EncodedCartesian3-81f70735.js +171 -0
- package/dist/assets/cesium/Workers/FrustumGeometry-ac42a6d9.js +2512 -0
- package/dist/assets/cesium/Workers/GeometryAttribute-7d6f1732.js +619 -0
- package/dist/assets/cesium/Workers/GeometryAttributes-f06a2792.js +91 -0
- package/dist/assets/cesium/Workers/GeometryInstance-451dc1cd.js +121 -0
- package/dist/assets/cesium/Workers/GeometryOffsetAttribute-04332ce7.js +16 -0
- package/dist/assets/cesium/Workers/GeometryPipeline-ce4339ed.js +3690 -0
- package/dist/assets/cesium/Workers/IndexDatatype-a55ceaa1.js +200 -0
- package/dist/assets/cesium/Workers/IntersectionTests-f6e6bd8a.js +1836 -0
- package/dist/assets/cesium/Workers/Math-2dbd6b93.js +1330 -0
- package/dist/assets/cesium/Workers/Matrix2-13178034.js +7086 -0
- package/dist/assets/cesium/Workers/Matrix3-315394f6.js +4283 -0
- package/dist/assets/cesium/Workers/OrientedBoundingBox-04920dc7.js +1257 -0
- package/dist/assets/cesium/Workers/Plane-900aa728.js +309 -0
- package/dist/assets/cesium/Workers/PolygonGeometryLibrary-a8680d96.js +1074 -0
- package/dist/assets/cesium/Workers/PolygonPipeline-844aab0a.js +1345 -0
- package/dist/assets/cesium/Workers/PolylinePipeline-32f36d2a.js +573 -0
- package/dist/assets/cesium/Workers/PolylineVolumeGeometryLibrary-a510d657.js +781 -0
- package/dist/assets/cesium/Workers/PrimitivePipeline-ba38434a.js +966 -0
- package/dist/assets/cesium/Workers/RectangleGeometryLibrary-bdba697e.js +280 -0
- package/dist/assets/cesium/Workers/RuntimeError-06c93819.js +68 -0
- package/dist/assets/cesium/Workers/TerrainEncoding-833187da.js +1227 -0
- package/dist/assets/cesium/Workers/Transforms-40229881.js +14696 -0
- package/dist/assets/cesium/Workers/VertexFormat-6b480673.js +312 -0
- package/dist/assets/cesium/Workers/WallGeometryLibrary-919eed92.js +211 -0
- package/dist/assets/cesium/Workers/WebGLConstants-a8cc3e8c.js +620 -0
- package/dist/assets/cesium/Workers/WebMercatorProjection-13a90d41.js +151 -0
- package/dist/assets/cesium/Workers/arrayRemoveDuplicates-c2038105.js +129 -0
- package/dist/assets/cesium/Workers/cesiumWorkerBootstrapper.js +1336 -4
- package/dist/assets/cesium/Workers/combine-ca22a614.js +82 -0
- package/dist/assets/cesium/Workers/combineGeometry.js +17 -25
- package/dist/assets/cesium/Workers/createBoxGeometry.js +12 -25
- package/dist/assets/cesium/Workers/createBoxOutlineGeometry.js +313 -25
- package/dist/assets/cesium/Workers/createCircleGeometry.js +213 -25
- package/dist/assets/cesium/Workers/createCircleOutlineGeometry.js +160 -25
- package/dist/assets/cesium/Workers/createCoplanarPolygonGeometry.js +586 -25
- package/dist/assets/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +236 -25
- package/dist/assets/cesium/Workers/createCorridorGeometry.js +1407 -25
- package/dist/assets/cesium/Workers/createCorridorOutlineGeometry.js +603 -25
- package/dist/assets/cesium/Workers/createCylinderGeometry.js +12 -25
- package/dist/assets/cesium/Workers/createCylinderOutlineGeometry.js +265 -25
- package/dist/assets/cesium/Workers/createEllipseGeometry.js +14 -25
- package/dist/assets/cesium/Workers/createEllipseOutlineGeometry.js +14 -25
- package/dist/assets/cesium/Workers/createEllipsoidGeometry.js +12 -25
- package/dist/assets/cesium/Workers/createEllipsoidOutlineGeometry.js +15 -25
- package/dist/assets/cesium/Workers/createFrustumGeometry.js +12 -25
- package/dist/assets/cesium/Workers/createFrustumOutlineGeometry.js +251 -25
- package/dist/assets/cesium/Workers/createGeometry.js +55 -25
- package/dist/assets/cesium/Workers/createGroundPolylineGeometry.js +2134 -25
- package/dist/assets/cesium/Workers/createPlaneGeometry.js +250 -25
- package/dist/assets/cesium/Workers/createPlaneOutlineGeometry.js +115 -25
- package/dist/assets/cesium/Workers/createPolygonGeometry.js +1420 -25
- package/dist/assets/cesium/Workers/createPolygonOutlineGeometry.js +683 -25
- package/dist/assets/cesium/Workers/createPolylineGeometry.js +571 -25
- package/dist/assets/cesium/Workers/createPolylineVolumeGeometry.js +411 -25
- package/dist/assets/cesium/Workers/createPolylineVolumeOutlineGeometry.js +301 -25
- package/dist/assets/cesium/Workers/createRectangleGeometry.js +1476 -25
- package/dist/assets/cesium/Workers/createRectangleOutlineGeometry.js +535 -25
- package/dist/assets/cesium/Workers/createSimplePolylineGeometry.js +458 -25
- package/dist/assets/cesium/Workers/createSphereGeometry.js +123 -25
- package/dist/assets/cesium/Workers/createSphereOutlineGeometry.js +126 -25
- package/dist/assets/cesium/Workers/createTaskProcessorWorker.js +127 -25
- package/dist/assets/cesium/Workers/createVectorTileClampedPolylines.js +535 -25
- package/dist/assets/cesium/Workers/createVectorTileGeometries.js +445 -25
- package/dist/assets/cesium/Workers/createVectorTilePoints.js +79 -25
- package/dist/assets/cesium/Workers/createVectorTilePolygons.js +406 -25
- package/dist/assets/cesium/Workers/createVectorTilePolylines.js +254 -25
- package/dist/assets/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +640 -25
- package/dist/assets/cesium/Workers/createVerticesFromHeightmap.js +2711 -27
- package/dist/assets/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +994 -25
- package/dist/assets/cesium/Workers/createWallGeometry.js +623 -25
- package/dist/assets/cesium/Workers/createWallOutlineGeometry.js +432 -25
- package/dist/assets/cesium/Workers/decodeDraco.js +381 -25
- package/dist/assets/cesium/Workers/decodeGoogleEarthEnterprisePacket.js +3687 -25
- package/dist/assets/cesium/Workers/decodeI3S.js +1040 -0
- package/dist/assets/cesium/Workers/defaultValue-0a909f67.js +51 -0
- package/dist/assets/cesium/Workers/package.js +2 -2
- package/dist/assets/cesium/Workers/transcodeKTX2.js +1516 -25
- package/dist/assets/cesium/Workers/transferTypedArrayTest.js +18 -2
- package/dist/assets/cesium/Workers/upsampleQuantizedTerrainMesh.js +1023 -25
- package/dist/assets/{cesium.2f992f.js → cesium.49585c.js} +112161 -108735
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core.cb0408.js → core.59d4d1.js} +1616 -1629
- package/dist/assets/core.js +1 -1
- package/dist/assets/{index.bccdf969.js → index.a3861d4e.js} +1 -1
- package/dist/assets/{ol.5e3fd0.js → ol.c1c512.js} +6992 -6972
- package/dist/assets/ol.js +1 -1
- package/dist/assets/ui.80175f.css +1 -0
- package/dist/assets/{ui.08c48f.js → ui.80175f.js} +6121 -6785
- package/dist/assets/ui.js +1 -1
- package/dist/assets/{vue.228ead.js → vue.a08ab1.js} +0 -0
- package/dist/assets/vue.js +2 -2
- package/dist/assets/{vuetify.0b5039.css → vuetify.efc158.css} +0 -0
- package/dist/assets/{vuetify.0b5039.js → vuetify.efc158.js} +1 -1
- package/dist/assets/vuetify.js +2 -2
- package/dist/index.html +1 -1
- package/index.js +2 -1
- package/lib/cesium.js +1 -1
- package/package.json +3 -4
- package/plugins/{simple-graph → @vcmap/simple-graph}/README.md +1 -1
- package/plugins/{simple-graph → @vcmap/simple-graph}/SimpleGraphComponent.vue +0 -0
- package/plugins/{simple-graph → @vcmap/simple-graph}/index.js +0 -0
- package/plugins/{simple-graph → @vcmap/simple-graph}/package.json +0 -0
- package/plugins/{simple-graph → @vcmap/simple-graph}/simpleGraphView.js +0 -0
- package/plugins/@vcmap-show-case/README.md +20 -0
- package/plugins/{buttonExamples/ButtonExamples.vue → @vcmap-show-case/buttons-example/ButtonsExample.vue} +1 -1
- package/plugins/@vcmap-show-case/buttons-example/README.md +4 -0
- package/plugins/{buttonExamples → @vcmap-show-case/buttons-example}/index.js +16 -8
- package/plugins/@vcmap-show-case/buttons-example/package.json +5 -0
- package/plugins/{categoryTest → @vcmap-show-case/category-tester}/Categories.vue +7 -6
- package/plugins/{categoryTest → @vcmap-show-case/category-tester}/Category.vue +4 -3
- package/plugins/@vcmap-show-case/category-tester/README.md +3 -0
- package/plugins/{categoryTest → @vcmap-show-case/category-tester}/index.js +12 -4
- package/plugins/@vcmap-show-case/category-tester/package.json +5 -0
- package/plugins/@vcmap-show-case/config-editor/README.md +3 -0
- package/plugins/{test → @vcmap-show-case/config-editor}/editor.vue +0 -0
- package/plugins/@vcmap-show-case/config-editor/index.js +47 -0
- package/plugins/@vcmap-show-case/config-editor/package.json +5 -0
- package/plugins/@vcmap-show-case/context-menu-tester/README.md +3 -0
- package/plugins/@vcmap-show-case/context-menu-tester/index.js +33 -0
- package/plugins/@vcmap-show-case/context-menu-tester/package.json +5 -0
- package/plugins/{@vcmap/pluginExample/pluginExampleComponent.vue → @vcmap-show-case/form-inputs-example/FormInputsExample.vue} +14 -13
- package/plugins/@vcmap-show-case/form-inputs-example/README.md +4 -0
- package/plugins/@vcmap-show-case/form-inputs-example/config.json +5 -0
- package/plugins/{@vcmap/pluginExample → @vcmap-show-case/form-inputs-example}/exampleActions.js +1 -1
- package/plugins/{@vcmap/pluginExample → @vcmap-show-case/form-inputs-example}/index.js +23 -22
- package/plugins/@vcmap-show-case/form-inputs-example/package.json +5 -0
- package/plugins/{@vcmap/pluginExample → @vcmap-show-case/form-inputs-example}/validation.js +0 -0
- package/plugins/@vcmap-show-case/icons-example/README.md +5 -0
- package/plugins/@vcmap-show-case/icons-example/allIconsComponent.vue +51 -0
- package/plugins/@vcmap-show-case/icons-example/index.js +44 -0
- package/plugins/@vcmap-show-case/icons-example/package.json +5 -0
- package/plugins/{test/testList.vue → @vcmap-show-case/list-example/ListExample.vue} +1 -1
- package/plugins/@vcmap-show-case/list-example/README.md +3 -0
- package/plugins/@vcmap-show-case/list-example/index.js +44 -0
- package/plugins/@vcmap-show-case/list-example/package.json +5 -0
- package/plugins/@vcmap-show-case/notifier-tester/README.md +3 -0
- package/plugins/{notifier → @vcmap-show-case/notifier-tester}/index.js +11 -6
- package/plugins/{notifier → @vcmap-show-case/notifier-tester}/notifierTester.vue +0 -0
- package/plugins/@vcmap-show-case/notifier-tester/package.json +5 -0
- package/plugins/@vcmap-show-case/textfields-example/README.md +3 -0
- package/plugins/{example/mySuperComponent.vue → @vcmap-show-case/textfields-example/TextfieldsExample.vue} +1 -7
- package/plugins/{example → @vcmap-show-case/textfields-example}/index.js +58 -62
- package/plugins/@vcmap-show-case/textfields-example/package.json +5 -0
- package/plugins/@vcmap-show-case/window-tester/README.md +3 -0
- package/plugins/{test/windowManagerExample.vue → @vcmap-show-case/window-tester/WindowExample.vue} +36 -20
- package/plugins/{test → @vcmap-show-case/window-tester}/emptyComponent.vue +8 -3
- package/plugins/@vcmap-show-case/window-tester/index.js +62 -0
- package/plugins/{test → @vcmap-show-case/window-tester}/myCustomHeader.vue +0 -0
- package/plugins/@vcmap-show-case/window-tester/package.json +5 -0
- package/plugins/{test → @vcmap-show-case/window-tester}/toolbox-data.js +9 -9
- package/plugins/{test/vcsContent.vue → @vcmap-show-case/window-tester/windowExampleContent.vue} +1 -5
- package/plugins/@vcmap-show-case/wizard-example/README.md +3 -0
- package/plugins/{wizardExample → @vcmap-show-case/wizard-example}/index.js +12 -6
- package/plugins/@vcmap-show-case/wizard-example/package.json +5 -0
- package/plugins/@vcmap-show-case/wizard-example/wizardExample.vue +95 -0
- package/plugins/package.json +2 -1
- package/src/actions/actionHelper.js +1 -3
- package/src/actions/stateRefAction.js +0 -10
- package/src/application/VcsApp.vue +42 -23
- package/src/application/VcsMap.vue +9 -0
- package/src/components/buttons/VcsActionButtonList.vue +1 -0
- package/src/components/form-inputs-controls/VcsCheckbox.vue +3 -1
- package/src/components/form-inputs-controls/VcsWizard.vue +17 -20
- package/src/components/form-inputs-controls/VcsWizardStep.vue +160 -0
- package/src/{icons → components/icons}/+all.js +0 -0
- package/src/{icons → components/icons}/2DAreaIcon.vue +0 -0
- package/src/{icons → components/icons}/2DDistanceIcon.vue +0 -0
- package/src/{icons → components/icons}/3DAreaIcon.vue +0 -0
- package/src/{icons → components/icons}/3DDistanceIcon.vue +0 -0
- package/src/{icons → components/icons}/3DHeightIcon.vue +0 -0
- package/src/{icons → components/icons}/AngleIcon.vue +0 -0
- package/src/{icons → components/icons}/AssociationsIcon.vue +0 -0
- package/src/{icons → components/icons}/AxisIcon.vue +0 -0
- package/src/{icons → components/icons}/BoundingBoxIcon.vue +0 -0
- package/src/{icons → components/icons}/CheckboxCheckedIcon.vue +0 -0
- package/src/{icons → components/icons}/CheckboxIcon.vue +0 -0
- package/src/{icons → components/icons}/CheckboxIndeterminateIcon.vue +0 -0
- package/src/{icons → components/icons}/CircleIcon.vue +0 -0
- package/src/{icons → components/icons}/ClippingHorizontalIcon.vue +0 -0
- package/src/{icons → components/icons}/ClippingIcon.vue +0 -0
- package/src/{icons → components/icons}/ClippingVerticalIcon.vue +0 -0
- package/src/{icons → components/icons}/ColorPickerIcon.vue +0 -0
- package/src/{icons → components/icons}/ColorSwatchIcon.vue +0 -0
- package/src/{icons → components/icons}/CommentIcon.vue +0 -0
- package/src/{icons → components/icons}/CompassIcon.vue +0 -0
- package/src/{icons → components/icons}/ComponentsIcon.vue +0 -0
- package/src/{icons → components/icons}/ConeIcon.vue +0 -0
- package/src/{icons → components/icons}/DimensionsHouseIcon.vue +0 -0
- package/src/{icons → components/icons}/EditIcon.vue +0 -0
- package/src/{icons → components/icons}/ElevationProfileIcon.vue +0 -0
- package/src/{icons → components/icons}/ExportAreaIcon.vue +0 -0
- package/src/{icons → components/icons}/ExportFlightIcon.vue +0 -0
- package/src/{icons → components/icons}/ExportIcon.vue +0 -0
- package/src/{icons → components/icons}/ExternalLinkIcon.vue +0 -0
- package/src/{icons → components/icons}/EyeIcon.vue +0 -0
- package/src/{icons → components/icons}/FastForwardIcon.vue +0 -0
- package/src/{icons → components/icons}/FilterIcon.vue +0 -0
- package/src/{icons → components/icons}/GlobalTerrainIcon.vue +0 -0
- package/src/{icons → components/icons}/GlobeNatureIcon.vue +0 -0
- package/src/{icons → components/icons}/GroundIcon.vue +0 -0
- package/src/{icons → components/icons}/HealthCareIndustriesIcon.vue +0 -0
- package/src/{icons → components/icons}/HelpIcon.vue +0 -0
- package/src/{icons → components/icons}/HideIcon.vue +0 -0
- package/src/{icons → components/icons}/HomePointIcon.vue +0 -0
- package/src/{icons → components/icons}/HospitalsIcon.vue +0 -0
- package/src/{icons → components/icons}/HouseIcon.vue +0 -0
- package/src/{icons → components/icons}/ImportIcon.vue +0 -0
- package/src/{icons → components/icons}/InfoIcon.vue +0 -0
- package/src/{icons → components/icons}/KebabIcon.vue +0 -0
- package/src/{icons → components/icons}/LabelIcon.vue +0 -0
- package/src/{icons → components/icons}/LayersIcon.vue +0 -0
- package/src/{icons → components/icons}/LegendIcon.vue +0 -0
- package/src/{icons → components/icons}/LineIcon.vue +0 -0
- package/src/{icons → components/icons}/LinkIcon.vue +0 -0
- package/src/{icons → components/icons}/LogoutIcon.vue +0 -0
- package/src/{icons → components/icons}/MapIcon.vue +0 -0
- package/src/{icons → components/icons}/MenuIcon.vue +0 -0
- package/src/{icons → components/icons}/MinusIcon.vue +0 -0
- package/src/{icons → components/icons}/ObjectAttributeIcon.vue +0 -0
- package/src/{icons → components/icons}/ObjectSelectIcon.vue +0 -0
- package/src/{icons → components/icons}/ObliqueViewIcon.vue +0 -0
- package/src/{icons → components/icons}/PdfIcon.vue +0 -0
- package/src/{icons → components/icons}/PedestrianIcon.vue +0 -0
- package/src/{icons → components/icons}/PenIcon.vue +0 -0
- package/src/{icons → components/icons}/PlayCircleIcon.vue +0 -0
- package/src/{icons → components/icons}/PlusIcon.vue +0 -0
- package/src/{icons → components/icons}/PoiIcon.vue +0 -0
- package/src/{icons → components/icons}/PointSelectIcon.vue +0 -0
- package/src/{icons → components/icons}/PolygonIcon.vue +0 -0
- package/src/{icons → components/icons}/PresentationModeIcon.vue +0 -0
- package/src/{icons → components/icons}/ProgressIcon.vue +0 -0
- package/src/{icons → components/icons}/QueryIcon.vue +0 -0
- package/src/{icons → components/icons}/RectangleIcon.vue +0 -0
- package/src/{icons → components/icons}/ReturnIcon.vue +0 -0
- package/src/{icons → components/icons}/RewindIcon.vue +0 -0
- package/src/{icons → components/icons}/RotateLeftIcon.vue +0 -0
- package/src/{icons → components/icons}/RotateRightIcon.vue +0 -0
- package/src/{icons → components/icons}/ScreenshotIcon.vue +0 -0
- package/src/{icons → components/icons}/SearchIcon.vue +0 -0
- package/src/{icons → components/icons}/ShadowIcon.vue +0 -0
- package/src/{icons → components/icons}/ShapesIcon.vue +0 -0
- package/src/{icons → components/icons}/ShareIcon.vue +0 -0
- package/src/{icons → components/icons}/SimpleCircleFilledIcon.vue +0 -0
- package/src/{icons → components/icons}/SimpleCircleHalfFilledIcon.vue +0 -0
- package/src/{icons → components/icons}/SimpleCircleOutlinedIcon.vue +0 -0
- package/src/{icons → components/icons}/SkipNextIcon.vue +0 -0
- package/src/{icons → components/icons}/SkipPreviousIcon.vue +0 -0
- package/src/{icons → components/icons}/SplitViewIcon.vue +0 -0
- package/src/{icons → components/icons}/TerrainBoxIcon.vue +0 -0
- package/src/{icons → components/icons}/TextStyleIcon.vue +0 -0
- package/src/{icons → components/icons}/ThreeDimensionsIcon.vue +0 -0
- package/src/{icons → components/icons}/ToolsIcon.vue +0 -0
- package/src/{icons → components/icons}/TouchIcon.vue +0 -0
- package/src/{icons → components/icons}/TrashCanIcon.vue +0 -0
- package/src/{icons → components/icons}/TriangleIcon.vue +0 -0
- package/src/{icons → components/icons}/TwoDimensionsIcon.vue +0 -0
- package/src/{icons → components/icons}/UploadIcon.vue +0 -0
- package/src/{icons → components/icons}/UserProfileIcon.vue +0 -0
- package/src/{icons → components/icons}/UserShareIcon.vue +0 -0
- package/src/{icons → components/icons}/VideoRecorderIcon.vue +0 -0
- package/src/{icons → components/icons}/ViewpointFlightIcon.vue +0 -0
- package/src/{icons → components/icons}/ViewpointIcon.vue +0 -0
- package/src/{icons → components/icons}/Viewshed360Icon.vue +0 -0
- package/src/{icons → components/icons}/ViewshedConeIcon.vue +0 -0
- package/src/{icons → components/icons}/ViewshedIcon.vue +0 -0
- package/src/{icons → components/icons}/WalkingIcon.vue +0 -0
- package/src/{icons → components/icons}/WallIcon.vue +0 -0
- package/src/{icons → components/icons}/WandIcon.vue +0 -0
- package/src/components/lists/VcsList.vue +21 -12
- package/src/components/lists/VcsTreeviewLeaf.vue +14 -2
- package/src/components/notification/VcsTooltip.vue +1 -1
- package/src/featureInfo/abstractFeatureInfoView.js +1 -1
- package/src/featureInfo/addressBalloonFeatureInfoView.js +1 -1
- package/src/featureInfo/balloonFeatureInfoView.js +1 -1
- package/src/featureInfo/balloonHelper.js +6 -6
- package/src/featureInfo/featureInfo.js +2 -2
- package/src/i18n/de.js +2 -6
- package/src/i18n/en.js +2 -6
- package/src/legend/legendHelper.js +4 -3
- package/src/legend/vcsLegend.vue +21 -2
- package/src/manager/window/WindowComponent.vue +42 -4
- package/src/manager/window/WindowComponentHeader.vue +1 -1
- package/src/manager/window/windowHelper.js +7 -11
- package/src/manager/window/windowManager.js +15 -11
- package/src/navigation/mapNavCompass.vue +13 -7
- package/src/navigation/mapNavigation.vue +66 -4
- package/src/navigation/orientationToolsButton.vue +1 -1
- package/src/navigation/overviewMap.js +26 -10
- package/src/navigation/vcsCompass.vue +4 -73
- package/src/setup.js +1 -1
- package/src/vuePlugins/vuetify.js +1 -1
- package/dist/assets/cesium/Workers/ArcType-c9b2b290.js +0 -25
- package/dist/assets/cesium/Workers/AttributeCompression-7b0f288d.js +0 -25
- package/dist/assets/cesium/Workers/AxisAlignedBoundingBox-d0c22774.js +0 -25
- package/dist/assets/cesium/Workers/BoundingRectangle-201b1a81.js +0 -25
- package/dist/assets/cesium/Workers/BoxGeometry-4985457c.js +0 -25
- package/dist/assets/cesium/Workers/Color-cc8c18b3.js +0 -25
- package/dist/assets/cesium/Workers/ComponentDatatype-0200bf8c.js +0 -25
- package/dist/assets/cesium/Workers/CoplanarPolygonGeometryLibrary-4345acdf.js +0 -25
- package/dist/assets/cesium/Workers/CorridorGeometryLibrary-850a6c35.js +0 -25
- package/dist/assets/cesium/Workers/CylinderGeometry-57a1051a.js +0 -25
- package/dist/assets/cesium/Workers/CylinderGeometryLibrary-62ce5a1f.js +0 -25
- package/dist/assets/cesium/Workers/EllipseGeometry-8627398f.js +0 -25
- package/dist/assets/cesium/Workers/EllipseGeometryLibrary-e5919563.js +0 -25
- package/dist/assets/cesium/Workers/EllipseOutlineGeometry-96fd4ae1.js +0 -25
- package/dist/assets/cesium/Workers/EllipsoidGeodesic-8bfefbff.js +0 -25
- package/dist/assets/cesium/Workers/EllipsoidGeometry-377329b9.js +0 -25
- package/dist/assets/cesium/Workers/EllipsoidOutlineGeometry-e6e16e49.js +0 -25
- package/dist/assets/cesium/Workers/EllipsoidRhumbLine-03528f73.js +0 -25
- package/dist/assets/cesium/Workers/EllipsoidTangentPlane-c080fd1b.js +0 -25
- package/dist/assets/cesium/Workers/EncodedCartesian3-ea0e408f.js +0 -25
- package/dist/assets/cesium/Workers/FrustumGeometry-a8b5d817.js +0 -25
- package/dist/assets/cesium/Workers/GeometryAttribute-8458a8fd.js +0 -25
- package/dist/assets/cesium/Workers/GeometryAttributes-ac0f8485.js +0 -25
- package/dist/assets/cesium/Workers/GeometryInstance-ee3aa3ba.js +0 -25
- package/dist/assets/cesium/Workers/GeometryOffsetAttribute-08ae0c50.js +0 -25
- package/dist/assets/cesium/Workers/GeometryPipeline-33ca229c.js +0 -25
- package/dist/assets/cesium/Workers/IndexDatatype-e713bfd2.js +0 -25
- package/dist/assets/cesium/Workers/IntersectionTests-eb4db8e0.js +0 -25
- package/dist/assets/cesium/Workers/Matrix2-eefef8eb.js +0 -25
- package/dist/assets/cesium/Workers/OrientedBoundingBox-5193f9a2.js +0 -25
- package/dist/assets/cesium/Workers/Plane-b0299683.js +0 -25
- package/dist/assets/cesium/Workers/PolygonGeometryLibrary-b61295f3.js +0 -25
- package/dist/assets/cesium/Workers/PolygonPipeline-eb527514.js +0 -25
- package/dist/assets/cesium/Workers/PolylinePipeline-0f23dd84.js +0 -25
- package/dist/assets/cesium/Workers/PolylineVolumeGeometryLibrary-2d903430.js +0 -25
- package/dist/assets/cesium/Workers/PrimitivePipeline-e2640413.js +0 -25
- package/dist/assets/cesium/Workers/RectangleGeometryLibrary-ae8bf8a5.js +0 -25
- package/dist/assets/cesium/Workers/RuntimeError-5baf5c66.js +0 -25
- package/dist/assets/cesium/Workers/TerrainEncoding-bc10ab54.js +0 -25
- package/dist/assets/cesium/Workers/Transforms-d2e5867e.js +0 -63
- package/dist/assets/cesium/Workers/VertexFormat-5ec0d9ff.js +0 -25
- package/dist/assets/cesium/Workers/WallGeometryLibrary-1a33e416.js +0 -25
- package/dist/assets/cesium/Workers/WebGLConstants-5b50ced1.js +0 -25
- package/dist/assets/cesium/Workers/WebMercatorProjection-cd2f30c2.js +0 -25
- package/dist/assets/cesium/Workers/_commonjsHelpers-bc29abbc.js +0 -25
- package/dist/assets/cesium/Workers/arrayRemoveDuplicates-f13aceb1.js +0 -25
- package/dist/assets/cesium/Workers/combine-7533016d.js +0 -25
- package/dist/assets/cesium/Workers/defaultValue-0c475b81.js +0 -25
- package/dist/assets/cesium/Workers/package.json +0 -1
- package/dist/assets/ui.08c48f.css +0 -1
- package/plugins/@vcmap/pluginExample/config.json +0 -6
- package/plugins/@vcmap/pluginExample/package.json +0 -7
- package/plugins/categoryTest/ItemEditor.vue +0 -13
- package/plugins/test/allIconsComponent.vue +0 -50
- package/plugins/test/index.js +0 -209
- package/plugins/wizardExample/wizardExample.vue +0 -77
- package/src/components/form-inputs-controls/VcsColorPicker.vue +0 -85
@@ -1,7 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @license
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
4
|
-
* Version 1.
|
4
|
+
* Version 1.101.2
|
5
5
|
*
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
7
7
|
*
|
@@ -23,9 +23,1341 @@
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
24
24
|
*/
|
25
25
|
|
26
|
-
typeof self
|
26
|
+
if (typeof self === "undefined") {
|
27
|
+
self = {};
|
28
|
+
}
|
29
|
+
self.onmessage = function(event) {
|
30
|
+
var data = event.data;
|
31
|
+
require(data.loaderConfig, [data.workerModule], function(workerModule) {
|
32
|
+
self.onmessage = workerModule;
|
33
|
+
self.CESIUM_BASE_URL = data.loaderConfig.baseUrl;
|
34
|
+
});
|
35
|
+
};
|
36
|
+
function setTimeout(fn) {
|
37
|
+
fn();
|
38
|
+
}
|
39
|
+
/** vim: et:ts=4:sw=4:sts=4
|
27
40
|
* @license RequireJS 2.1.20 Copyright (c) 2010-2015, The Dojo Foundation All Rights Reserved.
|
28
41
|
* Available via the MIT or new BSD license.
|
29
42
|
* see: http://github.com/jrburke/requirejs for details
|
30
|
-
*/
|
31
|
-
http://requirejs.org/docs/errors.html#`+r);return d.requireType=r,d.requireModules=u,c&&(d.originalError=c),d}if(typeof define<"u")return;if(typeof requirejs<"u"){if(isFunction(requirejs))return;cfg=requirejs,requirejs=void 0}typeof require<"u"&&!isFunction(require)&&(cfg=require,require=void 0);function newContext(r){var a,c,u,d,q,g={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},v={},B={},I={},O=[],w={},D={},L={},H=1,K=1;function X(e){var i,o;for(i=0;i<e.length;i++)if(o=e[i],o===".")e.splice(i,1),i-=1;else if(o===".."){if(i===0||i===1&&e[2]===".."||e[i-1]==="..")continue;i>0&&(e.splice(i-1,2),i-=2)}}function C(e,i,o){var t,n,f,l,p,h,x,E,m,b,M,A,k=i&&i.split("/"),R=g.map,j=R&&R["*"];if(e&&(e=e.split("/"),x=e.length-1,g.nodeIdCompat&&jsSuffixRegExp.test(e[x])&&(e[x]=e[x].replace(jsSuffixRegExp,"")),e[0].charAt(0)==="."&&k&&(A=k.slice(0,k.length-1),e=A.concat(e)),X(e),e=e.join("/")),o&&R&&(k||j)){f=e.split("/");e:for(l=f.length;l>0;l-=1){if(h=f.slice(0,l).join("/"),k){for(p=k.length;p>0;p-=1)if(n=getOwn(R,k.slice(0,p).join("/")),n&&(n=getOwn(n,h),n)){E=n,m=l;break e}}!b&&j&&getOwn(j,h)&&(b=getOwn(j,h),M=l)}!E&&b&&(E=b,m=M),E&&(f.splice(0,m,E),e=f.join("/"))}return t=getOwn(g.pkgs,e),t||e}function W(e){isBrowser&&each(scripts(),function(i){if(i.getAttribute("data-requiremodule")===e&&i.getAttribute("data-requirecontext")===u.contextName)return i.parentNode.removeChild(i),!0})}function U(e){var i=getOwn(g.paths,e);if(i&&isArray(i)&&i.length>1)return i.shift(),u.require.undef(e),u.makeRequire(null,{skipMap:!0})([e]),!0}function G(e){var i,o=e?e.indexOf("!"):-1;return o>-1&&(i=e.substring(0,o),e=e.substring(o+1,e.length)),[i,e]}function S(e,i,o,t){var n,f,l,p,h=null,x=i?i.name:null,E=e,m=!0,b="";return e||(m=!1,e="_@r"+(H+=1)),p=G(e),h=p[0],e=p[1],h&&(h=C(h,x,t),f=getOwn(w,h)),e&&(h?f&&f.normalize?b=f.normalize(e,function(M){return C(M,x,t)}):b=e.indexOf("!")===-1?C(e,x,t):e:(b=C(e,x,t),p=G(b),h=p[0],b=p[1],o=!0,n=u.nameToUrl(b))),l=h&&!f&&!o?"_unnormalized"+(K+=1):"",{prefix:h,name:b,parentMap:i,unnormalized:!!l,url:n,originalName:E,isDefine:m,id:(h?h+"!"+b:b)+l}}function P(e){var i=e.id,o=getOwn(v,i);return o||(o=v[i]=new u.Module(e)),o}function T(e,i,o){var t=e.id,n=getOwn(v,t);hasProp(w,t)&&(!n||n.defineEmitComplete)?i==="defined"&&o(w[t]):(n=P(e),n.error&&i==="error"?o(n.error):n.on(i,o))}function y(e,i){var o=e.requireModules,t=!1;i?i(e):(each(o,function(n){var f=getOwn(v,n);f&&(f.error=e,f.events.error&&(t=!0,f.emit("error",e)))}),t||req.onError(e))}function Q(){globalDefQueue.length&&(each(globalDefQueue,function(e){var i=e[0];typeof i=="string"&&(u.defQueueMap[i]=!0),O.push(e)}),globalDefQueue=[])}d={require:function(e){return e.require?e.require:e.require=u.makeRequire(e.map)},exports:function(e){if(e.usingExports=!0,e.map.isDefine)return e.exports?w[e.map.id]=e.exports:e.exports=w[e.map.id]={}},module:function(e){return e.module?e.module:e.module={id:e.map.id,uri:e.map.url,config:function(){return getOwn(g.config,e.map.id)||{}},exports:e.exports||(e.exports={})}}};function F(e){delete v[e],delete B[e]}function $(e,i,o){var t=e.map.id;e.error?e.emit("error",e.error):(i[t]=!0,each(e.depMaps,function(n,f){var l=n.id,p=getOwn(v,l);p&&!e.depMatched[f]&&!o[l]&&(getOwn(i,l)?(e.defineDep(f,w[l]),e.check()):$(p,i,o))}),o[t]=!0)}function z(){var e,i,o=g.waitSeconds*1e3,t=o&&u.startTime+o<new Date().getTime(),n=[],f=[],l=!1,p=!0;if(!a){if(a=!0,eachProp(B,function(h){var x=h.map,E=x.id;if(!!h.enabled&&(x.isDefine||f.push(h),!h.error)){if(!h.inited&&t)U(E)?(i=!0,l=!0):(n.push(E),W(E));else if(!h.inited&&h.fetched&&x.isDefine&&(l=!0,!x.prefix))return p=!1}}),t&&n.length)return e=makeError("timeout","Load timeout for modules: "+n,null,n),e.contextName=u.contextName,y(e);p&&each(f,function(h){$(h,{},{})}),(!t||i)&&l&&(isBrowser||isWebWorker)&&!q&&(q=setTimeout(function(){q=0,z()},50)),a=!1}}c=function(e){this.events=getOwn(I,e.id)||{},this.map=e,this.shim=getOwn(g.shim,e.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0},c.prototype={init:function(e,i,o,t){t=t||{},!this.inited&&(this.factory=i,o?this.on("error",o):this.events.error&&(o=bind(this,function(n){this.emit("error",n)})),this.depMaps=e&&e.slice(0),this.errback=o,this.inited=!0,this.ignore=t.ignore,t.enabled||this.enabled?this.enable():this.check())},defineDep:function(e,i){this.depMatched[e]||(this.depMatched[e]=!0,this.depCount-=1,this.depExports[e]=i)},fetch:function(){if(!this.fetched){this.fetched=!0,u.startTime=new Date().getTime();var e=this.map;if(this.shim)u.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],bind(this,function(){return e.prefix?this.callPlugin():this.load()}));else return e.prefix?this.callPlugin():this.load()}},load:function(){var e=this.map.url;D[e]||(D[e]=!0,u.load(this.map.id,e))},check:function(){if(!(!this.enabled||this.enabling)){var e,i,o=this.map.id,t=this.depExports,n=this.exports,f=this.factory;if(!this.inited)hasProp(u.defQueueMap,o)||this.fetch();else if(this.error)this.emit("error",this.error);else if(!this.defining){if(this.defining=!0,this.depCount<1&&!this.defined){if(isFunction(f)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{n=u.execCb(o,f,t,n)}catch(l){e=l}else n=u.execCb(o,f,t,n);if(this.map.isDefine&&n===void 0&&(i=this.module,i?n=i.exports:this.usingExports&&(n=this.exports)),e)return e.requireMap=this.map,e.requireModules=this.map.isDefine?[this.map.id]:null,e.requireType=this.map.isDefine?"define":"require",y(this.error=e)}else n=f;this.exports=n,this.map.isDefine&&!this.ignore&&(w[o]=n,req.onResourceLoad&&req.onResourceLoad(u,this.map,this.depMaps)),F(o),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}},callPlugin:function(){var e=this.map,i=e.id,o=S(e.prefix);this.depMaps.push(o),T(o,"defined",bind(this,function(t){var n,f,l,p=getOwn(L,this.map.id),h=this.map.name,x=this.map.parentMap?this.map.parentMap.name:null,E=u.makeRequire(e.parentMap,{enableBuildCallback:!0});if(this.map.unnormalized){t.normalize&&(h=t.normalize(h,function(m){return C(m,x,!0)})||""),f=S(e.prefix+"!"+h,this.map.parentMap),T(f,"defined",bind(this,function(m){this.init([],function(){return m},null,{enabled:!0,ignore:!0})})),l=getOwn(v,f.id),l&&(this.depMaps.push(f),this.events.error&&l.on("error",bind(this,function(m){this.emit("error",m)})),l.enable());return}if(p){this.map.url=u.nameToUrl(p),this.load();return}n=bind(this,function(m){this.init([],function(){return m},null,{enabled:!0})}),n.error=bind(this,function(m){this.inited=!0,this.error=m,m.requireModules=[i],eachProp(v,function(b){b.map.id.indexOf(i+"_unnormalized")===0&&F(b.map.id)}),y(m)}),n.fromText=bind(this,function(m,b){var M=e.name,A=S(M),k=useInteractive;b&&(m=b),k&&(useInteractive=!1),P(A),hasProp(g.config,i)&&(g.config[M]=g.config[i]);try{req.exec(m)}catch(R){return y(makeError("fromtexteval","fromText eval for "+i+" failed: "+R,R,[i]))}k&&(useInteractive=!0),this.depMaps.push(A),u.completeLoad(M),E([M],n)}),t.load(e.name,E,n,g)})),u.enable(o,this),this.pluginMaps[o.id]=o},enable:function(){B[this.map.id]=this,this.enabled=!0,this.enabling=!0,each(this.depMaps,bind(this,function(e,i){var o,t,n;if(typeof e=="string"){if(e=S(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[i]=e,n=getOwn(d,e.id),n){this.depExports[i]=n(this);return}this.depCount+=1,T(e,"defined",bind(this,function(f){this.undefed||(this.defineDep(i,f),this.check())})),this.errback?T(e,"error",bind(this,this.errback)):this.events.error&&T(e,"error",bind(this,function(f){this.emit("error",f)}))}o=e.id,t=v[o],!hasProp(d,o)&&t&&!t.enabled&&u.enable(e,this)})),eachProp(this.pluginMaps,bind(this,function(e){var i=getOwn(v,e.id);i&&!i.enabled&&u.enable(e,this)})),this.enabling=!1,this.check()},on:function(e,i){var o=this.events[e];o||(o=this.events[e]=[]),o.push(i)},emit:function(e,i){each(this.events[e],function(o){o(i)}),e==="error"&&delete this.events[e]}};function _(e){hasProp(w,e[0])||P(S(e[0],null,!0)).init(e[1],e[2])}function J(e,i,o,t){e.detachEvent&&!isOpera?t&&e.detachEvent(t,i):e.removeEventListener(o,i,!1)}function V(e){var i=e.currentTarget||e.srcElement;return J(i,u.onScriptLoad,"load","onreadystatechange"),J(i,u.onScriptError,"error"),{node:i,id:i&&i.getAttribute("data-requiremodule")}}function Y(){var e;for(Q();O.length;){if(e=O.shift(),e[0]===null)return y(makeError("mismatch","Mismatched anonymous define() module: "+e[e.length-1]));_(e)}u.defQueueMap={}}return u={config:g,contextName:r,registry:v,defined:w,urlFetched:D,defQueue:O,defQueueMap:{},Module:c,makeModuleMap:S,nextTick:req.nextTick,onError:y,configure:function(e){e.baseUrl&&e.baseUrl.charAt(e.baseUrl.length-1)!=="/"&&(e.baseUrl+="/");var i=g.shim,o={paths:!0,bundles:!0,config:!0,map:!0};eachProp(e,function(t,n){o[n]?(g[n]||(g[n]={}),mixin(g[n],t,!0,!0)):g[n]=t}),e.bundles&&eachProp(e.bundles,function(t,n){each(t,function(f){f!==n&&(L[f]=n)})}),e.shim&&(eachProp(e.shim,function(t,n){isArray(t)&&(t={deps:t}),(t.exports||t.init)&&!t.exportsFn&&(t.exportsFn=u.makeShimExports(t)),i[n]=t}),g.shim=i),e.packages&&each(e.packages,function(t){var n,f;t=typeof t=="string"?{name:t}:t,f=t.name,n=t.location,n&&(g.paths[f]=t.location),g.pkgs[f]=t.name+"/"+(t.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}),eachProp(v,function(t,n){!t.inited&&!t.map.unnormalized&&(t.map=S(n,null,!0))}),(e.deps||e.callback)&&u.require(e.deps||[],e.callback)},makeShimExports:function(e){function i(){var o;return e.init&&(o=e.init.apply(global,arguments)),o||e.exports&&getGlobal(e.exports)}return i},makeRequire:function(e,i){i=i||{};function o(t,n,f){var l,p,h;return i.enableBuildCallback&&n&&isFunction(n)&&(n.__requireJsBuild=!0),typeof t=="string"?isFunction(n)?y(makeError("requireargs","Invalid require call"),f):e&&hasProp(d,t)?d[t](v[e.id]):req.get?req.get(u,t,e,o):(p=S(t,e,!1,!0),l=p.id,hasProp(w,l)?w[l]:y(makeError("notloaded",'Module name "'+l+'" has not been loaded yet for context: '+r+(e?"":". Use require([])")))):(Y(),u.nextTick(function(){Y(),h=P(S(null,e)),h.skipMap=i.skipMap,h.init(t,n,f,{enabled:!0}),z()}),o)}return mixin(o,{isBrowser,toUrl:function(t){var n,f=t.lastIndexOf("."),l=t.split("/")[0],p=l==="."||l==="..";return f!==-1&&(!p||f>1)&&(n=t.substring(f,t.length),t=t.substring(0,f)),u.nameToUrl(C(t,e&&e.id,!0),n,!0)},defined:function(t){return hasProp(w,S(t,e,!1,!0).id)},specified:function(t){return t=S(t,e,!1,!0).id,hasProp(w,t)||hasProp(v,t)}}),e||(o.undef=function(t){Q();var n=S(t,e,!0),f=getOwn(v,t);f.undefed=!0,W(t),delete w[t],delete D[n.url],delete I[t],eachReverse(O,function(l,p){l[0]===t&&O.splice(p,1)}),delete u.defQueueMap[t],f&&(f.events.defined&&(I[t]=f.events),F(t))}),o},enable:function(e){var i=getOwn(v,e.id);i&&P(e).enable()},completeLoad:function(e){var i,o,t,n=getOwn(g.shim,e)||{},f=n.exports;for(Q();O.length;){if(o=O.shift(),o[0]===null){if(o[0]=e,i)break;i=!0}else o[0]===e&&(i=!0);_(o)}if(u.defQueueMap={},t=getOwn(v,e),!i&&!hasProp(w,e)&&t&&!t.inited){if(g.enforceDefine&&(!f||!getGlobal(f)))return U(e)?void 0:y(makeError("nodefine","No define call for "+e,null,[e]));_([e,n.deps||[],n.exportsFn])}z()},nameToUrl:function(e,i,o){var t,n,f,l,p,h,x,E=getOwn(g.pkgs,e);if(E&&(e=E),x=getOwn(L,e),x)return u.nameToUrl(x,i,o);if(req.jsExtRegExp.test(e))p=e+(i||"");else{for(t=g.paths,n=e.split("/"),f=n.length;f>0;f-=1)if(l=n.slice(0,f).join("/"),h=getOwn(t,l),h){isArray(h)&&(h=h[0]),n.splice(0,f,h);break}p=n.join("/"),p+=i||(/^data\:|\?/.test(p)||o?"":".js"),p=(p.charAt(0)==="/"||p.match(/^[\w\+\.\-]+:/)?"":g.baseUrl)+p}return g.urlArgs?p+((p.indexOf("?")===-1?"?":"&")+g.urlArgs):p},load:function(e,i){req.load(u,e,i)},execCb:function(e,i,o,t){return i.apply(t,o)},onScriptLoad:function(e){if(e.type==="load"||readyRegExp.test((e.currentTarget||e.srcElement).readyState)){interactiveScript=null;var i=V(e);u.completeLoad(i.id)}},onScriptError:function(e){var i=V(e);if(!U(i.id))return y(makeError("scripterror","Script error for: "+i.id,e,[i.id]))}},u.require=u.makeRequire(),u}req=requirejs=function(r,a,c,u){var d,q,g=defContextName;return!isArray(r)&&typeof r!="string"&&(q=r,isArray(a)?(r=a,a=c,c=u):r=[]),q&&q.context&&(g=q.context),d=getOwn(contexts,g),d||(d=contexts[g]=req.s.newContext(g)),q&&d.configure(q),d.require(r,a,c)},req.config=function(r){return req(r)},req.nextTick=typeof setTimeout<"u"?function(r){setTimeout(r,4)}:function(r){r()},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$/,req.isBrowser=isBrowser,s=req.s={contexts,newContext},req({}),each(["toUrl","undef","defined","specified"],function(r){req[r]=function(){var a=contexts[defContextName];return a.require[r].apply(a,arguments)}}),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],baseElement=document.getElementsByTagName("base")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=defaultOnError,req.createNode=function(r,a,c){var u=r.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");return u.type=r.scriptType||"text/javascript",u.charset="utf-8",u.async=!0,u},req.load=function(r,a,c){var u=r&&r.config||{},d;if(isBrowser)return d=req.createNode(u,a,c),u.onNodeCreated&&u.onNodeCreated(d,u,a,c),d.setAttribute("data-requirecontext",r.contextName),d.setAttribute("data-requiremodule",a),d.attachEvent&&!(d.attachEvent.toString&&d.attachEvent.toString().indexOf("[native code")<0)&&!isOpera?(useInteractive=!0,d.attachEvent("onreadystatechange",r.onScriptLoad)):(d.addEventListener("load",r.onScriptLoad,!1),d.addEventListener("error",r.onScriptError,!1)),d.src=c,currentlyAddingScript=d,baseElement?head.insertBefore(d,baseElement):head.appendChild(d),currentlyAddingScript=null,d;if(isWebWorker)try{importScripts(c),r.completeLoad(a)}catch(q){r.onError(makeError("importscripts","importScripts failed for "+a+" at "+c,q,[a]))}};function getInteractiveScript(){return interactiveScript&&interactiveScript.readyState==="interactive"||eachReverse(scripts(),function(r){if(r.readyState==="interactive")return interactiveScript=r}),interactiveScript}isBrowser&&!cfg.skipDataMain&&eachReverse(scripts(),function(r){if(head||(head=r.parentNode),dataMain=r.getAttribute("data-main"),dataMain)return mainScript=dataMain,cfg.baseUrl||(src=mainScript.split("/"),mainScript=src.pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath),mainScript=mainScript.replace(jsSuffixRegExp,""),req.jsExtRegExp.test(mainScript)&&(mainScript=dataMain),cfg.deps=cfg.deps?cfg.deps.concat(mainScript):[mainScript],!0}),define=function(r,a,c){var u,d;typeof r!="string"&&(c=a,a=r,r=null),isArray(a)||(c=a,a=null),!a&&isFunction(c)&&(a=[],c.length&&(c.toString().replace(commentRegExp,"").replace(cjsRequireRegExp,function(q,g){a.push(g)}),a=(c.length===1?["require"]:["require","exports","module"]).concat(a))),useInteractive&&(u=currentlyAddingScript||getInteractiveScript(),u&&(r||(r=u.getAttribute("data-requiremodule")),d=contexts[u.getAttribute("data-requirecontext")])),d?(d.defQueue.push([r,a,c]),d.defQueueMap[r]=!0):globalDefQueue.push([r,a,c])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg)})(this);
|
43
|
+
*/
|
44
|
+
var requirejs, require, define;
|
45
|
+
(function(global) {
|
46
|
+
var req, s, head, baseElement, dataMain, src, interactiveScript, currentlyAddingScript, mainScript, subPath, version = "2.1.20", commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm, cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g, jsSuffixRegExp = /\.js$/, currDirRegExp = /^\.\//, op = Object.prototype, ostring = op.toString, hasOwn = op.hasOwnProperty, ap = Array.prototype, isBrowser = !!(typeof window !== "undefined" && typeof navigator !== "undefined" && window.document), isWebWorker = !isBrowser && typeof importScripts !== "undefined", readyRegExp = isBrowser && navigator.platform === "PLAYSTATION 3" ? /^complete$/ : /^(complete|loaded)$/, defContextName = "_", isOpera = typeof opera !== "undefined" && opera.toString() === "[object Opera]", contexts = {}, cfg = {}, globalDefQueue = [], useInteractive = false;
|
47
|
+
function isFunction(it) {
|
48
|
+
return ostring.call(it) === "[object Function]";
|
49
|
+
}
|
50
|
+
function isArray(it) {
|
51
|
+
return ostring.call(it) === "[object Array]";
|
52
|
+
}
|
53
|
+
function each(ary, func) {
|
54
|
+
if (ary) {
|
55
|
+
var i;
|
56
|
+
for (i = 0; i < ary.length; i += 1) {
|
57
|
+
if (ary[i] && func(ary[i], i, ary)) {
|
58
|
+
break;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
63
|
+
function eachReverse(ary, func) {
|
64
|
+
if (ary) {
|
65
|
+
var i;
|
66
|
+
for (i = ary.length - 1; i > -1; i -= 1) {
|
67
|
+
if (ary[i] && func(ary[i], i, ary)) {
|
68
|
+
break;
|
69
|
+
}
|
70
|
+
}
|
71
|
+
}
|
72
|
+
}
|
73
|
+
function hasProp(obj, prop) {
|
74
|
+
return hasOwn.call(obj, prop);
|
75
|
+
}
|
76
|
+
function getOwn(obj, prop) {
|
77
|
+
return hasProp(obj, prop) && obj[prop];
|
78
|
+
}
|
79
|
+
function eachProp(obj, func) {
|
80
|
+
var prop;
|
81
|
+
for (prop in obj) {
|
82
|
+
if (hasProp(obj, prop)) {
|
83
|
+
if (func(obj[prop], prop)) {
|
84
|
+
break;
|
85
|
+
}
|
86
|
+
}
|
87
|
+
}
|
88
|
+
}
|
89
|
+
function mixin(target, source, force, deepStringMixin) {
|
90
|
+
if (source) {
|
91
|
+
eachProp(source, function(value, prop) {
|
92
|
+
if (force || !hasProp(target, prop)) {
|
93
|
+
if (deepStringMixin && typeof value === "object" && value && !isArray(value) && !isFunction(value) && !(value instanceof RegExp)) {
|
94
|
+
if (!target[prop]) {
|
95
|
+
target[prop] = {};
|
96
|
+
}
|
97
|
+
mixin(target[prop], value, force, deepStringMixin);
|
98
|
+
} else {
|
99
|
+
target[prop] = value;
|
100
|
+
}
|
101
|
+
}
|
102
|
+
});
|
103
|
+
}
|
104
|
+
return target;
|
105
|
+
}
|
106
|
+
function bind(obj, fn) {
|
107
|
+
return function() {
|
108
|
+
return fn.apply(obj, arguments);
|
109
|
+
};
|
110
|
+
}
|
111
|
+
function scripts() {
|
112
|
+
return document.getElementsByTagName("script");
|
113
|
+
}
|
114
|
+
function defaultOnError(err) {
|
115
|
+
throw err;
|
116
|
+
}
|
117
|
+
function getGlobal(value) {
|
118
|
+
if (!value) {
|
119
|
+
return value;
|
120
|
+
}
|
121
|
+
var g = global;
|
122
|
+
each(value.split("."), function(part) {
|
123
|
+
g = g[part];
|
124
|
+
});
|
125
|
+
return g;
|
126
|
+
}
|
127
|
+
function makeError(id, msg, err, requireModules) {
|
128
|
+
var e = new Error(msg + "\nhttp://requirejs.org/docs/errors.html#" + id);
|
129
|
+
e.requireType = id;
|
130
|
+
e.requireModules = requireModules;
|
131
|
+
if (err) {
|
132
|
+
e.originalError = err;
|
133
|
+
}
|
134
|
+
return e;
|
135
|
+
}
|
136
|
+
if (typeof define !== "undefined") {
|
137
|
+
return;
|
138
|
+
}
|
139
|
+
if (typeof requirejs !== "undefined") {
|
140
|
+
if (isFunction(requirejs)) {
|
141
|
+
return;
|
142
|
+
}
|
143
|
+
cfg = requirejs;
|
144
|
+
requirejs = void 0;
|
145
|
+
}
|
146
|
+
if (typeof require !== "undefined" && !isFunction(require)) {
|
147
|
+
cfg = require;
|
148
|
+
require = void 0;
|
149
|
+
}
|
150
|
+
function newContext(contextName) {
|
151
|
+
var inCheckLoaded, Module, context, handlers, checkLoadedTimeoutId, config = {
|
152
|
+
//Defaults. Do not set a default for map
|
153
|
+
//config to speed up normalize(), which
|
154
|
+
//will run faster if there is no default.
|
155
|
+
waitSeconds: 7,
|
156
|
+
baseUrl: "./",
|
157
|
+
paths: {},
|
158
|
+
bundles: {},
|
159
|
+
pkgs: {},
|
160
|
+
shim: {},
|
161
|
+
config: {}
|
162
|
+
}, registry = {}, enabledRegistry = {}, undefEvents = {}, defQueue = [], defined = {}, urlFetched = {}, bundlesMap = {}, requireCounter = 1, unnormalizedCounter = 1;
|
163
|
+
function trimDots(ary) {
|
164
|
+
var i, part;
|
165
|
+
for (i = 0; i < ary.length; i++) {
|
166
|
+
part = ary[i];
|
167
|
+
if (part === ".") {
|
168
|
+
ary.splice(i, 1);
|
169
|
+
i -= 1;
|
170
|
+
} else if (part === "..") {
|
171
|
+
if (i === 0 || i === 1 && ary[2] === ".." || ary[i - 1] === "..") {
|
172
|
+
continue;
|
173
|
+
} else if (i > 0) {
|
174
|
+
ary.splice(i - 1, 2);
|
175
|
+
i -= 2;
|
176
|
+
}
|
177
|
+
}
|
178
|
+
}
|
179
|
+
}
|
180
|
+
function normalize(name, baseName, applyMap) {
|
181
|
+
var pkgMain, mapValue, nameParts, i, j, nameSegment, lastIndex, foundMap, foundI, foundStarMap, starI, normalizedBaseParts, baseParts = baseName && baseName.split("/"), map = config.map, starMap = map && map["*"];
|
182
|
+
if (name) {
|
183
|
+
name = name.split("/");
|
184
|
+
lastIndex = name.length - 1;
|
185
|
+
if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
|
186
|
+
name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, "");
|
187
|
+
}
|
188
|
+
if (name[0].charAt(0) === "." && baseParts) {
|
189
|
+
normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
|
190
|
+
name = normalizedBaseParts.concat(name);
|
191
|
+
}
|
192
|
+
trimDots(name);
|
193
|
+
name = name.join("/");
|
194
|
+
}
|
195
|
+
if (applyMap && map && (baseParts || starMap)) {
|
196
|
+
nameParts = name.split("/");
|
197
|
+
outerLoop:
|
198
|
+
for (i = nameParts.length; i > 0; i -= 1) {
|
199
|
+
nameSegment = nameParts.slice(0, i).join("/");
|
200
|
+
if (baseParts) {
|
201
|
+
for (j = baseParts.length; j > 0; j -= 1) {
|
202
|
+
mapValue = getOwn(map, baseParts.slice(0, j).join("/"));
|
203
|
+
if (mapValue) {
|
204
|
+
mapValue = getOwn(mapValue, nameSegment);
|
205
|
+
if (mapValue) {
|
206
|
+
foundMap = mapValue;
|
207
|
+
foundI = i;
|
208
|
+
break outerLoop;
|
209
|
+
}
|
210
|
+
}
|
211
|
+
}
|
212
|
+
}
|
213
|
+
if (!foundStarMap && starMap && getOwn(starMap, nameSegment)) {
|
214
|
+
foundStarMap = getOwn(starMap, nameSegment);
|
215
|
+
starI = i;
|
216
|
+
}
|
217
|
+
}
|
218
|
+
if (!foundMap && foundStarMap) {
|
219
|
+
foundMap = foundStarMap;
|
220
|
+
foundI = starI;
|
221
|
+
}
|
222
|
+
if (foundMap) {
|
223
|
+
nameParts.splice(0, foundI, foundMap);
|
224
|
+
name = nameParts.join("/");
|
225
|
+
}
|
226
|
+
}
|
227
|
+
pkgMain = getOwn(config.pkgs, name);
|
228
|
+
return pkgMain ? pkgMain : name;
|
229
|
+
}
|
230
|
+
function removeScript(name) {
|
231
|
+
if (isBrowser) {
|
232
|
+
each(scripts(), function(scriptNode) {
|
233
|
+
if (scriptNode.getAttribute("data-requiremodule") === name && scriptNode.getAttribute("data-requirecontext") === context.contextName) {
|
234
|
+
scriptNode.parentNode.removeChild(scriptNode);
|
235
|
+
return true;
|
236
|
+
}
|
237
|
+
});
|
238
|
+
}
|
239
|
+
}
|
240
|
+
function hasPathFallback(id) {
|
241
|
+
var pathConfig = getOwn(config.paths, id);
|
242
|
+
if (pathConfig && isArray(pathConfig) && pathConfig.length > 1) {
|
243
|
+
pathConfig.shift();
|
244
|
+
context.require.undef(id);
|
245
|
+
context.makeRequire(null, {
|
246
|
+
skipMap: true
|
247
|
+
})([id]);
|
248
|
+
return true;
|
249
|
+
}
|
250
|
+
}
|
251
|
+
function splitPrefix(name) {
|
252
|
+
var prefix, index = name ? name.indexOf("!") : -1;
|
253
|
+
if (index > -1) {
|
254
|
+
prefix = name.substring(0, index);
|
255
|
+
name = name.substring(index + 1, name.length);
|
256
|
+
}
|
257
|
+
return [prefix, name];
|
258
|
+
}
|
259
|
+
function makeModuleMap(name, parentModuleMap, isNormalized, applyMap) {
|
260
|
+
var url, pluginModule, suffix, nameParts, prefix = null, parentName = parentModuleMap ? parentModuleMap.name : null, originalName = name, isDefine = true, normalizedName = "";
|
261
|
+
if (!name) {
|
262
|
+
isDefine = false;
|
263
|
+
name = "_@r" + (requireCounter += 1);
|
264
|
+
}
|
265
|
+
nameParts = splitPrefix(name);
|
266
|
+
prefix = nameParts[0];
|
267
|
+
name = nameParts[1];
|
268
|
+
if (prefix) {
|
269
|
+
prefix = normalize(prefix, parentName, applyMap);
|
270
|
+
pluginModule = getOwn(defined, prefix);
|
271
|
+
}
|
272
|
+
if (name) {
|
273
|
+
if (prefix) {
|
274
|
+
if (pluginModule && pluginModule.normalize) {
|
275
|
+
normalizedName = pluginModule.normalize(name, function(name2) {
|
276
|
+
return normalize(name2, parentName, applyMap);
|
277
|
+
});
|
278
|
+
} else {
|
279
|
+
normalizedName = name.indexOf("!") === -1 ? normalize(name, parentName, applyMap) : name;
|
280
|
+
}
|
281
|
+
} else {
|
282
|
+
normalizedName = normalize(name, parentName, applyMap);
|
283
|
+
nameParts = splitPrefix(normalizedName);
|
284
|
+
prefix = nameParts[0];
|
285
|
+
normalizedName = nameParts[1];
|
286
|
+
isNormalized = true;
|
287
|
+
url = context.nameToUrl(normalizedName);
|
288
|
+
}
|
289
|
+
}
|
290
|
+
suffix = prefix && !pluginModule && !isNormalized ? "_unnormalized" + (unnormalizedCounter += 1) : "";
|
291
|
+
return {
|
292
|
+
prefix,
|
293
|
+
name: normalizedName,
|
294
|
+
parentMap: parentModuleMap,
|
295
|
+
unnormalized: !!suffix,
|
296
|
+
url,
|
297
|
+
originalName,
|
298
|
+
isDefine,
|
299
|
+
id: (prefix ? prefix + "!" + normalizedName : normalizedName) + suffix
|
300
|
+
};
|
301
|
+
}
|
302
|
+
function getModule(depMap) {
|
303
|
+
var id = depMap.id, mod = getOwn(registry, id);
|
304
|
+
if (!mod) {
|
305
|
+
mod = registry[id] = new context.Module(depMap);
|
306
|
+
}
|
307
|
+
return mod;
|
308
|
+
}
|
309
|
+
function on(depMap, name, fn) {
|
310
|
+
var id = depMap.id, mod = getOwn(registry, id);
|
311
|
+
if (hasProp(defined, id) && (!mod || mod.defineEmitComplete)) {
|
312
|
+
if (name === "defined") {
|
313
|
+
fn(defined[id]);
|
314
|
+
}
|
315
|
+
} else {
|
316
|
+
mod = getModule(depMap);
|
317
|
+
if (mod.error && name === "error") {
|
318
|
+
fn(mod.error);
|
319
|
+
} else {
|
320
|
+
mod.on(name, fn);
|
321
|
+
}
|
322
|
+
}
|
323
|
+
}
|
324
|
+
function onError(err, errback) {
|
325
|
+
var ids = err.requireModules, notified = false;
|
326
|
+
if (errback) {
|
327
|
+
errback(err);
|
328
|
+
} else {
|
329
|
+
each(ids, function(id) {
|
330
|
+
var mod = getOwn(registry, id);
|
331
|
+
if (mod) {
|
332
|
+
mod.error = err;
|
333
|
+
if (mod.events.error) {
|
334
|
+
notified = true;
|
335
|
+
mod.emit("error", err);
|
336
|
+
}
|
337
|
+
}
|
338
|
+
});
|
339
|
+
if (!notified) {
|
340
|
+
req.onError(err);
|
341
|
+
}
|
342
|
+
}
|
343
|
+
}
|
344
|
+
function takeGlobalQueue() {
|
345
|
+
if (globalDefQueue.length) {
|
346
|
+
each(globalDefQueue, function(queueItem) {
|
347
|
+
var id = queueItem[0];
|
348
|
+
if (typeof id === "string") {
|
349
|
+
context.defQueueMap[id] = true;
|
350
|
+
}
|
351
|
+
defQueue.push(queueItem);
|
352
|
+
});
|
353
|
+
globalDefQueue = [];
|
354
|
+
}
|
355
|
+
}
|
356
|
+
handlers = {
|
357
|
+
require: function(mod) {
|
358
|
+
if (mod.require) {
|
359
|
+
return mod.require;
|
360
|
+
} else {
|
361
|
+
return mod.require = context.makeRequire(mod.map);
|
362
|
+
}
|
363
|
+
},
|
364
|
+
exports: function(mod) {
|
365
|
+
mod.usingExports = true;
|
366
|
+
if (mod.map.isDefine) {
|
367
|
+
if (mod.exports) {
|
368
|
+
return defined[mod.map.id] = mod.exports;
|
369
|
+
} else {
|
370
|
+
return mod.exports = defined[mod.map.id] = {};
|
371
|
+
}
|
372
|
+
}
|
373
|
+
},
|
374
|
+
module: function(mod) {
|
375
|
+
if (mod.module) {
|
376
|
+
return mod.module;
|
377
|
+
} else {
|
378
|
+
return mod.module = {
|
379
|
+
id: mod.map.id,
|
380
|
+
uri: mod.map.url,
|
381
|
+
config: function() {
|
382
|
+
return getOwn(config.config, mod.map.id) || {};
|
383
|
+
},
|
384
|
+
exports: mod.exports || (mod.exports = {})
|
385
|
+
};
|
386
|
+
}
|
387
|
+
}
|
388
|
+
};
|
389
|
+
function cleanRegistry(id) {
|
390
|
+
delete registry[id];
|
391
|
+
delete enabledRegistry[id];
|
392
|
+
}
|
393
|
+
function breakCycle(mod, traced, processed) {
|
394
|
+
var id = mod.map.id;
|
395
|
+
if (mod.error) {
|
396
|
+
mod.emit("error", mod.error);
|
397
|
+
} else {
|
398
|
+
traced[id] = true;
|
399
|
+
each(mod.depMaps, function(depMap, i) {
|
400
|
+
var depId = depMap.id, dep = getOwn(registry, depId);
|
401
|
+
if (dep && !mod.depMatched[i] && !processed[depId]) {
|
402
|
+
if (getOwn(traced, depId)) {
|
403
|
+
mod.defineDep(i, defined[depId]);
|
404
|
+
mod.check();
|
405
|
+
} else {
|
406
|
+
breakCycle(dep, traced, processed);
|
407
|
+
}
|
408
|
+
}
|
409
|
+
});
|
410
|
+
processed[id] = true;
|
411
|
+
}
|
412
|
+
}
|
413
|
+
function checkLoaded() {
|
414
|
+
var err, usingPathFallback, waitInterval = config.waitSeconds * 1e3, expired = waitInterval && context.startTime + waitInterval < new Date().getTime(), noLoads = [], reqCalls = [], stillLoading = false, needCycleCheck = true;
|
415
|
+
if (inCheckLoaded) {
|
416
|
+
return;
|
417
|
+
}
|
418
|
+
inCheckLoaded = true;
|
419
|
+
eachProp(enabledRegistry, function(mod) {
|
420
|
+
var map = mod.map, modId = map.id;
|
421
|
+
if (!mod.enabled) {
|
422
|
+
return;
|
423
|
+
}
|
424
|
+
if (!map.isDefine) {
|
425
|
+
reqCalls.push(mod);
|
426
|
+
}
|
427
|
+
if (!mod.error) {
|
428
|
+
if (!mod.inited && expired) {
|
429
|
+
if (hasPathFallback(modId)) {
|
430
|
+
usingPathFallback = true;
|
431
|
+
stillLoading = true;
|
432
|
+
} else {
|
433
|
+
noLoads.push(modId);
|
434
|
+
removeScript(modId);
|
435
|
+
}
|
436
|
+
} else if (!mod.inited && mod.fetched && map.isDefine) {
|
437
|
+
stillLoading = true;
|
438
|
+
if (!map.prefix) {
|
439
|
+
return needCycleCheck = false;
|
440
|
+
}
|
441
|
+
}
|
442
|
+
}
|
443
|
+
});
|
444
|
+
if (expired && noLoads.length) {
|
445
|
+
err = makeError(
|
446
|
+
"timeout",
|
447
|
+
"Load timeout for modules: " + noLoads,
|
448
|
+
null,
|
449
|
+
noLoads
|
450
|
+
);
|
451
|
+
err.contextName = context.contextName;
|
452
|
+
return onError(err);
|
453
|
+
}
|
454
|
+
if (needCycleCheck) {
|
455
|
+
each(reqCalls, function(mod) {
|
456
|
+
breakCycle(mod, {}, {});
|
457
|
+
});
|
458
|
+
}
|
459
|
+
if ((!expired || usingPathFallback) && stillLoading) {
|
460
|
+
if ((isBrowser || isWebWorker) && !checkLoadedTimeoutId) {
|
461
|
+
checkLoadedTimeoutId = setTimeout(function() {
|
462
|
+
checkLoadedTimeoutId = 0;
|
463
|
+
checkLoaded();
|
464
|
+
}, 50);
|
465
|
+
}
|
466
|
+
}
|
467
|
+
inCheckLoaded = false;
|
468
|
+
}
|
469
|
+
Module = function(map) {
|
470
|
+
this.events = getOwn(undefEvents, map.id) || {};
|
471
|
+
this.map = map;
|
472
|
+
this.shim = getOwn(config.shim, map.id);
|
473
|
+
this.depExports = [];
|
474
|
+
this.depMaps = [];
|
475
|
+
this.depMatched = [];
|
476
|
+
this.pluginMaps = {};
|
477
|
+
this.depCount = 0;
|
478
|
+
};
|
479
|
+
Module.prototype = {
|
480
|
+
init: function(depMaps, factory, errback, options) {
|
481
|
+
options = options || {};
|
482
|
+
if (this.inited) {
|
483
|
+
return;
|
484
|
+
}
|
485
|
+
this.factory = factory;
|
486
|
+
if (errback) {
|
487
|
+
this.on("error", errback);
|
488
|
+
} else if (this.events.error) {
|
489
|
+
errback = bind(this, function(err) {
|
490
|
+
this.emit("error", err);
|
491
|
+
});
|
492
|
+
}
|
493
|
+
this.depMaps = depMaps && depMaps.slice(0);
|
494
|
+
this.errback = errback;
|
495
|
+
this.inited = true;
|
496
|
+
this.ignore = options.ignore;
|
497
|
+
if (options.enabled || this.enabled) {
|
498
|
+
this.enable();
|
499
|
+
} else {
|
500
|
+
this.check();
|
501
|
+
}
|
502
|
+
},
|
503
|
+
defineDep: function(i, depExports) {
|
504
|
+
if (!this.depMatched[i]) {
|
505
|
+
this.depMatched[i] = true;
|
506
|
+
this.depCount -= 1;
|
507
|
+
this.depExports[i] = depExports;
|
508
|
+
}
|
509
|
+
},
|
510
|
+
fetch: function() {
|
511
|
+
if (this.fetched) {
|
512
|
+
return;
|
513
|
+
}
|
514
|
+
this.fetched = true;
|
515
|
+
context.startTime = new Date().getTime();
|
516
|
+
var map = this.map;
|
517
|
+
if (this.shim) {
|
518
|
+
context.makeRequire(this.map, {
|
519
|
+
enableBuildCallback: true
|
520
|
+
})(
|
521
|
+
this.shim.deps || [],
|
522
|
+
bind(this, function() {
|
523
|
+
return map.prefix ? this.callPlugin() : this.load();
|
524
|
+
})
|
525
|
+
);
|
526
|
+
} else {
|
527
|
+
return map.prefix ? this.callPlugin() : this.load();
|
528
|
+
}
|
529
|
+
},
|
530
|
+
load: function() {
|
531
|
+
var url = this.map.url;
|
532
|
+
if (!urlFetched[url]) {
|
533
|
+
urlFetched[url] = true;
|
534
|
+
context.load(this.map.id, url);
|
535
|
+
}
|
536
|
+
},
|
537
|
+
/**
|
538
|
+
* Checks if the module is ready to define itself, and if so,
|
539
|
+
* define it.
|
540
|
+
* @private
|
541
|
+
*/
|
542
|
+
check: function() {
|
543
|
+
if (!this.enabled || this.enabling) {
|
544
|
+
return;
|
545
|
+
}
|
546
|
+
var err, cjsModule, id = this.map.id, depExports = this.depExports, exports = this.exports, factory = this.factory;
|
547
|
+
if (!this.inited) {
|
548
|
+
if (!hasProp(context.defQueueMap, id)) {
|
549
|
+
this.fetch();
|
550
|
+
}
|
551
|
+
} else if (this.error) {
|
552
|
+
this.emit("error", this.error);
|
553
|
+
} else if (!this.defining) {
|
554
|
+
this.defining = true;
|
555
|
+
if (this.depCount < 1 && !this.defined) {
|
556
|
+
if (isFunction(factory)) {
|
557
|
+
if (this.events.error && this.map.isDefine || req.onError !== defaultOnError) {
|
558
|
+
try {
|
559
|
+
exports = context.execCb(id, factory, depExports, exports);
|
560
|
+
} catch (e) {
|
561
|
+
err = e;
|
562
|
+
}
|
563
|
+
} else {
|
564
|
+
exports = context.execCb(id, factory, depExports, exports);
|
565
|
+
}
|
566
|
+
if (this.map.isDefine && exports === void 0) {
|
567
|
+
cjsModule = this.module;
|
568
|
+
if (cjsModule) {
|
569
|
+
exports = cjsModule.exports;
|
570
|
+
} else if (this.usingExports) {
|
571
|
+
exports = this.exports;
|
572
|
+
}
|
573
|
+
}
|
574
|
+
if (err) {
|
575
|
+
err.requireMap = this.map;
|
576
|
+
err.requireModules = this.map.isDefine ? [this.map.id] : null;
|
577
|
+
err.requireType = this.map.isDefine ? "define" : "require";
|
578
|
+
return onError(this.error = err);
|
579
|
+
}
|
580
|
+
} else {
|
581
|
+
exports = factory;
|
582
|
+
}
|
583
|
+
this.exports = exports;
|
584
|
+
if (this.map.isDefine && !this.ignore) {
|
585
|
+
defined[id] = exports;
|
586
|
+
if (req.onResourceLoad) {
|
587
|
+
req.onResourceLoad(context, this.map, this.depMaps);
|
588
|
+
}
|
589
|
+
}
|
590
|
+
cleanRegistry(id);
|
591
|
+
this.defined = true;
|
592
|
+
}
|
593
|
+
this.defining = false;
|
594
|
+
if (this.defined && !this.defineEmitted) {
|
595
|
+
this.defineEmitted = true;
|
596
|
+
this.emit("defined", this.exports);
|
597
|
+
this.defineEmitComplete = true;
|
598
|
+
}
|
599
|
+
}
|
600
|
+
},
|
601
|
+
callPlugin: function() {
|
602
|
+
var map = this.map, id = map.id, pluginMap = makeModuleMap(map.prefix);
|
603
|
+
this.depMaps.push(pluginMap);
|
604
|
+
on(
|
605
|
+
pluginMap,
|
606
|
+
"defined",
|
607
|
+
bind(this, function(plugin) {
|
608
|
+
var load, normalizedMap, normalizedMod, bundleId = getOwn(bundlesMap, this.map.id), name = this.map.name, parentName = this.map.parentMap ? this.map.parentMap.name : null, localRequire = context.makeRequire(map.parentMap, {
|
609
|
+
enableBuildCallback: true
|
610
|
+
});
|
611
|
+
if (this.map.unnormalized) {
|
612
|
+
if (plugin.normalize) {
|
613
|
+
name = plugin.normalize(name, function(name2) {
|
614
|
+
return normalize(name2, parentName, true);
|
615
|
+
}) || "";
|
616
|
+
}
|
617
|
+
normalizedMap = makeModuleMap(
|
618
|
+
map.prefix + "!" + name,
|
619
|
+
this.map.parentMap
|
620
|
+
);
|
621
|
+
on(
|
622
|
+
normalizedMap,
|
623
|
+
"defined",
|
624
|
+
bind(this, function(value) {
|
625
|
+
this.init(
|
626
|
+
[],
|
627
|
+
function() {
|
628
|
+
return value;
|
629
|
+
},
|
630
|
+
null,
|
631
|
+
{
|
632
|
+
enabled: true,
|
633
|
+
ignore: true
|
634
|
+
}
|
635
|
+
);
|
636
|
+
})
|
637
|
+
);
|
638
|
+
normalizedMod = getOwn(registry, normalizedMap.id);
|
639
|
+
if (normalizedMod) {
|
640
|
+
this.depMaps.push(normalizedMap);
|
641
|
+
if (this.events.error) {
|
642
|
+
normalizedMod.on(
|
643
|
+
"error",
|
644
|
+
bind(this, function(err) {
|
645
|
+
this.emit("error", err);
|
646
|
+
})
|
647
|
+
);
|
648
|
+
}
|
649
|
+
normalizedMod.enable();
|
650
|
+
}
|
651
|
+
return;
|
652
|
+
}
|
653
|
+
if (bundleId) {
|
654
|
+
this.map.url = context.nameToUrl(bundleId);
|
655
|
+
this.load();
|
656
|
+
return;
|
657
|
+
}
|
658
|
+
load = bind(this, function(value) {
|
659
|
+
this.init(
|
660
|
+
[],
|
661
|
+
function() {
|
662
|
+
return value;
|
663
|
+
},
|
664
|
+
null,
|
665
|
+
{
|
666
|
+
enabled: true
|
667
|
+
}
|
668
|
+
);
|
669
|
+
});
|
670
|
+
load.error = bind(this, function(err) {
|
671
|
+
this.inited = true;
|
672
|
+
this.error = err;
|
673
|
+
err.requireModules = [id];
|
674
|
+
eachProp(registry, function(mod) {
|
675
|
+
if (mod.map.id.indexOf(id + "_unnormalized") === 0) {
|
676
|
+
cleanRegistry(mod.map.id);
|
677
|
+
}
|
678
|
+
});
|
679
|
+
onError(err);
|
680
|
+
});
|
681
|
+
load.fromText = bind(this, function(text2, textAlt) {
|
682
|
+
var moduleName = map.name, moduleMap = makeModuleMap(moduleName), hasInteractive = useInteractive;
|
683
|
+
if (textAlt) {
|
684
|
+
text2 = textAlt;
|
685
|
+
}
|
686
|
+
if (hasInteractive) {
|
687
|
+
useInteractive = false;
|
688
|
+
}
|
689
|
+
getModule(moduleMap);
|
690
|
+
if (hasProp(config.config, id)) {
|
691
|
+
config.config[moduleName] = config.config[id];
|
692
|
+
}
|
693
|
+
try {
|
694
|
+
req.exec(text2);
|
695
|
+
} catch (e) {
|
696
|
+
return onError(
|
697
|
+
makeError(
|
698
|
+
"fromtexteval",
|
699
|
+
"fromText eval for " + id + " failed: " + e,
|
700
|
+
e,
|
701
|
+
[id]
|
702
|
+
)
|
703
|
+
);
|
704
|
+
}
|
705
|
+
if (hasInteractive) {
|
706
|
+
useInteractive = true;
|
707
|
+
}
|
708
|
+
this.depMaps.push(moduleMap);
|
709
|
+
context.completeLoad(moduleName);
|
710
|
+
localRequire([moduleName], load);
|
711
|
+
});
|
712
|
+
plugin.load(map.name, localRequire, load, config);
|
713
|
+
})
|
714
|
+
);
|
715
|
+
context.enable(pluginMap, this);
|
716
|
+
this.pluginMaps[pluginMap.id] = pluginMap;
|
717
|
+
},
|
718
|
+
enable: function() {
|
719
|
+
enabledRegistry[this.map.id] = this;
|
720
|
+
this.enabled = true;
|
721
|
+
this.enabling = true;
|
722
|
+
each(
|
723
|
+
this.depMaps,
|
724
|
+
bind(this, function(depMap, i) {
|
725
|
+
var id, mod, handler;
|
726
|
+
if (typeof depMap === "string") {
|
727
|
+
depMap = makeModuleMap(
|
728
|
+
depMap,
|
729
|
+
this.map.isDefine ? this.map : this.map.parentMap,
|
730
|
+
false,
|
731
|
+
!this.skipMap
|
732
|
+
);
|
733
|
+
this.depMaps[i] = depMap;
|
734
|
+
handler = getOwn(handlers, depMap.id);
|
735
|
+
if (handler) {
|
736
|
+
this.depExports[i] = handler(this);
|
737
|
+
return;
|
738
|
+
}
|
739
|
+
this.depCount += 1;
|
740
|
+
on(
|
741
|
+
depMap,
|
742
|
+
"defined",
|
743
|
+
bind(this, function(depExports) {
|
744
|
+
if (this.undefed) {
|
745
|
+
return;
|
746
|
+
}
|
747
|
+
this.defineDep(i, depExports);
|
748
|
+
this.check();
|
749
|
+
})
|
750
|
+
);
|
751
|
+
if (this.errback) {
|
752
|
+
on(depMap, "error", bind(this, this.errback));
|
753
|
+
} else if (this.events.error) {
|
754
|
+
on(
|
755
|
+
depMap,
|
756
|
+
"error",
|
757
|
+
bind(this, function(err) {
|
758
|
+
this.emit("error", err);
|
759
|
+
})
|
760
|
+
);
|
761
|
+
}
|
762
|
+
}
|
763
|
+
id = depMap.id;
|
764
|
+
mod = registry[id];
|
765
|
+
if (!hasProp(handlers, id) && mod && !mod.enabled) {
|
766
|
+
context.enable(depMap, this);
|
767
|
+
}
|
768
|
+
})
|
769
|
+
);
|
770
|
+
eachProp(
|
771
|
+
this.pluginMaps,
|
772
|
+
bind(this, function(pluginMap) {
|
773
|
+
var mod = getOwn(registry, pluginMap.id);
|
774
|
+
if (mod && !mod.enabled) {
|
775
|
+
context.enable(pluginMap, this);
|
776
|
+
}
|
777
|
+
})
|
778
|
+
);
|
779
|
+
this.enabling = false;
|
780
|
+
this.check();
|
781
|
+
},
|
782
|
+
on: function(name, cb) {
|
783
|
+
var cbs = this.events[name];
|
784
|
+
if (!cbs) {
|
785
|
+
cbs = this.events[name] = [];
|
786
|
+
}
|
787
|
+
cbs.push(cb);
|
788
|
+
},
|
789
|
+
emit: function(name, evt) {
|
790
|
+
each(this.events[name], function(cb) {
|
791
|
+
cb(evt);
|
792
|
+
});
|
793
|
+
if (name === "error") {
|
794
|
+
delete this.events[name];
|
795
|
+
}
|
796
|
+
}
|
797
|
+
};
|
798
|
+
function callGetModule(args) {
|
799
|
+
if (!hasProp(defined, args[0])) {
|
800
|
+
getModule(makeModuleMap(args[0], null, true)).init(args[1], args[2]);
|
801
|
+
}
|
802
|
+
}
|
803
|
+
function removeListener(node, func, name, ieName) {
|
804
|
+
if (node.detachEvent && !isOpera) {
|
805
|
+
if (ieName) {
|
806
|
+
node.detachEvent(ieName, func);
|
807
|
+
}
|
808
|
+
} else {
|
809
|
+
node.removeEventListener(name, func, false);
|
810
|
+
}
|
811
|
+
}
|
812
|
+
function getScriptData(evt) {
|
813
|
+
var node = evt.currentTarget || evt.srcElement;
|
814
|
+
removeListener(node, context.onScriptLoad, "load", "onreadystatechange");
|
815
|
+
removeListener(node, context.onScriptError, "error");
|
816
|
+
return {
|
817
|
+
node,
|
818
|
+
id: node && node.getAttribute("data-requiremodule")
|
819
|
+
};
|
820
|
+
}
|
821
|
+
function intakeDefines() {
|
822
|
+
var args;
|
823
|
+
takeGlobalQueue();
|
824
|
+
while (defQueue.length) {
|
825
|
+
args = defQueue.shift();
|
826
|
+
if (args[0] === null) {
|
827
|
+
return onError(
|
828
|
+
makeError(
|
829
|
+
"mismatch",
|
830
|
+
"Mismatched anonymous define() module: " + args[args.length - 1]
|
831
|
+
)
|
832
|
+
);
|
833
|
+
} else {
|
834
|
+
callGetModule(args);
|
835
|
+
}
|
836
|
+
}
|
837
|
+
context.defQueueMap = {};
|
838
|
+
}
|
839
|
+
context = {
|
840
|
+
config,
|
841
|
+
contextName,
|
842
|
+
registry,
|
843
|
+
defined,
|
844
|
+
urlFetched,
|
845
|
+
defQueue,
|
846
|
+
defQueueMap: {},
|
847
|
+
Module,
|
848
|
+
makeModuleMap,
|
849
|
+
nextTick: req.nextTick,
|
850
|
+
onError,
|
851
|
+
/**
|
852
|
+
* @private
|
853
|
+
* Set a configuration for the context.
|
854
|
+
* @param {Object} cfg config object to integrate.
|
855
|
+
*/
|
856
|
+
configure: function(cfg2) {
|
857
|
+
if (cfg2.baseUrl) {
|
858
|
+
if (cfg2.baseUrl.charAt(cfg2.baseUrl.length - 1) !== "/") {
|
859
|
+
cfg2.baseUrl += "/";
|
860
|
+
}
|
861
|
+
}
|
862
|
+
var shim = config.shim, objs = {
|
863
|
+
paths: true,
|
864
|
+
bundles: true,
|
865
|
+
config: true,
|
866
|
+
map: true
|
867
|
+
};
|
868
|
+
eachProp(cfg2, function(value, prop) {
|
869
|
+
if (objs[prop]) {
|
870
|
+
if (!config[prop]) {
|
871
|
+
config[prop] = {};
|
872
|
+
}
|
873
|
+
mixin(config[prop], value, true, true);
|
874
|
+
} else {
|
875
|
+
config[prop] = value;
|
876
|
+
}
|
877
|
+
});
|
878
|
+
if (cfg2.bundles) {
|
879
|
+
eachProp(cfg2.bundles, function(value, prop) {
|
880
|
+
each(value, function(v) {
|
881
|
+
if (v !== prop) {
|
882
|
+
bundlesMap[v] = prop;
|
883
|
+
}
|
884
|
+
});
|
885
|
+
});
|
886
|
+
}
|
887
|
+
if (cfg2.shim) {
|
888
|
+
eachProp(cfg2.shim, function(value, id) {
|
889
|
+
if (isArray(value)) {
|
890
|
+
value = {
|
891
|
+
deps: value
|
892
|
+
};
|
893
|
+
}
|
894
|
+
if ((value.exports || value.init) && !value.exportsFn) {
|
895
|
+
value.exportsFn = context.makeShimExports(value);
|
896
|
+
}
|
897
|
+
shim[id] = value;
|
898
|
+
});
|
899
|
+
config.shim = shim;
|
900
|
+
}
|
901
|
+
if (cfg2.packages) {
|
902
|
+
each(cfg2.packages, function(pkgObj) {
|
903
|
+
var location, name;
|
904
|
+
pkgObj = typeof pkgObj === "string" ? { name: pkgObj } : pkgObj;
|
905
|
+
name = pkgObj.name;
|
906
|
+
location = pkgObj.location;
|
907
|
+
if (location) {
|
908
|
+
config.paths[name] = pkgObj.location;
|
909
|
+
}
|
910
|
+
config.pkgs[name] = pkgObj.name + "/" + (pkgObj.main || "main").replace(currDirRegExp, "").replace(jsSuffixRegExp, "");
|
911
|
+
});
|
912
|
+
}
|
913
|
+
eachProp(registry, function(mod, id) {
|
914
|
+
if (!mod.inited && !mod.map.unnormalized) {
|
915
|
+
mod.map = makeModuleMap(id, null, true);
|
916
|
+
}
|
917
|
+
});
|
918
|
+
if (cfg2.deps || cfg2.callback) {
|
919
|
+
context.require(cfg2.deps || [], cfg2.callback);
|
920
|
+
}
|
921
|
+
},
|
922
|
+
makeShimExports: function(value) {
|
923
|
+
function fn() {
|
924
|
+
var ret;
|
925
|
+
if (value.init) {
|
926
|
+
ret = value.init.apply(global, arguments);
|
927
|
+
}
|
928
|
+
return ret || value.exports && getGlobal(value.exports);
|
929
|
+
}
|
930
|
+
return fn;
|
931
|
+
},
|
932
|
+
makeRequire: function(relMap, options) {
|
933
|
+
options = options || {};
|
934
|
+
function localRequire(deps, callback, errback) {
|
935
|
+
var id, map, requireMod;
|
936
|
+
if (options.enableBuildCallback && callback && isFunction(callback)) {
|
937
|
+
callback.__requireJsBuild = true;
|
938
|
+
}
|
939
|
+
if (typeof deps === "string") {
|
940
|
+
if (isFunction(callback)) {
|
941
|
+
return onError(
|
942
|
+
makeError("requireargs", "Invalid require call"),
|
943
|
+
errback
|
944
|
+
);
|
945
|
+
}
|
946
|
+
if (relMap && hasProp(handlers, deps)) {
|
947
|
+
return handlers[deps](registry[relMap.id]);
|
948
|
+
}
|
949
|
+
if (req.get) {
|
950
|
+
return req.get(context, deps, relMap, localRequire);
|
951
|
+
}
|
952
|
+
map = makeModuleMap(deps, relMap, false, true);
|
953
|
+
id = map.id;
|
954
|
+
if (!hasProp(defined, id)) {
|
955
|
+
return onError(
|
956
|
+
makeError(
|
957
|
+
"notloaded",
|
958
|
+
'Module name "' + id + '" has not been loaded yet for context: ' + contextName + (relMap ? "" : ". Use require([])")
|
959
|
+
)
|
960
|
+
);
|
961
|
+
}
|
962
|
+
return defined[id];
|
963
|
+
}
|
964
|
+
intakeDefines();
|
965
|
+
context.nextTick(function() {
|
966
|
+
intakeDefines();
|
967
|
+
requireMod = getModule(makeModuleMap(null, relMap));
|
968
|
+
requireMod.skipMap = options.skipMap;
|
969
|
+
requireMod.init(deps, callback, errback, {
|
970
|
+
enabled: true
|
971
|
+
});
|
972
|
+
checkLoaded();
|
973
|
+
});
|
974
|
+
return localRequire;
|
975
|
+
}
|
976
|
+
mixin(localRequire, {
|
977
|
+
isBrowser,
|
978
|
+
/**
|
979
|
+
* Converts a module name + .extension into an URL path.
|
980
|
+
* *Requires* the use of a module name. It does not support using
|
981
|
+
* plain URLs like nameToUrl.
|
982
|
+
*/
|
983
|
+
toUrl: function(moduleNamePlusExt) {
|
984
|
+
var ext, index = moduleNamePlusExt.lastIndexOf("."), segment = moduleNamePlusExt.split("/")[0], isRelative = segment === "." || segment === "..";
|
985
|
+
if (index !== -1 && (!isRelative || index > 1)) {
|
986
|
+
ext = moduleNamePlusExt.substring(
|
987
|
+
index,
|
988
|
+
moduleNamePlusExt.length
|
989
|
+
);
|
990
|
+
moduleNamePlusExt = moduleNamePlusExt.substring(0, index);
|
991
|
+
}
|
992
|
+
return context.nameToUrl(
|
993
|
+
normalize(moduleNamePlusExt, relMap && relMap.id, true),
|
994
|
+
ext,
|
995
|
+
true
|
996
|
+
);
|
997
|
+
},
|
998
|
+
defined: function(id) {
|
999
|
+
return hasProp(defined, makeModuleMap(id, relMap, false, true).id);
|
1000
|
+
},
|
1001
|
+
specified: function(id) {
|
1002
|
+
id = makeModuleMap(id, relMap, false, true).id;
|
1003
|
+
return hasProp(defined, id) || hasProp(registry, id);
|
1004
|
+
}
|
1005
|
+
});
|
1006
|
+
if (!relMap) {
|
1007
|
+
localRequire.undef = function(id) {
|
1008
|
+
takeGlobalQueue();
|
1009
|
+
var map = makeModuleMap(id, relMap, true), mod = getOwn(registry, id);
|
1010
|
+
mod.undefed = true;
|
1011
|
+
removeScript(id);
|
1012
|
+
delete defined[id];
|
1013
|
+
delete urlFetched[map.url];
|
1014
|
+
delete undefEvents[id];
|
1015
|
+
eachReverse(defQueue, function(args, i) {
|
1016
|
+
if (args[0] === id) {
|
1017
|
+
defQueue.splice(i, 1);
|
1018
|
+
}
|
1019
|
+
});
|
1020
|
+
delete context.defQueueMap[id];
|
1021
|
+
if (mod) {
|
1022
|
+
if (mod.events.defined) {
|
1023
|
+
undefEvents[id] = mod.events;
|
1024
|
+
}
|
1025
|
+
cleanRegistry(id);
|
1026
|
+
}
|
1027
|
+
};
|
1028
|
+
}
|
1029
|
+
return localRequire;
|
1030
|
+
},
|
1031
|
+
/**
|
1032
|
+
* @private
|
1033
|
+
* Called to enable a module if it is still in the registry
|
1034
|
+
* awaiting enablement. A second arg, parent, the parent module,
|
1035
|
+
* is passed in for context, when this method is overridden by
|
1036
|
+
* the optimizer. Not shown here to keep code compact.
|
1037
|
+
*/
|
1038
|
+
enable: function(depMap) {
|
1039
|
+
var mod = getOwn(registry, depMap.id);
|
1040
|
+
if (mod) {
|
1041
|
+
getModule(depMap).enable();
|
1042
|
+
}
|
1043
|
+
},
|
1044
|
+
/**
|
1045
|
+
* Internal method used by environment adapters to complete a load event.
|
1046
|
+
* A load event could be a script load or just a load pass from a synchronous
|
1047
|
+
* load call.
|
1048
|
+
* @param {String} moduleName the name of the module to potentially complete.
|
1049
|
+
* @private
|
1050
|
+
*/
|
1051
|
+
completeLoad: function(moduleName) {
|
1052
|
+
var found, args, mod, shim = getOwn(config.shim, moduleName) || {}, shExports = shim.exports;
|
1053
|
+
takeGlobalQueue();
|
1054
|
+
while (defQueue.length) {
|
1055
|
+
args = defQueue.shift();
|
1056
|
+
if (args[0] === null) {
|
1057
|
+
args[0] = moduleName;
|
1058
|
+
if (found) {
|
1059
|
+
break;
|
1060
|
+
}
|
1061
|
+
found = true;
|
1062
|
+
} else if (args[0] === moduleName) {
|
1063
|
+
found = true;
|
1064
|
+
}
|
1065
|
+
callGetModule(args);
|
1066
|
+
}
|
1067
|
+
context.defQueueMap = {};
|
1068
|
+
mod = getOwn(registry, moduleName);
|
1069
|
+
if (!found && !hasProp(defined, moduleName) && mod && !mod.inited) {
|
1070
|
+
if (config.enforceDefine && (!shExports || !getGlobal(shExports))) {
|
1071
|
+
if (hasPathFallback(moduleName)) {
|
1072
|
+
return;
|
1073
|
+
} else {
|
1074
|
+
return onError(
|
1075
|
+
makeError(
|
1076
|
+
"nodefine",
|
1077
|
+
"No define call for " + moduleName,
|
1078
|
+
null,
|
1079
|
+
[moduleName]
|
1080
|
+
)
|
1081
|
+
);
|
1082
|
+
}
|
1083
|
+
} else {
|
1084
|
+
callGetModule([moduleName, shim.deps || [], shim.exportsFn]);
|
1085
|
+
}
|
1086
|
+
}
|
1087
|
+
checkLoaded();
|
1088
|
+
},
|
1089
|
+
/**
|
1090
|
+
* @private
|
1091
|
+
* Converts a module name to a file path. Supports cases where
|
1092
|
+
* moduleName may actually be just an URL.
|
1093
|
+
* Note that it **does not** call normalize on the moduleName,
|
1094
|
+
* it is assumed to have already been normalized. This is an
|
1095
|
+
* internal API, not a public one. Use toUrl for the public API.
|
1096
|
+
*/
|
1097
|
+
nameToUrl: function(moduleName, ext, skipExt) {
|
1098
|
+
var paths, syms, i, parentModule, url, parentPath, bundleId, pkgMain = getOwn(config.pkgs, moduleName);
|
1099
|
+
if (pkgMain) {
|
1100
|
+
moduleName = pkgMain;
|
1101
|
+
}
|
1102
|
+
bundleId = getOwn(bundlesMap, moduleName);
|
1103
|
+
if (bundleId) {
|
1104
|
+
return context.nameToUrl(bundleId, ext, skipExt);
|
1105
|
+
}
|
1106
|
+
if (req.jsExtRegExp.test(moduleName)) {
|
1107
|
+
url = moduleName + (ext || "");
|
1108
|
+
} else {
|
1109
|
+
paths = config.paths;
|
1110
|
+
syms = moduleName.split("/");
|
1111
|
+
for (i = syms.length; i > 0; i -= 1) {
|
1112
|
+
parentModule = syms.slice(0, i).join("/");
|
1113
|
+
parentPath = getOwn(paths, parentModule);
|
1114
|
+
if (parentPath) {
|
1115
|
+
if (isArray(parentPath)) {
|
1116
|
+
parentPath = parentPath[0];
|
1117
|
+
}
|
1118
|
+
syms.splice(0, i, parentPath);
|
1119
|
+
break;
|
1120
|
+
}
|
1121
|
+
}
|
1122
|
+
url = syms.join("/");
|
1123
|
+
url += ext || (/^data\:|\?/.test(url) || skipExt ? "" : ".js");
|
1124
|
+
url = (url.charAt(0) === "/" || url.match(/^[\w\+\.\-]+:/) ? "" : config.baseUrl) + url;
|
1125
|
+
}
|
1126
|
+
return config.urlArgs ? url + ((url.indexOf("?") === -1 ? "?" : "&") + config.urlArgs) : url;
|
1127
|
+
},
|
1128
|
+
//Delegates to req.load. Broken out as a separate function to
|
1129
|
+
//allow overriding in the optimizer.
|
1130
|
+
load: function(id, url) {
|
1131
|
+
req.load(context, id, url);
|
1132
|
+
},
|
1133
|
+
/**
|
1134
|
+
* Executes a module callback function. Broken out as a separate function
|
1135
|
+
* solely to allow the build system to sequence the files in the built
|
1136
|
+
* layer in the right sequence.
|
1137
|
+
*
|
1138
|
+
* @private
|
1139
|
+
*/
|
1140
|
+
execCb: function(name, callback, args, exports) {
|
1141
|
+
return callback.apply(exports, args);
|
1142
|
+
},
|
1143
|
+
/**
|
1144
|
+
* callback for script loads, used to check status of loading.
|
1145
|
+
* @private
|
1146
|
+
* @param {Event} evt the event from the browser for the script
|
1147
|
+
* that was loaded.
|
1148
|
+
*/
|
1149
|
+
onScriptLoad: function(evt) {
|
1150
|
+
if (evt.type === "load" || readyRegExp.test((evt.currentTarget || evt.srcElement).readyState)) {
|
1151
|
+
interactiveScript = null;
|
1152
|
+
var data = getScriptData(evt);
|
1153
|
+
context.completeLoad(data.id);
|
1154
|
+
}
|
1155
|
+
},
|
1156
|
+
/**
|
1157
|
+
* @private
|
1158
|
+
* Callback for script errors.
|
1159
|
+
*/
|
1160
|
+
onScriptError: function(evt) {
|
1161
|
+
var data = getScriptData(evt);
|
1162
|
+
if (!hasPathFallback(data.id)) {
|
1163
|
+
return onError(
|
1164
|
+
makeError("scripterror", "Script error for: " + data.id, evt, [
|
1165
|
+
data.id
|
1166
|
+
])
|
1167
|
+
);
|
1168
|
+
}
|
1169
|
+
}
|
1170
|
+
};
|
1171
|
+
context.require = context.makeRequire();
|
1172
|
+
return context;
|
1173
|
+
}
|
1174
|
+
req = requirejs = function(deps, callback, errback, optional) {
|
1175
|
+
var context, config, contextName = defContextName;
|
1176
|
+
if (!isArray(deps) && typeof deps !== "string") {
|
1177
|
+
config = deps;
|
1178
|
+
if (isArray(callback)) {
|
1179
|
+
deps = callback;
|
1180
|
+
callback = errback;
|
1181
|
+
errback = optional;
|
1182
|
+
} else {
|
1183
|
+
deps = [];
|
1184
|
+
}
|
1185
|
+
}
|
1186
|
+
if (config && config.context) {
|
1187
|
+
contextName = config.context;
|
1188
|
+
}
|
1189
|
+
context = getOwn(contexts, contextName);
|
1190
|
+
if (!context) {
|
1191
|
+
context = contexts[contextName] = req.s.newContext(contextName);
|
1192
|
+
}
|
1193
|
+
if (config) {
|
1194
|
+
context.configure(config);
|
1195
|
+
}
|
1196
|
+
return context.require(deps, callback, errback);
|
1197
|
+
};
|
1198
|
+
req.config = function(config) {
|
1199
|
+
return req(config);
|
1200
|
+
};
|
1201
|
+
req.nextTick = typeof setTimeout !== "undefined" ? function(fn) {
|
1202
|
+
setTimeout(fn, 4);
|
1203
|
+
} : function(fn) {
|
1204
|
+
fn();
|
1205
|
+
};
|
1206
|
+
if (!require) {
|
1207
|
+
require = req;
|
1208
|
+
}
|
1209
|
+
req.version = version;
|
1210
|
+
req.jsExtRegExp = /^\/|:|\?|\.js$/;
|
1211
|
+
req.isBrowser = isBrowser;
|
1212
|
+
s = req.s = {
|
1213
|
+
contexts,
|
1214
|
+
newContext
|
1215
|
+
};
|
1216
|
+
req({});
|
1217
|
+
each(["toUrl", "undef", "defined", "specified"], function(prop) {
|
1218
|
+
req[prop] = function() {
|
1219
|
+
var ctx = contexts[defContextName];
|
1220
|
+
return ctx.require[prop].apply(ctx, arguments);
|
1221
|
+
};
|
1222
|
+
});
|
1223
|
+
if (isBrowser) {
|
1224
|
+
head = s.head = document.getElementsByTagName("head")[0];
|
1225
|
+
baseElement = document.getElementsByTagName("base")[0];
|
1226
|
+
if (baseElement) {
|
1227
|
+
head = s.head = baseElement.parentNode;
|
1228
|
+
}
|
1229
|
+
}
|
1230
|
+
req.onError = defaultOnError;
|
1231
|
+
req.createNode = function(config, moduleName, url) {
|
1232
|
+
var node = config.xhtml ? document.createElementNS("http://www.w3.org/1999/xhtml", "html:script") : document.createElement("script");
|
1233
|
+
node.type = config.scriptType || "text/javascript";
|
1234
|
+
node.charset = "utf-8";
|
1235
|
+
node.async = true;
|
1236
|
+
return node;
|
1237
|
+
};
|
1238
|
+
req.load = function(context, moduleName, url) {
|
1239
|
+
var config = context && context.config || {}, node;
|
1240
|
+
if (isBrowser) {
|
1241
|
+
node = req.createNode(config, moduleName, url);
|
1242
|
+
if (config.onNodeCreated) {
|
1243
|
+
config.onNodeCreated(node, config, moduleName, url);
|
1244
|
+
}
|
1245
|
+
node.setAttribute("data-requirecontext", context.contextName);
|
1246
|
+
node.setAttribute("data-requiremodule", moduleName);
|
1247
|
+
if (node.attachEvent && //Check if node.attachEvent is artificially added by custom script or
|
1248
|
+
//natively supported by browser
|
1249
|
+
//read https://github.com/jrburke/requirejs/issues/187
|
1250
|
+
//if we can NOT find [native code] then it must NOT natively supported.
|
1251
|
+
//in IE8, node.attachEvent does not have toString()
|
1252
|
+
//Note the test for "[native code" with no closing brace, see:
|
1253
|
+
//https://github.com/jrburke/requirejs/issues/273
|
1254
|
+
!(node.attachEvent.toString && node.attachEvent.toString().indexOf("[native code") < 0) && !isOpera) {
|
1255
|
+
useInteractive = true;
|
1256
|
+
node.attachEvent("onreadystatechange", context.onScriptLoad);
|
1257
|
+
} else {
|
1258
|
+
node.addEventListener("load", context.onScriptLoad, false);
|
1259
|
+
node.addEventListener("error", context.onScriptError, false);
|
1260
|
+
}
|
1261
|
+
node.src = url;
|
1262
|
+
currentlyAddingScript = node;
|
1263
|
+
if (baseElement) {
|
1264
|
+
head.insertBefore(node, baseElement);
|
1265
|
+
} else {
|
1266
|
+
head.appendChild(node);
|
1267
|
+
}
|
1268
|
+
currentlyAddingScript = null;
|
1269
|
+
return node;
|
1270
|
+
} else if (isWebWorker) {
|
1271
|
+
try {
|
1272
|
+
importScripts(url);
|
1273
|
+
context.completeLoad(moduleName);
|
1274
|
+
} catch (e) {
|
1275
|
+
context.onError(
|
1276
|
+
makeError(
|
1277
|
+
"importscripts",
|
1278
|
+
"importScripts failed for " + moduleName + " at " + url,
|
1279
|
+
e,
|
1280
|
+
[moduleName]
|
1281
|
+
)
|
1282
|
+
);
|
1283
|
+
}
|
1284
|
+
}
|
1285
|
+
};
|
1286
|
+
function getInteractiveScript() {
|
1287
|
+
if (interactiveScript && interactiveScript.readyState === "interactive") {
|
1288
|
+
return interactiveScript;
|
1289
|
+
}
|
1290
|
+
eachReverse(scripts(), function(script) {
|
1291
|
+
if (script.readyState === "interactive") {
|
1292
|
+
return interactiveScript = script;
|
1293
|
+
}
|
1294
|
+
});
|
1295
|
+
return interactiveScript;
|
1296
|
+
}
|
1297
|
+
if (isBrowser && !cfg.skipDataMain) {
|
1298
|
+
eachReverse(scripts(), function(script) {
|
1299
|
+
if (!head) {
|
1300
|
+
head = script.parentNode;
|
1301
|
+
}
|
1302
|
+
dataMain = script.getAttribute("data-main");
|
1303
|
+
if (dataMain) {
|
1304
|
+
mainScript = dataMain;
|
1305
|
+
if (!cfg.baseUrl) {
|
1306
|
+
src = mainScript.split("/");
|
1307
|
+
mainScript = src.pop();
|
1308
|
+
subPath = src.length ? src.join("/") + "/" : "./";
|
1309
|
+
cfg.baseUrl = subPath;
|
1310
|
+
}
|
1311
|
+
mainScript = mainScript.replace(jsSuffixRegExp, "");
|
1312
|
+
if (req.jsExtRegExp.test(mainScript)) {
|
1313
|
+
mainScript = dataMain;
|
1314
|
+
}
|
1315
|
+
cfg.deps = cfg.deps ? cfg.deps.concat(mainScript) : [mainScript];
|
1316
|
+
return true;
|
1317
|
+
}
|
1318
|
+
});
|
1319
|
+
}
|
1320
|
+
define = function(name, deps, callback) {
|
1321
|
+
var node, context;
|
1322
|
+
if (typeof name !== "string") {
|
1323
|
+
callback = deps;
|
1324
|
+
deps = name;
|
1325
|
+
name = null;
|
1326
|
+
}
|
1327
|
+
if (!isArray(deps)) {
|
1328
|
+
callback = deps;
|
1329
|
+
deps = null;
|
1330
|
+
}
|
1331
|
+
if (!deps && isFunction(callback)) {
|
1332
|
+
deps = [];
|
1333
|
+
if (callback.length) {
|
1334
|
+
callback.toString().replace(commentRegExp, "").replace(cjsRequireRegExp, function(match, dep) {
|
1335
|
+
deps.push(dep);
|
1336
|
+
});
|
1337
|
+
deps = (callback.length === 1 ? ["require"] : ["require", "exports", "module"]).concat(deps);
|
1338
|
+
}
|
1339
|
+
}
|
1340
|
+
if (useInteractive) {
|
1341
|
+
node = currentlyAddingScript || getInteractiveScript();
|
1342
|
+
if (node) {
|
1343
|
+
if (!name) {
|
1344
|
+
name = node.getAttribute("data-requiremodule");
|
1345
|
+
}
|
1346
|
+
context = contexts[node.getAttribute("data-requirecontext")];
|
1347
|
+
}
|
1348
|
+
}
|
1349
|
+
if (context) {
|
1350
|
+
context.defQueue.push([name, deps, callback]);
|
1351
|
+
context.defQueueMap[name] = true;
|
1352
|
+
} else {
|
1353
|
+
globalDefQueue.push([name, deps, callback]);
|
1354
|
+
}
|
1355
|
+
};
|
1356
|
+
define.amd = {
|
1357
|
+
jQuery: true
|
1358
|
+
};
|
1359
|
+
req.exec = function(text) {
|
1360
|
+
return eval(text);
|
1361
|
+
};
|
1362
|
+
req(cfg);
|
1363
|
+
})(this);
|