← All changes
|
assets/js/packages/editor-props/editor-props.js
+2555
-4929
4.2.4
→
4.3.2
View file →
| @@ -1,5022 +1,2648 @@ | ||
| 1 | -/******/ (function() { // webpackBootstrap | |
| 2 | -/******/ "use strict"; | |
| 3 | -/******/ var __webpack_modules__ = ({ | |
| 1 | +(function(_elementor_schema) { | |
| 4 | 2 | |
| 5 | -/***/ "./node_modules/jsonschema/lib/attribute.js": | |
| 6 | -/*!**************************************************!*\ | |
| 7 | - !*** ./node_modules/jsonschema/lib/attribute.js ***! | |
| 8 | - \**************************************************/ | |
| 9 | -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { | |
| 3 | +//#region \0rolldown/runtime.js | |
| 4 | + var __defProp = Object.defineProperty; | |
| 5 | + var __name = (target, value) => __defProp(target, "name", { | |
| 6 | + value, | |
| 7 | + configurable: true | |
| 8 | + }); | |
| 9 | + var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports); | |
| 10 | + var __exportAll = (all, no_symbols) => { | |
| 11 | + let target = {}; | |
| 12 | + for (var name in all) { | |
| 13 | + __defProp(target, name, { | |
| 14 | + get: all[name], | |
| 15 | + enumerable: true | |
| 16 | + }); | |
| 17 | + } | |
| 18 | + if (!no_symbols) { | |
| 19 | + __defProp(target, Symbol.toStringTag, { value: "Module" }); | |
| 20 | + } | |
| 21 | + return target; | |
| 22 | + }; | |
| 10 | 23 | |
| 24 | +//#endregion | |
| 11 | 25 | |
| 26 | +//#region packages/packages/libs/editor-props/src/utils/create-prop-utils.ts | |
| 27 | + var SCHEMA_CACHE = /* @__PURE__ */ new Map(); | |
| 28 | + function getPropSchemaFromCache(key) { | |
| 29 | + return SCHEMA_CACHE.get(key); | |
| 30 | + } | |
| 31 | + function createPropUtils(key, valueSchema) { | |
| 32 | + const schema = _elementor_schema.z.strictObject({ | |
| 33 | + $$type: _elementor_schema.z.literal(key), | |
| 34 | + value: valueSchema, | |
| 35 | + disabled: _elementor_schema.z.boolean().optional() | |
| 36 | + }); | |
| 37 | + function isValid(prop) { | |
| 38 | + return schema.safeParse(prop).success; | |
| 39 | + } | |
| 40 | + function create(value, createOptions) { | |
| 41 | + const fn = typeof value === "function" ? value : () => value; | |
| 42 | + const { base, disabled } = createOptions || {}; | |
| 43 | + if (!base) return { | |
| 44 | + $$type: key, | |
| 45 | + value: fn(), | |
| 46 | + ...disabled && { disabled } | |
| 47 | + }; | |
| 48 | + if (!isValid(base)) throw new Error(`Cannot create prop based on invalid value: ${JSON.stringify(base)}`); | |
| 49 | + return { | |
| 50 | + $$type: key, | |
| 51 | + value: fn(base.value), | |
| 52 | + ...disabled && { disabled } | |
| 53 | + }; | |
| 54 | + } | |
| 55 | + function extract(prop) { | |
| 56 | + if (!isValid(prop)) return null; | |
| 57 | + return prop.value; | |
| 58 | + } | |
| 59 | + const propUtil = { | |
| 60 | + extract, | |
| 61 | + isValid, | |
| 62 | + create, | |
| 63 | + schema, | |
| 64 | + key | |
| 65 | + }; | |
| 66 | + SCHEMA_CACHE.set(key, propUtil); | |
| 67 | + return propUtil; | |
| 68 | + } | |
| 69 | + function createArrayPropUtils(key, valueSchema, overrideKey) { | |
| 70 | + return createPropUtils(overrideKey || `${key}-array`, _elementor_schema.z.array(valueSchema)); | |
| 71 | + } | |
| 12 | 72 | |
| 13 | -var helpers = __webpack_require__(/*! ./helpers */ "./node_modules/jsonschema/lib/helpers.js"); | |
| 73 | +//#endregion | |
| 74 | +//#region packages/packages/libs/editor-props/src/prop-types/utils.ts | |
| 75 | + var unknownChildrenSchema = _elementor_schema.z.any().nullable(); | |
| 14 | 76 | |
| 15 | -/** @type ValidatorResult */ | |
| 16 | -var ValidatorResult = helpers.ValidatorResult; | |
| 17 | -/** @type SchemaError */ | |
| 18 | -var SchemaError = helpers.SchemaError; | |
| 77 | +//#endregion | |
| 78 | +//#region packages/packages/libs/editor-props/src/prop-types/shadow.ts | |
| 79 | + var shadowPropTypeUtil = createPropUtils("shadow", _elementor_schema.z.strictObject({ | |
| 80 | + position: unknownChildrenSchema, | |
| 81 | + hOffset: unknownChildrenSchema, | |
| 82 | + vOffset: unknownChildrenSchema, | |
| 83 | + blur: unknownChildrenSchema, | |
| 84 | + spread: unknownChildrenSchema, | |
| 85 | + color: unknownChildrenSchema | |
| 86 | + })); | |
| 19 | 87 | |
| 20 | -var attribute = {}; | |
| 88 | +//#endregion | |
| 89 | +//#region packages/packages/libs/editor-props/src/prop-types/box-shadow.ts | |
| 90 | + var boxShadowPropTypeUtil = createPropUtils("box-shadow", _elementor_schema.z.array(shadowPropTypeUtil.schema)); | |
| 21 | 91 | |
| 22 | -attribute.ignoreProperties = { | |
| 23 | - // informative properties | |
| 24 | - 'id': true, | |
| 25 | - 'default': true, | |
| 26 | - 'description': true, | |
| 27 | - 'title': true, | |
| 28 | - // arguments to other properties | |
| 29 | - 'additionalItems': true, | |
| 30 | - 'then': true, | |
| 31 | - 'else': true, | |
| 32 | - // special-handled properties | |
| 33 | - '$schema': true, | |
| 34 | - '$ref': true, | |
| 35 | - 'extends': true, | |
| 36 | -}; | |
| 92 | +//#endregion | |
| 93 | +//#region packages/packages/libs/editor-props/src/prop-types/border-radius.ts | |
| 94 | + var borderRadiusPropTypeUtil = createPropUtils("border-radius-v2", _elementor_schema.z.strictObject({ | |
| 95 | + "start-start": unknownChildrenSchema, | |
| 96 | + "start-end": unknownChildrenSchema, | |
| 97 | + "end-start": unknownChildrenSchema, | |
| 98 | + "end-end": unknownChildrenSchema | |
| 99 | + })); | |
| 37 | 100 | |
| 38 | -/** | |
| 39 | - * @name validators | |
| 40 | - */ | |
| 41 | -var validators = attribute.validators = {}; | |
| 101 | +//#endregion | |
| 102 | +//#region packages/packages/libs/editor-props/src/prop-types/border-width.ts | |
| 103 | + var borderWidthPropTypeUtil = createPropUtils("border-width-v2", _elementor_schema.z.strictObject({ | |
| 104 | + "block-start": unknownChildrenSchema, | |
| 105 | + "block-end": unknownChildrenSchema, | |
| 106 | + "inline-start": unknownChildrenSchema, | |
| 107 | + "inline-end": unknownChildrenSchema | |
| 108 | + })); | |
| 42 | 109 | |
| 43 | -/** | |
| 44 | - * Validates whether the instance if of a certain type | |
| 45 | - * @param instance | |
| 46 | - * @param schema | |
| 47 | - * @param options | |
| 48 | - * @param ctx | |
| 49 | - * @return {ValidatorResult|null} | |
| 50 | - */ | |
| 51 | -validators.type = function validateType (instance, schema, options, ctx) { | |
| 52 | - // Ignore undefined instances | |
| 53 | - if (instance === undefined) { | |
| 54 | - return null; | |
| 55 | - } | |
| 56 | - var result = new ValidatorResult(instance, schema, options, ctx); | |
| 57 | - var types = Array.isArray(schema.type) ? schema.type : [schema.type]; | |
| 58 | - if (!types.some(this.testType.bind(this, instance, schema, options, ctx))) { | |
| 59 | - var list = types.map(function (v) { | |
| 60 | - if(!v) return; | |
| 61 | - var id = v.$id || v.id; | |
| 62 | - return id ? ('<' + id + '>') : (v+''); | |
| 63 | - }); | |
| 64 | - result.addError({ | |
| 65 | - name: 'type', | |
| 66 | - argument: list, | |
| 67 | - message: "is not of a type(s) " + list, | |
| 68 | - }); | |
| 69 | - } | |
| 70 | - return result; | |
| 71 | -}; | |
| 110 | +//#endregion | |
| 111 | +//#region packages/packages/libs/editor-props/src/prop-types/classes.ts | |
| 112 | + var CLASSES_PROP_KEY = "classes"; | |
| 113 | + var classesPropTypeUtil = createPropUtils(CLASSES_PROP_KEY, _elementor_schema.z.array(_elementor_schema.z.string().regex(/^[a-z][a-z-_0-9]*$/i))); | |
| 72 | 114 | |
| 73 | -function testSchemaNoThrow(instance, options, ctx, callback, schema){ | |
| 74 | - var throwError = options.throwError; | |
| 75 | - var throwAll = options.throwAll; | |
| 76 | - options.throwError = false; | |
| 77 | - options.throwAll = false; | |
| 78 | - var res = this.validateSchema(instance, schema, options, ctx); | |
| 79 | - options.throwError = throwError; | |
| 80 | - options.throwAll = throwAll; | |
| 115 | +//#endregion | |
| 116 | +//#region packages/packages/libs/editor-props/src/prop-types/color.ts | |
| 117 | + var colorPropTypeUtil = createPropUtils("color", _elementor_schema.z.string()); | |
| 81 | 118 | |
| 82 | - if (!res.valid && callback instanceof Function) { | |
| 83 | - callback(res); | |
| 84 | - } | |
| 85 | - return res.valid; | |
| 86 | -} | |
| 119 | +//#endregion | |
| 120 | +//#region packages/packages/libs/editor-props/src/prop-types/flex.ts | |
| 121 | + var flexPropTypeUtil = createPropUtils("flex", _elementor_schema.z.strictObject({ | |
| 122 | + flexGrow: unknownChildrenSchema, | |
| 123 | + flexShrink: unknownChildrenSchema, | |
| 124 | + flexBasis: unknownChildrenSchema | |
| 125 | + })); | |
| 87 | 126 | |
| 88 | -/** | |
| 89 | - * Validates whether the instance matches some of the given schemas | |
| 90 | - * @param instance | |
| 91 | - * @param schema | |
| 92 | - * @param options | |
| 93 | - * @param ctx | |
| 94 | - * @return {ValidatorResult|null} | |
| 95 | - */ | |
| 96 | -validators.anyOf = function validateAnyOf (instance, schema, options, ctx) { | |
| 97 | - // Ignore undefined instances | |
| 98 | - if (instance === undefined) { | |
| 99 | - return null; | |
| 100 | - } | |
| 101 | - var result = new ValidatorResult(instance, schema, options, ctx); | |
| 102 | - var inner = new ValidatorResult(instance, schema, options, ctx); | |
| 103 | - if (!Array.isArray(schema.anyOf)){ | |
| 104 | - throw new SchemaError("anyOf must be an array"); | |
| 105 | - } | |
| 106 | - if (!schema.anyOf.some( | |
| 107 | - testSchemaNoThrow.bind( | |
| 108 | - this, instance, options, ctx, function(res){inner.importErrors(res);} | |
| 109 | - ))) { | |
| 110 | - var list = schema.anyOf.map(function (v, i) { | |
| 111 | - var id = v.$id || v.id; | |
| 112 | - if(id) return '<' + id + '>'; | |
| 113 | - return(v.title && JSON.stringify(v.title)) || (v['$ref'] && ('<' + v['$ref'] + '>')) || '[subschema '+i+']'; | |
| 114 | - }); | |
| 115 | - if (options.nestedErrors) { | |
| 116 | - result.importErrors(inner); | |
| 117 | - } | |
| 118 | - result.addError({ | |
| 119 | - name: 'anyOf', | |
| 120 | - argument: list, | |
| 121 | - message: "is not any of " + list.join(','), | |
| 122 | - }); | |
| 123 | - } | |
| 124 | - return result; | |
| 125 | -}; | |
| 127 | +//#endregion | |
| 128 | +//#region packages/packages/libs/editor-props/src/prop-types/font-family.ts | |
| 129 | + var baseUtil = createPropUtils("font-family", _elementor_schema.z.string().nullable()); | |
| 130 | + var fontFamilyPropTypeUtil = Object.assign(baseUtil, { getEnqueueFontFamily: (value) => { | |
| 131 | + const trimmed = value.trim(); | |
| 132 | + if (trimmed.startsWith("\"") && trimmed.endsWith("\"") || trimmed.startsWith("'") && trimmed.endsWith("'")) return trimmed.slice(1, -1).trim(); | |
| 133 | + return trimmed; | |
| 134 | + } }); | |
| 126 | 135 | |
| 127 | -/** | |
| 128 | - * Validates whether the instance matches every given schema | |
| 129 | - * @param instance | |
| 130 | - * @param schema | |
| 131 | - * @param options | |
| 132 | - * @param ctx | |
| 133 | - * @return {String|null} | |
| 134 | - */ | |
| 135 | -validators.allOf = function validateAllOf (instance, schema, options, ctx) { | |
| 136 | - // Ignore undefined instances | |
| 137 | - if (instance === undefined) { | |
| 138 | - return null; | |
| 139 | - } | |
| 140 | - if (!Array.isArray(schema.allOf)){ | |
| 141 | - throw new SchemaError("allOf must be an array"); | |
| 142 | - } | |
| 143 | - var result = new ValidatorResult(instance, schema, options, ctx); | |
| 144 | - var self = this; | |
| 145 | - schema.allOf.forEach(function(v, i){ | |
| 146 | - var valid = self.validateSchema(instance, v, options, ctx); | |
| 147 | - if(!valid.valid){ | |
| 148 | - var id = v.$id || v.id; | |
| 149 | - var msg = id || (v.title && JSON.stringify(v.title)) || (v['$ref'] && ('<' + v['$ref'] + '>')) || '[subschema '+i+']'; | |
| 150 | - result.addError({ | |
| 151 | - name: 'allOf', | |
| 152 | - argument: { id: msg, length: valid.errors.length, valid: valid }, | |
| 153 | - message: 'does not match allOf schema ' + msg + ' with ' + valid.errors.length + ' error[s]:', | |
| 154 | - }); | |
| 155 | - result.importErrors(valid); | |
| 156 | - } | |
| 157 | - }); | |
| 158 | - return result; | |
| 159 | -}; | |
| 136 | +//#endregion | |
| 137 | +//#region packages/packages/libs/editor-props/src/prop-types/image.ts | |
| 138 | + var imagePropTypeUtil = createPropUtils("image", _elementor_schema.z.strictObject({ | |
| 139 | + src: unknownChildrenSchema, | |
| 140 | + size: unknownChildrenSchema | |
| 141 | + })); | |
| 160 | 142 | |
| 161 | -/** | |
| 162 | - * Validates whether the instance matches exactly one of the given schemas | |
| 163 | - * @param instance | |
| 164 | - * @param schema | |
| 165 | - * @param options | |
| 166 | - * @param ctx | |
| 167 | - * @return {String|null} | |
| 168 | - */ | |
| 169 | -validators.oneOf = function validateOneOf (instance, schema, options, ctx) { | |
| 170 | - // Ignore undefined instances | |
| 171 | - if (instance === undefined) { | |
| 172 | - return null; | |
| 173 | - } | |
| 174 | - if (!Array.isArray(schema.oneOf)){ | |
| 175 | - throw new SchemaError("oneOf must be an array"); | |
| 176 | - } | |
| 177 | - var result = new ValidatorResult(instance, schema, options, ctx); | |
| 178 | - var inner = new ValidatorResult(instance, schema, options, ctx); | |
| 179 | - var count = schema.oneOf.filter( | |
| 180 | - testSchemaNoThrow.bind( | |
| 181 | - this, instance, options, ctx, function(res) {inner.importErrors(res);} | |
| 182 | - ) ).length; | |
| 183 | - var list = schema.oneOf.map(function (v, i) { | |
| 184 | - var id = v.$id || v.id; | |
| 185 | - return id || (v.title && JSON.stringify(v.title)) || (v['$ref'] && ('<' + v['$ref'] + '>')) || '[subschema '+i+']'; | |
| 186 | - }); | |
| 187 | - if (count!==1) { | |
| 188 | - if (options.nestedErrors) { | |
| 189 | - result.importErrors(inner); | |
| 190 | - } | |
| 191 | - result.addError({ | |
| 192 | - name: 'oneOf', | |
| 193 | - argument: list, | |
| 194 | - message: "is not exactly one from " + list.join(','), | |
| 195 | - }); | |
| 196 | - } | |
| 197 | - return result; | |
| 198 | -}; | |
| 143 | +//#endregion | |
| 144 | +//#region packages/packages/libs/editor-props/src/prop-types/image-attachment-id.ts | |
| 145 | + var imageAttachmentIdPropType = createPropUtils("image-attachment-id", _elementor_schema.z.number()); | |
| 199 | 146 | |
| 200 | -/** | |
| 201 | - * Validates "then" or "else" depending on the result of validating "if" | |
| 202 | - * @param instance | |
| 203 | - * @param schema | |
| 204 | - * @param options | |
| 205 | - * @param ctx | |
| 206 | - * @return {String|null} | |
| 207 | - */ | |
| 208 | -validators.if = function validateIf (instance, schema, options, ctx) { | |
| 209 | - // Ignore undefined instances | |
| 210 | - if (instance === undefined) return null; | |
| 211 | - if (!helpers.isSchema(schema.if)) throw new Error('Expected "if" keyword to be a schema'); | |
| 212 | - var ifValid = testSchemaNoThrow.call(this, instance, options, ctx, null, schema.if); | |
| 213 | - var result = new ValidatorResult(instance, schema, options, ctx); | |
| 214 | - var res; | |
| 215 | - if(ifValid){ | |
| 216 | - if (schema.then === undefined) return; | |
| 217 | - if (!helpers.isSchema(schema.then)) throw new Error('Expected "then" keyword to be a schema'); | |
| 218 | - res = this.validateSchema(instance, schema.then, options, ctx.makeChild(schema.then)); | |
| 219 | - result.importErrors(res); | |
| 220 | - }else{ | |
| 221 | - if (schema.else === undefined) return; | |
| 222 | - if (!helpers.isSchema(schema.else)) throw new Error('Expected "else" keyword to be a schema'); | |
| 223 | - res = this.validateSchema(instance, schema.else, options, ctx.makeChild(schema.else)); | |
| 224 | - result.importErrors(res); | |
| 225 | - } | |
| 226 | - return result; | |
| 227 | -}; | |
| 147 | +//#endregion | |
| 148 | +//#region packages/packages/libs/editor-props/src/prop-types/image-src.ts | |
| 149 | + var imageSrcPropTypeUtil = createPropUtils("image-src", _elementor_schema.z.strictObject({ | |
| 150 | + id: unknownChildrenSchema, | |
| 151 | + url: _elementor_schema.z.null(), | |
| 152 | + alt: unknownChildrenSchema.optional().default(null) | |
| 153 | + }).or(_elementor_schema.z.strictObject({ | |
| 154 | + id: unknownChildrenSchema.optional().default(null), | |
| 155 | + url: unknownChildrenSchema, | |
| 156 | + alt: unknownChildrenSchema.optional().default(null) | |
| 157 | + }))); | |
| 228 | 158 | |
| 229 | -function getEnumerableProperty(object, key){ | |
| 230 | - // Determine if `key` shows up in `for(var key in object)` | |
| 231 | - // First test Object.hasOwnProperty.call as an optimization: that guarantees it does | |
| 232 | - if(Object.hasOwnProperty.call(object, key)) return object[key]; | |
| 233 | - // Test `key in object` as an optimization; false means it won't | |
| 234 | - if(!(key in object)) return; | |
| 235 | - while( (object = Object.getPrototypeOf(object)) ){ | |
| 236 | - if(Object.propertyIsEnumerable.call(object, key)) return object[key]; | |
| 237 | - } | |
| 238 | -} | |
| 159 | +//#endregion | |
| 160 | +//#region packages/packages/libs/editor-props/src/prop-types/icon.ts | |
| 161 | + var iconPropTypeUtil = createPropUtils("icon", _elementor_schema.z.strictObject({ | |
| 162 | + value: unknownChildrenSchema, | |
| 163 | + library: unknownChildrenSchema | |
| 164 | + })); | |
| 239 | 165 | |
| 240 | -/** | |
| 241 | - * Validates propertyNames | |
| 242 | - * @param instance | |
| 243 | - * @param schema | |
| 244 | - * @param options | |
| 245 | - * @param ctx | |
| 246 | - * @return {String|null|ValidatorResult} | |
| 247 | - */ | |
| 248 | -validators.propertyNames = function validatePropertyNames (instance, schema, options, ctx) { | |
| 249 | - if(!this.types.object(instance)) return; | |
| 250 | - var result = new ValidatorResult(instance, schema, options, ctx); | |
| 251 | - var subschema = schema.propertyNames!==undefined ? schema.propertyNames : {}; | |
| 252 | - if(!helpers.isSchema(subschema)) throw new SchemaError('Expected "propertyNames" to be a schema (object or boolean)'); | |
| 166 | +//#endregion | |
| 167 | +//#region packages/packages/libs/editor-props/src/prop-types/svg-src.ts | |
| 168 | + var svgSrcValueSchema = _elementor_schema.z.strictObject({ | |
| 169 | + id: unknownChildrenSchema, | |
| 170 | + url: _elementor_schema.z.null() | |
| 171 | + }).or(_elementor_schema.z.strictObject({ | |
| 172 | + id: _elementor_schema.z.null(), | |
| 173 | + url: unknownChildrenSchema | |
| 174 | + })).or(_elementor_schema.z.strictObject({ | |
| 175 | + id: unknownChildrenSchema, | |
| 176 | + url: unknownChildrenSchema | |
| 177 | + })); | |
| 178 | + var svgSrcPropTypeUtil = createPropUtils("svg-src", svgSrcValueSchema); | |
| 253 | 179 | |
| 254 | - for (var property in instance) { | |
| 255 | - if(getEnumerableProperty(instance, property) !== undefined){ | |
| 256 | - var res = this.validateSchema(property, subschema, options, ctx.makeChild(subschema)); | |
| 257 | - result.importErrors(res); | |
| 258 | - } | |
| 259 | - } | |
| 180 | +//#endregion | |
| 181 | +//#region packages/packages/libs/editor-props/src/prop-types/video-attachment-id.ts | |
| 182 | + var videoAttachmentIdPropType = createPropUtils("video-attachment-id", _elementor_schema.z.number()); | |
| 260 | 183 | |
| 261 | - return result; | |
| 262 | -}; | |
| 184 | +//#endregion | |
| 185 | +//#region packages/packages/libs/editor-props/src/prop-types/video-src.ts | |
| 186 | + var videoSrcPropTypeUtil = createPropUtils("video-src", _elementor_schema.z.strictObject({ | |
| 187 | + id: unknownChildrenSchema, | |
| 188 | + url: _elementor_schema.z.literal(null).optional() | |
| 189 | + }).or(_elementor_schema.z.strictObject({ | |
| 190 | + id: _elementor_schema.z.literal(null).optional(), | |
| 191 | + url: unknownChildrenSchema | |
| 192 | + }))); | |
| 263 | 193 | |
| 264 | -/** | |
| 265 | - * Validates properties | |
| 266 | - * @param instance | |
| 267 | - * @param schema | |
| 268 | - * @param options | |
| 269 | - * @param ctx | |
| 270 | - * @return {String|null|ValidatorResult} | |
| 271 | - */ | |
| 272 | -validators.properties = function validateProperties (instance, schema, options, ctx) { | |
| 273 | - if(!this.types.object(instance)) return; | |
| 274 | - var result = new ValidatorResult(instance, schema, options, ctx); | |
| 275 | - var properties = schema.properties || {}; | |
| 276 | - for (var property in properties) { | |
| 277 | - var subschema = properties[property]; | |
| 278 | - if(subschema===undefined){ | |
| 279 | - continue; | |
| 280 | - }else if(subschema===null){ | |
| 281 | - throw new SchemaError('Unexpected null, expected schema in "properties"'); | |
| 282 | - } | |
| 283 | - if (typeof options.preValidateProperty == 'function') { | |
| 284 | - options.preValidateProperty(instance, property, subschema, options, ctx); | |
| 285 | - } | |
| 286 | - var prop = getEnumerableProperty(instance, property); | |
| 287 | - var res = this.validateSchema(prop, subschema, options, ctx.makeChild(subschema, property)); | |
| 288 | - if(res.instance !== result.instance[property]) result.instance[property] = res.instance; | |
| 289 | - result.importErrors(res); | |
| 290 | - } | |
| 291 | - return result; | |
| 292 | -}; | |
| 194 | +//#endregion | |
| 195 | +//#region packages/packages/libs/editor-props/src/prop-types/dimensions.ts | |
| 196 | + var dimensionsPropTypeUtil = createPropUtils("dimensions", _elementor_schema.z.strictObject({ | |
| 197 | + "block-start": unknownChildrenSchema, | |
| 198 | + "block-end": unknownChildrenSchema, | |
| 199 | + "inline-start": unknownChildrenSchema, | |
| 200 | + "inline-end": unknownChildrenSchema | |
| 201 | + })); | |
| 293 | 202 | |
| 294 | -/** | |
| 295 | - * Test a specific property within in instance against the additionalProperties schema attribute | |
| 296 | - * This ignores properties with definitions in the properties schema attribute, but no other attributes. | |
| 297 | - * If too many more types of property-existence tests pop up they may need their own class of tests (like `type` has) | |
| 298 | - * @private | |
| 299 | - * @return {boolean} | |
| 300 | - */ | |
| 301 | -function testAdditionalProperty (instance, schema, options, ctx, property, result) { | |
| 302 | - if(!this.types.object(instance)) return; | |
| 303 | - if (schema.properties && schema.properties[property] !== undefined) { | |
| 304 | - return; | |
| 305 | - } | |
| 306 | - if (schema.additionalProperties === false) { | |
| 307 | - result.addError({ | |
| 308 | - name: 'additionalProperties', | |
| 309 | - argument: property, | |
| 310 | - message: "is not allowed to have the additional property " + JSON.stringify(property), | |
| 311 | - }); | |
| 312 | - } else { | |
| 313 | - var additionalProperties = schema.additionalProperties || {}; | |
| 203 | +//#endregion | |
| 204 | +//#region packages/packages/libs/editor-props/src/prop-types/number.ts | |
| 205 | + var numberPropTypeUtil = createPropUtils("number", _elementor_schema.z.number().nullable()); | |
| 314 | 206 | |
| 315 | - if (typeof options.preValidateProperty == 'function') { | |
| 316 | - options.preValidateProperty(instance, property, additionalProperties, options, ctx); | |
| 317 | - } | |
| 207 | +//#endregion | |
| 208 | +//#region packages/packages/libs/editor-props/src/prop-types/size.ts | |
| 209 | + var sizeNumberOrEmpty = _elementor_schema.z.union([_elementor_schema.z.number(), _elementor_schema.z.literal("")]); | |
| 210 | + var sizePropTypeUtil = createPropUtils("size", _elementor_schema.z.strictObject({ | |
| 211 | + unit: _elementor_schema.z.enum([ | |
| 212 | + "px", | |
| 213 | + "em", | |
| 214 | + "rem", | |
| 215 | + "%", | |
| 216 | + "vw", | |
| 217 | + "vh", | |
| 218 | + "ch", | |
| 219 | + "fr" | |
| 220 | + ]), | |
| 221 | + size: sizeNumberOrEmpty | |
| 222 | + }).or(_elementor_schema.z.strictObject({ | |
| 223 | + unit: _elementor_schema.z.enum([ | |
| 224 | + "deg", | |
| 225 | + "rad", | |
| 226 | + "grad", | |
| 227 | + "turn" | |
| 228 | + ]), | |
| 229 | + size: sizeNumberOrEmpty | |
| 230 | + })).or(_elementor_schema.z.strictObject({ | |
| 231 | + unit: _elementor_schema.z.enum(["s", "ms"]), | |
| 232 | + size: sizeNumberOrEmpty | |
| 233 | + })).or(_elementor_schema.z.strictObject({ | |
| 234 | + unit: _elementor_schema.z.literal("auto"), | |
| 235 | + size: _elementor_schema.z.literal("") | |
| 236 | + })).or(_elementor_schema.z.strictObject({ | |
| 237 | + unit: _elementor_schema.z.literal("custom"), | |
| 238 | + size: _elementor_schema.z.string() | |
| 239 | + }))); | |
| 318 | 240 | |
| 319 | - var res = this.validateSchema(instance[property], additionalProperties, options, ctx.makeChild(additionalProperties, property)); | |
| 320 | - if(res.instance !== result.instance[property]) result.instance[property] = res.instance; | |
| 321 | - result.importErrors(res); | |
| 322 | - } | |
| 323 | -} | |
| 241 | +//#endregion | |
| 242 | +//#region packages/packages/libs/editor-props/src/prop-types/grid-track-size.ts | |
| 243 | + var gridTrackSizePropTypeUtil = createPropUtils("grid-track-size", _elementor_schema.z.strictObject({ | |
| 244 | + unit: _elementor_schema.z.literal("fr"), | |
| 245 | + size: _elementor_schema.z.union([_elementor_schema.z.number(), _elementor_schema.z.literal("")]) | |
| 246 | + }).or(_elementor_schema.z.strictObject({ | |
| 247 | + unit: _elementor_schema.z.literal("custom"), | |
| 248 | + size: _elementor_schema.z.string() | |
| 249 | + }))); | |
| 324 | 250 | |
| 325 | -/** | |
| 326 | - * Validates patternProperties | |
| 327 | - * @param instance | |
| 328 | - * @param schema | |
| 329 | - * @param options | |
| 330 | - * @param ctx | |
| 331 | - * @return {String|null|ValidatorResult} | |
| 332 | - */ | |
| 333 | -validators.patternProperties = function validatePatternProperties (instance, schema, options, ctx) { | |
| 334 | - if(!this.types.object(instance)) return; | |
| 335 | - var result = new ValidatorResult(instance, schema, options, ctx); | |
| 336 | - var patternProperties = schema.patternProperties || {}; | |
| 251 | +//#endregion | |
| 252 | +//#region packages/packages/libs/editor-props/src/prop-types/span.ts | |
| 253 | + var spanPropTypeUtil = createPropUtils("span", _elementor_schema.z.string().nullable()); | |
| 337 | 254 | |
| 338 | - for (var property in instance) { | |
| 339 | - var test = true; | |
| 340 | - for (var pattern in patternProperties) { | |
| 341 | - var subschema = patternProperties[pattern]; | |
| 342 | - if(subschema===undefined){ | |
| 343 | - continue; | |
| 344 | - }else if(subschema===null){ | |
| 345 | - throw new SchemaError('Unexpected null, expected schema in "patternProperties"'); | |
| 346 | - } | |
| 347 | - try { | |
| 348 | - var regexp = new RegExp(pattern, 'u'); | |
| 349 | - } catch(_e) { | |
| 350 | - // In the event the stricter handling causes an error, fall back on the forgiving handling | |
| 351 | - // DEPRECATED | |
| 352 | - regexp = new RegExp(pattern); | |
| 353 | - } | |
| 354 | - if (!regexp.test(property)) { | |
| 355 | - continue; | |
| 356 | - } | |
| 357 | - test = false; | |
| 255 | +//#endregion | |
| 256 | +//#region packages/packages/libs/editor-props/src/prop-types/string.ts | |
| 257 | + var stringPropTypeUtil = createPropUtils("string", _elementor_schema.z.string().nullable()); | |
| 358 | 258 | |
| 359 | - if (typeof options.preValidateProperty == 'function') { | |
| 360 | - options.preValidateProperty(instance, property, subschema, options, ctx); | |
| 361 | - } | |
| 259 | +//#endregion | |
| 260 | +//#region packages/packages/libs/editor-props/src/prop-types/string-array.ts | |
| 261 | + var stringArrayPropTypeUtil = createArrayPropUtils(stringPropTypeUtil.key, stringPropTypeUtil.schema); | |
| 362 | 262 | |
| 363 | - var res = this.validateSchema(instance[property], subschema, options, ctx.makeChild(subschema, property)); | |
| 364 | - if(res.instance !== result.instance[property]) result.instance[property] = res.instance; | |
| 365 | - result.importErrors(res); | |
| 366 | - } | |
| 367 | - if (test) { | |
| 368 | - testAdditionalProperty.call(this, instance, schema, options, ctx, property, result); | |
| 369 | - } | |
| 370 | - } | |
| 263 | +//#endregion | |
| 264 | +//#region packages/packages/libs/editor-props/src/prop-types/stroke.ts | |
| 265 | + var strokePropTypeUtil = createPropUtils("stroke", _elementor_schema.z.strictObject({ | |
| 266 | + color: unknownChildrenSchema, | |
| 267 | + width: unknownChildrenSchema | |
| 268 | + })); | |
| 371 | 269 | |
| 372 | - return result; | |
| 373 | -}; | |
| 270 | +//#endregion | |
| 271 | +//#region packages/packages/libs/editor-props/src/prop-types/url.ts | |
| 272 | + var urlPropTypeUtil = createPropUtils("url", _elementor_schema.z.string().nullable()); | |
| 374 | 273 | |
| 375 | -/** | |
| 376 | - * Validates additionalProperties | |
| 377 | - * @param instance | |
| 378 | - * @param schema | |
| 379 | - * @param options | |
| 380 | - * @param ctx | |
| 381 | - * @return {String|null|ValidatorResult} | |
| 382 | - */ | |
| 383 | -validators.additionalProperties = function validateAdditionalProperties (instance, schema, options, ctx) { | |
| 384 | - if(!this.types.object(instance)) return; | |
| 385 | - // if patternProperties is defined then we'll test when that one is called instead | |
| 386 | - if (schema.patternProperties) { | |
| 387 | - return null; | |
| 388 | - } | |
| 389 | - var result = new ValidatorResult(instance, schema, options, ctx); | |
| 390 | - for (var property in instance) { | |
| 391 | - testAdditionalProperty.call(this, instance, schema, options, ctx, property, result); | |
| 392 | - } | |
| 393 | - return result; | |
| 394 | -}; | |
| 274 | +//#endregion | |
| 275 | +//#region packages/packages/libs/editor-props/src/prop-types/layout-direction.ts | |
| 276 | + var layoutDirectionPropTypeUtil = createPropUtils("layout-direction", _elementor_schema.z.object({ | |
| 277 | + row: _elementor_schema.z.any(), | |
| 278 | + column: _elementor_schema.z.any() | |
| 279 | + })); | |
| 395 | 280 | |
| 396 | -/** | |
| 397 | - * Validates whether the instance value is at least of a certain length, when the instance value is a string. | |
| 398 | - * @param instance | |
| 399 | - * @param schema | |
| 400 | - * @return {String|null} | |
| 401 | - */ | |
| 402 | -validators.minProperties = function validateMinProperties (instance, schema, options, ctx) { | |
| 403 | - if (!this.types.object(instance)) return; | |
| 404 | - var result = new ValidatorResult(instance, schema, options, ctx); | |
| 405 | - var keys = Object.keys(instance); | |
| 406 | - if (!(keys.length >= schema.minProperties)) { | |
| 407 | - result.addError({ | |
| 408 | - name: 'minProperties', | |
| 409 | - argument: schema.minProperties, | |
| 410 | - message: "does not meet minimum property length of " + schema.minProperties, | |
| 411 | - }); | |
| 412 | - } | |
| 413 | - return result; | |
| 414 | -}; | |
| 281 | +//#endregion | |
| 282 | +//#region packages/packages/libs/editor-props/src/prop-types/link.ts | |
| 283 | + var linkPropTypeUtil = createPropUtils("link", _elementor_schema.z.strictObject({ | |
| 284 | + destination: unknownChildrenSchema, | |
| 285 | + isTargetBlank: unknownChildrenSchema, | |
| 286 | + tag: unknownChildrenSchema | |
| 287 | + })); | |
| 415 | 288 | |
| 416 | -/** | |
| 417 | - * Validates whether the instance value is at most of a certain length, when the instance value is a string. | |
| 418 | - * @param instance | |
| 419 | - * @param schema | |
| 420 | - * @return {String|null} | |
| 421 | - */ | |
| 422 | -validators.maxProperties = function validateMaxProperties (instance, schema, options, ctx) { | |
| 423 | - if (!this.types.object(instance)) return; | |
| 424 | - var result = new ValidatorResult(instance, schema, options, ctx); | |
| 425 | - var keys = Object.keys(instance); | |
| 426 | - if (!(keys.length <= schema.maxProperties)) { | |
| 427 | - result.addError({ | |
| 428 | - name: 'maxProperties', | |
| 429 | - argument: schema.maxProperties, | |
| 430 | - message: "does not meet maximum property length of " + schema.maxProperties, | |
| 431 | - }); | |
| 432 | - } | |
| 433 | - return result; | |
| 434 | -}; | |
| 289 | +//#endregion | |
| 290 | +//#region packages/packages/libs/editor-props/src/prop-types/email.ts | |
| 291 | + var emailPropTypeUtil = createPropUtils("email", _elementor_schema.z.strictObject({ | |
| 292 | + to: unknownChildrenSchema, | |
| 293 | + subject: unknownChildrenSchema, | |
| 294 | + message: unknownChildrenSchema, | |
| 295 | + from: unknownChildrenSchema, | |
| 296 | + "meta-data": unknownChildrenSchema, | |
| 297 | + "send-as": unknownChildrenSchema, | |
| 298 | + "from-name": unknownChildrenSchema, | |
| 299 | + "reply-to": unknownChildrenSchema, | |
| 300 | + cc: unknownChildrenSchema, | |
| 301 | + bcc: unknownChildrenSchema | |
| 302 | + })); | |
| 435 | 303 | |
| 436 | -/** | |
| 437 | - * Validates items when instance is an array | |
| 438 | - * @param instance | |
| 439 | - * @param schema | |
| 440 | - * @param options | |
| 441 | - * @param ctx | |
| 442 | - * @return {String|null|ValidatorResult} | |
| 443 | - */ | |
| 444 | -validators.items = function validateItems (instance, schema, options, ctx) { | |
| 445 | - var self = this; | |
| 446 | - if (!this.types.array(instance)) return; | |
| 447 | - if (schema.items===undefined) return; | |
| 448 | - var result = new ValidatorResult(instance, schema, options, ctx); | |
| 449 | - instance.every(function (value, i) { | |
| 450 | - if(Array.isArray(schema.items)){ | |
| 451 | - var items = schema.items[i]===undefined ? schema.additionalItems : schema.items[i]; | |
| 452 | - }else{ | |
| 453 | - var items = schema.items; | |
| 454 | - } | |
| 455 | - if (items === undefined) { | |
| 456 | - return true; | |
| 457 | - } | |
| 458 | - if (items === false) { | |
| 459 | - result.addError({ | |
| 460 | - name: 'items', | |
| 461 | - message: "additionalItems not permitted", | |
| 462 | - }); | |
| 463 | - return false; | |
| 464 | - } | |
| 465 | - var res = self.validateSchema(value, items, options, ctx.makeChild(items, i)); | |
| 466 | - if(res.instance !== result.instance[i]) result.instance[i] = res.instance; | |
| 467 | - result.importErrors(res); | |
| 468 | - return true; | |
| 469 | - }); | |
| 470 | - return result; | |
| 471 | -}; | |
| 304 | +//#endregion | |
| 305 | +//#region packages/packages/libs/editor-props/src/prop-types/emails.ts | |
| 306 | + var emailsPropTypeUtil = createPropUtils("emails", _elementor_schema.z.strictObject({ | |
| 307 | + to: unknownChildrenSchema, | |
| 308 | + subject: unknownChildrenSchema, | |
| 309 | + message: unknownChildrenSchema, | |
| 310 | + from: unknownChildrenSchema, | |
| 311 | + "meta-data": unknownChildrenSchema, | |
| 312 | + "send-as": unknownChildrenSchema, | |
| 313 | + "from-name": unknownChildrenSchema, | |
| 314 | + "reply-to": unknownChildrenSchema, | |
| 315 | + cc: unknownChildrenSchema, | |
| 316 | + bcc: unknownChildrenSchema | |
| 317 | + })); | |
| 472 | 318 | |
| 473 | -/** | |
| 474 | - * Validates the "contains" keyword | |
| 475 | - * @param instance | |
| 476 | - * @param schema | |
| 477 | - * @param options | |
| 478 | - * @param ctx | |
| 479 | - * @return {String|null|ValidatorResult} | |
| 480 | - */ | |
| 481 | -validators.contains = function validateContains (instance, schema, options, ctx) { | |
| 482 | - var self = this; | |
| 483 | - if (!this.types.array(instance)) return; | |
| 484 | - if (schema.contains===undefined) return; | |
| 485 | - if (!helpers.isSchema(schema.contains)) throw new Error('Expected "contains" keyword to be a schema'); | |
| 486 | - var result = new ValidatorResult(instance, schema, options, ctx); | |
| 487 | - var count = instance.some(function (value, i) { | |
| 488 | - var res = self.validateSchema(value, schema.contains, options, ctx.makeChild(schema.contains, i)); | |
| 489 | - return res.errors.length===0; | |
| 490 | - }); | |
| 491 | - if(count===false){ | |
| 492 | - result.addError({ | |
| 493 | - name: 'contains', | |
| 494 | - argument: schema.contains, | |
| 495 | - message: "must contain an item matching given schema", | |
| 496 | - }); | |
| 497 | - } | |
| 498 | - return result; | |
| 499 | -}; | |
| 319 | +//#endregion | |
| 320 | +//#region packages/packages/libs/editor-props/src/prop-types/key-value.ts | |
| 321 | + var keyValuePropTypeUtil = createPropUtils("key-value", _elementor_schema.z.strictObject({ | |
| 322 | + key: unknownChildrenSchema, | |
| 323 | + value: unknownChildrenSchema | |
| 324 | + })); | |
| 500 | 325 | |
| 501 | -/** | |
| 502 | - * Validates minimum and exclusiveMinimum when the type of the instance value is a number. | |
| 503 | - * @param instance | |
| 504 | - * @param schema | |
| 505 | - * @return {String|null} | |
| 506 | - */ | |
| 507 | -validators.minimum = function validateMinimum (instance, schema, options, ctx) { | |
| 508 | - if (!this.types.number(instance)) return; | |
| 509 | - var result = new ValidatorResult(instance, schema, options, ctx); | |
| 510 | - if (schema.exclusiveMinimum && schema.exclusiveMinimum === true) { | |
| 511 | - if(!(instance > schema.minimum)){ | |
| 512 | - result.addError({ | |
| 513 | - name: 'minimum', | |
| 514 | - argument: schema.minimum, | |
| 515 | - message: "must be greater than " + schema.minimum, | |
| 516 | - }); | |
| 517 | - } | |
| 518 | - } else { | |
| 519 | - if(!(instance >= schema.minimum)){ | |
| 520 | - result.addError({ | |
| 521 | - name: 'minimum', | |
| 522 | - argument: schema.minimum, | |
| 523 | - message: "must be greater than or equal to " + schema.minimum, | |
| 524 | - }); | |
| 525 | - } | |
| 526 | - } | |
| 527 | - return result; | |
| 528 | -}; | |
| 326 | +//#endregion | |
| 327 | +//#region packages/packages/libs/editor-props/src/prop-types/selection-size.ts | |
| 328 | + var selectionSizePropTypeUtil = createPropUtils("selection-size", _elementor_schema.z.strictObject({ | |
| 329 | + selection: _elementor_schema.z.union([keyValuePropTypeUtil.schema, stringPropTypeUtil.schema]), | |
| 330 | + size: unknownChildrenSchema | |
| 331 | + })); | |
| 529 | 332 | |
| 530 | -/** | |
| 531 | - * Validates maximum and exclusiveMaximum when the type of the instance value is a number. | |
| 532 | - * @param instance | |
| 533 | - * @param schema | |
| 534 | - * @return {String|null} | |
| 535 | - */ | |
| 536 | -validators.maximum = function validateMaximum (instance, schema, options, ctx) { | |
| 537 | - if (!this.types.number(instance)) return; | |
| 538 | - var result = new ValidatorResult(instance, schema, options, ctx); | |
| 539 | - if (schema.exclusiveMaximum && schema.exclusiveMaximum === true) { | |
| 540 | - if(!(instance < schema.maximum)){ | |
| 541 | - result.addError({ | |
| 542 | - name: 'maximum', | |
| 543 | - argument: schema.maximum, | |
| 544 | - message: "must be less than " + schema.maximum, | |
| 545 | - }); | |
| 546 | - } | |
| 547 | - } else { | |
| 548 | - if(!(instance <= schema.maximum)){ | |
| 549 | - result.addError({ | |
| 550 | - name: 'maximum', | |
| 551 | - argument: schema.maximum, | |
| 552 | - message: "must be less than or equal to " + schema.maximum, | |
| 553 | - }); | |
| 554 | - } | |
| 555 | - } | |
| 556 | - return result; | |
| 557 | -}; | |
| 333 | +//#endregion | |
| 334 | +//#region packages/packages/libs/editor-props/src/prop-types/background-prop-types/background.ts | |
| 335 | + var backgroundPropTypeUtil = createPropUtils("background", _elementor_schema.z.strictObject({ | |
| 336 | + color: unknownChildrenSchema, | |
| 337 | + clip: unknownChildrenSchema, | |
| 338 | + "background-overlay": unknownChildrenSchema | |
| 339 | + })); | |
| 558 | 340 | |
| 559 | -/** | |
| 560 | - * Validates the number form of exclusiveMinimum when the type of the instance value is a number. | |
| 561 | - * @param instance | |
| 562 | - * @param schema | |
| 563 | - * @return {String|null} | |
| 564 | - */ | |
| 565 | -validators.exclusiveMinimum = function validateExclusiveMinimum (instance, schema, options, ctx) { | |
| 566 | - // Support the boolean form of exclusiveMinimum, which is handled by the "minimum" keyword. | |
| 567 | - if(typeof schema.exclusiveMinimum === 'boolean') return; | |
| 568 | - if (!this.types.number(instance)) return; | |
| 569 | - var result = new ValidatorResult(instance, schema, options, ctx); | |
| 570 | - var valid = instance > schema.exclusiveMinimum; | |
| 571 | - if (!valid) { | |
| 572 | - result.addError({ | |
| 573 | - name: 'exclusiveMinimum', | |
| 574 | - argument: schema.exclusiveMinimum, | |
| 575 | - message: "must be strictly greater than " + schema.exclusiveMinimum, | |
| 576 | - }); | |
| 577 | - } | |
| 578 | - return result; | |
| 579 | -}; | |
| 341 | +//#endregion | |
| 342 | +//#region packages/packages/libs/editor-props/src/prop-types/background-prop-types/background-color-overlay.ts | |
| 343 | + var backgroundColorOverlayPropTypeUtil = createPropUtils("background-color-overlay", unknownChildrenSchema); | |
| 580 | 344 | |
| 581 | -/** | |
| 582 | - * Validates the number form of exclusiveMaximum when the type of the instance value is a number. | |
| 583 | - * @param instance | |
| 584 | - * @param schema | |
| 585 | - * @return {String|null} | |
| 586 | - */ | |
| 587 | -validators.exclusiveMaximum = function validateExclusiveMaximum (instance, schema, options, ctx) { | |
| 588 | - // Support the boolean form of exclusiveMaximum, which is handled by the "maximum" keyword. | |
| 589 | - if(typeof schema.exclusiveMaximum === 'boolean') return; | |
| 590 | - if (!this.types.number(instance)) return; | |
| 591 | - var result = new ValidatorResult(instance, schema, options, ctx); | |
| 592 | - var valid = instance < schema.exclusiveMaximum; | |
| 593 | - if (!valid) { | |
| 594 | - result.addError({ | |
| 595 | - name: 'exclusiveMaximum', | |
| 596 | - argument: schema.exclusiveMaximum, | |
| 597 | - message: "must be strictly less than " + schema.exclusiveMaximum, | |
| 598 | - }); | |
| 599 | - } | |
| 600 | - return result; | |
| 601 | -}; | |
| 345 | +//#endregion | |
| 346 | +//#region packages/packages/libs/editor-props/src/prop-types/background-prop-types/background-gradient-overlay.ts | |
| 347 | + var backgroundGradientOverlayPropTypeUtil = createPropUtils("background-gradient-overlay", unknownChildrenSchema); | |
| 602 | 348 | |
| 603 | -/** | |
| 604 | - * Perform validation for multipleOf and divisibleBy, which are essentially the same. | |
| 605 | - * @param instance | |
| 606 | - * @param schema | |
| 607 | - * @param validationType | |
| 608 | - * @param errorMessage | |
| 609 | - * @returns {String|null} | |
| 610 | - */ | |
| 611 | -var validateMultipleOfOrDivisbleBy = function validateMultipleOfOrDivisbleBy (instance, schema, options, ctx, validationType, errorMessage) { | |
| 612 | - if (!this.types.number(instance)) return; | |
| 349 | +//#endregion | |
| 350 | +//#region packages/packages/libs/editor-props/src/prop-types/background-prop-types/background-image-overlay.ts | |
| 351 | + var backgroundImageOverlayPropTypeUtil = createPropUtils("background-image-overlay", unknownChildrenSchema); | |
| 613 | 352 | |
| 614 | - var validationArgument = schema[validationType]; | |
| 615 | - if (validationArgument == 0) { | |
| 616 | - throw new SchemaError(validationType + " cannot be zero"); | |
| 617 | - } | |
| 353 | +//#endregion | |
| 354 | +//#region packages/packages/libs/editor-props/src/prop-types/background-prop-types/background-overlay.ts | |
| 355 | + var backgroundOverlayItem = backgroundColorOverlayPropTypeUtil.schema.or(backgroundGradientOverlayPropTypeUtil.schema).or(backgroundImageOverlayPropTypeUtil.schema); | |
| 356 | + var backgroundOverlayPropTypeUtil = createPropUtils("background-overlay", _elementor_schema.z.array(backgroundOverlayItem)); | |
| 618 | 357 | |
| 619 | - var result = new ValidatorResult(instance, schema, options, ctx); | |
| 358 | +//#endregion | |
| 359 | +//#region packages/packages/libs/editor-props/src/prop-types/background-prop-types/background-image-position-offset.ts | |
| 360 | + var backgroundImagePositionOffsetPropTypeUtil = createPropUtils("background-image-position-offset", unknownChildrenSchema); | |
| 620 | 361 | |
| 621 | - var instanceDecimals = helpers.getDecimalPlaces(instance); | |
| 622 | - var divisorDecimals = helpers.getDecimalPlaces(validationArgument); | |
| 362 | +//#endregion | |
| 363 | +//#region packages/packages/libs/editor-props/src/prop-types/background-prop-types/background-image-size-scale.ts | |
| 364 | + var backgroundImageSizeScalePropTypeUtil = createPropUtils("background-image-size-scale", unknownChildrenSchema); | |
| 623 | 365 | |
| 624 | - var maxDecimals = Math.max(instanceDecimals , divisorDecimals); | |
| 625 | - var multiplier = Math.pow(10, maxDecimals); | |
| 366 | +//#endregion | |
| 367 | +//#region packages/packages/libs/editor-props/src/prop-types/boolean.ts | |
| 368 | + var booleanPropTypeUtil = createPropUtils("boolean", _elementor_schema.z.boolean().nullable()); | |
| 626 | 369 | |
| 627 | - if (Math.round(instance * multiplier) % Math.round(validationArgument * multiplier) !== 0) { | |
| 628 | - result.addError({ | |
| 629 | - name: validationType, | |
| 630 | - argument: validationArgument, | |
| 631 | - message: errorMessage + JSON.stringify(validationArgument), | |
| 632 | - }); | |
| 633 | - } | |
| 370 | +//#endregion | |
| 371 | +//#region packages/packages/libs/editor-props/src/prop-types/color-stop.ts | |
| 372 | + var colorStopPropTypeUtil = createPropUtils("color-stop", _elementor_schema.z.strictObject({ | |
| 373 | + color: unknownChildrenSchema, | |
| 374 | + offset: unknownChildrenSchema | |
| 375 | + })); | |
| 634 | 376 | |
| 635 | - return result; | |
| 636 | -}; | |
| 377 | +//#endregion | |
| 378 | +//#region packages/packages/libs/editor-props/src/prop-types/gradient-color-stop.ts | |
| 379 | + var gradientColorStopPropTypeUtil = createPropUtils("gradient-color-stop", _elementor_schema.z.array(colorStopPropTypeUtil.schema)); | |
| 637 | 380 | |
| 638 | -/** | |
| 639 | - * Validates divisibleBy when the type of the instance value is a number. | |
| 640 | - * @param instance | |
| 641 | - * @param schema | |
| 642 | - * @return {String|null} | |
| 643 | - */ | |
| 644 | -validators.multipleOf = function validateMultipleOf (instance, schema, options, ctx) { | |
| 645 | - return validateMultipleOfOrDivisbleBy.call(this, instance, schema, options, ctx, "multipleOf", "is not a multiple of (divisible by) "); | |
| 646 | -}; | |
| 381 | +//#endregion | |
| 382 | +//#region packages/packages/libs/editor-props/src/prop-types/number-range.ts | |
| 383 | + var numberRangePropTypeUtil = createPropUtils("number-range", _elementor_schema.z.strictObject({ | |
| 384 | + min: unknownChildrenSchema, | |
| 385 | + max: unknownChildrenSchema | |
| 386 | + })); | |
| 647 | 387 | |
| 648 | -/** | |
| 649 | - * Validates multipleOf when the type of the instance value is a number. | |
| 650 | - * @param instance | |
| 651 | - * @param schema | |
| 652 | - * @return {String|null} | |
| 653 | - */ | |
| 654 | -validators.divisibleBy = function validateDivisibleBy (instance, schema, options, ctx) { | |
| 655 | - return validateMultipleOfOrDivisbleBy.call(this, instance, schema, options, ctx, "divisibleBy", "is not divisible by (multiple of) "); | |
| 656 | -}; | |
| 388 | +//#endregion | |
| 389 | +//#region packages/packages/libs/editor-props/src/prop-types/date-time.ts | |
| 390 | + var DateTimePropTypeUtil = createPropUtils("date-time", _elementor_schema.z.strictObject({ | |
| 391 | + date: unknownChildrenSchema, | |
| 392 | + time: unknownChildrenSchema | |
| 393 | + })); | |
| 657 | 394 | |
| 658 | -/** | |
| 659 | - * Validates whether the instance value is present. | |
| 660 | - * @param instance | |
| 661 | - * @param schema | |
| 662 | - * @return {String|null} | |
| 663 | - */ | |
| 664 | -validators.required = function validateRequired (instance, schema, options, ctx) { | |
| 665 | - var result = new ValidatorResult(instance, schema, options, ctx); | |
| 666 | - if (instance === undefined && schema.required === true) { | |
| 667 | - // A boolean form is implemented for reverse-compatibility with schemas written against older drafts | |
| 668 | - result.addError({ | |
| 669 | - name: 'required', | |
| 670 | - message: "is required", | |
| 671 | - }); | |
| 672 | - } else if (this.types.object(instance) && Array.isArray(schema.required)) { | |
| 673 | - schema.required.forEach(function(n){ | |
| 674 | - if(getEnumerableProperty(instance, n)===undefined){ | |
| 675 | - result.addError({ | |
| 676 | - name: 'required', | |
| 677 | - argument: n, | |
| 678 | - message: "requires property " + JSON.stringify(n), | |
| 679 | - }); | |
| 680 | - } | |
| 681 | - }); | |
| 682 | - } | |
| 683 | - return result; | |
| 684 | -}; | |
| 395 | +//#endregion | |
| 396 | +//#region packages/packages/libs/editor-props/src/prop-types/position.ts | |
| 397 | + var positionPropTypeUtil = createPropUtils("object-position", _elementor_schema.z.strictObject({ | |
| 398 | + x: unknownChildrenSchema, | |
| 399 | + y: unknownChildrenSchema | |
| 400 | + })); | |
| 685 | 401 | |
| 686 | -/** | |
| 687 | - * Validates whether the instance value matches the regular expression, when the instance value is a string. | |
| 688 | - * @param instance | |
| 689 | - * @param schema | |
| 690 | - * @return {String|null} | |
| 691 | - */ | |
| 692 | -validators.pattern = function validatePattern (instance, schema, options, ctx) { | |
| 693 | - if (!this.types.string(instance)) return; | |
| 694 | - var result = new ValidatorResult(instance, schema, options, ctx); | |
| 695 | - var pattern = schema.pattern; | |
| 696 | - try { | |
| 697 | - var regexp = new RegExp(pattern, 'u'); | |
| 698 | - } catch(_e) { | |
| 699 | - // In the event the stricter handling causes an error, fall back on the forgiving handling | |
| 700 | - // DEPRECATED | |
| 701 | - regexp = new RegExp(pattern); | |
| 702 | - } | |
| 703 | - if (!instance.match(regexp)) { | |
| 704 | - result.addError({ | |
| 705 | - name: 'pattern', | |
| 706 | - argument: schema.pattern, | |
| 707 | - message: "does not match pattern " + JSON.stringify(schema.pattern.toString()), | |
| 708 | - }); | |
| 709 | - } | |
| 710 | - return result; | |
| 711 | -}; | |
| 402 | +//#endregion | |
| 403 | +//#region packages/packages/libs/editor-props/src/prop-types/query.ts | |
| 404 | + var queryPropTypeUtil = createPropUtils("query", _elementor_schema.z.strictObject({ | |
| 405 | + id: unknownChildrenSchema, | |
| 406 | + label: unknownChildrenSchema | |
| 407 | + })); | |
| 712 | 408 | |
| 713 | -/** | |
| 714 | - * Validates whether the instance value is of a certain defined format or a custom | |
| 715 | - * format. | |
| 716 | - * The following formats are supported for string types: | |
| 717 | - * - date-time | |
| 718 | - * - date | |
| 719 | - * - time | |
| 720 | - * - ip-address | |
| 721 | - * - ipv6 | |
| 722 | - * - uri | |
| 723 | - * - color | |
| 724 | - * - host-name | |
| 725 | - * - alpha | |
| 726 | - * - alpha-numeric | |
| 727 | - * - utc-millisec | |
| 728 | - * @param instance | |
| 729 | - * @param schema | |
| 730 | - * @param [options] | |
| 731 | - * @param [ctx] | |
| 732 | - * @return {String|null} | |
| 733 | - */ | |
| 734 | -validators.format = function validateFormat (instance, schema, options, ctx) { | |
| 735 | - if (instance===undefined) return; | |
| 736 | - var result = new ValidatorResult(instance, schema, options, ctx); | |
| 737 | - if (!result.disableFormat && !helpers.isFormat(instance, schema.format, this)) { | |
| 738 | - result.addError({ | |
| 739 | - name: 'format', | |
| 740 | - argument: schema.format, | |
| 741 | - message: "does not conform to the " + JSON.stringify(schema.format) + " format", | |
| 742 | - }); | |
| 743 | - } | |
| 744 | - return result; | |
| 745 | -}; | |
| 409 | +//#endregion | |
| 410 | +//#region packages/packages/libs/editor-props/src/prop-types/query-filter.ts | |
| 411 | + var queryFilterPropTypeUtil = createPropUtils("query-filter", _elementor_schema.z.strictObject({ | |
| 412 | + key: unknownChildrenSchema, | |
| 413 | + values: unknownChildrenSchema, | |
| 414 | + taxonomies: unknownChildrenSchema | |
| 415 | + })); | |
| 416 | + var queryFilterArrayPropTypeUtil = createArrayPropUtils(queryFilterPropTypeUtil.key, queryFilterPropTypeUtil.schema); | |
| 746 | 417 | |
| 747 | -/** | |
| 748 | - * Validates whether the instance value is at least of a certain length, when the instance value is a string. | |
| 749 | - * @param instance | |
| 750 | - * @param schema | |
| 751 | - * @return {String|null} | |
| 752 | - */ | |
| 753 | -validators.minLength = function validateMinLength (instance, schema, options, ctx) { | |
| 754 | - if (!this.types.string(instance)) return; | |
| 755 | - var result = new ValidatorResult(instance, schema, options, ctx); | |
| 756 | - var hsp = instance.match(/[\uDC00-\uDFFF]/g); | |
| 757 | - var length = instance.length - (hsp ? hsp.length : 0); | |
| 758 | - if (!(length >= schema.minLength)) { | |
| 759 | - result.addError({ | |
| 760 | - name: 'minLength', | |
| 761 | - argument: schema.minLength, | |
| 762 | - message: "does not meet minimum length of " + schema.minLength, | |
| 763 | - }); | |
| 764 | - } | |
| 765 | - return result; | |
| 766 | -}; | |
| 418 | +//#endregion | |
| 419 | +//#region packages/packages/libs/editor-props/src/prop-types/html.ts | |
| 420 | + var htmlPropTypeUtil = createPropUtils("html", _elementor_schema.z.string().nullable()); | |
| 767 | 421 | |
| 768 | -/** | |
| 769 | - * Validates whether the instance value is at most of a certain length, when the instance value is a string. | |
| 770 | - * @param instance | |
| 771 | - * @param schema | |
| 772 | - * @return {String|null} | |
| 773 | - */ | |
| 774 | -validators.maxLength = function validateMaxLength (instance, schema, options, ctx) { | |
| 775 | - if (!this.types.string(instance)) return; | |
| 776 | - var result = new ValidatorResult(instance, schema, options, ctx); | |
| 777 | - // TODO if this was already computed in "minLength", use that value instead of re-computing | |
| 778 | - var hsp = instance.match(/[\uDC00-\uDFFF]/g); | |
| 779 | - var length = instance.length - (hsp ? hsp.length : 0); | |
| 780 | - if (!(length <= schema.maxLength)) { | |
| 781 | - result.addError({ | |
| 782 | - name: 'maxLength', | |
| 783 | - argument: schema.maxLength, | |
| 784 | - message: "does not meet maximum length of " + schema.maxLength, | |
| 785 | - }); | |
| 786 | - } | |
| 787 | - return result; | |
| 788 | -}; | |
| 422 | +//#endregion | |
| 423 | +//#region packages/packages/libs/editor-props/src/prop-types/html-v2.ts | |
| 424 | + var childElementSchema = _elementor_schema.z.lazy(() => _elementor_schema.z.object({ | |
| 425 | + id: _elementor_schema.z.string(), | |
| 426 | + type: _elementor_schema.z.string(), | |
| 427 | + content: _elementor_schema.z.string().optional(), | |
| 428 | + children: _elementor_schema.z.array(childElementSchema).optional() | |
| 429 | + })); | |
| 430 | + var htmlV2ValueSchema = _elementor_schema.z.object({ | |
| 431 | + content: _elementor_schema.z.string().nullable(), | |
| 432 | + children: _elementor_schema.z.array(childElementSchema) | |
| 433 | + }); | |
| 434 | + var htmlV2PropTypeUtil = createPropUtils("html-v2", htmlV2ValueSchema); | |
| 789 | 435 | |
| 790 | -/** | |
| 791 | - * Validates whether instance contains at least a minimum number of items, when the instance is an Array. | |
| 792 | - * @param instance | |
| 793 | - * @param schema | |
| 794 | - * @return {String|null} | |
| 795 | - */ | |
| 796 | -validators.minItems = function validateMinItems (instance, schema, options, ctx) { | |
| 797 | - if (!this.types.array(instance)) return; | |
| 798 | - var result = new ValidatorResult(instance, schema, options, ctx); | |
| 799 | - if (!(instance.length >= schema.minItems)) { | |
| 800 | - result.addError({ | |
| 801 | - name: 'minItems', | |
| 802 | - argument: schema.minItems, | |
| 803 | - message: "does not meet minimum length of " + schema.minItems, | |
| 804 | - }); | |
| 805 | - } | |
| 806 | - return result; | |
| 807 | -}; | |
| 436 | +//#endregion | |
| 437 | +//#region packages/packages/libs/editor-props/src/prop-types/html-v3.ts | |
| 438 | + var htmlV3ValueSchema = _elementor_schema.z.object({ | |
| 439 | + content: stringPropTypeUtil.schema.nullable(), | |
| 440 | + children: _elementor_schema.z.array(_elementor_schema.z.unknown()) | |
| 441 | + }); | |
| 442 | + var htmlV3PropTypeUtil = createPropUtils("html-v3", htmlV3ValueSchema); | |
| 808 | 443 | |
| 809 | -/** | |
| 810 | - * Validates whether instance contains no more than a maximum number of items, when the instance is an Array. | |
| 811 | - * @param instance | |
| 812 | - * @param schema | |
| 813 | - * @return {String|null} | |
| 814 | - */ | |
| 815 | -validators.maxItems = function validateMaxItems (instance, schema, options, ctx) { | |
| 816 | - if (!this.types.array(instance)) return; | |
| 817 | - var result = new ValidatorResult(instance, schema, options, ctx); | |
| 818 | - if (!(instance.length <= schema.maxItems)) { | |
| 819 | - result.addError({ | |
| 820 | - name: 'maxItems', | |
| 821 | - argument: schema.maxItems, | |
| 822 | - message: "does not meet maximum length of " + schema.maxItems, | |
| 823 | - }); | |
| 824 | - } | |
| 825 | - return result; | |
| 826 | -}; | |
| 444 | +//#endregion | |
| 445 | +//#region packages/packages/libs/editor-props/src/prop-types/escaped-html.ts | |
| 446 | + var escapedHtmlPropTypeUtil = createPropUtils("escaped-html", _elementor_schema.z.string().nullable()); | |
| 827 | 447 | |
| 828 | -/** | |
| 829 | - * Deep compares arrays for duplicates | |
| 830 | - * @param v | |
| 831 | - * @param i | |
| 832 | - * @param a | |
| 833 | - * @private | |
| 834 | - * @return {boolean} | |
| 835 | - */ | |
| 836 | -function testArrays (v, i, a) { | |
| 837 | - var j, len = a.length; | |
| 838 | - for (j = i + 1, len; j < len; j++) { | |
| 839 | - if (helpers.deepCompareStrict(v, a[j])) { | |
| 840 | - return false; | |
| 841 | - } | |
| 842 | - } | |
| 843 | - return true; | |
| 844 | -} | |
| 448 | +//#endregion | |
| 449 | +//#region packages/packages/libs/editor-props/src/prop-types/filter-prop-types/drop-shadow-filter.ts | |
| 450 | + var dropShadowFilterPropTypeUtil = createPropUtils("drop-shadow", _elementor_schema.z.object({ | |
| 451 | + xAxis: unknownChildrenSchema, | |
| 452 | + yAxis: unknownChildrenSchema, | |
| 453 | + blur: unknownChildrenSchema, | |
| 454 | + color: unknownChildrenSchema | |
| 455 | + })); | |
| 845 | 456 | |
| 846 | -/** | |
| 847 | - * Validates whether there are no duplicates, when the instance is an Array. | |
| 848 | - * @param instance | |
| 849 | - * @return {String|null} | |
| 850 | - */ | |
| 851 | -validators.uniqueItems = function validateUniqueItems (instance, schema, options, ctx) { | |
| 852 | - if (schema.uniqueItems!==true) return; | |
| 853 | - if (!this.types.array(instance)) return; | |
| 854 | - var result = new ValidatorResult(instance, schema, options, ctx); | |
| 855 | - if (!instance.every(testArrays)) { | |
| 856 | - result.addError({ | |
| 857 | - name: 'uniqueItems', | |
| 858 | - message: "contains duplicate item", | |
| 859 | - }); | |
| 860 | - } | |
| 861 | - return result; | |
| 862 | -}; | |
| 457 | +//#endregion | |
| 458 | +//#region packages/packages/libs/editor-props/src/prop-types/filter-prop-types/filter-functions/blur-filter.ts | |
| 459 | + var blurFilterPropTypeUtil = createPropUtils("blur", _elementor_schema.z.strictObject({ size: unknownChildrenSchema })); | |
| 863 | 460 | |
| 864 | -/** | |
| 865 | - * Validate for the presence of dependency properties, if the instance is an object. | |
| 866 | - * @param instance | |
| 867 | - * @param schema | |
| 868 | - * @param options | |
| 869 | - * @param ctx | |
| 870 | - * @return {null|ValidatorResult} | |
| 871 | - */ | |
| 872 | -validators.dependencies = function validateDependencies (instance, schema, options, ctx) { | |
| 873 | - if (!this.types.object(instance)) return; | |
| 874 | - var result = new ValidatorResult(instance, schema, options, ctx); | |
| 875 | - for (var property in schema.dependencies) { | |
| 876 | - if (instance[property] === undefined) { | |
| 877 | - continue; | |
| 878 | - } | |
| 879 | - var dep = schema.dependencies[property]; | |
| 880 | - var childContext = ctx.makeChild(dep, property); | |
| 881 | - if (typeof dep == 'string') { | |
| 882 | - dep = [dep]; | |
| 883 | - } | |
| 884 | - if (Array.isArray(dep)) { | |
| 885 | - dep.forEach(function (prop) { | |
| 886 | - if (instance[prop] === undefined) { | |
| 887 | - result.addError({ | |
| 888 | - // FIXME there's two different "dependencies" errors here with slightly different outputs | |
| 889 | - // Can we make these the same? Or should we create different error types? | |
| 890 | - name: 'dependencies', | |
| 891 | - argument: childContext.propertyPath, | |
| 892 | - message: "property " + prop + " not found, required by " + childContext.propertyPath, | |
| 893 | - }); | |
| 894 | - } | |
| 895 | - }); | |
| 896 | - } else { | |
| 897 | - var res = this.validateSchema(instance, dep, options, childContext); | |
| 898 | - if(result.instance !== res.instance) result.instance = res.instance; | |
| 899 | - if (res && res.errors.length) { | |
| 900 | - result.addError({ | |
| 901 | - name: 'dependencies', | |
| 902 | - argument: childContext.propertyPath, | |
| 903 | - message: "does not meet dependency required by " + childContext.propertyPath, | |
| 904 | - }); | |
| 905 | - result.importErrors(res); | |
| 906 | - } | |
| 907 | - } | |
| 908 | - } | |
| 909 | - return result; | |
| 910 | -}; | |
| 461 | +//#endregion | |
| 462 | +//#region packages/packages/libs/editor-props/src/prop-types/filter-prop-types/filter-functions/color-tone-filter.ts | |
| 463 | + var colorToneFilterPropTypeUtil = createPropUtils("color-tone", _elementor_schema.z.strictObject({ size: unknownChildrenSchema })); | |
| 911 | 464 | |
| 912 | -/** | |
| 913 | - * Validates whether the instance value is one of the enumerated values. | |
| 914 | - * | |
| 915 | - * @param instance | |
| 916 | - * @param schema | |
| 917 | - * @return {ValidatorResult|null} | |
| 918 | - */ | |
| 919 | -validators['enum'] = function validateEnum (instance, schema, options, ctx) { | |
| 920 | - if (instance === undefined) { | |
| 921 | - return null; | |
| 922 | - } | |
| 923 | - if (!Array.isArray(schema['enum'])) { | |
| 924 | - throw new SchemaError("enum expects an array", schema); | |
| 925 | - } | |
| 926 | - var result = new ValidatorResult(instance, schema, options, ctx); | |
| 927 | - if (!schema['enum'].some(helpers.deepCompareStrict.bind(null, instance))) { | |
| 928 | - result.addError({ | |
| 929 | - name: 'enum', | |
| 930 | - argument: schema['enum'], | |
| 931 | - message: "is not one of enum values: " + schema['enum'].map(String).join(','), | |
| 932 | - }); | |
| 933 | - } | |
| 934 | - return result; | |
| 935 | -}; | |
| 465 | +//#endregion | |
| 466 | +//#region packages/packages/libs/editor-props/src/prop-types/filter-prop-types/filter-functions/hue-rotate-filter.ts | |
| 467 | + var hueRotateFilterPropTypeUtil = createPropUtils("hue-rotate", _elementor_schema.z.strictObject({ size: unknownChildrenSchema })); | |
| 936 | 468 | |
| 937 | -/** | |
| 938 | - * Validates whether the instance exactly matches a given value | |
| 939 | - * | |
| 940 | - * @param instance | |
| 941 | - * @param schema | |
| 942 | - * @return {ValidatorResult|null} | |
| 943 | - */ | |
| 944 | -validators['const'] = function validateEnum (instance, schema, options, ctx) { | |
| 945 | - if (instance === undefined) { | |
| 946 | - return null; | |
| 947 | - } | |
| 948 | - var result = new ValidatorResult(instance, schema, options, ctx); | |
| 949 | - if (!helpers.deepCompareStrict(schema['const'], instance)) { | |
| 950 | - result.addError({ | |
| 951 | - name: 'const', | |
| 952 | - argument: schema['const'], | |
| 953 | - message: "does not exactly match expected constant: " + schema['const'], | |
| 954 | - }); | |
| 955 | - } | |
| 956 | - return result; | |
| 957 | -}; | |
| 469 | +//#endregion | |
| 470 | +//#region packages/packages/libs/editor-props/src/prop-types/filter-prop-types/filter-functions/intensity-filter.ts | |
| 471 | + var intensityFilterPropTypeUtil = createPropUtils("intensity", _elementor_schema.z.strictObject({ size: unknownChildrenSchema })); | |
| 958 | 472 | |
| 959 | -/** | |
| 960 | - * Validates whether the instance if of a prohibited type. | |
| 961 | - * @param instance | |
| 962 | - * @param schema | |
| 963 | - * @param options | |
| 964 | - * @param ctx | |
| 965 | - * @return {null|ValidatorResult} | |
| 966 | - */ | |
| 967 | -validators.not = validators.disallow = function validateNot (instance, schema, options, ctx) { | |
| 968 | - var self = this; | |
| 969 | - if(instance===undefined) return null; | |
| 970 | - var result = new ValidatorResult(instance, schema, options, ctx); | |
| 971 | - var notTypes = schema.not || schema.disallow; | |
| 972 | - if(!notTypes) return null; | |
| 973 | - if(!Array.isArray(notTypes)) notTypes=[notTypes]; | |
| 974 | - notTypes.forEach(function (type) { | |
| 975 | - if (self.testType(instance, schema, options, ctx, type)) { | |
| 976 | - var id = type && (type.$id || type.id); | |
| 977 | - var schemaId = id || type; | |
| 978 | - result.addError({ | |
| 979 | - name: 'not', | |
| 980 | - argument: schemaId, | |
| 981 | - message: "is of prohibited type " + schemaId, | |
| 982 | - }); | |
| 983 | - } | |
| 984 | - }); | |
| 985 | - return result; | |
| 986 | -}; | |
| 473 | +//#endregion | |
| 474 | +//#region packages/packages/libs/editor-props/src/prop-types/filter-prop-types/filter.ts | |
| 475 | + var cssFilterFunctionPropUtil = createPropUtils("css-filter-func", _elementor_schema.z.object({ | |
| 476 | + func: stringPropTypeUtil.schema, | |
| 477 | + args: _elementor_schema.z.union([ | |
| 478 | + blurFilterPropTypeUtil.schema, | |
| 479 | + intensityFilterPropTypeUtil.schema, | |
| 480 | + colorToneFilterPropTypeUtil.schema, | |
| 481 | + hueRotateFilterPropTypeUtil.schema, | |
| 482 | + dropShadowFilterPropTypeUtil.schema | |
| 483 | + ]) | |
| 484 | + })); | |
| 485 | + var filterPropTypeUtil = createPropUtils("filter", _elementor_schema.z.array(cssFilterFunctionPropUtil.schema)); | |
| 987 | 486 | |
| 988 | -module.exports = attribute; | |
| 487 | +//#endregion | |
| 488 | +//#region packages/packages/libs/editor-props/src/prop-types/transform-prop-types/transform.ts | |
| 489 | + var transformPropTypeUtil = createPropUtils("transform", _elementor_schema.z.strictObject({ | |
| 490 | + "transform-functions": unknownChildrenSchema, | |
| 491 | + "transform-origin": unknownChildrenSchema, | |
| 492 | + perspective: unknownChildrenSchema, | |
| 493 | + "perspective-origin": unknownChildrenSchema | |
| 494 | + })); | |
| 989 | 495 | |
| 496 | +//#endregion | |
| 497 | +//#region packages/packages/libs/editor-props/src/prop-types/transform-prop-types/types.ts | |
| 498 | + var TransformFunctionKeys = { | |
| 499 | + move: "transform-move", | |
| 500 | + scale: "transform-scale", | |
| 501 | + rotate: "transform-rotate", | |
| 502 | + skew: "transform-skew" | |
| 503 | + }; | |
| 990 | 504 | |
| 991 | -/***/ }), | |
| 505 | +//#endregion | |
| 506 | +//#region packages/packages/libs/editor-props/src/prop-types/transform-prop-types/transform-functions/move-transform.ts | |
| 507 | + var moveTransformPropTypeUtil = createPropUtils(TransformFunctionKeys.move, _elementor_schema.z.strictObject({ | |
| 508 | + x: unknownChildrenSchema, | |
| 509 | + y: unknownChildrenSchema, | |
| 510 | + z: unknownChildrenSchema | |
| 511 | + })); | |
| 992 | 512 | |
| 993 | -/***/ "./node_modules/jsonschema/lib/helpers.js": | |
| 994 | -/*!************************************************!*\ | |
| 995 | - !*** ./node_modules/jsonschema/lib/helpers.js ***! | |
| 996 | - \************************************************/ | |
| 997 | -/***/ (function(module, exports) { | |
| 513 | +//#endregion | |
| 514 | +//#region packages/packages/libs/editor-props/src/prop-types/transform-prop-types/transform-functions/rotate-transform.ts | |
| 515 | + var rotateTransformPropTypeUtil = createPropUtils(TransformFunctionKeys.rotate, _elementor_schema.z.strictObject({ | |
| 516 | + x: unknownChildrenSchema, | |
| 517 | + y: unknownChildrenSchema, | |
| 518 | + z: unknownChildrenSchema | |
| 519 | + })); | |
| 998 | 520 | |
| 521 | +//#endregion | |
| 522 | +//#region packages/packages/libs/editor-props/src/prop-types/transform-prop-types/transform-functions/scale-transform.ts | |
| 523 | + var scaleTransformPropTypeUtil = createPropUtils(TransformFunctionKeys.scale, _elementor_schema.z.strictObject({ | |
| 524 | + x: numberPropTypeUtil.schema.nullable(), | |
| 525 | + y: numberPropTypeUtil.schema.nullable(), | |
| 526 | + z: numberPropTypeUtil.schema.nullable() | |
| 527 | + })); | |
| 999 | 528 | |
| 529 | +//#endregion | |
| 530 | +//#region packages/packages/libs/editor-props/src/prop-types/transform-prop-types/transform-functions/skew-transform.ts | |
| 531 | + var skewTransformPropTypeUtil = createPropUtils(TransformFunctionKeys.skew, _elementor_schema.z.strictObject({ | |
| 532 | + x: unknownChildrenSchema, | |
| 533 | + y: unknownChildrenSchema | |
| 534 | + })); | |
| 1000 | 535 | |
| 1001 | -var ValidationError = exports.ValidationError = function ValidationError (message, instance, schema, path, name, argument) { | |
| 1002 | - if(Array.isArray(path)){ | |
| 1003 | - this.path = path; | |
| 1004 | - this.property = path.reduce(function(sum, item){ | |
| 1005 | - return sum + makeSuffix(item); | |
| 1006 | - }, 'instance'); | |
| 1007 | - }else if(path !== undefined){ | |
| 1008 | - this.property = path; | |
| 1009 | - } | |
| 1010 | - if (message) { | |
| 1011 | - this.message = message; | |
| 1012 | - } | |
| 1013 | - if (schema) { | |
| 1014 | - var id = schema.$id || schema.id; | |
| 1015 | - this.schema = id || schema; | |
| 1016 | - } | |
| 1017 | - if (instance !== undefined) { | |
| 1018 | - this.instance = instance; | |
| 1019 | - } | |
| 1020 | - this.name = name; | |
| 1021 | - this.argument = argument; | |
| 1022 | - this.stack = this.toString(); | |
| 1023 | -}; | |
| 536 | +//#endregion | |
| 537 | +//#region packages/packages/libs/editor-props/src/prop-types/transform-prop-types/transform-functions.ts | |
| 538 | + var filterTypes = moveTransformPropTypeUtil.schema.or(scaleTransformPropTypeUtil.schema).or(rotateTransformPropTypeUtil.schema).or(skewTransformPropTypeUtil.schema); | |
| 539 | + var transformFunctionsPropTypeUtil = createPropUtils("transform-functions", _elementor_schema.z.array(filterTypes)); | |
| 1024 | 540 | |
| 1025 | -ValidationError.prototype.toString = function toString() { | |
| 1026 | - return this.property + ' ' + this.message; | |
| 1027 | -}; | |
| 541 | +//#endregion | |
| 542 | +//#region packages/packages/libs/editor-props/src/prop-types/transform-prop-types/transform-origin.ts | |
| 543 | + var transformOriginPropTypeUtil = createPropUtils("transform-origin", _elementor_schema.z.strictObject({ | |
| 544 | + x: unknownChildrenSchema, | |
| 545 | + y: unknownChildrenSchema, | |
| 546 | + z: unknownChildrenSchema | |
| 547 | + })); | |
| 1028 | 548 | |
| 1029 | -var ValidatorResult = exports.ValidatorResult = function ValidatorResult(instance, schema, options, ctx) { | |
| 1030 | - this.instance = instance; | |
| 1031 | - this.schema = schema; | |
| 1032 | - this.options = options; | |
| 1033 | - this.path = ctx.path; | |
| 1034 | - this.propertyPath = ctx.propertyPath; | |
| 1035 | - this.errors = []; | |
| 1036 | - this.throwError = options && options.throwError; | |
| 1037 | - this.throwFirst = options && options.throwFirst; | |
| 1038 | - this.throwAll = options && options.throwAll; | |
| 1039 | - this.disableFormat = options && options.disableFormat === true; | |
| 1040 | -}; | |
| 549 | +//#endregion | |
| 550 | +//#region packages/packages/libs/editor-props/src/prop-types/transform-prop-types/perspective-origin.ts | |
| 551 | + var perspectiveOriginPropTypeUtil = createPropUtils("perspective-origin", _elementor_schema.z.strictObject({ | |
| 552 | + x: unknownChildrenSchema, | |
| 553 | + y: unknownChildrenSchema | |
| 554 | + })); | |
| 1041 | 555 | |
| 1042 | -ValidatorResult.prototype.addError = function addError(detail) { | |
| 1043 | - var err; | |
| 1044 | - if (typeof detail == 'string') { | |
| 1045 | - err = new ValidationError(detail, this.instance, this.schema, this.path); | |
| 1046 | - } else { | |
| 1047 | - if (!detail) throw new Error('Missing error detail'); | |
| 1048 | - if (!detail.message) throw new Error('Missing error message'); | |
| 1049 | - if (!detail.name) throw new Error('Missing validator type'); | |
| 1050 | - err = new ValidationError(detail.message, this.instance, this.schema, this.path, detail.name, detail.argument); | |
| 1051 | - } | |
| 556 | +//#endregion | |
| 557 | +//#region packages/packages/libs/editor-props/src/prop-types/filter-prop-types/backdrop-filter.ts | |
| 558 | + var backdropFilterPropTypeUtil = createPropUtils("backdrop-filter", _elementor_schema.z.array(cssFilterFunctionPropUtil.schema)); | |
| 1052 | 559 | |
| 1053 | - this.errors.push(err); | |
| 1054 | - if (this.throwFirst) { | |
| 1055 | - throw new ValidatorResultError(this); | |
| 1056 | - }else if(this.throwError){ | |
| 1057 | - throw err; | |
| 1058 | - } | |
| 1059 | - return err; | |
| 1060 | -}; | |
| 560 | +//#endregion | |
| 561 | +//#region packages/packages/libs/editor-props/src/prop-types/date-range.ts | |
| 562 | + var dateRangePropTypeUtil = createPropUtils("date-range", _elementor_schema.z.strictObject({ | |
| 563 | + min: unknownChildrenSchema, | |
| 564 | + max: unknownChildrenSchema | |
| 565 | + })); | |
| 1061 | 566 | |
| 1062 | -ValidatorResult.prototype.importErrors = function importErrors(res) { | |
| 1063 | - if (typeof res == 'string' || (res && res.validatorType)) { | |
| 1064 | - this.addError(res); | |
| 1065 | - } else if (res && res.errors) { | |
| 1066 | - this.errors = this.errors.concat(res.errors); | |
| 1067 | - } | |
| 1068 | -}; | |
| 567 | +//#endregion | |
| 568 | +//#region packages/packages/libs/editor-props/src/prop-types/date-string.ts | |
| 569 | + var dateStringPropTypeUtil = createPropUtils("date-string", _elementor_schema.z.string()); | |
| 1069 | 570 | |
| 1070 | -function stringizer (v,i){ | |
| 1071 | - return i+': '+v.toString()+'\n'; | |
| 1072 | -} | |
| 1073 | -ValidatorResult.prototype.toString = function toString(res) { | |
| 1074 | - return this.errors.map(stringizer).join(''); | |
| 1075 | -}; | |
| 571 | +//#endregion | |
| 572 | +//#region packages/packages/libs/editor-props/src/prop-types/time-range.ts | |
| 573 | + var timeRangePropTypeUtil = createPropUtils("time-range", _elementor_schema.z.strictObject({ | |
| 574 | + min: unknownChildrenSchema, | |
| 575 | + max: unknownChildrenSchema | |
| 576 | + })); | |
| 1076 | 577 | |
| 1077 | -Object.defineProperty(ValidatorResult.prototype, "valid", { get: function() { | |
| 1078 | - return !this.errors.length; | |
| 1079 | -} }); | |
| 578 | +//#endregion | |
| 579 | +//#region packages/packages/libs/editor-props/src/prop-types/time-string.ts | |
| 580 | + var timeStringPropTypeUtil = createPropUtils("time-string", _elementor_schema.z.string()); | |
| 1080 | 581 | |
| 1081 | -module.exports.ValidatorResultError = ValidatorResultError; | |
| 1082 | -function ValidatorResultError(result) { | |
| 1083 | - if(typeof Error.captureStackTrace === 'function'){ | |
| 1084 | - Error.captureStackTrace(this, ValidatorResultError); | |
| 1085 | - } | |
| 1086 | - this.instance = result.instance; | |
| 1087 | - this.schema = result.schema; | |
| 1088 | - this.options = result.options; | |
| 1089 | - this.errors = result.errors; | |
| 1090 | -} | |
| 1091 | -ValidatorResultError.prototype = new Error(); | |
| 1092 | -ValidatorResultError.prototype.constructor = ValidatorResultError; | |
| 1093 | -ValidatorResultError.prototype.name = "Validation Error"; | |
| 582 | +//#endregion | |
| 583 | +//#region packages/packages/libs/editor-props/src/utils/adjust-llm-prop-value-schema.ts | |
| 584 | + var ensureNotNull = (v, fallback) => v === null ? fallback : v; | |
| 585 | + var defaultOptions = { transformers: {} }; | |
| 586 | + var adjustLlmPropValueSchema = (value, { transformers = {}, forceKey = void 0 } = defaultOptions) => { | |
| 587 | + const clone = structuredClone(value); | |
| 588 | + if (typeof clone !== "object" || clone === null) return null; | |
| 589 | + if (Array.isArray(clone)) return clone.map((item) => adjustLlmPropValueSchema(item, { | |
| 590 | + forceKey, | |
| 591 | + transformers | |
| 592 | + })); | |
| 593 | + const transformablePropValue = clone; | |
| 594 | + if ("$intention" in transformablePropValue) delete transformablePropValue.$intention; | |
| 595 | + if (forceKey) transformablePropValue.$$type = forceKey; | |
| 596 | + switch (transformablePropValue.$$type) { | |
| 597 | + case "size": { | |
| 598 | + const { value: rawSizePropValue } = transformablePropValue; | |
| 599 | + return { | |
| 600 | + $$type: "size", | |
| 601 | + value: { | |
| 602 | + unit: typeof rawSizePropValue.unit === "string" ? rawSizePropValue.unit : ensureNotNull(stringPropTypeUtil.extract(rawSizePropValue.unit), "px"), | |
| 603 | + size: typeof rawSizePropValue.size === "string" || typeof rawSizePropValue.size === "number" ? rawSizePropValue.size : ensureNotNull(stringPropTypeUtil.extract(rawSizePropValue.size), numberPropTypeUtil.extract(rawSizePropValue.size)) | |
| 604 | + } | |
| 605 | + }; | |
| 606 | + } | |
| 607 | + case "html-v3": { | |
| 608 | + const { value: rawHtmlV3PropValue } = transformablePropValue; | |
| 609 | + return { | |
| 610 | + $$type: "html-v3", | |
| 611 | + value: { | |
| 612 | + ...rawHtmlV3PropValue, | |
| 613 | + children: Array.isArray(rawHtmlV3PropValue.children) ? rawHtmlV3PropValue.children : [] | |
| 614 | + } | |
| 615 | + }; | |
| 616 | + } | |
| 617 | + default: | |
| 618 | + const transformer = transformers?.[transformablePropValue.$$type]; | |
| 619 | + if (transformer) return transformer(transformablePropValue.value); | |
| 620 | + } | |
| 621 | + if (typeof transformablePropValue.value === "object") if (Array.isArray(transformablePropValue.value)) transformablePropValue.value = adjustLlmPropValueSchema(transformablePropValue.value, { transformers }); | |
| 622 | + else { | |
| 623 | + const { value: objectValue } = transformablePropValue; | |
| 624 | + const clonedObject = clone; | |
| 625 | + clonedObject.value = {}; | |
| 626 | + Object.entries(objectValue).forEach(([key, childProp]) => { | |
| 627 | + clonedObject.value[key] = adjustLlmPropValueSchema(childProp, { transformers }); | |
| 628 | + }); | |
| 629 | + } | |
| 630 | + return clone; | |
| 631 | + }; | |
| 1094 | 632 | |
| 1095 | -/** | |
| 1096 | - * Describes a problem with a Schema which prevents validation of an instance | |
| 1097 | - * @name SchemaError | |
| 1098 | - * @constructor | |
| 1099 | - */ | |
| 1100 | -var SchemaError = exports.SchemaError = function SchemaError (msg, schema) { | |
| 1101 | - this.message = msg; | |
| 1102 | - this.schema = schema; | |
| 1103 | - Error.call(this, msg); | |
| 1104 | - if(typeof Error.captureStackTrace === 'function'){ | |
| 1105 | - Error.captureStackTrace(this, SchemaError); | |
| 1106 | - } | |
| 1107 | -}; | |
| 1108 | -SchemaError.prototype = Object.create(Error.prototype, | |
| 1109 | - { | |
| 1110 | - constructor: {value: SchemaError, enumerable: false}, | |
| 1111 | - name: {value: 'SchemaError', enumerable: false}, | |
| 1112 | - }); | |
| 633 | +//#endregion | |
| 634 | +//#region packages/packages/libs/editor-props/src/utils/llm-schema-to-props.ts | |
| 635 | + function jsonSchemaToPropType(schema, key = schema.key) { | |
| 636 | + const meta = {}; | |
| 637 | + if (schema.description) meta.description = schema.description; | |
| 638 | + if (schema.anyOf && Array.isArray(schema.anyOf)) return convertJsonSchemaToUnionPropType(schema, meta); | |
| 639 | + if (schema.type === "object" && schema.properties) return convertJsonSchemaToObjectPropType(schema, meta, key); | |
| 640 | + if (schema.type === "array" && schema.items) return convertJsonSchemaToArrayPropType(schema, meta, key); | |
| 641 | + return convertJsonSchemaToPlainPropType(schema, meta, key); | |
| 642 | + } | |
| 643 | + function convertJsonSchemaToPlainPropType(schema, meta, key = schema.key) { | |
| 644 | + const settings = {}; | |
| 645 | + let propKey = key || "string"; | |
| 646 | + if (schema.type === "number") propKey = "number"; | |
| 647 | + else if (schema.type === "boolean") propKey = "boolean"; | |
| 648 | + else if (schema.type === "string") propKey = "string"; | |
| 649 | + if (Array.isArray(schema.enum)) settings.enum = schema.enum; | |
| 650 | + return { | |
| 651 | + kind: "plain", | |
| 652 | + key: propKey, | |
| 653 | + settings, | |
| 654 | + meta | |
| 655 | + }; | |
| 656 | + } | |
| 657 | + function convertJsonSchemaToUnionPropType(schema, meta) { | |
| 658 | + const propTypes = {}; | |
| 659 | + if (!schema.anyOf || !Array.isArray(schema.anyOf)) throw new Error("Invalid anyOf schema"); | |
| 660 | + for (const variantSchema of schema.anyOf) if (variantSchema.type === "object" && variantSchema.properties && variantSchema.properties.$$type && variantSchema.properties.value) { | |
| 661 | + const typeProperty = variantSchema.properties.$$type; | |
| 662 | + let typeKey; | |
| 663 | + if (typeProperty.enum && Array.isArray(typeProperty.enum) && typeProperty.enum.length > 0) typeKey = typeProperty.enum[0]; | |
| 664 | + else continue; | |
| 665 | + propTypes[typeKey] = convertJsonSchemaToPropType(variantSchema.properties.value); | |
| 666 | + } | |
| 667 | + return { | |
| 668 | + kind: "union", | |
| 669 | + prop_types: propTypes, | |
| 670 | + settings: {}, | |
| 671 | + meta | |
| 672 | + }; | |
| 673 | + } | |
| 674 | + function convertJsonSchemaToObjectPropType(schema, meta, key = schema.key) { | |
| 675 | + const shape = {}; | |
| 676 | + if (!schema.properties) return { | |
| 677 | + kind: "object", | |
| 678 | + key, | |
| 679 | + shape: {}, | |
| 680 | + settings: {}, | |
| 681 | + meta | |
| 682 | + }; | |
| 683 | + const requiredFields = Array.isArray(schema.required) ? schema.required : []; | |
| 684 | + for (const [propKey, propSchema] of Object.entries(schema.properties)) { | |
| 685 | + const subPropType = convertJsonSchemaToPropType(propSchema, key); | |
| 686 | + if (requiredFields.includes(propKey)) subPropType.settings = { | |
| 687 | + ...subPropType.settings, | |
| 688 | + required: true | |
| 689 | + }; | |
| 690 | + shape[propKey] = subPropType; | |
| 691 | + } | |
| 692 | + return { | |
| 693 | + kind: "object", | |
| 694 | + key: key || "object", | |
| 695 | + shape, | |
| 696 | + settings: {}, | |
| 697 | + meta | |
| 698 | + }; | |
| 699 | + } | |
| 700 | + function convertJsonSchemaToArrayPropType(schema, meta, key = schema.key) { | |
| 701 | + if (!schema.items) throw new Error("Array schema must have items property"); | |
| 702 | + const itemPropType = convertJsonSchemaToPropType(schema.items); | |
| 703 | + return { | |
| 704 | + kind: "array", | |
| 705 | + key: key || "array", | |
| 706 | + item_prop_type: itemPropType, | |
| 707 | + settings: {}, | |
| 708 | + meta | |
| 709 | + }; | |
| 710 | + } | |
| 711 | + function convertJsonSchemaToPropType(schema, key) { | |
| 712 | + return jsonSchemaToPropType(schema, key); | |
| 713 | + } | |
| 1113 | 714 | |
| 1114 | -var SchemaContext = exports.SchemaContext = function SchemaContext (schema, options, path, base, schemas) { | |
| 1115 | - this.schema = schema; | |
| 1116 | - this.options = options; | |
| 1117 | - if(Array.isArray(path)){ | |
| 1118 | - this.path = path; | |
| 1119 | - this.propertyPath = path.reduce(function(sum, item){ | |
| 1120 | - return sum + makeSuffix(item); | |
| 1121 | - }, 'instance'); | |
| 1122 | - }else{ | |
| 1123 | - this.propertyPath = path; | |
| 1124 | - } | |
| 1125 | - this.base = base; | |
| 1126 | - this.schemas = schemas; | |
| 1127 | -}; | |
| 715 | +//#endregion | |
| 716 | +//#region packages/packages/libs/editor-props/src/utils/props-to-llm-schema.ts | |
| 717 | + var DYNAMIC_PROP_TYPE_KEY = "dynamic"; | |
| 718 | + var OVERRIDABLE_PROP_TYPE_KEY = "overridable"; | |
| 719 | + var dynamicTagNamesResolver = null; | |
| 720 | + function setDynamicTagNamesResolver(resolver) { | |
| 721 | + dynamicTagNamesResolver = resolver; | |
| 722 | + } | |
| 723 | + function propTypeToJsonSchema(propType, suppressDynamic = false) { | |
| 724 | + const description = propType.meta?.description; | |
| 725 | + const schema = {}; | |
| 726 | + if (description) schema.description = description; | |
| 727 | + if (propType.initial_value !== null && propType.initial_value !== void 0) schema.examples = [propType.initial_value]; | |
| 728 | + switch (propType.kind) { | |
| 729 | + case "union": return convertUnionPropType(propType, schema, suppressDynamic); | |
| 730 | + case "object": return convertObjectPropType(propType, schema, suppressDynamic); | |
| 731 | + case "array": return convertArrayPropType(propType, schema, suppressDynamic); | |
| 732 | + default: return convertPlainPropType(propType, schema); | |
| 733 | + } | |
| 734 | + } | |
| 735 | + function convertPlainPropType(propType, baseSchema) { | |
| 736 | + const schema = { ...baseSchema }; | |
| 737 | + if (!Object.hasOwn(propType, "kind")) throw new Error(`PropType kind is undefined for propType with key: ${propType.key ?? "[unknown key]"}`); | |
| 738 | + const enumValues = propType.settings?.enum || []; | |
| 739 | + switch (propType.kind) { | |
| 740 | + case "string": | |
| 741 | + case "number": | |
| 742 | + case "boolean": return { | |
| 743 | + ...schema, | |
| 744 | + type: "object", | |
| 745 | + properties: { | |
| 746 | + $$type: { | |
| 747 | + type: "string", | |
| 748 | + const: propType.key ?? propType.kind | |
| 749 | + }, | |
| 750 | + value: { | |
| 751 | + type: propType.kind, | |
| 752 | + ...enumValues.length > 0 ? { enum: enumValues } : {} | |
| 753 | + } | |
| 754 | + }, | |
| 755 | + required: ["$$type", "value"] | |
| 756 | + }; | |
| 757 | + case "unknown": return {}; | |
| 758 | + default: return { | |
| 759 | + ...schema, | |
| 760 | + type: "object", | |
| 761 | + $$type: propType.kind, | |
| 762 | + value: { type: propType.kind } | |
| 763 | + }; | |
| 764 | + } | |
| 765 | + } | |
| 766 | + function convertUnionPropType(propType, baseSchema, suppressDynamic) { | |
| 767 | + const schema = structuredClone(baseSchema); | |
| 768 | + const propTypes = propType.prop_types || {}; | |
| 769 | + const offersDynamic = !suppressDynamic && Boolean(propTypes[DYNAMIC_PROP_TYPE_KEY]); | |
| 770 | + const suppressNestedDynamic = suppressDynamic || offersDynamic; | |
| 771 | + const schemas = []; | |
| 772 | + for (const [typeKey, subPropType] of Object.entries(propTypes)) { | |
| 773 | + if (typeKey === OVERRIDABLE_PROP_TYPE_KEY) continue; | |
| 774 | + if (typeKey === DYNAMIC_PROP_TYPE_KEY) { | |
| 775 | + if (offersDynamic) schemas.push(convertDynamicPropType(subPropType)); | |
| 776 | + continue; | |
| 777 | + } | |
| 778 | + schemas.push(propTypeToJsonSchema(subPropType, suppressNestedDynamic)); | |
| 779 | + } | |
| 780 | + if (schemas.length > 0) schema.anyOf = schemas; | |
| 781 | + const propTypeDescription = propType.meta?.description; | |
| 782 | + if (propTypeDescription) schema.description = propTypeDescription; | |
| 783 | + return schema; | |
| 784 | + } | |
| 785 | + function convertDynamicPropType(propType) { | |
| 786 | + const categories = Array.isArray(propType.settings?.categories) ? propType.settings.categories : []; | |
| 787 | + const allowedTagNames = dynamicTagNamesResolver?.(categories) ?? []; | |
| 788 | + return { | |
| 789 | + type: "object", | |
| 790 | + description: `Bind THIS value to a dynamic tag instead of a static value (this may be a nested field, e.g. an image's "src"). Look up the chosen tag in the "elementor://dynamic-tags" resource and populate "settings" exactly as its schema requires.`, | |
| 791 | + properties: { | |
| 792 | + $$type: { | |
| 793 | + type: "string", | |
| 794 | + const: DYNAMIC_PROP_TYPE_KEY | |
| 795 | + }, | |
| 796 | + value: { | |
| 797 | + type: "object", | |
| 798 | + properties: { | |
| 799 | + name: { | |
| 800 | + type: "string", | |
| 801 | + description: "Dynamic tag name from \"elementor://dynamic-tags\".", | |
| 802 | + ...allowedTagNames.length ? { enum: allowedTagNames } : {} | |
| 803 | + }, | |
| 804 | + settings: { | |
| 805 | + type: "object", | |
| 806 | + description: "Tag settings matching the chosen tag's schema in the resource." | |
| 807 | + } | |
| 808 | + }, | |
| 809 | + required: ["name"] | |
| 810 | + } | |
| 811 | + }, | |
| 812 | + required: ["$$type", "value"] | |
| 813 | + }; | |
| 814 | + } | |
| 815 | + function convertObjectPropType(propType, baseSchema, suppressDynamic) { | |
| 816 | + const schema = structuredClone(baseSchema); | |
| 817 | + schema.type = "object"; | |
| 818 | + const internalStructure = { properties: { | |
| 819 | + $$type: { | |
| 820 | + type: "string", | |
| 821 | + const: propType.key | |
| 822 | + }, | |
| 823 | + value: { | |
| 824 | + type: "object", | |
| 825 | + properties: {}, | |
| 826 | + additionalProperties: false | |
| 827 | + } | |
| 828 | + } }; | |
| 829 | + const required = ["$$type", "value"]; | |
| 830 | + const valueRequired = []; | |
| 831 | + const shape = propType.shape || {}; | |
| 832 | + for (const [key, subPropType] of Object.entries(shape)) { | |
| 833 | + const propSchema = propTypeToJsonSchema(subPropType, suppressDynamic); | |
| 834 | + if (subPropType.settings?.required === true) valueRequired.push(key); | |
| 835 | + if (internalStructure.properties.value.properties) internalStructure.properties.value.properties[key] = propSchema; | |
| 836 | + } | |
| 837 | + schema.required = required; | |
| 838 | + if (valueRequired.length > 0) internalStructure.properties.value.required = valueRequired; | |
| 839 | + return { | |
| 840 | + ...schema, | |
| 841 | + ...internalStructure | |
| 842 | + }; | |
| 843 | + } | |
| 844 | + function convertArrayPropType(propType, baseSchema, suppressDynamic) { | |
| 845 | + const schema = structuredClone(baseSchema); | |
| 846 | + schema.type = "object"; | |
| 847 | + let items; | |
| 848 | + const itemPropType = propType.item_prop_type; | |
| 849 | + if (itemPropType) items = propTypeToJsonSchema(itemPropType, suppressDynamic); | |
| 850 | + schema.properties = { | |
| 851 | + $$type: { | |
| 852 | + type: "string", | |
| 853 | + const: propType.key | |
| 854 | + }, | |
| 855 | + value: { | |
| 856 | + type: "array", | |
| 857 | + ...items ? { items } : {} | |
| 858 | + } | |
| 859 | + }; | |
| 860 | + return schema; | |
| 861 | + } | |
| 862 | + var nonConfigurablePropKeys = [ | |
| 863 | + "_cssid", | |
| 864 | + "classes", | |
| 865 | + "attributes" | |
| 866 | + ]; | |
| 867 | + function isPropKeyConfigurable(propKey, propType) { | |
| 868 | + if (!nonConfigurablePropKeys.includes(propKey)) return true; | |
| 869 | + return !!(!Array.isArray(propType?.meta) && propType?.meta?.llm_configurable); | |
| 870 | + } | |
| 871 | + function configurableKeys(schema) { | |
| 872 | + return Object.keys(schema).filter((key) => isPropKeyConfigurable(key, schema[key])); | |
| 873 | + } | |
| 874 | + function enrichWithIntention(jsonSchema, text = "Describe the desired outcome") { | |
| 875 | + const result = structuredClone(jsonSchema); | |
| 876 | + if (!result.properties) return jsonSchema; | |
| 877 | + result.properties.$intention = { | |
| 878 | + type: "string", | |
| 879 | + description: text | |
| 880 | + }; | |
| 881 | + result.required = [...result.required || [], "$intention"]; | |
| 882 | + return result; | |
| 883 | + } | |
| 884 | + function removeIntention(jsonSchema) { | |
| 885 | + const result = structuredClone(jsonSchema); | |
| 886 | + if (!result.properties) return jsonSchema; | |
| 887 | + delete result.properties.$intention; | |
| 888 | + if (result.required) result.required = result.required.filter((req) => req !== "$intention"); | |
| 889 | + return result; | |
| 890 | + } | |
| 1128 | 891 | |
| 1129 | -SchemaContext.prototype.resolve = function resolve (target) { | |
| 1130 | - return (() => resolveUrl(this.base,target))(); | |
| 1131 | -}; | |
| 892 | +//#endregion | |
| 893 | +//#region node_modules/jsonschema/lib/helpers.js | |
| 894 | + var require_helpers = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 895 | + var ValidationError = exports.ValidationError = function ValidationError(message, instance, schema, path, name, argument) { | |
| 896 | + if (Array.isArray(path)) { | |
| 897 | + this.path = path; | |
| 898 | + this.property = path.reduce(function(sum, item) { | |
| 899 | + return sum + makeSuffix(item); | |
| 900 | + }, "instance"); | |
| 901 | + } else if (path !== void 0) this.property = path; | |
| 902 | + if (message) this.message = message; | |
| 903 | + if (schema) { | |
| 904 | + var id = schema.$id || schema.id; | |
| 905 | + this.schema = id || schema; | |
| 906 | + } | |
| 907 | + if (instance !== void 0) this.instance = instance; | |
| 908 | + this.name = name; | |
| 909 | + this.argument = argument; | |
| 910 | + this.stack = this.toString(); | |
| 911 | + }; | |
| 912 | + ValidationError.prototype.toString = function toString() { | |
| 913 | + return this.property + " " + this.message; | |
| 914 | + }; | |
| 915 | + var ValidatorResult = exports.ValidatorResult = function ValidatorResult(instance, schema, options, ctx) { | |
| 916 | + this.instance = instance; | |
| 917 | + this.schema = schema; | |
| 918 | + this.options = options; | |
| 919 | + this.path = ctx.path; | |
| 920 | + this.propertyPath = ctx.propertyPath; | |
| 921 | + this.errors = []; | |
| 922 | + this.throwError = options && options.throwError; | |
| 923 | + this.throwFirst = options && options.throwFirst; | |
| 924 | + this.throwAll = options && options.throwAll; | |
| 925 | + this.disableFormat = options && options.disableFormat === true; | |
| 926 | + }; | |
| 927 | + ValidatorResult.prototype.addError = function addError(detail) { | |
| 928 | + var err; | |
| 929 | + if (typeof detail == "string") err = new ValidationError(detail, this.instance, this.schema, this.path); | |
| 930 | + else { | |
| 931 | + if (!detail) throw new Error("Missing error detail"); | |
| 932 | + if (!detail.message) throw new Error("Missing error message"); | |
| 933 | + if (!detail.name) throw new Error("Missing validator type"); | |
| 934 | + err = new ValidationError(detail.message, this.instance, this.schema, this.path, detail.name, detail.argument); | |
| 935 | + } | |
| 936 | + this.errors.push(err); | |
| 937 | + if (this.throwFirst) throw new ValidatorResultError(this); | |
| 938 | + else if (this.throwError) throw err; | |
| 939 | + return err; | |
| 940 | + }; | |
| 941 | + ValidatorResult.prototype.importErrors = function importErrors(res) { | |
| 942 | + if (typeof res == "string" || res && res.validatorType) this.addError(res); | |
| 943 | + else if (res && res.errors) this.errors = this.errors.concat(res.errors); | |
| 944 | + }; | |
| 945 | + function stringizer(v, i) { | |
| 946 | + return i + ": " + v.toString() + "\n"; | |
| 947 | + } | |
| 948 | + ValidatorResult.prototype.toString = function toString(res) { | |
| 949 | + return this.errors.map(stringizer).join(""); | |
| 950 | + }; | |
| 951 | + Object.defineProperty(ValidatorResult.prototype, "valid", { get: function() { | |
| 952 | + return !this.errors.length; | |
| 953 | + } }); | |
| 954 | + module.exports.ValidatorResultError = ValidatorResultError; | |
| 955 | + function ValidatorResultError(result) { | |
| 956 | + if (typeof Error.captureStackTrace === "function") Error.captureStackTrace(this, ValidatorResultError); | |
| 957 | + this.instance = result.instance; | |
| 958 | + this.schema = result.schema; | |
| 959 | + this.options = result.options; | |
| 960 | + this.errors = result.errors; | |
| 961 | + } | |
| 962 | + ValidatorResultError.prototype = /* @__PURE__ */ new Error(); | |
| 963 | + ValidatorResultError.prototype.constructor = ValidatorResultError; | |
| 964 | + ValidatorResultError.prototype.name = "Validation Error"; | |
| 965 | + /** | |
| 966 | + * Describes a problem with a Schema which prevents validation of an instance | |
| 967 | + * @name SchemaError | |
| 968 | + * @constructor | |
| 969 | + */ | |
| 970 | + var SchemaError = exports.SchemaError = function SchemaError(msg, schema) { | |
| 971 | + this.message = msg; | |
| 972 | + this.schema = schema; | |
| 973 | + Error.call(this, msg); | |
| 974 | + if (typeof Error.captureStackTrace === "function") Error.captureStackTrace(this, SchemaError); | |
| 975 | + }; | |
| 976 | + SchemaError.prototype = Object.create(Error.prototype, { | |
| 977 | + constructor: { | |
| 978 | + value: SchemaError, | |
| 979 | + enumerable: false | |
| 980 | + }, | |
| 981 | + name: { | |
| 982 | + value: "SchemaError", | |
| 983 | + enumerable: false | |
| 984 | + } | |
| 985 | + }); | |
| 986 | + var SchemaContext = exports.SchemaContext = function SchemaContext(schema, options, path, base, schemas) { | |
| 987 | + this.schema = schema; | |
| 988 | + this.options = options; | |
| 989 | + if (Array.isArray(path)) { | |
| 990 | + this.path = path; | |
| 991 | + this.propertyPath = path.reduce(function(sum, item) { | |
| 992 | + return sum + makeSuffix(item); | |
| 993 | + }, "instance"); | |
| 994 | + } else this.propertyPath = path; | |
| 995 | + this.base = base; | |
| 996 | + this.schemas = schemas; | |
| 997 | + }; | |
| 998 | + SchemaContext.prototype.resolve = function resolve(target) { | |
| 999 | + return (() => resolveUrl(this.base, target))(); | |
| 1000 | + }; | |
| 1001 | + SchemaContext.prototype.makeChild = function makeChild(schema, propertyName) { | |
| 1002 | + var path = propertyName === void 0 ? this.path : this.path.concat([propertyName]); | |
| 1003 | + var id = schema.$id || schema.id; | |
| 1004 | + let base = (() => resolveUrl(this.base, id || ""))(); | |
| 1005 | + var ctx = new SchemaContext(schema, this.options, path, base, Object.create(this.schemas)); | |
| 1006 | + if (id && !ctx.schemas[base]) ctx.schemas[base] = schema; | |
| 1007 | + return ctx; | |
| 1008 | + }; | |
| 1009 | + var FORMAT_REGEXPS = exports.FORMAT_REGEXPS = { | |
| 1010 | + "date-time": /^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])[tT ](2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])(\.\d+)?([zZ]|[+-]([0-5][0-9]):(60|[0-5][0-9]))$/, | |
| 1011 | + "date": /^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])$/, | |
| 1012 | + "time": /^(2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])$/, | |
| 1013 | + "duration": /P(T\d+(H(\d+M(\d+S)?)?|M(\d+S)?|S)|\d+(D|M(\d+D)?|Y(\d+M(\d+D)?)?)(T\d+(H(\d+M(\d+S)?)?|M(\d+S)?|S))?|\d+W)/i, | |
| 1014 | + "email": /^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/, | |
| 1015 | + "idn-email": /^("(?:[!#-\[\]-\u{10FFFF}]|\\[\t -\u{10FFFF}])*"|[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}](?:\.?[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}])*)@([!#-'*+\-/-9=?A-Z\^-\u{10FFFF}](?:\.?[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}])*|\[[!-Z\^-\u{10FFFF}]*\])$/u, | |
| 1016 | + "ip-address": /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/, | |
| 1017 | + "ipv6": /^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/, | |
| 1018 | + "uri": /^[a-zA-Z][a-zA-Z0-9+.-]*:[^\s]*$/, | |
| 1019 | + "uri-reference": /^(((([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|([A-Za-z][+\-.0-9A-Za-z]*:?)?)|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|(\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?)?))#(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|(([A-Za-z][+\-.0-9A-Za-z]*)?%[0-9A-Fa-f]{2}|[!$&-.0-9;=@_~]|[A-Za-z][+\-.0-9A-Za-z]*[!$&-*,;=@_~])(%[0-9A-Fa-f]{2}|[!$&-.0-9;=@-Z_a-z~])*((([/?](%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*)?#|[/?])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*)?|([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+(:\d*)?|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?:\d*|\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)?|[A-Za-z][+\-.0-9A-Za-z]*:?)?$/, | |
| 1020 | + "iri": /^[a-zA-Z][a-zA-Z0-9+.-]*:[^\s]*$/, | |
| 1021 | + "iri-reference": /^(((([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~-\u{10FFFF}]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|([A-Za-z][+\-.0-9A-Za-z]*:?)?)|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|(\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?)?))#(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|(([A-Za-z][+\-.0-9A-Za-z]*)?%[0-9A-Fa-f]{2}|[!$&-.0-9;=@_~-\u{10FFFF}]|[A-Za-z][+\-.0-9A-Za-z]*[!$&-*,;=@_~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-.0-9;=@-Z_a-z~-\u{10FFFF}])*((([/?](%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*)?#|[/?])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*)?|([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~-\u{10FFFF}]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+(:\d*)?|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?:\d*|\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)?|[A-Za-z][+\-.0-9A-Za-z]*:?)?$/u, | |
| 1022 | + "uuid": /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i, | |
| 1023 | + "uri-template": /(%[0-9a-f]{2}|[!#$&(-;=?@\[\]_a-z~]|\{[!#&+,./;=?@|]?(%[0-9a-f]{2}|[0-9_a-z])(\.?(%[0-9a-f]{2}|[0-9_a-z]))*(:[1-9]\d{0,3}|\*)?(,(%[0-9a-f]{2}|[0-9_a-z])(\.?(%[0-9a-f]{2}|[0-9_a-z]))*(:[1-9]\d{0,3}|\*)?)*\})*/iu, | |
| 1024 | + "json-pointer": /^(\/([\x00-\x2e0-@\[-}\x7f]|~[01])*)*$/iu, | |
| 1025 | + "relative-json-pointer": /^\d+(#|(\/([\x00-\x2e0-@\[-}\x7f]|~[01])*)*)$/iu, | |
| 1026 | + "hostname": /^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/, | |
| 1027 | + "host-name": /^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/, | |
| 1028 | + "utc-millisec": function(input) { | |
| 1029 | + return typeof input === "string" && parseFloat(input) === parseInt(input, 10) && !isNaN(input); | |
| 1030 | + }, | |
| 1031 | + "regex": function(input) { | |
| 1032 | + var result = true; | |
| 1033 | + try { | |
| 1034 | + new RegExp(input); | |
| 1035 | + } catch (e) { | |
| 1036 | + result = false; | |
| 1037 | + } | |
| 1038 | + return result; | |
| 1039 | + }, | |
| 1040 | + "style": /[\r\n\t ]*[^\r\n\t ][^:]*:[\r\n\t ]*[^\r\n\t ;]*[\r\n\t ]*;?/, | |
| 1041 | + "color": /^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/, | |
| 1042 | + "phone": /^\+(?:[0-9] ?){6,14}[0-9]$/, | |
| 1043 | + "alpha": /^[a-zA-Z]+$/, | |
| 1044 | + "alphanumeric": /^[a-zA-Z0-9]+$/ | |
| 1045 | + }; | |
| 1046 | + FORMAT_REGEXPS.regexp = FORMAT_REGEXPS.regex; | |
| 1047 | + FORMAT_REGEXPS.pattern = FORMAT_REGEXPS.regex; | |
| 1048 | + FORMAT_REGEXPS.ipv4 = FORMAT_REGEXPS["ip-address"]; | |
| 1049 | + exports.isFormat = function isFormat(input, format, validator) { | |
| 1050 | + if (typeof input === "string" && FORMAT_REGEXPS[format] !== void 0) { | |
| 1051 | + if (FORMAT_REGEXPS[format] instanceof RegExp) return FORMAT_REGEXPS[format].test(input); | |
| 1052 | + if (typeof FORMAT_REGEXPS[format] === "function") return FORMAT_REGEXPS[format](input); | |
| 1053 | + } else if (validator && validator.customFormats && typeof validator.customFormats[format] === "function") return validator.customFormats[format](input); | |
| 1054 | + return true; | |
| 1055 | + }; | |
| 1056 | + var makeSuffix = exports.makeSuffix = function makeSuffix(key) { | |
| 1057 | + key = key.toString(); | |
| 1058 | + if (!key.match(/[.\s\[\]]/) && !key.match(/^[\d]/)) return "." + key; | |
| 1059 | + if (key.match(/^\d+$/)) return "[" + key + "]"; | |
| 1060 | + return "[" + JSON.stringify(key) + "]"; | |
| 1061 | + }; | |
| 1062 | + exports.deepCompareStrict = function deepCompareStrict(a, b) { | |
| 1063 | + if (typeof a !== typeof b) return false; | |
| 1064 | + if (Array.isArray(a)) { | |
| 1065 | + if (!Array.isArray(b)) return false; | |
| 1066 | + if (a.length !== b.length) return false; | |
| 1067 | + return a.every(function(v, i) { | |
| 1068 | + return deepCompareStrict(a[i], b[i]); | |
| 1069 | + }); | |
| 1070 | + } | |
| 1071 | + if (typeof a === "object") { | |
| 1072 | + if (!a || !b) return a === b; | |
| 1073 | + var aKeys = Object.keys(a); | |
| 1074 | + var bKeys = Object.keys(b); | |
| 1075 | + if (aKeys.length !== bKeys.length) return false; | |
| 1076 | + return aKeys.every(function(v) { | |
| 1077 | + return deepCompareStrict(a[v], b[v]); | |
| 1078 | + }); | |
| 1079 | + } | |
| 1080 | + return a === b; | |
| 1081 | + }; | |
| 1082 | + function deepMerger(target, dst, e, i) { | |
| 1083 | + if (typeof e === "object") dst[i] = deepMerge(target[i], e); | |
| 1084 | + else if (target.indexOf(e) === -1) dst.push(e); | |
| 1085 | + } | |
| 1086 | + function copyist(src, dst, key) { | |
| 1087 | + dst[key] = src[key]; | |
| 1088 | + } | |
| 1089 | + function copyistWithDeepMerge(target, src, dst, key) { | |
| 1090 | + if (typeof src[key] !== "object" || !src[key]) dst[key] = src[key]; | |
| 1091 | + else if (!target[key]) dst[key] = src[key]; | |
| 1092 | + else dst[key] = deepMerge(target[key], src[key]); | |
| 1093 | + } | |
| 1094 | + function deepMerge(target, src) { | |
| 1095 | + var array = Array.isArray(src); | |
| 1096 | + var dst = array && [] || {}; | |
| 1097 | + if (array) { | |
| 1098 | + target = target || []; | |
| 1099 | + dst = dst.concat(target); | |
| 1100 | + src.forEach(deepMerger.bind(null, target, dst)); | |
| 1101 | + } else { | |
| 1102 | + if (target && typeof target === "object") Object.keys(target).forEach(copyist.bind(null, target, dst)); | |
| 1103 | + Object.keys(src).forEach(copyistWithDeepMerge.bind(null, target, src, dst)); | |
| 1104 | + } | |
| 1105 | + return dst; | |
| 1106 | + } | |
| 1107 | + module.exports.deepMerge = deepMerge; | |
| 1108 | + /** | |
| 1109 | + * Validates instance against the provided schema | |
| 1110 | + * Implements URI+JSON Pointer encoding, e.g. "%7e"="~0"=>"~", "~1"="%2f"=>"/" | |
| 1111 | + * @param o | |
| 1112 | + * @param s The path to walk o along | |
| 1113 | + * @return any | |
| 1114 | + */ | |
| 1115 | + exports.objectGetPath = function objectGetPath(o, s) { | |
| 1116 | + var parts = s.split("/").slice(1); | |
| 1117 | + var k; | |
| 1118 | + while (typeof (k = parts.shift()) == "string") { | |
| 1119 | + var n = decodeURIComponent(k.replace(/~0/, "~").replace(/~1/g, "/")); | |
| 1120 | + if (!(n in o)) return; | |
| 1121 | + o = o[n]; | |
| 1122 | + } | |
| 1123 | + return o; | |
| 1124 | + }; | |
| 1125 | + function pathEncoder(v) { | |
| 1126 | + return "/" + encodeURIComponent(v).replace(/~/g, "%7E"); | |
| 1127 | + } | |
| 1128 | + /** | |
| 1129 | + * Accept an Array of property names and return a JSON Pointer URI fragment | |
| 1130 | + * @param Array a | |
| 1131 | + * @return {String} | |
| 1132 | + */ | |
| 1133 | + exports.encodePath = function encodePointer(a) { | |
| 1134 | + return a.map(pathEncoder).join(""); | |
| 1135 | + }; | |
| 1136 | + /** | |
| 1137 | + * Calculate the number of decimal places a number uses | |
| 1138 | + * We need this to get correct results out of multipleOf and divisibleBy | |
| 1139 | + * when either figure is has decimal places, due to IEEE-754 float issues. | |
| 1140 | + * @param number | |
| 1141 | + * @returns {number} | |
| 1142 | + */ | |
| 1143 | + exports.getDecimalPlaces = function getDecimalPlaces(number) { | |
| 1144 | + var decimalPlaces = 0; | |
| 1145 | + if (isNaN(number)) return decimalPlaces; | |
| 1146 | + if (typeof number !== "number") number = Number(number); | |
| 1147 | + var parts = number.toString().split("e"); | |
| 1148 | + if (parts.length === 2) if (parts[1][0] !== "-") return decimalPlaces; | |
| 1149 | + else decimalPlaces = Number(parts[1].slice(1)); | |
| 1150 | + var decimalParts = parts[0].split("."); | |
| 1151 | + if (decimalParts.length === 2) decimalPlaces += decimalParts[1].length; | |
| 1152 | + return decimalPlaces; | |
| 1153 | + }; | |
| 1154 | + exports.isSchema = function isSchema(val) { | |
| 1155 | + return typeof val === "object" && val || typeof val === "boolean"; | |
| 1156 | + }; | |
| 1157 | + /** | |
| 1158 | + * Resolve target URL from a base and relative URL. | |
| 1159 | + * Similar to Node's URL Lib's legacy resolve function. | |
| 1160 | + * Code from example in deprecation note in said library. | |
| 1161 | + * @param string | |
| 1162 | + * @param string | |
| 1163 | + * @returns {string} | |
| 1164 | + */ | |
| 1165 | + var resolveUrl = exports.resolveUrl = function resolveUrl(from, to) { | |
| 1166 | + const resolvedUrl = new URL(to, new URL(from, "resolve://")); | |
| 1167 | + if (resolvedUrl.protocol === "resolve:") { | |
| 1168 | + const { pathname, search, hash } = resolvedUrl; | |
| 1169 | + return pathname + search + hash; | |
| 1170 | + } | |
| 1171 | + return resolvedUrl.toString(); | |
| 1172 | + }; | |
| 1173 | + })); | |
| 1132 | 1174 | |
| 1133 | -SchemaContext.prototype.makeChild = function makeChild(schema, propertyName){ | |
| 1134 | - var path = (propertyName===undefined) ? this.path : this.path.concat([propertyName]); | |
| 1135 | - var id = schema.$id || schema.id; | |
| 1136 | - let base = (() => resolveUrl(this.base,id||''))(); | |
| 1137 | - var ctx = new SchemaContext(schema, this.options, path, base, Object.create(this.schemas)); | |
| 1138 | - if(id && !ctx.schemas[base]){ | |
| 1139 | - ctx.schemas[base] = schema; | |
| 1140 | - } | |
| 1141 | - return ctx; | |
| 1142 | -}; | |
| 1175 | +//#endregion | |
| 1176 | +//#region node_modules/jsonschema/lib/attribute.js | |
| 1177 | + var require_attribute = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 1178 | + var helpers = require_helpers(); | |
| 1179 | + /** @type ValidatorResult */ | |
| 1180 | + var ValidatorResult = helpers.ValidatorResult; | |
| 1181 | + /** @type SchemaError */ | |
| 1182 | + var SchemaError = helpers.SchemaError; | |
| 1183 | + var attribute = {}; | |
| 1184 | + attribute.ignoreProperties = { | |
| 1185 | + "id": true, | |
| 1186 | + "default": true, | |
| 1187 | + "description": true, | |
| 1188 | + "title": true, | |
| 1189 | + "additionalItems": true, | |
| 1190 | + "then": true, | |
| 1191 | + "else": true, | |
| 1192 | + "$schema": true, | |
| 1193 | + "$ref": true, | |
| 1194 | + "extends": true | |
| 1195 | + }; | |
| 1196 | + /** | |
| 1197 | + * @name validators | |
| 1198 | + */ | |
| 1199 | + var validators = attribute.validators = {}; | |
| 1200 | + /** | |
| 1201 | + * Validates whether the instance if of a certain type | |
| 1202 | + * @param instance | |
| 1203 | + * @param schema | |
| 1204 | + * @param options | |
| 1205 | + * @param ctx | |
| 1206 | + * @return {ValidatorResult|null} | |
| 1207 | + */ | |
| 1208 | + validators.type = function validateType(instance, schema, options, ctx) { | |
| 1209 | + if (instance === void 0) return null; | |
| 1210 | + var result = new ValidatorResult(instance, schema, options, ctx); | |
| 1211 | + var types = Array.isArray(schema.type) ? schema.type : [schema.type]; | |
| 1212 | + if (!types.some(this.testType.bind(this, instance, schema, options, ctx))) { | |
| 1213 | + var list = types.map(function(v) { | |
| 1214 | + if (!v) return; | |
| 1215 | + var id = v.$id || v.id; | |
| 1216 | + return id ? "<" + id + ">" : v + ""; | |
| 1217 | + }); | |
| 1218 | + result.addError({ | |
| 1219 | + name: "type", | |
| 1220 | + argument: list, | |
| 1221 | + message: "is not of a type(s) " + list | |
| 1222 | + }); | |
| 1223 | + } | |
| 1224 | + return result; | |
| 1225 | + }; | |
| 1226 | + function testSchemaNoThrow(instance, options, ctx, callback, schema) { | |
| 1227 | + var throwError = options.throwError; | |
| 1228 | + var throwAll = options.throwAll; | |
| 1229 | + options.throwError = false; | |
| 1230 | + options.throwAll = false; | |
| 1231 | + var res = this.validateSchema(instance, schema, options, ctx); | |
| 1232 | + options.throwError = throwError; | |
| 1233 | + options.throwAll = throwAll; | |
| 1234 | + if (!res.valid && callback instanceof Function) callback(res); | |
| 1235 | + return res.valid; | |
| 1236 | + } | |
| 1237 | + /** | |
| 1238 | + * Validates whether the instance matches some of the given schemas | |
| 1239 | + * @param instance | |
| 1240 | + * @param schema | |
| 1241 | + * @param options | |
| 1242 | + * @param ctx | |
| 1243 | + * @return {ValidatorResult|null} | |
| 1244 | + */ | |
| 1245 | + validators.anyOf = function validateAnyOf(instance, schema, options, ctx) { | |
| 1246 | + if (instance === void 0) return null; | |
| 1247 | + var result = new ValidatorResult(instance, schema, options, ctx); | |
| 1248 | + var inner = new ValidatorResult(instance, schema, options, ctx); | |
| 1249 | + if (!Array.isArray(schema.anyOf)) throw new SchemaError("anyOf must be an array"); | |
| 1250 | + if (!schema.anyOf.some(testSchemaNoThrow.bind(this, instance, options, ctx, function(res) { | |
| 1251 | + inner.importErrors(res); | |
| 1252 | + }))) { | |
| 1253 | + var list = schema.anyOf.map(function(v, i) { | |
| 1254 | + var id = v.$id || v.id; | |
| 1255 | + if (id) return "<" + id + ">"; | |
| 1256 | + return v.title && JSON.stringify(v.title) || v["$ref"] && "<" + v["$ref"] + ">" || "[subschema " + i + "]"; | |
| 1257 | + }); | |
| 1258 | + if (options.nestedErrors) result.importErrors(inner); | |
| 1259 | + result.addError({ | |
| 1260 | + name: "anyOf", | |
| 1261 | + argument: list, | |
| 1262 | + message: "is not any of " + list.join(",") | |
| 1263 | + }); | |
| 1264 | + } | |
| 1265 | + return result; | |
| 1266 | + }; | |
| 1267 | + /** | |
| 1268 | + * Validates whether the instance matches every given schema | |
| 1269 | + * @param instance | |
| 1270 | + * @param schema | |
| 1271 | + * @param options | |
| 1272 | + * @param ctx | |
| 1273 | + * @return {String|null} | |
| 1274 | + */ | |
| 1275 | + validators.allOf = function validateAllOf(instance, schema, options, ctx) { | |
| 1276 | + if (instance === void 0) return null; | |
| 1277 | + if (!Array.isArray(schema.allOf)) throw new SchemaError("allOf must be an array"); | |
| 1278 | + var result = new ValidatorResult(instance, schema, options, ctx); | |
| 1279 | + var self = this; | |
| 1280 | + schema.allOf.forEach(function(v, i) { | |
| 1281 | + var valid = self.validateSchema(instance, v, options, ctx); | |
| 1282 | + if (!valid.valid) { | |
| 1283 | + var msg = v.$id || v.id || v.title && JSON.stringify(v.title) || v["$ref"] && "<" + v["$ref"] + ">" || "[subschema " + i + "]"; | |
| 1284 | + result.addError({ | |
| 1285 | + name: "allOf", | |
| 1286 | + argument: { | |
| 1287 | + id: msg, | |
| 1288 | + length: valid.errors.length, | |
| 1289 | + valid | |
| 1290 | + }, | |
| 1291 | + message: "does not match allOf schema " + msg + " with " + valid.errors.length + " error[s]:" | |
| 1292 | + }); | |
| 1293 | + result.importErrors(valid); | |
| 1294 | + } | |
| 1295 | + }); | |
| 1296 | + return result; | |
| 1297 | + }; | |
| 1298 | + /** | |
| 1299 | + * Validates whether the instance matches exactly one of the given schemas | |
| 1300 | + * @param instance | |
| 1301 | + * @param schema | |
| 1302 | + * @param options | |
| 1303 | + * @param ctx | |
| 1304 | + * @return {String|null} | |
| 1305 | + */ | |
| 1306 | + validators.oneOf = function validateOneOf(instance, schema, options, ctx) { | |
| 1307 | + if (instance === void 0) return null; | |
| 1308 | + if (!Array.isArray(schema.oneOf)) throw new SchemaError("oneOf must be an array"); | |
| 1309 | + var result = new ValidatorResult(instance, schema, options, ctx); | |
| 1310 | + var inner = new ValidatorResult(instance, schema, options, ctx); | |
| 1311 | + var count = schema.oneOf.filter(testSchemaNoThrow.bind(this, instance, options, ctx, function(res) { | |
| 1312 | + inner.importErrors(res); | |
| 1313 | + })).length; | |
| 1314 | + var list = schema.oneOf.map(function(v, i) { | |
| 1315 | + return v.$id || v.id || v.title && JSON.stringify(v.title) || v["$ref"] && "<" + v["$ref"] + ">" || "[subschema " + i + "]"; | |
| 1316 | + }); | |
| 1317 | + if (count !== 1) { | |
| 1318 | + if (options.nestedErrors) result.importErrors(inner); | |
| 1319 | + result.addError({ | |
| 1320 | + name: "oneOf", | |
| 1321 | + argument: list, | |
| 1322 | + message: "is not exactly one from " + list.join(",") | |
| 1323 | + }); | |
| 1324 | + } | |
| 1325 | + return result; | |
| 1326 | + }; | |
| 1327 | + /** | |
| 1328 | + * Validates "then" or "else" depending on the result of validating "if" | |
| 1329 | + * @param instance | |
| 1330 | + * @param schema | |
| 1331 | + * @param options | |
| 1332 | + * @param ctx | |
| 1333 | + * @return {String|null} | |
| 1334 | + */ | |
| 1335 | + validators.if = function validateIf(instance, schema, options, ctx) { | |
| 1336 | + if (instance === void 0) return null; | |
| 1337 | + if (!helpers.isSchema(schema.if)) throw new Error("Expected \"if\" keyword to be a schema"); | |
| 1338 | + var ifValid = testSchemaNoThrow.call(this, instance, options, ctx, null, schema.if); | |
| 1339 | + var result = new ValidatorResult(instance, schema, options, ctx); | |
| 1340 | + var res; | |
| 1341 | + if (ifValid) { | |
| 1342 | + if (schema.then === void 0) return; | |
| 1343 | + if (!helpers.isSchema(schema.then)) throw new Error("Expected \"then\" keyword to be a schema"); | |
| 1344 | + res = this.validateSchema(instance, schema.then, options, ctx.makeChild(schema.then)); | |
| 1345 | + result.importErrors(res); | |
| 1346 | + } else { | |
| 1347 | + if (schema.else === void 0) return; | |
| 1348 | + if (!helpers.isSchema(schema.else)) throw new Error("Expected \"else\" keyword to be a schema"); | |
| 1349 | + res = this.validateSchema(instance, schema.else, options, ctx.makeChild(schema.else)); | |
| 1350 | + result.importErrors(res); | |
| 1351 | + } | |
| 1352 | + return result; | |
| 1353 | + }; | |
| 1354 | + function getEnumerableProperty(object, key) { | |
| 1355 | + if (Object.hasOwnProperty.call(object, key)) return object[key]; | |
| 1356 | + if (!(key in object)) return; | |
| 1357 | + while (object = Object.getPrototypeOf(object)) if (Object.propertyIsEnumerable.call(object, key)) return object[key]; | |
| 1358 | + } | |
| 1359 | + /** | |
| 1360 | + * Validates propertyNames | |
| 1361 | + * @param instance | |
| 1362 | + * @param schema | |
| 1363 | + * @param options | |
| 1364 | + * @param ctx | |
| 1365 | + * @return {String|null|ValidatorResult} | |
| 1366 | + */ | |
| 1367 | + validators.propertyNames = function validatePropertyNames(instance, schema, options, ctx) { | |
| 1368 | + if (!this.types.object(instance)) return; | |
| 1369 | + var result = new ValidatorResult(instance, schema, options, ctx); | |
| 1370 | + var subschema = schema.propertyNames !== void 0 ? schema.propertyNames : {}; | |
| 1371 | + if (!helpers.isSchema(subschema)) throw new SchemaError("Expected \"propertyNames\" to be a schema (object or boolean)"); | |
| 1372 | + for (var property in instance) if (getEnumerableProperty(instance, property) !== void 0) { | |
| 1373 | + var res = this.validateSchema(property, subschema, options, ctx.makeChild(subschema)); | |
| 1374 | + result.importErrors(res); | |
| 1375 | + } | |
| 1376 | + return result; | |
| 1377 | + }; | |
| 1378 | + /** | |
| 1379 | + * Validates properties | |
| 1380 | + * @param instance | |
| 1381 | + * @param schema | |
| 1382 | + * @param options | |
| 1383 | + * @param ctx | |
| 1384 | + * @return {String|null|ValidatorResult} | |
| 1385 | + */ | |
| 1386 | + validators.properties = function validateProperties(instance, schema, options, ctx) { | |
| 1387 | + if (!this.types.object(instance)) return; | |
| 1388 | + var result = new ValidatorResult(instance, schema, options, ctx); | |
| 1389 | + var properties = schema.properties || {}; | |
| 1390 | + for (var property in properties) { | |
| 1391 | + var subschema = properties[property]; | |
| 1392 | + if (subschema === void 0) continue; | |
| 1393 | + else if (subschema === null) throw new SchemaError("Unexpected null, expected schema in \"properties\""); | |
| 1394 | + if (typeof options.preValidateProperty == "function") options.preValidateProperty(instance, property, subschema, options, ctx); | |
| 1395 | + var prop = getEnumerableProperty(instance, property); | |
| 1396 | + var res = this.validateSchema(prop, subschema, options, ctx.makeChild(subschema, property)); | |
| 1397 | + if (res.instance !== result.instance[property]) result.instance[property] = res.instance; | |
| 1398 | + result.importErrors(res); | |
| 1399 | + } | |
| 1400 | + return result; | |
| 1401 | + }; | |
| 1402 | + /** | |
| 1403 | + * Test a specific property within in instance against the additionalProperties schema attribute | |
| 1404 | + * This ignores properties with definitions in the properties schema attribute, but no other attributes. | |
| 1405 | + * If too many more types of property-existence tests pop up they may need their own class of tests (like `type` has) | |
| 1406 | + * @private | |
| 1407 | + * @return {boolean} | |
| 1408 | + */ | |
| 1409 | + function testAdditionalProperty(instance, schema, options, ctx, property, result) { | |
| 1410 | + if (!this.types.object(instance)) return; | |
| 1411 | + if (schema.properties && schema.properties[property] !== void 0) return; | |
| 1412 | + if (schema.additionalProperties === false) result.addError({ | |
| 1413 | + name: "additionalProperties", | |
| 1414 | + argument: property, | |
| 1415 | + message: "is not allowed to have the additional property " + JSON.stringify(property) | |
| 1416 | + }); | |
| 1417 | + else { | |
| 1418 | + var additionalProperties = schema.additionalProperties || {}; | |
| 1419 | + if (typeof options.preValidateProperty == "function") options.preValidateProperty(instance, property, additionalProperties, options, ctx); | |
| 1420 | + var res = this.validateSchema(instance[property], additionalProperties, options, ctx.makeChild(additionalProperties, property)); | |
| 1421 | + if (res.instance !== result.instance[property]) result.instance[property] = res.instance; | |
| 1422 | + result.importErrors(res); | |
| 1423 | + } | |
| 1424 | + } | |
| 1425 | + /** | |
| 1426 | + * Validates patternProperties | |
| 1427 | + * @param instance | |
| 1428 | + * @param schema | |
| 1429 | + * @param options | |
| 1430 | + * @param ctx | |
| 1431 | + * @return {String|null|ValidatorResult} | |
| 1432 | + */ | |
| 1433 | + validators.patternProperties = function validatePatternProperties(instance, schema, options, ctx) { | |
| 1434 | + if (!this.types.object(instance)) return; | |
| 1435 | + var result = new ValidatorResult(instance, schema, options, ctx); | |
| 1436 | + var patternProperties = schema.patternProperties || {}; | |
| 1437 | + for (var property in instance) { | |
| 1438 | + var test = true; | |
| 1439 | + for (var pattern in patternProperties) { | |
| 1440 | + var subschema = patternProperties[pattern]; | |
| 1441 | + if (subschema === void 0) continue; | |
| 1442 | + else if (subschema === null) throw new SchemaError("Unexpected null, expected schema in \"patternProperties\""); | |
| 1443 | + try { | |
| 1444 | + var regexp = new RegExp(pattern, "u"); | |
| 1445 | + } catch (_e) { | |
| 1446 | + regexp = new RegExp(pattern); | |
| 1447 | + } | |
| 1448 | + if (!regexp.test(property)) continue; | |
| 1449 | + test = false; | |
| 1450 | + if (typeof options.preValidateProperty == "function") options.preValidateProperty(instance, property, subschema, options, ctx); | |
| 1451 | + var res = this.validateSchema(instance[property], subschema, options, ctx.makeChild(subschema, property)); | |
| 1452 | + if (res.instance !== result.instance[property]) result.instance[property] = res.instance; | |
| 1453 | + result.importErrors(res); | |
| 1454 | + } | |
| 1455 | + if (test) testAdditionalProperty.call(this, instance, schema, options, ctx, property, result); | |
| 1456 | + } | |
| 1457 | + return result; | |
| 1458 | + }; | |
| 1459 | + /** | |
| 1460 | + * Validates additionalProperties | |
| 1461 | + * @param instance | |
| 1462 | + * @param schema | |
| 1463 | + * @param options | |
| 1464 | + * @param ctx | |
| 1465 | + * @return {String|null|ValidatorResult} | |
| 1466 | + */ | |
| 1467 | + validators.additionalProperties = function validateAdditionalProperties(instance, schema, options, ctx) { | |
| 1468 | + if (!this.types.object(instance)) return; | |
| 1469 | + if (schema.patternProperties) return null; | |
| 1470 | + var result = new ValidatorResult(instance, schema, options, ctx); | |
| 1471 | + for (var property in instance) testAdditionalProperty.call(this, instance, schema, options, ctx, property, result); | |
| 1472 | + return result; | |
| 1473 | + }; | |
| 1474 | + /** | |
| 1475 | + * Validates whether the instance value is at least of a certain length, when the instance value is a string. | |
| 1476 | + * @param instance | |
| 1477 | + * @param schema | |
| 1478 | + * @return {String|null} | |
| 1479 | + */ | |
| 1480 | + validators.minProperties = function validateMinProperties(instance, schema, options, ctx) { | |
| 1481 | + if (!this.types.object(instance)) return; | |
| 1482 | + var result = new ValidatorResult(instance, schema, options, ctx); | |
| 1483 | + if (!(Object.keys(instance).length >= schema.minProperties)) result.addError({ | |
| 1484 | + name: "minProperties", | |
| 1485 | + argument: schema.minProperties, | |
| 1486 | + message: "does not meet minimum property length of " + schema.minProperties | |
| 1487 | + }); | |
| 1488 | + return result; | |
| 1489 | + }; | |
| 1490 | + /** | |
| 1491 | + * Validates whether the instance value is at most of a certain length, when the instance value is a string. | |
| 1492 | + * @param instance | |
| 1493 | + * @param schema | |
| 1494 | + * @return {String|null} | |
| 1495 | + */ | |
| 1496 | + validators.maxProperties = function validateMaxProperties(instance, schema, options, ctx) { | |
| 1497 | + if (!this.types.object(instance)) return; | |
| 1498 | + var result = new ValidatorResult(instance, schema, options, ctx); | |
| 1499 | + if (!(Object.keys(instance).length <= schema.maxProperties)) result.addError({ | |
| 1500 | + name: "maxProperties", | |
| 1501 | + argument: schema.maxProperties, | |
| 1502 | + message: "does not meet maximum property length of " + schema.maxProperties | |
| 1503 | + }); | |
| 1504 | + return result; | |
| 1505 | + }; | |
| 1506 | + /** | |
| 1507 | + * Validates items when instance is an array | |
| 1508 | + * @param instance | |
| 1509 | + * @param schema | |
| 1510 | + * @param options | |
| 1511 | + * @param ctx | |
| 1512 | + * @return {String|null|ValidatorResult} | |
| 1513 | + */ | |
| 1514 | + validators.items = function validateItems(instance, schema, options, ctx) { | |
| 1515 | + var self = this; | |
| 1516 | + if (!this.types.array(instance)) return; | |
| 1517 | + if (schema.items === void 0) return; | |
| 1518 | + var result = new ValidatorResult(instance, schema, options, ctx); | |
| 1519 | + instance.every(function(value, i) { | |
| 1520 | + if (Array.isArray(schema.items)) var items = schema.items[i] === void 0 ? schema.additionalItems : schema.items[i]; | |
| 1521 | + else var items = schema.items; | |
| 1522 | + if (items === void 0) return true; | |
| 1523 | + if (items === false) { | |
| 1524 | + result.addError({ | |
| 1525 | + name: "items", | |
| 1526 | + message: "additionalItems not permitted" | |
| 1527 | + }); | |
| 1528 | + return false; | |
| 1529 | + } | |
| 1530 | + var res = self.validateSchema(value, items, options, ctx.makeChild(items, i)); | |
| 1531 | + if (res.instance !== result.instance[i]) result.instance[i] = res.instance; | |
| 1532 | + result.importErrors(res); | |
| 1533 | + return true; | |
| 1534 | + }); | |
| 1535 | + return result; | |
| 1536 | + }; | |
| 1537 | + /** | |
| 1538 | + * Validates the "contains" keyword | |
| 1539 | + * @param instance | |
| 1540 | + * @param schema | |
| 1541 | + * @param options | |
| 1542 | + * @param ctx | |
| 1543 | + * @return {String|null|ValidatorResult} | |
| 1544 | + */ | |
| 1545 | + validators.contains = function validateContains(instance, schema, options, ctx) { | |
| 1546 | + var self = this; | |
| 1547 | + if (!this.types.array(instance)) return; | |
| 1548 | + if (schema.contains === void 0) return; | |
| 1549 | + if (!helpers.isSchema(schema.contains)) throw new Error("Expected \"contains\" keyword to be a schema"); | |
| 1550 | + var result = new ValidatorResult(instance, schema, options, ctx); | |
| 1551 | + if (instance.some(function(value, i) { | |
| 1552 | + return self.validateSchema(value, schema.contains, options, ctx.makeChild(schema.contains, i)).errors.length === 0; | |
| 1553 | + }) === false) result.addError({ | |
| 1554 | + name: "contains", | |
| 1555 | + argument: schema.contains, | |
| 1556 | + message: "must contain an item matching given schema" | |
| 1557 | + }); | |
| 1558 | + return result; | |
| 1559 | + }; | |
| 1560 | + /** | |
| 1561 | + * Validates minimum and exclusiveMinimum when the type of the instance value is a number. | |
| 1562 | + * @param instance | |
| 1563 | + * @param schema | |
| 1564 | + * @return {String|null} | |
| 1565 | + */ | |
| 1566 | + validators.minimum = function validateMinimum(instance, schema, options, ctx) { | |
| 1567 | + if (!this.types.number(instance)) return; | |
| 1568 | + var result = new ValidatorResult(instance, schema, options, ctx); | |
| 1569 | + if (schema.exclusiveMinimum && schema.exclusiveMinimum === true) { | |
| 1570 | + if (!(instance > schema.minimum)) result.addError({ | |
| 1571 | + name: "minimum", | |
| 1572 | + argument: schema.minimum, | |
| 1573 | + message: "must be greater than " + schema.minimum | |
| 1574 | + }); | |
| 1575 | + } else if (!(instance >= schema.minimum)) result.addError({ | |
| 1576 | + name: "minimum", | |
| 1577 | + argument: schema.minimum, | |
| 1578 | + message: "must be greater than or equal to " + schema.minimum | |
| 1579 | + }); | |
| 1580 | + return result; | |
| 1581 | + }; | |
| 1582 | + /** | |
| 1583 | + * Validates maximum and exclusiveMaximum when the type of the instance value is a number. | |
| 1584 | + * @param instance | |
| 1585 | + * @param schema | |
| 1586 | + * @return {String|null} | |
| 1587 | + */ | |
| 1588 | + validators.maximum = function validateMaximum(instance, schema, options, ctx) { | |
| 1589 | + if (!this.types.number(instance)) return; | |
| 1590 | + var result = new ValidatorResult(instance, schema, options, ctx); | |
| 1591 | + if (schema.exclusiveMaximum && schema.exclusiveMaximum === true) { | |
| 1592 | + if (!(instance < schema.maximum)) result.addError({ | |
| 1593 | + name: "maximum", | |
| 1594 | + argument: schema.maximum, | |
| 1595 | + message: "must be less than " + schema.maximum | |
| 1596 | + }); | |
| 1597 | + } else if (!(instance <= schema.maximum)) result.addError({ | |
| 1598 | + name: "maximum", | |
| 1599 | + argument: schema.maximum, | |
| 1600 | + message: "must be less than or equal to " + schema.maximum | |
| 1601 | + }); | |
| 1602 | + return result; | |
| 1603 | + }; | |
| 1604 | + /** | |
| 1605 | + * Validates the number form of exclusiveMinimum when the type of the instance value is a number. | |
| 1606 | + * @param instance | |
| 1607 | + * @param schema | |
| 1608 | + * @return {String|null} | |
| 1609 | + */ | |
| 1610 | + validators.exclusiveMinimum = function validateExclusiveMinimum(instance, schema, options, ctx) { | |
| 1611 | + if (typeof schema.exclusiveMinimum === "boolean") return; | |
| 1612 | + if (!this.types.number(instance)) return; | |
| 1613 | + var result = new ValidatorResult(instance, schema, options, ctx); | |
| 1614 | + if (!(instance > schema.exclusiveMinimum)) result.addError({ | |
| 1615 | + name: "exclusiveMinimum", | |
| 1616 | + argument: schema.exclusiveMinimum, | |
| 1617 | + message: "must be strictly greater than " + schema.exclusiveMinimum | |
| 1618 | + }); | |
| 1619 | + return result; | |
| 1620 | + }; | |
| 1621 | + /** | |
| 1622 | + * Validates the number form of exclusiveMaximum when the type of the instance value is a number. | |
| 1623 | + * @param instance | |
| 1624 | + * @param schema | |
| 1625 | + * @return {String|null} | |
| 1626 | + */ | |
| 1627 | + validators.exclusiveMaximum = function validateExclusiveMaximum(instance, schema, options, ctx) { | |
| 1628 | + if (typeof schema.exclusiveMaximum === "boolean") return; | |
| 1629 | + if (!this.types.number(instance)) return; | |
| 1630 | + var result = new ValidatorResult(instance, schema, options, ctx); | |
| 1631 | + if (!(instance < schema.exclusiveMaximum)) result.addError({ | |
| 1632 | + name: "exclusiveMaximum", | |
| 1633 | + argument: schema.exclusiveMaximum, | |
| 1634 | + message: "must be strictly less than " + schema.exclusiveMaximum | |
| 1635 | + }); | |
| 1636 | + return result; | |
| 1637 | + }; | |
| 1638 | + /** | |
| 1639 | + * Perform validation for multipleOf and divisibleBy, which are essentially the same. | |
| 1640 | + * @param instance | |
| 1641 | + * @param schema | |
| 1642 | + * @param validationType | |
| 1643 | + * @param errorMessage | |
| 1644 | + * @returns {String|null} | |
| 1645 | + */ | |
| 1646 | + var validateMultipleOfOrDivisbleBy = function validateMultipleOfOrDivisbleBy(instance, schema, options, ctx, validationType, errorMessage) { | |
| 1647 | + if (!this.types.number(instance)) return; | |
| 1648 | + var validationArgument = schema[validationType]; | |
| 1649 | + if (validationArgument == 0) throw new SchemaError(validationType + " cannot be zero"); | |
| 1650 | + var result = new ValidatorResult(instance, schema, options, ctx); | |
| 1651 | + var instanceDecimals = helpers.getDecimalPlaces(instance); | |
| 1652 | + var divisorDecimals = helpers.getDecimalPlaces(validationArgument); | |
| 1653 | + var multiplier = Math.pow(10, Math.max(instanceDecimals, divisorDecimals)); | |
| 1654 | + if (Math.round(instance * multiplier) % Math.round(validationArgument * multiplier) !== 0) result.addError({ | |
| 1655 | + name: validationType, | |
| 1656 | + argument: validationArgument, | |
| 1657 | + message: errorMessage + JSON.stringify(validationArgument) | |
| 1658 | + }); | |
| 1659 | + return result; | |
| 1660 | + }; | |
| 1661 | + /** | |
| 1662 | + * Validates divisibleBy when the type of the instance value is a number. | |
| 1663 | + * @param instance | |
| 1664 | + * @param schema | |
| 1665 | + * @return {String|null} | |
| 1666 | + */ | |
| 1667 | + validators.multipleOf = function validateMultipleOf(instance, schema, options, ctx) { | |
| 1668 | + return validateMultipleOfOrDivisbleBy.call(this, instance, schema, options, ctx, "multipleOf", "is not a multiple of (divisible by) "); | |
| 1669 | + }; | |
| 1670 | + /** | |
| 1671 | + * Validates multipleOf when the type of the instance value is a number. | |
| 1672 | + * @param instance | |
| 1673 | + * @param schema | |
| 1674 | + * @return {String|null} | |
| 1675 | + */ | |
| 1676 | + validators.divisibleBy = function validateDivisibleBy(instance, schema, options, ctx) { | |
| 1677 | + return validateMultipleOfOrDivisbleBy.call(this, instance, schema, options, ctx, "divisibleBy", "is not divisible by (multiple of) "); | |
| 1678 | + }; | |
| 1679 | + /** | |
| 1680 | + * Validates whether the instance value is present. | |
| 1681 | + * @param instance | |
| 1682 | + * @param schema | |
| 1683 | + * @return {String|null} | |
| 1684 | + */ | |
| 1685 | + validators.required = function validateRequired(instance, schema, options, ctx) { | |
| 1686 | + var result = new ValidatorResult(instance, schema, options, ctx); | |
| 1687 | + if (instance === void 0 && schema.required === true) result.addError({ | |
| 1688 | + name: "required", | |
| 1689 | + message: "is required" | |
| 1690 | + }); | |
| 1691 | + else if (this.types.object(instance) && Array.isArray(schema.required)) schema.required.forEach(function(n) { | |
| 1692 | + if (getEnumerableProperty(instance, n) === void 0) result.addError({ | |
| 1693 | + name: "required", | |
| 1694 | + argument: n, | |
| 1695 | + message: "requires property " + JSON.stringify(n) | |
| 1696 | + }); | |
| 1697 | + }); | |
| 1698 | + return result; | |
| 1699 | + }; | |
| 1700 | + /** | |
| 1701 | + * Validates whether the instance value matches the regular expression, when the instance value is a string. | |
| 1702 | + * @param instance | |
| 1703 | + * @param schema | |
| 1704 | + * @return {String|null} | |
| 1705 | + */ | |
| 1706 | + validators.pattern = function validatePattern(instance, schema, options, ctx) { | |
| 1707 | + if (!this.types.string(instance)) return; | |
| 1708 | + var result = new ValidatorResult(instance, schema, options, ctx); | |
| 1709 | + var pattern = schema.pattern; | |
| 1710 | + try { | |
| 1711 | + var regexp = new RegExp(pattern, "u"); | |
| 1712 | + } catch (_e) { | |
| 1713 | + regexp = new RegExp(pattern); | |
| 1714 | + } | |
| 1715 | + if (!instance.match(regexp)) result.addError({ | |
| 1716 | + name: "pattern", | |
| 1717 | + argument: schema.pattern, | |
| 1718 | + message: "does not match pattern " + JSON.stringify(schema.pattern.toString()) | |
| 1719 | + }); | |
| 1720 | + return result; | |
| 1721 | + }; | |
| 1722 | + /** | |
| 1723 | + * Validates whether the instance value is of a certain defined format or a custom | |
| 1724 | + * format. | |
| 1725 | + * The following formats are supported for string types: | |
| 1726 | + * - date-time | |
| 1727 | + * - date | |
| 1728 | + * - time | |
| 1729 | + * - ip-address | |
| 1730 | + * - ipv6 | |
| 1731 | + * - uri | |
| 1732 | + * - color | |
| 1733 | + * - host-name | |
| 1734 | + * - alpha | |
| 1735 | + * - alpha-numeric | |
| 1736 | + * - utc-millisec | |
| 1737 | + * @param instance | |
| 1738 | + * @param schema | |
| 1739 | + * @param [options] | |
| 1740 | + * @param [ctx] | |
| 1741 | + * @return {String|null} | |
| 1742 | + */ | |
| 1743 | + validators.format = function validateFormat(instance, schema, options, ctx) { | |
| 1744 | + if (instance === void 0) return; | |
| 1745 | + var result = new ValidatorResult(instance, schema, options, ctx); | |
| 1746 | + if (!result.disableFormat && !helpers.isFormat(instance, schema.format, this)) result.addError({ | |
| 1747 | + name: "format", | |
| 1748 | + argument: schema.format, | |
| 1749 | + message: "does not conform to the " + JSON.stringify(schema.format) + " format" | |
| 1750 | + }); | |
| 1751 | + return result; | |
| 1752 | + }; | |
| 1753 | + /** | |
| 1754 | + * Validates whether the instance value is at least of a certain length, when the instance value is a string. | |
| 1755 | + * @param instance | |
| 1756 | + * @param schema | |
| 1757 | + * @return {String|null} | |
| 1758 | + */ | |
| 1759 | + validators.minLength = function validateMinLength(instance, schema, options, ctx) { | |
| 1760 | + if (!this.types.string(instance)) return; | |
| 1761 | + var result = new ValidatorResult(instance, schema, options, ctx); | |
| 1762 | + var hsp = instance.match(/[\uDC00-\uDFFF]/g); | |
| 1763 | + if (!(instance.length - (hsp ? hsp.length : 0) >= schema.minLength)) result.addError({ | |
| 1764 | + name: "minLength", | |
| 1765 | + argument: schema.minLength, | |
| 1766 | + message: "does not meet minimum length of " + schema.minLength | |
| 1767 | + }); | |
| 1768 | + return result; | |
| 1769 | + }; | |
| 1770 | + /** | |
| 1771 | + * Validates whether the instance value is at most of a certain length, when the instance value is a string. | |
| 1772 | + * @param instance | |
| 1773 | + * @param schema | |
| 1774 | + * @return {String|null} | |
| 1775 | + */ | |
| 1776 | + validators.maxLength = function validateMaxLength(instance, schema, options, ctx) { | |
| 1777 | + if (!this.types.string(instance)) return; | |
| 1778 | + var result = new ValidatorResult(instance, schema, options, ctx); | |
| 1779 | + var hsp = instance.match(/[\uDC00-\uDFFF]/g); | |
| 1780 | + if (!(instance.length - (hsp ? hsp.length : 0) <= schema.maxLength)) result.addError({ | |
| 1781 | + name: "maxLength", | |
| 1782 | + argument: schema.maxLength, | |
| 1783 | + message: "does not meet maximum length of " + schema.maxLength | |
| 1784 | + }); | |
| 1785 | + return result; | |
| 1786 | + }; | |
| 1787 | + /** | |
| 1788 | + * Validates whether instance contains at least a minimum number of items, when the instance is an Array. | |
| 1789 | + * @param instance | |
| 1790 | + * @param schema | |
| 1791 | + * @return {String|null} | |
| 1792 | + */ | |
| 1793 | + validators.minItems = function validateMinItems(instance, schema, options, ctx) { | |
| 1794 | + if (!this.types.array(instance)) return; | |
| 1795 | + var result = new ValidatorResult(instance, schema, options, ctx); | |
| 1796 | + if (!(instance.length >= schema.minItems)) result.addError({ | |
| 1797 | + name: "minItems", | |
| 1798 | + argument: schema.minItems, | |
| 1799 | + message: "does not meet minimum length of " + schema.minItems | |
| 1800 | + }); | |
| 1801 | + return result; | |
| 1802 | + }; | |
| 1803 | + /** | |
| 1804 | + * Validates whether instance contains no more than a maximum number of items, when the instance is an Array. | |
| 1805 | + * @param instance | |
| 1806 | + * @param schema | |
| 1807 | + * @return {String|null} | |
| 1808 | + */ | |
| 1809 | + validators.maxItems = function validateMaxItems(instance, schema, options, ctx) { | |
| 1810 | + if (!this.types.array(instance)) return; | |
| 1811 | + var result = new ValidatorResult(instance, schema, options, ctx); | |
| 1812 | + if (!(instance.length <= schema.maxItems)) result.addError({ | |
| 1813 | + name: "maxItems", | |
| 1814 | + argument: schema.maxItems, | |
| 1815 | + message: "does not meet maximum length of " + schema.maxItems | |
| 1816 | + }); | |
| 1817 | + return result; | |
| 1818 | + }; | |
| 1819 | + /** | |
| 1820 | + * Deep compares arrays for duplicates | |
| 1821 | + * @param v | |
| 1822 | + * @param i | |
| 1823 | + * @param a | |
| 1824 | + * @private | |
| 1825 | + * @return {boolean} | |
| 1826 | + */ | |
| 1827 | + function testArrays(v, i, a) { | |
| 1828 | + var j; | |
| 1829 | + var len = a.length; | |
| 1830 | + for (j = i + 1; j < len; j++) if (helpers.deepCompareStrict(v, a[j])) return false; | |
| 1831 | + return true; | |
| 1832 | + } | |
| 1833 | + /** | |
| 1834 | + * Validates whether there are no duplicates, when the instance is an Array. | |
| 1835 | + * @param instance | |
| 1836 | + * @return {String|null} | |
| 1837 | + */ | |
| 1838 | + validators.uniqueItems = function validateUniqueItems(instance, schema, options, ctx) { | |
| 1839 | + if (schema.uniqueItems !== true) return; | |
| 1840 | + if (!this.types.array(instance)) return; | |
| 1841 | + var result = new ValidatorResult(instance, schema, options, ctx); | |
| 1842 | + if (!instance.every(testArrays)) result.addError({ | |
| 1843 | + name: "uniqueItems", | |
| 1844 | + message: "contains duplicate item" | |
| 1845 | + }); | |
| 1846 | + return result; | |
| 1847 | + }; | |
| 1848 | + /** | |
| 1849 | + * Validate for the presence of dependency properties, if the instance is an object. | |
| 1850 | + * @param instance | |
| 1851 | + * @param schema | |
| 1852 | + * @param options | |
| 1853 | + * @param ctx | |
| 1854 | + * @return {null|ValidatorResult} | |
| 1855 | + */ | |
| 1856 | + validators.dependencies = function validateDependencies(instance, schema, options, ctx) { | |
| 1857 | + if (!this.types.object(instance)) return; | |
| 1858 | + var result = new ValidatorResult(instance, schema, options, ctx); | |
| 1859 | + for (var property in schema.dependencies) { | |
| 1860 | + if (instance[property] === void 0) continue; | |
| 1861 | + var dep = schema.dependencies[property]; | |
| 1862 | + var childContext = ctx.makeChild(dep, property); | |
| 1863 | + if (typeof dep == "string") dep = [dep]; | |
| 1864 | + if (Array.isArray(dep)) dep.forEach(function(prop) { | |
| 1865 | + if (instance[prop] === void 0) result.addError({ | |
| 1866 | + name: "dependencies", | |
| 1867 | + argument: childContext.propertyPath, | |
| 1868 | + message: "property " + prop + " not found, required by " + childContext.propertyPath | |
| 1869 | + }); | |
| 1870 | + }); | |
| 1871 | + else { | |
| 1872 | + var res = this.validateSchema(instance, dep, options, childContext); | |
| 1873 | + if (result.instance !== res.instance) result.instance = res.instance; | |
| 1874 | + if (res && res.errors.length) { | |
| 1875 | + result.addError({ | |
| 1876 | + name: "dependencies", | |
| 1877 | + argument: childContext.propertyPath, | |
| 1878 | + message: "does not meet dependency required by " + childContext.propertyPath | |
| 1879 | + }); | |
| 1880 | + result.importErrors(res); | |
| 1881 | + } | |
| 1882 | + } | |
| 1883 | + } | |
| 1884 | + return result; | |
| 1885 | + }; | |
| 1886 | + /** | |
| 1887 | + * Validates whether the instance value is one of the enumerated values. | |
| 1888 | + * | |
| 1889 | + * @param instance | |
| 1890 | + * @param schema | |
| 1891 | + * @return {ValidatorResult|null} | |
| 1892 | + */ | |
| 1893 | + validators["enum"] = function validateEnum(instance, schema, options, ctx) { | |
| 1894 | + if (instance === void 0) return null; | |
| 1895 | + if (!Array.isArray(schema["enum"])) throw new SchemaError("enum expects an array", schema); | |
| 1896 | + var result = new ValidatorResult(instance, schema, options, ctx); | |
| 1897 | + if (!schema["enum"].some(helpers.deepCompareStrict.bind(null, instance))) result.addError({ | |
| 1898 | + name: "enum", | |
| 1899 | + argument: schema["enum"], | |
| 1900 | + message: "is not one of enum values: " + schema["enum"].map(String).join(",") | |
| 1901 | + }); | |
| 1902 | + return result; | |
| 1903 | + }; | |
| 1904 | + /** | |
| 1905 | + * Validates whether the instance exactly matches a given value | |
| 1906 | + * | |
| 1907 | + * @param instance | |
| 1908 | + * @param schema | |
| 1909 | + * @return {ValidatorResult|null} | |
| 1910 | + */ | |
| 1911 | + validators["const"] = function validateEnum(instance, schema, options, ctx) { | |
| 1912 | + if (instance === void 0) return null; | |
| 1913 | + var result = new ValidatorResult(instance, schema, options, ctx); | |
| 1914 | + if (!helpers.deepCompareStrict(schema["const"], instance)) result.addError({ | |
| 1915 | + name: "const", | |
| 1916 | + argument: schema["const"], | |
| 1917 | + message: "does not exactly match expected constant: " + schema["const"] | |
| 1918 | + }); | |
| 1919 | + return result; | |
| 1920 | + }; | |
| 1921 | + /** | |
| 1922 | + * Validates whether the instance if of a prohibited type. | |
| 1923 | + * @param instance | |
| 1924 | + * @param schema | |
| 1925 | + * @param options | |
| 1926 | + * @param ctx | |
| 1927 | + * @return {null|ValidatorResult} | |
| 1928 | + */ | |
| 1929 | + validators.not = validators.disallow = function validateNot(instance, schema, options, ctx) { | |
| 1930 | + var self = this; | |
| 1931 | + if (instance === void 0) return null; | |
| 1932 | + var result = new ValidatorResult(instance, schema, options, ctx); | |
| 1933 | + var notTypes = schema.not || schema.disallow; | |
| 1934 | + if (!notTypes) return null; | |
| 1935 | + if (!Array.isArray(notTypes)) notTypes = [notTypes]; | |
| 1936 | + notTypes.forEach(function(type) { | |
| 1937 | + if (self.testType(instance, schema, options, ctx, type)) { | |
| 1938 | + var schemaId = type && (type.$id || type.id) || type; | |
| 1939 | + result.addError({ | |
| 1940 | + name: "not", | |
| 1941 | + argument: schemaId, | |
| 1942 | + message: "is of prohibited type " + schemaId | |
| 1943 | + }); | |
| 1944 | + } | |
| 1945 | + }); | |
| 1946 | + return result; | |
| 1947 | + }; | |
| 1948 | + module.exports = attribute; | |
| 1949 | + })); | |
| 1143 | 1950 | |
| 1144 | -var FORMAT_REGEXPS = exports.FORMAT_REGEXPS = { | |
| 1145 | - // 7.3.1. Dates, Times, and Duration | |
| 1146 | - 'date-time': /^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])[tT ](2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])(\.\d+)?([zZ]|[+-]([0-5][0-9]):(60|[0-5][0-9]))$/, | |
| 1147 | - 'date': /^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])$/, | |
| 1148 | - 'time': /^(2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])$/, | |
| 1149 | - 'duration': /P(T\d+(H(\d+M(\d+S)?)?|M(\d+S)?|S)|\d+(D|M(\d+D)?|Y(\d+M(\d+D)?)?)(T\d+(H(\d+M(\d+S)?)?|M(\d+S)?|S))?|\d+W)/i, | |
| 1951 | +//#endregion | |
| 1952 | +//#region node_modules/jsonschema/lib/scan.js | |
| 1953 | + var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 1954 | + var helpers = require_helpers(); | |
| 1955 | + module.exports.SchemaScanResult = SchemaScanResult; | |
| 1956 | + function SchemaScanResult(found, ref) { | |
| 1957 | + this.id = found; | |
| 1958 | + this.ref = ref; | |
| 1959 | + } | |
| 1960 | + /** | |
| 1961 | + * Adds a schema with a certain urn to the Validator instance. | |
| 1962 | + * @param string uri | |
| 1963 | + * @param object schema | |
| 1964 | + * @return {Object} | |
| 1965 | + */ | |
| 1966 | + module.exports.scan = function scan(base, schema) { | |
| 1967 | + function scanSchema(baseuri, schema) { | |
| 1968 | + if (!schema || typeof schema != "object") return; | |
| 1969 | + if (schema.$ref) { | |
| 1970 | + let resolvedUri = helpers.resolveUrl(baseuri, schema.$ref); | |
| 1971 | + ref[resolvedUri] = ref[resolvedUri] ? ref[resolvedUri] + 1 : 0; | |
| 1972 | + return; | |
| 1973 | + } | |
| 1974 | + var id = schema.$id || schema.id; | |
| 1975 | + let resolvedBase = helpers.resolveUrl(baseuri, id); | |
| 1976 | + var ourBase = id ? resolvedBase : baseuri; | |
| 1977 | + if (ourBase) { | |
| 1978 | + if (ourBase.indexOf("#") < 0) ourBase += "#"; | |
| 1979 | + if (found[ourBase]) { | |
| 1980 | + if (!helpers.deepCompareStrict(found[ourBase], schema)) throw new Error("Schema <" + ourBase + "> already exists with different definition"); | |
| 1981 | + return found[ourBase]; | |
| 1982 | + } | |
| 1983 | + found[ourBase] = schema; | |
| 1984 | + if (ourBase[ourBase.length - 1] == "#") found[ourBase.substring(0, ourBase.length - 1)] = schema; | |
| 1985 | + } | |
| 1986 | + scanArray(ourBase + "/items", Array.isArray(schema.items) ? schema.items : [schema.items]); | |
| 1987 | + scanArray(ourBase + "/extends", Array.isArray(schema.extends) ? schema.extends : [schema.extends]); | |
| 1988 | + scanSchema(ourBase + "/additionalItems", schema.additionalItems); | |
| 1989 | + scanObject(ourBase + "/properties", schema.properties); | |
| 1990 | + scanSchema(ourBase + "/additionalProperties", schema.additionalProperties); | |
| 1991 | + scanObject(ourBase + "/definitions", schema.definitions); | |
| 1992 | + scanObject(ourBase + "/patternProperties", schema.patternProperties); | |
| 1993 | + scanObject(ourBase + "/dependencies", schema.dependencies); | |
| 1994 | + scanArray(ourBase + "/disallow", schema.disallow); | |
| 1995 | + scanArray(ourBase + "/allOf", schema.allOf); | |
| 1996 | + scanArray(ourBase + "/anyOf", schema.anyOf); | |
| 1997 | + scanArray(ourBase + "/oneOf", schema.oneOf); | |
| 1998 | + scanSchema(ourBase + "/not", schema.not); | |
| 1999 | + } | |
| 2000 | + function scanArray(baseuri, schemas) { | |
| 2001 | + if (!Array.isArray(schemas)) return; | |
| 2002 | + for (var i = 0; i < schemas.length; i++) scanSchema(baseuri + "/" + i, schemas[i]); | |
| 2003 | + } | |
| 2004 | + function scanObject(baseuri, schemas) { | |
| 2005 | + if (!schemas || typeof schemas != "object") return; | |
| 2006 | + for (var p in schemas) scanSchema(baseuri + "/" + p, schemas[p]); | |
| 2007 | + } | |
| 2008 | + var found = {}; | |
| 2009 | + var ref = {}; | |
| 2010 | + scanSchema(base, schema); | |
| 2011 | + return new SchemaScanResult(found, ref); | |
| 2012 | + }; | |
| 2013 | + })); | |
| 1150 | 2014 | |
| 1151 | - // 7.3.2. Email Addresses | |
| 1152 | - // TODO: fix the email production | |
| 1153 | - 'email': /^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/, | |
| 1154 | - 'idn-email': /^("(?:[!#-\[\]-\u{10FFFF}]|\\[\t -\u{10FFFF}])*"|[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}](?:\.?[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}])*)@([!#-'*+\-/-9=?A-Z\^-\u{10FFFF}](?:\.?[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}])*|\[[!-Z\^-\u{10FFFF}]*\])$/u, | |
| 2015 | +//#endregion | |
| 2016 | +//#region node_modules/jsonschema/lib/validator.js | |
| 2017 | + var require_validator = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 2018 | + var attribute = require_attribute(); | |
| 2019 | + var helpers = require_helpers(); | |
| 2020 | + var scanSchema = require_scan().scan; | |
| 2021 | + var ValidatorResult = helpers.ValidatorResult; | |
| 2022 | + var ValidatorResultError = helpers.ValidatorResultError; | |
| 2023 | + var SchemaError = helpers.SchemaError; | |
| 2024 | + var SchemaContext = helpers.SchemaContext; | |
| 2025 | + var anonymousBase = "/"; | |
| 2026 | + /** | |
| 2027 | + * Creates a new Validator object | |
| 2028 | + * @name Validator | |
| 2029 | + * @constructor | |
| 2030 | + */ | |
| 2031 | + var Validator = function Validator() { | |
| 2032 | + this.customFormats = Object.create(Validator.prototype.customFormats); | |
| 2033 | + this.schemas = {}; | |
| 2034 | + this.unresolvedRefs = []; | |
| 2035 | + this.types = Object.create(types); | |
| 2036 | + this.attributes = Object.create(attribute.validators); | |
| 2037 | + }; | |
| 2038 | + Validator.prototype.customFormats = {}; | |
| 2039 | + Validator.prototype.schemas = null; | |
| 2040 | + Validator.prototype.types = null; | |
| 2041 | + Validator.prototype.attributes = null; | |
| 2042 | + Validator.prototype.unresolvedRefs = null; | |
| 2043 | + /** | |
| 2044 | + * Adds a schema with a certain urn to the Validator instance. | |
| 2045 | + * @param schema | |
| 2046 | + * @param urn | |
| 2047 | + * @return {Object} | |
| 2048 | + */ | |
| 2049 | + Validator.prototype.addSchema = function addSchema(schema, base) { | |
| 2050 | + var self = this; | |
| 2051 | + if (!schema) return null; | |
| 2052 | + var scan = scanSchema(base || anonymousBase, schema); | |
| 2053 | + var ourUri = base || schema.$id || schema.id; | |
| 2054 | + for (var uri in scan.id) this.schemas[uri] = scan.id[uri]; | |
| 2055 | + for (var uri in scan.ref) this.unresolvedRefs.push(uri); | |
| 2056 | + this.unresolvedRefs = this.unresolvedRefs.filter(function(uri) { | |
| 2057 | + return typeof self.schemas[uri] === "undefined"; | |
| 2058 | + }); | |
| 2059 | + return this.schemas[ourUri]; | |
| 2060 | + }; | |
| 2061 | + Validator.prototype.addSubSchemaArray = function addSubSchemaArray(baseuri, schemas) { | |
| 2062 | + if (!Array.isArray(schemas)) return; | |
| 2063 | + for (var i = 0; i < schemas.length; i++) this.addSubSchema(baseuri, schemas[i]); | |
| 2064 | + }; | |
| 2065 | + Validator.prototype.addSubSchemaObject = function addSubSchemaArray(baseuri, schemas) { | |
| 2066 | + if (!schemas || typeof schemas != "object") return; | |
| 2067 | + for (var p in schemas) this.addSubSchema(baseuri, schemas[p]); | |
| 2068 | + }; | |
| 2069 | + /** | |
| 2070 | + * Sets all the schemas of the Validator instance. | |
| 2071 | + * @param schemas | |
| 2072 | + */ | |
| 2073 | + Validator.prototype.setSchemas = function setSchemas(schemas) { | |
| 2074 | + this.schemas = schemas; | |
| 2075 | + }; | |
| 2076 | + /** | |
| 2077 | + * Returns the schema of a certain urn | |
| 2078 | + * @param urn | |
| 2079 | + */ | |
| 2080 | + Validator.prototype.getSchema = function getSchema(urn) { | |
| 2081 | + return this.schemas[urn]; | |
| 2082 | + }; | |
| 2083 | + /** | |
| 2084 | + * Validates instance against the provided schema | |
| 2085 | + * @param instance | |
| 2086 | + * @param schema | |
| 2087 | + * @param [options] | |
| 2088 | + * @param [ctx] | |
| 2089 | + * @return {Array} | |
| 2090 | + */ | |
| 2091 | + Validator.prototype.validate = function validate(instance, schema, options, ctx) { | |
| 2092 | + if (typeof schema !== "boolean" && typeof schema !== "object" || schema === null) throw new SchemaError("Expected `schema` to be an object or boolean"); | |
| 2093 | + if (!options) options = {}; | |
| 2094 | + var id = schema.$id || schema.id; | |
| 2095 | + let base = helpers.resolveUrl(options.base, id || ""); | |
| 2096 | + if (!ctx) { | |
| 2097 | + ctx = new SchemaContext(schema, options, [], base, Object.create(this.schemas)); | |
| 2098 | + if (!ctx.schemas[base]) ctx.schemas[base] = schema; | |
| 2099 | + var found = scanSchema(base, schema); | |
| 2100 | + for (var n in found.id) { | |
| 2101 | + var sch = found.id[n]; | |
| 2102 | + ctx.schemas[n] = sch; | |
| 2103 | + } | |
| 2104 | + } | |
| 2105 | + if (options.required && instance === void 0) { | |
| 2106 | + var result = new ValidatorResult(instance, schema, options, ctx); | |
| 2107 | + result.addError("is required, but is undefined"); | |
| 2108 | + return result; | |
| 2109 | + } | |
| 2110 | + var result = this.validateSchema(instance, schema, options, ctx); | |
| 2111 | + if (!result) throw new Error("Result undefined"); | |
| 2112 | + else if (options.throwAll && result.errors.length) throw new ValidatorResultError(result); | |
| 2113 | + return result; | |
| 2114 | + }; | |
| 2115 | + /** | |
| 2116 | + * @param Object schema | |
| 2117 | + * @return mixed schema uri or false | |
| 2118 | + */ | |
| 2119 | + function shouldResolve(schema) { | |
| 2120 | + var ref = typeof schema === "string" ? schema : schema.$ref; | |
| 2121 | + if (typeof ref == "string") return ref; | |
| 2122 | + return false; | |
| 2123 | + } | |
| 2124 | + /** | |
| 2125 | + * Validates an instance against the schema (the actual work horse) | |
| 2126 | + * @param instance | |
| 2127 | + * @param schema | |
| 2128 | + * @param options | |
| 2129 | + * @param ctx | |
| 2130 | + * @private | |
| 2131 | + * @return {ValidatorResult} | |
| 2132 | + */ | |
| 2133 | + Validator.prototype.validateSchema = function validateSchema(instance, schema, options, ctx) { | |
| 2134 | + var result = new ValidatorResult(instance, schema, options, ctx); | |
| 2135 | + if (typeof schema === "boolean") { | |
| 2136 | + if (schema === true) schema = {}; | |
| 2137 | + else if (schema === false) schema = { type: [] }; | |
| 2138 | + } else if (!schema) throw new Error("schema is undefined"); | |
| 2139 | + if (schema["extends"]) if (Array.isArray(schema["extends"])) { | |
| 2140 | + var schemaobj = { | |
| 2141 | + schema, | |
| 2142 | + ctx | |
| 2143 | + }; | |
| 2144 | + schema["extends"].forEach(this.schemaTraverser.bind(this, schemaobj)); | |
| 2145 | + schema = schemaobj.schema; | |
| 2146 | + schemaobj.schema = null; | |
| 2147 | + schemaobj.ctx = null; | |
| 2148 | + schemaobj = null; | |
| 2149 | + } else schema = helpers.deepMerge(schema, this.superResolve(schema["extends"], ctx)); | |
| 2150 | + var switchSchema = shouldResolve(schema); | |
| 2151 | + if (switchSchema) { | |
| 2152 | + var resolved = this.resolve(schema, switchSchema, ctx); | |
| 2153 | + var subctx = new SchemaContext(resolved.subschema, options, ctx.path, resolved.switchSchema, ctx.schemas); | |
| 2154 | + return this.validateSchema(instance, resolved.subschema, options, subctx); | |
| 2155 | + } | |
| 2156 | + var skipAttributes = options && options.skipAttributes || []; | |
| 2157 | + for (var key in schema) if (!attribute.ignoreProperties[key] && skipAttributes.indexOf(key) < 0) { | |
| 2158 | + var validatorErr = null; | |
| 2159 | + var validator = this.attributes[key]; | |
| 2160 | + if (validator) validatorErr = validator.call(this, instance, schema, options, ctx); | |
| 2161 | + else if (options.allowUnknownAttributes === false) throw new SchemaError("Unsupported attribute: " + key, schema); | |
| 2162 | + if (validatorErr) result.importErrors(validatorErr); | |
| 2163 | + } | |
| 2164 | + if (typeof options.rewrite == "function") result.instance = options.rewrite.call(this, instance, schema, options, ctx); | |
| 2165 | + return result; | |
| 2166 | + }; | |
| 2167 | + /** | |
| 2168 | + * @private | |
| 2169 | + * @param Object schema | |
| 2170 | + * @param SchemaContext ctx | |
| 2171 | + * @returns Object schema or resolved schema | |
| 2172 | + */ | |
| 2173 | + Validator.prototype.schemaTraverser = function schemaTraverser(schemaobj, s) { | |
| 2174 | + schemaobj.schema = helpers.deepMerge(schemaobj.schema, this.superResolve(s, schemaobj.ctx)); | |
| 2175 | + }; | |
| 2176 | + /** | |
| 2177 | + * @private | |
| 2178 | + * @param Object schema | |
| 2179 | + * @param SchemaContext ctx | |
| 2180 | + * @returns Object schema or resolved schema | |
| 2181 | + */ | |
| 2182 | + Validator.prototype.superResolve = function superResolve(schema, ctx) { | |
| 2183 | + var ref = shouldResolve(schema); | |
| 2184 | + if (ref) return this.resolve(schema, ref, ctx).subschema; | |
| 2185 | + return schema; | |
| 2186 | + }; | |
| 2187 | + /** | |
| 2188 | + * @private | |
| 2189 | + * @param Object schema | |
| 2190 | + * @param Object switchSchema | |
| 2191 | + * @param SchemaContext ctx | |
| 2192 | + * @return Object resolved schemas {subschema:String, switchSchema: String} | |
| 2193 | + * @throws SchemaError | |
| 2194 | + */ | |
| 2195 | + Validator.prototype.resolve = function resolve(schema, switchSchema, ctx) { | |
| 2196 | + switchSchema = ctx.resolve(switchSchema); | |
| 2197 | + if (ctx.schemas[switchSchema]) return { | |
| 2198 | + subschema: ctx.schemas[switchSchema], | |
| 2199 | + switchSchema | |
| 2200 | + }; | |
| 2201 | + let fragment = new URL(switchSchema, "thismessage::/").hash; | |
| 2202 | + var document = fragment && fragment.length && switchSchema.substr(0, switchSchema.length - fragment.length); | |
| 2203 | + if (!document || !ctx.schemas[document]) throw new SchemaError("no such schema <" + switchSchema + ">", schema); | |
| 2204 | + var subschema = helpers.objectGetPath(ctx.schemas[document], fragment.substr(1)); | |
| 2205 | + if (subschema === void 0) throw new SchemaError("no such schema " + fragment + " located in <" + document + ">", schema); | |
| 2206 | + return { | |
| 2207 | + subschema, | |
| 2208 | + switchSchema | |
| 2209 | + }; | |
| 2210 | + }; | |
| 2211 | + /** | |
| 2212 | + * Tests whether the instance if of a certain type. | |
| 2213 | + * @private | |
| 2214 | + * @param instance | |
| 2215 | + * @param schema | |
| 2216 | + * @param options | |
| 2217 | + * @param ctx | |
| 2218 | + * @param type | |
| 2219 | + * @return {boolean} | |
| 2220 | + */ | |
| 2221 | + Validator.prototype.testType = function validateType(instance, schema, options, ctx, type) { | |
| 2222 | + if (type === void 0) return; | |
| 2223 | + else if (type === null) throw new SchemaError("Unexpected null in \"type\" keyword"); | |
| 2224 | + if (typeof this.types[type] == "function") return this.types[type].call(this, instance); | |
| 2225 | + if (type && typeof type == "object") { | |
| 2226 | + var res = this.validateSchema(instance, type, options, ctx); | |
| 2227 | + return res === void 0 || !(res && res.errors.length); | |
| 2228 | + } | |
| 2229 | + return true; | |
| 2230 | + }; | |
| 2231 | + var types = Validator.prototype.types = {}; | |
| 2232 | + types.string = function testString(instance) { | |
| 2233 | + return typeof instance == "string"; | |
| 2234 | + }; | |
| 2235 | + types.number = function testNumber(instance) { | |
| 2236 | + return typeof instance == "number" && isFinite(instance); | |
| 2237 | + }; | |
| 2238 | + types.integer = function testInteger(instance) { | |
| 2239 | + return typeof instance == "number" && instance % 1 === 0; | |
| 2240 | + }; | |
| 2241 | + types.boolean = function testBoolean(instance) { | |
| 2242 | + return typeof instance == "boolean"; | |
| 2243 | + }; | |
| 2244 | + types.array = function testArray(instance) { | |
| 2245 | + return Array.isArray(instance); | |
| 2246 | + }; | |
| 2247 | + types["null"] = function testNull(instance) { | |
| 2248 | + return instance === null; | |
| 2249 | + }; | |
| 2250 | + types.date = function testDate(instance) { | |
| 2251 | + return instance instanceof Date; | |
| 2252 | + }; | |
| 2253 | + types.any = function testAny(instance) { | |
| 2254 | + return true; | |
| 2255 | + }; | |
| 2256 | + types.object = function testObject(instance) { | |
| 2257 | + return instance && typeof instance === "object" && !Array.isArray(instance) && !(instance instanceof Date); | |
| 2258 | + }; | |
| 2259 | + module.exports = Validator; | |
| 2260 | + })); | |
| 1155 | 2261 | |
| 1156 | - // 7.3.3. Hostnames | |
| 2262 | +//#endregion | |
| 2263 | +//#region node_modules/jsonschema/lib/index.js | |
| 2264 | + var require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 2265 | + var Validator = module.exports.Validator = require_validator(); | |
| 2266 | + module.exports.ValidatorResult = require_helpers().ValidatorResult; | |
| 2267 | + module.exports.ValidatorResultError = require_helpers().ValidatorResultError; | |
| 2268 | + module.exports.ValidationError = require_helpers().ValidationError; | |
| 2269 | + module.exports.SchemaError = require_helpers().SchemaError; | |
| 2270 | + module.exports.SchemaScanResult = require_scan().SchemaScanResult; | |
| 2271 | + module.exports.scan = require_scan().scan; | |
| 2272 | + module.exports.validate = function(instance, schema, options) { | |
| 2273 | + return new Validator().validate(instance, schema, options); | |
| 2274 | + }; | |
| 2275 | + })); | |
| 1157 | 2276 | |
| 1158 | - // 7.3.4. IP Addresses | |
| 1159 | - 'ip-address': /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/, | |
| 1160 | - // FIXME whitespace is invalid | |
| 1161 | - 'ipv6': /^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/, | |
| 2277 | +//#endregion | |
| 2278 | +//#region packages/packages/libs/editor-props/src/utils/validate-prop-value.ts | |
| 2279 | + var import_lib = require_lib(); | |
| 2280 | + function processValidationError(error) { | |
| 2281 | + const detailed = { | |
| 2282 | + path: error.path, | |
| 2283 | + message: error.message, | |
| 2284 | + schema: error.schema, | |
| 2285 | + instance: error.instance, | |
| 2286 | + name: error.name | |
| 2287 | + }; | |
| 2288 | + if (error.name === "anyOf" && error.schema && typeof error.schema === "object" && "anyOf" in error.schema) detailed.variants = (error.schema.anyOf || []).map((variantSchema, idx) => { | |
| 2289 | + const variantResult = (0, import_lib.validate)(error.instance, variantSchema); | |
| 2290 | + let discriminator = `variant-${idx}`; | |
| 2291 | + if (variantSchema && typeof variantSchema === "object" && "properties" in variantSchema && variantSchema.properties && typeof variantSchema.properties === "object" && "$$type" in variantSchema.properties) { | |
| 2292 | + const typeProperty = variantSchema.properties.$$type; | |
| 2293 | + if (typeProperty && typeof typeProperty === "object" && "const" in typeProperty && typeof typeProperty.const === "string") discriminator = typeProperty.const; | |
| 2294 | + } | |
| 2295 | + return { | |
| 2296 | + discriminator, | |
| 2297 | + errors: variantResult.errors.map(processValidationError) | |
| 2298 | + }; | |
| 2299 | + }); | |
| 2300 | + return detailed; | |
| 2301 | + } | |
| 2302 | + function formatDetailedErrors(errors, indent = "") { | |
| 2303 | + const lines = []; | |
| 2304 | + for (const error of errors) { | |
| 2305 | + const pathStr = error.path.length > 0 ? error.path.join(".") : "root"; | |
| 2306 | + lines.push(`${indent}Error at ${pathStr}: ${error.message}`); | |
| 2307 | + if (error.variants && error.variants.length > 0) { | |
| 2308 | + lines.push(`${indent} Tried ${error.variants.length} variant(s):`); | |
| 2309 | + for (const variant of error.variants) { | |
| 2310 | + lines.push(`${indent} - ${variant.discriminator}:`); | |
| 2311 | + if (variant.errors.length === 0) lines.push(`${indent} (no errors - this variant matched!)`); | |
| 2312 | + else for (const nestedError of variant.errors) { | |
| 2313 | + const nestedPathStr = nestedError.path.length > 0 ? nestedError.path.join(".") : "root"; | |
| 2314 | + lines.push(`${indent} ${nestedPathStr}: ${nestedError.message}`); | |
| 2315 | + if (nestedError.variants && nestedError.variants.length > 0) lines.push(formatDetailedErrors([nestedError], `${indent} `)); | |
| 2316 | + } | |
| 2317 | + } | |
| 2318 | + } | |
| 2319 | + } | |
| 2320 | + return lines.join("\n"); | |
| 2321 | + } | |
| 2322 | + var validatePropValue = (schema, value) => { | |
| 2323 | + const jsonSchema = propTypeToJsonSchema(schema); | |
| 2324 | + if (value === null) return { | |
| 2325 | + valid: true, | |
| 2326 | + errors: [], | |
| 2327 | + errorMessages: [], | |
| 2328 | + jsonSchema: JSON.stringify(propTypeToJsonSchema(schema)) | |
| 2329 | + }; | |
| 2330 | + const result = (0, import_lib.validate)(value, jsonSchema); | |
| 2331 | + const detailedErrors = result.errors.map(processValidationError); | |
| 2332 | + return { | |
| 2333 | + valid: result.valid, | |
| 2334 | + errors: result.errors, | |
| 2335 | + errorMessages: formatDetailedErrors(detailedErrors), | |
| 2336 | + jsonSchema: JSON.stringify(jsonSchema) | |
| 2337 | + }; | |
| 2338 | + }; | |
| 1162 | 2339 | |
| 1163 | - // 7.3.5. Resource Identifiers | |
| 1164 | - // TODO: A more accurate regular expression for "uri" goes: | |
| 1165 | - // [A-Za-z][+\-.0-9A-Za-z]*:((/(/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?)?)?#(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|(/(/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~])|/?%[0-9A-Fa-f]{2}|[!$&-.0-;=?-Z_a-z~])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*(#(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*)?|/(/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+(:\d*)?|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?:\d*|\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)?)? | |
| 1166 | - 'uri': /^[a-zA-Z][a-zA-Z0-9+.-]*:[^\s]*$/, | |
| 1167 | - 'uri-reference': /^(((([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|([A-Za-z][+\-.0-9A-Za-z]*:?)?)|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|(\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?)?))#(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|(([A-Za-z][+\-.0-9A-Za-z]*)?%[0-9A-Fa-f]{2}|[!$&-.0-9;=@_~]|[A-Za-z][+\-.0-9A-Za-z]*[!$&-*,;=@_~])(%[0-9A-Fa-f]{2}|[!$&-.0-9;=@-Z_a-z~])*((([/?](%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*)?#|[/?])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*)?|([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+(:\d*)?|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?:\d*|\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)?|[A-Za-z][+\-.0-9A-Za-z]*:?)?$/, | |
| 1168 | - 'iri': /^[a-zA-Z][a-zA-Z0-9+.-]*:[^\s]*$/, | |
| 1169 | - 'iri-reference': /^(((([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~-\u{10FFFF}]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|([A-Za-z][+\-.0-9A-Za-z]*:?)?)|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|(\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?)?))#(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|(([A-Za-z][+\-.0-9A-Za-z]*)?%[0-9A-Fa-f]{2}|[!$&-.0-9;=@_~-\u{10FFFF}]|[A-Za-z][+\-.0-9A-Za-z]*[!$&-*,;=@_~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-.0-9;=@-Z_a-z~-\u{10FFFF}])*((([/?](%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*)?#|[/?])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*)?|([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~-\u{10FFFF}]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+(:\d*)?|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?:\d*|\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)?|[A-Za-z][+\-.0-9A-Za-z]*:?)?$/u, | |
| 1170 | - 'uuid': /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i, | |
| 2340 | +//#endregion | |
| 2341 | +//#region packages/packages/libs/editor-props/src/utils/is-transformable.ts | |
| 2342 | + var transformableSchema = _elementor_schema.z.object({ | |
| 2343 | + $$type: _elementor_schema.z.string(), | |
| 2344 | + value: _elementor_schema.z.any(), | |
| 2345 | + disabled: _elementor_schema.z.boolean().optional() | |
| 2346 | + }); | |
| 2347 | + var isTransformable = (value) => { | |
| 2348 | + return transformableSchema.safeParse(value).success; | |
| 2349 | + }; | |
| 1171 | 2350 | |
| 1172 | - // 7.3.6. uri-template | |
| 1173 | - 'uri-template': /(%[0-9a-f]{2}|[!#$&(-;=?@\[\]_a-z~]|\{[!#&+,./;=?@|]?(%[0-9a-f]{2}|[0-9_a-z])(\.?(%[0-9a-f]{2}|[0-9_a-z]))*(:[1-9]\d{0,3}|\*)?(,(%[0-9a-f]{2}|[0-9_a-z])(\.?(%[0-9a-f]{2}|[0-9_a-z]))*(:[1-9]\d{0,3}|\*)?)*\})*/iu, | |
| 2351 | +//#endregion | |
| 2352 | +//#region packages/packages/libs/editor-props/src/utils/filter-empty-values.ts | |
| 2353 | + var filterEmptyValues = (value) => { | |
| 2354 | + if (isEmpty(value)) return null; | |
| 2355 | + if (Array.isArray(value)) return value.map(filterEmptyValues).filter((item) => !isEmpty(item)); | |
| 2356 | + if (typeof value === "object") return Object.fromEntries(Object.entries(value).map(([key, val]) => [key, filterEmptyValues(val)]).filter(([, val]) => !isEmpty(val))); | |
| 2357 | + return value; | |
| 2358 | + }; | |
| 2359 | + var isEmpty = (value) => { | |
| 2360 | + if (value && isTransformable(value)) return isEmpty(value.value); | |
| 2361 | + return isNullish(value) || isNullishArray(value) || isNullishObject(value); | |
| 2362 | + }; | |
| 2363 | + var isNullish = (value) => value === null || value === void 0 || value === ""; | |
| 2364 | + var isNullishArray = (value) => Array.isArray(value) && value.every(isEmpty); | |
| 2365 | + var isNullishObject = (value) => { | |
| 2366 | + return typeof value === "object" && isNullishArray(Object.values(value)); | |
| 2367 | + }; | |
| 1174 | 2368 | |
| 1175 | - // 7.3.7. JSON Pointers | |
| 1176 | - 'json-pointer': /^(\/([\x00-\x2e0-@\[-}\x7f]|~[01])*)*$/iu, | |
| 1177 | - 'relative-json-pointer': /^\d+(#|(\/([\x00-\x2e0-@\[-}\x7f]|~[01])*)*)$/iu, | |
| 2369 | +//#endregion | |
| 2370 | +//#region packages/packages/libs/editor-props/src/utils/is-overridable.ts | |
| 2371 | + function isOverridable(value) { | |
| 2372 | + return isTransformable(value) && value.$$type === "overridable"; | |
| 2373 | + } | |
| 2374 | + function rewrapOverridableValue(existing, newInner) { | |
| 2375 | + return { | |
| 2376 | + ...existing, | |
| 2377 | + value: { | |
| 2378 | + ...existing.value, | |
| 2379 | + origin_value: newInner | |
| 2380 | + } | |
| 2381 | + }; | |
| 2382 | + } | |
| 1178 | 2383 | |
| 1179 | - // hostname regex from: http://stackoverflow.com/a/1420225/5628 | |
| 1180 | - 'hostname': /^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/, | |
| 1181 | - 'host-name': /^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/, | |
| 2384 | +//#endregion | |
| 2385 | +//#region packages/packages/libs/editor-props/src/utils/merge-props.ts | |
| 2386 | + function mergeProps(current, updates) { | |
| 2387 | + let props = {}; | |
| 2388 | + if (!Array.isArray(current)) props = structuredClone(current); | |
| 2389 | + Object.entries(updates).forEach(([key, value]) => { | |
| 2390 | + if (value === null || value === void 0) delete props[key]; | |
| 2391 | + else props[key] = value; | |
| 2392 | + }); | |
| 2393 | + return props; | |
| 2394 | + } | |
| 1182 | 2395 | |
| 1183 | - 'utc-millisec': function (input) { | |
| 1184 | - return (typeof input === 'string') && parseFloat(input) === parseInt(input, 10) && !isNaN(input); | |
| 1185 | - }, | |
| 2396 | +//#endregion | |
| 2397 | +//#region packages/packages/libs/editor-props/src/utils/prop-dependency-utils.ts | |
| 2398 | + function isDependencyMet(dependency, values) { | |
| 2399 | + if (!dependency?.terms.length) return { isMet: true }; | |
| 2400 | + const { relation, terms } = dependency; | |
| 2401 | + const method = getRelationMethod(relation); | |
| 2402 | + const failingDependencies = []; | |
| 2403 | + return { | |
| 2404 | + isMet: terms[method]((term) => { | |
| 2405 | + const result = isDependency(term) ? isDependencyMet(term, values).isMet : evaluateTerm(term, extractValue(term.path, values, term.nestedPath)?.value); | |
| 2406 | + if (!result) failingDependencies.push(term); | |
| 2407 | + return result; | |
| 2408 | + }), | |
| 2409 | + failingDependencies | |
| 2410 | + }; | |
| 2411 | + } | |
| 2412 | + function evaluateTerm(term, actualValue) { | |
| 2413 | + const { value: valueToCompare, operator } = term; | |
| 2414 | + switch (operator) { | |
| 2415 | + case "eq": | |
| 2416 | + case "ne": return actualValue === valueToCompare === ("eq" === operator); | |
| 2417 | + case "gt": | |
| 2418 | + case "lte": | |
| 2419 | + if (!isNumber(actualValue) || !isNumber(valueToCompare)) return false; | |
| 2420 | + return Number(actualValue) > Number(valueToCompare) === ("gt" === operator); | |
| 2421 | + case "lt": | |
| 2422 | + case "gte": | |
| 2423 | + if (!isNumber(actualValue) || !isNumber(valueToCompare)) return false; | |
| 2424 | + return Number(actualValue) < Number(valueToCompare) === ("lt" === operator); | |
| 2425 | + case "in": | |
| 2426 | + case "nin": | |
| 2427 | + if (!Array.isArray(valueToCompare)) return false; | |
| 2428 | + return valueToCompare.includes(actualValue) === ("in" === operator); | |
| 2429 | + case "contains": | |
| 2430 | + case "ncontains": | |
| 2431 | + if (("string" !== typeof actualValue || "string" !== typeof valueToCompare) && !Array.isArray(actualValue)) return false; | |
| 2432 | + const transformedValue = Array.isArray(actualValue) ? actualValue.map((item) => isTransformable(item) ? item.value : item) : actualValue; | |
| 2433 | + return "contains" === operator === transformedValue.includes(valueToCompare); | |
| 2434 | + case "exists": | |
| 2435 | + case "not_exist": return "exists" === operator === (!!actualValue || 0 === actualValue || false === actualValue); | |
| 2436 | + default: return true; | |
| 2437 | + } | |
| 2438 | + } | |
| 2439 | + function isNumber(value) { | |
| 2440 | + return typeof value === "number" && !isNaN(value); | |
| 2441 | + } | |
| 2442 | + function getRelationMethod(relation) { | |
| 2443 | + switch (relation) { | |
| 2444 | + case "or": return "some"; | |
| 2445 | + case "and": return "every"; | |
| 2446 | + default: throw new Error(`Relation not supported ${relation}`); | |
| 2447 | + } | |
| 2448 | + } | |
| 2449 | + function extractValue(path, elementValues, nestedPath = [], options = {}) { | |
| 2450 | + const { unwrapOverridableLeaf = true } = options; | |
| 2451 | + let resolved = path.reduce((acc, key, index) => { | |
| 2452 | + const value = acc?.[key]; | |
| 2453 | + if (index === path.length - 1) return value; | |
| 2454 | + if (isOverridable(value)) { | |
| 2455 | + const inner = value.value.origin_value; | |
| 2456 | + return isTransformable(inner) ? inner.value ?? null : inner; | |
| 2457 | + } | |
| 2458 | + if (isTransformable(value)) return value.value ?? null; | |
| 2459 | + return value; | |
| 2460 | + }, elementValues); | |
| 2461 | + if (unwrapOverridableLeaf && resolved && isOverridable(resolved)) resolved = resolved.value.origin_value ?? null; | |
| 2462 | + if (!nestedPath?.length) return resolved; | |
| 2463 | + return { | |
| 2464 | + $$type: "unknown", | |
| 2465 | + value: nestedPath.reduce((acc, key) => acc?.[key], resolved?.value) | |
| 2466 | + }; | |
| 2467 | + } | |
| 2468 | + function isDependency(term) { | |
| 2469 | + return "terms" in term; | |
| 2470 | + } | |
| 1186 | 2471 | |
| 1187 | - // 7.3.8. regex | |
| 1188 | - 'regex': function (input) { | |
| 1189 | - var result = true; | |
| 1190 | - try { | |
| 1191 | - new RegExp(input); | |
| 1192 | - } catch (e) { | |
| 1193 | - result = false; | |
| 1194 | - } | |
| 1195 | - return result; | |
| 1196 | - }, | |
| 2472 | +//#endregion | |
| 2473 | +//#region packages/packages/libs/editor-props/src/utils/parse-html-children.ts | |
| 2474 | + var INLINE_ELEMENTS = /* @__PURE__ */ new Set([ | |
| 2475 | + "span", | |
| 2476 | + "b", | |
| 2477 | + "strong", | |
| 2478 | + "i", | |
| 2479 | + "em", | |
| 2480 | + "u", | |
| 2481 | + "a", | |
| 2482 | + "del", | |
| 2483 | + "sup", | |
| 2484 | + "sub", | |
| 2485 | + "s" | |
| 2486 | + ]); | |
| 2487 | + function generateElementId() { | |
| 2488 | + return `e-${Date.now().toString(36)}-${Math.random().toString(36).substring(2, 9)}`; | |
| 2489 | + } | |
| 2490 | + function traverseChildren(node) { | |
| 2491 | + const result = []; | |
| 2492 | + for (const child of Array.from(node.children)) { | |
| 2493 | + const tagName = child.tagName.toLowerCase(); | |
| 2494 | + if (!INLINE_ELEMENTS.has(tagName)) { | |
| 2495 | + result.push(...traverseChildren(child)); | |
| 2496 | + continue; | |
| 2497 | + } | |
| 2498 | + let id = child.getAttribute("id"); | |
| 2499 | + if (!id) { | |
| 2500 | + id = generateElementId(); | |
| 2501 | + child.setAttribute("id", id); | |
| 2502 | + } | |
| 2503 | + const childElement = { | |
| 2504 | + id, | |
| 2505 | + type: tagName | |
| 2506 | + }; | |
| 2507 | + const textContent = child.textContent?.trim(); | |
| 2508 | + if (textContent) childElement.content = textContent; | |
| 2509 | + const nestedChildren = traverseChildren(child); | |
| 2510 | + if (nestedChildren.length > 0) childElement.children = nestedChildren; | |
| 2511 | + result.push(childElement); | |
| 2512 | + } | |
| 2513 | + return result; | |
| 2514 | + } | |
| 2515 | + function parseHtmlChildren(html) { | |
| 2516 | + if (!html) return { | |
| 2517 | + content: html, | |
| 2518 | + children: [] | |
| 2519 | + }; | |
| 2520 | + const doc = new DOMParser().parseFromString(`<body>${html}</body>`, "text/html"); | |
| 2521 | + const parserError = doc.querySelector("parsererror"); | |
| 2522 | + if (parserError) { | |
| 2523 | + console.warn("HTML parsing error, returning original content:", parserError.textContent); | |
| 2524 | + return { | |
| 2525 | + content: html, | |
| 2526 | + children: [] | |
| 2527 | + }; | |
| 2528 | + } | |
| 2529 | + const body = doc.body; | |
| 2530 | + const children = traverseChildren(body); | |
| 2531 | + return { | |
| 2532 | + content: body.innerHTML, | |
| 2533 | + children | |
| 2534 | + }; | |
| 2535 | + } | |
| 1197 | 2536 | |
| 1198 | - // Other definitions | |
| 1199 | - // "style" was removed from JSON Schema in draft-4 and is deprecated | |
| 1200 | - 'style': /[\r\n\t ]*[^\r\n\t ][^:]*:[\r\n\t ]*[^\r\n\t ;]*[\r\n\t ]*;?/, | |
| 1201 | - // "color" was removed from JSON Schema in draft-4 and is deprecated | |
| 1202 | - 'color': /^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/, | |
| 1203 | - 'phone': /^\+(?:[0-9] ?){6,14}[0-9]$/, | |
| 1204 | - 'alpha': /^[a-zA-Z]+$/, | |
| 1205 | - 'alphanumeric': /^[a-zA-Z0-9]+$/, | |
| 1206 | -}; | |
| 2537 | +//#endregion | |
| 2538 | +//#region packages/packages/libs/editor-props/src/index.ts | |
| 2539 | + var src_exports = /* @__PURE__ */ __exportAll({ | |
| 2540 | + CLASSES_PROP_KEY: () => CLASSES_PROP_KEY, | |
| 2541 | + DateTimePropTypeUtil: () => DateTimePropTypeUtil, | |
| 2542 | + Schema: () => Schema, | |
| 2543 | + backdropFilterPropTypeUtil: () => backdropFilterPropTypeUtil, | |
| 2544 | + backgroundColorOverlayPropTypeUtil: () => backgroundColorOverlayPropTypeUtil, | |
| 2545 | + backgroundGradientOverlayPropTypeUtil: () => backgroundGradientOverlayPropTypeUtil, | |
| 2546 | + backgroundImageOverlayPropTypeUtil: () => backgroundImageOverlayPropTypeUtil, | |
| 2547 | + backgroundImagePositionOffsetPropTypeUtil: () => backgroundImagePositionOffsetPropTypeUtil, | |
| 2548 | + backgroundImageSizeScalePropTypeUtil: () => backgroundImageSizeScalePropTypeUtil, | |
| 2549 | + backgroundOverlayItem: () => backgroundOverlayItem, | |
| 2550 | + backgroundOverlayPropTypeUtil: () => backgroundOverlayPropTypeUtil, | |
| 2551 | + backgroundPropTypeUtil: () => backgroundPropTypeUtil, | |
| 2552 | + blurFilterPropTypeUtil: () => blurFilterPropTypeUtil, | |
| 2553 | + booleanPropTypeUtil: () => booleanPropTypeUtil, | |
| 2554 | + borderRadiusPropTypeUtil: () => borderRadiusPropTypeUtil, | |
| 2555 | + borderWidthPropTypeUtil: () => borderWidthPropTypeUtil, | |
| 2556 | + boxShadowPropTypeUtil: () => boxShadowPropTypeUtil, | |
| 2557 | + classesPropTypeUtil: () => classesPropTypeUtil, | |
| 2558 | + colorPropTypeUtil: () => colorPropTypeUtil, | |
| 2559 | + colorStopPropTypeUtil: () => colorStopPropTypeUtil, | |
| 2560 | + colorToneFilterPropTypeUtil: () => colorToneFilterPropTypeUtil, | |
| 2561 | + createArrayPropUtils: () => createArrayPropUtils, | |
| 2562 | + createPropUtils: () => createPropUtils, | |
| 2563 | + cssFilterFunctionPropUtil: () => cssFilterFunctionPropUtil, | |
| 2564 | + dateRangePropTypeUtil: () => dateRangePropTypeUtil, | |
| 2565 | + dateStringPropTypeUtil: () => dateStringPropTypeUtil, | |
| 2566 | + dimensionsPropTypeUtil: () => dimensionsPropTypeUtil, | |
| 2567 | + dropShadowFilterPropTypeUtil: () => dropShadowFilterPropTypeUtil, | |
| 2568 | + emailPropTypeUtil: () => emailPropTypeUtil, | |
| 2569 | + emailsPropTypeUtil: () => emailsPropTypeUtil, | |
| 2570 | + escapedHtmlPropTypeUtil: () => escapedHtmlPropTypeUtil, | |
| 2571 | + evaluateTerm: () => evaluateTerm, | |
| 2572 | + extractValue: () => extractValue, | |
| 2573 | + filterEmptyValues: () => filterEmptyValues, | |
| 2574 | + filterPropTypeUtil: () => filterPropTypeUtil, | |
| 2575 | + flexPropTypeUtil: () => flexPropTypeUtil, | |
| 2576 | + fontFamilyPropTypeUtil: () => fontFamilyPropTypeUtil, | |
| 2577 | + getPropSchemaFromCache: () => getPropSchemaFromCache, | |
| 2578 | + gradientColorStopPropTypeUtil: () => gradientColorStopPropTypeUtil, | |
| 2579 | + gridTrackSizePropTypeUtil: () => gridTrackSizePropTypeUtil, | |
| 2580 | + htmlPropTypeUtil: () => htmlPropTypeUtil, | |
| 2581 | + htmlV2PropTypeUtil: () => htmlV2PropTypeUtil, | |
| 2582 | + htmlV3PropTypeUtil: () => htmlV3PropTypeUtil, | |
| 2583 | + hueRotateFilterPropTypeUtil: () => hueRotateFilterPropTypeUtil, | |
| 2584 | + iconPropTypeUtil: () => iconPropTypeUtil, | |
| 2585 | + imageAttachmentIdPropType: () => imageAttachmentIdPropType, | |
| 2586 | + imagePropTypeUtil: () => imagePropTypeUtil, | |
| 2587 | + imageSrcPropTypeUtil: () => imageSrcPropTypeUtil, | |
| 2588 | + intensityFilterPropTypeUtil: () => intensityFilterPropTypeUtil, | |
| 2589 | + isDependency: () => isDependency, | |
| 2590 | + isDependencyMet: () => isDependencyMet, | |
| 2591 | + isEmpty: () => isEmpty, | |
| 2592 | + isOverridable: () => isOverridable, | |
| 2593 | + isTransformable: () => isTransformable, | |
| 2594 | + keyValuePropTypeUtil: () => keyValuePropTypeUtil, | |
| 2595 | + layoutDirectionPropTypeUtil: () => layoutDirectionPropTypeUtil, | |
| 2596 | + linkPropTypeUtil: () => linkPropTypeUtil, | |
| 2597 | + mergeProps: () => mergeProps, | |
| 2598 | + moveTransformPropTypeUtil: () => moveTransformPropTypeUtil, | |
| 2599 | + numberPropTypeUtil: () => numberPropTypeUtil, | |
| 2600 | + numberRangePropTypeUtil: () => numberRangePropTypeUtil, | |
| 2601 | + parseHtmlChildren: () => parseHtmlChildren, | |
| 2602 | + perspectiveOriginPropTypeUtil: () => perspectiveOriginPropTypeUtil, | |
| 2603 | + positionPropTypeUtil: () => positionPropTypeUtil, | |
| 2604 | + queryFilterArrayPropTypeUtil: () => queryFilterArrayPropTypeUtil, | |
| 2605 | + queryFilterPropTypeUtil: () => queryFilterPropTypeUtil, | |
| 2606 | + queryPropTypeUtil: () => queryPropTypeUtil, | |
| 2607 | + rewrapOverridableValue: () => rewrapOverridableValue, | |
| 2608 | + rotateTransformPropTypeUtil: () => rotateTransformPropTypeUtil, | |
| 2609 | + scaleTransformPropTypeUtil: () => scaleTransformPropTypeUtil, | |
| 2610 | + selectionSizePropTypeUtil: () => selectionSizePropTypeUtil, | |
| 2611 | + shadowPropTypeUtil: () => shadowPropTypeUtil, | |
| 2612 | + sizePropTypeUtil: () => sizePropTypeUtil, | |
| 2613 | + skewTransformPropTypeUtil: () => skewTransformPropTypeUtil, | |
| 2614 | + spanPropTypeUtil: () => spanPropTypeUtil, | |
| 2615 | + stringArrayPropTypeUtil: () => stringArrayPropTypeUtil, | |
| 2616 | + stringPropTypeUtil: () => stringPropTypeUtil, | |
| 2617 | + strokePropTypeUtil: () => strokePropTypeUtil, | |
| 2618 | + svgSrcPropTypeUtil: () => svgSrcPropTypeUtil, | |
| 2619 | + timeRangePropTypeUtil: () => timeRangePropTypeUtil, | |
| 2620 | + timeStringPropTypeUtil: () => timeStringPropTypeUtil, | |
| 2621 | + transformFunctionsPropTypeUtil: () => transformFunctionsPropTypeUtil, | |
| 2622 | + transformOriginPropTypeUtil: () => transformOriginPropTypeUtil, | |
| 2623 | + transformPropTypeUtil: () => transformPropTypeUtil, | |
| 2624 | + urlPropTypeUtil: () => urlPropTypeUtil, | |
| 2625 | + videoAttachmentIdPropType: () => videoAttachmentIdPropType, | |
| 2626 | + videoSrcPropTypeUtil: () => videoSrcPropTypeUtil | |
| 2627 | + }); | |
| 2628 | + var Schema = { | |
| 2629 | + jsonSchemaToPropType, | |
| 2630 | + propTypeToJsonSchema, | |
| 2631 | + adjustLlmPropValueSchema, | |
| 2632 | + isPropKeyConfigurable, | |
| 2633 | + nonConfigurablePropKeys, | |
| 2634 | + configurableKeys, | |
| 2635 | + validatePropValue, | |
| 2636 | + enrichWithIntention, | |
| 2637 | + removeIntention, | |
| 2638 | + setDynamicTagNamesResolver | |
| 2639 | + }; | |
| 1207 | 2640 | |
| 1208 | -FORMAT_REGEXPS.regexp = FORMAT_REGEXPS.regex; | |
| 1209 | -FORMAT_REGEXPS.pattern = FORMAT_REGEXPS.regex; | |
| 1210 | -FORMAT_REGEXPS.ipv4 = FORMAT_REGEXPS['ip-address']; | |
| 2641 | +//#endregion | |
| 2642 | +//#region \0elementor-package-library-entry | |
| 2643 | + (window.elementorV2 = window.elementorV2 || {}).editorProps = src_exports; | |
| 1211 | 2644 | |
| 1212 | -exports.isFormat = function isFormat (input, format, validator) { | |
| 1213 | - if (typeof input === 'string' && FORMAT_REGEXPS[format] !== undefined) { | |
| 1214 | - if (FORMAT_REGEXPS[format] instanceof RegExp) { | |
| 1215 | - return FORMAT_REGEXPS[format].test(input); | |
| 1216 | - } | |
| 1217 | - if (typeof FORMAT_REGEXPS[format] === 'function') { | |
| 1218 | - return FORMAT_REGEXPS[format](input); | |
| 1219 | - } | |
| 1220 | - } else if (validator && validator.customFormats && | |
| 1221 | - typeof validator.customFormats[format] === 'function') { | |
| 1222 | - return validator.customFormats[format](input); | |
| 1223 | - } | |
| 1224 | - return true; | |
| 1225 | -}; | |
| 1226 | - | |
| 1227 | -var makeSuffix = exports.makeSuffix = function makeSuffix (key) { | |
| 1228 | - key = key.toString(); | |
| 1229 | - // This function could be capable of outputting valid a ECMAScript string, but the | |
| 1230 | - // resulting code for testing which form to use would be tens of thousands of characters long | |
| 1231 | - // That means this will use the name form for some illegal forms | |
| 1232 | - if (!key.match(/[.\s\[\]]/) && !key.match(/^[\d]/)) { | |
| 1233 | - return '.' + key; | |
| 1234 | - } | |
| 1235 | - if (key.match(/^\d+$/)) { | |
| 1236 | - return '[' + key + ']'; | |
| 1237 | - } | |
| 1238 | - return '[' + JSON.stringify(key) + ']'; | |
| 1239 | -}; | |
| 1240 | - | |
| 1241 | -exports.deepCompareStrict = function deepCompareStrict (a, b) { | |
| 1242 | - if (typeof a !== typeof b) { | |
| 1243 | - return false; | |
| 1244 | - } | |
| 1245 | - if (Array.isArray(a)) { | |
| 1246 | - if (!Array.isArray(b)) { | |
| 1247 | - return false; | |
| 1248 | - } | |
| 1249 | - if (a.length !== b.length) { | |
| 1250 | - return false; | |
| 1251 | - } | |
| 1252 | - return a.every(function (v, i) { | |
| 1253 | - return deepCompareStrict(a[i], b[i]); | |
| 1254 | - }); | |
| 1255 | - } | |
| 1256 | - if (typeof a === 'object') { | |
| 1257 | - if (!a || !b) { | |
| 1258 | - return a === b; | |
| 1259 | - } | |
| 1260 | - var aKeys = Object.keys(a); | |
| 1261 | - var bKeys = Object.keys(b); | |
| 1262 | - if (aKeys.length !== bKeys.length) { | |
| 1263 | - return false; | |
| 1264 | - } | |
| 1265 | - return aKeys.every(function (v) { | |
| 1266 | - return deepCompareStrict(a[v], b[v]); | |
| 1267 | - }); | |
| 1268 | - } | |
| 1269 | - return a === b; | |
| 1270 | -}; | |
| 1271 | - | |
| 1272 | -function deepMerger (target, dst, e, i) { | |
| 1273 | - if (typeof e === 'object') { | |
| 1274 | - dst[i] = deepMerge(target[i], e); | |
| 1275 | - } else { | |
| 1276 | - if (target.indexOf(e) === -1) { | |
| 1277 | - dst.push(e); | |
| 1278 | - } | |
| 1279 | - } | |
| 1280 | -} | |
| 1281 | - | |
| 1282 | -function copyist (src, dst, key) { | |
| 1283 | - dst[key] = src[key]; | |
| 1284 | -} | |
| 1285 | - | |
| 1286 | -function copyistWithDeepMerge (target, src, dst, key) { | |
| 1287 | - if (typeof src[key] !== 'object' || !src[key]) { | |
| 1288 | - dst[key] = src[key]; | |
| 1289 | - } | |
| 1290 | - else { | |
| 1291 | - if (!target[key]) { | |
| 1292 | - dst[key] = src[key]; | |
| 1293 | - } else { | |
| 1294 | - dst[key] = deepMerge(target[key], src[key]); | |
| 1295 | - } | |
| 1296 | - } | |
| 1297 | -} | |
| 1298 | - | |
| 1299 | -function deepMerge (target, src) { | |
| 1300 | - var array = Array.isArray(src); | |
| 1301 | - var dst = array && [] || {}; | |
| 1302 | - | |
| 1303 | - if (array) { | |
| 1304 | - target = target || []; | |
| 1305 | - dst = dst.concat(target); | |
| 1306 | - src.forEach(deepMerger.bind(null, target, dst)); | |
| 1307 | - } else { | |
| 1308 | - if (target && typeof target === 'object') { | |
| 1309 | - Object.keys(target).forEach(copyist.bind(null, target, dst)); | |
| 1310 | - } | |
| 1311 | - Object.keys(src).forEach(copyistWithDeepMerge.bind(null, target, src, dst)); | |
| 1312 | - } | |
| 1313 | - | |
| 1314 | - return dst; | |
| 1315 | -} | |
| 1316 | - | |
| 1317 | -module.exports.deepMerge = deepMerge; | |
| 1318 | - | |
| 1319 | -/** | |
| 1320 | - * Validates instance against the provided schema | |
| 1321 | - * Implements URI+JSON Pointer encoding, e.g. "%7e"="~0"=>"~", "~1"="%2f"=>"/" | |
| 1322 | - * @param o | |
| 1323 | - * @param s The path to walk o along | |
| 1324 | - * @return any | |
| 1325 | - */ | |
| 1326 | -exports.objectGetPath = function objectGetPath(o, s) { | |
| 1327 | - var parts = s.split('/').slice(1); | |
| 1328 | - var k; | |
| 1329 | - while (typeof (k=parts.shift()) == 'string') { | |
| 1330 | - var n = decodeURIComponent(k.replace(/~0/,'~').replace(/~1/g,'/')); | |
| 1331 | - if (!(n in o)) return; | |
| 1332 | - o = o[n]; | |
| 1333 | - } | |
| 1334 | - return o; | |
| 1335 | -}; | |
| 1336 | - | |
| 1337 | -function pathEncoder (v) { | |
| 1338 | - return '/'+encodeURIComponent(v).replace(/~/g,'%7E'); | |
| 1339 | -} | |
| 1340 | -/** | |
| 1341 | - * Accept an Array of property names and return a JSON Pointer URI fragment | |
| 1342 | - * @param Array a | |
| 1343 | - * @return {String} | |
| 1344 | - */ | |
| 1345 | -exports.encodePath = function encodePointer(a){ | |
| 1346 | - // ~ must be encoded explicitly because hacks | |
| 1347 | - // the slash is encoded by encodeURIComponent | |
| 1348 | - return a.map(pathEncoder).join(''); | |
| 1349 | -}; | |
| 1350 | - | |
| 1351 | - | |
| 1352 | -/** | |
| 1353 | - * Calculate the number of decimal places a number uses | |
| 1354 | - * We need this to get correct results out of multipleOf and divisibleBy | |
| 1355 | - * when either figure is has decimal places, due to IEEE-754 float issues. | |
| 1356 | - * @param number | |
| 1357 | - * @returns {number} | |
| 1358 | - */ | |
| 1359 | -exports.getDecimalPlaces = function getDecimalPlaces(number) { | |
| 1360 | - | |
| 1361 | - var decimalPlaces = 0; | |
| 1362 | - if (isNaN(number)) return decimalPlaces; | |
| 1363 | - | |
| 1364 | - if (typeof number !== 'number') { | |
| 1365 | - number = Number(number); | |
| 1366 | - } | |
| 1367 | - | |
| 1368 | - var parts = number.toString().split('e'); | |
| 1369 | - if (parts.length === 2) { | |
| 1370 | - if (parts[1][0] !== '-') { | |
| 1371 | - return decimalPlaces; | |
| 1372 | - } else { | |
| 1373 | - decimalPlaces = Number(parts[1].slice(1)); | |
| 1374 | - } | |
| 1375 | - } | |
| 1376 | - | |
| 1377 | - var decimalParts = parts[0].split('.'); | |
| 1378 | - if (decimalParts.length === 2) { | |
| 1379 | - decimalPlaces += decimalParts[1].length; | |
| 1380 | - } | |
| 1381 | - | |
| 1382 | - return decimalPlaces; | |
| 1383 | -}; | |
| 1384 | - | |
| 1385 | -exports.isSchema = function isSchema(val){ | |
| 1386 | - return (typeof val === 'object' && val) || (typeof val === 'boolean'); | |
| 1387 | -}; | |
| 1388 | - | |
| 1389 | -/** | |
| 1390 | - * Resolve target URL from a base and relative URL. | |
| 1391 | - * Similar to Node's URL Lib's legacy resolve function. | |
| 1392 | - * Code from example in deprecation note in said library. | |
| 1393 | - * @param string | |
| 1394 | - * @param string | |
| 1395 | - * @returns {string} | |
| 1396 | - */ | |
| 1397 | -var resolveUrl = exports.resolveUrl = function resolveUrl(from, to) { | |
| 1398 | - const resolvedUrl = new URL(to, new URL(from, 'resolve://')); | |
| 1399 | - if (resolvedUrl.protocol === 'resolve:') { | |
| 1400 | - const { pathname, search, hash } = resolvedUrl; | |
| 1401 | - return pathname + search + hash; | |
| 1402 | - } | |
| 1403 | - return resolvedUrl.toString(); | |
| 1404 | -} | |
| 1405 | - | |
| 1406 | - | |
| 1407 | -/***/ }), | |
| 1408 | - | |
| 1409 | -/***/ "./node_modules/jsonschema/lib/index.js": | |
| 1410 | -/*!**********************************************!*\ | |
| 1411 | - !*** ./node_modules/jsonschema/lib/index.js ***! | |
| 1412 | - \**********************************************/ | |
| 1413 | -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { | |
| 1414 | - | |
| 1415 | - | |
| 1416 | - | |
| 1417 | -var Validator = module.exports.Validator = __webpack_require__(/*! ./validator */ "./node_modules/jsonschema/lib/validator.js"); | |
| 1418 | - | |
| 1419 | -module.exports.ValidatorResult = __webpack_require__(/*! ./helpers */ "./node_modules/jsonschema/lib/helpers.js").ValidatorResult; | |
| 1420 | -module.exports.ValidatorResultError = __webpack_require__(/*! ./helpers */ "./node_modules/jsonschema/lib/helpers.js").ValidatorResultError; | |
| 1421 | -module.exports.ValidationError = __webpack_require__(/*! ./helpers */ "./node_modules/jsonschema/lib/helpers.js").ValidationError; | |
| 1422 | -module.exports.SchemaError = __webpack_require__(/*! ./helpers */ "./node_modules/jsonschema/lib/helpers.js").SchemaError; | |
| 1423 | -module.exports.SchemaScanResult = __webpack_require__(/*! ./scan */ "./node_modules/jsonschema/lib/scan.js").SchemaScanResult; | |
| 1424 | -module.exports.scan = __webpack_require__(/*! ./scan */ "./node_modules/jsonschema/lib/scan.js").scan; | |
| 1425 | - | |
| 1426 | -module.exports.validate = function (instance, schema, options) { | |
| 1427 | - var v = new Validator(); | |
| 1428 | - return v.validate(instance, schema, options); | |
| 1429 | -}; | |
| 1430 | - | |
| 1431 | - | |
| 1432 | -/***/ }), | |
| 1433 | - | |
| 1434 | -/***/ "./node_modules/jsonschema/lib/scan.js": | |
| 1435 | -/*!*********************************************!*\ | |
| 1436 | - !*** ./node_modules/jsonschema/lib/scan.js ***! | |
| 1437 | - \*********************************************/ | |
| 1438 | -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { | |
| 1439 | - | |
| 1440 | - | |
| 1441 | - | |
| 1442 | -var helpers = __webpack_require__(/*! ./helpers */ "./node_modules/jsonschema/lib/helpers.js"); | |
| 1443 | - | |
| 1444 | -module.exports.SchemaScanResult = SchemaScanResult; | |
| 1445 | -function SchemaScanResult(found, ref){ | |
| 1446 | - this.id = found; | |
| 1447 | - this.ref = ref; | |
| 1448 | -} | |
| 1449 | - | |
| 1450 | -/** | |
| 1451 | - * Adds a schema with a certain urn to the Validator instance. | |
| 1452 | - * @param string uri | |
| 1453 | - * @param object schema | |
| 1454 | - * @return {Object} | |
| 1455 | - */ | |
| 1456 | -module.exports.scan = function scan(base, schema){ | |
| 1457 | - function scanSchema(baseuri, schema){ | |
| 1458 | - if(!schema || typeof schema!='object') return; | |
| 1459 | - // Mark all referenced schemas so we can tell later which schemas are referred to, but never defined | |
| 1460 | - if(schema.$ref){ | |
| 1461 | - let resolvedUri = helpers.resolveUrl(baseuri,schema.$ref); | |
| 1462 | - ref[resolvedUri] = ref[resolvedUri] ? ref[resolvedUri]+1 : 0; | |
| 1463 | - return; | |
| 1464 | - } | |
| 1465 | - var id = schema.$id || schema.id; | |
| 1466 | - let resolvedBase = helpers.resolveUrl(baseuri,id); | |
| 1467 | - var ourBase = id ? resolvedBase : baseuri; | |
| 1468 | - if (ourBase) { | |
| 1469 | - // If there's no fragment, append an empty one | |
| 1470 | - if(ourBase.indexOf('#')<0) ourBase += '#'; | |
| 1471 | - if(found[ourBase]){ | |
| 1472 | - if(!helpers.deepCompareStrict(found[ourBase], schema)){ | |
| 1473 | - throw new Error('Schema <'+ourBase+'> already exists with different definition'); | |
| 1474 | - } | |
| 1475 | - return found[ourBase]; | |
| 1476 | - } | |
| 1477 | - found[ourBase] = schema; | |
| 1478 | - // strip trailing fragment | |
| 1479 | - if(ourBase[ourBase.length-1]=='#'){ | |
| 1480 | - found[ourBase.substring(0, ourBase.length-1)] = schema; | |
| 1481 | - } | |
| 1482 | - } | |
| 1483 | - scanArray(ourBase+'/items', (Array.isArray(schema.items)?schema.items:[schema.items])); | |
| 1484 | - scanArray(ourBase+'/extends', (Array.isArray(schema.extends)?schema.extends:[schema.extends])); | |
| 1485 | - scanSchema(ourBase+'/additionalItems', schema.additionalItems); | |
| 1486 | - scanObject(ourBase+'/properties', schema.properties); | |
| 1487 | - scanSchema(ourBase+'/additionalProperties', schema.additionalProperties); | |
| 1488 | - scanObject(ourBase+'/definitions', schema.definitions); | |
| 1489 | - scanObject(ourBase+'/patternProperties', schema.patternProperties); | |
| 1490 | - scanObject(ourBase+'/dependencies', schema.dependencies); | |
| 1491 | - scanArray(ourBase+'/disallow', schema.disallow); | |
| 1492 | - scanArray(ourBase+'/allOf', schema.allOf); | |
| 1493 | - scanArray(ourBase+'/anyOf', schema.anyOf); | |
| 1494 | - scanArray(ourBase+'/oneOf', schema.oneOf); | |
| 1495 | - scanSchema(ourBase+'/not', schema.not); | |
| 1496 | - } | |
| 1497 | - function scanArray(baseuri, schemas){ | |
| 1498 | - if(!Array.isArray(schemas)) return; | |
| 1499 | - for(var i=0; i<schemas.length; i++){ | |
| 1500 | - scanSchema(baseuri+'/'+i, schemas[i]); | |
| 1501 | - } | |
| 1502 | - } | |
| 1503 | - function scanObject(baseuri, schemas){ | |
| 1504 | - if(!schemas || typeof schemas!='object') return; | |
| 1505 | - for(var p in schemas){ | |
| 1506 | - scanSchema(baseuri+'/'+p, schemas[p]); | |
| 1507 | - } | |
| 1508 | - } | |
| 1509 | - | |
| 1510 | - var found = {}; | |
| 1511 | - var ref = {}; | |
| 1512 | - scanSchema(base, schema); | |
| 1513 | - return new SchemaScanResult(found, ref); | |
| 1514 | -}; | |
| 1515 | - | |
| 1516 | - | |
| 1517 | -/***/ }), | |
| 1518 | - | |
| 1519 | -/***/ "./node_modules/jsonschema/lib/validator.js": | |
| 1520 | -/*!**************************************************!*\ | |
| 1521 | - !*** ./node_modules/jsonschema/lib/validator.js ***! | |
| 1522 | - \**************************************************/ | |
| 1523 | -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { | |
| 1524 | - | |
| 1525 | - | |
| 1526 | - | |
| 1527 | -var attribute = __webpack_require__(/*! ./attribute */ "./node_modules/jsonschema/lib/attribute.js"); | |
| 1528 | -var helpers = __webpack_require__(/*! ./helpers */ "./node_modules/jsonschema/lib/helpers.js"); | |
| 1529 | -var scanSchema = (__webpack_require__(/*! ./scan */ "./node_modules/jsonschema/lib/scan.js").scan); | |
| 1530 | -var ValidatorResult = helpers.ValidatorResult; | |
| 1531 | -var ValidatorResultError = helpers.ValidatorResultError; | |
| 1532 | -var SchemaError = helpers.SchemaError; | |
| 1533 | -var SchemaContext = helpers.SchemaContext; | |
| 1534 | -//var anonymousBase = 'vnd.jsonschema:///'; | |
| 1535 | -var anonymousBase = '/'; | |
| 1536 | - | |
| 1537 | -/** | |
| 1538 | - * Creates a new Validator object | |
| 1539 | - * @name Validator | |
| 1540 | - * @constructor | |
| 1541 | - */ | |
| 1542 | -var Validator = function Validator () { | |
| 1543 | - // Allow a validator instance to override global custom formats or to have their | |
| 1544 | - // own custom formats. | |
| 1545 | - this.customFormats = Object.create(Validator.prototype.customFormats); | |
| 1546 | - this.schemas = {}; | |
| 1547 | - this.unresolvedRefs = []; | |
| 1548 | - | |
| 1549 | - // Use Object.create to make this extensible without Validator instances stepping on each other's toes. | |
| 1550 | - this.types = Object.create(types); | |
| 1551 | - this.attributes = Object.create(attribute.validators); | |
| 1552 | -}; | |
| 1553 | - | |
| 1554 | -// Allow formats to be registered globally. | |
| 1555 | -Validator.prototype.customFormats = {}; | |
| 1556 | - | |
| 1557 | -// Hint at the presence of a property | |
| 1558 | -Validator.prototype.schemas = null; | |
| 1559 | -Validator.prototype.types = null; | |
| 1560 | -Validator.prototype.attributes = null; | |
| 1561 | -Validator.prototype.unresolvedRefs = null; | |
| 1562 | - | |
| 1563 | -/** | |
| 1564 | - * Adds a schema with a certain urn to the Validator instance. | |
| 1565 | - * @param schema | |
| 1566 | - * @param urn | |
| 1567 | - * @return {Object} | |
| 1568 | - */ | |
| 1569 | -Validator.prototype.addSchema = function addSchema (schema, base) { | |
| 1570 | - var self = this; | |
| 1571 | - if (!schema) { | |
| 1572 | - return null; | |
| 1573 | - } | |
| 1574 | - var scan = scanSchema(base||anonymousBase, schema); | |
| 1575 | - var ourUri = base || schema.$id || schema.id; | |
| 1576 | - for(var uri in scan.id){ | |
| 1577 | - this.schemas[uri] = scan.id[uri]; | |
| 1578 | - } | |
| 1579 | - for(var uri in scan.ref){ | |
| 1580 | - // If this schema is already defined, it will be filtered out by the next step | |
| 1581 | - this.unresolvedRefs.push(uri); | |
| 1582 | - } | |
| 1583 | - // Remove newly defined schemas from unresolvedRefs | |
| 1584 | - this.unresolvedRefs = this.unresolvedRefs.filter(function(uri){ | |
| 1585 | - return typeof self.schemas[uri]==='undefined'; | |
| 1586 | - }); | |
| 1587 | - return this.schemas[ourUri]; | |
| 1588 | -}; | |
| 1589 | - | |
| 1590 | -Validator.prototype.addSubSchemaArray = function addSubSchemaArray(baseuri, schemas) { | |
| 1591 | - if(!Array.isArray(schemas)) return; | |
| 1592 | - for(var i=0; i<schemas.length; i++){ | |
| 1593 | - this.addSubSchema(baseuri, schemas[i]); | |
| 1594 | - } | |
| 1595 | -}; | |
| 1596 | - | |
| 1597 | -Validator.prototype.addSubSchemaObject = function addSubSchemaArray(baseuri, schemas) { | |
| 1598 | - if(!schemas || typeof schemas!='object') return; | |
| 1599 | - for(var p in schemas){ | |
| 1600 | - this.addSubSchema(baseuri, schemas[p]); | |
| 1601 | - } | |
| 1602 | -}; | |
| 1603 | - | |
| 1604 | - | |
| 1605 | - | |
| 1606 | -/** | |
| 1607 | - * Sets all the schemas of the Validator instance. | |
| 1608 | - * @param schemas | |
| 1609 | - */ | |
| 1610 | -Validator.prototype.setSchemas = function setSchemas (schemas) { | |
| 1611 | - this.schemas = schemas; | |
| 1612 | -}; | |
| 1613 | - | |
| 1614 | -/** | |
| 1615 | - * Returns the schema of a certain urn | |
| 1616 | - * @param urn | |
| 1617 | - */ | |
| 1618 | -Validator.prototype.getSchema = function getSchema (urn) { | |
| 1619 | - return this.schemas[urn]; | |
| 1620 | -}; | |
| 1621 | - | |
| 1622 | -/** | |
| 1623 | - * Validates instance against the provided schema | |
| 1624 | - * @param instance | |
| 1625 | - * @param schema | |
| 1626 | - * @param [options] | |
| 1627 | - * @param [ctx] | |
| 1628 | - * @return {Array} | |
| 1629 | - */ | |
| 1630 | -Validator.prototype.validate = function validate (instance, schema, options, ctx) { | |
| 1631 | - if((typeof schema !== 'boolean' && typeof schema !== 'object') || schema === null){ | |
| 1632 | - throw new SchemaError('Expected `schema` to be an object or boolean'); | |
| 1633 | - } | |
| 1634 | - if (!options) { | |
| 1635 | - options = {}; | |
| 1636 | - } | |
| 1637 | - // This section indexes subschemas in the provided schema, so they don't need to be added with Validator#addSchema | |
| 1638 | - // This will work so long as the function at uri.resolve() will resolve a relative URI to a relative URI | |
| 1639 | - var id = schema.$id || schema.id; | |
| 1640 | - let base = helpers.resolveUrl(options.base,id||''); | |
| 1641 | - if(!ctx){ | |
| 1642 | - ctx = new SchemaContext(schema, options, [], base, Object.create(this.schemas)); | |
| 1643 | - if (!ctx.schemas[base]) { | |
| 1644 | - ctx.schemas[base] = schema; | |
| 1645 | - } | |
| 1646 | - var found = scanSchema(base, schema); | |
| 1647 | - for(var n in found.id){ | |
| 1648 | - var sch = found.id[n]; | |
| 1649 | - ctx.schemas[n] = sch; | |
| 1650 | - } | |
| 1651 | - } | |
| 1652 | - if(options.required && instance===undefined){ | |
| 1653 | - var result = new ValidatorResult(instance, schema, options, ctx); | |
| 1654 | - result.addError('is required, but is undefined'); | |
| 1655 | - return result; | |
| 1656 | - } | |
| 1657 | - var result = this.validateSchema(instance, schema, options, ctx); | |
| 1658 | - if (!result) { | |
| 1659 | - throw new Error('Result undefined'); | |
| 1660 | - }else if(options.throwAll && result.errors.length){ | |
| 1661 | - throw new ValidatorResultError(result); | |
| 1662 | - } | |
| 1663 | - return result; | |
| 1664 | -}; | |
| 1665 | - | |
| 1666 | -/** | |
| 1667 | -* @param Object schema | |
| 1668 | -* @return mixed schema uri or false | |
| 1669 | -*/ | |
| 1670 | -function shouldResolve(schema) { | |
| 1671 | - var ref = (typeof schema === 'string') ? schema : schema.$ref; | |
| 1672 | - if (typeof ref=='string') return ref; | |
| 1673 | - return false; | |
| 1674 | -} | |
| 1675 | - | |
| 1676 | -/** | |
| 1677 | - * Validates an instance against the schema (the actual work horse) | |
| 1678 | - * @param instance | |
| 1679 | - * @param schema | |
| 1680 | - * @param options | |
| 1681 | - * @param ctx | |
| 1682 | - * @private | |
| 1683 | - * @return {ValidatorResult} | |
| 1684 | - */ | |
| 1685 | -Validator.prototype.validateSchema = function validateSchema (instance, schema, options, ctx) { | |
| 1686 | - var result = new ValidatorResult(instance, schema, options, ctx); | |
| 1687 | - | |
| 1688 | - // Support for the true/false schemas | |
| 1689 | - if(typeof schema==='boolean') { | |
| 1690 | - if(schema===true){ | |
| 1691 | - // `true` is always valid | |
| 1692 | - schema = {}; | |
| 1693 | - }else if(schema===false){ | |
| 1694 | - // `false` is always invalid | |
| 1695 | - schema = {type: []}; | |
| 1696 | - } | |
| 1697 | - }else if(!schema){ | |
| 1698 | - // This might be a string | |
| 1699 | - throw new Error("schema is undefined"); | |
| 1700 | - } | |
| 1701 | - | |
| 1702 | - if (schema['extends']) { | |
| 1703 | - if (Array.isArray(schema['extends'])) { | |
| 1704 | - var schemaobj = {schema: schema, ctx: ctx}; | |
| 1705 | - schema['extends'].forEach(this.schemaTraverser.bind(this, schemaobj)); | |
| 1706 | - schema = schemaobj.schema; | |
| 1707 | - schemaobj.schema = null; | |
| 1708 | - schemaobj.ctx = null; | |
| 1709 | - schemaobj = null; | |
| 1710 | - } else { | |
| 1711 | - schema = helpers.deepMerge(schema, this.superResolve(schema['extends'], ctx)); | |
| 1712 | - } | |
| 1713 | - } | |
| 1714 | - | |
| 1715 | - // If passed a string argument, load that schema URI | |
| 1716 | - var switchSchema = shouldResolve(schema); | |
| 1717 | - if (switchSchema) { | |
| 1718 | - var resolved = this.resolve(schema, switchSchema, ctx); | |
| 1719 | - var subctx = new SchemaContext(resolved.subschema, options, ctx.path, resolved.switchSchema, ctx.schemas); | |
| 1720 | - return this.validateSchema(instance, resolved.subschema, options, subctx); | |
| 1721 | - } | |
| 1722 | - | |
| 1723 | - var skipAttributes = options && options.skipAttributes || []; | |
| 1724 | - // Validate each schema attribute against the instance | |
| 1725 | - for (var key in schema) { | |
| 1726 | - if (!attribute.ignoreProperties[key] && skipAttributes.indexOf(key) < 0) { | |
| 1727 | - var validatorErr = null; | |
| 1728 | - var validator = this.attributes[key]; | |
| 1729 | - if (validator) { | |
| 1730 | - validatorErr = validator.call(this, instance, schema, options, ctx); | |
| 1731 | - } else if (options.allowUnknownAttributes === false) { | |
| 1732 | - // This represents an error with the schema itself, not an invalid instance | |
| 1733 | - throw new SchemaError("Unsupported attribute: " + key, schema); | |
| 1734 | - } | |
| 1735 | - if (validatorErr) { | |
| 1736 | - result.importErrors(validatorErr); | |
| 1737 | - } | |
| 1738 | - } | |
| 1739 | - } | |
| 1740 | - | |
| 1741 | - if (typeof options.rewrite == 'function') { | |
| 1742 | - var value = options.rewrite.call(this, instance, schema, options, ctx); | |
| 1743 | - result.instance = value; | |
| 1744 | - } | |
| 1745 | - return result; | |
| 1746 | -}; | |
| 1747 | - | |
| 1748 | -/** | |
| 1749 | -* @private | |
| 1750 | -* @param Object schema | |
| 1751 | -* @param SchemaContext ctx | |
| 1752 | -* @returns Object schema or resolved schema | |
| 1753 | -*/ | |
| 1754 | -Validator.prototype.schemaTraverser = function schemaTraverser (schemaobj, s) { | |
| 1755 | - schemaobj.schema = helpers.deepMerge(schemaobj.schema, this.superResolve(s, schemaobj.ctx)); | |
| 1756 | -}; | |
| 1757 | - | |
| 1758 | -/** | |
| 1759 | -* @private | |
| 1760 | -* @param Object schema | |
| 1761 | -* @param SchemaContext ctx | |
| 1762 | -* @returns Object schema or resolved schema | |
| 1763 | -*/ | |
| 1764 | -Validator.prototype.superResolve = function superResolve (schema, ctx) { | |
| 1765 | - var ref = shouldResolve(schema); | |
| 1766 | - if(ref) { | |
| 1767 | - return this.resolve(schema, ref, ctx).subschema; | |
| 1768 | - } | |
| 1769 | - return schema; | |
| 1770 | -}; | |
| 1771 | - | |
| 1772 | -/** | |
| 1773 | -* @private | |
| 1774 | -* @param Object schema | |
| 1775 | -* @param Object switchSchema | |
| 1776 | -* @param SchemaContext ctx | |
| 1777 | -* @return Object resolved schemas {subschema:String, switchSchema: String} | |
| 1778 | -* @throws SchemaError | |
| 1779 | -*/ | |
| 1780 | -Validator.prototype.resolve = function resolve (schema, switchSchema, ctx) { | |
| 1781 | - switchSchema = ctx.resolve(switchSchema); | |
| 1782 | - // First see if the schema exists under the provided URI | |
| 1783 | - if (ctx.schemas[switchSchema]) { | |
| 1784 | - return {subschema: ctx.schemas[switchSchema], switchSchema: switchSchema}; | |
| 1785 | - } | |
| 1786 | - // Else try walking the property pointer | |
| 1787 | - let parsed = new URL(switchSchema,'thismessage::/'); | |
| 1788 | - let fragment = parsed.hash; | |
| 1789 | - var document = fragment && fragment.length && switchSchema.substr(0, switchSchema.length - fragment.length); | |
| 1790 | - if (!document || !ctx.schemas[document]) { | |
| 1791 | - throw new SchemaError("no such schema <" + switchSchema + ">", schema); | |
| 1792 | - } | |
| 1793 | - var subschema = helpers.objectGetPath(ctx.schemas[document], fragment.substr(1)); | |
| 1794 | - if(subschema===undefined){ | |
| 1795 | - throw new SchemaError("no such schema " + fragment + " located in <" + document + ">", schema); | |
| 1796 | - } | |
| 1797 | - return {subschema: subschema, switchSchema: switchSchema}; | |
| 1798 | -}; | |
| 1799 | - | |
| 1800 | -/** | |
| 1801 | - * Tests whether the instance if of a certain type. | |
| 1802 | - * @private | |
| 1803 | - * @param instance | |
| 1804 | - * @param schema | |
| 1805 | - * @param options | |
| 1806 | - * @param ctx | |
| 1807 | - * @param type | |
| 1808 | - * @return {boolean} | |
| 1809 | - */ | |
| 1810 | -Validator.prototype.testType = function validateType (instance, schema, options, ctx, type) { | |
| 1811 | - if(type===undefined){ | |
| 1812 | - return; | |
| 1813 | - }else if(type===null){ | |
| 1814 | - throw new SchemaError('Unexpected null in "type" keyword'); | |
| 1815 | - } | |
| 1816 | - if (typeof this.types[type] == 'function') { | |
| 1817 | - return this.types[type].call(this, instance); | |
| 1818 | - } | |
| 1819 | - if (type && typeof type == 'object') { | |
| 1820 | - var res = this.validateSchema(instance, type, options, ctx); | |
| 1821 | - return res === undefined || !(res && res.errors.length); | |
| 1822 | - } | |
| 1823 | - // Undefined or properties not on the list are acceptable, same as not being defined | |
| 1824 | - return true; | |
| 1825 | -}; | |
| 1826 | - | |
| 1827 | -var types = Validator.prototype.types = {}; | |
| 1828 | -types.string = function testString (instance) { | |
| 1829 | - return typeof instance == 'string'; | |
| 1830 | -}; | |
| 1831 | -types.number = function testNumber (instance) { | |
| 1832 | - // isFinite returns false for NaN, Infinity, and -Infinity | |
| 1833 | - return typeof instance == 'number' && isFinite(instance); | |
| 1834 | -}; | |
| 1835 | -types.integer = function testInteger (instance) { | |
| 1836 | - return (typeof instance == 'number') && instance % 1 === 0; | |
| 1837 | -}; | |
| 1838 | -types.boolean = function testBoolean (instance) { | |
| 1839 | - return typeof instance == 'boolean'; | |
| 1840 | -}; | |
| 1841 | -types.array = function testArray (instance) { | |
| 1842 | - return Array.isArray(instance); | |
| 1843 | -}; | |
| 1844 | -types['null'] = function testNull (instance) { | |
| 1845 | - return instance === null; | |
| 1846 | -}; | |
| 1847 | -types.date = function testDate (instance) { | |
| 1848 | - return instance instanceof Date; | |
| 1849 | -}; | |
| 1850 | -types.any = function testAny (instance) { | |
| 1851 | - return true; | |
| 1852 | -}; | |
| 1853 | -types.object = function testObject (instance) { | |
| 1854 | - // TODO: fix this - see #15 | |
| 1855 | - return instance && (typeof instance === 'object') && !(Array.isArray(instance)) && !(instance instanceof Date); | |
| 1856 | -}; | |
| 1857 | - | |
| 1858 | -module.exports = Validator; | |
| 1859 | - | |
| 1860 | - | |
| 1861 | -/***/ }), | |
| 1862 | - | |
| 1863 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/background-prop-types/background-color-overlay.ts": | |
| 1864 | -/*!**************************************************************************************************************!*\ | |
| 1865 | - !*** ./packages/packages/libs/editor-props/src/prop-types/background-prop-types/background-color-overlay.ts ***! | |
| 1866 | - \**************************************************************************************************************/ | |
| 1867 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 1868 | - | |
| 1869 | -__webpack_require__.r(__webpack_exports__); | |
| 1870 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 1871 | -/* harmony export */ backgroundColorOverlayPropTypeUtil: function() { return /* binding */ backgroundColorOverlayPropTypeUtil; } | |
| 1872 | -/* harmony export */ }); | |
| 1873 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 1874 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 1875 | - | |
| 1876 | - | |
| 1877 | -const backgroundColorOverlayPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_0__.createPropUtils)('background-color-overlay', _utils__WEBPACK_IMPORTED_MODULE_1__.unknownChildrenSchema); | |
| 1878 | - | |
| 1879 | -/***/ }), | |
| 1880 | - | |
| 1881 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/background-prop-types/background-gradient-overlay.ts": | |
| 1882 | -/*!*****************************************************************************************************************!*\ | |
| 1883 | - !*** ./packages/packages/libs/editor-props/src/prop-types/background-prop-types/background-gradient-overlay.ts ***! | |
| 1884 | - \*****************************************************************************************************************/ | |
| 1885 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 1886 | - | |
| 1887 | -__webpack_require__.r(__webpack_exports__); | |
| 1888 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 1889 | -/* harmony export */ backgroundGradientOverlayPropTypeUtil: function() { return /* binding */ backgroundGradientOverlayPropTypeUtil; } | |
| 1890 | -/* harmony export */ }); | |
| 1891 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 1892 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 1893 | - | |
| 1894 | - | |
| 1895 | -const backgroundGradientOverlayPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_0__.createPropUtils)('background-gradient-overlay', _utils__WEBPACK_IMPORTED_MODULE_1__.unknownChildrenSchema); | |
| 1896 | - | |
| 1897 | -/***/ }), | |
| 1898 | - | |
| 1899 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/background-prop-types/background-image-overlay.ts": | |
| 1900 | -/*!**************************************************************************************************************!*\ | |
| 1901 | - !*** ./packages/packages/libs/editor-props/src/prop-types/background-prop-types/background-image-overlay.ts ***! | |
| 1902 | - \**************************************************************************************************************/ | |
| 1903 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 1904 | - | |
| 1905 | -__webpack_require__.r(__webpack_exports__); | |
| 1906 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 1907 | -/* harmony export */ backgroundImageOverlayPropTypeUtil: function() { return /* binding */ backgroundImageOverlayPropTypeUtil; } | |
| 1908 | -/* harmony export */ }); | |
| 1909 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 1910 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 1911 | - | |
| 1912 | - | |
| 1913 | -const backgroundImageOverlayPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_0__.createPropUtils)('background-image-overlay', _utils__WEBPACK_IMPORTED_MODULE_1__.unknownChildrenSchema); | |
| 1914 | - | |
| 1915 | -/***/ }), | |
| 1916 | - | |
| 1917 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/background-prop-types/background-image-position-offset.ts": | |
| 1918 | -/*!**********************************************************************************************************************!*\ | |
| 1919 | - !*** ./packages/packages/libs/editor-props/src/prop-types/background-prop-types/background-image-position-offset.ts ***! | |
| 1920 | - \**********************************************************************************************************************/ | |
| 1921 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 1922 | - | |
| 1923 | -__webpack_require__.r(__webpack_exports__); | |
| 1924 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 1925 | -/* harmony export */ backgroundImagePositionOffsetPropTypeUtil: function() { return /* binding */ backgroundImagePositionOffsetPropTypeUtil; } | |
| 1926 | -/* harmony export */ }); | |
| 1927 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 1928 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 1929 | - | |
| 1930 | - | |
| 1931 | -const backgroundImagePositionOffsetPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_0__.createPropUtils)('background-image-position-offset', _utils__WEBPACK_IMPORTED_MODULE_1__.unknownChildrenSchema); | |
| 1932 | - | |
| 1933 | -/***/ }), | |
| 1934 | - | |
| 1935 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/background-prop-types/background-image-size-scale.ts": | |
| 1936 | -/*!*****************************************************************************************************************!*\ | |
| 1937 | - !*** ./packages/packages/libs/editor-props/src/prop-types/background-prop-types/background-image-size-scale.ts ***! | |
| 1938 | - \*****************************************************************************************************************/ | |
| 1939 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 1940 | - | |
| 1941 | -__webpack_require__.r(__webpack_exports__); | |
| 1942 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 1943 | -/* harmony export */ backgroundImageSizeScalePropTypeUtil: function() { return /* binding */ backgroundImageSizeScalePropTypeUtil; } | |
| 1944 | -/* harmony export */ }); | |
| 1945 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 1946 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 1947 | - | |
| 1948 | - | |
| 1949 | -const backgroundImageSizeScalePropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_0__.createPropUtils)('background-image-size-scale', _utils__WEBPACK_IMPORTED_MODULE_1__.unknownChildrenSchema); | |
| 1950 | - | |
| 1951 | -/***/ }), | |
| 1952 | - | |
| 1953 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/background-prop-types/background-overlay.ts": | |
| 1954 | -/*!********************************************************************************************************!*\ | |
| 1955 | - !*** ./packages/packages/libs/editor-props/src/prop-types/background-prop-types/background-overlay.ts ***! | |
| 1956 | - \********************************************************************************************************/ | |
| 1957 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 1958 | - | |
| 1959 | -__webpack_require__.r(__webpack_exports__); | |
| 1960 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 1961 | -/* harmony export */ backgroundOverlayItem: function() { return /* binding */ backgroundOverlayItem; }, | |
| 1962 | -/* harmony export */ backgroundOverlayPropTypeUtil: function() { return /* binding */ backgroundOverlayPropTypeUtil; } | |
| 1963 | -/* harmony export */ }); | |
| 1964 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 1965 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 1966 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 1967 | -/* harmony import */ var _background_color_overlay__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./background-color-overlay */ "./packages/packages/libs/editor-props/src/prop-types/background-prop-types/background-color-overlay.ts"); | |
| 1968 | -/* harmony import */ var _background_gradient_overlay__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./background-gradient-overlay */ "./packages/packages/libs/editor-props/src/prop-types/background-prop-types/background-gradient-overlay.ts"); | |
| 1969 | -/* harmony import */ var _background_image_overlay__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./background-image-overlay */ "./packages/packages/libs/editor-props/src/prop-types/background-prop-types/background-image-overlay.ts"); | |
| 1970 | - | |
| 1971 | - | |
| 1972 | - | |
| 1973 | - | |
| 1974 | - | |
| 1975 | -const backgroundOverlayItem = _background_color_overlay__WEBPACK_IMPORTED_MODULE_2__.backgroundColorOverlayPropTypeUtil.schema.or(_background_gradient_overlay__WEBPACK_IMPORTED_MODULE_3__.backgroundGradientOverlayPropTypeUtil.schema).or(_background_image_overlay__WEBPACK_IMPORTED_MODULE_4__.backgroundImageOverlayPropTypeUtil.schema); | |
| 1976 | -const backgroundOverlayPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('background-overlay', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.array(backgroundOverlayItem)); | |
| 1977 | - | |
| 1978 | -/***/ }), | |
| 1979 | - | |
| 1980 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/background-prop-types/background.ts": | |
| 1981 | -/*!************************************************************************************************!*\ | |
| 1982 | - !*** ./packages/packages/libs/editor-props/src/prop-types/background-prop-types/background.ts ***! | |
| 1983 | - \************************************************************************************************/ | |
| 1984 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 1985 | - | |
| 1986 | -__webpack_require__.r(__webpack_exports__); | |
| 1987 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 1988 | -/* harmony export */ backgroundPropTypeUtil: function() { return /* binding */ backgroundPropTypeUtil; } | |
| 1989 | -/* harmony export */ }); | |
| 1990 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 1991 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 1992 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 1993 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 1994 | - | |
| 1995 | - | |
| 1996 | - | |
| 1997 | -const backgroundPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('background', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 1998 | - color: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 1999 | - clip: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2000 | - 'background-overlay': _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema | |
| 2001 | -})); | |
| 2002 | - | |
| 2003 | -/***/ }), | |
| 2004 | - | |
| 2005 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/boolean.ts": | |
| 2006 | -/*!***********************************************************************!*\ | |
| 2007 | - !*** ./packages/packages/libs/editor-props/src/prop-types/boolean.ts ***! | |
| 2008 | - \***********************************************************************/ | |
| 2009 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2010 | - | |
| 2011 | -__webpack_require__.r(__webpack_exports__); | |
| 2012 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2013 | -/* harmony export */ booleanPropTypeUtil: function() { return /* binding */ booleanPropTypeUtil; } | |
| 2014 | -/* harmony export */ }); | |
| 2015 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 2016 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 2017 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 2018 | - | |
| 2019 | - | |
| 2020 | -const booleanPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('boolean', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.boolean().nullable()); | |
| 2021 | - | |
| 2022 | -/***/ }), | |
| 2023 | - | |
| 2024 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/border-radius.ts": | |
| 2025 | -/*!*****************************************************************************!*\ | |
| 2026 | - !*** ./packages/packages/libs/editor-props/src/prop-types/border-radius.ts ***! | |
| 2027 | - \*****************************************************************************/ | |
| 2028 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2029 | - | |
| 2030 | -__webpack_require__.r(__webpack_exports__); | |
| 2031 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2032 | -/* harmony export */ borderRadiusPropTypeUtil: function() { return /* binding */ borderRadiusPropTypeUtil; } | |
| 2033 | -/* harmony export */ }); | |
| 2034 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 2035 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 2036 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 2037 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 2038 | - | |
| 2039 | - | |
| 2040 | - | |
| 2041 | -const borderRadiusPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('border-radius-v2', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 2042 | - 'start-start': _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2043 | - 'start-end': _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2044 | - 'end-start': _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2045 | - 'end-end': _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema | |
| 2046 | -})); | |
| 2047 | - | |
| 2048 | -/***/ }), | |
| 2049 | - | |
| 2050 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/border-width.ts": | |
| 2051 | -/*!****************************************************************************!*\ | |
| 2052 | - !*** ./packages/packages/libs/editor-props/src/prop-types/border-width.ts ***! | |
| 2053 | - \****************************************************************************/ | |
| 2054 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2055 | - | |
| 2056 | -__webpack_require__.r(__webpack_exports__); | |
| 2057 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2058 | -/* harmony export */ borderWidthPropTypeUtil: function() { return /* binding */ borderWidthPropTypeUtil; } | |
| 2059 | -/* harmony export */ }); | |
| 2060 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 2061 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 2062 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 2063 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 2064 | - | |
| 2065 | - | |
| 2066 | - | |
| 2067 | -const borderWidthPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('border-width-v2', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 2068 | - 'block-start': _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2069 | - 'block-end': _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2070 | - 'inline-start': _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2071 | - 'inline-end': _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema | |
| 2072 | -})); | |
| 2073 | - | |
| 2074 | -/***/ }), | |
| 2075 | - | |
| 2076 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/box-shadow.ts": | |
| 2077 | -/*!**************************************************************************!*\ | |
| 2078 | - !*** ./packages/packages/libs/editor-props/src/prop-types/box-shadow.ts ***! | |
| 2079 | - \**************************************************************************/ | |
| 2080 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2081 | - | |
| 2082 | -__webpack_require__.r(__webpack_exports__); | |
| 2083 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2084 | -/* harmony export */ boxShadowPropTypeUtil: function() { return /* binding */ boxShadowPropTypeUtil; } | |
| 2085 | -/* harmony export */ }); | |
| 2086 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 2087 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 2088 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 2089 | -/* harmony import */ var _shadow__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./shadow */ "./packages/packages/libs/editor-props/src/prop-types/shadow.ts"); | |
| 2090 | - | |
| 2091 | - | |
| 2092 | - | |
| 2093 | -const boxShadowPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('box-shadow', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.array(_shadow__WEBPACK_IMPORTED_MODULE_2__.shadowPropTypeUtil.schema)); | |
| 2094 | - | |
| 2095 | -/***/ }), | |
| 2096 | - | |
| 2097 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/classes.ts": | |
| 2098 | -/*!***********************************************************************!*\ | |
| 2099 | - !*** ./packages/packages/libs/editor-props/src/prop-types/classes.ts ***! | |
| 2100 | - \***********************************************************************/ | |
| 2101 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2102 | - | |
| 2103 | -__webpack_require__.r(__webpack_exports__); | |
| 2104 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2105 | -/* harmony export */ CLASSES_PROP_KEY: function() { return /* binding */ CLASSES_PROP_KEY; }, | |
| 2106 | -/* harmony export */ classesPropTypeUtil: function() { return /* binding */ classesPropTypeUtil; } | |
| 2107 | -/* harmony export */ }); | |
| 2108 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 2109 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 2110 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 2111 | - | |
| 2112 | - | |
| 2113 | -const CLASSES_PROP_KEY = 'classes'; | |
| 2114 | -const classesPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)(CLASSES_PROP_KEY, _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.array(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.string().regex(/^[a-z][a-z-_0-9]*$/i))); | |
| 2115 | - | |
| 2116 | -/***/ }), | |
| 2117 | - | |
| 2118 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/color-stop.ts": | |
| 2119 | -/*!**************************************************************************!*\ | |
| 2120 | - !*** ./packages/packages/libs/editor-props/src/prop-types/color-stop.ts ***! | |
| 2121 | - \**************************************************************************/ | |
| 2122 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2123 | - | |
| 2124 | -__webpack_require__.r(__webpack_exports__); | |
| 2125 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2126 | -/* harmony export */ colorStopPropTypeUtil: function() { return /* binding */ colorStopPropTypeUtil; } | |
| 2127 | -/* harmony export */ }); | |
| 2128 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 2129 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 2130 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 2131 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 2132 | - | |
| 2133 | - | |
| 2134 | - | |
| 2135 | -const colorStopPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('color-stop', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 2136 | - color: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2137 | - offset: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema | |
| 2138 | -})); | |
| 2139 | - | |
| 2140 | -/***/ }), | |
| 2141 | - | |
| 2142 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/color.ts": | |
| 2143 | -/*!*********************************************************************!*\ | |
| 2144 | - !*** ./packages/packages/libs/editor-props/src/prop-types/color.ts ***! | |
| 2145 | - \*********************************************************************/ | |
| 2146 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2147 | - | |
| 2148 | -__webpack_require__.r(__webpack_exports__); | |
| 2149 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2150 | -/* harmony export */ colorPropTypeUtil: function() { return /* binding */ colorPropTypeUtil; } | |
| 2151 | -/* harmony export */ }); | |
| 2152 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 2153 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 2154 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 2155 | - | |
| 2156 | - | |
| 2157 | -const colorPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('color', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.string()); | |
| 2158 | - | |
| 2159 | -/***/ }), | |
| 2160 | - | |
| 2161 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/date-range.ts": | |
| 2162 | -/*!**************************************************************************!*\ | |
| 2163 | - !*** ./packages/packages/libs/editor-props/src/prop-types/date-range.ts ***! | |
| 2164 | - \**************************************************************************/ | |
| 2165 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2166 | - | |
| 2167 | -__webpack_require__.r(__webpack_exports__); | |
| 2168 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2169 | -/* harmony export */ dateRangePropTypeUtil: function() { return /* binding */ dateRangePropTypeUtil; } | |
| 2170 | -/* harmony export */ }); | |
| 2171 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 2172 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 2173 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 2174 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 2175 | - | |
| 2176 | - | |
| 2177 | - | |
| 2178 | -const dateRangePropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('date-range', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 2179 | - min: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2180 | - max: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema | |
| 2181 | -})); | |
| 2182 | - | |
| 2183 | -/***/ }), | |
| 2184 | - | |
| 2185 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/date-string.ts": | |
| 2186 | -/*!***************************************************************************!*\ | |
| 2187 | - !*** ./packages/packages/libs/editor-props/src/prop-types/date-string.ts ***! | |
| 2188 | - \***************************************************************************/ | |
| 2189 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2190 | - | |
| 2191 | -__webpack_require__.r(__webpack_exports__); | |
| 2192 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2193 | -/* harmony export */ dateStringPropTypeUtil: function() { return /* binding */ dateStringPropTypeUtil; } | |
| 2194 | -/* harmony export */ }); | |
| 2195 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 2196 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 2197 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 2198 | - | |
| 2199 | - | |
| 2200 | -const dateStringPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('date-string', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.string()); | |
| 2201 | - | |
| 2202 | -/***/ }), | |
| 2203 | - | |
| 2204 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/date-time.ts": | |
| 2205 | -/*!*************************************************************************!*\ | |
| 2206 | - !*** ./packages/packages/libs/editor-props/src/prop-types/date-time.ts ***! | |
| 2207 | - \*************************************************************************/ | |
| 2208 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2209 | - | |
| 2210 | -__webpack_require__.r(__webpack_exports__); | |
| 2211 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2212 | -/* harmony export */ DateTimePropTypeUtil: function() { return /* binding */ DateTimePropTypeUtil; } | |
| 2213 | -/* harmony export */ }); | |
| 2214 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 2215 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 2216 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 2217 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 2218 | - | |
| 2219 | - | |
| 2220 | - | |
| 2221 | -const DateTimePropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('date-time', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 2222 | - date: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2223 | - time: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema | |
| 2224 | -})); | |
| 2225 | - | |
| 2226 | -/***/ }), | |
| 2227 | - | |
| 2228 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/dimensions.ts": | |
| 2229 | -/*!**************************************************************************!*\ | |
| 2230 | - !*** ./packages/packages/libs/editor-props/src/prop-types/dimensions.ts ***! | |
| 2231 | - \**************************************************************************/ | |
| 2232 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2233 | - | |
| 2234 | -__webpack_require__.r(__webpack_exports__); | |
| 2235 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2236 | -/* harmony export */ dimensionsPropTypeUtil: function() { return /* binding */ dimensionsPropTypeUtil; } | |
| 2237 | -/* harmony export */ }); | |
| 2238 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 2239 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 2240 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 2241 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 2242 | - | |
| 2243 | - | |
| 2244 | - | |
| 2245 | -const dimensionsPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('dimensions', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 2246 | - 'block-start': _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2247 | - 'block-end': _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2248 | - 'inline-start': _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2249 | - 'inline-end': _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema | |
| 2250 | -})); | |
| 2251 | - | |
| 2252 | -/***/ }), | |
| 2253 | - | |
| 2254 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/email.ts": | |
| 2255 | -/*!*********************************************************************!*\ | |
| 2256 | - !*** ./packages/packages/libs/editor-props/src/prop-types/email.ts ***! | |
| 2257 | - \*********************************************************************/ | |
| 2258 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2259 | - | |
| 2260 | -__webpack_require__.r(__webpack_exports__); | |
| 2261 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2262 | -/* harmony export */ emailPropTypeUtil: function() { return /* binding */ emailPropTypeUtil; } | |
| 2263 | -/* harmony export */ }); | |
| 2264 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 2265 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 2266 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 2267 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 2268 | - | |
| 2269 | - | |
| 2270 | - | |
| 2271 | -const emailPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('email', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 2272 | - to: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2273 | - subject: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2274 | - message: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2275 | - from: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2276 | - 'meta-data': _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2277 | - 'send-as': _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2278 | - 'from-name': _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2279 | - 'reply-to': _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2280 | - cc: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2281 | - bcc: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema | |
| 2282 | -})); | |
| 2283 | - | |
| 2284 | -/***/ }), | |
| 2285 | - | |
| 2286 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/emails.ts": | |
| 2287 | -/*!**********************************************************************!*\ | |
| 2288 | - !*** ./packages/packages/libs/editor-props/src/prop-types/emails.ts ***! | |
| 2289 | - \**********************************************************************/ | |
| 2290 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2291 | - | |
| 2292 | -__webpack_require__.r(__webpack_exports__); | |
| 2293 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2294 | -/* harmony export */ emailsPropTypeUtil: function() { return /* binding */ emailsPropTypeUtil; } | |
| 2295 | -/* harmony export */ }); | |
| 2296 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 2297 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 2298 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 2299 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 2300 | - | |
| 2301 | - | |
| 2302 | - | |
| 2303 | -const emailsPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('emails', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 2304 | - to: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2305 | - subject: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2306 | - message: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2307 | - from: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2308 | - 'meta-data': _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2309 | - 'send-as': _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2310 | - 'from-name': _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2311 | - 'reply-to': _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2312 | - cc: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2313 | - bcc: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema | |
| 2314 | -})); | |
| 2315 | - | |
| 2316 | -/***/ }), | |
| 2317 | - | |
| 2318 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/filter-prop-types/backdrop-filter.ts": | |
| 2319 | -/*!*************************************************************************************************!*\ | |
| 2320 | - !*** ./packages/packages/libs/editor-props/src/prop-types/filter-prop-types/backdrop-filter.ts ***! | |
| 2321 | - \*************************************************************************************************/ | |
| 2322 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2323 | - | |
| 2324 | -__webpack_require__.r(__webpack_exports__); | |
| 2325 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2326 | -/* harmony export */ backdropFilterPropTypeUtil: function() { return /* binding */ backdropFilterPropTypeUtil; } | |
| 2327 | -/* harmony export */ }); | |
| 2328 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 2329 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 2330 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 2331 | -/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./filter */ "./packages/packages/libs/editor-props/src/prop-types/filter-prop-types/filter.ts"); | |
| 2332 | - | |
| 2333 | - | |
| 2334 | - | |
| 2335 | -const backdropFilterPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('backdrop-filter', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.array(_filter__WEBPACK_IMPORTED_MODULE_2__.cssFilterFunctionPropUtil.schema)); | |
| 2336 | - | |
| 2337 | -/***/ }), | |
| 2338 | - | |
| 2339 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/filter-prop-types/drop-shadow-filter.ts": | |
| 2340 | -/*!****************************************************************************************************!*\ | |
| 2341 | - !*** ./packages/packages/libs/editor-props/src/prop-types/filter-prop-types/drop-shadow-filter.ts ***! | |
| 2342 | - \****************************************************************************************************/ | |
| 2343 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2344 | - | |
| 2345 | -__webpack_require__.r(__webpack_exports__); | |
| 2346 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2347 | -/* harmony export */ dropShadowFilterPropTypeUtil: function() { return /* binding */ dropShadowFilterPropTypeUtil; } | |
| 2348 | -/* harmony export */ }); | |
| 2349 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 2350 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 2351 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 2352 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 2353 | - | |
| 2354 | - | |
| 2355 | - | |
| 2356 | -const dropShadowFilterPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('drop-shadow', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.object({ | |
| 2357 | - xAxis: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2358 | - yAxis: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2359 | - blur: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2360 | - color: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema | |
| 2361 | -})); | |
| 2362 | - | |
| 2363 | -/***/ }), | |
| 2364 | - | |
| 2365 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/filter-prop-types/filter-functions/blur-filter.ts": | |
| 2366 | -/*!**************************************************************************************************************!*\ | |
| 2367 | - !*** ./packages/packages/libs/editor-props/src/prop-types/filter-prop-types/filter-functions/blur-filter.ts ***! | |
| 2368 | - \**************************************************************************************************************/ | |
| 2369 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2370 | - | |
| 2371 | -__webpack_require__.r(__webpack_exports__); | |
| 2372 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2373 | -/* harmony export */ blurFilterPropTypeUtil: function() { return /* binding */ blurFilterPropTypeUtil; } | |
| 2374 | -/* harmony export */ }); | |
| 2375 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 2376 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 2377 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 2378 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 2379 | - | |
| 2380 | - | |
| 2381 | - | |
| 2382 | -const blurFilterPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('blur', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 2383 | - size: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema | |
| 2384 | -})); | |
| 2385 | - | |
| 2386 | -/***/ }), | |
| 2387 | - | |
| 2388 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/filter-prop-types/filter-functions/color-tone-filter.ts": | |
| 2389 | -/*!********************************************************************************************************************!*\ | |
| 2390 | - !*** ./packages/packages/libs/editor-props/src/prop-types/filter-prop-types/filter-functions/color-tone-filter.ts ***! | |
| 2391 | - \********************************************************************************************************************/ | |
| 2392 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2393 | - | |
| 2394 | -__webpack_require__.r(__webpack_exports__); | |
| 2395 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2396 | -/* harmony export */ colorToneFilterPropTypeUtil: function() { return /* binding */ colorToneFilterPropTypeUtil; } | |
| 2397 | -/* harmony export */ }); | |
| 2398 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 2399 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 2400 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 2401 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 2402 | - | |
| 2403 | - | |
| 2404 | - | |
| 2405 | -const colorToneFilterPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('color-tone', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 2406 | - size: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema | |
| 2407 | -})); | |
| 2408 | - | |
| 2409 | -/***/ }), | |
| 2410 | - | |
| 2411 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/filter-prop-types/filter-functions/hue-rotate-filter.ts": | |
| 2412 | -/*!********************************************************************************************************************!*\ | |
| 2413 | - !*** ./packages/packages/libs/editor-props/src/prop-types/filter-prop-types/filter-functions/hue-rotate-filter.ts ***! | |
| 2414 | - \********************************************************************************************************************/ | |
| 2415 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2416 | - | |
| 2417 | -__webpack_require__.r(__webpack_exports__); | |
| 2418 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2419 | -/* harmony export */ hueRotateFilterPropTypeUtil: function() { return /* binding */ hueRotateFilterPropTypeUtil; } | |
| 2420 | -/* harmony export */ }); | |
| 2421 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 2422 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 2423 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 2424 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 2425 | - | |
| 2426 | - | |
| 2427 | - | |
| 2428 | -const hueRotateFilterPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('hue-rotate', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 2429 | - size: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema | |
| 2430 | -})); | |
| 2431 | - | |
| 2432 | -/***/ }), | |
| 2433 | - | |
| 2434 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/filter-prop-types/filter-functions/intensity-filter.ts": | |
| 2435 | -/*!*******************************************************************************************************************!*\ | |
| 2436 | - !*** ./packages/packages/libs/editor-props/src/prop-types/filter-prop-types/filter-functions/intensity-filter.ts ***! | |
| 2437 | - \*******************************************************************************************************************/ | |
| 2438 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2439 | - | |
| 2440 | -__webpack_require__.r(__webpack_exports__); | |
| 2441 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2442 | -/* harmony export */ intensityFilterPropTypeUtil: function() { return /* binding */ intensityFilterPropTypeUtil; } | |
| 2443 | -/* harmony export */ }); | |
| 2444 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 2445 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 2446 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 2447 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 2448 | - | |
| 2449 | - | |
| 2450 | - | |
| 2451 | -const intensityFilterPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('intensity', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 2452 | - size: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema | |
| 2453 | -})); | |
| 2454 | - | |
| 2455 | -/***/ }), | |
| 2456 | - | |
| 2457 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/filter-prop-types/filter.ts": | |
| 2458 | -/*!****************************************************************************************!*\ | |
| 2459 | - !*** ./packages/packages/libs/editor-props/src/prop-types/filter-prop-types/filter.ts ***! | |
| 2460 | - \****************************************************************************************/ | |
| 2461 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2462 | - | |
| 2463 | -__webpack_require__.r(__webpack_exports__); | |
| 2464 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2465 | -/* harmony export */ cssFilterFunctionPropUtil: function() { return /* binding */ cssFilterFunctionPropUtil; }, | |
| 2466 | -/* harmony export */ filterPropTypeUtil: function() { return /* binding */ filterPropTypeUtil; } | |
| 2467 | -/* harmony export */ }); | |
| 2468 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 2469 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 2470 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 2471 | -/* harmony import */ var _string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../string */ "./packages/packages/libs/editor-props/src/prop-types/string.ts"); | |
| 2472 | -/* harmony import */ var _drop_shadow_filter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./drop-shadow-filter */ "./packages/packages/libs/editor-props/src/prop-types/filter-prop-types/drop-shadow-filter.ts"); | |
| 2473 | -/* harmony import */ var _filter_functions_blur_filter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./filter-functions/blur-filter */ "./packages/packages/libs/editor-props/src/prop-types/filter-prop-types/filter-functions/blur-filter.ts"); | |
| 2474 | -/* harmony import */ var _filter_functions_color_tone_filter__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./filter-functions/color-tone-filter */ "./packages/packages/libs/editor-props/src/prop-types/filter-prop-types/filter-functions/color-tone-filter.ts"); | |
| 2475 | -/* harmony import */ var _filter_functions_hue_rotate_filter__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./filter-functions/hue-rotate-filter */ "./packages/packages/libs/editor-props/src/prop-types/filter-prop-types/filter-functions/hue-rotate-filter.ts"); | |
| 2476 | -/* harmony import */ var _filter_functions_intensity_filter__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./filter-functions/intensity-filter */ "./packages/packages/libs/editor-props/src/prop-types/filter-prop-types/filter-functions/intensity-filter.ts"); | |
| 2477 | - | |
| 2478 | - | |
| 2479 | - | |
| 2480 | - | |
| 2481 | - | |
| 2482 | - | |
| 2483 | - | |
| 2484 | - | |
| 2485 | -const cssFilterFunctionPropUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('css-filter-func', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.object({ | |
| 2486 | - func: _string__WEBPACK_IMPORTED_MODULE_2__.stringPropTypeUtil.schema, | |
| 2487 | - args: _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.union([_filter_functions_blur_filter__WEBPACK_IMPORTED_MODULE_4__.blurFilterPropTypeUtil.schema, _filter_functions_intensity_filter__WEBPACK_IMPORTED_MODULE_7__.intensityFilterPropTypeUtil.schema, _filter_functions_color_tone_filter__WEBPACK_IMPORTED_MODULE_5__.colorToneFilterPropTypeUtil.schema, _filter_functions_hue_rotate_filter__WEBPACK_IMPORTED_MODULE_6__.hueRotateFilterPropTypeUtil.schema, _drop_shadow_filter__WEBPACK_IMPORTED_MODULE_3__.dropShadowFilterPropTypeUtil.schema]) | |
| 2488 | -})); | |
| 2489 | -const filterPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('filter', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.array(cssFilterFunctionPropUtil.schema)); | |
| 2490 | - | |
| 2491 | -/***/ }), | |
| 2492 | - | |
| 2493 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/flex.ts": | |
| 2494 | -/*!********************************************************************!*\ | |
| 2495 | - !*** ./packages/packages/libs/editor-props/src/prop-types/flex.ts ***! | |
| 2496 | - \********************************************************************/ | |
| 2497 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2498 | - | |
| 2499 | -__webpack_require__.r(__webpack_exports__); | |
| 2500 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2501 | -/* harmony export */ flexPropTypeUtil: function() { return /* binding */ flexPropTypeUtil; } | |
| 2502 | -/* harmony export */ }); | |
| 2503 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 2504 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 2505 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 2506 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 2507 | - | |
| 2508 | - | |
| 2509 | - | |
| 2510 | -const flexPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('flex', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 2511 | - flexGrow: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2512 | - flexShrink: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2513 | - flexBasis: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema | |
| 2514 | -})); | |
| 2515 | - | |
| 2516 | -/***/ }), | |
| 2517 | - | |
| 2518 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/font-family.ts": | |
| 2519 | -/*!***************************************************************************!*\ | |
| 2520 | - !*** ./packages/packages/libs/editor-props/src/prop-types/font-family.ts ***! | |
| 2521 | - \***************************************************************************/ | |
| 2522 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2523 | - | |
| 2524 | -__webpack_require__.r(__webpack_exports__); | |
| 2525 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2526 | -/* harmony export */ fontFamilyPropTypeUtil: function() { return /* binding */ fontFamilyPropTypeUtil; } | |
| 2527 | -/* harmony export */ }); | |
| 2528 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 2529 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 2530 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 2531 | - | |
| 2532 | - | |
| 2533 | -const baseUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('font-family', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.string().nullable()); | |
| 2534 | -const fontFamilyPropTypeUtil = Object.assign(baseUtil, { | |
| 2535 | - getEnqueueFontFamily: value => { | |
| 2536 | - const trimmed = value.trim(); | |
| 2537 | - if (trimmed.startsWith('"') && trimmed.endsWith('"') || trimmed.startsWith("'") && trimmed.endsWith("'")) { | |
| 2538 | - return trimmed.slice(1, -1).trim(); | |
| 2539 | - } | |
| 2540 | - return trimmed; | |
| 2541 | - } | |
| 2542 | -}); | |
| 2543 | - | |
| 2544 | -/***/ }), | |
| 2545 | - | |
| 2546 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/gradient-color-stop.ts": | |
| 2547 | -/*!***********************************************************************************!*\ | |
| 2548 | - !*** ./packages/packages/libs/editor-props/src/prop-types/gradient-color-stop.ts ***! | |
| 2549 | - \***********************************************************************************/ | |
| 2550 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2551 | - | |
| 2552 | -__webpack_require__.r(__webpack_exports__); | |
| 2553 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2554 | -/* harmony export */ gradientColorStopPropTypeUtil: function() { return /* binding */ gradientColorStopPropTypeUtil; } | |
| 2555 | -/* harmony export */ }); | |
| 2556 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 2557 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 2558 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 2559 | -/* harmony import */ var _color_stop__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./color-stop */ "./packages/packages/libs/editor-props/src/prop-types/color-stop.ts"); | |
| 2560 | - | |
| 2561 | - | |
| 2562 | - | |
| 2563 | -const gradientColorStopPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('gradient-color-stop', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.array(_color_stop__WEBPACK_IMPORTED_MODULE_2__.colorStopPropTypeUtil.schema)); | |
| 2564 | - | |
| 2565 | -/***/ }), | |
| 2566 | - | |
| 2567 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/grid-track-size.ts": | |
| 2568 | -/*!*******************************************************************************!*\ | |
| 2569 | - !*** ./packages/packages/libs/editor-props/src/prop-types/grid-track-size.ts ***! | |
| 2570 | - \*******************************************************************************/ | |
| 2571 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2572 | - | |
| 2573 | -__webpack_require__.r(__webpack_exports__); | |
| 2574 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2575 | -/* harmony export */ gridTrackSizePropTypeUtil: function() { return /* binding */ gridTrackSizePropTypeUtil; } | |
| 2576 | -/* harmony export */ }); | |
| 2577 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 2578 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 2579 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 2580 | - | |
| 2581 | - | |
| 2582 | -const gridTrackSizePropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('grid-track-size', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 2583 | - unit: _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.literal('fr'), | |
| 2584 | - size: _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.union([_elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.number(), _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.literal('')]) | |
| 2585 | -}).or(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 2586 | - unit: _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.literal('custom'), | |
| 2587 | - size: _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.string() | |
| 2588 | -}))); | |
| 2589 | - | |
| 2590 | -/***/ }), | |
| 2591 | - | |
| 2592 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/html-v2.ts": | |
| 2593 | -/*!***********************************************************************!*\ | |
| 2594 | - !*** ./packages/packages/libs/editor-props/src/prop-types/html-v2.ts ***! | |
| 2595 | - \***********************************************************************/ | |
| 2596 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2597 | - | |
| 2598 | -__webpack_require__.r(__webpack_exports__); | |
| 2599 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2600 | -/* harmony export */ htmlV2PropTypeUtil: function() { return /* binding */ htmlV2PropTypeUtil; } | |
| 2601 | -/* harmony export */ }); | |
| 2602 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 2603 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 2604 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 2605 | - | |
| 2606 | - | |
| 2607 | -const childElementSchema = _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.lazy(() => _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.object({ | |
| 2608 | - id: _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.string(), | |
| 2609 | - type: _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.string(), | |
| 2610 | - content: _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.string().optional(), | |
| 2611 | - children: _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.array(childElementSchema).optional() | |
| 2612 | -})); | |
| 2613 | -const htmlV2ValueSchema = _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.object({ | |
| 2614 | - content: _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.string().nullable(), | |
| 2615 | - children: _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.array(childElementSchema) | |
| 2616 | -}); | |
| 2617 | -const htmlV2PropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('html-v2', htmlV2ValueSchema); | |
| 2618 | - | |
| 2619 | -/***/ }), | |
| 2620 | - | |
| 2621 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/html-v3.ts": | |
| 2622 | -/*!***********************************************************************!*\ | |
| 2623 | - !*** ./packages/packages/libs/editor-props/src/prop-types/html-v3.ts ***! | |
| 2624 | - \***********************************************************************/ | |
| 2625 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2626 | - | |
| 2627 | -__webpack_require__.r(__webpack_exports__); | |
| 2628 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2629 | -/* harmony export */ htmlV3PropTypeUtil: function() { return /* binding */ htmlV3PropTypeUtil; } | |
| 2630 | -/* harmony export */ }); | |
| 2631 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 2632 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 2633 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 2634 | -/* harmony import */ var _string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./string */ "./packages/packages/libs/editor-props/src/prop-types/string.ts"); | |
| 2635 | - | |
| 2636 | - | |
| 2637 | - | |
| 2638 | -const htmlV3ValueSchema = _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.object({ | |
| 2639 | - content: _string__WEBPACK_IMPORTED_MODULE_2__.stringPropTypeUtil.schema.nullable(), | |
| 2640 | - children: _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.array(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.unknown()) | |
| 2641 | -}); | |
| 2642 | -const htmlV3PropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('html-v3', htmlV3ValueSchema); | |
| 2643 | - | |
| 2644 | -/***/ }), | |
| 2645 | - | |
| 2646 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/html.ts": | |
| 2647 | -/*!********************************************************************!*\ | |
| 2648 | - !*** ./packages/packages/libs/editor-props/src/prop-types/html.ts ***! | |
| 2649 | - \********************************************************************/ | |
| 2650 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2651 | - | |
| 2652 | -__webpack_require__.r(__webpack_exports__); | |
| 2653 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2654 | -/* harmony export */ htmlPropTypeUtil: function() { return /* binding */ htmlPropTypeUtil; } | |
| 2655 | -/* harmony export */ }); | |
| 2656 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 2657 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 2658 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 2659 | - | |
| 2660 | - | |
| 2661 | -const htmlPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('html', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.string().nullable()); | |
| 2662 | - | |
| 2663 | -/***/ }), | |
| 2664 | - | |
| 2665 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/image-attachment-id.ts": | |
| 2666 | -/*!***********************************************************************************!*\ | |
| 2667 | - !*** ./packages/packages/libs/editor-props/src/prop-types/image-attachment-id.ts ***! | |
| 2668 | - \***********************************************************************************/ | |
| 2669 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2670 | - | |
| 2671 | -__webpack_require__.r(__webpack_exports__); | |
| 2672 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2673 | -/* harmony export */ imageAttachmentIdPropType: function() { return /* binding */ imageAttachmentIdPropType; } | |
| 2674 | -/* harmony export */ }); | |
| 2675 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 2676 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 2677 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 2678 | - | |
| 2679 | - | |
| 2680 | -const imageAttachmentIdPropType = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('image-attachment-id', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.number()); | |
| 2681 | - | |
| 2682 | -/***/ }), | |
| 2683 | - | |
| 2684 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/image-src.ts": | |
| 2685 | -/*!*************************************************************************!*\ | |
| 2686 | - !*** ./packages/packages/libs/editor-props/src/prop-types/image-src.ts ***! | |
| 2687 | - \*************************************************************************/ | |
| 2688 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2689 | - | |
| 2690 | -__webpack_require__.r(__webpack_exports__); | |
| 2691 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2692 | -/* harmony export */ imageSrcPropTypeUtil: function() { return /* binding */ imageSrcPropTypeUtil; } | |
| 2693 | -/* harmony export */ }); | |
| 2694 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 2695 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 2696 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 2697 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 2698 | - | |
| 2699 | - | |
| 2700 | - | |
| 2701 | -const imageSrcPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('image-src', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 2702 | - id: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2703 | - url: _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.null(), | |
| 2704 | - alt: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema.optional().default(null) | |
| 2705 | -}).or(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 2706 | - id: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema.optional().default(null), | |
| 2707 | - url: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2708 | - alt: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema.optional().default(null) | |
| 2709 | -}))); | |
| 2710 | - | |
| 2711 | -/***/ }), | |
| 2712 | - | |
| 2713 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/image.ts": | |
| 2714 | -/*!*********************************************************************!*\ | |
| 2715 | - !*** ./packages/packages/libs/editor-props/src/prop-types/image.ts ***! | |
| 2716 | - \*********************************************************************/ | |
| 2717 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2718 | - | |
| 2719 | -__webpack_require__.r(__webpack_exports__); | |
| 2720 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2721 | -/* harmony export */ imagePropTypeUtil: function() { return /* binding */ imagePropTypeUtil; } | |
| 2722 | -/* harmony export */ }); | |
| 2723 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 2724 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 2725 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 2726 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 2727 | - | |
| 2728 | - | |
| 2729 | - | |
| 2730 | -const imagePropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('image', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 2731 | - src: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2732 | - size: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema | |
| 2733 | -})); | |
| 2734 | - | |
| 2735 | -/***/ }), | |
| 2736 | - | |
| 2737 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/index.ts": | |
| 2738 | -/*!*********************************************************************!*\ | |
| 2739 | - !*** ./packages/packages/libs/editor-props/src/prop-types/index.ts ***! | |
| 2740 | - \*********************************************************************/ | |
| 2741 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2742 | - | |
| 2743 | -__webpack_require__.r(__webpack_exports__); | |
| 2744 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2745 | -/* harmony export */ CLASSES_PROP_KEY: function() { return /* reexport safe */ _classes__WEBPACK_IMPORTED_MODULE_3__.CLASSES_PROP_KEY; }, | |
| 2746 | -/* harmony export */ DateTimePropTypeUtil: function() { return /* reexport safe */ _date_time__WEBPACK_IMPORTED_MODULE_40__.DateTimePropTypeUtil; }, | |
| 2747 | -/* harmony export */ backdropFilterPropTypeUtil: function() { return /* reexport safe */ _filter_prop_types_backdrop_filter__WEBPACK_IMPORTED_MODULE_56__.backdropFilterPropTypeUtil; }, | |
| 2748 | -/* harmony export */ backgroundColorOverlayPropTypeUtil: function() { return /* reexport safe */ _background_prop_types_background_color_overlay__WEBPACK_IMPORTED_MODULE_30__.backgroundColorOverlayPropTypeUtil; }, | |
| 2749 | -/* harmony export */ backgroundGradientOverlayPropTypeUtil: function() { return /* reexport safe */ _background_prop_types_background_gradient_overlay__WEBPACK_IMPORTED_MODULE_32__.backgroundGradientOverlayPropTypeUtil; }, | |
| 2750 | -/* harmony export */ backgroundImageOverlayPropTypeUtil: function() { return /* reexport safe */ _background_prop_types_background_image_overlay__WEBPACK_IMPORTED_MODULE_31__.backgroundImageOverlayPropTypeUtil; }, | |
| 2751 | -/* harmony export */ backgroundImagePositionOffsetPropTypeUtil: function() { return /* reexport safe */ _background_prop_types_background_image_position_offset__WEBPACK_IMPORTED_MODULE_33__.backgroundImagePositionOffsetPropTypeUtil; }, | |
| 2752 | -/* harmony export */ backgroundImageSizeScalePropTypeUtil: function() { return /* reexport safe */ _background_prop_types_background_image_size_scale__WEBPACK_IMPORTED_MODULE_34__.backgroundImageSizeScalePropTypeUtil; }, | |
| 2753 | -/* harmony export */ backgroundOverlayItem: function() { return /* reexport safe */ _background_prop_types_background_overlay__WEBPACK_IMPORTED_MODULE_29__.backgroundOverlayItem; }, | |
| 2754 | -/* harmony export */ backgroundOverlayPropTypeUtil: function() { return /* reexport safe */ _background_prop_types_background_overlay__WEBPACK_IMPORTED_MODULE_29__.backgroundOverlayPropTypeUtil; }, | |
| 2755 | -/* harmony export */ backgroundPropTypeUtil: function() { return /* reexport safe */ _background_prop_types_background__WEBPACK_IMPORTED_MODULE_28__.backgroundPropTypeUtil; }, | |
| 2756 | -/* harmony export */ blurFilterPropTypeUtil: function() { return /* reexport safe */ _filter_prop_types_filter_functions_blur_filter__WEBPACK_IMPORTED_MODULE_58__.blurFilterPropTypeUtil; }, | |
| 2757 | -/* harmony export */ booleanPropTypeUtil: function() { return /* reexport safe */ _boolean__WEBPACK_IMPORTED_MODULE_35__.booleanPropTypeUtil; }, | |
| 2758 | -/* harmony export */ borderRadiusPropTypeUtil: function() { return /* reexport safe */ _border_radius__WEBPACK_IMPORTED_MODULE_1__.borderRadiusPropTypeUtil; }, | |
| 2759 | -/* harmony export */ borderWidthPropTypeUtil: function() { return /* reexport safe */ _border_width__WEBPACK_IMPORTED_MODULE_2__.borderWidthPropTypeUtil; }, | |
| 2760 | -/* harmony export */ boxShadowPropTypeUtil: function() { return /* reexport safe */ _box_shadow__WEBPACK_IMPORTED_MODULE_0__.boxShadowPropTypeUtil; }, | |
| 2761 | -/* harmony export */ classesPropTypeUtil: function() { return /* reexport safe */ _classes__WEBPACK_IMPORTED_MODULE_3__.classesPropTypeUtil; }, | |
| 2762 | -/* harmony export */ colorPropTypeUtil: function() { return /* reexport safe */ _color__WEBPACK_IMPORTED_MODULE_4__.colorPropTypeUtil; }, | |
| 2763 | -/* harmony export */ colorStopPropTypeUtil: function() { return /* reexport safe */ _color_stop__WEBPACK_IMPORTED_MODULE_36__.colorStopPropTypeUtil; }, | |
| 2764 | -/* harmony export */ colorToneFilterPropTypeUtil: function() { return /* reexport safe */ _filter_prop_types_filter_functions_color_tone_filter__WEBPACK_IMPORTED_MODULE_60__.colorToneFilterPropTypeUtil; }, | |
| 2765 | -/* harmony export */ cssFilterFunctionPropUtil: function() { return /* reexport safe */ _filter_prop_types_filter__WEBPACK_IMPORTED_MODULE_47__.cssFilterFunctionPropUtil; }, | |
| 2766 | -/* harmony export */ dateRangePropTypeUtil: function() { return /* reexport safe */ _date_range__WEBPACK_IMPORTED_MODULE_62__.dateRangePropTypeUtil; }, | |
| 2767 | -/* harmony export */ dateStringPropTypeUtil: function() { return /* reexport safe */ _date_string__WEBPACK_IMPORTED_MODULE_63__.dateStringPropTypeUtil; }, | |
| 2768 | -/* harmony export */ dimensionsPropTypeUtil: function() { return /* reexport safe */ _dimensions__WEBPACK_IMPORTED_MODULE_13__.dimensionsPropTypeUtil; }, | |
| 2769 | -/* harmony export */ dropShadowFilterPropTypeUtil: function() { return /* reexport safe */ _filter_prop_types_drop_shadow_filter__WEBPACK_IMPORTED_MODULE_57__.dropShadowFilterPropTypeUtil; }, | |
| 2770 | -/* harmony export */ emailPropTypeUtil: function() { return /* reexport safe */ _email__WEBPACK_IMPORTED_MODULE_25__.emailPropTypeUtil; }, | |
| 2771 | -/* harmony export */ emailsPropTypeUtil: function() { return /* reexport safe */ _emails__WEBPACK_IMPORTED_MODULE_26__.emailsPropTypeUtil; }, | |
| 2772 | -/* harmony export */ filterPropTypeUtil: function() { return /* reexport safe */ _filter_prop_types_filter__WEBPACK_IMPORTED_MODULE_47__.filterPropTypeUtil; }, | |
| 2773 | -/* harmony export */ flexPropTypeUtil: function() { return /* reexport safe */ _flex__WEBPACK_IMPORTED_MODULE_5__.flexPropTypeUtil; }, | |
| 2774 | -/* harmony export */ fontFamilyPropTypeUtil: function() { return /* reexport safe */ _font_family__WEBPACK_IMPORTED_MODULE_6__.fontFamilyPropTypeUtil; }, | |
| 2775 | -/* harmony export */ gradientColorStopPropTypeUtil: function() { return /* reexport safe */ _gradient_color_stop__WEBPACK_IMPORTED_MODULE_37__.gradientColorStopPropTypeUtil; }, | |
| 2776 | -/* harmony export */ gridTrackSizePropTypeUtil: function() { return /* reexport safe */ _grid_track_size__WEBPACK_IMPORTED_MODULE_17__.gridTrackSizePropTypeUtil; }, | |
| 2777 | -/* harmony export */ htmlPropTypeUtil: function() { return /* reexport safe */ _html__WEBPACK_IMPORTED_MODULE_44__.htmlPropTypeUtil; }, | |
| 2778 | -/* harmony export */ htmlV2PropTypeUtil: function() { return /* reexport safe */ _html_v2__WEBPACK_IMPORTED_MODULE_45__.htmlV2PropTypeUtil; }, | |
| 2779 | -/* harmony export */ htmlV3PropTypeUtil: function() { return /* reexport safe */ _html_v3__WEBPACK_IMPORTED_MODULE_46__.htmlV3PropTypeUtil; }, | |
| 2780 | -/* harmony export */ hueRotateFilterPropTypeUtil: function() { return /* reexport safe */ _filter_prop_types_filter_functions_hue_rotate_filter__WEBPACK_IMPORTED_MODULE_61__.hueRotateFilterPropTypeUtil; }, | |
| 2781 | -/* harmony export */ imageAttachmentIdPropType: function() { return /* reexport safe */ _image_attachment_id__WEBPACK_IMPORTED_MODULE_8__.imageAttachmentIdPropType; }, | |
| 2782 | -/* harmony export */ imagePropTypeUtil: function() { return /* reexport safe */ _image__WEBPACK_IMPORTED_MODULE_7__.imagePropTypeUtil; }, | |
| 2783 | -/* harmony export */ imageSrcPropTypeUtil: function() { return /* reexport safe */ _image_src__WEBPACK_IMPORTED_MODULE_9__.imageSrcPropTypeUtil; }, | |
| 2784 | -/* harmony export */ intensityFilterPropTypeUtil: function() { return /* reexport safe */ _filter_prop_types_filter_functions_intensity_filter__WEBPACK_IMPORTED_MODULE_59__.intensityFilterPropTypeUtil; }, | |
| 2785 | -/* harmony export */ keyValuePropTypeUtil: function() { return /* reexport safe */ _key_value__WEBPACK_IMPORTED_MODULE_38__.keyValuePropTypeUtil; }, | |
| 2786 | -/* harmony export */ layoutDirectionPropTypeUtil: function() { return /* reexport safe */ _layout_direction__WEBPACK_IMPORTED_MODULE_23__.layoutDirectionPropTypeUtil; }, | |
| 2787 | -/* harmony export */ linkPropTypeUtil: function() { return /* reexport safe */ _link__WEBPACK_IMPORTED_MODULE_24__.linkPropTypeUtil; }, | |
| 2788 | -/* harmony export */ moveTransformPropTypeUtil: function() { return /* reexport safe */ _transform_prop_types_transform_functions_move_transform__WEBPACK_IMPORTED_MODULE_50__.moveTransformPropTypeUtil; }, | |
| 2789 | -/* harmony export */ numberPropTypeUtil: function() { return /* reexport safe */ _number__WEBPACK_IMPORTED_MODULE_14__.numberPropTypeUtil; }, | |
| 2790 | -/* harmony export */ numberRangePropTypeUtil: function() { return /* reexport safe */ _number_range__WEBPACK_IMPORTED_MODULE_39__.numberRangePropTypeUtil; }, | |
| 2791 | -/* harmony export */ perspectiveOriginPropTypeUtil: function() { return /* reexport safe */ _transform_prop_types_perspective_origin__WEBPACK_IMPORTED_MODULE_55__.perspectiveOriginPropTypeUtil; }, | |
| 2792 | -/* harmony export */ positionPropTypeUtil: function() { return /* reexport safe */ _position__WEBPACK_IMPORTED_MODULE_41__.positionPropTypeUtil; }, | |
| 2793 | -/* harmony export */ queryFilterArrayPropTypeUtil: function() { return /* reexport safe */ _query_filter__WEBPACK_IMPORTED_MODULE_43__.queryFilterArrayPropTypeUtil; }, | |
| 2794 | -/* harmony export */ queryFilterPropTypeUtil: function() { return /* reexport safe */ _query_filter__WEBPACK_IMPORTED_MODULE_43__.queryFilterPropTypeUtil; }, | |
| 2795 | -/* harmony export */ queryPropTypeUtil: function() { return /* reexport safe */ _query__WEBPACK_IMPORTED_MODULE_42__.queryPropTypeUtil; }, | |
| 2796 | -/* harmony export */ rotateTransformPropTypeUtil: function() { return /* reexport safe */ _transform_prop_types_transform_functions_rotate_transform__WEBPACK_IMPORTED_MODULE_52__.rotateTransformPropTypeUtil; }, | |
| 2797 | -/* harmony export */ scaleTransformPropTypeUtil: function() { return /* reexport safe */ _transform_prop_types_transform_functions_scale_transform__WEBPACK_IMPORTED_MODULE_51__.scaleTransformPropTypeUtil; }, | |
| 2798 | -/* harmony export */ selectionSizePropTypeUtil: function() { return /* reexport safe */ _selection_size__WEBPACK_IMPORTED_MODULE_27__.selectionSizePropTypeUtil; }, | |
| 2799 | -/* harmony export */ shadowPropTypeUtil: function() { return /* reexport safe */ _shadow__WEBPACK_IMPORTED_MODULE_15__.shadowPropTypeUtil; }, | |
| 2800 | -/* harmony export */ sizePropTypeUtil: function() { return /* reexport safe */ _size__WEBPACK_IMPORTED_MODULE_16__.sizePropTypeUtil; }, | |
| 2801 | -/* harmony export */ skewTransformPropTypeUtil: function() { return /* reexport safe */ _transform_prop_types_transform_functions_skew_transform__WEBPACK_IMPORTED_MODULE_53__.skewTransformPropTypeUtil; }, | |
| 2802 | -/* harmony export */ spanPropTypeUtil: function() { return /* reexport safe */ _span__WEBPACK_IMPORTED_MODULE_18__.spanPropTypeUtil; }, | |
| 2803 | -/* harmony export */ stringArrayPropTypeUtil: function() { return /* reexport safe */ _string_array__WEBPACK_IMPORTED_MODULE_20__.stringArrayPropTypeUtil; }, | |
| 2804 | -/* harmony export */ stringPropTypeUtil: function() { return /* reexport safe */ _string__WEBPACK_IMPORTED_MODULE_19__.stringPropTypeUtil; }, | |
| 2805 | -/* harmony export */ strokePropTypeUtil: function() { return /* reexport safe */ _stroke__WEBPACK_IMPORTED_MODULE_21__.strokePropTypeUtil; }, | |
| 2806 | -/* harmony export */ svgSrcPropTypeUtil: function() { return /* reexport safe */ _svg_src__WEBPACK_IMPORTED_MODULE_10__.svgSrcPropTypeUtil; }, | |
| 2807 | -/* harmony export */ timeRangePropTypeUtil: function() { return /* reexport safe */ _time_range__WEBPACK_IMPORTED_MODULE_64__.timeRangePropTypeUtil; }, | |
| 2808 | -/* harmony export */ timeStringPropTypeUtil: function() { return /* reexport safe */ _time_string__WEBPACK_IMPORTED_MODULE_65__.timeStringPropTypeUtil; }, | |
| 2809 | -/* harmony export */ transformFunctionsPropTypeUtil: function() { return /* reexport safe */ _transform_prop_types_transform_functions__WEBPACK_IMPORTED_MODULE_49__.transformFunctionsPropTypeUtil; }, | |
| 2810 | -/* harmony export */ transformOriginPropTypeUtil: function() { return /* reexport safe */ _transform_prop_types_transform_origin__WEBPACK_IMPORTED_MODULE_54__.transformOriginPropTypeUtil; }, | |
| 2811 | -/* harmony export */ transformPropTypeUtil: function() { return /* reexport safe */ _transform_prop_types_transform__WEBPACK_IMPORTED_MODULE_48__.transformPropTypeUtil; }, | |
| 2812 | -/* harmony export */ urlPropTypeUtil: function() { return /* reexport safe */ _url__WEBPACK_IMPORTED_MODULE_22__.urlPropTypeUtil; }, | |
| 2813 | -/* harmony export */ videoAttachmentIdPropType: function() { return /* reexport safe */ _video_attachment_id__WEBPACK_IMPORTED_MODULE_11__.videoAttachmentIdPropType; }, | |
| 2814 | -/* harmony export */ videoSrcPropTypeUtil: function() { return /* reexport safe */ _video_src__WEBPACK_IMPORTED_MODULE_12__.videoSrcPropTypeUtil; } | |
| 2815 | -/* harmony export */ }); | |
| 2816 | -/* harmony import */ var _box_shadow__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./box-shadow */ "./packages/packages/libs/editor-props/src/prop-types/box-shadow.ts"); | |
| 2817 | -/* harmony import */ var _border_radius__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./border-radius */ "./packages/packages/libs/editor-props/src/prop-types/border-radius.ts"); | |
| 2818 | -/* harmony import */ var _border_width__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./border-width */ "./packages/packages/libs/editor-props/src/prop-types/border-width.ts"); | |
| 2819 | -/* harmony import */ var _classes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./classes */ "./packages/packages/libs/editor-props/src/prop-types/classes.ts"); | |
| 2820 | -/* harmony import */ var _color__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./color */ "./packages/packages/libs/editor-props/src/prop-types/color.ts"); | |
| 2821 | -/* harmony import */ var _flex__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./flex */ "./packages/packages/libs/editor-props/src/prop-types/flex.ts"); | |
| 2822 | -/* harmony import */ var _font_family__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./font-family */ "./packages/packages/libs/editor-props/src/prop-types/font-family.ts"); | |
| 2823 | -/* harmony import */ var _image__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./image */ "./packages/packages/libs/editor-props/src/prop-types/image.ts"); | |
| 2824 | -/* harmony import */ var _image_attachment_id__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./image-attachment-id */ "./packages/packages/libs/editor-props/src/prop-types/image-attachment-id.ts"); | |
| 2825 | -/* harmony import */ var _image_src__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./image-src */ "./packages/packages/libs/editor-props/src/prop-types/image-src.ts"); | |
| 2826 | -/* harmony import */ var _svg_src__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./svg-src */ "./packages/packages/libs/editor-props/src/prop-types/svg-src.ts"); | |
| 2827 | -/* harmony import */ var _video_attachment_id__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./video-attachment-id */ "./packages/packages/libs/editor-props/src/prop-types/video-attachment-id.ts"); | |
| 2828 | -/* harmony import */ var _video_src__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./video-src */ "./packages/packages/libs/editor-props/src/prop-types/video-src.ts"); | |
| 2829 | -/* harmony import */ var _dimensions__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./dimensions */ "./packages/packages/libs/editor-props/src/prop-types/dimensions.ts"); | |
| 2830 | -/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./number */ "./packages/packages/libs/editor-props/src/prop-types/number.ts"); | |
| 2831 | -/* harmony import */ var _shadow__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./shadow */ "./packages/packages/libs/editor-props/src/prop-types/shadow.ts"); | |
| 2832 | -/* harmony import */ var _size__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./size */ "./packages/packages/libs/editor-props/src/prop-types/size.ts"); | |
| 2833 | -/* harmony import */ var _grid_track_size__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./grid-track-size */ "./packages/packages/libs/editor-props/src/prop-types/grid-track-size.ts"); | |
| 2834 | -/* harmony import */ var _span__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./span */ "./packages/packages/libs/editor-props/src/prop-types/span.ts"); | |
| 2835 | -/* harmony import */ var _string__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./string */ "./packages/packages/libs/editor-props/src/prop-types/string.ts"); | |
| 2836 | -/* harmony import */ var _string_array__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./string-array */ "./packages/packages/libs/editor-props/src/prop-types/string-array.ts"); | |
| 2837 | -/* harmony import */ var _stroke__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./stroke */ "./packages/packages/libs/editor-props/src/prop-types/stroke.ts"); | |
| 2838 | -/* harmony import */ var _url__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./url */ "./packages/packages/libs/editor-props/src/prop-types/url.ts"); | |
| 2839 | -/* harmony import */ var _layout_direction__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./layout-direction */ "./packages/packages/libs/editor-props/src/prop-types/layout-direction.ts"); | |
| 2840 | -/* harmony import */ var _link__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./link */ "./packages/packages/libs/editor-props/src/prop-types/link.ts"); | |
| 2841 | -/* harmony import */ var _email__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./email */ "./packages/packages/libs/editor-props/src/prop-types/email.ts"); | |
| 2842 | -/* harmony import */ var _emails__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./emails */ "./packages/packages/libs/editor-props/src/prop-types/emails.ts"); | |
| 2843 | -/* harmony import */ var _selection_size__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./selection-size */ "./packages/packages/libs/editor-props/src/prop-types/selection-size.ts"); | |
| 2844 | -/* harmony import */ var _background_prop_types_background__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./background-prop-types/background */ "./packages/packages/libs/editor-props/src/prop-types/background-prop-types/background.ts"); | |
| 2845 | -/* harmony import */ var _background_prop_types_background_overlay__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./background-prop-types/background-overlay */ "./packages/packages/libs/editor-props/src/prop-types/background-prop-types/background-overlay.ts"); | |
| 2846 | -/* harmony import */ var _background_prop_types_background_color_overlay__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./background-prop-types/background-color-overlay */ "./packages/packages/libs/editor-props/src/prop-types/background-prop-types/background-color-overlay.ts"); | |
| 2847 | -/* harmony import */ var _background_prop_types_background_image_overlay__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./background-prop-types/background-image-overlay */ "./packages/packages/libs/editor-props/src/prop-types/background-prop-types/background-image-overlay.ts"); | |
| 2848 | -/* harmony import */ var _background_prop_types_background_gradient_overlay__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./background-prop-types/background-gradient-overlay */ "./packages/packages/libs/editor-props/src/prop-types/background-prop-types/background-gradient-overlay.ts"); | |
| 2849 | -/* harmony import */ var _background_prop_types_background_image_position_offset__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./background-prop-types/background-image-position-offset */ "./packages/packages/libs/editor-props/src/prop-types/background-prop-types/background-image-position-offset.ts"); | |
| 2850 | -/* harmony import */ var _background_prop_types_background_image_size_scale__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./background-prop-types/background-image-size-scale */ "./packages/packages/libs/editor-props/src/prop-types/background-prop-types/background-image-size-scale.ts"); | |
| 2851 | -/* harmony import */ var _boolean__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./boolean */ "./packages/packages/libs/editor-props/src/prop-types/boolean.ts"); | |
| 2852 | -/* harmony import */ var _color_stop__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./color-stop */ "./packages/packages/libs/editor-props/src/prop-types/color-stop.ts"); | |
| 2853 | -/* harmony import */ var _gradient_color_stop__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./gradient-color-stop */ "./packages/packages/libs/editor-props/src/prop-types/gradient-color-stop.ts"); | |
| 2854 | -/* harmony import */ var _key_value__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./key-value */ "./packages/packages/libs/editor-props/src/prop-types/key-value.ts"); | |
| 2855 | -/* harmony import */ var _number_range__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./number-range */ "./packages/packages/libs/editor-props/src/prop-types/number-range.ts"); | |
| 2856 | -/* harmony import */ var _date_time__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./date-time */ "./packages/packages/libs/editor-props/src/prop-types/date-time.ts"); | |
| 2857 | -/* harmony import */ var _position__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./position */ "./packages/packages/libs/editor-props/src/prop-types/position.ts"); | |
| 2858 | -/* harmony import */ var _query__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./query */ "./packages/packages/libs/editor-props/src/prop-types/query.ts"); | |
| 2859 | -/* harmony import */ var _query_filter__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./query-filter */ "./packages/packages/libs/editor-props/src/prop-types/query-filter.ts"); | |
| 2860 | -/* harmony import */ var _html__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./html */ "./packages/packages/libs/editor-props/src/prop-types/html.ts"); | |
| 2861 | -/* harmony import */ var _html_v2__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./html-v2 */ "./packages/packages/libs/editor-props/src/prop-types/html-v2.ts"); | |
| 2862 | -/* harmony import */ var _html_v3__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./html-v3 */ "./packages/packages/libs/editor-props/src/prop-types/html-v3.ts"); | |
| 2863 | -/* harmony import */ var _filter_prop_types_filter__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./filter-prop-types/filter */ "./packages/packages/libs/editor-props/src/prop-types/filter-prop-types/filter.ts"); | |
| 2864 | -/* harmony import */ var _transform_prop_types_transform__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./transform-prop-types/transform */ "./packages/packages/libs/editor-props/src/prop-types/transform-prop-types/transform.ts"); | |
| 2865 | -/* harmony import */ var _transform_prop_types_transform_functions__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./transform-prop-types/transform-functions */ "./packages/packages/libs/editor-props/src/prop-types/transform-prop-types/transform-functions.ts"); | |
| 2866 | -/* harmony import */ var _transform_prop_types_transform_functions_move_transform__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./transform-prop-types/transform-functions/move-transform */ "./packages/packages/libs/editor-props/src/prop-types/transform-prop-types/transform-functions/move-transform.ts"); | |
| 2867 | -/* harmony import */ var _transform_prop_types_transform_functions_scale_transform__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./transform-prop-types/transform-functions/scale-transform */ "./packages/packages/libs/editor-props/src/prop-types/transform-prop-types/transform-functions/scale-transform.ts"); | |
| 2868 | -/* harmony import */ var _transform_prop_types_transform_functions_rotate_transform__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./transform-prop-types/transform-functions/rotate-transform */ "./packages/packages/libs/editor-props/src/prop-types/transform-prop-types/transform-functions/rotate-transform.ts"); | |
| 2869 | -/* harmony import */ var _transform_prop_types_transform_functions_skew_transform__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./transform-prop-types/transform-functions/skew-transform */ "./packages/packages/libs/editor-props/src/prop-types/transform-prop-types/transform-functions/skew-transform.ts"); | |
| 2870 | -/* harmony import */ var _transform_prop_types_transform_origin__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./transform-prop-types/transform-origin */ "./packages/packages/libs/editor-props/src/prop-types/transform-prop-types/transform-origin.ts"); | |
| 2871 | -/* harmony import */ var _transform_prop_types_perspective_origin__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./transform-prop-types/perspective-origin */ "./packages/packages/libs/editor-props/src/prop-types/transform-prop-types/perspective-origin.ts"); | |
| 2872 | -/* harmony import */ var _filter_prop_types_backdrop_filter__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./filter-prop-types/backdrop-filter */ "./packages/packages/libs/editor-props/src/prop-types/filter-prop-types/backdrop-filter.ts"); | |
| 2873 | -/* harmony import */ var _filter_prop_types_drop_shadow_filter__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./filter-prop-types/drop-shadow-filter */ "./packages/packages/libs/editor-props/src/prop-types/filter-prop-types/drop-shadow-filter.ts"); | |
| 2874 | -/* harmony import */ var _filter_prop_types_filter_functions_blur_filter__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./filter-prop-types/filter-functions/blur-filter */ "./packages/packages/libs/editor-props/src/prop-types/filter-prop-types/filter-functions/blur-filter.ts"); | |
| 2875 | -/* harmony import */ var _filter_prop_types_filter_functions_intensity_filter__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ./filter-prop-types/filter-functions/intensity-filter */ "./packages/packages/libs/editor-props/src/prop-types/filter-prop-types/filter-functions/intensity-filter.ts"); | |
| 2876 | -/* harmony import */ var _filter_prop_types_filter_functions_color_tone_filter__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ./filter-prop-types/filter-functions/color-tone-filter */ "./packages/packages/libs/editor-props/src/prop-types/filter-prop-types/filter-functions/color-tone-filter.ts"); | |
| 2877 | -/* harmony import */ var _filter_prop_types_filter_functions_hue_rotate_filter__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ./filter-prop-types/filter-functions/hue-rotate-filter */ "./packages/packages/libs/editor-props/src/prop-types/filter-prop-types/filter-functions/hue-rotate-filter.ts"); | |
| 2878 | -/* harmony import */ var _date_range__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ./date-range */ "./packages/packages/libs/editor-props/src/prop-types/date-range.ts"); | |
| 2879 | -/* harmony import */ var _date_string__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ./date-string */ "./packages/packages/libs/editor-props/src/prop-types/date-string.ts"); | |
| 2880 | -/* harmony import */ var _time_range__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ./time-range */ "./packages/packages/libs/editor-props/src/prop-types/time-range.ts"); | |
| 2881 | -/* harmony import */ var _time_string__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ./time-string */ "./packages/packages/libs/editor-props/src/prop-types/time-string.ts"); | |
| 2882 | - | |
| 2883 | - | |
| 2884 | - | |
| 2885 | - | |
| 2886 | - | |
| 2887 | - | |
| 2888 | - | |
| 2889 | - | |
| 2890 | - | |
| 2891 | - | |
| 2892 | - | |
| 2893 | - | |
| 2894 | - | |
| 2895 | - | |
| 2896 | - | |
| 2897 | - | |
| 2898 | - | |
| 2899 | - | |
| 2900 | - | |
| 2901 | - | |
| 2902 | - | |
| 2903 | - | |
| 2904 | - | |
| 2905 | - | |
| 2906 | - | |
| 2907 | - | |
| 2908 | - | |
| 2909 | - | |
| 2910 | - | |
| 2911 | - | |
| 2912 | - | |
| 2913 | - | |
| 2914 | - | |
| 2915 | - | |
| 2916 | - | |
| 2917 | - | |
| 2918 | - | |
| 2919 | - | |
| 2920 | - | |
| 2921 | - | |
| 2922 | - | |
| 2923 | - | |
| 2924 | - | |
| 2925 | - | |
| 2926 | - | |
| 2927 | - | |
| 2928 | - | |
| 2929 | - | |
| 2930 | - | |
| 2931 | - | |
| 2932 | - | |
| 2933 | - | |
| 2934 | - | |
| 2935 | - | |
| 2936 | - | |
| 2937 | - | |
| 2938 | - | |
| 2939 | - | |
| 2940 | - | |
| 2941 | - | |
| 2942 | - | |
| 2943 | - | |
| 2944 | - | |
| 2945 | - | |
| 2946 | - | |
| 2947 | - | |
| 2948 | - | |
| 2949 | - | |
| 2950 | -/***/ }), | |
| 2951 | - | |
| 2952 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/key-value.ts": | |
| 2953 | -/*!*************************************************************************!*\ | |
| 2954 | - !*** ./packages/packages/libs/editor-props/src/prop-types/key-value.ts ***! | |
| 2955 | - \*************************************************************************/ | |
| 2956 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2957 | - | |
| 2958 | -__webpack_require__.r(__webpack_exports__); | |
| 2959 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2960 | -/* harmony export */ keyValuePropTypeUtil: function() { return /* binding */ keyValuePropTypeUtil; } | |
| 2961 | -/* harmony export */ }); | |
| 2962 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 2963 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 2964 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 2965 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 2966 | - | |
| 2967 | - | |
| 2968 | - | |
| 2969 | -const keyValuePropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('key-value', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 2970 | - key: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 2971 | - value: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema | |
| 2972 | -})); | |
| 2973 | - | |
| 2974 | -/***/ }), | |
| 2975 | - | |
| 2976 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/layout-direction.ts": | |
| 2977 | -/*!********************************************************************************!*\ | |
| 2978 | - !*** ./packages/packages/libs/editor-props/src/prop-types/layout-direction.ts ***! | |
| 2979 | - \********************************************************************************/ | |
| 2980 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2981 | - | |
| 2982 | -__webpack_require__.r(__webpack_exports__); | |
| 2983 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2984 | -/* harmony export */ layoutDirectionPropTypeUtil: function() { return /* binding */ layoutDirectionPropTypeUtil; } | |
| 2985 | -/* harmony export */ }); | |
| 2986 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 2987 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 2988 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 2989 | - | |
| 2990 | - | |
| 2991 | -const layoutDirectionPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('layout-direction', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.object({ | |
| 2992 | - row: _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.any(), | |
| 2993 | - column: _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.any() | |
| 2994 | -})); | |
| 2995 | - | |
| 2996 | -/***/ }), | |
| 2997 | - | |
| 2998 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/link.ts": | |
| 2999 | -/*!********************************************************************!*\ | |
| 3000 | - !*** ./packages/packages/libs/editor-props/src/prop-types/link.ts ***! | |
| 3001 | - \********************************************************************/ | |
| 3002 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3003 | - | |
| 3004 | -__webpack_require__.r(__webpack_exports__); | |
| 3005 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3006 | -/* harmony export */ linkPropTypeUtil: function() { return /* binding */ linkPropTypeUtil; } | |
| 3007 | -/* harmony export */ }); | |
| 3008 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 3009 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 3010 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 3011 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 3012 | - | |
| 3013 | - | |
| 3014 | - | |
| 3015 | -const linkPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('link', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 3016 | - destination: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 3017 | - isTargetBlank: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 3018 | - tag: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema | |
| 3019 | -})); | |
| 3020 | - | |
| 3021 | -/***/ }), | |
| 3022 | - | |
| 3023 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/number-range.ts": | |
| 3024 | -/*!****************************************************************************!*\ | |
| 3025 | - !*** ./packages/packages/libs/editor-props/src/prop-types/number-range.ts ***! | |
| 3026 | - \****************************************************************************/ | |
| 3027 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3028 | - | |
| 3029 | -__webpack_require__.r(__webpack_exports__); | |
| 3030 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3031 | -/* harmony export */ numberRangePropTypeUtil: function() { return /* binding */ numberRangePropTypeUtil; } | |
| 3032 | -/* harmony export */ }); | |
| 3033 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 3034 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 3035 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 3036 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 3037 | - | |
| 3038 | - | |
| 3039 | - | |
| 3040 | -const numberRangePropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('number-range', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 3041 | - min: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 3042 | - max: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema | |
| 3043 | -})); | |
| 3044 | - | |
| 3045 | -/***/ }), | |
| 3046 | - | |
| 3047 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/number.ts": | |
| 3048 | -/*!**********************************************************************!*\ | |
| 3049 | - !*** ./packages/packages/libs/editor-props/src/prop-types/number.ts ***! | |
| 3050 | - \**********************************************************************/ | |
| 3051 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3052 | - | |
| 3053 | -__webpack_require__.r(__webpack_exports__); | |
| 3054 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3055 | -/* harmony export */ numberPropTypeUtil: function() { return /* binding */ numberPropTypeUtil; } | |
| 3056 | -/* harmony export */ }); | |
| 3057 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 3058 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 3059 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 3060 | - | |
| 3061 | - | |
| 3062 | -const numberPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('number', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.number().nullable()); | |
| 3063 | - | |
| 3064 | -/***/ }), | |
| 3065 | - | |
| 3066 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/position.ts": | |
| 3067 | -/*!************************************************************************!*\ | |
| 3068 | - !*** ./packages/packages/libs/editor-props/src/prop-types/position.ts ***! | |
| 3069 | - \************************************************************************/ | |
| 3070 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3071 | - | |
| 3072 | -__webpack_require__.r(__webpack_exports__); | |
| 3073 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3074 | -/* harmony export */ positionPropTypeUtil: function() { return /* binding */ positionPropTypeUtil; } | |
| 3075 | -/* harmony export */ }); | |
| 3076 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 3077 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 3078 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 3079 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 3080 | - | |
| 3081 | - | |
| 3082 | - | |
| 3083 | -const positionPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('object-position', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 3084 | - x: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 3085 | - y: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema | |
| 3086 | -})); | |
| 3087 | - | |
| 3088 | -/***/ }), | |
| 3089 | - | |
| 3090 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/query-filter.ts": | |
| 3091 | -/*!****************************************************************************!*\ | |
| 3092 | - !*** ./packages/packages/libs/editor-props/src/prop-types/query-filter.ts ***! | |
| 3093 | - \****************************************************************************/ | |
| 3094 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3095 | - | |
| 3096 | -__webpack_require__.r(__webpack_exports__); | |
| 3097 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3098 | -/* harmony export */ queryFilterArrayPropTypeUtil: function() { return /* binding */ queryFilterArrayPropTypeUtil; }, | |
| 3099 | -/* harmony export */ queryFilterPropTypeUtil: function() { return /* binding */ queryFilterPropTypeUtil; } | |
| 3100 | -/* harmony export */ }); | |
| 3101 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 3102 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 3103 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 3104 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 3105 | - | |
| 3106 | - | |
| 3107 | - | |
| 3108 | -const queryFilterPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('query-filter', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 3109 | - key: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 3110 | - values: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 3111 | - taxonomies: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema | |
| 3112 | -})); | |
| 3113 | -const queryFilterArrayPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createArrayPropUtils)(queryFilterPropTypeUtil.key, queryFilterPropTypeUtil.schema); | |
| 3114 | - | |
| 3115 | -/***/ }), | |
| 3116 | - | |
| 3117 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/query.ts": | |
| 3118 | -/*!*********************************************************************!*\ | |
| 3119 | - !*** ./packages/packages/libs/editor-props/src/prop-types/query.ts ***! | |
| 3120 | - \*********************************************************************/ | |
| 3121 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3122 | - | |
| 3123 | -__webpack_require__.r(__webpack_exports__); | |
| 3124 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3125 | -/* harmony export */ queryPropTypeUtil: function() { return /* binding */ queryPropTypeUtil; } | |
| 3126 | -/* harmony export */ }); | |
| 3127 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 3128 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 3129 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 3130 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 3131 | - | |
| 3132 | - | |
| 3133 | - | |
| 3134 | -const queryPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('query', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 3135 | - id: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 3136 | - label: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema | |
| 3137 | -})); | |
| 3138 | - | |
| 3139 | -/***/ }), | |
| 3140 | - | |
| 3141 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/selection-size.ts": | |
| 3142 | -/*!******************************************************************************!*\ | |
| 3143 | - !*** ./packages/packages/libs/editor-props/src/prop-types/selection-size.ts ***! | |
| 3144 | - \******************************************************************************/ | |
| 3145 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3146 | - | |
| 3147 | -__webpack_require__.r(__webpack_exports__); | |
| 3148 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3149 | -/* harmony export */ selectionSizePropTypeUtil: function() { return /* binding */ selectionSizePropTypeUtil; } | |
| 3150 | -/* harmony export */ }); | |
| 3151 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 3152 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 3153 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 3154 | -/* harmony import */ var _key_value__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./key-value */ "./packages/packages/libs/editor-props/src/prop-types/key-value.ts"); | |
| 3155 | -/* harmony import */ var _string__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./string */ "./packages/packages/libs/editor-props/src/prop-types/string.ts"); | |
| 3156 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 3157 | - | |
| 3158 | - | |
| 3159 | - | |
| 3160 | - | |
| 3161 | - | |
| 3162 | -const selectionSizePropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('selection-size', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 3163 | - selection: _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.union([_key_value__WEBPACK_IMPORTED_MODULE_2__.keyValuePropTypeUtil.schema, _string__WEBPACK_IMPORTED_MODULE_3__.stringPropTypeUtil.schema]), | |
| 3164 | - size: _utils__WEBPACK_IMPORTED_MODULE_4__.unknownChildrenSchema | |
| 3165 | -})); | |
| 3166 | - | |
| 3167 | -/***/ }), | |
| 3168 | - | |
| 3169 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/shadow.ts": | |
| 3170 | -/*!**********************************************************************!*\ | |
| 3171 | - !*** ./packages/packages/libs/editor-props/src/prop-types/shadow.ts ***! | |
| 3172 | - \**********************************************************************/ | |
| 3173 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3174 | - | |
| 3175 | -__webpack_require__.r(__webpack_exports__); | |
| 3176 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3177 | -/* harmony export */ shadowPropTypeUtil: function() { return /* binding */ shadowPropTypeUtil; } | |
| 3178 | -/* harmony export */ }); | |
| 3179 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 3180 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 3181 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 3182 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 3183 | - | |
| 3184 | - | |
| 3185 | - | |
| 3186 | -const shadowPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('shadow', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 3187 | - position: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 3188 | - hOffset: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 3189 | - vOffset: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 3190 | - blur: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 3191 | - spread: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 3192 | - color: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema | |
| 3193 | -})); | |
| 3194 | - | |
| 3195 | -/***/ }), | |
| 3196 | - | |
| 3197 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/size.ts": | |
| 3198 | -/*!********************************************************************!*\ | |
| 3199 | - !*** ./packages/packages/libs/editor-props/src/prop-types/size.ts ***! | |
| 3200 | - \********************************************************************/ | |
| 3201 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3202 | - | |
| 3203 | -__webpack_require__.r(__webpack_exports__); | |
| 3204 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3205 | -/* harmony export */ sizePropTypeUtil: function() { return /* binding */ sizePropTypeUtil; } | |
| 3206 | -/* harmony export */ }); | |
| 3207 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 3208 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 3209 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 3210 | - | |
| 3211 | - | |
| 3212 | -const sizeNumberOrEmpty = _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.union([_elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.number(), _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.literal('')]); | |
| 3213 | - | |
| 3214 | -// NOTE: The schema differs from the PHP schema, check size-prop-type.php for the actual schema. | |
| 3215 | -const sizePropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('size', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 3216 | - unit: _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.enum(['px', 'em', 'rem', '%', 'vw', 'vh', 'ch', 'fr']), | |
| 3217 | - size: sizeNumberOrEmpty | |
| 3218 | -}).or(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 3219 | - unit: _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.enum(['deg', 'rad', 'grad', 'turn']), | |
| 3220 | - size: sizeNumberOrEmpty | |
| 3221 | -})).or(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 3222 | - unit: _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.enum(['s', 'ms']), | |
| 3223 | - size: sizeNumberOrEmpty | |
| 3224 | -})).or(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 3225 | - unit: _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.literal('auto'), | |
| 3226 | - size: _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.literal('') | |
| 3227 | -})).or(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 3228 | - unit: _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.literal('custom'), | |
| 3229 | - size: _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.string() | |
| 3230 | -}))); | |
| 3231 | - | |
| 3232 | -/***/ }), | |
| 3233 | - | |
| 3234 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/span.ts": | |
| 3235 | -/*!********************************************************************!*\ | |
| 3236 | - !*** ./packages/packages/libs/editor-props/src/prop-types/span.ts ***! | |
| 3237 | - \********************************************************************/ | |
| 3238 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3239 | - | |
| 3240 | -__webpack_require__.r(__webpack_exports__); | |
| 3241 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3242 | -/* harmony export */ spanPropTypeUtil: function() { return /* binding */ spanPropTypeUtil; } | |
| 3243 | -/* harmony export */ }); | |
| 3244 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 3245 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 3246 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 3247 | - | |
| 3248 | - | |
| 3249 | -const spanPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('span', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.string().nullable()); | |
| 3250 | - | |
| 3251 | -/***/ }), | |
| 3252 | - | |
| 3253 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/string-array.ts": | |
| 3254 | -/*!****************************************************************************!*\ | |
| 3255 | - !*** ./packages/packages/libs/editor-props/src/prop-types/string-array.ts ***! | |
| 3256 | - \****************************************************************************/ | |
| 3257 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3258 | - | |
| 3259 | -__webpack_require__.r(__webpack_exports__); | |
| 3260 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3261 | -/* harmony export */ stringArrayPropTypeUtil: function() { return /* binding */ stringArrayPropTypeUtil; } | |
| 3262 | -/* harmony export */ }); | |
| 3263 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 3264 | -/* harmony import */ var _string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./string */ "./packages/packages/libs/editor-props/src/prop-types/string.ts"); | |
| 3265 | - | |
| 3266 | - | |
| 3267 | -const stringArrayPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_0__.createArrayPropUtils)(_string__WEBPACK_IMPORTED_MODULE_1__.stringPropTypeUtil.key, _string__WEBPACK_IMPORTED_MODULE_1__.stringPropTypeUtil.schema); | |
| 3268 | - | |
| 3269 | -/***/ }), | |
| 3270 | - | |
| 3271 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/string.ts": | |
| 3272 | -/*!**********************************************************************!*\ | |
| 3273 | - !*** ./packages/packages/libs/editor-props/src/prop-types/string.ts ***! | |
| 3274 | - \**********************************************************************/ | |
| 3275 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3276 | - | |
| 3277 | -__webpack_require__.r(__webpack_exports__); | |
| 3278 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3279 | -/* harmony export */ stringPropTypeUtil: function() { return /* binding */ stringPropTypeUtil; } | |
| 3280 | -/* harmony export */ }); | |
| 3281 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 3282 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 3283 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 3284 | - | |
| 3285 | - | |
| 3286 | -const stringPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('string', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.string().nullable()); | |
| 3287 | - | |
| 3288 | -/***/ }), | |
| 3289 | - | |
| 3290 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/stroke.ts": | |
| 3291 | -/*!**********************************************************************!*\ | |
| 3292 | - !*** ./packages/packages/libs/editor-props/src/prop-types/stroke.ts ***! | |
| 3293 | - \**********************************************************************/ | |
| 3294 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3295 | - | |
| 3296 | -__webpack_require__.r(__webpack_exports__); | |
| 3297 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3298 | -/* harmony export */ strokePropTypeUtil: function() { return /* binding */ strokePropTypeUtil; } | |
| 3299 | -/* harmony export */ }); | |
| 3300 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 3301 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 3302 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 3303 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 3304 | - | |
| 3305 | - | |
| 3306 | - | |
| 3307 | -const strokePropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('stroke', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 3308 | - color: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 3309 | - width: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema | |
| 3310 | -})); | |
| 3311 | - | |
| 3312 | -/***/ }), | |
| 3313 | - | |
| 3314 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/svg-src.ts": | |
| 3315 | -/*!***********************************************************************!*\ | |
| 3316 | - !*** ./packages/packages/libs/editor-props/src/prop-types/svg-src.ts ***! | |
| 3317 | - \***********************************************************************/ | |
| 3318 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3319 | - | |
| 3320 | -__webpack_require__.r(__webpack_exports__); | |
| 3321 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3322 | -/* harmony export */ svgSrcPropTypeUtil: function() { return /* binding */ svgSrcPropTypeUtil; } | |
| 3323 | -/* harmony export */ }); | |
| 3324 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 3325 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 3326 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 3327 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 3328 | - | |
| 3329 | - | |
| 3330 | - | |
| 3331 | -const svgSrcValueSchema = _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 3332 | - id: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 3333 | - url: _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.null() | |
| 3334 | -}).or(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 3335 | - id: _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.null(), | |
| 3336 | - url: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema | |
| 3337 | -})).or(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 3338 | - id: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 3339 | - url: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema | |
| 3340 | -})); | |
| 3341 | -const svgSrcPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('svg-src', svgSrcValueSchema); | |
| 3342 | - | |
| 3343 | -/***/ }), | |
| 3344 | - | |
| 3345 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/time-range.ts": | |
| 3346 | -/*!**************************************************************************!*\ | |
| 3347 | - !*** ./packages/packages/libs/editor-props/src/prop-types/time-range.ts ***! | |
| 3348 | - \**************************************************************************/ | |
| 3349 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3350 | - | |
| 3351 | -__webpack_require__.r(__webpack_exports__); | |
| 3352 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3353 | -/* harmony export */ timeRangePropTypeUtil: function() { return /* binding */ timeRangePropTypeUtil; } | |
| 3354 | -/* harmony export */ }); | |
| 3355 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 3356 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 3357 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 3358 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 3359 | - | |
| 3360 | - | |
| 3361 | - | |
| 3362 | -const timeRangePropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('time-range', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 3363 | - min: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 3364 | - max: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema | |
| 3365 | -})); | |
| 3366 | - | |
| 3367 | -/***/ }), | |
| 3368 | - | |
| 3369 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/time-string.ts": | |
| 3370 | -/*!***************************************************************************!*\ | |
| 3371 | - !*** ./packages/packages/libs/editor-props/src/prop-types/time-string.ts ***! | |
| 3372 | - \***************************************************************************/ | |
| 3373 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3374 | - | |
| 3375 | -__webpack_require__.r(__webpack_exports__); | |
| 3376 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3377 | -/* harmony export */ timeStringPropTypeUtil: function() { return /* binding */ timeStringPropTypeUtil; } | |
| 3378 | -/* harmony export */ }); | |
| 3379 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 3380 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 3381 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 3382 | - | |
| 3383 | - | |
| 3384 | -const timeStringPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('time-string', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.string()); | |
| 3385 | - | |
| 3386 | -/***/ }), | |
| 3387 | - | |
| 3388 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/transform-prop-types/perspective-origin.ts": | |
| 3389 | -/*!*******************************************************************************************************!*\ | |
| 3390 | - !*** ./packages/packages/libs/editor-props/src/prop-types/transform-prop-types/perspective-origin.ts ***! | |
| 3391 | - \*******************************************************************************************************/ | |
| 3392 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3393 | - | |
| 3394 | -__webpack_require__.r(__webpack_exports__); | |
| 3395 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3396 | -/* harmony export */ perspectiveOriginPropTypeUtil: function() { return /* binding */ perspectiveOriginPropTypeUtil; } | |
| 3397 | -/* harmony export */ }); | |
| 3398 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 3399 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 3400 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 3401 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 3402 | - | |
| 3403 | - | |
| 3404 | - | |
| 3405 | -const perspectiveOriginPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('perspective-origin', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 3406 | - x: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 3407 | - y: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema | |
| 3408 | -})); | |
| 3409 | - | |
| 3410 | -/***/ }), | |
| 3411 | - | |
| 3412 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/transform-prop-types/transform-functions.ts": | |
| 3413 | -/*!********************************************************************************************************!*\ | |
| 3414 | - !*** ./packages/packages/libs/editor-props/src/prop-types/transform-prop-types/transform-functions.ts ***! | |
| 3415 | - \********************************************************************************************************/ | |
| 3416 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3417 | - | |
| 3418 | -__webpack_require__.r(__webpack_exports__); | |
| 3419 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3420 | -/* harmony export */ transformFunctionsPropTypeUtil: function() { return /* binding */ transformFunctionsPropTypeUtil; } | |
| 3421 | -/* harmony export */ }); | |
| 3422 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 3423 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 3424 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 3425 | -/* harmony import */ var _transform_functions_move_transform__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./transform-functions/move-transform */ "./packages/packages/libs/editor-props/src/prop-types/transform-prop-types/transform-functions/move-transform.ts"); | |
| 3426 | -/* harmony import */ var _transform_functions_rotate_transform__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./transform-functions/rotate-transform */ "./packages/packages/libs/editor-props/src/prop-types/transform-prop-types/transform-functions/rotate-transform.ts"); | |
| 3427 | -/* harmony import */ var _transform_functions_scale_transform__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./transform-functions/scale-transform */ "./packages/packages/libs/editor-props/src/prop-types/transform-prop-types/transform-functions/scale-transform.ts"); | |
| 3428 | -/* harmony import */ var _transform_functions_skew_transform__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./transform-functions/skew-transform */ "./packages/packages/libs/editor-props/src/prop-types/transform-prop-types/transform-functions/skew-transform.ts"); | |
| 3429 | - | |
| 3430 | - | |
| 3431 | - | |
| 3432 | - | |
| 3433 | - | |
| 3434 | - | |
| 3435 | -const filterTypes = _transform_functions_move_transform__WEBPACK_IMPORTED_MODULE_2__.moveTransformPropTypeUtil.schema.or(_transform_functions_scale_transform__WEBPACK_IMPORTED_MODULE_4__.scaleTransformPropTypeUtil.schema).or(_transform_functions_rotate_transform__WEBPACK_IMPORTED_MODULE_3__.rotateTransformPropTypeUtil.schema).or(_transform_functions_skew_transform__WEBPACK_IMPORTED_MODULE_5__.skewTransformPropTypeUtil.schema); | |
| 3436 | -const transformFunctionsPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('transform-functions', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.array(filterTypes)); | |
| 3437 | - | |
| 3438 | -/***/ }), | |
| 3439 | - | |
| 3440 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/transform-prop-types/transform-functions/move-transform.ts": | |
| 3441 | -/*!***********************************************************************************************************************!*\ | |
| 3442 | - !*** ./packages/packages/libs/editor-props/src/prop-types/transform-prop-types/transform-functions/move-transform.ts ***! | |
| 3443 | - \***********************************************************************************************************************/ | |
| 3444 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3445 | - | |
| 3446 | -__webpack_require__.r(__webpack_exports__); | |
| 3447 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3448 | -/* harmony export */ moveTransformPropTypeUtil: function() { return /* binding */ moveTransformPropTypeUtil; } | |
| 3449 | -/* harmony export */ }); | |
| 3450 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 3451 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 3452 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 3453 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 3454 | -/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../types */ "./packages/packages/libs/editor-props/src/prop-types/transform-prop-types/types.ts"); | |
| 3455 | - | |
| 3456 | - | |
| 3457 | - | |
| 3458 | - | |
| 3459 | -const moveTransformPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)(_types__WEBPACK_IMPORTED_MODULE_3__.TransformFunctionKeys.move, _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 3460 | - x: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 3461 | - y: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 3462 | - z: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema | |
| 3463 | -})); | |
| 3464 | - | |
| 3465 | -/***/ }), | |
| 3466 | - | |
| 3467 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/transform-prop-types/transform-functions/rotate-transform.ts": | |
| 3468 | -/*!*************************************************************************************************************************!*\ | |
| 3469 | - !*** ./packages/packages/libs/editor-props/src/prop-types/transform-prop-types/transform-functions/rotate-transform.ts ***! | |
| 3470 | - \*************************************************************************************************************************/ | |
| 3471 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3472 | - | |
| 3473 | -__webpack_require__.r(__webpack_exports__); | |
| 3474 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3475 | -/* harmony export */ rotateTransformPropTypeUtil: function() { return /* binding */ rotateTransformPropTypeUtil; } | |
| 3476 | -/* harmony export */ }); | |
| 3477 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 3478 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 3479 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 3480 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 3481 | -/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../types */ "./packages/packages/libs/editor-props/src/prop-types/transform-prop-types/types.ts"); | |
| 3482 | - | |
| 3483 | - | |
| 3484 | - | |
| 3485 | - | |
| 3486 | -const rotateTransformPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)(_types__WEBPACK_IMPORTED_MODULE_3__.TransformFunctionKeys.rotate, _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 3487 | - x: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 3488 | - y: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 3489 | - z: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema | |
| 3490 | -})); | |
| 3491 | - | |
| 3492 | -/***/ }), | |
| 3493 | - | |
| 3494 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/transform-prop-types/transform-functions/scale-transform.ts": | |
| 3495 | -/*!************************************************************************************************************************!*\ | |
| 3496 | - !*** ./packages/packages/libs/editor-props/src/prop-types/transform-prop-types/transform-functions/scale-transform.ts ***! | |
| 3497 | - \************************************************************************************************************************/ | |
| 3498 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3499 | - | |
| 3500 | -__webpack_require__.r(__webpack_exports__); | |
| 3501 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3502 | -/* harmony export */ scaleTransformPropTypeUtil: function() { return /* binding */ scaleTransformPropTypeUtil; } | |
| 3503 | -/* harmony export */ }); | |
| 3504 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 3505 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 3506 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 3507 | -/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../number */ "./packages/packages/libs/editor-props/src/prop-types/number.ts"); | |
| 3508 | -/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../types */ "./packages/packages/libs/editor-props/src/prop-types/transform-prop-types/types.ts"); | |
| 3509 | - | |
| 3510 | - | |
| 3511 | - | |
| 3512 | - | |
| 3513 | -const scaleTransformPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)(_types__WEBPACK_IMPORTED_MODULE_3__.TransformFunctionKeys.scale, _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 3514 | - x: _number__WEBPACK_IMPORTED_MODULE_2__.numberPropTypeUtil.schema.nullable(), | |
| 3515 | - y: _number__WEBPACK_IMPORTED_MODULE_2__.numberPropTypeUtil.schema.nullable(), | |
| 3516 | - z: _number__WEBPACK_IMPORTED_MODULE_2__.numberPropTypeUtil.schema.nullable() | |
| 3517 | -})); | |
| 3518 | - | |
| 3519 | -/***/ }), | |
| 3520 | - | |
| 3521 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/transform-prop-types/transform-functions/skew-transform.ts": | |
| 3522 | -/*!***********************************************************************************************************************!*\ | |
| 3523 | - !*** ./packages/packages/libs/editor-props/src/prop-types/transform-prop-types/transform-functions/skew-transform.ts ***! | |
| 3524 | - \***********************************************************************************************************************/ | |
| 3525 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3526 | - | |
| 3527 | -__webpack_require__.r(__webpack_exports__); | |
| 3528 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3529 | -/* harmony export */ skewTransformPropTypeUtil: function() { return /* binding */ skewTransformPropTypeUtil; } | |
| 3530 | -/* harmony export */ }); | |
| 3531 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 3532 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 3533 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 3534 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 3535 | -/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../types */ "./packages/packages/libs/editor-props/src/prop-types/transform-prop-types/types.ts"); | |
| 3536 | - | |
| 3537 | - | |
| 3538 | - | |
| 3539 | - | |
| 3540 | -const skewTransformPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)(_types__WEBPACK_IMPORTED_MODULE_3__.TransformFunctionKeys.skew, _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 3541 | - x: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 3542 | - y: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema | |
| 3543 | -})); | |
| 3544 | - | |
| 3545 | -/***/ }), | |
| 3546 | - | |
| 3547 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/transform-prop-types/transform-origin.ts": | |
| 3548 | -/*!*****************************************************************************************************!*\ | |
| 3549 | - !*** ./packages/packages/libs/editor-props/src/prop-types/transform-prop-types/transform-origin.ts ***! | |
| 3550 | - \*****************************************************************************************************/ | |
| 3551 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3552 | - | |
| 3553 | -__webpack_require__.r(__webpack_exports__); | |
| 3554 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3555 | -/* harmony export */ transformOriginPropTypeUtil: function() { return /* binding */ transformOriginPropTypeUtil; } | |
| 3556 | -/* harmony export */ }); | |
| 3557 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 3558 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 3559 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 3560 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 3561 | - | |
| 3562 | - | |
| 3563 | - | |
| 3564 | -const transformOriginPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('transform-origin', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 3565 | - x: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 3566 | - y: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 3567 | - z: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema | |
| 3568 | -})); | |
| 3569 | - | |
| 3570 | -/***/ }), | |
| 3571 | - | |
| 3572 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/transform-prop-types/transform.ts": | |
| 3573 | -/*!**********************************************************************************************!*\ | |
| 3574 | - !*** ./packages/packages/libs/editor-props/src/prop-types/transform-prop-types/transform.ts ***! | |
| 3575 | - \**********************************************************************************************/ | |
| 3576 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3577 | - | |
| 3578 | -__webpack_require__.r(__webpack_exports__); | |
| 3579 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3580 | -/* harmony export */ transformPropTypeUtil: function() { return /* binding */ transformPropTypeUtil; } | |
| 3581 | -/* harmony export */ }); | |
| 3582 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 3583 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 3584 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 3585 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 3586 | - | |
| 3587 | - | |
| 3588 | - | |
| 3589 | -const transformPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('transform', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 3590 | - 'transform-functions': _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 3591 | - 'transform-origin': _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 3592 | - perspective: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 3593 | - 'perspective-origin': _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema | |
| 3594 | -})); | |
| 3595 | - | |
| 3596 | -/***/ }), | |
| 3597 | - | |
| 3598 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/transform-prop-types/types.ts": | |
| 3599 | -/*!******************************************************************************************!*\ | |
| 3600 | - !*** ./packages/packages/libs/editor-props/src/prop-types/transform-prop-types/types.ts ***! | |
| 3601 | - \******************************************************************************************/ | |
| 3602 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3603 | - | |
| 3604 | -__webpack_require__.r(__webpack_exports__); | |
| 3605 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3606 | -/* harmony export */ TransformFunctionKeys: function() { return /* binding */ TransformFunctionKeys; } | |
| 3607 | -/* harmony export */ }); | |
| 3608 | -const TransformFunctionKeys = { | |
| 3609 | - move: 'transform-move', | |
| 3610 | - scale: 'transform-scale', | |
| 3611 | - rotate: 'transform-rotate', | |
| 3612 | - skew: 'transform-skew' | |
| 3613 | -}; | |
| 3614 | - | |
| 3615 | -/***/ }), | |
| 3616 | - | |
| 3617 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/url.ts": | |
| 3618 | -/*!*******************************************************************!*\ | |
| 3619 | - !*** ./packages/packages/libs/editor-props/src/prop-types/url.ts ***! | |
| 3620 | - \*******************************************************************/ | |
| 3621 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3622 | - | |
| 3623 | -__webpack_require__.r(__webpack_exports__); | |
| 3624 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3625 | -/* harmony export */ urlPropTypeUtil: function() { return /* binding */ urlPropTypeUtil; } | |
| 3626 | -/* harmony export */ }); | |
| 3627 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 3628 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 3629 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 3630 | - | |
| 3631 | - | |
| 3632 | -const urlPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('url', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.string().nullable()); | |
| 3633 | - | |
| 3634 | -/***/ }), | |
| 3635 | - | |
| 3636 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/utils.ts": | |
| 3637 | -/*!*********************************************************************!*\ | |
| 3638 | - !*** ./packages/packages/libs/editor-props/src/prop-types/utils.ts ***! | |
| 3639 | - \*********************************************************************/ | |
| 3640 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3641 | - | |
| 3642 | -__webpack_require__.r(__webpack_exports__); | |
| 3643 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3644 | -/* harmony export */ unknownChildrenSchema: function() { return /* binding */ unknownChildrenSchema; } | |
| 3645 | -/* harmony export */ }); | |
| 3646 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 3647 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 3648 | - | |
| 3649 | -const unknownChildrenSchema = _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.any().nullable(); | |
| 3650 | - | |
| 3651 | -/***/ }), | |
| 3652 | - | |
| 3653 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/video-attachment-id.ts": | |
| 3654 | -/*!***********************************************************************************!*\ | |
| 3655 | - !*** ./packages/packages/libs/editor-props/src/prop-types/video-attachment-id.ts ***! | |
| 3656 | - \***********************************************************************************/ | |
| 3657 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3658 | - | |
| 3659 | -__webpack_require__.r(__webpack_exports__); | |
| 3660 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3661 | -/* harmony export */ videoAttachmentIdPropType: function() { return /* binding */ videoAttachmentIdPropType; } | |
| 3662 | -/* harmony export */ }); | |
| 3663 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 3664 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 3665 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 3666 | - | |
| 3667 | - | |
| 3668 | -const videoAttachmentIdPropType = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('video-attachment-id', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.number()); | |
| 3669 | - | |
| 3670 | -/***/ }), | |
| 3671 | - | |
| 3672 | -/***/ "./packages/packages/libs/editor-props/src/prop-types/video-src.ts": | |
| 3673 | -/*!*************************************************************************!*\ | |
| 3674 | - !*** ./packages/packages/libs/editor-props/src/prop-types/video-src.ts ***! | |
| 3675 | - \*************************************************************************/ | |
| 3676 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3677 | - | |
| 3678 | -__webpack_require__.r(__webpack_exports__); | |
| 3679 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3680 | -/* harmony export */ videoSrcPropTypeUtil: function() { return /* binding */ videoSrcPropTypeUtil; } | |
| 3681 | -/* harmony export */ }); | |
| 3682 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 3683 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 3684 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 3685 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./packages/packages/libs/editor-props/src/prop-types/utils.ts"); | |
| 3686 | - | |
| 3687 | - | |
| 3688 | - | |
| 3689 | -const videoSrcPropTypeUtil = (0,_utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_1__.createPropUtils)('video-src', _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 3690 | - id: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema, | |
| 3691 | - url: _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.null() | |
| 3692 | -}).or(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 3693 | - id: _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.null(), | |
| 3694 | - url: _utils__WEBPACK_IMPORTED_MODULE_2__.unknownChildrenSchema | |
| 3695 | -}))); | |
| 3696 | - | |
| 3697 | -/***/ }), | |
| 3698 | - | |
| 3699 | -/***/ "./packages/packages/libs/editor-props/src/types.ts": | |
| 3700 | -/*!**********************************************************!*\ | |
| 3701 | - !*** ./packages/packages/libs/editor-props/src/types.ts ***! | |
| 3702 | - \**********************************************************/ | |
| 3703 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3704 | - | |
| 3705 | -__webpack_require__.r(__webpack_exports__); | |
| 3706 | - | |
| 3707 | - | |
| 3708 | -/***/ }), | |
| 3709 | - | |
| 3710 | -/***/ "./packages/packages/libs/editor-props/src/utils/adjust-llm-prop-value-schema.ts": | |
| 3711 | -/*!***************************************************************************************!*\ | |
| 3712 | - !*** ./packages/packages/libs/editor-props/src/utils/adjust-llm-prop-value-schema.ts ***! | |
| 3713 | - \***************************************************************************************/ | |
| 3714 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3715 | - | |
| 3716 | -__webpack_require__.r(__webpack_exports__); | |
| 3717 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3718 | -/* harmony export */ adjustLlmPropValueSchema: function() { return /* binding */ adjustLlmPropValueSchema; } | |
| 3719 | -/* harmony export */ }); | |
| 3720 | -/* harmony import */ var _prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../prop-types */ "./packages/packages/libs/editor-props/src/prop-types/index.ts"); | |
| 3721 | - | |
| 3722 | -const ensureNotNull = (v, fallback) => v === null ? fallback : v; | |
| 3723 | -const defaultOptions = { | |
| 3724 | - transformers: {} | |
| 3725 | -}; | |
| 3726 | -const adjustLlmPropValueSchema = (value, { | |
| 3727 | - transformers = {}, | |
| 3728 | - forceKey = undefined | |
| 3729 | -} = defaultOptions) => { | |
| 3730 | - const clone = structuredClone(value); | |
| 3731 | - if (typeof clone !== 'object' || clone === null) { | |
| 3732 | - return null; | |
| 3733 | - } | |
| 3734 | - // Check for transformable types | |
| 3735 | - if (Array.isArray(clone)) { | |
| 3736 | - return clone.map(item => adjustLlmPropValueSchema(item, { | |
| 3737 | - forceKey, | |
| 3738 | - transformers | |
| 3739 | - })); | |
| 3740 | - } | |
| 3741 | - const transformablePropValue = clone; | |
| 3742 | - if ('$intention' in transformablePropValue) { | |
| 3743 | - delete transformablePropValue.$intention; | |
| 3744 | - } | |
| 3745 | - if (forceKey) { | |
| 3746 | - transformablePropValue.$$type = forceKey; | |
| 3747 | - } | |
| 3748 | - | |
| 3749 | - // fix by type - Size is the only case where we have a non-valid structure | |
| 3750 | - switch (transformablePropValue.$$type) { | |
| 3751 | - case 'size': | |
| 3752 | - { | |
| 3753 | - const { | |
| 3754 | - value: rawSizePropValue | |
| 3755 | - } = transformablePropValue; | |
| 3756 | - const unit = typeof rawSizePropValue.unit === 'string' ? rawSizePropValue.unit : ensureNotNull(_prop_types__WEBPACK_IMPORTED_MODULE_0__.stringPropTypeUtil.extract(rawSizePropValue.unit), 'px'); | |
| 3757 | - const size = typeof rawSizePropValue.size === 'string' || typeof rawSizePropValue.size === 'number' ? rawSizePropValue.size : ensureNotNull(_prop_types__WEBPACK_IMPORTED_MODULE_0__.stringPropTypeUtil.extract(rawSizePropValue.size), _prop_types__WEBPACK_IMPORTED_MODULE_0__.numberPropTypeUtil.extract(rawSizePropValue.size)); | |
| 3758 | - return { | |
| 3759 | - $$type: 'size', | |
| 3760 | - value: { | |
| 3761 | - unit, | |
| 3762 | - size | |
| 3763 | - } | |
| 3764 | - }; | |
| 3765 | - } | |
| 3766 | - case 'html-v3': | |
| 3767 | - { | |
| 3768 | - const { | |
| 3769 | - value: rawHtmlV3PropValue | |
| 3770 | - } = transformablePropValue; | |
| 3771 | - return { | |
| 3772 | - $$type: 'html-v3', | |
| 3773 | - value: { | |
| 3774 | - ...rawHtmlV3PropValue, | |
| 3775 | - children: Array.isArray(rawHtmlV3PropValue.children) ? rawHtmlV3PropValue.children : [] | |
| 3776 | - } | |
| 3777 | - }; | |
| 3778 | - } | |
| 3779 | - default: | |
| 3780 | - const transformer = transformers?.[transformablePropValue.$$type]; | |
| 3781 | - if (transformer) { | |
| 3782 | - return transformer(transformablePropValue.value); | |
| 3783 | - } | |
| 3784 | - } | |
| 3785 | - if (typeof transformablePropValue.value === 'object') { | |
| 3786 | - if (Array.isArray(transformablePropValue.value)) { | |
| 3787 | - transformablePropValue.value = adjustLlmPropValueSchema(transformablePropValue.value, { | |
| 3788 | - transformers | |
| 3789 | - }); | |
| 3790 | - } else { | |
| 3791 | - const { | |
| 3792 | - value: objectValue | |
| 3793 | - } = transformablePropValue; | |
| 3794 | - const clonedObject = clone; | |
| 3795 | - clonedObject.value = {}; // Record< string, PropValue >; | |
| 3796 | - Object.entries(objectValue).forEach(([key, childProp]) => { | |
| 3797 | - clonedObject.value[key] = adjustLlmPropValueSchema(childProp, { | |
| 3798 | - transformers | |
| 3799 | - }); | |
| 3800 | - }); | |
| 3801 | - } | |
| 3802 | - } | |
| 3803 | - return clone; | |
| 3804 | -}; | |
| 3805 | - | |
| 3806 | -/***/ }), | |
| 3807 | - | |
| 3808 | -/***/ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts": | |
| 3809 | -/*!****************************************************************************!*\ | |
| 3810 | - !*** ./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts ***! | |
| 3811 | - \****************************************************************************/ | |
| 3812 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3813 | - | |
| 3814 | -__webpack_require__.r(__webpack_exports__); | |
| 3815 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3816 | -/* harmony export */ createArrayPropUtils: function() { return /* binding */ createArrayPropUtils; }, | |
| 3817 | -/* harmony export */ createPropUtils: function() { return /* binding */ createPropUtils; }, | |
| 3818 | -/* harmony export */ getPropSchemaFromCache: function() { return /* binding */ getPropSchemaFromCache; } | |
| 3819 | -/* harmony export */ }); | |
| 3820 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 3821 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 3822 | - | |
| 3823 | -const SCHEMA_CACHE = new Map(); | |
| 3824 | -/** | |
| 3825 | - * Usage example: | |
| 3826 | - * | |
| 3827 | - * ```ts | |
| 3828 | - * const elementsPropUtils = createPropUtils( 'elements', z.array( z.string() ) ); | |
| 3829 | - * | |
| 3830 | - * elementsPropUtils.isValid( element.props?.children ); | |
| 3831 | - * elementsPropUtils.create( [ 'a', 'b' ] ); | |
| 3832 | - * elementsPropUtils.create( ( prev = [] ) => [ ...prev, 'c' ], { base: element.props?.children } ); | |
| 3833 | - * elementsPropUtils.create( ( prev = [] ) => [ ...prev, 'c' ], { disabled: true } ); | |
| 3834 | - * elementsPropUtils.extract( element.props?.children ); | |
| 3835 | - * | |
| 3836 | - * ``` | |
| 3837 | - */ | |
| 3838 | - | |
| 3839 | -function getPropSchemaFromCache(key) { | |
| 3840 | - return SCHEMA_CACHE.get(key); | |
| 3841 | -} | |
| 3842 | -function createPropUtils(key, valueSchema) { | |
| 3843 | - const schema = _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.strictObject({ | |
| 3844 | - $$type: _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.literal(key), | |
| 3845 | - value: valueSchema, | |
| 3846 | - disabled: _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.boolean().optional() | |
| 3847 | - }); | |
| 3848 | - function isValid(prop) { | |
| 3849 | - return schema.safeParse(prop).success; | |
| 3850 | - } | |
| 3851 | - function create(value, createOptions) { | |
| 3852 | - const fn = typeof value === 'function' ? value : () => value; | |
| 3853 | - const { | |
| 3854 | - base, | |
| 3855 | - disabled | |
| 3856 | - } = createOptions || {}; | |
| 3857 | - if (!base) { | |
| 3858 | - return { | |
| 3859 | - $$type: key, | |
| 3860 | - value: fn(), | |
| 3861 | - ...(disabled && { | |
| 3862 | - disabled | |
| 3863 | - }) | |
| 3864 | - }; | |
| 3865 | - } | |
| 3866 | - if (!isValid(base)) { | |
| 3867 | - throw new Error(`Cannot create prop based on invalid value: ${JSON.stringify(base)}`); | |
| 3868 | - } | |
| 3869 | - return { | |
| 3870 | - $$type: key, | |
| 3871 | - value: fn(base.value), | |
| 3872 | - ...(disabled && { | |
| 3873 | - disabled | |
| 3874 | - }) | |
| 3875 | - }; | |
| 3876 | - } | |
| 3877 | - function extract(prop) { | |
| 3878 | - if (!isValid(prop)) { | |
| 3879 | - return null; | |
| 3880 | - } | |
| 3881 | - return prop.value; | |
| 3882 | - } | |
| 3883 | - const propUtil = { | |
| 3884 | - extract, | |
| 3885 | - isValid, | |
| 3886 | - create, | |
| 3887 | - schema, | |
| 3888 | - key: key | |
| 3889 | - }; | |
| 3890 | - SCHEMA_CACHE.set(key, propUtil); | |
| 3891 | - return propUtil; | |
| 3892 | -} | |
| 3893 | -function createArrayPropUtils(key, valueSchema, overrideKey) { | |
| 3894 | - return createPropUtils(overrideKey || `${key}-array`, _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.array(valueSchema)); | |
| 3895 | -} | |
| 3896 | - | |
| 3897 | -/***/ }), | |
| 3898 | - | |
| 3899 | -/***/ "./packages/packages/libs/editor-props/src/utils/filter-empty-values.ts": | |
| 3900 | -/*!******************************************************************************!*\ | |
| 3901 | - !*** ./packages/packages/libs/editor-props/src/utils/filter-empty-values.ts ***! | |
| 3902 | - \******************************************************************************/ | |
| 3903 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3904 | - | |
| 3905 | -__webpack_require__.r(__webpack_exports__); | |
| 3906 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3907 | -/* harmony export */ filterEmptyValues: function() { return /* binding */ filterEmptyValues; }, | |
| 3908 | -/* harmony export */ isEmpty: function() { return /* binding */ isEmpty; } | |
| 3909 | -/* harmony export */ }); | |
| 3910 | -/* harmony import */ var _utils_is_transformable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/is-transformable */ "./packages/packages/libs/editor-props/src/utils/is-transformable.ts"); | |
| 3911 | - | |
| 3912 | -const filterEmptyValues = value => { | |
| 3913 | - if (isEmpty(value)) { | |
| 3914 | - return null; | |
| 3915 | - } | |
| 3916 | - if (Array.isArray(value)) { | |
| 3917 | - return value.map(filterEmptyValues).filter(item => !isEmpty(item)); | |
| 3918 | - } | |
| 3919 | - if (typeof value === 'object') { | |
| 3920 | - return Object.fromEntries(Object.entries(value).map(([key, val]) => [key, filterEmptyValues(val)]).filter(([, val]) => !isEmpty(val))); | |
| 3921 | - } | |
| 3922 | - return value; | |
| 3923 | -}; | |
| 3924 | -const isEmpty = value => { | |
| 3925 | - if (value && (0,_utils_is_transformable__WEBPACK_IMPORTED_MODULE_0__.isTransformable)(value)) { | |
| 3926 | - return isEmpty(value.value); | |
| 3927 | - } | |
| 3928 | - return isNullish(value) || isNullishArray(value) || isNullishObject(value); | |
| 3929 | -}; | |
| 3930 | -const isNullish = value => value === null || value === undefined || value === ''; | |
| 3931 | -const isNullishArray = value => Array.isArray(value) && value.every(isEmpty); | |
| 3932 | -const isNullishObject = value => { | |
| 3933 | - return typeof value === 'object' && isNullishArray(Object.values(value)); | |
| 3934 | -}; | |
| 3935 | - | |
| 3936 | -/***/ }), | |
| 3937 | - | |
| 3938 | -/***/ "./packages/packages/libs/editor-props/src/utils/is-overridable.ts": | |
| 3939 | -/*!*************************************************************************!*\ | |
| 3940 | - !*** ./packages/packages/libs/editor-props/src/utils/is-overridable.ts ***! | |
| 3941 | - \*************************************************************************/ | |
| 3942 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3943 | - | |
| 3944 | -__webpack_require__.r(__webpack_exports__); | |
| 3945 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3946 | -/* harmony export */ isOverridable: function() { return /* binding */ isOverridable; }, | |
| 3947 | -/* harmony export */ rewrapOverridableValue: function() { return /* binding */ rewrapOverridableValue; } | |
| 3948 | -/* harmony export */ }); | |
| 3949 | -/* harmony import */ var _is_transformable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-transformable */ "./packages/packages/libs/editor-props/src/utils/is-transformable.ts"); | |
| 3950 | - | |
| 3951 | -function isOverridable(value) { | |
| 3952 | - return (0,_is_transformable__WEBPACK_IMPORTED_MODULE_0__.isTransformable)(value) && value.$$type === 'overridable'; | |
| 3953 | -} | |
| 3954 | -function rewrapOverridableValue(existing, newInner) { | |
| 3955 | - return { | |
| 3956 | - ...existing, | |
| 3957 | - value: { | |
| 3958 | - ...existing.value, | |
| 3959 | - origin_value: newInner | |
| 3960 | - } | |
| 3961 | - }; | |
| 3962 | -} | |
| 3963 | - | |
| 3964 | -/***/ }), | |
| 3965 | - | |
| 3966 | -/***/ "./packages/packages/libs/editor-props/src/utils/is-transformable.ts": | |
| 3967 | -/*!***************************************************************************!*\ | |
| 3968 | - !*** ./packages/packages/libs/editor-props/src/utils/is-transformable.ts ***! | |
| 3969 | - \***************************************************************************/ | |
| 3970 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3971 | - | |
| 3972 | -__webpack_require__.r(__webpack_exports__); | |
| 3973 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3974 | -/* harmony export */ isTransformable: function() { return /* binding */ isTransformable; } | |
| 3975 | -/* harmony export */ }); | |
| 3976 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema"); | |
| 3977 | -/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_0__); | |
| 3978 | - | |
| 3979 | -const transformableSchema = _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.object({ | |
| 3980 | - $$type: _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.string(), | |
| 3981 | - value: _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.any(), | |
| 3982 | - disabled: _elementor_schema__WEBPACK_IMPORTED_MODULE_0__.z.boolean().optional() | |
| 3983 | -}); | |
| 3984 | -const isTransformable = value => { | |
| 3985 | - return transformableSchema.safeParse(value).success; | |
| 3986 | -}; | |
| 3987 | - | |
| 3988 | -/***/ }), | |
| 3989 | - | |
| 3990 | -/***/ "./packages/packages/libs/editor-props/src/utils/llm-schema-to-props.ts": | |
| 3991 | -/*!******************************************************************************!*\ | |
| 3992 | - !*** ./packages/packages/libs/editor-props/src/utils/llm-schema-to-props.ts ***! | |
| 3993 | - \******************************************************************************/ | |
| 3994 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3995 | - | |
| 3996 | -__webpack_require__.r(__webpack_exports__); | |
| 3997 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3998 | -/* harmony export */ jsonSchemaToPropType: function() { return /* binding */ jsonSchemaToPropType; }, | |
| 3999 | -/* harmony export */ jsonSchemaToPropsSchema: function() { return /* binding */ jsonSchemaToPropsSchema; } | |
| 4000 | -/* harmony export */ }); | |
| 4001 | -function jsonSchemaToPropType(schema, key = schema.key) { | |
| 4002 | - const meta = {}; | |
| 4003 | - if (schema.description) { | |
| 4004 | - meta.description = schema.description; | |
| 4005 | - } | |
| 4006 | - | |
| 4007 | - // Handle union types (anyOf) | |
| 4008 | - if (schema.anyOf && Array.isArray(schema.anyOf)) { | |
| 4009 | - return convertJsonSchemaToUnionPropType(schema, meta); | |
| 4010 | - } | |
| 4011 | - | |
| 4012 | - // Handle object types | |
| 4013 | - if (schema.type === 'object' && schema.properties) { | |
| 4014 | - return convertJsonSchemaToObjectPropType(schema, meta, key); | |
| 4015 | - } | |
| 4016 | - | |
| 4017 | - // Handle array types | |
| 4018 | - if (schema.type === 'array' && schema.items) { | |
| 4019 | - return convertJsonSchemaToArrayPropType(schema, meta, key); | |
| 4020 | - } | |
| 4021 | - | |
| 4022 | - // Handle plain types (string, number, boolean) | |
| 4023 | - return convertJsonSchemaToPlainPropType(schema, meta, key); | |
| 4024 | -} | |
| 4025 | -function convertJsonSchemaToPlainPropType(schema, meta, key = schema.key) { | |
| 4026 | - const settings = {}; | |
| 4027 | - | |
| 4028 | - // Determine the key based on type | |
| 4029 | - let propKey = key || 'string'; | |
| 4030 | - if (schema.type === 'number') { | |
| 4031 | - propKey = 'number'; | |
| 4032 | - } else if (schema.type === 'boolean') { | |
| 4033 | - propKey = 'boolean'; | |
| 4034 | - } else if (schema.type === 'string') { | |
| 4035 | - propKey = 'string'; | |
| 4036 | - } | |
| 4037 | - | |
| 4038 | - // Handle enum values | |
| 4039 | - if (Array.isArray(schema.enum)) { | |
| 4040 | - settings.enum = schema.enum; | |
| 4041 | - } | |
| 4042 | - return { | |
| 4043 | - kind: 'plain', | |
| 4044 | - key: propKey, | |
| 4045 | - settings, | |
| 4046 | - meta | |
| 4047 | - }; | |
| 4048 | -} | |
| 4049 | - | |
| 4050 | -/** | |
| 4051 | - * Converts a JSON Schema anyOf to a union PropType | |
| 4052 | - * @param schema | |
| 4053 | - * @param meta | |
| 4054 | - */ | |
| 4055 | -function convertJsonSchemaToUnionPropType(schema, meta) { | |
| 4056 | - const propTypes = {}; | |
| 4057 | - if (!schema.anyOf || !Array.isArray(schema.anyOf)) { | |
| 4058 | - throw new Error('Invalid anyOf schema'); | |
| 4059 | - } | |
| 4060 | - | |
| 4061 | - // Process each variant in the anyOf array | |
| 4062 | - for (const variantSchema of schema.anyOf) { | |
| 4063 | - // Each variant should be an object with $$type and value properties | |
| 4064 | - if (variantSchema.type === 'object' && variantSchema.properties && variantSchema.properties.$$type && variantSchema.properties.value) { | |
| 4065 | - const typeProperty = variantSchema.properties.$$type; | |
| 4066 | - | |
| 4067 | - // Extract the type key from the enum | |
| 4068 | - let typeKey; | |
| 4069 | - if (typeProperty.enum && Array.isArray(typeProperty.enum) && typeProperty.enum.length > 0) { | |
| 4070 | - typeKey = typeProperty.enum[0]; | |
| 4071 | - } else { | |
| 4072 | - continue; | |
| 4073 | - } | |
| 4074 | - | |
| 4075 | - // Convert the value schema to a PropType | |
| 4076 | - const valuePropType = convertJsonSchemaToPropType(variantSchema.properties.value); | |
| 4077 | - propTypes[typeKey] = valuePropType; | |
| 4078 | - } | |
| 4079 | - } | |
| 4080 | - return { | |
| 4081 | - kind: 'union', | |
| 4082 | - prop_types: propTypes, | |
| 4083 | - settings: {}, | |
| 4084 | - meta | |
| 4085 | - }; | |
| 4086 | -} | |
| 4087 | -function convertJsonSchemaToObjectPropType(schema, meta, key = schema.key) { | |
| 4088 | - const shape = {}; | |
| 4089 | - if (!schema.properties) { | |
| 4090 | - return { | |
| 4091 | - kind: 'object', | |
| 4092 | - key, | |
| 4093 | - shape: {}, | |
| 4094 | - settings: {}, | |
| 4095 | - meta | |
| 4096 | - }; | |
| 4097 | - } | |
| 4098 | - const requiredFields = Array.isArray(schema.required) ? schema.required : []; | |
| 4099 | - | |
| 4100 | - // Convert each property | |
| 4101 | - for (const [propKey, propSchema] of Object.entries(schema.properties)) { | |
| 4102 | - const subPropType = convertJsonSchemaToPropType(propSchema, key); | |
| 4103 | - | |
| 4104 | - // Mark as required if it's in the required array | |
| 4105 | - if (requiredFields.includes(propKey)) { | |
| 4106 | - subPropType.settings = { | |
| 4107 | - ...subPropType.settings, | |
| 4108 | - required: true | |
| 4109 | - }; | |
| 4110 | - } | |
| 4111 | - shape[propKey] = subPropType; | |
| 4112 | - } | |
| 4113 | - return { | |
| 4114 | - kind: 'object', | |
| 4115 | - key: key || 'object', | |
| 4116 | - shape, | |
| 4117 | - settings: {}, | |
| 4118 | - meta | |
| 4119 | - }; | |
| 4120 | -} | |
| 4121 | -function convertJsonSchemaToArrayPropType(schema, meta, key = schema.key) { | |
| 4122 | - if (!schema.items) { | |
| 4123 | - throw new Error('Array schema must have items property'); | |
| 4124 | - } | |
| 4125 | - const itemPropType = convertJsonSchemaToPropType(schema.items); | |
| 4126 | - return { | |
| 4127 | - kind: 'array', | |
| 4128 | - key: key || 'array', | |
| 4129 | - item_prop_type: itemPropType, | |
| 4130 | - settings: {}, | |
| 4131 | - meta | |
| 4132 | - }; | |
| 4133 | -} | |
| 4134 | -function convertJsonSchemaToPropType(schema, key) { | |
| 4135 | - return jsonSchemaToPropType(schema, key); | |
| 4136 | -} | |
| 4137 | - | |
| 4138 | -/** | |
| 4139 | - * Converts a complete JSON Schema object back to a PropsSchema | |
| 4140 | - * | |
| 4141 | - * @param jsonSchema The JSON Schema to convert | |
| 4142 | - */ | |
| 4143 | -function jsonSchemaToPropsSchema(jsonSchema) { | |
| 4144 | - const propsSchema = {}; | |
| 4145 | - if (jsonSchema.type !== 'object' || !jsonSchema.properties) { | |
| 4146 | - throw new Error('Root schema must be an object with properties'); | |
| 4147 | - } | |
| 4148 | - for (const [key, propSchema] of Object.entries(jsonSchema.properties)) { | |
| 4149 | - propsSchema[key] = convertJsonSchemaToPropType(propSchema, key); | |
| 4150 | - } | |
| 4151 | - return propsSchema; | |
| 4152 | -} | |
| 4153 | - | |
| 4154 | -/***/ }), | |
| 4155 | - | |
| 4156 | -/***/ "./packages/packages/libs/editor-props/src/utils/merge-props.ts": | |
| 4157 | -/*!**********************************************************************!*\ | |
| 4158 | - !*** ./packages/packages/libs/editor-props/src/utils/merge-props.ts ***! | |
| 4159 | - \**********************************************************************/ | |
| 4160 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 4161 | - | |
| 4162 | -__webpack_require__.r(__webpack_exports__); | |
| 4163 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 4164 | -/* harmony export */ mergeProps: function() { return /* binding */ mergeProps; } | |
| 4165 | -/* harmony export */ }); | |
| 4166 | -function mergeProps(current, updates) { | |
| 4167 | - // edge case, the server returns an array instead of an object when empty props because of PHP array / object conversion | |
| 4168 | - let props = {}; | |
| 4169 | - if (!Array.isArray(current)) { | |
| 4170 | - props = structuredClone(current); | |
| 4171 | - } | |
| 4172 | - Object.entries(updates).forEach(([key, value]) => { | |
| 4173 | - if (value === null || value === undefined) { | |
| 4174 | - // eslint-disable-next-line @typescript-eslint/no-dynamic-delete | |
| 4175 | - delete props[key]; | |
| 4176 | - } else { | |
| 4177 | - props[key] = value; | |
| 4178 | - } | |
| 4179 | - }); | |
| 4180 | - return props; | |
| 4181 | -} | |
| 4182 | - | |
| 4183 | -/***/ }), | |
| 4184 | - | |
| 4185 | -/***/ "./packages/packages/libs/editor-props/src/utils/parse-html-children.ts": | |
| 4186 | -/*!******************************************************************************!*\ | |
| 4187 | - !*** ./packages/packages/libs/editor-props/src/utils/parse-html-children.ts ***! | |
| 4188 | - \******************************************************************************/ | |
| 4189 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 4190 | - | |
| 4191 | -__webpack_require__.r(__webpack_exports__); | |
| 4192 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 4193 | -/* harmony export */ parseHtmlChildren: function() { return /* binding */ parseHtmlChildren; } | |
| 4194 | -/* harmony export */ }); | |
| 4195 | -const INLINE_ELEMENTS = new Set(['span', 'b', 'strong', 'i', 'em', 'u', 'a', 'del', 'sup', 'sub', 's']); | |
| 4196 | -function generateElementId() { | |
| 4197 | - const timestamp = Date.now().toString(36); | |
| 4198 | - const randomPart = Math.random().toString(36).substring(2, 9); | |
| 4199 | - return `e-${timestamp}-${randomPart}`; | |
| 4200 | -} | |
| 4201 | -function traverseChildren(node) { | |
| 4202 | - const result = []; | |
| 4203 | - for (const child of Array.from(node.children)) { | |
| 4204 | - const tagName = child.tagName.toLowerCase(); | |
| 4205 | - if (!INLINE_ELEMENTS.has(tagName)) { | |
| 4206 | - result.push(...traverseChildren(child)); | |
| 4207 | - continue; | |
| 4208 | - } | |
| 4209 | - let id = child.getAttribute('id'); | |
| 4210 | - if (!id) { | |
| 4211 | - id = generateElementId(); | |
| 4212 | - child.setAttribute('id', id); | |
| 4213 | - } | |
| 4214 | - const childElement = { | |
| 4215 | - id, | |
| 4216 | - type: tagName | |
| 4217 | - }; | |
| 4218 | - const textContent = child.textContent?.trim(); | |
| 4219 | - if (textContent) { | |
| 4220 | - childElement.content = textContent; | |
| 4221 | - } | |
| 4222 | - const nestedChildren = traverseChildren(child); | |
| 4223 | - if (nestedChildren.length > 0) { | |
| 4224 | - childElement.children = nestedChildren; | |
| 4225 | - } | |
| 4226 | - result.push(childElement); | |
| 4227 | - } | |
| 4228 | - return result; | |
| 4229 | -} | |
| 4230 | -function parseHtmlChildren(html) { | |
| 4231 | - if (!html) { | |
| 4232 | - return { | |
| 4233 | - content: html, | |
| 4234 | - children: [] | |
| 4235 | - }; | |
| 4236 | - } | |
| 4237 | - const parser = new DOMParser(); | |
| 4238 | - const doc = parser.parseFromString(`<body>${html}</body>`, 'text/html'); | |
| 4239 | - const parserError = doc.querySelector('parsererror'); | |
| 4240 | - if (parserError) { | |
| 4241 | - // eslint-disable-next-line no-console | |
| 4242 | - console.warn('HTML parsing error, returning original content:', parserError.textContent); | |
| 4243 | - return { | |
| 4244 | - content: html, | |
| 4245 | - children: [] | |
| 4246 | - }; | |
| 4247 | - } | |
| 4248 | - const body = doc.body; | |
| 4249 | - const children = traverseChildren(body); | |
| 4250 | - return { | |
| 4251 | - content: body.innerHTML, | |
| 4252 | - children | |
| 4253 | - }; | |
| 4254 | -} | |
| 4255 | - | |
| 4256 | -/***/ }), | |
| 4257 | - | |
| 4258 | -/***/ "./packages/packages/libs/editor-props/src/utils/prop-dependency-utils.ts": | |
| 4259 | -/*!********************************************************************************!*\ | |
| 4260 | - !*** ./packages/packages/libs/editor-props/src/utils/prop-dependency-utils.ts ***! | |
| 4261 | - \********************************************************************************/ | |
| 4262 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 4263 | - | |
| 4264 | -__webpack_require__.r(__webpack_exports__); | |
| 4265 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 4266 | -/* harmony export */ evaluateTerm: function() { return /* binding */ evaluateTerm; }, | |
| 4267 | -/* harmony export */ extractValue: function() { return /* binding */ extractValue; }, | |
| 4268 | -/* harmony export */ isDependency: function() { return /* binding */ isDependency; }, | |
| 4269 | -/* harmony export */ isDependencyMet: function() { return /* binding */ isDependencyMet; } | |
| 4270 | -/* harmony export */ }); | |
| 4271 | -/* harmony import */ var _is_overridable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-overridable */ "./packages/packages/libs/editor-props/src/utils/is-overridable.ts"); | |
| 4272 | -/* harmony import */ var _is_transformable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-transformable */ "./packages/packages/libs/editor-props/src/utils/is-transformable.ts"); | |
| 4273 | - | |
| 4274 | - | |
| 4275 | -function isDependencyMet(dependency, values) { | |
| 4276 | - if (!dependency?.terms.length) { | |
| 4277 | - return { | |
| 4278 | - isMet: true | |
| 4279 | - }; | |
| 4280 | - } | |
| 4281 | - const { | |
| 4282 | - relation, | |
| 4283 | - terms | |
| 4284 | - } = dependency; | |
| 4285 | - const method = getRelationMethod(relation); | |
| 4286 | - const failingDependencies = []; | |
| 4287 | - const isMet = terms[method](term => { | |
| 4288 | - const isNestedDependency = isDependency(term); | |
| 4289 | - const result = isNestedDependency ? isDependencyMet(term, values).isMet : evaluateTerm(term, extractValue(term.path, values, term.nestedPath)?.value); | |
| 4290 | - if (!result) { | |
| 4291 | - failingDependencies.push(term); | |
| 4292 | - } | |
| 4293 | - return result; | |
| 4294 | - }); | |
| 4295 | - return { | |
| 4296 | - isMet, | |
| 4297 | - failingDependencies | |
| 4298 | - }; | |
| 4299 | -} | |
| 4300 | -function evaluateTerm(term, actualValue) { | |
| 4301 | - const { | |
| 4302 | - value: valueToCompare, | |
| 4303 | - operator | |
| 4304 | - } = term; | |
| 4305 | - switch (operator) { | |
| 4306 | - case 'eq': | |
| 4307 | - case 'ne': | |
| 4308 | - return actualValue === valueToCompare === ('eq' === operator); | |
| 4309 | - case 'gt': | |
| 4310 | - case 'lte': | |
| 4311 | - if (!isNumber(actualValue) || !isNumber(valueToCompare)) { | |
| 4312 | - return false; | |
| 4313 | - } | |
| 4314 | - return Number(actualValue) > Number(valueToCompare) === ('gt' === operator); | |
| 4315 | - case 'lt': | |
| 4316 | - case 'gte': | |
| 4317 | - if (!isNumber(actualValue) || !isNumber(valueToCompare)) { | |
| 4318 | - return false; | |
| 4319 | - } | |
| 4320 | - return Number(actualValue) < Number(valueToCompare) === ('lt' === operator); | |
| 4321 | - case 'in': | |
| 4322 | - case 'nin': | |
| 4323 | - if (!Array.isArray(valueToCompare)) { | |
| 4324 | - return false; | |
| 4325 | - } | |
| 4326 | - return valueToCompare.includes(actualValue) === ('in' === operator); | |
| 4327 | - case 'contains': | |
| 4328 | - case 'ncontains': | |
| 4329 | - if (('string' !== typeof actualValue || 'string' !== typeof valueToCompare) && !Array.isArray(actualValue)) { | |
| 4330 | - return false; | |
| 4331 | - } | |
| 4332 | - const transformedValue = Array.isArray(actualValue) ? actualValue.map(item => (0,_is_transformable__WEBPACK_IMPORTED_MODULE_1__.isTransformable)(item) ? item.value : item) : actualValue; | |
| 4333 | - return 'contains' === operator === transformedValue.includes(valueToCompare); | |
| 4334 | - case 'exists': | |
| 4335 | - case 'not_exist': | |
| 4336 | - const evaluation = !!actualValue || 0 === actualValue || false === actualValue; | |
| 4337 | - return 'exists' === operator === evaluation; | |
| 4338 | - default: | |
| 4339 | - return true; | |
| 4340 | - } | |
| 4341 | -} | |
| 4342 | -function isNumber(value) { | |
| 4343 | - return typeof value === 'number' && !isNaN(value); | |
| 4344 | -} | |
| 4345 | -function getRelationMethod(relation) { | |
| 4346 | - switch (relation) { | |
| 4347 | - case 'or': | |
| 4348 | - return 'some'; | |
| 4349 | - case 'and': | |
| 4350 | - return 'every'; | |
| 4351 | - default: | |
| 4352 | - throw new Error(`Relation not supported ${relation}`); | |
| 4353 | - } | |
| 4354 | -} | |
| 4355 | -function extractValue(path, elementValues, nestedPath = [], options = {}) { | |
| 4356 | - const { | |
| 4357 | - unwrapOverridableLeaf = true | |
| 4358 | - } = options; | |
| 4359 | - const extractedValue = path.reduce((acc, key, index) => { | |
| 4360 | - const value = acc?.[key]; | |
| 4361 | - if (index === path.length - 1) { | |
| 4362 | - return value; | |
| 4363 | - } | |
| 4364 | - if ((0,_is_overridable__WEBPACK_IMPORTED_MODULE_0__.isOverridable)(value)) { | |
| 4365 | - const inner = value.value.origin_value; | |
| 4366 | - return (0,_is_transformable__WEBPACK_IMPORTED_MODULE_1__.isTransformable)(inner) ? inner.value ?? null : inner; | |
| 4367 | - } | |
| 4368 | - if ((0,_is_transformable__WEBPACK_IMPORTED_MODULE_1__.isTransformable)(value)) { | |
| 4369 | - return value.value ?? null; | |
| 4370 | - } | |
| 4371 | - return value; | |
| 4372 | - }, elementValues); | |
| 4373 | - let resolved = extractedValue; | |
| 4374 | - if (unwrapOverridableLeaf && resolved && (0,_is_overridable__WEBPACK_IMPORTED_MODULE_0__.isOverridable)(resolved)) { | |
| 4375 | - resolved = resolved.value.origin_value ?? null; | |
| 4376 | - } | |
| 4377 | - if (!nestedPath?.length) { | |
| 4378 | - return resolved; | |
| 4379 | - } | |
| 4380 | - const nestedValue = nestedPath.reduce((acc, key) => acc?.[key], resolved?.value); | |
| 4381 | - return { | |
| 4382 | - $$type: 'unknown', | |
| 4383 | - value: nestedValue | |
| 4384 | - }; | |
| 4385 | -} | |
| 4386 | -function isDependency(term) { | |
| 4387 | - return 'terms' in term; | |
| 4388 | -} | |
| 4389 | - | |
| 4390 | -/***/ }), | |
| 4391 | - | |
| 4392 | -/***/ "./packages/packages/libs/editor-props/src/utils/props-to-llm-schema.ts": | |
| 4393 | -/*!******************************************************************************!*\ | |
| 4394 | - !*** ./packages/packages/libs/editor-props/src/utils/props-to-llm-schema.ts ***! | |
| 4395 | - \******************************************************************************/ | |
| 4396 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 4397 | - | |
| 4398 | -__webpack_require__.r(__webpack_exports__); | |
| 4399 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 4400 | -/* harmony export */ configurableKeys: function() { return /* binding */ configurableKeys; }, | |
| 4401 | -/* harmony export */ enrichWithIntention: function() { return /* binding */ enrichWithIntention; }, | |
| 4402 | -/* harmony export */ isPropKeyConfigurable: function() { return /* binding */ isPropKeyConfigurable; }, | |
| 4403 | -/* harmony export */ nonConfigurablePropKeys: function() { return /* binding */ nonConfigurablePropKeys; }, | |
| 4404 | -/* harmony export */ propTypeToJsonSchema: function() { return /* binding */ propTypeToJsonSchema; }, | |
| 4405 | -/* harmony export */ removeIntention: function() { return /* binding */ removeIntention; }, | |
| 4406 | -/* harmony export */ setDynamicTagNamesResolver: function() { return /* binding */ setDynamicTagNamesResolver; } | |
| 4407 | -/* harmony export */ }); | |
| 4408 | -const DYNAMIC_PROP_TYPE_KEY = 'dynamic'; | |
| 4409 | -const OVERRIDABLE_PROP_TYPE_KEY = 'overridable'; | |
| 4410 | -// Host (editor-canvas) injects a resolver that maps a prop's accepted categories to the names of the | |
| 4411 | -// dynamic tags allowed for it. Keeping it injectable preserves this lib's purity: without a host the | |
| 4412 | -// `name` field stays an open string instead of an enum. | |
| 4413 | -let dynamicTagNamesResolver = null; | |
| 4414 | -function setDynamicTagNamesResolver(resolver) { | |
| 4415 | - dynamicTagNamesResolver = resolver; | |
| 4416 | -} | |
| 4417 | - | |
| 4418 | -// A dynamic value replaces the value of the exact node it is attached to, which may be a nested | |
| 4419 | -// field (e.g. an image's `src`) rather than the property root. It is advertised once per branch, at | |
| 4420 | -// the outermost prop type that supports it, and suppressed for descendants of that node to avoid | |
| 4421 | -// offering the same dynamic option twice on a single branch. | |
| 4422 | -function propTypeToJsonSchema(propType, suppressDynamic = false) { | |
| 4423 | - const description = propType.meta?.description; | |
| 4424 | - const schema = {}; | |
| 4425 | - if (description) { | |
| 4426 | - schema.description = description; | |
| 4427 | - } | |
| 4428 | - | |
| 4429 | - // Add example from initial_value if it exists | |
| 4430 | - if (propType.initial_value !== null && propType.initial_value !== undefined) { | |
| 4431 | - schema.examples = [propType.initial_value]; | |
| 4432 | - } | |
| 4433 | - | |
| 4434 | - // Handle different kinds of prop types | |
| 4435 | - switch (propType.kind) { | |
| 4436 | - case 'union': | |
| 4437 | - return convertUnionPropType(propType, schema, suppressDynamic); | |
| 4438 | - case 'object': | |
| 4439 | - return convertObjectPropType(propType, schema, suppressDynamic); | |
| 4440 | - case 'array': | |
| 4441 | - return convertArrayPropType(propType, schema, suppressDynamic); | |
| 4442 | - default: | |
| 4443 | - return convertPlainPropType(propType, schema); | |
| 4444 | - } | |
| 4445 | -} | |
| 4446 | -function convertPlainPropType(propType, baseSchema) { | |
| 4447 | - const schema = { | |
| 4448 | - ...baseSchema | |
| 4449 | - }; | |
| 4450 | - | |
| 4451 | - // This could happen when data is malformed due to a bug, added this as a safeguard. | |
| 4452 | - if (!Object.hasOwn(propType, 'kind')) { | |
| 4453 | - throw new Error(`PropType kind is undefined for propType with key: ${propType.key ?? '[unknown key]'}`); | |
| 4454 | - } | |
| 4455 | - const enumValues = propType.settings?.enum || []; | |
| 4456 | - switch (propType.kind) { | |
| 4457 | - case 'string': | |
| 4458 | - case 'number': | |
| 4459 | - case 'boolean': | |
| 4460 | - return { | |
| 4461 | - ...schema, | |
| 4462 | - type: 'object', | |
| 4463 | - properties: { | |
| 4464 | - $$type: { | |
| 4465 | - type: 'string', | |
| 4466 | - const: propType.key ?? propType.kind | |
| 4467 | - }, | |
| 4468 | - value: { | |
| 4469 | - type: propType.kind, | |
| 4470 | - ...(enumValues.length > 0 ? { | |
| 4471 | - enum: enumValues | |
| 4472 | - } : {}) | |
| 4473 | - } | |
| 4474 | - }, | |
| 4475 | - required: ['$$type', 'value'] | |
| 4476 | - }; | |
| 4477 | - // @ts-expect-error: 'unknown' is a possible value at runtime - treat as "any" | |
| 4478 | - case 'unknown': | |
| 4479 | - return {}; | |
| 4480 | - default: | |
| 4481 | - return { | |
| 4482 | - ...schema, | |
| 4483 | - type: 'object', | |
| 4484 | - $$type: propType.kind, | |
| 4485 | - value: { | |
| 4486 | - type: propType.kind | |
| 4487 | - } | |
| 4488 | - }; | |
| 4489 | - } | |
| 4490 | -} | |
| 4491 | - | |
| 4492 | -/** | |
| 4493 | - * Converts a union prop type to JSON Schema (anyOf). | |
| 4494 | - * | |
| 4495 | - * @param propType The union prop type to convert | |
| 4496 | - * @param baseSchema Base schema to extend | |
| 4497 | - * @param suppressDynamic When true, an ancestor already offered the dynamic option for this branch | |
| 4498 | - */ | |
| 4499 | -function convertUnionPropType(propType, baseSchema, suppressDynamic) { | |
| 4500 | - const schema = structuredClone(baseSchema); | |
| 4501 | - const propTypes = propType.prop_types || {}; | |
| 4502 | - const offersDynamic = !suppressDynamic && Boolean(propTypes[DYNAMIC_PROP_TYPE_KEY]); | |
| 4503 | - const suppressNestedDynamic = suppressDynamic || offersDynamic; | |
| 4504 | - const schemas = []; | |
| 4505 | - | |
| 4506 | - // Convert each prop type in the union | |
| 4507 | - for (const [typeKey, subPropType] of Object.entries(propTypes)) { | |
| 4508 | - if (typeKey === OVERRIDABLE_PROP_TYPE_KEY) { | |
| 4509 | - continue; | |
| 4510 | - } | |
| 4511 | - if (typeKey === DYNAMIC_PROP_TYPE_KEY) { | |
| 4512 | - if (offersDynamic) { | |
| 4513 | - schemas.push(convertDynamicPropType(subPropType)); | |
| 4514 | - } | |
| 4515 | - continue; | |
| 4516 | - } | |
| 4517 | - schemas.push(propTypeToJsonSchema(subPropType, suppressNestedDynamic)); | |
| 4518 | - } | |
| 4519 | - if (schemas.length > 0) { | |
| 4520 | - schema.anyOf = schemas; | |
| 4521 | - } | |
| 4522 | - const propTypeDescription = propType.meta?.description; | |
| 4523 | - if (propTypeDescription) { | |
| 4524 | - schema.description = propTypeDescription; | |
| 4525 | - } | |
| 4526 | - return schema; | |
| 4527 | -} | |
| 4528 | - | |
| 4529 | -// Emits a compact representation of the `dynamic` union member. It is offered as one option of THIS | |
| 4530 | -// node's value (e.g. a property root, or a nested field such as an image's `src`): put the dynamic | |
| 4531 | -// object exactly here, in place of the sibling static variant. Only `name` is required from the LLM | |
| 4532 | -// (constrained to the tags allowed here); `group` is filled by the host resolver, and `settings` are | |
| 4533 | -// described per-tag in the dynamic-tags resource, so the full tag catalog is never inlined. | |
| 4534 | -function convertDynamicPropType(propType) { | |
| 4535 | - const categories = Array.isArray(propType.settings?.categories) ? propType.settings.categories : []; | |
| 4536 | - const allowedTagNames = dynamicTagNamesResolver?.(categories) ?? []; | |
| 4537 | - return { | |
| 4538 | - type: 'object', | |
| 4539 | - description: 'Bind THIS value to a dynamic tag instead of a static value (this may be a nested field, ' + 'e.g. an image\'s "src"). Look up the chosen tag in the "elementor://dynamic-tags" resource ' + 'and populate "settings" exactly as its schema requires.', | |
| 4540 | - properties: { | |
| 4541 | - $$type: { | |
| 4542 | - type: 'string', | |
| 4543 | - const: DYNAMIC_PROP_TYPE_KEY | |
| 4544 | - }, | |
| 4545 | - value: { | |
| 4546 | - type: 'object', | |
| 4547 | - properties: { | |
| 4548 | - name: { | |
| 4549 | - type: 'string', | |
| 4550 | - description: 'Dynamic tag name from "elementor://dynamic-tags".', | |
| 4551 | - ...(allowedTagNames.length ? { | |
| 4552 | - enum: allowedTagNames | |
| 4553 | - } : {}) | |
| 4554 | - }, | |
| 4555 | - settings: { | |
| 4556 | - type: 'object', | |
| 4557 | - description: "Tag settings matching the chosen tag's schema in the resource." | |
| 4558 | - } | |
| 4559 | - }, | |
| 4560 | - required: ['name'] | |
| 4561 | - } | |
| 4562 | - }, | |
| 4563 | - required: ['$$type', 'value'] | |
| 4564 | - }; | |
| 4565 | -} | |
| 4566 | -function convertObjectPropType(propType, baseSchema, suppressDynamic) { | |
| 4567 | - const schema = structuredClone(baseSchema); | |
| 4568 | - schema.type = 'object'; | |
| 4569 | - const internalStructure = { | |
| 4570 | - properties: { | |
| 4571 | - $$type: { | |
| 4572 | - type: 'string', | |
| 4573 | - const: propType.key | |
| 4574 | - }, | |
| 4575 | - value: { | |
| 4576 | - type: 'object', | |
| 4577 | - properties: {}, | |
| 4578 | - additionalProperties: false | |
| 4579 | - } | |
| 4580 | - } | |
| 4581 | - }; | |
| 4582 | - const required = ['$$type', 'value']; | |
| 4583 | - const valueRequired = []; | |
| 4584 | - const shape = propType.shape || {}; | |
| 4585 | - | |
| 4586 | - // Convert each property in the object shape | |
| 4587 | - for (const [key, subPropType] of Object.entries(shape)) { | |
| 4588 | - const propSchema = propTypeToJsonSchema(subPropType, suppressDynamic); | |
| 4589 | - | |
| 4590 | - // Check if this property is required | |
| 4591 | - if (subPropType.settings?.required === true) { | |
| 4592 | - valueRequired.push(key); | |
| 4593 | - } | |
| 4594 | - if (internalStructure.properties.value.properties) { | |
| 4595 | - internalStructure.properties.value.properties[key] = propSchema; | |
| 4596 | - } | |
| 4597 | - } | |
| 4598 | - schema.required = required; | |
| 4599 | - if (valueRequired.length > 0) { | |
| 4600 | - internalStructure.properties.value.required = valueRequired; | |
| 4601 | - } | |
| 4602 | - return { | |
| 4603 | - ...schema, | |
| 4604 | - ...internalStructure | |
| 4605 | - }; | |
| 4606 | -} | |
| 4607 | -function convertArrayPropType(propType, baseSchema, suppressDynamic) { | |
| 4608 | - const schema = structuredClone(baseSchema); | |
| 4609 | - schema.type = 'object'; | |
| 4610 | - let items; | |
| 4611 | - const itemPropType = propType.item_prop_type; | |
| 4612 | - if (itemPropType) { | |
| 4613 | - items = propTypeToJsonSchema(itemPropType, suppressDynamic); | |
| 4614 | - } | |
| 4615 | - schema.properties = { | |
| 4616 | - $$type: { | |
| 4617 | - type: 'string', | |
| 4618 | - const: propType.key | |
| 4619 | - }, | |
| 4620 | - value: { | |
| 4621 | - type: 'array', | |
| 4622 | - ...(items ? { | |
| 4623 | - items | |
| 4624 | - } : {}) | |
| 4625 | - } | |
| 4626 | - }; | |
| 4627 | - return schema; | |
| 4628 | -} | |
| 4629 | -const nonConfigurablePropKeys = ['_cssid', 'classes', 'attributes']; | |
| 4630 | -function isPropKeyConfigurable(propKey, propType) { | |
| 4631 | - if (!nonConfigurablePropKeys.includes(propKey)) { | |
| 4632 | - return true; | |
| 4633 | - } | |
| 4634 | - return !!(!Array.isArray(propType?.meta) && propType?.meta?.llm_configurable); | |
| 4635 | -} | |
| 4636 | -function configurableKeys(schema) { | |
| 4637 | - return Object.keys(schema).filter(key => isPropKeyConfigurable(key, schema[key])); | |
| 4638 | -} | |
| 4639 | -function enrichWithIntention(jsonSchema, text = 'Describe the desired outcome') { | |
| 4640 | - const result = structuredClone(jsonSchema); | |
| 4641 | - if (!result.properties) { | |
| 4642 | - return jsonSchema; | |
| 4643 | - } | |
| 4644 | - result.properties.$intention = { | |
| 4645 | - type: 'string', | |
| 4646 | - description: text | |
| 4647 | - }; | |
| 4648 | - result.required = [...(result.required || []), '$intention']; | |
| 4649 | - return result; | |
| 4650 | -} | |
| 4651 | -function removeIntention(jsonSchema) { | |
| 4652 | - const result = structuredClone(jsonSchema); | |
| 4653 | - if (!result.properties) { | |
| 4654 | - return jsonSchema; | |
| 4655 | - } | |
| 4656 | - delete result.properties.$intention; | |
| 4657 | - if (result.required) { | |
| 4658 | - result.required = result.required.filter(req => req !== '$intention'); | |
| 4659 | - } | |
| 4660 | - return result; | |
| 4661 | -} | |
| 4662 | - | |
| 4663 | -/***/ }), | |
| 4664 | - | |
| 4665 | -/***/ "./packages/packages/libs/editor-props/src/utils/validate-prop-value.ts": | |
| 4666 | -/*!******************************************************************************!*\ | |
| 4667 | - !*** ./packages/packages/libs/editor-props/src/utils/validate-prop-value.ts ***! | |
| 4668 | - \******************************************************************************/ | |
| 4669 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 4670 | - | |
| 4671 | -__webpack_require__.r(__webpack_exports__); | |
| 4672 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 4673 | -/* harmony export */ validatePropValue: function() { return /* binding */ validatePropValue; }, | |
| 4674 | -/* harmony export */ validatePropValueDetailed: function() { return /* binding */ validatePropValueDetailed; } | |
| 4675 | -/* harmony export */ }); | |
| 4676 | -/* harmony import */ var jsonschema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jsonschema */ "./node_modules/jsonschema/lib/index.js"); | |
| 4677 | -/* harmony import */ var _props_to_llm_schema__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./props-to-llm-schema */ "./packages/packages/libs/editor-props/src/utils/props-to-llm-schema.ts"); | |
| 4678 | - | |
| 4679 | - | |
| 4680 | - | |
| 4681 | -/** | |
| 4682 | - * Detailed error information with nested anyOf variant errors | |
| 4683 | - */ | |
| 4684 | - | |
| 4685 | -/** | |
| 4686 | - * Recursively processes validation errors to provide detailed information about anyOf failures | |
| 4687 | - * | |
| 4688 | - * @param error The validation error to process | |
| 4689 | - */ | |
| 4690 | -function processValidationError(error) { | |
| 4691 | - const detailed = { | |
| 4692 | - path: error.path, | |
| 4693 | - message: error.message, | |
| 4694 | - schema: error.schema, | |
| 4695 | - instance: error.instance, | |
| 4696 | - name: error.name | |
| 4697 | - }; | |
| 4698 | - | |
| 4699 | - // If this is an anyOf error, re-validate against each variant to get nested errors | |
| 4700 | - if (error.name === 'anyOf' && error.schema && typeof error.schema === 'object' && 'anyOf' in error.schema) { | |
| 4701 | - const anyOfSchema = error.schema; | |
| 4702 | - const variants = (anyOfSchema.anyOf || []).map((variantSchema, idx) => { | |
| 4703 | - // Re-validate the instance against this specific variant | |
| 4704 | - const variantResult = (0,jsonschema__WEBPACK_IMPORTED_MODULE_0__.validate)(error.instance, variantSchema); | |
| 4705 | - | |
| 4706 | - // Get discriminator from schema if available | |
| 4707 | - let discriminator = `variant-${idx}`; | |
| 4708 | - if (variantSchema && typeof variantSchema === 'object' && 'properties' in variantSchema && variantSchema.properties && typeof variantSchema.properties === 'object' && '$$type' in variantSchema.properties) { | |
| 4709 | - const typeProperty = variantSchema.properties.$$type; | |
| 4710 | - if (typeProperty && typeof typeProperty === 'object' && 'const' in typeProperty && typeof typeProperty.const === 'string') { | |
| 4711 | - discriminator = typeProperty.const; | |
| 4712 | - } | |
| 4713 | - } | |
| 4714 | - return { | |
| 4715 | - discriminator, | |
| 4716 | - errors: variantResult.errors.map(processValidationError) | |
| 4717 | - }; | |
| 4718 | - }); | |
| 4719 | - detailed.variants = variants; | |
| 4720 | - } | |
| 4721 | - return detailed; | |
| 4722 | -} | |
| 4723 | - | |
| 4724 | -/** | |
| 4725 | - * Formats detailed errors into a human-readable string | |
| 4726 | - * @param errors | |
| 4727 | - * @param indent | |
| 4728 | - */ | |
| 4729 | -function formatDetailedErrors(errors, indent = '') { | |
| 4730 | - const lines = []; | |
| 4731 | - for (const error of errors) { | |
| 4732 | - const pathStr = error.path.length > 0 ? error.path.join('.') : 'root'; | |
| 4733 | - lines.push(`${indent}Error at ${pathStr}: ${error.message}`); | |
| 4734 | - if (error.variants && error.variants.length > 0) { | |
| 4735 | - lines.push(`${indent} Tried ${error.variants.length} variant(s):`); | |
| 4736 | - for (const variant of error.variants) { | |
| 4737 | - lines.push(`${indent} - ${variant.discriminator}:`); | |
| 4738 | - if (variant.errors.length === 0) { | |
| 4739 | - lines.push(`${indent} (no errors - this variant matched!)`); | |
| 4740 | - } else { | |
| 4741 | - for (const nestedError of variant.errors) { | |
| 4742 | - const nestedPathStr = nestedError.path.length > 0 ? nestedError.path.join('.') : 'root'; | |
| 4743 | - lines.push(`${indent} ${nestedPathStr}: ${nestedError.message}`); | |
| 4744 | - | |
| 4745 | - // Recursively format nested variant errors | |
| 4746 | - if (nestedError.variants && nestedError.variants.length > 0) { | |
| 4747 | - lines.push(formatDetailedErrors([nestedError], `${indent} `)); | |
| 4748 | - } | |
| 4749 | - } | |
| 4750 | - } | |
| 4751 | - } | |
| 4752 | - } | |
| 4753 | - } | |
| 4754 | - return lines.join('\n'); | |
| 4755 | -} | |
| 4756 | -const validatePropValue = (schema, value) => { | |
| 4757 | - const jsonSchema = (0,_props_to_llm_schema__WEBPACK_IMPORTED_MODULE_1__.propTypeToJsonSchema)(schema); | |
| 4758 | - if (value === null) { | |
| 4759 | - return { | |
| 4760 | - valid: true, | |
| 4761 | - errors: [], | |
| 4762 | - errorMessages: [], | |
| 4763 | - jsonSchema: JSON.stringify((0,_props_to_llm_schema__WEBPACK_IMPORTED_MODULE_1__.propTypeToJsonSchema)(schema)) | |
| 4764 | - }; | |
| 4765 | - } | |
| 4766 | - const result = (0,jsonschema__WEBPACK_IMPORTED_MODULE_0__.validate)(value, jsonSchema); | |
| 4767 | - const detailedErrors = result.errors.map(processValidationError); | |
| 4768 | - return { | |
| 4769 | - valid: result.valid, | |
| 4770 | - errors: result.errors, | |
| 4771 | - errorMessages: formatDetailedErrors(detailedErrors), | |
| 4772 | - jsonSchema: JSON.stringify(jsonSchema) | |
| 4773 | - }; | |
| 4774 | -}; | |
| 4775 | - | |
| 4776 | -/** | |
| 4777 | - * Validates a prop value with detailed error reporting for anyOf failures | |
| 4778 | - * | |
| 4779 | - * This function provides enhanced error messages that show exactly which nested | |
| 4780 | - * properties failed validation in anyOf schemas, making debugging much easier. | |
| 4781 | - * | |
| 4782 | - * @param schema The PropType schema to validate against | |
| 4783 | - * @param value The value to validate | |
| 4784 | - * @return Validation result with detailed error information | |
| 4785 | - */ | |
| 4786 | -const validatePropValueDetailed = (schema, value) => { | |
| 4787 | - const jsonSchema = (0,_props_to_llm_schema__WEBPACK_IMPORTED_MODULE_1__.propTypeToJsonSchema)(schema); | |
| 4788 | - const result = (0,jsonschema__WEBPACK_IMPORTED_MODULE_0__.validate)(value, jsonSchema); | |
| 4789 | - | |
| 4790 | - // Process all errors to add detailed anyOf information | |
| 4791 | - const detailedErrors = result.errors.map(processValidationError); | |
| 4792 | - return { | |
| 4793 | - valid: result.valid, | |
| 4794 | - errors: detailedErrors, | |
| 4795 | - errorMessages: detailedErrors.map(err => err.message), | |
| 4796 | - formattedErrors: formatDetailedErrors(detailedErrors), | |
| 4797 | - jsonSchema: JSON.stringify(jsonSchema) | |
| 4798 | - }; | |
| 4799 | -}; | |
| 4800 | - | |
| 4801 | -/***/ }), | |
| 4802 | - | |
| 4803 | -/***/ "@elementor/schema": | |
| 4804 | -/*!*****************************************!*\ | |
| 4805 | - !*** external ["elementorV2","schema"] ***! | |
| 4806 | - \*****************************************/ | |
| 4807 | -/***/ (function(module) { | |
| 4808 | - | |
| 4809 | -module.exports = window["elementorV2"]["schema"]; | |
| 4810 | - | |
| 4811 | -/***/ }) | |
| 4812 | - | |
| 4813 | -/******/ }); | |
| 4814 | -/************************************************************************/ | |
| 4815 | -/******/ // The module cache | |
| 4816 | -/******/ var __webpack_module_cache__ = {}; | |
| 4817 | -/******/ | |
| 4818 | -/******/ // The require function | |
| 4819 | -/******/ function __webpack_require__(moduleId) { | |
| 4820 | -/******/ // Check if module is in cache | |
| 4821 | -/******/ var cachedModule = __webpack_module_cache__[moduleId]; | |
| 4822 | -/******/ if (cachedModule !== undefined) { | |
| 4823 | -/******/ return cachedModule.exports; | |
| 4824 | -/******/ } | |
| 4825 | -/******/ // Create a new module (and put it into the cache) | |
| 4826 | -/******/ var module = __webpack_module_cache__[moduleId] = { | |
| 4827 | -/******/ // no module.id needed | |
| 4828 | -/******/ // no module.loaded needed | |
| 4829 | -/******/ exports: {} | |
| 4830 | -/******/ }; | |
| 4831 | -/******/ | |
| 4832 | -/******/ // Execute the module function | |
| 4833 | -/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); | |
| 4834 | -/******/ | |
| 4835 | -/******/ // Return the exports of the module | |
| 4836 | -/******/ return module.exports; | |
| 4837 | -/******/ } | |
| 4838 | -/******/ | |
| 4839 | -/************************************************************************/ | |
| 4840 | -/******/ /* webpack/runtime/compat get default export */ | |
| 4841 | -/******/ !function() { | |
| 4842 | -/******/ // getDefaultExport function for compatibility with non-harmony modules | |
| 4843 | -/******/ __webpack_require__.n = function(module) { | |
| 4844 | -/******/ var getter = module && module.__esModule ? | |
| 4845 | -/******/ function() { return module['default']; } : | |
| 4846 | -/******/ function() { return module; }; | |
| 4847 | -/******/ __webpack_require__.d(getter, { a: getter }); | |
| 4848 | -/******/ return getter; | |
| 4849 | -/******/ }; | |
| 4850 | -/******/ }(); | |
| 4851 | -/******/ | |
| 4852 | -/******/ /* webpack/runtime/define property getters */ | |
| 4853 | -/******/ !function() { | |
| 4854 | -/******/ // define getter functions for harmony exports | |
| 4855 | -/******/ __webpack_require__.d = function(exports, definition) { | |
| 4856 | -/******/ for(var key in definition) { | |
| 4857 | -/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { | |
| 4858 | -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); | |
| 4859 | -/******/ } | |
| 4860 | -/******/ } | |
| 4861 | -/******/ }; | |
| 4862 | -/******/ }(); | |
| 4863 | -/******/ | |
| 4864 | -/******/ /* webpack/runtime/hasOwnProperty shorthand */ | |
| 4865 | -/******/ !function() { | |
| 4866 | -/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } | |
| 4867 | -/******/ }(); | |
| 4868 | -/******/ | |
| 4869 | -/******/ /* webpack/runtime/make namespace object */ | |
| 4870 | -/******/ !function() { | |
| 4871 | -/******/ // define __esModule on exports | |
| 4872 | -/******/ __webpack_require__.r = function(exports) { | |
| 4873 | -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { | |
| 4874 | -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | |
| 4875 | -/******/ } | |
| 4876 | -/******/ Object.defineProperty(exports, '__esModule', { value: true }); | |
| 4877 | -/******/ }; | |
| 4878 | -/******/ }(); | |
| 4879 | -/******/ | |
| 4880 | -/************************************************************************/ | |
| 4881 | -var __webpack_exports__ = {}; | |
| 4882 | -// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. | |
| 4883 | -!function() { | |
| 4884 | -/*!**********************************************************!*\ | |
| 4885 | - !*** ./packages/packages/libs/editor-props/src/index.ts ***! | |
| 4886 | - \**********************************************************/ | |
| 4887 | -__webpack_require__.r(__webpack_exports__); | |
| 4888 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 4889 | -/* harmony export */ CLASSES_PROP_KEY: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.CLASSES_PROP_KEY; }, | |
| 4890 | -/* harmony export */ DateTimePropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.DateTimePropTypeUtil; }, | |
| 4891 | -/* harmony export */ Schema: function() { return /* binding */ Schema; }, | |
| 4892 | -/* harmony export */ backdropFilterPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.backdropFilterPropTypeUtil; }, | |
| 4893 | -/* harmony export */ backgroundColorOverlayPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.backgroundColorOverlayPropTypeUtil; }, | |
| 4894 | -/* harmony export */ backgroundGradientOverlayPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.backgroundGradientOverlayPropTypeUtil; }, | |
| 4895 | -/* harmony export */ backgroundImageOverlayPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.backgroundImageOverlayPropTypeUtil; }, | |
| 4896 | -/* harmony export */ backgroundImagePositionOffsetPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.backgroundImagePositionOffsetPropTypeUtil; }, | |
| 4897 | -/* harmony export */ backgroundImageSizeScalePropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.backgroundImageSizeScalePropTypeUtil; }, | |
| 4898 | -/* harmony export */ backgroundOverlayItem: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.backgroundOverlayItem; }, | |
| 4899 | -/* harmony export */ backgroundOverlayPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.backgroundOverlayPropTypeUtil; }, | |
| 4900 | -/* harmony export */ backgroundPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.backgroundPropTypeUtil; }, | |
| 4901 | -/* harmony export */ blurFilterPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.blurFilterPropTypeUtil; }, | |
| 4902 | -/* harmony export */ booleanPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.booleanPropTypeUtil; }, | |
| 4903 | -/* harmony export */ borderRadiusPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.borderRadiusPropTypeUtil; }, | |
| 4904 | -/* harmony export */ borderWidthPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.borderWidthPropTypeUtil; }, | |
| 4905 | -/* harmony export */ boxShadowPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.boxShadowPropTypeUtil; }, | |
| 4906 | -/* harmony export */ classesPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.classesPropTypeUtil; }, | |
| 4907 | -/* harmony export */ colorPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.colorPropTypeUtil; }, | |
| 4908 | -/* harmony export */ colorStopPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.colorStopPropTypeUtil; }, | |
| 4909 | -/* harmony export */ colorToneFilterPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.colorToneFilterPropTypeUtil; }, | |
| 4910 | -/* harmony export */ createArrayPropUtils: function() { return /* reexport safe */ _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_6__.createArrayPropUtils; }, | |
| 4911 | -/* harmony export */ createPropUtils: function() { return /* reexport safe */ _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_6__.createPropUtils; }, | |
| 4912 | -/* harmony export */ cssFilterFunctionPropUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.cssFilterFunctionPropUtil; }, | |
| 4913 | -/* harmony export */ dateRangePropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.dateRangePropTypeUtil; }, | |
| 4914 | -/* harmony export */ dateStringPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.dateStringPropTypeUtil; }, | |
| 4915 | -/* harmony export */ dimensionsPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.dimensionsPropTypeUtil; }, | |
| 4916 | -/* harmony export */ dropShadowFilterPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.dropShadowFilterPropTypeUtil; }, | |
| 4917 | -/* harmony export */ emailPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.emailPropTypeUtil; }, | |
| 4918 | -/* harmony export */ emailsPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.emailsPropTypeUtil; }, | |
| 4919 | -/* harmony export */ evaluateTerm: function() { return /* reexport safe */ _utils_prop_dependency_utils__WEBPACK_IMPORTED_MODULE_11__.evaluateTerm; }, | |
| 4920 | -/* harmony export */ extractValue: function() { return /* reexport safe */ _utils_prop_dependency_utils__WEBPACK_IMPORTED_MODULE_11__.extractValue; }, | |
| 4921 | -/* harmony export */ filterEmptyValues: function() { return /* reexport safe */ _utils_filter_empty_values__WEBPACK_IMPORTED_MODULE_7__.filterEmptyValues; }, | |
| 4922 | -/* harmony export */ filterPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.filterPropTypeUtil; }, | |
| 4923 | -/* harmony export */ flexPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.flexPropTypeUtil; }, | |
| 4924 | -/* harmony export */ fontFamilyPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.fontFamilyPropTypeUtil; }, | |
| 4925 | -/* harmony export */ getPropSchemaFromCache: function() { return /* reexport safe */ _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_6__.getPropSchemaFromCache; }, | |
| 4926 | -/* harmony export */ gradientColorStopPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.gradientColorStopPropTypeUtil; }, | |
| 4927 | -/* harmony export */ gridTrackSizePropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.gridTrackSizePropTypeUtil; }, | |
| 4928 | -/* harmony export */ htmlPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.htmlPropTypeUtil; }, | |
| 4929 | -/* harmony export */ htmlV2PropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.htmlV2PropTypeUtil; }, | |
| 4930 | -/* harmony export */ htmlV3PropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.htmlV3PropTypeUtil; }, | |
| 4931 | -/* harmony export */ hueRotateFilterPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.hueRotateFilterPropTypeUtil; }, | |
| 4932 | -/* harmony export */ imageAttachmentIdPropType: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.imageAttachmentIdPropType; }, | |
| 4933 | -/* harmony export */ imagePropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.imagePropTypeUtil; }, | |
| 4934 | -/* harmony export */ imageSrcPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.imageSrcPropTypeUtil; }, | |
| 4935 | -/* harmony export */ intensityFilterPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.intensityFilterPropTypeUtil; }, | |
| 4936 | -/* harmony export */ isDependency: function() { return /* reexport safe */ _utils_prop_dependency_utils__WEBPACK_IMPORTED_MODULE_11__.isDependency; }, | |
| 4937 | -/* harmony export */ isDependencyMet: function() { return /* reexport safe */ _utils_prop_dependency_utils__WEBPACK_IMPORTED_MODULE_11__.isDependencyMet; }, | |
| 4938 | -/* harmony export */ isEmpty: function() { return /* reexport safe */ _utils_filter_empty_values__WEBPACK_IMPORTED_MODULE_7__.isEmpty; }, | |
| 4939 | -/* harmony export */ isOverridable: function() { return /* reexport safe */ _utils_is_overridable__WEBPACK_IMPORTED_MODULE_8__.isOverridable; }, | |
| 4940 | -/* harmony export */ isTransformable: function() { return /* reexport safe */ _utils_is_transformable__WEBPACK_IMPORTED_MODULE_9__.isTransformable; }, | |
| 4941 | -/* harmony export */ keyValuePropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.keyValuePropTypeUtil; }, | |
| 4942 | -/* harmony export */ layoutDirectionPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.layoutDirectionPropTypeUtil; }, | |
| 4943 | -/* harmony export */ linkPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.linkPropTypeUtil; }, | |
| 4944 | -/* harmony export */ mergeProps: function() { return /* reexport safe */ _utils_merge_props__WEBPACK_IMPORTED_MODULE_10__.mergeProps; }, | |
| 4945 | -/* harmony export */ moveTransformPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.moveTransformPropTypeUtil; }, | |
| 4946 | -/* harmony export */ numberPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.numberPropTypeUtil; }, | |
| 4947 | -/* harmony export */ numberRangePropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.numberRangePropTypeUtil; }, | |
| 4948 | -/* harmony export */ parseHtmlChildren: function() { return /* reexport safe */ _utils_parse_html_children__WEBPACK_IMPORTED_MODULE_12__.parseHtmlChildren; }, | |
| 4949 | -/* harmony export */ perspectiveOriginPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.perspectiveOriginPropTypeUtil; }, | |
| 4950 | -/* harmony export */ positionPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.positionPropTypeUtil; }, | |
| 4951 | -/* harmony export */ queryFilterArrayPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.queryFilterArrayPropTypeUtil; }, | |
| 4952 | -/* harmony export */ queryFilterPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.queryFilterPropTypeUtil; }, | |
| 4953 | -/* harmony export */ queryPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.queryPropTypeUtil; }, | |
| 4954 | -/* harmony export */ rewrapOverridableValue: function() { return /* reexport safe */ _utils_is_overridable__WEBPACK_IMPORTED_MODULE_8__.rewrapOverridableValue; }, | |
| 4955 | -/* harmony export */ rotateTransformPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.rotateTransformPropTypeUtil; }, | |
| 4956 | -/* harmony export */ scaleTransformPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.scaleTransformPropTypeUtil; }, | |
| 4957 | -/* harmony export */ selectionSizePropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.selectionSizePropTypeUtil; }, | |
| 4958 | -/* harmony export */ shadowPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.shadowPropTypeUtil; }, | |
| 4959 | -/* harmony export */ sizePropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.sizePropTypeUtil; }, | |
| 4960 | -/* harmony export */ skewTransformPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.skewTransformPropTypeUtil; }, | |
| 4961 | -/* harmony export */ spanPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.spanPropTypeUtil; }, | |
| 4962 | -/* harmony export */ stringArrayPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.stringArrayPropTypeUtil; }, | |
| 4963 | -/* harmony export */ stringPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.stringPropTypeUtil; }, | |
| 4964 | -/* harmony export */ strokePropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.strokePropTypeUtil; }, | |
| 4965 | -/* harmony export */ svgSrcPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.svgSrcPropTypeUtil; }, | |
| 4966 | -/* harmony export */ timeRangePropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.timeRangePropTypeUtil; }, | |
| 4967 | -/* harmony export */ timeStringPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.timeStringPropTypeUtil; }, | |
| 4968 | -/* harmony export */ transformFunctionsPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.transformFunctionsPropTypeUtil; }, | |
| 4969 | -/* harmony export */ transformOriginPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.transformOriginPropTypeUtil; }, | |
| 4970 | -/* harmony export */ transformPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.transformPropTypeUtil; }, | |
| 4971 | -/* harmony export */ urlPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.urlPropTypeUtil; }, | |
| 4972 | -/* harmony export */ videoAttachmentIdPropType: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.videoAttachmentIdPropType; }, | |
| 4973 | -/* harmony export */ videoSrcPropTypeUtil: function() { return /* reexport safe */ _prop_types__WEBPACK_IMPORTED_MODULE_5__.videoSrcPropTypeUtil; } | |
| 4974 | -/* harmony export */ }); | |
| 4975 | -/* harmony import */ var _utils_adjust_llm_prop_value_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils/adjust-llm-prop-value-schema */ "./packages/packages/libs/editor-props/src/utils/adjust-llm-prop-value-schema.ts"); | |
| 4976 | -/* harmony import */ var _utils_llm_schema_to_props__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/llm-schema-to-props */ "./packages/packages/libs/editor-props/src/utils/llm-schema-to-props.ts"); | |
| 4977 | -/* harmony import */ var _utils_props_to_llm_schema__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/props-to-llm-schema */ "./packages/packages/libs/editor-props/src/utils/props-to-llm-schema.ts"); | |
| 4978 | -/* harmony import */ var _utils_validate_prop_value__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/validate-prop-value */ "./packages/packages/libs/editor-props/src/utils/validate-prop-value.ts"); | |
| 4979 | -/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./types */ "./packages/packages/libs/editor-props/src/types.ts"); | |
| 4980 | -/* harmony import */ var _prop_types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./prop-types */ "./packages/packages/libs/editor-props/src/prop-types/index.ts"); | |
| 4981 | -/* harmony import */ var _utils_create_prop_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/create-prop-utils */ "./packages/packages/libs/editor-props/src/utils/create-prop-utils.ts"); | |
| 4982 | -/* harmony import */ var _utils_filter_empty_values__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils/filter-empty-values */ "./packages/packages/libs/editor-props/src/utils/filter-empty-values.ts"); | |
| 4983 | -/* harmony import */ var _utils_is_overridable__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils/is-overridable */ "./packages/packages/libs/editor-props/src/utils/is-overridable.ts"); | |
| 4984 | -/* harmony import */ var _utils_is_transformable__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils/is-transformable */ "./packages/packages/libs/editor-props/src/utils/is-transformable.ts"); | |
| 4985 | -/* harmony import */ var _utils_merge_props__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utils/merge-props */ "./packages/packages/libs/editor-props/src/utils/merge-props.ts"); | |
| 4986 | -/* harmony import */ var _utils_prop_dependency_utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils/prop-dependency-utils */ "./packages/packages/libs/editor-props/src/utils/prop-dependency-utils.ts"); | |
| 4987 | -/* harmony import */ var _utils_parse_html_children__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utils/parse-html-children */ "./packages/packages/libs/editor-props/src/utils/parse-html-children.ts"); | |
| 4988 | - | |
| 4989 | - | |
| 4990 | - | |
| 4991 | - | |
| 4992 | -// types | |
| 4993 | - | |
| 4994 | -// prop types | |
| 4995 | - | |
| 4996 | - | |
| 4997 | -// utils | |
| 4998 | - | |
| 4999 | - | |
| 5000 | - | |
| 5001 | - | |
| 5002 | - | |
| 5003 | - | |
| 5004 | - | |
| 5005 | -const Schema = { | |
| 5006 | - jsonSchemaToPropType: _utils_llm_schema_to_props__WEBPACK_IMPORTED_MODULE_1__.jsonSchemaToPropType, | |
| 5007 | - propTypeToJsonSchema: _utils_props_to_llm_schema__WEBPACK_IMPORTED_MODULE_2__.propTypeToJsonSchema, | |
| 5008 | - adjustLlmPropValueSchema: _utils_adjust_llm_prop_value_schema__WEBPACK_IMPORTED_MODULE_0__.adjustLlmPropValueSchema, | |
| 5009 | - isPropKeyConfigurable: _utils_props_to_llm_schema__WEBPACK_IMPORTED_MODULE_2__.isPropKeyConfigurable, | |
| 5010 | - nonConfigurablePropKeys: _utils_props_to_llm_schema__WEBPACK_IMPORTED_MODULE_2__.nonConfigurablePropKeys, | |
| 5011 | - configurableKeys: _utils_props_to_llm_schema__WEBPACK_IMPORTED_MODULE_2__.configurableKeys, | |
| 5012 | - validatePropValue: _utils_validate_prop_value__WEBPACK_IMPORTED_MODULE_3__.validatePropValue, | |
| 5013 | - enrichWithIntention: _utils_props_to_llm_schema__WEBPACK_IMPORTED_MODULE_2__.enrichWithIntention, | |
| 5014 | - removeIntention: _utils_props_to_llm_schema__WEBPACK_IMPORTED_MODULE_2__.removeIntention, | |
| 5015 | - setDynamicTagNamesResolver: _utils_props_to_llm_schema__WEBPACK_IMPORTED_MODULE_2__.setDynamicTagNamesResolver | |
| 5016 | -}; | |
| 5017 | -}(); | |
| 5018 | -(window.elementorV2 = window.elementorV2 || {}).editorProps = __webpack_exports__; | |
| 5019 | -/******/ })() | |
| 5020 | -; | |
| 2645 | +//#endregion | |
| 2646 | +})(elementorV2.schema); | |
| 5021 | 2647 | window.elementorV2.editorProps?.init?.(); |
| 5022 | 2648 | //# sourceMappingURL=editor-props.js.map |