@kohost/api-client 4.0.8 → 4.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-36WNTEIW.js +1 -1
- package/dist/chunk-EBJTC6MA.js +1 -1
- package/dist/chunk-HKJ2B2AA.js +1 -1
- package/dist/chunk-KNSZIQXT.js +1 -1
- package/dist/chunk-ONCGVMOA.js +1 -0
- package/dist/{chunk-3ZUKHDXQ.js.map → chunk-ONCGVMOA.js.map} +1 -1
- package/dist/chunk-W2G36LNI.js +1 -1
- package/dist/chunk-XZITDYVM.js +1 -0
- package/dist/chunk-XZITDYVM.js.map +1 -0
- package/dist/client.cjs +1 -1
- package/dist/client.js +1 -1
- package/dist/commands.cjs +1 -1
- package/dist/commands.cjs.map +1 -1
- package/dist/commands.js +1 -1
- package/dist/defs.cjs +1 -1
- package/dist/defs.js +1 -1
- package/dist/errors.cjs +1 -1
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.js +1 -1
- package/dist/events.cjs +1 -1
- package/dist/events.cjs.map +1 -1
- package/dist/events.js +1 -1
- package/dist/index.cjs +1185 -1060
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +138 -123
- package/dist/index.d.ts +138 -123
- package/dist/index.js +1185 -1060
- package/dist/index.js.map +1 -1
- package/dist/models.cjs +1 -1
- package/dist/models.cjs.map +1 -1
- package/dist/models.d.cts +3 -3
- package/dist/models.d.ts +3 -3
- package/dist/models.js +1 -1
- package/dist/socketIoClient.cjs +1 -1
- package/dist/socketIoClient.js +1 -1
- package/dist/useCases.cjs +1 -1
- package/dist/useCases.cjs.map +1 -1
- package/dist/useCases.js +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/dist/{windowCovering-dE1qeU57.d.cts → windowCovering-CXcSOjuy.d.cts} +137 -122
- package/dist/{windowCovering-dE1qeU57.d.ts → windowCovering-CXcSOjuy.d.ts} +137 -122
- package/package.json +1 -1
- package/dist/chunk-36O34ETI.js +0 -1
- package/dist/chunk-36O34ETI.js.map +0 -1
- package/dist/chunk-3ZUKHDXQ.js +0 -1
package/dist/chunk-36O34ETI.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ValidationError as e}from"./chunk-EBJTC6MA.js";import{__commonJS as t}from"./chunk-HKJ2B2AA.js";var s=t({"node_modules/fast-deep-equal/index.js"(e,t){t.exports=function equal(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var s,i,a;if(Array.isArray(e)){if((s=e.length)!=t.length)return!1;for(i=s;0!=i--;)if(!equal(e[i],t[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if((s=(a=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(i=s;0!=i--;)if(!Object.prototype.hasOwnProperty.call(t,a[i]))return!1;for(i=s;0!=i--;){var r=a[i];if(!equal(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}}}),i=t({"node_modules/ajv/dist/runtime/equal.js"(e){Object.defineProperty(e,"__esModule",{value:!0});var t=s();t.code='require("ajv/dist/runtime/equal").default',e.default=t}}),a=t({"node_modules/ajv/dist/runtime/ucs2length.js"(e){function ucs2length(e){const t=e.length;let s,i=0,a=0;for(;a<t;)i++,s=e.charCodeAt(a++),s>=55296&&s<=56319&&a<t&&(s=e.charCodeAt(a),56320==(64512&s)&&a++);return i}Object.defineProperty(e,"__esModule",{value:!0}),e.default=ucs2length,ucs2length.code='require("ajv/dist/runtime/ucs2length").default'}}),r=t({"node_modules/ajv-formats/dist/formats.js"(e){function fmtDef(e,t){return{validate:e,compare:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0,e.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(e){return r.test(e)&&n.test(e)},"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(e){if(p.test(e))return!1;try{return new RegExp(e),!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(e){return o.lastIndex=0,o.test(e)},int32:{type:"number",validate:function validateInt32(e){return Number.isInteger(e)&&e<=2147483647&&e>=-2147483648}},int64:{type:"number",validate:function validateInt64(e){return Number.isInteger(e)}},float:{type:"number",validate:validateNumber},double:{type:"number",validate:validateNumber},password:!0,binary:!0},e.fastFormats={...e.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},e.formatNames=Object.keys(e.fullFormats);var t=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,s=[0,31,28,31,30,31,30,31,31,30,31,30,31];function date(e){const i=t.exec(e);if(!i)return!1;const a=+i[1],r=+i[2],n=+i[3];return r>=1&&r<=12&&n>=1&&n<=(2===r&&function isLeapYear(e){return e%4==0&&(e%100!=0||e%400==0)}(a)?29:s[r])}function compareDate(e,t){if(e&&t)return e>t?1:e<t?-1:0}var i=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function getTime(e){return function time(t){const s=i.exec(t);if(!s)return!1;const a=+s[1],r=+s[2],n=+s[3],o=s[4],p="-"===s[5]?-1:1,m=+(s[6]||0),d=+(s[7]||0);if(m>23||d>59||e&&!o)return!1;if(a<=23&&r<=59&&n<60)return!0;const u=r-d*p,l=a-m*p-(u<0?1:0);return(23===l||-1===l)&&(59===u||-1===u)&&n<61}}function compareTime(e,t){if(!e||!t)return;const s=new Date("2020-01-01T"+e).valueOf(),i=new Date("2020-01-01T"+t).valueOf();return s&&i?s-i:void 0}function compareIsoTime(e,t){if(!e||!t)return;const s=i.exec(e),a=i.exec(t);return s&&a?(e=s[1]+s[2]+s[3])>(t=a[1]+a[2]+a[3])?1:e<t?-1:0:void 0}var a=/t|\s/i;function getDateTime(e){const t=getTime(e);return function date_time(e){const s=e.split(a);return 2===s.length&&date(s[0])&&t(s[1])}}function compareDateTime(e,t){if(!e||!t)return;const s=new Date(e).valueOf(),i=new Date(t).valueOf();return s&&i?s-i:void 0}function compareIsoDateTime(e,t){if(!e||!t)return;const[s,i]=e.split(a),[r,n]=t.split(a),o=compareDate(s,r);return void 0!==o?o||compareTime(i,n):void 0}var r=/\/|:/,n=/^(?:[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 o=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function validateNumber(){return!0}var p=/[^\\]\\Z/}}),n=class{constructor(e){if(!this.schema)throw new Error("Schema is not defined");if(!this.validator)throw new Error("Validator is not defined");this.#e(e)}get schemaProperties(){return Object.keys(this.validator.schema.properties)}#e(t){if(!this.validator(t))throw new e(`Invalid ${this.constructor.name}`,{cause:this.validator.errors})}},o=validate10,p={$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"]},m={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"]}},d={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","rtsp","salto","salto-irn","samsung","se","sendgrid","sonifi","stay-n-touch","storable","twilio","unifi","valcom","vizio","wisenet","cloudflare-images","cloudflare-stream","insperia-privacy"]},u=i().default,l=a().default,c={type:["object","null"],properties:{name:{type:"string",$ref:"#/definitions/supportedNotifications/items"},timestamp:{type:"number",minimum:1655907956593},description:{type:"string"}}},y={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(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if((!e||"object"!=typeof e||Array.isArray(e))&&null!==e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:c.type},message:"must be object,null"};null===r?r=[e]:r.push(e),n++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.name){let s=e.name;if("string"!=typeof s){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("button 1"!==s&&"button 2"!==s&&"button 3"!==s&&"button 4"!==s&&"button 5"!==s&&"idle"!==s&&"powerHasBeedApplied"!==s&&"acMainsDisconnected"!==s&&"acMainsReconnected"!==s&&"replaceBatterySoon"!==s&&"replaceBatteryNow"!==s&&"batteryOk"!==s&&"hardwareFailure"!==s&&"softwareFailure"!==s&&"hardwareFailureWithCode"!==s&&"softwareFailureWithCode"!==s&&"motionDetection"!==s&&"airFilterNeedsCleaned"!==s&&"airFilterNeedsReplaced"!==s&&"smokeDetected"!==s&&"outsideSafeTemperatureRange"!==s&&"outsideSafeHumidityRange"!==s&&"scheduleMaintenance"!==s&&"doorAjar"!==s&&"communicationFailure"!==s&&"communicationOk"!==s&&"burglarAlarm"!==s&&"fireAlarm"!==s){const e={instancePath:t+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:y.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.timestamp){let s=e.timestamp;if("number"==typeof s){if(s<1655907956593||isNaN(s)){const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.description&&"string"!=typeof e.description){const e={instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}return validate12.errors=r,0===n}function validate10(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="alarm"),void 0===e.id){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.areas){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"areas"},message:"must have required property 'areas'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.zones){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"zones"},message:"must have required property 'zones'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.driver){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.offline&&"boolean"!=typeof e.offline){const e={instancePath:t+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("alarm"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:p.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.supportedNotifications){let s=e.supportedNotifications;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("button 1"!==e&&"button 2"!==e&&"button 3"!==e&&"button 4"!==e&&"button 5"!==e&&"idle"!==e&&"powerHasBeedApplied"!==e&&"acMainsDisconnected"!==e&&"acMainsReconnected"!==e&&"replaceBatterySoon"!==e&&"replaceBatteryNow"!==e&&"batteryOk"!==e&&"hardwareFailure"!==e&&"softwareFailure"!==e&&"hardwareFailureWithCode"!==e&&"softwareFailureWithCode"!==e&&"motionDetection"!==e&&"airFilterNeedsCleaned"!==e&&"airFilterNeedsReplaced"!==e&&"smokeDetected"!==e&&"outsideSafeTemperatureRange"!==e&&"outsideSafeHumidityRange"!==e&&"scheduleMaintenance"!==e&&"doorAjar"!==e&&"communicationFailure"!==e&&"communicationOk"!==e&&"burglarAlarm"!==e&&"fireAlarm"!==e){const e={instancePath:t+"/supportedNotifications/"+i,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:m.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}let i,a=s.length;if(a>1)e:for(;a--;)for(i=a;i--;)if(u(s[a],s[i])){const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:a,j:i},message:"must NOT have duplicate items (items ## "+i+" and "+a+" are identical)"};null===r?r=[e]:r.push(e),n++;break e}}else{const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.notification&&(validate12(e.notification,{instancePath:t+"/notification",parentData:e,parentDataProperty:"notification",rootData:a})||(r=null===r?validate12.errors:r.concat(validate12.errors),n=r.length)),void 0!==e.driver){let s=e.driver;if("string"!=typeof s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("adlink"!==s&&"aws-kinesis"!==s&&"butler"!==s&&"crestron"!==s&&"dell"!==s&&"dmp"!==s&&"doorbird"!==s&&"dormakaba"!==s&&"dsc"!==s&&"ecobee"!==s&&"epson"!==s&&"geovision-rs"!==s&&"geovision-as-manager"!==s&&"honeywell-vista"!==s&&"igor"!==s&&"inncom"!==s&&"isapi"!==s&&"kohost-k7"!==s&&"kohost"!==s&&"lg"!==s&&"lg-webos"!==s&&"lapi"!==s&&"lirc"!==s&&"mews"!==s&&"mht"!==s&&"paxton"!==s&&"pelican-wireless"!==s&&"power-shades"!==s&&"rachio"!==s&&"rebrandly"!==s&&"rtsp"!==s&&"salto"!==s&&"salto-irn"!==s&&"samsung"!==s&&"se"!==s&&"sendgrid"!==s&&"sonifi"!==s&&"stay-n-touch"!==s&&"storable"!==s&&"twilio"!==s&&"unifi"!==s&&"valcom"!==s&&"vizio"!==s&&"wisenet"!==s&&"cloudflare-images"!==s&&"cloudflare-stream"!==s&&"insperia-privacy"!==s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:d.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.areas){let s=e.areas;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if(e&&"object"==typeof e&&!Array.isArray(e)){for(const s in e)if("number"!==s&&"name"!==s&&"securityMode"!==s){const e={instancePath:t+"/areas/"+i,schemaPath:"#/properties/areas/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.number&&"number"!=typeof e.number){const e={instancePath:t+"/areas/"+i+"/number",schemaPath:"#/properties/areas/items/properties/number/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/areas/"+i+"/name",schemaPath:"#/properties/areas/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.securityMode){let s=e.securityMode;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/areas/"+i+"/securityMode",schemaPath:"#/properties/areas/items/properties/securityMode/type",keyword:"type",params:{type:p.properties.areas.items.properties.securityMode.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}if("arming"!==s&&"disarming"!==s&&"armed"!==s&&"disarmed"!==s&&"alarm"!==s&&null!==s){const e={instancePath:t+"/areas/"+i+"/securityMode",schemaPath:"#/properties/areas/items/properties/securityMode/enum",keyword:"enum",params:{allowedValues:p.properties.areas.items.properties.securityMode.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/areas/"+i,schemaPath:"#/properties/areas/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/areas",schemaPath:"#/properties/areas/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.zones){let s=e.zones;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if(e&&"object"==typeof e&&!Array.isArray(e)){for(const s in e)if("number"!==s&&"name"!==s&&"secure"!==s&&"bypassed"!==s){const e={instancePath:t+"/zones/"+i,schemaPath:"#/properties/zones/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.number){let s=e.number;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/zones/"+i+"/number",schemaPath:"#/properties/zones/items/properties/number/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/zones/"+i+"/number",schemaPath:"#/properties/zones/items/properties/number/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/zones/"+i+"/name",schemaPath:"#/properties/zones/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.secure){let s=e.secure;if("boolean"!=typeof s&&null!==s){const e={instancePath:t+"/zones/"+i+"/secure",schemaPath:"#/properties/zones/items/properties/secure/type",keyword:"type",params:{type:p.properties.zones.items.properties.secure.type},message:"must be boolean,null"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.bypassed){let s=e.bypassed;if("boolean"!=typeof s&&null!==s){const e={instancePath:t+"/zones/"+i+"/bypassed",schemaPath:"#/properties/zones/items/properties/bypassed/type",keyword:"type",params:{type:p.properties.zones.items.properties.bypassed.type},message:"must be boolean,null"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/zones/"+i,schemaPath:"#/properties/zones/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/zones",schemaPath:"#/properties/zones/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.chime&&"boolean"!=typeof e.chime){const e={instancePath:t+"/chime",schemaPath:"#/properties/chime/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.watts){let s=e.watts;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.icon&&"string"!=typeof e.icon){const e={instancePath:t+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.modelNumber&&"string"!=typeof e.modelNumber){const e={instancePath:t+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.serialNumber&&"string"!=typeof e.serialNumber){const e={instancePath:t+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.firmwareVersion&&"string"!=typeof e.firmwareVersion){const e={instancePath:t+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.address){let s=e.address;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.id&&"string"!=typeof s.id){const e={instancePath:t+"/address/id",schemaPath:"definitions.json#/definitions/address/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.line1&&"string"!=typeof s.line1){const e={instancePath:t+"/address/line1",schemaPath:"definitions.json#/definitions/address/properties/line1/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.line2&&"string"!=typeof s.line2){const e={instancePath:t+"/address/line2",schemaPath:"definitions.json#/definitions/address/properties/line2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.line3&&"string"!=typeof s.line3){const e={instancePath:t+"/address/line3",schemaPath:"definitions.json#/definitions/address/properties/line3/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.city&&"string"!=typeof s.city){const e={instancePath:t+"/address/city",schemaPath:"definitions.json#/definitions/address/properties/city/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.state&&"string"!=typeof s.state){const e={instancePath:t+"/address/state",schemaPath:"definitions.json#/definitions/address/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.postalCode&&"string"!=typeof s.postalCode){const e={instancePath:t+"/address/postalCode",schemaPath:"definitions.json#/definitions/address/properties/postalCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.countryCode){let e=s.countryCode;if("string"==typeof e){if(l(e)>2){const e={instancePath:t+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===r?r=[e]:r.push(e),n++}if(l(e)<2){const e={instancePath:t+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/address",schemaPath:"definitions.json#/definitions/address/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate10.errors=r,0===n}var h=function validate14(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){void 0===e.type&&(e.type="announcement");for(const s in e)if(!P.call(f.properties,s)){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("announcement"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:f.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.users){let s=e.users;if(Array.isArray(s)){if(s.length<1){const e={instancePath:t+"/users",schemaPath:"#/properties/users/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};null===r?r=[e]:r.push(e),n++}const e=s.length;for(let i=0;i<e;i++)if("string"!=typeof s[i]){const e={instancePath:t+"/users/"+i,schemaPath:"#/properties/users/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/users",schemaPath:"#/properties/users/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.group&&"string"!=typeof e.group){const e={instancePath:t+"/group",schemaPath:"#/properties/group/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.body&&"string"!=typeof e.body){const e={instancePath:t+"/body",schemaPath:"#/properties/body/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.media&&(validate15(e.media,{instancePath:t+"/media",parentData:e,parentDataProperty:"media",rootData:a})||(r=null===r?validate15.errors:r.concat(validate15.errors),n=r.length)),void 0!==e.sentBy&&"string"!=typeof e.sentBy){const e={instancePath:t+"/sentBy",schemaPath:"#/properties/sentBy/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.tags){let s=e.tags;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++)if("string"!=typeof s[i]){const e={instancePath:t+"/tags/"+i,schemaPath:"#/properties/tags/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.createdAt){let s=e.createdAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/createdAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:g.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/createdAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.updatedAt){let s=e.updatedAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:g.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate14.errors=r,0===n},f={$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},g={type:["string","object"],format:"date-time"},P=Object.prototype.hasOwnProperty,b={$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"]},v=r().fullFormats.uri,w=r().fullFormats["date-time"];function validate15(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="mediaFile"),void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}for(const s in e)if(!P.call(b.properties,s)){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("mediaFile"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:b.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.fileHash&&"string"!=typeof e.fileHash){const e={instancePath:t+"/fileHash",schemaPath:"#/properties/fileHash/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.category&&"string"!=typeof e.category){const e={instancePath:t+"/category",schemaPath:"#/properties/category/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.mimeType){let s=e.mimeType;if("string"!=typeof s){const e={instancePath:t+"/mimeType",schemaPath:"#/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("image/*"!==s&&"image/jpeg"!==s&&"image/png"!==s&&"image/gif"!==s&&"image/webp"!==s&&"image/avif"!==s&&"image/svg+xml"!==s&&"application/pdf"!==s){const e={instancePath:t+"/mimeType",schemaPath:"#/properties/mimeType/enum",keyword:"enum",params:{allowedValues:b.properties.mimeType.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.data&&"string"!=typeof e.data){const e={instancePath:t+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.url){let s=e.url;if("string"==typeof s){if(!v(s)){const e={instancePath:t+"/url",schemaPath:"#/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.width){let s=e.width;if("number"!=typeof s||s%1||isNaN(s)){const e={instancePath:t+"/width",schemaPath:"#/properties/width/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===r?r=[e]:r.push(e),n++}if("number"==typeof s&&(s<0||isNaN(s))){const e={instancePath:t+"/width",schemaPath:"#/properties/width/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.height){let s=e.height;if("number"!=typeof s||s%1||isNaN(s)){const e={instancePath:t+"/height",schemaPath:"#/properties/height/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===r?r=[e]:r.push(e),n++}if("number"==typeof s&&(s<0||isNaN(s))){const e={instancePath:t+"/height",schemaPath:"#/properties/height/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.size){let s=e.size;if("number"!=typeof s||s%1||isNaN(s)){const e={instancePath:t+"/size",schemaPath:"#/properties/size/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===r?r=[e]:r.push(e),n++}if("number"==typeof s&&(s<0||isNaN(s))){const e={instancePath:t+"/size",schemaPath:"#/properties/size/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.uploadUrl){let s=e.uploadUrl;if("string"==typeof s){if(!v(s)){const e={instancePath:t+"/uploadUrl",schemaPath:"#/properties/uploadUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/uploadUrl",schemaPath:"#/properties/uploadUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.uploadUrlExpires){let s=e.uploadUrlExpires;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/uploadUrlExpires",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:g.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/uploadUrlExpires",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.createdBy&&"string"!=typeof e.createdBy){const e={instancePath:t+"/createdBy",schemaPath:"#/properties/createdBy/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate15.errors=r,0===n}var k=validate17,j={$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"]},A={type:"string",enum:["alarm","dimmer","switch","motionSensor","windowCovering","camera","mediaSource","thermostat","lock","courtesy","gateway","tv","dvr","appleTv","discPlayer","mediaPlayer","uncontrolledDevice"]};function validate18(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if((!e||"object"!=typeof e||Array.isArray(e))&&null!==e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:c.type},message:"must be object,null"};null===r?r=[e]:r.push(e),n++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.name){let s=e.name;if("string"!=typeof s){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("button 1"!==s&&"button 2"!==s&&"button 3"!==s&&"button 4"!==s&&"button 5"!==s&&"idle"!==s&&"powerHasBeedApplied"!==s&&"acMainsDisconnected"!==s&&"acMainsReconnected"!==s&&"replaceBatterySoon"!==s&&"replaceBatteryNow"!==s&&"batteryOk"!==s&&"hardwareFailure"!==s&&"softwareFailure"!==s&&"hardwareFailureWithCode"!==s&&"softwareFailureWithCode"!==s&&"motionDetection"!==s&&"airFilterNeedsCleaned"!==s&&"airFilterNeedsReplaced"!==s&&"smokeDetected"!==s&&"outsideSafeTemperatureRange"!==s&&"outsideSafeHumidityRange"!==s&&"scheduleMaintenance"!==s&&"doorAjar"!==s&&"communicationFailure"!==s&&"communicationOk"!==s&&"burglarAlarm"!==s&&"fireAlarm"!==s){const e={instancePath:t+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:y.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.timestamp){let s=e.timestamp;if("number"==typeof s){if(s<1655907956593||isNaN(s)){const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.description&&"string"!=typeof e.description){const e={instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}return validate18.errors=r,0===n}function validate17(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="camera"),void 0===e.id){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.driver){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===r?r=[e]:r.push(e),n++}for(const s in e)if(!P.call(j.properties,s)){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("alarm"!==s&&"dimmer"!==s&&"switch"!==s&&"motionSensor"!==s&&"windowCovering"!==s&&"camera"!==s&&"mediaSource"!==s&&"thermostat"!==s&&"lock"!==s&&"courtesy"!==s&&"gateway"!==s&&"tv"!==s&&"dvr"!==s&&"appleTv"!==s&&"discPlayer"!==s&&"mediaPlayer"!==s&&"uncontrolledDevice"!==s){const e={instancePath:t+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:A.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.offline&&"boolean"!=typeof e.offline){const e={instancePath:t+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.supportedNotifications){let s=e.supportedNotifications;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("button 1"!==e&&"button 2"!==e&&"button 3"!==e&&"button 4"!==e&&"button 5"!==e&&"idle"!==e&&"powerHasBeedApplied"!==e&&"acMainsDisconnected"!==e&&"acMainsReconnected"!==e&&"replaceBatterySoon"!==e&&"replaceBatteryNow"!==e&&"batteryOk"!==e&&"hardwareFailure"!==e&&"softwareFailure"!==e&&"hardwareFailureWithCode"!==e&&"softwareFailureWithCode"!==e&&"motionDetection"!==e&&"airFilterNeedsCleaned"!==e&&"airFilterNeedsReplaced"!==e&&"smokeDetected"!==e&&"outsideSafeTemperatureRange"!==e&&"outsideSafeHumidityRange"!==e&&"scheduleMaintenance"!==e&&"doorAjar"!==e&&"communicationFailure"!==e&&"communicationOk"!==e&&"burglarAlarm"!==e&&"fireAlarm"!==e){const e={instancePath:t+"/supportedNotifications/"+i,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:m.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}let i,a=s.length;if(a>1)e:for(;a--;)for(i=a;i--;)if(u(s[a],s[i])){const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:a,j:i},message:"must NOT have duplicate items (items ## "+i+" and "+a+" are identical)"};null===r?r=[e]:r.push(e),n++;break e}}else{const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.notification&&(validate18(e.notification,{instancePath:t+"/notification",parentData:e,parentDataProperty:"notification",rootData:a})||(r=null===r?validate18.errors:r.concat(validate18.errors),n=r.length)),void 0!==e.driver){let s=e.driver;if("string"!=typeof s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("adlink"!==s&&"aws-kinesis"!==s&&"butler"!==s&&"crestron"!==s&&"dell"!==s&&"dmp"!==s&&"doorbird"!==s&&"dormakaba"!==s&&"dsc"!==s&&"ecobee"!==s&&"epson"!==s&&"geovision-rs"!==s&&"geovision-as-manager"!==s&&"honeywell-vista"!==s&&"igor"!==s&&"inncom"!==s&&"isapi"!==s&&"kohost-k7"!==s&&"kohost"!==s&&"lg"!==s&&"lg-webos"!==s&&"lapi"!==s&&"lirc"!==s&&"mews"!==s&&"mht"!==s&&"paxton"!==s&&"pelican-wireless"!==s&&"power-shades"!==s&&"rachio"!==s&&"rebrandly"!==s&&"rtsp"!==s&&"salto"!==s&&"salto-irn"!==s&&"samsung"!==s&&"se"!==s&&"sendgrid"!==s&&"sonifi"!==s&&"stay-n-touch"!==s&&"storable"!==s&&"twilio"!==s&&"unifi"!==s&&"valcom"!==s&&"vizio"!==s&&"wisenet"!==s&&"cloudflare-images"!==s&&"cloudflare-stream"!==s&&"insperia-privacy"!==s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:d.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.liveStreams){let s=e.liveStreams;if(s&&"object"==typeof s&&!Array.isArray(s)){for(const e in s)if("iframe"!==e&&"hls"!==e&&"webRTC"!==e&&"rtsp"!==e){const s={instancePath:t+"/liveStreams",schemaPath:"#/properties/liveStreams/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===r?r=[s]:r.push(s),n++}if(void 0!==s.iframe){let e=s.iframe;if("string"!=typeof e&&null!==e){const e={instancePath:t+"/liveStreams/iframe",schemaPath:"#/properties/liveStreams/properties/iframe/type",keyword:"type",params:{type:j.properties.liveStreams.properties.iframe.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.hls){let e=s.hls;if("string"!=typeof e&&null!==e){const e={instancePath:t+"/liveStreams/hls",schemaPath:"#/properties/liveStreams/properties/hls/type",keyword:"type",params:{type:j.properties.liveStreams.properties.hls.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.webRTC){let e=s.webRTC;if("string"!=typeof e&&null!==e){const e={instancePath:t+"/liveStreams/webRTC",schemaPath:"#/properties/liveStreams/properties/webRTC/type",keyword:"type",params:{type:j.properties.liveStreams.properties.webRTC.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.rtsp){let e=s.rtsp;if("string"!=typeof e&&null!==e){const e={instancePath:t+"/liveStreams/rtsp",schemaPath:"#/properties/liveStreams/properties/rtsp/type",keyword:"type",params:{type:j.properties.liveStreams.properties.rtsp.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/liveStreams",schemaPath:"#/properties/liveStreams/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.liveStream){let s=e.liveStream;if(s&&"object"==typeof s&&!Array.isArray(s)){for(const e in s)if(!P.call(j.properties.liveStream.properties,e)){const s={instancePath:t+"/liveStream",schemaPath:"#/properties/liveStream/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===r?r=[s]:r.push(s),n++}if(void 0!==s.id&&"string"!=typeof s.id){const e={instancePath:t+"/liveStream/id",schemaPath:"#/properties/liveStream/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.driver){let e=s.driver;if("string"!=typeof e){const e={instancePath:t+"/liveStream/driver",schemaPath:"#/properties/liveStream/properties/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("cloudflare-stream"!==e&&"aws-kinesis"!==e&&"digital-watchdog"!==e){const e={instancePath:t+"/liveStream/driver",schemaPath:"#/properties/liveStream/properties/driver/enum",keyword:"enum",params:{allowedValues:j.properties.liveStream.properties.driver.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.allowedOrigins){let e=s.allowedOrigins;if(Array.isArray(e)){const s=e.length;for(let i=0;i<s;i++)if("string"!=typeof e[i]){const e={instancePath:t+"/liveStream/allowedOrigins/"+i,schemaPath:"#/properties/liveStream/properties/allowedOrigins/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/liveStream/allowedOrigins",schemaPath:"#/properties/liveStream/properties/allowedOrigins/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.authRequired&&"boolean"!=typeof s.authRequired){const e={instancePath:t+"/liveStream/authRequired",schemaPath:"#/properties/liveStream/properties/authRequired/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.iframe){let e=s.iframe;if("string"!=typeof e&&null!==e){const e={instancePath:t+"/liveStream/iframe",schemaPath:"#/properties/liveStream/properties/iframe/type",keyword:"type",params:{type:j.properties.liveStream.properties.iframe.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.hls){let e=s.hls;if("string"!=typeof e&&null!==e){const e={instancePath:t+"/liveStream/hls",schemaPath:"#/properties/liveStream/properties/hls/type",keyword:"type",params:{type:j.properties.liveStream.properties.hls.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.webRTC){let e=s.webRTC;if("string"!=typeof e&&null!==e){const e={instancePath:t+"/liveStream/webRTC",schemaPath:"#/properties/liveStream/properties/webRTC/type",keyword:"type",params:{type:j.properties.liveStream.properties.webRTC.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.rtsp){let e=s.rtsp;if("string"!=typeof e&&null!==e){const e={instancePath:t+"/liveStream/rtsp",schemaPath:"#/properties/liveStream/properties/rtsp/type",keyword:"type",params:{type:j.properties.liveStream.properties.rtsp.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.previewImage){let e=s.previewImage;if("string"!=typeof e&&null!==e){const e={instancePath:t+"/liveStream/previewImage",schemaPath:"#/properties/liveStream/properties/previewImage/type",keyword:"type",params:{type:j.properties.liveStream.properties.previewImage.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/liveStream",schemaPath:"#/properties/liveStream/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.watts){let s=e.watts;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.icon&&"string"!=typeof e.icon){const e={instancePath:t+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.modelNumber&&"string"!=typeof e.modelNumber){const e={instancePath:t+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.serialNumber&&"string"!=typeof e.serialNumber){const e={instancePath:t+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.firmwareVersion&&"string"!=typeof e.firmwareVersion){const e={instancePath:t+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate17.errors=r,0===n}var q=function validate20(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="category"),void 0===e.rating&&(e.rating=9),void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.discriminator){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if("string"!=typeof e.type){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.name){let s=e.name;if("string"==typeof s){if(l(s)<1){const e={instancePath:t+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.driver){let s=e.driver;if("string"!=typeof s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("adlink"!==s&&"aws-kinesis"!==s&&"butler"!==s&&"crestron"!==s&&"dell"!==s&&"dmp"!==s&&"doorbird"!==s&&"dormakaba"!==s&&"dsc"!==s&&"ecobee"!==s&&"epson"!==s&&"geovision-rs"!==s&&"geovision-as-manager"!==s&&"honeywell-vista"!==s&&"igor"!==s&&"inncom"!==s&&"isapi"!==s&&"kohost-k7"!==s&&"kohost"!==s&&"lg"!==s&&"lg-webos"!==s&&"lapi"!==s&&"lirc"!==s&&"mews"!==s&&"mht"!==s&&"paxton"!==s&&"pelican-wireless"!==s&&"power-shades"!==s&&"rachio"!==s&&"rebrandly"!==s&&"rtsp"!==s&&"salto"!==s&&"salto-irn"!==s&&"samsung"!==s&&"se"!==s&&"sendgrid"!==s&&"sonifi"!==s&&"stay-n-touch"!==s&&"storable"!==s&&"twilio"!==s&&"unifi"!==s&&"valcom"!==s&&"vizio"!==s&&"wisenet"!==s&&"cloudflare-images"!==s&&"cloudflare-stream"!==s&&"insperia-privacy"!==s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:d.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.description&&"string"!=typeof e.description){const e={instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}void 0!==e.image&&(validate15(e.image,{instancePath:t+"/image",parentData:e,parentDataProperty:"image",rootData:a})||(r=null===r?validate15.errors:r.concat(validate15.errors),n=r.length));let s=e.rating;if("number"==typeof s){if(s>10||isNaN(s)){const e={instancePath:t+"/rating",schemaPath:"#/properties/rating/maximum",keyword:"maximum",params:{comparison:"<=",limit:10},message:"must be <= 10"};null===r?r=[e]:r.push(e),n++}if(s<0||isNaN(s)){const e={instancePath:t+"/rating",schemaPath:"#/properties/rating/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/rating",schemaPath:"#/properties/rating/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.discriminator){let s=e.discriminator;if("string"!=typeof s){const e={instancePath:t+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("space"!==s&&"product"!==s&&"mediaFile"!==s){const e={instancePath:t+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:N.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate20.errors=r,0===n},N={$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 I=validate22,D={$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"]},$={enum:["privacy","service","none"]};function validate23(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if((!e||"object"!=typeof e||Array.isArray(e))&&null!==e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:c.type},message:"must be object,null"};null===r?r=[e]:r.push(e),n++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.name){let s=e.name;if("string"!=typeof s){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("button 1"!==s&&"button 2"!==s&&"button 3"!==s&&"button 4"!==s&&"button 5"!==s&&"idle"!==s&&"powerHasBeedApplied"!==s&&"acMainsDisconnected"!==s&&"acMainsReconnected"!==s&&"replaceBatterySoon"!==s&&"replaceBatteryNow"!==s&&"batteryOk"!==s&&"hardwareFailure"!==s&&"softwareFailure"!==s&&"hardwareFailureWithCode"!==s&&"softwareFailureWithCode"!==s&&"motionDetection"!==s&&"airFilterNeedsCleaned"!==s&&"airFilterNeedsReplaced"!==s&&"smokeDetected"!==s&&"outsideSafeTemperatureRange"!==s&&"outsideSafeHumidityRange"!==s&&"scheduleMaintenance"!==s&&"doorAjar"!==s&&"communicationFailure"!==s&&"communicationOk"!==s&&"burglarAlarm"!==s&&"fireAlarm"!==s){const e={instancePath:t+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:y.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.timestamp){let s=e.timestamp;if("number"==typeof s){if(s<1655907956593||isNaN(s)){const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.description&&"string"!=typeof e.description){const e={instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}return validate23.errors=r,0===n}function validate22(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.id){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.driver){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.supportedStates){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"supportedStates"},message:"must have required property 'supportedStates'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.state){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"state"},message:"must have required property 'state'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.type){let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("alarm"!==s&&"dimmer"!==s&&"switch"!==s&&"motionSensor"!==s&&"windowCovering"!==s&&"camera"!==s&&"mediaSource"!==s&&"thermostat"!==s&&"lock"!==s&&"courtesy"!==s&&"gateway"!==s&&"tv"!==s&&"dvr"!==s&&"appleTv"!==s&&"discPlayer"!==s&&"mediaPlayer"!==s&&"uncontrolledDevice"!==s){const e={instancePath:t+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:A.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.supportedNotifications){let s=e.supportedNotifications;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("button 1"!==e&&"button 2"!==e&&"button 3"!==e&&"button 4"!==e&&"button 5"!==e&&"idle"!==e&&"powerHasBeedApplied"!==e&&"acMainsDisconnected"!==e&&"acMainsReconnected"!==e&&"replaceBatterySoon"!==e&&"replaceBatteryNow"!==e&&"batteryOk"!==e&&"hardwareFailure"!==e&&"softwareFailure"!==e&&"hardwareFailureWithCode"!==e&&"softwareFailureWithCode"!==e&&"motionDetection"!==e&&"airFilterNeedsCleaned"!==e&&"airFilterNeedsReplaced"!==e&&"smokeDetected"!==e&&"outsideSafeTemperatureRange"!==e&&"outsideSafeHumidityRange"!==e&&"scheduleMaintenance"!==e&&"doorAjar"!==e&&"communicationFailure"!==e&&"communicationOk"!==e&&"burglarAlarm"!==e&&"fireAlarm"!==e){const e={instancePath:t+"/supportedNotifications/"+i,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:m.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}let i,a=s.length;if(a>1)e:for(;a--;)for(i=a;i--;)if(u(s[a],s[i])){const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:a,j:i},message:"must NOT have duplicate items (items ## "+i+" and "+a+" are identical)"};null===r?r=[e]:r.push(e),n++;break e}}else{const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.notification&&(validate23(e.notification,{instancePath:t+"/notification",parentData:e,parentDataProperty:"notification",rootData:a})||(r=null===r?validate23.errors:r.concat(validate23.errors),n=r.length)),void 0!==e.driver){let s=e.driver;if("string"!=typeof s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("adlink"!==s&&"aws-kinesis"!==s&&"butler"!==s&&"crestron"!==s&&"dell"!==s&&"dmp"!==s&&"doorbird"!==s&&"dormakaba"!==s&&"dsc"!==s&&"ecobee"!==s&&"epson"!==s&&"geovision-rs"!==s&&"geovision-as-manager"!==s&&"honeywell-vista"!==s&&"igor"!==s&&"inncom"!==s&&"isapi"!==s&&"kohost-k7"!==s&&"kohost"!==s&&"lg"!==s&&"lg-webos"!==s&&"lapi"!==s&&"lirc"!==s&&"mews"!==s&&"mht"!==s&&"paxton"!==s&&"pelican-wireless"!==s&&"power-shades"!==s&&"rachio"!==s&&"rebrandly"!==s&&"rtsp"!==s&&"salto"!==s&&"salto-irn"!==s&&"samsung"!==s&&"se"!==s&&"sendgrid"!==s&&"sonifi"!==s&&"stay-n-touch"!==s&&"storable"!==s&&"twilio"!==s&&"unifi"!==s&&"valcom"!==s&&"vizio"!==s&&"wisenet"!==s&&"cloudflare-images"!==s&&"cloudflare-stream"!==s&&"insperia-privacy"!==s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:d.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.offline&&"boolean"!=typeof e.offline){const e={instancePath:t+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.supportedStates){let s=e.supportedStates;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("privacy"!==e&&"service"!==e&&"none"!==e){const e={instancePath:t+"/supportedStates/"+i,schemaPath:"#/properties/supportedStates/items/enum",keyword:"enum",params:{allowedValues:D.properties.supportedStates.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}let i,a=s.length;if(a>1)e:for(;a--;)for(i=a;i--;)if(u(s[a],s[i])){const e={instancePath:t+"/supportedStates",schemaPath:"#/properties/supportedStates/uniqueItems",keyword:"uniqueItems",params:{i:a,j:i},message:"must NOT have duplicate items (items ## "+i+" and "+a+" are identical)"};null===r?r=[e]:r.push(e),n++;break e}}else{const e={instancePath:t+"/supportedStates",schemaPath:"#/properties/supportedStates/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.state){let s=e.state;if("string"!=typeof s){const e={instancePath:t+"/state",schemaPath:"#/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("privacy"!==s&&"service"!==s&&"none"!==s){const e={instancePath:t+"/state",schemaPath:"#/properties/supportedStates/items/enum",keyword:"enum",params:{allowedValues:$.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.watts){let s=e.watts;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.icon&&"string"!=typeof e.icon){const e={instancePath:t+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.modelNumber&&"string"!=typeof e.modelNumber){const e={instancePath:t+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.serialNumber&&"string"!=typeof e.serialNumber){const e={instancePath:t+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.firmwareVersion&&"string"!=typeof e.firmwareVersion){const e={instancePath:t+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate22.errors=r,0===n}var C=function validate25(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="credential"),void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.credential){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"credential"},message:"must have required property 'credential'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.expires){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"expires"},message:"must have required property 'expires'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if("string"!=typeof e.type){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.driver){let s=e.driver;if("string"!=typeof s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("adlink"!==s&&"aws-kinesis"!==s&&"butler"!==s&&"crestron"!==s&&"dell"!==s&&"dmp"!==s&&"doorbird"!==s&&"dormakaba"!==s&&"dsc"!==s&&"ecobee"!==s&&"epson"!==s&&"geovision-rs"!==s&&"geovision-as-manager"!==s&&"honeywell-vista"!==s&&"igor"!==s&&"inncom"!==s&&"isapi"!==s&&"kohost-k7"!==s&&"kohost"!==s&&"lg"!==s&&"lg-webos"!==s&&"lapi"!==s&&"lirc"!==s&&"mews"!==s&&"mht"!==s&&"paxton"!==s&&"pelican-wireless"!==s&&"power-shades"!==s&&"rachio"!==s&&"rebrandly"!==s&&"rtsp"!==s&&"salto"!==s&&"salto-irn"!==s&&"samsung"!==s&&"se"!==s&&"sendgrid"!==s&&"sonifi"!==s&&"stay-n-touch"!==s&&"storable"!==s&&"twilio"!==s&&"unifi"!==s&&"valcom"!==s&&"vizio"!==s&&"wisenet"!==s&&"cloudflare-images"!==s&&"cloudflare-stream"!==s&&"insperia-privacy"!==s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:d.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.discriminator){let s=e.discriminator;if("string"!=typeof s){const e={instancePath:t+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("verificationCode"!==s&&"token"!==s&&"mobileKey"!==s&&"pin"!==s&&"publicKey"!==s&&"passkeyChallenge"!==s){const e={instancePath:t+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:S.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.credential&&"string"!=typeof e.credential){const e={instancePath:t+"/credential",schemaPath:"#/properties/credential/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.userId&&"string"!=typeof e.userId){const e={instancePath:t+"/userId",schemaPath:"#/properties/userId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.organizationId&&"string"!=typeof e.organizationId){const e={instancePath:t+"/organizationId",schemaPath:"#/properties/organizationId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.propertyId&&"string"!=typeof e.propertyId){const e={instancePath:t+"/propertyId",schemaPath:"#/properties/propertyId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.deviceId&&"string"!=typeof e.deviceId){const e={instancePath:t+"/deviceId",schemaPath:"#/properties/deviceId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.userAgent&&"string"!=typeof e.userAgent){const e={instancePath:t+"/userAgent",schemaPath:"#/properties/userAgent/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.expires){let s=e.expires;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))&&null!==s){const e={instancePath:t+"/expires",schemaPath:"#/properties/expires/type",keyword:"type",params:{type:S.properties.expires.type},message:"must be string,object,null"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate25.errors=r,0===n},S={$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 O=function validate26(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="deviceRouter"),void 0===e.driver){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.organizationId){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"organizationId"},message:"must have required property 'organizationId'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("deviceRouter"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:F.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.driver&&"string"!=typeof e.driver){const e={instancePath:t+"/driver",schemaPath:"#/properties/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.organizationId){let s=e.organizationId;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/organizationId",schemaPath:"#/properties/organizationId/type",keyword:"type",params:{type:F.properties.organizationId.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.devices){let s=e.devices;if(s&&"object"==typeof s&&!Array.isArray(s));else{const e={instancePath:t+"/devices",schemaPath:"#/properties/devices/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate26.errors=r,0===n},F={$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 T=validate27,x={$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(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if((!e||"object"!=typeof e||Array.isArray(e))&&null!==e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:c.type},message:"must be object,null"};null===r?r=[e]:r.push(e),n++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.name){let s=e.name;if("string"!=typeof s){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("button 1"!==s&&"button 2"!==s&&"button 3"!==s&&"button 4"!==s&&"button 5"!==s&&"idle"!==s&&"powerHasBeedApplied"!==s&&"acMainsDisconnected"!==s&&"acMainsReconnected"!==s&&"replaceBatterySoon"!==s&&"replaceBatteryNow"!==s&&"batteryOk"!==s&&"hardwareFailure"!==s&&"softwareFailure"!==s&&"hardwareFailureWithCode"!==s&&"softwareFailureWithCode"!==s&&"motionDetection"!==s&&"airFilterNeedsCleaned"!==s&&"airFilterNeedsReplaced"!==s&&"smokeDetected"!==s&&"outsideSafeTemperatureRange"!==s&&"outsideSafeHumidityRange"!==s&&"scheduleMaintenance"!==s&&"doorAjar"!==s&&"communicationFailure"!==s&&"communicationOk"!==s&&"burglarAlarm"!==s&&"fireAlarm"!==s){const e={instancePath:t+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:y.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.timestamp){let s=e.timestamp;if("number"==typeof s){if(s<1655907956593||isNaN(s)){const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.description&&"string"!=typeof e.description){const e={instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}return validate28.errors=r,0===n}function validate27(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.id){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.level){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"level"},message:"must have required property 'level'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.driver){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.type){let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("alarm"!==s&&"dimmer"!==s&&"switch"!==s&&"motionSensor"!==s&&"windowCovering"!==s&&"camera"!==s&&"mediaSource"!==s&&"thermostat"!==s&&"lock"!==s&&"courtesy"!==s&&"gateway"!==s&&"tv"!==s&&"dvr"!==s&&"appleTv"!==s&&"discPlayer"!==s&&"mediaPlayer"!==s&&"uncontrolledDevice"!==s){const e={instancePath:t+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:A.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.supportedNotifications){let s=e.supportedNotifications;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("button 1"!==e&&"button 2"!==e&&"button 3"!==e&&"button 4"!==e&&"button 5"!==e&&"idle"!==e&&"powerHasBeedApplied"!==e&&"acMainsDisconnected"!==e&&"acMainsReconnected"!==e&&"replaceBatterySoon"!==e&&"replaceBatteryNow"!==e&&"batteryOk"!==e&&"hardwareFailure"!==e&&"softwareFailure"!==e&&"hardwareFailureWithCode"!==e&&"softwareFailureWithCode"!==e&&"motionDetection"!==e&&"airFilterNeedsCleaned"!==e&&"airFilterNeedsReplaced"!==e&&"smokeDetected"!==e&&"outsideSafeTemperatureRange"!==e&&"outsideSafeHumidityRange"!==e&&"scheduleMaintenance"!==e&&"doorAjar"!==e&&"communicationFailure"!==e&&"communicationOk"!==e&&"burglarAlarm"!==e&&"fireAlarm"!==e){const e={instancePath:t+"/supportedNotifications/"+i,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:m.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}let i,a=s.length;if(a>1)e:for(;a--;)for(i=a;i--;)if(u(s[a],s[i])){const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:a,j:i},message:"must NOT have duplicate items (items ## "+i+" and "+a+" are identical)"};null===r?r=[e]:r.push(e),n++;break e}}else{const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.notification&&(validate28(e.notification,{instancePath:t+"/notification",parentData:e,parentDataProperty:"notification",rootData:a})||(r=null===r?validate28.errors:r.concat(validate28.errors),n=r.length)),void 0!==e.driver){let s=e.driver;if("string"!=typeof s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("adlink"!==s&&"aws-kinesis"!==s&&"butler"!==s&&"crestron"!==s&&"dell"!==s&&"dmp"!==s&&"doorbird"!==s&&"dormakaba"!==s&&"dsc"!==s&&"ecobee"!==s&&"epson"!==s&&"geovision-rs"!==s&&"geovision-as-manager"!==s&&"honeywell-vista"!==s&&"igor"!==s&&"inncom"!==s&&"isapi"!==s&&"kohost-k7"!==s&&"kohost"!==s&&"lg"!==s&&"lg-webos"!==s&&"lapi"!==s&&"lirc"!==s&&"mews"!==s&&"mht"!==s&&"paxton"!==s&&"pelican-wireless"!==s&&"power-shades"!==s&&"rachio"!==s&&"rebrandly"!==s&&"rtsp"!==s&&"salto"!==s&&"salto-irn"!==s&&"samsung"!==s&&"se"!==s&&"sendgrid"!==s&&"sonifi"!==s&&"stay-n-touch"!==s&&"storable"!==s&&"twilio"!==s&&"unifi"!==s&&"valcom"!==s&&"vizio"!==s&&"wisenet"!==s&&"cloudflare-images"!==s&&"cloudflare-stream"!==s&&"insperia-privacy"!==s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:d.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.offline&&"boolean"!=typeof e.offline){const e={instancePath:t+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.level){let s=e.level;if("number"!=typeof s&&null!==s){const e={instancePath:t+"/level",schemaPath:"#/properties/level/type",keyword:"type",params:{type:x.properties.level.type},message:"must be number,null"};null===r?r=[e]:r.push(e),n++}if("number"==typeof s){if(s>100||isNaN(s)){const e={instancePath:t+"/level",schemaPath:"#/properties/level/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===r?r=[e]:r.push(e),n++}if(s<0||isNaN(s)){const e={instancePath:t+"/level",schemaPath:"#/properties/level/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.watts){let s=e.watts;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.icon&&"string"!=typeof e.icon){const e={instancePath:t+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.modelNumber&&"string"!=typeof e.modelNumber){const e={instancePath:t+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.serialNumber&&"string"!=typeof e.serialNumber){const e={instancePath:t+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.firmwareVersion&&"string"!=typeof e.firmwareVersion){const e={instancePath:t+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate27.errors=r,0===n}var M=function validate30(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="discoveredDevice"),void 0===e.name){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.deviceId){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"deviceId"},message:"must have required property 'deviceId'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.deviceData){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"deviceData"},message:"must have required property 'deviceData'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.deviceId&&"string"!=typeof e.deviceId){const e={instancePath:t+"/deviceId",schemaPath:"#/properties/deviceId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("discoveredDevice"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:z.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.discriminator){let s=e.discriminator;if("string"!=typeof s){const e={instancePath:t+"/discriminator",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("alarm"!==s&&"dimmer"!==s&&"switch"!==s&&"motionSensor"!==s&&"windowCovering"!==s&&"camera"!==s&&"mediaSource"!==s&&"thermostat"!==s&&"lock"!==s&&"courtesy"!==s&&"gateway"!==s&&"tv"!==s&&"dvr"!==s&&"appleTv"!==s&&"discPlayer"!==s&&"mediaPlayer"!==s&&"uncontrolledDevice"!==s){const e={instancePath:t+"/discriminator",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:A.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.driver&&"string"!=typeof e.driver){const e={instancePath:t+"/driver",schemaPath:"#/properties/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.deviceData){let s=e.deviceData;if(!s||"object"!=typeof s||Array.isArray(s)){const e={instancePath:t+"/deviceData",schemaPath:"#/properties/deviceData/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.ignore&&"boolean"!=typeof e.ignore){const e={instancePath:t+"/ignore",schemaPath:"#/properties/ignore/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.organizationId){let s=e.organizationId;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/organizationId",schemaPath:"#/properties/organizationId/type",keyword:"type",params:{type:z.properties.organizationId.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.propertyId){let s=e.propertyId;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/propertyId",schemaPath:"#/properties/propertyId/type",keyword:"type",params:{type:z.properties.propertyId.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate30.errors=r,0===n},z={$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 R=function validate31(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="emailMessage"),void 0===e.to){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"to"},message:"must have required property 'to'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.from){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"from"},message:"must have required property 'from'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.status){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.subject){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"subject"},message:"must have required property 'subject'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("emailMessage"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:V.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.to){let s=e.to;if("string"==typeof s){if(!B.test(s)){const e={instancePath:t+"/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===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/to",schemaPath:"#/properties/to/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.from){let s=e.from;if("string"==typeof s){if(!L.test(s)){const e={instancePath:t+"/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===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/from",schemaPath:"#/properties/from/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.subject&&"string"!=typeof e.subject){const e={instancePath:t+"/subject",schemaPath:"#/properties/subject/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.status){let s=e.status;if("string"!=typeof s){const e={instancePath:t+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("queued"!==s&&"sending"!==s&&"sent"!==s&&"deferred"!==s&&"delivered"!==s&&"undelivered"!==s&&"bounced"!==s&&"blocked"!==s&&"receiving"!==s&&"received"!==s&&"opened"!==s&&"clicked"!==s&&"unsubscribed"!==s&&"spamReport"!==s){const e={instancePath:t+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:V.properties.status.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.statusMessage&&"string"!=typeof e.statusMessage){const e={instancePath:t+"/statusMessage",schemaPath:"#/properties/statusMessage/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.html&&"string"!=typeof e.html){const e={instancePath:t+"/html",schemaPath:"#/properties/html/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.text&&"string"!=typeof e.text){const e={instancePath:t+"/text",schemaPath:"#/properties/text/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.driver&&"string"!=typeof e.driver){const e={instancePath:t+"/driver",schemaPath:"#/properties/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.appData){let s=e.appData;if(!s||"object"!=typeof s||Array.isArray(s)){const e={instancePath:t+"/appData",schemaPath:"#/properties/appData/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.createdAt){let s=e.createdAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/createdAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:g.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/createdAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.updatedAt){let s=e.updatedAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:g.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate31.errors=r,0===n},V={$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"}}},B=new RegExp("^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$","u"),L=new RegExp(".*<[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+>.*","u");var U=function validate32(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="energyReport"),void 0===e.id){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.roomId){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"roomId"},message:"must have required property 'roomId'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.first){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"first"},message:"must have required property 'first'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.last){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"last"},message:"must have required property 'last'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.consumption){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"consumption"},message:"must have required property 'consumption'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.totals){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"totals"},message:"must have required property 'totals'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.costPerKw){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"costPerKw"},message:"must have required property 'costPerKw'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("energyReport"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:E.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.reportTime){let s=e.reportTime;if("hourly"!==s&&"daily"!==s&&"monthly"!==s){const e={instancePath:t+"/reportTime",schemaPath:"#/properties/reportTime/enum",keyword:"enum",params:{allowedValues:E.properties.reportTime.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.roomId){let s=e.roomId;if("string"!=typeof s){const e={instancePath:t+"/roomId",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/roomId",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.first){let s=e.first;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/first",schemaPath:"#/properties/first/type",keyword:"type",params:{type:E.properties.first.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/first",schemaPath:"#/properties/first/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.last){let s=e.last;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/last",schemaPath:"#/properties/last/type",keyword:"type",params:{type:E.properties.last.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/last",schemaPath:"#/properties/last/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.consumption){let s=e.consumption;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.id){const e={instancePath:t+"/consumption/"+i,schemaPath:"#/properties/consumption/items/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t+"/consumption/"+i,schemaPath:"#/properties/consumption/items/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.kwh){const e={instancePath:t+"/consumption/"+i,schemaPath:"#/properties/consumption/items/required",keyword:"required",params:{missingProperty:"kwh"},message:"must have required property 'kwh'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/consumption/"+i+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const a=n,o=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(o===n){const e={instancePath:t+"/consumption/"+i+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=a,null!==r&&(a?r.length=a:r=null)}if(void 0!==e.type){let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/consumption/"+i+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("alarm"!==s&&"dimmer"!==s&&"switch"!==s&&"motionSensor"!==s&&"windowCovering"!==s&&"camera"!==s&&"mediaSource"!==s&&"thermostat"!==s&&"lock"!==s&&"courtesy"!==s&&"gateway"!==s&&"tv"!==s&&"dvr"!==s&&"appleTv"!==s&&"discPlayer"!==s&&"mediaPlayer"!==s&&"uncontrolledDevice"!==s){const e={instancePath:t+"/consumption/"+i+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:A.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.kwh){let s=e.kwh;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/consumption/"+i+"/kwh",schemaPath:"#/properties/consumption/items/properties/kwh/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/consumption/"+i+"/kwh",schemaPath:"#/properties/consumption/items/properties/kwh/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/consumption/"+i,schemaPath:"#/properties/consumption/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/consumption",schemaPath:"#/properties/consumption/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.totals){let s=e.totals;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.lights){const e={instancePath:t+"/totals/"+i,schemaPath:"#/properties/totals/items/required",keyword:"required",params:{missingProperty:"lights"},message:"must have required property 'lights'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.climate){const e={instancePath:t+"/totals/"+i,schemaPath:"#/properties/totals/items/required",keyword:"required",params:{missingProperty:"climate"},message:"must have required property 'climate'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.media){const e={instancePath:t+"/totals/"+i,schemaPath:"#/properties/totals/items/required",keyword:"required",params:{missingProperty:"media"},message:"must have required property 'media'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.lights){let s=e.lights;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/totals/"+i+"/lights",schemaPath:"#/properties/totals/items/properties/lights/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/totals/"+i+"/lights",schemaPath:"#/properties/totals/items/properties/lights/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.climate){let s=e.climate;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/totals/"+i+"/climate",schemaPath:"#/properties/totals/items/properties/climate/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/totals/"+i+"/climate",schemaPath:"#/properties/totals/items/properties/climate/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.media){let s=e.media;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/totals/"+i+"/media",schemaPath:"#/properties/totals/items/properties/media/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/totals/"+i+"/media",schemaPath:"#/properties/totals/items/properties/media/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/totals/"+i,schemaPath:"#/properties/totals/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/totals",schemaPath:"#/properties/totals/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.costPerKw){let s=e.costPerKw;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/costPerKw",schemaPath:"#/properties/costPerKw/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/costPerKw",schemaPath:"#/properties/costPerKw/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate32.errors=r,0===n},E={$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 K=function validate33(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="energyReportShard"),void 0===e.ndata&&(e.ndata=0),void 0===e.id){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.roomId){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"roomId"},message:"must have required property 'roomId'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.first){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"first"},message:"must have required property 'first'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.last){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"last"},message:"must have required property 'last'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.data){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"data"},message:"must have required property 'data'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.ndata){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"ndata"},message:"must have required property 'ndata'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.expires){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"expires"},message:"must have required property 'expires'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("energyReportShard"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:H.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.roomId){let s=e.roomId;if("string"!=typeof s){const e={instancePath:t+"/roomId",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/roomId",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.first){let s=e.first;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/first",schemaPath:"#/properties/first/type",keyword:"type",params:{type:H.properties.first.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/first",schemaPath:"#/properties/first/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.last){let s=e.last;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/last",schemaPath:"#/properties/last/type",keyword:"type",params:{type:H.properties.last.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/last",schemaPath:"#/properties/last/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.data){let s=e.data;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.time){const e={instancePath:t+"/data/"+i,schemaPath:"#/properties/data/items/required",keyword:"required",params:{missingProperty:"time"},message:"must have required property 'time'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.watts){const e={instancePath:t+"/data/"+i,schemaPath:"#/properties/data/items/required",keyword:"required",params:{missingProperty:"watts"},message:"must have required property 'watts'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.id){const e={instancePath:t+"/data/"+i,schemaPath:"#/properties/data/items/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t+"/data/"+i,schemaPath:"#/properties/data/items/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.value){const e={instancePath:t+"/data/"+i,schemaPath:"#/properties/data/items/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.time){let s=e.time;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/data/"+i+"/time",schemaPath:"#/properties/data/items/properties/time/type",keyword:"type",params:{type:H.properties.data.items.properties.time.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/data/"+i+"/time",schemaPath:"#/properties/data/items/properties/time/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.watts){let s=e.watts;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/data/"+i+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/data/"+i+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/data/"+i+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const a=n,o=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(o===n){const e={instancePath:t+"/data/"+i+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=a,null!==r&&(a?r.length=a:r=null)}if(void 0!==e.type){let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/data/"+i+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("alarm"!==s&&"dimmer"!==s&&"switch"!==s&&"motionSensor"!==s&&"windowCovering"!==s&&"camera"!==s&&"mediaSource"!==s&&"thermostat"!==s&&"lock"!==s&&"courtesy"!==s&&"gateway"!==s&&"tv"!==s&&"dvr"!==s&&"appleTv"!==s&&"discPlayer"!==s&&"mediaPlayer"!==s&&"uncontrolledDevice"!==s){const e={instancePath:t+"/data/"+i+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:A.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.value){let s=e.value;if("number"==typeof s){if(s>1||isNaN(s)){const e={instancePath:t+"/data/"+i+"/value",schemaPath:"#/properties/data/items/properties/value/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};null===r?r=[e]:r.push(e),n++}if(s<0||isNaN(s)){const e={instancePath:t+"/data/"+i+"/value",schemaPath:"#/properties/data/items/properties/value/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/data/"+i+"/value",schemaPath:"#/properties/data/items/properties/value/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/data/"+i,schemaPath:"#/properties/data/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}let i=e.ndata;if("number"!=typeof i||i%1||isNaN(i)){const e={instancePath:t+"/ndata",schemaPath:"#/properties/ndata/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===r?r=[e]:r.push(e),n++}if("number"==typeof i){if(i>1e5||isNaN(i)){const e={instancePath:t+"/ndata",schemaPath:"#/properties/ndata/maximum",keyword:"maximum",params:{comparison:"<=",limit:1e5},message:"must be <= 100000"};null===r?r=[e]:r.push(e),n++}if(i<0||isNaN(i)){const e={instancePath:t+"/ndata",schemaPath:"#/properties/ndata/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.expires){let s=e.expires;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/expires",schemaPath:"#/properties/expires/type",keyword:"type",params:{type:H.properties.expires.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/expires",schemaPath:"#/properties/expires/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate33.errors=r,0===n},H={$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 _=function validate34(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.id){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.status){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.driver){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.type){let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("alarm"!==s&&"dimmer"!==s&&"switch"!==s&&"motionSensor"!==s&&"windowCovering"!==s&&"camera"!==s&&"mediaSource"!==s&&"thermostat"!==s&&"lock"!==s&&"courtesy"!==s&&"gateway"!==s&&"tv"!==s&&"dvr"!==s&&"appleTv"!==s&&"discPlayer"!==s&&"mediaPlayer"!==s&&"uncontrolledDevice"!==s){const e={instancePath:t+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:A.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.supportedNotifications){let s=e.supportedNotifications;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("button 1"!==e&&"button 2"!==e&&"button 3"!==e&&"button 4"!==e&&"button 5"!==e&&"idle"!==e&&"powerHasBeedApplied"!==e&&"acMainsDisconnected"!==e&&"acMainsReconnected"!==e&&"replaceBatterySoon"!==e&&"replaceBatteryNow"!==e&&"batteryOk"!==e&&"hardwareFailure"!==e&&"softwareFailure"!==e&&"hardwareFailureWithCode"!==e&&"softwareFailureWithCode"!==e&&"motionDetection"!==e&&"airFilterNeedsCleaned"!==e&&"airFilterNeedsReplaced"!==e&&"smokeDetected"!==e&&"outsideSafeTemperatureRange"!==e&&"outsideSafeHumidityRange"!==e&&"scheduleMaintenance"!==e&&"doorAjar"!==e&&"communicationFailure"!==e&&"communicationOk"!==e&&"burglarAlarm"!==e&&"fireAlarm"!==e){const e={instancePath:t+"/supportedNotifications/"+i,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:m.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}let i,a=s.length;if(a>1)e:for(;a--;)for(i=a;i--;)if(u(s[a],s[i])){const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:a,j:i},message:"must NOT have duplicate items (items ## "+i+" and "+a+" are identical)"};null===r?r=[e]:r.push(e),n++;break e}}else{const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.notification&&(validate35(e.notification,{instancePath:t+"/notification",parentData:e,parentDataProperty:"notification",rootData:a})||(r=null===r?validate35.errors:r.concat(validate35.errors),n=r.length)),void 0!==e.status&&"string"!=typeof e.status){const e={instancePath:t+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.driver){let s=e.driver;if("string"!=typeof s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("adlink"!==s&&"aws-kinesis"!==s&&"butler"!==s&&"crestron"!==s&&"dell"!==s&&"dmp"!==s&&"doorbird"!==s&&"dormakaba"!==s&&"dsc"!==s&&"ecobee"!==s&&"epson"!==s&&"geovision-rs"!==s&&"geovision-as-manager"!==s&&"honeywell-vista"!==s&&"igor"!==s&&"inncom"!==s&&"isapi"!==s&&"kohost-k7"!==s&&"kohost"!==s&&"lg"!==s&&"lg-webos"!==s&&"lapi"!==s&&"lirc"!==s&&"mews"!==s&&"mht"!==s&&"paxton"!==s&&"pelican-wireless"!==s&&"power-shades"!==s&&"rachio"!==s&&"rebrandly"!==s&&"rtsp"!==s&&"salto"!==s&&"salto-irn"!==s&&"samsung"!==s&&"se"!==s&&"sendgrid"!==s&&"sonifi"!==s&&"stay-n-touch"!==s&&"storable"!==s&&"twilio"!==s&&"unifi"!==s&&"valcom"!==s&&"vizio"!==s&&"wisenet"!==s&&"cloudflare-images"!==s&&"cloudflare-stream"!==s&&"insperia-privacy"!==s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:d.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.watts){let s=e.watts;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.icon&&"string"!=typeof e.icon){const e={instancePath:t+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.modelNumber&&"string"!=typeof e.modelNumber){const e={instancePath:t+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.serialNumber&&"string"!=typeof e.serialNumber){const e={instancePath:t+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.firmwareVersion&&"string"!=typeof e.firmwareVersion){const e={instancePath:t+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate34.errors=r,0===n};function validate35(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if((!e||"object"!=typeof e||Array.isArray(e))&&null!==e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:c.type},message:"must be object,null"};null===r?r=[e]:r.push(e),n++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.name){let s=e.name;if("string"!=typeof s){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("button 1"!==s&&"button 2"!==s&&"button 3"!==s&&"button 4"!==s&&"button 5"!==s&&"idle"!==s&&"powerHasBeedApplied"!==s&&"acMainsDisconnected"!==s&&"acMainsReconnected"!==s&&"replaceBatterySoon"!==s&&"replaceBatteryNow"!==s&&"batteryOk"!==s&&"hardwareFailure"!==s&&"softwareFailure"!==s&&"hardwareFailureWithCode"!==s&&"softwareFailureWithCode"!==s&&"motionDetection"!==s&&"airFilterNeedsCleaned"!==s&&"airFilterNeedsReplaced"!==s&&"smokeDetected"!==s&&"outsideSafeTemperatureRange"!==s&&"outsideSafeHumidityRange"!==s&&"scheduleMaintenance"!==s&&"doorAjar"!==s&&"communicationFailure"!==s&&"communicationOk"!==s&&"burglarAlarm"!==s&&"fireAlarm"!==s){const e={instancePath:t+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:y.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.timestamp){let s=e.timestamp;if("number"==typeof s){if(s<1655907956593||isNaN(s)){const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.description&&"string"!=typeof e.description){const e={instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}return validate35.errors=r,0===n}var W=validate37,Z={$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(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;const o=n;let p=!1,m=null;const d=n;if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0===e.number){const e={instancePath:t,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"number"},message:"must have required property 'number'"};null===r?r=[e]:r.push(e),n++}(c=d===n)&&(p=!0,m=0);const u=n;if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0===e.encryptedNumber){const e={instancePath:t,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"encryptedNumber"},message:"must have required property 'encryptedNumber'"};null===r?r=[e]:r.push(e),n++}var c;if((c=u===n)&&p?(p=!1,m=[m,1]):c&&(p=!0,m=1),p)n=o,null!==r&&(o?r.length=o:r=null);else{const e={instancePath:t,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:m},message:"must match exactly one schema in oneOf"};null===r?r=[e]:r.push(e),n++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.type){let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("driversLicense"!==s&&"passport"!==s&&"identityCard"!==s&&"visa"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:Z.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.issued){let s=e.issued;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/issued",schemaPath:"#/properties/issued/type",keyword:"type",params:{type:Z.properties.issued.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/issued",schemaPath:"#/properties/issued/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.expires){let s=e.expires;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))&&null!==s){const e={instancePath:t+"/expires",schemaPath:"#/properties/expires/type",keyword:"type",params:{type:Z.properties.expires.type},message:"must be string,object,null"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/expires",schemaPath:"#/properties/expires/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.verified&&"boolean"!=typeof e.verified){const e={instancePath:t+"/verified",schemaPath:"#/properties/verified/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.matched&&"boolean"!=typeof e.matched){const e={instancePath:t+"/matched",schemaPath:"#/properties/matched/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.firstName&&"string"!=typeof e.firstName){const e={instancePath:t+"/firstName",schemaPath:"#/properties/firstName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.lastName&&"string"!=typeof e.lastName){const e={instancePath:t+"/lastName",schemaPath:"#/properties/lastName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.issuingCountry){let s=e.issuingCountry;if("string"==typeof s){if(l(s)>2){const e={instancePath:t+"/issuingCountry",schemaPath:"#/properties/issuingCountry/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===r?r=[e]:r.push(e),n++}if(l(s)<2){const e={instancePath:t+"/issuingCountry",schemaPath:"#/properties/issuingCountry/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===r?r=[e]:r.push(e),n++}}}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate37.errors=r,0===n}var G=function validate38(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="issue"),void 0===e.autoCreateTicket&&(e.autoCreateTicket=!0),void 0===e.excludedResources&&(e.excludedResources=[]),void 0===e.id){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.name){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.department){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"department"},message:"must have required property 'department'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("issue"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:Y.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.description&&"string"!=typeof e.description){const e={instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.department&&"string"!=typeof e.department){const e={instancePath:t+"/department",schemaPath:"#/properties/department/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.autoAssign){let s=e.autoAssign;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.userId&&"string"!=typeof s.userId){const e={instancePath:t+"/autoAssign/userId",schemaPath:"#/properties/autoAssign/properties/userId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.vendorId&&"string"!=typeof s.vendorId){const e={instancePath:t+"/autoAssign/vendorId",schemaPath:"#/properties/autoAssign/properties/vendorId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.priority){let e=s.priority;if("string"!=typeof e){const e={instancePath:t+"/autoAssign/priority",schemaPath:"ticket.json#/properties/priority/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("low"!==e&&"normal"!==e&&"high"!==e){const e={instancePath:t+"/autoAssign/priority",schemaPath:"ticket.json#/properties/priority/enum",keyword:"enum",params:{allowedValues:X.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.tags){let e=s.tags;if(Array.isArray(e)){const s=e.length;for(let i=0;i<s;i++)if("string"!=typeof e[i]){const e={instancePath:t+"/autoAssign/tags/"+i,schemaPath:"#/properties/autoAssign/properties/tags/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/autoAssign/tags",schemaPath:"#/properties/autoAssign/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/autoAssign",schemaPath:"#/properties/autoAssign/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.systemKey&&"string"!=typeof e.systemKey){const e={instancePath:t+"/systemKey",schemaPath:"#/properties/systemKey/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("boolean"!=typeof e.autoCreateTicket){const e={instancePath:t+"/autoCreateTicket",schemaPath:"#/properties/autoCreateTicket/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}let i=e.excludedResources;if(Array.isArray(i)){const e=i.length;for(let s=0;s<e;s++)if("string"!=typeof i[s]){const e={instancePath:t+"/excludedResources/"+s,schemaPath:"#/properties/excludedResources/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/excludedResources",schemaPath:"#/properties/excludedResources/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate38.errors=r,0===n},Y={$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"]},X={type:"string",enum:["low","normal","high"],default:"normal"};var Q=validate45,J={$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(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if((!e||"object"!=typeof e||Array.isArray(e))&&null!==e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:c.type},message:"must be object,null"};null===r?r=[e]:r.push(e),n++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.name){let s=e.name;if("string"!=typeof s){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("button 1"!==s&&"button 2"!==s&&"button 3"!==s&&"button 4"!==s&&"button 5"!==s&&"idle"!==s&&"powerHasBeedApplied"!==s&&"acMainsDisconnected"!==s&&"acMainsReconnected"!==s&&"replaceBatterySoon"!==s&&"replaceBatteryNow"!==s&&"batteryOk"!==s&&"hardwareFailure"!==s&&"softwareFailure"!==s&&"hardwareFailureWithCode"!==s&&"softwareFailureWithCode"!==s&&"motionDetection"!==s&&"airFilterNeedsCleaned"!==s&&"airFilterNeedsReplaced"!==s&&"smokeDetected"!==s&&"outsideSafeTemperatureRange"!==s&&"outsideSafeHumidityRange"!==s&&"scheduleMaintenance"!==s&&"doorAjar"!==s&&"communicationFailure"!==s&&"communicationOk"!==s&&"burglarAlarm"!==s&&"fireAlarm"!==s){const e={instancePath:t+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:y.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.timestamp){let s=e.timestamp;if("number"==typeof s){if(s<1655907956593||isNaN(s)){const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.description&&"string"!=typeof e.description){const e={instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}return validate46.errors=r,0===n}function validate45(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.mode&&(e.mode=null),void 0===e.id){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.state){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"state"},message:"must have required property 'state'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.driver){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.type){let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("alarm"!==s&&"dimmer"!==s&&"switch"!==s&&"motionSensor"!==s&&"windowCovering"!==s&&"camera"!==s&&"mediaSource"!==s&&"thermostat"!==s&&"lock"!==s&&"courtesy"!==s&&"gateway"!==s&&"tv"!==s&&"dvr"!==s&&"appleTv"!==s&&"discPlayer"!==s&&"mediaPlayer"!==s&&"uncontrolledDevice"!==s){const e={instancePath:t+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:A.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.offline&&"boolean"!=typeof e.offline){const e={instancePath:t+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.supportedNotifications){let s=e.supportedNotifications;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("button 1"!==e&&"button 2"!==e&&"button 3"!==e&&"button 4"!==e&&"button 5"!==e&&"idle"!==e&&"powerHasBeedApplied"!==e&&"acMainsDisconnected"!==e&&"acMainsReconnected"!==e&&"replaceBatterySoon"!==e&&"replaceBatteryNow"!==e&&"batteryOk"!==e&&"hardwareFailure"!==e&&"softwareFailure"!==e&&"hardwareFailureWithCode"!==e&&"softwareFailureWithCode"!==e&&"motionDetection"!==e&&"airFilterNeedsCleaned"!==e&&"airFilterNeedsReplaced"!==e&&"smokeDetected"!==e&&"outsideSafeTemperatureRange"!==e&&"outsideSafeHumidityRange"!==e&&"scheduleMaintenance"!==e&&"doorAjar"!==e&&"communicationFailure"!==e&&"communicationOk"!==e&&"burglarAlarm"!==e&&"fireAlarm"!==e){const e={instancePath:t+"/supportedNotifications/"+i,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:m.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}let i,a=s.length;if(a>1)e:for(;a--;)for(i=a;i--;)if(u(s[a],s[i])){const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:a,j:i},message:"must NOT have duplicate items (items ## "+i+" and "+a+" are identical)"};null===r?r=[e]:r.push(e),n++;break e}}else{const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.notification&&(validate46(e.notification,{instancePath:t+"/notification",parentData:e,parentDataProperty:"notification",rootData:a})||(r=null===r?validate46.errors:r.concat(validate46.errors),n=r.length)),void 0!==e.driver){let s=e.driver;if("string"!=typeof s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("adlink"!==s&&"aws-kinesis"!==s&&"butler"!==s&&"crestron"!==s&&"dell"!==s&&"dmp"!==s&&"doorbird"!==s&&"dormakaba"!==s&&"dsc"!==s&&"ecobee"!==s&&"epson"!==s&&"geovision-rs"!==s&&"geovision-as-manager"!==s&&"honeywell-vista"!==s&&"igor"!==s&&"inncom"!==s&&"isapi"!==s&&"kohost-k7"!==s&&"kohost"!==s&&"lg"!==s&&"lg-webos"!==s&&"lapi"!==s&&"lirc"!==s&&"mews"!==s&&"mht"!==s&&"paxton"!==s&&"pelican-wireless"!==s&&"power-shades"!==s&&"rachio"!==s&&"rebrandly"!==s&&"rtsp"!==s&&"salto"!==s&&"salto-irn"!==s&&"samsung"!==s&&"se"!==s&&"sendgrid"!==s&&"sonifi"!==s&&"stay-n-touch"!==s&&"storable"!==s&&"twilio"!==s&&"unifi"!==s&&"valcom"!==s&&"vizio"!==s&&"wisenet"!==s&&"cloudflare-images"!==s&&"cloudflare-stream"!==s&&"insperia-privacy"!==s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:d.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.state){let s=e.state;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/state",schemaPath:"#/properties/state/type",keyword:"type",params:{type:J.properties.state.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}if("locked"!==s&&"unlocked"!==s&&null!==s){const e={instancePath:t+"/state",schemaPath:"#/properties/state/enum",keyword:"enum",params:{allowedValues:J.properties.state.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}let s=e.mode;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/mode",schemaPath:"#/properties/mode/type",keyword:"type",params:{type:J.properties.mode.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}if("normal"!==s&&"autoLock"!==s&&"emergencyOpen"!==s&&"emergencyClose"!==s&&"holdOpen"!==s&&"lockdown"!==s&&null!==s){const e={instancePath:t+"/mode",schemaPath:"#/properties/mode/enum",keyword:"enum",params:{allowedValues:J.properties.mode.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.supportedModes){let s=e.supportedModes;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("normal"!==e&&"autoLock"!==e&&"emergencyOpen"!==e&&"emergencyClose"!==e&&"holdOpen"!==e&&"lockdown"!==e&&null!==e){const e={instancePath:t+"/supportedModes/"+i,schemaPath:"#/properties/supportedModes/items/enum",keyword:"enum",params:{allowedValues:J.properties.supportedModes.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}let i,a=s.length;if(a>1)e:for(;a--;)for(i=a;i--;)if(u(s[a],s[i])){const e={instancePath:t+"/supportedModes",schemaPath:"#/properties/supportedModes/uniqueItems",keyword:"uniqueItems",params:{i:a,j:i},message:"must NOT have duplicate items (items ## "+i+" and "+a+" are identical)"};null===r?r=[e]:r.push(e),n++;break e}}else{const e={instancePath:t+"/supportedModes",schemaPath:"#/properties/supportedModes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.batteryLevel){let s=e.batteryLevel;if("number"==typeof s){if(s>100||isNaN(s)){const e={instancePath:t+"/batteryLevel",schemaPath:"definitions.json#/definitions/batteryLevel/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===r?r=[e]:r.push(e),n++}if(s<0||isNaN(s)){const e={instancePath:t+"/batteryLevel",schemaPath:"definitions.json#/definitions/batteryLevel/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/batteryLevel",schemaPath:"definitions.json#/definitions/batteryLevel/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.watts){let s=e.watts;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.icon&&"string"!=typeof e.icon){const e={instancePath:t+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.modelNumber&&"string"!=typeof e.modelNumber){const e={instancePath:t+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.serialNumber&&"string"!=typeof e.serialNumber){const e={instancePath:t+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.firmwareVersion&&"string"!=typeof e.firmwareVersion){const e={instancePath:t+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate45.errors=r,0===n}var ee=function validate48(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){void 0===e.type&&(e.type="log");let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("log"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:te.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.timestamp){let s=e.timestamp;if("number"==typeof s){if(s<1655907956593||isNaN(s)){const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.field1){let s=e.field1;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0===s.name){const e={instancePath:t+"/field1",schemaPath:"#/properties/field1/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===s.value){const e={instancePath:t+"/field1",schemaPath:"#/properties/field1/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.name&&"string"!=typeof s.name){const e={instancePath:t+"/field1/name",schemaPath:"#/properties/field1/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.value&&"string"!=typeof s.value){const e={instancePath:t+"/field1/value",schemaPath:"#/properties/field1/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/field1",schemaPath:"#/properties/field1/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.field2){let s=e.field2;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0===s.name){const e={instancePath:t+"/field2",schemaPath:"#/properties/field2/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===s.value){const e={instancePath:t+"/field2",schemaPath:"#/properties/field2/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.name&&"string"!=typeof s.name){const e={instancePath:t+"/field2/name",schemaPath:"#/properties/field2/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.value&&"string"!=typeof s.value){const e={instancePath:t+"/field2/value",schemaPath:"#/properties/field2/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/field2",schemaPath:"#/properties/field2/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.field3){let s=e.field3;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0===s.name){const e={instancePath:t+"/field3",schemaPath:"#/properties/field3/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===s.value){const e={instancePath:t+"/field3",schemaPath:"#/properties/field3/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.name&&"string"!=typeof s.name){const e={instancePath:t+"/field3/name",schemaPath:"#/properties/field3/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.value&&"string"!=typeof s.value){const e={instancePath:t+"/field3/value",schemaPath:"#/properties/field3/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/field3",schemaPath:"#/properties/field3/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.field4){let s=e.field4;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0===s.name){const e={instancePath:t+"/field4",schemaPath:"#/properties/field4/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===s.value){const e={instancePath:t+"/field4",schemaPath:"#/properties/field4/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.name&&"string"!=typeof s.name){const e={instancePath:t+"/field4/name",schemaPath:"#/properties/field4/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.value&&"string"!=typeof s.value){const e={instancePath:t+"/field4/value",schemaPath:"#/properties/field4/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/field4",schemaPath:"#/properties/field4/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.field5){let s=e.field5;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0===s.name){const e={instancePath:t+"/field5",schemaPath:"#/properties/field5/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===s.value){const e={instancePath:t+"/field5",schemaPath:"#/properties/field5/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.name&&"string"!=typeof s.name){const e={instancePath:t+"/field5/name",schemaPath:"#/properties/field5/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.value&&"string"!=typeof s.value){const e={instancePath:t+"/field5/value",schemaPath:"#/properties/field5/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/field5",schemaPath:"#/properties/field5/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.field6){let s=e.field6;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0===s.name){const e={instancePath:t+"/field6",schemaPath:"#/properties/field6/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===s.value){const e={instancePath:t+"/field6",schemaPath:"#/properties/field6/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.name&&"string"!=typeof s.name){const e={instancePath:t+"/field6/name",schemaPath:"#/properties/field6/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.value&&"string"!=typeof s.value){const e={instancePath:t+"/field6/value",schemaPath:"#/properties/field6/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/field6",schemaPath:"#/properties/field6/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate48.errors=r,0===n},te={$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},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 se=validate15,ie=validate49,ae={$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(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if((!e||"object"!=typeof e||Array.isArray(e))&&null!==e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:c.type},message:"must be object,null"};null===r?r=[e]:r.push(e),n++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.name){let s=e.name;if("string"!=typeof s){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("button 1"!==s&&"button 2"!==s&&"button 3"!==s&&"button 4"!==s&&"button 5"!==s&&"idle"!==s&&"powerHasBeedApplied"!==s&&"acMainsDisconnected"!==s&&"acMainsReconnected"!==s&&"replaceBatterySoon"!==s&&"replaceBatteryNow"!==s&&"batteryOk"!==s&&"hardwareFailure"!==s&&"softwareFailure"!==s&&"hardwareFailureWithCode"!==s&&"softwareFailureWithCode"!==s&&"motionDetection"!==s&&"airFilterNeedsCleaned"!==s&&"airFilterNeedsReplaced"!==s&&"smokeDetected"!==s&&"outsideSafeTemperatureRange"!==s&&"outsideSafeHumidityRange"!==s&&"scheduleMaintenance"!==s&&"doorAjar"!==s&&"communicationFailure"!==s&&"communicationOk"!==s&&"burglarAlarm"!==s&&"fireAlarm"!==s){const e={instancePath:t+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:y.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.timestamp){let s=e.timestamp;if("number"==typeof s){if(s<1655907956593||isNaN(s)){const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.description&&"string"!=typeof e.description){const e={instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}return validate50.errors=r,0===n}function validate49(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="mediaSource"),void 0===e.id){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.discriminator){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.audio){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"audio"},message:"must have required property 'audio'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.video){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"video"},message:"must have required property 'video'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.driver){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===r?r=[e]:r.push(e),n++}for(const s in e)if(!P.call(ae.properties,s)){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("mediaSource"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:ae.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.discriminator){let s=e.discriminator;if("string"!=typeof s){const e={instancePath:t+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("tv"!==s&&"dvr"!==s&&"appleTv"!==s&&"discPlayer"!==s&&"mediaPlayer"!==s&&"paSystem"!==s&&"uncontrolledDevice"!==s){const e={instancePath:t+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:ae.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.playlists){let s=e.playlists;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/playlists/"+i+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const a=n,o=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(o===n){const e={instancePath:t+"/playlists/"+i+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=a,null!==r&&(a?r.length=a:r=null)}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/playlists/"+i+"/name",schemaPath:"definitions.json#/definitions/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/playlists/"+i,schemaPath:"#/properties/playlists/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/playlists",schemaPath:"#/properties/playlists/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.remote){let s=e.remote;if("string"!=typeof s){const e={instancePath:t+"/remote",schemaPath:"#/properties/remote/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("MR22GA"!==s&&"XRT260"!==s&&"XRT270"!==s&&"HOF-16K 1.2"!==s&&"219863500"!==s&&"SONIFI"!==s&&"AKB76039803"!==s&&"BN59-01388A"!==s){const e={instancePath:t+"/remote",schemaPath:"#/properties/remote/enum",keyword:"enum",params:{allowedValues:ae.properties.remote.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"definitions.json#/definitions/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.driver){let s=e.driver;if("string"!=typeof s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("adlink"!==s&&"aws-kinesis"!==s&&"butler"!==s&&"crestron"!==s&&"dell"!==s&&"dmp"!==s&&"doorbird"!==s&&"dormakaba"!==s&&"dsc"!==s&&"ecobee"!==s&&"epson"!==s&&"geovision-rs"!==s&&"geovision-as-manager"!==s&&"honeywell-vista"!==s&&"igor"!==s&&"inncom"!==s&&"isapi"!==s&&"kohost-k7"!==s&&"kohost"!==s&&"lg"!==s&&"lg-webos"!==s&&"lapi"!==s&&"lirc"!==s&&"mews"!==s&&"mht"!==s&&"paxton"!==s&&"pelican-wireless"!==s&&"power-shades"!==s&&"rachio"!==s&&"rebrandly"!==s&&"rtsp"!==s&&"salto"!==s&&"salto-irn"!==s&&"samsung"!==s&&"se"!==s&&"sendgrid"!==s&&"sonifi"!==s&&"stay-n-touch"!==s&&"storable"!==s&&"twilio"!==s&&"unifi"!==s&&"valcom"!==s&&"vizio"!==s&&"wisenet"!==s&&"cloudflare-images"!==s&&"cloudflare-stream"!==s&&"insperia-privacy"!==s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:d.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.offline&&"boolean"!=typeof e.offline){const e={instancePath:t+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.audio&&"boolean"!=typeof e.audio){const e={instancePath:t+"/audio",schemaPath:"#/properties/audio/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.video&&"boolean"!=typeof e.video){const e={instancePath:t+"/video",schemaPath:"#/properties/video/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.powerFeedback&&"boolean"!=typeof e.powerFeedback){const e={instancePath:t+"/powerFeedback",schemaPath:"#/properties/powerFeedback/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.volumeFeedback&&"boolean"!=typeof e.volumeFeedback){const e={instancePath:t+"/volumeFeedback",schemaPath:"#/properties/volumeFeedback/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.muted&&"boolean"!=typeof e.muted){const e={instancePath:t+"/muted",schemaPath:"#/properties/muted/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.volume){let s=e.volume;if("number"==typeof s){if(s>100||isNaN(s)){const e={instancePath:t+"/volume",schemaPath:"#/properties/volume/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===r?r=[e]:r.push(e),n++}if(s<0||isNaN(s)){const e={instancePath:t+"/volume",schemaPath:"#/properties/volume/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/volume",schemaPath:"#/properties/volume/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.brightness){let s=e.brightness;if("number"==typeof s){if(s>100||isNaN(s)){const e={instancePath:t+"/brightness",schemaPath:"#/properties/brightness/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===r?r=[e]:r.push(e),n++}if(s<0||isNaN(s)){const e={instancePath:t+"/brightness",schemaPath:"#/properties/brightness/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/brightness",schemaPath:"#/properties/brightness/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.contrast){let s=e.contrast;if("number"==typeof s){if(s>100||isNaN(s)){const e={instancePath:t+"/contrast",schemaPath:"#/properties/contrast/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===r?r=[e]:r.push(e),n++}if(s<0||isNaN(s)){const e={instancePath:t+"/contrast",schemaPath:"#/properties/contrast/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/contrast",schemaPath:"#/properties/contrast/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.power){let s=e.power;if("string"!=typeof s){const e={instancePath:t+"/power",schemaPath:"#/properties/power/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("on"!==s&&"off"!==s){const e={instancePath:t+"/power",schemaPath:"#/properties/power/enum",keyword:"enum",params:{allowedValues:ae.properties.power.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.input&&"string"!=typeof e.input){const e={instancePath:t+"/input",schemaPath:"#/properties/input/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.supportedInputs){let s=e.supportedInputs;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++)if("string"!=typeof s[i]){const e={instancePath:t+"/supportedInputs/"+i,schemaPath:"#/properties/supportedInputs/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/supportedInputs",schemaPath:"#/properties/supportedInputs/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.supportedOutputs){let s=e.supportedOutputs;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++)if("string"!=typeof s[i]){const e={instancePath:t+"/supportedOutputs/"+i,schemaPath:"#/properties/supportedOutputs/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/supportedOutputs",schemaPath:"#/properties/supportedOutputs/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.command){let s=e.command;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/command",schemaPath:"#/properties/command/type",keyword:"type",params:{type:ae.properties.command.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}if("mute"!==s&&"volumeUp"!==s&&"volumeDown"!==s&&"brightnessUp"!==s&&"brightnessDown"!==s&&"channelUp"!==s&&"channelDown"!==s&&"number0"!==s&&"number1"!==s&&"number2"!==s&&"number3"!==s&&"number4"!==s&&"number5"!==s&&"number6"!==s&&"number7"!==s&&"number8"!==s&&"number9"!==s&&"lastChannel"!==s&&"display"!==s&&"favoriteChannel"!==s&&"play"!==s&&"playing"!==s&&"stop"!==s&&"stopped"!==s&&"pause"!==s&&"paused"!==s&&"fastForward"!==s&&"fastForwarding"!==s&&"rewind"!==s&&"rewinding"!==s&&"instantReplay"!==s&&"record"!==s&&"ac3"!==s&&"pvrMenu"!==s&&"guide"!==s&&"menu"!==s&&"menuUp"!==s&&"menuDown"!==s&&"menuLeft"!==s&&"menuRight"!==s&&"pageUp"!==s&&"pageDown"!==s&&"select"!==s&&"exit"!==s&&"input"!==s&&"power"!==s&&"enterChannel"!==s&&"enterVolume"!==s&&"enterBrightness"!==s&&"enterContrast"!==s&&"number10"!==s&&"number11"!==s&&"number12"!==s&&"number13"!==s&&"number14"!==s&&"number15"!==s&&"number16"!==s&&"number10Plus"!==s&&"number20Plus"!==s&&"number100"!==s&&"dash"!==s&&"threeChan"!==s&&"threeD"!==s&&"sixChan"!==s&&"a"!==s&&"add"!==s&&"alarm"!==s&&"am"!==s&&"analog"!==s&&"angle"!==s&&"antenna"!==s&&"antennaEast"!==s&&"antennaWest"!==s&&"aspect"!==s&&"audio1"!==s&&"audio2"!==s&&"audio3"!==s&&"audioDumming"!==s&&"audioLevelDown"!==s&&"audioLevelUp"!==s&&"b"!==s&&"back"!==s&&"c"!==s&&"component1"!==s&&"component2"!==s&&"component3"!==s&&"d"!==s&&"home"!==s&&"list"!==s&&"liveTv"!==s&&"discreteInputCable"!==s&&"powerOff"!==s&&"powerOn"!==s&&"setupMenu"!==s&&"skipForward"!==s&&"skipReverse"!==s&&"video1"!==s&&"video2"!==s&&"video3"!==s&&"video4"!==s&&"video5"!==s&&"details"!==s&&"hdmi1"!==s&&"hdmi2"!==s&&"hdmi3"!==s&&"cecDeviceList"!==s&&"mtsSap"!==s&&"red"!==s&&"green"!==s&&"yellow"!==s&&"blue"!==s&&"alert"!==s&&"order"!==s){const e={instancePath:t+"/command",schemaPath:"#/properties/command/enum",keyword:"enum",params:{allowedValues:ae.properties.command.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.supportedNotifications){let s=e.supportedNotifications;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("button 1"!==e&&"button 2"!==e&&"button 3"!==e&&"button 4"!==e&&"button 5"!==e&&"idle"!==e&&"powerHasBeedApplied"!==e&&"acMainsDisconnected"!==e&&"acMainsReconnected"!==e&&"replaceBatterySoon"!==e&&"replaceBatteryNow"!==e&&"batteryOk"!==e&&"hardwareFailure"!==e&&"softwareFailure"!==e&&"hardwareFailureWithCode"!==e&&"softwareFailureWithCode"!==e&&"motionDetection"!==e&&"airFilterNeedsCleaned"!==e&&"airFilterNeedsReplaced"!==e&&"smokeDetected"!==e&&"outsideSafeTemperatureRange"!==e&&"outsideSafeHumidityRange"!==e&&"scheduleMaintenance"!==e&&"doorAjar"!==e&&"communicationFailure"!==e&&"communicationOk"!==e&&"burglarAlarm"!==e&&"fireAlarm"!==e){const e={instancePath:t+"/supportedNotifications/"+i,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:m.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}let i,a=s.length;if(a>1)e:for(;a--;)for(i=a;i--;)if(u(s[a],s[i])){const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:a,j:i},message:"must NOT have duplicate items (items ## "+i+" and "+a+" are identical)"};null===r?r=[e]:r.push(e),n++;break e}}else{const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.notification&&(validate50(e.notification,{instancePath:t+"/notification",parentData:e,parentDataProperty:"notification",rootData:a})||(r=null===r?validate50.errors:r.concat(validate50.errors),n=r.length)),void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.watts){let s=e.watts;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.icon&&"string"!=typeof e.icon){const e={instancePath:t+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.modelNumber&&"string"!=typeof e.modelNumber){const e={instancePath:t+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.serialNumber&&"string"!=typeof e.serialNumber){const e={instancePath:t+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.firmwareVersion&&"string"!=typeof e.firmwareVersion){const e={instancePath:t+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate49.errors=r,0===n}var re=validate52,ne={$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(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if((!e||"object"!=typeof e||Array.isArray(e))&&null!==e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:c.type},message:"must be object,null"};null===r?r=[e]:r.push(e),n++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.name){let s=e.name;if("string"!=typeof s){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("button 1"!==s&&"button 2"!==s&&"button 3"!==s&&"button 4"!==s&&"button 5"!==s&&"idle"!==s&&"powerHasBeedApplied"!==s&&"acMainsDisconnected"!==s&&"acMainsReconnected"!==s&&"replaceBatterySoon"!==s&&"replaceBatteryNow"!==s&&"batteryOk"!==s&&"hardwareFailure"!==s&&"softwareFailure"!==s&&"hardwareFailureWithCode"!==s&&"softwareFailureWithCode"!==s&&"motionDetection"!==s&&"airFilterNeedsCleaned"!==s&&"airFilterNeedsReplaced"!==s&&"smokeDetected"!==s&&"outsideSafeTemperatureRange"!==s&&"outsideSafeHumidityRange"!==s&&"scheduleMaintenance"!==s&&"doorAjar"!==s&&"communicationFailure"!==s&&"communicationOk"!==s&&"burglarAlarm"!==s&&"fireAlarm"!==s){const e={instancePath:t+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:y.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.timestamp){let s=e.timestamp;if("number"==typeof s){if(s<1655907956593||isNaN(s)){const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.description&&"string"!=typeof e.description){const e={instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}return validate53.errors=r,0===n}function validate52(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.id){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.driver){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===r?r=[e]:r.push(e),n++}for(const s in e)if(!P.call(ne.properties,s)){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.type){let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("alarm"!==s&&"dimmer"!==s&&"switch"!==s&&"motionSensor"!==s&&"windowCovering"!==s&&"camera"!==s&&"mediaSource"!==s&&"thermostat"!==s&&"lock"!==s&&"courtesy"!==s&&"gateway"!==s&&"tv"!==s&&"dvr"!==s&&"appleTv"!==s&&"discPlayer"!==s&&"mediaPlayer"!==s&&"uncontrolledDevice"!==s){const e={instancePath:t+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:A.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.driver){let s=e.driver;if("string"!=typeof s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("adlink"!==s&&"aws-kinesis"!==s&&"butler"!==s&&"crestron"!==s&&"dell"!==s&&"dmp"!==s&&"doorbird"!==s&&"dormakaba"!==s&&"dsc"!==s&&"ecobee"!==s&&"epson"!==s&&"geovision-rs"!==s&&"geovision-as-manager"!==s&&"honeywell-vista"!==s&&"igor"!==s&&"inncom"!==s&&"isapi"!==s&&"kohost-k7"!==s&&"kohost"!==s&&"lg"!==s&&"lg-webos"!==s&&"lapi"!==s&&"lirc"!==s&&"mews"!==s&&"mht"!==s&&"paxton"!==s&&"pelican-wireless"!==s&&"power-shades"!==s&&"rachio"!==s&&"rebrandly"!==s&&"rtsp"!==s&&"salto"!==s&&"salto-irn"!==s&&"samsung"!==s&&"se"!==s&&"sendgrid"!==s&&"sonifi"!==s&&"stay-n-touch"!==s&&"storable"!==s&&"twilio"!==s&&"unifi"!==s&&"valcom"!==s&&"vizio"!==s&&"wisenet"!==s&&"cloudflare-images"!==s&&"cloudflare-stream"!==s&&"insperia-privacy"!==s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:d.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.supportedNotifications){let s=e.supportedNotifications;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("button 1"!==e&&"button 2"!==e&&"button 3"!==e&&"button 4"!==e&&"button 5"!==e&&"idle"!==e&&"powerHasBeedApplied"!==e&&"acMainsDisconnected"!==e&&"acMainsReconnected"!==e&&"replaceBatterySoon"!==e&&"replaceBatteryNow"!==e&&"batteryOk"!==e&&"hardwareFailure"!==e&&"softwareFailure"!==e&&"hardwareFailureWithCode"!==e&&"softwareFailureWithCode"!==e&&"motionDetection"!==e&&"airFilterNeedsCleaned"!==e&&"airFilterNeedsReplaced"!==e&&"smokeDetected"!==e&&"outsideSafeTemperatureRange"!==e&&"outsideSafeHumidityRange"!==e&&"scheduleMaintenance"!==e&&"doorAjar"!==e&&"communicationFailure"!==e&&"communicationOk"!==e&&"burglarAlarm"!==e&&"fireAlarm"!==e){const e={instancePath:t+"/supportedNotifications/"+i,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:m.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}let i,a=s.length;if(a>1)e:for(;a--;)for(i=a;i--;)if(u(s[a],s[i])){const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:a,j:i},message:"must NOT have duplicate items (items ## "+i+" and "+a+" are identical)"};null===r?r=[e]:r.push(e),n++;break e}}else{const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.notification&&(validate53(e.notification,{instancePath:t+"/notification",parentData:e,parentDataProperty:"notification",rootData:a})||(r=null===r?validate53.errors:r.concat(validate53.errors),n=r.length)),void 0!==e.watts){let s=e.watts;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.icon&&"string"!=typeof e.icon){const e={instancePath:t+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.modelNumber&&"string"!=typeof e.modelNumber){const e={instancePath:t+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.serialNumber&&"string"!=typeof e.serialNumber){const e={instancePath:t+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.firmwareVersion&&"string"!=typeof e.firmwareVersion){const e={instancePath:t+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate52.errors=r,0===n}var oe=function validate55(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="order"),void 0===e.items&&(e.items=[]),void 0===e.taxes&&(e.taxes=[]),void 0===e.fees&&(e.fees=[]),void 0===e.delivery&&(e.delivery=[]),void 0===e.payments&&(e.payments=[]),void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.status){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("order"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:pe.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.orderNumber&&"string"!=typeof e.orderNumber){const e={instancePath:t+"/orderNumber",schemaPath:"#/properties/orderNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.status){let s=e.status;if("string"!=typeof s){const e={instancePath:t+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("draft"!==s&&"pendingPayment"!==s&&"processing"!==s&&"outForDelivery"!==s&&"completed"!==s&&"paymentFailed"!==s&&"cancelled"!==s&&"refunded"!==s){const e={instancePath:t+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:pe.properties.status.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.userId){let s=e.userId;if("string"!=typeof s){const e={instancePath:t+"/userId",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/userId",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.reservationId){let s=e.reservationId;if("string"!=typeof s){const e={instancePath:t+"/reservationId",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/reservationId",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.date){let s=e.date;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/date",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:g.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/date",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}let i=e.items;if(Array.isArray(i)){const e=i.length;for(let s=0;s<e;s++){let e=i[s];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.quantity&&(e.quantity=1),void 0===e.name){const e={instancePath:t+"/items/"+s,schemaPath:"#/properties/items/items/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.price){const e={instancePath:t+"/items/"+s,schemaPath:"#/properties/items/items/required",keyword:"required",params:{missingProperty:"price"},message:"must have required property 'price'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.additionalProperties){const e={instancePath:t+"/items/"+s+"/additionalProperties",schemaPath:"#/properties/items/items/properties/additionalProperties/false schema",keyword:"false schema",params:{},message:"boolean schema is false"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/items/"+s+"/name",schemaPath:"#/properties/items/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.sku&&"string"!=typeof e.sku){const e={instancePath:t+"/items/"+s+"/sku",schemaPath:"#/properties/items/items/properties/sku/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("number"!=typeof e.quantity){const e={instancePath:t+"/items/"+s+"/quantity",schemaPath:"#/properties/items/items/properties/quantity/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.price&&"number"!=typeof e.price){const e={instancePath:t+"/items/"+s+"/price",schemaPath:"#/properties/items/items/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.taxClass&&"string"!=typeof e.taxClass){const e={instancePath:t+"/items/"+s+"/taxClass",schemaPath:"#/properties/items/items/properties/taxClass/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.deliveryClass&&"string"!=typeof e.deliveryClass){const e={instancePath:t+"/items/"+s+"/deliveryClass",schemaPath:"#/properties/items/items/properties/deliveryClass/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.productId&&"string"!=typeof e.productId){const e={instancePath:t+"/items/"+s+"/productId",schemaPath:"#/properties/items/items/properties/productId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/items/"+s,schemaPath:"#/properties/items/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/items",schemaPath:"#/properties/items/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}let a=e.taxes;if(Array.isArray(a)){const e=a.length;for(let s=0;s<e;s++){let e=a[s];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.rateType&&(e.rateType="percentage"),void 0===e.name){const e={instancePath:t+"/taxes/"+s,schemaPath:"#/properties/taxes/items/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.rate){const e={instancePath:t+"/taxes/"+s,schemaPath:"#/properties/taxes/items/required",keyword:"required",params:{missingProperty:"rate"},message:"must have required property 'rate'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.additionalProperties){const e={instancePath:t+"/taxes/"+s+"/additionalProperties",schemaPath:"#/properties/taxes/items/properties/additionalProperties/false schema",keyword:"false schema",params:{},message:"boolean schema is false"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/taxes/"+s+"/name",schemaPath:"#/properties/taxes/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.class&&"string"!=typeof e.class){const e={instancePath:t+"/taxes/"+s+"/class",schemaPath:"#/properties/taxes/items/properties/class/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}let i=e.rateType;if("string"!=typeof i){const e={instancePath:t+"/taxes/"+s+"/rateType",schemaPath:"#/properties/taxes/items/properties/rateType/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("percentage"!==i&&"flat"!==i){const e={instancePath:t+"/taxes/"+s+"/rateType",schemaPath:"#/properties/taxes/items/properties/rateType/enum",keyword:"enum",params:{allowedValues:pe.properties.taxes.items.properties.rateType.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.rate&&"number"!=typeof e.rate){const e={instancePath:t+"/taxes/"+s+"/rate",schemaPath:"#/properties/taxes/items/properties/rate/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.total&&"number"!=typeof e.total){const e={instancePath:t+"/taxes/"+s+"/total",schemaPath:"#/properties/taxes/items/properties/total/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/taxes/"+s,schemaPath:"#/properties/taxes/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/taxes",schemaPath:"#/properties/taxes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}let o=e.fees;if(Array.isArray(o)){const e=o.length;for(let s=0;s<e;s++){let e=o[s];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.name){const e={instancePath:t+"/fees/"+s,schemaPath:"#/properties/fees/items/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.price){const e={instancePath:t+"/fees/"+s,schemaPath:"#/properties/fees/items/required",keyword:"required",params:{missingProperty:"price"},message:"must have required property 'price'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.additionalProperties){const e={instancePath:t+"/fees/"+s+"/additionalProperties",schemaPath:"#/properties/fees/items/properties/additionalProperties/false schema",keyword:"false schema",params:{},message:"boolean schema is false"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/fees/"+s+"/name",schemaPath:"#/properties/fees/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.price&&"number"!=typeof e.price){const e={instancePath:t+"/fees/"+s+"/price",schemaPath:"#/properties/fees/items/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/fees/"+s,schemaPath:"#/properties/fees/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/fees",schemaPath:"#/properties/fees/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}let p=e.delivery;if(Array.isArray(p)){const e=p.length;for(let s=0;s<e;s++){let e=p[s];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.rateType&&(e.rateType="percentage"),void 0===e.name){const e={instancePath:t+"/delivery/"+s,schemaPath:"#/properties/delivery/items/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.rate){const e={instancePath:t+"/delivery/"+s,schemaPath:"#/properties/delivery/items/required",keyword:"required",params:{missingProperty:"rate"},message:"must have required property 'rate'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.additionalProperties){const e={instancePath:t+"/delivery/"+s+"/additionalProperties",schemaPath:"#/properties/delivery/items/properties/additionalProperties/false schema",keyword:"false schema",params:{},message:"boolean schema is false"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/delivery/"+s+"/name",schemaPath:"#/properties/delivery/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.class&&"string"!=typeof e.class){const e={instancePath:t+"/delivery/"+s+"/class",schemaPath:"#/properties/delivery/items/properties/class/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}let i=e.rateType;if("string"!=typeof i){const e={instancePath:t+"/delivery/"+s+"/rateType",schemaPath:"#/properties/delivery/items/properties/rateType/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("percentage"!==i&&"flat"!==i){const e={instancePath:t+"/delivery/"+s+"/rateType",schemaPath:"#/properties/delivery/items/properties/rateType/enum",keyword:"enum",params:{allowedValues:pe.properties.delivery.items.properties.rateType.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.rate&&"number"!=typeof e.rate){const e={instancePath:t+"/delivery/"+s+"/rate",schemaPath:"#/properties/delivery/items/properties/rate/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.total&&"number"!=typeof e.total){const e={instancePath:t+"/delivery/"+s+"/total",schemaPath:"#/properties/delivery/items/properties/total/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/delivery/"+s,schemaPath:"#/properties/delivery/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/delivery",schemaPath:"#/properties/delivery/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}let m=e.payments;if(Array.isArray(m)){const e=m.length;for(let s=0;s<e;s++){let e=m[s];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.method){let i=e.method;if("string"!=typeof i){const e={instancePath:t+"/payments/"+s+"/method",schemaPath:"#/properties/payments/items/properties/method/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("folio"!==i&&"invoice"!==i&&"amex"!==i&&"visa"!==i&&"masterCard"!==i&&"maestro"!==i&&"discover"!==i&&"diners"!==i&&"jcb"!==i&&"applePay"!==i&&"alipay"!==i&&"chinaUnionPay"!==i&&"vpay"!==i){const e={instancePath:t+"/payments/"+s+"/method",schemaPath:"#/properties/payments/items/properties/method/enum",keyword:"enum",params:{allowedValues:pe.properties.payments.items.properties.method.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/payments/"+s+"/name",schemaPath:"#/properties/payments/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.date){let i=e.date;if("string"!=typeof i&&(!i||"object"!=typeof i||Array.isArray(i))){const e={instancePath:t+"/payments/"+s+"/date",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:g.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof i&&!w.validate(i)){const e={instancePath:t+"/payments/"+s+"/date",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.amount&&"number"!=typeof e.amount){const e={instancePath:t+"/payments/"+s+"/amount",schemaPath:"#/properties/payments/items/properties/amount/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.transactionReference&&"string"!=typeof e.transactionReference){const e={instancePath:t+"/payments/"+s+"/transactionReference",schemaPath:"#/properties/payments/items/properties/transactionReference/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/payments/"+s,schemaPath:"#/properties/payments/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/payments",schemaPath:"#/properties/payments/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate55.errors=r,0===n},pe={$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 me=function validate56(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="organization"),void 0===e.appManifest&&(e.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===e.accountNumber){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"accountNumber"},message:"must have required property 'accountNumber'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.name){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("organization"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:de.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.accountNumber){let s=e.accountNumber;if("number"!=typeof s&&null!==s){const e={instancePath:t+"/accountNumber",schemaPath:"#/properties/accountNumber/type",keyword:"type",params:{type:de.properties.accountNumber.type},message:"must be number,null"};null===r?r=[e]:r.push(e),n++}if("number"==typeof s&&(s<1e4||isNaN(s))){const e={instancePath:t+"/accountNumber",schemaPath:"#/properties/accountNumber/minimum",keyword:"minimum",params:{comparison:">=",limit:1e4},message:"must be >= 10000"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.properties){let s=e.properties;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++)if("string"!=typeof s[i]){const e={instancePath:t+"/properties/"+i,schemaPath:"#/properties/properties/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/properties",schemaPath:"#/properties/properties/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.hostname){let s=e.hostname;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/hostname",schemaPath:"#/properties/hostname/type",keyword:"type",params:{type:de.properties.hostname.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}}let i=e.appManifest;if(i&&"object"==typeof i&&!Array.isArray(i)){if(void 0===i.display&&(i.display="fullscreen"),void 0===i.orientation&&(i.orientation="portrait"),void 0!==i.name&&"string"!=typeof i.name){const e={instancePath:t+"/appManifest/name",schemaPath:"#/properties/appManifest/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==i.short_name&&"string"!=typeof i.short_name){const e={instancePath:t+"/appManifest/short_name",schemaPath:"#/properties/appManifest/properties/short_name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==i.scope&&"string"!=typeof i.scope){const e={instancePath:t+"/appManifest/scope",schemaPath:"#/properties/appManifest/properties/scope/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==i.start_url&&"string"!=typeof i.start_url){const e={instancePath:t+"/appManifest/start_url",schemaPath:"#/properties/appManifest/properties/start_url/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==i.themeColor&&"string"!=typeof i.themeColor){const e={instancePath:t+"/appManifest/themeColor",schemaPath:"#/properties/appManifest/properties/themeColor/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==i.backgroundColor&&"string"!=typeof i.backgroundColor){const e={instancePath:t+"/appManifest/backgroundColor",schemaPath:"#/properties/appManifest/properties/backgroundColor/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}let e=i.display;if("string"!=typeof e){const e={instancePath:t+"/appManifest/display",schemaPath:"#/properties/appManifest/properties/display/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("fullscreen"!==e&&"standalone"!==e&&"minimal-ui"!==e&&"browser"!==e){const e={instancePath:t+"/appManifest/display",schemaPath:"#/properties/appManifest/properties/display/enum",keyword:"enum",params:{allowedValues:de.properties.appManifest.properties.display.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}let s=i.orientation;if("string"!=typeof s){const e={instancePath:t+"/appManifest/orientation",schemaPath:"#/properties/appManifest/properties/orientation/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("portrait"!==s&&"landscape"!==s){const e={instancePath:t+"/appManifest/orientation",schemaPath:"#/properties/appManifest/properties/orientation/enum",keyword:"enum",params:{allowedValues:de.properties.appManifest.properties.orientation.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==i.splash){let e=i.splash;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.src&&"string"!=typeof e.src){const e={instancePath:t+"/appManifest/splash/src",schemaPath:"#/properties/appManifest/properties/splash/properties/src/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.type&&"string"!=typeof e.type){const e={instancePath:t+"/appManifest/splash/type",schemaPath:"#/properties/appManifest/properties/splash/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.sizes&&"string"!=typeof e.sizes){const e={instancePath:t+"/appManifest/splash/sizes",schemaPath:"#/properties/appManifest/properties/splash/properties/sizes/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/appManifest/splash",schemaPath:"#/properties/appManifest/properties/splash/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==i.icons){let e=i.icons;if(Array.isArray(e)){const s=e.length;for(let i=0;i<s;i++){let s=e[i];if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.src&&"string"!=typeof s.src){const e={instancePath:t+"/appManifest/icons/"+i+"/src",schemaPath:"#/properties/appManifest/properties/icons/items/properties/src/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.sizes&&"string"!=typeof s.sizes){const e={instancePath:t+"/appManifest/icons/"+i+"/sizes",schemaPath:"#/properties/appManifest/properties/icons/items/properties/sizes/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.type&&"string"!=typeof s.type){const e={instancePath:t+"/appManifest/icons/"+i+"/type",schemaPath:"#/properties/appManifest/properties/icons/items/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/appManifest/icons/"+i,schemaPath:"#/properties/appManifest/properties/icons/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/appManifest/icons",schemaPath:"#/properties/appManifest/properties/icons/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==i.logo){let e=i.logo;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.src&&"string"!=typeof e.src){const e={instancePath:t+"/appManifest/logo/src",schemaPath:"#/properties/appManifest/properties/logo/properties/src/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.type&&"string"!=typeof e.type){const e={instancePath:t+"/appManifest/logo/type",schemaPath:"#/properties/appManifest/properties/logo/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.sizes&&"string"!=typeof e.sizes){const e={instancePath:t+"/appManifest/logo/sizes",schemaPath:"#/properties/appManifest/properties/logo/properties/sizes/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/appManifest/logo",schemaPath:"#/properties/appManifest/properties/logo/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/appManifest",schemaPath:"#/properties/appManifest/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.tickets){let s=e.tickets;if(s&&"object"==typeof s&&!Array.isArray(s)){void 0===s.nextTicketNumber&&(s.nextTicketNumber=1);let e=s.nextTicketNumber;if("string"!=typeof e&&("number"!=typeof e||e%1||isNaN(e))){const e={instancePath:t+"/tickets/nextTicketNumber",schemaPath:"#/properties/tickets/properties/nextTicketNumber/type",keyword:"type",params:{type:de.properties.tickets.properties.nextTicketNumber.type},message:"must be string,integer"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/tickets",schemaPath:"#/properties/tickets/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.credentials){let s=e.credentials;if(s&&"object"==typeof s&&!Array.isArray(s));else{const e={instancePath:t+"/credentials",schemaPath:"#/properties/credentials/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.createdAt){let s=e.createdAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:ue.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.updatedAt){let s=e.updatedAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/type",keyword:"type",params:{type:le.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate56.errors=r,0===n},de={$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"}}},ue={type:["string","object"],format:"date-time"},le={type:["string","object"],format:"date-time"};var ce=validate57,ye={$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(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.enabled&&(e.enabled=!0),void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.maskedNumber){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"maskedNumber"},message:"must have required property 'maskedNumber'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.expires){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"expires"},message:"must have required property 'expires'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.type){let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("amex"!==s&&"visa"!==s&&"masterCard"!==s&&"maestro"!==s&&"discover"!==s&&"diners"!==s&&"jcb"!==s&&"applePay"!==s&&"alipay"!==s&&"chinaUnionPay"!==s&&"vpay"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:ye.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if("boolean"!=typeof e.enabled){const e={instancePath:t+"/enabled",schemaPath:"#/properties/enabled/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.storageData){let s=e.storageData;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/storageData",schemaPath:"#/properties/storageData/type",keyword:"type",params:{type:ye.properties.storageData.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.issued){let s=e.issued;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/issued",schemaPath:"#/properties/issued/type",keyword:"type",params:{type:ye.properties.issued.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate57.errors=r,0===n}var he=validate58,fe={$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"]}}}}}},ge=new RegExp("^[^:]+(:.+)+$","u");function validate58(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="policy"),void 0===e.name){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.organizationId){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"organizationId"},message:"must have required property 'organizationId'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.propertyId){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"propertyId"},message:"must have required property 'propertyId'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.permissions){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"permissions"},message:"must have required property 'permissions'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.discriminator){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("policy"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:fe.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.discriminator){let s=e.discriminator;if("string"!=typeof s){const e={instancePath:t+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("user"!==s){const e={instancePath:t+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:fe.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.name){let s=e.name;if("string"==typeof s){if(l(s)<1){const e={instancePath:t+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.description&&"string"!=typeof e.description){const e={instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.organizationId&&"string"!=typeof e.organizationId){const e={instancePath:t+"/organizationId",schemaPath:"#/properties/organizationId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.propertyId&&"string"!=typeof e.propertyId){const e={instancePath:t+"/propertyId",schemaPath:"#/properties/propertyId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.permissions){let s=e.permissions;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.entities){const e={instancePath:t+"/permissions/"+i,schemaPath:"#/properties/permissions/items/required",keyword:"required",params:{missingProperty:"entities"},message:"must have required property 'entities'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.effect){const e={instancePath:t+"/permissions/"+i,schemaPath:"#/properties/permissions/items/required",keyword:"required",params:{missingProperty:"effect"},message:"must have required property 'effect'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.entities){let s=e.entities;if(Array.isArray(s)){const e=s.length;for(let a=0;a<e;a++){let e=s[a];if("string"==typeof e){if(!ge.test(e)){const e={instancePath:t+"/permissions/"+i+"/entities/"+a,schemaPath:"#/properties/permissions/items/properties/entities/items/pattern",keyword:"pattern",params:{pattern:"^[^:]+(:.+)+$"},message:'must match pattern "^[^:]+(:.+)+$"'};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/permissions/"+i+"/entities/"+a,schemaPath:"#/properties/permissions/items/properties/entities/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/permissions/"+i+"/entities",schemaPath:"#/properties/permissions/items/properties/entities/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.effect){let s=e.effect;if("string"!=typeof s){const e={instancePath:t+"/permissions/"+i+"/effect",schemaPath:"#/properties/permissions/items/properties/effect/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("Allow"!==s&&"Deny"!==s){const e={instancePath:t+"/permissions/"+i+"/effect",schemaPath:"#/properties/permissions/items/properties/effect/enum",keyword:"enum",params:{allowedValues:fe.properties.permissions.items.properties.effect.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/permissions/"+i,schemaPath:"#/properties/permissions/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/permissions",schemaPath:"#/properties/permissions/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate58.errors=r,0===n}var Pe=function validate59(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="product"),void 0===e.name){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.price){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"price"},message:"must have required property 'price'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.driver){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("product"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:be.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.driver){let s=e.driver;if("string"!=typeof s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("adlink"!==s&&"aws-kinesis"!==s&&"butler"!==s&&"crestron"!==s&&"dell"!==s&&"dmp"!==s&&"doorbird"!==s&&"dormakaba"!==s&&"dsc"!==s&&"ecobee"!==s&&"epson"!==s&&"geovision-rs"!==s&&"geovision-as-manager"!==s&&"honeywell-vista"!==s&&"igor"!==s&&"inncom"!==s&&"isapi"!==s&&"kohost-k7"!==s&&"kohost"!==s&&"lg"!==s&&"lg-webos"!==s&&"lapi"!==s&&"lirc"!==s&&"mews"!==s&&"mht"!==s&&"paxton"!==s&&"pelican-wireless"!==s&&"power-shades"!==s&&"rachio"!==s&&"rebrandly"!==s&&"rtsp"!==s&&"salto"!==s&&"salto-irn"!==s&&"samsung"!==s&&"se"!==s&&"sendgrid"!==s&&"sonifi"!==s&&"stay-n-touch"!==s&&"storable"!==s&&"twilio"!==s&&"unifi"!==s&&"valcom"!==s&&"vizio"!==s&&"wisenet"!==s&&"cloudflare-images"!==s&&"cloudflare-stream"!==s&&"insperia-privacy"!==s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:d.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.price&&"number"!=typeof e.price){const e={instancePath:t+"/price",schemaPath:"#/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.tax){let s=e.tax;if("number"!=typeof s&&null!==s){const e={instancePath:t+"/tax",schemaPath:"#/properties/tax/type",keyword:"type",params:{type:be.properties.tax.type},message:"must be number,null"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.image&&(validate15(e.image,{instancePath:t+"/image",parentData:e,parentDataProperty:"image",rootData:a})||(r=null===r?validate15.errors:r.concat(validate15.errors),n=r.length)),void 0!==e.category&&"string"!=typeof e.category){const e={instancePath:t+"/category",schemaPath:"#/properties/category/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.imageUrl){let s=e.imageUrl;if("string"==typeof s){if(!ve.test(s)){const e={instancePath:t+"/imageUrl",schemaPath:"#/properties/imageUrl/pattern",keyword:"pattern",params:{pattern:"^https?://"},message:'must match pattern "^https?://"'};null===r?r=[e]:r.push(e),n++}if(!v(s)){const e={instancePath:t+"/imageUrl",schemaPath:"#/properties/imageUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===r?r=[e]:r.push(e),n++}}}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate59.errors=r,0===n},be={$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"}}},ve=new RegExp("^https?://","u");var we=function validate61(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="property"),void 0===e.appFeatures&&(e.appFeatures={RoomControl:{}}),void 0===e.notifications&&(e.notifications={email:{enabled:!1},sms:{enabled:!1},push:{enabled:!1}}),void 0===e.id){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.name){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.organization){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"organization"},message:"must have required property 'organization'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.timezone){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"timezone"},message:"must have required property 'timezone'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.discriminator){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("property"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:ke.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.discriminator){let s=e.discriminator;if("string"!=typeof s){const e={instancePath:t+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("hospitality"!==s&&"education"!==s&&"commercial"!==s&&"storage"!==s){const e={instancePath:t+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:ke.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.organization){let s=e.organization;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/organization",schemaPath:"#/properties/organization/type",keyword:"type",params:{type:ke.properties.organization.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.departments){let s=e.departments;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++)if("string"!=typeof s[i]){const e={instancePath:t+"/departments/"+i,schemaPath:"#/properties/departments/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/departments",schemaPath:"#/properties/departments/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.testModeEnabled&&"boolean"!=typeof e.testModeEnabled){const e={instancePath:t+"/testModeEnabled",schemaPath:"#/properties/testModeEnabled/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.testMode){let s=e.testMode;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.notificationEmails){let e=s.notificationEmails;if(Array.isArray(e)){const s=e.length;for(let i=0;i<s;i++)if("string"!=typeof e[i]){const e={instancePath:t+"/testMode/notificationEmails/"+i,schemaPath:"#/properties/testMode/properties/notificationEmails/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/testMode/notificationEmails",schemaPath:"#/properties/testMode/properties/notificationEmails/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.notificationEmailDomains){let e=s.notificationEmailDomains;if(Array.isArray(e)){const s=e.length;for(let i=0;i<s;i++)if("string"!=typeof e[i]){const e={instancePath:t+"/testMode/notificationEmailDomains/"+i,schemaPath:"#/properties/testMode/properties/notificationEmailDomains/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/testMode/notificationEmailDomains",schemaPath:"#/properties/testMode/properties/notificationEmailDomains/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/testMode",schemaPath:"#/properties/testMode/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.timezone){let s=e.timezone;if("string"==typeof s){if(!je.test(s)){const e={instancePath:t+"/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===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/timezone",schemaPath:"#/properties/timezone/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.smsNumber&&"string"!=typeof e.smsNumber){const e={instancePath:t+"/smsNumber",schemaPath:"#/properties/smsNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.checkInTime&&"string"!=typeof e.checkInTime){const e={instancePath:t+"/checkInTime",schemaPath:"#/properties/checkInTime/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.checkOutTime&&"string"!=typeof e.checkOutTime){const e={instancePath:t+"/checkOutTime",schemaPath:"#/properties/checkOutTime/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.address){let s=e.address;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.id&&"string"!=typeof s.id){const e={instancePath:t+"/address/id",schemaPath:"definitions.json#/definitions/address/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.line1&&"string"!=typeof s.line1){const e={instancePath:t+"/address/line1",schemaPath:"definitions.json#/definitions/address/properties/line1/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.line2&&"string"!=typeof s.line2){const e={instancePath:t+"/address/line2",schemaPath:"definitions.json#/definitions/address/properties/line2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.line3&&"string"!=typeof s.line3){const e={instancePath:t+"/address/line3",schemaPath:"definitions.json#/definitions/address/properties/line3/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.city&&"string"!=typeof s.city){const e={instancePath:t+"/address/city",schemaPath:"definitions.json#/definitions/address/properties/city/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.state&&"string"!=typeof s.state){const e={instancePath:t+"/address/state",schemaPath:"definitions.json#/definitions/address/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.postalCode&&"string"!=typeof s.postalCode){const e={instancePath:t+"/address/postalCode",schemaPath:"definitions.json#/definitions/address/properties/postalCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.countryCode){let e=s.countryCode;if("string"==typeof e){if(l(e)>2){const e={instancePath:t+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===r?r=[e]:r.push(e),n++}if(l(e)<2){const e={instancePath:t+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/address",schemaPath:"definitions.json#/definitions/address/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.latitude&&"number"!=typeof e.latitude){const e={instancePath:t+"/latitude",schemaPath:"#/properties/latitude/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.longitude&&"number"!=typeof e.longitude){const e={instancePath:t+"/longitude",schemaPath:"#/properties/longitude/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}let i=e.appFeatures;if(i&&"object"==typeof i&&!Array.isArray(i)){for(const e in i)if(!P.call(ke.properties.appFeatures.properties,e)){const s={instancePath:t+"/appFeatures",schemaPath:"#/properties/appFeatures/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===r?r=[s]:r.push(s),n++}if(void 0!==i.RoomControl){let e=i.RoomControl;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const s in e)if("disabledSystems"!==s&&"commonAreas"!==s&&"alarmConfig"!==s){const e={instancePath:t+"/appFeatures/RoomControl",schemaPath:"#/properties/appFeatures/properties/RoomControl/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.disabledSystems){let s=e.disabledSystems;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("string"!=typeof e){const e={instancePath:t+"/appFeatures/RoomControl/disabledSystems/"+i,schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/disabledSystems/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("climate"!==e&&"lights"!==e&&"shades"!==e&&"tv"!==e&&"doors"!==e){const e={instancePath:t+"/appFeatures/RoomControl/disabledSystems/"+i,schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/disabledSystems/items/enum",keyword:"enum",params:{allowedValues:ke.properties.appFeatures.properties.RoomControl.properties.disabledSystems.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/appFeatures/RoomControl/disabledSystems",schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/disabledSystems/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.commonAreas){let s=e.commonAreas;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.spaces){let e=s.spaces;if(Array.isArray(e)){const s=e.length;for(let i=0;i<s;i++)if("string"!=typeof e[i]){const e={instancePath:t+"/appFeatures/RoomControl/commonAreas/spaces/"+i,schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/commonAreas/properties/spaces/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/appFeatures/RoomControl/commonAreas/spaces",schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/commonAreas/properties/spaces/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/appFeatures/RoomControl/commonAreas",schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/commonAreas/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.alarmConfig){let s=e.alarmConfig;if(s&&"object"==typeof s&&!Array.isArray(s)){for(const e in s)if(Ae.test(e)){let i=s[e];if(i&&"object"==typeof i&&!Array.isArray(i)){if(void 0!==i.zoneLockMap){let s=i.zoneLockMap;if(s&&"object"==typeof s&&!Array.isArray(s)){for(const i in s)if("string"!=typeof s[i]){const s={instancePath:t+"/appFeatures/RoomControl/alarmConfig/"+e.replace(/~/g,"~0").replace(/\//g,"~1")+"/zoneLockMap/"+i.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===r?r=[s]:r.push(s),n++}}else{const s={instancePath:t+"/appFeatures/RoomControl/alarmConfig/"+e.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===r?r=[s]:r.push(s),n++}}}else{const s={instancePath:t+"/appFeatures/RoomControl/alarmConfig/"+e.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===r?r=[s]:r.push(s),n++}}}else{const e={instancePath:t+"/appFeatures/RoomControl/alarmConfig",schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/alarmConfig/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/appFeatures/RoomControl",schemaPath:"#/properties/appFeatures/properties/RoomControl/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==i.CheckIn){let e=i.CheckIn;if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0!==e.earlyCheckIn){let s=e.earlyCheckIn;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0===s.dynamic&&(s.dynamic=!1),void 0===s.minimumPrice&&(s.minimumPrice=10),void 0===s.maximumPrice&&(s.maximumPrice=50),void 0===s.priceRatioPerHour&&(s.priceRatioPerHour=.1),void 0===s.dynamic){const e={instancePath:t+"/appFeatures/CheckIn/earlyCheckIn",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/required",keyword:"required",params:{missingProperty:"dynamic"},message:"must have required property 'dynamic'"};null===r?r=[e]:r.push(e),n++}if("boolean"!=typeof s.dynamic){const e={instancePath:t+"/appFeatures/CheckIn/earlyCheckIn/dynamic",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/properties/dynamic/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if("number"!=typeof s.minimumPrice){const e={instancePath:t+"/appFeatures/CheckIn/earlyCheckIn/minimumPrice",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/properties/minimumPrice/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if("number"!=typeof s.maximumPrice){const e={instancePath:t+"/appFeatures/CheckIn/earlyCheckIn/maximumPrice",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/properties/maximumPrice/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if("number"!=typeof s.priceRatioPerHour){const e={instancePath:t+"/appFeatures/CheckIn/earlyCheckIn/priceRatioPerHour",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/properties/priceRatioPerHour/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.minimumTime&&"string"!=typeof s.minimumTime){const e={instancePath:t+"/appFeatures/CheckIn/earlyCheckIn/minimumTime",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/properties/minimumTime/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/appFeatures/CheckIn/earlyCheckIn",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}if(void 0!==i.CheckOut){let e=i.CheckOut;if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0!==e.lateCheckOut){let s=e.lateCheckOut;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0===s.dynamic&&(s.dynamic=!1),void 0===s.minimumPrice&&(s.minimumPrice=10),void 0===s.maximumPrice&&(s.maximumPrice=50),void 0===s.priceRatioPerHour&&(s.priceRatioPerHour=.1),void 0===s.dynamic){const e={instancePath:t+"/appFeatures/CheckOut/lateCheckOut",schemaPath:"#/properties/appFeatures/properties/CheckOut/properties/lateCheckOut/required",keyword:"required",params:{missingProperty:"dynamic"},message:"must have required property 'dynamic'"};null===r?r=[e]:r.push(e),n++}if("boolean"!=typeof s.dynamic){const e={instancePath:t+"/appFeatures/CheckOut/lateCheckOut/dynamic",schemaPath:"#/properties/appFeatures/properties/CheckOut/properties/lateCheckOut/properties/dynamic/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if("number"!=typeof s.minimumPrice){const e={instancePath:t+"/appFeatures/CheckOut/lateCheckOut/minimumPrice",schemaPath:"#/properties/appFeatures/properties/CheckOut/properties/lateCheckOut/properties/minimumPrice/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if("number"!=typeof s.maximumPrice){const e={instancePath:t+"/appFeatures/CheckOut/lateCheckOut/maximumPrice",schemaPath:"#/properties/appFeatures/properties/CheckOut/properties/lateCheckOut/properties/maximumPrice/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if("number"!=typeof s.priceRatioPerHour){const e={instancePath:t+"/appFeatures/CheckOut/lateCheckOut/priceRatioPerHour",schemaPath:"#/properties/appFeatures/properties/CheckOut/properties/lateCheckOut/properties/priceRatioPerHour/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/appFeatures/CheckOut/lateCheckOut",schemaPath:"#/properties/appFeatures/properties/CheckOut/properties/lateCheckOut/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}if(void 0!==i.Concierge){let e=i.Concierge;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.timeTracking&&(e.timeTracking=!1),void 0===e.tipping&&(e.tipping=!1),void 0===e.ratings&&(e.ratings=!0),void 0===e.newTicketCCs&&(e.newTicketCCs=[]),void 0===e.newMessageChannel&&(e.newMessageChannel="sms"),"boolean"!=typeof e.timeTracking){const e={instancePath:t+"/appFeatures/Concierge/timeTracking",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/timeTracking/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if("boolean"!=typeof e.tipping){const e={instancePath:t+"/appFeatures/Concierge/tipping",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/tipping/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if("boolean"!=typeof e.ratings){const e={instancePath:t+"/appFeatures/Concierge/ratings",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/ratings/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}let s=e.newTicketCCs;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++)if("string"!=typeof s[i]){const e={instancePath:t+"/appFeatures/Concierge/newTicketCCs/"+i,schemaPath:"#/properties/appFeatures/properties/Concierge/properties/newTicketCCs/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/appFeatures/Concierge/newTicketCCs",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/newTicketCCs/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}let i=e.newMessageChannel;if("string"!=typeof i&&null!==i){const e={instancePath:t+"/appFeatures/Concierge/newMessageChannel",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/newMessageChannel/type",keyword:"type",params:{type:ke.properties.appFeatures.properties.Concierge.properties.newMessageChannel.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}if("sms"!==i&&"email"!==i){const e={instancePath:t+"/appFeatures/Concierge/newMessageChannel",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/newMessageChannel/enum",keyword:"enum",params:{allowedValues:ke.properties.appFeatures.properties.Concierge.properties.newMessageChannel.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.quickServices){let s=e.quickServices;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.name){const e={instancePath:t+"/appFeatures/Concierge/quickServices/"+i,schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.description){const e={instancePath:t+"/appFeatures/Concierge/quickServices/"+i,schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/required",keyword:"required",params:{missingProperty:"description"},message:"must have required property 'description'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.image){const e={instancePath:t+"/appFeatures/Concierge/quickServices/"+i,schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/required",keyword:"required",params:{missingProperty:"image"},message:"must have required property 'image'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/appFeatures/Concierge/quickServices/"+i+"/name",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.description&&"string"!=typeof e.description){const e={instancePath:t+"/appFeatures/Concierge/quickServices/"+i+"/description",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.department&&"string"!=typeof e.department){const e={instancePath:t+"/appFeatures/Concierge/quickServices/"+i+"/department",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/properties/department/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}void 0!==e.image&&(validate15(e.image,{instancePath:t+"/appFeatures/Concierge/quickServices/"+i+"/image",parentData:e,parentDataProperty:"image",rootData:a})||(r=null===r?validate15.errors:r.concat(validate15.errors),n=r.length))}else{const e={instancePath:t+"/appFeatures/Concierge/quickServices/"+i,schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/appFeatures/Concierge/quickServices",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.issues){let s=e.issues;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.syncWithPropertyId&&"string"!=typeof s.syncWithPropertyId){const e={instancePath:t+"/appFeatures/Concierge/issues/syncWithPropertyId",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/issues/properties/syncWithPropertyId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/appFeatures/Concierge/issues",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/issues/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/appFeatures/Concierge",schemaPath:"#/properties/appFeatures/properties/Concierge/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==i.DigitalKey){let e=i.DigitalKey;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.systemOnline&&(e.systemOnline=!1),void 0===e.systemConfig&&(e.systemConfig={}),void 0!==e.system){let s=e.system;if("string"!=typeof s){const e={instancePath:t+"/appFeatures/DigitalKey/system",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/system/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("salto"!==s&&"dormakaba"!==s){const e={instancePath:t+"/appFeatures/DigitalKey/system",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/system/enum",keyword:"enum",params:{allowedValues:ke.properties.appFeatures.properties.DigitalKey.properties.system.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if("boolean"!=typeof e.systemOnline){const e={instancePath:t+"/appFeatures/DigitalKey/systemOnline",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemOnline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}let s=e.systemConfig;if(s&&"object"==typeof s&&!Array.isArray(s)){for(const e in s)if("legicUrl"!==e&&"legicWalletName"!==e&&"legicAppId"!==e&&"legicTechUsername"!==e&&"legicTechPassword"!==e){const s={instancePath:t+"/appFeatures/DigitalKey/systemConfig",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===r?r=[s]:r.push(s),n++}if(void 0!==s.legicUrl){let e=s.legicUrl;if("string"==typeof e){if(!v(e)){const e={instancePath:t+"/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===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/appFeatures/DigitalKey/systemConfig/legicUrl",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/properties/legicUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.legicWalletName&&"string"!=typeof s.legicWalletName){const e={instancePath:t+"/appFeatures/DigitalKey/systemConfig/legicWalletName",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/properties/legicWalletName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.legicAppId&&"number"!=typeof s.legicAppId){const e={instancePath:t+"/appFeatures/DigitalKey/systemConfig/legicAppId",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/properties/legicAppId/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.legicTechUsername&&"string"!=typeof s.legicTechUsername){const e={instancePath:t+"/appFeatures/DigitalKey/systemConfig/legicTechUsername",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/properties/legicTechUsername/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.legicTechPassword&&"string"!=typeof s.legicTechPassword){const e={instancePath:t+"/appFeatures/DigitalKey/systemConfig/legicTechPassword",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/properties/legicTechPassword/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/appFeatures/DigitalKey/systemConfig",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.enableApp&&"boolean"!=typeof e.enableApp){const e={instancePath:t+"/appFeatures/DigitalKey/enableApp",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/enableApp/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.branding){let s=e.branding;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.logo){let e=s.logo;if("string"==typeof e){if(!v(e)){const e={instancePath:t+"/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===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/appFeatures/DigitalKey/branding/logo",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/logo/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.gradient){let e=s.gradient;if(Array.isArray(e)){if(e.length>2){const e={instancePath:t+"/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===r?r=[e]:r.push(e),n++}if(e.length<2){const e={instancePath:t+"/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===r?r=[e]:r.push(e),n++}const s=e.length;for(let i=0;i<s;i++){let s=e[i];if("string"==typeof s){if(!qe.test(s)){const e={instancePath:t+"/appFeatures/DigitalKey/branding/gradient/"+i,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===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/appFeatures/DigitalKey/branding/gradient/"+i,schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/gradient/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/appFeatures/DigitalKey/branding/gradient",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/gradient/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.highlightedGradient){let e=s.highlightedGradient;if(Array.isArray(e)){if(e.length>3){const e={instancePath:t+"/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===r?r=[e]:r.push(e),n++}if(e.length<2){const e={instancePath:t+"/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===r?r=[e]:r.push(e),n++}const s=e.length;for(let i=0;i<s;i++){let s=e[i];if("string"==typeof s){if(!qe.test(s)){const e={instancePath:t+"/appFeatures/DigitalKey/branding/highlightedGradient/"+i,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===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/appFeatures/DigitalKey/branding/highlightedGradient/"+i,schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/highlightedGradient/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/appFeatures/DigitalKey/branding/highlightedGradient",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/highlightedGradient/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/appFeatures/DigitalKey/branding",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/appFeatures/DigitalKey",schemaPath:"#/properties/appFeatures/properties/DigitalKey/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==i.SOS){let e=i.SOS;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.active&&"boolean"!=typeof e.active){const e={instancePath:t+"/appFeatures/SOS/active",schemaPath:"#/properties/appFeatures/properties/SOS/properties/active/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.activeEmergencies){let s=e.activeEmergencies;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("string"!=typeof e){const e={instancePath:t+"/appFeatures/SOS/activeEmergencies/"+i,schemaPath:"#/properties/appFeatures/properties/SOS/properties/activeEmergencies/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("medical"!==e&&"fire"!==e&&"suspiciousPerson"!==e&&"other"!==e&&"conflict"!==e&&"shooter"!==e){const e={instancePath:t+"/appFeatures/SOS/activeEmergencies/"+i,schemaPath:"#/properties/appFeatures/properties/SOS/properties/activeEmergencies/items/enum",keyword:"enum",params:{allowedValues:ke.properties.appFeatures.properties.SOS.properties.activeEmergencies.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/appFeatures/SOS/activeEmergencies",schemaPath:"#/properties/appFeatures/properties/SOS/properties/activeEmergencies/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/appFeatures/SOS",schemaPath:"#/properties/appFeatures/properties/SOS/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==i.Dining){let e=i.Dining;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.system){let s=e.system;if("string"!=typeof s){const e={instancePath:t+"/appFeatures/Dining/system",schemaPath:"#/properties/appFeatures/properties/Dining/properties/system/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("gotab"!==s){const e={instancePath:t+"/appFeatures/Dining/system",schemaPath:"#/properties/appFeatures/properties/Dining/properties/system/enum",keyword:"enum",params:{allowedValues:ke.properties.appFeatures.properties.Dining.properties.system.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.systemConfig){let s=e.systemConfig;if(s&&"object"==typeof s&&!Array.isArray(s)){for(const e in s)if("landingUrl"!==e&&"includeUserDetails"!==e){const s={instancePath:t+"/appFeatures/Dining/systemConfig",schemaPath:"#/properties/appFeatures/properties/Dining/properties/systemConfig/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===r?r=[s]:r.push(s),n++}if(void 0!==s.landingUrl){let e=s.landingUrl;if("string"==typeof e){if(!v(e)){const e={instancePath:t+"/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===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/appFeatures/Dining/systemConfig/landingUrl",schemaPath:"#/properties/appFeatures/properties/Dining/properties/systemConfig/properties/landingUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.includeUserDetails&&"boolean"!=typeof s.includeUserDetails){const e={instancePath:t+"/appFeatures/Dining/systemConfig/includeUserDetails",schemaPath:"#/properties/appFeatures/properties/Dining/properties/systemConfig/properties/includeUserDetails/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/appFeatures/Dining/systemConfig",schemaPath:"#/properties/appFeatures/properties/Dining/properties/systemConfig/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/appFeatures/Dining",schemaPath:"#/properties/appFeatures/properties/Dining/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/appFeatures",schemaPath:"#/properties/appFeatures/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}let o=e.notifications;if(o&&"object"==typeof o&&!Array.isArray(o)){for(const e in o)if("email"!==e&&"sms"!==e&&"push"!==e){const s={instancePath:t+"/notifications",schemaPath:"#/properties/notifications/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===r?r=[s]:r.push(s),n++}if(void 0!==o.email){let e=o.email;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const s in e)if("enabled"!==s){const e={instancePath:t+"/notifications/email",schemaPath:"#/properties/notifications/properties/email/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.enabled&&"boolean"!=typeof e.enabled){const e={instancePath:t+"/notifications/email/enabled",schemaPath:"#/properties/notifications/properties/email/properties/enabled/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/notifications/email",schemaPath:"#/properties/notifications/properties/email/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==o.sms){let e=o.sms;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const s in e)if("enabled"!==s){const e={instancePath:t+"/notifications/sms",schemaPath:"#/properties/notifications/properties/sms/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.enabled&&"boolean"!=typeof e.enabled){const e={instancePath:t+"/notifications/sms/enabled",schemaPath:"#/properties/notifications/properties/sms/properties/enabled/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/notifications/sms",schemaPath:"#/properties/notifications/properties/sms/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==o.push){let e=o.push;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const s in e)if("enabled"!==s){const e={instancePath:t+"/notifications/push",schemaPath:"#/properties/notifications/properties/push/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.enabled&&"boolean"!=typeof e.enabled){const e={instancePath:t+"/notifications/push/enabled",schemaPath:"#/properties/notifications/properties/push/properties/enabled/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/notifications/push",schemaPath:"#/properties/notifications/properties/push/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/notifications",schemaPath:"#/properties/notifications/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.credentials){let s=e.credentials;if(s&&"object"==typeof s&&!Array.isArray(s));else{const e={instancePath:t+"/credentials",schemaPath:"#/properties/credentials/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate61.errors=r,0===n},ke={$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"]}},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}}},je=new RegExp("^([a-zA-Z]+/[a-zA-Z_]+)$","u"),Ae=new RegExp("^[a-zA-Z0-9]+$","u"),qe=new RegExp("^(?!#ffffff)(#[0-9a-fA-F]{6})$","u");var Ne=validate63,Ie={$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"}}},De={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(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(Array.isArray(e)){const s=e.length;for(let i=0;i<s;i++){let s=e[i];if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.id){let e=s.id;if("string"!=typeof e){const e={instancePath:t+"/"+i+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const a=n,o=n;if("global"!==e&&"system"!==e){const e={};null===r?r=[e]:r.push(e),n++}if(o===n){const e={instancePath:t+"/"+i+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=a,null!==r&&(a?r.length=a:r=null)}if(void 0!==s.name&&"string"!=typeof s.name){const e={instancePath:t+"/"+i+"/name",schemaPath:"#/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.date){let e=s.date;if("string"==typeof e){if(!w.validate(e)){const e={instancePath:t+"/"+i+"/date",schemaPath:"#/items/properties/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/"+i+"/date",schemaPath:"#/items/properties/date/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.price&&"number"!=typeof s.price){const e={instancePath:t+"/"+i+"/price",schemaPath:"#/items/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.tax){let e=s.tax;if("number"!=typeof e&&null!==e){const e={instancePath:t+"/"+i+"/tax",schemaPath:"#/items/properties/tax/type",keyword:"type",params:{type:De.items.properties.tax.type},message:"must be number,null"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/"+i,schemaPath:"#/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}return validate64.errors=r,0===n}function validate63(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="reservation"),void 0===e.previousSpace&&(e.previousSpace=null),void 0===e.adultCount&&(e.adultCount=1),void 0===e.childCount&&(e.childCount=0),void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.status){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.checkInDateTime){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"checkInDateTime"},message:"must have required property 'checkInDateTime'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.checkOutDateTime){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"checkOutDateTime"},message:"must have required property 'checkOutDateTime'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.driver){let s=e.driver;if("string"!=typeof s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("adlink"!==s&&"aws-kinesis"!==s&&"butler"!==s&&"crestron"!==s&&"dell"!==s&&"dmp"!==s&&"doorbird"!==s&&"dormakaba"!==s&&"dsc"!==s&&"ecobee"!==s&&"epson"!==s&&"geovision-rs"!==s&&"geovision-as-manager"!==s&&"honeywell-vista"!==s&&"igor"!==s&&"inncom"!==s&&"isapi"!==s&&"kohost-k7"!==s&&"kohost"!==s&&"lg"!==s&&"lg-webos"!==s&&"lapi"!==s&&"lirc"!==s&&"mews"!==s&&"mht"!==s&&"paxton"!==s&&"pelican-wireless"!==s&&"power-shades"!==s&&"rachio"!==s&&"rebrandly"!==s&&"rtsp"!==s&&"salto"!==s&&"salto-irn"!==s&&"samsung"!==s&&"se"!==s&&"sendgrid"!==s&&"sonifi"!==s&&"stay-n-touch"!==s&&"storable"!==s&&"twilio"!==s&&"unifi"!==s&&"valcom"!==s&&"vizio"!==s&&"wisenet"!==s&&"cloudflare-images"!==s&&"cloudflare-stream"!==s&&"insperia-privacy"!==s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:d.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.primaryGuest&&"string"!=typeof e.primaryGuest){const e={instancePath:t+"/primaryGuest",schemaPath:"#/properties/primaryGuest/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("reservation"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:Ie.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.sharedGuests){let s=e.sharedGuests;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++)if("string"!=typeof s[i]){const e={instancePath:t+"/sharedGuests/"+i,schemaPath:"#/properties/sharedGuests/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/sharedGuests",schemaPath:"#/properties/sharedGuests/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.spaceCategory&&"string"!=typeof e.spaceCategory){const e={instancePath:t+"/spaceCategory",schemaPath:"#/properties/spaceCategory/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.space){let s=e.space;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/space",schemaPath:"#/properties/space/type",keyword:"type",params:{type:Ie.properties.space.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}}let i=e.previousSpace;if("string"!=typeof i&&null!==i){const e={instancePath:t+"/previousSpace",schemaPath:"#/properties/previousSpace/type",keyword:"type",params:{type:Ie.properties.previousSpace.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.status){let s=e.status;if("string"!=typeof s){const e={instancePath:t+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("reserved"!==s&&"checkedIn"!==s&&"checkedOut"!==s&&"cancelled"!==s&&"noShow"!==s&&"enquired"!==s&&"requested"!==s&&"optional"!==s){const e={instancePath:t+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:Ie.properties.status.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.mobileCheckInSpaceCategoryChanged&&"boolean"!=typeof e.mobileCheckInSpaceCategoryChanged){const e={instancePath:t+"/mobileCheckInSpaceCategoryChanged",schemaPath:"#/properties/mobileCheckInSpaceCategoryChanged/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.mobileCheckInSpaceChanged&&"boolean"!=typeof e.mobileCheckInSpaceChanged){const e={instancePath:t+"/mobileCheckInSpaceChanged",schemaPath:"#/properties/mobileCheckInSpaceChanged/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.mobileCheckInStatus){let s=e.mobileCheckInStatus;if("string"!=typeof s){const e={instancePath:t+"/mobileCheckInStatus",schemaPath:"#/properties/mobileCheckInStatus/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("ready"!==s&&"blocked"!==s&&"preArrivalStepsRequired"!==s&&"spaceNotAssigned"!==s&&"spaceNotReady"!==s&&"checkInTimeNotStarted"!==s){const e={instancePath:t+"/mobileCheckInStatus",schemaPath:"#/properties/mobileCheckInStatus/enum",keyword:"enum",params:{allowedValues:Ie.properties.mobileCheckInStatus.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.mobileCheckInStatusMessage&&"string"!=typeof e.mobileCheckInStatusMessage){const e={instancePath:t+"/mobileCheckInStatusMessage",schemaPath:"#/properties/mobileCheckInStatusMessage/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.confirmationNumber&&"string"!=typeof e.confirmationNumber){const e={instancePath:t+"/confirmationNumber",schemaPath:"#/properties/confirmationNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.expectedCheckInDateTime){let s=e.expectedCheckInDateTime;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/expectedCheckInDateTime",schemaPath:"#/properties/expectedCheckInDateTime/type",keyword:"type",params:{type:Ie.properties.expectedCheckInDateTime.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/expectedCheckInDateTime",schemaPath:"#/properties/expectedCheckInDateTime/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.checkInDateTime){let s=e.checkInDateTime;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/checkInDateTime",schemaPath:"#/properties/checkInDateTime/type",keyword:"type",params:{type:Ie.properties.checkInDateTime.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/checkInDateTime",schemaPath:"#/properties/checkInDateTime/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.checkOutDateTime){let s=e.checkOutDateTime;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/checkOutDateTime",schemaPath:"#/properties/checkOutDateTime/type",keyword:"type",params:{type:Ie.properties.checkOutDateTime.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/checkOutDateTime",schemaPath:"#/properties/checkOutDateTime/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}let o=e.adultCount;if("number"==typeof o){if(o<1||isNaN(o)){const e={instancePath:t+"/adultCount",schemaPath:"#/properties/adultCount/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/adultCount",schemaPath:"#/properties/adultCount/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if("number"!=typeof e.childCount){const e={instancePath:t+"/childCount",schemaPath:"#/properties/childCount/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.spaceCategoryAvailabilites){let s=e.spaceCategoryAvailabilites;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.id&&"string"!=typeof e.id){const e={instancePath:t+"/spaceCategoryAvailabilites/"+i+"/id",schemaPath:"#/properties/spaceCategoryAvailabilites/items/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.price&&"number"!=typeof e.price){const e={instancePath:t+"/spaceCategoryAvailabilites/"+i+"/price",schemaPath:"#/properties/spaceCategoryAvailabilites/items/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.unit){let s=e.unit;if("string"!=typeof s){const e={instancePath:t+"/spaceCategoryAvailabilites/"+i+"/unit",schemaPath:"#/properties/spaceCategoryAvailabilites/items/properties/unit/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("night"!==s&&"stay"!==s&&"hour"!==s){const e={instancePath:t+"/spaceCategoryAvailabilites/"+i+"/unit",schemaPath:"#/properties/spaceCategoryAvailabilites/items/properties/unit/enum",keyword:"enum",params:{allowedValues:Ie.properties.spaceCategoryAvailabilites.items.properties.unit.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.isUpgrade&&"boolean"!=typeof e.isUpgrade){const e={instancePath:t+"/spaceCategoryAvailabilites/"+i+"/isUpgrade",schemaPath:"#/properties/spaceCategoryAvailabilites/items/properties/isUpgrade/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/spaceCategoryAvailabilites/"+i,schemaPath:"#/properties/spaceCategoryAvailabilites/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/spaceCategoryAvailabilites",schemaPath:"#/properties/spaceCategoryAvailabilites/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.revenue&&(validate64(e.revenue,{instancePath:t+"/revenue",parentData:e,parentDataProperty:"revenue",rootData:a})||(r=null===r?validate64.errors:r.concat(validate64.errors),n=r.length)),void 0!==e.rateSuppressed&&"boolean"!=typeof e.rateSuppressed){const e={instancePath:t+"/rateSuppressed",schemaPath:"#/properties/rateSuppressed/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.payment&&"string"!=typeof e.payment){const e={instancePath:t+"/payment",schemaPath:"#/properties/payment/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.company&&"string"!=typeof e.company){const e={instancePath:t+"/company",schemaPath:"#/properties/company/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.travelAgent&&"string"!=typeof e.travelAgent){const e={instancePath:t+"/travelAgent",schemaPath:"#/properties/travelAgent/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.updatedAt){let s=e.updatedAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/type",keyword:"type",params:{type:le.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate63.errors=r,0===n}var $e=function validate66(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="room"),void 0===e.dimmers&&(e.dimmers=[]),void 0===e.switches&&(e.switches=[]),void 0===e.thermostats&&(e.thermostats=[]),void 0===e.locks&&(e.locks=[]),void 0===e.windowCoverings&&(e.windowCoverings=[]),void 0===e.courtesy&&(e.courtesy=[]),void 0===e.cameras&&(e.cameras=[]),void 0===e.mediaSources&&(e.mediaSources=[]),void 0===e.motionSensors&&(e.motionSensors=[]),void 0===e.alarms&&(e.alarms=[]),void 0===e.id){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.name){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}for(const s in e)if(!P.call(Ce.properties,s)){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("room"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:Ce.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.floor&&"string"!=typeof e.floor){const e={instancePath:t+"/floor",schemaPath:"#/properties/floor/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}let i=e.dimmers;if(Array.isArray(i)){const e=i.length;for(let s=0;s<e;s++)validate27(i[s],{instancePath:t+"/dimmers/"+s,parentData:i,parentDataProperty:s,rootData:a})||(r=null===r?validate27.errors:r.concat(validate27.errors),n=r.length)}else{const e={instancePath:t+"/dimmers",schemaPath:"#/properties/dimmers/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}let o=e.switches;if(Array.isArray(o)){const e=o.length;for(let s=0;s<e;s++)validate68(o[s],{instancePath:t+"/switches/"+s,parentData:o,parentDataProperty:s,rootData:a})||(r=null===r?validate68.errors:r.concat(validate68.errors),n=r.length)}else{const e={instancePath:t+"/switches",schemaPath:"#/properties/switches/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}let p=e.thermostats;if(Array.isArray(p)){const e=p.length;for(let s=0;s<e;s++)validate72(p[s],{instancePath:t+"/thermostats/"+s,parentData:p,parentDataProperty:s,rootData:a})||(r=null===r?validate72.errors:r.concat(validate72.errors),n=r.length)}else{const e={instancePath:t+"/thermostats",schemaPath:"#/properties/thermostats/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}let m=e.locks;if(Array.isArray(m)){const e=m.length;for(let s=0;s<e;s++)validate45(m[s],{instancePath:t+"/locks/"+s,parentData:m,parentDataProperty:s,rootData:a})||(r=null===r?validate45.errors:r.concat(validate45.errors),n=r.length)}else{const e={instancePath:t+"/locks",schemaPath:"#/properties/locks/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}let d=e.windowCoverings;if(Array.isArray(d)){const e=d.length;for(let s=0;s<e;s++)validate81(d[s],{instancePath:t+"/windowCoverings/"+s,parentData:d,parentDataProperty:s,rootData:a})||(r=null===r?validate81.errors:r.concat(validate81.errors),n=r.length)}else{const e={instancePath:t+"/windowCoverings",schemaPath:"#/properties/windowCoverings/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}let u=e.courtesy;if(Array.isArray(u)){const e=u.length;for(let s=0;s<e;s++)validate22(u[s],{instancePath:t+"/courtesy/"+s,parentData:u,parentDataProperty:s,rootData:a})||(r=null===r?validate22.errors:r.concat(validate22.errors),n=r.length)}else{const e={instancePath:t+"/courtesy",schemaPath:"#/properties/courtesy/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}let l=e.cameras;if(Array.isArray(l)){const e=l.length;for(let s=0;s<e;s++)validate17(l[s],{instancePath:t+"/cameras/"+s,parentData:l,parentDataProperty:s,rootData:a})||(r=null===r?validate17.errors:r.concat(validate17.errors),n=r.length)}else{const e={instancePath:t+"/cameras",schemaPath:"#/properties/cameras/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}let c=e.mediaSources;if(Array.isArray(c)){const e=c.length;for(let s=0;s<e;s++)validate49(c[s],{instancePath:t+"/mediaSources/"+s,parentData:c,parentDataProperty:s,rootData:a})||(r=null===r?validate49.errors:r.concat(validate49.errors),n=r.length)}else{const e={instancePath:t+"/mediaSources",schemaPath:"#/properties/mediaSources/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}let y=e.motionSensors;if(Array.isArray(y)){const e=y.length;for(let s=0;s<e;s++)validate52(y[s],{instancePath:t+"/motionSensors/"+s,parentData:y,parentDataProperty:s,rootData:a})||(r=null===r?validate52.errors:r.concat(validate52.errors),n=r.length)}else{const e={instancePath:t+"/motionSensors",schemaPath:"#/properties/motionSensors/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}let h=e.alarms;if(Array.isArray(h)){const e=h.length;for(let s=0;s<e;s++)validate10(h[s],{instancePath:t+"/alarms/"+s,parentData:h,parentDataProperty:s,rootData:a})||(r=null===r?validate10.errors:r.concat(validate10.errors),n=r.length)}else{const e={instancePath:t+"/alarms",schemaPath:"#/properties/alarms/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.occupiedAt){let s=e.occupiedAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/occupiedAt",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:ue.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/occupiedAt",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.createdAt){let s=e.createdAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:ue.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.updatedAt){let s=e.updatedAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/type",keyword:"type",params:{type:le.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate66.errors=r,0===n},Ce={$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},Se={$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(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if((!e||"object"!=typeof e||Array.isArray(e))&&null!==e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:c.type},message:"must be object,null"};null===r?r=[e]:r.push(e),n++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.name){let s=e.name;if("string"!=typeof s){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("button 1"!==s&&"button 2"!==s&&"button 3"!==s&&"button 4"!==s&&"button 5"!==s&&"idle"!==s&&"powerHasBeedApplied"!==s&&"acMainsDisconnected"!==s&&"acMainsReconnected"!==s&&"replaceBatterySoon"!==s&&"replaceBatteryNow"!==s&&"batteryOk"!==s&&"hardwareFailure"!==s&&"softwareFailure"!==s&&"hardwareFailureWithCode"!==s&&"softwareFailureWithCode"!==s&&"motionDetection"!==s&&"airFilterNeedsCleaned"!==s&&"airFilterNeedsReplaced"!==s&&"smokeDetected"!==s&&"outsideSafeTemperatureRange"!==s&&"outsideSafeHumidityRange"!==s&&"scheduleMaintenance"!==s&&"doorAjar"!==s&&"communicationFailure"!==s&&"communicationOk"!==s&&"burglarAlarm"!==s&&"fireAlarm"!==s){const e={instancePath:t+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:y.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.timestamp){let s=e.timestamp;if("number"==typeof s){if(s<1655907956593||isNaN(s)){const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.description&&"string"!=typeof e.description){const e={instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}return validate69.errors=r,0===n}function validate68(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.id){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.state){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"state"},message:"must have required property 'state'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.driver){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.type){let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("alarm"!==s&&"dimmer"!==s&&"switch"!==s&&"motionSensor"!==s&&"windowCovering"!==s&&"camera"!==s&&"mediaSource"!==s&&"thermostat"!==s&&"lock"!==s&&"courtesy"!==s&&"gateway"!==s&&"tv"!==s&&"dvr"!==s&&"appleTv"!==s&&"discPlayer"!==s&&"mediaPlayer"!==s&&"uncontrolledDevice"!==s){const e={instancePath:t+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:A.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.discriminator){let s=e.discriminator;if("string"!=typeof s){const e={instancePath:t+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("light"!==s&&"fan"!==s&&"irrigation"!==s){const e={instancePath:t+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:Se.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.supportedNotifications){let s=e.supportedNotifications;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("button 1"!==e&&"button 2"!==e&&"button 3"!==e&&"button 4"!==e&&"button 5"!==e&&"idle"!==e&&"powerHasBeedApplied"!==e&&"acMainsDisconnected"!==e&&"acMainsReconnected"!==e&&"replaceBatterySoon"!==e&&"replaceBatteryNow"!==e&&"batteryOk"!==e&&"hardwareFailure"!==e&&"softwareFailure"!==e&&"hardwareFailureWithCode"!==e&&"softwareFailureWithCode"!==e&&"motionDetection"!==e&&"airFilterNeedsCleaned"!==e&&"airFilterNeedsReplaced"!==e&&"smokeDetected"!==e&&"outsideSafeTemperatureRange"!==e&&"outsideSafeHumidityRange"!==e&&"scheduleMaintenance"!==e&&"doorAjar"!==e&&"communicationFailure"!==e&&"communicationOk"!==e&&"burglarAlarm"!==e&&"fireAlarm"!==e){const e={instancePath:t+"/supportedNotifications/"+i,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:m.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}let i,a=s.length;if(a>1)e:for(;a--;)for(i=a;i--;)if(u(s[a],s[i])){const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:a,j:i},message:"must NOT have duplicate items (items ## "+i+" and "+a+" are identical)"};null===r?r=[e]:r.push(e),n++;break e}}else{const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.notification&&(validate69(e.notification,{instancePath:t+"/notification",parentData:e,parentDataProperty:"notification",rootData:a})||(r=null===r?validate69.errors:r.concat(validate69.errors),n=r.length)),void 0!==e.driver){let s=e.driver;if("string"!=typeof s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("adlink"!==s&&"aws-kinesis"!==s&&"butler"!==s&&"crestron"!==s&&"dell"!==s&&"dmp"!==s&&"doorbird"!==s&&"dormakaba"!==s&&"dsc"!==s&&"ecobee"!==s&&"epson"!==s&&"geovision-rs"!==s&&"geovision-as-manager"!==s&&"honeywell-vista"!==s&&"igor"!==s&&"inncom"!==s&&"isapi"!==s&&"kohost-k7"!==s&&"kohost"!==s&&"lg"!==s&&"lg-webos"!==s&&"lapi"!==s&&"lirc"!==s&&"mews"!==s&&"mht"!==s&&"paxton"!==s&&"pelican-wireless"!==s&&"power-shades"!==s&&"rachio"!==s&&"rebrandly"!==s&&"rtsp"!==s&&"salto"!==s&&"salto-irn"!==s&&"samsung"!==s&&"se"!==s&&"sendgrid"!==s&&"sonifi"!==s&&"stay-n-touch"!==s&&"storable"!==s&&"twilio"!==s&&"unifi"!==s&&"valcom"!==s&&"vizio"!==s&&"wisenet"!==s&&"cloudflare-images"!==s&&"cloudflare-stream"!==s&&"insperia-privacy"!==s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:d.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.offline&&"boolean"!=typeof e.offline){const e={instancePath:t+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.state){let s=e.state;if("string"!=typeof s){const e={instancePath:t+"/state",schemaPath:"#/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("on"!==s&&"off"!==s){const e={instancePath:t+"/state",schemaPath:"#/properties/state/enum",keyword:"enum",params:{allowedValues:Se.properties.state.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.watts){let s=e.watts;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.icon&&"string"!=typeof e.icon){const e={instancePath:t+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.modelNumber&&"string"!=typeof e.modelNumber){const e={instancePath:t+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.serialNumber&&"string"!=typeof e.serialNumber){const e={instancePath:t+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.firmwareVersion&&"string"!=typeof e.firmwareVersion){const e={instancePath:t+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate68.errors=r,0===n}var Oe={$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"]},Fe={enum:["cool","heat","auto","off"]},Te={enum:["auto","low","medium","high","off","on"]};function validate73(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if((!e||"object"!=typeof e||Array.isArray(e))&&null!==e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:c.type},message:"must be object,null"};null===r?r=[e]:r.push(e),n++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.name){let s=e.name;if("string"!=typeof s){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("button 1"!==s&&"button 2"!==s&&"button 3"!==s&&"button 4"!==s&&"button 5"!==s&&"idle"!==s&&"powerHasBeedApplied"!==s&&"acMainsDisconnected"!==s&&"acMainsReconnected"!==s&&"replaceBatterySoon"!==s&&"replaceBatteryNow"!==s&&"batteryOk"!==s&&"hardwareFailure"!==s&&"softwareFailure"!==s&&"hardwareFailureWithCode"!==s&&"softwareFailureWithCode"!==s&&"motionDetection"!==s&&"airFilterNeedsCleaned"!==s&&"airFilterNeedsReplaced"!==s&&"smokeDetected"!==s&&"outsideSafeTemperatureRange"!==s&&"outsideSafeHumidityRange"!==s&&"scheduleMaintenance"!==s&&"doorAjar"!==s&&"communicationFailure"!==s&&"communicationOk"!==s&&"burglarAlarm"!==s&&"fireAlarm"!==s){const e={instancePath:t+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:y.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.timestamp){let s=e.timestamp;if("number"==typeof s){if(s<1655907956593||isNaN(s)){const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.description&&"string"!=typeof e.description){const e={instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}return validate73.errors=r,0===n}var xe={type:["number","null"],minimum:0,maximum:99};function validate75(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const s in e)if("value"!==s&&"min"!==s&&"max"!==s){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.value){let s=e.value;if("number"==typeof s){if(s>99||isNaN(s)){const e={instancePath:t+"/value",schemaPath:"#/$defs/setpointValue/maximum",keyword:"maximum",params:{comparison:"<=",limit:99},message:"must be <= 99"};null===r?r=[e]:r.push(e),n++}if(s<0||isNaN(s)){const e={instancePath:t+"/value",schemaPath:"#/$defs/setpointValue/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/value",schemaPath:"#/$defs/setpointValue/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.min){let s=e.min;if("number"!=typeof s&&null!==s){const e={instancePath:t+"/min",schemaPath:"#/$defs/setpointMinMax/type",keyword:"type",params:{type:xe.type},message:"must be number,null"};null===r?r=[e]:r.push(e),n++}if("number"==typeof s){if(s>99||isNaN(s)){const e={instancePath:t+"/min",schemaPath:"#/$defs/setpointMinMax/maximum",keyword:"maximum",params:{comparison:"<=",limit:99},message:"must be <= 99"};null===r?r=[e]:r.push(e),n++}if(s<0||isNaN(s)){const e={instancePath:t+"/min",schemaPath:"#/$defs/setpointMinMax/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}}if(void 0!==e.max){let s=e.max;if("number"!=typeof s&&null!==s){const e={instancePath:t+"/max",schemaPath:"#/$defs/setpointMinMax/type",keyword:"type",params:{type:xe.type},message:"must be number,null"};null===r?r=[e]:r.push(e),n++}if("number"==typeof s){if(s>99||isNaN(s)){const e={instancePath:t+"/max",schemaPath:"#/$defs/setpointMinMax/maximum",keyword:"maximum",params:{comparison:"<=",limit:99},message:"must be <= 99"};null===r?r=[e]:r.push(e),n++}if(s<0||isNaN(s)){const e={instancePath:t+"/max",schemaPath:"#/$defs/setpointMinMax/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate75.errors=r,0===n}function validate72(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="thermostat"),void 0===e.temperatureScale&&(e.temperatureScale="fahrenheit"),void 0===e.minAutoDelta&&(e.minAutoDelta=3),void 0===e.id){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.hvacMode){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"hvacMode"},message:"must have required property 'hvacMode'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.fanMode){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"fanMode"},message:"must have required property 'fanMode'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.hvacState){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"hvacState"},message:"must have required property 'hvacState'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.fanState){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"fanState"},message:"must have required property 'fanState'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.setpoints){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"setpoints"},message:"must have required property 'setpoints'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.temperatureScale){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"temperatureScale"},message:"must have required property 'temperatureScale'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.supportedHvacModes){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"supportedHvacModes"},message:"must have required property 'supportedHvacModes'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.supportedFanModes){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"supportedFanModes"},message:"must have required property 'supportedFanModes'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.driver){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"definitions.json#/definitions/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("alarm"!==s&&"dimmer"!==s&&"switch"!==s&&"motionSensor"!==s&&"windowCovering"!==s&&"camera"!==s&&"mediaSource"!==s&&"thermostat"!==s&&"lock"!==s&&"courtesy"!==s&&"gateway"!==s&&"tv"!==s&&"dvr"!==s&&"appleTv"!==s&&"discPlayer"!==s&&"mediaPlayer"!==s&&"uncontrolledDevice"!==s){const e={instancePath:t+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:A.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.driver){let s=e.driver;if("string"!=typeof s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("adlink"!==s&&"aws-kinesis"!==s&&"butler"!==s&&"crestron"!==s&&"dell"!==s&&"dmp"!==s&&"doorbird"!==s&&"dormakaba"!==s&&"dsc"!==s&&"ecobee"!==s&&"epson"!==s&&"geovision-rs"!==s&&"geovision-as-manager"!==s&&"honeywell-vista"!==s&&"igor"!==s&&"inncom"!==s&&"isapi"!==s&&"kohost-k7"!==s&&"kohost"!==s&&"lg"!==s&&"lg-webos"!==s&&"lapi"!==s&&"lirc"!==s&&"mews"!==s&&"mht"!==s&&"paxton"!==s&&"pelican-wireless"!==s&&"power-shades"!==s&&"rachio"!==s&&"rebrandly"!==s&&"rtsp"!==s&&"salto"!==s&&"salto-irn"!==s&&"samsung"!==s&&"se"!==s&&"sendgrid"!==s&&"sonifi"!==s&&"stay-n-touch"!==s&&"storable"!==s&&"twilio"!==s&&"unifi"!==s&&"valcom"!==s&&"vizio"!==s&&"wisenet"!==s&&"cloudflare-images"!==s&&"cloudflare-stream"!==s&&"insperia-privacy"!==s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:d.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.offline&&"boolean"!=typeof e.offline){const e={instancePath:t+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.supportedNotifications){let s=e.supportedNotifications;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("button 1"!==e&&"button 2"!==e&&"button 3"!==e&&"button 4"!==e&&"button 5"!==e&&"idle"!==e&&"powerHasBeedApplied"!==e&&"acMainsDisconnected"!==e&&"acMainsReconnected"!==e&&"replaceBatterySoon"!==e&&"replaceBatteryNow"!==e&&"batteryOk"!==e&&"hardwareFailure"!==e&&"softwareFailure"!==e&&"hardwareFailureWithCode"!==e&&"softwareFailureWithCode"!==e&&"motionDetection"!==e&&"airFilterNeedsCleaned"!==e&&"airFilterNeedsReplaced"!==e&&"smokeDetected"!==e&&"outsideSafeTemperatureRange"!==e&&"outsideSafeHumidityRange"!==e&&"scheduleMaintenance"!==e&&"doorAjar"!==e&&"communicationFailure"!==e&&"communicationOk"!==e&&"burglarAlarm"!==e&&"fireAlarm"!==e){const e={instancePath:t+"/supportedNotifications/"+i,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:m.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}let i,a=s.length;if(a>1)e:for(;a--;)for(i=a;i--;)if(u(s[a],s[i])){const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:a,j:i},message:"must NOT have duplicate items (items ## "+i+" and "+a+" are identical)"};null===r?r=[e]:r.push(e),n++;break e}}else{const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.notification&&(validate73(e.notification,{instancePath:t+"/notification",parentData:e,parentDataProperty:"notification",rootData:a})||(r=null===r?validate73.errors:r.concat(validate73.errors),n=r.length)),void 0!==e.currentTemperature&&"number"!=typeof e.currentTemperature){const e={instancePath:t+"/currentTemperature",schemaPath:"#/properties/currentTemperature/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.currentHumidity){let s=e.currentHumidity;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/currentHumidity",schemaPath:"#/properties/currentHumidity/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/currentHumidity",schemaPath:"#/properties/currentHumidity/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.hvacMode){let s=e.hvacMode;if("string"!=typeof s){const e={instancePath:t+"/hvacMode",schemaPath:"#/properties/hvacMode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("cool"!==s&&"heat"!==s&&"auto"!==s&&"off"!==s){const e={instancePath:t+"/hvacMode",schemaPath:"#/properties/supportedHvacModes/items/enum",keyword:"enum",params:{allowedValues:Fe.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.hvacState){let s=e.hvacState;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/hvacState",schemaPath:"#/properties/hvacState/type",keyword:"type",params:{type:Oe.properties.hvacState.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}if("cooling"!==s&&"heating"!==s&&"off"!==s&&null!==s){const e={instancePath:t+"/hvacState",schemaPath:"#/properties/hvacState/enum",keyword:"enum",params:{allowedValues:Oe.properties.hvacState.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.fanMode){let s=e.fanMode;if("string"!=typeof s){const e={instancePath:t+"/fanMode",schemaPath:"#/properties/fanMode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("auto"!==s&&"low"!==s&&"medium"!==s&&"high"!==s&&"off"!==s&&"on"!==s){const e={instancePath:t+"/fanMode",schemaPath:"#/properties/supportedFanModes/items/enum",keyword:"enum",params:{allowedValues:Te.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.fanState){let s=e.fanState;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/fanState",schemaPath:"#/properties/fanState/type",keyword:"type",params:{type:Oe.properties.fanState.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}if("off"!==s&&"low"!==s&&"medium"!==s&&"high"!==s&&"on"!==s&&null!==s){const e={instancePath:t+"/fanState",schemaPath:"#/properties/fanState/enum",keyword:"enum",params:{allowedValues:Oe.properties.fanState.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}let i=e.temperatureScale;if("string"!=typeof i){const e={instancePath:t+"/temperatureScale",schemaPath:"#/properties/temperatureScale/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("celsius"!==i&&"fahrenheit"!==i){const e={instancePath:t+"/temperatureScale",schemaPath:"#/properties/temperatureScale/enum",keyword:"enum",params:{allowedValues:Oe.properties.temperatureScale.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.humidityScale){let s=e.humidityScale;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/humidityScale",schemaPath:"#/properties/humidityScale/type",keyword:"type",params:{type:Oe.properties.humidityScale.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}if("absolute"!==s&&"relative"!==s&&null!==s){const e={instancePath:t+"/humidityScale",schemaPath:"#/properties/humidityScale/enum",keyword:"enum",params:{allowedValues:Oe.properties.humidityScale.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.supportedHvacModes){let s=e.supportedHvacModes;if(Array.isArray(s)){if(s.length<2){const e={instancePath:t+"/supportedHvacModes",schemaPath:"#/properties/supportedHvacModes/minItems",keyword:"minItems",params:{limit:2},message:"must NOT have fewer than 2 items"};null===r?r=[e]:r.push(e),n++}const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("cool"!==e&&"heat"!==e&&"auto"!==e&&"off"!==e){const e={instancePath:t+"/supportedHvacModes/"+i,schemaPath:"#/properties/supportedHvacModes/items/enum",keyword:"enum",params:{allowedValues:Oe.properties.supportedHvacModes.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}let i,a=s.length;if(a>1)e:for(;a--;)for(i=a;i--;)if(u(s[a],s[i])){const e={instancePath:t+"/supportedHvacModes",schemaPath:"#/properties/supportedHvacModes/uniqueItems",keyword:"uniqueItems",params:{i:a,j:i},message:"must NOT have duplicate items (items ## "+i+" and "+a+" are identical)"};null===r?r=[e]:r.push(e),n++;break e}}else{const e={instancePath:t+"/supportedHvacModes",schemaPath:"#/properties/supportedHvacModes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.supportedFanModes){let s=e.supportedFanModes;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("auto"!==e&&"low"!==e&&"medium"!==e&&"high"!==e&&"off"!==e&&"on"!==e){const e={instancePath:t+"/supportedFanModes/"+i,schemaPath:"#/properties/supportedFanModes/items/enum",keyword:"enum",params:{allowedValues:Oe.properties.supportedFanModes.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}let i,a=s.length;if(a>1)e:for(;a--;)for(i=a;i--;)if(u(s[a],s[i])){const e={instancePath:t+"/supportedFanModes",schemaPath:"#/properties/supportedFanModes/uniqueItems",keyword:"uniqueItems",params:{i:a,j:i},message:"must NOT have duplicate items (items ## "+i+" and "+a+" are identical)"};null===r?r=[e]:r.push(e),n++;break e}}else{const e={instancePath:t+"/supportedFanModes",schemaPath:"#/properties/supportedFanModes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.setpoints){let s=e.setpoints;if(s&&"object"==typeof s&&!Array.isArray(s)){for(const e in s)if("cool"!==e&&"heat"!==e&&"auto"!==e){const s={instancePath:t+"/setpoints",schemaPath:"#/properties/setpoints/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===r?r=[s]:r.push(s),n++}void 0!==s.cool&&(validate75(s.cool,{instancePath:t+"/setpoints/cool",parentData:s,parentDataProperty:"cool",rootData:a})||(r=null===r?validate75.errors:r.concat(validate75.errors),n=r.length)),void 0!==s.heat&&(validate75(s.heat,{instancePath:t+"/setpoints/heat",parentData:s,parentDataProperty:"heat",rootData:a})||(r=null===r?validate75.errors:r.concat(validate75.errors),n=r.length)),void 0!==s.auto&&(validate75(s.auto,{instancePath:t+"/setpoints/auto",parentData:s,parentDataProperty:"auto",rootData:a})||(r=null===r?validate75.errors:r.concat(validate75.errors),n=r.length))}else{const e={instancePath:t+"/setpoints",schemaPath:"#/properties/setpoints/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if("number"!=typeof e.minAutoDelta){const e={instancePath:t+"/minAutoDelta",schemaPath:"#/properties/minAutoDelta/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.cycleRate&&"number"!=typeof e.cycleRate){const e={instancePath:t+"/cycleRate",schemaPath:"#/properties/cycleRate/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.batteryLevel){let s=e.batteryLevel;if("number"==typeof s){if(s>100||isNaN(s)){const e={instancePath:t+"/batteryLevel",schemaPath:"definitions.json#/definitions/batteryLevel/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===r?r=[e]:r.push(e),n++}if(s<0||isNaN(s)){const e={instancePath:t+"/batteryLevel",schemaPath:"definitions.json#/definitions/batteryLevel/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/batteryLevel",schemaPath:"definitions.json#/definitions/batteryLevel/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.watts){let s=e.watts;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.icon&&"string"!=typeof e.icon){const e={instancePath:t+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.modelNumber&&"string"!=typeof e.modelNumber){const e={instancePath:t+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.serialNumber&&"string"!=typeof e.serialNumber){const e={instancePath:t+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.firmwareVersion&&"string"!=typeof e.firmwareVersion){const e={instancePath:t+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate72.errors=r,0===n}var Me={$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(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if((!e||"object"!=typeof e||Array.isArray(e))&&null!==e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:c.type},message:"must be object,null"};null===r?r=[e]:r.push(e),n++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.name){let s=e.name;if("string"!=typeof s){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("button 1"!==s&&"button 2"!==s&&"button 3"!==s&&"button 4"!==s&&"button 5"!==s&&"idle"!==s&&"powerHasBeedApplied"!==s&&"acMainsDisconnected"!==s&&"acMainsReconnected"!==s&&"replaceBatterySoon"!==s&&"replaceBatteryNow"!==s&&"batteryOk"!==s&&"hardwareFailure"!==s&&"softwareFailure"!==s&&"hardwareFailureWithCode"!==s&&"softwareFailureWithCode"!==s&&"motionDetection"!==s&&"airFilterNeedsCleaned"!==s&&"airFilterNeedsReplaced"!==s&&"smokeDetected"!==s&&"outsideSafeTemperatureRange"!==s&&"outsideSafeHumidityRange"!==s&&"scheduleMaintenance"!==s&&"doorAjar"!==s&&"communicationFailure"!==s&&"communicationOk"!==s&&"burglarAlarm"!==s&&"fireAlarm"!==s){const e={instancePath:t+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:y.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.timestamp){let s=e.timestamp;if("number"==typeof s){if(s<1655907956593||isNaN(s)){const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.description&&"string"!=typeof e.description){const e={instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}return validate82.errors=r,0===n}function validate81(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="windowCovering"),void 0===e.discriminator&&(e.discriminator="variable"),void 0===e.id){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.position){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"position"},message:"must have required property 'position'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.driver){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("alarm"!==s&&"dimmer"!==s&&"switch"!==s&&"motionSensor"!==s&&"windowCovering"!==s&&"camera"!==s&&"mediaSource"!==s&&"thermostat"!==s&&"lock"!==s&&"courtesy"!==s&&"gateway"!==s&&"tv"!==s&&"dvr"!==s&&"appleTv"!==s&&"discPlayer"!==s&&"mediaPlayer"!==s&&"uncontrolledDevice"!==s){const e={instancePath:t+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:A.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}let i=e.discriminator;if("string"!=typeof i){const e={instancePath:t+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("basic"!==i&&"variable"!==i){const e={instancePath:t+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:Me.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.supportedNotifications){let s=e.supportedNotifications;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("button 1"!==e&&"button 2"!==e&&"button 3"!==e&&"button 4"!==e&&"button 5"!==e&&"idle"!==e&&"powerHasBeedApplied"!==e&&"acMainsDisconnected"!==e&&"acMainsReconnected"!==e&&"replaceBatterySoon"!==e&&"replaceBatteryNow"!==e&&"batteryOk"!==e&&"hardwareFailure"!==e&&"softwareFailure"!==e&&"hardwareFailureWithCode"!==e&&"softwareFailureWithCode"!==e&&"motionDetection"!==e&&"airFilterNeedsCleaned"!==e&&"airFilterNeedsReplaced"!==e&&"smokeDetected"!==e&&"outsideSafeTemperatureRange"!==e&&"outsideSafeHumidityRange"!==e&&"scheduleMaintenance"!==e&&"doorAjar"!==e&&"communicationFailure"!==e&&"communicationOk"!==e&&"burglarAlarm"!==e&&"fireAlarm"!==e){const e={instancePath:t+"/supportedNotifications/"+i,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:m.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}let i,a=s.length;if(a>1)e:for(;a--;)for(i=a;i--;)if(u(s[a],s[i])){const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:a,j:i},message:"must NOT have duplicate items (items ## "+i+" and "+a+" are identical)"};null===r?r=[e]:r.push(e),n++;break e}}else{const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.notification&&(validate82(e.notification,{instancePath:t+"/notification",parentData:e,parentDataProperty:"notification",rootData:a})||(r=null===r?validate82.errors:r.concat(validate82.errors),n=r.length)),void 0!==e.driver){let s=e.driver;if("string"!=typeof s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("adlink"!==s&&"aws-kinesis"!==s&&"butler"!==s&&"crestron"!==s&&"dell"!==s&&"dmp"!==s&&"doorbird"!==s&&"dormakaba"!==s&&"dsc"!==s&&"ecobee"!==s&&"epson"!==s&&"geovision-rs"!==s&&"geovision-as-manager"!==s&&"honeywell-vista"!==s&&"igor"!==s&&"inncom"!==s&&"isapi"!==s&&"kohost-k7"!==s&&"kohost"!==s&&"lg"!==s&&"lg-webos"!==s&&"lapi"!==s&&"lirc"!==s&&"mews"!==s&&"mht"!==s&&"paxton"!==s&&"pelican-wireless"!==s&&"power-shades"!==s&&"rachio"!==s&&"rebrandly"!==s&&"rtsp"!==s&&"salto"!==s&&"salto-irn"!==s&&"samsung"!==s&&"se"!==s&&"sendgrid"!==s&&"sonifi"!==s&&"stay-n-touch"!==s&&"storable"!==s&&"twilio"!==s&&"unifi"!==s&&"valcom"!==s&&"vizio"!==s&&"wisenet"!==s&&"cloudflare-images"!==s&&"cloudflare-stream"!==s&&"insperia-privacy"!==s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:d.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.offline&&"boolean"!=typeof e.offline){const e={instancePath:t+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.position){let s=e.position;if("number"!=typeof s&&null!==s){const e={instancePath:t+"/position",schemaPath:"#/properties/position/type",keyword:"type",params:{type:Me.properties.position.type},message:"must be number,null"};null===r?r=[e]:r.push(e),n++}if("number"==typeof s){if(s>100||isNaN(s)){const e={instancePath:t+"/position",schemaPath:"#/properties/position/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===r?r=[e]:r.push(e),n++}if(s<0||isNaN(s)){const e={instancePath:t+"/position",schemaPath:"#/properties/position/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.watts){let s=e.watts;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.icon&&"string"!=typeof e.icon){const e={instancePath:t+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.modelNumber&&"string"!=typeof e.modelNumber){const e={instancePath:t+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.serialNumber&&"string"!=typeof e.serialNumber){const e={instancePath:t+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.firmwareVersion&&"string"!=typeof e.firmwareVersion){const e={instancePath:t+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate81.errors=r,0===n}var ze=function validate90(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="scene"),void 0===e.isDefault&&(e.isDefault=!1),void 0===e.showOnUi&&(e.showOnUi=!0),void 0===e.id){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.name){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}for(const s in e)if("id"!==s&&"name"!==s&&"description"!==s&&"type"!==s&&"devices"!==s&&"isDefault"!==s&&"showOnUi"!==s){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.description&&"string"!=typeof e.description){const e={instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("scene"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:Re.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.devices){let s=e.devices;if(s&&"object"==typeof s&&!Array.isArray(s)){void 0===s.dimmers&&(s.dimmers=[]),void 0===s.windowCoverings&&(s.windowCoverings=[]),void 0===s.thermostats&&(s.thermostats=[]);for(const e in s)if("switches"!==e&&"dimmers"!==e&&"windowCoverings"!==e&&"thermostats"!==e&&"mediaSources"!==e&&"locks"!==e){const s={instancePath:t+"/devices",schemaPath:"#/properties/devices/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===r?r=[s]:r.push(s),n++}if(void 0!==s.switches){let e=s.switches;if(Array.isArray(e)){const s=e.length;for(let i=0;i<s;i++){let s=e[i];if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.id){let e=s.id;if("string"!=typeof e){const e={instancePath:t+"/devices/switches/"+i+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const a=n,o=n;if("global"!==e&&"system"!==e){const e={};null===r?r=[e]:r.push(e),n++}if(o===n){const e={instancePath:t+"/devices/switches/"+i+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=a,null!==r&&(a?r.length=a:r=null)}if(void 0!==s.state){let e=s.state;if("string"!=typeof e){const e={instancePath:t+"/devices/switches/"+i+"/state",schemaPath:"switch.json#/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("on"!==e&&"off"!==e){const e={instancePath:t+"/devices/switches/"+i+"/state",schemaPath:"switch.json#/properties/state/enum",keyword:"enum",params:{allowedValues:Ve.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/devices/switches/"+i,schemaPath:"#/properties/devices/properties/switches/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/devices/switches",schemaPath:"#/properties/devices/properties/switches/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}let e=s.dimmers;if(Array.isArray(e)){const s=e.length;for(let i=0;i<s;i++){let s=e[i];if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.id){let e=s.id;if("string"!=typeof e){const e={instancePath:t+"/devices/dimmers/"+i+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const a=n,o=n;if("global"!==e&&"system"!==e){const e={};null===r?r=[e]:r.push(e),n++}if(o===n){const e={instancePath:t+"/devices/dimmers/"+i+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=a,null!==r&&(a?r.length=a:r=null)}if(void 0!==s.level){let e=s.level;if("number"!=typeof e&&null!==e){const e={instancePath:t+"/devices/dimmers/"+i+"/level",schemaPath:"dimmer.json#/properties/level/type",keyword:"type",params:{type:Be.type},message:"must be number,null"};null===r?r=[e]:r.push(e),n++}if("number"==typeof e){if(e>100||isNaN(e)){const e={instancePath:t+"/devices/dimmers/"+i+"/level",schemaPath:"dimmer.json#/properties/level/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===r?r=[e]:r.push(e),n++}if(e<0||isNaN(e)){const e={instancePath:t+"/devices/dimmers/"+i+"/level",schemaPath:"dimmer.json#/properties/level/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}}}else{const e={instancePath:t+"/devices/dimmers/"+i,schemaPath:"#/properties/devices/properties/dimmers/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/devices/dimmers",schemaPath:"#/properties/devices/properties/dimmers/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}let i=s.windowCoverings;if(Array.isArray(i)){const e=i.length;for(let s=0;s<e;s++){let e=i[s];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.id){let i=e.id;if("string"!=typeof i){const e={instancePath:t+"/devices/windowCoverings/"+s+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const a=n,o=n;if("global"!==i&&"system"!==i){const e={};null===r?r=[e]:r.push(e),n++}if(o===n){const e={instancePath:t+"/devices/windowCoverings/"+s+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=a,null!==r&&(a?r.length=a:r=null)}if(void 0!==e.position){let i=e.position;if("number"!=typeof i&&null!==i){const e={instancePath:t+"/devices/windowCoverings/"+s+"/position",schemaPath:"windowCovering.json#/properties/position/type",keyword:"type",params:{type:Le.type},message:"must be number,null"};null===r?r=[e]:r.push(e),n++}if("number"==typeof i){if(i>100||isNaN(i)){const e={instancePath:t+"/devices/windowCoverings/"+s+"/position",schemaPath:"windowCovering.json#/properties/position/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===r?r=[e]:r.push(e),n++}if(i<0||isNaN(i)){const e={instancePath:t+"/devices/windowCoverings/"+s+"/position",schemaPath:"windowCovering.json#/properties/position/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}}}else{const e={instancePath:t+"/devices/windowCoverings/"+s,schemaPath:"#/properties/devices/properties/windowCoverings/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/devices/windowCoverings",schemaPath:"#/properties/devices/properties/windowCoverings/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}let o=s.thermostats;if(Array.isArray(o)){const e=o.length;for(let s=0;s<e;s++){let e=o[s];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.id){let i=e.id;if("string"!=typeof i){const e={instancePath:t+"/devices/thermostats/"+s+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const a=n,o=n;if("global"!==i&&"system"!==i){const e={};null===r?r=[e]:r.push(e),n++}if(o===n){const e={instancePath:t+"/devices/thermostats/"+s+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=a,null!==r&&(a?r.length=a:r=null)}if(void 0!==e.hvacMode&&(validate91(e.hvacMode,{instancePath:t+"/devices/thermostats/"+s+"/hvacMode",parentData:e,parentDataProperty:"hvacMode",rootData:a})||(r=null===r?validate91.errors:r.concat(validate91.errors),n=r.length)),void 0!==e.setpoints&&(validate93(e.setpoints,{instancePath:t+"/devices/thermostats/"+s+"/setpoints",parentData:e,parentDataProperty:"setpoints",rootData:a})||(r=null===r?validate93.errors:r.concat(validate93.errors),n=r.length)),void 0!==e.fanMode&&(validate98(e.fanMode,{instancePath:t+"/devices/thermostats/"+s+"/fanMode",parentData:e,parentDataProperty:"fanMode",rootData:a})||(r=null===r?validate98.errors:r.concat(validate98.errors),n=r.length)),void 0!==e.setpointDelta&&"number"!=typeof e.setpointDelta){const e={instancePath:t+"/devices/thermostats/"+s+"/setpointDelta",schemaPath:"#/properties/devices/properties/thermostats/items/properties/setpointDelta/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/devices/thermostats/"+s,schemaPath:"#/properties/devices/properties/thermostats/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/devices/thermostats",schemaPath:"#/properties/devices/properties/thermostats/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.mediaSources){let e=s.mediaSources;if(Array.isArray(e)){const s=e.length;for(let i=0;i<s;i++){let s=e[i];if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.id){let e=s.id;if("string"!=typeof e){const e={instancePath:t+"/devices/mediaSources/"+i+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const a=n,o=n;if("global"!==e&&"system"!==e){const e={};null===r?r=[e]:r.push(e),n++}if(o===n){const e={instancePath:t+"/devices/mediaSources/"+i+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=a,null!==r&&(a?r.length=a:r=null)}if(void 0!==s.volume){let e=s.volume;if("number"==typeof e){if(e>100||isNaN(e)){const e={instancePath:t+"/devices/mediaSources/"+i+"/volume",schemaPath:"#/properties/devices/properties/mediaSources/items/properties/volume/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===r?r=[e]:r.push(e),n++}if(e<0||isNaN(e)){const e={instancePath:t+"/devices/mediaSources/"+i+"/volume",schemaPath:"#/properties/devices/properties/mediaSources/items/properties/volume/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/devices/mediaSources/"+i+"/volume",schemaPath:"#/properties/devices/properties/mediaSources/items/properties/volume/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.commands){let e=s.commands;if(Array.isArray(e)){const s=e.length;for(let a=0;a<s;a++)if("string"!=typeof e[a]){const e={instancePath:t+"/devices/mediaSources/"+i+"/commands/"+a,schemaPath:"#/properties/devices/properties/mediaSources/items/properties/commands/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/devices/mediaSources/"+i+"/commands",schemaPath:"#/properties/devices/properties/mediaSources/items/properties/commands/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/devices/mediaSources/"+i,schemaPath:"#/properties/devices/properties/mediaSources/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/devices/mediaSources",schemaPath:"#/properties/devices/properties/mediaSources/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.locks){let e=s.locks;if(Array.isArray(e)){const s=e.length;for(let i=0;i<s;i++){let s=e[i];if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.id){let e=s.id;if("string"!=typeof e){const e={instancePath:t+"/devices/locks/"+i+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const a=n,o=n;if("global"!==e&&"system"!==e){const e={};null===r?r=[e]:r.push(e),n++}if(o===n){const e={instancePath:t+"/devices/locks/"+i+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=a,null!==r&&(a?r.length=a:r=null)}if(void 0!==s.state){let e=s.state;if("string"!=typeof e&&null!==e){const e={instancePath:t+"/devices/locks/"+i+"/state",schemaPath:"lock.json#/properties/state/type",keyword:"type",params:{type:Ue.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}if("locked"!==e&&"unlocked"!==e&&null!==e){const e={instancePath:t+"/devices/locks/"+i+"/state",schemaPath:"lock.json#/properties/state/enum",keyword:"enum",params:{allowedValues:Ue.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.mode){let e=s.mode;if("string"!=typeof e&&null!==e){const e={instancePath:t+"/devices/locks/"+i+"/mode",schemaPath:"lock.json#/properties/mode/type",keyword:"type",params:{type:Ee.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}if("normal"!==e&&"autoLock"!==e&&"emergencyOpen"!==e&&"emergencyClose"!==e&&"holdOpen"!==e&&"lockdown"!==e&&null!==e){const e={instancePath:t+"/devices/locks/"+i+"/mode",schemaPath:"lock.json#/properties/mode/enum",keyword:"enum",params:{allowedValues:Ee.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/devices/locks/"+i,schemaPath:"#/properties/devices/properties/locks/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/devices/locks",schemaPath:"#/properties/devices/properties/locks/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/devices",schemaPath:"#/properties/devices/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if("boolean"!=typeof e.isDefault){const e={instancePath:t+"/isDefault",schemaPath:"#/properties/isDefault/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if("boolean"!=typeof e.showOnUi){const e={instancePath:t+"/showOnUi",schemaPath:"#/properties/showOnUi/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate90.errors=r,0===n},Re={$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},Ve={type:"string",enum:["on","off"]},Be={type:["number","null"],minimum:0,maximum:100},Le={type:["number","null"],minimum:0,maximum:100},Ue={type:["string","null"],enum:["locked","unlocked",null]},Ee={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(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if("string"!=typeof e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("cool"!==e&&"heat"!==e&&"auto"!==e&&"off"!==e){const e={instancePath:t,schemaPath:"#/properties/supportedHvacModes/items/enum",keyword:"enum",params:{allowedValues:Fe.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}return validate91.errors=r,0===n}function validate93(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const s in e)if("cool"!==s&&"heat"!==s&&"auto"!==s){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}void 0!==e.cool&&(validate75(e.cool,{instancePath:t+"/cool",parentData:e,parentDataProperty:"cool",rootData:a})||(r=null===r?validate75.errors:r.concat(validate75.errors),n=r.length)),void 0!==e.heat&&(validate75(e.heat,{instancePath:t+"/heat",parentData:e,parentDataProperty:"heat",rootData:a})||(r=null===r?validate75.errors:r.concat(validate75.errors),n=r.length)),void 0!==e.auto&&(validate75(e.auto,{instancePath:t+"/auto",parentData:e,parentDataProperty:"auto",rootData:a})||(r=null===r?validate75.errors:r.concat(validate75.errors),n=r.length))}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate93.errors=r,0===n}function validate98(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if("string"!=typeof e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("auto"!==e&&"low"!==e&&"medium"!==e&&"high"!==e&&"off"!==e&&"on"!==e){const e={instancePath:t,schemaPath:"#/properties/supportedFanModes/items/enum",keyword:"enum",params:{allowedValues:Te.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}return validate98.errors=r,0===n}var Ke=function validate100(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="shortLink"),void 0===e.destination){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"destination"},message:"must have required property 'destination'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.url){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("shortLink"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:He.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.title&&"string"!=typeof e.title){const e={instancePath:t+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.destination){let s=e.destination;if("string"==typeof s&&!v(s)){const e={instancePath:t+"/destination",schemaPath:"#/properties/destination/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.url){let s=e.url;if("string"==typeof s&&!v(s)){const e={instancePath:t+"/url",schemaPath:"#/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate100.errors=r,0===n},He={$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 _e=function validate101(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="smsMessage"),void 0===e.to){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"to"},message:"must have required property 'to'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.from){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"from"},message:"must have required property 'from'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.status){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("smsMessage"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:We.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.to){let s=e.to;if("string"==typeof s){if(!Ze.test(s)){const e={instancePath:t+"/to",schemaPath:"#/properties/to/pattern",keyword:"pattern",params:{pattern:"^\\+[0-9]{1,14}$"},message:'must match pattern "^\\+[0-9]{1,14}$"'};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/to",schemaPath:"#/properties/to/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.from){let s=e.from;if("string"==typeof s){if(!Ze.test(s)){const e={instancePath:t+"/from",schemaPath:"#/properties/from/pattern",keyword:"pattern",params:{pattern:"^\\+[0-9]{1,14}$"},message:'must match pattern "^\\+[0-9]{1,14}$"'};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/from",schemaPath:"#/properties/from/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.media){let s=e.media;if("string"==typeof s){if(!v(s)){const e={instancePath:t+"/media",schemaPath:"#/properties/media/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/media",schemaPath:"#/properties/media/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.status){let s=e.status;if("string"!=typeof s){const e={instancePath:t+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("queued"!==s&&"accepted"!==s&&"sending"!==s&&"sent"!==s&&"failed"!==s&&"delivered"!==s&&"undelivered"!==s&&"receiving"!==s&&"received"!==s&&"read"!==s){const e={instancePath:t+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:We.properties.status.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.body&&"string"!=typeof e.body){const e={instancePath:t+"/body",schemaPath:"#/properties/body/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.driver&&"string"!=typeof e.driver){const e={instancePath:t+"/driver",schemaPath:"#/properties/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.appData){let s=e.appData;if(!s||"object"!=typeof s||Array.isArray(s)){const e={instancePath:t+"/appData",schemaPath:"#/properties/appData/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.createdAt){let s=e.createdAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/createdAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:g.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/createdAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.updatedAt){let s=e.updatedAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:g.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate101.errors=r,0===n},We={$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"}}},Ze=new RegExp("^\\+[0-9]{1,14}$","u");var Ge=function validate102(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;const o=n;let p=!0;const m=n;if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0!==e.type&&"hotelRoom"!==e.type){const e={};null===r?r=[e]:r.push(e),n++}var u=m===n;n=o,null!==r&&(o?r.length=o:r=null);let c;if(u){const s=n;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.features&&(e.features=[]),void 0===e.maximumOccupancy&&(e.maximumOccupancy=2),void 0===e.housekeepingStatus&&(e.housekeepingStatus="dirty"),void 0===e.serviceStatus&&(e.serviceStatus="inService"),void 0===e.name){const e={instancePath:t,schemaPath:"#/then/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/then/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.features){const e={instancePath:t,schemaPath:"#/then/required",keyword:"required",params:{missingProperty:"features"},message:"must have required property 'features'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.maximumOccupancy){const e={instancePath:t,schemaPath:"#/then/required",keyword:"required",params:{missingProperty:"maximumOccupancy"},message:"must have required property 'maximumOccupancy'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.housekeepingStatus){const e={instancePath:t,schemaPath:"#/then/required",keyword:"required",params:{missingProperty:"housekeepingStatus"},message:"must have required property 'housekeepingStatus'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.serviceStatus){const e={instancePath:t,schemaPath:"#/then/required",keyword:"required",params:{missingProperty:"serviceStatus"},message:"must have required property 'serviceStatus'"};null===r?r=[e]:r.push(e),n++}}p=u=s===n,c="then"}else{const s=n;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.name){const e={instancePath:t,schemaPath:"#/else/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/else/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}}p=u=s===n,c="else"}if(!p){const e={instancePath:t,schemaPath:"#/if",keyword:"if",params:{failingKeyword:c},message:'must match "'+c+'" schema'};null===r?r=[e]:r.push(e),n++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="space"),void 0===e.eco&&(e.eco={active:!1,allowed:!1,previousState:null}),void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.name){let s=e.name;if("string"==typeof s){if(l(s)<1){const e={instancePath:t+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("space"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:Ye.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.discriminator){let s=e.discriminator;if("string"!=typeof s){const e={instancePath:t+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("classRoom"!==s&&"hotelRoom"!==s&&"office"!==s&&"building"!==s&&"commonArea"!==s&&"conferenceRoom"!==s&&"lobby"!==s&&"gym"!==s&&"pool"!==s&&"restaurant"!==s&&"unit"!==s){const e={instancePath:t+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:Ye.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.driver){let s=e.driver;if("string"!=typeof s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("adlink"!==s&&"aws-kinesis"!==s&&"butler"!==s&&"crestron"!==s&&"dell"!==s&&"dmp"!==s&&"doorbird"!==s&&"dormakaba"!==s&&"dsc"!==s&&"ecobee"!==s&&"epson"!==s&&"geovision-rs"!==s&&"geovision-as-manager"!==s&&"honeywell-vista"!==s&&"igor"!==s&&"inncom"!==s&&"isapi"!==s&&"kohost-k7"!==s&&"kohost"!==s&&"lg"!==s&&"lg-webos"!==s&&"lapi"!==s&&"lirc"!==s&&"mews"!==s&&"mht"!==s&&"paxton"!==s&&"pelican-wireless"!==s&&"power-shades"!==s&&"rachio"!==s&&"rebrandly"!==s&&"rtsp"!==s&&"salto"!==s&&"salto-irn"!==s&&"samsung"!==s&&"se"!==s&&"sendgrid"!==s&&"sonifi"!==s&&"stay-n-touch"!==s&&"storable"!==s&&"twilio"!==s&&"unifi"!==s&&"valcom"!==s&&"vizio"!==s&&"wisenet"!==s&&"cloudflare-images"!==s&&"cloudflare-stream"!==s&&"insperia-privacy"!==s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:d.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.category&&"string"!=typeof e.category){const e={instancePath:t+"/category",schemaPath:"#/properties/category/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.rooms){let s=e.rooms;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++)if("string"!=typeof s[i]){const e={instancePath:t+"/rooms/"+i,schemaPath:"#/properties/rooms/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/rooms",schemaPath:"#/properties/rooms/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.subGroups){let s=e.subGroups;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++)if("string"!=typeof s[i]){const e={instancePath:t+"/subGroups/"+i,schemaPath:"#/properties/subGroups/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/subGroups",schemaPath:"#/properties/subGroups/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.occupied&&"boolean"!=typeof e.occupied){const e={instancePath:t+"/occupied",schemaPath:"#/properties/occupied/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.inUse&&"boolean"!=typeof e.inUse){const e={instancePath:t+"/inUse",schemaPath:"#/properties/inUse/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}let i=e.eco;if(i&&"object"==typeof i&&!Array.isArray(i)){void 0===i.active&&(i.active=!1),void 0===i.allowed&&(i.allowed=!1);for(const e in i)if("active"!==e&&"activatedAt"!==e&&"allowed"!==e&&"previousState"!==e){const s={instancePath:t+"/eco",schemaPath:"#/properties/eco/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===r?r=[s]:r.push(s),n++}if("boolean"!=typeof i.active){const e={instancePath:t+"/eco/active",schemaPath:"#/properties/eco/properties/active/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==i.activatedAt){let e=i.activatedAt;if("string"!=typeof e&&(!e||"object"!=typeof e||Array.isArray(e))){const e={instancePath:t+"/eco/activatedAt",schemaPath:"#/properties/eco/properties/activatedAt/type",keyword:"type",params:{type:Ye.properties.eco.properties.activatedAt.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof e&&!w.validate(e)){const e={instancePath:t+"/eco/activatedAt",schemaPath:"#/properties/eco/properties/activatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if("boolean"!=typeof i.allowed){const e={instancePath:t+"/eco/allowed",schemaPath:"#/properties/eco/properties/allowed/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==i.previousState){let e=i.previousState;if((!e||"object"!=typeof e||Array.isArray(e))&&null!==e){const e={instancePath:t+"/eco/previousState",schemaPath:"#/properties/eco/properties/previousState/type",keyword:"type",params:{type:Ye.properties.eco.properties.previousState.type},message:"must be object,null"};null===r?r=[e]:r.push(e),n++}if(e&&"object"==typeof e&&!Array.isArray(e)){for(const s in e)if("thermostats"!==s){const e={instancePath:t+"/eco/previousState",schemaPath:"#/properties/eco/properties/previousState/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.thermostats){let s=e.thermostats;if(s&&"object"==typeof s&&!Array.isArray(s)){for(const e in s)if(Xe.test(e)){let i=s[e];if(i&&"object"==typeof i&&!Array.isArray(i))void 0!==i.setpoints&&(validate103(i.setpoints,{instancePath:t+"/eco/previousState/thermostats/"+e.replace(/~/g,"~0").replace(/\//g,"~1")+"/setpoints",parentData:i,parentDataProperty:"setpoints",rootData:a})||(r=null===r?validate103.errors:r.concat(validate103.errors),n=r.length));else{const s={instancePath:t+"/eco/previousState/thermostats/"+e.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===r?r=[s]:r.push(s),n++}}}else{const e={instancePath:t+"/eco/previousState/thermostats",schemaPath:"#/properties/eco/properties/previousState/properties/thermostats/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}}}else{const e={instancePath:t+"/eco",schemaPath:"#/properties/eco/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.features){let s=e.features;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("string"!=typeof e){const e={instancePath:t+"/features/"+i,schemaPath:"#/properties/features/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("pet"!==e){const e={instancePath:t+"/features/"+i,schemaPath:"#/properties/features/items/enum",keyword:"enum",params:{allowedValues:Ye.properties.features.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/features",schemaPath:"#/properties/features/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.maximumOccupancy){let s=e.maximumOccupancy;if("number"==typeof s){if(s<1||isNaN(s)){const e={instancePath:t+"/maximumOccupancy",schemaPath:"#/properties/maximumOccupancy/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/maximumOccupancy",schemaPath:"#/properties/maximumOccupancy/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.housekeepingStatus){let s=e.housekeepingStatus;if("string"!=typeof s){const e={instancePath:t+"/housekeepingStatus",schemaPath:"#/properties/housekeepingStatus/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("clean"!==s&&"dirty"!==s&&"inspected"!==s&&"pickup"!==s){const e={instancePath:t+"/housekeepingStatus",schemaPath:"#/properties/housekeepingStatus/enum",keyword:"enum",params:{allowedValues:Ye.properties.housekeepingStatus.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.serviceStatus){let s=e.serviceStatus;if("string"!=typeof s){const e={instancePath:t+"/serviceStatus",schemaPath:"#/properties/serviceStatus/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("inService"!==s&&"outOfOrder"!==s&&"outOfService"!==s){const e={instancePath:t+"/serviceStatus",schemaPath:"#/properties/serviceStatus/enum",keyword:"enum",params:{allowedValues:Ye.properties.serviceStatus.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate102.errors=r,0===n},Ye={$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"]}},Xe=new RegExp(".*","u");function validate103(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const s in e)if("cool"!==s&&"heat"!==s&&"auto"!==s){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}void 0!==e.cool&&(validate75(e.cool,{instancePath:t+"/cool",parentData:e,parentDataProperty:"cool",rootData:a})||(r=null===r?validate75.errors:r.concat(validate75.errors),n=r.length)),void 0!==e.heat&&(validate75(e.heat,{instancePath:t+"/heat",parentData:e,parentDataProperty:"heat",rootData:a})||(r=null===r?validate75.errors:r.concat(validate75.errors),n=r.length)),void 0!==e.auto&&(validate75(e.auto,{instancePath:t+"/auto",parentData:e,parentDataProperty:"auto",rootData:a})||(r=null===r?validate75.errors:r.concat(validate75.errors),n=r.length))}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate103.errors=r,0===n}var Qe=validate68,Je=function validate108(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="systemUser"),void 0===e.firstName){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"firstName"},message:"must have required property 'firstName'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.lastName){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"lastName"},message:"must have required property 'lastName'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("systemUser"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:et.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.driver){let s=e.driver;if("string"!=typeof s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("adlink"!==s&&"aws-kinesis"!==s&&"butler"!==s&&"crestron"!==s&&"dell"!==s&&"dmp"!==s&&"doorbird"!==s&&"dormakaba"!==s&&"dsc"!==s&&"ecobee"!==s&&"epson"!==s&&"geovision-rs"!==s&&"geovision-as-manager"!==s&&"honeywell-vista"!==s&&"igor"!==s&&"inncom"!==s&&"isapi"!==s&&"kohost-k7"!==s&&"kohost"!==s&&"lg"!==s&&"lg-webos"!==s&&"lapi"!==s&&"lirc"!==s&&"mews"!==s&&"mht"!==s&&"paxton"!==s&&"pelican-wireless"!==s&&"power-shades"!==s&&"rachio"!==s&&"rebrandly"!==s&&"rtsp"!==s&&"salto"!==s&&"salto-irn"!==s&&"samsung"!==s&&"se"!==s&&"sendgrid"!==s&&"sonifi"!==s&&"stay-n-touch"!==s&&"storable"!==s&&"twilio"!==s&&"unifi"!==s&&"valcom"!==s&&"vizio"!==s&&"wisenet"!==s&&"cloudflare-images"!==s&&"cloudflare-stream"!==s&&"insperia-privacy"!==s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:d.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.firstName&&"string"!=typeof e.firstName){const e={instancePath:t+"/firstName",schemaPath:"#/properties/firstName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.lastName&&"string"!=typeof e.lastName){const e={instancePath:t+"/lastName",schemaPath:"#/properties/lastName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.phone){let s=e.phone;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/phone",schemaPath:"#/properties/phone/type",keyword:"type",params:{type:et.properties.phone.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!Ze.test(s)){const e={instancePath:t+"/phone",schemaPath:"#/properties/phone/pattern",keyword:"pattern",params:{pattern:"^\\+[0-9]{1,14}$"},message:'must match pattern "^\\+[0-9]{1,14}$"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.email){let s=e.email;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/email",schemaPath:"#/properties/email/type",keyword:"type",params:{type:et.properties.email.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!tt.test(s)){const e={instancePath:t+"/email",schemaPath:"#/properties/email/format",keyword:"format",params:{format:"email"},message:'must match format "email"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.address){let s=e.address;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.id&&"string"!=typeof s.id){const e={instancePath:t+"/address/id",schemaPath:"definitions.json#/definitions/address/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.line1&&"string"!=typeof s.line1){const e={instancePath:t+"/address/line1",schemaPath:"definitions.json#/definitions/address/properties/line1/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.line2&&"string"!=typeof s.line2){const e={instancePath:t+"/address/line2",schemaPath:"definitions.json#/definitions/address/properties/line2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.line3&&"string"!=typeof s.line3){const e={instancePath:t+"/address/line3",schemaPath:"definitions.json#/definitions/address/properties/line3/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.city&&"string"!=typeof s.city){const e={instancePath:t+"/address/city",schemaPath:"definitions.json#/definitions/address/properties/city/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.state&&"string"!=typeof s.state){const e={instancePath:t+"/address/state",schemaPath:"definitions.json#/definitions/address/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.postalCode&&"string"!=typeof s.postalCode){const e={instancePath:t+"/address/postalCode",schemaPath:"definitions.json#/definitions/address/properties/postalCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.countryCode){let e=s.countryCode;if("string"==typeof e){if(l(e)>2){const e={instancePath:t+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===r?r=[e]:r.push(e),n++}if(l(e)<2){const e={instancePath:t+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/address",schemaPath:"definitions.json#/definitions/address/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.photo&&"string"!=typeof e.photo){const e={instancePath:t+"/photo",schemaPath:"#/properties/photo/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.jobTitle&&"string"!=typeof e.jobTitle){const e={instancePath:t+"/jobTitle",schemaPath:"#/properties/jobTitle/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.dob&&"string"!=typeof e.dob){const e={instancePath:t+"/dob",schemaPath:"#/properties/dob/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.gender){let s=e.gender;if("string"!=typeof s){const e={instancePath:t+"/gender",schemaPath:"#/properties/gender/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("male"!==s&&"female"!==s){const e={instancePath:t+"/gender",schemaPath:"#/properties/gender/enum",keyword:"enum",params:{allowedValues:et.properties.gender.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.roles){let s=e.roles;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("string"!=typeof e){const e={instancePath:t+"/roles/"+i,schemaPath:"#/properties/roles/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("Guest"!==e&&"User"!==e&&"Manager"!==e&&"Maintenance"!==e&&"Administrator"!==e&&"SuperAdmin"!==e){const e={instancePath:t+"/roles/"+i,schemaPath:"#/properties/roles/items/enum",keyword:"enum",params:{allowedValues:et.properties.roles.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/roles",schemaPath:"#/properties/roles/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.nationality){let s=e.nationality;if("string"==typeof s){if(l(s)>2){const e={instancePath:t+"/nationality",schemaPath:"#/properties/nationality/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===r?r=[e]:r.push(e),n++}if(l(s)<2){const e={instancePath:t+"/nationality",schemaPath:"#/properties/nationality/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/nationality",schemaPath:"#/properties/nationality/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.notes){let s=e.notes;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++)if("string"!=typeof s[i]){const e={instancePath:t+"/notes/"+i,schemaPath:"#/properties/notes/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/notes",schemaPath:"#/properties/notes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.files){let s=e.files;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++)validate15(s[i],{instancePath:t+"/files/"+i,parentData:s,parentDataProperty:i,rootData:a})||(r=null===r?validate15.errors:r.concat(validate15.errors),n=r.length)}else{const e={instancePath:t+"/files",schemaPath:"#/properties/files/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.identifications){let s=e.identifications;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++)validate37(s[i],{instancePath:t+"/identifications/"+i,parentData:s,parentDataProperty:i,rootData:a})||(r=null===r?validate37.errors:r.concat(validate37.errors),n=r.length)}else{const e={instancePath:t+"/identifications",schemaPath:"#/properties/identifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.payments){let s=e.payments;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++)validate57(s[i],{instancePath:t+"/payments/"+i,parentData:s,parentDataProperty:i,rootData:a})||(r=null===r?validate57.errors:r.concat(validate57.errors),n=r.length)}else{const e={instancePath:t+"/payments",schemaPath:"#/properties/payments/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.revenue&&(validate112(e.revenue,{instancePath:t+"/revenue",parentData:e,parentDataProperty:"revenue",rootData:a})||(r=null===r?validate112.errors:r.concat(validate112.errors),n=r.length)),void 0!==e.createdAt){let s=e.createdAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:ue.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.updatedAt){let s=e.updatedAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/type",keyword:"type",params:{type:le.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate108.errors=r,0===n},et={$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"}}},tt=/^[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(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(Array.isArray(e)){const s=e.length;for(let i=0;i<s;i++){let s=e[i];if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.id){let e=s.id;if("string"!=typeof e){const e={instancePath:t+"/"+i+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const a=n,o=n;if("global"!==e&&"system"!==e){const e={};null===r?r=[e]:r.push(e),n++}if(o===n){const e={instancePath:t+"/"+i+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=a,null!==r&&(a?r.length=a:r=null)}if(void 0!==s.name&&"string"!=typeof s.name){const e={instancePath:t+"/"+i+"/name",schemaPath:"#/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.date){let e=s.date;if("string"==typeof e){if(!w.validate(e)){const e={instancePath:t+"/"+i+"/date",schemaPath:"#/items/properties/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/"+i+"/date",schemaPath:"#/items/properties/date/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.price&&"number"!=typeof s.price){const e={instancePath:t+"/"+i+"/price",schemaPath:"#/items/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.tax){let e=s.tax;if("number"!=typeof e&&null!==e){const e={instancePath:t+"/"+i+"/tax",schemaPath:"#/items/properties/tax/type",keyword:"type",params:{type:De.items.properties.tax.type},message:"must be number,null"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/"+i,schemaPath:"#/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}return validate112.errors=r,0===n}var st=validate72,it=function validate39(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="ticket"),void 0===e.conversation&&(e.conversation=[]),void 0===e.status&&(e.status="open"),void 0===e.priority&&(e.priority="normal"),void 0===e.tags&&(e.tags=[]),void 0===e.id){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.conversation){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"conversation"},message:"must have required property 'conversation'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.requester){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"requester"},message:"must have required property 'requester'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.status){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.tags){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"tags"},message:"must have required property 'tags'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.createdAt){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"createdAt"},message:"must have required property 'createdAt'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.updatedAt){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"updatedAt"},message:"must have required property 'updatedAt'"};null===r?r=[e]:r.push(e),n++}for(const s in e)if(!P.call(at.properties,s)){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("ticket"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:at.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.number&&"string"!=typeof e.number){const e={instancePath:t+"/number",schemaPath:"#/properties/number/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.issueId&&"string"!=typeof e.issueId){const e={instancePath:t+"/issueId",schemaPath:"#/properties/issueId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}let i=e.conversation;if(Array.isArray(i)){const e=i.length;for(let s=0;s<e;s++){let e=i[s];const m=n;let d=!1;const u=n;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.id){const e={instancePath:t+"/conversation/"+s,schemaPath:"#/properties/conversation/items/anyOf/0/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.userId){const e={instancePath:t+"/conversation/"+s,schemaPath:"#/properties/conversation/items/anyOf/0/required",keyword:"required",params:{missingProperty:"userId"},message:"must have required property 'userId'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.timestamp){const e={instancePath:t+"/conversation/"+s,schemaPath:"#/properties/conversation/items/anyOf/0/required",keyword:"required",params:{missingProperty:"timestamp"},message:"must have required property 'timestamp'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.body){const e={instancePath:t+"/conversation/"+s,schemaPath:"#/properties/conversation/items/anyOf/0/required",keyword:"required",params:{missingProperty:"body"},message:"must have required property 'body'"};null===r?r=[e]:r.push(e),n++}}var o=u===n;if(d=d||o,!d){const i=n;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.id){const e={instancePath:t+"/conversation/"+s,schemaPath:"#/properties/conversation/items/anyOf/1/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.systemId){const e={instancePath:t+"/conversation/"+s,schemaPath:"#/properties/conversation/items/anyOf/1/required",keyword:"required",params:{missingProperty:"systemId"},message:"must have required property 'systemId'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.timestamp){const e={instancePath:t+"/conversation/"+s,schemaPath:"#/properties/conversation/items/anyOf/1/required",keyword:"required",params:{missingProperty:"timestamp"},message:"must have required property 'timestamp'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.body){const e={instancePath:t+"/conversation/"+s,schemaPath:"#/properties/conversation/items/anyOf/1/required",keyword:"required",params:{missingProperty:"body"},message:"must have required property 'body'"};null===r?r=[e]:r.push(e),n++}}o=i===n;if(d=d||o,!d){const i=n;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.id){const e={instancePath:t+"/conversation/"+s,schemaPath:"#/properties/conversation/items/anyOf/2/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.vendorId){const e={instancePath:t+"/conversation/"+s,schemaPath:"#/properties/conversation/items/anyOf/2/required",keyword:"required",params:{missingProperty:"vendorId"},message:"must have required property 'vendorId'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.timestamp){const e={instancePath:t+"/conversation/"+s,schemaPath:"#/properties/conversation/items/anyOf/2/required",keyword:"required",params:{missingProperty:"timestamp"},message:"must have required property 'timestamp'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.body){const e={instancePath:t+"/conversation/"+s,schemaPath:"#/properties/conversation/items/anyOf/2/required",keyword:"required",params:{missingProperty:"body"},message:"must have required property 'body'"};null===r?r=[e]:r.push(e),n++}}o=i===n;d=d||o}}if(d)n=m,null!==r&&(m?r.length=m:r=null);else{const e={instancePath:t+"/conversation/"+s,schemaPath:"#/properties/conversation/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===r?r=[e]:r.push(e),n++}if(e&&"object"==typeof e&&!Array.isArray(e)){void 0===e.readBy&&(e.readBy=[]);for(const i in e)if(!P.call(at.properties.conversation.items.properties,i)){const e={instancePath:t+"/conversation/"+s,schemaPath:"#/properties/conversation/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id&&"string"!=typeof e.id){const e={instancePath:t+"/conversation/"+s+"/id",schemaPath:"#/properties/conversation/items/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.userId&&"string"!=typeof e.userId){const e={instancePath:t+"/conversation/"+s+"/userId",schemaPath:"#/properties/conversation/items/properties/userId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.userName&&"string"!=typeof e.userName){const e={instancePath:t+"/conversation/"+s+"/userName",schemaPath:"#/properties/conversation/items/properties/userName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.vendorId&&"string"!=typeof e.vendorId){const e={instancePath:t+"/conversation/"+s+"/vendorId",schemaPath:"#/properties/conversation/items/properties/vendorId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.vendorName&&"string"!=typeof e.vendorName){const e={instancePath:t+"/conversation/"+s+"/vendorName",schemaPath:"#/properties/conversation/items/properties/vendorName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/conversation/"+s+"/systemId",schemaPath:"#/properties/conversation/items/properties/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.systemName&&"string"!=typeof e.systemName){const e={instancePath:t+"/conversation/"+s+"/systemName",schemaPath:"#/properties/conversation/items/properties/systemName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.timestamp){let i=e.timestamp;if("string"!=typeof i&&(!i||"object"!=typeof i||Array.isArray(i))){const e={instancePath:t+"/conversation/"+s+"/timestamp",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:ue.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof i&&!w.validate(i)){const e={instancePath:t+"/conversation/"+s+"/timestamp",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.body&&"string"!=typeof e.body){const e={instancePath:t+"/conversation/"+s+"/body",schemaPath:"#/properties/conversation/items/properties/body/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}let i=e.readBy;if(Array.isArray(i)){const e=i.length;for(let a=0;a<e;a++)if("string"!=typeof i[a]){const e={instancePath:t+"/conversation/"+s+"/readBy/"+a,schemaPath:"#/properties/conversation/items/properties/readBy/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/conversation/"+s+"/readBy",schemaPath:"#/properties/conversation/items/properties/readBy/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.media){let i=e.media;const o=n;let m=!1;const d=n;validate15(i,{instancePath:t+"/conversation/"+s+"/media",parentData:e,parentDataProperty:"media",rootData:a})||(r=null===r?validate15.errors:r.concat(validate15.errors),n=r.length);var p=d===n;if(m=m||p,!m){const e=n;if(null!==i){const e={instancePath:t+"/conversation/"+s+"/media",schemaPath:"#/properties/conversation/items/properties/media/anyOf/1/type",keyword:"type",params:{type:"null"},message:"must be null"};null===r?r=[e]:r.push(e),n++}p=e===n;m=m||p}if(m)n=o,null!==r&&(o?r.length=o:r=null);else{const e={instancePath:t+"/conversation/"+s+"/media",schemaPath:"#/properties/conversation/items/properties/media/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/conversation/"+s,schemaPath:"#/properties/conversation/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/conversation",schemaPath:"#/properties/conversation/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.openedBy){let s=e.openedBy;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.userId&&"string"!=typeof s.userId){const e={instancePath:t+"/openedBy/userId",schemaPath:"#/properties/openedBy/properties/userId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.systemId&&"string"!=typeof s.systemId){const e={instancePath:t+"/openedBy/systemId",schemaPath:"#/properties/openedBy/properties/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/openedBy",schemaPath:"#/properties/openedBy/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.requester){let s=e.requester;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.systemId&&"string"!=typeof s.systemId){const e={instancePath:t+"/requester/systemId",schemaPath:"#/properties/requester/properties/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.systemName&&"string"!=typeof s.systemName){const e={instancePath:t+"/requester/systemName",schemaPath:"#/properties/requester/properties/systemName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.systemPhoto){let e=s.systemPhoto;const i=n;let o=!1;const p=n;validate15(e,{instancePath:t+"/requester/systemPhoto",parentData:s,parentDataProperty:"systemPhoto",rootData:a})||(r=null===r?validate15.errors:r.concat(validate15.errors),n=r.length);var m=p===n;if(o=o||m,!o){const s=n;if(null!==e){const e={instancePath:t+"/requester/systemPhoto",schemaPath:"#/properties/requester/properties/systemPhoto/anyOf/1/type",keyword:"type",params:{type:"null"},message:"must be null"};null===r?r=[e]:r.push(e),n++}m=s===n;if(o=o||m,!o){const s=n;if("string"!=typeof e){const e={instancePath:t+"/requester/systemPhoto",schemaPath:"#/properties/requester/properties/systemPhoto/anyOf/2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}m=s===n;o=o||m}}if(o)n=i,null!==r&&(i?r.length=i:r=null);else{const e={instancePath:t+"/requester/systemPhoto",schemaPath:"#/properties/requester/properties/systemPhoto/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.userId&&"string"!=typeof s.userId){const e={instancePath:t+"/requester/userId",schemaPath:"#/properties/requester/properties/userId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.userName&&"string"!=typeof s.userName){const e={instancePath:t+"/requester/userName",schemaPath:"#/properties/requester/properties/userName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.userPhoto){let e=s.userPhoto;const i=n;let o=!1;const p=n;validate15(e,{instancePath:t+"/requester/userPhoto",parentData:s,parentDataProperty:"userPhoto",rootData:a})||(r=null===r?validate15.errors:r.concat(validate15.errors),n=r.length);var d=p===n;if(o=o||d,!o){const s=n;if(null!==e){const e={instancePath:t+"/requester/userPhoto",schemaPath:"#/properties/requester/properties/userPhoto/anyOf/1/type",keyword:"type",params:{type:"null"},message:"must be null"};null===r?r=[e]:r.push(e),n++}d=s===n;if(o=o||d,!o){const s=n;if("string"!=typeof e){const e={instancePath:t+"/requester/userPhoto",schemaPath:"#/properties/requester/properties/userPhoto/anyOf/2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}d=s===n;o=o||d}}if(o)n=i,null!==r&&(i?r.length=i:r=null);else{const e={instancePath:t+"/requester/userPhoto",schemaPath:"#/properties/requester/properties/userPhoto/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.deviceId&&"string"!=typeof s.deviceId){const e={instancePath:t+"/requester/deviceId",schemaPath:"#/properties/requester/properties/deviceId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.roomId&&"string"!=typeof s.roomId){const e={instancePath:t+"/requester/roomId",schemaPath:"#/properties/requester/properties/roomId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.reservationId&&"string"!=typeof s.reservationId){const e={instancePath:t+"/requester/reservationId",schemaPath:"#/properties/requester/properties/reservationId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.spaceId&&"string"!=typeof s.spaceId){const e={instancePath:t+"/requester/spaceId",schemaPath:"#/properties/requester/properties/spaceId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.spaceName&&"string"!=typeof s.spaceName){const e={instancePath:t+"/requester/spaceName",schemaPath:"#/properties/requester/properties/spaceName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/requester",schemaPath:"#/properties/requester/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.assignedTo){let s=e.assignedTo;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.userId&&"string"!=typeof s.userId){const e={instancePath:t+"/assignedTo/userId",schemaPath:"#/properties/assignedTo/properties/userId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.userName&&"string"!=typeof s.userName){const e={instancePath:t+"/assignedTo/userName",schemaPath:"#/properties/assignedTo/properties/userName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.userPhoto){let e=s.userPhoto;const i=n;let o=!1;const p=n;validate15(e,{instancePath:t+"/assignedTo/userPhoto",parentData:s,parentDataProperty:"userPhoto",rootData:a})||(r=null===r?validate15.errors:r.concat(validate15.errors),n=r.length);var u=p===n;if(o=o||u,!o){const s=n;if(null!==e){const e={instancePath:t+"/assignedTo/userPhoto",schemaPath:"#/properties/assignedTo/properties/userPhoto/anyOf/1/type",keyword:"type",params:{type:"null"},message:"must be null"};null===r?r=[e]:r.push(e),n++}u=s===n;if(o=o||u,!o){const s=n;if("string"!=typeof e){const e={instancePath:t+"/assignedTo/userPhoto",schemaPath:"#/properties/assignedTo/properties/userPhoto/anyOf/2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}u=s===n;o=o||u}}if(o)n=i,null!==r&&(i?r.length=i:r=null);else{const e={instancePath:t+"/assignedTo/userPhoto",schemaPath:"#/properties/assignedTo/properties/userPhoto/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.vendorId&&"string"!=typeof s.vendorId){const e={instancePath:t+"/assignedTo/vendorId",schemaPath:"#/properties/assignedTo/properties/vendorId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.vendorName&&"string"!=typeof s.vendorName){const e={instancePath:t+"/assignedTo/vendorName",schemaPath:"#/properties/assignedTo/properties/vendorName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.vendorPhoto){let e=s.vendorPhoto;const i=n;let o=!1;const p=n;validate15(e,{instancePath:t+"/assignedTo/vendorPhoto",parentData:s,parentDataProperty:"vendorPhoto",rootData:a})||(r=null===r?validate15.errors:r.concat(validate15.errors),n=r.length);var l=p===n;if(o=o||l,!o){const s=n;if(null!==e){const e={instancePath:t+"/assignedTo/vendorPhoto",schemaPath:"#/properties/assignedTo/properties/vendorPhoto/anyOf/1/type",keyword:"type",params:{type:"null"},message:"must be null"};null===r?r=[e]:r.push(e),n++}l=s===n;if(o=o||l,!o){const s=n;if("string"!=typeof e){const e={instancePath:t+"/assignedTo/vendorPhoto",schemaPath:"#/properties/assignedTo/properties/vendorPhoto/anyOf/2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}l=s===n;o=o||l}}if(o)n=i,null!==r&&(i?r.length=i:r=null);else{const e={instancePath:t+"/assignedTo/vendorPhoto",schemaPath:"#/properties/assignedTo/properties/vendorPhoto/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/assignedTo",schemaPath:"#/properties/assignedTo/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}let c=e.status;if("string"!=typeof c){const e={instancePath:t+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("open"!==c&&"pending"!==c&&"solved"!==c&&"closed"!==c){const e={instancePath:t+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:at.properties.status.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}let y=e.priority;if("string"!=typeof y){const e={instancePath:t+"/priority",schemaPath:"#/properties/priority/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("low"!==y&&"normal"!==y&&"high"!==y){const e={instancePath:t+"/priority",schemaPath:"#/properties/priority/enum",keyword:"enum",params:{allowedValues:at.properties.priority.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}let h=e.tags;if(Array.isArray(h)){const e=h.length;for(let s=0;s<e;s++)if("string"!=typeof h[s]){const e={instancePath:t+"/tags/"+s,schemaPath:"#/properties/tags/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.department&&"string"!=typeof e.department){const e={instancePath:t+"/department",schemaPath:"#/properties/department/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.rating){let s=e.rating;if("number"==typeof s){if(s>5||isNaN(s)){const e={instancePath:t+"/rating",schemaPath:"#/properties/rating/maximum",keyword:"maximum",params:{comparison:"<=",limit:5},message:"must be <= 5"};null===r?r=[e]:r.push(e),n++}if(s<0||isNaN(s)){const e={instancePath:t+"/rating",schemaPath:"#/properties/rating/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/rating",schemaPath:"#/properties/rating/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.ratingComment&&"string"!=typeof e.ratingComment){const e={instancePath:t+"/ratingComment",schemaPath:"#/properties/ratingComment/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.tipAmount&&"string"!=typeof e.tipAmount){const e={instancePath:t+"/tipAmount",schemaPath:"#/properties/tipAmount/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.autoCloseAt){let s=e.autoCloseAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/autoCloseAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:g.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/autoCloseAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.scheduleDate){let s=e.scheduleDate;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/scheduleDate",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:g.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/scheduleDate",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.createdAt){let s=e.createdAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/createdAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:g.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/createdAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.updatedAt){let s=e.updatedAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:g.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.solvedAt){let s=e.solvedAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/solvedAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:g.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/solvedAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.closedAt){let s=e.closedAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/closedAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:g.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/closedAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate39.errors=r,0===n},at={$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 rt=function validate114(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="timeSheet"),void 0===e.locked&&(e.locked=!1),void 0===e.timeEntries&&(e.timeEntries=[]),void 0===e.userId){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"userId"},message:"must have required property 'userId'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.day){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"day"},message:"must have required property 'day'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("timeSheet"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:nt.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.userId){let s=e.userId;if("string"!=typeof s){const e={instancePath:t+"/userId",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/userId",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.day){let s=e.day;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/day",schemaPath:"#/properties/day/type",keyword:"type",params:{type:nt.properties.day.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/day",schemaPath:"#/properties/day/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if("boolean"!=typeof e.locked){const e={instancePath:t+"/locked",schemaPath:"#/properties/locked/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}let i=e.timeEntries;if(Array.isArray(i)){const e=i.length;for(let s=0;s<e;s++){let e=i[s];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.start){const e={instancePath:t+"/timeEntries/"+s,schemaPath:"#/properties/timeEntries/items/required",keyword:"required",params:{missingProperty:"start"},message:"must have required property 'start'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.discriminator){const e={instancePath:t+"/timeEntries/"+s,schemaPath:"#/properties/timeEntries/items/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===r?r=[e]:r.push(e),n++}for(const i in e)if("id"!==i&&"discriminator"!==i&&"start"!==i&&"end"!==i&&"comment"!==i&&"ticketId"!==i){const e={instancePath:t+"/timeEntries/"+s,schemaPath:"#/properties/timeEntries/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let i=e.id;if("string"!=typeof i){const e={instancePath:t+"/timeEntries/"+s+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const a=n,o=n;if("global"!==i&&"system"!==i){const e={};null===r?r=[e]:r.push(e),n++}if(o===n){const e={instancePath:t+"/timeEntries/"+s+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=a,null!==r&&(a?r.length=a:r=null)}if(void 0!==e.discriminator){let i=e.discriminator;if("string"!=typeof i){const e={instancePath:t+"/timeEntries/"+s+"/discriminator",schemaPath:"#/properties/timeEntries/items/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("working"!==i&&"driving"!==i&&"meeting"!==i&&"break"!==i){const e={instancePath:t+"/timeEntries/"+s+"/discriminator",schemaPath:"#/properties/timeEntries/items/properties/discriminator/enum",keyword:"enum",params:{allowedValues:nt.properties.timeEntries.items.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.start){let i=e.start;if("string"!=typeof i&&(!i||"object"!=typeof i||Array.isArray(i))){const e={instancePath:t+"/timeEntries/"+s+"/start",schemaPath:"#/properties/timeEntries/items/properties/start/type",keyword:"type",params:{type:nt.properties.timeEntries.items.properties.start.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof i&&!w.validate(i)){const e={instancePath:t+"/timeEntries/"+s+"/start",schemaPath:"#/properties/timeEntries/items/properties/start/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.end){let i=e.end;if("string"!=typeof i&&(!i||"object"!=typeof i||Array.isArray(i))){const e={instancePath:t+"/timeEntries/"+s+"/end",schemaPath:"#/properties/timeEntries/items/properties/end/type",keyword:"type",params:{type:nt.properties.timeEntries.items.properties.end.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof i&&!w.validate(i)){const e={instancePath:t+"/timeEntries/"+s+"/end",schemaPath:"#/properties/timeEntries/items/properties/end/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.comment&&"string"!=typeof e.comment){const e={instancePath:t+"/timeEntries/"+s+"/comment",schemaPath:"#/properties/timeEntries/items/properties/comment/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.ticketId&&"string"!=typeof e.ticketId){const e={instancePath:t+"/timeEntries/"+s+"/ticketId",schemaPath:"#/properties/timeEntries/items/properties/ticketId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/timeEntries/"+s,schemaPath:"#/properties/timeEntries/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/timeEntries",schemaPath:"#/properties/timeEntries/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate114.errors=r,0===n},nt={$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 ot=function validate115(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="user"),void 0===e.permissions&&(e.permissions=[]),void 0===e.systems&&(e.systems=[]),void 0===e.firstName){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"firstName"},message:"must have required property 'firstName'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.lastName){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"lastName"},message:"must have required property 'lastName'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if("string"!=typeof e.type){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.firstName&&"string"!=typeof e.firstName){const e={instancePath:t+"/firstName",schemaPath:"#/properties/firstName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.lastName&&"string"!=typeof e.lastName){const e={instancePath:t+"/lastName",schemaPath:"#/properties/lastName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.phone){let s=e.phone;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/phone",schemaPath:"#/properties/phone/type",keyword:"type",params:{type:pt.properties.phone.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!Ze.test(s)){const e={instancePath:t+"/phone",schemaPath:"#/properties/phone/pattern",keyword:"pattern",params:{pattern:"^\\+[0-9]{1,14}$"},message:'must match pattern "^\\+[0-9]{1,14}$"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.phoneVerified&&"boolean"!=typeof e.phoneVerified){const e={instancePath:t+"/phoneVerified",schemaPath:"#/properties/phoneVerified/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.email){let s=e.email;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/email",schemaPath:"#/properties/email/type",keyword:"type",params:{type:pt.properties.email.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!tt.test(s)){const e={instancePath:t+"/email",schemaPath:"#/properties/email/format",keyword:"format",params:{format:"email"},message:'must match format "email"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.emailVerified&&"boolean"!=typeof e.emailVerified){const e={instancePath:t+"/emailVerified",schemaPath:"#/properties/emailVerified/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.address){let s=e.address;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.id&&"string"!=typeof s.id){const e={instancePath:t+"/address/id",schemaPath:"definitions.json#/definitions/address/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.line1&&"string"!=typeof s.line1){const e={instancePath:t+"/address/line1",schemaPath:"definitions.json#/definitions/address/properties/line1/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.line2&&"string"!=typeof s.line2){const e={instancePath:t+"/address/line2",schemaPath:"definitions.json#/definitions/address/properties/line2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.line3&&"string"!=typeof s.line3){const e={instancePath:t+"/address/line3",schemaPath:"definitions.json#/definitions/address/properties/line3/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.city&&"string"!=typeof s.city){const e={instancePath:t+"/address/city",schemaPath:"definitions.json#/definitions/address/properties/city/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.state&&"string"!=typeof s.state){const e={instancePath:t+"/address/state",schemaPath:"definitions.json#/definitions/address/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.postalCode&&"string"!=typeof s.postalCode){const e={instancePath:t+"/address/postalCode",schemaPath:"definitions.json#/definitions/address/properties/postalCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.countryCode){let e=s.countryCode;if("string"==typeof e){if(l(e)>2){const e={instancePath:t+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===r?r=[e]:r.push(e),n++}if(l(e)<2){const e={instancePath:t+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/address",schemaPath:"definitions.json#/definitions/address/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.secretKey&&"string"!=typeof e.secretKey){const e={instancePath:t+"/secretKey",schemaPath:"#/properties/secretKey/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.photo&&(validate15(e.photo,{instancePath:t+"/photo",parentData:e,parentDataProperty:"photo",rootData:a})||(r=null===r?validate15.errors:r.concat(validate15.errors),n=r.length)),void 0!==e.jobTitle&&"string"!=typeof e.jobTitle){const e={instancePath:t+"/jobTitle",schemaPath:"#/properties/jobTitle/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.dob&&"string"!=typeof e.dob){const e={instancePath:t+"/dob",schemaPath:"#/properties/dob/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.gender){let s=e.gender;if("string"!=typeof s){const e={instancePath:t+"/gender",schemaPath:"#/properties/gender/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("male"!==s&&"female"!==s){const e={instancePath:t+"/gender",schemaPath:"#/properties/gender/enum",keyword:"enum",params:{allowedValues:pt.properties.gender.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.nationality){let s=e.nationality;if("string"==typeof s){if(l(s)>2){const e={instancePath:t+"/nationality",schemaPath:"#/properties/nationality/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===r?r=[e]:r.push(e),n++}if(l(s)<2){const e={instancePath:t+"/nationality",schemaPath:"#/properties/nationality/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/nationality",schemaPath:"#/properties/nationality/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}let s=e.permissions;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.organizationId){const e={instancePath:t+"/permissions/"+i,schemaPath:"#/properties/permissions/items/required",keyword:"required",params:{missingProperty:"organizationId"},message:"must have required property 'organizationId'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.propertyId){const e={instancePath:t+"/permissions/"+i,schemaPath:"#/properties/permissions/items/required",keyword:"required",params:{missingProperty:"propertyId"},message:"must have required property 'propertyId'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.role){const e={instancePath:t+"/permissions/"+i,schemaPath:"#/properties/permissions/items/required",keyword:"required",params:{missingProperty:"role"},message:"must have required property 'role'"};null===r?r=[e]:r.push(e),n++}for(const s in e)if("organizationId"!==s&&"propertyId"!==s&&"role"!==s&&"department"!==s&&"policyIds"!==s&&"policies"!==s){const e={instancePath:t+"/permissions/"+i,schemaPath:"#/properties/permissions/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.organizationId&&"string"!=typeof e.organizationId){const e={instancePath:t+"/permissions/"+i+"/organizationId",schemaPath:"#/properties/permissions/items/properties/organizationId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.propertyId&&"string"!=typeof e.propertyId){const e={instancePath:t+"/permissions/"+i+"/propertyId",schemaPath:"#/properties/permissions/items/properties/propertyId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.role){let s=e.role;if("string"!=typeof s){const e={instancePath:t+"/permissions/"+i+"/role",schemaPath:"#/properties/permissions/items/properties/role/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("Guest"!==s&&"User"!==s&&"Manager"!==s&&"Maintenance"!==s&&"Administrator"!==s&&"SuperAdmin"!==s){const e={instancePath:t+"/permissions/"+i+"/role",schemaPath:"#/properties/permissions/items/properties/role/enum",keyword:"enum",params:{allowedValues:pt.properties.permissions.items.properties.role.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.department&&"string"!=typeof e.department){const e={instancePath:t+"/permissions/"+i+"/department",schemaPath:"#/properties/permissions/items/properties/department/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.policyIds){let s=e.policyIds;if(Array.isArray(s)){const e=s.length;for(let a=0;a<e;a++)if("string"!=typeof s[a]){const e={instancePath:t+"/permissions/"+i+"/policyIds/"+a,schemaPath:"#/properties/permissions/items/properties/policyIds/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/permissions/"+i+"/policyIds",schemaPath:"#/properties/permissions/items/properties/policyIds/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.policies){let s=e.policies;if(Array.isArray(s)){const e=s.length;for(let o=0;o<e;o++)validate58(s[o],{instancePath:t+"/permissions/"+i+"/policies/"+o,parentData:s,parentDataProperty:o,rootData:a})||(r=null===r?validate58.errors:r.concat(validate58.errors),n=r.length)}else{const e={instancePath:t+"/permissions/"+i+"/policies",schemaPath:"#/properties/permissions/items/properties/policies/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/permissions/"+i,schemaPath:"#/properties/permissions/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/permissions",schemaPath:"#/properties/permissions/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.notes){let s=e.notes;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++)if("string"!=typeof s[i]){const e={instancePath:t+"/notes/"+i,schemaPath:"#/properties/notes/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/notes",schemaPath:"#/properties/notes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.files){let s=e.files;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++)validate15(s[i],{instancePath:t+"/files/"+i,parentData:s,parentDataProperty:i,rootData:a})||(r=null===r?validate15.errors:r.concat(validate15.errors),n=r.length)}else{const e={instancePath:t+"/files",schemaPath:"#/properties/files/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.identifications){let s=e.identifications;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++)validate37(s[i],{instancePath:t+"/identifications/"+i,parentData:s,parentDataProperty:i,rootData:a})||(r=null===r?validate37.errors:r.concat(validate37.errors),n=r.length)}else{const e={instancePath:t+"/identifications",schemaPath:"#/properties/identifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.payments){let s=e.payments;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++)validate57(s[i],{instancePath:t+"/payments/"+i,parentData:s,parentDataProperty:i,rootData:a})||(r=null===r?validate57.errors:r.concat(validate57.errors),n=r.length)}else{const e={instancePath:t+"/payments",schemaPath:"#/properties/payments/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.location){let s=e.location;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0===s.accuracy){const e={instancePath:t+"/location",schemaPath:"#/properties/location/required",keyword:"required",params:{missingProperty:"accuracy"},message:"must have required property 'accuracy'"};null===r?r=[e]:r.push(e),n++}if(void 0===s.latitude){const e={instancePath:t+"/location",schemaPath:"#/properties/location/required",keyword:"required",params:{missingProperty:"latitude"},message:"must have required property 'latitude'"};null===r?r=[e]:r.push(e),n++}if(void 0===s.longitude){const e={instancePath:t+"/location",schemaPath:"#/properties/location/required",keyword:"required",params:{missingProperty:"longitude"},message:"must have required property 'longitude'"};null===r?r=[e]:r.push(e),n++}if(void 0===s.timestamp){const e={instancePath:t+"/location",schemaPath:"#/properties/location/required",keyword:"required",params:{missingProperty:"timestamp"},message:"must have required property 'timestamp'"};null===r?r=[e]:r.push(e),n++}for(const e in s)if("accuracy"!==e&&"latitude"!==e&&"longitude"!==e&&"timestamp"!==e){const s={instancePath:t+"/location",schemaPath:"#/properties/location/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===r?r=[s]:r.push(s),n++}if(void 0!==s.accuracy){let e=s.accuracy;if("number"!=typeof e&&null!==e){const e={instancePath:t+"/location/accuracy",schemaPath:"#/properties/location/properties/accuracy/type",keyword:"type",params:{type:pt.properties.location.properties.accuracy.type},message:"must be number,null"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.latitude){let e=s.latitude;if("number"!=typeof e&&null!==e){const e={instancePath:t+"/location/latitude",schemaPath:"#/properties/location/properties/latitude/type",keyword:"type",params:{type:pt.properties.location.properties.latitude.type},message:"must be number,null"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.longitude){let e=s.longitude;if("number"!=typeof e&&null!==e){const e={instancePath:t+"/location/longitude",schemaPath:"#/properties/location/properties/longitude/type",keyword:"type",params:{type:pt.properties.location.properties.longitude.type},message:"must be number,null"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.timestamp){let e=s.timestamp;if("number"!=typeof e&&null!==e){const e={instancePath:t+"/location/timestamp",schemaPath:"#/properties/location/properties/timestamp/type",keyword:"type",params:{type:pt.properties.location.properties.timestamp.type},message:"must be number,null"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/location",schemaPath:"#/properties/location/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.reservations){let s=e.reservations;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++)validate63(s[i],{instancePath:t+"/reservations/"+i,parentData:s,parentDataProperty:i,rootData:a})||(r=null===r?validate63.errors:r.concat(validate63.errors),n=r.length)}else{const e={instancePath:t+"/reservations",schemaPath:"#/properties/reservations/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.spaceName&&"string"!=typeof e.spaceName){const e={instancePath:t+"/spaceName",schemaPath:"#/properties/spaceName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.revenue&&(validate122(e.revenue,{instancePath:t+"/revenue",parentData:e,parentDataProperty:"revenue",rootData:a})||(r=null===r?validate122.errors:r.concat(validate122.errors),n=r.length)),void 0!==e.createdAt){let s=e.createdAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:ue.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.updatedAt){let s=e.updatedAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/type",keyword:"type",params:{type:le.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}let i=e.systems;if(Array.isArray(i)){const e=i.length;for(let s=0;s<e;s++){let e=i[s];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.systemId){const e={instancePath:t+"/systems/"+s,schemaPath:"#/properties/systems/items/required",keyword:"required",params:{missingProperty:"systemId"},message:"must have required property 'systemId'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.propertyId){const e={instancePath:t+"/systems/"+s,schemaPath:"#/properties/systems/items/required",keyword:"required",params:{missingProperty:"propertyId"},message:"must have required property 'propertyId'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.driver){const e={instancePath:t+"/systems/"+s,schemaPath:"#/properties/systems/items/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===r?r=[e]:r.push(e),n++}for(const i in e)if("systemId"!==i&&"propertyId"!==i&&"driver"!==i){const e={instancePath:t+"/systems/"+s,schemaPath:"#/properties/systems/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systems/"+s+"/systemId",schemaPath:"#/properties/systems/items/properties/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.propertyId&&"string"!=typeof e.propertyId){const e={instancePath:t+"/systems/"+s+"/propertyId",schemaPath:"#/properties/systems/items/properties/propertyId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.driver&&"string"!=typeof e.driver){const e={instancePath:t+"/systems/"+s+"/driver",schemaPath:"#/properties/systems/items/properties/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/systems/"+s,schemaPath:"#/properties/systems/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/systems",schemaPath:"#/properties/systems/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate115.errors=r,0===n},pt={$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(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(Array.isArray(e)){const s=e.length;for(let i=0;i<s;i++){let s=e[i];if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.id){let e=s.id;if("string"!=typeof e){const e={instancePath:t+"/"+i+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const a=n,o=n;if("global"!==e&&"system"!==e){const e={};null===r?r=[e]:r.push(e),n++}if(o===n){const e={instancePath:t+"/"+i+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=a,null!==r&&(a?r.length=a:r=null)}if(void 0!==s.name&&"string"!=typeof s.name){const e={instancePath:t+"/"+i+"/name",schemaPath:"#/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.date){let e=s.date;if("string"==typeof e){if(!w.validate(e)){const e={instancePath:t+"/"+i+"/date",schemaPath:"#/items/properties/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/"+i+"/date",schemaPath:"#/items/properties/date/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.price&&"number"!=typeof s.price){const e={instancePath:t+"/"+i+"/price",schemaPath:"#/items/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.tax){let e=s.tax;if("number"!=typeof e&&null!==e){const e={instancePath:t+"/"+i+"/tax",schemaPath:"#/items/properties/tax/type",keyword:"type",params:{type:De.items.properties.tax.type},message:"must be number,null"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/"+i,schemaPath:"#/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}return validate122.errors=r,0===n}var mt=function validate124(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="vendor"),void 0===e.name){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.email){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"email"},message:"must have required property 'email'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("vendor"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:dt.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.phone){let s=e.phone;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/phone",schemaPath:"#/properties/phone/type",keyword:"type",params:{type:dt.properties.phone.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!Ze.test(s)){const e={instancePath:t+"/phone",schemaPath:"#/properties/phone/pattern",keyword:"pattern",params:{pattern:"^\\+[0-9]{1,14}$"},message:'must match pattern "^\\+[0-9]{1,14}$"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.email){let s=e.email;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/email",schemaPath:"#/properties/email/type",keyword:"type",params:{type:dt.properties.email.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!tt.test(s)){const e={instancePath:t+"/email",schemaPath:"#/properties/email/format",keyword:"format",params:{format:"email"},message:'must match format "email"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.address){let s=e.address;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.id&&"string"!=typeof s.id){const e={instancePath:t+"/address/id",schemaPath:"definitions.json#/definitions/address/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.line1&&"string"!=typeof s.line1){const e={instancePath:t+"/address/line1",schemaPath:"definitions.json#/definitions/address/properties/line1/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.line2&&"string"!=typeof s.line2){const e={instancePath:t+"/address/line2",schemaPath:"definitions.json#/definitions/address/properties/line2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.line3&&"string"!=typeof s.line3){const e={instancePath:t+"/address/line3",schemaPath:"definitions.json#/definitions/address/properties/line3/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.city&&"string"!=typeof s.city){const e={instancePath:t+"/address/city",schemaPath:"definitions.json#/definitions/address/properties/city/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.state&&"string"!=typeof s.state){const e={instancePath:t+"/address/state",schemaPath:"definitions.json#/definitions/address/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.postalCode&&"string"!=typeof s.postalCode){const e={instancePath:t+"/address/postalCode",schemaPath:"definitions.json#/definitions/address/properties/postalCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.countryCode){let e=s.countryCode;if("string"==typeof e){if(l(e)>2){const e={instancePath:t+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===r?r=[e]:r.push(e),n++}if(l(e)<2){const e={instancePath:t+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/address",schemaPath:"definitions.json#/definitions/address/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.photo&&(validate15(e.photo,{instancePath:t+"/photo",parentData:e,parentDataProperty:"photo",rootData:a})||(r=null===r?validate15.errors:r.concat(validate15.errors),n=r.length)),void 0!==e.createdAt){let s=e.createdAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:ue.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.updatedAt){let s=e.updatedAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/type",keyword:"type",params:{type:le.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!w.validate(s)){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate124.errors=r,0===n},dt={$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 ut=validate81,lt=class extends n{constructor(e){super(e),this.id=e.id,this.name=e.name,this.offline=e.offline,this.type=e.type,this.systemId=e.systemId,this.supportedNotifications=e.supportedNotifications,this.notification=e.notification,this.driver=e.driver,this.areas=e.areas,this.zones=e.zones,this.chime=e.chime,this.watts=e.watts,this.icon=e.icon,this.modelNumber=e.modelNumber,this.serialNumber=e.serialNumber,this.firmwareVersion=e.firmwareVersion,this.address=e.address}};Object.defineProperty(lt.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(lt.prototype,"validator",{get:function(){return o}});var ct=class extends n{constructor(e){super(e),this.id=e.id,this.type=e.type,this.users=e.users,this.group=e.group,this.body=e.body,this.media=e.media,this.sentBy=e.sentBy,this.tags=e.tags,this.createdAt=e.createdAt,this.updatedAt=e.updatedAt}};Object.defineProperty(ct.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(ct.prototype,"validator",{get:function(){return h}});var yt=class extends n{constructor(e){super(e),this.id=e.id,this.name=e.name,this.type=e.type,this.offline=e.offline,this.supportedNotifications=e.supportedNotifications,this.notification=e.notification,this.driver=e.driver,this.liveStreams=e.liveStreams,this.liveStream=e.liveStream,this.systemId=e.systemId,this.watts=e.watts,this.icon=e.icon,this.modelNumber=e.modelNumber,this.serialNumber=e.serialNumber,this.firmwareVersion=e.firmwareVersion}};Object.defineProperty(yt.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(yt.prototype,"validator",{get:function(){return k}});var ht=class extends n{constructor(e){super(e),this.id=e.id,this.type=e.type,this.name=e.name,this.driver=e.driver,this.description=e.description,this.image=e.image,this.rating=e.rating,this.discriminator=e.discriminator,this.systemId=e.systemId}};Object.defineProperty(ht.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(ht.prototype,"validator",{get:function(){return q}});var ft=class extends n{constructor(e){super(e),this.id=e.id,this.name=e.name,this.type=e.type,this.supportedNotifications=e.supportedNotifications,this.notification=e.notification,this.driver=e.driver,this.offline=e.offline,this.supportedStates=e.supportedStates,this.state=e.state,this.systemId=e.systemId,this.watts=e.watts,this.icon=e.icon,this.modelNumber=e.modelNumber,this.serialNumber=e.serialNumber,this.firmwareVersion=e.firmwareVersion}};Object.defineProperty(ft.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(ft.prototype,"validator",{get:function(){return I}});var gt=class extends n{constructor(e){super(e),this.id=e.id,this.type=e.type,this.driver=e.driver,this.discriminator=e.discriminator,this.credential=e.credential,this.userId=e.userId,this.organizationId=e.organizationId,this.propertyId=e.propertyId,this.deviceId=e.deviceId,this.userAgent=e.userAgent,this.expires=e.expires,this.systemId=e.systemId}};Object.defineProperty(gt.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(gt.prototype,"validator",{get:function(){return C}});var Pt=class extends n{constructor(e){super(e),this.id=e.id,this.type=e.type,this.driver=e.driver,this.organizationId=e.organizationId,this.devices=e.devices}};Object.defineProperty(Pt.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(Pt.prototype,"validator",{get:function(){return O}});var bt=class extends n{constructor(e){super(e),this.id=e.id,this.name=e.name,this.type=e.type,this.supportedNotifications=e.supportedNotifications,this.notification=e.notification,this.driver=e.driver,this.offline=e.offline,this.level=e.level,this.systemId=e.systemId,this.watts=e.watts,this.icon=e.icon,this.modelNumber=e.modelNumber,this.serialNumber=e.serialNumber,this.firmwareVersion=e.firmwareVersion}};Object.defineProperty(bt.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(bt.prototype,"validator",{get:function(){return T}});var vt=class extends n{constructor(e){super(e),this.id=e.id,this.name=e.name,this.deviceId=e.deviceId,this.type=e.type,this.discriminator=e.discriminator,this.driver=e.driver,this.deviceData=e.deviceData,this.ignore=e.ignore,this.organizationId=e.organizationId,this.propertyId=e.propertyId}};Object.defineProperty(vt.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(vt.prototype,"validator",{get:function(){return M}});var wt=class extends n{constructor(e){super(e),this.id=e.id,this.type=e.type,this.to=e.to,this.from=e.from,this.subject=e.subject,this.status=e.status,this.statusMessage=e.statusMessage,this.html=e.html,this.text=e.text,this.driver=e.driver,this.appData=e.appData,this.createdAt=e.createdAt,this.updatedAt=e.updatedAt,this.systemId=e.systemId}};Object.defineProperty(wt.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(wt.prototype,"validator",{get:function(){return R}});var kt=class extends n{constructor(e){super(e),this.id=e.id,this.type=e.type,this.reportTime=e.reportTime,this.roomId=e.roomId,this.first=e.first,this.last=e.last,this.consumption=e.consumption,this.totals=e.totals,this.costPerKw=e.costPerKw}};Object.defineProperty(kt.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(kt.prototype,"validator",{get:function(){return U}});var jt=class extends n{constructor(e){super(e),this.id=e.id,this.type=e.type,this.roomId=e.roomId,this.first=e.first,this.last=e.last,this.data=e.data,this.ndata=e.ndata,this.expires=e.expires}};Object.defineProperty(jt.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(jt.prototype,"validator",{get:function(){return K}});var At=class extends n{constructor(e){super(e),this.id=e.id,this.type=e.type,this.supportedNotifications=e.supportedNotifications,this.notification=e.notification,this.status=e.status,this.systemId=e.systemId,this.driver=e.driver,this.watts=e.watts,this.icon=e.icon,this.modelNumber=e.modelNumber,this.serialNumber=e.serialNumber,this.firmwareVersion=e.firmwareVersion}};Object.defineProperty(At.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(At.prototype,"validator",{get:function(){return _}});var qt=class extends n{constructor(e){super(e),this.id=e.id,this.type=e.type,this.number=e.number,this.maskedNumber=e.maskedNumber,this.encryptedNumber=e.encryptedNumber,this.issued=e.issued,this.expires=e.expires,this.verified=e.verified,this.matched=e.matched,this.firstName=e.firstName,this.lastName=e.lastName,this.issuingCountry=e.issuingCountry,this.systemId=e.systemId}};Object.defineProperty(qt.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(qt.prototype,"validator",{get:function(){return W}});var Nt=class extends n{constructor(e){super(e),this.id=e.id,this.type=e.type,this.name=e.name,this.description=e.description,this.department=e.department,this.autoAssign=e.autoAssign,this.systemKey=e.systemKey,this.autoCreateTicket=e.autoCreateTicket,this.excludedResources=e.excludedResources}};Object.defineProperty(Nt.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(Nt.prototype,"validator",{get:function(){return G}});var It=class extends n{constructor(e){super(e),this.id=e.id,this.name=e.name,this.type=e.type,this.offline=e.offline,this.supportedNotifications=e.supportedNotifications,this.notification=e.notification,this.driver=e.driver,this.state=e.state,this.mode=e.mode,this.supportedModes=e.supportedModes,this.batteryLevel=e.batteryLevel,this.systemId=e.systemId,this.watts=e.watts,this.icon=e.icon,this.modelNumber=e.modelNumber,this.serialNumber=e.serialNumber,this.firmwareVersion=e.firmwareVersion}};Object.defineProperty(It.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(It.prototype,"validator",{get:function(){return Q}});var Dt=class extends n{constructor(e){super(e),this.type=e.type,this.timestamp=e.timestamp,this.name=e.name,this.field1=e.field1,this.field2=e.field2,this.field3=e.field3,this.field4=e.field4,this.field5=e.field5,this.field6=e.field6}};Object.defineProperty(Dt.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},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(Dt.prototype,"validator",{get:function(){return ee}});var $t=class extends n{constructor(e){super(e),this.id=e.id,this.type=e.type,this.name=e.name,this.fileHash=e.fileHash,this.category=e.category,this.mimeType=e.mimeType,this.data=e.data,this.url=e.url,this.width=e.width,this.height=e.height,this.size=e.size,this.uploadUrl=e.uploadUrl,this.uploadUrlExpires=e.uploadUrlExpires,this.createdBy=e.createdBy,this.systemId=e.systemId}createImageVariant(e){if("image/*"!=this.mimeType)throw new Error("Only dynamic images can have variants");if(!this.url)throw new Error("MediaFile has no url");const t=Object.keys(e).map((t=>`${t}=${e[t]}`)).join(",");return this.url.replace(/\/public$/,`/${t}`)}};Object.defineProperty($t.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($t.prototype,"validator",{get:function(){return se}});var Ct=class extends n{constructor(e){super(e),this.id=e.id,this.type=e.type,this.discriminator=e.discriminator,this.playlists=e.playlists,this.remote=e.remote,this.name=e.name,this.driver=e.driver,this.offline=e.offline,this.audio=e.audio,this.video=e.video,this.powerFeedback=e.powerFeedback,this.volumeFeedback=e.volumeFeedback,this.muted=e.muted,this.volume=e.volume,this.brightness=e.brightness,this.contrast=e.contrast,this.power=e.power,this.input=e.input,this.supportedInputs=e.supportedInputs,this.supportedOutputs=e.supportedOutputs,this.command=e.command,this.supportedNotifications=e.supportedNotifications,this.notification=e.notification,this.systemId=e.systemId,this.watts=e.watts,this.icon=e.icon,this.modelNumber=e.modelNumber,this.serialNumber=e.serialNumber,this.firmwareVersion=e.firmwareVersion}};Object.defineProperty(Ct.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(Ct.prototype,"validator",{get:function(){return ie}});var St=class extends n{constructor(e){super(e),this.id=e.id,this.type=e.type,this.driver=e.driver,this.systemId=e.systemId,this.supportedNotifications=e.supportedNotifications,this.notification=e.notification,this.watts=e.watts,this.icon=e.icon,this.modelNumber=e.modelNumber,this.serialNumber=e.serialNumber,this.firmwareVersion=e.firmwareVersion}};Object.defineProperty(St.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(St.prototype,"validator",{get:function(){return re}});var Ot=class extends n{constructor(e){super(e),this.id=e.id,this.type=e.type,this.orderNumber=e.orderNumber,this.status=e.status,this.userId=e.userId,this.reservationId=e.reservationId,this.date=e.date,this.items=e.items,this.taxes=e.taxes,this.fees=e.fees,this.delivery=e.delivery,this.payments=e.payments}getSubTotal(){return this.items.reduce(((e,t)=>{const s=t.quantity||1;return e+t.price*s}),0)}getTaxTotal(){const e=this.taxes;return e?this.items.reduce(((t,s)=>{if(!s.taxClass)return t;const i=e.find((e=>e.class===s.taxClass));if(!i)return t;const{rateType:a,rate:r}=i;return"percentage"===a?t+s.price*r:t+r}),0):0}getDeliveryTotal(){const e=this.delivery;return e?this.items.reduce(((t,s)=>{if(!s.deliveryClass)return t;const i=e.find((e=>e.class===s.deliveryClass));if(!i)return t;const{rateType:a,rate:r}=i;return"percentage"===a?t+s.price*r:t+r}),0):0}getFeesTotal(){return this.fees.reduce(((e,t)=>e+t.price),0)}getTotal(){return this.getSubTotal()+this.getTaxTotal()+this.getDeliveryTotal()+this.getFeesTotal()}getPaymentsTotal(){return this.payments.reduce(((e,t)=>e+t.amount),0)}getBalance(){return this.getTotal()-this.getPaymentsTotal()}};Object.defineProperty(Ot.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(Ot.prototype,"validator",{get:function(){return oe}});var Ft=class extends n{constructor(e){super(e),this.id=e.id,this.type=e.type,this.accountNumber=e.accountNumber,this.name=e.name,this.properties=e.properties,this.hostname=e.hostname,this.appManifest=e.appManifest,this.tickets=e.tickets,this.credentials=e.credentials,this.createdAt=e.createdAt,this.updatedAt=e.updatedAt}};Object.defineProperty(Ft.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(Ft.prototype,"validator",{get:function(){return me}});var Tt=class extends n{constructor(e){super(e),this.id=e.id,this.type=e.type,this.enabled=e.enabled,this.storageData=e.storageData,this.maskedNumber=e.maskedNumber,this.issued=e.issued,this.expires=e.expires,this.systemId=e.systemId}};Object.defineProperty(Tt.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(Tt.prototype,"validator",{get:function(){return ce}});var xt=class extends n{constructor(e){super(e),this.id=e.id,this.type=e.type,this.discriminator=e.discriminator,this.name=e.name,this.description=e.description,this.organizationId=e.organizationId,this.propertyId=e.propertyId,this.permissions=e.permissions}};Object.defineProperty(xt.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(xt.prototype,"validator",{get:function(){return he}});var Mt=class extends n{constructor(e){super(e),this.id=e.id,this.type=e.type,this.name=e.name,this.driver=e.driver,this.description=e.description,this.price=e.price,this.tax=e.tax,this.image=e.image,this.category=e.category,this.imageUrl=e.imageUrl,this.systemId=e.systemId}};Object.defineProperty(Mt.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(Mt.prototype,"validator",{get:function(){return Pe}});var zt=class extends n{constructor(e){super(e),this.id=e.id,this.name=e.name,this.type=e.type,this.discriminator=e.discriminator,this.organization=e.organization,this.departments=e.departments,this.testModeEnabled=e.testModeEnabled,this.testMode=e.testMode,this.timezone=e.timezone,this.smsNumber=e.smsNumber,this.checkInTime=e.checkInTime,this.checkOutTime=e.checkOutTime,this.address=e.address,this.latitude=e.latitude,this.longitude=e.longitude,this.appFeatures=e.appFeatures,this.notifications=e.notifications,this.credentials=e.credentials}};Object.defineProperty(zt.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"]}},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(zt.prototype,"validator",{get:function(){return we}});var Rt=class extends n{constructor(e){super(e),this.id=e.id,this.driver=e.driver,this.primaryGuest=e.primaryGuest,this.type=e.type,this.sharedGuests=e.sharedGuests,this.spaceCategory=e.spaceCategory,this.space=e.space,this.previousSpace=e.previousSpace,this.status=e.status,this.mobileCheckInSpaceCategoryChanged=e.mobileCheckInSpaceCategoryChanged,this.mobileCheckInSpaceChanged=e.mobileCheckInSpaceChanged,this.mobileCheckInStatus=e.mobileCheckInStatus,this.mobileCheckInStatusMessage=e.mobileCheckInStatusMessage,this.confirmationNumber=e.confirmationNumber,this.expectedCheckInDateTime=e.expectedCheckInDateTime,this.checkInDateTime=e.checkInDateTime,this.checkOutDateTime=e.checkOutDateTime,this.adultCount=e.adultCount,this.childCount=e.childCount,this.spaceCategoryAvailabilites=e.spaceCategoryAvailabilites,this.revenue=e.revenue,this.rateSuppressed=e.rateSuppressed,this.payment=e.payment,this.company=e.company,this.travelAgent=e.travelAgent,this.systemId=e.systemId,this.metadata=e.metadata,this.updatedAt=e.updatedAt}checkInTime(e){return new Date(this.checkInDateTime).toLocaleString("default",{hour:"numeric",minute:"numeric",timeZone:e})}checkOutTime(e){return new Date(this.checkOutDateTime).toLocaleString("default",{hour:"numeric",minute:"numeric",timeZone:e})}getNights(){const e=new Date(this.checkInDateTime),t=new Date(this.checkOutDateTime);let s=Math.round((t-e)/864e5);return s<=0&&(s=1),s}};Object.defineProperty(Rt.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(Rt.prototype,"validator",{get:function(){return Ne}});var Vt=class extends n{constructor(e){super(e),this.id=e.id,this.type=e.type,this.name=e.name,this.floor=e.floor,this.dimmers=e.dimmers,this.switches=e.switches,this.thermostats=e.thermostats,this.locks=e.locks,this.windowCoverings=e.windowCoverings,this.courtesy=e.courtesy,this.cameras=e.cameras,this.mediaSources=e.mediaSources,this.motionSensors=e.motionSensors,this.alarms=e.alarms,this.occupiedAt=e.occupiedAt,this.createdAt=e.createdAt,this.updatedAt=e.updatedAt}static getDevicePath(e){switch(e){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:"+e)}}static getDeviceTypeFromPath(e){if(!["dimmers","switches","thermostats","locks","windowCoverings","courtesy","cameras","mediaSources","motionSensors","alarms"].includes(e))throw new Error("Invalid device path:"+e);switch(e){case"courtesy":return e;case"switches":return"switch";default:return e.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 e=this.switches?.some((e=>"light"===e.discriminator||"fan"===e.discriminator));return this.hasDimmer||e}get hasAlarm(){return this.alarms?.length>0}get occupied(){const e=new Date,t=new Date(this.occupiedAt);return e.getTime()-t.getTime()<36e5}};Object.defineProperty(Vt.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(Vt.prototype,"validator",{get:function(){return $e}});var Bt=class extends n{constructor(e){super(e),this.id=e.id,this.name=e.name,this.description=e.description,this.type=e.type,this.devices=e.devices,this.isDefault=e.isDefault,this.showOnUi=e.showOnUi}};Object.defineProperty(Bt.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(Bt.prototype,"validator",{get:function(){return ze}});var Lt=class extends n{constructor(e){super(e),this.id=e.id,this.type=e.type,this.title=e.title,this.destination=e.destination,this.url=e.url,this.systemId=e.systemId}};Object.defineProperty(Lt.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(Lt.prototype,"validator",{get:function(){return Ke}});var Ut=class extends n{constructor(e){super(e),this.id=e.id,this.type=e.type,this.to=e.to,this.from=e.from,this.media=e.media,this.status=e.status,this.body=e.body,this.driver=e.driver,this.appData=e.appData,this.createdAt=e.createdAt,this.updatedAt=e.updatedAt,this.systemId=e.systemId}};Object.defineProperty(Ut.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(Ut.prototype,"validator",{get:function(){return _e}});var Et=class extends n{constructor(e){super(e),this.id=e.id,this.name=e.name,this.type=e.type,this.discriminator=e.discriminator,this.driver=e.driver,this.category=e.category,this.rooms=e.rooms,this.subGroups=e.subGroups,this.occupied=e.occupied,this.inUse=e.inUse,this.eco=e.eco,this.features=e.features,this.maximumOccupancy=e.maximumOccupancy,this.housekeepingStatus=e.housekeepingStatus,this.serviceStatus=e.serviceStatus,this.systemId=e.systemId}get floor(){const e=new Set;return this.rooms.forEach((t=>{t.floor&&e.add(t.floor)})),1==e.size?[...e][0]:void 0}get hasDimmer(){return this.rooms.some((e=>e.hasDimmer))}get hasSwitch(){return this.rooms.some((e=>e.hasSwitch))}get hasWindowCovering(){return this.rooms.some((e=>e.hasWindowCovering))}get hasThermostat(){return this.rooms.some((e=>e.hasThermostat))}get hasLock(){return this.rooms.some((e=>e.hasLock))}get hasCourtesy(){return this.rooms.some((e=>e.hasCourtesy))}get hasCamera(){return this.rooms.some((e=>e.hasCamera))}get hasAlarm(){return this.rooms.some((e=>e.hasAlarm))}get hasMedia(){return this.rooms.some((e=>e.hasMedia))}};Object.defineProperty(Et.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(Et.prototype,"validator",{get:function(){return Ge}});var Kt=class extends n{constructor(e){super(e),this.id=e.id,this.name=e.name,this.type=e.type,this.discriminator=e.discriminator,this.supportedNotifications=e.supportedNotifications,this.notification=e.notification,this.driver=e.driver,this.offline=e.offline,this.state=e.state,this.systemId=e.systemId,this.watts=e.watts,this.icon=e.icon,this.modelNumber=e.modelNumber,this.serialNumber=e.serialNumber,this.firmwareVersion=e.firmwareVersion}};Object.defineProperty(Kt.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(Kt.prototype,"validator",{get:function(){return Qe}});var Ht=class extends n{constructor(e){super(e),this.id=e.id,this.type=e.type,this.driver=e.driver,this.firstName=e.firstName,this.lastName=e.lastName,this.phone=e.phone,this.email=e.email,this.address=e.address,this.photo=e.photo,this.jobTitle=e.jobTitle,this.dob=e.dob,this.gender=e.gender,this.roles=e.roles,this.nationality=e.nationality,this.notes=e.notes,this.files=e.files,this.identifications=e.identifications,this.payments=e.payments,this.revenue=e.revenue,this.createdAt=e.createdAt,this.updatedAt=e.updatedAt,this.systemId=e.systemId}};Object.defineProperty(Ht.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(Ht.prototype,"validator",{get:function(){return Je}});var _t=class extends n{constructor(e){super(e),this.id=e.id,this.name=e.name,this.type=e.type,this.driver=e.driver,this.offline=e.offline,this.supportedNotifications=e.supportedNotifications,this.notification=e.notification,this.currentTemperature=e.currentTemperature,this.currentHumidity=e.currentHumidity,this.hvacMode=e.hvacMode,this.hvacState=e.hvacState,this.fanMode=e.fanMode,this.fanState=e.fanState,this.temperatureScale=e.temperatureScale,this.humidityScale=e.humidityScale,this.supportedHvacModes=e.supportedHvacModes,this.supportedFanModes=e.supportedFanModes,this.setpoints=e.setpoints,this.minAutoDelta=e.minAutoDelta,this.cycleRate=e.cycleRate,this.batteryLevel=e.batteryLevel,this.systemId=e.systemId,this.watts=e.watts,this.icon=e.icon,this.modelNumber=e.modelNumber,this.serialNumber=e.serialNumber,this.firmwareVersion=e.firmwareVersion}};Object.defineProperty(_t.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(_t.prototype,"validator",{get:function(){return st}});var Wt=class extends n{constructor(e){super(e),this.id=e.id,this.type=e.type,this.number=e.number,this.issueId=e.issueId,this.conversation=e.conversation,this.openedBy=e.openedBy,this.requester=e.requester,this.assignedTo=e.assignedTo,this.status=e.status,this.priority=e.priority,this.tags=e.tags,this.department=e.department,this.rating=e.rating,this.ratingComment=e.ratingComment,this.tipAmount=e.tipAmount,this.autoCloseAt=e.autoCloseAt,this.scheduleDate=e.scheduleDate,this.createdAt=e.createdAt,this.updatedAt=e.updatedAt,this.solvedAt=e.solvedAt,this.closedAt=e.closedAt}};Object.defineProperty(Wt.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(Wt.prototype,"validator",{get:function(){return it}});var Zt=class extends n{constructor(e){super(e),this.id=e.id,this.type=e.type,this.userId=e.userId,this.day=e.day,this.locked=e.locked,this.timeEntries=e.timeEntries}};Object.defineProperty(Zt.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(Zt.prototype,"validator",{get:function(){return rt}});var Gt=class extends n{constructor(e){super(e),this.id=e.id,this.type=e.type,this.firstName=e.firstName,this.lastName=e.lastName,this.phone=e.phone,this.phoneVerified=e.phoneVerified,this.email=e.email,this.emailVerified=e.emailVerified,this.address=e.address,this.secretKey=e.secretKey,this.photo=e.photo,this.jobTitle=e.jobTitle,this.dob=e.dob,this.gender=e.gender,this.nationality=e.nationality,this.permissions=e.permissions,this.notes=e.notes,this.files=e.files,this.identifications=e.identifications,this.payments=e.payments,this.location=e.location,this.reservations=e.reservations,this.spaceName=e.spaceName,this.revenue=e.revenue,this.createdAt=e.createdAt,this.updatedAt=e.updatedAt,this.systems=e.systems}get fullName(){return`${this.firstName} ${this.lastName}`}get roles(){const e=new Set;if(this.permissions)for(const t of this.permissions)e.add(t.role);return Array.from(e)}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(Gt.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(Gt.prototype,"validator",{get:function(){return ot}});var Yt=class extends n{constructor(e){super(e),this.id=e.id,this.type=e.type,this.name=e.name,this.phone=e.phone,this.email=e.email,this.address=e.address,this.photo=e.photo,this.createdAt=e.createdAt,this.updatedAt=e.updatedAt}};Object.defineProperty(Yt.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(Yt.prototype,"validator",{get:function(){return mt}});var Xt=class extends n{constructor(e){super(e),this.id=e.id,this.name=e.name,this.type=e.type,this.discriminator=e.discriminator,this.supportedNotifications=e.supportedNotifications,this.notification=e.notification,this.driver=e.driver,this.offline=e.offline,this.position=e.position,this.systemId=e.systemId,this.watts=e.watts,this.icon=e.icon,this.modelNumber=e.modelNumber,this.serialNumber=e.serialNumber,this.firmwareVersion=e.firmwareVersion}};Object.defineProperty(Xt.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(Xt.prototype,"validator",{get:function(){return ut}});export{n as Entity,lt as Alarm,ct as Announcement,yt as Camera,ht as Category,ft as Courtesy,gt as Credential,Pt as DeviceRouter,bt as Dimmer,vt as DiscoveredDevice,wt as EmailMessage,kt as EnergyReport,jt as EnergyReportShard,At as Gateway,qt as Identification,Nt as Issue,It as Lock,Dt as Log,$t as MediaFile,Ct as MediaSource,St as MotionSensor,Ot as Order,Ft as Organization,Tt as Payment,xt as Policy,Mt as Product,zt as Property,Rt as Reservation,Vt as Room,Bt as Scene,Lt as ShortLink,Ut as SmsMessage,Et as Space,Kt as Switch,Ht as SystemUser,_t as Thermostat,Wt as Ticket,Zt as TimeSheet,Gt as User,Yt as Vendor,Xt as WindowCovering};//# sourceMappingURL=chunk-36O34ETI.js.map
|