'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var vue = require('vue');
var composables = require('../composables');
var cesiumProps = require('../utils/cesium-props');
var util = require('../utils/util');
var render = require('../utils/private/render');

var VcPrimitiveClassification = vue.defineComponent({
    name: 'VcPrimitiveClassification',
    props: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, cesiumProps.geometryInstances), cesiumProps.appearance), cesiumProps.show), cesiumProps.vertexCacheOptimize), cesiumProps.interleave), cesiumProps.compressVertices), cesiumProps.releaseGeometryInstances), cesiumProps.allowPicking), cesiumProps.asynchronous), cesiumProps.classificationType), cesiumProps.debugShowBoundingVolume), cesiumProps.debugShowShadowVolume), cesiumProps.enableMouseEvent),
    emits: ['beforeLoad', 'ready', 'destroyed', 'readyPromise', 'update:geometryInstances'],
    setup(props, ctx) {
        const instance = vue.getCurrentInstance();
        instance.cesiumClass = 'ClassificationPrimitive';
        composables.usePrimitives(props, ctx, instance);
        return () => ctx.slots.default ? (vue.h('i', {
            class: util.kebabCase(instance.proxy.$options.name),
            style: { display: 'none !important' }
        }, render.hSlot(ctx.slots.default))) : vue.createCommentVNode(util.kebabCase(instance.proxy.$options.name));
    }
});

var VcPrimitiveGround = vue.defineComponent({
    name: 'VcPrimitiveGround',
    props: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, cesiumProps.geometryInstances), cesiumProps.appearance), cesiumProps.show), cesiumProps.vertexCacheOptimize), cesiumProps.interleave), cesiumProps.compressVertices), cesiumProps.releaseGeometryInstances), cesiumProps.allowPicking), cesiumProps.asynchronous), cesiumProps.classificationType), cesiumProps.debugShowBoundingVolume), cesiumProps.debugShowShadowVolume), cesiumProps.enableMouseEvent),
    emits: ['beforeLoad', 'ready', 'destroyed', 'readyPromise', 'update:geometryInstances'],
    setup(props, ctx) {
        const instance = vue.getCurrentInstance();
        instance.cesiumClass = 'GroundPrimitive';
        composables.usePrimitives(props, ctx, instance);
        return () => ctx.slots.default ? (vue.h('i', {
            class: util.kebabCase(instance.proxy.$options.name),
            style: { display: 'none !important' }
        }, render.hSlot(ctx.slots.default))) : vue.createCommentVNode(util.kebabCase(instance.proxy.$options.name));
    }
});

var VcPrimitiveGroundPolyline = vue.defineComponent({
    name: 'VcPrimitivePolylineGround',
    props: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, cesiumProps.geometryInstances), cesiumProps.appearance), cesiumProps.show), cesiumProps.interleave), cesiumProps.compressVertices), cesiumProps.releaseGeometryInstances), cesiumProps.allowPicking), cesiumProps.asynchronous), cesiumProps.classificationType), cesiumProps.debugShowBoundingVolume), cesiumProps.debugShowShadowVolume), cesiumProps.enableMouseEvent),
    emits: ['beforeLoad', 'ready', 'destroyed', 'readyPromise', 'update:geometryInstances'],
    setup(props, ctx) {
        const instance = vue.getCurrentInstance();
        instance.cesiumClass = 'GroundPolylinePrimitive';
        composables.usePrimitives(props, ctx, instance);
        return () => ctx.slots.default ? (vue.h('i', {
            class: util.kebabCase(instance.proxy.$options.name),
            style: { display: 'none !important' }
        }, render.hSlot(ctx.slots.default))) : vue.createCommentVNode(util.kebabCase(instance.proxy.$options.name));
    }
});

/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */

function __awaiter(thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
}

var VcPrimitiveModel = vue.defineComponent({
    name: 'VcPrimitiveModel',
    props: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, cesiumProps.url), { basePath: String }), cesiumProps.show), cesiumProps.modelMatrix), cesiumProps.scale), cesiumProps.minimumPixelSize), cesiumProps.maximumScale), cesiumProps.id), cesiumProps.allowPicking), cesiumProps.incrementallyLoadTextures), cesiumProps.asynchronous), cesiumProps.clampAnimations), cesiumProps.shadows), cesiumProps.debugShowBoundingVolume), cesiumProps.debugWireframe), cesiumProps.heightReference), cesiumProps.scene), cesiumProps.distanceDisplayCondition), cesiumProps.color), cesiumProps.colorBlendMode), cesiumProps.colorBlendAmount), cesiumProps.silhouetteColor), cesiumProps.silhouetteSize), cesiumProps.clippingPlanes), { dequantizeInShader: {
            type: Boolean,
            default: true
        } }), cesiumProps.imageBasedLightingFactor), cesiumProps.lightColor), cesiumProps.luminanceAtZenith), cesiumProps.sphericalHarmonicCoefficients), cesiumProps.specularEnvironmentMaps), cesiumProps.credit), cesiumProps.backFaceCulling), cesiumProps.enableMouseEvent),
    emits: ['beforeLoad', 'ready', 'destroyed', 'readyPromise'],
    setup(props, ctx) {
        const instance = vue.getCurrentInstance();
        instance.cesiumClass = 'Model';
        const primitivesState = composables.usePrimitives(props, ctx, instance);
        instance.createCesiumObject = () => __awaiter(this, void 0, void 0, function* () {
            const options = primitivesState.transformProps(props);
            return Cesium.Model.fromGltf(options);
        });
        return () => vue.createCommentVNode(util.kebabCase(instance.proxy.$options.name));
    }
});

var VcPrimitive = vue.defineComponent({
    name: 'VcPrimitive',
    props: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, cesiumProps.geometryInstances), cesiumProps.appearance), { depthFailAppearance: Object }), cesiumProps.show), cesiumProps.modelMatrix), cesiumProps.vertexCacheOptimize), cesiumProps.interleave), cesiumProps.compressVertices), cesiumProps.releaseGeometryInstances), cesiumProps.allowPicking), { cull: {
            type: Boolean,
            default: true
        } }), cesiumProps.asynchronous), cesiumProps.debugShowBoundingVolume), cesiumProps.shadows), cesiumProps.enableMouseEvent),
    emits: ['beforeLoad', 'ready', 'destroyed', 'readyPromise', 'update:geometryInstances'],
    setup(props, ctx) {
        const instance = vue.getCurrentInstance();
        instance.cesiumClass = 'Primitive';
        composables.usePrimitives(props, ctx, instance);
        return () => ctx.slots.default ? (vue.h('i', {
            class: util.kebabCase(instance.proxy.$options.name),
            style: { display: 'none !important' }
        }, render.hSlot(ctx.slots.default))) : vue.createCommentVNode(util.kebabCase(instance.proxy.$options.name));
    }
});

var VcPrimitiveTileset = vue.defineComponent({
    name: 'VcPrimitiveTileset',
    props: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, cesiumProps.url), cesiumProps.show), cesiumProps.modelMatrix), cesiumProps.shadows), cesiumProps.maximumScreenSpaceError), { maximumMemoryUsage: {
            type: Number,
            default: 512
        }, cullWithChildrenBounds: {
            type: Boolean,
            default: true
        }, cullRequestsWhileMoving: {
            type: Boolean,
            default: true
        }, cullRequestsWhileMovingMultiplier: {
            type: Number,
            default: 60.0
        }, preloadWhenHidden: {
            type: Boolean,
            default: false
        }, preloadFlightDestinations: {
            type: Boolean,
            default: true
        }, preferLeaves: {
            type: Boolean,
            default: false
        }, dynamicScreenSpaceError: {
            type: Boolean,
            default: false
        }, dynamicScreenSpaceErrorDensity: {
            type: Number,
            default: 0.00278
        }, dynamicScreenSpaceErrorFactor: {
            type: Number,
            default: 4.0
        }, dynamicScreenSpaceErrorHeightFalloff: {
            type: Number,
            default: 0.25
        }, progressiveResolutionHeightFraction: {
            type: Number,
            default: 0.3
        }, foveatedScreenSpaceError: {
            type: Boolean,
            default: true
        }, foveatedConeSize: {
            type: Number,
            default: 0.1
        }, foveatedMinimumScreenSpaceErrorRelaxation: {
            type: Number,
            default: 0.0
        }, foveatedInterpolationCallback: Function, foveatedTimeDelay: {
            type: Number,
            default: 0.2
        }, skipLevelOfDetail: {
            type: Boolean,
            default: false
        }, baseScreenSpaceError: {
            type: Number,
            default: 1024
        }, skipScreenSpaceErrorFactor: {
            type: Number,
            default: 16
        }, skipLevels: {
            type: Number,
            default: 1
        }, immediatelyLoadDesiredLevelOfDetail: {
            type: Boolean,
            default: false
        }, loadSiblings: {
            type: Boolean,
            default: false
        } }), cesiumProps.clippingPlanes), cesiumProps.classificationType), cesiumProps.ellipsoid), { pointCloudShading: Object }), cesiumProps.imageBasedLightingFactor), cesiumProps.lightColor2), cesiumProps.luminanceAtZenith), cesiumProps.sphericalHarmonicCoefficients), cesiumProps.specularEnvironmentMaps), cesiumProps.backFaceCulling), { vectorClassificationOnly: {
            type: Boolean,
            default: false
        }, debugHeatmapTilePropertyName: String, debugFreezeFrame: {
            type: Boolean,
            default: false
        }, debugColorizeTiles: {
            type: Boolean,
            default: false
        } }), cesiumProps.debugWireframe), cesiumProps.debugShowBoundingVolume), { debugShowContentBoundingVolume: {
            type: Boolean,
            default: false
        }, debugShowViewerRequestVolume: {
            type: Boolean,
            default: false
        }, debugShowGeometricError: {
            type: Boolean,
            default: false
        }, debugShowRenderingStatistics: {
            type: Boolean,
            default: false
        }, debugShowMemoryUsage: {
            type: Boolean,
            default: false
        }, debugShowUrl: {
            type: Boolean,
            default: false
        } }), cesiumProps.enableMouseEvent),
    emits: ['beforeLoad', 'ready', 'destroyed', 'readyPromise'],
    setup(props, ctx) {
        const instance = vue.getCurrentInstance();
        instance.cesiumClass = 'Cesium3DTileset';
        composables.usePrimitives(props, ctx, instance);
        return () => vue.createCommentVNode(util.kebabCase(instance.proxy.$options.name));
    }
});

var VcPrimitiveParticle = vue.defineComponent({
    name: 'VcPrimitiveParticle',
    props: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, cesiumProps.show), { updateCallback: Function, emitter: Object }), cesiumProps.modelMatrix), { emitterModelMatrix: Object, emissionRate: Number, bursts: Array, loop: {
            type: Boolean,
            default: true
        }, scale: {
            type: Number,
            default: 1.0
        }, startScale: Number, endScale: Number }), cesiumProps.color), cesiumProps.startColor), cesiumProps.endColor), cesiumProps.image), cesiumProps.imageSize), cesiumProps.minimumImageSize), cesiumProps.maximumImageSize), cesiumProps.sizeInMeters), { speed: Number, minimumSpeed: Number, maximumSpeed: Number, lifetime: Number, particleLife: {
            type: Number,
            default: 5.0
        }, minimumParticleLife: Number, maximumParticleLife: Number, mass: {
            type: Number,
            default: 1.0
        }, minimumMass: Number, maximumMass: Number }), cesiumProps.enableMouseEvent),
    emits: ['beforeLoad', 'ready', 'destroyed', 'readyPromise'],
    setup(props, ctx) {
        const instance = vue.getCurrentInstance();
        instance.cesiumClass = 'ParticleSystem';
        instance.cesiumEvents = ['complete'];
        composables.usePrimitives(props, ctx, instance);
        return () => vue.createCommentVNode(util.kebabCase(instance.proxy.$options.name));
    }
});

const components = [
    VcPrimitiveClassification,
    VcPrimitiveGround,
    VcPrimitiveGroundPolyline,
    VcPrimitiveModel,
    VcPrimitive,
    VcPrimitiveTileset,
    VcPrimitiveParticle
];
const install = (app) => {
    components.forEach(cmp => {
        app.component(cmp.name, cmp);
    });
};
var index = {
    install
};

exports.VcPrimitive = VcPrimitive;
exports.VcPrimitiveClassification = VcPrimitiveClassification;
exports.VcPrimitiveGround = VcPrimitiveGround;
exports.VcPrimitiveGroundPolyline = VcPrimitiveGroundPolyline;
exports.VcPrimitiveModel = VcPrimitiveModel;
exports.VcPrimitiveParticle = VcPrimitiveParticle;
exports.VcPrimitiveTileset = VcPrimitiveTileset;
exports.default = index;
