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AAWoD,KAAKC,aAChBrD,EAAWsD,OAAOC,OACrB,EAnID,EAoIJ,KAGJ,MAAMC,EAAkBtE,SAASJ,cAAc,wBACzC2E,EAAUvE,SAAS4D,eAAe,qBAClCY,EAAqBxE,SAAS4D,eAAe,iBAC/CU,GAAmBC,GAAWC,IAC9BF,EAAgBxF,iBAAiB,SAAS,SAAU2F,GAChDA,EAAEC,iBACFH,EAAQ7G,MAAMiH,QAAU,OAC5B,IAEAH,EAAmB1F,iBAAiB,SAAS,WACzCyF,EAAQ7G,MAAMiH,QAAU,MAC5B,KAIJ,MAAMC,EAAa5E,SAASJ,cAAc,gBAEtCgF,GACAA,EAAW9F,iBAAiB,SAAS,SAAU2F,GAC3CA,EAAEC,iBACFH,EAAQ7G,MAAMiH,QAAU,OAC5B,GACJ,G","sources":["webpack://easternstandard/./node_modules/@alexspirgel/extend/src/index.js","webpack://easternstandard/./node_modules/@alexspirgel/is-plain-object/is-plain-object.js","webpack://easternstandard/./node_modules/@alexspirgel/schema/src/classes/DataPathManager.js","webpack://easternstandard/./node_modules/@alexspirgel/schema/src/classes/ValidationError.js","webpack://easternstandard/./node_modules/@alexspirgel/schema/src/classes/ValidationErrors.js","webpack://easternstandard/./node_modules/@alexspirgel/schema/src/index.js","webpack://easternstandard/./node_modules/@alexspirgel/schema/src/models/model.js","webpack://easternstandard/./node_modules/@alexspirgel/transition-auto/src/index.js","webpack://easternstandard/./node_modules/@alexspirgel/transition-auto/src/options-schema.js","webpack://easternstandard/webpack/bootstrap","webpack://easternstandard/./custom-blocks/flexible/gpt-search/scripts/src/script.js"],"sourcesContent":["const isPlainObject = require('@alexspirgel/is-plain-object');\r\n\r\nconst extend = (...arguments) => {\r\n\tlet target = arguments[0];\r\n\tlet argumentIndex, merge, mergeIsArray;\r\n\tfor (argumentIndex = 1; argumentIndex < arguments.length; argumentIndex++) {\r\n\t\tmerge = arguments[argumentIndex];\r\n\t\tif (merge === target) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\tmergeIsArray = Array.isArray(merge);\r\n\t\tif (mergeIsArray || isPlainObject(merge)) {\r\n\t\t\tif (mergeIsArray && !Array.isArray(target)) {\r\n\t\t\t\ttarget = [];\r\n\t\t\t}\r\n\t\t\telse if (!mergeIsArray && !isPlainObject(target)) {\r\n\t\t\t\ttarget = {};\r\n\t\t\t}\r\n\t\t\tfor (const property in merge) {\r\n\t\t\t\tif (property === \"__proto__\") {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\ttarget[property] = extend(target[property], merge[property]);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (merge !== undefined) {\r\n\t\t\t\ttarget = merge;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn target;\r\n};\r\n\r\nmodule.exports = extend;","function isPlainObject(value) {\r\n\tif (typeof value !== 'object' ||\r\n\tvalue === null ||\r\n\tObject.prototype.toString.call(value) !== '[object Object]') {\r\n\t\treturn false;\r\n\t}\r\n\tif (Object.getPrototypeOf(value) === null) {\r\n return true;\r\n }\r\n\tlet prototype = value;\r\n while (Object.getPrototypeOf(prototype) !== null) {\r\n prototype = Object.getPrototypeOf(prototype);\r\n }\r\n return Object.getPrototypeOf(value) === prototype;\r\n}\r\n\r\nmodule.exports = isPlainObject;","const extend = require('@alexspirgel/extend');\r\n\r\nclass DataPathManager {\r\n\t\r\n\tconstructor(data, path = []) {\r\n\t\tthis.data = data;\r\n\t\tthis.path = path;\r\n\t}\r\n\t\r\n\tset path(path) {\r\n\t\tif (Array.isArray(path)) {\r\n\t\t\tthis._path = path;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new Error('Path must be an array');\r\n\t\t}\r\n\t}\r\n\t\r\n\tget path() {\r\n\t\treturn this._path;\r\n\t}\r\n\t\r\n\taddPathSegment(pathSegment) {\r\n\t\tthis.path.push(pathSegment);\r\n\t}\r\n\t\r\n\tremovePathSegment() {\r\n\t\treturn this.path.splice(-1, 1)[0];\r\n\t}\r\n\t\r\n\tget value() {\r\n\t\tlet value = this.data;\r\n\t\tfor (let path of this.path) {\r\n\t\t\ttry {\r\n\t\t\t\tvalue = value[path];\r\n\t\t\t}\r\n\t\t\tcatch (error) {\r\n\t\t\t\treturn undefined;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn value;\r\n\t}\r\n\r\n\tclone(options = {}) {\r\n\r\n\t\tconst defaultOptions = {\r\n\t\t\tdata: false,\r\n\t\t\tpath: true\r\n\t\t};\r\n\t\toptions = extend({}, defaultOptions, options);\r\n\r\n\t\tlet data = this.data;\r\n\t\tif (options.data) {\r\n\t\t\tif (typeof data === 'object') {\r\n\t\t\t\tif (Array.isArray(data)) {\r\n\t\t\t\t\tdata = extend([], data);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tdata = extend({}, data);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet path = this.path;\r\n\t\tif (options.path) {\r\n\t\t\tpath = [...this.path];\r\n\t\t}\r\n\r\n\t\treturn new this.constructor(data, path);\r\n\r\n\t}\r\n\r\n};\r\n\r\nmodule.exports = DataPathManager;","const DataPathManager = require('./DataPathManager.js');\r\n\r\nclass ValidationError extends Error {\r\n\t\r\n\tconstructor(...params) {\r\n\t\tsuper(...params);\r\n\t}\r\n\t\r\n\tset modelPathManager(modelPathManager) {\r\n\t\tif (!(modelPathManager instanceof DataPathManager)) {\r\n\t\t\tmodelPathManager = new DataPathManager(modelPathManager);\r\n\t\t}\r\n\t\tthis._modelPathManager = modelPathManager;\r\n\t}\r\n\t\r\n\tget modelPathManager() {\r\n\t\treturn this._modelPathManager;\r\n\t}\r\n\t\r\n\tset inputPathManager(inputPathManager) {\r\n\t\tif (!(inputPathManager instanceof DataPathManager)) {\r\n\t\t\tinputPathManager = new DataPathManager(inputPathManager);\r\n\t\t}\r\n\t\tthis._inputPathManager = inputPathManager;\r\n\t}\r\n\t\r\n\tget inputPathManager() {\r\n\t\treturn this._inputPathManager;\r\n\t}\r\n\r\n};\r\n\r\nmodule.exports = ValidationError;","const ValidationError = require('./ValidationError.js');\r\n\r\nclass ValidationErrors {\r\n\t\r\n\tconstructor() {\r\n\t\tthis.errors = [];\r\n\t}\r\n\t\r\n\taddError(error) {\r\n\t\tif (Array.isArray(error)) {\r\n\t\t\tfor (const singleError of error) {\r\n\t\t\t\tthis.addError(singleError);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (!(error instanceof ValidationError)) {\r\n\t\t\t\tthrow new Error(`Passed 'error' must be an instance of 'Schema.ValidationError'.`);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis.errors.push(error);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tgenerateFormattedMessage() {\r\n\t\tlet message = `Schema errors:\\n`;\r\n\t\tfor (const error of this.errors) {\r\n\t\t\tlet inputPath = 'root';\r\n\t\t\tif (error.inputPathManager.path.length > 0) {\r\n\t\t\t\tinputPath = error.inputPathManager.path.map((pathSegment) => {\r\n\t\t\t\t\treturn `['` + pathSegment + `']`;\r\n\t\t\t\t});\r\n\t\t\t\tinputPath = inputPath.join('');\r\n\t\t\t}\r\n\t\t\tlet modelPath = 'root';\r\n\t\t\tif (error.modelPathManager.path.length > 0) {\r\n\t\t\t\tmodelPath = error.modelPathManager.path.map((pathSegment) => {\r\n\t\t\t\t\treturn `['` + pathSegment + `']`;\r\n\t\t\t\t});\r\n\t\t\t\tmodelPath = modelPath.join('');\r\n\t\t\t}\r\n\t\t\tmessage = message + `\\nInput Path: ${inputPath}\\nModel Path: ${modelPath}\\nMessage: ${error.message}\\n`;\r\n\t\t}\r\n\t\treturn message;\r\n\t}\r\n\r\n};\r\n\r\nmodule.exports = ValidationErrors;","const DataPathManager = require('./classes/DataPathManager.js');\r\nconst ValidationError = require('./classes/ValidationError.js');\r\nconst ValidationErrors = require('./classes/ValidationErrors.js');\r\nconst modelModel = require('./models/model.js');\r\n\r\nclass Schema {\r\n\t\r\n\tstatic get validationMethods() {\r\n\t\treturn [\r\n\t\t\t{\r\n\t\t\t\tproperty: 'required',\r\n\t\t\t\tmethod: this.validateRequired\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tproperty: 'type',\r\n\t\t\t\tmethod: this.validateType\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tproperty: 'exactValue',\r\n\t\t\t\tmethod: this.validateExactValue\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tproperty: 'greaterThan',\r\n\t\t\t\tmethod: this.validateGreaterThan\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tproperty: 'greaterThanOrEqualTo',\r\n\t\t\t\tmethod: this.validateGreaterThanOrEqualTo\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tproperty: 'lessThan',\r\n\t\t\t\tmethod: this.validateLessThan\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tproperty: 'lessThanOrEqualTo',\r\n\t\t\t\tmethod: this.validateLessThanOrEqualTo\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tproperty: 'divisibleBy',\r\n\t\t\t\tmethod: this.validateDivisibleBy\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tproperty: 'notDivisibleBy',\r\n\t\t\t\tmethod: this.validateNotDivisibleBy\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tproperty: 'minimumCharacters',\r\n\t\t\t\tmethod: this.validateMinimumCharacters\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tproperty: 'maximumCharacters',\r\n\t\t\t\tmethod: this.validateMaximumCharacters\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tproperty: 'minimumLength',\r\n\t\t\t\tmethod: this.validateMinimumLength\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tproperty: 'maximumLength',\r\n\t\t\t\tmethod: this.validateMaximumLength\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tproperty: 'instanceOf',\r\n\t\t\t\tmethod: this.validateInstanceOf\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tproperty: 'allowUnvalidatedProperties',\r\n\t\t\t\tmethod: this.validateAllowUnvalidatedProperties\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tproperty: 'custom',\r\n\t\t\t\tmethod: this.validateCustom\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tproperty: 'allPropertySchema',\r\n\t\t\t\tmethod: this.validateAllPropertySchema\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tproperty: 'propertySchema',\r\n\t\t\t\tmethod: this.validatePropertySchema\r\n\t\t\t}\r\n\t\t]\r\n\t}\r\n\r\n\tstatic validateRequired(modelPathManager, inputPathManager) {\r\n\t\tif (modelPathManager.value === true) {\r\n\t\t\tif (inputPathManager.value === undefined || inputPathManager.value === null) {\r\n\t\t\t\tthrow new ValidationError(`Property 'required' validation failed. The input must not be null or undefined.`);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}\r\n\r\n\tstatic validateType(modelPathManager, inputPathManager) {\r\n\t\tif (modelPathManager.value === 'number') {\r\n\t\t\tif (typeof inputPathManager.value === 'number' && !isNaN(inputPathManager.value)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (modelPathManager.value === 'object') {\r\n\t\t\tif (typeof inputPathManager.value === 'object' && !Array.isArray(inputPathManager.value) && inputPathManager.value !== null) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (modelPathManager.value === 'array') {\r\n\t\t\tif (Array.isArray(inputPathManager.value)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (modelPathManager.value === 'boolean' || modelPathManager.value === 'string' || modelPathManager.value === 'function') {\r\n\t\t\tif (typeof inputPathManager.value === modelPathManager.value) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tthrow new ValidationError(`Property 'type' validation failed. The input type must match.`);\r\n\t}\r\n\r\n\tstatic validateExactValue(modelPathManager, inputPathManager) {\r\n\t\tif (Array.isArray(modelPathManager.value)) {\r\n\t\t\tfor (const value of modelPathManager.value) {\r\n\t\t\t\tif (inputPathManager.value === value) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (inputPathManager.value === modelPathManager.value) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tthrow new ValidationError(`Property 'exactValue' validation failed. The input must be an exact match of the value or one of the values in an array of values.`);\r\n\t}\r\n\r\n\tstatic validateGreaterThan(modelPathManager, inputPathManager) {\r\n\t\tif (inputPathManager.value > modelPathManager.value) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new ValidationError(`Property 'greaterThan' validation failed. The input must be greater than the value.`);\r\n\t\t}\r\n\t}\r\n\r\n\tstatic validateGreaterThanOrEqualTo(modelPathManager, inputPathManager) {\r\n\t\tif (inputPathManager.value >= modelPathManager.value) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new ValidationError(`Property 'greaterThanOrEqualTo' validation failed. The input must be greater than or equal to the value.`);\r\n\t\t}\r\n\t}\r\n\r\n\tstatic validateLessThan(modelPathManager, inputPathManager) {\r\n\t\tif (inputPathManager.value < modelPathManager.value) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new ValidationError(`Property 'lessThan' validation failed. The input must be less than the value.`);\r\n\t\t}\r\n\t}\r\n\r\n\tstatic validateLessThanOrEqualTo(modelPathManager, inputPathManager) {\r\n\t\tif (inputPathManager.value <= modelPathManager.value) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new ValidationError(`Property 'lessThanOrEqualTo' validation failed. The input must be less than or equal to the value.`);\r\n\t\t}\r\n\t}\r\n\r\n\tstatic validateDivisibleBy(modelPathManager, inputPathManager) {\r\n\t\tif (Array.isArray(modelPathManager.value)) {\r\n\t\t\tfor (const value of modelPathManager.value) {\r\n\t\t\t\tif (inputPathManager.value % value === 0) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (inputPathManager.value % modelPathManager.value === 0) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tthrow new ValidationError(`Property 'divisibleBy' validation failed. The input must be divisible by the value or one of the values in an array of values.`);\r\n\t}\r\n\r\n\tstatic validateNotDivisibleBy(modelPathManager, inputPathManager) {\r\n\t\tlet flag = false;\r\n\t\tif (Array.isArray(modelPathManager.value)) {\r\n\t\t\tfor (const value of modelPathManager.value) {\r\n\t\t\t\tif (inputPathManager.value % value === 0) {\r\n\t\t\t\t\tflag = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (inputPathManager.value % modelPathManager.value === 0) {\r\n\t\t\t\tflag = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (flag || isNaN(inputPathManager.value)) {\r\n\t\t\tthrow new ValidationError(`Property 'notDivisibleBy' validation failed. The input must not be divisible by the value or one of the values in an array of values.`);\r\n\t\t}\r\n\t\treturn true;\r\n\t}\r\n\r\n\tstatic validateMinimumCharacters(modelPathManager, inputPathManager) {\r\n\t\tif (inputPathManager.value.length >= modelPathManager.value) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new ValidationError(`Property 'minimumCharacters' validation failed. The input must have a character count greater than or equal to the value.`);\r\n\t\t}\r\n\t}\r\n\r\n\tstatic validateMaximumCharacters(modelPathManager, inputPathManager) {\r\n\t\tif (inputPathManager.value.length <= modelPathManager.value) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new ValidationError(`Property 'maximumCharacters' validation failed. The input must have a character count less than or equal to the value.`);\r\n\t\t}\r\n\t}\r\n\r\n\tstatic validateMinimumLength(modelPathManager, inputPathManager) {\r\n\t\tif (inputPathManager.value.length >= modelPathManager.value) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new ValidationError(`Property 'minimumLength' validation failed. The input must have a length greater than or equal to the value.`);\r\n\t\t}\r\n\t}\r\n\r\n\tstatic validateMaximumLength(modelPathManager, inputPathManager) {\r\n\t\tif (inputPathManager.value.length <= modelPathManager.value) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new ValidationError(`Property 'maximumLength' validation failed. The input must have a length less than or equal to the value.`);\r\n\t\t}\r\n\t}\r\n\r\n\tstatic validateInstanceOf(modelPathManager, inputPathManager) {\r\n\t\tif (Array.isArray(modelPathManager.value)) {\r\n\t\t\tfor (const value of modelPathManager.value) {\r\n\t\t\t\tif (inputPathManager.value instanceof value) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (inputPathManager.value instanceof modelPathManager.value) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tthrow new ValidationError(`Property 'instanceOf' validation failed. The input must be an instance of the value or one of the values in an array of values.`);\r\n\t}\r\n\r\n\tstatic validateAllowUnvalidatedProperties(modelPathManager, inputPathManager) {\r\n\t\tif (modelPathManager.value === false) {\r\n\t\t\tmodelPathManager.removePathSegment();\r\n\t\t\tmodelPathManager.addPathSegment('propertySchema');\r\n\t\t\tlet validatedProperties = [];\r\n\t\t\tif (modelPathManager.value) {\r\n\t\t\t\tvalidatedProperties = Object.keys(modelPathManager.value);\r\n\t\t\t}\r\n\t\t\tfor (const property in inputPathManager.value) {\r\n\t\t\t\tif (!validatedProperties.includes(property)) {\r\n\t\t\t\t\tthrow new ValidationError(`Property 'allowUnvalidatedProperties' validation failed. '${property}' is not defined in the 'propertySchema' validation property.`);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}\r\n\r\n\tstatic validateCustom(modelPathManager, inputPathManager) {\r\n\t\tconst customInputPathManager = inputPathManager.clone({data: true, path: true});\r\n\t\treturn modelPathManager.value(customInputPathManager);\r\n\t}\r\n\r\n\tstatic validateAllPropertySchema(modelPathManager, inputPathManager) {\r\n\t\tconst allPropertySchema = new Schema(modelPathManager.clone(), false);\r\n\t\tfor (const property in inputPathManager.value) {\r\n\t\t\tconst inputPropertyPathManager = inputPathManager.clone();\r\n\t\t\tinputPropertyPathManager.addPathSegment(property);\r\n\t\t\tconst validationResult = allPropertySchema.validate(inputPropertyPathManager, 'array');\r\n\t\t\tif (validationResult !== true) {\r\n\t\t\t\treturn validationResult;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}\r\n\r\n\tstatic validatePropertySchema(modelPathManager, inputPathManager) {\r\n\t\tfor (const property in modelPathManager.value) {\r\n\t\t\tconst modelPropertyPathManager = modelPathManager.clone();\r\n\t\t\tmodelPropertyPathManager.addPathSegment(property);\r\n\t\t\tconst propertySchema = new Schema(modelPropertyPathManager, false);\r\n\t\t\tconst inputPropertyPathManager = inputPathManager.clone();\r\n\t\t\tinputPropertyPathManager.addPathSegment(property);\r\n\t\t\tconst validationResult = propertySchema.validate(inputPropertyPathManager, 'array');\r\n\t\t\tif (validationResult !== true) {\r\n\t\t\t\treturn validationResult;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}\r\n\t\r\n\tconstructor(modelPathManager = {}, selfValidate = true) {\r\n\t\tthis.selfValidate = selfValidate;\r\n\t\tthis.modelPathManager = modelPathManager;\r\n\t}\r\n\r\n\tset modelPathManager(modelPathManager) {\r\n\t\tif (!(modelPathManager instanceof DataPathManager)) {\r\n\t\t\tmodelPathManager = new DataPathManager(modelPathManager);\r\n\t\t}\r\n\t\tthis._modelPathManager = modelPathManager;\r\n\t\tif (this.selfValidate) {\r\n\t\t\tconst schemaModel = new Schema(modelModel, false);\r\n\t\t\tschemaModel.validate(this.modelPathManager);\r\n\t\t}\r\n\t}\r\n\r\n\tget modelPathManager() {\r\n\t\treturn this._modelPathManager;\r\n\t}\r\n \r\n\tvalidate(inputPathManager, errorStyle = 'throw') {\r\n\r\n\t\tif (!(inputPathManager instanceof DataPathManager)) {\r\n\t\t\tinputPathManager = new DataPathManager(inputPathManager);\r\n\t\t}\r\n\r\n\t\tlet validationErrors = new ValidationErrors();\r\n\r\n\t\tif (Array.isArray(this.modelPathManager.value)) {\r\n\t\t\tfor (let modelIndex = 0; modelIndex < this.modelPathManager.value.length; modelIndex++) {\r\n\t\t\t\tconst modelItemPathManager = this.modelPathManager.clone();\r\n\t\t\t\tmodelItemPathManager.addPathSegment(modelIndex);\r\n\t\t\t\tconst validationResult = this._validate(modelItemPathManager, inputPathManager);\r\n\t\t\t\tif (validationResult === true) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tvalidationErrors.addError(validationResult);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tconst validationResult = this._validate(this.modelPathManager, inputPathManager);\r\n\t\t\tif (validationResult === true) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tvalidationErrors.addError(validationResult);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (errorStyle === 'throw') {\r\n\t\t\tthrow new Error(validationErrors.generateFormattedMessage());\r\n\t\t}\r\n\t\telse if (errorStyle === 'array') {\r\n\t\t\treturn validationErrors.errors;\r\n\t\t}\r\n\t\telse if (errorStyle === 'boolean') {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t_validate(modelPathManager, inputPathManager) {\r\n\t\tif (modelPathManager.value.required !== true) {\r\n\t\t\tif (inputPathManager.value === undefined || inputPathManager.value === null) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (const validationMethod of this.constructor.validationMethods) {\r\n\t\t\tif (modelPathManager.value.hasOwnProperty(validationMethod.property)) {\r\n\t\t\t\tconst validationMethodModelPathManager = modelPathManager.clone();\r\n\t\t\t\tvalidationMethodModelPathManager.addPathSegment(validationMethod.property);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tconst validationResult = validationMethod.method(validationMethodModelPathManager, inputPathManager);\r\n\t\t\t\t\tif (validationResult !== true) {\r\n\t\t\t\t\t\treturn validationResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tcatch (error) {\r\n\t\t\t\t\tif (error instanceof ValidationError) {\r\n\t\t\t\t\t\tif (!error.modelPathManager) {\r\n\t\t\t\t\t\t\terror.modelPathManager = validationMethodModelPathManager;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (!error.inputPathManager) {\r\n\t\t\t\t\t\t\terror.inputPathManager = inputPathManager;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\treturn error;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tthrow error;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}\r\n\r\n}\r\n\r\nSchema.ValidationError = ValidationError;\r\n\r\nmodule.exports = Schema;","const extend = require('@alexspirgel/extend');\r\nconst ValidationError = require('../classes/ValidationError.js');\r\n\r\nconst typeRestriction = (types) => {\r\n\tif (!Array.isArray(types)) {\r\n\t\ttypes = [types];\r\n\t}\r\n\treturn (inputPathManager) => {\r\n\t\tconst validationProperty = inputPathManager.removePathSegment();\r\n\t\tif (validationProperty === undefined || types.includes(inputPathManager.value.type)) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tlet typesString = ``;\r\n\t\t\tfor (let i = 0; i < types.length; i++) {\r\n\t\t\t\tconst type = types[i];\r\n\t\t\t\tif (i === 0) {\r\n\t\t\t\t\ttypesString += `'${type}'`;\r\n\t\t\t\t}\r\n\t\t\t\telse if (i < (types.length - 1)) {\r\n\t\t\t\t\ttypesString += `, '${type}'`;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tif (types.length > 2) {\r\n\t\t\t\t\t\ttypesString += `,`;\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttypesString += ` or '${type}'`;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tthrow new ValidationError(`The validation property '${validationProperty}' can only belong to a model with a type of ${typesString}.`);\r\n\t\t}\r\n\t};\r\n};\r\n\r\nconst modelPropertySchema = {\r\n\trequired: {\r\n\t\ttype: 'boolean'\r\n\t},\r\n\ttype: {\r\n\t\ttype: 'string',\r\n\t\texactValue: [\r\n\t\t\t'boolean',\r\n\t\t\t'number',\r\n\t\t\t'string',\r\n\t\t\t'array',\r\n\t\t\t'object',\r\n\t\t\t'function'\r\n\t\t]\r\n\t},\r\n\texactValue: {\r\n\t\tcustom: typeRestriction(['boolean', 'number', 'string'])\r\n\t},\r\n\tgreaterThan: {\r\n\t\ttype: 'number',\r\n\t\tcustom: typeRestriction('number')\r\n\t},\r\n\tgreaterThanOrEqualTo: {\r\n\t\ttype: 'number',\r\n\t\tcustom: typeRestriction('number')\r\n\t},\r\n\tlessThan: {\r\n\t\ttype: 'number',\r\n\t\tcustom: typeRestriction('number')\r\n\t},\r\n\tlessThanOrEqualTo: {\r\n\t\ttype: 'number',\r\n\t\tcustom: typeRestriction('number')\r\n\t},\r\n\tdivisibleBy: {\r\n\t\ttype: 'number',\r\n\t\tcustom: typeRestriction('number')\r\n\t},\r\n\tnotDivisibleBy: {\r\n\t\ttype: 'number',\r\n\t\tcustom: typeRestriction('number')\r\n\t},\r\n\tminimumCharacters: {\r\n\t\ttype: 'string',\r\n\t\tcustom: typeRestriction('string')\r\n\t},\r\n\tmaximumCharacters: {\r\n\t\ttype: 'string',\r\n\t\tcustom: typeRestriction('string')\r\n\t},\r\n\tminimumLength: {\r\n\t\ttype: 'number',\r\n\t\tcustom: typeRestriction('array')\r\n\t},\r\n\tmaximumLength: {\r\n\t\ttype: 'number',\r\n\t\tcustom: typeRestriction('array')\r\n\t},\r\n\tinstanceOf: {\r\n\t\tcustom: typeRestriction('object')\r\n\t},\r\n\tallowUnvalidatedProperties: {\r\n\t\ttype: 'boolean',\r\n\t\tcustom: typeRestriction('object')\r\n\t},\r\n\tcustom: {\r\n\t\ttype: 'function'\r\n\t},\r\n\tpropertySchema: {\r\n\t\ttype: 'object',\r\n\t\tcustom: typeRestriction(['array', 'object'])\r\n\t}\r\n};\r\n\r\nconst modelObject = {\r\n\ttype: 'object',\r\n\tpropertySchema: modelPropertySchema\r\n};\r\n\r\nconst modelArray = {\r\n\ttype: 'array',\r\n\tallPropertySchema: {\r\n\t\ttype: 'object',\r\n\t\tpropertySchema: modelPropertySchema\r\n\t}\r\n};\r\n\r\nconst model = [\r\n\tmodelObject,\r\n\tmodelArray\r\n];\r\n\r\nconst modelTypeRestricted = [\r\n\textend({}, modelObject, {custom: typeRestriction(['array', 'object'])}),\r\n\textend({}, modelArray, {custom: typeRestriction(['array', 'object'])})\r\n];\r\n\r\nmodelPropertySchema.allPropertySchema = modelTypeRestricted;\r\nmodelPropertySchema.propertySchema.allPropertySchema = model;\r\n\r\nmodule.exports = model;","const optionsSchema = require('./options-schema.js');\nconst extend = require('@alexspirgel/extend');\n\nconst transitionAuto = (function () {\n\n\tfunction prefixedError(message) {\n\t\tthrow new Error('transitionAuto error: ' + message);\n\t}\n\n\tfunction debug(options, ...messages) {\n\t\tif (options.debug) {\n\t\t\tconsole.log('transitionAuto debug: ', ...messages);\n\t\t}\n\t}\n\n\tfunction normalizeOptions(options) {\n\t\toptions = extend({}, options);\n\n\t\tif (options.innerElement === undefined || options.innerElement === null) {\n\t\t\tif (options.element.children.length > 0) {\n\t\t\t\toptions.innerElement = options.element.children[0];\n\t\t\t}\n\t\t\telse {\n\t\t\t\tprefixedError(`'options.element' must have at least one child element to use as 'options.innerElement'.`);\n\t\t\t}\n\t\t}\n\n\t\tif (typeof options.value === 'number') {\n\t\t\toptions.value += 'px';\n\t\t}\n\n\t\tif (options.suppressDuplicates === undefined) {\n\t\t\toptions.suppressDuplicates = true;\n\t\t}\n\n\t\tif (options.debug === undefined) {\n\t\t\toptions.debug = false;\n\t\t}\n\n\t\treturn options;\n\t}\n\n\tfunction setValue(options) {\n\t\toptions.element.transitionAutoValue = options.value;\n\t\tconst computedStyle = getComputedStyle(options.element);\n\t\toptions.element.style[options.property] = computedStyle[options.property];\n\t\toptions.element.offsetHeight; // This line does nothing but force the element to repaint so transitions work properly.\n\t\t\n\t\tlet hasTransition = false;\n\t\tconst transitionPropertyValues = computedStyle.transitionProperty.split(', ');\n\t\tconst transitionDurationValues = computedStyle.transitionDuration.split(', ');\n\t\tfor (let i = 0; i < transitionPropertyValues.length; i++) {\n\t\t\tif (transitionPropertyValues[i] === 'all' || transitionPropertyValues[i] === options.property) {\n\t\t\t\tconst transitionDuration = transitionDurationValues[i] ? transitionDurationValues[i] : transitionDurationValues[0];\n\t\t\t\tif (transitionDuration !== '0s') {\n\t\t\t\t\thasTransition = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasTransition) {\n\t\t\tdebug(options, 'transition detected.');\n\t\t\tif (options.value === 'auto') {\n\t\t\t\tconst elementDimensions = options.element.getBoundingClientRect();\n\t\t\t\tconst innerElementDimensions = options.innerElement.getBoundingClientRect();\n\t\t\t\tif (elementDimensions[options.property] !== innerElementDimensions[options.property]) {\n\t\t\t\t\toptions.element.transitionAutoBoundHandler = transitionendHandler.bind(options);\n\t\t\t\t\toptions.element.addEventListener('transitionend', options.element.transitionAutoBoundHandler);\n\t\t\t\t\toptions.element.style[options.property] = innerElementDimensions[options.property] + 'px';\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (options.element.style[options.property] !== options.value) {\n\t\t\t\t\toptions.element.transitionAutoBoundHandler = transitionendHandler.bind(options);\n\t\t\t\t\toptions.element.addEventListener('transitionend', options.element.transitionAutoBoundHandler);\n\t\t\t\t\toptions.element.style[options.property] = options.value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tdebug(options, 'immediate fallback.');\n\t\toptions.element.style[options.property] = options.value;\n\t\tonComplete(options);\n\t}\n\t\n\tfunction transitionendHandler(event) {\n\t\tif (event.propertyName === this.property) {\n\t\t\tif (this.element.transitionAutoBoundHandler) {\n\t\t\t\tthis.element.removeEventListener('transitionend', this.element.transitionAutoBoundHandler);\n\t\t\t\tdelete this.element.transitionAutoBoundHandler;\n\t\t\t}\n\t\t\tif (this.value === 'auto') {\n\t\t\t\tthis.element.style[this.property] = this.value;\n\t\t\t}\n\t\t}\n\t\tonComplete(this);\n\t}\n\n\tfunction onComplete(options) {\n\t\tif (options.element.transitionAutoValue) {\n\t\t\tdelete options.element.transitionAutoValue;\n\t\t}\n\t\tif (options.onComplete) {\n\t\t\toptions.onComplete(options);\n\t\t}\n\t}\n\n\treturn function (options) {\n\t\ttry {\n\t\t\toptionsSchema.validate(options);\n\t\t}\n\t\tcatch (error) {\n\t\t\tprefixedError(error);\n\t\t}\n\t\toptions = normalizeOptions(options);\n\t\tdebug(options, 'options:', options);\n\t\tif (options.suppressDuplicates && options.element.transitionAutoValue) {\n\t\t\tif (options.value === options.element.transitionAutoValue) {\n\t\t\t\tdebug(options, 'duplicate suppressed.');\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif (options.element.transitionAutoBoundHandler) {\n\t\t\toptions.element.removeEventListener('transitionend', options.element.transitionAutoBoundHandler);\n\t\t\tdelete options.element.transitionAutoBoundHandler;\n\t\t}\n\t\tsetValue(options);\n\t};\n\n})();\n\nmodule.exports = transitionAuto;","const Schema = require('@alexspirgel/schema');\n\nconst optionsModel = {\n\trequired: true,\n\ttype: 'object',\n\tallowUnvalidatedProperties: false,\n\tpropertySchema: {\n\t\telement: {\n\t\t\trequired: true,\n\t\t\ttype: 'object',\n\t\t\tinstanceOf: Element\n\t\t},\n\t\tinnerElement: {\n\t\t\ttype: 'object',\n\t\t\tinstanceOf: Element,\n\t\t\tcustom: (inputPathManager) => {\n\t\t\t\tconst innerElement = inputPathManager.value;\n\t\t\t\tinputPathManager.removePathSegment();\n\t\t\t\tconst element = inputPathManager.value.element;\n\t\t\t\tif (element.contains(innerElement) && element !== innerElement) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthrow new Schema.ValidationError(`'options.innerElement' must be contained within 'options.element'.`);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tproperty: {\n\t\t\trequired: true,\n\t\t\ttype: 'string',\n\t\t\texactValue: [\n\t\t\t\t'height',\n\t\t\t\t'width'\n\t\t\t]\n\t\t},\n\t\tvalue: [\n\t\t\t{\n\t\t\t\trequired: true,\n\t\t\t\ttype: 'number',\n\t\t\t\tgreaterThanOrEqualTo: 0\n\t\t\t},\n\t\t\t{\n\t\t\t\trequired: true,\n\t\t\t\ttype: 'string',\n\t\t\t\tcustom: (inputPathManager) => {\n\t\t\t\t\tconst value = inputPathManager.value;\n\t\t\t\t\tif (value.endsWith('px')) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthrow new Schema.ValidationError(`'options.value' string must end with 'px'.`);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\trequired: true,\n\t\t\t\ttype: 'string',\n\t\t\t\texactValue: 'auto'\n\t\t\t}\n\t\t],\n\t\tonComplete: {\n\t\t\ttype: 'function'\n\t\t},\n\t\tsuppressDuplicates: {\n\t\t\ttype: 'boolean'\n\t\t},\n\t\tdebug: {\n\t\t\ttype: 'boolean'\n\t\t}\n\t}\n};\n\nconst optionsSchema = new Schema(optionsModel);\n\nmodule.exports = optionsSchema;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","const transitionAuto = require(\"@alexspirgel/transition-auto\");\n\ndocument.addEventListener('DOMContentLoaded', () => {\n const gptSearchBlocks = document.querySelectorAll('.block-gpt-search');\n gptSearchBlocks.forEach((gptSearchBlock, index) => {\n if (gptSearchBlock) {\n gptSearchBlock.classList.add('animations-activated');\n\n // Generate unique selector IDs for each block\n const chatFormContainerId = `chat-form-container-${index}`;\n const resultsContainerId = `results-container-${index}`;\n const chatResultContainerId = `chat-result-container-${index}`;\n const chatRecommendationsContainerId = `chat-recommendations-container-${index}`;\n\n // Assign unique IDs to elements within each block\n gptSearchBlock.querySelector('.chat-form-container').id = chatFormContainerId;\n gptSearchBlock.querySelector('.chat-result-container').id = chatResultContainerId;\n gptSearchBlock.querySelector('.chat-recommendations-container').id = chatRecommendationsContainerId;\n\n (async () => {\n const domainName = mqSettings?.modernquery_domain_name ?? 'www.easternstandard.com';\n let mqInstance = new ModernQuery({\n labels: {\n chat_button_submit: 'ASK A QUESTION',\n chat_button_submit_after: 'ASK ANOTHER QUESTION'\n },\n selectors: {\n chat_form_container: `#${chatFormContainerId}`,\n results_container: `#${resultsContainerId}`,\n chat_result_container: `#${chatResultContainerId}`,\n chat_recommendations_container: `#${chatRecommendationsContainerId}`\n },\n elements: {\n results_item: 'article'\n },\n results: {\n title_parse: '| Eastern Standard',\n title_parse_regex: false,\n meta_description_as_snippet: true\n },\n callbacks: {\n chat_text_render: {\n before: () =>{\n var chatResultAndRecommendationsContainer = gptSearchBlock.querySelector(`#${chatRecommendationsContainerId}`).parentNode.parentNode;\n var parentElement = chatResultAndRecommendationsContainer.parentNode;\n var closeButtonElement = parentElement.querySelector('.chatResultContainer-close-button');\n if (closeButtonElement) {\n closeButtonElement.remove();\n }\n },\n after: () => {\n var block_gpt_search__content = gptSearchBlock.querySelector(`#${chatFormContainerId}`).parentNode.parentNode;\n if (window.matchMedia(\"(max-width: 450px)\").matches) {\n block_gpt_search__content.style.marginTop = '0';\n }\n transitionAuto({\n element: gptSearchBlock.querySelector(`#${chatRecommendationsContainerId}`).parentNode.parentNode,\n innerElement: gptSearchBlock.querySelector(`#${chatRecommendationsContainerId}`).parentNode,\n property: 'height',\n value: 'auto'\n });\n var chatResultContainer = gptSearchBlock.querySelector(`#${chatResultContainerId} span`);\n if (chatResultContainer) {\n chatResultContainer.innerHTML = chatResultContainer.innerHTML.replace(\n 'For more detailed information, you can always reference the links below.',\n ''\n );\n var newDiv = document.createElement('div');\n newDiv.className = 'chatResultContainer-contact-us';\n var newSpan = document.createElement('span');\n newSpan.className = 'chatResultContainer-span-class';\n newSpan.textContent = 'If you have specific questions or would like to discuss how we can assist you, feel free to ';\n var newLink = document.createElement('a');\n newLink.className = 'chatResultContainer-link-class';\n newLink.href = '/contact-us/';\n newLink.textContent = 'contact us';\n newDiv.appendChild(newSpan);\n newDiv.appendChild(newLink);\n chatResultContainer.appendChild(newDiv);\n\n // Create the close button with SVG and add a class to it\n var closeButton = document.createElement('button');\n closeButton.className = 'chatResultContainer-close-button';\n\n // SVG code for the X (close button)\n var svgContent = `\n \n \n \n \n `;\n\n // Insert the SVG into the button\n closeButton.innerHTML = svgContent;\n\n // Append the close button to the container\n var chatResultAndRecommendationsContainer = gptSearchBlock.querySelector(`#${chatRecommendationsContainerId}`).parentNode.parentNode;\n // var chat_result_container = gptSearchBlock.querySelector('.chat-result-container');\n // var chat_recommendations_container = gptSearchBlock.querySelector('.chat-recommendations-container');\n\n\n chatResultAndRecommendationsContainer.style.position = 'relative';\n var parentElement = chatResultAndRecommendationsContainer.parentNode;\n\n // Insert the close button right before the chat-result-and-recommendations-container\n if (!parentElement.querySelector('.chatResultContainer-close-button')) {\n parentElement.insertBefore(closeButton, chatResultAndRecommendationsContainer);\n }\n\n // Add click event to the close button to clear content\n closeButton.addEventListener('click', function() {\n var chat_result_containers = document.querySelectorAll('.chat-result-container');\n var chat_recommendations_containers = document.querySelectorAll('.chat-recommendations-container');\n chat_result_containers.forEach(function(element) {\n element.innerHTML = '';\n });\n chat_recommendations_containers.forEach(function(element) {\n element.innerHTML = '';\n });\n var closeButtons = document.querySelectorAll('.chatResultContainer-close-button');\n closeButtons.forEach(function(button) {\n button.remove();\n });\n closeButton.remove();\n var chatFormContainer = document.getElementById(chatFormContainerId);\n if (chatFormContainer) {\n // Find all input elements inside the chatFormContainer\n var inputs = chatFormContainer.querySelectorAll('input[type=\"text\"]');\n // Loop through each input and clear its value\n inputs.forEach(function(input) {\n input.value = '';\n });\n }\n });\n\n setButtonWidth(gptSearchBlock);\n\n }\n\n setButtonWidth(gptSearchBlock);\n }\n }\n }\n });\n\n mqInstance.setDomainName(domainName);\n mqInstance.setOrgName('Eastern Standard');\n\t\t\t\t\t\t\t\tmqInstance.setPropertyId( window.mqSettings?.modernquery_property_key ?? 'sg1v6iuv2d');\n mqInstance.chat.renderForm();\n mqInstance.events.apply();\n })();\n }\n });\n\n const openOverlayLink = document.querySelector('a[href=\"#ai-search\"]');\n const overlay = document.getElementById('ai-search-overlay');\n const closeOverlayButton = document.getElementById('close-overlay');\n if (openOverlayLink && overlay && closeOverlayButton) {\n openOverlayLink.addEventListener('click', function (e) {\n e.preventDefault();\n overlay.style.display = 'block';\n });\n\n closeOverlayButton.addEventListener('click', function () {\n overlay.style.display = 'none';\n });\n }\n\n // New code to handle click on custom-link\n const customLink = document.querySelector('.custom-link');\n\n if (customLink) {\n customLink.addEventListener('click', function (e) {\n e.preventDefault();\n overlay.style.display = 'block';\n });\n }\n\n});\n\nfunction setButtonWidth(gptSearchBlock) {\n const button = gptSearchBlock.querySelector('.search-chat-submit');\n if (button) {\n if (window.innerWidth <= 715) {\n // Very small screens\n button.style.width = '100%';\n } else if (window.innerWidth <= 932) {\n // Medium screens\n button.style.width = '59%';\n }\n }\n}\n"],"names":["isPlainObject","extend","arguments","argumentIndex","merge","mergeIsArray","target","length","Array","isArray","property","undefined","module","exports","value","Object","prototype","toString","call","getPrototypeOf","constructor","data","path","this","Error","_path","addPathSegment","pathSegment","push","removePathSegment","splice","error","clone","options","DataPathManager","ValidationError","params","super","modelPathManager","_modelPathManager","inputPathManager","_inputPathManager","errors","addError","singleError","generateFormattedMessage","message","inputPath","map","join","modelPath","ValidationErrors","modelModel","Schema","validationMethods","method","validateRequired","validateType","validateExactValue","validateGreaterThan","validateGreaterThanOrEqualTo","validateLessThan","validateLessThanOrEqualTo","validateDivisibleBy","validateNotDivisibleBy","validateMinimumCharacters","validateMaximumCharacters","validateMinimumLength","validateMaximumLength","validateInstanceOf","validateAllowUnvalidatedProperties","validateCustom","validateAllPropertySchema","validatePropertySchema","static","isNaN","flag","validatedProperties","keys","includes","customInputPathManager","allPropertySchema","inputPropertyPathManager","validationResult","validate","modelPropertyPathManager","propertySchema","selfValidate","errorStyle","validationErrors","modelIndex","modelItemPathManager","_validate","required","validationMethod","hasOwnProperty","validationMethodModelPathManager","typeRestriction","types","validationProperty","type","typesString","i","modelPropertySchema","exactValue","custom","greaterThan","greaterThanOrEqualTo","lessThan","lessThanOrEqualTo","divisibleBy","notDivisibleBy","minimumCharacters","maximumCharacters","minimumLength","maximumLength","instanceOf","allowUnvalidatedProperties","modelObject","modelArray","model","modelTypeRestricted","optionsSchema","transitionAuto","prefixedError","debug","messages","console","log","transitionendHandler","event","propertyName","element","transitionAutoBoundHandler","removeEventListener","style","onComplete","transitionAutoValue","innerElement","children","suppressDuplicates","normalizeOptions","computedStyle","getComputedStyle","offsetHeight","hasTransition","transitionPropertyValues","transitionProperty","split","transitionDurationValues","transitionDuration","elementDimensions","getBoundingClientRect","innerElementDimensions","bind","addEventListener","setValue","optionsModel","Element","contains","endsWith","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","setButtonWidth","gptSearchBlock","button","querySelector","window","innerWidth","width","document","querySelectorAll","forEach","index","classList","add","chatFormContainerId","resultsContainerId","chatResultContainerId","chatRecommendationsContainerId","id","domainName","mqSettings","modernquery_domain_name","mqInstance","ModernQuery","labels","chat_button_submit","chat_button_submit_after","selectors","chat_form_container","results_container","chat_result_container","chat_recommendations_container","elements","results_item","results","title_parse","title_parse_regex","meta_description_as_snippet","callbacks","chat_text_render","before","closeButtonElement","parentNode","remove","after","block_gpt_search__content","matchMedia","matches","marginTop","chatResultContainer","innerHTML","replace","newDiv","createElement","className","newSpan","textContent","newLink","href","appendChild","closeButton","chatResultAndRecommendationsContainer","position","parentElement","insertBefore","chat_result_containers","chat_recommendations_containers","chatFormContainer","getElementById","input","setDomainName","setOrgName","setPropertyId","modernquery_property_key","chat","renderForm","events","apply","openOverlayLink","overlay","closeOverlayButton","e","preventDefault","display","customLink"],"sourceRoot":""}