Socket
Socket
Sign inDemoInstall

powerbi-models

Package Overview
Dependencies
Maintainers
1
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

powerbi-models - npm Package Compare versions

Comparing version 0.10.0 to 0.10.1

4

dist/models-noexports.d.ts

@@ -1,2 +0,2 @@

/*! powerbi-models v0.10.0 | (c) 2016 Microsoft Corporation MIT */
/*! powerbi-models v0.10.1 | (c) 2016 Microsoft Corporation MIT */
declare const advancedFilterSchema: any;

@@ -25,5 +25,7 @@ declare const filterSchema: any;

declare const validateReportLoad: (x: any) => IError[];
declare type PageView = "fitToWidth" | "oneColumn" | "actualSize";
interface IDashboardLoadConfiguration {
accessToken: string;
id: string;
pageView?: PageView;
}

@@ -30,0 +32,0 @@ declare const validateDashboardLoad: (x: any) => IError[];

@@ -1,2 +0,2 @@

/*! powerbi-models v0.10.0 | (c) 2016 Microsoft Corporation MIT */
/*! powerbi-models v0.10.1 | (c) 2016 Microsoft Corporation MIT */
export declare const advancedFilterSchema: any;

@@ -25,5 +25,7 @@ export declare const filterSchema: any;

export declare const validateReportLoad: (x: any) => IError[];
export declare type PageView = "fitToWidth" | "oneColumn" | "actualSize";
export interface IDashboardLoadConfiguration {
accessToken: string;
id: string;
pageView?: PageView;
}

@@ -30,0 +32,0 @@ export declare const validateDashboardLoad: (x: any) => IError[];

@@ -1,3 +0,3 @@

/*! powerbi-models v0.10.0 | (c) 2016 Microsoft Corporation MIT */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["powerbi-models"]=t():e["powerbi-models"]=t()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){function n(e){var t=e.message;return t||(t=e.path+" is invalid. Not meeting "+e.keyword+" constraint"),{message:t}}function i(e,t){return function(r){var i=f(e,t),o=i(r);return o?void 0:i.errors.map(n)}}function o(e){var t=e,r=e;return"string"==typeof t.operator&&Array.isArray(t.values)?p.Basic:"string"==typeof r.logicalOperator&&Array.isArray(r.conditions)?p.Advanced:p.Unknown}function s(e){return void 0!==e.table&&void 0!==e.measure}function a(e){return void 0!==e.table&&void 0!==e.column}function h(e){return void 0!==e.table&&void 0!==e.hierarchy&&void 0!==e.hierarchyLevel}var c=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)};t.advancedFilterSchema=r(1),t.filterSchema=r(2),t.loadSchema=r(3),t.dashboardLoadSchema=r(4),t.pageSchema=r(5),t.settingsSchema=r(6),t.basicFilterSchema=r(7);var f=r(8);t.validateSettings=i(t.settingsSchema,{schemas:{basicFilter:t.basicFilterSchema,advancedFilter:t.advancedFilterSchema}}),t.validateReportLoad=i(t.loadSchema,{schemas:{settings:t.settingsSchema,basicFilter:t.basicFilterSchema,advancedFilter:t.advancedFilterSchema}}),t.validateDashboardLoad=i(t.dashboardLoadSchema),t.validatePage=i(t.pageSchema),t.validateFilter=i(t.filterSchema,{schemas:{basicFilter:t.basicFilterSchema,advancedFilter:t.advancedFilterSchema}}),function(e){e[e.Advanced=0]="Advanced",e[e.Basic=1]="Basic",e[e.Unknown=2]="Unknown"}(t.FilterType||(t.FilterType={}));var p=t.FilterType;t.getFilterType=o,t.isMeasure=s,t.isColumn=a,t.isHierarchy=h;var u=function(){function e(e){this.target=e}return e.prototype.toJSON=function(){return{$schema:this.schemaUrl,target:this.target}},e}();t.Filter=u;var l=function(e){function t(r,n){for(var i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];if(e.call(this,r),this.operator=n,this.schemaUrl=t.schemaUrl,0===i.length)throw new Error("values must be a non-empty array. You passed: "+i);Array.isArray(i[0])?this.values=i[0]:this.values=i}return c(t,e),t.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return t.operator=this.operator,t.values=this.values,t},t.schemaUrl="http://powerbi.com/product/schema#basic",t}(u);t.BasicFilter=l;var m=function(e){function t(r,n){for(var i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];if(e.call(this,r),this.schemaUrl=t.schemaUrl,"string"!=typeof n||0===n.length)throw new Error("logicalOperator must be a valid operator, You passed: "+n);this.logicalOperator=n;var s;if(s=Array.isArray(i[0])?i[0]:i,0===s.length)throw new Error("conditions must be a non-empty array. You passed: "+i);if(s.length>2)throw new Error("AdvancedFilters may not have more than two conditions. You passed: "+i.length);if(1===s.length&&"And"!==n)throw new Error('Logical Operator must be "And" when there is only one condition provided');this.conditions=s}return c(t,e),t.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return t.logicalOperator=this.logicalOperator,t.conditions=this.conditions,t},t.schemaUrl="http://powerbi.com/product/schema#advanced",t}(u);t.AdvancedFilter=m},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",type:"object",properties:{target:{oneOf:[{type:"object",properties:{table:{type:"string"},column:{type:"string"}},required:["table","column"]},{type:"object",properties:{table:{type:"string"},hierarchy:{type:"string"},hierarchyLevel:{type:"string"}},required:["table","hierarchy","hierarchyLevel"]},{type:"object",properties:{table:{type:"string"},measure:{type:"string"}},required:["table","measure"]}]},logicalOperator:{type:"string"},conditions:{type:"array",items:{type:"object",properties:{value:{type:["string","boolean","number"]},operator:{type:"string"}},required:["value","operator"]}}},required:["target","logicalOperator","conditions"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",oneOf:[{$ref:"#basicFilter"},{$ref:"#advancedFilter"}],invalidMessage:"filter is invalid"}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",type:"object",properties:{accessToken:{type:"string",messages:{type:"accessToken must be a string",required:"accessToken is required"}},id:{type:"string",messages:{type:"id must be a string",required:"id is required"}},settings:{$ref:"#settings"},pageName:{type:"string",messages:{type:"pageName must be a string"}},filters:{type:"array",items:{type:"object",oneOf:[{$ref:"#basicFilter"},{$ref:"#advancedFilter"}]},invalidMessage:"filters property is invalid"}},required:["accessToken","id"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",type:"object",properties:{accessToken:{type:"string",messages:{type:"accessToken must be a string",required:"accessToken is required"}},id:{type:"string",messages:{type:"id must be a string",required:"id is required"}}},required:["accessToken","id"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",type:"object",properties:{name:{type:"string",messages:{type:"name must be a string",required:"name is required"}}},required:["name"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",type:"object",properties:{filterPaneEnabled:{type:"boolean",messages:{type:"filterPaneEnabled must be a boolean"}},navContentPaneEnabled:{type:"boolean",messages:{type:"navContentPaneEnabled must be a boolean"}}}}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",type:"object",properties:{target:{type:"object",properties:{table:{type:"string"},column:{type:"string"},hierarchy:{type:"string"},hierarchyLevel:{type:"string"},measure:{type:"string"}},required:["table"]},operator:{type:"string"},values:{type:"array",items:{type:["string","boolean","number"]}}},required:["target","operator","values"]}},function(e,t,r){e.exports=r(9)},function(e,t,r){"use strict";function n(e){return e=e instanceof RegExp?e:new RegExp(e),O?e.toString():"/"+e.source.replace(g,"\\$&")+"/"}function i(e){return'"'+e.replace(v,"\\$1")+'"'}function o(e,t){return b.lastIndex=0,b.test(t)?e+"."+t:e+"["+i(t)+"]"}function s(e){if(void 0===e)return"undefined";var t=Object.prototype.toString.call(e);return t.substr(8,t.length-9).toLowerCase()}function a(e){return(0|e)===e}function h(e,t){S[t].type=e,S[t].keyword=t}function c(e){var t,r,n,i=Object.keys(e),o=i.indexOf("properties"),s=i.indexOf("patternProperties"),a={"enum":Array.isArray(e["enum"])&&e["enum"].length>0,type:null,allType:[],perType:{}};for(e.type&&("string"==typeof e.type?a.type=[e.type]:Array.isArray(e.type)&&e.type.length&&(a.type=e.type.slice(0))),n=0;n<i.length;n++)t=i[n],"enum"!==t&&"type"!==t&&(r=S[t],r&&(r.type?(a.perType[r.type]||(a.perType[r.type]=[]),o>-1&&"required"===t||s>-1&&"additionalProperties"===t||a.perType[r.type].push(t)):a.allType.push(t)));return a}function f(e,t){var r,n,i=e.substr(4),o=i.length,s=[],a="",h=!1;for(n=0;n<o;n++)switch(r=i[n]){case".":a&&(a+=r);break;case"[":isNaN(+i[n+1])?(h=!0,a&&(s.push('"'+a+'"'),a="")):(h=!1,a&&(a+="."));break;case"]":s.push(h?a:'"'+a+'"'),a="";break;default:a+=r}return a&&s.push('"'+a+'"'),t&&s.push('"'+t+'"'),1===s.length&&h?'"" + '+s[0]+' + ""':s.join(' + "." + ')||'""'}function p(e){var t,r,n,i,o=e,a=s(e);if("object"===a)for(o={},t=Object.keys(e),i=0,r=t.length;i<r;i++)n=t[i],o[n]=p(e[n]);else if("array"===a)for(o=[],i=0,r=e.length;i<r;i++)o[i]=p(e[i]);else{if("regexp"===a)return new RegExp(e);if("date"===a)return new Date(e.toJSON())}return o}function u(e,t){for(var r=0,n=t.length;r<n;r++)if(w(e,t[r]))return!0;return!1}function l(){this.objects=[],this.properties=[]}function m(e,t,r,n,i){var o,a,h,c,f,u,d;if("object"!==s(e))return t;if(e=n.resolve(e),void 0===t&&e.hasOwnProperty("default")&&(t=p(e["default"])),o=s(t),"object"===o&&"object"===s(e.properties)){for(u=Object.keys(e.properties),c=0;c<u.length;c++)h=u[c],a=m(e.properties[h],t[h],r,n),void 0!==a&&(t[h]=a);if("always"!==r)for(d=Object.keys(t),c=0;c<d.length;c++)h=d[c],u.indexOf(h)<0&&(e.additionalProperties===!1||r===!1&&!e.additionalProperties)&&(i?i.mark(t,h):delete t[h])}else if("array"===o&&e.items){if("array"===s(e.items))for(c=0;c<e.items.length;c++)a=m(e.items[c],t[c],r,n),(void 0!==a||c<t.length)&&(t[c]=a);else if(t.length)for(c=0;c<t.length;c++)t[c]=m(e.items,t[c],r,n)}else if("array"===s(e.allOf)&&e.allOf.length){for(f=new l,c=0;c<e.allOf.length;c++)t=m(e.allOf[c],t,r,n,f);f.deleteDuplicates(),f.dispose()}return t}function d(e){this.path="data",this.schema=e.schema,this.formats=e.formats,this.greedy=e.greedy,this.resolver=e.resolver,this.id=e.id,this.funcache=e.funcache||{},this.scope=e.scope||{equalAny:u,unique:I,ucs2length:k,refs:{}}}function y(e,t){if("object"!==s(e))throw new Error(x);t=t||{};var r=0,n=function(){return"i"+r++},i=new $(e,t.schemas,t.missing$Ref||!1),o=new d({schema:e,resolver:i,id:n,schemas:t.schemas,formats:t.formats,greedy:t.greedy||!1}),a=A("validate","data")("validate.errors = []")('gen(data, "", validate.errors)')("return validate.errors.length === 0").compile({gen:o.compile()});return o.dispose(),o=null,a.errors=[],a.build=function(t,r){return m(e,r&&r.copy===!1?t:p(t),r&&r.additionalProperties,i)},a}var g=/[\/]/g,v=/(")/gim,b=/^[a-z_$][0-9a-z]*$/gi,x="jsen: invalid schema object",j="object"==typeof window&&!!window.navigator,O="/"!==new RegExp("/").source,A=r(10),w=r(11),I=r(12),$=r(13),q=r(21),k=r(22),F={},S={};F["null"]=function(e){return e+" === null"},F["boolean"]=function(e){return"typeof "+e+' === "boolean"'},F.string=function(e){return"typeof "+e+' === "string"'},F.number=function(e){return"typeof "+e+' === "number"'},F.integer=function(e){return"typeof "+e+' === "number" && !('+e+" % 1)"},F.array=function(e){return"Array.isArray("+e+")"},F.object=function(e){return"typeof "+e+' === "object" && '+e+" !== null && !Array.isArray("+e+")"},F.date=function(e){return e+" instanceof Date"},S["enum"]=function(e){var t=e.schema["enum"];e.code("if (!equalAny("+e.path+", "+JSON.stringify(t)+")) {"),e.error("enum"),e.code("}")},S.minimum=function(e){"number"==typeof e.schema.minimum&&(e.code("if ("+e.path+" < "+e.schema.minimum+") {"),e.error("minimum"),e.code("}"))},S.exclusiveMinimum=function(e){e.schema.exclusiveMinimum===!0&&"number"==typeof e.schema.minimum&&(e.code("if ("+e.path+" === "+e.schema.minimum+") {"),e.error("exclusiveMinimum"),e.code("}"))},S.maximum=function(e){"number"==typeof e.schema.maximum&&(e.code("if ("+e.path+" > "+e.schema.maximum+") {"),e.error("maximum"),e.code("}"))},S.exclusiveMaximum=function(e){e.schema.exclusiveMaximum===!0&&"number"==typeof e.schema.maximum&&(e.code("if ("+e.path+" === "+e.schema.maximum+") {"),e.error("exclusiveMaximum"),e.code("}"))},S.multipleOf=function(e){if("number"==typeof e.schema.multipleOf){var t=e.schema.multipleOf,r=t.toString().length-t.toFixed(0).length-1,n=r>0?Math.pow(10,r):1,i=e.path;r>0?e.code("if (+(Math.round(("+i+" * "+n+') + "e+" + '+r+') + "e-" + '+r+") % "+t*n+" !== 0) {"):e.code("if ((("+i+" * "+n+") % "+t*n+") !== 0) {"),e.error("multipleOf"),e.code("}")}},S.minLength=function(e){a(e.schema.minLength)&&(e.code("if (ucs2length("+e.path+") < "+e.schema.minLength+") {"),e.error("minLength"),e.code("}"))},S.maxLength=function(e){a(e.schema.maxLength)&&(e.code("if (ucs2length("+e.path+") > "+e.schema.maxLength+") {"),e.error("maxLength"),e.code("}"))},S.pattern=function(e){var t=e.schema.pattern;("string"==typeof t||t instanceof RegExp)&&(e.code("if (!("+n(t)+").test("+e.path+")) {"),e.error("pattern"),e.code("}"))},S.format=function(e){"string"==typeof e.schema.format&&q[e.schema.format]&&(e.code("if (!("+q[e.schema.format]+").test("+e.path+")) {"),e.error("format"),e.code("}"))},S.minItems=function(e){a(e.schema.minItems)&&(e.code("if ("+e.path+".length < "+e.schema.minItems+") {"),e.error("minItems"),e.code("}"))},S.maxItems=function(e){a(e.schema.maxItems)&&(e.code("if ("+e.path+".length > "+e.schema.maxItems+") {"),e.error("maxItems"),e.code("}"))},S.additionalItems=function(e){e.schema.additionalItems===!1&&Array.isArray(e.schema.items)&&(e.code("if ("+e.path+".length > "+e.schema.items.length+") {"),e.error("additionalItems"),e.code("}"))},S.uniqueItems=function(e){e.schema.uniqueItems&&(e.code("if (unique("+e.path+").length !== "+e.path+".length) {"),e.error("uniqueItems"),e.code("}"))},S.items=function(e){var t=e.declare(0),r=0;if("object"===s(e.schema.items))e.code("for ("+t+" = 0; "+t+" < "+e.path+".length; "+t+"++) {"),e.descend(e.path+"["+t+"]",e.schema.items),e.code("}");else if(Array.isArray(e.schema.items)){for(;r<e.schema.items.length;r++)e.code("if ("+e.path+".length - 1 >= "+r+") {"),e.descend(e.path+"["+r+"]",e.schema.items[r]),e.code("}");"object"===s(e.schema.additionalItems)&&(e.code("for ("+t+" = "+r+"; "+t+" < "+e.path+".length; "+t+"++) {"),e.descend(e.path+"["+t+"]",e.schema.additionalItems),e.code("}"))}},S.maxProperties=function(e){a(e.schema.maxProperties)&&(e.code("if (Object.keys("+e.path+").length > "+e.schema.maxProperties+") {"),e.error("maxProperties"),e.code("}"))},S.minProperties=function(e){a(e.schema.minProperties)&&(e.code("if (Object.keys("+e.path+").length < "+e.schema.minProperties+") {"),e.error("minProperties"),e.code("}"))},S.required=function(e){if(Array.isArray(e.schema.required))for(var t=0;t<e.schema.required.length;t++)e.code("if ("+o(e.path,e.schema.required[t])+" === undefined) {"),e.error("required",e.schema.required[t]),e.code("}")},S.properties=function(e){var t,r,n,i=e.schema.properties,a="object"===s(i)?Object.keys(i):[],h=Array.isArray(e.schema.required)?e.schema.required:[];if(a.length)for(r=0;r<a.length;r++)t=a[r],n=o(e.path,t),e.code("if ("+n+" !== undefined) {"),e.descend(n,i[t]),e.code("}"),h.indexOf(t)>-1&&(e.code("else {"),e.error("required",t),e.code("}"))},S.patternProperties=S.additionalProperties=function(e){var t,r,i,o,a,h,c,f="object"===s(e.schema.properties)?Object.keys(e.schema.properties):[],p=e.schema.patternProperties,u="object"===s(p)?Object.keys(p):[],l=e.schema.additionalProperties,m=l===!1||"object"===s(l);if(u.length||m){for(r=e.declare("[]"),i=e.declare('""'),o=e.declare(0),m&&(a=e.declare(!1)),e.code(r+" = Object.keys("+e.path+")"),e.code("for ("+o+" = 0; "+o+" < "+r+".length; "+o+"++) {")(i+" = "+r+"["+o+"]")("if ("+e.path+"["+i+"] === undefined) {")("continue")("}"),m&&e.code(a+" = false"),c=0;c<u.length;c++)h=u[c],e.code("if (("+n(h)+").test("+i+")) {"),e.descend(e.path+"["+i+"]",p[h]),m&&e.code(a+" = true"),e.code("}");m&&(f.length&&(t=e.declare(JSON.stringify(f)),e.code("if ("+t+".indexOf("+i+") > -1) {")("continue")("}")),e.code("if (!"+a+") {"),l===!1?e.error("additionalProperties",void 0,i):e.descend(e.path+"["+i+"]",l),e.code("}")),e.code("}")}},S.dependencies=function(e){if("object"===s(e.schema.dependencies))for(var t,r,n=Object.keys(e.schema.dependencies),i=n.length,a=0,h=0;h<i;h++){if(t=n[h],r=e.schema.dependencies[t],e.code("if ("+o(e.path,t)+" !== undefined) {"),"object"===s(r))e.descend(e.path,r);else for(a;a<r.length;a++)e.code("if ("+o(e.path,r[a])+" === undefined) {"),e.error("dependencies",r[a]),e.code("}");e.code("}")}},S.allOf=function(e){if(Array.isArray(e.schema.allOf))for(var t=0;t<e.schema.allOf.length;t++)e.descend(e.path,e.schema.allOf[t])},S.anyOf=function(e){if(Array.isArray(e.schema.anyOf)){var t=e.greedy,r=e.declare(0),n=e.declare(0),i=e.declare(!1),o=0;for(e.code(n+" = errors.length");o<e.schema.anyOf.length;o++)e.code("if (!"+i+") {"),e.code(r+" = errors.length"),e.greedy=!0,e.descend(e.path,e.schema.anyOf[o]),e.code(i+" = errors.length === "+r)("}");e.greedy=t,e.code("if (!"+i+") {"),e.error("anyOf"),e.code("} else {")("errors.length = "+n)("}")}},S.oneOf=function(e){if(Array.isArray(e.schema.oneOf)){var t=e.greedy,r=e.declare(0),n=e.declare(0),i=e.declare(0),o=0;for(e.code(n+" = errors.length"),e.code(r+" = 0");o<e.schema.oneOf.length;o++)e.code(i+" = errors.length"),e.greedy=!0,e.descend(e.path,e.schema.oneOf[o]),e.code("if (errors.length === "+i+") {")(r+"++")("}");e.greedy=t,e.code("if ("+r+" !== 1) {"),e.error("oneOf"),e.code("} else {")("errors.length = "+n)("}")}},S.not=function(e){if("object"===s(e.schema.not)){var t=e.greedy,r=e.declare(0);e.code(r+" = errors.length"),e.greedy=!0,e.descend(e.path,e.schema.not),e.greedy=t,e.code("if (errors.length === "+r+") {"),e.error("not"),e.code("} else {")("errors.length = "+r)("}")}},["minimum","exclusiveMinimum","maximum","exclusiveMaximum","multipleOf"].forEach(h.bind(null,"number")),["minLength","maxLength","pattern","format"].forEach(h.bind(null,"string")),["minItems","maxItems","additionalItems","uniqueItems","items"].forEach(h.bind(null,"array")),["maxProperties","minProperties","required","properties","patternProperties","additionalProperties","dependencies"].forEach(h.bind(null,"object")),["enum","allOf","anyOf","oneOf","not"].forEach(h.bind(null,null)),l.prototype.mark=function(e,t){var r,n=this.objects.indexOf(e);return n<0?(this.objects.push(e),r={},r[t]=1,void this.properties.push(r)):(r=this.properties[n],void(r[t]=r[t]?r[t]+1:1))},l.prototype.deleteDuplicates=function(){var e,t,r,n,i;for(n=0;n<this.properties.length;n++)for(e=this.properties[n],t=Object.keys(e),i=0;i<t.length;i++)r=t[i],e[r]>1&&delete this.objects[n][r]},l.prototype.dispose=function(){this.objects.length=0,this.properties.length=0},d.prototype.clone=function(e){var t=new d({schema:e,formats:this.formats,greedy:this.greedy,resolver:this.resolver,id:this.id,funcache:this.funcache,scope:this.scope});return t},d.prototype.declare=function(e){var t=this.id();return this.code.def(t,e),t},d.prototype.cache=function(e,t){var r,n=this.funcache[e];return n||(n=this.funcache[e]={key:this.id()},r=this.clone(t),n.func=r.compile(n.key),this.scope.refs[n.key]=n.func,r.dispose()),"refs."+n.key},d.prototype.error=function(e,t,r){var n=this.schema,o=this.path,s="data"!==o||t?'(path ? path + "." : "") + '+f(o,t)+",":"path,",a=t&&n.properties&&n.properties[t]?this.resolver.resolve(n.properties[t]):null,h=a?a.requiredMessage:n.invalidMessage;h||(h=a&&a.messages&&a.messages[e]||n.messages&&n.messages[e]),this.code("errors.push({"),h&&this.code("message: "+i(h)+","),r&&this.code("additionalProperties: "+r+","),this.code("path: "+s)("keyword: "+i(e))("})"),this.greedy||this.code("return")},d.prototype.refactor=function(e,t,r){var n="data"!==e?'(path ? path + "." : "") + '+f(e):"path",i=this.cache(r,t),o=this.declare();this.code(o+" = "+i+"("+e+", "+n+", errors)"),this.greedy||this.code("if (errors.length) { return }")},d.prototype.descend=function(e,t){var r=this.path,n=this.schema;this.path=e,this.schema=t,this.generate(),this.path=r,this.schema=n},d.prototype.generate=function(){function e(e){S[e](m)}var t,r,o,a,h,f,p,u=this.path,l=this.schema,m=this,d=this.scope;if("object"===s(l)){if(void 0!==l.$ref){if(l=this.resolver.resolve(l),this.resolver.hasRef(l))return void this.refactor(u,l,this.resolver.getNormalizedRef(this.schema)||this.schema.$ref);this.schema=l}if(o=c(l),o["enum"])return void S["enum"](m);for(a=Object.keys(o.perType),p=0;p<a.length;p++)f=a[p],this.code((p?"else ":"")+"if ("+F[f](u)+") {"),o.perType[f].forEach(e),this.code("}"),o.type&&(h=o.type.indexOf(f),h>-1&&o.type.splice(h,1));o.type&&(o.type.length?(this.code((a.length?"else ":"")+"if (!("+o.type.map(function(e){return F[e]?F[e](u):"true"}).join(" || ")+")) {"),this.error("type"),this.code("}")):(this.code("else {"),this.error("type"),this.code("}"))),o.allType.forEach(function(e){S[e](m)}),l.format&&this.formats&&(r=this.formats[l.format],r&&("string"==typeof r||r instanceof RegExp?(this.code("if (!("+n(r)+").test("+u+")) {"),this.error("format"),this.code("}")):"function"==typeof r&&((d.formats||(d.formats={}))[l.format]=r,(d.schemas||(d.schemas={}))[l.format]=l,t=i(l.format),this.code("if (!formats["+t+"]("+u+", schemas["+t+"])) {"),this.error("format"),this.code("}"))))}},d.prototype.compile=function(e){return this.code=A("jsen_compiled"+(e?"_"+e:""),"data","path","errors"),this.generate(),this.code.compile(this.scope)},d.prototype.dispose=function(){for(var e in this)this[e]=void 0},y.browser=j,y.clone=p,y.equal=w,y.unique=I,y.ucs2length=k,y.SchemaResolver=$,y.resolve=$.resolvePointer,e.exports=y},function(e,t){"use strict";e.exports=function(){var e=Array.apply(null,arguments),t=e.shift(),r=" ",n="",i="",o=1,s="{[",a="}]",h=function(){for(var e=r,t=0;t++<o-1;)e+=r;return e},c=function(e){n+=h()+e+"\n"},f=function(e){var t=e[0],r=e[e.length-1];return a.indexOf(t)>-1&&s.indexOf(r)>-1?(o--,c(e),o++):s.indexOf(r)>-1?(c(e),o++):a.indexOf(t)>-1?(o--,c(e)):c(e),f};return f.def=function(e,t){return i+=(i?",\n"+r+" ":"")+e+(void 0!==t?" = "+t:""),f},f.toSource=function(){return"function "+t+"("+e.join(", ")+") {\n"+r+'"use strict"\n'+(i?r+"var "+i+";\n":"")+n+"}"},f.compile=function(e){var t="return ("+f.toSource()+")",r=e||{},n=Object.keys(r),i=n.map(function(e){return r[e]});return Function.apply(null,n.concat(t)).apply(null,i)},f}},function(e,t){"use strict";function r(e){var t=Object.prototype.toString.call(e);return t.substr(8,t.length-9).toLowerCase()}function n(e,t){var r,n,o=Object.keys(e).sort(),s=Object.keys(t).sort();if(!i(o,s))return!1;for(r=0;r<o.length;r++)if(n=o[r],!i(e[n],t[n]))return!1;return!0}function i(e,t){var o,s=typeof e,a=typeof t;if("object"===s&&(s=r(e)),"object"===a&&(a=r(t)),s!==a)return!1;if("object"===s)return n(e,t);if("regexp"===s)return e.toString()===t.toString();if("array"===s){if(e.length!==t.length)return!1;for(o=0;o<e.length;o++)if(!i(e[o],t[o]))return!1;return!0}return e===t}e.exports=i},function(e,t,r){"use strict";function n(e,t,r){for(var n=0,i=e.length;n<i;n++)if(r(e[n],t))return n;return-1}var i=r(11);e.exports=function(e){return e.filter(function(e,t,r){return n(r,e,i)===t})},e.exports.findIndex=n},function(e,t,r){"use strict";function n(e,t){if(!t.length)return e;var r,i=t.shift();e&&"object"==typeof e&&e.hasOwnProperty(i)&&(r=e[i]);{if(!t.length)return r;if(r&&"object"==typeof r)return n(r,t)}}function i(e){var t=e.indexOf("#"),r={base:e.substr(0,t),path:[]};return t<0?(r.base=e,r):(e=e.substr(t+1))?(r.path=e.split("/").map(function(e){return decodeURIComponent(e).replace(/~1/g,"/").replace(/~0/g,"~")}),"/"===e[0]&&r.path.shift(),r):r}function o(e,t,r,n){this.rootSchema=e,this.resolvers=null,this.resolvedRootSchema=null,this.cache={},this.idCache={},this.refCache={refs:[],schemas:[]},this.missing$Ref=r,this.refStack=[],n=n||"",this._buildIdCache(e,n),n=this.refCache.refs[this.refCache.schemas.indexOf(this.rootSchema)]||n,this._buildResolvers(t,n)}var s=r(14),a=r(20),h="jsen: invalid schema reference",c="jsen: duplicate schema id",f="jsen: circular schema reference";o.prototype._cacheId=function(e,t,r){if(this.idCache[e])throw new Error(c+" "+e);this.idCache[e]={resolver:r,schema:t}},o.prototype._buildIdCache=function(e,t){var r,n,i,o=t;if(e&&"object"==typeof e)for("string"==typeof e.id&&e.id?(o=s.resolve(t,e.id),this._cacheId(o,e,this)):e===this.rootSchema&&t&&this._cacheId(t,e,this),e.$ref&&"string"==typeof e.$ref&&(r=s.resolve(o,e.$ref),this.refCache.schemas.push(e),this.refCache.refs.push(r)),n=Object.keys(e),i=0;i<n.length;i++)this._buildIdCache(e[n[i]],o)},o.prototype._buildResolvers=function(e,t){if(e&&"object"==typeof e){var r=this,n={};Object.keys(e).forEach(function(i){var a=s.resolve(t,i),h=new o(e[i],null,r.missing$Ref,a);r._cacheId(a,h.rootSchema,h),Object.keys(h.idCache).forEach(function(e){r.idCache[e]=h.idCache[e]}),n[i]=h}),this.resolvers=n}},o.prototype.getNormalizedRef=function(e){var t=this.refCache.schemas.indexOf(e);return this.refCache.refs[t]},o.prototype._resolveRef=function(e){var t,r,o,s,c,f=new Error(h+" "+e),p=this.idCache;if(!e||"string"!=typeof e)throw f;if(e===a.id&&(c=a),r=p[e],r&&(c=r.resolver.resolve(r.schema)),void 0===c&&(o=i(e),s=o.path,o.base&&(r=p[o.base]||p[o.base+"#"],r?c=r.resolver.resolve(n(r.schema,s.slice(0))):s.unshift(o.base))),void 0===c&&this.resolvedRootSchema&&(c=n(this.resolvedRootSchema,s.slice(0))),void 0===c&&(c=n(this.rootSchema,s.slice(0))),void 0===c&&s.length&&this.resolvers&&(t=n(this.resolvers,s),t&&(c=t.resolve(t.rootSchema))),void 0===c||"object"!=typeof c){if(!this.missing$Ref)throw f;c={}}return this.cache[e]===c?c:(this.cache[e]=c,void 0!==c.$ref&&(c=this.resolve(c)),c)},o.prototype.resolve=function(e){if(!e||"object"!=typeof e||void 0===e.$ref)return e;var t=this.getNormalizedRef(e)||e.$ref,r=this.cache[t];if(void 0!==r)return r;if(this.refStack.indexOf(t)>-1)throw new Error(f+" "+t);return this.refStack.push(t),r=this._resolveRef(t),this.refStack.pop(),e===this.rootSchema&&(this.resolvedRootSchema=r),r},o.prototype.hasRef=function(e){var t,r,n,i,o=Object.keys(e);if(o.indexOf("$ref")>-1)return!0;for(n=0,t=o.length;n<t;n++)if(r=o[n],e[r]&&"object"==typeof e[r]&&!Array.isArray(e[r])&&(i=this.hasRef(e[r])))return!0;return!1},o.resolvePointer=function(e,t){var r=i(t),o=r.path;return r.base&&(o=[r.base].concat(o)),n(e,o)},e.exports=o},function(e,t,r){function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function i(e,t,r){if(e&&c(e)&&e instanceof n)return e;var i=new n;return i.parse(e,t,r),i}function o(e){return h(e)&&(e=i(e)),e instanceof n?e.format():n.prototype.format.call(e)}function s(e,t){return i(e,!1,!0).resolve(t)}function a(e,t){return e?i(e,!1,!0).resolveObject(t):t}function h(e){return"string"==typeof e}function c(e){return"object"==typeof e&&null!==e}function f(e){return null===e}function p(e){return null==e}
/*! powerbi-models v0.10.1 | (c) 2016 Microsoft Corporation MIT */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["powerbi-models"]=t():e["powerbi-models"]=t()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){function n(e){var t=e.message;return t||(t=e.path+" is invalid. Not meeting "+e.keyword+" constraint"),{message:t}}function i(e,t){return function(r){var i=f(e,t),o=i(r);return o?void 0:i.errors.map(n)}}function o(e){var t=e,r=e;return"string"==typeof t.operator&&Array.isArray(t.values)?p.Basic:"string"==typeof r.logicalOperator&&Array.isArray(r.conditions)?p.Advanced:p.Unknown}function s(e){return void 0!==e.table&&void 0!==e.measure}function a(e){return void 0!==e.table&&void 0!==e.column}function h(e){return void 0!==e.table&&void 0!==e.hierarchy&&void 0!==e.hierarchyLevel}var c=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)};t.advancedFilterSchema=r(1),t.filterSchema=r(2),t.loadSchema=r(3),t.dashboardLoadSchema=r(4),t.pageSchema=r(5),t.settingsSchema=r(6),t.basicFilterSchema=r(7);var f=r(8);t.validateSettings=i(t.settingsSchema,{schemas:{basicFilter:t.basicFilterSchema,advancedFilter:t.advancedFilterSchema}}),t.validateReportLoad=i(t.loadSchema,{schemas:{settings:t.settingsSchema,basicFilter:t.basicFilterSchema,advancedFilter:t.advancedFilterSchema}}),t.validateDashboardLoad=i(t.dashboardLoadSchema),t.validatePage=i(t.pageSchema),t.validateFilter=i(t.filterSchema,{schemas:{basicFilter:t.basicFilterSchema,advancedFilter:t.advancedFilterSchema}}),function(e){e[e.Advanced=0]="Advanced",e[e.Basic=1]="Basic",e[e.Unknown=2]="Unknown"}(t.FilterType||(t.FilterType={}));var p=t.FilterType;t.getFilterType=o,t.isMeasure=s,t.isColumn=a,t.isHierarchy=h;var u=function(){function e(e){this.target=e}return e.prototype.toJSON=function(){return{$schema:this.schemaUrl,target:this.target}},e}();t.Filter=u;var l=function(e){function t(r,n){for(var i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];if(e.call(this,r),this.operator=n,this.schemaUrl=t.schemaUrl,0===i.length)throw new Error("values must be a non-empty array. You passed: "+i);Array.isArray(i[0])?this.values=i[0]:this.values=i}return c(t,e),t.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return t.operator=this.operator,t.values=this.values,t},t.schemaUrl="http://powerbi.com/product/schema#basic",t}(u);t.BasicFilter=l;var m=function(e){function t(r,n){for(var i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];if(e.call(this,r),this.schemaUrl=t.schemaUrl,"string"!=typeof n||0===n.length)throw new Error("logicalOperator must be a valid operator, You passed: "+n);this.logicalOperator=n;var s;if(s=Array.isArray(i[0])?i[0]:i,0===s.length)throw new Error("conditions must be a non-empty array. You passed: "+i);if(s.length>2)throw new Error("AdvancedFilters may not have more than two conditions. You passed: "+i.length);if(1===s.length&&"And"!==n)throw new Error('Logical Operator must be "And" when there is only one condition provided');this.conditions=s}return c(t,e),t.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return t.logicalOperator=this.logicalOperator,t.conditions=this.conditions,t},t.schemaUrl="http://powerbi.com/product/schema#advanced",t}(u);t.AdvancedFilter=m},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",type:"object",properties:{target:{oneOf:[{type:"object",properties:{table:{type:"string"},column:{type:"string"}},required:["table","column"]},{type:"object",properties:{table:{type:"string"},hierarchy:{type:"string"},hierarchyLevel:{type:"string"}},required:["table","hierarchy","hierarchyLevel"]},{type:"object",properties:{table:{type:"string"},measure:{type:"string"}},required:["table","measure"]}]},logicalOperator:{type:"string"},conditions:{type:"array",items:{type:"object",properties:{value:{type:["string","boolean","number"]},operator:{type:"string"}},required:["value","operator"]}}},required:["target","logicalOperator","conditions"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",oneOf:[{$ref:"#basicFilter"},{$ref:"#advancedFilter"}],invalidMessage:"filter is invalid"}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",type:"object",properties:{accessToken:{type:"string",messages:{type:"accessToken must be a string",required:"accessToken is required"}},id:{type:"string",messages:{type:"id must be a string",required:"id is required"}},settings:{$ref:"#settings"},pageName:{type:"string",messages:{type:"pageName must be a string"}},filters:{type:"array",items:{type:"object",oneOf:[{$ref:"#basicFilter"},{$ref:"#advancedFilter"}]},invalidMessage:"filters property is invalid"}},required:["accessToken","id"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",type:"object",properties:{accessToken:{type:"string",messages:{type:"accessToken must be a string",required:"accessToken is required"}},id:{type:"string",messages:{type:"id must be a string",required:"id is required"}},pageView:{type:"string",messages:{type:'pageView must be a string with one of the following values: "actualSize", "fitToWidth", "oneColumn"'}}},required:["accessToken","id"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",type:"object",properties:{name:{type:"string",messages:{type:"name must be a string",required:"name is required"}}},required:["name"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",type:"object",properties:{filterPaneEnabled:{type:"boolean",messages:{type:"filterPaneEnabled must be a boolean"}},navContentPaneEnabled:{type:"boolean",messages:{type:"navContentPaneEnabled must be a boolean"}}}}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",type:"object",properties:{target:{type:"object",properties:{table:{type:"string"},column:{type:"string"},hierarchy:{type:"string"},hierarchyLevel:{type:"string"},measure:{type:"string"}},required:["table"]},operator:{type:"string"},values:{type:"array",items:{type:["string","boolean","number"]}}},required:["target","operator","values"]}},function(e,t,r){e.exports=r(9)},function(e,t,r){"use strict";function n(e){return e=e instanceof RegExp?e:new RegExp(e),O?e.toString():"/"+e.source.replace(g,"\\$&")+"/"}function i(e){return'"'+e.replace(v,"\\$1")+'"'}function o(e,t){return b.lastIndex=0,b.test(t)?e+"."+t:e+"["+i(t)+"]"}function s(e){if(void 0===e)return"undefined";var t=Object.prototype.toString.call(e);return t.substr(8,t.length-9).toLowerCase()}function a(e){return(0|e)===e}function h(e,t){F[t].type=e,F[t].keyword=t}function c(e){var t,r,n,i=Object.keys(e),o=i.indexOf("properties"),s=i.indexOf("patternProperties"),a={"enum":Array.isArray(e["enum"])&&e["enum"].length>0,type:null,allType:[],perType:{}};for(e.type&&("string"==typeof e.type?a.type=[e.type]:Array.isArray(e.type)&&e.type.length&&(a.type=e.type.slice(0))),n=0;n<i.length;n++)t=i[n],"enum"!==t&&"type"!==t&&(r=F[t],r&&(r.type?(a.perType[r.type]||(a.perType[r.type]=[]),o>-1&&"required"===t||s>-1&&"additionalProperties"===t||a.perType[r.type].push(t)):a.allType.push(t)));return a}function f(e,t){var r,n,i=e.substr(4),o=i.length,s=[],a="",h=!1;for(n=0;n<o;n++)switch(r=i[n]){case".":a&&(a+=r);break;case"[":isNaN(+i[n+1])?(h=!0,a&&(s.push('"'+a+'"'),a="")):(h=!1,a&&(a+="."));break;case"]":s.push(h?a:'"'+a+'"'),a="";break;default:a+=r}return a&&s.push('"'+a+'"'),t&&s.push('"'+t+'"'),1===s.length&&h?'"" + '+s[0]+' + ""':s.join(' + "." + ')||'""'}function p(e){var t,r,n,i,o=e,a=s(e);if("object"===a)for(o={},t=Object.keys(e),i=0,r=t.length;i<r;i++)n=t[i],o[n]=p(e[n]);else if("array"===a)for(o=[],i=0,r=e.length;i<r;i++)o[i]=p(e[i]);else{if("regexp"===a)return new RegExp(e);if("date"===a)return new Date(e.toJSON())}return o}function u(e,t){for(var r=0,n=t.length;r<n;r++)if(w(e,t[r]))return!0;return!1}function l(){this.objects=[],this.properties=[]}function m(e,t,r,n,i){var o,a,h,c,f,u,d;if("object"!==s(e))return t;if(e=n.resolve(e),void 0===t&&e.hasOwnProperty("default")&&(t=p(e["default"])),o=s(t),"object"===o&&"object"===s(e.properties)){for(u=Object.keys(e.properties),c=0;c<u.length;c++)h=u[c],a=m(e.properties[h],t[h],r,n),void 0!==a&&(t[h]=a);if("always"!==r)for(d=Object.keys(t),c=0;c<d.length;c++)h=d[c],u.indexOf(h)<0&&(e.additionalProperties===!1||r===!1&&!e.additionalProperties)&&(i?i.mark(t,h):delete t[h])}else if("array"===o&&e.items){if("array"===s(e.items))for(c=0;c<e.items.length;c++)a=m(e.items[c],t[c],r,n),(void 0!==a||c<t.length)&&(t[c]=a);else if(t.length)for(c=0;c<t.length;c++)t[c]=m(e.items,t[c],r,n)}else if("array"===s(e.allOf)&&e.allOf.length){for(f=new l,c=0;c<e.allOf.length;c++)t=m(e.allOf[c],t,r,n,f);f.deleteDuplicates(),f.dispose()}return t}function d(e){this.path="data",this.schema=e.schema,this.formats=e.formats,this.greedy=e.greedy,this.resolver=e.resolver,this.id=e.id,this.funcache=e.funcache||{},this.scope=e.scope||{equalAny:u,unique:I,ucs2length:k,refs:{}}}function y(e,t){if("object"!==s(e))throw new Error(x);t=t||{};var r=0,n=function(){return"i"+r++},i=new $(e,t.schemas,t.missing$Ref||!1),o=new d({schema:e,resolver:i,id:n,schemas:t.schemas,formats:t.formats,greedy:t.greedy||!1}),a=A("validate","data")("validate.errors = []")('gen(data, "", validate.errors)')("return validate.errors.length === 0").compile({gen:o.compile()});return o.dispose(),o=null,a.errors=[],a.build=function(t,r){return m(e,r&&r.copy===!1?t:p(t),r&&r.additionalProperties,i)},a}var g=/[\/]/g,v=/(")/gim,b=/^[a-z_$][0-9a-z]*$/gi,x="jsen: invalid schema object",j="object"==typeof window&&!!window.navigator,O="/"!==new RegExp("/").source,A=r(10),w=r(11),I=r(12),$=r(13),q=r(21),k=r(22),S={},F={};S["null"]=function(e){return e+" === null"},S["boolean"]=function(e){return"typeof "+e+' === "boolean"'},S.string=function(e){return"typeof "+e+' === "string"'},S.number=function(e){return"typeof "+e+' === "number"'},S.integer=function(e){return"typeof "+e+' === "number" && !('+e+" % 1)"},S.array=function(e){return"Array.isArray("+e+")"},S.object=function(e){return"typeof "+e+' === "object" && '+e+" !== null && !Array.isArray("+e+")"},S.date=function(e){return e+" instanceof Date"},F["enum"]=function(e){var t=e.schema["enum"];e.code("if (!equalAny("+e.path+", "+JSON.stringify(t)+")) {"),e.error("enum"),e.code("}")},F.minimum=function(e){"number"==typeof e.schema.minimum&&(e.code("if ("+e.path+" < "+e.schema.minimum+") {"),e.error("minimum"),e.code("}"))},F.exclusiveMinimum=function(e){e.schema.exclusiveMinimum===!0&&"number"==typeof e.schema.minimum&&(e.code("if ("+e.path+" === "+e.schema.minimum+") {"),e.error("exclusiveMinimum"),e.code("}"))},F.maximum=function(e){"number"==typeof e.schema.maximum&&(e.code("if ("+e.path+" > "+e.schema.maximum+") {"),e.error("maximum"),e.code("}"))},F.exclusiveMaximum=function(e){e.schema.exclusiveMaximum===!0&&"number"==typeof e.schema.maximum&&(e.code("if ("+e.path+" === "+e.schema.maximum+") {"),e.error("exclusiveMaximum"),e.code("}"))},F.multipleOf=function(e){if("number"==typeof e.schema.multipleOf){var t=e.schema.multipleOf,r=t.toString().length-t.toFixed(0).length-1,n=r>0?Math.pow(10,r):1,i=e.path;r>0?e.code("if (+(Math.round(("+i+" * "+n+') + "e+" + '+r+') + "e-" + '+r+") % "+t*n+" !== 0) {"):e.code("if ((("+i+" * "+n+") % "+t*n+") !== 0) {"),e.error("multipleOf"),e.code("}")}},F.minLength=function(e){a(e.schema.minLength)&&(e.code("if (ucs2length("+e.path+") < "+e.schema.minLength+") {"),e.error("minLength"),e.code("}"))},F.maxLength=function(e){a(e.schema.maxLength)&&(e.code("if (ucs2length("+e.path+") > "+e.schema.maxLength+") {"),e.error("maxLength"),e.code("}"))},F.pattern=function(e){var t=e.schema.pattern;("string"==typeof t||t instanceof RegExp)&&(e.code("if (!("+n(t)+").test("+e.path+")) {"),e.error("pattern"),e.code("}"))},F.format=function(e){"string"==typeof e.schema.format&&q[e.schema.format]&&(e.code("if (!("+q[e.schema.format]+").test("+e.path+")) {"),e.error("format"),e.code("}"))},F.minItems=function(e){a(e.schema.minItems)&&(e.code("if ("+e.path+".length < "+e.schema.minItems+") {"),e.error("minItems"),e.code("}"))},F.maxItems=function(e){a(e.schema.maxItems)&&(e.code("if ("+e.path+".length > "+e.schema.maxItems+") {"),e.error("maxItems"),e.code("}"))},F.additionalItems=function(e){e.schema.additionalItems===!1&&Array.isArray(e.schema.items)&&(e.code("if ("+e.path+".length > "+e.schema.items.length+") {"),e.error("additionalItems"),e.code("}"))},F.uniqueItems=function(e){e.schema.uniqueItems&&(e.code("if (unique("+e.path+").length !== "+e.path+".length) {"),e.error("uniqueItems"),e.code("}"))},F.items=function(e){var t=e.declare(0),r=0;if("object"===s(e.schema.items))e.code("for ("+t+" = 0; "+t+" < "+e.path+".length; "+t+"++) {"),e.descend(e.path+"["+t+"]",e.schema.items),e.code("}");else if(Array.isArray(e.schema.items)){for(;r<e.schema.items.length;r++)e.code("if ("+e.path+".length - 1 >= "+r+") {"),e.descend(e.path+"["+r+"]",e.schema.items[r]),e.code("}");"object"===s(e.schema.additionalItems)&&(e.code("for ("+t+" = "+r+"; "+t+" < "+e.path+".length; "+t+"++) {"),e.descend(e.path+"["+t+"]",e.schema.additionalItems),e.code("}"))}},F.maxProperties=function(e){a(e.schema.maxProperties)&&(e.code("if (Object.keys("+e.path+").length > "+e.schema.maxProperties+") {"),e.error("maxProperties"),e.code("}"))},F.minProperties=function(e){a(e.schema.minProperties)&&(e.code("if (Object.keys("+e.path+").length < "+e.schema.minProperties+") {"),e.error("minProperties"),e.code("}"))},F.required=function(e){if(Array.isArray(e.schema.required))for(var t=0;t<e.schema.required.length;t++)e.code("if ("+o(e.path,e.schema.required[t])+" === undefined) {"),e.error("required",e.schema.required[t]),e.code("}")},F.properties=function(e){var t,r,n,i=e.schema.properties,a="object"===s(i)?Object.keys(i):[],h=Array.isArray(e.schema.required)?e.schema.required:[];if(a.length)for(r=0;r<a.length;r++)t=a[r],n=o(e.path,t),e.code("if ("+n+" !== undefined) {"),e.descend(n,i[t]),e.code("}"),h.indexOf(t)>-1&&(e.code("else {"),e.error("required",t),e.code("}"))},F.patternProperties=F.additionalProperties=function(e){var t,r,i,o,a,h,c,f="object"===s(e.schema.properties)?Object.keys(e.schema.properties):[],p=e.schema.patternProperties,u="object"===s(p)?Object.keys(p):[],l=e.schema.additionalProperties,m=l===!1||"object"===s(l);if(u.length||m){for(r=e.declare("[]"),i=e.declare('""'),o=e.declare(0),m&&(a=e.declare(!1)),e.code(r+" = Object.keys("+e.path+")"),e.code("for ("+o+" = 0; "+o+" < "+r+".length; "+o+"++) {")(i+" = "+r+"["+o+"]")("if ("+e.path+"["+i+"] === undefined) {")("continue")("}"),m&&e.code(a+" = false"),c=0;c<u.length;c++)h=u[c],e.code("if (("+n(h)+").test("+i+")) {"),e.descend(e.path+"["+i+"]",p[h]),m&&e.code(a+" = true"),e.code("}");m&&(f.length&&(t=e.declare(JSON.stringify(f)),e.code("if ("+t+".indexOf("+i+") > -1) {")("continue")("}")),e.code("if (!"+a+") {"),l===!1?e.error("additionalProperties",void 0,i):e.descend(e.path+"["+i+"]",l),e.code("}")),e.code("}")}},F.dependencies=function(e){if("object"===s(e.schema.dependencies))for(var t,r,n=Object.keys(e.schema.dependencies),i=n.length,a=0,h=0;h<i;h++){if(t=n[h],r=e.schema.dependencies[t],e.code("if ("+o(e.path,t)+" !== undefined) {"),"object"===s(r))e.descend(e.path,r);else for(a;a<r.length;a++)e.code("if ("+o(e.path,r[a])+" === undefined) {"),e.error("dependencies",r[a]),e.code("}");e.code("}")}},F.allOf=function(e){if(Array.isArray(e.schema.allOf))for(var t=0;t<e.schema.allOf.length;t++)e.descend(e.path,e.schema.allOf[t])},F.anyOf=function(e){if(Array.isArray(e.schema.anyOf)){var t=e.greedy,r=e.declare(0),n=e.declare(0),i=e.declare(!1),o=0;for(e.code(n+" = errors.length");o<e.schema.anyOf.length;o++)e.code("if (!"+i+") {"),e.code(r+" = errors.length"),e.greedy=!0,e.descend(e.path,e.schema.anyOf[o]),e.code(i+" = errors.length === "+r)("}");e.greedy=t,e.code("if (!"+i+") {"),e.error("anyOf"),e.code("} else {")("errors.length = "+n)("}")}},F.oneOf=function(e){if(Array.isArray(e.schema.oneOf)){var t=e.greedy,r=e.declare(0),n=e.declare(0),i=e.declare(0),o=0;for(e.code(n+" = errors.length"),e.code(r+" = 0");o<e.schema.oneOf.length;o++)e.code(i+" = errors.length"),e.greedy=!0,e.descend(e.path,e.schema.oneOf[o]),e.code("if (errors.length === "+i+") {")(r+"++")("}");e.greedy=t,e.code("if ("+r+" !== 1) {"),e.error("oneOf"),e.code("} else {")("errors.length = "+n)("}")}},F.not=function(e){if("object"===s(e.schema.not)){var t=e.greedy,r=e.declare(0);e.code(r+" = errors.length"),e.greedy=!0,e.descend(e.path,e.schema.not),e.greedy=t,e.code("if (errors.length === "+r+") {"),e.error("not"),e.code("} else {")("errors.length = "+r)("}")}},["minimum","exclusiveMinimum","maximum","exclusiveMaximum","multipleOf"].forEach(h.bind(null,"number")),["minLength","maxLength","pattern","format"].forEach(h.bind(null,"string")),["minItems","maxItems","additionalItems","uniqueItems","items"].forEach(h.bind(null,"array")),["maxProperties","minProperties","required","properties","patternProperties","additionalProperties","dependencies"].forEach(h.bind(null,"object")),["enum","allOf","anyOf","oneOf","not"].forEach(h.bind(null,null)),l.prototype.mark=function(e,t){var r,n=this.objects.indexOf(e);return n<0?(this.objects.push(e),r={},r[t]=1,void this.properties.push(r)):(r=this.properties[n],void(r[t]=r[t]?r[t]+1:1))},l.prototype.deleteDuplicates=function(){var e,t,r,n,i;for(n=0;n<this.properties.length;n++)for(e=this.properties[n],t=Object.keys(e),i=0;i<t.length;i++)r=t[i],e[r]>1&&delete this.objects[n][r]},l.prototype.dispose=function(){this.objects.length=0,this.properties.length=0},d.prototype.clone=function(e){var t=new d({schema:e,formats:this.formats,greedy:this.greedy,resolver:this.resolver,id:this.id,funcache:this.funcache,scope:this.scope});return t},d.prototype.declare=function(e){var t=this.id();return this.code.def(t,e),t},d.prototype.cache=function(e,t){var r,n=this.funcache[e];return n||(n=this.funcache[e]={key:this.id()},r=this.clone(t),n.func=r.compile(n.key),this.scope.refs[n.key]=n.func,r.dispose()),"refs."+n.key},d.prototype.error=function(e,t,r){var n=this.schema,o=this.path,s="data"!==o||t?'(path ? path + "." : "") + '+f(o,t)+",":"path,",a=t&&n.properties&&n.properties[t]?this.resolver.resolve(n.properties[t]):null,h=a?a.requiredMessage:n.invalidMessage;h||(h=a&&a.messages&&a.messages[e]||n.messages&&n.messages[e]),this.code("errors.push({"),h&&this.code("message: "+i(h)+","),r&&this.code("additionalProperties: "+r+","),this.code("path: "+s)("keyword: "+i(e))("})"),this.greedy||this.code("return")},d.prototype.refactor=function(e,t,r){var n="data"!==e?'(path ? path + "." : "") + '+f(e):"path",i=this.cache(r,t),o=this.declare();this.code(o+" = "+i+"("+e+", "+n+", errors)"),this.greedy||this.code("if (errors.length) { return }")},d.prototype.descend=function(e,t){var r=this.path,n=this.schema;this.path=e,this.schema=t,this.generate(),this.path=r,this.schema=n},d.prototype.generate=function(){function e(e){F[e](m)}var t,r,o,a,h,f,p,u=this.path,l=this.schema,m=this,d=this.scope;if("object"===s(l)){if(void 0!==l.$ref){if(l=this.resolver.resolve(l),this.resolver.hasRef(l))return void this.refactor(u,l,this.resolver.getNormalizedRef(this.schema)||this.schema.$ref);this.schema=l}if(o=c(l),o["enum"])return void F["enum"](m);for(a=Object.keys(o.perType),p=0;p<a.length;p++)f=a[p],this.code((p?"else ":"")+"if ("+S[f](u)+") {"),o.perType[f].forEach(e),this.code("}"),o.type&&(h=o.type.indexOf(f),h>-1&&o.type.splice(h,1));o.type&&(o.type.length?(this.code((a.length?"else ":"")+"if (!("+o.type.map(function(e){return S[e]?S[e](u):"true"}).join(" || ")+")) {"),this.error("type"),this.code("}")):(this.code("else {"),this.error("type"),this.code("}"))),o.allType.forEach(function(e){F[e](m)}),l.format&&this.formats&&(r=this.formats[l.format],r&&("string"==typeof r||r instanceof RegExp?(this.code("if (!("+n(r)+").test("+u+")) {"),this.error("format"),this.code("}")):"function"==typeof r&&((d.formats||(d.formats={}))[l.format]=r,(d.schemas||(d.schemas={}))[l.format]=l,t=i(l.format),this.code("if (!formats["+t+"]("+u+", schemas["+t+"])) {"),this.error("format"),this.code("}"))))}},d.prototype.compile=function(e){return this.code=A("jsen_compiled"+(e?"_"+e:""),"data","path","errors"),this.generate(),this.code.compile(this.scope)},d.prototype.dispose=function(){for(var e in this)this[e]=void 0},y.browser=j,y.clone=p,y.equal=w,y.unique=I,y.ucs2length=k,y.SchemaResolver=$,y.resolve=$.resolvePointer,e.exports=y},function(e,t){"use strict";e.exports=function(){var e=Array.apply(null,arguments),t=e.shift(),r=" ",n="",i="",o=1,s="{[",a="}]",h=function(){for(var e=r,t=0;t++<o-1;)e+=r;return e},c=function(e){n+=h()+e+"\n"},f=function(e){var t=e[0],r=e[e.length-1];return a.indexOf(t)>-1&&s.indexOf(r)>-1?(o--,c(e),o++):s.indexOf(r)>-1?(c(e),o++):a.indexOf(t)>-1?(o--,c(e)):c(e),f};return f.def=function(e,t){return i+=(i?",\n"+r+" ":"")+e+(void 0!==t?" = "+t:""),f},f.toSource=function(){return"function "+t+"("+e.join(", ")+") {\n"+r+'"use strict"\n'+(i?r+"var "+i+";\n":"")+n+"}"},f.compile=function(e){var t="return ("+f.toSource()+")",r=e||{},n=Object.keys(r),i=n.map(function(e){return r[e]});return Function.apply(null,n.concat(t)).apply(null,i)},f}},function(e,t){"use strict";function r(e){var t=Object.prototype.toString.call(e);return t.substr(8,t.length-9).toLowerCase()}function n(e,t){var r,n,o=Object.keys(e).sort(),s=Object.keys(t).sort();if(!i(o,s))return!1;for(r=0;r<o.length;r++)if(n=o[r],!i(e[n],t[n]))return!1;return!0}function i(e,t){var o,s=typeof e,a=typeof t;if("object"===s&&(s=r(e)),"object"===a&&(a=r(t)),s!==a)return!1;if("object"===s)return n(e,t);if("regexp"===s)return e.toString()===t.toString();if("array"===s){if(e.length!==t.length)return!1;for(o=0;o<e.length;o++)if(!i(e[o],t[o]))return!1;return!0}return e===t}e.exports=i},function(e,t,r){"use strict";function n(e,t,r){for(var n=0,i=e.length;n<i;n++)if(r(e[n],t))return n;return-1}var i=r(11);e.exports=function(e){return e.filter(function(e,t,r){return n(r,e,i)===t})},e.exports.findIndex=n},function(e,t,r){"use strict";function n(e,t){if(!t.length)return e;var r,i=t.shift();e&&"object"==typeof e&&e.hasOwnProperty(i)&&(r=e[i]);{if(!t.length)return r;if(r&&"object"==typeof r)return n(r,t)}}function i(e){var t=e.indexOf("#"),r={base:e.substr(0,t),path:[]};return t<0?(r.base=e,r):(e=e.substr(t+1))?(r.path=e.split("/").map(function(e){return decodeURIComponent(e).replace(/~1/g,"/").replace(/~0/g,"~")}),"/"===e[0]&&r.path.shift(),r):r}function o(e,t,r,n){this.rootSchema=e,this.resolvers=null,this.resolvedRootSchema=null,this.cache={},this.idCache={},this.refCache={refs:[],schemas:[]},this.missing$Ref=r,this.refStack=[],n=n||"",this._buildIdCache(e,n),n=this.refCache.refs[this.refCache.schemas.indexOf(this.rootSchema)]||n,this._buildResolvers(t,n)}var s=r(14),a=r(20),h="jsen: invalid schema reference",c="jsen: duplicate schema id",f="jsen: circular schema reference";o.prototype._cacheId=function(e,t,r){if(this.idCache[e])throw new Error(c+" "+e);this.idCache[e]={resolver:r,schema:t}},o.prototype._buildIdCache=function(e,t){var r,n,i,o=t;if(e&&"object"==typeof e)for("string"==typeof e.id&&e.id?(o=s.resolve(t,e.id),this._cacheId(o,e,this)):e===this.rootSchema&&t&&this._cacheId(t,e,this),e.$ref&&"string"==typeof e.$ref&&(r=s.resolve(o,e.$ref),this.refCache.schemas.push(e),this.refCache.refs.push(r)),n=Object.keys(e),i=0;i<n.length;i++)this._buildIdCache(e[n[i]],o)},o.prototype._buildResolvers=function(e,t){if(e&&"object"==typeof e){var r=this,n={};Object.keys(e).forEach(function(i){var a=s.resolve(t,i),h=new o(e[i],null,r.missing$Ref,a);r._cacheId(a,h.rootSchema,h),Object.keys(h.idCache).forEach(function(e){r.idCache[e]=h.idCache[e]}),n[i]=h}),this.resolvers=n}},o.prototype.getNormalizedRef=function(e){var t=this.refCache.schemas.indexOf(e);return this.refCache.refs[t]},o.prototype._resolveRef=function(e){var t,r,o,s,c,f=new Error(h+" "+e),p=this.idCache;if(!e||"string"!=typeof e)throw f;if(e===a.id&&(c=a),r=p[e],r&&(c=r.resolver.resolve(r.schema)),void 0===c&&(o=i(e),s=o.path,o.base&&(r=p[o.base]||p[o.base+"#"],r?c=r.resolver.resolve(n(r.schema,s.slice(0))):s.unshift(o.base))),void 0===c&&this.resolvedRootSchema&&(c=n(this.resolvedRootSchema,s.slice(0))),void 0===c&&(c=n(this.rootSchema,s.slice(0))),void 0===c&&s.length&&this.resolvers&&(t=n(this.resolvers,s),t&&(c=t.resolve(t.rootSchema))),void 0===c||"object"!=typeof c){if(!this.missing$Ref)throw f;c={}}return this.cache[e]===c?c:(this.cache[e]=c,void 0!==c.$ref&&(c=this.resolve(c)),c)},o.prototype.resolve=function(e){if(!e||"object"!=typeof e||void 0===e.$ref)return e;var t=this.getNormalizedRef(e)||e.$ref,r=this.cache[t];if(void 0!==r)return r;if(this.refStack.indexOf(t)>-1)throw new Error(f+" "+t);return this.refStack.push(t),r=this._resolveRef(t),this.refStack.pop(),e===this.rootSchema&&(this.resolvedRootSchema=r),r},o.prototype.hasRef=function(e){var t,r,n,i,o=Object.keys(e);if(o.indexOf("$ref")>-1)return!0;for(n=0,t=o.length;n<t;n++)if(r=o[n],e[r]&&"object"==typeof e[r]&&!Array.isArray(e[r])&&(i=this.hasRef(e[r])))return!0;return!1},o.resolvePointer=function(e,t){var r=i(t),o=r.path;return r.base&&(o=[r.base].concat(o)),n(e,o)},e.exports=o},function(e,t,r){function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function i(e,t,r){if(e&&c(e)&&e instanceof n)return e;var i=new n;return i.parse(e,t,r),i}function o(e){return h(e)&&(e=i(e)),e instanceof n?e.format():n.prototype.format.call(e)}function s(e,t){return i(e,!1,!0).resolve(t)}function a(e,t){return e?i(e,!1,!0).resolveObject(t):t}function h(e){return"string"==typeof e}function c(e){return"object"==typeof e&&null!==e}function f(e){return null===e}function p(e){return null==e}
// Copyright Joyent, Inc. and other Node contributors.

@@ -23,3 +23,3 @@ //

// USE OR OTHER DEALINGS IN THE SOFTWARE.
var u=r(15);t.parse=i,t.resolve=s,t.resolveObject=a,t.format=o,t.Url=n;var l=/^([a-z0-9.+-]+:)/i,m=/:[0-9]*$/,d=["<",">",'"',"`"," ","\r","\n","\t"],y=["{","}","|","\\","^","`"].concat(d),g=["'"].concat(y),v=["%","/","?",";","#"].concat(g),b=["/","?","#"],x=255,j=/^[a-z0-9A-Z_-]{0,63}$/,O=/^([a-z0-9A-Z_-]{0,63})(.*)$/,A={javascript:!0,"javascript:":!0},w={javascript:!0,"javascript:":!0},I={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},$=r(17);n.prototype.parse=function(e,t,r){if(!h(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e;n=n.trim();var i=l.exec(n);if(i){i=i[0];var o=i.toLowerCase();this.protocol=o,n=n.substr(i.length)}if(r||i||n.match(/^\/\/[^@\/]+@[^@\/]+/)){var s="//"===n.substr(0,2);!s||i&&w[i]||(n=n.substr(2),this.slashes=!0)}if(!w[i]&&(s||i&&!I[i])){for(var a=-1,c=0;c<b.length;c++){var f=n.indexOf(b[c]);f!==-1&&(a===-1||f<a)&&(a=f)}var p,m;m=a===-1?n.lastIndexOf("@"):n.lastIndexOf("@",a),m!==-1&&(p=n.slice(0,m),n=n.slice(m+1),this.auth=decodeURIComponent(p)),a=-1;for(var c=0;c<v.length;c++){var f=n.indexOf(v[c]);f!==-1&&(a===-1||f<a)&&(a=f)}a===-1&&(a=n.length),this.host=n.slice(0,a),n=n.slice(a),this.parseHost(),this.hostname=this.hostname||"";var d="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!d)for(var y=this.hostname.split(/\./),c=0,q=y.length;c<q;c++){var k=y[c];if(k&&!k.match(j)){for(var F="",S=0,C=k.length;S<C;S++)F+=k.charCodeAt(S)>127?"x":k[S];if(!F.match(j)){var P=y.slice(0,c),R=y.slice(c+1),E=k.match(O);E&&(P.push(E[1]),R.unshift(E[2])),R.length&&(n="/"+R.join(".")+n),this.hostname=P.join(".");break}}}if(this.hostname.length>x?this.hostname="":this.hostname=this.hostname.toLowerCase(),!d){for(var T=this.hostname.split("."),z=[],c=0;c<T.length;++c){var L=T[c];z.push(L.match(/[^A-Za-z0-9_-]/)?"xn--"+u.encode(L):L)}this.hostname=z.join(".")}var U=this.port?":"+this.port:"",Z=this.hostname||"";this.host=Z+U,this.href+=this.host,d&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==n[0]&&(n="/"+n))}if(!A[o])for(var c=0,q=g.length;c<q;c++){var M=g[c],_=encodeURIComponent(M);_===M&&(_=escape(M)),n=n.split(M).join(_)}var N=n.indexOf("#");N!==-1&&(this.hash=n.substr(N),n=n.slice(0,N));var D=n.indexOf("?");if(D!==-1?(this.search=n.substr(D),this.query=n.substr(D+1),t&&(this.query=$.parse(this.query)),n=n.slice(0,D)):t&&(this.search="",this.query={}),n&&(this.pathname=n),I[o]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var U=this.pathname||"",L=this.search||"";this.path=U+L}return this.href=this.format(),this},n.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,o="";this.host?i=e+this.host:this.hostname&&(i=e+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&c(this.query)&&Object.keys(this.query).length&&(o=$.stringify(this.query));var s=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||I[t])&&i!==!1?(i="//"+(i||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):i||(i=""),n&&"#"!==n.charAt(0)&&(n="#"+n),s&&"?"!==s.charAt(0)&&(s="?"+s),r=r.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),s=s.replace("#","%23"),t+i+r+s+n},n.prototype.resolve=function(e){return this.resolveObject(i(e,!1,!0)).format()},n.prototype.resolveObject=function(e){if(h(e)){var t=new n;t.parse(e,!1,!0),e=t}var r=new n;if(Object.keys(this).forEach(function(e){r[e]=this[e]},this),r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol)return Object.keys(e).forEach(function(t){"protocol"!==t&&(r[t]=e[t])}),I[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r;if(e.protocol&&e.protocol!==r.protocol){if(!I[e.protocol])return Object.keys(e).forEach(function(t){r[t]=e[t]}),r.href=r.format(),r;if(r.protocol=e.protocol,e.host||w[e.protocol])r.pathname=e.pathname;else{for(var i=(e.pathname||"").split("/");i.length&&!(e.host=i.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==i[0]&&i.unshift(""),i.length<2&&i.unshift(""),r.pathname=i.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var o=r.pathname||"",s=r.search||"";r.path=o+s}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var a=r.pathname&&"/"===r.pathname.charAt(0),c=e.host||e.pathname&&"/"===e.pathname.charAt(0),u=c||a||r.host&&e.pathname,l=u,m=r.pathname&&r.pathname.split("/")||[],i=e.pathname&&e.pathname.split("/")||[],d=r.protocol&&!I[r.protocol];if(d&&(r.hostname="",r.port=null,r.host&&(""===m[0]?m[0]=r.host:m.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===i[0]?i[0]=e.host:i.unshift(e.host)),e.host=null),u=u&&(""===i[0]||""===m[0])),c)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,m=i;else if(i.length)m||(m=[]),m.pop(),m=m.concat(i),r.search=e.search,r.query=e.query;else if(!p(e.search)){if(d){r.hostname=r.host=m.shift();var y=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");y&&(r.auth=y.shift(),r.host=r.hostname=y.shift())}return r.search=e.search,r.query=e.query,f(r.pathname)&&f(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!m.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var g=m.slice(-1)[0],v=(r.host||e.host)&&("."===g||".."===g)||""===g,b=0,x=m.length;x>=0;x--)g=m[x],"."==g?m.splice(x,1):".."===g?(m.splice(x,1),b++):b&&(m.splice(x,1),b--);if(!u&&!l)for(;b--;b)m.unshift("..");!u||""===m[0]||m[0]&&"/"===m[0].charAt(0)||m.unshift(""),v&&"/"!==m.join("/").substr(-1)&&m.push("");var j=""===m[0]||m[0]&&"/"===m[0].charAt(0);if(d){r.hostname=r.host=j?"":m.length?m.shift():"";var y=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");y&&(r.auth=y.shift(),r.host=r.hostname=y.shift())}return u=u||r.host&&m.length,u&&!j&&m.unshift(""),m.length?r.pathname=m.join("/"):(r.pathname=null,r.path=null),f(r.pathname)&&f(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var e=this.host,t=m.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,r){var n;(function(e,i){!function(o){function s(e){throw RangeError(P[e])}function a(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function h(e,t){var r=e.split("@"),n="";r.length>1&&(n=r[0]+"@",e=r[1]),e=e.replace(C,".");var i=e.split("."),o=a(i,t).join(".");return n+o}function c(e){for(var t,r,n=[],i=0,o=e.length;i<o;)t=e.charCodeAt(i++),t>=55296&&t<=56319&&i<o?(r=e.charCodeAt(i++),56320==(64512&r)?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--)):n.push(t);return n}function f(e){return a(e,function(e){var t="";return e>65535&&(e-=65536,t+=T(e>>>10&1023|55296),e=56320|1023&e),t+=T(e)}).join("")}function p(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:j}function u(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function l(e,t,r){var n=0;for(e=r?E(e/I):e>>1,e+=E(e/t);e>R*A>>1;n+=j)e=E(e/R);return E(n+(R+1)*e/(e+w))}function m(e){var t,r,n,i,o,a,h,c,u,m,d=[],y=e.length,g=0,v=q,b=$;for(r=e.lastIndexOf(k),r<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&s("not-basic"),d.push(e.charCodeAt(n));for(i=r>0?r+1:0;i<y;){for(o=g,a=1,h=j;i>=y&&s("invalid-input"),c=p(e.charCodeAt(i++)),(c>=j||c>E((x-g)/a))&&s("overflow"),g+=c*a,u=h<=b?O:h>=b+A?A:h-b,!(c<u);h+=j)m=j-u,a>E(x/m)&&s("overflow"),a*=m;t=d.length+1,b=l(g-o,t,0==o),E(g/t)>x-v&&s("overflow"),v+=E(g/t),g%=t,d.splice(g++,0,v)}return f(d)}function d(e){var t,r,n,i,o,a,h,f,p,m,d,y,g,v,b,w=[];for(e=c(e),y=e.length,t=q,r=0,o=$,a=0;a<y;++a)d=e[a],d<128&&w.push(T(d));for(n=i=w.length,i&&w.push(k);n<y;){for(h=x,a=0;a<y;++a)d=e[a],d>=t&&d<h&&(h=d);for(g=n+1,h-t>E((x-r)/g)&&s("overflow"),r+=(h-t)*g,t=h,a=0;a<y;++a)if(d=e[a],d<t&&++r>x&&s("overflow"),d==t){for(f=r,p=j;m=p<=o?O:p>=o+A?A:p-o,!(f<m);p+=j)b=f-m,v=j-m,w.push(T(u(m+b%v,0))),f=E(b/v);w.push(T(u(f,0))),o=l(r,g,n==i),r=0,++n}++r,++t}return w.join("")}function y(e){return h(e,function(e){return F.test(e)?m(e.slice(4).toLowerCase()):e})}function g(e){return h(e,function(e){return S.test(e)?"xn--"+d(e):e})}var v=("object"==typeof t&&t&&!t.nodeType&&t,"object"==typeof e&&e&&!e.nodeType&&e,"object"==typeof i&&i);v.global!==v&&v.window!==v&&v.self!==v||(o=v);var b,x=2147483647,j=36,O=1,A=26,w=38,I=700,$=72,q=128,k="-",F=/^xn--/,S=/[^\x20-\x7E]/,C=/[\x2E\u3002\uFF0E\uFF61]/g,P={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},R=j-O,E=Math.floor,T=String.fromCharCode;b={version:"1.3.2",ucs2:{decode:c,encode:f},decode:m,encode:d,toASCII:g,toUnicode:y},n=function(){return b}.call(t,r,t,e),!(void 0!==n&&(e.exports=n))}(this)}).call(t,r(16)(e),function(){return this}())},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,r){"use strict";t.decode=t.parse=r(18),t.encode=t.stringify=r(19)},function(e,t){
var u=r(15);t.parse=i,t.resolve=s,t.resolveObject=a,t.format=o,t.Url=n;var l=/^([a-z0-9.+-]+:)/i,m=/:[0-9]*$/,d=["<",">",'"',"`"," ","\r","\n","\t"],y=["{","}","|","\\","^","`"].concat(d),g=["'"].concat(y),v=["%","/","?",";","#"].concat(g),b=["/","?","#"],x=255,j=/^[a-z0-9A-Z_-]{0,63}$/,O=/^([a-z0-9A-Z_-]{0,63})(.*)$/,A={javascript:!0,"javascript:":!0},w={javascript:!0,"javascript:":!0},I={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},$=r(17);n.prototype.parse=function(e,t,r){if(!h(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e;n=n.trim();var i=l.exec(n);if(i){i=i[0];var o=i.toLowerCase();this.protocol=o,n=n.substr(i.length)}if(r||i||n.match(/^\/\/[^@\/]+@[^@\/]+/)){var s="//"===n.substr(0,2);!s||i&&w[i]||(n=n.substr(2),this.slashes=!0)}if(!w[i]&&(s||i&&!I[i])){for(var a=-1,c=0;c<b.length;c++){var f=n.indexOf(b[c]);f!==-1&&(a===-1||f<a)&&(a=f)}var p,m;m=a===-1?n.lastIndexOf("@"):n.lastIndexOf("@",a),m!==-1&&(p=n.slice(0,m),n=n.slice(m+1),this.auth=decodeURIComponent(p)),a=-1;for(var c=0;c<v.length;c++){var f=n.indexOf(v[c]);f!==-1&&(a===-1||f<a)&&(a=f)}a===-1&&(a=n.length),this.host=n.slice(0,a),n=n.slice(a),this.parseHost(),this.hostname=this.hostname||"";var d="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!d)for(var y=this.hostname.split(/\./),c=0,q=y.length;c<q;c++){var k=y[c];if(k&&!k.match(j)){for(var S="",F=0,C=k.length;F<C;F++)S+=k.charCodeAt(F)>127?"x":k[F];if(!S.match(j)){var P=y.slice(0,c),R=y.slice(c+1),E=k.match(O);E&&(P.push(E[1]),R.unshift(E[2])),R.length&&(n="/"+R.join(".")+n),this.hostname=P.join(".");break}}}if(this.hostname.length>x?this.hostname="":this.hostname=this.hostname.toLowerCase(),!d){for(var T=this.hostname.split("."),z=[],c=0;c<T.length;++c){var L=T[c];z.push(L.match(/[^A-Za-z0-9_-]/)?"xn--"+u.encode(L):L)}this.hostname=z.join(".")}var U=this.port?":"+this.port:"",Z=this.hostname||"";this.host=Z+U,this.href+=this.host,d&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==n[0]&&(n="/"+n))}if(!A[o])for(var c=0,q=g.length;c<q;c++){var M=g[c],_=encodeURIComponent(M);_===M&&(_=escape(M)),n=n.split(M).join(_)}var N=n.indexOf("#");N!==-1&&(this.hash=n.substr(N),n=n.slice(0,N));var D=n.indexOf("?");if(D!==-1?(this.search=n.substr(D),this.query=n.substr(D+1),t&&(this.query=$.parse(this.query)),n=n.slice(0,D)):t&&(this.search="",this.query={}),n&&(this.pathname=n),I[o]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var U=this.pathname||"",L=this.search||"";this.path=U+L}return this.href=this.format(),this},n.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,o="";this.host?i=e+this.host:this.hostname&&(i=e+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&c(this.query)&&Object.keys(this.query).length&&(o=$.stringify(this.query));var s=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||I[t])&&i!==!1?(i="//"+(i||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):i||(i=""),n&&"#"!==n.charAt(0)&&(n="#"+n),s&&"?"!==s.charAt(0)&&(s="?"+s),r=r.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),s=s.replace("#","%23"),t+i+r+s+n},n.prototype.resolve=function(e){return this.resolveObject(i(e,!1,!0)).format()},n.prototype.resolveObject=function(e){if(h(e)){var t=new n;t.parse(e,!1,!0),e=t}var r=new n;if(Object.keys(this).forEach(function(e){r[e]=this[e]},this),r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol)return Object.keys(e).forEach(function(t){"protocol"!==t&&(r[t]=e[t])}),I[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r;if(e.protocol&&e.protocol!==r.protocol){if(!I[e.protocol])return Object.keys(e).forEach(function(t){r[t]=e[t]}),r.href=r.format(),r;if(r.protocol=e.protocol,e.host||w[e.protocol])r.pathname=e.pathname;else{for(var i=(e.pathname||"").split("/");i.length&&!(e.host=i.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==i[0]&&i.unshift(""),i.length<2&&i.unshift(""),r.pathname=i.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var o=r.pathname||"",s=r.search||"";r.path=o+s}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var a=r.pathname&&"/"===r.pathname.charAt(0),c=e.host||e.pathname&&"/"===e.pathname.charAt(0),u=c||a||r.host&&e.pathname,l=u,m=r.pathname&&r.pathname.split("/")||[],i=e.pathname&&e.pathname.split("/")||[],d=r.protocol&&!I[r.protocol];if(d&&(r.hostname="",r.port=null,r.host&&(""===m[0]?m[0]=r.host:m.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===i[0]?i[0]=e.host:i.unshift(e.host)),e.host=null),u=u&&(""===i[0]||""===m[0])),c)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,m=i;else if(i.length)m||(m=[]),m.pop(),m=m.concat(i),r.search=e.search,r.query=e.query;else if(!p(e.search)){if(d){r.hostname=r.host=m.shift();var y=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");y&&(r.auth=y.shift(),r.host=r.hostname=y.shift())}return r.search=e.search,r.query=e.query,f(r.pathname)&&f(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!m.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var g=m.slice(-1)[0],v=(r.host||e.host)&&("."===g||".."===g)||""===g,b=0,x=m.length;x>=0;x--)g=m[x],"."==g?m.splice(x,1):".."===g?(m.splice(x,1),b++):b&&(m.splice(x,1),b--);if(!u&&!l)for(;b--;b)m.unshift("..");!u||""===m[0]||m[0]&&"/"===m[0].charAt(0)||m.unshift(""),v&&"/"!==m.join("/").substr(-1)&&m.push("");var j=""===m[0]||m[0]&&"/"===m[0].charAt(0);if(d){r.hostname=r.host=j?"":m.length?m.shift():"";var y=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");y&&(r.auth=y.shift(),r.host=r.hostname=y.shift())}return u=u||r.host&&m.length,u&&!j&&m.unshift(""),m.length?r.pathname=m.join("/"):(r.pathname=null,r.path=null),f(r.pathname)&&f(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var e=this.host,t=m.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,r){var n;(function(e,i){!function(o){function s(e){throw RangeError(P[e])}function a(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function h(e,t){var r=e.split("@"),n="";r.length>1&&(n=r[0]+"@",e=r[1]),e=e.replace(C,".");var i=e.split("."),o=a(i,t).join(".");return n+o}function c(e){for(var t,r,n=[],i=0,o=e.length;i<o;)t=e.charCodeAt(i++),t>=55296&&t<=56319&&i<o?(r=e.charCodeAt(i++),56320==(64512&r)?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--)):n.push(t);return n}function f(e){return a(e,function(e){var t="";return e>65535&&(e-=65536,t+=T(e>>>10&1023|55296),e=56320|1023&e),t+=T(e)}).join("")}function p(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:j}function u(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function l(e,t,r){var n=0;for(e=r?E(e/I):e>>1,e+=E(e/t);e>R*A>>1;n+=j)e=E(e/R);return E(n+(R+1)*e/(e+w))}function m(e){var t,r,n,i,o,a,h,c,u,m,d=[],y=e.length,g=0,v=q,b=$;for(r=e.lastIndexOf(k),r<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&s("not-basic"),d.push(e.charCodeAt(n));for(i=r>0?r+1:0;i<y;){for(o=g,a=1,h=j;i>=y&&s("invalid-input"),c=p(e.charCodeAt(i++)),(c>=j||c>E((x-g)/a))&&s("overflow"),g+=c*a,u=h<=b?O:h>=b+A?A:h-b,!(c<u);h+=j)m=j-u,a>E(x/m)&&s("overflow"),a*=m;t=d.length+1,b=l(g-o,t,0==o),E(g/t)>x-v&&s("overflow"),v+=E(g/t),g%=t,d.splice(g++,0,v)}return f(d)}function d(e){var t,r,n,i,o,a,h,f,p,m,d,y,g,v,b,w=[];for(e=c(e),y=e.length,t=q,r=0,o=$,a=0;a<y;++a)d=e[a],d<128&&w.push(T(d));for(n=i=w.length,i&&w.push(k);n<y;){for(h=x,a=0;a<y;++a)d=e[a],d>=t&&d<h&&(h=d);for(g=n+1,h-t>E((x-r)/g)&&s("overflow"),r+=(h-t)*g,t=h,a=0;a<y;++a)if(d=e[a],d<t&&++r>x&&s("overflow"),d==t){for(f=r,p=j;m=p<=o?O:p>=o+A?A:p-o,!(f<m);p+=j)b=f-m,v=j-m,w.push(T(u(m+b%v,0))),f=E(b/v);w.push(T(u(f,0))),o=l(r,g,n==i),r=0,++n}++r,++t}return w.join("")}function y(e){return h(e,function(e){return S.test(e)?m(e.slice(4).toLowerCase()):e})}function g(e){return h(e,function(e){return F.test(e)?"xn--"+d(e):e})}var v=("object"==typeof t&&t&&!t.nodeType&&t,"object"==typeof e&&e&&!e.nodeType&&e,"object"==typeof i&&i);v.global!==v&&v.window!==v&&v.self!==v||(o=v);var b,x=2147483647,j=36,O=1,A=26,w=38,I=700,$=72,q=128,k="-",S=/^xn--/,F=/[^\x20-\x7E]/,C=/[\x2E\u3002\uFF0E\uFF61]/g,P={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},R=j-O,E=Math.floor,T=String.fromCharCode;b={version:"1.3.2",ucs2:{decode:c,encode:f},decode:m,encode:d,toASCII:g,toUnicode:y},n=function(){return b}.call(t,r,t,e),!(void 0!==n&&(e.exports=n))}(this)}).call(t,r(16)(e),function(){return this}())},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,r){"use strict";t.decode=t.parse=r(18),t.encode=t.stringify=r(19)},function(e,t){
// Copyright Joyent, Inc. and other Node contributors.

@@ -26,0 +26,0 @@ //

{
"name": "powerbi-models",
"version": "0.10.0",
"version": "0.10.1",
"description": "Contains JavaScript &amp; TypeScript object models for Microsoft Power BI JavaScript SDK. For each model there is a TypeScript interface, a json schema definitions, and a validation function to ensure and object is valid.",

@@ -5,0 +5,0 @@ "main": "dist/models.js",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc