@kohost/api-client 4.0.11 → 4.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ import{ValidationError}from"./chunk-EBJTC6MA.js";import{__commonJS}from"./chunk-HKJ2B2AA.js";var require_fast_deep_equal=__commonJS({"node_modules/fast-deep-equal/index.js"(exports,module){module.exports=function equal(a,b){if(a===b)return!0;if(a&&b&&"object"==typeof a&&"object"==typeof b){if(a.constructor!==b.constructor)return!1;var length,i,keys;if(Array.isArray(a)){if((length=a.length)!=b.length)return!1;for(i=length;0!=i--;)if(!equal(a[i],b[i]))return!1;return!0}if(a.constructor===RegExp)return a.source===b.source&&a.flags===b.flags;if(a.valueOf!==Object.prototype.valueOf)return a.valueOf()===b.valueOf();if(a.toString!==Object.prototype.toString)return a.toString()===b.toString();if((length=(keys=Object.keys(a)).length)!==Object.keys(b).length)return!1;for(i=length;0!=i--;)if(!Object.prototype.hasOwnProperty.call(b,keys[i]))return!1;for(i=length;0!=i--;){var key=keys[i];if(!equal(a[key],b[key]))return!1}return!0}return a!=a&&b!=b}}}),require_equal=__commonJS({"node_modules/ajv/dist/runtime/equal.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});var equal=require_fast_deep_equal();equal.code='require("ajv/dist/runtime/equal").default',exports.default=equal}}),require_ucs2length=__commonJS({"node_modules/ajv/dist/runtime/ucs2length.js"(exports){function ucs2length(str){const len=str.length;let value,length=0,pos=0;for(;pos<len;)length++,value=str.charCodeAt(pos++),value>=55296&&value<=56319&&pos<len&&(value=str.charCodeAt(pos),56320==(64512&value)&&pos++);return length}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=ucs2length,ucs2length.code='require("ajv/dist/runtime/ucs2length").default'}}),require_formats=__commonJS({"node_modules/ajv-formats/dist/formats.js"(exports){function fmtDef(validate,compare){return{validate:validate,compare:compare}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.formatNames=exports.fastFormats=exports.fullFormats=void 0,exports.fullFormats={date:fmtDef(date,compareDate),time:fmtDef(getTime(!0),compareTime),"date-time":fmtDef(getDateTime(!0),compareDateTime),"iso-time":fmtDef(getTime(),compareIsoTime),"iso-date-time":fmtDef(getDateTime(),compareIsoDateTime),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function uri(str){return NOT_URI_FRAGMENT.test(str)&&URI.test(str)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-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-f]{1,4}:){5}(((:[0-9a-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-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-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-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-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-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-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-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-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-f]{1,4}){1,7})|((:[0-9a-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}))|:)))$/i,regex:function regex(str){if(Z_ANCHOR.test(str))return!1;try{return new RegExp(str),!0}catch(e){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function byte(str){return BYTE.lastIndex=0,BYTE.test(str)},int32:{type:"number",validate:function validateInt32(value){return Number.isInteger(value)&&value<=2147483647&&value>=-2147483648}},int64:{type:"number",validate:function validateInt64(value){return Number.isInteger(value)}},float:{type:"number",validate:validateNumber},double:{type:"number",validate:validateNumber},password:!0,binary:!0},exports.fastFormats={...exports.fullFormats,date:fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,compareDate),time:fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,compareTime),"date-time":fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,compareDateTime),"iso-time":fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,compareIsoTime),"iso-date-time":fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,compareIsoDateTime),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},exports.formatNames=Object.keys(exports.fullFormats);var DATE=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,DAYS=[0,31,28,31,30,31,30,31,31,30,31,30,31];function date(str){const matches=DATE.exec(str);if(!matches)return!1;const year=+matches[1],month=+matches[2],day=+matches[3];return month>=1&&month<=12&&day>=1&&day<=(2===month&&function isLeapYear(year){return year%4==0&&(year%100!=0||year%400==0)}(year)?29:DAYS[month])}function compareDate(d1,d2){if(d1&&d2)return d1>d2?1:d1<d2?-1:0}var TIME=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function getTime(strictTimeZone){return function time(str){const matches=TIME.exec(str);if(!matches)return!1;const hr=+matches[1],min=+matches[2],sec=+matches[3],tz=matches[4],tzSign="-"===matches[5]?-1:1,tzH=+(matches[6]||0),tzM=+(matches[7]||0);if(tzH>23||tzM>59||strictTimeZone&&!tz)return!1;if(hr<=23&&min<=59&&sec<60)return!0;const utcMin=min-tzM*tzSign,utcHr=hr-tzH*tzSign-(utcMin<0?1:0);return(23===utcHr||-1===utcHr)&&(59===utcMin||-1===utcMin)&&sec<61}}function compareTime(s1,s2){if(!s1||!s2)return;const t1=new Date("2020-01-01T"+s1).valueOf(),t2=new Date("2020-01-01T"+s2).valueOf();return t1&&t2?t1-t2:void 0}function compareIsoTime(t1,t2){if(!t1||!t2)return;const a1=TIME.exec(t1),a2=TIME.exec(t2);return a1&&a2?(t1=a1[1]+a1[2]+a1[3])>(t2=a2[1]+a2[2]+a2[3])?1:t1<t2?-1:0:void 0}var DATE_TIME_SEPARATOR=/t|\s/i;function getDateTime(strictTimeZone){const time=getTime(strictTimeZone);return function date_time(str){const dateTime=str.split(DATE_TIME_SEPARATOR);return 2===dateTime.length&&date(dateTime[0])&&time(dateTime[1])}}function compareDateTime(dt1,dt2){if(!dt1||!dt2)return;const d1=new Date(dt1).valueOf(),d2=new Date(dt2).valueOf();return d1&&d2?d1-d2:void 0}function compareIsoDateTime(dt1,dt2){if(!dt1||!dt2)return;const[d1,t1]=dt1.split(DATE_TIME_SEPARATOR),[d2,t2]=dt2.split(DATE_TIME_SEPARATOR),res=compareDate(d1,d2);return void 0!==res?res||compareTime(t1,t2):void 0}var NOT_URI_FRAGMENT=/\/|:/,URI=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;var BYTE=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function validateNumber(){return!0}var Z_ANCHOR=/[^\\]\\Z/}}),Entity=class{constructor(data){if(!this.schema)throw new Error("Schema is not defined");if(!this.validator)throw new Error("Validator is not defined");this.#validate(data)}get schemaProperties(){return Object.keys(this.validator.schema.properties)}#validate(data){if(!this.validator(data))throw new ValidationError(`Invalid ${this.constructor.name}`,{cause:this.validator.errors})}},validateAlarm=validate10,schema11={$schema:"http://json-schema.org/draft-07/schema",$id:"alarm.json",title:"Alarm",description:"Any smart alarm system",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string",description:"Name of the alarm"},offline:{type:"boolean"},type:{type:"string",enum:["alarm"],default:"alarm"},systemId:{$ref:"definitions.json#/definitions/systemId"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},areas:{type:"array",items:{type:"object",properties:{number:{type:"number"},name:{type:"string"},securityMode:{type:["string","null"],enum:["arming","disarming","armed","disarmed","alarm",null]}},additionalProperties:!1}},zones:{type:"array",items:{type:"object",properties:{number:{type:"number",minimum:0},name:{type:"string"},secure:{type:["boolean","null"]},bypassed:{type:["boolean","null"]}},additionalProperties:!1}},chime:{type:"boolean",description:"Reflects whether console chime is enabled"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"},address:{$ref:"definitions.json#/definitions/address"}},required:["id","type","areas","zones","driver"]},schema15={type:"array",uniqueItems:!0,items:{enum:["button 1","button 2","button 3","button 4","button 5","idle","powerHasBeedApplied","acMainsDisconnected","acMainsReconnected","replaceBatterySoon","replaceBatteryNow","batteryOk","hardwareFailure","softwareFailure","hardwareFailureWithCode","softwareFailureWithCode","motionDetection","airFilterNeedsCleaned","airFilterNeedsReplaced","smokeDetected","outsideSafeTemperatureRange","outsideSafeHumidityRange","scheduleMaintenance","doorAjar","communicationFailure","communicationOk","burglarAlarm","fireAlarm"]}},schema18={type:"string",description:"Driver used to communicate with the object.",enum:["adlink","aws-kinesis","butler","crestron","dell","dmp","doorbird","dormakaba","dsc","ecobee","epson","geovision-rs","geovision-as-manager","honeywell-vista","igor","inncom","isapi","kohost-k7","kohost","lg","lg-webos","lapi","lirc","mews","mht","paxton","pelican-wireless","power-shades","rachio","rebrandly","relay","rtsp","salto","salto-irn","samsung","se","sendgrid","sonifi","stay-n-touch","storable","twilio","unifi","valcom","vizio","wisenet","cloudflare-images","cloudflare-stream","insperia-privacy"]},func0=require_equal().default,func3=require_ucs2length().default,schema16={type:["object","null"],properties:{name:{type:"string",$ref:"#/definitions/supportedNotifications/items"},timestamp:{type:"number",minimum:1655907956593},description:{type:"string"}}},schema17={enum:["button 1","button 2","button 3","button 4","button 5","idle","powerHasBeedApplied","acMainsDisconnected","acMainsReconnected","replaceBatterySoon","replaceBatteryNow","batteryOk","hardwareFailure","softwareFailure","hardwareFailureWithCode","softwareFailureWithCode","motionDetection","airFilterNeedsCleaned","airFilterNeedsReplaced","smokeDetected","outsideSafeTemperatureRange","outsideSafeHumidityRange","scheduleMaintenance","doorAjar","communicationFailure","communicationOk","burglarAlarm","fireAlarm"]};function validate12(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate12.errors=vErrors,0===errors}function validate10(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="alarm"),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.areas){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"areas"},message:"must have required property 'areas'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.zones){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"zones"},message:"must have required property 'zones'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.driver){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err6={};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(_errs5===errors){const err7={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err8={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0!==data.offline&&"boolean"!=typeof data.offline){const err9={instancePath:instancePath+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}let data3=data.type;if("string"!=typeof data3){const err10={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("alarm"!==data3){const err11={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema11.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err12={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.supportedNotifications){let data5=data.supportedNotifications;if(Array.isArray(data5)){const len0=data5.length;for(let i0=0;i0<len0;i0++){let data6=data5[i0];if("button 1"!==data6&&"button 2"!==data6&&"button 3"!==data6&&"button 4"!==data6&&"button 5"!==data6&&"idle"!==data6&&"powerHasBeedApplied"!==data6&&"acMainsDisconnected"!==data6&&"acMainsReconnected"!==data6&&"replaceBatterySoon"!==data6&&"replaceBatteryNow"!==data6&&"batteryOk"!==data6&&"hardwareFailure"!==data6&&"softwareFailure"!==data6&&"hardwareFailureWithCode"!==data6&&"softwareFailureWithCode"!==data6&&"motionDetection"!==data6&&"airFilterNeedsCleaned"!==data6&&"airFilterNeedsReplaced"!==data6&&"smokeDetected"!==data6&&"outsideSafeTemperatureRange"!==data6&&"outsideSafeHumidityRange"!==data6&&"scheduleMaintenance"!==data6&&"doorAjar"!==data6&&"communicationFailure"!==data6&&"communicationOk"!==data6&&"burglarAlarm"!==data6&&"fireAlarm"!==data6){const err13={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}let j0,i1=data5.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data5[i1],data5[j0])){const err14={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++;break outer0}}else{const err15={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.notification&&(validate12(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate12.errors:vErrors.concat(validate12.errors),errors=vErrors.length)),void 0!==data.driver){let data8=data.driver;if("string"!=typeof data8){const err16={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if("adlink"!==data8&&"aws-kinesis"!==data8&&"butler"!==data8&&"crestron"!==data8&&"dell"!==data8&&"dmp"!==data8&&"doorbird"!==data8&&"dormakaba"!==data8&&"dsc"!==data8&&"ecobee"!==data8&&"epson"!==data8&&"geovision-rs"!==data8&&"geovision-as-manager"!==data8&&"honeywell-vista"!==data8&&"igor"!==data8&&"inncom"!==data8&&"isapi"!==data8&&"kohost-k7"!==data8&&"kohost"!==data8&&"lg"!==data8&&"lg-webos"!==data8&&"lapi"!==data8&&"lirc"!==data8&&"mews"!==data8&&"mht"!==data8&&"paxton"!==data8&&"pelican-wireless"!==data8&&"power-shades"!==data8&&"rachio"!==data8&&"rebrandly"!==data8&&"relay"!==data8&&"rtsp"!==data8&&"salto"!==data8&&"salto-irn"!==data8&&"samsung"!==data8&&"se"!==data8&&"sendgrid"!==data8&&"sonifi"!==data8&&"stay-n-touch"!==data8&&"storable"!==data8&&"twilio"!==data8&&"unifi"!==data8&&"valcom"!==data8&&"vizio"!==data8&&"wisenet"!==data8&&"cloudflare-images"!==data8&&"cloudflare-stream"!==data8&&"insperia-privacy"!==data8){const err17={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}if(void 0!==data.areas){let data9=data.areas;if(Array.isArray(data9)){const len1=data9.length;for(let i2=0;i2<len1;i2++){let data10=data9[i2];if(data10&&"object"==typeof data10&&!Array.isArray(data10)){for(const key0 in data10)if("number"!==key0&&"name"!==key0&&"securityMode"!==key0){const err18={instancePath:instancePath+"/areas/"+i2,schemaPath:"#/properties/areas/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0!==data10.number&&"number"!=typeof data10.number){const err19={instancePath:instancePath+"/areas/"+i2+"/number",schemaPath:"#/properties/areas/items/properties/number/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data10.name&&"string"!=typeof data10.name){const err20={instancePath:instancePath+"/areas/"+i2+"/name",schemaPath:"#/properties/areas/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0!==data10.securityMode){let data13=data10.securityMode;if("string"!=typeof data13&&null!==data13){const err21={instancePath:instancePath+"/areas/"+i2+"/securityMode",schemaPath:"#/properties/areas/items/properties/securityMode/type",keyword:"type",params:{type:schema11.properties.areas.items.properties.securityMode.type},message:"must be string,null"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if("arming"!==data13&&"disarming"!==data13&&"armed"!==data13&&"disarmed"!==data13&&"alarm"!==data13&&null!==data13){const err22={instancePath:instancePath+"/areas/"+i2+"/securityMode",schemaPath:"#/properties/areas/items/properties/securityMode/enum",keyword:"enum",params:{allowedValues:schema11.properties.areas.items.properties.securityMode.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}}else{const err23={instancePath:instancePath+"/areas/"+i2,schemaPath:"#/properties/areas/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}}}else{const err24={instancePath:instancePath+"/areas",schemaPath:"#/properties/areas/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}if(void 0!==data.zones){let data14=data.zones;if(Array.isArray(data14)){const len2=data14.length;for(let i3=0;i3<len2;i3++){let data15=data14[i3];if(data15&&"object"==typeof data15&&!Array.isArray(data15)){for(const key1 in data15)if("number"!==key1&&"name"!==key1&&"secure"!==key1&&"bypassed"!==key1){const err25={instancePath:instancePath+"/zones/"+i3,schemaPath:"#/properties/zones/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data15.number){let data16=data15.number;if("number"==typeof data16){if(data16<0||isNaN(data16)){const err26={instancePath:instancePath+"/zones/"+i3+"/number",schemaPath:"#/properties/zones/items/properties/number/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}else{const err27={instancePath:instancePath+"/zones/"+i3+"/number",schemaPath:"#/properties/zones/items/properties/number/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}}if(void 0!==data15.name&&"string"!=typeof data15.name){const err28={instancePath:instancePath+"/zones/"+i3+"/name",schemaPath:"#/properties/zones/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if(void 0!==data15.secure){let data18=data15.secure;if("boolean"!=typeof data18&&null!==data18){const err29={instancePath:instancePath+"/zones/"+i3+"/secure",schemaPath:"#/properties/zones/items/properties/secure/type",keyword:"type",params:{type:schema11.properties.zones.items.properties.secure.type},message:"must be boolean,null"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}}if(void 0!==data15.bypassed){let data19=data15.bypassed;if("boolean"!=typeof data19&&null!==data19){const err30={instancePath:instancePath+"/zones/"+i3+"/bypassed",schemaPath:"#/properties/zones/items/properties/bypassed/type",keyword:"type",params:{type:schema11.properties.zones.items.properties.bypassed.type},message:"must be boolean,null"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}}}else{const err31={instancePath:instancePath+"/zones/"+i3,schemaPath:"#/properties/zones/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}}}else{const err32={instancePath:instancePath+"/zones",schemaPath:"#/properties/zones/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}}if(void 0!==data.chime&&"boolean"!=typeof data.chime){const err33={instancePath:instancePath+"/chime",schemaPath:"#/properties/chime/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}if(void 0!==data.watts){let data21=data.watts;if("number"==typeof data21){if(data21<0||isNaN(data21)){const err34={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}}else{const err35={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err36={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err37={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err38={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err39={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}if(void 0!==data.address){let data26=data.address;if(data26&&"object"==typeof data26&&!Array.isArray(data26)){if(void 0!==data26.id&&"string"!=typeof data26.id){const err40={instancePath:instancePath+"/address/id",schemaPath:"definitions.json#/definitions/address/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}if(void 0!==data26.line1&&"string"!=typeof data26.line1){const err41={instancePath:instancePath+"/address/line1",schemaPath:"definitions.json#/definitions/address/properties/line1/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}if(void 0!==data26.line2&&"string"!=typeof data26.line2){const err42={instancePath:instancePath+"/address/line2",schemaPath:"definitions.json#/definitions/address/properties/line2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}if(void 0!==data26.line3&&"string"!=typeof data26.line3){const err43={instancePath:instancePath+"/address/line3",schemaPath:"definitions.json#/definitions/address/properties/line3/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}if(void 0!==data26.city&&"string"!=typeof data26.city){const err44={instancePath:instancePath+"/address/city",schemaPath:"definitions.json#/definitions/address/properties/city/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}if(void 0!==data26.state&&"string"!=typeof data26.state){const err45={instancePath:instancePath+"/address/state",schemaPath:"definitions.json#/definitions/address/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}if(void 0!==data26.postalCode&&"string"!=typeof data26.postalCode){const err46={instancePath:instancePath+"/address/postalCode",schemaPath:"definitions.json#/definitions/address/properties/postalCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}if(void 0!==data26.countryCode){let data34=data26.countryCode;if("string"==typeof data34){if(func3(data34)>2){const err47={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}if(func3(data34)<2){const err48={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}}else{const err49={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err49]:vErrors.push(err49),errors++}}}else{const err50={instancePath:instancePath+"/address",schemaPath:"definitions.json#/definitions/address/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err50]:vErrors.push(err50),errors++}}}else{const err51={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err51]:vErrors.push(err51),errors++}return validate10.errors=vErrors,0===errors}var validateAnnouncement=function validate14(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){void 0===data.type&&(data.type="announcement");for(const key0 in data)if(!func5.call(schema21.properties,key0)){const err0={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err1={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err2={};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(_errs6===errors){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err4={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if("announcement"!==data1){const err5={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema21.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0!==data.users){let data2=data.users;if(Array.isArray(data2)){if(data2.length<1){const err6={instancePath:instancePath+"/users",schemaPath:"#/properties/users/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}const len0=data2.length;for(let i0=0;i0<len0;i0++)if("string"!=typeof data2[i0]){const err7={instancePath:instancePath+"/users/"+i0,schemaPath:"#/properties/users/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}}else{const err8={instancePath:instancePath+"/users",schemaPath:"#/properties/users/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}if(void 0!==data.group&&"string"!=typeof data.group){const err9={instancePath:instancePath+"/group",schemaPath:"#/properties/group/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0!==data.body&&"string"!=typeof data.body){const err10={instancePath:instancePath+"/body",schemaPath:"#/properties/body/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data.media&&(validate15(data.media,{instancePath:instancePath+"/media",parentData:data,parentDataProperty:"media",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length)),void 0!==data.sentBy&&"string"!=typeof data.sentBy){const err11={instancePath:instancePath+"/sentBy",schemaPath:"#/properties/sentBy/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.tags){let data8=data.tags;if(Array.isArray(data8)){const len1=data8.length;for(let i1=0;i1<len1;i1++)if("string"!=typeof data8[i1]){const err12={instancePath:instancePath+"/tags/"+i1,schemaPath:"#/properties/tags/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}else{const err13={instancePath:instancePath+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.createdAt){let data10=data.createdAt;if("string"!=typeof data10&&(!data10||"object"!=typeof data10||Array.isArray(data10))){const err14={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if("string"==typeof data10&&!formats4.validate(data10)){const err15={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.updatedAt){let data11=data.updatedAt;if("string"!=typeof data11&&(!data11||"object"!=typeof data11||Array.isArray(data11))){const err16={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if("string"==typeof data11&&!formats4.validate(data11)){const err17={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}}else{const err18={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}return validate14.errors=vErrors,0===errors},schema21={$schema:"http://json-schema.org/draft-07/schema",$id:"announcement.json",title:"Announcement",description:"Announcement message sent to users",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["announcement"],default:"announcement"},users:{type:"array",items:{type:"string"},minItems:1},group:{type:"string"},body:{type:"string"},media:{$ref:"mediaFile.json"},sentBy:{type:"string"},tags:{type:"array",items:{type:"string"}},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"}},additionalProperties:!1},schema25={type:["string","object"],format:"date-time"},func5=Object.prototype.hasOwnProperty,schema23={$schema:"http://json-schema.org/draft-07/schema",$id:"mediaFile.json",title:"Media File",description:"Any media file",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"mediaFile",enum:["mediaFile"]},name:{type:"string"},fileHash:{type:"string"},category:{type:"string",description:"This is the category id"},mimeType:{type:"string",enum:["image/*","image/jpeg","image/png","image/gif","image/webp","image/avif","image/svg+xml","application/pdf"]},data:{type:"string"},url:{type:"string",format:"uri"},width:{type:"integer",minimum:0},height:{type:"integer",minimum:0},size:{type:"integer",minimum:0,description:"Size in bytes"},uploadUrl:{type:"string",format:"uri"},uploadUrlExpires:{$ref:"definitions.json#/definitions/date"},createdBy:{type:"string"},systemId:{$ref:"definitions.json#/definitions/systemId"}},additionalProperties:!1,required:["type"]},formats0=require_formats().fullFormats.uri,formats4=require_formats().fullFormats["date-time"];function validate15(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="mediaFile"),void 0===data.type){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}for(const key0 in data)if(!func5.call(schema23.properties,key0)){const err1={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err2={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err3={};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(_errs6===errors){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err5={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if("mediaFile"!==data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema23.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.name&&"string"!=typeof data.name){const err7={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.fileHash&&"string"!=typeof data.fileHash){const err8={instancePath:instancePath+"/fileHash",schemaPath:"#/properties/fileHash/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0!==data.category&&"string"!=typeof data.category){const err9={instancePath:instancePath+"/category",schemaPath:"#/properties/category/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0!==data.mimeType){let data5=data.mimeType;if("string"!=typeof data5){const err10={instancePath:instancePath+"/mimeType",schemaPath:"#/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("image/*"!==data5&&"image/jpeg"!==data5&&"image/png"!==data5&&"image/gif"!==data5&&"image/webp"!==data5&&"image/avif"!==data5&&"image/svg+xml"!==data5&&"application/pdf"!==data5){const err11={instancePath:instancePath+"/mimeType",schemaPath:"#/properties/mimeType/enum",keyword:"enum",params:{allowedValues:schema23.properties.mimeType.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}if(void 0!==data.data&&"string"!=typeof data.data){const err12={instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.url){let data7=data.url;if("string"==typeof data7){if(!formats0(data7)){const err13={instancePath:instancePath+"/url",schemaPath:"#/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}else{const err14={instancePath:instancePath+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}if(void 0!==data.width){let data8=data.width;if("number"!=typeof data8||data8%1||isNaN(data8)){const err15={instancePath:instancePath+"/width",schemaPath:"#/properties/width/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if("number"==typeof data8&&(data8<0||isNaN(data8))){const err16={instancePath:instancePath+"/width",schemaPath:"#/properties/width/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}if(void 0!==data.height){let data9=data.height;if("number"!=typeof data9||data9%1||isNaN(data9)){const err17={instancePath:instancePath+"/height",schemaPath:"#/properties/height/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if("number"==typeof data9&&(data9<0||isNaN(data9))){const err18={instancePath:instancePath+"/height",schemaPath:"#/properties/height/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}if(void 0!==data.size){let data10=data.size;if("number"!=typeof data10||data10%1||isNaN(data10)){const err19={instancePath:instancePath+"/size",schemaPath:"#/properties/size/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if("number"==typeof data10&&(data10<0||isNaN(data10))){const err20={instancePath:instancePath+"/size",schemaPath:"#/properties/size/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}if(void 0!==data.uploadUrl){let data11=data.uploadUrl;if("string"==typeof data11){if(!formats0(data11)){const err21={instancePath:instancePath+"/uploadUrl",schemaPath:"#/properties/uploadUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}else{const err22={instancePath:instancePath+"/uploadUrl",schemaPath:"#/properties/uploadUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data.uploadUrlExpires){let data12=data.uploadUrlExpires;if("string"!=typeof data12&&(!data12||"object"!=typeof data12||Array.isArray(data12))){const err23={instancePath:instancePath+"/uploadUrlExpires",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if("string"==typeof data12&&!formats4.validate(data12)){const err24={instancePath:instancePath+"/uploadUrlExpires",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}if(void 0!==data.createdBy&&"string"!=typeof data.createdBy){const err25={instancePath:instancePath+"/createdBy",schemaPath:"#/properties/createdBy/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err26={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}else{const err27={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}return validate15.errors=vErrors,0===errors}var validateCamera=validate17,schema29={$schema:"http://json-schema.org/draft-07/schema",$id:"camera.json",title:"Camera",description:"Any smart camera",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type",default:"camera"},offline:{type:"boolean"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},liveStreams:{type:"object",additionalProperties:!1,$comment:"This is now deprecated. Use liveStream instead. This will remain here for backwards compatibility.",properties:{iframe:{type:["string","null"]},hls:{type:["string","null"]},webRTC:{type:["string","null"]},rtsp:{type:["string","null"]}}},liveStream:{type:"object",additionalProperties:!1,properties:{id:{type:"string"},driver:{type:"string",enum:["cloudflare-stream","aws-kinesis","digital-watchdog"]},allowedOrigins:{type:"array",items:{type:"string"}},authRequired:{type:"boolean"},iframe:{type:["string","null"]},hls:{type:["string","null"]},webRTC:{type:["string","null"]},rtsp:{type:["string","null"],description:"Local RTSP stream URL",examples:["rtsp://192.168.1.4:544/channels/1","rtsp://10.145.6.129:8554/unicast"]},previewImage:{type:["string","null"],description:"Source to preview the camera stream",examples:["https://example.com/preview.jpg","data:image/jpegbase64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QBYRXhpZgAATU0AKgAAAAgAA1EQAAEAAAABAQAAAFERAAQAAAABAAABAgABAA"]}}},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},additionalProperties:!1,required:["id","type","driver"]},schema31={type:"string",enum:["alarm","dimmer","switch","motionSensor","windowCovering","camera","mediaSource","thermostat","lock","courtesy","gateway","tv","dvr","appleTv","discPlayer","mediaPlayer","uncontrolledDevice"]};function validate18(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate18.errors=vErrors,0===errors}function validate17(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="camera"),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.driver){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}for(const key0 in data)if(!func5.call(schema29.properties,key0)){const err3={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs6===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err7={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}let data2=data.type;if("string"!=typeof data2){const err8={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("alarm"!==data2&&"dimmer"!==data2&&"switch"!==data2&&"motionSensor"!==data2&&"windowCovering"!==data2&&"camera"!==data2&&"mediaSource"!==data2&&"thermostat"!==data2&&"lock"!==data2&&"courtesy"!==data2&&"gateway"!==data2&&"tv"!==data2&&"dvr"!==data2&&"appleTv"!==data2&&"discPlayer"!==data2&&"mediaPlayer"!==data2&&"uncontrolledDevice"!==data2){const err9={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema31.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0!==data.offline&&"boolean"!=typeof data.offline){const err10={instancePath:instancePath+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data.supportedNotifications){let data4=data.supportedNotifications;if(Array.isArray(data4)){const len0=data4.length;for(let i0=0;i0<len0;i0++){let data5=data4[i0];if("button 1"!==data5&&"button 2"!==data5&&"button 3"!==data5&&"button 4"!==data5&&"button 5"!==data5&&"idle"!==data5&&"powerHasBeedApplied"!==data5&&"acMainsDisconnected"!==data5&&"acMainsReconnected"!==data5&&"replaceBatterySoon"!==data5&&"replaceBatteryNow"!==data5&&"batteryOk"!==data5&&"hardwareFailure"!==data5&&"softwareFailure"!==data5&&"hardwareFailureWithCode"!==data5&&"softwareFailureWithCode"!==data5&&"motionDetection"!==data5&&"airFilterNeedsCleaned"!==data5&&"airFilterNeedsReplaced"!==data5&&"smokeDetected"!==data5&&"outsideSafeTemperatureRange"!==data5&&"outsideSafeHumidityRange"!==data5&&"scheduleMaintenance"!==data5&&"doorAjar"!==data5&&"communicationFailure"!==data5&&"communicationOk"!==data5&&"burglarAlarm"!==data5&&"fireAlarm"!==data5){const err11={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}let j0,i1=data4.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data4[i1],data4[j0])){const err12={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++;break outer0}}else{const err13={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.notification&&(validate18(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate18.errors:vErrors.concat(validate18.errors),errors=vErrors.length)),void 0!==data.driver){let data7=data.driver;if("string"!=typeof data7){const err14={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if("adlink"!==data7&&"aws-kinesis"!==data7&&"butler"!==data7&&"crestron"!==data7&&"dell"!==data7&&"dmp"!==data7&&"doorbird"!==data7&&"dormakaba"!==data7&&"dsc"!==data7&&"ecobee"!==data7&&"epson"!==data7&&"geovision-rs"!==data7&&"geovision-as-manager"!==data7&&"honeywell-vista"!==data7&&"igor"!==data7&&"inncom"!==data7&&"isapi"!==data7&&"kohost-k7"!==data7&&"kohost"!==data7&&"lg"!==data7&&"lg-webos"!==data7&&"lapi"!==data7&&"lirc"!==data7&&"mews"!==data7&&"mht"!==data7&&"paxton"!==data7&&"pelican-wireless"!==data7&&"power-shades"!==data7&&"rachio"!==data7&&"rebrandly"!==data7&&"relay"!==data7&&"rtsp"!==data7&&"salto"!==data7&&"salto-irn"!==data7&&"samsung"!==data7&&"se"!==data7&&"sendgrid"!==data7&&"sonifi"!==data7&&"stay-n-touch"!==data7&&"storable"!==data7&&"twilio"!==data7&&"unifi"!==data7&&"valcom"!==data7&&"vizio"!==data7&&"wisenet"!==data7&&"cloudflare-images"!==data7&&"cloudflare-stream"!==data7&&"insperia-privacy"!==data7){const err15={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.liveStreams){let data8=data.liveStreams;if(data8&&"object"==typeof data8&&!Array.isArray(data8)){for(const key1 in data8)if("iframe"!==key1&&"hls"!==key1&&"webRTC"!==key1&&"rtsp"!==key1){const err16={instancePath:instancePath+"/liveStreams",schemaPath:"#/properties/liveStreams/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data8.iframe){let data9=data8.iframe;if("string"!=typeof data9&&null!==data9){const err17={instancePath:instancePath+"/liveStreams/iframe",schemaPath:"#/properties/liveStreams/properties/iframe/type",keyword:"type",params:{type:schema29.properties.liveStreams.properties.iframe.type},message:"must be string,null"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}if(void 0!==data8.hls){let data10=data8.hls;if("string"!=typeof data10&&null!==data10){const err18={instancePath:instancePath+"/liveStreams/hls",schemaPath:"#/properties/liveStreams/properties/hls/type",keyword:"type",params:{type:schema29.properties.liveStreams.properties.hls.type},message:"must be string,null"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}if(void 0!==data8.webRTC){let data11=data8.webRTC;if("string"!=typeof data11&&null!==data11){const err19={instancePath:instancePath+"/liveStreams/webRTC",schemaPath:"#/properties/liveStreams/properties/webRTC/type",keyword:"type",params:{type:schema29.properties.liveStreams.properties.webRTC.type},message:"must be string,null"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}}if(void 0!==data8.rtsp){let data12=data8.rtsp;if("string"!=typeof data12&&null!==data12){const err20={instancePath:instancePath+"/liveStreams/rtsp",schemaPath:"#/properties/liveStreams/properties/rtsp/type",keyword:"type",params:{type:schema29.properties.liveStreams.properties.rtsp.type},message:"must be string,null"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}}else{const err21={instancePath:instancePath+"/liveStreams",schemaPath:"#/properties/liveStreams/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}if(void 0!==data.liveStream){let data13=data.liveStream;if(data13&&"object"==typeof data13&&!Array.isArray(data13)){for(const key2 in data13)if(!func5.call(schema29.properties.liveStream.properties,key2)){const err22={instancePath:instancePath+"/liveStream",schemaPath:"#/properties/liveStream/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key2},message:"must NOT have additional properties"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0!==data13.id&&"string"!=typeof data13.id){const err23={instancePath:instancePath+"/liveStream/id",schemaPath:"#/properties/liveStream/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0!==data13.driver){let data15=data13.driver;if("string"!=typeof data15){const err24={instancePath:instancePath+"/liveStream/driver",schemaPath:"#/properties/liveStream/properties/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if("cloudflare-stream"!==data15&&"aws-kinesis"!==data15&&"digital-watchdog"!==data15){const err25={instancePath:instancePath+"/liveStream/driver",schemaPath:"#/properties/liveStream/properties/driver/enum",keyword:"enum",params:{allowedValues:schema29.properties.liveStream.properties.driver.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}if(void 0!==data13.allowedOrigins){let data16=data13.allowedOrigins;if(Array.isArray(data16)){const len1=data16.length;for(let i2=0;i2<len1;i2++)if("string"!=typeof data16[i2]){const err26={instancePath:instancePath+"/liveStream/allowedOrigins/"+i2,schemaPath:"#/properties/liveStream/properties/allowedOrigins/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}else{const err27={instancePath:instancePath+"/liveStream/allowedOrigins",schemaPath:"#/properties/liveStream/properties/allowedOrigins/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}}if(void 0!==data13.authRequired&&"boolean"!=typeof data13.authRequired){const err28={instancePath:instancePath+"/liveStream/authRequired",schemaPath:"#/properties/liveStream/properties/authRequired/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if(void 0!==data13.iframe){let data19=data13.iframe;if("string"!=typeof data19&&null!==data19){const err29={instancePath:instancePath+"/liveStream/iframe",schemaPath:"#/properties/liveStream/properties/iframe/type",keyword:"type",params:{type:schema29.properties.liveStream.properties.iframe.type},message:"must be string,null"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}}if(void 0!==data13.hls){let data20=data13.hls;if("string"!=typeof data20&&null!==data20){const err30={instancePath:instancePath+"/liveStream/hls",schemaPath:"#/properties/liveStream/properties/hls/type",keyword:"type",params:{type:schema29.properties.liveStream.properties.hls.type},message:"must be string,null"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}}if(void 0!==data13.webRTC){let data21=data13.webRTC;if("string"!=typeof data21&&null!==data21){const err31={instancePath:instancePath+"/liveStream/webRTC",schemaPath:"#/properties/liveStream/properties/webRTC/type",keyword:"type",params:{type:schema29.properties.liveStream.properties.webRTC.type},message:"must be string,null"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}}if(void 0!==data13.rtsp){let data22=data13.rtsp;if("string"!=typeof data22&&null!==data22){const err32={instancePath:instancePath+"/liveStream/rtsp",schemaPath:"#/properties/liveStream/properties/rtsp/type",keyword:"type",params:{type:schema29.properties.liveStream.properties.rtsp.type},message:"must be string,null"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}}if(void 0!==data13.previewImage){let data23=data13.previewImage;if("string"!=typeof data23&&null!==data23){const err33={instancePath:instancePath+"/liveStream/previewImage",schemaPath:"#/properties/liveStream/properties/previewImage/type",keyword:"type",params:{type:schema29.properties.liveStream.properties.previewImage.type},message:"must be string,null"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}}}else{const err34={instancePath:instancePath+"/liveStream",schemaPath:"#/properties/liveStream/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err35={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}if(void 0!==data.watts){let data25=data.watts;if("number"==typeof data25){if(data25<0||isNaN(data25)){const err36={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}}else{const err37={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err38={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err39={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err40={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err41={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}}else{const err42={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}return validate17.errors=vErrors,0===errors}var validateCategory=function validate20(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="category"),void 0===data.rating&&(data.rating=9),void 0===data.type){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.discriminator){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err2={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err3={};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(_errs5===errors){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if("string"!=typeof data.type){const err5={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0!==data.name){let data2=data.name;if("string"==typeof data2){if(func3(data2)<1){const err6={instancePath:instancePath+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}}else{const err7={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}}if(void 0!==data.driver){let data3=data.driver;if("string"!=typeof data3){const err8={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("adlink"!==data3&&"aws-kinesis"!==data3&&"butler"!==data3&&"crestron"!==data3&&"dell"!==data3&&"dmp"!==data3&&"doorbird"!==data3&&"dormakaba"!==data3&&"dsc"!==data3&&"ecobee"!==data3&&"epson"!==data3&&"geovision-rs"!==data3&&"geovision-as-manager"!==data3&&"honeywell-vista"!==data3&&"igor"!==data3&&"inncom"!==data3&&"isapi"!==data3&&"kohost-k7"!==data3&&"kohost"!==data3&&"lg"!==data3&&"lg-webos"!==data3&&"lapi"!==data3&&"lirc"!==data3&&"mews"!==data3&&"mht"!==data3&&"paxton"!==data3&&"pelican-wireless"!==data3&&"power-shades"!==data3&&"rachio"!==data3&&"rebrandly"!==data3&&"relay"!==data3&&"rtsp"!==data3&&"salto"!==data3&&"salto-irn"!==data3&&"samsung"!==data3&&"se"!==data3&&"sendgrid"!==data3&&"sonifi"!==data3&&"stay-n-touch"!==data3&&"storable"!==data3&&"twilio"!==data3&&"unifi"!==data3&&"valcom"!==data3&&"vizio"!==data3&&"wisenet"!==data3&&"cloudflare-images"!==data3&&"cloudflare-stream"!==data3&&"insperia-privacy"!==data3){const err9={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err10={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}void 0!==data.image&&(validate15(data.image,{instancePath:instancePath+"/image",parentData:data,parentDataProperty:"image",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length));let data6=data.rating;if("number"==typeof data6){if(data6>10||isNaN(data6)){const err11={instancePath:instancePath+"/rating",schemaPath:"#/properties/rating/maximum",keyword:"maximum",params:{comparison:"<=",limit:10},message:"must be <= 10"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(data6<0||isNaN(data6)){const err12={instancePath:instancePath+"/rating",schemaPath:"#/properties/rating/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}else{const err13={instancePath:instancePath+"/rating",schemaPath:"#/properties/rating/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data.discriminator){let data7=data.discriminator;if("string"!=typeof data7){const err14={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if("space"!==data7&&"product"!==data7&&"mediaFile"!==data7){const err15={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema38.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err16={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}else{const err17={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}return validate20.errors=vErrors,0===errors},schema38={$schema:"http://json-schema.org/draft-07/schema",$id:"category.json",title:"Category",type:"object",required:["type","discriminator"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"category"},name:{type:"string",minLength:1},driver:{$ref:"definitions.json#/definitions/driver"},description:{type:"string"},image:{$ref:"mediaFile.json"},rating:{type:"number",minimum:0,maximum:10,default:9},discriminator:{type:"string",enum:["space","product","mediaFile"]},systemId:{$ref:"definitions.json#/definitions/systemId"}}};var validateCourtesy=validate22,schema42={$schema:"http://json-schema.org/draft-07/schema",$id:"courtesy.json",title:"Courtesy",description:"Any smart courtesy system",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},supportedStates:{type:"array",uniqueItems:!0,items:{enum:["privacy","service","none"]}},state:{type:"string",$ref:"#/properties/supportedStates/items"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","driver","supportedStates","state"]},schema49={enum:["privacy","service","none"]};function validate23(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate23.errors=vErrors,0===errors}function validate22(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.driver){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.supportedStates){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"supportedStates"},message:"must have required property 'supportedStates'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.state){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"state"},message:"must have required property 'state'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err6={};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(_errs5===errors){const err7={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err8={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0!==data.type){let data2=data.type;if("string"!=typeof data2){const err9={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if("alarm"!==data2&&"dimmer"!==data2&&"switch"!==data2&&"motionSensor"!==data2&&"windowCovering"!==data2&&"camera"!==data2&&"mediaSource"!==data2&&"thermostat"!==data2&&"lock"!==data2&&"courtesy"!==data2&&"gateway"!==data2&&"tv"!==data2&&"dvr"!==data2&&"appleTv"!==data2&&"discPlayer"!==data2&&"mediaPlayer"!==data2&&"uncontrolledDevice"!==data2){const err10={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema31.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}if(void 0!==data.supportedNotifications){let data3=data.supportedNotifications;if(Array.isArray(data3)){const len0=data3.length;for(let i0=0;i0<len0;i0++){let data4=data3[i0];if("button 1"!==data4&&"button 2"!==data4&&"button 3"!==data4&&"button 4"!==data4&&"button 5"!==data4&&"idle"!==data4&&"powerHasBeedApplied"!==data4&&"acMainsDisconnected"!==data4&&"acMainsReconnected"!==data4&&"replaceBatterySoon"!==data4&&"replaceBatteryNow"!==data4&&"batteryOk"!==data4&&"hardwareFailure"!==data4&&"softwareFailure"!==data4&&"hardwareFailureWithCode"!==data4&&"softwareFailureWithCode"!==data4&&"motionDetection"!==data4&&"airFilterNeedsCleaned"!==data4&&"airFilterNeedsReplaced"!==data4&&"smokeDetected"!==data4&&"outsideSafeTemperatureRange"!==data4&&"outsideSafeHumidityRange"!==data4&&"scheduleMaintenance"!==data4&&"doorAjar"!==data4&&"communicationFailure"!==data4&&"communicationOk"!==data4&&"burglarAlarm"!==data4&&"fireAlarm"!==data4){const err11={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}let j0,i1=data3.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data3[i1],data3[j0])){const err12={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++;break outer0}}else{const err13={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.notification&&(validate23(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate23.errors:vErrors.concat(validate23.errors),errors=vErrors.length)),void 0!==data.driver){let data6=data.driver;if("string"!=typeof data6){const err14={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if("adlink"!==data6&&"aws-kinesis"!==data6&&"butler"!==data6&&"crestron"!==data6&&"dell"!==data6&&"dmp"!==data6&&"doorbird"!==data6&&"dormakaba"!==data6&&"dsc"!==data6&&"ecobee"!==data6&&"epson"!==data6&&"geovision-rs"!==data6&&"geovision-as-manager"!==data6&&"honeywell-vista"!==data6&&"igor"!==data6&&"inncom"!==data6&&"isapi"!==data6&&"kohost-k7"!==data6&&"kohost"!==data6&&"lg"!==data6&&"lg-webos"!==data6&&"lapi"!==data6&&"lirc"!==data6&&"mews"!==data6&&"mht"!==data6&&"paxton"!==data6&&"pelican-wireless"!==data6&&"power-shades"!==data6&&"rachio"!==data6&&"rebrandly"!==data6&&"relay"!==data6&&"rtsp"!==data6&&"salto"!==data6&&"salto-irn"!==data6&&"samsung"!==data6&&"se"!==data6&&"sendgrid"!==data6&&"sonifi"!==data6&&"stay-n-touch"!==data6&&"storable"!==data6&&"twilio"!==data6&&"unifi"!==data6&&"valcom"!==data6&&"vizio"!==data6&&"wisenet"!==data6&&"cloudflare-images"!==data6&&"cloudflare-stream"!==data6&&"insperia-privacy"!==data6){const err15={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.offline&&"boolean"!=typeof data.offline){const err16={instancePath:instancePath+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data.supportedStates){let data8=data.supportedStates;if(Array.isArray(data8)){const len1=data8.length;for(let i2=0;i2<len1;i2++){let data9=data8[i2];if("privacy"!==data9&&"service"!==data9&&"none"!==data9){const err17={instancePath:instancePath+"/supportedStates/"+i2,schemaPath:"#/properties/supportedStates/items/enum",keyword:"enum",params:{allowedValues:schema42.properties.supportedStates.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}let j1,i3=data8.length;if(i3>1)outer1:for(;i3--;)for(j1=i3;j1--;)if(func0(data8[i3],data8[j1])){const err18={instancePath:instancePath+"/supportedStates",schemaPath:"#/properties/supportedStates/uniqueItems",keyword:"uniqueItems",params:{i:i3,j:j1},message:"must NOT have duplicate items (items ## "+j1+" and "+i3+" are identical)"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++;break outer1}}else{const err19={instancePath:instancePath+"/supportedStates",schemaPath:"#/properties/supportedStates/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}}if(void 0!==data.state){let data10=data.state;if("string"!=typeof data10){const err20={instancePath:instancePath+"/state",schemaPath:"#/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if("privacy"!==data10&&"service"!==data10&&"none"!==data10){const err21={instancePath:instancePath+"/state",schemaPath:"#/properties/supportedStates/items/enum",keyword:"enum",params:{allowedValues:schema49.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err22={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0!==data.watts){let data12=data.watts;if("number"==typeof data12){if(data12<0||isNaN(data12)){const err23={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}}else{const err24={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err25={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err26={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err27={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err28={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}}else{const err29={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}return validate22.errors=vErrors,0===errors}var validateCredential=function validate25(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="credential"),void 0===data.type){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.credential){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"credential"},message:"must have required property 'credential'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.expires){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"expires"},message:"must have required property 'expires'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err4={};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(_errs5===errors){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if("string"!=typeof data.type){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.driver){let data2=data.driver;if("string"!=typeof data2){const err7={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if("adlink"!==data2&&"aws-kinesis"!==data2&&"butler"!==data2&&"crestron"!==data2&&"dell"!==data2&&"dmp"!==data2&&"doorbird"!==data2&&"dormakaba"!==data2&&"dsc"!==data2&&"ecobee"!==data2&&"epson"!==data2&&"geovision-rs"!==data2&&"geovision-as-manager"!==data2&&"honeywell-vista"!==data2&&"igor"!==data2&&"inncom"!==data2&&"isapi"!==data2&&"kohost-k7"!==data2&&"kohost"!==data2&&"lg"!==data2&&"lg-webos"!==data2&&"lapi"!==data2&&"lirc"!==data2&&"mews"!==data2&&"mht"!==data2&&"paxton"!==data2&&"pelican-wireless"!==data2&&"power-shades"!==data2&&"rachio"!==data2&&"rebrandly"!==data2&&"relay"!==data2&&"rtsp"!==data2&&"salto"!==data2&&"salto-irn"!==data2&&"samsung"!==data2&&"se"!==data2&&"sendgrid"!==data2&&"sonifi"!==data2&&"stay-n-touch"!==data2&&"storable"!==data2&&"twilio"!==data2&&"unifi"!==data2&&"valcom"!==data2&&"vizio"!==data2&&"wisenet"!==data2&&"cloudflare-images"!==data2&&"cloudflare-stream"!==data2&&"insperia-privacy"!==data2){const err8={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}if(void 0!==data.discriminator){let data3=data.discriminator;if("string"!=typeof data3){const err9={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if("verificationCode"!==data3&&"token"!==data3&&"mobileKey"!==data3&&"pin"!==data3&&"publicKey"!==data3&&"passkeyChallenge"!==data3){const err10={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema52.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}if(void 0!==data.credential&&"string"!=typeof data.credential){const err11={instancePath:instancePath+"/credential",schemaPath:"#/properties/credential/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.userId&&"string"!=typeof data.userId){const err12={instancePath:instancePath+"/userId",schemaPath:"#/properties/userId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.organizationId&&"string"!=typeof data.organizationId){const err13={instancePath:instancePath+"/organizationId",schemaPath:"#/properties/organizationId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data.propertyId&&"string"!=typeof data.propertyId){const err14={instancePath:instancePath+"/propertyId",schemaPath:"#/properties/propertyId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(void 0!==data.deviceId&&"string"!=typeof data.deviceId){const err15={instancePath:instancePath+"/deviceId",schemaPath:"#/properties/deviceId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0!==data.userAgent&&"string"!=typeof data.userAgent){const err16={instancePath:instancePath+"/userAgent",schemaPath:"#/properties/userAgent/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data.expires){let data10=data.expires;if("string"!=typeof data10&&(!data10||"object"!=typeof data10||Array.isArray(data10))&&null!==data10){const err17={instancePath:instancePath+"/expires",schemaPath:"#/properties/expires/type",keyword:"type",params:{type:schema52.properties.expires.type},message:"must be string,object,null"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err18={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}else{const err19={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}return validate25.errors=vErrors,0===errors},schema52={$schema:"http://json-schema.org/draft-07/schema",$id:"credential.json",title:"Credential",type:"object",required:["type","credential","expires"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"credential"},driver:{$ref:"definitions.json#/definitions/driver"},discriminator:{type:"string",enum:["verificationCode","token","mobileKey","pin","publicKey","passkeyChallenge"]},credential:{type:"string"},userId:{type:"string"},organizationId:{type:"string"},propertyId:{type:"string"},deviceId:{type:"string"},userAgent:{type:"string"},expires:{type:["string","object","null"]},systemId:{$ref:"definitions.json#/definitions/systemId"}}};var validateDeviceRouter=function validate26(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="deviceRouter"),void 0===data.driver){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.organizationId){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"organizationId"},message:"must have required property 'organizationId'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err2={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err3={};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(_errs5===errors){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err5={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if("deviceRouter"!==data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema56.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.driver&&"string"!=typeof data.driver){const err7={instancePath:instancePath+"/driver",schemaPath:"#/properties/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.organizationId){let data3=data.organizationId;if("string"!=typeof data3&&null!==data3){const err8={instancePath:instancePath+"/organizationId",schemaPath:"#/properties/organizationId/type",keyword:"type",params:{type:schema56.properties.organizationId.type},message:"must be string,null"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}if(void 0!==data.devices){let data4=data.devices;if(!data4||"object"!=typeof data4||Array.isArray(data4)){const err9={instancePath:instancePath+"/devices",schemaPath:"#/properties/devices/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}}else{const err10={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}return validate26.errors=vErrors,0===errors},schema56={$schema:"http://json-schema.org/draft-07/schema",$id:"deviceRouter.json",title:"Device Router",description:"A device router contains instructions on where to route devices based on their organization and driver.",type:"object",required:["driver","organizationId"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"deviceRouter",enum:["deviceRouter"]},driver:{type:"string"},organizationId:{type:["string","null"],description:"Reference (id) to the organization that owns this router"},devices:{type:"object",additionalProperties:!0}}};var validateDimmer=validate27,schema58={$schema:"http://json-schema.org/draft-07/schema",$id:"dimmer.json",title:"Dimmer",description:"Any smart dimmer",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},level:{type:["number","null"],minimum:0,maximum:100},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","level","driver"]};function validate28(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate28.errors=vErrors,0===errors}function validate27(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.level){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"level"},message:"must have required property 'level'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.driver){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs5===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err7={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.type){let data2=data.type;if("string"!=typeof data2){const err8={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("alarm"!==data2&&"dimmer"!==data2&&"switch"!==data2&&"motionSensor"!==data2&&"windowCovering"!==data2&&"camera"!==data2&&"mediaSource"!==data2&&"thermostat"!==data2&&"lock"!==data2&&"courtesy"!==data2&&"gateway"!==data2&&"tv"!==data2&&"dvr"!==data2&&"appleTv"!==data2&&"discPlayer"!==data2&&"mediaPlayer"!==data2&&"uncontrolledDevice"!==data2){const err9={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema31.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.supportedNotifications){let data3=data.supportedNotifications;if(Array.isArray(data3)){const len0=data3.length;for(let i0=0;i0<len0;i0++){let data4=data3[i0];if("button 1"!==data4&&"button 2"!==data4&&"button 3"!==data4&&"button 4"!==data4&&"button 5"!==data4&&"idle"!==data4&&"powerHasBeedApplied"!==data4&&"acMainsDisconnected"!==data4&&"acMainsReconnected"!==data4&&"replaceBatterySoon"!==data4&&"replaceBatteryNow"!==data4&&"batteryOk"!==data4&&"hardwareFailure"!==data4&&"softwareFailure"!==data4&&"hardwareFailureWithCode"!==data4&&"softwareFailureWithCode"!==data4&&"motionDetection"!==data4&&"airFilterNeedsCleaned"!==data4&&"airFilterNeedsReplaced"!==data4&&"smokeDetected"!==data4&&"outsideSafeTemperatureRange"!==data4&&"outsideSafeHumidityRange"!==data4&&"scheduleMaintenance"!==data4&&"doorAjar"!==data4&&"communicationFailure"!==data4&&"communicationOk"!==data4&&"burglarAlarm"!==data4&&"fireAlarm"!==data4){const err10={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}let j0,i1=data3.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data3[i1],data3[j0])){const err11={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++;break outer0}}else{const err12={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}if(void 0!==data.notification&&(validate28(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate28.errors:vErrors.concat(validate28.errors),errors=vErrors.length)),void 0!==data.driver){let data6=data.driver;if("string"!=typeof data6){const err13={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if("adlink"!==data6&&"aws-kinesis"!==data6&&"butler"!==data6&&"crestron"!==data6&&"dell"!==data6&&"dmp"!==data6&&"doorbird"!==data6&&"dormakaba"!==data6&&"dsc"!==data6&&"ecobee"!==data6&&"epson"!==data6&&"geovision-rs"!==data6&&"geovision-as-manager"!==data6&&"honeywell-vista"!==data6&&"igor"!==data6&&"inncom"!==data6&&"isapi"!==data6&&"kohost-k7"!==data6&&"kohost"!==data6&&"lg"!==data6&&"lg-webos"!==data6&&"lapi"!==data6&&"lirc"!==data6&&"mews"!==data6&&"mht"!==data6&&"paxton"!==data6&&"pelican-wireless"!==data6&&"power-shades"!==data6&&"rachio"!==data6&&"rebrandly"!==data6&&"relay"!==data6&&"rtsp"!==data6&&"salto"!==data6&&"salto-irn"!==data6&&"samsung"!==data6&&"se"!==data6&&"sendgrid"!==data6&&"sonifi"!==data6&&"stay-n-touch"!==data6&&"storable"!==data6&&"twilio"!==data6&&"unifi"!==data6&&"valcom"!==data6&&"vizio"!==data6&&"wisenet"!==data6&&"cloudflare-images"!==data6&&"cloudflare-stream"!==data6&&"insperia-privacy"!==data6){const err14={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}if(void 0!==data.offline&&"boolean"!=typeof data.offline){const err15={instancePath:instancePath+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0!==data.level){let data8=data.level;if("number"!=typeof data8&&null!==data8){const err16={instancePath:instancePath+"/level",schemaPath:"#/properties/level/type",keyword:"type",params:{type:schema58.properties.level.type},message:"must be number,null"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if("number"==typeof data8){if(data8>100||isNaN(data8)){const err17={instancePath:instancePath+"/level",schemaPath:"#/properties/level/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(data8<0||isNaN(data8)){const err18={instancePath:instancePath+"/level",schemaPath:"#/properties/level/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err19={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data.watts){let data10=data.watts;if("number"==typeof data10){if(data10<0||isNaN(data10)){const err20={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}else{const err21={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err22={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err23={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err24={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err25={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}else{const err26={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}return validate27.errors=vErrors,0===errors}var validateDiscoveredDevice=function validate30(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="discoveredDevice"),void 0===data.name){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.deviceId){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"deviceId"},message:"must have required property 'deviceId'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.deviceData){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"deviceData"},message:"must have required property 'deviceData'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err4={};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(_errs5===errors){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err6={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.deviceId&&"string"!=typeof data.deviceId){const err7={instancePath:instancePath+"/deviceId",schemaPath:"#/properties/deviceId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}let data3=data.type;if("string"!=typeof data3){const err8={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("discoveredDevice"!==data3){const err9={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema67.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0!==data.discriminator){let data4=data.discriminator;if("string"!=typeof data4){const err10={instancePath:instancePath+"/discriminator",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("alarm"!==data4&&"dimmer"!==data4&&"switch"!==data4&&"motionSensor"!==data4&&"windowCovering"!==data4&&"camera"!==data4&&"mediaSource"!==data4&&"thermostat"!==data4&&"lock"!==data4&&"courtesy"!==data4&&"gateway"!==data4&&"tv"!==data4&&"dvr"!==data4&&"appleTv"!==data4&&"discPlayer"!==data4&&"mediaPlayer"!==data4&&"uncontrolledDevice"!==data4){const err11={instancePath:instancePath+"/discriminator",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema31.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}if(void 0!==data.driver&&"string"!=typeof data.driver){const err12={instancePath:instancePath+"/driver",schemaPath:"#/properties/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.deviceData){let data6=data.deviceData;if(!data6||"object"!=typeof data6||Array.isArray(data6)){const err13={instancePath:instancePath+"/deviceData",schemaPath:"#/properties/deviceData/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.ignore&&"boolean"!=typeof data.ignore){const err14={instancePath:instancePath+"/ignore",schemaPath:"#/properties/ignore/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(void 0!==data.organizationId){let data8=data.organizationId;if("string"!=typeof data8&&null!==data8){const err15={instancePath:instancePath+"/organizationId",schemaPath:"#/properties/organizationId/type",keyword:"type",params:{type:schema67.properties.organizationId.type},message:"must be string,null"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.propertyId){let data9=data.propertyId;if("string"!=typeof data9&&null!==data9){const err16={instancePath:instancePath+"/propertyId",schemaPath:"#/properties/propertyId/type",keyword:"type",params:{type:schema67.properties.propertyId.type},message:"must be string,null"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}}else{const err17={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}return validate30.errors=vErrors,0===errors},schema67={$schema:"http://json-schema.org/draft-07/schema",$id:"discoveredDevice.json",title:"Discovered Device",description:"A device that has been discovered by Kohost, but not yet added to the Kohost system.",type:"object",required:["name","deviceId","deviceData"],properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},deviceId:{type:"string"},type:{type:"string",enum:["discoveredDevice"],default:"discoveredDevice"},discriminator:{$ref:"definitions.json#/definitions/type"},driver:{type:"string"},deviceData:{type:"object"},ignore:{type:"boolean"},organizationId:{type:["string","null"],description:"Reference (id) to the organization that owns this device"},propertyId:{type:["string","null"],description:"Reference (id) to the property that this device belongs to"}}};var validateEmailMessage=function validate31(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="emailMessage"),void 0===data.to){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"to"},message:"must have required property 'to'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.from){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"from"},message:"must have required property 'from'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.status){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.subject){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"subject"},message:"must have required property 'subject'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs5===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err7={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if("emailMessage"!==data1){const err8={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema70.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0!==data.to){let data2=data.to;if("string"==typeof data2){if(!pattern0.test(data2)){const err9={instancePath:instancePath+"/to",schemaPath:"#/properties/to/pattern",keyword:"pattern",params:{pattern:"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$"},message:'must match pattern "^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$"'};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}else{const err10={instancePath:instancePath+"/to",schemaPath:"#/properties/to/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}if(void 0!==data.from){let data3=data.from;if("string"==typeof data3){if(!pattern1.test(data3)){const err11={instancePath:instancePath+"/from",schemaPath:"#/properties/from/pattern",keyword:"pattern",params:{pattern:".*<[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+>.*"},message:'must match pattern ".*<[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+>.*"'};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}else{const err12={instancePath:instancePath+"/from",schemaPath:"#/properties/from/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}if(void 0!==data.subject&&"string"!=typeof data.subject){const err13={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data.status){let data5=data.status;if("string"!=typeof data5){const err14={instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if("queued"!==data5&&"sending"!==data5&&"sent"!==data5&&"deferred"!==data5&&"delivered"!==data5&&"undelivered"!==data5&&"bounced"!==data5&&"blocked"!==data5&&"receiving"!==data5&&"received"!==data5&&"opened"!==data5&&"clicked"!==data5&&"unsubscribed"!==data5&&"spamReport"!==data5){const err15={instancePath:instancePath+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:schema70.properties.status.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.statusMessage&&"string"!=typeof data.statusMessage){const err16={instancePath:instancePath+"/statusMessage",schemaPath:"#/properties/statusMessage/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data.html&&"string"!=typeof data.html){const err17={instancePath:instancePath+"/html",schemaPath:"#/properties/html/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data.text&&"string"!=typeof data.text){const err18={instancePath:instancePath+"/text",schemaPath:"#/properties/text/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0!==data.driver&&"string"!=typeof data.driver){const err19={instancePath:instancePath+"/driver",schemaPath:"#/properties/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data.appData){let data10=data.appData;if(!data10||"object"!=typeof data10||Array.isArray(data10)){const err20={instancePath:instancePath+"/appData",schemaPath:"#/properties/appData/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}if(void 0!==data.createdAt){let data11=data.createdAt;if("string"!=typeof data11&&(!data11||"object"!=typeof data11||Array.isArray(data11))){const err21={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if("string"==typeof data11&&!formats4.validate(data11)){const err22={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data.updatedAt){let data12=data.updatedAt;if("string"!=typeof data12&&(!data12||"object"!=typeof data12||Array.isArray(data12))){const err23={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if("string"==typeof data12&&!formats4.validate(data12)){const err24={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err25={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}else{const err26={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}return validate31.errors=vErrors,0===errors},schema70={$schema:"http://json-schema.org/draft-07/schema",$id:"emailMessage.json",title:"Email Message",type:"object",required:["to","from","status","subject"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"emailMessage",enum:["emailMessage"]},to:{type:"string",pattern:"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$"},from:{type:"string",pattern:".*<[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+>.*",description:"Must be in the format of 'Sender <email@example.com>"},subject:{type:"string"},status:{type:"string",enum:["queued","sending","sent","deferred","delivered","undelivered","bounced","blocked","receiving","received","opened","clicked","unsubscribed","spamReport"]},statusMessage:{type:"string"},html:{type:"string"},text:{type:"string"},driver:{type:"string"},appData:{type:"object"},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"},systemId:{$ref:"definitions.json#/definitions/systemId"}}},pattern0=new RegExp("^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$","u"),pattern1=new RegExp(".*<[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+>.*","u");var validateEnergyReport=function validate32(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="energyReport"),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.roomId){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"roomId"},message:"must have required property 'roomId'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.first){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"first"},message:"must have required property 'first'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.last){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"last"},message:"must have required property 'last'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0===data.consumption){const err5={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"consumption"},message:"must have required property 'consumption'"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0===data.totals){const err6={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"totals"},message:"must have required property 'totals'"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0===data.costPerKw){const err7={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"costPerKw"},message:"must have required property 'costPerKw'"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err8={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err9={};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(_errs5===errors){const err10={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err11={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if("energyReport"!==data1){const err12={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema75.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.reportTime){let data2=data.reportTime;if("hourly"!==data2&&"daily"!==data2&&"monthly"!==data2){const err13={instancePath:instancePath+"/reportTime",schemaPath:"#/properties/reportTime/enum",keyword:"enum",params:{allowedValues:schema75.properties.reportTime.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.roomId){let data3=data.roomId;if("string"!=typeof data3){const err14={instancePath:instancePath+"/roomId",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}const _errs12=errors,_errs13=errors;if("global"!==data3&&"system"!==data3){const err15={};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(_errs13===errors){const err16={instancePath:instancePath+"/roomId",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}else errors=_errs12,null!==vErrors&&(_errs12?vErrors.length=_errs12:vErrors=null)}if(void 0!==data.first){let data4=data.first;if("string"!=typeof data4&&(!data4||"object"!=typeof data4||Array.isArray(data4))){const err17={instancePath:instancePath+"/first",schemaPath:"#/properties/first/type",keyword:"type",params:{type:schema75.properties.first.type},message:"must be string,object"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if("string"==typeof data4&&!formats4.validate(data4)){const err18={instancePath:instancePath+"/first",schemaPath:"#/properties/first/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}if(void 0!==data.last){let data5=data.last;if("string"!=typeof data5&&(!data5||"object"!=typeof data5||Array.isArray(data5))){const err19={instancePath:instancePath+"/last",schemaPath:"#/properties/last/type",keyword:"type",params:{type:schema75.properties.last.type},message:"must be string,object"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if("string"==typeof data5&&!formats4.validate(data5)){const err20={instancePath:instancePath+"/last",schemaPath:"#/properties/last/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}if(void 0!==data.consumption){let data6=data.consumption;if(Array.isArray(data6)){const len0=data6.length;for(let i0=0;i0<len0;i0++){let data7=data6[i0];if(data7&&"object"==typeof data7&&!Array.isArray(data7)){if(void 0===data7.id){const err21={instancePath:instancePath+"/consumption/"+i0,schemaPath:"#/properties/consumption/items/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if(void 0===data7.type){const err22={instancePath:instancePath+"/consumption/"+i0,schemaPath:"#/properties/consumption/items/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0===data7.kwh){const err23={instancePath:instancePath+"/consumption/"+i0,schemaPath:"#/properties/consumption/items/required",keyword:"required",params:{missingProperty:"kwh"},message:"must have required property 'kwh'"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0!==data7.id){let data8=data7.id;if("string"!=typeof data8){const err24={instancePath:instancePath+"/consumption/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}const _errs25=errors,_errs26=errors;if("global"!==data8&&"system"!==data8){const err25={};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(_errs26===errors){const err26={instancePath:instancePath+"/consumption/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}else errors=_errs25,null!==vErrors&&(_errs25?vErrors.length=_errs25:vErrors=null)}if(void 0!==data7.type){let data9=data7.type;if("string"!=typeof data9){const err27={instancePath:instancePath+"/consumption/"+i0+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if("alarm"!==data9&&"dimmer"!==data9&&"switch"!==data9&&"motionSensor"!==data9&&"windowCovering"!==data9&&"camera"!==data9&&"mediaSource"!==data9&&"thermostat"!==data9&&"lock"!==data9&&"courtesy"!==data9&&"gateway"!==data9&&"tv"!==data9&&"dvr"!==data9&&"appleTv"!==data9&&"discPlayer"!==data9&&"mediaPlayer"!==data9&&"uncontrolledDevice"!==data9){const err28={instancePath:instancePath+"/consumption/"+i0+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema31.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}}if(void 0!==data7.kwh){let data10=data7.kwh;if("number"==typeof data10){if(data10<0||isNaN(data10)){const err29={instancePath:instancePath+"/consumption/"+i0+"/kwh",schemaPath:"#/properties/consumption/items/properties/kwh/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}}else{const err30={instancePath:instancePath+"/consumption/"+i0+"/kwh",schemaPath:"#/properties/consumption/items/properties/kwh/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}}}else{const err31={instancePath:instancePath+"/consumption/"+i0,schemaPath:"#/properties/consumption/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}}}else{const err32={instancePath:instancePath+"/consumption",schemaPath:"#/properties/consumption/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}}if(void 0!==data.totals){let data11=data.totals;if(Array.isArray(data11)){const len1=data11.length;for(let i1=0;i1<len1;i1++){let data12=data11[i1];if(data12&&"object"==typeof data12&&!Array.isArray(data12)){if(void 0===data12.lights){const err33={instancePath:instancePath+"/totals/"+i1,schemaPath:"#/properties/totals/items/required",keyword:"required",params:{missingProperty:"lights"},message:"must have required property 'lights'"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}if(void 0===data12.climate){const err34={instancePath:instancePath+"/totals/"+i1,schemaPath:"#/properties/totals/items/required",keyword:"required",params:{missingProperty:"climate"},message:"must have required property 'climate'"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(void 0===data12.media){const err35={instancePath:instancePath+"/totals/"+i1,schemaPath:"#/properties/totals/items/required",keyword:"required",params:{missingProperty:"media"},message:"must have required property 'media'"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}if(void 0!==data12.lights){let data13=data12.lights;if("number"==typeof data13){if(data13<0||isNaN(data13)){const err36={instancePath:instancePath+"/totals/"+i1+"/lights",schemaPath:"#/properties/totals/items/properties/lights/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}}else{const err37={instancePath:instancePath+"/totals/"+i1+"/lights",schemaPath:"#/properties/totals/items/properties/lights/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}}if(void 0!==data12.climate){let data14=data12.climate;if("number"==typeof data14){if(data14<0||isNaN(data14)){const err38={instancePath:instancePath+"/totals/"+i1+"/climate",schemaPath:"#/properties/totals/items/properties/climate/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}else{const err39={instancePath:instancePath+"/totals/"+i1+"/climate",schemaPath:"#/properties/totals/items/properties/climate/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}if(void 0!==data12.media){let data15=data12.media;if("number"==typeof data15){if(data15<0||isNaN(data15)){const err40={instancePath:instancePath+"/totals/"+i1+"/media",schemaPath:"#/properties/totals/items/properties/media/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}}else{const err41={instancePath:instancePath+"/totals/"+i1+"/media",schemaPath:"#/properties/totals/items/properties/media/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}}}else{const err42={instancePath:instancePath+"/totals/"+i1,schemaPath:"#/properties/totals/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}}}else{const err43={instancePath:instancePath+"/totals",schemaPath:"#/properties/totals/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}}if(void 0!==data.costPerKw){let data16=data.costPerKw;if("number"==typeof data16){if(data16<0||isNaN(data16)){const err44={instancePath:instancePath+"/costPerKw",schemaPath:"#/properties/costPerKw/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}}else{const err45={instancePath:instancePath+"/costPerKw",schemaPath:"#/properties/costPerKw/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}}}else{const err46={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}return validate32.errors=vErrors,0===errors},schema75={$schema:"http://json-schema.org/draft-07/schema",$id:"energyReport.json",title:"Energy Report",description:"Hourly Report for Energy based on energy report shards",type:"object",required:["id","type","roomId","first","last","consumption","totals","costPerKw"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["energyReport"],default:"energyReport"},reportTime:{time:"string",enum:["hourly","daily","monthly"]},roomId:{$ref:"definitions.json#/definitions/id"},first:{type:["string","object"],format:"date-time"},last:{type:["string","object"],format:"date-time"},consumption:{type:"array",items:{type:"object",required:["id","type","kwh"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{$ref:"definitions.json#/definitions/type"},kwh:{type:"number",minimum:0}}}},totals:{type:"array",items:{type:"object",required:["lights","climate","media"],properties:{lights:{type:"number",minimum:0},climate:{type:"number",minimum:0},media:{type:"number",minimum:0}}}},costPerKw:{type:"number",minimum:0}}};var validateEnergyReportShard=function validate33(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="energyReportShard"),void 0===data.ndata&&(data.ndata=0),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.roomId){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"roomId"},message:"must have required property 'roomId'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.first){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"first"},message:"must have required property 'first'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.last){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"last"},message:"must have required property 'last'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0===data.data){const err5={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"data"},message:"must have required property 'data'"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0===data.ndata){const err6={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"ndata"},message:"must have required property 'ndata'"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0===data.expires){const err7={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"expires"},message:"must have required property 'expires'"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err8={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err9={};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(_errs5===errors){const err10={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err11={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if("energyReportShard"!==data1){const err12={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema80.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.roomId){let data2=data.roomId;if("string"!=typeof data2){const err13={instancePath:instancePath+"/roomId",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}const _errs11=errors,_errs12=errors;if("global"!==data2&&"system"!==data2){const err14={};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(_errs12===errors){const err15={instancePath:instancePath+"/roomId",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}else errors=_errs11,null!==vErrors&&(_errs11?vErrors.length=_errs11:vErrors=null)}if(void 0!==data.first){let data3=data.first;if("string"!=typeof data3&&(!data3||"object"!=typeof data3||Array.isArray(data3))){const err16={instancePath:instancePath+"/first",schemaPath:"#/properties/first/type",keyword:"type",params:{type:schema80.properties.first.type},message:"must be string,object"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if("string"==typeof data3&&!formats4.validate(data3)){const err17={instancePath:instancePath+"/first",schemaPath:"#/properties/first/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}if(void 0!==data.last){let data4=data.last;if("string"!=typeof data4&&(!data4||"object"!=typeof data4||Array.isArray(data4))){const err18={instancePath:instancePath+"/last",schemaPath:"#/properties/last/type",keyword:"type",params:{type:schema80.properties.last.type},message:"must be string,object"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if("string"==typeof data4&&!formats4.validate(data4)){const err19={instancePath:instancePath+"/last",schemaPath:"#/properties/last/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}}if(void 0!==data.data){let data5=data.data;if(Array.isArray(data5)){const len0=data5.length;for(let i0=0;i0<len0;i0++){let data6=data5[i0];if(data6&&"object"==typeof data6&&!Array.isArray(data6)){if(void 0===data6.time){const err20={instancePath:instancePath+"/data/"+i0,schemaPath:"#/properties/data/items/required",keyword:"required",params:{missingProperty:"time"},message:"must have required property 'time'"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0===data6.watts){const err21={instancePath:instancePath+"/data/"+i0,schemaPath:"#/properties/data/items/required",keyword:"required",params:{missingProperty:"watts"},message:"must have required property 'watts'"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if(void 0===data6.id){const err22={instancePath:instancePath+"/data/"+i0,schemaPath:"#/properties/data/items/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0===data6.type){const err23={instancePath:instancePath+"/data/"+i0,schemaPath:"#/properties/data/items/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0===data6.value){const err24={instancePath:instancePath+"/data/"+i0,schemaPath:"#/properties/data/items/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data6.time){let data7=data6.time;if("string"!=typeof data7&&(!data7||"object"!=typeof data7||Array.isArray(data7))){const err25={instancePath:instancePath+"/data/"+i0+"/time",schemaPath:"#/properties/data/items/properties/time/type",keyword:"type",params:{type:schema80.properties.data.items.properties.time.type},message:"must be string,object"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if("string"==typeof data7&&!formats4.validate(data7)){const err26={instancePath:instancePath+"/data/"+i0+"/time",schemaPath:"#/properties/data/items/properties/time/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}if(void 0!==data6.watts){let data8=data6.watts;if("number"==typeof data8){if(data8<0||isNaN(data8)){const err27={instancePath:instancePath+"/data/"+i0+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}}else{const err28={instancePath:instancePath+"/data/"+i0+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}}if(void 0!==data6.id){let data9=data6.id;if("string"!=typeof data9){const err29={instancePath:instancePath+"/data/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}const _errs29=errors,_errs30=errors;if("global"!==data9&&"system"!==data9){const err30={};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if(_errs30===errors){const err31={instancePath:instancePath+"/data/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}else errors=_errs29,null!==vErrors&&(_errs29?vErrors.length=_errs29:vErrors=null)}if(void 0!==data6.type){let data10=data6.type;if("string"!=typeof data10){const err32={instancePath:instancePath+"/data/"+i0+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}if("alarm"!==data10&&"dimmer"!==data10&&"switch"!==data10&&"motionSensor"!==data10&&"windowCovering"!==data10&&"camera"!==data10&&"mediaSource"!==data10&&"thermostat"!==data10&&"lock"!==data10&&"courtesy"!==data10&&"gateway"!==data10&&"tv"!==data10&&"dvr"!==data10&&"appleTv"!==data10&&"discPlayer"!==data10&&"mediaPlayer"!==data10&&"uncontrolledDevice"!==data10){const err33={instancePath:instancePath+"/data/"+i0+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema31.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}}if(void 0!==data6.value){let data11=data6.value;if("number"==typeof data11){if(data11>1||isNaN(data11)){const err34={instancePath:instancePath+"/data/"+i0+"/value",schemaPath:"#/properties/data/items/properties/value/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(data11<0||isNaN(data11)){const err35={instancePath:instancePath+"/data/"+i0+"/value",schemaPath:"#/properties/data/items/properties/value/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}}else{const err36={instancePath:instancePath+"/data/"+i0+"/value",schemaPath:"#/properties/data/items/properties/value/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}}}else{const err37={instancePath:instancePath+"/data/"+i0,schemaPath:"#/properties/data/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}}}else{const err38={instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}let data12=data.ndata;if("number"!=typeof data12||data12%1||isNaN(data12)){const err39={instancePath:instancePath+"/ndata",schemaPath:"#/properties/ndata/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}if("number"==typeof data12){if(data12>1e5||isNaN(data12)){const err40={instancePath:instancePath+"/ndata",schemaPath:"#/properties/ndata/maximum",keyword:"maximum",params:{comparison:"<=",limit:1e5},message:"must be <= 100000"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}if(data12<0||isNaN(data12)){const err41={instancePath:instancePath+"/ndata",schemaPath:"#/properties/ndata/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}}if(void 0!==data.expires){let data13=data.expires;if("string"!=typeof data13&&(!data13||"object"!=typeof data13||Array.isArray(data13))){const err42={instancePath:instancePath+"/expires",schemaPath:"#/properties/expires/type",keyword:"type",params:{type:schema80.properties.expires.type},message:"must be string,object"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}if("string"==typeof data13&&!formats4.validate(data13)){const err43={instancePath:instancePath+"/expires",schemaPath:"#/properties/expires/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}}}else{const err44={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}return validate33.errors=vErrors,0===errors},schema80={$schema:"http://json-schema.org/draft-07/schema",$id:"energyReportShard.json",title:"Energy Report Shard",description:"Shard used for Energy Reports",type:"object",required:["id","type","roomId","first","last","data","ndata","expires"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["energyReportShard"],default:"energyReportShard"},roomId:{$ref:"definitions.json#/definitions/id"},first:{type:["string","object"],format:"date-time"},last:{type:["string","object"],format:"date-time"},data:{type:"array",items:{type:"object",required:["time","watts","id","type","value"],properties:{time:{type:["string","object"],format:"date-time"},watts:{$ref:"definitions.json#/definitions/watts"},id:{$ref:"definitions.json#/definitions/id"},type:{$ref:"definitions.json#/definitions/type"},value:{type:"number",minimum:0,maximum:1}}}},ndata:{type:"integer",minimum:0,maximum:1e5,default:0},expires:{type:["string","object"],format:"date-time"}}};var validateGateway=function validate34(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.status){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.driver){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs5===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.type){let data1=data.type;if("string"!=typeof data1){const err7={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if("alarm"!==data1&&"dimmer"!==data1&&"switch"!==data1&&"motionSensor"!==data1&&"windowCovering"!==data1&&"camera"!==data1&&"mediaSource"!==data1&&"thermostat"!==data1&&"lock"!==data1&&"courtesy"!==data1&&"gateway"!==data1&&"tv"!==data1&&"dvr"!==data1&&"appleTv"!==data1&&"discPlayer"!==data1&&"mediaPlayer"!==data1&&"uncontrolledDevice"!==data1){const err8={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema31.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}if(void 0!==data.supportedNotifications){let data2=data.supportedNotifications;if(Array.isArray(data2)){const len0=data2.length;for(let i0=0;i0<len0;i0++){let data3=data2[i0];if("button 1"!==data3&&"button 2"!==data3&&"button 3"!==data3&&"button 4"!==data3&&"button 5"!==data3&&"idle"!==data3&&"powerHasBeedApplied"!==data3&&"acMainsDisconnected"!==data3&&"acMainsReconnected"!==data3&&"replaceBatterySoon"!==data3&&"replaceBatteryNow"!==data3&&"batteryOk"!==data3&&"hardwareFailure"!==data3&&"softwareFailure"!==data3&&"hardwareFailureWithCode"!==data3&&"softwareFailureWithCode"!==data3&&"motionDetection"!==data3&&"airFilterNeedsCleaned"!==data3&&"airFilterNeedsReplaced"!==data3&&"smokeDetected"!==data3&&"outsideSafeTemperatureRange"!==data3&&"outsideSafeHumidityRange"!==data3&&"scheduleMaintenance"!==data3&&"doorAjar"!==data3&&"communicationFailure"!==data3&&"communicationOk"!==data3&&"burglarAlarm"!==data3&&"fireAlarm"!==data3){const err9={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}let j0,i1=data2.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data2[i1],data2[j0])){const err10={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++;break outer0}}else{const err11={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}if(void 0!==data.notification&&(validate35(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate35.errors:vErrors.concat(validate35.errors),errors=vErrors.length)),void 0!==data.status&&"string"!=typeof data.status){const err12={instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err13={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data.driver){let data7=data.driver;if("string"!=typeof data7){const err14={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if("adlink"!==data7&&"aws-kinesis"!==data7&&"butler"!==data7&&"crestron"!==data7&&"dell"!==data7&&"dmp"!==data7&&"doorbird"!==data7&&"dormakaba"!==data7&&"dsc"!==data7&&"ecobee"!==data7&&"epson"!==data7&&"geovision-rs"!==data7&&"geovision-as-manager"!==data7&&"honeywell-vista"!==data7&&"igor"!==data7&&"inncom"!==data7&&"isapi"!==data7&&"kohost-k7"!==data7&&"kohost"!==data7&&"lg"!==data7&&"lg-webos"!==data7&&"lapi"!==data7&&"lirc"!==data7&&"mews"!==data7&&"mht"!==data7&&"paxton"!==data7&&"pelican-wireless"!==data7&&"power-shades"!==data7&&"rachio"!==data7&&"rebrandly"!==data7&&"relay"!==data7&&"rtsp"!==data7&&"salto"!==data7&&"salto-irn"!==data7&&"samsung"!==data7&&"se"!==data7&&"sendgrid"!==data7&&"sonifi"!==data7&&"stay-n-touch"!==data7&&"storable"!==data7&&"twilio"!==data7&&"unifi"!==data7&&"valcom"!==data7&&"vizio"!==data7&&"wisenet"!==data7&&"cloudflare-images"!==data7&&"cloudflare-stream"!==data7&&"insperia-privacy"!==data7){const err15={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.watts){let data8=data.watts;if("number"==typeof data8){if(data8<0||isNaN(data8)){const err16={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}else{const err17={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err18={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err19={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err20={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err21={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}else{const err22={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}return validate34.errors=vErrors,0===errors};function validate35(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate35.errors=vErrors,0===errors}var validateIdentification=validate37,schema95={$schema:"http://json-schema.org/draft-07/schema",$id:"identification.json",title:"Identification",type:"object",required:["type"],oneOf:[{required:["number"]},{required:["encryptedNumber"]}],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["driversLicense","passport","identityCard","visa"]},number:{string:"string"},maskedNumber:{string:"string"},encryptedNumber:{string:"string"},issued:{type:["string","object"],format:"date-time"},expires:{type:["string","object","null"],format:"date-time"},verified:{type:"boolean"},matched:{type:"boolean"},firstName:{type:"string"},lastName:{type:"string"},issuingCountry:{string:"string",minLength:2,maxLength:2},systemId:{$ref:"definitions.json#/definitions/systemId"}}};function validate37(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;const _errs1=errors;let valid0=!1,passing0=null;const _errs2=errors;if(data&&"object"==typeof data&&!Array.isArray(data)&&void 0===data.number){const err0={instancePath:instancePath,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"number"},message:"must have required property 'number'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}(_valid0=_errs2===errors)&&(valid0=!0,passing0=0);const _errs3=errors;if(data&&"object"==typeof data&&!Array.isArray(data)&&void 0===data.encryptedNumber){const err1={instancePath:instancePath,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"encryptedNumber"},message:"must have required property 'encryptedNumber'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}var _valid0;if((_valid0=_errs3===errors)&&valid0?(valid0=!1,passing0=[passing0,1]):_valid0&&(valid0=!0,passing0=1),valid0)errors=_errs1,null!==vErrors&&(_errs1?vErrors.length=_errs1:vErrors=null);else{const err2={instancePath:instancePath,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:passing0},message:"must match exactly one schema in oneOf"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs7=errors,_errs8=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs8===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs7,null!==vErrors&&(_errs7?vErrors.length=_errs7:vErrors=null)}if(void 0!==data.type){let data1=data.type;if("string"!=typeof data1){const err7={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if("driversLicense"!==data1&&"passport"!==data1&&"identityCard"!==data1&&"visa"!==data1){const err8={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema95.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}if(void 0!==data.issued){let data2=data.issued;if("string"!=typeof data2&&(!data2||"object"!=typeof data2||Array.isArray(data2))){const err9={instancePath:instancePath+"/issued",schemaPath:"#/properties/issued/type",keyword:"type",params:{type:schema95.properties.issued.type},message:"must be string,object"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if("string"==typeof data2&&!formats4.validate(data2)){const err10={instancePath:instancePath+"/issued",schemaPath:"#/properties/issued/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}if(void 0!==data.expires){let data3=data.expires;if("string"!=typeof data3&&(!data3||"object"!=typeof data3||Array.isArray(data3))&&null!==data3){const err11={instancePath:instancePath+"/expires",schemaPath:"#/properties/expires/type",keyword:"type",params:{type:schema95.properties.expires.type},message:"must be string,object,null"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if("string"==typeof data3&&!formats4.validate(data3)){const err12={instancePath:instancePath+"/expires",schemaPath:"#/properties/expires/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}if(void 0!==data.verified&&"boolean"!=typeof data.verified){const err13={instancePath:instancePath+"/verified",schemaPath:"#/properties/verified/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data.matched&&"boolean"!=typeof data.matched){const err14={instancePath:instancePath+"/matched",schemaPath:"#/properties/matched/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(void 0!==data.firstName&&"string"!=typeof data.firstName){const err15={instancePath:instancePath+"/firstName",schemaPath:"#/properties/firstName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0!==data.lastName&&"string"!=typeof data.lastName){const err16={instancePath:instancePath+"/lastName",schemaPath:"#/properties/lastName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data.issuingCountry){let data8=data.issuingCountry;if("string"==typeof data8){if(func3(data8)>2){const err17={instancePath:instancePath+"/issuingCountry",schemaPath:"#/properties/issuingCountry/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(func3(data8)<2){const err18={instancePath:instancePath+"/issuingCountry",schemaPath:"#/properties/issuingCountry/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err19={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}}else{const err20={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}return validate37.errors=vErrors,0===errors}var validateIssue=function validate38(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="issue"),void 0===data.autoCreateTicket&&(data.autoCreateTicket=!0),void 0===data.excludedResources&&(data.excludedResources=[]),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.name){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.department){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"department"},message:"must have required property 'department'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs5===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err7={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if("issue"!==data1){const err8={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema98.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0!==data.name&&"string"!=typeof data.name){const err9={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0!==data.description&&"string"!=typeof data.description){const err10={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data.department&&"string"!=typeof data.department){const err11={instancePath:instancePath+"/department",schemaPath:"#/properties/department/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.autoAssign){let data5=data.autoAssign;if(data5&&"object"==typeof data5&&!Array.isArray(data5)){if(void 0!==data5.userId&&"string"!=typeof data5.userId){const err12={instancePath:instancePath+"/autoAssign/userId",schemaPath:"#/properties/autoAssign/properties/userId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data5.vendorId&&"string"!=typeof data5.vendorId){const err13={instancePath:instancePath+"/autoAssign/vendorId",schemaPath:"#/properties/autoAssign/properties/vendorId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data5.priority){let data8=data5.priority;if("string"!=typeof data8){const err14={instancePath:instancePath+"/autoAssign/priority",schemaPath:"ticket.json#/properties/priority/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if("low"!==data8&&"normal"!==data8&&"high"!==data8){const err15={instancePath:instancePath+"/autoAssign/priority",schemaPath:"ticket.json#/properties/priority/enum",keyword:"enum",params:{allowedValues:schema109.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data5.tags){let data9=data5.tags;if(Array.isArray(data9)){const len0=data9.length;for(let i0=0;i0<len0;i0++)if("string"!=typeof data9[i0]){const err16={instancePath:instancePath+"/autoAssign/tags/"+i0,schemaPath:"#/properties/autoAssign/properties/tags/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}else{const err17={instancePath:instancePath+"/autoAssign/tags",schemaPath:"#/properties/autoAssign/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}}else{const err18={instancePath:instancePath+"/autoAssign",schemaPath:"#/properties/autoAssign/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}if(void 0!==data.systemKey&&"string"!=typeof data.systemKey){const err19={instancePath:instancePath+"/systemKey",schemaPath:"#/properties/systemKey/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if("boolean"!=typeof data.autoCreateTicket){const err20={instancePath:instancePath+"/autoCreateTicket",schemaPath:"#/properties/autoCreateTicket/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}let data13=data.excludedResources;if(Array.isArray(data13)){const len1=data13.length;for(let i1=0;i1<len1;i1++)if("string"!=typeof data13[i1]){const err21={instancePath:instancePath+"/excludedResources/"+i1,schemaPath:"#/properties/excludedResources/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}else{const err22={instancePath:instancePath+"/excludedResources",schemaPath:"#/properties/excludedResources/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}else{const err23={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}return validate38.errors=vErrors,0===errors},schema98={$schema:"http://json-schema.org/draft-07/schema",$id:"issue.json",title:"Issue",description:"An issue associated with ticketing and concierge.",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["issue"],default:"issue"},name:{type:"string"},description:{type:"string"},department:{type:"string"},autoAssign:{type:"object",properties:{userId:{type:"string"},vendorId:{type:"string"},priority:{$ref:"ticket.json#/properties/priority"},tags:{type:"array",items:{type:"string"}}}},systemKey:{type:"string"},autoCreateTicket:{type:"boolean",default:!0},excludedResources:{type:"array",description:"A list of resources that should not trigger notifications of this issue",items:{type:"string"},default:[]}},required:["id","type","name","department"]},schema109={type:"string",enum:["low","normal","high"],default:"normal"};var validateLock=validate45,schema110={$schema:"http://json-schema.org/draft-07/schema",$id:"lock.json",title:"Lock",description:"Any smart lock",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},offline:{type:"boolean"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},state:{type:["string","null"],enum:["locked","unlocked",null]},mode:{type:["string","null"],enum:["normal","autoLock","emergencyOpen","emergencyClose","holdOpen","lockdown",null],description:"emergencyOpen and emergencyClose are deprecated and can be removed once Salto, Paxton and Geovision drivers are updated",default:null},supportedModes:{type:"array",uniqueItems:!0,items:{enum:["normal","autoLock","emergencyOpen","emergencyClose","holdOpen","lockdown",null]}},batteryLevel:{$ref:"definitions.json#/definitions/batteryLevel"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","state","driver"]};function validate46(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate46.errors=vErrors,0===errors}function validate45(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.mode&&(data.mode=null),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.state){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"state"},message:"must have required property 'state'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.driver){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs5===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err7={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.type){let data2=data.type;if("string"!=typeof data2){const err8={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("alarm"!==data2&&"dimmer"!==data2&&"switch"!==data2&&"motionSensor"!==data2&&"windowCovering"!==data2&&"camera"!==data2&&"mediaSource"!==data2&&"thermostat"!==data2&&"lock"!==data2&&"courtesy"!==data2&&"gateway"!==data2&&"tv"!==data2&&"dvr"!==data2&&"appleTv"!==data2&&"discPlayer"!==data2&&"mediaPlayer"!==data2&&"uncontrolledDevice"!==data2){const err9={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema31.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.offline&&"boolean"!=typeof data.offline){const err10={instancePath:instancePath+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data.supportedNotifications){let data4=data.supportedNotifications;if(Array.isArray(data4)){const len0=data4.length;for(let i0=0;i0<len0;i0++){let data5=data4[i0];if("button 1"!==data5&&"button 2"!==data5&&"button 3"!==data5&&"button 4"!==data5&&"button 5"!==data5&&"idle"!==data5&&"powerHasBeedApplied"!==data5&&"acMainsDisconnected"!==data5&&"acMainsReconnected"!==data5&&"replaceBatterySoon"!==data5&&"replaceBatteryNow"!==data5&&"batteryOk"!==data5&&"hardwareFailure"!==data5&&"softwareFailure"!==data5&&"hardwareFailureWithCode"!==data5&&"softwareFailureWithCode"!==data5&&"motionDetection"!==data5&&"airFilterNeedsCleaned"!==data5&&"airFilterNeedsReplaced"!==data5&&"smokeDetected"!==data5&&"outsideSafeTemperatureRange"!==data5&&"outsideSafeHumidityRange"!==data5&&"scheduleMaintenance"!==data5&&"doorAjar"!==data5&&"communicationFailure"!==data5&&"communicationOk"!==data5&&"burglarAlarm"!==data5&&"fireAlarm"!==data5){const err11={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}let j0,i1=data4.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data4[i1],data4[j0])){const err12={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++;break outer0}}else{const err13={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.notification&&(validate46(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate46.errors:vErrors.concat(validate46.errors),errors=vErrors.length)),void 0!==data.driver){let data7=data.driver;if("string"!=typeof data7){const err14={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if("adlink"!==data7&&"aws-kinesis"!==data7&&"butler"!==data7&&"crestron"!==data7&&"dell"!==data7&&"dmp"!==data7&&"doorbird"!==data7&&"dormakaba"!==data7&&"dsc"!==data7&&"ecobee"!==data7&&"epson"!==data7&&"geovision-rs"!==data7&&"geovision-as-manager"!==data7&&"honeywell-vista"!==data7&&"igor"!==data7&&"inncom"!==data7&&"isapi"!==data7&&"kohost-k7"!==data7&&"kohost"!==data7&&"lg"!==data7&&"lg-webos"!==data7&&"lapi"!==data7&&"lirc"!==data7&&"mews"!==data7&&"mht"!==data7&&"paxton"!==data7&&"pelican-wireless"!==data7&&"power-shades"!==data7&&"rachio"!==data7&&"rebrandly"!==data7&&"relay"!==data7&&"rtsp"!==data7&&"salto"!==data7&&"salto-irn"!==data7&&"samsung"!==data7&&"se"!==data7&&"sendgrid"!==data7&&"sonifi"!==data7&&"stay-n-touch"!==data7&&"storable"!==data7&&"twilio"!==data7&&"unifi"!==data7&&"valcom"!==data7&&"vizio"!==data7&&"wisenet"!==data7&&"cloudflare-images"!==data7&&"cloudflare-stream"!==data7&&"insperia-privacy"!==data7){const err15={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.state){let data8=data.state;if("string"!=typeof data8&&null!==data8){const err16={instancePath:instancePath+"/state",schemaPath:"#/properties/state/type",keyword:"type",params:{type:schema110.properties.state.type},message:"must be string,null"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if("locked"!==data8&&"unlocked"!==data8&&null!==data8){const err17={instancePath:instancePath+"/state",schemaPath:"#/properties/state/enum",keyword:"enum",params:{allowedValues:schema110.properties.state.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}let data9=data.mode;if("string"!=typeof data9&&null!==data9){const err18={instancePath:instancePath+"/mode",schemaPath:"#/properties/mode/type",keyword:"type",params:{type:schema110.properties.mode.type},message:"must be string,null"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if("normal"!==data9&&"autoLock"!==data9&&"emergencyOpen"!==data9&&"emergencyClose"!==data9&&"holdOpen"!==data9&&"lockdown"!==data9&&null!==data9){const err19={instancePath:instancePath+"/mode",schemaPath:"#/properties/mode/enum",keyword:"enum",params:{allowedValues:schema110.properties.mode.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data.supportedModes){let data10=data.supportedModes;if(Array.isArray(data10)){const len1=data10.length;for(let i2=0;i2<len1;i2++){let data11=data10[i2];if("normal"!==data11&&"autoLock"!==data11&&"emergencyOpen"!==data11&&"emergencyClose"!==data11&&"holdOpen"!==data11&&"lockdown"!==data11&&null!==data11){const err20={instancePath:instancePath+"/supportedModes/"+i2,schemaPath:"#/properties/supportedModes/items/enum",keyword:"enum",params:{allowedValues:schema110.properties.supportedModes.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}let j1,i3=data10.length;if(i3>1)outer1:for(;i3--;)for(j1=i3;j1--;)if(func0(data10[i3],data10[j1])){const err21={instancePath:instancePath+"/supportedModes",schemaPath:"#/properties/supportedModes/uniqueItems",keyword:"uniqueItems",params:{i:i3,j:j1},message:"must NOT have duplicate items (items ## "+j1+" and "+i3+" are identical)"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++;break outer1}}else{const err22={instancePath:instancePath+"/supportedModes",schemaPath:"#/properties/supportedModes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data.batteryLevel){let data12=data.batteryLevel;if("number"==typeof data12){if(data12>100||isNaN(data12)){const err23={instancePath:instancePath+"/batteryLevel",schemaPath:"definitions.json#/definitions/batteryLevel/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(data12<0||isNaN(data12)){const err24={instancePath:instancePath+"/batteryLevel",schemaPath:"definitions.json#/definitions/batteryLevel/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}else{const err25={instancePath:instancePath+"/batteryLevel",schemaPath:"definitions.json#/definitions/batteryLevel/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err26={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data.watts){let data14=data.watts;if("number"==typeof data14){if(data14<0||isNaN(data14)){const err27={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}}else{const err28={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err29={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err30={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err31={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err32={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}}else{const err33={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}return validate45.errors=vErrors,0===errors}var validateLog=function validate48(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){void 0===data.type&&(data.type="log");let data0=data.type;if("string"!=typeof data0){const err0={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if("log"!==data0){const err1={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema120.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err2={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}else{const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}if(void 0!==data.id){let data2=data.id;if("string"!=typeof data2){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs8=errors,_errs9=errors;if("global"!==data2&&"system"!==data2){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs9===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs8,null!==vErrors&&(_errs8?vErrors.length=_errs8:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err7={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.field1){let data4=data.field1;if(data4&&"object"==typeof data4&&!Array.isArray(data4)){if(void 0===data4.name){const err8={instancePath:instancePath+"/field1",schemaPath:"#/properties/field1/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0===data4.value){const err9={instancePath:instancePath+"/field1",schemaPath:"#/properties/field1/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0!==data4.name&&"string"!=typeof data4.name){const err10={instancePath:instancePath+"/field1/name",schemaPath:"#/properties/field1/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data4.value&&"string"!=typeof data4.value){const err11={instancePath:instancePath+"/field1/value",schemaPath:"#/properties/field1/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}else{const err12={instancePath:instancePath+"/field1",schemaPath:"#/properties/field1/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}if(void 0!==data.field2){let data7=data.field2;if(data7&&"object"==typeof data7&&!Array.isArray(data7)){if(void 0===data7.name){const err13={instancePath:instancePath+"/field2",schemaPath:"#/properties/field2/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0===data7.value){const err14={instancePath:instancePath+"/field2",schemaPath:"#/properties/field2/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(void 0!==data7.name&&"string"!=typeof data7.name){const err15={instancePath:instancePath+"/field2/name",schemaPath:"#/properties/field2/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0!==data7.value&&"string"!=typeof data7.value){const err16={instancePath:instancePath+"/field2/value",schemaPath:"#/properties/field2/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}else{const err17={instancePath:instancePath+"/field2",schemaPath:"#/properties/field2/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}if(void 0!==data.field3){let data10=data.field3;if(data10&&"object"==typeof data10&&!Array.isArray(data10)){if(void 0===data10.name){const err18={instancePath:instancePath+"/field3",schemaPath:"#/properties/field3/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0===data10.value){const err19={instancePath:instancePath+"/field3",schemaPath:"#/properties/field3/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data10.name&&"string"!=typeof data10.name){const err20={instancePath:instancePath+"/field3/name",schemaPath:"#/properties/field3/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0!==data10.value&&"string"!=typeof data10.value){const err21={instancePath:instancePath+"/field3/value",schemaPath:"#/properties/field3/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}else{const err22={instancePath:instancePath+"/field3",schemaPath:"#/properties/field3/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data.field4){let data13=data.field4;if(data13&&"object"==typeof data13&&!Array.isArray(data13)){if(void 0===data13.name){const err23={instancePath:instancePath+"/field4",schemaPath:"#/properties/field4/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0===data13.value){const err24={instancePath:instancePath+"/field4",schemaPath:"#/properties/field4/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data13.name&&"string"!=typeof data13.name){const err25={instancePath:instancePath+"/field4/name",schemaPath:"#/properties/field4/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data13.value&&"string"!=typeof data13.value){const err26={instancePath:instancePath+"/field4/value",schemaPath:"#/properties/field4/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}else{const err27={instancePath:instancePath+"/field4",schemaPath:"#/properties/field4/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}}if(void 0!==data.field5){let data16=data.field5;if(data16&&"object"==typeof data16&&!Array.isArray(data16)){if(void 0===data16.name){const err28={instancePath:instancePath+"/field5",schemaPath:"#/properties/field5/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if(void 0===data16.value){const err29={instancePath:instancePath+"/field5",schemaPath:"#/properties/field5/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if(void 0!==data16.name&&"string"!=typeof data16.name){const err30={instancePath:instancePath+"/field5/name",schemaPath:"#/properties/field5/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if(void 0!==data16.value&&"string"!=typeof data16.value){const err31={instancePath:instancePath+"/field5/value",schemaPath:"#/properties/field5/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}}else{const err32={instancePath:instancePath+"/field5",schemaPath:"#/properties/field5/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}}if(void 0!==data.field6){let data19=data.field6;if(data19&&"object"==typeof data19&&!Array.isArray(data19)){if(void 0===data19.name){const err33={instancePath:instancePath+"/field6",schemaPath:"#/properties/field6/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}if(void 0===data19.value){const err34={instancePath:instancePath+"/field6",schemaPath:"#/properties/field6/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(void 0!==data19.name&&"string"!=typeof data19.name){const err35={instancePath:instancePath+"/field6/name",schemaPath:"#/properties/field6/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}if(void 0!==data19.value&&"string"!=typeof data19.value){const err36={instancePath:instancePath+"/field6/value",schemaPath:"#/properties/field6/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}}else{const err37={instancePath:instancePath+"/field6",schemaPath:"#/properties/field6/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}}}else{const err38={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}return validate48.errors=vErrors,0===errors},schema120={$schema:"http://json-schema.org/draft-07/schema",$id:"log.json",title:"Log",type:"object",properties:{type:{type:"string",default:"log",enum:["log"]},timestamp:{type:"number",minimum:1655907956593},id:{$ref:"definitions.json#/definitions/id"},name:{type:"string",description:"Event name"},field1:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field2:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field3:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field4:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field5:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field6:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}}}};var validateMediaFile=validate15,validateMediaSource=validate49,schema122={$schema:"http://json-schema.org/draft-07/schema",$id:"mediaSource.json",title:"Media Source",description:"Any media source",type:"object",required:["id","type","discriminator","audio","video","driver"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"mediaSource",enum:["mediaSource"]},discriminator:{type:"string",enum:["tv","dvr","appleTv","discPlayer","mediaPlayer","paSystem","uncontrolledDevice"]},playlists:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{$ref:"definitions.json#/definitions/name"}}}},remote:{type:"string",enum:["MR22GA","XRT260","XRT270","HOF-16K 1.2","219863500","SONIFI","AKB76039803","BN59-01388A"]},name:{$ref:"definitions.json#/definitions/name"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},audio:{type:"boolean"},video:{type:"boolean"},powerFeedback:{type:"boolean"},volumeFeedback:{type:"boolean"},muted:{type:"boolean"},volume:{type:"number",minimum:0,maximum:100},brightness:{type:"number",minimum:0,maximum:100},contrast:{type:"number",minimum:0,maximum:100},power:{type:"string",enum:["on","off"]},input:{type:"string"},supportedInputs:{type:"array",items:{type:"string"}},supportedOutputs:{type:"array",items:{type:"string"}},command:{type:["string","null"],enum:["mute","volumeUp","volumeDown","brightnessUp","brightnessDown","channelUp","channelDown","number0","number1","number2","number3","number4","number5","number6","number7","number8","number9","lastChannel","display","favoriteChannel","play","playing","stop","stopped","pause","paused","fastForward","fastForwarding","rewind","rewinding","instantReplay","record","ac3","pvrMenu","guide","menu","menuUp","menuDown","menuLeft","menuRight","pageUp","pageDown","select","exit","input","power","enterChannel","enterVolume","enterBrightness","enterContrast","number10","number11","number12","number13","number14","number15","number16","number10Plus","number20Plus","number100","dash","threeChan","threeD","sixChan","a","add","alarm","am","analog","angle","antenna","antennaEast","antennaWest","aspect","audio1","audio2","audio3","audioDumming","audioLevelDown","audioLevelUp","b","back","c","component1","component2","component3","d","home","list","liveTv","discreteInputCable","powerOff","powerOn","setupMenu","skipForward","skipReverse","video1","video2","video3","video4","video5","details","hdmi1","hdmi2","hdmi3","cecDeviceList","mtsSap","red","green","yellow","blue","alert","order"]},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},additionalProperties:!1};function validate50(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate50.errors=vErrors,0===errors}function validate49(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="mediaSource"),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.discriminator){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.audio){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"audio"},message:"must have required property 'audio'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.video){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"video"},message:"must have required property 'video'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0===data.driver){const err5={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}for(const key0 in data)if(!func5.call(schema122.properties,key0)){const err6={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err7={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err8={};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(_errs6===errors){const err9={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err10={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("mediaSource"!==data1){const err11={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema122.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.discriminator){let data2=data.discriminator;if("string"!=typeof data2){const err12={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if("tv"!==data2&&"dvr"!==data2&&"appleTv"!==data2&&"discPlayer"!==data2&&"mediaPlayer"!==data2&&"paSystem"!==data2&&"uncontrolledDevice"!==data2){const err13={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema122.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.playlists){let data3=data.playlists;if(Array.isArray(data3)){const len0=data3.length;for(let i0=0;i0<len0;i0++){let data4=data3[i0];if(data4&&"object"==typeof data4&&!Array.isArray(data4)){if(void 0!==data4.id){let data5=data4.id;if("string"!=typeof data5){const err14={instancePath:instancePath+"/playlists/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}const _errs18=errors,_errs19=errors;if("global"!==data5&&"system"!==data5){const err15={};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(_errs19===errors){const err16={instancePath:instancePath+"/playlists/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}else errors=_errs18,null!==vErrors&&(_errs18?vErrors.length=_errs18:vErrors=null)}if(void 0!==data4.name&&"string"!=typeof data4.name){const err17={instancePath:instancePath+"/playlists/"+i0+"/name",schemaPath:"definitions.json#/definitions/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}else{const err18={instancePath:instancePath+"/playlists/"+i0,schemaPath:"#/properties/playlists/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}}else{const err19={instancePath:instancePath+"/playlists",schemaPath:"#/properties/playlists/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}}if(void 0!==data.remote){let data7=data.remote;if("string"!=typeof data7){const err20={instancePath:instancePath+"/remote",schemaPath:"#/properties/remote/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if("MR22GA"!==data7&&"XRT260"!==data7&&"XRT270"!==data7&&"HOF-16K 1.2"!==data7&&"219863500"!==data7&&"SONIFI"!==data7&&"AKB76039803"!==data7&&"BN59-01388A"!==data7){const err21={instancePath:instancePath+"/remote",schemaPath:"#/properties/remote/enum",keyword:"enum",params:{allowedValues:schema122.properties.remote.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}if(void 0!==data.name&&"string"!=typeof data.name){const err22={instancePath:instancePath+"/name",schemaPath:"definitions.json#/definitions/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0!==data.driver){let data9=data.driver;if("string"!=typeof data9){const err23={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if("adlink"!==data9&&"aws-kinesis"!==data9&&"butler"!==data9&&"crestron"!==data9&&"dell"!==data9&&"dmp"!==data9&&"doorbird"!==data9&&"dormakaba"!==data9&&"dsc"!==data9&&"ecobee"!==data9&&"epson"!==data9&&"geovision-rs"!==data9&&"geovision-as-manager"!==data9&&"honeywell-vista"!==data9&&"igor"!==data9&&"inncom"!==data9&&"isapi"!==data9&&"kohost-k7"!==data9&&"kohost"!==data9&&"lg"!==data9&&"lg-webos"!==data9&&"lapi"!==data9&&"lirc"!==data9&&"mews"!==data9&&"mht"!==data9&&"paxton"!==data9&&"pelican-wireless"!==data9&&"power-shades"!==data9&&"rachio"!==data9&&"rebrandly"!==data9&&"relay"!==data9&&"rtsp"!==data9&&"salto"!==data9&&"salto-irn"!==data9&&"samsung"!==data9&&"se"!==data9&&"sendgrid"!==data9&&"sonifi"!==data9&&"stay-n-touch"!==data9&&"storable"!==data9&&"twilio"!==data9&&"unifi"!==data9&&"valcom"!==data9&&"vizio"!==data9&&"wisenet"!==data9&&"cloudflare-images"!==data9&&"cloudflare-stream"!==data9&&"insperia-privacy"!==data9){const err24={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}if(void 0!==data.offline&&"boolean"!=typeof data.offline){const err25={instancePath:instancePath+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data.audio&&"boolean"!=typeof data.audio){const err26={instancePath:instancePath+"/audio",schemaPath:"#/properties/audio/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data.video&&"boolean"!=typeof data.video){const err27={instancePath:instancePath+"/video",schemaPath:"#/properties/video/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if(void 0!==data.powerFeedback&&"boolean"!=typeof data.powerFeedback){const err28={instancePath:instancePath+"/powerFeedback",schemaPath:"#/properties/powerFeedback/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if(void 0!==data.volumeFeedback&&"boolean"!=typeof data.volumeFeedback){const err29={instancePath:instancePath+"/volumeFeedback",schemaPath:"#/properties/volumeFeedback/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if(void 0!==data.muted&&"boolean"!=typeof data.muted){const err30={instancePath:instancePath+"/muted",schemaPath:"#/properties/muted/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if(void 0!==data.volume){let data16=data.volume;if("number"==typeof data16){if(data16>100||isNaN(data16)){const err31={instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}if(data16<0||isNaN(data16)){const err32={instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}}else{const err33={instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}}if(void 0!==data.brightness){let data17=data.brightness;if("number"==typeof data17){if(data17>100||isNaN(data17)){const err34={instancePath:instancePath+"/brightness",schemaPath:"#/properties/brightness/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(data17<0||isNaN(data17)){const err35={instancePath:instancePath+"/brightness",schemaPath:"#/properties/brightness/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}}else{const err36={instancePath:instancePath+"/brightness",schemaPath:"#/properties/brightness/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}}if(void 0!==data.contrast){let data18=data.contrast;if("number"==typeof data18){if(data18>100||isNaN(data18)){const err37={instancePath:instancePath+"/contrast",schemaPath:"#/properties/contrast/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}if(data18<0||isNaN(data18)){const err38={instancePath:instancePath+"/contrast",schemaPath:"#/properties/contrast/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}else{const err39={instancePath:instancePath+"/contrast",schemaPath:"#/properties/contrast/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}if(void 0!==data.power){let data19=data.power;if("string"!=typeof data19){const err40={instancePath:instancePath+"/power",schemaPath:"#/properties/power/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}if("on"!==data19&&"off"!==data19){const err41={instancePath:instancePath+"/power",schemaPath:"#/properties/power/enum",keyword:"enum",params:{allowedValues:schema122.properties.power.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}}if(void 0!==data.input&&"string"!=typeof data.input){const err42={instancePath:instancePath+"/input",schemaPath:"#/properties/input/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}if(void 0!==data.supportedInputs){let data21=data.supportedInputs;if(Array.isArray(data21)){const len1=data21.length;for(let i1=0;i1<len1;i1++)if("string"!=typeof data21[i1]){const err43={instancePath:instancePath+"/supportedInputs/"+i1,schemaPath:"#/properties/supportedInputs/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}}else{const err44={instancePath:instancePath+"/supportedInputs",schemaPath:"#/properties/supportedInputs/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}}if(void 0!==data.supportedOutputs){let data23=data.supportedOutputs;if(Array.isArray(data23)){const len2=data23.length;for(let i2=0;i2<len2;i2++)if("string"!=typeof data23[i2]){const err45={instancePath:instancePath+"/supportedOutputs/"+i2,schemaPath:"#/properties/supportedOutputs/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}}else{const err46={instancePath:instancePath+"/supportedOutputs",schemaPath:"#/properties/supportedOutputs/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}}if(void 0!==data.command){let data25=data.command;if("string"!=typeof data25&&null!==data25){const err47={instancePath:instancePath+"/command",schemaPath:"#/properties/command/type",keyword:"type",params:{type:schema122.properties.command.type},message:"must be string,null"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}if("mute"!==data25&&"volumeUp"!==data25&&"volumeDown"!==data25&&"brightnessUp"!==data25&&"brightnessDown"!==data25&&"channelUp"!==data25&&"channelDown"!==data25&&"number0"!==data25&&"number1"!==data25&&"number2"!==data25&&"number3"!==data25&&"number4"!==data25&&"number5"!==data25&&"number6"!==data25&&"number7"!==data25&&"number8"!==data25&&"number9"!==data25&&"lastChannel"!==data25&&"display"!==data25&&"favoriteChannel"!==data25&&"play"!==data25&&"playing"!==data25&&"stop"!==data25&&"stopped"!==data25&&"pause"!==data25&&"paused"!==data25&&"fastForward"!==data25&&"fastForwarding"!==data25&&"rewind"!==data25&&"rewinding"!==data25&&"instantReplay"!==data25&&"record"!==data25&&"ac3"!==data25&&"pvrMenu"!==data25&&"guide"!==data25&&"menu"!==data25&&"menuUp"!==data25&&"menuDown"!==data25&&"menuLeft"!==data25&&"menuRight"!==data25&&"pageUp"!==data25&&"pageDown"!==data25&&"select"!==data25&&"exit"!==data25&&"input"!==data25&&"power"!==data25&&"enterChannel"!==data25&&"enterVolume"!==data25&&"enterBrightness"!==data25&&"enterContrast"!==data25&&"number10"!==data25&&"number11"!==data25&&"number12"!==data25&&"number13"!==data25&&"number14"!==data25&&"number15"!==data25&&"number16"!==data25&&"number10Plus"!==data25&&"number20Plus"!==data25&&"number100"!==data25&&"dash"!==data25&&"threeChan"!==data25&&"threeD"!==data25&&"sixChan"!==data25&&"a"!==data25&&"add"!==data25&&"alarm"!==data25&&"am"!==data25&&"analog"!==data25&&"angle"!==data25&&"antenna"!==data25&&"antennaEast"!==data25&&"antennaWest"!==data25&&"aspect"!==data25&&"audio1"!==data25&&"audio2"!==data25&&"audio3"!==data25&&"audioDumming"!==data25&&"audioLevelDown"!==data25&&"audioLevelUp"!==data25&&"b"!==data25&&"back"!==data25&&"c"!==data25&&"component1"!==data25&&"component2"!==data25&&"component3"!==data25&&"d"!==data25&&"home"!==data25&&"list"!==data25&&"liveTv"!==data25&&"discreteInputCable"!==data25&&"powerOff"!==data25&&"powerOn"!==data25&&"setupMenu"!==data25&&"skipForward"!==data25&&"skipReverse"!==data25&&"video1"!==data25&&"video2"!==data25&&"video3"!==data25&&"video4"!==data25&&"video5"!==data25&&"details"!==data25&&"hdmi1"!==data25&&"hdmi2"!==data25&&"hdmi3"!==data25&&"cecDeviceList"!==data25&&"mtsSap"!==data25&&"red"!==data25&&"green"!==data25&&"yellow"!==data25&&"blue"!==data25&&"alert"!==data25&&"order"!==data25){const err48={instancePath:instancePath+"/command",schemaPath:"#/properties/command/enum",keyword:"enum",params:{allowedValues:schema122.properties.command.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}}if(void 0!==data.supportedNotifications){let data26=data.supportedNotifications;if(Array.isArray(data26)){const len3=data26.length;for(let i3=0;i3<len3;i3++){let data27=data26[i3];if("button 1"!==data27&&"button 2"!==data27&&"button 3"!==data27&&"button 4"!==data27&&"button 5"!==data27&&"idle"!==data27&&"powerHasBeedApplied"!==data27&&"acMainsDisconnected"!==data27&&"acMainsReconnected"!==data27&&"replaceBatterySoon"!==data27&&"replaceBatteryNow"!==data27&&"batteryOk"!==data27&&"hardwareFailure"!==data27&&"softwareFailure"!==data27&&"hardwareFailureWithCode"!==data27&&"softwareFailureWithCode"!==data27&&"motionDetection"!==data27&&"airFilterNeedsCleaned"!==data27&&"airFilterNeedsReplaced"!==data27&&"smokeDetected"!==data27&&"outsideSafeTemperatureRange"!==data27&&"outsideSafeHumidityRange"!==data27&&"scheduleMaintenance"!==data27&&"doorAjar"!==data27&&"communicationFailure"!==data27&&"communicationOk"!==data27&&"burglarAlarm"!==data27&&"fireAlarm"!==data27){const err49={instancePath:instancePath+"/supportedNotifications/"+i3,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err49]:vErrors.push(err49),errors++}}let j0,i4=data26.length;if(i4>1)outer0:for(;i4--;)for(j0=i4;j0--;)if(func0(data26[i4],data26[j0])){const err50={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i4,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i4+" are identical)"};null===vErrors?vErrors=[err50]:vErrors.push(err50),errors++;break outer0}}else{const err51={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err51]:vErrors.push(err51),errors++}}if(void 0!==data.notification&&(validate50(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate50.errors:vErrors.concat(validate50.errors),errors=vErrors.length)),void 0!==data.systemId&&"string"!=typeof data.systemId){const err52={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err52]:vErrors.push(err52),errors++}if(void 0!==data.watts){let data30=data.watts;if("number"==typeof data30){if(data30<0||isNaN(data30)){const err53={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err53]:vErrors.push(err53),errors++}}else{const err54={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err54]:vErrors.push(err54),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err55={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err55]:vErrors.push(err55),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err56={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err56]:vErrors.push(err56),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err57={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err57]:vErrors.push(err57),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err58={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err58]:vErrors.push(err58),errors++}}else{const err59={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err59]:vErrors.push(err59),errors++}return validate49.errors=vErrors,0===errors}var validateMotionSensor=validate52,schema133={$schema:"http://json-schema.org/draft-07/schema",$id:"motionSensor.json",title:"Motion Sensor",description:"Any smart motion sensor",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{$ref:"definitions.json#/definitions/type"},driver:{$ref:"definitions.json#/definitions/driver"},systemId:{$ref:"definitions.json#/definitions/systemId"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},additionalProperties:!1,required:["id","type","driver"]};function validate53(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate53.errors=vErrors,0===errors}function validate52(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.driver){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}for(const key0 in data)if(!func5.call(schema133.properties,key0)){const err3={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs6===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}if(void 0!==data.type){let data1=data.type;if("string"!=typeof data1){const err7={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if("alarm"!==data1&&"dimmer"!==data1&&"switch"!==data1&&"motionSensor"!==data1&&"windowCovering"!==data1&&"camera"!==data1&&"mediaSource"!==data1&&"thermostat"!==data1&&"lock"!==data1&&"courtesy"!==data1&&"gateway"!==data1&&"tv"!==data1&&"dvr"!==data1&&"appleTv"!==data1&&"discPlayer"!==data1&&"mediaPlayer"!==data1&&"uncontrolledDevice"!==data1){const err8={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema31.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}if(void 0!==data.driver){let data2=data.driver;if("string"!=typeof data2){const err9={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if("adlink"!==data2&&"aws-kinesis"!==data2&&"butler"!==data2&&"crestron"!==data2&&"dell"!==data2&&"dmp"!==data2&&"doorbird"!==data2&&"dormakaba"!==data2&&"dsc"!==data2&&"ecobee"!==data2&&"epson"!==data2&&"geovision-rs"!==data2&&"geovision-as-manager"!==data2&&"honeywell-vista"!==data2&&"igor"!==data2&&"inncom"!==data2&&"isapi"!==data2&&"kohost-k7"!==data2&&"kohost"!==data2&&"lg"!==data2&&"lg-webos"!==data2&&"lapi"!==data2&&"lirc"!==data2&&"mews"!==data2&&"mht"!==data2&&"paxton"!==data2&&"pelican-wireless"!==data2&&"power-shades"!==data2&&"rachio"!==data2&&"rebrandly"!==data2&&"relay"!==data2&&"rtsp"!==data2&&"salto"!==data2&&"salto-irn"!==data2&&"samsung"!==data2&&"se"!==data2&&"sendgrid"!==data2&&"sonifi"!==data2&&"stay-n-touch"!==data2&&"storable"!==data2&&"twilio"!==data2&&"unifi"!==data2&&"valcom"!==data2&&"vizio"!==data2&&"wisenet"!==data2&&"cloudflare-images"!==data2&&"cloudflare-stream"!==data2&&"insperia-privacy"!==data2){const err10={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err11={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.supportedNotifications){let data4=data.supportedNotifications;if(Array.isArray(data4)){const len0=data4.length;for(let i0=0;i0<len0;i0++){let data5=data4[i0];if("button 1"!==data5&&"button 2"!==data5&&"button 3"!==data5&&"button 4"!==data5&&"button 5"!==data5&&"idle"!==data5&&"powerHasBeedApplied"!==data5&&"acMainsDisconnected"!==data5&&"acMainsReconnected"!==data5&&"replaceBatterySoon"!==data5&&"replaceBatteryNow"!==data5&&"batteryOk"!==data5&&"hardwareFailure"!==data5&&"softwareFailure"!==data5&&"hardwareFailureWithCode"!==data5&&"softwareFailureWithCode"!==data5&&"motionDetection"!==data5&&"airFilterNeedsCleaned"!==data5&&"airFilterNeedsReplaced"!==data5&&"smokeDetected"!==data5&&"outsideSafeTemperatureRange"!==data5&&"outsideSafeHumidityRange"!==data5&&"scheduleMaintenance"!==data5&&"doorAjar"!==data5&&"communicationFailure"!==data5&&"communicationOk"!==data5&&"burglarAlarm"!==data5&&"fireAlarm"!==data5){const err12={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}let j0,i1=data4.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data4[i1],data4[j0])){const err13={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++;break outer0}}else{const err14={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}if(void 0!==data.notification&&(validate53(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate53.errors:vErrors.concat(validate53.errors),errors=vErrors.length)),void 0!==data.watts){let data7=data.watts;if("number"==typeof data7){if(data7<0||isNaN(data7)){const err15={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}else{const err16={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err17={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err18={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err19={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err20={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}else{const err21={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}return validate52.errors=vErrors,0===errors}var validateOrder=function validate55(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="order"),void 0===data.items&&(data.items=[]),void 0===data.taxes&&(data.taxes=[]),void 0===data.fees&&(data.fees=[]),void 0===data.delivery&&(data.delivery=[]),void 0===data.payments&&(data.payments=[]),void 0===data.type){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.status){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err2={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err3={};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(_errs5===errors){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err5={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if("order"!==data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema142.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.orderNumber&&"string"!=typeof data.orderNumber){const err7={instancePath:instancePath+"/orderNumber",schemaPath:"#/properties/orderNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.status){let data3=data.status;if("string"!=typeof data3){const err8={instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("draft"!==data3&&"pendingPayment"!==data3&&"processing"!==data3&&"outForDelivery"!==data3&&"completed"!==data3&&"paymentFailed"!==data3&&"cancelled"!==data3&&"refunded"!==data3){const err9={instancePath:instancePath+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:schema142.properties.status.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.userId){let data4=data.userId;if("string"!=typeof data4){const err10={instancePath:instancePath+"/userId",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}const _errs15=errors,_errs16=errors;if("global"!==data4&&"system"!==data4){const err11={};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(_errs16===errors){const err12={instancePath:instancePath+"/userId",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}else errors=_errs15,null!==vErrors&&(_errs15?vErrors.length=_errs15:vErrors=null)}if(void 0!==data.reservationId){let data5=data.reservationId;if("string"!=typeof data5){const err13={instancePath:instancePath+"/reservationId",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}const _errs20=errors,_errs21=errors;if("global"!==data5&&"system"!==data5){const err14={};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(_errs21===errors){const err15={instancePath:instancePath+"/reservationId",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}else errors=_errs20,null!==vErrors&&(_errs20?vErrors.length=_errs20:vErrors=null)}if(void 0!==data.date){let data6=data.date;if("string"!=typeof data6&&(!data6||"object"!=typeof data6||Array.isArray(data6))){const err16={instancePath:instancePath+"/date",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if("string"==typeof data6&&!formats4.validate(data6)){const err17={instancePath:instancePath+"/date",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}let data7=data.items;if(Array.isArray(data7)){const len0=data7.length;for(let i0=0;i0<len0;i0++){let data8=data7[i0];if(data8&&"object"==typeof data8&&!Array.isArray(data8)){if(void 0===data8.quantity&&(data8.quantity=1),void 0===data8.name){const err18={instancePath:instancePath+"/items/"+i0,schemaPath:"#/properties/items/items/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0===data8.price){const err19={instancePath:instancePath+"/items/"+i0,schemaPath:"#/properties/items/items/required",keyword:"required",params:{missingProperty:"price"},message:"must have required property 'price'"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data8.additionalProperties){const err20={instancePath:instancePath+"/items/"+i0+"/additionalProperties",schemaPath:"#/properties/items/items/properties/additionalProperties/false schema",keyword:"false schema",params:{},message:"boolean schema is false"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0!==data8.name&&"string"!=typeof data8.name){const err21={instancePath:instancePath+"/items/"+i0+"/name",schemaPath:"#/properties/items/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if(void 0!==data8.sku&&"string"!=typeof data8.sku){const err22={instancePath:instancePath+"/items/"+i0+"/sku",schemaPath:"#/properties/items/items/properties/sku/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if("number"!=typeof data8.quantity){const err23={instancePath:instancePath+"/items/"+i0+"/quantity",schemaPath:"#/properties/items/items/properties/quantity/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0!==data8.price&&"number"!=typeof data8.price){const err24={instancePath:instancePath+"/items/"+i0+"/price",schemaPath:"#/properties/items/items/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data8.taxClass&&"string"!=typeof data8.taxClass){const err25={instancePath:instancePath+"/items/"+i0+"/taxClass",schemaPath:"#/properties/items/items/properties/taxClass/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data8.deliveryClass&&"string"!=typeof data8.deliveryClass){const err26={instancePath:instancePath+"/items/"+i0+"/deliveryClass",schemaPath:"#/properties/items/items/properties/deliveryClass/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data8.productId&&"string"!=typeof data8.productId){const err27={instancePath:instancePath+"/items/"+i0+"/productId",schemaPath:"#/properties/items/items/properties/productId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}}else{const err28={instancePath:instancePath+"/items/"+i0,schemaPath:"#/properties/items/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}}}else{const err29={instancePath:instancePath+"/items",schemaPath:"#/properties/items/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}let data17=data.taxes;if(Array.isArray(data17)){const len1=data17.length;for(let i1=0;i1<len1;i1++){let data18=data17[i1];if(data18&&"object"==typeof data18&&!Array.isArray(data18)){if(void 0===data18.rateType&&(data18.rateType="percentage"),void 0===data18.name){const err30={instancePath:instancePath+"/taxes/"+i1,schemaPath:"#/properties/taxes/items/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if(void 0===data18.rate){const err31={instancePath:instancePath+"/taxes/"+i1,schemaPath:"#/properties/taxes/items/required",keyword:"required",params:{missingProperty:"rate"},message:"must have required property 'rate'"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}if(void 0!==data18.additionalProperties){const err32={instancePath:instancePath+"/taxes/"+i1+"/additionalProperties",schemaPath:"#/properties/taxes/items/properties/additionalProperties/false schema",keyword:"false schema",params:{},message:"boolean schema is false"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}if(void 0!==data18.name&&"string"!=typeof data18.name){const err33={instancePath:instancePath+"/taxes/"+i1+"/name",schemaPath:"#/properties/taxes/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}if(void 0!==data18.class&&"string"!=typeof data18.class){const err34={instancePath:instancePath+"/taxes/"+i1+"/class",schemaPath:"#/properties/taxes/items/properties/class/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}let data22=data18.rateType;if("string"!=typeof data22){const err35={instancePath:instancePath+"/taxes/"+i1+"/rateType",schemaPath:"#/properties/taxes/items/properties/rateType/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}if("percentage"!==data22&&"flat"!==data22){const err36={instancePath:instancePath+"/taxes/"+i1+"/rateType",schemaPath:"#/properties/taxes/items/properties/rateType/enum",keyword:"enum",params:{allowedValues:schema142.properties.taxes.items.properties.rateType.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}if(void 0!==data18.rate&&"number"!=typeof data18.rate){const err37={instancePath:instancePath+"/taxes/"+i1+"/rate",schemaPath:"#/properties/taxes/items/properties/rate/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}if(void 0!==data18.total&&"number"!=typeof data18.total){const err38={instancePath:instancePath+"/taxes/"+i1+"/total",schemaPath:"#/properties/taxes/items/properties/total/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}else{const err39={instancePath:instancePath+"/taxes/"+i1,schemaPath:"#/properties/taxes/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}}else{const err40={instancePath:instancePath+"/taxes",schemaPath:"#/properties/taxes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}let data25=data.fees;if(Array.isArray(data25)){const len2=data25.length;for(let i2=0;i2<len2;i2++){let data26=data25[i2];if(data26&&"object"==typeof data26&&!Array.isArray(data26)){if(void 0===data26.name){const err41={instancePath:instancePath+"/fees/"+i2,schemaPath:"#/properties/fees/items/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}if(void 0===data26.price){const err42={instancePath:instancePath+"/fees/"+i2,schemaPath:"#/properties/fees/items/required",keyword:"required",params:{missingProperty:"price"},message:"must have required property 'price'"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}if(void 0!==data26.additionalProperties){const err43={instancePath:instancePath+"/fees/"+i2+"/additionalProperties",schemaPath:"#/properties/fees/items/properties/additionalProperties/false schema",keyword:"false schema",params:{},message:"boolean schema is false"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}if(void 0!==data26.name&&"string"!=typeof data26.name){const err44={instancePath:instancePath+"/fees/"+i2+"/name",schemaPath:"#/properties/fees/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}if(void 0!==data26.price&&"number"!=typeof data26.price){const err45={instancePath:instancePath+"/fees/"+i2+"/price",schemaPath:"#/properties/fees/items/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}}else{const err46={instancePath:instancePath+"/fees/"+i2,schemaPath:"#/properties/fees/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}}}else{const err47={instancePath:instancePath+"/fees",schemaPath:"#/properties/fees/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}let data30=data.delivery;if(Array.isArray(data30)){const len3=data30.length;for(let i3=0;i3<len3;i3++){let data31=data30[i3];if(data31&&"object"==typeof data31&&!Array.isArray(data31)){if(void 0===data31.rateType&&(data31.rateType="percentage"),void 0===data31.name){const err48={instancePath:instancePath+"/delivery/"+i3,schemaPath:"#/properties/delivery/items/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}if(void 0===data31.rate){const err49={instancePath:instancePath+"/delivery/"+i3,schemaPath:"#/properties/delivery/items/required",keyword:"required",params:{missingProperty:"rate"},message:"must have required property 'rate'"};null===vErrors?vErrors=[err49]:vErrors.push(err49),errors++}if(void 0!==data31.additionalProperties){const err50={instancePath:instancePath+"/delivery/"+i3+"/additionalProperties",schemaPath:"#/properties/delivery/items/properties/additionalProperties/false schema",keyword:"false schema",params:{},message:"boolean schema is false"};null===vErrors?vErrors=[err50]:vErrors.push(err50),errors++}if(void 0!==data31.name&&"string"!=typeof data31.name){const err51={instancePath:instancePath+"/delivery/"+i3+"/name",schemaPath:"#/properties/delivery/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err51]:vErrors.push(err51),errors++}if(void 0!==data31.class&&"string"!=typeof data31.class){const err52={instancePath:instancePath+"/delivery/"+i3+"/class",schemaPath:"#/properties/delivery/items/properties/class/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err52]:vErrors.push(err52),errors++}let data35=data31.rateType;if("string"!=typeof data35){const err53={instancePath:instancePath+"/delivery/"+i3+"/rateType",schemaPath:"#/properties/delivery/items/properties/rateType/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err53]:vErrors.push(err53),errors++}if("percentage"!==data35&&"flat"!==data35){const err54={instancePath:instancePath+"/delivery/"+i3+"/rateType",schemaPath:"#/properties/delivery/items/properties/rateType/enum",keyword:"enum",params:{allowedValues:schema142.properties.delivery.items.properties.rateType.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err54]:vErrors.push(err54),errors++}if(void 0!==data31.rate&&"number"!=typeof data31.rate){const err55={instancePath:instancePath+"/delivery/"+i3+"/rate",schemaPath:"#/properties/delivery/items/properties/rate/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err55]:vErrors.push(err55),errors++}if(void 0!==data31.total&&"number"!=typeof data31.total){const err56={instancePath:instancePath+"/delivery/"+i3+"/total",schemaPath:"#/properties/delivery/items/properties/total/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err56]:vErrors.push(err56),errors++}}else{const err57={instancePath:instancePath+"/delivery/"+i3,schemaPath:"#/properties/delivery/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err57]:vErrors.push(err57),errors++}}}else{const err58={instancePath:instancePath+"/delivery",schemaPath:"#/properties/delivery/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err58]:vErrors.push(err58),errors++}let data38=data.payments;if(Array.isArray(data38)){const len4=data38.length;for(let i4=0;i4<len4;i4++){let data39=data38[i4];if(data39&&"object"==typeof data39&&!Array.isArray(data39)){if(void 0!==data39.method){let data40=data39.method;if("string"!=typeof data40){const err59={instancePath:instancePath+"/payments/"+i4+"/method",schemaPath:"#/properties/payments/items/properties/method/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err59]:vErrors.push(err59),errors++}if("folio"!==data40&&"invoice"!==data40&&"amex"!==data40&&"visa"!==data40&&"masterCard"!==data40&&"maestro"!==data40&&"discover"!==data40&&"diners"!==data40&&"jcb"!==data40&&"applePay"!==data40&&"alipay"!==data40&&"chinaUnionPay"!==data40&&"vpay"!==data40){const err60={instancePath:instancePath+"/payments/"+i4+"/method",schemaPath:"#/properties/payments/items/properties/method/enum",keyword:"enum",params:{allowedValues:schema142.properties.payments.items.properties.method.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err60]:vErrors.push(err60),errors++}}if(void 0!==data39.name&&"string"!=typeof data39.name){const err61={instancePath:instancePath+"/payments/"+i4+"/name",schemaPath:"#/properties/payments/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err61]:vErrors.push(err61),errors++}if(void 0!==data39.date){let data42=data39.date;if("string"!=typeof data42&&(!data42||"object"!=typeof data42||Array.isArray(data42))){const err62={instancePath:instancePath+"/payments/"+i4+"/date",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err62]:vErrors.push(err62),errors++}if("string"==typeof data42&&!formats4.validate(data42)){const err63={instancePath:instancePath+"/payments/"+i4+"/date",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err63]:vErrors.push(err63),errors++}}if(void 0!==data39.amount&&"number"!=typeof data39.amount){const err64={instancePath:instancePath+"/payments/"+i4+"/amount",schemaPath:"#/properties/payments/items/properties/amount/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err64]:vErrors.push(err64),errors++}if(void 0!==data39.transactionReference&&"string"!=typeof data39.transactionReference){const err65={instancePath:instancePath+"/payments/"+i4+"/transactionReference",schemaPath:"#/properties/payments/items/properties/transactionReference/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err65]:vErrors.push(err65),errors++}}else{const err66={instancePath:instancePath+"/payments/"+i4,schemaPath:"#/properties/payments/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err66]:vErrors.push(err66),errors++}}}else{const err67={instancePath:instancePath+"/payments",schemaPath:"#/properties/payments/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err67]:vErrors.push(err67),errors++}}else{const err68={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err68]:vErrors.push(err68),errors++}return validate55.errors=vErrors,0===errors},schema142={$schema:"http://json-schema.org/draft-07/schema",$id:"order.json",title:"Order",description:"A purchase order for products or services.",type:"object",required:["type","status"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"order",enum:["order"]},orderNumber:{type:"string"},status:{type:"string",enum:["draft","pendingPayment","processing","outForDelivery","completed","paymentFailed","cancelled","refunded"]},userId:{$ref:"definitions.json#/definitions/id",description:"User id of purchaser"},reservationId:{$ref:"definitions.json#/definitions/id",description:"Reservation id if the order is for a reservation"},date:{$ref:"definitions.json#/definitions/date"},items:{type:"array",default:[],items:{type:"object",required:["name","price"],properties:{additionalProperties:!1,name:{type:"string"},sku:{type:"string"},quantity:{type:"number",default:1},price:{type:"number"},taxClass:{type:"string"},deliveryClass:{type:"string"},productId:{type:"string"}}}},taxes:{type:"array",default:[],items:{type:"object",required:["name","rate"],properties:{additionalProperties:!1,name:{type:"string"},class:{type:"string"},rateType:{type:"string",enum:["percentage","flat"],default:"percentage"},rate:{type:"number"},total:{type:"number"}}}},fees:{type:"array",default:[],items:{type:"object",required:["name","price"],properties:{additionalProperties:!1,name:{type:"string"},price:{type:"number"}}}},delivery:{type:"array",default:[],items:{type:"object",required:["name","rate"],properties:{additionalProperties:!1,name:{type:"string"},class:{type:"string"},rateType:{type:"string",enum:["percentage","flat"],default:"percentage"},rate:{type:"number"},total:{type:"number"}}}},payments:{type:"array",default:[],items:{type:"object",properties:{method:{type:"string",enum:["folio","invoice","amex","visa","masterCard","maestro","discover","diners","jcb","applePay","alipay","chinaUnionPay","vpay"]},name:{type:"string"},date:{$ref:"definitions.json#/definitions/date"},amount:{type:"number"},transactionReference:{type:"string"}}}}}};var validateOrganization=function validate56(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="organization"),void 0===data.appManifest&&(data.appManifest={name:"Kohost",short_name:"Kohost",start_url:"/",scope:"/",display:"fullscreen",orientation:"portrait",theme_color:"#1d1f22",background_color:"#1d1f22",icons:[{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/9c85047f-ccba-4b1c-3070-5463fbe93b00/w=512",sizes:"512x512",type:"image/png"}],splash:{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/034fb112-5326-4d37-373e-d1cc2a4d0400/w=1500",sizes:"1500x800",type:"image/jpg"},logo:{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/1e54c54d-3bac-4745-f46f-c2f98036af00/h=75",sizes:"300x75",type:"image/png"}}),void 0===data.accountNumber){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"accountNumber"},message:"must have required property 'accountNumber'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.name){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err2={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err3={};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(_errs5===errors){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err5={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if("organization"!==data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema148.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.accountNumber){let data2=data.accountNumber;if("number"!=typeof data2&&null!==data2){const err7={instancePath:instancePath+"/accountNumber",schemaPath:"#/properties/accountNumber/type",keyword:"type",params:{type:schema148.properties.accountNumber.type},message:"must be number,null"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if("number"==typeof data2&&(data2<1e4||isNaN(data2))){const err8={instancePath:instancePath+"/accountNumber",schemaPath:"#/properties/accountNumber/minimum",keyword:"minimum",params:{comparison:">=",limit:1e4},message:"must be >= 10000"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}if(void 0!==data.name&&"string"!=typeof data.name){const err9={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0!==data.properties){let data4=data.properties;if(Array.isArray(data4)){const len0=data4.length;for(let i0=0;i0<len0;i0++)if("string"!=typeof data4[i0]){const err10={instancePath:instancePath+"/properties/"+i0,schemaPath:"#/properties/properties/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}else{const err11={instancePath:instancePath+"/properties",schemaPath:"#/properties/properties/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}if(void 0!==data.hostname){let data6=data.hostname;if("string"!=typeof data6&&null!==data6){const err12={instancePath:instancePath+"/hostname",schemaPath:"#/properties/hostname/type",keyword:"type",params:{type:schema148.properties.hostname.type},message:"must be string,null"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}let data7=data.appManifest;if(data7&&"object"==typeof data7&&!Array.isArray(data7)){if(void 0===data7.display&&(data7.display="fullscreen"),void 0===data7.orientation&&(data7.orientation="portrait"),void 0!==data7.name&&"string"!=typeof data7.name){const err13={instancePath:instancePath+"/appManifest/name",schemaPath:"#/properties/appManifest/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data7.short_name&&"string"!=typeof data7.short_name){const err14={instancePath:instancePath+"/appManifest/short_name",schemaPath:"#/properties/appManifest/properties/short_name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(void 0!==data7.scope&&"string"!=typeof data7.scope){const err15={instancePath:instancePath+"/appManifest/scope",schemaPath:"#/properties/appManifest/properties/scope/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0!==data7.start_url&&"string"!=typeof data7.start_url){const err16={instancePath:instancePath+"/appManifest/start_url",schemaPath:"#/properties/appManifest/properties/start_url/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data7.themeColor&&"string"!=typeof data7.themeColor){const err17={instancePath:instancePath+"/appManifest/themeColor",schemaPath:"#/properties/appManifest/properties/themeColor/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data7.backgroundColor&&"string"!=typeof data7.backgroundColor){const err18={instancePath:instancePath+"/appManifest/backgroundColor",schemaPath:"#/properties/appManifest/properties/backgroundColor/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}let data14=data7.display;if("string"!=typeof data14){const err19={instancePath:instancePath+"/appManifest/display",schemaPath:"#/properties/appManifest/properties/display/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if("fullscreen"!==data14&&"standalone"!==data14&&"minimal-ui"!==data14&&"browser"!==data14){const err20={instancePath:instancePath+"/appManifest/display",schemaPath:"#/properties/appManifest/properties/display/enum",keyword:"enum",params:{allowedValues:schema148.properties.appManifest.properties.display.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}let data15=data7.orientation;if("string"!=typeof data15){const err21={instancePath:instancePath+"/appManifest/orientation",schemaPath:"#/properties/appManifest/properties/orientation/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if("portrait"!==data15&&"landscape"!==data15){const err22={instancePath:instancePath+"/appManifest/orientation",schemaPath:"#/properties/appManifest/properties/orientation/enum",keyword:"enum",params:{allowedValues:schema148.properties.appManifest.properties.orientation.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0!==data7.splash){let data16=data7.splash;if(data16&&"object"==typeof data16&&!Array.isArray(data16)){if(void 0!==data16.src&&"string"!=typeof data16.src){const err23={instancePath:instancePath+"/appManifest/splash/src",schemaPath:"#/properties/appManifest/properties/splash/properties/src/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0!==data16.type&&"string"!=typeof data16.type){const err24={instancePath:instancePath+"/appManifest/splash/type",schemaPath:"#/properties/appManifest/properties/splash/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data16.sizes&&"string"!=typeof data16.sizes){const err25={instancePath:instancePath+"/appManifest/splash/sizes",schemaPath:"#/properties/appManifest/properties/splash/properties/sizes/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}else{const err26={instancePath:instancePath+"/appManifest/splash",schemaPath:"#/properties/appManifest/properties/splash/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}if(void 0!==data7.icons){let data20=data7.icons;if(Array.isArray(data20)){const len1=data20.length;for(let i1=0;i1<len1;i1++){let data21=data20[i1];if(data21&&"object"==typeof data21&&!Array.isArray(data21)){if(void 0!==data21.src&&"string"!=typeof data21.src){const err27={instancePath:instancePath+"/appManifest/icons/"+i1+"/src",schemaPath:"#/properties/appManifest/properties/icons/items/properties/src/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if(void 0!==data21.sizes&&"string"!=typeof data21.sizes){const err28={instancePath:instancePath+"/appManifest/icons/"+i1+"/sizes",schemaPath:"#/properties/appManifest/properties/icons/items/properties/sizes/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if(void 0!==data21.type&&"string"!=typeof data21.type){const err29={instancePath:instancePath+"/appManifest/icons/"+i1+"/type",schemaPath:"#/properties/appManifest/properties/icons/items/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}}else{const err30={instancePath:instancePath+"/appManifest/icons/"+i1,schemaPath:"#/properties/appManifest/properties/icons/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}}}else{const err31={instancePath:instancePath+"/appManifest/icons",schemaPath:"#/properties/appManifest/properties/icons/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}}if(void 0!==data7.logo){let data25=data7.logo;if(data25&&"object"==typeof data25&&!Array.isArray(data25)){if(void 0!==data25.src&&"string"!=typeof data25.src){const err32={instancePath:instancePath+"/appManifest/logo/src",schemaPath:"#/properties/appManifest/properties/logo/properties/src/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}if(void 0!==data25.type&&"string"!=typeof data25.type){const err33={instancePath:instancePath+"/appManifest/logo/type",schemaPath:"#/properties/appManifest/properties/logo/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}if(void 0!==data25.sizes&&"string"!=typeof data25.sizes){const err34={instancePath:instancePath+"/appManifest/logo/sizes",schemaPath:"#/properties/appManifest/properties/logo/properties/sizes/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}}else{const err35={instancePath:instancePath+"/appManifest/logo",schemaPath:"#/properties/appManifest/properties/logo/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}}}else{const err36={instancePath:instancePath+"/appManifest",schemaPath:"#/properties/appManifest/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}if(void 0!==data.tickets){let data29=data.tickets;if(data29&&"object"==typeof data29&&!Array.isArray(data29)){void 0===data29.nextTicketNumber&&(data29.nextTicketNumber=1);let data30=data29.nextTicketNumber;if("string"!=typeof data30&&("number"!=typeof data30||data30%1||isNaN(data30))){const err37={instancePath:instancePath+"/tickets/nextTicketNumber",schemaPath:"#/properties/tickets/properties/nextTicketNumber/type",keyword:"type",params:{type:schema148.properties.tickets.properties.nextTicketNumber.type},message:"must be string,integer"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}}else{const err38={instancePath:instancePath+"/tickets",schemaPath:"#/properties/tickets/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}if(void 0!==data.credentials){let data31=data.credentials;if(!data31||"object"!=typeof data31||Array.isArray(data31)){const err39={instancePath:instancePath+"/credentials",schemaPath:"#/properties/credentials/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}if(void 0!==data.createdAt){let data32=data.createdAt;if("string"!=typeof data32&&(!data32||"object"!=typeof data32||Array.isArray(data32))){const err40={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:schema102.type},message:"must be string,object"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}if("string"==typeof data32&&!formats4.validate(data32)){const err41={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}}if(void 0!==data.updatedAt){let data33=data.updatedAt;if("string"!=typeof data33&&(!data33||"object"!=typeof data33||Array.isArray(data33))){const err42={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/type",keyword:"type",params:{type:schema151.type},message:"must be string,object"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}if("string"==typeof data33&&!formats4.validate(data33)){const err43={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}}}else{const err44={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}return validate56.errors=vErrors,0===errors},schema148={$schema:"http://json-schema.org/draft-07/schema",$id:"organization.json",title:"Organization",type:"object",description:"An organization is a group or entity that subscribes to Kohost software.",required:["accountNumber","name"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"organization",enum:["organization"]},accountNumber:{type:["number","null"],minimum:1e4},name:{type:"string"},properties:{type:"array",items:{type:"string"}},hostname:{type:["string","null"]},appManifest:{type:"object",properties:{name:{type:"string"},short_name:{type:"string"},scope:{type:"string"},start_url:{type:"string"},themeColor:{type:"string"},backgroundColor:{type:"string"},display:{type:"string",enum:["fullscreen","standalone","minimal-ui","browser"],default:"fullscreen"},orientation:{type:"string",enum:["portrait","landscape"],default:"portrait"},splash:{type:"object",properties:{src:{type:"string"},type:{type:"string"},sizes:{type:"string"}}},icons:{type:"array",items:{type:"object",properties:{src:{type:"string"},sizes:{type:"string"},type:{type:"string"}}}},logo:{type:"object",properties:{src:{type:"string"},type:{type:"string"},sizes:{type:"string"}}}},default:{name:"Kohost",short_name:"Kohost",start_url:"/",scope:"/",display:"fullscreen",orientation:"portrait",theme_color:"#1d1f22",background_color:"#1d1f22",icons:[{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/9c85047f-ccba-4b1c-3070-5463fbe93b00/w=512",sizes:"512x512",type:"image/png"}],splash:{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/034fb112-5326-4d37-373e-d1cc2a4d0400/w=1500",sizes:"1500x800",type:"image/jpg"},logo:{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/1e54c54d-3bac-4745-f46f-c2f98036af00/h=75",sizes:"300x75",type:"image/png"}}},tickets:{type:"object",properties:{nextTicketNumber:{type:["string","integer"],default:1}}},credentials:{type:"object",additionalProperties:!0},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}}},schema102={type:["string","object"],format:"date-time"},schema151={type:["string","object"],format:"date-time"};var validatePayment=validate57,schema152={$schema:"http://json-schema.org/draft-07/schema",$id:"payment.json",title:"Payment",type:"object",required:["type","maskedNumber","expires"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["amex","visa","masterCard","maestro","discover","diners","jcb","applePay","alipay","chinaUnionPay","vpay"]},enabled:{type:"boolean",default:!0},storageData:{type:["string","null"]},maskedNumber:{string:"string"},issued:{type:["string","null"]},expires:{string:"string"},systemId:{$ref:"definitions.json#/definitions/systemId"}}};function validate57(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.enabled&&(data.enabled=!0),void 0===data.type){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.maskedNumber){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"maskedNumber"},message:"must have required property 'maskedNumber'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.expires){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"expires"},message:"must have required property 'expires'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err4={};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(_errs5===errors){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.type){let data1=data.type;if("string"!=typeof data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if("amex"!==data1&&"visa"!==data1&&"masterCard"!==data1&&"maestro"!==data1&&"discover"!==data1&&"diners"!==data1&&"jcb"!==data1&&"applePay"!==data1&&"alipay"!==data1&&"chinaUnionPay"!==data1&&"vpay"!==data1){const err7={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema152.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}}if("boolean"!=typeof data.enabled){const err8={instancePath:instancePath+"/enabled",schemaPath:"#/properties/enabled/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0!==data.storageData){let data3=data.storageData;if("string"!=typeof data3&&null!==data3){const err9={instancePath:instancePath+"/storageData",schemaPath:"#/properties/storageData/type",keyword:"type",params:{type:schema152.properties.storageData.type},message:"must be string,null"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.issued){let data4=data.issued;if("string"!=typeof data4&&null!==data4){const err10={instancePath:instancePath+"/issued",schemaPath:"#/properties/issued/type",keyword:"type",params:{type:schema152.properties.issued.type},message:"must be string,null"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err11={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}else{const err12={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}return validate57.errors=vErrors,0===errors}var validatePolicy=validate58,schema155={$schema:"http://json-schema.org/draft-07/schema",$id:"policy.json",title:"Policy",description:"A policy is a set of permissions that can be applied to a user to limit their access to resources.",type:"object",required:["name","type","organizationId","propertyId","permissions","discriminator"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"policy",enum:["policy"]},discriminator:{type:"string",enum:["user"]},name:{type:"string",minLength:1},description:{type:"string"},organizationId:{type:"string"},propertyId:{type:"string"},permissions:{type:"array",items:{type:"object",required:["entities","effect"],properties:{entities:{type:"array",items:{type:"string",pattern:"^[^:]+(:.+)+$"}},effect:{type:"string",enum:["Allow","Deny"]}}}}}},pattern2=new RegExp("^[^:]+(:.+)+$","u");function validate58(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="policy"),void 0===data.name){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.organizationId){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"organizationId"},message:"must have required property 'organizationId'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.propertyId){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"propertyId"},message:"must have required property 'propertyId'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.permissions){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"permissions"},message:"must have required property 'permissions'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0===data.discriminator){const err5={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err7={};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(_errs5===errors){const err8={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err9={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if("policy"!==data1){const err10={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema155.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data.discriminator){let data2=data.discriminator;if("string"!=typeof data2){const err11={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if("user"!==data2){const err12={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema155.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}if(void 0!==data.name){let data3=data.name;if("string"==typeof data3){if(func3(data3)<1){const err13={instancePath:instancePath+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}else{const err14={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err15={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0!==data.organizationId&&"string"!=typeof data.organizationId){const err16={instancePath:instancePath+"/organizationId",schemaPath:"#/properties/organizationId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data.propertyId&&"string"!=typeof data.propertyId){const err17={instancePath:instancePath+"/propertyId",schemaPath:"#/properties/propertyId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data.permissions){let data7=data.permissions;if(Array.isArray(data7)){const len0=data7.length;for(let i0=0;i0<len0;i0++){let data8=data7[i0];if(data8&&"object"==typeof data8&&!Array.isArray(data8)){if(void 0===data8.entities){const err18={instancePath:instancePath+"/permissions/"+i0,schemaPath:"#/properties/permissions/items/required",keyword:"required",params:{missingProperty:"entities"},message:"must have required property 'entities'"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0===data8.effect){const err19={instancePath:instancePath+"/permissions/"+i0,schemaPath:"#/properties/permissions/items/required",keyword:"required",params:{missingProperty:"effect"},message:"must have required property 'effect'"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data8.entities){let data9=data8.entities;if(Array.isArray(data9)){const len1=data9.length;for(let i1=0;i1<len1;i1++){let data10=data9[i1];if("string"==typeof data10){if(!pattern2.test(data10)){const err20={instancePath:instancePath+"/permissions/"+i0+"/entities/"+i1,schemaPath:"#/properties/permissions/items/properties/entities/items/pattern",keyword:"pattern",params:{pattern:"^[^:]+(:.+)+$"},message:'must match pattern "^[^:]+(:.+)+$"'};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}else{const err21={instancePath:instancePath+"/permissions/"+i0+"/entities/"+i1,schemaPath:"#/properties/permissions/items/properties/entities/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}}else{const err22={instancePath:instancePath+"/permissions/"+i0+"/entities",schemaPath:"#/properties/permissions/items/properties/entities/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data8.effect){let data11=data8.effect;if("string"!=typeof data11){const err23={instancePath:instancePath+"/permissions/"+i0+"/effect",schemaPath:"#/properties/permissions/items/properties/effect/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if("Allow"!==data11&&"Deny"!==data11){const err24={instancePath:instancePath+"/permissions/"+i0+"/effect",schemaPath:"#/properties/permissions/items/properties/effect/enum",keyword:"enum",params:{allowedValues:schema155.properties.permissions.items.properties.effect.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}}else{const err25={instancePath:instancePath+"/permissions/"+i0,schemaPath:"#/properties/permissions/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}}else{const err26={instancePath:instancePath+"/permissions",schemaPath:"#/properties/permissions/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}}else{const err27={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}return validate58.errors=vErrors,0===errors}var validateProduct=function validate59(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="product"),void 0===data.name){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.price){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"price"},message:"must have required property 'price'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.driver){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err4={};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(_errs5===errors){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if("product"!==data1){const err7={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema157.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.name&&"string"!=typeof data.name){const err8={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0!==data.driver){let data3=data.driver;if("string"!=typeof data3){const err9={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if("adlink"!==data3&&"aws-kinesis"!==data3&&"butler"!==data3&&"crestron"!==data3&&"dell"!==data3&&"dmp"!==data3&&"doorbird"!==data3&&"dormakaba"!==data3&&"dsc"!==data3&&"ecobee"!==data3&&"epson"!==data3&&"geovision-rs"!==data3&&"geovision-as-manager"!==data3&&"honeywell-vista"!==data3&&"igor"!==data3&&"inncom"!==data3&&"isapi"!==data3&&"kohost-k7"!==data3&&"kohost"!==data3&&"lg"!==data3&&"lg-webos"!==data3&&"lapi"!==data3&&"lirc"!==data3&&"mews"!==data3&&"mht"!==data3&&"paxton"!==data3&&"pelican-wireless"!==data3&&"power-shades"!==data3&&"rachio"!==data3&&"rebrandly"!==data3&&"relay"!==data3&&"rtsp"!==data3&&"salto"!==data3&&"salto-irn"!==data3&&"samsung"!==data3&&"se"!==data3&&"sendgrid"!==data3&&"sonifi"!==data3&&"stay-n-touch"!==data3&&"storable"!==data3&&"twilio"!==data3&&"unifi"!==data3&&"valcom"!==data3&&"vizio"!==data3&&"wisenet"!==data3&&"cloudflare-images"!==data3&&"cloudflare-stream"!==data3&&"insperia-privacy"!==data3){const err10={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}if(void 0!==data.price&&"number"!=typeof data.price){const err11={instancePath:instancePath+"/price",schemaPath:"#/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.tax){let data5=data.tax;if("number"!=typeof data5&&null!==data5){const err12={instancePath:instancePath+"/tax",schemaPath:"#/properties/tax/type",keyword:"type",params:{type:schema157.properties.tax.type},message:"must be number,null"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}if(void 0!==data.image&&(validate15(data.image,{instancePath:instancePath+"/image",parentData:data,parentDataProperty:"image",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length)),void 0!==data.category&&"string"!=typeof data.category){const err13={instancePath:instancePath+"/category",schemaPath:"#/properties/category/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data.imageUrl){let data8=data.imageUrl;if("string"==typeof data8){if(!pattern3.test(data8)){const err14={instancePath:instancePath+"/imageUrl",schemaPath:"#/properties/imageUrl/pattern",keyword:"pattern",params:{pattern:"^https?://"},message:'must match pattern "^https?://"'};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(!formats0(data8)){const err15={instancePath:instancePath+"/imageUrl",schemaPath:"#/properties/imageUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err16={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}else{const err17={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}return validate59.errors=vErrors,0===errors},schema157={$schema:"http://json-schema.org/draft-07/schema",$id:"product.json",title:"Product",type:"object",required:["name","price","driver"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"product",enum:["product"]},name:{type:"string"},driver:{$ref:"definitions.json#/definitions/driver"},description:{string:"string"},price:{type:"number"},tax:{type:["number","null"]},image:{$ref:"mediaFile.json"},category:{type:"string"},imageUrl:{format:"uri",pattern:"^https?://"},systemId:{$ref:"definitions.json#/definitions/systemId"}}},pattern3=new RegExp("^https?://","u");var validateProperty=function validate61(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="property"),void 0===data.appFeatures&&(data.appFeatures={RoomControl:{}}),void 0===data.notifications&&(data.notifications={email:{enabled:!1},sms:{enabled:!1},push:{enabled:!1}}),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.name){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.type){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.organization){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"organization"},message:"must have required property 'organization'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.timezone){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"timezone"},message:"must have required property 'timezone'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0===data.discriminator){const err5={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err7={};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(_errs5===errors){const err8={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err9={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}let data2=data.type;if("string"!=typeof data2){const err10={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("property"!==data2){const err11={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema161.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.discriminator){let data3=data.discriminator;if("string"!=typeof data3){const err12={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if("hospitality"!==data3&&"education"!==data3&&"commercial"!==data3&&"storage"!==data3){const err13={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema161.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.organization){let data4=data.organization;if("string"!=typeof data4&&null!==data4){const err14={instancePath:instancePath+"/organization",schemaPath:"#/properties/organization/type",keyword:"type",params:{type:schema161.properties.organization.type},message:"must be string,null"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}if(void 0!==data.departments){let data5=data.departments;if(Array.isArray(data5)){const len0=data5.length;for(let i0=0;i0<len0;i0++)if("string"!=typeof data5[i0]){const err15={instancePath:instancePath+"/departments/"+i0,schemaPath:"#/properties/departments/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}else{const err16={instancePath:instancePath+"/departments",schemaPath:"#/properties/departments/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}if(void 0!==data.testModeEnabled&&"boolean"!=typeof data.testModeEnabled){const err17={instancePath:instancePath+"/testModeEnabled",schemaPath:"#/properties/testModeEnabled/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data.testMode){let data8=data.testMode;if(data8&&"object"==typeof data8&&!Array.isArray(data8)){if(void 0!==data8.notificationEmails){let data9=data8.notificationEmails;if(Array.isArray(data9)){const len1=data9.length;for(let i1=0;i1<len1;i1++)if("string"!=typeof data9[i1]){const err18={instancePath:instancePath+"/testMode/notificationEmails/"+i1,schemaPath:"#/properties/testMode/properties/notificationEmails/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}else{const err19={instancePath:instancePath+"/testMode/notificationEmails",schemaPath:"#/properties/testMode/properties/notificationEmails/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}}if(void 0!==data8.notificationEmailDomains){let data11=data8.notificationEmailDomains;if(Array.isArray(data11)){const len2=data11.length;for(let i2=0;i2<len2;i2++)if("string"!=typeof data11[i2]){const err20={instancePath:instancePath+"/testMode/notificationEmailDomains/"+i2,schemaPath:"#/properties/testMode/properties/notificationEmailDomains/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}else{const err21={instancePath:instancePath+"/testMode/notificationEmailDomains",schemaPath:"#/properties/testMode/properties/notificationEmailDomains/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}}else{const err22={instancePath:instancePath+"/testMode",schemaPath:"#/properties/testMode/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data.timezone){let data13=data.timezone;if("string"==typeof data13){if(!pattern4.test(data13)){const err23={instancePath:instancePath+"/timezone",schemaPath:"#/properties/timezone/pattern",keyword:"pattern",params:{pattern:"^([a-zA-Z]+/[a-zA-Z_]+)$"},message:'must match pattern "^([a-zA-Z]+/[a-zA-Z_]+)$"'};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}}else{const err24={instancePath:instancePath+"/timezone",schemaPath:"#/properties/timezone/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}if(void 0!==data.smsNumber&&"string"!=typeof data.smsNumber){const err25={instancePath:instancePath+"/smsNumber",schemaPath:"#/properties/smsNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data.checkInTime&&"string"!=typeof data.checkInTime){const err26={instancePath:instancePath+"/checkInTime",schemaPath:"#/properties/checkInTime/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data.checkOutTime&&"string"!=typeof data.checkOutTime){const err27={instancePath:instancePath+"/checkOutTime",schemaPath:"#/properties/checkOutTime/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if(void 0!==data.address){let data17=data.address;if(data17&&"object"==typeof data17&&!Array.isArray(data17)){if(void 0!==data17.id&&"string"!=typeof data17.id){const err28={instancePath:instancePath+"/address/id",schemaPath:"definitions.json#/definitions/address/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if(void 0!==data17.line1&&"string"!=typeof data17.line1){const err29={instancePath:instancePath+"/address/line1",schemaPath:"definitions.json#/definitions/address/properties/line1/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if(void 0!==data17.line2&&"string"!=typeof data17.line2){const err30={instancePath:instancePath+"/address/line2",schemaPath:"definitions.json#/definitions/address/properties/line2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if(void 0!==data17.line3&&"string"!=typeof data17.line3){const err31={instancePath:instancePath+"/address/line3",schemaPath:"definitions.json#/definitions/address/properties/line3/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}if(void 0!==data17.city&&"string"!=typeof data17.city){const err32={instancePath:instancePath+"/address/city",schemaPath:"definitions.json#/definitions/address/properties/city/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}if(void 0!==data17.state&&"string"!=typeof data17.state){const err33={instancePath:instancePath+"/address/state",schemaPath:"definitions.json#/definitions/address/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}if(void 0!==data17.postalCode&&"string"!=typeof data17.postalCode){const err34={instancePath:instancePath+"/address/postalCode",schemaPath:"definitions.json#/definitions/address/properties/postalCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(void 0!==data17.countryCode){let data25=data17.countryCode;if("string"==typeof data25){if(func3(data25)>2){const err35={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}if(func3(data25)<2){const err36={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}}else{const err37={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}}}else{const err38={instancePath:instancePath+"/address",schemaPath:"definitions.json#/definitions/address/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}if(void 0!==data.latitude&&"number"!=typeof data.latitude){const err39={instancePath:instancePath+"/latitude",schemaPath:"#/properties/latitude/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}if(void 0!==data.longitude&&"number"!=typeof data.longitude){const err40={instancePath:instancePath+"/longitude",schemaPath:"#/properties/longitude/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}let data28=data.appFeatures;if(data28&&"object"==typeof data28&&!Array.isArray(data28)){for(const key0 in data28)if(!func5.call(schema161.properties.appFeatures.properties,key0)){const err41={instancePath:instancePath+"/appFeatures",schemaPath:"#/properties/appFeatures/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}if(void 0!==data28.RoomControl){let data29=data28.RoomControl;if(data29&&"object"==typeof data29&&!Array.isArray(data29)){void 0===data29.excludedDeviceIds&&(data29.excludedDeviceIds=[]);for(const key1 in data29)if("disabledSystems"!==key1&&"excludedDeviceIds"!==key1&&"commonAreas"!==key1&&"alarmConfig"!==key1){const err42={instancePath:instancePath+"/appFeatures/RoomControl",schemaPath:"#/properties/appFeatures/properties/RoomControl/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}if(void 0!==data29.disabledSystems){let data30=data29.disabledSystems;if(Array.isArray(data30)){const len3=data30.length;for(let i3=0;i3<len3;i3++){let data31=data30[i3];if("string"!=typeof data31){const err43={instancePath:instancePath+"/appFeatures/RoomControl/disabledSystems/"+i3,schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/disabledSystems/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}if("climate"!==data31&&"lights"!==data31&&"shades"!==data31&&"tv"!==data31&&"doors"!==data31){const err44={instancePath:instancePath+"/appFeatures/RoomControl/disabledSystems/"+i3,schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/disabledSystems/items/enum",keyword:"enum",params:{allowedValues:schema161.properties.appFeatures.properties.RoomControl.properties.disabledSystems.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}}}else{const err45={instancePath:instancePath+"/appFeatures/RoomControl/disabledSystems",schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/disabledSystems/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}}let data32=data29.excludedDeviceIds;if(Array.isArray(data32)){const len4=data32.length;for(let i4=0;i4<len4;i4++)if("string"!=typeof data32[i4]){const err46={instancePath:instancePath+"/appFeatures/RoomControl/excludedDeviceIds/"+i4,schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/excludedDeviceIds/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}}else{const err47={instancePath:instancePath+"/appFeatures/RoomControl/excludedDeviceIds",schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/excludedDeviceIds/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}if(void 0!==data29.commonAreas){let data34=data29.commonAreas;if(data34&&"object"==typeof data34&&!Array.isArray(data34)){if(void 0!==data34.spaces){let data35=data34.spaces;if(Array.isArray(data35)){const len5=data35.length;for(let i5=0;i5<len5;i5++)if("string"!=typeof data35[i5]){const err48={instancePath:instancePath+"/appFeatures/RoomControl/commonAreas/spaces/"+i5,schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/commonAreas/properties/spaces/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}}else{const err49={instancePath:instancePath+"/appFeatures/RoomControl/commonAreas/spaces",schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/commonAreas/properties/spaces/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err49]:vErrors.push(err49),errors++}}}else{const err50={instancePath:instancePath+"/appFeatures/RoomControl/commonAreas",schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/commonAreas/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err50]:vErrors.push(err50),errors++}}if(void 0!==data29.alarmConfig){let data37=data29.alarmConfig;if(data37&&"object"==typeof data37&&!Array.isArray(data37)){for(const key2 in data37)if(pattern5.test(key2)){let data38=data37[key2];if(data38&&"object"==typeof data38&&!Array.isArray(data38)){if(void 0!==data38.zoneLockMap){let data39=data38.zoneLockMap;if(data39&&"object"==typeof data39&&!Array.isArray(data39)){for(const key3 in data39)if("string"!=typeof data39[key3]){const err51={instancePath:instancePath+"/appFeatures/RoomControl/alarmConfig/"+key2.replace(/~/g,"~0").replace(/\//g,"~1")+"/zoneLockMap/"+key3.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/alarmConfig/patternProperties/%5E%5Ba-zA-Z0-9%5D%2B%24/properties/zoneLockMap/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err51]:vErrors.push(err51),errors++}}else{const err52={instancePath:instancePath+"/appFeatures/RoomControl/alarmConfig/"+key2.replace(/~/g,"~0").replace(/\//g,"~1")+"/zoneLockMap",schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/alarmConfig/patternProperties/%5E%5Ba-zA-Z0-9%5D%2B%24/properties/zoneLockMap/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err52]:vErrors.push(err52),errors++}}}else{const err53={instancePath:instancePath+"/appFeatures/RoomControl/alarmConfig/"+key2.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/alarmConfig/patternProperties/%5E%5Ba-zA-Z0-9%5D%2B%24/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err53]:vErrors.push(err53),errors++}}}else{const err54={instancePath:instancePath+"/appFeatures/RoomControl/alarmConfig",schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/alarmConfig/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err54]:vErrors.push(err54),errors++}}}else{const err55={instancePath:instancePath+"/appFeatures/RoomControl",schemaPath:"#/properties/appFeatures/properties/RoomControl/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err55]:vErrors.push(err55),errors++}}if(void 0!==data28.CheckIn){let data41=data28.CheckIn;if(data41&&"object"==typeof data41&&!Array.isArray(data41)&&void 0!==data41.earlyCheckIn){let data42=data41.earlyCheckIn;if(data42&&"object"==typeof data42&&!Array.isArray(data42)){if(void 0===data42.dynamic&&(data42.dynamic=!1),void 0===data42.minimumPrice&&(data42.minimumPrice=10),void 0===data42.maximumPrice&&(data42.maximumPrice=50),void 0===data42.priceRatioPerHour&&(data42.priceRatioPerHour=.1),void 0===data42.dynamic){const err56={instancePath:instancePath+"/appFeatures/CheckIn/earlyCheckIn",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/required",keyword:"required",params:{missingProperty:"dynamic"},message:"must have required property 'dynamic'"};null===vErrors?vErrors=[err56]:vErrors.push(err56),errors++}if("boolean"!=typeof data42.dynamic){const err57={instancePath:instancePath+"/appFeatures/CheckIn/earlyCheckIn/dynamic",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/properties/dynamic/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err57]:vErrors.push(err57),errors++}if("number"!=typeof data42.minimumPrice){const err58={instancePath:instancePath+"/appFeatures/CheckIn/earlyCheckIn/minimumPrice",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/properties/minimumPrice/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err58]:vErrors.push(err58),errors++}if("number"!=typeof data42.maximumPrice){const err59={instancePath:instancePath+"/appFeatures/CheckIn/earlyCheckIn/maximumPrice",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/properties/maximumPrice/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err59]:vErrors.push(err59),errors++}if("number"!=typeof data42.priceRatioPerHour){const err60={instancePath:instancePath+"/appFeatures/CheckIn/earlyCheckIn/priceRatioPerHour",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/properties/priceRatioPerHour/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err60]:vErrors.push(err60),errors++}if(void 0!==data42.minimumTime&&"string"!=typeof data42.minimumTime){const err61={instancePath:instancePath+"/appFeatures/CheckIn/earlyCheckIn/minimumTime",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/properties/minimumTime/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err61]:vErrors.push(err61),errors++}}else{const err62={instancePath:instancePath+"/appFeatures/CheckIn/earlyCheckIn",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err62]:vErrors.push(err62),errors++}}}if(void 0!==data28.CheckOut){let data48=data28.CheckOut;if(data48&&"object"==typeof data48&&!Array.isArray(data48)&&void 0!==data48.lateCheckOut){let data49=data48.lateCheckOut;if(data49&&"object"==typeof data49&&!Array.isArray(data49)){if(void 0===data49.dynamic&&(data49.dynamic=!1),void 0===data49.minimumPrice&&(data49.minimumPrice=10),void 0===data49.maximumPrice&&(data49.maximumPrice=50),void 0===data49.priceRatioPerHour&&(data49.priceRatioPerHour=.1),void 0===data49.dynamic){const err63={instancePath:instancePath+"/appFeatures/CheckOut/lateCheckOut",schemaPath:"#/properties/appFeatures/properties/CheckOut/properties/lateCheckOut/required",keyword:"required",params:{missingProperty:"dynamic"},message:"must have required property 'dynamic'"};null===vErrors?vErrors=[err63]:vErrors.push(err63),errors++}if("boolean"!=typeof data49.dynamic){const err64={instancePath:instancePath+"/appFeatures/CheckOut/lateCheckOut/dynamic",schemaPath:"#/properties/appFeatures/properties/CheckOut/properties/lateCheckOut/properties/dynamic/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err64]:vErrors.push(err64),errors++}if("number"!=typeof data49.minimumPrice){const err65={instancePath:instancePath+"/appFeatures/CheckOut/lateCheckOut/minimumPrice",schemaPath:"#/properties/appFeatures/properties/CheckOut/properties/lateCheckOut/properties/minimumPrice/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err65]:vErrors.push(err65),errors++}if("number"!=typeof data49.maximumPrice){const err66={instancePath:instancePath+"/appFeatures/CheckOut/lateCheckOut/maximumPrice",schemaPath:"#/properties/appFeatures/properties/CheckOut/properties/lateCheckOut/properties/maximumPrice/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err66]:vErrors.push(err66),errors++}if("number"!=typeof data49.priceRatioPerHour){const err67={instancePath:instancePath+"/appFeatures/CheckOut/lateCheckOut/priceRatioPerHour",schemaPath:"#/properties/appFeatures/properties/CheckOut/properties/lateCheckOut/properties/priceRatioPerHour/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err67]:vErrors.push(err67),errors++}}else{const err68={instancePath:instancePath+"/appFeatures/CheckOut/lateCheckOut",schemaPath:"#/properties/appFeatures/properties/CheckOut/properties/lateCheckOut/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err68]:vErrors.push(err68),errors++}}}if(void 0!==data28.Concierge){let data54=data28.Concierge;if(data54&&"object"==typeof data54&&!Array.isArray(data54)){if(void 0===data54.timeTracking&&(data54.timeTracking=!1),void 0===data54.tipping&&(data54.tipping=!1),void 0===data54.ratings&&(data54.ratings=!0),void 0===data54.newTicketCCs&&(data54.newTicketCCs=[]),void 0===data54.newMessageChannel&&(data54.newMessageChannel="sms"),"boolean"!=typeof data54.timeTracking){const err69={instancePath:instancePath+"/appFeatures/Concierge/timeTracking",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/timeTracking/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err69]:vErrors.push(err69),errors++}if("boolean"!=typeof data54.tipping){const err70={instancePath:instancePath+"/appFeatures/Concierge/tipping",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/tipping/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err70]:vErrors.push(err70),errors++}if("boolean"!=typeof data54.ratings){const err71={instancePath:instancePath+"/appFeatures/Concierge/ratings",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/ratings/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err71]:vErrors.push(err71),errors++}let data58=data54.newTicketCCs;if(Array.isArray(data58)){const len6=data58.length;for(let i6=0;i6<len6;i6++)if("string"!=typeof data58[i6]){const err72={instancePath:instancePath+"/appFeatures/Concierge/newTicketCCs/"+i6,schemaPath:"#/properties/appFeatures/properties/Concierge/properties/newTicketCCs/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err72]:vErrors.push(err72),errors++}}else{const err73={instancePath:instancePath+"/appFeatures/Concierge/newTicketCCs",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/newTicketCCs/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err73]:vErrors.push(err73),errors++}let data60=data54.newMessageChannel;if("string"!=typeof data60&&null!==data60){const err74={instancePath:instancePath+"/appFeatures/Concierge/newMessageChannel",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/newMessageChannel/type",keyword:"type",params:{type:schema161.properties.appFeatures.properties.Concierge.properties.newMessageChannel.type},message:"must be string,null"};null===vErrors?vErrors=[err74]:vErrors.push(err74),errors++}if("sms"!==data60&&"email"!==data60){const err75={instancePath:instancePath+"/appFeatures/Concierge/newMessageChannel",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/newMessageChannel/enum",keyword:"enum",params:{allowedValues:schema161.properties.appFeatures.properties.Concierge.properties.newMessageChannel.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err75]:vErrors.push(err75),errors++}if(void 0!==data54.quickServices){let data61=data54.quickServices;if(Array.isArray(data61)){const len7=data61.length;for(let i7=0;i7<len7;i7++){let data62=data61[i7];if(data62&&"object"==typeof data62&&!Array.isArray(data62)){if(void 0===data62.name){const err76={instancePath:instancePath+"/appFeatures/Concierge/quickServices/"+i7,schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err76]:vErrors.push(err76),errors++}if(void 0===data62.description){const err77={instancePath:instancePath+"/appFeatures/Concierge/quickServices/"+i7,schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/required",keyword:"required",params:{missingProperty:"description"},message:"must have required property 'description'"};null===vErrors?vErrors=[err77]:vErrors.push(err77),errors++}if(void 0===data62.image){const err78={instancePath:instancePath+"/appFeatures/Concierge/quickServices/"+i7,schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/required",keyword:"required",params:{missingProperty:"image"},message:"must have required property 'image'"};null===vErrors?vErrors=[err78]:vErrors.push(err78),errors++}if(void 0!==data62.name&&"string"!=typeof data62.name){const err79={instancePath:instancePath+"/appFeatures/Concierge/quickServices/"+i7+"/name",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err79]:vErrors.push(err79),errors++}if(void 0!==data62.description&&"string"!=typeof data62.description){const err80={instancePath:instancePath+"/appFeatures/Concierge/quickServices/"+i7+"/description",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err80]:vErrors.push(err80),errors++}if(void 0!==data62.department&&"string"!=typeof data62.department){const err81={instancePath:instancePath+"/appFeatures/Concierge/quickServices/"+i7+"/department",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/properties/department/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err81]:vErrors.push(err81),errors++}void 0!==data62.image&&(validate15(data62.image,{instancePath:instancePath+"/appFeatures/Concierge/quickServices/"+i7+"/image",parentData:data62,parentDataProperty:"image",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length))}else{const err82={instancePath:instancePath+"/appFeatures/Concierge/quickServices/"+i7,schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err82]:vErrors.push(err82),errors++}}}else{const err83={instancePath:instancePath+"/appFeatures/Concierge/quickServices",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err83]:vErrors.push(err83),errors++}}if(void 0!==data54.issues){let data67=data54.issues;if(data67&&"object"==typeof data67&&!Array.isArray(data67)){if(void 0!==data67.syncWithPropertyId&&"string"!=typeof data67.syncWithPropertyId){const err84={instancePath:instancePath+"/appFeatures/Concierge/issues/syncWithPropertyId",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/issues/properties/syncWithPropertyId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err84]:vErrors.push(err84),errors++}}else{const err85={instancePath:instancePath+"/appFeatures/Concierge/issues",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/issues/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err85]:vErrors.push(err85),errors++}}}else{const err86={instancePath:instancePath+"/appFeatures/Concierge",schemaPath:"#/properties/appFeatures/properties/Concierge/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err86]:vErrors.push(err86),errors++}}if(void 0!==data28.DigitalKey){let data69=data28.DigitalKey;if(data69&&"object"==typeof data69&&!Array.isArray(data69)){if(void 0===data69.systemOnline&&(data69.systemOnline=!1),void 0===data69.systemConfig&&(data69.systemConfig={}),void 0!==data69.system){let data70=data69.system;if("string"!=typeof data70){const err87={instancePath:instancePath+"/appFeatures/DigitalKey/system",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/system/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err87]:vErrors.push(err87),errors++}if("salto"!==data70&&"dormakaba"!==data70){const err88={instancePath:instancePath+"/appFeatures/DigitalKey/system",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/system/enum",keyword:"enum",params:{allowedValues:schema161.properties.appFeatures.properties.DigitalKey.properties.system.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err88]:vErrors.push(err88),errors++}}if("boolean"!=typeof data69.systemOnline){const err89={instancePath:instancePath+"/appFeatures/DigitalKey/systemOnline",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemOnline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err89]:vErrors.push(err89),errors++}let data72=data69.systemConfig;if(data72&&"object"==typeof data72&&!Array.isArray(data72)){for(const key4 in data72)if("legicUrl"!==key4&&"legicWalletName"!==key4&&"legicAppId"!==key4&&"legicTechUsername"!==key4&&"legicTechPassword"!==key4){const err90={instancePath:instancePath+"/appFeatures/DigitalKey/systemConfig",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key4},message:"must NOT have additional properties"};null===vErrors?vErrors=[err90]:vErrors.push(err90),errors++}if(void 0!==data72.legicUrl){let data73=data72.legicUrl;if("string"==typeof data73){if(!formats0(data73)){const err91={instancePath:instancePath+"/appFeatures/DigitalKey/systemConfig/legicUrl",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/properties/legicUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===vErrors?vErrors=[err91]:vErrors.push(err91),errors++}}else{const err92={instancePath:instancePath+"/appFeatures/DigitalKey/systemConfig/legicUrl",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/properties/legicUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err92]:vErrors.push(err92),errors++}}if(void 0!==data72.legicWalletName&&"string"!=typeof data72.legicWalletName){const err93={instancePath:instancePath+"/appFeatures/DigitalKey/systemConfig/legicWalletName",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/properties/legicWalletName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err93]:vErrors.push(err93),errors++}if(void 0!==data72.legicAppId&&"number"!=typeof data72.legicAppId){const err94={instancePath:instancePath+"/appFeatures/DigitalKey/systemConfig/legicAppId",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/properties/legicAppId/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err94]:vErrors.push(err94),errors++}if(void 0!==data72.legicTechUsername&&"string"!=typeof data72.legicTechUsername){const err95={instancePath:instancePath+"/appFeatures/DigitalKey/systemConfig/legicTechUsername",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/properties/legicTechUsername/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err95]:vErrors.push(err95),errors++}if(void 0!==data72.legicTechPassword&&"string"!=typeof data72.legicTechPassword){const err96={instancePath:instancePath+"/appFeatures/DigitalKey/systemConfig/legicTechPassword",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/properties/legicTechPassword/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err96]:vErrors.push(err96),errors++}}else{const err97={instancePath:instancePath+"/appFeatures/DigitalKey/systemConfig",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err97]:vErrors.push(err97),errors++}if(void 0!==data69.enableApp&&"boolean"!=typeof data69.enableApp){const err98={instancePath:instancePath+"/appFeatures/DigitalKey/enableApp",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/enableApp/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err98]:vErrors.push(err98),errors++}if(void 0!==data69.branding){let data79=data69.branding;if(data79&&"object"==typeof data79&&!Array.isArray(data79)){if(void 0!==data79.logo){let data80=data79.logo;if("string"==typeof data80){if(!formats0(data80)){const err99={instancePath:instancePath+"/appFeatures/DigitalKey/branding/logo",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/logo/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===vErrors?vErrors=[err99]:vErrors.push(err99),errors++}}else{const err100={instancePath:instancePath+"/appFeatures/DigitalKey/branding/logo",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/logo/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err100]:vErrors.push(err100),errors++}}if(void 0!==data79.gradient){let data81=data79.gradient;if(Array.isArray(data81)){if(data81.length>2){const err101={instancePath:instancePath+"/appFeatures/DigitalKey/branding/gradient",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/gradient/maxItems",keyword:"maxItems",params:{limit:2},message:"must NOT have more than 2 items"};null===vErrors?vErrors=[err101]:vErrors.push(err101),errors++}if(data81.length<2){const err102={instancePath:instancePath+"/appFeatures/DigitalKey/branding/gradient",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/gradient/minItems",keyword:"minItems",params:{limit:2},message:"must NOT have fewer than 2 items"};null===vErrors?vErrors=[err102]:vErrors.push(err102),errors++}const len8=data81.length;for(let i8=0;i8<len8;i8++){let data82=data81[i8];if("string"==typeof data82){if(!pattern6.test(data82)){const err103={instancePath:instancePath+"/appFeatures/DigitalKey/branding/gradient/"+i8,schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/gradient/items/pattern",keyword:"pattern",params:{pattern:"^(?!#ffffff)(#[0-9a-fA-F]{6})$"},message:'must match pattern "^(?!#ffffff)(#[0-9a-fA-F]{6})$"'};null===vErrors?vErrors=[err103]:vErrors.push(err103),errors++}}else{const err104={instancePath:instancePath+"/appFeatures/DigitalKey/branding/gradient/"+i8,schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/gradient/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err104]:vErrors.push(err104),errors++}}}else{const err105={instancePath:instancePath+"/appFeatures/DigitalKey/branding/gradient",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/gradient/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err105]:vErrors.push(err105),errors++}}if(void 0!==data79.highlightedGradient){let data83=data79.highlightedGradient;if(Array.isArray(data83)){if(data83.length>3){const err106={instancePath:instancePath+"/appFeatures/DigitalKey/branding/highlightedGradient",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/highlightedGradient/maxItems",keyword:"maxItems",params:{limit:3},message:"must NOT have more than 3 items"};null===vErrors?vErrors=[err106]:vErrors.push(err106),errors++}if(data83.length<2){const err107={instancePath:instancePath+"/appFeatures/DigitalKey/branding/highlightedGradient",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/highlightedGradient/minItems",keyword:"minItems",params:{limit:2},message:"must NOT have fewer than 2 items"};null===vErrors?vErrors=[err107]:vErrors.push(err107),errors++}const len9=data83.length;for(let i9=0;i9<len9;i9++){let data84=data83[i9];if("string"==typeof data84){if(!pattern6.test(data84)){const err108={instancePath:instancePath+"/appFeatures/DigitalKey/branding/highlightedGradient/"+i9,schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/highlightedGradient/items/pattern",keyword:"pattern",params:{pattern:"^(?!#ffffff)(#[0-9a-fA-F]{6})$"},message:'must match pattern "^(?!#ffffff)(#[0-9a-fA-F]{6})$"'};null===vErrors?vErrors=[err108]:vErrors.push(err108),errors++}}else{const err109={instancePath:instancePath+"/appFeatures/DigitalKey/branding/highlightedGradient/"+i9,schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/highlightedGradient/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err109]:vErrors.push(err109),errors++}}}else{const err110={instancePath:instancePath+"/appFeatures/DigitalKey/branding/highlightedGradient",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/highlightedGradient/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err110]:vErrors.push(err110),errors++}}}else{const err111={instancePath:instancePath+"/appFeatures/DigitalKey/branding",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err111]:vErrors.push(err111),errors++}}}else{const err112={instancePath:instancePath+"/appFeatures/DigitalKey",schemaPath:"#/properties/appFeatures/properties/DigitalKey/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err112]:vErrors.push(err112),errors++}}if(void 0!==data28.SOS){let data85=data28.SOS;if(data85&&"object"==typeof data85&&!Array.isArray(data85)){if(void 0!==data85.active&&"boolean"!=typeof data85.active){const err113={instancePath:instancePath+"/appFeatures/SOS/active",schemaPath:"#/properties/appFeatures/properties/SOS/properties/active/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err113]:vErrors.push(err113),errors++}if(void 0!==data85.activeEmergencies){let data87=data85.activeEmergencies;if(Array.isArray(data87)){const len10=data87.length;for(let i10=0;i10<len10;i10++){let data88=data87[i10];if("string"!=typeof data88){const err114={instancePath:instancePath+"/appFeatures/SOS/activeEmergencies/"+i10,schemaPath:"#/properties/appFeatures/properties/SOS/properties/activeEmergencies/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err114]:vErrors.push(err114),errors++}if("medical"!==data88&&"fire"!==data88&&"suspiciousPerson"!==data88&&"other"!==data88&&"conflict"!==data88&&"shooter"!==data88){const err115={instancePath:instancePath+"/appFeatures/SOS/activeEmergencies/"+i10,schemaPath:"#/properties/appFeatures/properties/SOS/properties/activeEmergencies/items/enum",keyword:"enum",params:{allowedValues:schema161.properties.appFeatures.properties.SOS.properties.activeEmergencies.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err115]:vErrors.push(err115),errors++}}}else{const err116={instancePath:instancePath+"/appFeatures/SOS/activeEmergencies",schemaPath:"#/properties/appFeatures/properties/SOS/properties/activeEmergencies/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err116]:vErrors.push(err116),errors++}}}else{const err117={instancePath:instancePath+"/appFeatures/SOS",schemaPath:"#/properties/appFeatures/properties/SOS/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err117]:vErrors.push(err117),errors++}}if(void 0!==data28.Dining){let data89=data28.Dining;if(data89&&"object"==typeof data89&&!Array.isArray(data89)){if(void 0!==data89.system){let data90=data89.system;if("string"!=typeof data90){const err118={instancePath:instancePath+"/appFeatures/Dining/system",schemaPath:"#/properties/appFeatures/properties/Dining/properties/system/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err118]:vErrors.push(err118),errors++}if("gotab"!==data90){const err119={instancePath:instancePath+"/appFeatures/Dining/system",schemaPath:"#/properties/appFeatures/properties/Dining/properties/system/enum",keyword:"enum",params:{allowedValues:schema161.properties.appFeatures.properties.Dining.properties.system.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err119]:vErrors.push(err119),errors++}}if(void 0!==data89.systemConfig){let data91=data89.systemConfig;if(data91&&"object"==typeof data91&&!Array.isArray(data91)){for(const key5 in data91)if("landingUrl"!==key5&&"includeUserDetails"!==key5){const err120={instancePath:instancePath+"/appFeatures/Dining/systemConfig",schemaPath:"#/properties/appFeatures/properties/Dining/properties/systemConfig/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key5},message:"must NOT have additional properties"};null===vErrors?vErrors=[err120]:vErrors.push(err120),errors++}if(void 0!==data91.landingUrl){let data92=data91.landingUrl;if("string"==typeof data92){if(!formats0(data92)){const err121={instancePath:instancePath+"/appFeatures/Dining/systemConfig/landingUrl",schemaPath:"#/properties/appFeatures/properties/Dining/properties/systemConfig/properties/landingUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===vErrors?vErrors=[err121]:vErrors.push(err121),errors++}}else{const err122={instancePath:instancePath+"/appFeatures/Dining/systemConfig/landingUrl",schemaPath:"#/properties/appFeatures/properties/Dining/properties/systemConfig/properties/landingUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err122]:vErrors.push(err122),errors++}}if(void 0!==data91.includeUserDetails&&"boolean"!=typeof data91.includeUserDetails){const err123={instancePath:instancePath+"/appFeatures/Dining/systemConfig/includeUserDetails",schemaPath:"#/properties/appFeatures/properties/Dining/properties/systemConfig/properties/includeUserDetails/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err123]:vErrors.push(err123),errors++}}else{const err124={instancePath:instancePath+"/appFeatures/Dining/systemConfig",schemaPath:"#/properties/appFeatures/properties/Dining/properties/systemConfig/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err124]:vErrors.push(err124),errors++}}}else{const err125={instancePath:instancePath+"/appFeatures/Dining",schemaPath:"#/properties/appFeatures/properties/Dining/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err125]:vErrors.push(err125),errors++}}}else{const err126={instancePath:instancePath+"/appFeatures",schemaPath:"#/properties/appFeatures/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err126]:vErrors.push(err126),errors++}let data94=data.notifications;if(data94&&"object"==typeof data94&&!Array.isArray(data94)){for(const key6 in data94)if("email"!==key6&&"sms"!==key6&&"push"!==key6){const err127={instancePath:instancePath+"/notifications",schemaPath:"#/properties/notifications/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key6},message:"must NOT have additional properties"};null===vErrors?vErrors=[err127]:vErrors.push(err127),errors++}if(void 0!==data94.email){let data95=data94.email;if(data95&&"object"==typeof data95&&!Array.isArray(data95)){for(const key7 in data95)if("enabled"!==key7){const err128={instancePath:instancePath+"/notifications/email",schemaPath:"#/properties/notifications/properties/email/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key7},message:"must NOT have additional properties"};null===vErrors?vErrors=[err128]:vErrors.push(err128),errors++}if(void 0!==data95.enabled&&"boolean"!=typeof data95.enabled){const err129={instancePath:instancePath+"/notifications/email/enabled",schemaPath:"#/properties/notifications/properties/email/properties/enabled/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err129]:vErrors.push(err129),errors++}}else{const err130={instancePath:instancePath+"/notifications/email",schemaPath:"#/properties/notifications/properties/email/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err130]:vErrors.push(err130),errors++}}if(void 0!==data94.sms){let data97=data94.sms;if(data97&&"object"==typeof data97&&!Array.isArray(data97)){for(const key8 in data97)if("enabled"!==key8){const err131={instancePath:instancePath+"/notifications/sms",schemaPath:"#/properties/notifications/properties/sms/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key8},message:"must NOT have additional properties"};null===vErrors?vErrors=[err131]:vErrors.push(err131),errors++}if(void 0!==data97.enabled&&"boolean"!=typeof data97.enabled){const err132={instancePath:instancePath+"/notifications/sms/enabled",schemaPath:"#/properties/notifications/properties/sms/properties/enabled/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err132]:vErrors.push(err132),errors++}}else{const err133={instancePath:instancePath+"/notifications/sms",schemaPath:"#/properties/notifications/properties/sms/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err133]:vErrors.push(err133),errors++}}if(void 0!==data94.push){let data99=data94.push;if(data99&&"object"==typeof data99&&!Array.isArray(data99)){for(const key9 in data99)if("enabled"!==key9){const err134={instancePath:instancePath+"/notifications/push",schemaPath:"#/properties/notifications/properties/push/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key9},message:"must NOT have additional properties"};null===vErrors?vErrors=[err134]:vErrors.push(err134),errors++}if(void 0!==data99.enabled&&"boolean"!=typeof data99.enabled){const err135={instancePath:instancePath+"/notifications/push/enabled",schemaPath:"#/properties/notifications/properties/push/properties/enabled/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err135]:vErrors.push(err135),errors++}}else{const err136={instancePath:instancePath+"/notifications/push",schemaPath:"#/properties/notifications/properties/push/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err136]:vErrors.push(err136),errors++}}}else{const err137={instancePath:instancePath+"/notifications",schemaPath:"#/properties/notifications/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err137]:vErrors.push(err137),errors++}if(void 0!==data.credentials){let data101=data.credentials;if(!data101||"object"!=typeof data101||Array.isArray(data101)){const err138={instancePath:instancePath+"/credentials",schemaPath:"#/properties/credentials/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err138]:vErrors.push(err138),errors++}}}else{const err139={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err139]:vErrors.push(err139),errors++}return validate61.errors=vErrors,0===errors},schema161={$schema:"http://json-schema.org/draft-07/schema",$id:"property.json",title:"Property",type:"object",description:"A property is a physical asset or building",required:["id","name","type","organization","timezone","discriminator"],properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{type:"string",default:"property",enum:["property"]},discriminator:{type:"string",enum:["hospitality","education","commercial","storage"]},organization:{type:["string","null"],description:"Reference (id) to the organization that owns this property"},departments:{type:"array",items:{type:"string"}},testModeEnabled:{type:"boolean"},testMode:{type:"object",properties:{notificationEmails:{type:"array",items:{type:"string"},description:"Only users with these email addresses will receive notifications in test mode, including sms, email, or push."},notificationEmailDomains:{type:"array",items:{type:"string"},description:"Only users with email addreses ending in these domains will receive notifications in test mode, including sms, email, or push."}}},timezone:{type:"string",description:"IANA timezone string",pattern:"^([a-zA-Z]+/[a-zA-Z_]+)$",examples:["America/New_York","America/Los_Angeles"]},smsNumber:{type:"string"},checkInTime:{type:"string"},checkOutTime:{type:"string"},address:{$ref:"definitions.json#/definitions/address"},latitude:{type:"number"},longitude:{type:"number"},appFeatures:{type:"object",properties:{RoomControl:{type:"object",properties:{disabledSystems:{type:"array",items:{type:"string",enum:["climate","lights","shades","tv","doors"]}},excludedDeviceIds:{type:"array",items:{type:"string"},default:[]},commonAreas:{type:"object",properties:{spaces:{type:"array",items:{type:"string"}}}},alarmConfig:{type:"object",patternProperties:{"^[a-zA-Z0-9]+$":{type:"object",properties:{zoneLockMap:{type:"object",description:"Maps zone numbers to lock ids",additionalProperties:{type:"string"}}}}},examples:[{wZz7hucY:{zoneLockMap:{1:"wc87hucc",2:"bc86hzxc",3:"zv5ah5jv"}}}]}},additionalProperties:!1},CheckIn:{properties:{payment:{},identification:{},earlyCheckIn:{type:"object",required:["dynamic"],properties:{dynamic:{type:"boolean",default:!1},minimumPrice:{type:"number",default:10},maximumPrice:{type:"number",default:50},priceRatioPerHour:{type:"number",default:.1},minimumTime:{type:"string"}}},roomUpgrades:{},pet:{},promos:{}}},CheckOut:{properties:{lateCheckOut:{type:"object",required:["dynamic"],properties:{dynamic:{type:"boolean",default:!1},minimumPrice:{type:"number",default:10},maximumPrice:{type:"number",default:50},priceRatioPerHour:{type:"number",default:.1}}}}},Concierge:{type:"object",properties:{timeTracking:{type:"boolean",default:!1},tipping:{type:"boolean",default:!1},ratings:{type:"boolean",default:!0},newTicketCCs:{type:"array",items:{type:"string"},default:[]},newMessageChannel:{type:["string","null"],enum:["sms","email"],default:"sms",description:"Determines how users should be notified of new messages in the concierge system"},quickServices:{type:"array",items:{type:"object",properties:{name:{type:"string"},description:{type:"string"},department:{type:"string"},image:{$ref:"mediaFile.json"}},required:["name","description","image"]}},issues:{type:"object",properties:{syncWithPropertyId:{type:"string"}}}}},DigitalKey:{type:"object",properties:{system:{type:"string",enum:["salto","dormakaba"]},systemOnline:{type:"boolean",default:!1},systemConfig:{type:"object",properties:{legicUrl:{type:"string",format:"uri"},legicWalletName:{type:"string"},legicAppId:{type:"number"},legicTechUsername:{type:"string"},legicTechPassword:{type:"string"}},additionalProperties:!1,default:{}},enableApp:{type:"boolean"},branding:{type:"object",properties:{logo:{type:"string",format:"uri"},gradient:{type:"array",items:{type:"string",pattern:"^(?!#ffffff)(#[0-9a-fA-F]{6})$"},minItems:2,maxItems:2},highlightedGradient:{type:"array",items:{type:"string",pattern:"^(?!#ffffff)(#[0-9a-fA-F]{6})$"},minItems:2,maxItems:3}}}}},SOS:{type:"object",properties:{active:{type:"boolean"},activeEmergencies:{type:"array",items:{type:"string",enum:["medical","fire","suspiciousPerson","other","conflict","shooter"]}}}},Elevator:{},Experiences:{},Dining:{type:"object",properties:{system:{type:"string",enum:["gotab"]},systemConfig:{type:"object",properties:{landingUrl:{type:"string",format:"uri"},includeUserDetails:{type:"boolean"}},additionalProperties:!1}}},Rentals:{},Shop:{},Spa:{},Valet:{}},additionalProperties:!1,default:{RoomControl:{}}},notifications:{type:"object",properties:{email:{type:"object",properties:{enabled:{type:"boolean"}},additionalProperties:!1},sms:{type:"object",properties:{enabled:{type:"boolean"}},additionalProperties:!1},push:{type:"object",properties:{enabled:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1,default:{email:{enabled:!1},sms:{enabled:!1},push:{enabled:!1}}},credentials:{type:"object",additionalProperties:!0}}},pattern4=new RegExp("^([a-zA-Z]+/[a-zA-Z_]+)$","u"),pattern5=new RegExp("^[a-zA-Z0-9]+$","u"),pattern6=new RegExp("^(?!#ffffff)(#[0-9a-fA-F]{6})$","u");var validateReservation=validate63,schema164={$schema:"http://json-schema.org/draft-07/schema",$id:"reservation.json",title:"Reservation",type:"object",required:["type","status","checkInDateTime","checkOutDateTime"],properties:{id:{$ref:"definitions.json#/definitions/id"},driver:{$ref:"definitions.json#/definitions/driver"},primaryGuest:{type:"string"},type:{type:"string",default:"reservation",enum:["reservation"]},sharedGuests:{type:"array",items:{type:"string"}},spaceCategory:{type:"string"},space:{type:["string","null"]},previousSpace:{type:["string","null"],default:null,description:"Used when there was a space assigned and it changes"},status:{type:"string",enum:["reserved","checkedIn","checkedOut","cancelled","noShow","enquired","requested","optional"],description:" reserved - confirmed by both parties, before check-in\n checkedIn - checked in\n checkedOut - checked out\n cancelled - Cancelled\n noShow - No show\n enquired - Confirmed neither by the customer nor enterprise\n requested - Confirmed by the customer but not the enterprise (waitlist)\n optional - Confirmed by the enterprise but not the customer (holding)"},mobileCheckInSpaceCategoryChanged:{type:"boolean",description:"spaceCategory has changed from original."},mobileCheckInSpaceChanged:{type:"boolean"},mobileCheckInStatus:{type:"string",enum:["ready","blocked","preArrivalStepsRequired","spaceNotAssigned","spaceNotReady","checkInTimeNotStarted"]},mobileCheckInStatusMessage:{type:"string"},confirmationNumber:{type:"string"},expectedCheckInDateTime:{type:["string","object"],format:"date-time",description:"Expected arrival time of guest."},checkInDateTime:{type:["string","object"],format:"date-time"},checkOutDateTime:{type:["string","object"],format:"date-time"},adultCount:{type:"number",default:1,minimum:1},childCount:{type:"number",default:0},spaceCategoryAvailabilites:{type:"array",items:{type:"object",properties:{id:{type:"string"},price:{type:"number"},unit:{type:"string",enum:["night","stay","hour"]},isUpgrade:{type:"boolean"}}}},revenue:{$ref:"definitions.json#/definitions/revenue"},rateSuppressed:{type:"boolean"},payment:{type:"string"},company:{type:"string"},travelAgent:{type:"string"},systemId:{$ref:"definitions.json#/definitions/systemId"},metadata:{ref:"definitions.json#/definitions/metadata"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}}},schema167={type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},date:{type:"string",format:"date-time"},price:{type:"number"},tax:{type:["number","null"]}}}};function validate64(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(Array.isArray(data)){const len0=data.length;for(let i0=0;i0<len0;i0++){let data0=data[i0];if(data0&&"object"==typeof data0&&!Array.isArray(data0)){if(void 0!==data0.id){let data1=data0.id;if("string"!=typeof data1){const err0={instancePath:instancePath+"/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}const _errs6=errors,_errs7=errors;if("global"!==data1&&"system"!==data1){const err1={};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(_errs7===errors){const err2={instancePath:instancePath+"/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}else errors=_errs6,null!==vErrors&&(_errs6?vErrors.length=_errs6:vErrors=null)}if(void 0!==data0.name&&"string"!=typeof data0.name){const err3={instancePath:instancePath+"/"+i0+"/name",schemaPath:"#/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data0.date){let data3=data0.date;if("string"==typeof data3){if(!formats4.validate(data3)){const err4={instancePath:instancePath+"/"+i0+"/date",schemaPath:"#/items/properties/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}else{const err5={instancePath:instancePath+"/"+i0+"/date",schemaPath:"#/items/properties/date/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}if(void 0!==data0.price&&"number"!=typeof data0.price){const err6={instancePath:instancePath+"/"+i0+"/price",schemaPath:"#/items/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data0.tax){let data5=data0.tax;if("number"!=typeof data5&&null!==data5){const err7={instancePath:instancePath+"/"+i0+"/tax",schemaPath:"#/items/properties/tax/type",keyword:"type",params:{type:schema167.items.properties.tax.type},message:"must be number,null"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}}}else{const err8={instancePath:instancePath+"/"+i0,schemaPath:"#/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}}else{const err9={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}return validate64.errors=vErrors,0===errors}function validate63(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="reservation"),void 0===data.previousSpace&&(data.previousSpace=null),void 0===data.adultCount&&(data.adultCount=1),void 0===data.childCount&&(data.childCount=0),void 0===data.type){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.status){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.checkInDateTime){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"checkInDateTime"},message:"must have required property 'checkInDateTime'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.checkOutDateTime){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"checkOutDateTime"},message:"must have required property 'checkOutDateTime'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs5===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.driver){let data1=data.driver;if("string"!=typeof data1){const err7={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if("adlink"!==data1&&"aws-kinesis"!==data1&&"butler"!==data1&&"crestron"!==data1&&"dell"!==data1&&"dmp"!==data1&&"doorbird"!==data1&&"dormakaba"!==data1&&"dsc"!==data1&&"ecobee"!==data1&&"epson"!==data1&&"geovision-rs"!==data1&&"geovision-as-manager"!==data1&&"honeywell-vista"!==data1&&"igor"!==data1&&"inncom"!==data1&&"isapi"!==data1&&"kohost-k7"!==data1&&"kohost"!==data1&&"lg"!==data1&&"lg-webos"!==data1&&"lapi"!==data1&&"lirc"!==data1&&"mews"!==data1&&"mht"!==data1&&"paxton"!==data1&&"pelican-wireless"!==data1&&"power-shades"!==data1&&"rachio"!==data1&&"rebrandly"!==data1&&"relay"!==data1&&"rtsp"!==data1&&"salto"!==data1&&"salto-irn"!==data1&&"samsung"!==data1&&"se"!==data1&&"sendgrid"!==data1&&"sonifi"!==data1&&"stay-n-touch"!==data1&&"storable"!==data1&&"twilio"!==data1&&"unifi"!==data1&&"valcom"!==data1&&"vizio"!==data1&&"wisenet"!==data1&&"cloudflare-images"!==data1&&"cloudflare-stream"!==data1&&"insperia-privacy"!==data1){const err8={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}if(void 0!==data.primaryGuest&&"string"!=typeof data.primaryGuest){const err9={instancePath:instancePath+"/primaryGuest",schemaPath:"#/properties/primaryGuest/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}let data3=data.type;if("string"!=typeof data3){const err10={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("reservation"!==data3){const err11={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema164.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.sharedGuests){let data4=data.sharedGuests;if(Array.isArray(data4)){const len0=data4.length;for(let i0=0;i0<len0;i0++)if("string"!=typeof data4[i0]){const err12={instancePath:instancePath+"/sharedGuests/"+i0,schemaPath:"#/properties/sharedGuests/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}else{const err13={instancePath:instancePath+"/sharedGuests",schemaPath:"#/properties/sharedGuests/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.spaceCategory&&"string"!=typeof data.spaceCategory){const err14={instancePath:instancePath+"/spaceCategory",schemaPath:"#/properties/spaceCategory/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(void 0!==data.space){let data7=data.space;if("string"!=typeof data7&&null!==data7){const err15={instancePath:instancePath+"/space",schemaPath:"#/properties/space/type",keyword:"type",params:{type:schema164.properties.space.type},message:"must be string,null"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}let data8=data.previousSpace;if("string"!=typeof data8&&null!==data8){const err16={instancePath:instancePath+"/previousSpace",schemaPath:"#/properties/previousSpace/type",keyword:"type",params:{type:schema164.properties.previousSpace.type},message:"must be string,null"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data.status){let data9=data.status;if("string"!=typeof data9){const err17={instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if("reserved"!==data9&&"checkedIn"!==data9&&"checkedOut"!==data9&&"cancelled"!==data9&&"noShow"!==data9&&"enquired"!==data9&&"requested"!==data9&&"optional"!==data9){const err18={instancePath:instancePath+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:schema164.properties.status.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}if(void 0!==data.mobileCheckInSpaceCategoryChanged&&"boolean"!=typeof data.mobileCheckInSpaceCategoryChanged){const err19={instancePath:instancePath+"/mobileCheckInSpaceCategoryChanged",schemaPath:"#/properties/mobileCheckInSpaceCategoryChanged/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data.mobileCheckInSpaceChanged&&"boolean"!=typeof data.mobileCheckInSpaceChanged){const err20={instancePath:instancePath+"/mobileCheckInSpaceChanged",schemaPath:"#/properties/mobileCheckInSpaceChanged/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0!==data.mobileCheckInStatus){let data12=data.mobileCheckInStatus;if("string"!=typeof data12){const err21={instancePath:instancePath+"/mobileCheckInStatus",schemaPath:"#/properties/mobileCheckInStatus/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if("ready"!==data12&&"blocked"!==data12&&"preArrivalStepsRequired"!==data12&&"spaceNotAssigned"!==data12&&"spaceNotReady"!==data12&&"checkInTimeNotStarted"!==data12){const err22={instancePath:instancePath+"/mobileCheckInStatus",schemaPath:"#/properties/mobileCheckInStatus/enum",keyword:"enum",params:{allowedValues:schema164.properties.mobileCheckInStatus.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data.mobileCheckInStatusMessage&&"string"!=typeof data.mobileCheckInStatusMessage){const err23={instancePath:instancePath+"/mobileCheckInStatusMessage",schemaPath:"#/properties/mobileCheckInStatusMessage/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0!==data.confirmationNumber&&"string"!=typeof data.confirmationNumber){const err24={instancePath:instancePath+"/confirmationNumber",schemaPath:"#/properties/confirmationNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data.expectedCheckInDateTime){let data15=data.expectedCheckInDateTime;if("string"!=typeof data15&&(!data15||"object"!=typeof data15||Array.isArray(data15))){const err25={instancePath:instancePath+"/expectedCheckInDateTime",schemaPath:"#/properties/expectedCheckInDateTime/type",keyword:"type",params:{type:schema164.properties.expectedCheckInDateTime.type},message:"must be string,object"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if("string"==typeof data15&&!formats4.validate(data15)){const err26={instancePath:instancePath+"/expectedCheckInDateTime",schemaPath:"#/properties/expectedCheckInDateTime/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}if(void 0!==data.checkInDateTime){let data16=data.checkInDateTime;if("string"!=typeof data16&&(!data16||"object"!=typeof data16||Array.isArray(data16))){const err27={instancePath:instancePath+"/checkInDateTime",schemaPath:"#/properties/checkInDateTime/type",keyword:"type",params:{type:schema164.properties.checkInDateTime.type},message:"must be string,object"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if("string"==typeof data16&&!formats4.validate(data16)){const err28={instancePath:instancePath+"/checkInDateTime",schemaPath:"#/properties/checkInDateTime/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}}if(void 0!==data.checkOutDateTime){let data17=data.checkOutDateTime;if("string"!=typeof data17&&(!data17||"object"!=typeof data17||Array.isArray(data17))){const err29={instancePath:instancePath+"/checkOutDateTime",schemaPath:"#/properties/checkOutDateTime/type",keyword:"type",params:{type:schema164.properties.checkOutDateTime.type},message:"must be string,object"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if("string"==typeof data17&&!formats4.validate(data17)){const err30={instancePath:instancePath+"/checkOutDateTime",schemaPath:"#/properties/checkOutDateTime/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}}let data18=data.adultCount;if("number"==typeof data18){if(data18<1||isNaN(data18)){const err31={instancePath:instancePath+"/adultCount",schemaPath:"#/properties/adultCount/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}}else{const err32={instancePath:instancePath+"/adultCount",schemaPath:"#/properties/adultCount/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}if("number"!=typeof data.childCount){const err33={instancePath:instancePath+"/childCount",schemaPath:"#/properties/childCount/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}if(void 0!==data.spaceCategoryAvailabilites){let data20=data.spaceCategoryAvailabilites;if(Array.isArray(data20)){const len1=data20.length;for(let i1=0;i1<len1;i1++){let data21=data20[i1];if(data21&&"object"==typeof data21&&!Array.isArray(data21)){if(void 0!==data21.id&&"string"!=typeof data21.id){const err34={instancePath:instancePath+"/spaceCategoryAvailabilites/"+i1+"/id",schemaPath:"#/properties/spaceCategoryAvailabilites/items/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(void 0!==data21.price&&"number"!=typeof data21.price){const err35={instancePath:instancePath+"/spaceCategoryAvailabilites/"+i1+"/price",schemaPath:"#/properties/spaceCategoryAvailabilites/items/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}if(void 0!==data21.unit){let data24=data21.unit;if("string"!=typeof data24){const err36={instancePath:instancePath+"/spaceCategoryAvailabilites/"+i1+"/unit",schemaPath:"#/properties/spaceCategoryAvailabilites/items/properties/unit/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}if("night"!==data24&&"stay"!==data24&&"hour"!==data24){const err37={instancePath:instancePath+"/spaceCategoryAvailabilites/"+i1+"/unit",schemaPath:"#/properties/spaceCategoryAvailabilites/items/properties/unit/enum",keyword:"enum",params:{allowedValues:schema164.properties.spaceCategoryAvailabilites.items.properties.unit.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}}if(void 0!==data21.isUpgrade&&"boolean"!=typeof data21.isUpgrade){const err38={instancePath:instancePath+"/spaceCategoryAvailabilites/"+i1+"/isUpgrade",schemaPath:"#/properties/spaceCategoryAvailabilites/items/properties/isUpgrade/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}else{const err39={instancePath:instancePath+"/spaceCategoryAvailabilites/"+i1,schemaPath:"#/properties/spaceCategoryAvailabilites/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}}else{const err40={instancePath:instancePath+"/spaceCategoryAvailabilites",schemaPath:"#/properties/spaceCategoryAvailabilites/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}}if(void 0!==data.revenue&&(validate64(data.revenue,{instancePath:instancePath+"/revenue",parentData:data,parentDataProperty:"revenue",rootData:rootData})||(vErrors=null===vErrors?validate64.errors:vErrors.concat(validate64.errors),errors=vErrors.length)),void 0!==data.rateSuppressed&&"boolean"!=typeof data.rateSuppressed){const err41={instancePath:instancePath+"/rateSuppressed",schemaPath:"#/properties/rateSuppressed/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}if(void 0!==data.payment&&"string"!=typeof data.payment){const err42={instancePath:instancePath+"/payment",schemaPath:"#/properties/payment/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}if(void 0!==data.company&&"string"!=typeof data.company){const err43={instancePath:instancePath+"/company",schemaPath:"#/properties/company/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}if(void 0!==data.travelAgent&&"string"!=typeof data.travelAgent){const err44={instancePath:instancePath+"/travelAgent",schemaPath:"#/properties/travelAgent/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err45={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}if(void 0!==data.updatedAt){let data32=data.updatedAt;if("string"!=typeof data32&&(!data32||"object"!=typeof data32||Array.isArray(data32))){const err46={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/type",keyword:"type",params:{type:schema151.type},message:"must be string,object"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}if("string"==typeof data32&&!formats4.validate(data32)){const err47={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}}}else{const err48={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}return validate63.errors=vErrors,0===errors}var validateRoom=function validate66(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="room"),void 0===data.dimmers&&(data.dimmers=[]),void 0===data.switches&&(data.switches=[]),void 0===data.thermostats&&(data.thermostats=[]),void 0===data.locks&&(data.locks=[]),void 0===data.windowCoverings&&(data.windowCoverings=[]),void 0===data.courtesy&&(data.courtesy=[]),void 0===data.cameras&&(data.cameras=[]),void 0===data.mediaSources&&(data.mediaSources=[]),void 0===data.motionSensors&&(data.motionSensors=[]),void 0===data.alarms&&(data.alarms=[]),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.name){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}for(const key0 in data)if(!func5.call(schema171.properties,key0)){const err2={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err4={};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(_errs6===errors){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if("room"!==data1){const err7={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema171.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.name&&"string"!=typeof data.name){const err8={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0!==data.floor&&"string"!=typeof data.floor){const err9={instancePath:instancePath+"/floor",schemaPath:"#/properties/floor/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}let data4=data.dimmers;if(Array.isArray(data4)){const len0=data4.length;for(let i0=0;i0<len0;i0++)validate27(data4[i0],{instancePath:instancePath+"/dimmers/"+i0,parentData:data4,parentDataProperty:i0,rootData:rootData})||(vErrors=null===vErrors?validate27.errors:vErrors.concat(validate27.errors),errors=vErrors.length)}else{const err10={instancePath:instancePath+"/dimmers",schemaPath:"#/properties/dimmers/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}let data6=data.switches;if(Array.isArray(data6)){const len1=data6.length;for(let i1=0;i1<len1;i1++)validate68(data6[i1],{instancePath:instancePath+"/switches/"+i1,parentData:data6,parentDataProperty:i1,rootData:rootData})||(vErrors=null===vErrors?validate68.errors:vErrors.concat(validate68.errors),errors=vErrors.length)}else{const err11={instancePath:instancePath+"/switches",schemaPath:"#/properties/switches/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}let data8=data.thermostats;if(Array.isArray(data8)){const len2=data8.length;for(let i2=0;i2<len2;i2++)validate72(data8[i2],{instancePath:instancePath+"/thermostats/"+i2,parentData:data8,parentDataProperty:i2,rootData:rootData})||(vErrors=null===vErrors?validate72.errors:vErrors.concat(validate72.errors),errors=vErrors.length)}else{const err12={instancePath:instancePath+"/thermostats",schemaPath:"#/properties/thermostats/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}let data10=data.locks;if(Array.isArray(data10)){const len3=data10.length;for(let i3=0;i3<len3;i3++)validate45(data10[i3],{instancePath:instancePath+"/locks/"+i3,parentData:data10,parentDataProperty:i3,rootData:rootData})||(vErrors=null===vErrors?validate45.errors:vErrors.concat(validate45.errors),errors=vErrors.length)}else{const err13={instancePath:instancePath+"/locks",schemaPath:"#/properties/locks/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}let data12=data.windowCoverings;if(Array.isArray(data12)){const len4=data12.length;for(let i4=0;i4<len4;i4++)validate81(data12[i4],{instancePath:instancePath+"/windowCoverings/"+i4,parentData:data12,parentDataProperty:i4,rootData:rootData})||(vErrors=null===vErrors?validate81.errors:vErrors.concat(validate81.errors),errors=vErrors.length)}else{const err14={instancePath:instancePath+"/windowCoverings",schemaPath:"#/properties/windowCoverings/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}let data14=data.courtesy;if(Array.isArray(data14)){const len5=data14.length;for(let i5=0;i5<len5;i5++)validate22(data14[i5],{instancePath:instancePath+"/courtesy/"+i5,parentData:data14,parentDataProperty:i5,rootData:rootData})||(vErrors=null===vErrors?validate22.errors:vErrors.concat(validate22.errors),errors=vErrors.length)}else{const err15={instancePath:instancePath+"/courtesy",schemaPath:"#/properties/courtesy/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}let data16=data.cameras;if(Array.isArray(data16)){const len6=data16.length;for(let i6=0;i6<len6;i6++)validate17(data16[i6],{instancePath:instancePath+"/cameras/"+i6,parentData:data16,parentDataProperty:i6,rootData:rootData})||(vErrors=null===vErrors?validate17.errors:vErrors.concat(validate17.errors),errors=vErrors.length)}else{const err16={instancePath:instancePath+"/cameras",schemaPath:"#/properties/cameras/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}let data18=data.mediaSources;if(Array.isArray(data18)){const len7=data18.length;for(let i7=0;i7<len7;i7++)validate49(data18[i7],{instancePath:instancePath+"/mediaSources/"+i7,parentData:data18,parentDataProperty:i7,rootData:rootData})||(vErrors=null===vErrors?validate49.errors:vErrors.concat(validate49.errors),errors=vErrors.length)}else{const err17={instancePath:instancePath+"/mediaSources",schemaPath:"#/properties/mediaSources/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}let data20=data.motionSensors;if(Array.isArray(data20)){const len8=data20.length;for(let i8=0;i8<len8;i8++)validate52(data20[i8],{instancePath:instancePath+"/motionSensors/"+i8,parentData:data20,parentDataProperty:i8,rootData:rootData})||(vErrors=null===vErrors?validate52.errors:vErrors.concat(validate52.errors),errors=vErrors.length)}else{const err18={instancePath:instancePath+"/motionSensors",schemaPath:"#/properties/motionSensors/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}let data22=data.alarms;if(Array.isArray(data22)){const len9=data22.length;for(let i9=0;i9<len9;i9++)validate10(data22[i9],{instancePath:instancePath+"/alarms/"+i9,parentData:data22,parentDataProperty:i9,rootData:rootData})||(vErrors=null===vErrors?validate10.errors:vErrors.concat(validate10.errors),errors=vErrors.length)}else{const err19={instancePath:instancePath+"/alarms",schemaPath:"#/properties/alarms/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data.occupiedAt){let data24=data.occupiedAt;if("string"!=typeof data24&&(!data24||"object"!=typeof data24||Array.isArray(data24))){const err20={instancePath:instancePath+"/occupiedAt",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:schema102.type},message:"must be string,object"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if("string"==typeof data24&&!formats4.validate(data24)){const err21={instancePath:instancePath+"/occupiedAt",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}if(void 0!==data.createdAt){let data25=data.createdAt;if("string"!=typeof data25&&(!data25||"object"!=typeof data25||Array.isArray(data25))){const err22={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:schema102.type},message:"must be string,object"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if("string"==typeof data25&&!formats4.validate(data25)){const err23={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}}if(void 0!==data.updatedAt){let data26=data.updatedAt;if("string"!=typeof data26&&(!data26||"object"!=typeof data26||Array.isArray(data26))){const err24={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/type",keyword:"type",params:{type:schema151.type},message:"must be string,object"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if("string"==typeof data26&&!formats4.validate(data26)){const err25={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}}else{const err26={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}return validate66.errors=vErrors,0===errors},schema171={$schema:"http://json-schema.org/draft-07/schema",$id:"room.json",title:"Room",description:"A room represents a physical space of controllable IoT devices",type:"object",required:["id","name"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["room"],default:"room"},name:{type:"string"},floor:{type:"string"},dimmers:{type:"array",default:[],items:{$ref:"dimmer.json"}},switches:{type:"array",default:[],items:{$ref:"switch.json"}},thermostats:{type:"array",default:[],items:{$ref:"thermostat.json"}},locks:{type:"array",default:[],items:{$ref:"lock.json"}},windowCoverings:{type:"array",default:[],items:{$ref:"windowCovering.json"}},courtesy:{type:"array",default:[],items:{$ref:"courtesy.json"}},cameras:{type:"array",default:[],items:{$ref:"camera.json"}},mediaSources:{type:"array",default:[],items:{$ref:"mediaSource.json"}},motionSensors:{type:"array",default:[],items:{$ref:"motionSensor.json"}},alarms:{type:"array",default:[],items:{$ref:"alarm.json"}},occupiedAt:{$ref:"definitions.json#/definitions/createdAt"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}},additionalProperties:!1},schema173={$schema:"http://json-schema.org/draft-07/schema",$id:"switch.json",title:"Switch",description:"Any smart switch",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},discriminator:{type:"string",enum:["light","fan","irrigation"]},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},state:{type:"string",enum:["on","off"]},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","state","driver"]};function validate69(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate69.errors=vErrors,0===errors}function validate68(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.state){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"state"},message:"must have required property 'state'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.driver){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs5===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err7={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.type){let data2=data.type;if("string"!=typeof data2){const err8={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("alarm"!==data2&&"dimmer"!==data2&&"switch"!==data2&&"motionSensor"!==data2&&"windowCovering"!==data2&&"camera"!==data2&&"mediaSource"!==data2&&"thermostat"!==data2&&"lock"!==data2&&"courtesy"!==data2&&"gateway"!==data2&&"tv"!==data2&&"dvr"!==data2&&"appleTv"!==data2&&"discPlayer"!==data2&&"mediaPlayer"!==data2&&"uncontrolledDevice"!==data2){const err9={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema31.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.discriminator){let data3=data.discriminator;if("string"!=typeof data3){const err10={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("light"!==data3&&"fan"!==data3&&"irrigation"!==data3){const err11={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema173.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}if(void 0!==data.supportedNotifications){let data4=data.supportedNotifications;if(Array.isArray(data4)){const len0=data4.length;for(let i0=0;i0<len0;i0++){let data5=data4[i0];if("button 1"!==data5&&"button 2"!==data5&&"button 3"!==data5&&"button 4"!==data5&&"button 5"!==data5&&"idle"!==data5&&"powerHasBeedApplied"!==data5&&"acMainsDisconnected"!==data5&&"acMainsReconnected"!==data5&&"replaceBatterySoon"!==data5&&"replaceBatteryNow"!==data5&&"batteryOk"!==data5&&"hardwareFailure"!==data5&&"softwareFailure"!==data5&&"hardwareFailureWithCode"!==data5&&"softwareFailureWithCode"!==data5&&"motionDetection"!==data5&&"airFilterNeedsCleaned"!==data5&&"airFilterNeedsReplaced"!==data5&&"smokeDetected"!==data5&&"outsideSafeTemperatureRange"!==data5&&"outsideSafeHumidityRange"!==data5&&"scheduleMaintenance"!==data5&&"doorAjar"!==data5&&"communicationFailure"!==data5&&"communicationOk"!==data5&&"burglarAlarm"!==data5&&"fireAlarm"!==data5){const err12={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}let j0,i1=data4.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data4[i1],data4[j0])){const err13={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++;break outer0}}else{const err14={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}if(void 0!==data.notification&&(validate69(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate69.errors:vErrors.concat(validate69.errors),errors=vErrors.length)),void 0!==data.driver){let data7=data.driver;if("string"!=typeof data7){const err15={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if("adlink"!==data7&&"aws-kinesis"!==data7&&"butler"!==data7&&"crestron"!==data7&&"dell"!==data7&&"dmp"!==data7&&"doorbird"!==data7&&"dormakaba"!==data7&&"dsc"!==data7&&"ecobee"!==data7&&"epson"!==data7&&"geovision-rs"!==data7&&"geovision-as-manager"!==data7&&"honeywell-vista"!==data7&&"igor"!==data7&&"inncom"!==data7&&"isapi"!==data7&&"kohost-k7"!==data7&&"kohost"!==data7&&"lg"!==data7&&"lg-webos"!==data7&&"lapi"!==data7&&"lirc"!==data7&&"mews"!==data7&&"mht"!==data7&&"paxton"!==data7&&"pelican-wireless"!==data7&&"power-shades"!==data7&&"rachio"!==data7&&"rebrandly"!==data7&&"relay"!==data7&&"rtsp"!==data7&&"salto"!==data7&&"salto-irn"!==data7&&"samsung"!==data7&&"se"!==data7&&"sendgrid"!==data7&&"sonifi"!==data7&&"stay-n-touch"!==data7&&"storable"!==data7&&"twilio"!==data7&&"unifi"!==data7&&"valcom"!==data7&&"vizio"!==data7&&"wisenet"!==data7&&"cloudflare-images"!==data7&&"cloudflare-stream"!==data7&&"insperia-privacy"!==data7){const err16={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}if(void 0!==data.offline&&"boolean"!=typeof data.offline){const err17={instancePath:instancePath+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data.state){let data9=data.state;if("string"!=typeof data9){const err18={instancePath:instancePath+"/state",schemaPath:"#/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if("on"!==data9&&"off"!==data9){const err19={instancePath:instancePath+"/state",schemaPath:"#/properties/state/enum",keyword:"enum",params:{allowedValues:schema173.properties.state.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err20={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0!==data.watts){let data11=data.watts;if("number"==typeof data11){if(data11<0||isNaN(data11)){const err21={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}else{const err22={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err23={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err24={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err25={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err26={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}else{const err27={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}return validate68.errors=vErrors,0===errors}var schema182={$schema:"http://json-schema.org/draft-07/schema",$id:"thermostat.json",title:"Thermostat",description:"Any smart thermostat",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{$ref:"definitions.json#/definitions/name"},type:{$ref:"definitions.json#/definitions/type",default:"thermostat"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},currentTemperature:{type:"number"},currentHumidity:{type:"number",minimum:0},hvacMode:{type:"string",$ref:"#/properties/supportedHvacModes/items"},hvacState:{type:["string","null"],enum:["cooling","heating","off",null]},fanMode:{type:"string",$ref:"#/properties/supportedFanModes/items"},fanState:{type:["string","null"],enum:["off","low","medium","high","on",null]},temperatureScale:{type:"string",enum:["celsius","fahrenheit"],default:"fahrenheit"},humidityScale:{type:["string","null"],enum:["absolute","relative",null]},supportedHvacModes:{type:"array",uniqueItems:!0,minItems:2,items:{enum:["cool","heat","auto","off"]}},supportedFanModes:{type:"array",uniqueItems:!0,items:{enum:["auto","low","medium","high","off","on"]}},setpoints:{type:"object",additionalProperties:!1,properties:{cool:{$ref:"#/$defs/setpoint"},heat:{$ref:"#/$defs/setpoint"},auto:{$ref:"#/$defs/setpoint"}}},minAutoDelta:{type:"number",default:3},cycleRate:{type:"number"},batteryLevel:{$ref:"definitions.json#/definitions/batteryLevel"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},$defs:{setpoint:{type:"object",additionalProperties:!1,properties:{value:{$ref:"#/$defs/setpointValue"},min:{$ref:"#/$defs/setpointMinMax"},max:{$ref:"#/$defs/setpointMinMax"}}},setpointValue:{type:"number",minimum:0,maximum:99},setpointMinMax:{type:["number","null"],minimum:0,maximum:99}},required:["id","type","hvacMode","fanMode","hvacState","fanState","setpoints","temperatureScale","supportedHvacModes","supportedFanModes","driver"]},schema190={enum:["cool","heat","auto","off"]},schema191={enum:["auto","low","medium","high","off","on"]};function validate73(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate73.errors=vErrors,0===errors}var schema194={type:["number","null"],minimum:0,maximum:99};function validate75(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){for(const key0 in data)if("value"!==key0&&"min"!==key0&&"max"!==key0){const err0={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0!==data.value){let data0=data.value;if("number"==typeof data0){if(data0>99||isNaN(data0)){const err1={instancePath:instancePath+"/value",schemaPath:"#/$defs/setpointValue/maximum",keyword:"maximum",params:{comparison:"<=",limit:99},message:"must be <= 99"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(data0<0||isNaN(data0)){const err2={instancePath:instancePath+"/value",schemaPath:"#/$defs/setpointValue/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}else{const err3={instancePath:instancePath+"/value",schemaPath:"#/$defs/setpointValue/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}if(void 0!==data.min){let data1=data.min;if("number"!=typeof data1&&null!==data1){const err4={instancePath:instancePath+"/min",schemaPath:"#/$defs/setpointMinMax/type",keyword:"type",params:{type:schema194.type},message:"must be number,null"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if("number"==typeof data1){if(data1>99||isNaN(data1)){const err5={instancePath:instancePath+"/min",schemaPath:"#/$defs/setpointMinMax/maximum",keyword:"maximum",params:{comparison:"<=",limit:99},message:"must be <= 99"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(data1<0||isNaN(data1)){const err6={instancePath:instancePath+"/min",schemaPath:"#/$defs/setpointMinMax/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}}}if(void 0!==data.max){let data2=data.max;if("number"!=typeof data2&&null!==data2){const err7={instancePath:instancePath+"/max",schemaPath:"#/$defs/setpointMinMax/type",keyword:"type",params:{type:schema194.type},message:"must be number,null"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if("number"==typeof data2){if(data2>99||isNaN(data2)){const err8={instancePath:instancePath+"/max",schemaPath:"#/$defs/setpointMinMax/maximum",keyword:"maximum",params:{comparison:"<=",limit:99},message:"must be <= 99"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(data2<0||isNaN(data2)){const err9={instancePath:instancePath+"/max",schemaPath:"#/$defs/setpointMinMax/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}}}else{const err10={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}return validate75.errors=vErrors,0===errors}function validate72(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="thermostat"),void 0===data.temperatureScale&&(data.temperatureScale="fahrenheit"),void 0===data.minAutoDelta&&(data.minAutoDelta=3),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.hvacMode){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"hvacMode"},message:"must have required property 'hvacMode'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.fanMode){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"fanMode"},message:"must have required property 'fanMode'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.hvacState){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"hvacState"},message:"must have required property 'hvacState'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0===data.fanState){const err5={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"fanState"},message:"must have required property 'fanState'"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0===data.setpoints){const err6={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"setpoints"},message:"must have required property 'setpoints'"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0===data.temperatureScale){const err7={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"temperatureScale"},message:"must have required property 'temperatureScale'"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0===data.supportedHvacModes){const err8={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"supportedHvacModes"},message:"must have required property 'supportedHvacModes'"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0===data.supportedFanModes){const err9={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"supportedFanModes"},message:"must have required property 'supportedFanModes'"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0===data.driver){const err10={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err11={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err12={};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(_errs5===errors){const err13={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err14={instancePath:instancePath+"/name",schemaPath:"definitions.json#/definitions/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}let data2=data.type;if("string"!=typeof data2){const err15={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if("alarm"!==data2&&"dimmer"!==data2&&"switch"!==data2&&"motionSensor"!==data2&&"windowCovering"!==data2&&"camera"!==data2&&"mediaSource"!==data2&&"thermostat"!==data2&&"lock"!==data2&&"courtesy"!==data2&&"gateway"!==data2&&"tv"!==data2&&"dvr"!==data2&&"appleTv"!==data2&&"discPlayer"!==data2&&"mediaPlayer"!==data2&&"uncontrolledDevice"!==data2){const err16={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema31.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data.driver){let data3=data.driver;if("string"!=typeof data3){const err17={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if("adlink"!==data3&&"aws-kinesis"!==data3&&"butler"!==data3&&"crestron"!==data3&&"dell"!==data3&&"dmp"!==data3&&"doorbird"!==data3&&"dormakaba"!==data3&&"dsc"!==data3&&"ecobee"!==data3&&"epson"!==data3&&"geovision-rs"!==data3&&"geovision-as-manager"!==data3&&"honeywell-vista"!==data3&&"igor"!==data3&&"inncom"!==data3&&"isapi"!==data3&&"kohost-k7"!==data3&&"kohost"!==data3&&"lg"!==data3&&"lg-webos"!==data3&&"lapi"!==data3&&"lirc"!==data3&&"mews"!==data3&&"mht"!==data3&&"paxton"!==data3&&"pelican-wireless"!==data3&&"power-shades"!==data3&&"rachio"!==data3&&"rebrandly"!==data3&&"relay"!==data3&&"rtsp"!==data3&&"salto"!==data3&&"salto-irn"!==data3&&"samsung"!==data3&&"se"!==data3&&"sendgrid"!==data3&&"sonifi"!==data3&&"stay-n-touch"!==data3&&"storable"!==data3&&"twilio"!==data3&&"unifi"!==data3&&"valcom"!==data3&&"vizio"!==data3&&"wisenet"!==data3&&"cloudflare-images"!==data3&&"cloudflare-stream"!==data3&&"insperia-privacy"!==data3){const err18={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}if(void 0!==data.offline&&"boolean"!=typeof data.offline){const err19={instancePath:instancePath+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data.supportedNotifications){let data5=data.supportedNotifications;if(Array.isArray(data5)){const len0=data5.length;for(let i0=0;i0<len0;i0++){let data6=data5[i0];if("button 1"!==data6&&"button 2"!==data6&&"button 3"!==data6&&"button 4"!==data6&&"button 5"!==data6&&"idle"!==data6&&"powerHasBeedApplied"!==data6&&"acMainsDisconnected"!==data6&&"acMainsReconnected"!==data6&&"replaceBatterySoon"!==data6&&"replaceBatteryNow"!==data6&&"batteryOk"!==data6&&"hardwareFailure"!==data6&&"softwareFailure"!==data6&&"hardwareFailureWithCode"!==data6&&"softwareFailureWithCode"!==data6&&"motionDetection"!==data6&&"airFilterNeedsCleaned"!==data6&&"airFilterNeedsReplaced"!==data6&&"smokeDetected"!==data6&&"outsideSafeTemperatureRange"!==data6&&"outsideSafeHumidityRange"!==data6&&"scheduleMaintenance"!==data6&&"doorAjar"!==data6&&"communicationFailure"!==data6&&"communicationOk"!==data6&&"burglarAlarm"!==data6&&"fireAlarm"!==data6){const err20={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}let j0,i1=data5.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data5[i1],data5[j0])){const err21={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++;break outer0}}else{const err22={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data.notification&&(validate73(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate73.errors:vErrors.concat(validate73.errors),errors=vErrors.length)),void 0!==data.currentTemperature&&"number"!=typeof data.currentTemperature){const err23={instancePath:instancePath+"/currentTemperature",schemaPath:"#/properties/currentTemperature/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0!==data.currentHumidity){let data9=data.currentHumidity;if("number"==typeof data9){if(data9<0||isNaN(data9)){const err24={instancePath:instancePath+"/currentHumidity",schemaPath:"#/properties/currentHumidity/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}else{const err25={instancePath:instancePath+"/currentHumidity",schemaPath:"#/properties/currentHumidity/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}if(void 0!==data.hvacMode){let data10=data.hvacMode;if("string"!=typeof data10){const err26={instancePath:instancePath+"/hvacMode",schemaPath:"#/properties/hvacMode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if("cool"!==data10&&"heat"!==data10&&"auto"!==data10&&"off"!==data10){const err27={instancePath:instancePath+"/hvacMode",schemaPath:"#/properties/supportedHvacModes/items/enum",keyword:"enum",params:{allowedValues:schema190.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}}if(void 0!==data.hvacState){let data11=data.hvacState;if("string"!=typeof data11&&null!==data11){const err28={instancePath:instancePath+"/hvacState",schemaPath:"#/properties/hvacState/type",keyword:"type",params:{type:schema182.properties.hvacState.type},message:"must be string,null"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if("cooling"!==data11&&"heating"!==data11&&"off"!==data11&&null!==data11){const err29={instancePath:instancePath+"/hvacState",schemaPath:"#/properties/hvacState/enum",keyword:"enum",params:{allowedValues:schema182.properties.hvacState.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}}if(void 0!==data.fanMode){let data12=data.fanMode;if("string"!=typeof data12){const err30={instancePath:instancePath+"/fanMode",schemaPath:"#/properties/fanMode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if("auto"!==data12&&"low"!==data12&&"medium"!==data12&&"high"!==data12&&"off"!==data12&&"on"!==data12){const err31={instancePath:instancePath+"/fanMode",schemaPath:"#/properties/supportedFanModes/items/enum",keyword:"enum",params:{allowedValues:schema191.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}}if(void 0!==data.fanState){let data13=data.fanState;if("string"!=typeof data13&&null!==data13){const err32={instancePath:instancePath+"/fanState",schemaPath:"#/properties/fanState/type",keyword:"type",params:{type:schema182.properties.fanState.type},message:"must be string,null"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}if("off"!==data13&&"low"!==data13&&"medium"!==data13&&"high"!==data13&&"on"!==data13&&null!==data13){const err33={instancePath:instancePath+"/fanState",schemaPath:"#/properties/fanState/enum",keyword:"enum",params:{allowedValues:schema182.properties.fanState.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}}let data14=data.temperatureScale;if("string"!=typeof data14){const err34={instancePath:instancePath+"/temperatureScale",schemaPath:"#/properties/temperatureScale/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if("celsius"!==data14&&"fahrenheit"!==data14){const err35={instancePath:instancePath+"/temperatureScale",schemaPath:"#/properties/temperatureScale/enum",keyword:"enum",params:{allowedValues:schema182.properties.temperatureScale.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}if(void 0!==data.humidityScale){let data15=data.humidityScale;if("string"!=typeof data15&&null!==data15){const err36={instancePath:instancePath+"/humidityScale",schemaPath:"#/properties/humidityScale/type",keyword:"type",params:{type:schema182.properties.humidityScale.type},message:"must be string,null"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}if("absolute"!==data15&&"relative"!==data15&&null!==data15){const err37={instancePath:instancePath+"/humidityScale",schemaPath:"#/properties/humidityScale/enum",keyword:"enum",params:{allowedValues:schema182.properties.humidityScale.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}}if(void 0!==data.supportedHvacModes){let data16=data.supportedHvacModes;if(Array.isArray(data16)){if(data16.length<2){const err38={instancePath:instancePath+"/supportedHvacModes",schemaPath:"#/properties/supportedHvacModes/minItems",keyword:"minItems",params:{limit:2},message:"must NOT have fewer than 2 items"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}const len1=data16.length;for(let i2=0;i2<len1;i2++){let data17=data16[i2];if("cool"!==data17&&"heat"!==data17&&"auto"!==data17&&"off"!==data17){const err39={instancePath:instancePath+"/supportedHvacModes/"+i2,schemaPath:"#/properties/supportedHvacModes/items/enum",keyword:"enum",params:{allowedValues:schema182.properties.supportedHvacModes.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}let j1,i3=data16.length;if(i3>1)outer1:for(;i3--;)for(j1=i3;j1--;)if(func0(data16[i3],data16[j1])){const err40={instancePath:instancePath+"/supportedHvacModes",schemaPath:"#/properties/supportedHvacModes/uniqueItems",keyword:"uniqueItems",params:{i:i3,j:j1},message:"must NOT have duplicate items (items ## "+j1+" and "+i3+" are identical)"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++;break outer1}}else{const err41={instancePath:instancePath+"/supportedHvacModes",schemaPath:"#/properties/supportedHvacModes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}}if(void 0!==data.supportedFanModes){let data18=data.supportedFanModes;if(Array.isArray(data18)){const len2=data18.length;for(let i4=0;i4<len2;i4++){let data19=data18[i4];if("auto"!==data19&&"low"!==data19&&"medium"!==data19&&"high"!==data19&&"off"!==data19&&"on"!==data19){const err42={instancePath:instancePath+"/supportedFanModes/"+i4,schemaPath:"#/properties/supportedFanModes/items/enum",keyword:"enum",params:{allowedValues:schema182.properties.supportedFanModes.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}}let j2,i5=data18.length;if(i5>1)outer2:for(;i5--;)for(j2=i5;j2--;)if(func0(data18[i5],data18[j2])){const err43={instancePath:instancePath+"/supportedFanModes",schemaPath:"#/properties/supportedFanModes/uniqueItems",keyword:"uniqueItems",params:{i:i5,j:j2},message:"must NOT have duplicate items (items ## "+j2+" and "+i5+" are identical)"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++;break outer2}}else{const err44={instancePath:instancePath+"/supportedFanModes",schemaPath:"#/properties/supportedFanModes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}}if(void 0!==data.setpoints){let data20=data.setpoints;if(data20&&"object"==typeof data20&&!Array.isArray(data20)){for(const key0 in data20)if("cool"!==key0&&"heat"!==key0&&"auto"!==key0){const err45={instancePath:instancePath+"/setpoints",schemaPath:"#/properties/setpoints/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}void 0!==data20.cool&&(validate75(data20.cool,{instancePath:instancePath+"/setpoints/cool",parentData:data20,parentDataProperty:"cool",rootData:rootData})||(vErrors=null===vErrors?validate75.errors:vErrors.concat(validate75.errors),errors=vErrors.length)),void 0!==data20.heat&&(validate75(data20.heat,{instancePath:instancePath+"/setpoints/heat",parentData:data20,parentDataProperty:"heat",rootData:rootData})||(vErrors=null===vErrors?validate75.errors:vErrors.concat(validate75.errors),errors=vErrors.length)),void 0!==data20.auto&&(validate75(data20.auto,{instancePath:instancePath+"/setpoints/auto",parentData:data20,parentDataProperty:"auto",rootData:rootData})||(vErrors=null===vErrors?validate75.errors:vErrors.concat(validate75.errors),errors=vErrors.length))}else{const err46={instancePath:instancePath+"/setpoints",schemaPath:"#/properties/setpoints/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}}if("number"!=typeof data.minAutoDelta){const err47={instancePath:instancePath+"/minAutoDelta",schemaPath:"#/properties/minAutoDelta/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}if(void 0!==data.cycleRate&&"number"!=typeof data.cycleRate){const err48={instancePath:instancePath+"/cycleRate",schemaPath:"#/properties/cycleRate/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}if(void 0!==data.batteryLevel){let data26=data.batteryLevel;if("number"==typeof data26){if(data26>100||isNaN(data26)){const err49={instancePath:instancePath+"/batteryLevel",schemaPath:"definitions.json#/definitions/batteryLevel/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err49]:vErrors.push(err49),errors++}if(data26<0||isNaN(data26)){const err50={instancePath:instancePath+"/batteryLevel",schemaPath:"definitions.json#/definitions/batteryLevel/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err50]:vErrors.push(err50),errors++}}else{const err51={instancePath:instancePath+"/batteryLevel",schemaPath:"definitions.json#/definitions/batteryLevel/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err51]:vErrors.push(err51),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err52={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err52]:vErrors.push(err52),errors++}if(void 0!==data.watts){let data28=data.watts;if("number"==typeof data28){if(data28<0||isNaN(data28)){const err53={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err53]:vErrors.push(err53),errors++}}else{const err54={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err54]:vErrors.push(err54),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err55={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err55]:vErrors.push(err55),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err56={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err56]:vErrors.push(err56),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err57={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err57]:vErrors.push(err57),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err58={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err58]:vErrors.push(err58),errors++}}else{const err59={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err59]:vErrors.push(err59),errors++}return validate72.errors=vErrors,0===errors}var schema199={$schema:"http://json-schema.org/draft-07/schema",$id:"windowCovering.json",title:"Window Covering",description:"Any smart window covering",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type",default:"windowCovering"},discriminator:{type:"string",enum:["basic","variable"],default:"variable"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},position:{type:["number","null"],minimum:0,maximum:100},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","position","driver"]};function validate82(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate82.errors=vErrors,0===errors}function validate81(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="windowCovering"),void 0===data.discriminator&&(data.discriminator="variable"),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.position){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"position"},message:"must have required property 'position'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.driver){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs5===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err7={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}let data2=data.type;if("string"!=typeof data2){const err8={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("alarm"!==data2&&"dimmer"!==data2&&"switch"!==data2&&"motionSensor"!==data2&&"windowCovering"!==data2&&"camera"!==data2&&"mediaSource"!==data2&&"thermostat"!==data2&&"lock"!==data2&&"courtesy"!==data2&&"gateway"!==data2&&"tv"!==data2&&"dvr"!==data2&&"appleTv"!==data2&&"discPlayer"!==data2&&"mediaPlayer"!==data2&&"uncontrolledDevice"!==data2){const err9={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema31.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}let data3=data.discriminator;if("string"!=typeof data3){const err10={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("basic"!==data3&&"variable"!==data3){const err11={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema199.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.supportedNotifications){let data4=data.supportedNotifications;if(Array.isArray(data4)){const len0=data4.length;for(let i0=0;i0<len0;i0++){let data5=data4[i0];if("button 1"!==data5&&"button 2"!==data5&&"button 3"!==data5&&"button 4"!==data5&&"button 5"!==data5&&"idle"!==data5&&"powerHasBeedApplied"!==data5&&"acMainsDisconnected"!==data5&&"acMainsReconnected"!==data5&&"replaceBatterySoon"!==data5&&"replaceBatteryNow"!==data5&&"batteryOk"!==data5&&"hardwareFailure"!==data5&&"softwareFailure"!==data5&&"hardwareFailureWithCode"!==data5&&"softwareFailureWithCode"!==data5&&"motionDetection"!==data5&&"airFilterNeedsCleaned"!==data5&&"airFilterNeedsReplaced"!==data5&&"smokeDetected"!==data5&&"outsideSafeTemperatureRange"!==data5&&"outsideSafeHumidityRange"!==data5&&"scheduleMaintenance"!==data5&&"doorAjar"!==data5&&"communicationFailure"!==data5&&"communicationOk"!==data5&&"burglarAlarm"!==data5&&"fireAlarm"!==data5){const err12={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}let j0,i1=data4.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data4[i1],data4[j0])){const err13={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++;break outer0}}else{const err14={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}if(void 0!==data.notification&&(validate82(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate82.errors:vErrors.concat(validate82.errors),errors=vErrors.length)),void 0!==data.driver){let data7=data.driver;if("string"!=typeof data7){const err15={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if("adlink"!==data7&&"aws-kinesis"!==data7&&"butler"!==data7&&"crestron"!==data7&&"dell"!==data7&&"dmp"!==data7&&"doorbird"!==data7&&"dormakaba"!==data7&&"dsc"!==data7&&"ecobee"!==data7&&"epson"!==data7&&"geovision-rs"!==data7&&"geovision-as-manager"!==data7&&"honeywell-vista"!==data7&&"igor"!==data7&&"inncom"!==data7&&"isapi"!==data7&&"kohost-k7"!==data7&&"kohost"!==data7&&"lg"!==data7&&"lg-webos"!==data7&&"lapi"!==data7&&"lirc"!==data7&&"mews"!==data7&&"mht"!==data7&&"paxton"!==data7&&"pelican-wireless"!==data7&&"power-shades"!==data7&&"rachio"!==data7&&"rebrandly"!==data7&&"relay"!==data7&&"rtsp"!==data7&&"salto"!==data7&&"salto-irn"!==data7&&"samsung"!==data7&&"se"!==data7&&"sendgrid"!==data7&&"sonifi"!==data7&&"stay-n-touch"!==data7&&"storable"!==data7&&"twilio"!==data7&&"unifi"!==data7&&"valcom"!==data7&&"vizio"!==data7&&"wisenet"!==data7&&"cloudflare-images"!==data7&&"cloudflare-stream"!==data7&&"insperia-privacy"!==data7){const err16={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}if(void 0!==data.offline&&"boolean"!=typeof data.offline){const err17={instancePath:instancePath+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data.position){let data9=data.position;if("number"!=typeof data9&&null!==data9){const err18={instancePath:instancePath+"/position",schemaPath:"#/properties/position/type",keyword:"type",params:{type:schema199.properties.position.type},message:"must be number,null"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if("number"==typeof data9){if(data9>100||isNaN(data9)){const err19={instancePath:instancePath+"/position",schemaPath:"#/properties/position/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(data9<0||isNaN(data9)){const err20={instancePath:instancePath+"/position",schemaPath:"#/properties/position/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err21={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if(void 0!==data.watts){let data11=data.watts;if("number"==typeof data11){if(data11<0||isNaN(data11)){const err22={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}else{const err23={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err24={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err25={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err26={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err27={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}}else{const err28={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}return validate81.errors=vErrors,0===errors}var validateScene=function validate90(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="scene"),void 0===data.isDefault&&(data.isDefault=!1),void 0===data.showOnUi&&(data.showOnUi=!0),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.name){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.type){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}for(const key0 in data)if("id"!==key0&&"name"!==key0&&"description"!==key0&&"type"!==key0&&"devices"!==key0&&"isDefault"!==key0&&"showOnUi"!==key0){const err3={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs6===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err7={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.description&&"string"!=typeof data.description){const err8={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}let data3=data.type;if("string"!=typeof data3){const err9={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if("scene"!==data3){const err10={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema211.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data.devices){let data4=data.devices;if(data4&&"object"==typeof data4&&!Array.isArray(data4)){void 0===data4.dimmers&&(data4.dimmers=[]),void 0===data4.windowCoverings&&(data4.windowCoverings=[]),void 0===data4.thermostats&&(data4.thermostats=[]);for(const key1 in data4)if("switches"!==key1&&"dimmers"!==key1&&"windowCoverings"!==key1&&"thermostats"!==key1&&"mediaSources"!==key1&&"locks"!==key1){const err11={instancePath:instancePath+"/devices",schemaPath:"#/properties/devices/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data4.switches){let data5=data4.switches;if(Array.isArray(data5)){const len0=data5.length;for(let i0=0;i0<len0;i0++){let data6=data5[i0];if(data6&&"object"==typeof data6&&!Array.isArray(data6)){if(void 0!==data6.id){let data7=data6.id;if("string"!=typeof data7){const err12={instancePath:instancePath+"/devices/switches/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}const _errs23=errors,_errs24=errors;if("global"!==data7&&"system"!==data7){const err13={};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(_errs24===errors){const err14={instancePath:instancePath+"/devices/switches/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}else errors=_errs23,null!==vErrors&&(_errs23?vErrors.length=_errs23:vErrors=null)}if(void 0!==data6.state){let data8=data6.state;if("string"!=typeof data8){const err15={instancePath:instancePath+"/devices/switches/"+i0+"/state",schemaPath:"switch.json#/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if("on"!==data8&&"off"!==data8){const err16={instancePath:instancePath+"/devices/switches/"+i0+"/state",schemaPath:"switch.json#/properties/state/enum",keyword:"enum",params:{allowedValues:schema214.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}}else{const err17={instancePath:instancePath+"/devices/switches/"+i0,schemaPath:"#/properties/devices/properties/switches/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}}else{const err18={instancePath:instancePath+"/devices/switches",schemaPath:"#/properties/devices/properties/switches/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}let data9=data4.dimmers;if(Array.isArray(data9)){const len1=data9.length;for(let i1=0;i1<len1;i1++){let data10=data9[i1];if(data10&&"object"==typeof data10&&!Array.isArray(data10)){if(void 0!==data10.id){let data11=data10.id;if("string"!=typeof data11){const err19={instancePath:instancePath+"/devices/dimmers/"+i1+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}const _errs35=errors,_errs36=errors;if("global"!==data11&&"system"!==data11){const err20={};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(_errs36===errors){const err21={instancePath:instancePath+"/devices/dimmers/"+i1+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}else errors=_errs35,null!==vErrors&&(_errs35?vErrors.length=_errs35:vErrors=null)}if(void 0!==data10.level){let data12=data10.level;if("number"!=typeof data12&&null!==data12){const err22={instancePath:instancePath+"/devices/dimmers/"+i1+"/level",schemaPath:"dimmer.json#/properties/level/type",keyword:"type",params:{type:schema216.type},message:"must be number,null"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if("number"==typeof data12){if(data12>100||isNaN(data12)){const err23={instancePath:instancePath+"/devices/dimmers/"+i1+"/level",schemaPath:"dimmer.json#/properties/level/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(data12<0||isNaN(data12)){const err24={instancePath:instancePath+"/devices/dimmers/"+i1+"/level",schemaPath:"dimmer.json#/properties/level/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}}}else{const err25={instancePath:instancePath+"/devices/dimmers/"+i1,schemaPath:"#/properties/devices/properties/dimmers/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}}else{const err26={instancePath:instancePath+"/devices/dimmers",schemaPath:"#/properties/devices/properties/dimmers/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}let data13=data4.windowCoverings;if(Array.isArray(data13)){const len2=data13.length;for(let i2=0;i2<len2;i2++){let data14=data13[i2];if(data14&&"object"==typeof data14&&!Array.isArray(data14)){if(void 0!==data14.id){let data15=data14.id;if("string"!=typeof data15){const err27={instancePath:instancePath+"/devices/windowCoverings/"+i2+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}const _errs47=errors,_errs48=errors;if("global"!==data15&&"system"!==data15){const err28={};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if(_errs48===errors){const err29={instancePath:instancePath+"/devices/windowCoverings/"+i2+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}else errors=_errs47,null!==vErrors&&(_errs47?vErrors.length=_errs47:vErrors=null)}if(void 0!==data14.position){let data16=data14.position;if("number"!=typeof data16&&null!==data16){const err30={instancePath:instancePath+"/devices/windowCoverings/"+i2+"/position",schemaPath:"windowCovering.json#/properties/position/type",keyword:"type",params:{type:schema218.type},message:"must be number,null"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if("number"==typeof data16){if(data16>100||isNaN(data16)){const err31={instancePath:instancePath+"/devices/windowCoverings/"+i2+"/position",schemaPath:"windowCovering.json#/properties/position/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}if(data16<0||isNaN(data16)){const err32={instancePath:instancePath+"/devices/windowCoverings/"+i2+"/position",schemaPath:"windowCovering.json#/properties/position/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}}}}else{const err33={instancePath:instancePath+"/devices/windowCoverings/"+i2,schemaPath:"#/properties/devices/properties/windowCoverings/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}}}else{const err34={instancePath:instancePath+"/devices/windowCoverings",schemaPath:"#/properties/devices/properties/windowCoverings/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}let data17=data4.thermostats;if(Array.isArray(data17)){const len3=data17.length;for(let i3=0;i3<len3;i3++){let data18=data17[i3];if(data18&&"object"==typeof data18&&!Array.isArray(data18)){if(void 0!==data18.id){let data19=data18.id;if("string"!=typeof data19){const err35={instancePath:instancePath+"/devices/thermostats/"+i3+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}const _errs59=errors,_errs60=errors;if("global"!==data19&&"system"!==data19){const err36={};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}if(_errs60===errors){const err37={instancePath:instancePath+"/devices/thermostats/"+i3+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}else errors=_errs59,null!==vErrors&&(_errs59?vErrors.length=_errs59:vErrors=null)}if(void 0!==data18.hvacMode&&(validate91(data18.hvacMode,{instancePath:instancePath+"/devices/thermostats/"+i3+"/hvacMode",parentData:data18,parentDataProperty:"hvacMode",rootData:rootData})||(vErrors=null===vErrors?validate91.errors:vErrors.concat(validate91.errors),errors=vErrors.length)),void 0!==data18.setpoints&&(validate93(data18.setpoints,{instancePath:instancePath+"/devices/thermostats/"+i3+"/setpoints",parentData:data18,parentDataProperty:"setpoints",rootData:rootData})||(vErrors=null===vErrors?validate93.errors:vErrors.concat(validate93.errors),errors=vErrors.length)),void 0!==data18.fanMode&&(validate98(data18.fanMode,{instancePath:instancePath+"/devices/thermostats/"+i3+"/fanMode",parentData:data18,parentDataProperty:"fanMode",rootData:rootData})||(vErrors=null===vErrors?validate98.errors:vErrors.concat(validate98.errors),errors=vErrors.length)),void 0!==data18.setpointDelta&&"number"!=typeof data18.setpointDelta){const err38={instancePath:instancePath+"/devices/thermostats/"+i3+"/setpointDelta",schemaPath:"#/properties/devices/properties/thermostats/items/properties/setpointDelta/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}else{const err39={instancePath:instancePath+"/devices/thermostats/"+i3,schemaPath:"#/properties/devices/properties/thermostats/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}}else{const err40={instancePath:instancePath+"/devices/thermostats",schemaPath:"#/properties/devices/properties/thermostats/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}if(void 0!==data4.mediaSources){let data24=data4.mediaSources;if(Array.isArray(data24)){const len4=data24.length;for(let i4=0;i4<len4;i4++){let data25=data24[i4];if(data25&&"object"==typeof data25&&!Array.isArray(data25)){if(void 0!==data25.id){let data26=data25.id;if("string"!=typeof data26){const err41={instancePath:instancePath+"/devices/mediaSources/"+i4+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}const _errs73=errors,_errs74=errors;if("global"!==data26&&"system"!==data26){const err42={};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}if(_errs74===errors){const err43={instancePath:instancePath+"/devices/mediaSources/"+i4+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}else errors=_errs73,null!==vErrors&&(_errs73?vErrors.length=_errs73:vErrors=null)}if(void 0!==data25.volume){let data27=data25.volume;if("number"==typeof data27){if(data27>100||isNaN(data27)){const err44={instancePath:instancePath+"/devices/mediaSources/"+i4+"/volume",schemaPath:"#/properties/devices/properties/mediaSources/items/properties/volume/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}if(data27<0||isNaN(data27)){const err45={instancePath:instancePath+"/devices/mediaSources/"+i4+"/volume",schemaPath:"#/properties/devices/properties/mediaSources/items/properties/volume/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}}else{const err46={instancePath:instancePath+"/devices/mediaSources/"+i4+"/volume",schemaPath:"#/properties/devices/properties/mediaSources/items/properties/volume/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}}if(void 0!==data25.commands){let data28=data25.commands;if(Array.isArray(data28)){const len5=data28.length;for(let i5=0;i5<len5;i5++)if("string"!=typeof data28[i5]){const err47={instancePath:instancePath+"/devices/mediaSources/"+i4+"/commands/"+i5,schemaPath:"#/properties/devices/properties/mediaSources/items/properties/commands/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}}else{const err48={instancePath:instancePath+"/devices/mediaSources/"+i4+"/commands",schemaPath:"#/properties/devices/properties/mediaSources/items/properties/commands/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}}}else{const err49={instancePath:instancePath+"/devices/mediaSources/"+i4,schemaPath:"#/properties/devices/properties/mediaSources/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err49]:vErrors.push(err49),errors++}}}else{const err50={instancePath:instancePath+"/devices/mediaSources",schemaPath:"#/properties/devices/properties/mediaSources/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err50]:vErrors.push(err50),errors++}}if(void 0!==data4.locks){let data30=data4.locks;if(Array.isArray(data30)){const len6=data30.length;for(let i6=0;i6<len6;i6++){let data31=data30[i6];if(data31&&"object"==typeof data31&&!Array.isArray(data31)){if(void 0!==data31.id){let data32=data31.id;if("string"!=typeof data32){const err51={instancePath:instancePath+"/devices/locks/"+i6+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err51]:vErrors.push(err51),errors++}const _errs88=errors,_errs89=errors;if("global"!==data32&&"system"!==data32){const err52={};null===vErrors?vErrors=[err52]:vErrors.push(err52),errors++}if(_errs89===errors){const err53={instancePath:instancePath+"/devices/locks/"+i6+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err53]:vErrors.push(err53),errors++}else errors=_errs88,null!==vErrors&&(_errs88?vErrors.length=_errs88:vErrors=null)}if(void 0!==data31.state){let data33=data31.state;if("string"!=typeof data33&&null!==data33){const err54={instancePath:instancePath+"/devices/locks/"+i6+"/state",schemaPath:"lock.json#/properties/state/type",keyword:"type",params:{type:schema227.type},message:"must be string,null"};null===vErrors?vErrors=[err54]:vErrors.push(err54),errors++}if("locked"!==data33&&"unlocked"!==data33&&null!==data33){const err55={instancePath:instancePath+"/devices/locks/"+i6+"/state",schemaPath:"lock.json#/properties/state/enum",keyword:"enum",params:{allowedValues:schema227.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err55]:vErrors.push(err55),errors++}}if(void 0!==data31.mode){let data34=data31.mode;if("string"!=typeof data34&&null!==data34){const err56={instancePath:instancePath+"/devices/locks/"+i6+"/mode",schemaPath:"lock.json#/properties/mode/type",keyword:"type",params:{type:schema228.type},message:"must be string,null"};null===vErrors?vErrors=[err56]:vErrors.push(err56),errors++}if("normal"!==data34&&"autoLock"!==data34&&"emergencyOpen"!==data34&&"emergencyClose"!==data34&&"holdOpen"!==data34&&"lockdown"!==data34&&null!==data34){const err57={instancePath:instancePath+"/devices/locks/"+i6+"/mode",schemaPath:"lock.json#/properties/mode/enum",keyword:"enum",params:{allowedValues:schema228.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err57]:vErrors.push(err57),errors++}}}else{const err58={instancePath:instancePath+"/devices/locks/"+i6,schemaPath:"#/properties/devices/properties/locks/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err58]:vErrors.push(err58),errors++}}}else{const err59={instancePath:instancePath+"/devices/locks",schemaPath:"#/properties/devices/properties/locks/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err59]:vErrors.push(err59),errors++}}}else{const err60={instancePath:instancePath+"/devices",schemaPath:"#/properties/devices/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err60]:vErrors.push(err60),errors++}}if("boolean"!=typeof data.isDefault){const err61={instancePath:instancePath+"/isDefault",schemaPath:"#/properties/isDefault/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err61]:vErrors.push(err61),errors++}if("boolean"!=typeof data.showOnUi){const err62={instancePath:instancePath+"/showOnUi",schemaPath:"#/properties/showOnUi/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err62]:vErrors.push(err62),errors++}}else{const err63={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err63]:vErrors.push(err63),errors++}return validate90.errors=vErrors,0===errors},schema211={$schema:"http://json-schema.org/draft-07/schema",$id:"scene.json",title:"Scene",description:"A room represents a physical space of controllable IoT devices",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},description:{type:"string"},type:{type:"string",enum:["scene"],default:"scene"},devices:{type:"object",properties:{switches:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},state:{$ref:"switch.json#/properties/state"}},default:[]}},dimmers:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},level:{$ref:"dimmer.json#/properties/level"}}},default:[]},windowCoverings:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},position:{$ref:"windowCovering.json#/properties/position"}}},default:[]},thermostats:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},hvacMode:{$ref:"thermostat.json#/properties/hvacMode"},setpoints:{$ref:"thermostat.json#/properties/setpoints"},fanMode:{$ref:"thermostat.json#/properties/fanMode"},setpointDelta:{type:"number"}}},default:[]},mediaSources:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},volume:{type:"number",minimum:0,maximum:100},commands:{type:"array",items:{type:"string"}}}}},locks:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},state:{$ref:"lock.json#/properties/state"},mode:{$ref:"lock.json#/properties/mode"}}}}},additionalProperties:!1},isDefault:{type:"boolean",default:!1},showOnUi:{type:"boolean",default:!0}},required:["id","name","type"],additionalProperties:!1},schema214={type:"string",enum:["on","off"]},schema216={type:["number","null"],minimum:0,maximum:100},schema218={type:["number","null"],minimum:0,maximum:100},schema227={type:["string","null"],enum:["locked","unlocked",null]},schema228={type:["string","null"],enum:["normal","autoLock","emergencyOpen","emergencyClose","holdOpen","lockdown",null],description:"emergencyOpen and emergencyClose are deprecated and can be removed once Salto, Paxton and Geovision drivers are updated",default:null};function validate91(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if("string"!=typeof data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if("cool"!==data&&"heat"!==data&&"auto"!==data&&"off"!==data){const err1={instancePath:instancePath,schemaPath:"#/properties/supportedHvacModes/items/enum",keyword:"enum",params:{allowedValues:schema190.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}return validate91.errors=vErrors,0===errors}function validate93(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){for(const key0 in data)if("cool"!==key0&&"heat"!==key0&&"auto"!==key0){const err0={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}void 0!==data.cool&&(validate75(data.cool,{instancePath:instancePath+"/cool",parentData:data,parentDataProperty:"cool",rootData:rootData})||(vErrors=null===vErrors?validate75.errors:vErrors.concat(validate75.errors),errors=vErrors.length)),void 0!==data.heat&&(validate75(data.heat,{instancePath:instancePath+"/heat",parentData:data,parentDataProperty:"heat",rootData:rootData})||(vErrors=null===vErrors?validate75.errors:vErrors.concat(validate75.errors),errors=vErrors.length)),void 0!==data.auto&&(validate75(data.auto,{instancePath:instancePath+"/auto",parentData:data,parentDataProperty:"auto",rootData:rootData})||(vErrors=null===vErrors?validate75.errors:vErrors.concat(validate75.errors),errors=vErrors.length))}else{const err1={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}return validate93.errors=vErrors,0===errors}function validate98(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if("string"!=typeof data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if("auto"!==data&&"low"!==data&&"medium"!==data&&"high"!==data&&"off"!==data&&"on"!==data){const err1={instancePath:instancePath,schemaPath:"#/properties/supportedFanModes/items/enum",keyword:"enum",params:{allowedValues:schema191.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}return validate98.errors=vErrors,0===errors}var validateShortLink=function validate100(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="shortLink"),void 0===data.destination){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"destination"},message:"must have required property 'destination'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.url){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err2={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err3={};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(_errs5===errors){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err5={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if("shortLink"!==data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema229.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.title&&"string"!=typeof data.title){const err7={instancePath:instancePath+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.destination){let data3=data.destination;if("string"==typeof data3&&!formats0(data3)){const err8={instancePath:instancePath+"/destination",schemaPath:"#/properties/destination/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}if(void 0!==data.url){let data4=data.url;if("string"==typeof data4&&!formats0(data4)){const err9={instancePath:instancePath+"/url",schemaPath:"#/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err10={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}else{const err11={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}return validate100.errors=vErrors,0===errors},schema229={$schema:"http://json-schema.org/draft-07/schema",$id:"shortLink.json",title:"Short Link",type:"object",required:["destination","url"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"shortLink",enum:["shortLink"]},title:{type:"string"},destination:{string:"string",format:"uri"},url:{string:"string",format:"uri"},systemId:{$ref:"definitions.json#/definitions/systemId"}}};var validateSmsMessage=function validate101(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="smsMessage"),void 0===data.to){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"to"},message:"must have required property 'to'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.from){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"from"},message:"must have required property 'from'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.status){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err4={};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(_errs5===errors){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if("smsMessage"!==data1){const err7={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema232.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.to){let data2=data.to;if("string"==typeof data2){if(!pattern8.test(data2)){const err8={instancePath:instancePath+"/to",schemaPath:"#/properties/to/pattern",keyword:"pattern",params:{pattern:"^\\+[0-9]{1,14}$"},message:'must match pattern "^\\+[0-9]{1,14}$"'};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}else{const err9={instancePath:instancePath+"/to",schemaPath:"#/properties/to/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.from){let data3=data.from;if("string"==typeof data3){if(!pattern8.test(data3)){const err10={instancePath:instancePath+"/from",schemaPath:"#/properties/from/pattern",keyword:"pattern",params:{pattern:"^\\+[0-9]{1,14}$"},message:'must match pattern "^\\+[0-9]{1,14}$"'};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}else{const err11={instancePath:instancePath+"/from",schemaPath:"#/properties/from/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}if(void 0!==data.media){let data4=data.media;if("string"==typeof data4){if(!formats0(data4)){const err12={instancePath:instancePath+"/media",schemaPath:"#/properties/media/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}else{const err13={instancePath:instancePath+"/media",schemaPath:"#/properties/media/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.status){let data5=data.status;if("string"!=typeof data5){const err14={instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if("queued"!==data5&&"accepted"!==data5&&"sending"!==data5&&"sent"!==data5&&"failed"!==data5&&"delivered"!==data5&&"undelivered"!==data5&&"receiving"!==data5&&"received"!==data5&&"read"!==data5){const err15={instancePath:instancePath+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:schema232.properties.status.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.body&&"string"!=typeof data.body){const err16={instancePath:instancePath+"/body",schemaPath:"#/properties/body/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data.driver&&"string"!=typeof data.driver){const err17={instancePath:instancePath+"/driver",schemaPath:"#/properties/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data.appData){let data8=data.appData;if(!data8||"object"!=typeof data8||Array.isArray(data8)){const err18={instancePath:instancePath+"/appData",schemaPath:"#/properties/appData/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}if(void 0!==data.createdAt){let data9=data.createdAt;if("string"!=typeof data9&&(!data9||"object"!=typeof data9||Array.isArray(data9))){const err19={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if("string"==typeof data9&&!formats4.validate(data9)){const err20={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}if(void 0!==data.updatedAt){let data10=data.updatedAt;if("string"!=typeof data10&&(!data10||"object"!=typeof data10||Array.isArray(data10))){const err21={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if("string"==typeof data10&&!formats4.validate(data10)){const err22={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err23={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}}else{const err24={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}return validate101.errors=vErrors,0===errors},schema232={$schema:"http://json-schema.org/draft-07/schema",$id:"smsMessage.json",title:"Sms Message",type:"object",required:["to","from","status"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"smsMessage",enum:["smsMessage"]},to:{type:"string",pattern:"^\\+[0-9]{1,14}$"},from:{type:"string",pattern:"^\\+[0-9]{1,14}$"},media:{type:"string",format:"uri"},status:{type:"string",enum:["queued","accepted","sending","sent","failed","delivered","undelivered","receiving","received","read"]},body:{type:"string"},driver:{type:"string"},appData:{type:"object"},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"},systemId:{$ref:"definitions.json#/definitions/systemId"}}},pattern8=new RegExp("^\\+[0-9]{1,14}$","u");var validateSpace=function validate102(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;const _errs1=errors;let valid0=!0;const _errs2=errors;if(data&&"object"==typeof data&&!Array.isArray(data)&&void 0!==data.type&&"hotelRoom"!==data.type){const err0={};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}var _valid0=_errs2===errors;errors=_errs1,null!==vErrors&&(_errs1?vErrors.length=_errs1:vErrors=null);let ifClause0;if(_valid0){const _errs4=errors;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.features&&(data.features=[]),void 0===data.maximumOccupancy&&(data.maximumOccupancy=2),void 0===data.housekeepingStatus&&(data.housekeepingStatus="dirty"),void 0===data.serviceStatus&&(data.serviceStatus="inService"),void 0===data.name){const err1={instancePath:instancePath,schemaPath:"#/then/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.type){const err2={instancePath:instancePath,schemaPath:"#/then/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.features){const err3={instancePath:instancePath,schemaPath:"#/then/required",keyword:"required",params:{missingProperty:"features"},message:"must have required property 'features'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.maximumOccupancy){const err4={instancePath:instancePath,schemaPath:"#/then/required",keyword:"required",params:{missingProperty:"maximumOccupancy"},message:"must have required property 'maximumOccupancy'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0===data.housekeepingStatus){const err5={instancePath:instancePath,schemaPath:"#/then/required",keyword:"required",params:{missingProperty:"housekeepingStatus"},message:"must have required property 'housekeepingStatus'"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0===data.serviceStatus){const err6={instancePath:instancePath,schemaPath:"#/then/required",keyword:"required",params:{missingProperty:"serviceStatus"},message:"must have required property 'serviceStatus'"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}}valid0=_valid0=_errs4===errors,ifClause0="then"}else{const _errs5=errors;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.name){const err7={instancePath:instancePath,schemaPath:"#/else/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0===data.type){const err8={instancePath:instancePath,schemaPath:"#/else/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}valid0=_valid0=_errs5===errors,ifClause0="else"}if(!valid0){const err9={instancePath:instancePath,schemaPath:"#/if",keyword:"if",params:{failingKeyword:ifClause0},message:'must match "'+ifClause0+'" schema'};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="space"),void 0===data.eco&&(data.eco={active:!1,allowed:!1,previousState:null}),void 0!==data.id){let data1=data.id;if("string"!=typeof data1){const err10={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}const _errs9=errors,_errs10=errors;if("global"!==data1&&"system"!==data1){const err11={};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(_errs10===errors){const err12={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}else errors=_errs9,null!==vErrors&&(_errs9?vErrors.length=_errs9:vErrors=null)}if(void 0!==data.name){let data2=data.name;if("string"==typeof data2){if(func3(data2)<1){const err13={instancePath:instancePath+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}else{const err14={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}let data3=data.type;if("string"!=typeof data3){const err15={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if("space"!==data3){const err16={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema237.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data.discriminator){let data4=data.discriminator;if("string"!=typeof data4){const err17={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if("classRoom"!==data4&&"hotelRoom"!==data4&&"office"!==data4&&"building"!==data4&&"commonArea"!==data4&&"conferenceRoom"!==data4&&"lobby"!==data4&&"gym"!==data4&&"pool"!==data4&&"restaurant"!==data4&&"unit"!==data4){const err18={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema237.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}if(void 0!==data.driver){let data5=data.driver;if("string"!=typeof data5){const err19={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if("adlink"!==data5&&"aws-kinesis"!==data5&&"butler"!==data5&&"crestron"!==data5&&"dell"!==data5&&"dmp"!==data5&&"doorbird"!==data5&&"dormakaba"!==data5&&"dsc"!==data5&&"ecobee"!==data5&&"epson"!==data5&&"geovision-rs"!==data5&&"geovision-as-manager"!==data5&&"honeywell-vista"!==data5&&"igor"!==data5&&"inncom"!==data5&&"isapi"!==data5&&"kohost-k7"!==data5&&"kohost"!==data5&&"lg"!==data5&&"lg-webos"!==data5&&"lapi"!==data5&&"lirc"!==data5&&"mews"!==data5&&"mht"!==data5&&"paxton"!==data5&&"pelican-wireless"!==data5&&"power-shades"!==data5&&"rachio"!==data5&&"rebrandly"!==data5&&"relay"!==data5&&"rtsp"!==data5&&"salto"!==data5&&"salto-irn"!==data5&&"samsung"!==data5&&"se"!==data5&&"sendgrid"!==data5&&"sonifi"!==data5&&"stay-n-touch"!==data5&&"storable"!==data5&&"twilio"!==data5&&"unifi"!==data5&&"valcom"!==data5&&"vizio"!==data5&&"wisenet"!==data5&&"cloudflare-images"!==data5&&"cloudflare-stream"!==data5&&"insperia-privacy"!==data5){const err20={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}if(void 0!==data.category&&"string"!=typeof data.category){const err21={instancePath:instancePath+"/category",schemaPath:"#/properties/category/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if(void 0!==data.rooms){let data7=data.rooms;if(Array.isArray(data7)){const len0=data7.length;for(let i0=0;i0<len0;i0++)if("string"!=typeof data7[i0]){const err22={instancePath:instancePath+"/rooms/"+i0,schemaPath:"#/properties/rooms/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}else{const err23={instancePath:instancePath+"/rooms",schemaPath:"#/properties/rooms/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}}if(void 0!==data.subGroups){let data9=data.subGroups;if(Array.isArray(data9)){const len1=data9.length;for(let i1=0;i1<len1;i1++)if("string"!=typeof data9[i1]){const err24={instancePath:instancePath+"/subGroups/"+i1,schemaPath:"#/properties/subGroups/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}else{const err25={instancePath:instancePath+"/subGroups",schemaPath:"#/properties/subGroups/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}if(void 0!==data.occupied&&"boolean"!=typeof data.occupied){const err26={instancePath:instancePath+"/occupied",schemaPath:"#/properties/occupied/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data.inUse&&"boolean"!=typeof data.inUse){const err27={instancePath:instancePath+"/inUse",schemaPath:"#/properties/inUse/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}let data13=data.eco;if(data13&&"object"==typeof data13&&!Array.isArray(data13)){void 0===data13.active&&(data13.active=!1),void 0===data13.allowed&&(data13.allowed=!1);for(const key0 in data13)if("active"!==key0&&"activatedAt"!==key0&&"allowed"!==key0&&"previousState"!==key0){const err28={instancePath:instancePath+"/eco",schemaPath:"#/properties/eco/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if("boolean"!=typeof data13.active){const err29={instancePath:instancePath+"/eco/active",schemaPath:"#/properties/eco/properties/active/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if(void 0!==data13.activatedAt){let data15=data13.activatedAt;if("string"!=typeof data15&&(!data15||"object"!=typeof data15||Array.isArray(data15))){const err30={instancePath:instancePath+"/eco/activatedAt",schemaPath:"#/properties/eco/properties/activatedAt/type",keyword:"type",params:{type:schema237.properties.eco.properties.activatedAt.type},message:"must be string,object"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if("string"==typeof data15&&!formats4.validate(data15)){const err31={instancePath:instancePath+"/eco/activatedAt",schemaPath:"#/properties/eco/properties/activatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}}if("boolean"!=typeof data13.allowed){const err32={instancePath:instancePath+"/eco/allowed",schemaPath:"#/properties/eco/properties/allowed/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}if(void 0!==data13.previousState){let data17=data13.previousState;if((!data17||"object"!=typeof data17||Array.isArray(data17))&&null!==data17){const err33={instancePath:instancePath+"/eco/previousState",schemaPath:"#/properties/eco/properties/previousState/type",keyword:"type",params:{type:schema237.properties.eco.properties.previousState.type},message:"must be object,null"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}if(data17&&"object"==typeof data17&&!Array.isArray(data17)){for(const key1 in data17)if("thermostats"!==key1){const err34={instancePath:instancePath+"/eco/previousState",schemaPath:"#/properties/eco/properties/previousState/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(void 0!==data17.thermostats){let data18=data17.thermostats;if(data18&&"object"==typeof data18&&!Array.isArray(data18)){for(const key2 in data18)if(pattern10.test(key2)){let data19=data18[key2];if(data19&&"object"==typeof data19&&!Array.isArray(data19))void 0!==data19.setpoints&&(validate103(data19.setpoints,{instancePath:instancePath+"/eco/previousState/thermostats/"+key2.replace(/~/g,"~0").replace(/\//g,"~1")+"/setpoints",parentData:data19,parentDataProperty:"setpoints",rootData:rootData})||(vErrors=null===vErrors?validate103.errors:vErrors.concat(validate103.errors),errors=vErrors.length));else{const err35={instancePath:instancePath+"/eco/previousState/thermostats/"+key2.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/eco/properties/previousState/properties/thermostats/patternProperties/.*/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}}}else{const err36={instancePath:instancePath+"/eco/previousState/thermostats",schemaPath:"#/properties/eco/properties/previousState/properties/thermostats/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}}}}}else{const err37={instancePath:instancePath+"/eco",schemaPath:"#/properties/eco/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}if(void 0!==data.features){let data21=data.features;if(Array.isArray(data21)){const len2=data21.length;for(let i2=0;i2<len2;i2++){let data22=data21[i2];if("string"!=typeof data22){const err38={instancePath:instancePath+"/features/"+i2,schemaPath:"#/properties/features/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}if("pet"!==data22){const err39={instancePath:instancePath+"/features/"+i2,schemaPath:"#/properties/features/items/enum",keyword:"enum",params:{allowedValues:schema237.properties.features.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}}else{const err40={instancePath:instancePath+"/features",schemaPath:"#/properties/features/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}}if(void 0!==data.maximumOccupancy){let data23=data.maximumOccupancy;if("number"==typeof data23){if(data23<1||isNaN(data23)){const err41={instancePath:instancePath+"/maximumOccupancy",schemaPath:"#/properties/maximumOccupancy/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}}else{const err42={instancePath:instancePath+"/maximumOccupancy",schemaPath:"#/properties/maximumOccupancy/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}}if(void 0!==data.housekeepingStatus){let data24=data.housekeepingStatus;if("string"!=typeof data24){const err43={instancePath:instancePath+"/housekeepingStatus",schemaPath:"#/properties/housekeepingStatus/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}if("clean"!==data24&&"dirty"!==data24&&"inspected"!==data24&&"pickup"!==data24){const err44={instancePath:instancePath+"/housekeepingStatus",schemaPath:"#/properties/housekeepingStatus/enum",keyword:"enum",params:{allowedValues:schema237.properties.housekeepingStatus.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}}if(void 0!==data.serviceStatus){let data25=data.serviceStatus;if("string"!=typeof data25){const err45={instancePath:instancePath+"/serviceStatus",schemaPath:"#/properties/serviceStatus/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}if("inService"!==data25&&"outOfOrder"!==data25&&"outOfService"!==data25){const err46={instancePath:instancePath+"/serviceStatus",schemaPath:"#/properties/serviceStatus/enum",keyword:"enum",params:{allowedValues:schema237.properties.serviceStatus.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err47={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}}else{const err48={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}return validate102.errors=vErrors,0===errors},schema237={$schema:"http://json-schema.org/draft-07/schema",$id:"space.json",title:"Space",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string",minLength:1},type:{type:"string",default:"space",enum:["space"]},discriminator:{type:"string",enum:["classRoom","hotelRoom","office","building","commonArea","conferenceRoom","lobby","gym","pool","restaurant","unit"]},driver:{$ref:"definitions.json#/definitions/driver"},category:{type:"string",description:"This is the category id"},rooms:{type:"array",items:{type:"string"}},subGroups:{type:"array",items:{type:"string"}},occupied:{type:"boolean"},inUse:{type:"boolean"},eco:{type:"object",additionalProperties:!1,default:{active:!1,allowed:!1,previousState:null},properties:{active:{type:"boolean",default:!1},activatedAt:{type:["string","object"],format:"date-time"},allowed:{type:"boolean",default:!1},previousState:{type:["object","null"],properties:{thermostats:{type:"object",patternProperties:{".*":{type:"object",properties:{setpoints:{$ref:"thermostat.json#/properties/setpoints"}}}}}},additionalProperties:!1}}},features:{type:"array",items:{type:"string",enum:["pet"]}},maximumOccupancy:{type:"number",minimum:1},housekeepingStatus:{type:"string",enum:["clean","dirty","inspected","pickup"]},serviceStatus:{type:"string",enum:["inService","outOfOrder","outOfService"]},systemId:{$ref:"definitions.json#/definitions/systemId"}},if:{properties:{type:{const:"hotelRoom"}}},then:{required:["name","type","features","maximumOccupancy","housekeepingStatus","serviceStatus"],properties:{features:{default:[]},maximumOccupancy:{default:2},housekeepingStatus:{default:"dirty"},serviceStatus:{default:"inService"}}},else:{required:["name","type"]}},pattern10=new RegExp(".*","u");function validate103(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){for(const key0 in data)if("cool"!==key0&&"heat"!==key0&&"auto"!==key0){const err0={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}void 0!==data.cool&&(validate75(data.cool,{instancePath:instancePath+"/cool",parentData:data,parentDataProperty:"cool",rootData:rootData})||(vErrors=null===vErrors?validate75.errors:vErrors.concat(validate75.errors),errors=vErrors.length)),void 0!==data.heat&&(validate75(data.heat,{instancePath:instancePath+"/heat",parentData:data,parentDataProperty:"heat",rootData:rootData})||(vErrors=null===vErrors?validate75.errors:vErrors.concat(validate75.errors),errors=vErrors.length)),void 0!==data.auto&&(validate75(data.auto,{instancePath:instancePath+"/auto",parentData:data,parentDataProperty:"auto",rootData:rootData})||(vErrors=null===vErrors?validate75.errors:vErrors.concat(validate75.errors),errors=vErrors.length))}else{const err1={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}return validate103.errors=vErrors,0===errors}var validateSwitch=validate68,validateSystemUser=function validate108(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="systemUser"),void 0===data.firstName){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"firstName"},message:"must have required property 'firstName'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.lastName){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"lastName"},message:"must have required property 'lastName'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err2={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err3={};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(_errs5===errors){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err5={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if("systemUser"!==data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema242.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.driver){let data2=data.driver;if("string"!=typeof data2){const err7={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if("adlink"!==data2&&"aws-kinesis"!==data2&&"butler"!==data2&&"crestron"!==data2&&"dell"!==data2&&"dmp"!==data2&&"doorbird"!==data2&&"dormakaba"!==data2&&"dsc"!==data2&&"ecobee"!==data2&&"epson"!==data2&&"geovision-rs"!==data2&&"geovision-as-manager"!==data2&&"honeywell-vista"!==data2&&"igor"!==data2&&"inncom"!==data2&&"isapi"!==data2&&"kohost-k7"!==data2&&"kohost"!==data2&&"lg"!==data2&&"lg-webos"!==data2&&"lapi"!==data2&&"lirc"!==data2&&"mews"!==data2&&"mht"!==data2&&"paxton"!==data2&&"pelican-wireless"!==data2&&"power-shades"!==data2&&"rachio"!==data2&&"rebrandly"!==data2&&"relay"!==data2&&"rtsp"!==data2&&"salto"!==data2&&"salto-irn"!==data2&&"samsung"!==data2&&"se"!==data2&&"sendgrid"!==data2&&"sonifi"!==data2&&"stay-n-touch"!==data2&&"storable"!==data2&&"twilio"!==data2&&"unifi"!==data2&&"valcom"!==data2&&"vizio"!==data2&&"wisenet"!==data2&&"cloudflare-images"!==data2&&"cloudflare-stream"!==data2&&"insperia-privacy"!==data2){const err8={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}if(void 0!==data.firstName&&"string"!=typeof data.firstName){const err9={instancePath:instancePath+"/firstName",schemaPath:"#/properties/firstName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0!==data.lastName&&"string"!=typeof data.lastName){const err10={instancePath:instancePath+"/lastName",schemaPath:"#/properties/lastName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data.phone){let data5=data.phone;if("string"!=typeof data5&&null!==data5){const err11={instancePath:instancePath+"/phone",schemaPath:"#/properties/phone/type",keyword:"type",params:{type:schema242.properties.phone.type},message:"must be string,null"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if("string"==typeof data5&&!pattern8.test(data5)){const err12={instancePath:instancePath+"/phone",schemaPath:"#/properties/phone/pattern",keyword:"pattern",params:{pattern:"^\\+[0-9]{1,14}$"},message:'must match pattern "^\\+[0-9]{1,14}$"'};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}if(void 0!==data.email){let data6=data.email;if("string"!=typeof data6&&null!==data6){const err13={instancePath:instancePath+"/email",schemaPath:"#/properties/email/type",keyword:"type",params:{type:schema242.properties.email.type},message:"must be string,null"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if("string"==typeof data6&&!formats88.test(data6)){const err14={instancePath:instancePath+"/email",schemaPath:"#/properties/email/format",keyword:"format",params:{format:"email"},message:'must match format "email"'};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}if(void 0!==data.address){let data7=data.address;if(data7&&"object"==typeof data7&&!Array.isArray(data7)){if(void 0!==data7.id&&"string"!=typeof data7.id){const err15={instancePath:instancePath+"/address/id",schemaPath:"definitions.json#/definitions/address/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0!==data7.line1&&"string"!=typeof data7.line1){const err16={instancePath:instancePath+"/address/line1",schemaPath:"definitions.json#/definitions/address/properties/line1/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data7.line2&&"string"!=typeof data7.line2){const err17={instancePath:instancePath+"/address/line2",schemaPath:"definitions.json#/definitions/address/properties/line2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data7.line3&&"string"!=typeof data7.line3){const err18={instancePath:instancePath+"/address/line3",schemaPath:"definitions.json#/definitions/address/properties/line3/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0!==data7.city&&"string"!=typeof data7.city){const err19={instancePath:instancePath+"/address/city",schemaPath:"definitions.json#/definitions/address/properties/city/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data7.state&&"string"!=typeof data7.state){const err20={instancePath:instancePath+"/address/state",schemaPath:"definitions.json#/definitions/address/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0!==data7.postalCode&&"string"!=typeof data7.postalCode){const err21={instancePath:instancePath+"/address/postalCode",schemaPath:"definitions.json#/definitions/address/properties/postalCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if(void 0!==data7.countryCode){let data15=data7.countryCode;if("string"==typeof data15){if(func3(data15)>2){const err22={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(func3(data15)<2){const err23={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}}else{const err24={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}}else{const err25={instancePath:instancePath+"/address",schemaPath:"definitions.json#/definitions/address/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}if(void 0!==data.photo&&"string"!=typeof data.photo){const err26={instancePath:instancePath+"/photo",schemaPath:"#/properties/photo/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data.jobTitle&&"string"!=typeof data.jobTitle){const err27={instancePath:instancePath+"/jobTitle",schemaPath:"#/properties/jobTitle/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if(void 0!==data.dob&&"string"!=typeof data.dob){const err28={instancePath:instancePath+"/dob",schemaPath:"#/properties/dob/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if(void 0!==data.gender){let data19=data.gender;if("string"!=typeof data19){const err29={instancePath:instancePath+"/gender",schemaPath:"#/properties/gender/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if("male"!==data19&&"female"!==data19){const err30={instancePath:instancePath+"/gender",schemaPath:"#/properties/gender/enum",keyword:"enum",params:{allowedValues:schema242.properties.gender.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}}if(void 0!==data.roles){let data20=data.roles;if(Array.isArray(data20)){const len0=data20.length;for(let i0=0;i0<len0;i0++){let data21=data20[i0];if("string"!=typeof data21){const err31={instancePath:instancePath+"/roles/"+i0,schemaPath:"#/properties/roles/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}if("Guest"!==data21&&"User"!==data21&&"Manager"!==data21&&"Maintenance"!==data21&&"Administrator"!==data21&&"SuperAdmin"!==data21){const err32={instancePath:instancePath+"/roles/"+i0,schemaPath:"#/properties/roles/items/enum",keyword:"enum",params:{allowedValues:schema242.properties.roles.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}}}else{const err33={instancePath:instancePath+"/roles",schemaPath:"#/properties/roles/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}}if(void 0!==data.nationality){let data22=data.nationality;if("string"==typeof data22){if(func3(data22)>2){const err34={instancePath:instancePath+"/nationality",schemaPath:"#/properties/nationality/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(func3(data22)<2){const err35={instancePath:instancePath+"/nationality",schemaPath:"#/properties/nationality/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}}else{const err36={instancePath:instancePath+"/nationality",schemaPath:"#/properties/nationality/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}}if(void 0!==data.notes){let data23=data.notes;if(Array.isArray(data23)){const len1=data23.length;for(let i1=0;i1<len1;i1++)if("string"!=typeof data23[i1]){const err37={instancePath:instancePath+"/notes/"+i1,schemaPath:"#/properties/notes/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}}else{const err38={instancePath:instancePath+"/notes",schemaPath:"#/properties/notes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}if(void 0!==data.files){let data25=data.files;if(Array.isArray(data25)){const len2=data25.length;for(let i2=0;i2<len2;i2++)validate15(data25[i2],{instancePath:instancePath+"/files/"+i2,parentData:data25,parentDataProperty:i2,rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length)}else{const err39={instancePath:instancePath+"/files",schemaPath:"#/properties/files/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}if(void 0!==data.identifications){let data27=data.identifications;if(Array.isArray(data27)){const len3=data27.length;for(let i3=0;i3<len3;i3++)validate37(data27[i3],{instancePath:instancePath+"/identifications/"+i3,parentData:data27,parentDataProperty:i3,rootData:rootData})||(vErrors=null===vErrors?validate37.errors:vErrors.concat(validate37.errors),errors=vErrors.length)}else{const err40={instancePath:instancePath+"/identifications",schemaPath:"#/properties/identifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}}if(void 0!==data.payments){let data29=data.payments;if(Array.isArray(data29)){const len4=data29.length;for(let i4=0;i4<len4;i4++)validate57(data29[i4],{instancePath:instancePath+"/payments/"+i4,parentData:data29,parentDataProperty:i4,rootData:rootData})||(vErrors=null===vErrors?validate57.errors:vErrors.concat(validate57.errors),errors=vErrors.length)}else{const err41={instancePath:instancePath+"/payments",schemaPath:"#/properties/payments/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}}if(void 0!==data.revenue&&(validate112(data.revenue,{instancePath:instancePath+"/revenue",parentData:data,parentDataProperty:"revenue",rootData:rootData})||(vErrors=null===vErrors?validate112.errors:vErrors.concat(validate112.errors),errors=vErrors.length)),void 0!==data.createdAt){let data32=data.createdAt;if("string"!=typeof data32&&(!data32||"object"!=typeof data32||Array.isArray(data32))){const err42={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:schema102.type},message:"must be string,object"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}if("string"==typeof data32&&!formats4.validate(data32)){const err43={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}}if(void 0!==data.updatedAt){let data33=data.updatedAt;if("string"!=typeof data33&&(!data33||"object"!=typeof data33||Array.isArray(data33))){const err44={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/type",keyword:"type",params:{type:schema151.type},message:"must be string,object"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}if("string"==typeof data33&&!formats4.validate(data33)){const err45={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err46={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}}else{const err47={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}return validate108.errors=vErrors,0===errors},schema242={$schema:"http://json-schema.org/draft-07/schema",$id:"systemUser.json",title:"System User",description:"A system user is a user that originated from an external 3rd party system.",type:"object",required:["firstName","lastName"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"systemUser",enum:["systemUser"]},driver:{$ref:"definitions.json#/definitions/driver"},firstName:{type:"string"},lastName:{type:"string"},phone:{type:["string","null"],pattern:"^\\+[0-9]{1,14}$"},email:{type:["string","null"],format:"email"},address:{$ref:"definitions.json#/definitions/address"},photo:{type:"string"},jobTitle:{type:"string"},dob:{type:"string"},gender:{type:"string",enum:["male","female"]},roles:{type:"array",items:{type:"string",enum:["Guest","User","Manager","Maintenance","Administrator","SuperAdmin"]}},nationality:{type:"string",minLength:2,maxLength:2},notes:{type:"array",items:{type:"string"}},files:{type:"array",items:{$ref:"mediaFile.json#"}},identifications:{type:"array",items:{$ref:"identification.json#"}},payments:{type:"array",items:{$ref:"payment.json#"}},revenue:{$ref:"definitions.json#/definitions/revenue"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"},systemId:{$ref:"definitions.json#/definitions/systemId"}}},formats88=/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i;function validate112(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(Array.isArray(data)){const len0=data.length;for(let i0=0;i0<len0;i0++){let data0=data[i0];if(data0&&"object"==typeof data0&&!Array.isArray(data0)){if(void 0!==data0.id){let data1=data0.id;if("string"!=typeof data1){const err0={instancePath:instancePath+"/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}const _errs6=errors,_errs7=errors;if("global"!==data1&&"system"!==data1){const err1={};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(_errs7===errors){const err2={instancePath:instancePath+"/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}else errors=_errs6,null!==vErrors&&(_errs6?vErrors.length=_errs6:vErrors=null)}if(void 0!==data0.name&&"string"!=typeof data0.name){const err3={instancePath:instancePath+"/"+i0+"/name",schemaPath:"#/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data0.date){let data3=data0.date;if("string"==typeof data3){if(!formats4.validate(data3)){const err4={instancePath:instancePath+"/"+i0+"/date",schemaPath:"#/items/properties/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}else{const err5={instancePath:instancePath+"/"+i0+"/date",schemaPath:"#/items/properties/date/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}if(void 0!==data0.price&&"number"!=typeof data0.price){const err6={instancePath:instancePath+"/"+i0+"/price",schemaPath:"#/items/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data0.tax){let data5=data0.tax;if("number"!=typeof data5&&null!==data5){const err7={instancePath:instancePath+"/"+i0+"/tax",schemaPath:"#/items/properties/tax/type",keyword:"type",params:{type:schema167.items.properties.tax.type},message:"must be number,null"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}}}else{const err8={instancePath:instancePath+"/"+i0,schemaPath:"#/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}}else{const err9={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}return validate112.errors=vErrors,0===errors}var validateThermostat=validate72,validateTicket=function validate39(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="ticket"),void 0===data.conversation&&(data.conversation=[]),void 0===data.status&&(data.status="open"),void 0===data.priority&&(data.priority="normal"),void 0===data.tags&&(data.tags=[]),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.conversation){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"conversation"},message:"must have required property 'conversation'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.requester){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"requester"},message:"must have required property 'requester'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.status){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.tags){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"tags"},message:"must have required property 'tags'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0===data.createdAt){const err5={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"createdAt"},message:"must have required property 'createdAt'"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0===data.updatedAt){const err6={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"updatedAt"},message:"must have required property 'updatedAt'"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}for(const key0 in data)if(!func5.call(schema100.properties,key0)){const err7={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err8={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err9={};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(_errs6===errors){const err10={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err11={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if("ticket"!==data1){const err12={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema100.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.number&&"string"!=typeof data.number){const err13={instancePath:instancePath+"/number",schemaPath:"#/properties/number/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data.issueId&&"string"!=typeof data.issueId){const err14={instancePath:instancePath+"/issueId",schemaPath:"#/properties/issueId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}let data4=data.conversation;if(Array.isArray(data4)){const len0=data4.length;for(let i0=0;i0<len0;i0++){let data5=data4[i0];const _errs17=errors;let valid5=!1;const _errs18=errors;if(data5&&"object"==typeof data5&&!Array.isArray(data5)){if(void 0===data5.id){const err15={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/anyOf/0/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0===data5.userId){const err16={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/anyOf/0/required",keyword:"required",params:{missingProperty:"userId"},message:"must have required property 'userId'"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0===data5.timestamp){const err17={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/anyOf/0/required",keyword:"required",params:{missingProperty:"timestamp"},message:"must have required property 'timestamp'"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0===data5.body){const err18={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/anyOf/0/required",keyword:"required",params:{missingProperty:"body"},message:"must have required property 'body'"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}var _valid0=_errs18===errors;if(valid5=valid5||_valid0,!valid5){const _errs19=errors;if(data5&&"object"==typeof data5&&!Array.isArray(data5)){if(void 0===data5.id){const err19={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/anyOf/1/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0===data5.systemId){const err20={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/anyOf/1/required",keyword:"required",params:{missingProperty:"systemId"},message:"must have required property 'systemId'"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0===data5.timestamp){const err21={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/anyOf/1/required",keyword:"required",params:{missingProperty:"timestamp"},message:"must have required property 'timestamp'"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if(void 0===data5.body){const err22={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/anyOf/1/required",keyword:"required",params:{missingProperty:"body"},message:"must have required property 'body'"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}_valid0=_errs19===errors;if(valid5=valid5||_valid0,!valid5){const _errs20=errors;if(data5&&"object"==typeof data5&&!Array.isArray(data5)){if(void 0===data5.id){const err23={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/anyOf/2/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0===data5.vendorId){const err24={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/anyOf/2/required",keyword:"required",params:{missingProperty:"vendorId"},message:"must have required property 'vendorId'"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0===data5.timestamp){const err25={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/anyOf/2/required",keyword:"required",params:{missingProperty:"timestamp"},message:"must have required property 'timestamp'"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0===data5.body){const err26={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/anyOf/2/required",keyword:"required",params:{missingProperty:"body"},message:"must have required property 'body'"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}_valid0=_errs20===errors;valid5=valid5||_valid0}}if(valid5)errors=_errs17,null!==vErrors&&(_errs17?vErrors.length=_errs17:vErrors=null);else{const err27={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if(data5&&"object"==typeof data5&&!Array.isArray(data5)){void 0===data5.readBy&&(data5.readBy=[]);for(const key1 in data5)if(!func5.call(schema100.properties.conversation.items.properties,key1)){const err28={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if(void 0!==data5.id&&"string"!=typeof data5.id){const err29={instancePath:instancePath+"/conversation/"+i0+"/id",schemaPath:"#/properties/conversation/items/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if(void 0!==data5.userId&&"string"!=typeof data5.userId){const err30={instancePath:instancePath+"/conversation/"+i0+"/userId",schemaPath:"#/properties/conversation/items/properties/userId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if(void 0!==data5.userName&&"string"!=typeof data5.userName){const err31={instancePath:instancePath+"/conversation/"+i0+"/userName",schemaPath:"#/properties/conversation/items/properties/userName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}if(void 0!==data5.vendorId&&"string"!=typeof data5.vendorId){const err32={instancePath:instancePath+"/conversation/"+i0+"/vendorId",schemaPath:"#/properties/conversation/items/properties/vendorId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}if(void 0!==data5.vendorName&&"string"!=typeof data5.vendorName){const err33={instancePath:instancePath+"/conversation/"+i0+"/vendorName",schemaPath:"#/properties/conversation/items/properties/vendorName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}if(void 0!==data5.systemId&&"string"!=typeof data5.systemId){const err34={instancePath:instancePath+"/conversation/"+i0+"/systemId",schemaPath:"#/properties/conversation/items/properties/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(void 0!==data5.systemName&&"string"!=typeof data5.systemName){const err35={instancePath:instancePath+"/conversation/"+i0+"/systemName",schemaPath:"#/properties/conversation/items/properties/systemName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}if(void 0!==data5.timestamp){let data13=data5.timestamp;if("string"!=typeof data13&&(!data13||"object"!=typeof data13||Array.isArray(data13))){const err36={instancePath:instancePath+"/conversation/"+i0+"/timestamp",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:schema102.type},message:"must be string,object"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}if("string"==typeof data13&&!formats4.validate(data13)){const err37={instancePath:instancePath+"/conversation/"+i0+"/timestamp",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}}if(void 0!==data5.body&&"string"!=typeof data5.body){const err38={instancePath:instancePath+"/conversation/"+i0+"/body",schemaPath:"#/properties/conversation/items/properties/body/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}let data15=data5.readBy;if(Array.isArray(data15)){const len1=data15.length;for(let i1=0;i1<len1;i1++)if("string"!=typeof data15[i1]){const err39={instancePath:instancePath+"/conversation/"+i0+"/readBy/"+i1,schemaPath:"#/properties/conversation/items/properties/readBy/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}else{const err40={instancePath:instancePath+"/conversation/"+i0+"/readBy",schemaPath:"#/properties/conversation/items/properties/readBy/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}if(void 0!==data5.media){let data17=data5.media;const _errs46=errors;let valid10=!1;const _errs47=errors;validate15(data17,{instancePath:instancePath+"/conversation/"+i0+"/media",parentData:data5,parentDataProperty:"media",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length);var _valid1=_errs47===errors;if(valid10=valid10||_valid1,!valid10){const _errs48=errors;if(null!==data17){const err41={instancePath:instancePath+"/conversation/"+i0+"/media",schemaPath:"#/properties/conversation/items/properties/media/anyOf/1/type",keyword:"type",params:{type:"null"},message:"must be null"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}_valid1=_errs48===errors;valid10=valid10||_valid1}if(valid10)errors=_errs46,null!==vErrors&&(_errs46?vErrors.length=_errs46:vErrors=null);else{const err42={instancePath:instancePath+"/conversation/"+i0+"/media",schemaPath:"#/properties/conversation/items/properties/media/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}}}else{const err43={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}}}else{const err44={instancePath:instancePath+"/conversation",schemaPath:"#/properties/conversation/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}if(void 0!==data.openedBy){let data18=data.openedBy;if(data18&&"object"==typeof data18&&!Array.isArray(data18)){if(void 0!==data18.userId&&"string"!=typeof data18.userId){const err45={instancePath:instancePath+"/openedBy/userId",schemaPath:"#/properties/openedBy/properties/userId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}if(void 0!==data18.systemId&&"string"!=typeof data18.systemId){const err46={instancePath:instancePath+"/openedBy/systemId",schemaPath:"#/properties/openedBy/properties/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}}else{const err47={instancePath:instancePath+"/openedBy",schemaPath:"#/properties/openedBy/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}}if(void 0!==data.requester){let data21=data.requester;if(data21&&"object"==typeof data21&&!Array.isArray(data21)){if(void 0!==data21.systemId&&"string"!=typeof data21.systemId){const err48={instancePath:instancePath+"/requester/systemId",schemaPath:"#/properties/requester/properties/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}if(void 0!==data21.systemName&&"string"!=typeof data21.systemName){const err49={instancePath:instancePath+"/requester/systemName",schemaPath:"#/properties/requester/properties/systemName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err49]:vErrors.push(err49),errors++}if(void 0!==data21.systemPhoto){let data24=data21.systemPhoto;const _errs63=errors;let valid13=!1;const _errs64=errors;validate15(data24,{instancePath:instancePath+"/requester/systemPhoto",parentData:data21,parentDataProperty:"systemPhoto",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length);var _valid2=_errs64===errors;if(valid13=valid13||_valid2,!valid13){const _errs65=errors;if(null!==data24){const err50={instancePath:instancePath+"/requester/systemPhoto",schemaPath:"#/properties/requester/properties/systemPhoto/anyOf/1/type",keyword:"type",params:{type:"null"},message:"must be null"};null===vErrors?vErrors=[err50]:vErrors.push(err50),errors++}_valid2=_errs65===errors;if(valid13=valid13||_valid2,!valid13){const _errs67=errors;if("string"!=typeof data24){const err51={instancePath:instancePath+"/requester/systemPhoto",schemaPath:"#/properties/requester/properties/systemPhoto/anyOf/2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err51]:vErrors.push(err51),errors++}_valid2=_errs67===errors;valid13=valid13||_valid2}}if(valid13)errors=_errs63,null!==vErrors&&(_errs63?vErrors.length=_errs63:vErrors=null);else{const err52={instancePath:instancePath+"/requester/systemPhoto",schemaPath:"#/properties/requester/properties/systemPhoto/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===vErrors?vErrors=[err52]:vErrors.push(err52),errors++}}if(void 0!==data21.userId&&"string"!=typeof data21.userId){const err53={instancePath:instancePath+"/requester/userId",schemaPath:"#/properties/requester/properties/userId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err53]:vErrors.push(err53),errors++}if(void 0!==data21.userName&&"string"!=typeof data21.userName){const err54={instancePath:instancePath+"/requester/userName",schemaPath:"#/properties/requester/properties/userName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err54]:vErrors.push(err54),errors++}if(void 0!==data21.userPhoto){let data27=data21.userPhoto;const _errs74=errors;let valid14=!1;const _errs75=errors;validate15(data27,{instancePath:instancePath+"/requester/userPhoto",parentData:data21,parentDataProperty:"userPhoto",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length);var _valid3=_errs75===errors;if(valid14=valid14||_valid3,!valid14){const _errs76=errors;if(null!==data27){const err55={instancePath:instancePath+"/requester/userPhoto",schemaPath:"#/properties/requester/properties/userPhoto/anyOf/1/type",keyword:"type",params:{type:"null"},message:"must be null"};null===vErrors?vErrors=[err55]:vErrors.push(err55),errors++}_valid3=_errs76===errors;if(valid14=valid14||_valid3,!valid14){const _errs78=errors;if("string"!=typeof data27){const err56={instancePath:instancePath+"/requester/userPhoto",schemaPath:"#/properties/requester/properties/userPhoto/anyOf/2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err56]:vErrors.push(err56),errors++}_valid3=_errs78===errors;valid14=valid14||_valid3}}if(valid14)errors=_errs74,null!==vErrors&&(_errs74?vErrors.length=_errs74:vErrors=null);else{const err57={instancePath:instancePath+"/requester/userPhoto",schemaPath:"#/properties/requester/properties/userPhoto/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===vErrors?vErrors=[err57]:vErrors.push(err57),errors++}}if(void 0!==data21.deviceId&&"string"!=typeof data21.deviceId){const err58={instancePath:instancePath+"/requester/deviceId",schemaPath:"#/properties/requester/properties/deviceId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err58]:vErrors.push(err58),errors++}if(void 0!==data21.roomId&&"string"!=typeof data21.roomId){const err59={instancePath:instancePath+"/requester/roomId",schemaPath:"#/properties/requester/properties/roomId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err59]:vErrors.push(err59),errors++}if(void 0!==data21.reservationId&&"string"!=typeof data21.reservationId){const err60={instancePath:instancePath+"/requester/reservationId",schemaPath:"#/properties/requester/properties/reservationId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err60]:vErrors.push(err60),errors++}if(void 0!==data21.spaceId&&"string"!=typeof data21.spaceId){const err61={instancePath:instancePath+"/requester/spaceId",schemaPath:"#/properties/requester/properties/spaceId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err61]:vErrors.push(err61),errors++}if(void 0!==data21.spaceName&&"string"!=typeof data21.spaceName){const err62={instancePath:instancePath+"/requester/spaceName",schemaPath:"#/properties/requester/properties/spaceName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err62]:vErrors.push(err62),errors++}}else{const err63={instancePath:instancePath+"/requester",schemaPath:"#/properties/requester/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err63]:vErrors.push(err63),errors++}}if(void 0!==data.assignedTo){let data33=data.assignedTo;if(data33&&"object"==typeof data33&&!Array.isArray(data33)){if(void 0!==data33.userId&&"string"!=typeof data33.userId){const err64={instancePath:instancePath+"/assignedTo/userId",schemaPath:"#/properties/assignedTo/properties/userId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err64]:vErrors.push(err64),errors++}if(void 0!==data33.userName&&"string"!=typeof data33.userName){const err65={instancePath:instancePath+"/assignedTo/userName",schemaPath:"#/properties/assignedTo/properties/userName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err65]:vErrors.push(err65),errors++}if(void 0!==data33.userPhoto){let data36=data33.userPhoto;const _errs97=errors;let valid16=!1;const _errs98=errors;validate15(data36,{instancePath:instancePath+"/assignedTo/userPhoto",parentData:data33,parentDataProperty:"userPhoto",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length);var _valid4=_errs98===errors;if(valid16=valid16||_valid4,!valid16){const _errs99=errors;if(null!==data36){const err66={instancePath:instancePath+"/assignedTo/userPhoto",schemaPath:"#/properties/assignedTo/properties/userPhoto/anyOf/1/type",keyword:"type",params:{type:"null"},message:"must be null"};null===vErrors?vErrors=[err66]:vErrors.push(err66),errors++}_valid4=_errs99===errors;if(valid16=valid16||_valid4,!valid16){const _errs101=errors;if("string"!=typeof data36){const err67={instancePath:instancePath+"/assignedTo/userPhoto",schemaPath:"#/properties/assignedTo/properties/userPhoto/anyOf/2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err67]:vErrors.push(err67),errors++}_valid4=_errs101===errors;valid16=valid16||_valid4}}if(valid16)errors=_errs97,null!==vErrors&&(_errs97?vErrors.length=_errs97:vErrors=null);else{const err68={instancePath:instancePath+"/assignedTo/userPhoto",schemaPath:"#/properties/assignedTo/properties/userPhoto/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===vErrors?vErrors=[err68]:vErrors.push(err68),errors++}}if(void 0!==data33.vendorId&&"string"!=typeof data33.vendorId){const err69={instancePath:instancePath+"/assignedTo/vendorId",schemaPath:"#/properties/assignedTo/properties/vendorId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err69]:vErrors.push(err69),errors++}if(void 0!==data33.vendorName&&"string"!=typeof data33.vendorName){const err70={instancePath:instancePath+"/assignedTo/vendorName",schemaPath:"#/properties/assignedTo/properties/vendorName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err70]:vErrors.push(err70),errors++}if(void 0!==data33.vendorPhoto){let data39=data33.vendorPhoto;const _errs108=errors;let valid17=!1;const _errs109=errors;validate15(data39,{instancePath:instancePath+"/assignedTo/vendorPhoto",parentData:data33,parentDataProperty:"vendorPhoto",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length);var _valid5=_errs109===errors;if(valid17=valid17||_valid5,!valid17){const _errs110=errors;if(null!==data39){const err71={instancePath:instancePath+"/assignedTo/vendorPhoto",schemaPath:"#/properties/assignedTo/properties/vendorPhoto/anyOf/1/type",keyword:"type",params:{type:"null"},message:"must be null"};null===vErrors?vErrors=[err71]:vErrors.push(err71),errors++}_valid5=_errs110===errors;if(valid17=valid17||_valid5,!valid17){const _errs112=errors;if("string"!=typeof data39){const err72={instancePath:instancePath+"/assignedTo/vendorPhoto",schemaPath:"#/properties/assignedTo/properties/vendorPhoto/anyOf/2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err72]:vErrors.push(err72),errors++}_valid5=_errs112===errors;valid17=valid17||_valid5}}if(valid17)errors=_errs108,null!==vErrors&&(_errs108?vErrors.length=_errs108:vErrors=null);else{const err73={instancePath:instancePath+"/assignedTo/vendorPhoto",schemaPath:"#/properties/assignedTo/properties/vendorPhoto/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===vErrors?vErrors=[err73]:vErrors.push(err73),errors++}}}else{const err74={instancePath:instancePath+"/assignedTo",schemaPath:"#/properties/assignedTo/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err74]:vErrors.push(err74),errors++}}let data40=data.status;if("string"!=typeof data40){const err75={instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err75]:vErrors.push(err75),errors++}if("open"!==data40&&"pending"!==data40&&"solved"!==data40&&"closed"!==data40){const err76={instancePath:instancePath+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:schema100.properties.status.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err76]:vErrors.push(err76),errors++}let data41=data.priority;if("string"!=typeof data41){const err77={instancePath:instancePath+"/priority",schemaPath:"#/properties/priority/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err77]:vErrors.push(err77),errors++}if("low"!==data41&&"normal"!==data41&&"high"!==data41){const err78={instancePath:instancePath+"/priority",schemaPath:"#/properties/priority/enum",keyword:"enum",params:{allowedValues:schema100.properties.priority.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err78]:vErrors.push(err78),errors++}let data42=data.tags;if(Array.isArray(data42)){const len2=data42.length;for(let i2=0;i2<len2;i2++)if("string"!=typeof data42[i2]){const err79={instancePath:instancePath+"/tags/"+i2,schemaPath:"#/properties/tags/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err79]:vErrors.push(err79),errors++}}else{const err80={instancePath:instancePath+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err80]:vErrors.push(err80),errors++}if(void 0!==data.department&&"string"!=typeof data.department){const err81={instancePath:instancePath+"/department",schemaPath:"#/properties/department/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err81]:vErrors.push(err81),errors++}if(void 0!==data.rating){let data45=data.rating;if("number"==typeof data45){if(data45>5||isNaN(data45)){const err82={instancePath:instancePath+"/rating",schemaPath:"#/properties/rating/maximum",keyword:"maximum",params:{comparison:"<=",limit:5},message:"must be <= 5"};null===vErrors?vErrors=[err82]:vErrors.push(err82),errors++}if(data45<0||isNaN(data45)){const err83={instancePath:instancePath+"/rating",schemaPath:"#/properties/rating/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err83]:vErrors.push(err83),errors++}}else{const err84={instancePath:instancePath+"/rating",schemaPath:"#/properties/rating/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err84]:vErrors.push(err84),errors++}}if(void 0!==data.ratingComment&&"string"!=typeof data.ratingComment){const err85={instancePath:instancePath+"/ratingComment",schemaPath:"#/properties/ratingComment/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err85]:vErrors.push(err85),errors++}if(void 0!==data.tipAmount&&"string"!=typeof data.tipAmount){const err86={instancePath:instancePath+"/tipAmount",schemaPath:"#/properties/tipAmount/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err86]:vErrors.push(err86),errors++}if(void 0!==data.autoCloseAt){let data48=data.autoCloseAt;if("string"!=typeof data48&&(!data48||"object"!=typeof data48||Array.isArray(data48))){const err87={instancePath:instancePath+"/autoCloseAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err87]:vErrors.push(err87),errors++}if("string"==typeof data48&&!formats4.validate(data48)){const err88={instancePath:instancePath+"/autoCloseAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err88]:vErrors.push(err88),errors++}}if(void 0!==data.scheduleDate){let data49=data.scheduleDate;if("string"!=typeof data49&&(!data49||"object"!=typeof data49||Array.isArray(data49))){const err89={instancePath:instancePath+"/scheduleDate",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err89]:vErrors.push(err89),errors++}if("string"==typeof data49&&!formats4.validate(data49)){const err90={instancePath:instancePath+"/scheduleDate",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err90]:vErrors.push(err90),errors++}}if(void 0!==data.createdAt){let data50=data.createdAt;if("string"!=typeof data50&&(!data50||"object"!=typeof data50||Array.isArray(data50))){const err91={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err91]:vErrors.push(err91),errors++}if("string"==typeof data50&&!formats4.validate(data50)){const err92={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err92]:vErrors.push(err92),errors++}}if(void 0!==data.updatedAt){let data51=data.updatedAt;if("string"!=typeof data51&&(!data51||"object"!=typeof data51||Array.isArray(data51))){const err93={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err93]:vErrors.push(err93),errors++}if("string"==typeof data51&&!formats4.validate(data51)){const err94={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err94]:vErrors.push(err94),errors++}}if(void 0!==data.solvedAt){let data52=data.solvedAt;if("string"!=typeof data52&&(!data52||"object"!=typeof data52||Array.isArray(data52))){const err95={instancePath:instancePath+"/solvedAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err95]:vErrors.push(err95),errors++}if("string"==typeof data52&&!formats4.validate(data52)){const err96={instancePath:instancePath+"/solvedAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err96]:vErrors.push(err96),errors++}}if(void 0!==data.closedAt){let data53=data.closedAt;if("string"!=typeof data53&&(!data53||"object"!=typeof data53||Array.isArray(data53))){const err97={instancePath:instancePath+"/closedAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err97]:vErrors.push(err97),errors++}if("string"==typeof data53&&!formats4.validate(data53)){const err98={instancePath:instancePath+"/closedAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err98]:vErrors.push(err98),errors++}}}else{const err99={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err99]:vErrors.push(err99),errors++}return validate39.errors=vErrors,0===errors},schema100={$schema:"http://json-schema.org/draft-07/schema",$id:"ticket.json",title:"Ticket",description:"A ticket is a request from a user.",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["ticket"],default:"ticket"},number:{type:"string"},issueId:{type:"string"},conversation:{type:"array",default:[],items:{type:"object",additionalProperties:!1,properties:{id:{type:"string"},userId:{type:"string"},userName:{type:"string"},vendorId:{type:"string"},vendorName:{type:"string"},systemId:{type:"string"},systemName:{type:"string"},timestamp:{$ref:"definitions.json#/definitions/createdAt"},body:{type:"string"},readBy:{type:"array",default:[],items:{type:"string"}},media:{anyOf:[{$ref:"mediaFile.json"},{type:"null"}]}},anyOf:[{required:["id","userId","timestamp","body"]},{required:["id","systemId","timestamp","body"]},{required:["id","vendorId","timestamp","body"]}]}},openedBy:{type:"object",properties:{userId:{type:"string"},systemId:{type:"string"}}},requester:{type:"object",properties:{systemId:{type:"string"},systemName:{type:"string"},systemPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]},userId:{type:"string"},userName:{type:"string"},userPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]},deviceId:{type:"string"},roomId:{type:"string"},reservationId:{type:"string"},spaceId:{type:"string"},spaceName:{type:"string"}}},assignedTo:{type:"object",properties:{userId:{type:"string"},userName:{type:"string"},userPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]},vendorId:{type:"string"},vendorName:{type:"string"},vendorPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]}}},status:{type:"string",enum:["open","pending","solved","closed"],default:"open"},priority:{type:"string",enum:["low","normal","high"],default:"normal"},tags:{type:"array",default:[],items:{type:"string"}},department:{type:"string"},rating:{type:"number",minimum:0,maximum:5},ratingComment:{type:"string"},tipAmount:{type:"string"},autoCloseAt:{$ref:"definitions.json#/definitions/date"},scheduleDate:{$ref:"definitions.json#/definitions/date"},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"},solvedAt:{$ref:"definitions.json#/definitions/date"},closedAt:{$ref:"definitions.json#/definitions/date"}},required:["id","conversation","requester","status","tags","createdAt","updatedAt"],additionalProperties:!1};var validateTimeSheet=function validate114(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="timeSheet"),void 0===data.locked&&(data.locked=!1),void 0===data.timeEntries&&(data.timeEntries=[]),void 0===data.userId){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"userId"},message:"must have required property 'userId'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.day){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"day"},message:"must have required property 'day'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err2={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err3={};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(_errs5===errors){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err5={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if("timeSheet"!==data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema251.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.userId){let data2=data.userId;if("string"!=typeof data2){const err7={instancePath:instancePath+"/userId",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}const _errs11=errors,_errs12=errors;if("global"!==data2&&"system"!==data2){const err8={};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(_errs12===errors){const err9={instancePath:instancePath+"/userId",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}else errors=_errs11,null!==vErrors&&(_errs11?vErrors.length=_errs11:vErrors=null)}if(void 0!==data.day){let data3=data.day;if("string"!=typeof data3&&(!data3||"object"!=typeof data3||Array.isArray(data3))){const err10={instancePath:instancePath+"/day",schemaPath:"#/properties/day/type",keyword:"type",params:{type:schema251.properties.day.type},message:"must be string,object"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("string"==typeof data3&&!formats4.validate(data3)){const err11={instancePath:instancePath+"/day",schemaPath:"#/properties/day/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}if("boolean"!=typeof data.locked){const err12={instancePath:instancePath+"/locked",schemaPath:"#/properties/locked/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}let data5=data.timeEntries;if(Array.isArray(data5)){const len0=data5.length;for(let i0=0;i0<len0;i0++){let data6=data5[i0];if(data6&&"object"==typeof data6&&!Array.isArray(data6)){if(void 0===data6.start){const err13={instancePath:instancePath+"/timeEntries/"+i0,schemaPath:"#/properties/timeEntries/items/required",keyword:"required",params:{missingProperty:"start"},message:"must have required property 'start'"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0===data6.discriminator){const err14={instancePath:instancePath+"/timeEntries/"+i0,schemaPath:"#/properties/timeEntries/items/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}for(const key0 in data6)if("id"!==key0&&"discriminator"!==key0&&"start"!==key0&&"end"!==key0&&"comment"!==key0&&"ticketId"!==key0){const err15={instancePath:instancePath+"/timeEntries/"+i0,schemaPath:"#/properties/timeEntries/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0!==data6.id){let data7=data6.id;if("string"!=typeof data7){const err16={instancePath:instancePath+"/timeEntries/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}const _errs25=errors,_errs26=errors;if("global"!==data7&&"system"!==data7){const err17={};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(_errs26===errors){const err18={instancePath:instancePath+"/timeEntries/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}else errors=_errs25,null!==vErrors&&(_errs25?vErrors.length=_errs25:vErrors=null)}if(void 0!==data6.discriminator){let data8=data6.discriminator;if("string"!=typeof data8){const err19={instancePath:instancePath+"/timeEntries/"+i0+"/discriminator",schemaPath:"#/properties/timeEntries/items/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if("working"!==data8&&"driving"!==data8&&"meeting"!==data8&&"break"!==data8){const err20={instancePath:instancePath+"/timeEntries/"+i0+"/discriminator",schemaPath:"#/properties/timeEntries/items/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema251.properties.timeEntries.items.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}if(void 0!==data6.start){let data9=data6.start;if("string"!=typeof data9&&(!data9||"object"!=typeof data9||Array.isArray(data9))){const err21={instancePath:instancePath+"/timeEntries/"+i0+"/start",schemaPath:"#/properties/timeEntries/items/properties/start/type",keyword:"type",params:{type:schema251.properties.timeEntries.items.properties.start.type},message:"must be string,object"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if("string"==typeof data9&&!formats4.validate(data9)){const err22={instancePath:instancePath+"/timeEntries/"+i0+"/start",schemaPath:"#/properties/timeEntries/items/properties/start/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data6.end){let data10=data6.end;if("string"!=typeof data10&&(!data10||"object"!=typeof data10||Array.isArray(data10))){const err23={instancePath:instancePath+"/timeEntries/"+i0+"/end",schemaPath:"#/properties/timeEntries/items/properties/end/type",keyword:"type",params:{type:schema251.properties.timeEntries.items.properties.end.type},message:"must be string,object"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if("string"==typeof data10&&!formats4.validate(data10)){const err24={instancePath:instancePath+"/timeEntries/"+i0+"/end",schemaPath:"#/properties/timeEntries/items/properties/end/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}if(void 0!==data6.comment&&"string"!=typeof data6.comment){const err25={instancePath:instancePath+"/timeEntries/"+i0+"/comment",schemaPath:"#/properties/timeEntries/items/properties/comment/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data6.ticketId&&"string"!=typeof data6.ticketId){const err26={instancePath:instancePath+"/timeEntries/"+i0+"/ticketId",schemaPath:"#/properties/timeEntries/items/properties/ticketId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}else{const err27={instancePath:instancePath+"/timeEntries/"+i0,schemaPath:"#/properties/timeEntries/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}}}else{const err28={instancePath:instancePath+"/timeEntries",schemaPath:"#/properties/timeEntries/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}}else{const err29={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}return validate114.errors=vErrors,0===errors},schema251={$schema:"http://json-schema.org/draft-07/schema",$id:"timeSheet.json",title:"Time Sheet",type:"object",required:["userId","day"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"timeSheet",enum:["timeSheet"]},userId:{$ref:"definitions.json#/definitions/id"},day:{type:["string","object"],format:"date-time"},locked:{type:"boolean",default:!1,description:"If true, the time sheet is locked and cannot be modified"},timeEntries:{type:"array",default:[],items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},discriminator:{type:"string",enum:["working","driving","meeting","break"]},start:{type:["string","object"],format:"date-time"},end:{type:["string","object"],format:"date-time"},comment:{type:"string"},ticketId:{type:"string"}},required:["start","discriminator"],additionalProperties:!1}}}};var validateUser=function validate115(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="user"),void 0===data.permissions&&(data.permissions=[]),void 0===data.systems&&(data.systems=[]),void 0===data.firstName){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"firstName"},message:"must have required property 'firstName'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.lastName){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"lastName"},message:"must have required property 'lastName'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err2={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err3={};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(_errs5===errors){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if("string"!=typeof data.type){const err5={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0!==data.firstName&&"string"!=typeof data.firstName){const err6={instancePath:instancePath+"/firstName",schemaPath:"#/properties/firstName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.lastName&&"string"!=typeof data.lastName){const err7={instancePath:instancePath+"/lastName",schemaPath:"#/properties/lastName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.phone){let data4=data.phone;if("string"!=typeof data4&&null!==data4){const err8={instancePath:instancePath+"/phone",schemaPath:"#/properties/phone/type",keyword:"type",params:{type:schema255.properties.phone.type},message:"must be string,null"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("string"==typeof data4&&!pattern8.test(data4)){const err9={instancePath:instancePath+"/phone",schemaPath:"#/properties/phone/pattern",keyword:"pattern",params:{pattern:"^\\+[0-9]{1,14}$"},message:'must match pattern "^\\+[0-9]{1,14}$"'};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.phoneVerified&&"boolean"!=typeof data.phoneVerified){const err10={instancePath:instancePath+"/phoneVerified",schemaPath:"#/properties/phoneVerified/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data.email){let data6=data.email;if("string"!=typeof data6&&null!==data6){const err11={instancePath:instancePath+"/email",schemaPath:"#/properties/email/type",keyword:"type",params:{type:schema255.properties.email.type},message:"must be string,null"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if("string"==typeof data6&&!formats88.test(data6)){const err12={instancePath:instancePath+"/email",schemaPath:"#/properties/email/format",keyword:"format",params:{format:"email"},message:'must match format "email"'};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}if(void 0!==data.emailVerified&&"boolean"!=typeof data.emailVerified){const err13={instancePath:instancePath+"/emailVerified",schemaPath:"#/properties/emailVerified/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data.address){let data8=data.address;if(data8&&"object"==typeof data8&&!Array.isArray(data8)){if(void 0!==data8.id&&"string"!=typeof data8.id){const err14={instancePath:instancePath+"/address/id",schemaPath:"definitions.json#/definitions/address/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(void 0!==data8.line1&&"string"!=typeof data8.line1){const err15={instancePath:instancePath+"/address/line1",schemaPath:"definitions.json#/definitions/address/properties/line1/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0!==data8.line2&&"string"!=typeof data8.line2){const err16={instancePath:instancePath+"/address/line2",schemaPath:"definitions.json#/definitions/address/properties/line2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data8.line3&&"string"!=typeof data8.line3){const err17={instancePath:instancePath+"/address/line3",schemaPath:"definitions.json#/definitions/address/properties/line3/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data8.city&&"string"!=typeof data8.city){const err18={instancePath:instancePath+"/address/city",schemaPath:"definitions.json#/definitions/address/properties/city/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0!==data8.state&&"string"!=typeof data8.state){const err19={instancePath:instancePath+"/address/state",schemaPath:"definitions.json#/definitions/address/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data8.postalCode&&"string"!=typeof data8.postalCode){const err20={instancePath:instancePath+"/address/postalCode",schemaPath:"definitions.json#/definitions/address/properties/postalCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0!==data8.countryCode){let data16=data8.countryCode;if("string"==typeof data16){if(func3(data16)>2){const err21={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if(func3(data16)<2){const err22={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}else{const err23={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}}}else{const err24={instancePath:instancePath+"/address",schemaPath:"definitions.json#/definitions/address/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}if(void 0!==data.secretKey&&"string"!=typeof data.secretKey){const err25={instancePath:instancePath+"/secretKey",schemaPath:"#/properties/secretKey/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data.photo&&(validate15(data.photo,{instancePath:instancePath+"/photo",parentData:data,parentDataProperty:"photo",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length)),void 0!==data.jobTitle&&"string"!=typeof data.jobTitle){const err26={instancePath:instancePath+"/jobTitle",schemaPath:"#/properties/jobTitle/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data.dob&&"string"!=typeof data.dob){const err27={instancePath:instancePath+"/dob",schemaPath:"#/properties/dob/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if(void 0!==data.gender){let data21=data.gender;if("string"!=typeof data21){const err28={instancePath:instancePath+"/gender",schemaPath:"#/properties/gender/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if("male"!==data21&&"female"!==data21){const err29={instancePath:instancePath+"/gender",schemaPath:"#/properties/gender/enum",keyword:"enum",params:{allowedValues:schema255.properties.gender.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}}if(void 0!==data.nationality){let data22=data.nationality;if("string"==typeof data22){if(func3(data22)>2){const err30={instancePath:instancePath+"/nationality",schemaPath:"#/properties/nationality/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if(func3(data22)<2){const err31={instancePath:instancePath+"/nationality",schemaPath:"#/properties/nationality/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}}else{const err32={instancePath:instancePath+"/nationality",schemaPath:"#/properties/nationality/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}}let data23=data.permissions;if(Array.isArray(data23)){const len0=data23.length;for(let i0=0;i0<len0;i0++){let data24=data23[i0];if(data24&&"object"==typeof data24&&!Array.isArray(data24)){if(void 0===data24.organizationId){const err33={instancePath:instancePath+"/permissions/"+i0,schemaPath:"#/properties/permissions/items/required",keyword:"required",params:{missingProperty:"organizationId"},message:"must have required property 'organizationId'"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}if(void 0===data24.propertyId){const err34={instancePath:instancePath+"/permissions/"+i0,schemaPath:"#/properties/permissions/items/required",keyword:"required",params:{missingProperty:"propertyId"},message:"must have required property 'propertyId'"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(void 0===data24.role){const err35={instancePath:instancePath+"/permissions/"+i0,schemaPath:"#/properties/permissions/items/required",keyword:"required",params:{missingProperty:"role"},message:"must have required property 'role'"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}for(const key0 in data24)if("organizationId"!==key0&&"propertyId"!==key0&&"role"!==key0&&"department"!==key0&&"policyIds"!==key0&&"policies"!==key0){const err36={instancePath:instancePath+"/permissions/"+i0,schemaPath:"#/properties/permissions/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}if(void 0!==data24.organizationId&&"string"!=typeof data24.organizationId){const err37={instancePath:instancePath+"/permissions/"+i0+"/organizationId",schemaPath:"#/properties/permissions/items/properties/organizationId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}if(void 0!==data24.propertyId&&"string"!=typeof data24.propertyId){const err38={instancePath:instancePath+"/permissions/"+i0+"/propertyId",schemaPath:"#/properties/permissions/items/properties/propertyId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}if(void 0!==data24.role){let data27=data24.role;if("string"!=typeof data27){const err39={instancePath:instancePath+"/permissions/"+i0+"/role",schemaPath:"#/properties/permissions/items/properties/role/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}if("Guest"!==data27&&"User"!==data27&&"Manager"!==data27&&"Maintenance"!==data27&&"Administrator"!==data27&&"SuperAdmin"!==data27){const err40={instancePath:instancePath+"/permissions/"+i0+"/role",schemaPath:"#/properties/permissions/items/properties/role/enum",keyword:"enum",params:{allowedValues:schema255.properties.permissions.items.properties.role.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}}if(void 0!==data24.department&&"string"!=typeof data24.department){const err41={instancePath:instancePath+"/permissions/"+i0+"/department",schemaPath:"#/properties/permissions/items/properties/department/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}if(void 0!==data24.policyIds){let data29=data24.policyIds;if(Array.isArray(data29)){const len1=data29.length;for(let i1=0;i1<len1;i1++)if("string"!=typeof data29[i1]){const err42={instancePath:instancePath+"/permissions/"+i0+"/policyIds/"+i1,schemaPath:"#/properties/permissions/items/properties/policyIds/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}}else{const err43={instancePath:instancePath+"/permissions/"+i0+"/policyIds",schemaPath:"#/properties/permissions/items/properties/policyIds/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}}if(void 0!==data24.policies){let data31=data24.policies;if(Array.isArray(data31)){const len2=data31.length;for(let i2=0;i2<len2;i2++)validate58(data31[i2],{instancePath:instancePath+"/permissions/"+i0+"/policies/"+i2,parentData:data31,parentDataProperty:i2,rootData:rootData})||(vErrors=null===vErrors?validate58.errors:vErrors.concat(validate58.errors),errors=vErrors.length)}else{const err44={instancePath:instancePath+"/permissions/"+i0+"/policies",schemaPath:"#/properties/permissions/items/properties/policies/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}}}else{const err45={instancePath:instancePath+"/permissions/"+i0,schemaPath:"#/properties/permissions/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}}}else{const err46={instancePath:instancePath+"/permissions",schemaPath:"#/properties/permissions/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}if(void 0!==data.notes){let data33=data.notes;if(Array.isArray(data33)){const len3=data33.length;for(let i3=0;i3<len3;i3++)if("string"!=typeof data33[i3]){const err47={instancePath:instancePath+"/notes/"+i3,schemaPath:"#/properties/notes/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}}else{const err48={instancePath:instancePath+"/notes",schemaPath:"#/properties/notes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}}if(void 0!==data.files){let data35=data.files;if(Array.isArray(data35)){const len4=data35.length;for(let i4=0;i4<len4;i4++)validate15(data35[i4],{instancePath:instancePath+"/files/"+i4,parentData:data35,parentDataProperty:i4,rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length)}else{const err49={instancePath:instancePath+"/files",schemaPath:"#/properties/files/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err49]:vErrors.push(err49),errors++}}if(void 0!==data.identifications){let data37=data.identifications;if(Array.isArray(data37)){const len5=data37.length;for(let i5=0;i5<len5;i5++)validate37(data37[i5],{instancePath:instancePath+"/identifications/"+i5,parentData:data37,parentDataProperty:i5,rootData:rootData})||(vErrors=null===vErrors?validate37.errors:vErrors.concat(validate37.errors),errors=vErrors.length)}else{const err50={instancePath:instancePath+"/identifications",schemaPath:"#/properties/identifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err50]:vErrors.push(err50),errors++}}if(void 0!==data.payments){let data39=data.payments;if(Array.isArray(data39)){const len6=data39.length;for(let i6=0;i6<len6;i6++)validate57(data39[i6],{instancePath:instancePath+"/payments/"+i6,parentData:data39,parentDataProperty:i6,rootData:rootData})||(vErrors=null===vErrors?validate57.errors:vErrors.concat(validate57.errors),errors=vErrors.length)}else{const err51={instancePath:instancePath+"/payments",schemaPath:"#/properties/payments/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err51]:vErrors.push(err51),errors++}}if(void 0!==data.location){let data41=data.location;if(data41&&"object"==typeof data41&&!Array.isArray(data41)){if(void 0===data41.accuracy){const err52={instancePath:instancePath+"/location",schemaPath:"#/properties/location/required",keyword:"required",params:{missingProperty:"accuracy"},message:"must have required property 'accuracy'"};null===vErrors?vErrors=[err52]:vErrors.push(err52),errors++}if(void 0===data41.latitude){const err53={instancePath:instancePath+"/location",schemaPath:"#/properties/location/required",keyword:"required",params:{missingProperty:"latitude"},message:"must have required property 'latitude'"};null===vErrors?vErrors=[err53]:vErrors.push(err53),errors++}if(void 0===data41.longitude){const err54={instancePath:instancePath+"/location",schemaPath:"#/properties/location/required",keyword:"required",params:{missingProperty:"longitude"},message:"must have required property 'longitude'"};null===vErrors?vErrors=[err54]:vErrors.push(err54),errors++}if(void 0===data41.timestamp){const err55={instancePath:instancePath+"/location",schemaPath:"#/properties/location/required",keyword:"required",params:{missingProperty:"timestamp"},message:"must have required property 'timestamp'"};null===vErrors?vErrors=[err55]:vErrors.push(err55),errors++}for(const key1 in data41)if("accuracy"!==key1&&"latitude"!==key1&&"longitude"!==key1&&"timestamp"!==key1){const err56={instancePath:instancePath+"/location",schemaPath:"#/properties/location/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};null===vErrors?vErrors=[err56]:vErrors.push(err56),errors++}if(void 0!==data41.accuracy){let data42=data41.accuracy;if("number"!=typeof data42&&null!==data42){const err57={instancePath:instancePath+"/location/accuracy",schemaPath:"#/properties/location/properties/accuracy/type",keyword:"type",params:{type:schema255.properties.location.properties.accuracy.type},message:"must be number,null"};null===vErrors?vErrors=[err57]:vErrors.push(err57),errors++}}if(void 0!==data41.latitude){let data43=data41.latitude;if("number"!=typeof data43&&null!==data43){const err58={instancePath:instancePath+"/location/latitude",schemaPath:"#/properties/location/properties/latitude/type",keyword:"type",params:{type:schema255.properties.location.properties.latitude.type},message:"must be number,null"};null===vErrors?vErrors=[err58]:vErrors.push(err58),errors++}}if(void 0!==data41.longitude){let data44=data41.longitude;if("number"!=typeof data44&&null!==data44){const err59={instancePath:instancePath+"/location/longitude",schemaPath:"#/properties/location/properties/longitude/type",keyword:"type",params:{type:schema255.properties.location.properties.longitude.type},message:"must be number,null"};null===vErrors?vErrors=[err59]:vErrors.push(err59),errors++}}if(void 0!==data41.timestamp){let data45=data41.timestamp;if("number"!=typeof data45&&null!==data45){const err60={instancePath:instancePath+"/location/timestamp",schemaPath:"#/properties/location/properties/timestamp/type",keyword:"type",params:{type:schema255.properties.location.properties.timestamp.type},message:"must be number,null"};null===vErrors?vErrors=[err60]:vErrors.push(err60),errors++}}}else{const err61={instancePath:instancePath+"/location",schemaPath:"#/properties/location/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err61]:vErrors.push(err61),errors++}}if(void 0!==data.reservations){let data46=data.reservations;if(Array.isArray(data46)){const len7=data46.length;for(let i7=0;i7<len7;i7++)validate63(data46[i7],{instancePath:instancePath+"/reservations/"+i7,parentData:data46,parentDataProperty:i7,rootData:rootData})||(vErrors=null===vErrors?validate63.errors:vErrors.concat(validate63.errors),errors=vErrors.length)}else{const err62={instancePath:instancePath+"/reservations",schemaPath:"#/properties/reservations/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err62]:vErrors.push(err62),errors++}}if(void 0!==data.spaceName&&"string"!=typeof data.spaceName){const err63={instancePath:instancePath+"/spaceName",schemaPath:"#/properties/spaceName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err63]:vErrors.push(err63),errors++}if(void 0!==data.revenue&&(validate122(data.revenue,{instancePath:instancePath+"/revenue",parentData:data,parentDataProperty:"revenue",rootData:rootData})||(vErrors=null===vErrors?validate122.errors:vErrors.concat(validate122.errors),errors=vErrors.length)),void 0!==data.createdAt){let data50=data.createdAt;if("string"!=typeof data50&&(!data50||"object"!=typeof data50||Array.isArray(data50))){const err64={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:schema102.type},message:"must be string,object"};null===vErrors?vErrors=[err64]:vErrors.push(err64),errors++}if("string"==typeof data50&&!formats4.validate(data50)){const err65={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err65]:vErrors.push(err65),errors++}}if(void 0!==data.updatedAt){let data51=data.updatedAt;if("string"!=typeof data51&&(!data51||"object"!=typeof data51||Array.isArray(data51))){const err66={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/type",keyword:"type",params:{type:schema151.type},message:"must be string,object"};null===vErrors?vErrors=[err66]:vErrors.push(err66),errors++}if("string"==typeof data51&&!formats4.validate(data51)){const err67={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err67]:vErrors.push(err67),errors++}}let data52=data.systems;if(Array.isArray(data52)){const len8=data52.length;for(let i8=0;i8<len8;i8++){let data53=data52[i8];if(data53&&"object"==typeof data53&&!Array.isArray(data53)){if(void 0===data53.systemId){const err68={instancePath:instancePath+"/systems/"+i8,schemaPath:"#/properties/systems/items/required",keyword:"required",params:{missingProperty:"systemId"},message:"must have required property 'systemId'"};null===vErrors?vErrors=[err68]:vErrors.push(err68),errors++}if(void 0===data53.propertyId){const err69={instancePath:instancePath+"/systems/"+i8,schemaPath:"#/properties/systems/items/required",keyword:"required",params:{missingProperty:"propertyId"},message:"must have required property 'propertyId'"};null===vErrors?vErrors=[err69]:vErrors.push(err69),errors++}if(void 0===data53.driver){const err70={instancePath:instancePath+"/systems/"+i8,schemaPath:"#/properties/systems/items/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err70]:vErrors.push(err70),errors++}for(const key2 in data53)if("systemId"!==key2&&"propertyId"!==key2&&"driver"!==key2){const err71={instancePath:instancePath+"/systems/"+i8,schemaPath:"#/properties/systems/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key2},message:"must NOT have additional properties"};null===vErrors?vErrors=[err71]:vErrors.push(err71),errors++}if(void 0!==data53.systemId&&"string"!=typeof data53.systemId){const err72={instancePath:instancePath+"/systems/"+i8+"/systemId",schemaPath:"#/properties/systems/items/properties/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err72]:vErrors.push(err72),errors++}if(void 0!==data53.propertyId&&"string"!=typeof data53.propertyId){const err73={instancePath:instancePath+"/systems/"+i8+"/propertyId",schemaPath:"#/properties/systems/items/properties/propertyId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err73]:vErrors.push(err73),errors++}if(void 0!==data53.driver&&"string"!=typeof data53.driver){const err74={instancePath:instancePath+"/systems/"+i8+"/driver",schemaPath:"#/properties/systems/items/properties/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err74]:vErrors.push(err74),errors++}}else{const err75={instancePath:instancePath+"/systems/"+i8,schemaPath:"#/properties/systems/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err75]:vErrors.push(err75),errors++}}}else{const err76={instancePath:instancePath+"/systems",schemaPath:"#/properties/systems/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err76]:vErrors.push(err76),errors++}}else{const err77={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err77]:vErrors.push(err77),errors++}return validate115.errors=vErrors,0===errors},schema255={$schema:"http://json-schema.org/draft-07/schema",$id:"user.json",title:"User",type:"object",required:["firstName","lastName"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"user"},firstName:{type:"string"},lastName:{type:"string"},phone:{type:["string","null"],pattern:"^\\+[0-9]{1,14}$"},phoneVerified:{type:"boolean"},email:{type:["string","null"],format:"email"},emailVerified:{type:"boolean"},address:{$ref:"definitions.json#/definitions/address"},secretKey:{type:"string"},photo:{$ref:"mediaFile.json#"},jobTitle:{type:"string"},dob:{type:"string"},gender:{type:"string",enum:["male","female"]},nationality:{type:"string",minLength:2,maxLength:2},permissions:{type:"array",default:[],items:{type:"object",required:["organizationId","propertyId","role"],properties:{organizationId:{type:"string",description:"The ID of the organization the permission is applies to."},propertyId:{type:"string",description:"The ID of the property the permission is applies to."},role:{type:"string",enum:["Guest","User","Manager","Maintenance","Administrator","SuperAdmin"]},department:{type:"string",description:"The department the user belongs to."},policyIds:{type:"array",items:{type:"string",description:"ID of a policy that is applied to this role."}},policies:{type:"array",items:{description:"A policy object populated from the policyIds array.",$ref:"policy.json"}}},additionalProperties:!1}},notes:{type:"array",items:{type:"string"}},files:{type:"array",items:{$ref:"mediaFile.json#"}},identifications:{type:"array",items:{$ref:"identification.json#"}},payments:{type:"array",items:{$ref:"payment.json#"}},location:{type:"object",required:["accuracy","latitude","longitude","timestamp"],additionalProperties:!1,properties:{accuracy:{type:["number","null"]},latitude:{type:["number","null"]},longitude:{type:["number","null"]},timestamp:{type:["number","null"]}}},reservations:{type:"array",items:{$ref:"reservation.json"}},spaceName:{type:"string"},revenue:{$ref:"definitions.json#/definitions/revenue"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"},systems:{type:"array",default:[],items:{type:"object",properties:{systemId:{type:"string"},propertyId:{type:"string"},driver:{type:"string"}},required:["systemId","propertyId","driver"],additionalProperties:!1}}}};function validate122(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(Array.isArray(data)){const len0=data.length;for(let i0=0;i0<len0;i0++){let data0=data[i0];if(data0&&"object"==typeof data0&&!Array.isArray(data0)){if(void 0!==data0.id){let data1=data0.id;if("string"!=typeof data1){const err0={instancePath:instancePath+"/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}const _errs6=errors,_errs7=errors;if("global"!==data1&&"system"!==data1){const err1={};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(_errs7===errors){const err2={instancePath:instancePath+"/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}else errors=_errs6,null!==vErrors&&(_errs6?vErrors.length=_errs6:vErrors=null)}if(void 0!==data0.name&&"string"!=typeof data0.name){const err3={instancePath:instancePath+"/"+i0+"/name",schemaPath:"#/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data0.date){let data3=data0.date;if("string"==typeof data3){if(!formats4.validate(data3)){const err4={instancePath:instancePath+"/"+i0+"/date",schemaPath:"#/items/properties/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}else{const err5={instancePath:instancePath+"/"+i0+"/date",schemaPath:"#/items/properties/date/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}if(void 0!==data0.price&&"number"!=typeof data0.price){const err6={instancePath:instancePath+"/"+i0+"/price",schemaPath:"#/items/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data0.tax){let data5=data0.tax;if("number"!=typeof data5&&null!==data5){const err7={instancePath:instancePath+"/"+i0+"/tax",schemaPath:"#/items/properties/tax/type",keyword:"type",params:{type:schema167.items.properties.tax.type},message:"must be number,null"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}}}else{const err8={instancePath:instancePath+"/"+i0,schemaPath:"#/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}}else{const err9={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}return validate122.errors=vErrors,0===errors}var validateVendor=function validate124(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="vendor"),void 0===data.name){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.email){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"email"},message:"must have required property 'email'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err2={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err3={};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(_errs5===errors){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err5={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if("vendor"!==data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema262.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.name&&"string"!=typeof data.name){const err7={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.phone){let data3=data.phone;if("string"!=typeof data3&&null!==data3){const err8={instancePath:instancePath+"/phone",schemaPath:"#/properties/phone/type",keyword:"type",params:{type:schema262.properties.phone.type},message:"must be string,null"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("string"==typeof data3&&!pattern8.test(data3)){const err9={instancePath:instancePath+"/phone",schemaPath:"#/properties/phone/pattern",keyword:"pattern",params:{pattern:"^\\+[0-9]{1,14}$"},message:'must match pattern "^\\+[0-9]{1,14}$"'};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.email){let data4=data.email;if("string"!=typeof data4&&null!==data4){const err10={instancePath:instancePath+"/email",schemaPath:"#/properties/email/type",keyword:"type",params:{type:schema262.properties.email.type},message:"must be string,null"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("string"==typeof data4&&!formats88.test(data4)){const err11={instancePath:instancePath+"/email",schemaPath:"#/properties/email/format",keyword:"format",params:{format:"email"},message:'must match format "email"'};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}if(void 0!==data.address){let data5=data.address;if(data5&&"object"==typeof data5&&!Array.isArray(data5)){if(void 0!==data5.id&&"string"!=typeof data5.id){const err12={instancePath:instancePath+"/address/id",schemaPath:"definitions.json#/definitions/address/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data5.line1&&"string"!=typeof data5.line1){const err13={instancePath:instancePath+"/address/line1",schemaPath:"definitions.json#/definitions/address/properties/line1/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data5.line2&&"string"!=typeof data5.line2){const err14={instancePath:instancePath+"/address/line2",schemaPath:"definitions.json#/definitions/address/properties/line2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(void 0!==data5.line3&&"string"!=typeof data5.line3){const err15={instancePath:instancePath+"/address/line3",schemaPath:"definitions.json#/definitions/address/properties/line3/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0!==data5.city&&"string"!=typeof data5.city){const err16={instancePath:instancePath+"/address/city",schemaPath:"definitions.json#/definitions/address/properties/city/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data5.state&&"string"!=typeof data5.state){const err17={instancePath:instancePath+"/address/state",schemaPath:"definitions.json#/definitions/address/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data5.postalCode&&"string"!=typeof data5.postalCode){const err18={instancePath:instancePath+"/address/postalCode",schemaPath:"definitions.json#/definitions/address/properties/postalCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0!==data5.countryCode){let data13=data5.countryCode;if("string"==typeof data13){if(func3(data13)>2){const err19={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(func3(data13)<2){const err20={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}else{const err21={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}}else{const err22={instancePath:instancePath+"/address",schemaPath:"definitions.json#/definitions/address/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data.photo&&(validate15(data.photo,{instancePath:instancePath+"/photo",parentData:data,parentDataProperty:"photo",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length)),void 0!==data.createdAt){let data15=data.createdAt;if("string"!=typeof data15&&(!data15||"object"!=typeof data15||Array.isArray(data15))){const err23={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:schema102.type},message:"must be string,object"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if("string"==typeof data15&&!formats4.validate(data15)){const err24={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}if(void 0!==data.updatedAt){let data16=data.updatedAt;if("string"!=typeof data16&&(!data16||"object"!=typeof data16||Array.isArray(data16))){const err25={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/type",keyword:"type",params:{type:schema151.type},message:"must be string,object"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if("string"==typeof data16&&!formats4.validate(data16)){const err26={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}}else{const err27={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}return validate124.errors=vErrors,0===errors},schema262={$schema:"http://json-schema.org/draft-07/schema",$id:"vendor.json",title:"Vendor",type:"object",required:["name","email"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"vendor",enum:["vendor"]},name:{type:"string"},phone:{type:["string","null"],pattern:"^\\+[0-9]{1,14}$"},email:{type:["string","null"],format:"email"},address:{$ref:"definitions.json#/definitions/address"},photo:{$ref:"mediaFile.json#"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}}};var validateWindowCovering=validate81,Alarm=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.name&&(this.name=data.name),void 0!==data.offline&&(this.offline=data.offline),void 0!==data.type&&(this.type=data.type),void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.areas&&(this.areas=data.areas),void 0!==data.zones&&(this.zones=data.zones),void 0!==data.chime&&(this.chime=data.chime),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion),void 0!==data.address&&(this.address=data.address)}};Object.defineProperty(Alarm.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"alarm.json",title:"Alarm",description:"Any smart alarm system",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string",description:"Name of the alarm"},offline:{type:"boolean"},type:{type:"string",enum:["alarm"],default:"alarm"},systemId:{$ref:"definitions.json#/definitions/systemId"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},areas:{type:"array",items:{type:"object",properties:{number:{type:"number"},name:{type:"string"},securityMode:{type:["string","null"],enum:["arming","disarming","armed","disarmed","alarm",null]}},additionalProperties:!1}},zones:{type:"array",items:{type:"object",properties:{number:{type:"number",minimum:0},name:{type:"string"},secure:{type:["boolean","null"]},bypassed:{type:["boolean","null"]}},additionalProperties:!1}},chime:{type:"boolean",description:"Reflects whether console chime is enabled"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"},address:{$ref:"definitions.json#/definitions/address"}},required:["id","type","areas","zones","driver"]}}),Object.defineProperty(Alarm.prototype,"validator",{get:function(){return validateAlarm}});var Announcement=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.users&&(this.users=data.users),void 0!==data.group&&(this.group=data.group),void 0!==data.body&&(this.body=data.body),void 0!==data.media&&(this.media=data.media),void 0!==data.sentBy&&(this.sentBy=data.sentBy),void 0!==data.tags&&(this.tags=data.tags),void 0!==data.createdAt&&(this.createdAt=data.createdAt),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt)}};Object.defineProperty(Announcement.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"announcement.json",title:"Announcement",description:"Announcement message sent to users",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["announcement"],default:"announcement"},users:{type:"array",items:{type:"string"},minItems:1},group:{type:"string"},body:{type:"string"},media:{$ref:"mediaFile.json"},sentBy:{type:"string"},tags:{type:"array",items:{type:"string"}},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"}},additionalProperties:!1}}),Object.defineProperty(Announcement.prototype,"validator",{get:function(){return validateAnnouncement}});var Camera=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.name&&(this.name=data.name),void 0!==data.type&&(this.type=data.type),void 0!==data.offline&&(this.offline=data.offline),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.liveStreams&&(this.liveStreams=data.liveStreams),void 0!==data.liveStream&&(this.liveStream=data.liveStream),void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(Camera.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"camera.json",title:"Camera",description:"Any smart camera",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type",default:"camera"},offline:{type:"boolean"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},liveStreams:{type:"object",additionalProperties:!1,$comment:"This is now deprecated. Use liveStream instead. This will remain here for backwards compatibility.",properties:{iframe:{type:["string","null"]},hls:{type:["string","null"]},webRTC:{type:["string","null"]},rtsp:{type:["string","null"]}}},liveStream:{type:"object",additionalProperties:!1,properties:{id:{type:"string"},driver:{type:"string",enum:["cloudflare-stream","aws-kinesis","digital-watchdog"]},allowedOrigins:{type:"array",items:{type:"string"}},authRequired:{type:"boolean"},iframe:{type:["string","null"]},hls:{type:["string","null"]},webRTC:{type:["string","null"]},rtsp:{type:["string","null"],description:"Local RTSP stream URL",examples:["rtsp://192.168.1.4:544/channels/1","rtsp://10.145.6.129:8554/unicast"]},previewImage:{type:["string","null"],description:"Source to preview the camera stream",examples:["https://example.com/preview.jpg","data:image/jpegbase64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QBYRXhpZgAATU0AKgAAAAgAA1EQAAEAAAABAQAAAFERAAQAAAABAAABAgABAA"]}}},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},additionalProperties:!1,required:["id","type","driver"]}}),Object.defineProperty(Camera.prototype,"validator",{get:function(){return validateCamera}});var Category=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.name&&(this.name=data.name),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.description&&(this.description=data.description),void 0!==data.image&&(this.image=data.image),void 0!==data.rating&&(this.rating=data.rating),void 0!==data.discriminator&&(this.discriminator=data.discriminator),void 0!==data.systemId&&(this.systemId=data.systemId)}};Object.defineProperty(Category.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"category.json",title:"Category",type:"object",required:["type","discriminator"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"category"},name:{type:"string",minLength:1},driver:{$ref:"definitions.json#/definitions/driver"},description:{type:"string"},image:{$ref:"mediaFile.json"},rating:{type:"number",minimum:0,maximum:10,default:9},discriminator:{type:"string",enum:["space","product","mediaFile"]},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(Category.prototype,"validator",{get:function(){return validateCategory}});var Courtesy=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.name&&(this.name=data.name),void 0!==data.type&&(this.type=data.type),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.offline&&(this.offline=data.offline),void 0!==data.supportedStates&&(this.supportedStates=data.supportedStates),void 0!==data.state&&(this.state=data.state),void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(Courtesy.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"courtesy.json",title:"Courtesy",description:"Any smart courtesy system",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},supportedStates:{type:"array",uniqueItems:!0,items:{enum:["privacy","service","none"]}},state:{type:"string",$ref:"#/properties/supportedStates/items"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","driver","supportedStates","state"]}}),Object.defineProperty(Courtesy.prototype,"validator",{get:function(){return validateCourtesy}});var Credential=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.discriminator&&(this.discriminator=data.discriminator),void 0!==data.credential&&(this.credential=data.credential),void 0!==data.userId&&(this.userId=data.userId),void 0!==data.organizationId&&(this.organizationId=data.organizationId),void 0!==data.propertyId&&(this.propertyId=data.propertyId),void 0!==data.deviceId&&(this.deviceId=data.deviceId),void 0!==data.userAgent&&(this.userAgent=data.userAgent),void 0!==data.expires&&(this.expires=data.expires),void 0!==data.systemId&&(this.systemId=data.systemId)}};Object.defineProperty(Credential.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"credential.json",title:"Credential",type:"object",required:["type","credential","expires"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"credential"},driver:{$ref:"definitions.json#/definitions/driver"},discriminator:{type:"string",enum:["verificationCode","token","mobileKey","pin","publicKey","passkeyChallenge"]},credential:{type:"string"},userId:{type:"string"},organizationId:{type:"string"},propertyId:{type:"string"},deviceId:{type:"string"},userAgent:{type:"string"},expires:{type:["string","object","null"]},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(Credential.prototype,"validator",{get:function(){return validateCredential}});var DeviceRouter=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.organizationId&&(this.organizationId=data.organizationId),void 0!==data.devices&&(this.devices=data.devices)}};Object.defineProperty(DeviceRouter.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"deviceRouter.json",title:"Device Router",description:"A device router contains instructions on where to route devices based on their organization and driver.",type:"object",required:["driver","organizationId"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"deviceRouter",enum:["deviceRouter"]},driver:{type:"string"},organizationId:{type:["string","null"],description:"Reference (id) to the organization that owns this router"},devices:{type:"object",additionalProperties:!0}}}}),Object.defineProperty(DeviceRouter.prototype,"validator",{get:function(){return validateDeviceRouter}});var Dimmer=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.name&&(this.name=data.name),void 0!==data.type&&(this.type=data.type),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.offline&&(this.offline=data.offline),void 0!==data.level&&(this.level=data.level),void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(Dimmer.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"dimmer.json",title:"Dimmer",description:"Any smart dimmer",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},level:{type:["number","null"],minimum:0,maximum:100},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","level","driver"]}}),Object.defineProperty(Dimmer.prototype,"validator",{get:function(){return validateDimmer}});var DiscoveredDevice=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.name&&(this.name=data.name),void 0!==data.deviceId&&(this.deviceId=data.deviceId),void 0!==data.type&&(this.type=data.type),void 0!==data.discriminator&&(this.discriminator=data.discriminator),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.deviceData&&(this.deviceData=data.deviceData),void 0!==data.ignore&&(this.ignore=data.ignore),void 0!==data.organizationId&&(this.organizationId=data.organizationId),void 0!==data.propertyId&&(this.propertyId=data.propertyId)}};Object.defineProperty(DiscoveredDevice.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"discoveredDevice.json",title:"Discovered Device",description:"A device that has been discovered by Kohost, but not yet added to the Kohost system.",type:"object",required:["name","deviceId","deviceData"],properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},deviceId:{type:"string"},type:{type:"string",enum:["discoveredDevice"],default:"discoveredDevice"},discriminator:{$ref:"definitions.json#/definitions/type"},driver:{type:"string"},deviceData:{type:"object"},ignore:{type:"boolean"},organizationId:{type:["string","null"],description:"Reference (id) to the organization that owns this device"},propertyId:{type:["string","null"],description:"Reference (id) to the property that this device belongs to"}}}}),Object.defineProperty(DiscoveredDevice.prototype,"validator",{get:function(){return validateDiscoveredDevice}});var EmailMessage=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.to&&(this.to=data.to),void 0!==data.from&&(this.from=data.from),void 0!==data.subject&&(this.subject=data.subject),void 0!==data.status&&(this.status=data.status),void 0!==data.statusMessage&&(this.statusMessage=data.statusMessage),void 0!==data.html&&(this.html=data.html),void 0!==data.text&&(this.text=data.text),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.appData&&(this.appData=data.appData),void 0!==data.createdAt&&(this.createdAt=data.createdAt),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt),void 0!==data.systemId&&(this.systemId=data.systemId)}};Object.defineProperty(EmailMessage.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"emailMessage.json",title:"Email Message",type:"object",required:["to","from","status","subject"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"emailMessage",enum:["emailMessage"]},to:{type:"string",pattern:"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$"},from:{type:"string",pattern:".*<[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+>.*",description:"Must be in the format of 'Sender <email@example.com>"},subject:{type:"string"},status:{type:"string",enum:["queued","sending","sent","deferred","delivered","undelivered","bounced","blocked","receiving","received","opened","clicked","unsubscribed","spamReport"]},statusMessage:{type:"string"},html:{type:"string"},text:{type:"string"},driver:{type:"string"},appData:{type:"object"},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(EmailMessage.prototype,"validator",{get:function(){return validateEmailMessage}});var EnergyReport=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.reportTime&&(this.reportTime=data.reportTime),void 0!==data.roomId&&(this.roomId=data.roomId),void 0!==data.first&&(this.first=data.first),void 0!==data.last&&(this.last=data.last),void 0!==data.consumption&&(this.consumption=data.consumption),void 0!==data.totals&&(this.totals=data.totals),void 0!==data.costPerKw&&(this.costPerKw=data.costPerKw)}};Object.defineProperty(EnergyReport.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"energyReport.json",title:"Energy Report",description:"Hourly Report for Energy based on energy report shards",type:"object",required:["id","type","roomId","first","last","consumption","totals","costPerKw"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["energyReport"],default:"energyReport"},reportTime:{time:"string",enum:["hourly","daily","monthly"]},roomId:{$ref:"definitions.json#/definitions/id"},first:{type:["string","object"],format:"date-time"},last:{type:["string","object"],format:"date-time"},consumption:{type:"array",items:{type:"object",required:["id","type","kwh"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{$ref:"definitions.json#/definitions/type"},kwh:{type:"number",minimum:0}}}},totals:{type:"array",items:{type:"object",required:["lights","climate","media"],properties:{lights:{type:"number",minimum:0},climate:{type:"number",minimum:0},media:{type:"number",minimum:0}}}},costPerKw:{type:"number",minimum:0}}}}),Object.defineProperty(EnergyReport.prototype,"validator",{get:function(){return validateEnergyReport}});var EnergyReportShard=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.roomId&&(this.roomId=data.roomId),void 0!==data.first&&(this.first=data.first),void 0!==data.last&&(this.last=data.last),void 0!==data.data&&(this.data=data.data),void 0!==data.ndata&&(this.ndata=data.ndata),void 0!==data.expires&&(this.expires=data.expires)}};Object.defineProperty(EnergyReportShard.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"energyReportShard.json",title:"Energy Report Shard",description:"Shard used for Energy Reports",type:"object",required:["id","type","roomId","first","last","data","ndata","expires"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["energyReportShard"],default:"energyReportShard"},roomId:{$ref:"definitions.json#/definitions/id"},first:{type:["string","object"],format:"date-time"},last:{type:["string","object"],format:"date-time"},data:{type:"array",items:{type:"object",required:["time","watts","id","type","value"],properties:{time:{type:["string","object"],format:"date-time"},watts:{$ref:"definitions.json#/definitions/watts"},id:{$ref:"definitions.json#/definitions/id"},type:{$ref:"definitions.json#/definitions/type"},value:{type:"number",minimum:0,maximum:1}}}},ndata:{type:"integer",minimum:0,maximum:1e5,default:0},expires:{type:["string","object"],format:"date-time"}}}}),Object.defineProperty(EnergyReportShard.prototype,"validator",{get:function(){return validateEnergyReportShard}});var Gateway=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),void 0!==data.status&&(this.status=data.status),void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(Gateway.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"iotGateway.json",title:"Gateway",description:"Any smart gateway that is an entrypoint for controlling devices",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{$ref:"definitions.json#/definitions/type"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},status:{type:"string"},systemId:{$ref:"definitions.json#/definitions/systemId"},driver:{$ref:"definitions.json#/definitions/driver"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","status","driver"]}}),Object.defineProperty(Gateway.prototype,"validator",{get:function(){return validateGateway}});var Identification=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.number&&(this.number=data.number),void 0!==data.maskedNumber&&(this.maskedNumber=data.maskedNumber),void 0!==data.encryptedNumber&&(this.encryptedNumber=data.encryptedNumber),void 0!==data.issued&&(this.issued=data.issued),void 0!==data.expires&&(this.expires=data.expires),void 0!==data.verified&&(this.verified=data.verified),void 0!==data.matched&&(this.matched=data.matched),void 0!==data.firstName&&(this.firstName=data.firstName),void 0!==data.lastName&&(this.lastName=data.lastName),void 0!==data.issuingCountry&&(this.issuingCountry=data.issuingCountry),void 0!==data.systemId&&(this.systemId=data.systemId)}};Object.defineProperty(Identification.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"identification.json",title:"Identification",type:"object",required:["type"],oneOf:[{required:["number"]},{required:["encryptedNumber"]}],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["driversLicense","passport","identityCard","visa"]},number:{string:"string"},maskedNumber:{string:"string"},encryptedNumber:{string:"string"},issued:{type:["string","object"],format:"date-time"},expires:{type:["string","object","null"],format:"date-time"},verified:{type:"boolean"},matched:{type:"boolean"},firstName:{type:"string"},lastName:{type:"string"},issuingCountry:{string:"string",minLength:2,maxLength:2},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(Identification.prototype,"validator",{get:function(){return validateIdentification}});var Issue=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.name&&(this.name=data.name),void 0!==data.description&&(this.description=data.description),void 0!==data.department&&(this.department=data.department),void 0!==data.autoAssign&&(this.autoAssign=data.autoAssign),void 0!==data.systemKey&&(this.systemKey=data.systemKey),void 0!==data.autoCreateTicket&&(this.autoCreateTicket=data.autoCreateTicket),void 0!==data.excludedResources&&(this.excludedResources=data.excludedResources)}};Object.defineProperty(Issue.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"issue.json",title:"Issue",description:"An issue associated with ticketing and concierge.",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["issue"],default:"issue"},name:{type:"string"},description:{type:"string"},department:{type:"string"},autoAssign:{type:"object",properties:{userId:{type:"string"},vendorId:{type:"string"},priority:{$ref:"ticket.json#/properties/priority"},tags:{type:"array",items:{type:"string"}}}},systemKey:{type:"string"},autoCreateTicket:{type:"boolean",default:!0},excludedResources:{type:"array",description:"A list of resources that should not trigger notifications of this issue",items:{type:"string"},default:[]}},required:["id","type","name","department"]}}),Object.defineProperty(Issue.prototype,"validator",{get:function(){return validateIssue}});var Lock=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.name&&(this.name=data.name),void 0!==data.type&&(this.type=data.type),void 0!==data.offline&&(this.offline=data.offline),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.state&&(this.state=data.state),void 0!==data.mode&&(this.mode=data.mode),void 0!==data.supportedModes&&(this.supportedModes=data.supportedModes),void 0!==data.batteryLevel&&(this.batteryLevel=data.batteryLevel),void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(Lock.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"lock.json",title:"Lock",description:"Any smart lock",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},offline:{type:"boolean"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},state:{type:["string","null"],enum:["locked","unlocked",null]},mode:{type:["string","null"],enum:["normal","autoLock","emergencyOpen","emergencyClose","holdOpen","lockdown",null],description:"emergencyOpen and emergencyClose are deprecated and can be removed once Salto, Paxton and Geovision drivers are updated",default:null},supportedModes:{type:"array",uniqueItems:!0,items:{enum:["normal","autoLock","emergencyOpen","emergencyClose","holdOpen","lockdown",null]}},batteryLevel:{$ref:"definitions.json#/definitions/batteryLevel"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","state","driver"]}}),Object.defineProperty(Lock.prototype,"validator",{get:function(){return validateLock}});var Log=class extends Entity{constructor(data){super(data),void 0!==data.type&&(this.type=data.type),void 0!==data.timestamp&&(this.timestamp=data.timestamp),void 0!==data.id&&(this.id=data.id),void 0!==data.name&&(this.name=data.name),void 0!==data.field1&&(this.field1=data.field1),void 0!==data.field2&&(this.field2=data.field2),void 0!==data.field3&&(this.field3=data.field3),void 0!==data.field4&&(this.field4=data.field4),void 0!==data.field5&&(this.field5=data.field5),void 0!==data.field6&&(this.field6=data.field6)}};Object.defineProperty(Log.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"log.json",title:"Log",type:"object",properties:{type:{type:"string",default:"log",enum:["log"]},timestamp:{type:"number",minimum:1655907956593},id:{$ref:"definitions.json#/definitions/id"},name:{type:"string",description:"Event name"},field1:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field2:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field3:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field4:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field5:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field6:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}}}}}),Object.defineProperty(Log.prototype,"validator",{get:function(){return validateLog}});var MediaFile=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.name&&(this.name=data.name),void 0!==data.fileHash&&(this.fileHash=data.fileHash),void 0!==data.category&&(this.category=data.category),void 0!==data.mimeType&&(this.mimeType=data.mimeType),void 0!==data.data&&(this.data=data.data),void 0!==data.url&&(this.url=data.url),void 0!==data.width&&(this.width=data.width),void 0!==data.height&&(this.height=data.height),void 0!==data.size&&(this.size=data.size),void 0!==data.uploadUrl&&(this.uploadUrl=data.uploadUrl),void 0!==data.uploadUrlExpires&&(this.uploadUrlExpires=data.uploadUrlExpires),void 0!==data.createdBy&&(this.createdBy=data.createdBy),void 0!==data.systemId&&(this.systemId=data.systemId)}createImageVariant(params){if("image/*"!=this.mimeType)throw new Error("Only dynamic images can have variants");if(!this.url)throw new Error("MediaFile has no url");const query=Object.keys(params).map((key=>`${key}=${params[key]}`)).join(",");return this.url.replace(/\/public$/,`/${query}`)}};Object.defineProperty(MediaFile.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"mediaFile.json",title:"Media File",description:"Any media file",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"mediaFile",enum:["mediaFile"]},name:{type:"string"},fileHash:{type:"string"},category:{type:"string",description:"This is the category id"},mimeType:{type:"string",enum:["image/*","image/jpeg","image/png","image/gif","image/webp","image/avif","image/svg+xml","application/pdf"]},data:{type:"string"},url:{type:"string",format:"uri"},width:{type:"integer",minimum:0},height:{type:"integer",minimum:0},size:{type:"integer",minimum:0,description:"Size in bytes"},uploadUrl:{type:"string",format:"uri"},uploadUrlExpires:{$ref:"definitions.json#/definitions/date"},createdBy:{type:"string"},systemId:{$ref:"definitions.json#/definitions/systemId"}},additionalProperties:!1,required:["type"]}}),Object.defineProperty(MediaFile.prototype,"validator",{get:function(){return validateMediaFile}});var MediaSource=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.discriminator&&(this.discriminator=data.discriminator),void 0!==data.playlists&&(this.playlists=data.playlists),void 0!==data.remote&&(this.remote=data.remote),void 0!==data.name&&(this.name=data.name),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.offline&&(this.offline=data.offline),void 0!==data.audio&&(this.audio=data.audio),void 0!==data.video&&(this.video=data.video),void 0!==data.powerFeedback&&(this.powerFeedback=data.powerFeedback),void 0!==data.volumeFeedback&&(this.volumeFeedback=data.volumeFeedback),void 0!==data.muted&&(this.muted=data.muted),void 0!==data.volume&&(this.volume=data.volume),void 0!==data.brightness&&(this.brightness=data.brightness),void 0!==data.contrast&&(this.contrast=data.contrast),void 0!==data.power&&(this.power=data.power),void 0!==data.input&&(this.input=data.input),void 0!==data.supportedInputs&&(this.supportedInputs=data.supportedInputs),void 0!==data.supportedOutputs&&(this.supportedOutputs=data.supportedOutputs),void 0!==data.command&&(this.command=data.command),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(MediaSource.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"mediaSource.json",title:"Media Source",description:"Any media source",type:"object",required:["id","type","discriminator","audio","video","driver"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"mediaSource",enum:["mediaSource"]},discriminator:{type:"string",enum:["tv","dvr","appleTv","discPlayer","mediaPlayer","paSystem","uncontrolledDevice"]},playlists:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{$ref:"definitions.json#/definitions/name"}}}},remote:{type:"string",enum:["MR22GA","XRT260","XRT270","HOF-16K 1.2","219863500","SONIFI","AKB76039803","BN59-01388A"]},name:{$ref:"definitions.json#/definitions/name"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},audio:{type:"boolean"},video:{type:"boolean"},powerFeedback:{type:"boolean"},volumeFeedback:{type:"boolean"},muted:{type:"boolean"},volume:{type:"number",minimum:0,maximum:100},brightness:{type:"number",minimum:0,maximum:100},contrast:{type:"number",minimum:0,maximum:100},power:{type:"string",enum:["on","off"]},input:{type:"string"},supportedInputs:{type:"array",items:{type:"string"}},supportedOutputs:{type:"array",items:{type:"string"}},command:{type:["string","null"],enum:["mute","volumeUp","volumeDown","brightnessUp","brightnessDown","channelUp","channelDown","number0","number1","number2","number3","number4","number5","number6","number7","number8","number9","lastChannel","display","favoriteChannel","play","playing","stop","stopped","pause","paused","fastForward","fastForwarding","rewind","rewinding","instantReplay","record","ac3","pvrMenu","guide","menu","menuUp","menuDown","menuLeft","menuRight","pageUp","pageDown","select","exit","input","power","enterChannel","enterVolume","enterBrightness","enterContrast","number10","number11","number12","number13","number14","number15","number16","number10Plus","number20Plus","number100","dash","threeChan","threeD","sixChan","a","add","alarm","am","analog","angle","antenna","antennaEast","antennaWest","aspect","audio1","audio2","audio3","audioDumming","audioLevelDown","audioLevelUp","b","back","c","component1","component2","component3","d","home","list","liveTv","discreteInputCable","powerOff","powerOn","setupMenu","skipForward","skipReverse","video1","video2","video3","video4","video5","details","hdmi1","hdmi2","hdmi3","cecDeviceList","mtsSap","red","green","yellow","blue","alert","order"]},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},additionalProperties:!1}}),Object.defineProperty(MediaSource.prototype,"validator",{get:function(){return validateMediaSource}});var MotionSensor=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(MotionSensor.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"motionSensor.json",title:"Motion Sensor",description:"Any smart motion sensor",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{$ref:"definitions.json#/definitions/type"},driver:{$ref:"definitions.json#/definitions/driver"},systemId:{$ref:"definitions.json#/definitions/systemId"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},additionalProperties:!1,required:["id","type","driver"]}}),Object.defineProperty(MotionSensor.prototype,"validator",{get:function(){return validateMotionSensor}});var Order=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.orderNumber&&(this.orderNumber=data.orderNumber),void 0!==data.status&&(this.status=data.status),void 0!==data.userId&&(this.userId=data.userId),void 0!==data.reservationId&&(this.reservationId=data.reservationId),void 0!==data.date&&(this.date=data.date),void 0!==data.items&&(this.items=data.items),void 0!==data.taxes&&(this.taxes=data.taxes),void 0!==data.fees&&(this.fees=data.fees),void 0!==data.delivery&&(this.delivery=data.delivery),void 0!==data.payments&&(this.payments=data.payments)}getSubTotal(){return this.items.reduce(((acc,item)=>{const qty=item.quantity||1;return acc+item.price*qty}),0)}getTaxTotal(){const taxes=this.taxes;return taxes?this.items.reduce(((acc,item)=>{if(!item.taxClass)return acc;const tax=taxes.find((t=>t.class===item.taxClass));if(!tax)return acc;const{rateType:rateType,rate:rate}=tax;return"percentage"===rateType?acc+item.price*rate:acc+rate}),0):0}getDeliveryTotal(){const delivery=this.delivery;return delivery?this.items.reduce(((acc,item)=>{if(!item.deliveryClass)return acc;const d=delivery.find((d2=>d2.class===item.deliveryClass));if(!d)return acc;const{rateType:rateType,rate:rate}=d;return"percentage"===rateType?acc+item.price*rate:acc+rate}),0):0}getFeesTotal(){return this.fees.reduce(((acc,fee)=>acc+fee.price),0)}getTotal(){return this.getSubTotal()+this.getTaxTotal()+this.getDeliveryTotal()+this.getFeesTotal()}getPaymentsTotal(){return this.payments.reduce(((acc,payment)=>acc+payment.amount),0)}getBalance(){return this.getTotal()-this.getPaymentsTotal()}};Object.defineProperty(Order.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"order.json",title:"Order",description:"A purchase order for products or services.",type:"object",required:["type","status"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"order",enum:["order"]},orderNumber:{type:"string"},status:{type:"string",enum:["draft","pendingPayment","processing","outForDelivery","completed","paymentFailed","cancelled","refunded"]},userId:{$ref:"definitions.json#/definitions/id",description:"User id of purchaser"},reservationId:{$ref:"definitions.json#/definitions/id",description:"Reservation id if the order is for a reservation"},date:{$ref:"definitions.json#/definitions/date"},items:{type:"array",default:[],items:{type:"object",required:["name","price"],properties:{additionalProperties:!1,name:{type:"string"},sku:{type:"string"},quantity:{type:"number",default:1},price:{type:"number"},taxClass:{type:"string"},deliveryClass:{type:"string"},productId:{type:"string"}}}},taxes:{type:"array",default:[],items:{type:"object",required:["name","rate"],properties:{additionalProperties:!1,name:{type:"string"},class:{type:"string"},rateType:{type:"string",enum:["percentage","flat"],default:"percentage"},rate:{type:"number"},total:{type:"number"}}}},fees:{type:"array",default:[],items:{type:"object",required:["name","price"],properties:{additionalProperties:!1,name:{type:"string"},price:{type:"number"}}}},delivery:{type:"array",default:[],items:{type:"object",required:["name","rate"],properties:{additionalProperties:!1,name:{type:"string"},class:{type:"string"},rateType:{type:"string",enum:["percentage","flat"],default:"percentage"},rate:{type:"number"},total:{type:"number"}}}},payments:{type:"array",default:[],items:{type:"object",properties:{method:{type:"string",enum:["folio","invoice","amex","visa","masterCard","maestro","discover","diners","jcb","applePay","alipay","chinaUnionPay","vpay"]},name:{type:"string"},date:{$ref:"definitions.json#/definitions/date"},amount:{type:"number"},transactionReference:{type:"string"}}}}}}}),Object.defineProperty(Order.prototype,"validator",{get:function(){return validateOrder}});var Organization=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.accountNumber&&(this.accountNumber=data.accountNumber),void 0!==data.name&&(this.name=data.name),void 0!==data.properties&&(this.properties=data.properties),void 0!==data.hostname&&(this.hostname=data.hostname),void 0!==data.appManifest&&(this.appManifest=data.appManifest),void 0!==data.tickets&&(this.tickets=data.tickets),void 0!==data.credentials&&(this.credentials=data.credentials),void 0!==data.createdAt&&(this.createdAt=data.createdAt),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt)}};Object.defineProperty(Organization.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"organization.json",title:"Organization",type:"object",description:"An organization is a group or entity that subscribes to Kohost software.",required:["accountNumber","name"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"organization",enum:["organization"]},accountNumber:{type:["number","null"],minimum:1e4},name:{type:"string"},properties:{type:"array",items:{type:"string"}},hostname:{type:["string","null"]},appManifest:{type:"object",properties:{name:{type:"string"},short_name:{type:"string"},scope:{type:"string"},start_url:{type:"string"},themeColor:{type:"string"},backgroundColor:{type:"string"},display:{type:"string",enum:["fullscreen","standalone","minimal-ui","browser"],default:"fullscreen"},orientation:{type:"string",enum:["portrait","landscape"],default:"portrait"},splash:{type:"object",properties:{src:{type:"string"},type:{type:"string"},sizes:{type:"string"}}},icons:{type:"array",items:{type:"object",properties:{src:{type:"string"},sizes:{type:"string"},type:{type:"string"}}}},logo:{type:"object",properties:{src:{type:"string"},type:{type:"string"},sizes:{type:"string"}}}},default:{name:"Kohost",short_name:"Kohost",start_url:"/",scope:"/",display:"fullscreen",orientation:"portrait",theme_color:"#1d1f22",background_color:"#1d1f22",icons:[{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/9c85047f-ccba-4b1c-3070-5463fbe93b00/w=512",sizes:"512x512",type:"image/png"}],splash:{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/034fb112-5326-4d37-373e-d1cc2a4d0400/w=1500",sizes:"1500x800",type:"image/jpg"},logo:{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/1e54c54d-3bac-4745-f46f-c2f98036af00/h=75",sizes:"300x75",type:"image/png"}}},tickets:{type:"object",properties:{nextTicketNumber:{type:["string","integer"],default:1}}},credentials:{type:"object",additionalProperties:!0},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}}}}),Object.defineProperty(Organization.prototype,"validator",{get:function(){return validateOrganization}});var Payment=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.enabled&&(this.enabled=data.enabled),void 0!==data.storageData&&(this.storageData=data.storageData),void 0!==data.maskedNumber&&(this.maskedNumber=data.maskedNumber),void 0!==data.issued&&(this.issued=data.issued),void 0!==data.expires&&(this.expires=data.expires),void 0!==data.systemId&&(this.systemId=data.systemId)}};Object.defineProperty(Payment.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"payment.json",title:"Payment",type:"object",required:["type","maskedNumber","expires"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["amex","visa","masterCard","maestro","discover","diners","jcb","applePay","alipay","chinaUnionPay","vpay"]},enabled:{type:"boolean",default:!0},storageData:{type:["string","null"]},maskedNumber:{string:"string"},issued:{type:["string","null"]},expires:{string:"string"},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(Payment.prototype,"validator",{get:function(){return validatePayment}});var Policy=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.discriminator&&(this.discriminator=data.discriminator),void 0!==data.name&&(this.name=data.name),void 0!==data.description&&(this.description=data.description),void 0!==data.organizationId&&(this.organizationId=data.organizationId),void 0!==data.propertyId&&(this.propertyId=data.propertyId),void 0!==data.permissions&&(this.permissions=data.permissions)}};Object.defineProperty(Policy.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"policy.json",title:"Policy",description:"A policy is a set of permissions that can be applied to a user to limit their access to resources.",type:"object",required:["name","type","organizationId","propertyId","permissions","discriminator"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"policy",enum:["policy"]},discriminator:{type:"string",enum:["user"]},name:{type:"string",minLength:1},description:{type:"string"},organizationId:{type:"string"},propertyId:{type:"string"},permissions:{type:"array",items:{type:"object",required:["entities","effect"],properties:{entities:{type:"array",items:{type:"string",pattern:"^[^:]+(:.+)+$"}},effect:{type:"string",enum:["Allow","Deny"]}}}}}}}),Object.defineProperty(Policy.prototype,"validator",{get:function(){return validatePolicy}});var Product=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.name&&(this.name=data.name),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.description&&(this.description=data.description),void 0!==data.price&&(this.price=data.price),void 0!==data.tax&&(this.tax=data.tax),void 0!==data.image&&(this.image=data.image),void 0!==data.category&&(this.category=data.category),void 0!==data.imageUrl&&(this.imageUrl=data.imageUrl),void 0!==data.systemId&&(this.systemId=data.systemId)}};Object.defineProperty(Product.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"product.json",title:"Product",type:"object",required:["name","price","driver"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"product",enum:["product"]},name:{type:"string"},driver:{$ref:"definitions.json#/definitions/driver"},description:{string:"string"},price:{type:"number"},tax:{type:["number","null"]},image:{$ref:"mediaFile.json"},category:{type:"string"},imageUrl:{format:"uri",pattern:"^https?://"},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(Product.prototype,"validator",{get:function(){return validateProduct}});var Property=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.name&&(this.name=data.name),void 0!==data.type&&(this.type=data.type),void 0!==data.discriminator&&(this.discriminator=data.discriminator),void 0!==data.organization&&(this.organization=data.organization),void 0!==data.departments&&(this.departments=data.departments),void 0!==data.testModeEnabled&&(this.testModeEnabled=data.testModeEnabled),void 0!==data.testMode&&(this.testMode=data.testMode),void 0!==data.timezone&&(this.timezone=data.timezone),void 0!==data.smsNumber&&(this.smsNumber=data.smsNumber),void 0!==data.checkInTime&&(this.checkInTime=data.checkInTime),void 0!==data.checkOutTime&&(this.checkOutTime=data.checkOutTime),void 0!==data.address&&(this.address=data.address),void 0!==data.latitude&&(this.latitude=data.latitude),void 0!==data.longitude&&(this.longitude=data.longitude),void 0!==data.appFeatures&&(this.appFeatures=data.appFeatures),void 0!==data.notifications&&(this.notifications=data.notifications),void 0!==data.credentials&&(this.credentials=data.credentials)}};Object.defineProperty(Property.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"property.json",title:"Property",type:"object",description:"A property is a physical asset or building",required:["id","name","type","organization","timezone","discriminator"],properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{type:"string",default:"property",enum:["property"]},discriminator:{type:"string",enum:["hospitality","education","commercial","storage"]},organization:{type:["string","null"],description:"Reference (id) to the organization that owns this property"},departments:{type:"array",items:{type:"string"}},testModeEnabled:{type:"boolean"},testMode:{type:"object",properties:{notificationEmails:{type:"array",items:{type:"string"},description:"Only users with these email addresses will receive notifications in test mode, including sms, email, or push."},notificationEmailDomains:{type:"array",items:{type:"string"},description:"Only users with email addreses ending in these domains will receive notifications in test mode, including sms, email, or push."}}},timezone:{type:"string",description:"IANA timezone string",pattern:"^([a-zA-Z]+/[a-zA-Z_]+)$",examples:["America/New_York","America/Los_Angeles"]},smsNumber:{type:"string"},checkInTime:{type:"string"},checkOutTime:{type:"string"},address:{$ref:"definitions.json#/definitions/address"},latitude:{type:"number"},longitude:{type:"number"},appFeatures:{type:"object",properties:{RoomControl:{type:"object",properties:{disabledSystems:{type:"array",items:{type:"string",enum:["climate","lights","shades","tv","doors"]}},excludedDeviceIds:{type:"array",items:{type:"string"},default:[]},commonAreas:{type:"object",properties:{spaces:{type:"array",items:{type:"string"}}}},alarmConfig:{type:"object",patternProperties:{"^[a-zA-Z0-9]+$":{type:"object",properties:{zoneLockMap:{type:"object",description:"Maps zone numbers to lock ids",additionalProperties:{type:"string"}}}}},examples:[{wZz7hucY:{zoneLockMap:{1:"wc87hucc",2:"bc86hzxc",3:"zv5ah5jv"}}}]}},additionalProperties:!1},CheckIn:{properties:{payment:{},identification:{},earlyCheckIn:{type:"object",required:["dynamic"],properties:{dynamic:{type:"boolean",default:!1},minimumPrice:{type:"number",default:10},maximumPrice:{type:"number",default:50},priceRatioPerHour:{type:"number",default:.1},minimumTime:{type:"string"}}},roomUpgrades:{},pet:{},promos:{}}},CheckOut:{properties:{lateCheckOut:{type:"object",required:["dynamic"],properties:{dynamic:{type:"boolean",default:!1},minimumPrice:{type:"number",default:10},maximumPrice:{type:"number",default:50},priceRatioPerHour:{type:"number",default:.1}}}}},Concierge:{type:"object",properties:{timeTracking:{type:"boolean",default:!1},tipping:{type:"boolean",default:!1},ratings:{type:"boolean",default:!0},newTicketCCs:{type:"array",items:{type:"string"},default:[]},newMessageChannel:{type:["string","null"],enum:["sms","email"],default:"sms",description:"Determines how users should be notified of new messages in the concierge system"},quickServices:{type:"array",items:{type:"object",properties:{name:{type:"string"},description:{type:"string"},department:{type:"string"},image:{$ref:"mediaFile.json"}},required:["name","description","image"]}},issues:{type:"object",properties:{syncWithPropertyId:{type:"string"}}}}},DigitalKey:{type:"object",properties:{system:{type:"string",enum:["salto","dormakaba"]},systemOnline:{type:"boolean",default:!1},systemConfig:{type:"object",properties:{legicUrl:{type:"string",format:"uri"},legicWalletName:{type:"string"},legicAppId:{type:"number"},legicTechUsername:{type:"string"},legicTechPassword:{type:"string"}},additionalProperties:!1,default:{}},enableApp:{type:"boolean"},branding:{type:"object",properties:{logo:{type:"string",format:"uri"},gradient:{type:"array",items:{type:"string",pattern:"^(?!#ffffff)(#[0-9a-fA-F]{6})$"},minItems:2,maxItems:2},highlightedGradient:{type:"array",items:{type:"string",pattern:"^(?!#ffffff)(#[0-9a-fA-F]{6})$"},minItems:2,maxItems:3}}}}},SOS:{type:"object",properties:{active:{type:"boolean"},activeEmergencies:{type:"array",items:{type:"string",enum:["medical","fire","suspiciousPerson","other","conflict","shooter"]}}}},Elevator:{},Experiences:{},Dining:{type:"object",properties:{system:{type:"string",enum:["gotab"]},systemConfig:{type:"object",properties:{landingUrl:{type:"string",format:"uri"},includeUserDetails:{type:"boolean"}},additionalProperties:!1}}},Rentals:{},Shop:{},Spa:{},Valet:{}},additionalProperties:!1,default:{RoomControl:{}}},notifications:{type:"object",properties:{email:{type:"object",properties:{enabled:{type:"boolean"}},additionalProperties:!1},sms:{type:"object",properties:{enabled:{type:"boolean"}},additionalProperties:!1},push:{type:"object",properties:{enabled:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1,default:{email:{enabled:!1},sms:{enabled:!1},push:{enabled:!1}}},credentials:{type:"object",additionalProperties:!0}}}}),Object.defineProperty(Property.prototype,"validator",{get:function(){return validateProperty}});var Reservation=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.primaryGuest&&(this.primaryGuest=data.primaryGuest),void 0!==data.type&&(this.type=data.type),void 0!==data.sharedGuests&&(this.sharedGuests=data.sharedGuests),void 0!==data.spaceCategory&&(this.spaceCategory=data.spaceCategory),void 0!==data.space&&(this.space=data.space),void 0!==data.previousSpace&&(this.previousSpace=data.previousSpace),void 0!==data.status&&(this.status=data.status),void 0!==data.mobileCheckInSpaceCategoryChanged&&(this.mobileCheckInSpaceCategoryChanged=data.mobileCheckInSpaceCategoryChanged),void 0!==data.mobileCheckInSpaceChanged&&(this.mobileCheckInSpaceChanged=data.mobileCheckInSpaceChanged),void 0!==data.mobileCheckInStatus&&(this.mobileCheckInStatus=data.mobileCheckInStatus),void 0!==data.mobileCheckInStatusMessage&&(this.mobileCheckInStatusMessage=data.mobileCheckInStatusMessage),void 0!==data.confirmationNumber&&(this.confirmationNumber=data.confirmationNumber),void 0!==data.expectedCheckInDateTime&&(this.expectedCheckInDateTime=data.expectedCheckInDateTime),void 0!==data.checkInDateTime&&(this.checkInDateTime=data.checkInDateTime),void 0!==data.checkOutDateTime&&(this.checkOutDateTime=data.checkOutDateTime),void 0!==data.adultCount&&(this.adultCount=data.adultCount),void 0!==data.childCount&&(this.childCount=data.childCount),void 0!==data.spaceCategoryAvailabilites&&(this.spaceCategoryAvailabilites=data.spaceCategoryAvailabilites),void 0!==data.revenue&&(this.revenue=data.revenue),void 0!==data.rateSuppressed&&(this.rateSuppressed=data.rateSuppressed),void 0!==data.payment&&(this.payment=data.payment),void 0!==data.company&&(this.company=data.company),void 0!==data.travelAgent&&(this.travelAgent=data.travelAgent),void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.metadata&&(this.metadata=data.metadata),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt)}checkInTime(tz){return new Date(this.checkInDateTime).toLocaleString("default",{hour:"numeric",minute:"numeric",timeZone:tz})}checkOutTime(tz){return new Date(this.checkOutDateTime).toLocaleString("default",{hour:"numeric",minute:"numeric",timeZone:tz})}getNights(){const start=new Date(this.checkInDateTime),end=new Date(this.checkOutDateTime);let nights=Math.round((end-start)/864e5);return nights<=0&&(nights=1),nights}};Object.defineProperty(Reservation.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"reservation.json",title:"Reservation",type:"object",required:["type","status","checkInDateTime","checkOutDateTime"],properties:{id:{$ref:"definitions.json#/definitions/id"},driver:{$ref:"definitions.json#/definitions/driver"},primaryGuest:{type:"string"},type:{type:"string",default:"reservation",enum:["reservation"]},sharedGuests:{type:"array",items:{type:"string"}},spaceCategory:{type:"string"},space:{type:["string","null"]},previousSpace:{type:["string","null"],default:null,description:"Used when there was a space assigned and it changes"},status:{type:"string",enum:["reserved","checkedIn","checkedOut","cancelled","noShow","enquired","requested","optional"],description:" reserved - confirmed by both parties, before check-in\n checkedIn - checked in\n checkedOut - checked out\n cancelled - Cancelled\n noShow - No show\n enquired - Confirmed neither by the customer nor enterprise\n requested - Confirmed by the customer but not the enterprise (waitlist)\n optional - Confirmed by the enterprise but not the customer (holding)"},mobileCheckInSpaceCategoryChanged:{type:"boolean",description:"spaceCategory has changed from original."},mobileCheckInSpaceChanged:{type:"boolean"},mobileCheckInStatus:{type:"string",enum:["ready","blocked","preArrivalStepsRequired","spaceNotAssigned","spaceNotReady","checkInTimeNotStarted"]},mobileCheckInStatusMessage:{type:"string"},confirmationNumber:{type:"string"},expectedCheckInDateTime:{type:["string","object"],format:"date-time",description:"Expected arrival time of guest."},checkInDateTime:{type:["string","object"],format:"date-time"},checkOutDateTime:{type:["string","object"],format:"date-time"},adultCount:{type:"number",default:1,minimum:1},childCount:{type:"number",default:0},spaceCategoryAvailabilites:{type:"array",items:{type:"object",properties:{id:{type:"string"},price:{type:"number"},unit:{type:"string",enum:["night","stay","hour"]},isUpgrade:{type:"boolean"}}}},revenue:{$ref:"definitions.json#/definitions/revenue"},rateSuppressed:{type:"boolean"},payment:{type:"string"},company:{type:"string"},travelAgent:{type:"string"},systemId:{$ref:"definitions.json#/definitions/systemId"},metadata:{ref:"definitions.json#/definitions/metadata"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}}}}),Object.defineProperty(Reservation.prototype,"validator",{get:function(){return validateReservation}});var Room=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.name&&(this.name=data.name),void 0!==data.floor&&(this.floor=data.floor),void 0!==data.dimmers&&(this.dimmers=data.dimmers),void 0!==data.switches&&(this.switches=data.switches),void 0!==data.thermostats&&(this.thermostats=data.thermostats),void 0!==data.locks&&(this.locks=data.locks),void 0!==data.windowCoverings&&(this.windowCoverings=data.windowCoverings),void 0!==data.courtesy&&(this.courtesy=data.courtesy),void 0!==data.cameras&&(this.cameras=data.cameras),void 0!==data.mediaSources&&(this.mediaSources=data.mediaSources),void 0!==data.motionSensors&&(this.motionSensors=data.motionSensors),void 0!==data.alarms&&(this.alarms=data.alarms),void 0!==data.occupiedAt&&(this.occupiedAt=data.occupiedAt),void 0!==data.createdAt&&(this.createdAt=data.createdAt),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt)}static getDevicePath(type){switch(type){case"tv":case"dvr":case"appleTv":case"discPlayer":case"mediaPlayer":case"uncontrolledDevice":case"mediaSource":return"mediaSources";case"courtesy":return"courtesy";case"switch":return"switches";case"dimmer":return"dimmers";case"thermostat":return"thermostats";case"lock":return"locks";case"windowCovering":return"windowCoverings";case"camera":return"cameras";case"motionSensor":return"motionSensors";case"alarm":return"alarms";default:throw new Error("Invalid device type:"+type)}}static getDeviceTypeFromPath(path){if(!["dimmers","switches","thermostats","locks","windowCoverings","courtesy","cameras","mediaSources","motionSensors","alarms"].includes(path))throw new Error("Invalid device path:"+path);switch(path){case"courtesy":return path;case"switches":return"switch";default:return path.slice(0,-1)}}get hasDimmer(){return this.dimmers?.length>0}get hasSwitch(){return this.switches?.length>0}get hasWindowCovering(){return this.windowCoverings?.length>0}get hasShade(){return this.hasWindowCovering}get hasThermostat(){return this.thermostats?.length>0}get hasClimate(){return this.hasThermostat}get hasLock(){return this.locks?.length>0}get hasCourtesy(){return this.courtesy?.length>0}get hasCamera(){return this.cameras?.length>0}get hasMedia(){return this.mediaSources?.length>0}get hasLight(){const hasDiscriminatorLight=this.switches?.some((sw=>"light"===sw.discriminator||"fan"===sw.discriminator));return this.hasDimmer||hasDiscriminatorLight}get hasAlarm(){return this.alarms?.length>0}get occupied(){const now=new Date,lastOccupied=new Date(this.occupiedAt);return now.getTime()-lastOccupied.getTime()<36e5}};Object.defineProperty(Room.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"room.json",title:"Room",description:"A room represents a physical space of controllable IoT devices",type:"object",required:["id","name"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["room"],default:"room"},name:{type:"string"},floor:{type:"string"},dimmers:{type:"array",default:[],items:{$ref:"dimmer.json"}},switches:{type:"array",default:[],items:{$ref:"switch.json"}},thermostats:{type:"array",default:[],items:{$ref:"thermostat.json"}},locks:{type:"array",default:[],items:{$ref:"lock.json"}},windowCoverings:{type:"array",default:[],items:{$ref:"windowCovering.json"}},courtesy:{type:"array",default:[],items:{$ref:"courtesy.json"}},cameras:{type:"array",default:[],items:{$ref:"camera.json"}},mediaSources:{type:"array",default:[],items:{$ref:"mediaSource.json"}},motionSensors:{type:"array",default:[],items:{$ref:"motionSensor.json"}},alarms:{type:"array",default:[],items:{$ref:"alarm.json"}},occupiedAt:{$ref:"definitions.json#/definitions/createdAt"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}},additionalProperties:!1}}),Object.defineProperty(Room.prototype,"validator",{get:function(){return validateRoom}});var Scene=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.name&&(this.name=data.name),void 0!==data.description&&(this.description=data.description),void 0!==data.type&&(this.type=data.type),void 0!==data.devices&&(this.devices=data.devices),void 0!==data.isDefault&&(this.isDefault=data.isDefault),void 0!==data.showOnUi&&(this.showOnUi=data.showOnUi)}};Object.defineProperty(Scene.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"scene.json",title:"Scene",description:"A room represents a physical space of controllable IoT devices",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},description:{type:"string"},type:{type:"string",enum:["scene"],default:"scene"},devices:{type:"object",properties:{switches:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},state:{$ref:"switch.json#/properties/state"}},default:[]}},dimmers:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},level:{$ref:"dimmer.json#/properties/level"}}},default:[]},windowCoverings:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},position:{$ref:"windowCovering.json#/properties/position"}}},default:[]},thermostats:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},hvacMode:{$ref:"thermostat.json#/properties/hvacMode"},setpoints:{$ref:"thermostat.json#/properties/setpoints"},fanMode:{$ref:"thermostat.json#/properties/fanMode"},setpointDelta:{type:"number"}}},default:[]},mediaSources:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},volume:{type:"number",minimum:0,maximum:100},commands:{type:"array",items:{type:"string"}}}}},locks:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},state:{$ref:"lock.json#/properties/state"},mode:{$ref:"lock.json#/properties/mode"}}}}},additionalProperties:!1},isDefault:{type:"boolean",default:!1},showOnUi:{type:"boolean",default:!0}},required:["id","name","type"],additionalProperties:!1}}),Object.defineProperty(Scene.prototype,"validator",{get:function(){return validateScene}});var ShortLink=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.title&&(this.title=data.title),void 0!==data.destination&&(this.destination=data.destination),void 0!==data.url&&(this.url=data.url),void 0!==data.systemId&&(this.systemId=data.systemId)}};Object.defineProperty(ShortLink.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"shortLink.json",title:"Short Link",type:"object",required:["destination","url"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"shortLink",enum:["shortLink"]},title:{type:"string"},destination:{string:"string",format:"uri"},url:{string:"string",format:"uri"},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(ShortLink.prototype,"validator",{get:function(){return validateShortLink}});var SmsMessage=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.to&&(this.to=data.to),void 0!==data.from&&(this.from=data.from),void 0!==data.media&&(this.media=data.media),void 0!==data.status&&(this.status=data.status),void 0!==data.body&&(this.body=data.body),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.appData&&(this.appData=data.appData),void 0!==data.createdAt&&(this.createdAt=data.createdAt),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt),void 0!==data.systemId&&(this.systemId=data.systemId)}};Object.defineProperty(SmsMessage.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"smsMessage.json",title:"Sms Message",type:"object",required:["to","from","status"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"smsMessage",enum:["smsMessage"]},to:{type:"string",pattern:"^\\+[0-9]{1,14}$"},from:{type:"string",pattern:"^\\+[0-9]{1,14}$"},media:{type:"string",format:"uri"},status:{type:"string",enum:["queued","accepted","sending","sent","failed","delivered","undelivered","receiving","received","read"]},body:{type:"string"},driver:{type:"string"},appData:{type:"object"},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(SmsMessage.prototype,"validator",{get:function(){return validateSmsMessage}});var Space=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.name&&(this.name=data.name),void 0!==data.type&&(this.type=data.type),void 0!==data.discriminator&&(this.discriminator=data.discriminator),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.category&&(this.category=data.category),void 0!==data.rooms&&(this.rooms=data.rooms),void 0!==data.subGroups&&(this.subGroups=data.subGroups),void 0!==data.occupied&&(this.occupied=data.occupied),void 0!==data.inUse&&(this.inUse=data.inUse),void 0!==data.eco&&(this.eco=data.eco),void 0!==data.features&&(this.features=data.features),void 0!==data.maximumOccupancy&&(this.maximumOccupancy=data.maximumOccupancy),void 0!==data.housekeepingStatus&&(this.housekeepingStatus=data.housekeepingStatus),void 0!==data.serviceStatus&&(this.serviceStatus=data.serviceStatus),void 0!==data.systemId&&(this.systemId=data.systemId)}get floor(){const floors=new Set;return this.rooms.forEach((room=>{room.floor&&floors.add(room.floor)})),1==floors.size?[...floors][0]:void 0}get hasDimmer(){return this.rooms.some((room=>room.hasDimmer))}get hasSwitch(){return this.rooms.some((room=>room.hasSwitch))}get hasWindowCovering(){return this.rooms.some((room=>room.hasWindowCovering))}get hasThermostat(){return this.rooms.some((room=>room.hasThermostat))}get hasLock(){return this.rooms.some((room=>room.hasLock))}get hasCourtesy(){return this.rooms.some((room=>room.hasCourtesy))}get hasCamera(){return this.rooms.some((room=>room.hasCamera))}get hasAlarm(){return this.rooms.some((room=>room.hasAlarm))}get hasMedia(){return this.rooms.some((room=>room.hasMedia))}};Object.defineProperty(Space.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"space.json",title:"Space",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string",minLength:1},type:{type:"string",default:"space",enum:["space"]},discriminator:{type:"string",enum:["classRoom","hotelRoom","office","building","commonArea","conferenceRoom","lobby","gym","pool","restaurant","unit"]},driver:{$ref:"definitions.json#/definitions/driver"},category:{type:"string",description:"This is the category id"},rooms:{type:"array",items:{type:"string"}},subGroups:{type:"array",items:{type:"string"}},occupied:{type:"boolean"},inUse:{type:"boolean"},eco:{type:"object",additionalProperties:!1,default:{active:!1,allowed:!1,previousState:null},properties:{active:{type:"boolean",default:!1},activatedAt:{type:["string","object"],format:"date-time"},allowed:{type:"boolean",default:!1},previousState:{type:["object","null"],properties:{thermostats:{type:"object",patternProperties:{".*":{type:"object",properties:{setpoints:{$ref:"thermostat.json#/properties/setpoints"}}}}}},additionalProperties:!1}}},features:{type:"array",items:{type:"string",enum:["pet"]}},maximumOccupancy:{type:"number",minimum:1},housekeepingStatus:{type:"string",enum:["clean","dirty","inspected","pickup"]},serviceStatus:{type:"string",enum:["inService","outOfOrder","outOfService"]},systemId:{$ref:"definitions.json#/definitions/systemId"}},if:{properties:{type:{const:"hotelRoom"}}},then:{required:["name","type","features","maximumOccupancy","housekeepingStatus","serviceStatus"],properties:{features:{default:[]},maximumOccupancy:{default:2},housekeepingStatus:{default:"dirty"},serviceStatus:{default:"inService"}}},else:{required:["name","type"]}}}),Object.defineProperty(Space.prototype,"validator",{get:function(){return validateSpace}});var Switch=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.name&&(this.name=data.name),void 0!==data.type&&(this.type=data.type),void 0!==data.discriminator&&(this.discriminator=data.discriminator),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.offline&&(this.offline=data.offline),void 0!==data.state&&(this.state=data.state),void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(Switch.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"switch.json",title:"Switch",description:"Any smart switch",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},discriminator:{type:"string",enum:["light","fan","irrigation"]},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},state:{type:"string",enum:["on","off"]},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","state","driver"]}}),Object.defineProperty(Switch.prototype,"validator",{get:function(){return validateSwitch}});var SystemUser=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.firstName&&(this.firstName=data.firstName),void 0!==data.lastName&&(this.lastName=data.lastName),void 0!==data.phone&&(this.phone=data.phone),void 0!==data.email&&(this.email=data.email),void 0!==data.address&&(this.address=data.address),void 0!==data.photo&&(this.photo=data.photo),void 0!==data.jobTitle&&(this.jobTitle=data.jobTitle),void 0!==data.dob&&(this.dob=data.dob),void 0!==data.gender&&(this.gender=data.gender),void 0!==data.roles&&(this.roles=data.roles),void 0!==data.nationality&&(this.nationality=data.nationality),void 0!==data.notes&&(this.notes=data.notes),void 0!==data.files&&(this.files=data.files),void 0!==data.identifications&&(this.identifications=data.identifications),void 0!==data.payments&&(this.payments=data.payments),void 0!==data.revenue&&(this.revenue=data.revenue),void 0!==data.createdAt&&(this.createdAt=data.createdAt),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt),void 0!==data.systemId&&(this.systemId=data.systemId)}};Object.defineProperty(SystemUser.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"systemUser.json",title:"System User",description:"A system user is a user that originated from an external 3rd party system.",type:"object",required:["firstName","lastName"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"systemUser",enum:["systemUser"]},driver:{$ref:"definitions.json#/definitions/driver"},firstName:{type:"string"},lastName:{type:"string"},phone:{type:["string","null"],pattern:"^\\+[0-9]{1,14}$"},email:{type:["string","null"],format:"email"},address:{$ref:"definitions.json#/definitions/address"},photo:{type:"string"},jobTitle:{type:"string"},dob:{type:"string"},gender:{type:"string",enum:["male","female"]},roles:{type:"array",items:{type:"string",enum:["Guest","User","Manager","Maintenance","Administrator","SuperAdmin"]}},nationality:{type:"string",minLength:2,maxLength:2},notes:{type:"array",items:{type:"string"}},files:{type:"array",items:{$ref:"mediaFile.json#"}},identifications:{type:"array",items:{$ref:"identification.json#"}},payments:{type:"array",items:{$ref:"payment.json#"}},revenue:{$ref:"definitions.json#/definitions/revenue"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(SystemUser.prototype,"validator",{get:function(){return validateSystemUser}});var Thermostat=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.name&&(this.name=data.name),void 0!==data.type&&(this.type=data.type),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.offline&&(this.offline=data.offline),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),void 0!==data.currentTemperature&&(this.currentTemperature=data.currentTemperature),void 0!==data.currentHumidity&&(this.currentHumidity=data.currentHumidity),void 0!==data.hvacMode&&(this.hvacMode=data.hvacMode),void 0!==data.hvacState&&(this.hvacState=data.hvacState),void 0!==data.fanMode&&(this.fanMode=data.fanMode),void 0!==data.fanState&&(this.fanState=data.fanState),void 0!==data.temperatureScale&&(this.temperatureScale=data.temperatureScale),void 0!==data.humidityScale&&(this.humidityScale=data.humidityScale),void 0!==data.supportedHvacModes&&(this.supportedHvacModes=data.supportedHvacModes),void 0!==data.supportedFanModes&&(this.supportedFanModes=data.supportedFanModes),void 0!==data.setpoints&&(this.setpoints=data.setpoints),void 0!==data.minAutoDelta&&(this.minAutoDelta=data.minAutoDelta),void 0!==data.cycleRate&&(this.cycleRate=data.cycleRate),void 0!==data.batteryLevel&&(this.batteryLevel=data.batteryLevel),void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(Thermostat.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"thermostat.json",title:"Thermostat",description:"Any smart thermostat",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{$ref:"definitions.json#/definitions/name"},type:{$ref:"definitions.json#/definitions/type",default:"thermostat"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},currentTemperature:{type:"number"},currentHumidity:{type:"number",minimum:0},hvacMode:{type:"string",$ref:"#/properties/supportedHvacModes/items"},hvacState:{type:["string","null"],enum:["cooling","heating","off",null]},fanMode:{type:"string",$ref:"#/properties/supportedFanModes/items"},fanState:{type:["string","null"],enum:["off","low","medium","high","on",null]},temperatureScale:{type:"string",enum:["celsius","fahrenheit"],default:"fahrenheit"},humidityScale:{type:["string","null"],enum:["absolute","relative",null]},supportedHvacModes:{type:"array",uniqueItems:!0,minItems:2,items:{enum:["cool","heat","auto","off"]}},supportedFanModes:{type:"array",uniqueItems:!0,items:{enum:["auto","low","medium","high","off","on"]}},setpoints:{type:"object",additionalProperties:!1,properties:{cool:{$ref:"#/$defs/setpoint"},heat:{$ref:"#/$defs/setpoint"},auto:{$ref:"#/$defs/setpoint"}}},minAutoDelta:{type:"number",default:3},cycleRate:{type:"number"},batteryLevel:{$ref:"definitions.json#/definitions/batteryLevel"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},$defs:{setpoint:{type:"object",additionalProperties:!1,properties:{value:{$ref:"#/$defs/setpointValue"},min:{$ref:"#/$defs/setpointMinMax"},max:{$ref:"#/$defs/setpointMinMax"}}},setpointValue:{type:"number",minimum:0,maximum:99},setpointMinMax:{type:["number","null"],minimum:0,maximum:99}},required:["id","type","hvacMode","fanMode","hvacState","fanState","setpoints","temperatureScale","supportedHvacModes","supportedFanModes","driver"]}}),Object.defineProperty(Thermostat.prototype,"validator",{get:function(){return validateThermostat}});var Ticket=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.number&&(this.number=data.number),void 0!==data.issueId&&(this.issueId=data.issueId),void 0!==data.conversation&&(this.conversation=data.conversation),void 0!==data.openedBy&&(this.openedBy=data.openedBy),void 0!==data.requester&&(this.requester=data.requester),void 0!==data.assignedTo&&(this.assignedTo=data.assignedTo),void 0!==data.status&&(this.status=data.status),void 0!==data.priority&&(this.priority=data.priority),void 0!==data.tags&&(this.tags=data.tags),void 0!==data.department&&(this.department=data.department),void 0!==data.rating&&(this.rating=data.rating),void 0!==data.ratingComment&&(this.ratingComment=data.ratingComment),void 0!==data.tipAmount&&(this.tipAmount=data.tipAmount),void 0!==data.autoCloseAt&&(this.autoCloseAt=data.autoCloseAt),void 0!==data.scheduleDate&&(this.scheduleDate=data.scheduleDate),void 0!==data.createdAt&&(this.createdAt=data.createdAt),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt),void 0!==data.solvedAt&&(this.solvedAt=data.solvedAt),void 0!==data.closedAt&&(this.closedAt=data.closedAt)}};Object.defineProperty(Ticket.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"ticket.json",title:"Ticket",description:"A ticket is a request from a user.",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["ticket"],default:"ticket"},number:{type:"string"},issueId:{type:"string"},conversation:{type:"array",default:[],items:{type:"object",additionalProperties:!1,properties:{id:{type:"string"},userId:{type:"string"},userName:{type:"string"},vendorId:{type:"string"},vendorName:{type:"string"},systemId:{type:"string"},systemName:{type:"string"},timestamp:{$ref:"definitions.json#/definitions/createdAt"},body:{type:"string"},readBy:{type:"array",default:[],items:{type:"string"}},media:{anyOf:[{$ref:"mediaFile.json"},{type:"null"}]}},anyOf:[{required:["id","userId","timestamp","body"]},{required:["id","systemId","timestamp","body"]},{required:["id","vendorId","timestamp","body"]}]}},openedBy:{type:"object",properties:{userId:{type:"string"},systemId:{type:"string"}}},requester:{type:"object",properties:{systemId:{type:"string"},systemName:{type:"string"},systemPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]},userId:{type:"string"},userName:{type:"string"},userPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]},deviceId:{type:"string"},roomId:{type:"string"},reservationId:{type:"string"},spaceId:{type:"string"},spaceName:{type:"string"}}},assignedTo:{type:"object",properties:{userId:{type:"string"},userName:{type:"string"},userPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]},vendorId:{type:"string"},vendorName:{type:"string"},vendorPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]}}},status:{type:"string",enum:["open","pending","solved","closed"],default:"open"},priority:{type:"string",enum:["low","normal","high"],default:"normal"},tags:{type:"array",default:[],items:{type:"string"}},department:{type:"string"},rating:{type:"number",minimum:0,maximum:5},ratingComment:{type:"string"},tipAmount:{type:"string"},autoCloseAt:{$ref:"definitions.json#/definitions/date"},scheduleDate:{$ref:"definitions.json#/definitions/date"},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"},solvedAt:{$ref:"definitions.json#/definitions/date"},closedAt:{$ref:"definitions.json#/definitions/date"}},required:["id","conversation","requester","status","tags","createdAt","updatedAt"],additionalProperties:!1}}),Object.defineProperty(Ticket.prototype,"validator",{get:function(){return validateTicket}});var TimeSheet=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.userId&&(this.userId=data.userId),void 0!==data.day&&(this.day=data.day),void 0!==data.locked&&(this.locked=data.locked),void 0!==data.timeEntries&&(this.timeEntries=data.timeEntries)}};Object.defineProperty(TimeSheet.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"timeSheet.json",title:"Time Sheet",type:"object",required:["userId","day"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"timeSheet",enum:["timeSheet"]},userId:{$ref:"definitions.json#/definitions/id"},day:{type:["string","object"],format:"date-time"},locked:{type:"boolean",default:!1,description:"If true, the time sheet is locked and cannot be modified"},timeEntries:{type:"array",default:[],items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},discriminator:{type:"string",enum:["working","driving","meeting","break"]},start:{type:["string","object"],format:"date-time"},end:{type:["string","object"],format:"date-time"},comment:{type:"string"},ticketId:{type:"string"}},required:["start","discriminator"],additionalProperties:!1}}}}}),Object.defineProperty(TimeSheet.prototype,"validator",{get:function(){return validateTimeSheet}});var User=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.firstName&&(this.firstName=data.firstName),void 0!==data.lastName&&(this.lastName=data.lastName),void 0!==data.phone&&(this.phone=data.phone),void 0!==data.phoneVerified&&(this.phoneVerified=data.phoneVerified),void 0!==data.email&&(this.email=data.email),void 0!==data.emailVerified&&(this.emailVerified=data.emailVerified),void 0!==data.address&&(this.address=data.address),void 0!==data.secretKey&&(this.secretKey=data.secretKey),void 0!==data.photo&&(this.photo=data.photo),void 0!==data.jobTitle&&(this.jobTitle=data.jobTitle),void 0!==data.dob&&(this.dob=data.dob),void 0!==data.gender&&(this.gender=data.gender),void 0!==data.nationality&&(this.nationality=data.nationality),void 0!==data.permissions&&(this.permissions=data.permissions),void 0!==data.notes&&(this.notes=data.notes),void 0!==data.files&&(this.files=data.files),void 0!==data.identifications&&(this.identifications=data.identifications),void 0!==data.payments&&(this.payments=data.payments),void 0!==data.location&&(this.location=data.location),void 0!==data.reservations&&(this.reservations=data.reservations),void 0!==data.spaceName&&(this.spaceName=data.spaceName),void 0!==data.revenue&&(this.revenue=data.revenue),void 0!==data.createdAt&&(this.createdAt=data.createdAt),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt),void 0!==data.systems&&(this.systems=data.systems)}get fullName(){return`${this.firstName} ${this.lastName}`}get roles(){const roles=new Set;if(this.permissions)for(const permission of this.permissions)roles.add(permission.role);return Array.from(roles)}get isSuperAdmin(){return this.roles.includes("SuperAdmin")}get isAdmin(){return this.roles.includes("Admin")||this.roles.includes("Administrator")}get isManager(){return this.roles.includes("Manager")}get isUser(){return this.roles.includes("User")}};Object.defineProperty(User.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"user.json",title:"User",type:"object",required:["firstName","lastName"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"user"},firstName:{type:"string"},lastName:{type:"string"},phone:{type:["string","null"],pattern:"^\\+[0-9]{1,14}$"},phoneVerified:{type:"boolean"},email:{type:["string","null"],format:"email"},emailVerified:{type:"boolean"},address:{$ref:"definitions.json#/definitions/address"},secretKey:{type:"string"},photo:{$ref:"mediaFile.json#"},jobTitle:{type:"string"},dob:{type:"string"},gender:{type:"string",enum:["male","female"]},nationality:{type:"string",minLength:2,maxLength:2},permissions:{type:"array",default:[],items:{type:"object",required:["organizationId","propertyId","role"],properties:{organizationId:{type:"string",description:"The ID of the organization the permission is applies to."},propertyId:{type:"string",description:"The ID of the property the permission is applies to."},role:{type:"string",enum:["Guest","User","Manager","Maintenance","Administrator","SuperAdmin"]},department:{type:"string",description:"The department the user belongs to."},policyIds:{type:"array",items:{type:"string",description:"ID of a policy that is applied to this role."}},policies:{type:"array",items:{description:"A policy object populated from the policyIds array.",$ref:"policy.json"}}},additionalProperties:!1}},notes:{type:"array",items:{type:"string"}},files:{type:"array",items:{$ref:"mediaFile.json#"}},identifications:{type:"array",items:{$ref:"identification.json#"}},payments:{type:"array",items:{$ref:"payment.json#"}},location:{type:"object",required:["accuracy","latitude","longitude","timestamp"],additionalProperties:!1,properties:{accuracy:{type:["number","null"]},latitude:{type:["number","null"]},longitude:{type:["number","null"]},timestamp:{type:["number","null"]}}},reservations:{type:"array",items:{$ref:"reservation.json"}},spaceName:{type:"string"},revenue:{$ref:"definitions.json#/definitions/revenue"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"},systems:{type:"array",default:[],items:{type:"object",properties:{systemId:{type:"string"},propertyId:{type:"string"},driver:{type:"string"}},required:["systemId","propertyId","driver"],additionalProperties:!1}}}}}),Object.defineProperty(User.prototype,"validator",{get:function(){return validateUser}});var Vendor=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.name&&(this.name=data.name),void 0!==data.phone&&(this.phone=data.phone),void 0!==data.email&&(this.email=data.email),void 0!==data.address&&(this.address=data.address),void 0!==data.photo&&(this.photo=data.photo),void 0!==data.createdAt&&(this.createdAt=data.createdAt),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt)}};Object.defineProperty(Vendor.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"vendor.json",title:"Vendor",type:"object",required:["name","email"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"vendor",enum:["vendor"]},name:{type:"string"},phone:{type:["string","null"],pattern:"^\\+[0-9]{1,14}$"},email:{type:["string","null"],format:"email"},address:{$ref:"definitions.json#/definitions/address"},photo:{$ref:"mediaFile.json#"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}}}}),Object.defineProperty(Vendor.prototype,"validator",{get:function(){return validateVendor}});var WindowCovering=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.name&&(this.name=data.name),void 0!==data.type&&(this.type=data.type),void 0!==data.discriminator&&(this.discriminator=data.discriminator),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.offline&&(this.offline=data.offline),void 0!==data.position&&(this.position=data.position),void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(WindowCovering.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"windowCovering.json",title:"Window Covering",description:"Any smart window covering",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type",default:"windowCovering"},discriminator:{type:"string",enum:["basic","variable"],default:"variable"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},position:{type:["number","null"],minimum:0,maximum:100},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","position","driver"]}}),Object.defineProperty(WindowCovering.prototype,"validator",{get:function(){return validateWindowCovering}});export{Entity,Alarm,Announcement,Camera,Category,Courtesy,Credential,DeviceRouter,Dimmer,DiscoveredDevice,EmailMessage,EnergyReport,EnergyReportShard,Gateway,Identification,Issue,Lock,Log,MediaFile,MediaSource,MotionSensor,Order,Organization,Payment,Policy,Product,Property,Reservation,Room,Scene,ShortLink,SmsMessage,Space,Switch,SystemUser,Thermostat,Ticket,TimeSheet,User,Vendor,WindowCovering};//# sourceMappingURL=chunk-7UMWBYG3.js.map